Renderer=void 0;let a=o(374),l=o(859),c=o(310),u=o(381),p=8*Float32Array.BYTES_PER_ELEMENT;class g{constructor(){this.attributes=new Float32Array(160),this.count=0}}let m=0,h=0,d=0,v=0,f=0,_=0,S=0;class b extends l.Disposable{constructor(y,w,T,k){super(),this._terminal=y,this._gl=w,this._dimensions=T,this._themeService=k,this._vertices=new g,this._verticesCursor=new g;let x=this._gl;this._program=(0,a.throwIfFalsy)((0,u.createProgram)(x,`#version 300 es
layout (location = 0) in vec2 a_position;
layout (location = 1) in vec2 a_size;
layout (location = 2) in vec4 a_color;
layout (location = 3) in vec2 a_unitquad;

uniform mat4 u_projection;

out vec4 v_color;

void main() {
  vec2 zeroToOne = a_position + (a_unitquad * a_size);
  gl_Position = u_projection * vec4(zeroToOne, 0.0, 1.0);
  v_color = a_color;
}`,`#version 300 es
precision lowp float;

in vec4 v_color;

out vec4 outColor;

void main() {
  outColor = v_color;
}`)),this.register((0,l.toDisposable)((()=>x.deleteProgram(this._program)))),this._projectionLocation=(0,a.throwIfFalsy)(x.getUniformLocation(this._program,"u_projection")),this._vertexArrayObject=x.createVertexArray(),x.bindVertexArray(this._vertexArrayObject);let E=new Float32Array([0,0,1,0,0,1,1,1]),R=x.createBuffer();this.register((0,l.toDisposable)((()=>x.deleteBuffer(R)))),x.bindBuffer(x.ARRAY_BUFFER,R),x.bufferData(x.ARRAY_BUFFER,E,x.STATIC_DRAW),x.enableVertexAttribArray(3),x.vertexAttribPointer(3,2,this._gl.FLOAT,!1,0,0);let L=new Uint8Array([0,1,2,3]),O=x.createBuffer();this.register((0,l.toDisposable)((()=>x.deleteBuffer(O)))),x.bindBuffer(x.ELEMENT_ARRAY_BUFFER,O),x.bufferData(x.ELEMENT_ARRAY_BUFFER,L,x.STATIC_DRAW),this._attributesBuffer=(0,a.throwIfFalsy)(x.createBuffer()),this.register((0,l.toDisposable)((()=>x.deleteBuffer(this._attributesBuffer)))),x.bindBuffer(x.ARRAY_BUFFER,this._attributesBuffer),x.enableVertexAttribArray(0),x.vertexAttribPointer(0,2,x.FLOAT,!1,p,0),x.vertexAttribDivisor(0,1),x.enableVertexAttribArray(1),x.vertexAttribPointer(1,2,x.FLOAT,!1,p,2*Float32Array.BYTES_PER_ELEMENT),x.vertexAttribDivisor(1,1),x.enableVertexAttribArray(2),x.vertexAttribPointer(2,4,x.FLOAT,!1,p,4*Float32Array.BYTES_PER_ELEMENT),x.vertexAttribDivisor(2,1),this._updateCachedColors(k.colors),this.register(this._themeService.onChangeColors((I=>{this._updateCachedColors(I),this._updateViewportRectangle()})))}renderBackgrounds(){this._renderVertices(this._vertices)}renderCursor(){this._renderVertices(this._verticesCursor)}_renderVertices(y){let w=this._gl;w.useProgram(this._program),w.bindVertexArray(this._vertexArrayObject),w.uniformMatrix4fv(this._projectionLocation,!1,u.PROJECTION_MATRIX),w.bindBuffer(w.ARRAY_BUFFER,this._attributesBuffer),w.bufferData(w.ARRAY_BUFFER,y.attributes,w.DYNAMIC_DRAW),w.drawElementsInstanced(this._gl.TRIANGLE_STRIP,4,w.UNSIGNED_BYTE,0,y.count)}handleResize(){this._updateViewportRectangle()}setDimensions(y){this._dimensions=y}_updateCachedColors(y){this._bgFloat=this._colorToFloat32Array(y.background),this._cursorFloat=this._colorToFloat32Array(y.cursor)}_updateViewportRectangle(){this._addRectangleFloat(this._vertices.attributes,0,0,0,this._terminal.cols*this._dimensions.device.cell.width,this._terminal.rows*this._dimensions.device.cell.height,this._bgFloat)}updateBackgrounds(y){let w=this._terminal,T=this._vertices,k,x,E,R,L,O,I,P,A,D,B,H=1;for(k=0;k<w.rows;k++){for(E=-1,R=0,L=0,O=!1,x=0;x<w.cols;x++)I=(k*w.cols+x)*c.RENDER_MODEL_INDICIES_PER_CELL,P=y.cells[I+c.RENDER_MODEL_BG_OFFSET],A=y.cells[I+c.RENDER_MODEL_FG_OFFSET],D=!!(67108864&A),(P!==R||A!==L&&(O||D))&&((R!==0||O&&L!==0)&&(B=8*H++,this._updateRectangle(T,B,L,R,E,x,k)),E=x,R=P,L=A,O=D);(R!==0||O&&L!==0)&&(B=8*H++,this._updateRectangle(T,B,L,R,E,w.cols,k))}T.count=H}updateCursor(y){let w=this._verticesCursor,T=y.cursor;if(!T||T.style==="block")return void(w.count=0);let k,x=0;T.style!=="bar"&&T.style!=="outline"||(k=8*x++,this._addRectangleFloat(w.attributes,k,T.x*this._dimensions.device.cell.width,T.y*this._dimensions.device.cell.height,T.style==="bar"?T.dpr*T.cursorWidth:T.dpr,this._dimensions.device.cell.height,this._cursorFloat)),T.style!=="underline"&&T.style!=="outline"||(k=8*x++,this._addRectangleFloat(w.attributes,k,T.x*this._dimensions.device.cell.width,(T.y+1)*this._dimensions.device.cell.height-T.dpr,T.width*this._dimensions.device.cell.width,T.dpr,this._cursorFloat)),T.style==="outline"&&(k=8*x++,this._addRectangleFloat(w.attributes,k,T.x*this._dimensions.device.cell.width,T.y*this._dimensions.device.cell.height,T.width*this._dimensions.device.cell.width,T.dpr,this._cursorFloat),k=8*x++,this._addRectangleFloat(w.attributes,k,(T.x+T.width)*this._dimensions.device.cell.width-T.dpr,T.y*this._dimensions.device.cell.height,T.dpr,this._dimensions.device.cell.height,this._cursorFloat)),w.count=x}_updateRectangle(y,w,T,k,x,E,R){if(67108864&T)switch(50331648&T){case 16777216:case 33554432:m=this._themeService.colors.ansi[255&T].rgba;break;case 50331648:m=(16777215&T)<<8;break;default:m=this._themeService.colors.foreground.rgba}else switch(50331648&k){case 16777216:case 33554432:m=this._themeService.colors.ansi[255&k].rgba;break;case 50331648:m=(16777215&k)<<8;break;default:m=this._themeService.colors.background.rgba}y.attributes.length<w+4&&(y.attributes=(0,u.expandFloat32Array)(y.attributes,this._terminal.rows*this._terminal.cols*8)),h=x*this._dimensions.device.cell.width,d=R*this._dimensions.device.cell.height,v=(m>>24&255)/255,f=(m>>16&255)/255,_=(m>>8&255)/255,S=1,this._addRectangle(y.attributes,w,h,d,(E-x)*this._dimensions.device.cell.width,this._dimensions.device.cell.height,v,f,_,S)}_addRectangle(y,w,T,k,x,E,R,L,O,I){y[w]=T/this._dimensions.device.canvas.width,y[w+1]=k/this._dimensions.device.canvas.height,y[w+2]=x/this._dimensions.device.canvas.width,y[w+3]=E/this._dimensions.device.canvas.height,y[w+4]=R,y[w+5]=L,y[w+6]=O,y[w+7]=I}_addRectangleFloat(y,w,T,k,x,E,R){y[w]=T/this._dimensions.device.canvas.width,y[w+1]=k/this._dimensions.device.canvas.height,y[w+2]=x/this._dimensions.device.canvas.width,y[w+3]=E/this._dimensions.device.canvas.height,y[w+4]=R[0],y[w+5]=R[1],y[w+6]=R[2],y[w+7]=R[3]}_colorToFloat32Array(y){return new Float32Array([(y.rgba>>24&255)/255,(y.rgba>>16&255)/255,(y.rgba>>8&255)/255,(255&y.rgba)/255])}}n.RectangleRenderer=b},310:(s,n,o)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.RenderModel=n.COMBINED_CHAR_BIT_MASK=n.RENDER_MODEL_EXT_OFFSET=n.RENDER_MODEL_FG_OFFSET=n.RENDER_MODEL_BG_OFFSET=n.RENDER_MODEL_INDICIES_PER_CELL=void 0;let a=o(296);n.RENDER_MODEL_INDICIES_PER_CELL=4,n.RENDER_MODEL_BG_OFFSET=1,n.RENDER_MODEL_FG_OFFSET=2,n.RENDER_MODEL_EXT_OFFSET=3,n.COMBINED_CHAR_BIT_MASK=2147483648,n.RenderModel=class{constructor(){this.cells=new Uint32Array(0),this.lineLengths=new Uint32Array(0),this.selection=(0,a.createSelectionRenderModel)()}resize(l,c){let u=l*c*n.RENDER_MODEL_INDICIES_PER_CELL;u!==this.cells.length&&(this.cells=new Uint32Array(u),this.lineLengths=new Uint32Array(c))}clear(){this.cells.fill(0,0),this.lineLengths.fill(0,0)}}},666:function(s,n,o){var a=this&&this.__decorate||function(E,R,L,O){var I,P=arguments.length,A=P<3?R:O===null?O=Object.getOwnPropertyDescriptor(R,L):O;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")A=Reflect.decorate(E,R,L,O);else for(var D=E.length-1;D>=0;D--)(I=E[D])&&(A=(P<3?I(A):P>3?I(R,L,A):I(R,L))||A);return P>3&&A&&Object.defineProperty(R,L,A),A};Object.defineProperty(n,"__esModule",{value:!0}),n.JoinedCellData=n.WebglRenderer=void 0;let l=o(820),c=o(274),u=o(627),p=o(457),g=o(56),m=o(374),h=o(345),d=o(859),v=o(147),f=o(782),_=o(855),S=o(776),b=o(965),C=o(742),y=o(310),w=o(733);class T extends d.Disposable{constructor(R,L,O,I,P,A,D,B,H){super(),this._terminal=R,this._characterJoinerService=L,this._charSizeService=O,this._coreBrowserService=I,this._coreService=P,this._decorationService=A,this._optionsService=D,this._themeService=B,this._cursorBlinkStateManager=new d.MutableDisposable,this._charAtlasDisposable=this.register(new d.MutableDisposable),this._model=new y.RenderModel,this._workCell=new f.CellData,this._rectangleRenderer=this.register(new d.MutableDisposable),this._glyphRenderer=this.register(new d.MutableDisposable),this._onChangeTextureAtlas=this.register(new h.EventEmitter),this.onChangeTextureAtlas=this._onChangeTextureAtlas.event,this._onAddTextureAtlasCanvas=this.register(new h.EventEmitter),this.onAddTextureAtlasCanvas=this._onAddTextureAtlasCanvas.event,this._onRemoveTextureAtlasCanvas=this.register(new h.EventEmitter),this.onRemoveTextureAtlasCanvas=this._onRemoveTextureAtlasCanvas.event,this._onRequestRedraw=this.register(new h.EventEmitter),this.onRequestRedraw=this._onRequestRedraw.event,this._onContextLoss=this.register(new h.EventEmitter),this.onContextLoss=this._onContextLoss.event,this.register(this._themeService.onChangeColors((()=>this._handleColorChange()))),this._cellColorResolver=new c.CellColorResolver(this._terminal,this._model.selection,this._decorationService,this._coreBrowserService,this._themeService),this._core=this._terminal._core,this._renderLayers=[new w.LinkRenderLayer(this._core.screenElement,2,this._terminal,this._core.linkifier2,this._coreBrowserService,D,this._themeService)],this.dimensions=(0,m.createRenderDimensions)(),this._devicePixelRatio=this._coreBrowserService.dpr,this._updateDimensions(),this._updateCursorBlink(),this.register(D.onOptionChange((()=>this._handleOptionsChanged()))),this._canvas=document.createElement("canvas");let j={antialias:!1,depth:!1,preserveDrawingBuffer:H};if(this._gl=this._canvas.getContext("webgl2",j),!this._gl)throw new Error("WebGL2 not supported "+this._gl);this.register((0,l.addDisposableDomListener)(this._canvas,"webglcontextlost",(U=>{console.log("webglcontextlost event received"),U.preventDefault(),this._contextRestorationTimeout=setTimeout((()=>{this._contextRestorationTimeout=void 0,console.warn("webgl context not restored; firing onContextLoss"),this._onContextLoss.fire(U)}),3e3)}))),this.register((0,l.addDisposableDomListener)(this._canvas,"webglcontextrestored",(U=>{console.warn("webglcontextrestored event received"),clearTimeout(this._contextRestorationTimeout),this._contextRestorationTimeout=void 0,(0,u.removeTerminalFromCache)(this._terminal),this._initializeWebGLState(),this._requestRedrawViewport()}))),this.register((0,g.observeDevicePixelDimensions)(this._canvas,this._coreBrowserService.window,((U,G)=>this._setCanvasDevicePixelDimensions(U,G)))),this._core.screenElement.appendChild(this._canvas),[this._rectangleRenderer.value,this._glyphRenderer.value]=this._initializeWebGLState(),this._isAttached=this._coreBrowserService.window.document.body.contains(this._core.screenElement),this.register((0,d.toDisposable)((()=>{var U;for(let G of this._renderLayers)G.dispose();(U=this._canvas.parentElement)===null||U===void 0||U.removeChild(this._canvas),(0,u.removeTerminalFromCache)(this._terminal)})))}get textureAtlas(){var R;return(R=this._charAtlas)===null||R===void 0?void 0:R.pages[0].canvas}_handleColorChange(){this._refreshCharAtlas(),this._clearModel(!0)}handleDevicePixelRatioChange(){this._devicePixelRatio!==this._coreBrowserService.dpr&&(this._devicePixelRatio=this._coreBrowserService.dpr,this.handleResize(this._terminal.cols,this._terminal.rows))}handleResize(R,L){var O,I,P,A;this._updateDimensions(),this._model.resize(this._terminal.cols,this._terminal.rows);for(let D of this._renderLayers)D.resize(this._terminal,this.dimensions);this._canvas.width=this.dimensions.device.canvas.width,this._canvas.height=this.dimensions.device.canvas.height,this._canvas.style.width=`${this.dimensions.css.canvas.width}px`,this._canvas.style.height=`${this.dimensions.css.canvas.height}px`,this._core.screenElement.style.width=`${this.dimensions.css.canvas.width}px`,this._core.screenElement.style.height=`${this.dimensions.css.canvas.height}px`,(O=this._rectangleRenderer.value)===null||O===void 0||O.setDimensions(this.dimensions),(I=this._rectangleRenderer.value)===null||I===void 0||I.handleResize(),(P=this._glyphRenderer.value)===null||P===void 0||P.setDimensions(this.dimensions),(A=this._glyphRenderer.value)===null||A===void 0||A.handleResize(),this._refreshCharAtlas(),this._clearModel(!1)}handleCharSizeChanged(){this.handleResize(this._terminal.cols,this._terminal.rows)}handleBlur(){var R;for(let L of this._renderLayers)L.handleBlur(this._terminal);(R=this._cursorBlinkStateManager.value)===null||R===void 0||R.pause(),this._requestRedrawViewport()}handleFocus(){var R;for(let L of this._renderLayers)L.handleFocus(this._terminal);(R=this._cursorBlinkStateManager.value)===null||R===void 0||R.resume(),this._requestRedrawViewport()}handleSelectionChanged(R,L,O){for(let I of this._renderLayers)I.handleSelectionChanged(this._terminal,R,L,O);this._model.selection.update(this._terminal,R,L,O),this._requestRedrawViewport()}handleCursorMove(){var R;for(let L of this._renderLayers)L.handleCursorMove(this._terminal);(R=this._cursorBlinkStateManager.value)===null||R===void 0||R.restartBlinkAnimation()}_handleOptionsChanged(){this._updateDimensions(),this._refreshCharAtlas(),this._updateCursorBlink()}_initializeWebGLState(){return this._rectangleRenderer.value=new C.RectangleRenderer(this._terminal,this._gl,this.dimensions,this._themeService),this._glyphRenderer.value=new b.GlyphRenderer(this._terminal,this._gl,this.dimensions),this.handleCharSizeChanged(),[this._rectangleRenderer.value,this._glyphRenderer.value]}_refreshCharAtlas(){var R;if(this.dimensions.device.char.width<=0&&this.dimensions.device.char.height<=0)return void(this._isAttached=!1);let L=(0,u.acquireTextureAtlas)(this._terminal,this._optionsService.rawOptions,this._themeService.colors,this.dimensions.device.cell.width,this.dimensions.device.cell.height,this.dimensions.device.char.width,this.dimensions.device.char.height,this._coreBrowserService.dpr);this._charAtlas!==L&&(this._onChangeTextureAtlas.fire(L.pages[0].canvas),this._charAtlasDisposable.value=(0,d.getDisposeArrayDisposable)([(0,h.forwardEvent)(L.onAddTextureAtlasCanvas,this._onAddTextureAtlasCanvas),(0,h.forwardEvent)(L.onRemoveTextureAtlasCanvas,this._onRemoveTextureAtlasCanvas)])),this._charAtlas=L,this._charAtlas.warmUp(),(R=this._glyphRenderer.value)===null||R===void 0||R.setAtlas(this._charAtlas)}_clearModel(R){var L;this._model.clear(),R&&((L=this._glyphRenderer.value)===null||L===void 0||L.clear())}clearTextureAtlas(){var R;(R=this._charAtlas)===null||R===void 0||R.clearTexture(),this._clearModel(!0),this._requestRedrawViewport()}clear(){var R;this._clearModel(!0);for(let L of this._renderLayers)L.reset(this._terminal);(R=this._cursorBlinkStateManager.value)===null||R===void 0||R.restartBlinkAnimation(),this._updateCursorBlink()}registerCharacterJoiner(R){return-1}deregisterCharacterJoiner(R){return!1}renderRows(R,L){if(!this._isAttached){if(!(this._coreBrowserService.window.document.body.contains(this._core.screenElement)&&this._charSizeService.width&&this._charSizeService.height))return;this._updateDimensions(),this._refreshCharAtlas(),this._isAttached=!0}for(let O of this._renderLayers)O.handleGridChanged(this._terminal,R,L);this._glyphRenderer.value&&this._rectangleRenderer.value&&(this._glyphRenderer.value.beginFrame()?(this._clearModel(!0),this._updateModel(0,this._terminal.rows-1)):this._updateModel(R,L),this._rectangleRenderer.value.renderBackgrounds(),this._glyphRenderer.value.render(this._model),this._cursorBlinkStateManager.value&&!this._cursorBlinkStateManager.value.isCursorVisible||this._rectangleRenderer.value.renderCursor())}_updateCursorBlink(){this._terminal.options.cursorBlink?this._cursorBlinkStateManager.value=new p.CursorBlinkStateManager((()=>{this._requestRedrawCursor()}),this._coreBrowserService):this._cursorBlinkStateManager.clear(),this._requestRedrawCursor()}_updateModel(R,L){let O=this._core,I,P,A,D,B,H,j,U,G,re,M,N,$,z=this._workCell;R=x(R,O.rows-1,0),L=x(L,O.rows-1,0);let se=this._terminal.buffer.active.baseY+this._terminal.buffer.active.cursorY,X=Math.min(this._terminal.buffer.active.cursorX,O.cols-1),me=-1,Le=this._coreService.isCursorInitialized&&!this._coreService.isCursorHidden&&(!this._cursorBlinkStateManager.value||this._cursorBlinkStateManager.value.isCursorVisible);this._model.cursor=void 0;let Ie=!1;for(P=R;P<=L;P++)for(A=P+O.buffer.ydisp,D=O.buffer.lines.get(A),this._model.lineLengths[P]=0,B=this._characterJoinerService.getJoinedCharacters(A),N=0;N<O.cols;N++)if(I=this._cellColorResolver.result.bg,D.loadCell(N,z),N===0&&(I=this._cellColorResolver.result.bg),H=!1,j=N,B.length>0&&N===B[0][0]&&(H=!0,U=B.shift(),z=new k(z,D.translateToString(!0,U[0],U[1]),U[1]-U[0]),j=U[1]-1),G=z.getChars(),re=z.getCode(),M=(P*O.cols+N)*y.RENDER_MODEL_INDICIES_PER_CELL,this._cellColorResolver.resolve(z,N,A),Le&&A===se&&(N===X&&(this._model.cursor={x:X,y:this._terminal.buffer.active.cursorY,width:z.getWidth(),style:this._coreBrowserService.isFocused?O.options.cursorStyle||"block":O.options.cursorInactiveStyle,cursorWidth:O.options.cursorWidth,dpr:this._devicePixelRatio},me=X+z.getWidth()-1),N>=X&&N<=me&&(this._coreBrowserService.isFocused&&(O.options.cursorStyle||"block")==="block"||this._coreBrowserService.isFocused===!1&&O.options.cursorInactiveStyle==="block")&&(this._cellColorResolver.result.fg=50331648|this._themeService.colors.cursorAccent.rgba>>8&16777215,this._cellColorResolver.result.bg=50331648|this._themeService.colors.cursor.rgba>>8&16777215)),re!==_.NULL_CELL_CODE&&(this._model.lineLengths[P]=N+1),(this._model.cells[M]!==re||this._model.cells[M+y.RENDER_MODEL_BG_OFFSET]!==this._cellColorResolver.result.bg||this._model.cells[M+y.RENDER_MODEL_FG_OFFSET]!==this._cellColorResolver.result.fg||this._model.cells[M+y.RENDER_MODEL_EXT_OFFSET]!==this._cellColorResolver.result.ext)&&(Ie=!0,G.length>1&&(re|=y.COMBINED_CHAR_BIT_MASK),this._model.cells[M]=re,this._model.cells[M+y.RENDER_MODEL_BG_OFFSET]=this._cellColorResolver.result.bg,this._model.cells[M+y.RENDER_MODEL_FG_OFFSET]=this._cellColorResolver.result.fg,this._model.cells[M+y.RENDER_MODEL_EXT_OFFSET]=this._cellColorResolver.result.ext,this._glyphRenderer.value.updateCell(N,P,re,this._cellColorResolver.result.bg,this._cellColorResolver.result.fg,this._cellColorResolver.result.ext,G,I),H))for(z=this._workCell,N++;N<j;N++)$=(P*O.cols+N)*y.RENDER_MODEL_INDICIES_PER_CELL,this._glyphRenderer.value.updateCell(N,P,_.NULL_CELL_CODE,0,0,0,_.NULL_CELL_CHAR,0),this._model.cells[$]=_.NULL_CELL_CODE,this._model.cells[$+y.RENDER_MODEL_BG_OFFSET]=this._cellColorResolver.result.bg,this._model.cells[$+y.RENDER_MODEL_FG_OFFSET]=this._cellColorResolver.result.fg,this._model.cells[$+y.RENDER_MODEL_EXT_OFFSET]=this._cellColorResolver.result.ext;Ie&&this._rectangleRenderer.value.updateBackgrounds(this._model),this._rectangleRenderer.value.updateCursor(this._model)}_updateDimensions(){this._charSizeService.width&&this._charSizeService.height&&(this.dimensions.device.char.width=Math.floor(this._charSizeService.width*this._devicePixelRatio),this.dimensions.device.char.height=Math.ceil(this._charSizeService.height*this._devicePixelRatio),this.dimensions.device.cell.height=Math.floor(this.dimensions.device.char.height*this._optionsService.rawOptions.lineHeight),this.dimensions.device.char.top=this._optionsService.rawOptions.lineHeight===1?0:Math.round((this.dimensions.device.cell.height-this.dimensions.device.char.height)/2),this.dimensions.device.cell.width=this.dimensions.device.char.width+Math.round(this._optionsService.rawOptions.letterSpacing),this.dimensions.device.char.left=Math.floor(this._optionsService.rawOptions.letterSpacing/2),this.dimensions.device.canvas.height=this._terminal.rows*this.dimensions.device.cell.height,this.dimensions.device.canvas.width=this._terminal.cols*this.dimensions.device.cell.width,this.dimensions.css.canvas.height=Math.round(this.dimensions.device.canvas.height/this._devicePixelRatio),this.dimensions.css.canvas.width=Math.round(this.dimensions.device.canvas.width/this._devicePixelRatio),this.dimensions.css.cell.height=this.dimensions.device.cell.height/this._devicePixelRatio,this.dimensions.css.cell.width=this.dimensions.device.cell.width/this._devicePixelRatio)}_setCanvasDevicePixelDimensions(R,L){this._canvas.width===R&&this._canvas.height===L||(this._canvas.width=R,this._canvas.height=L,this._requestRedrawViewport())}_requestRedrawViewport(){this._onRequestRedraw.fire({start:0,end:this._terminal.rows-1})}_requestRedrawCursor(){let R=this._terminal.buffer.active.cursorY;this._onRequestRedraw.fire({start:R,end:R})}}n.WebglRenderer=T,a([S.traceCall],T.prototype,"renderRows",null);class k extends v.AttributeData{constructor(R,L,O){super(),this.content=0,this.combinedData="",this.fg=R.fg,this.bg=R.bg,this.combinedData=L,this._width=O}isCombined(){return 2097152}getWidth(){return this._width}getChars(){return this.combinedData}getCode(){return 2097151}setFromCharData(R){throw new Error("not implemented")}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}}function x(E,R,L=0){return Math.max(Math.min(E,R),L)}n.JoinedCellData=k},381:(s,n,o)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.GLTexture=n.expandFloat32Array=n.createShader=n.createProgram=n.PROJECTION_MATRIX=void 0;let a=o(374);function l(c,u,p){let g=(0,a.throwIfFalsy)(c.createShader(u));if(c.shaderSource(g,p),c.compileShader(g),c.getShaderParameter(g,c.COMPILE_STATUS))return g;console.error(c.getShaderInfoLog(g)),c.deleteShader(g)}n.PROJECTION_MATRIX=new Float32Array([2,0,0,0,0,-2,0,0,0,0,1,0,-1,1,0,1]),n.createProgram=function(c,u,p){let g=(0,a.throwIfFalsy)(c.createProgram());if(c.attachShader(g,(0,a.throwIfFalsy)(l(c,c.VERTEX_SHADER,u))),c.attachShader(g,(0,a.throwIfFalsy)(l(c,c.FRAGMENT_SHADER,p))),c.linkProgram(g),c.getProgramParameter(g,c.LINK_STATUS))return g;console.error(c.getProgramInfoLog(g)),c.deleteProgram(g)},n.createShader=l,n.expandFloat32Array=function(c,u){let p=Math.min(2*c.length,u),g=new Float32Array(p);for(let m=0;m<c.length;m++)g[m]=c[m];return g},n.GLTexture=class{constructor(c){this.texture=c,this.version=-1}}},592:(s,n,o)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.BaseRenderLayer=void 0;let a=o(627),l=o(237),c=o(374),u=o(859);class p extends u.Disposable{constructor(m,h,d,v,f,_,S,b){super(),this._container=h,this._alpha=f,this._coreBrowserService=_,this._optionsService=S,this._themeService=b,this._deviceCharWidth=0,this._deviceCharHeight=0,this._deviceCellWidth=0,this._deviceCellHeight=0,this._deviceCharLeft=0,this._deviceCharTop=0,this._canvas=document.createElement("canvas"),this._canvas.classList.add(`xterm-${d}-layer`),this._canvas.style.zIndex=v.toString(),this._initCanvas(),this._container.appendChild(this._canvas),this.register(this._themeService.onChangeColors((C=>{this._refreshCharAtlas(m,C),this.reset(m)}))),this.register((0,u.toDisposable)((()=>{this._canvas.remove()})))}_initCanvas(){this._ctx=(0,c.throwIfFalsy)(this._canvas.getContext("2d",{alpha:this._alpha})),this._alpha||this._clearAll()}handleBlur(m){}handleFocus(m){}handleCursorMove(m){}handleGridChanged(m,h,d){}handleSelectionChanged(m,h,d,v=!1){}_setTransparency(m,h){if(h===this._alpha)return;let d=this._canvas;this._alpha=h,this._canvas=this._canvas.cloneNode(),this._initCanvas(),this._container.replaceChild(this._canvas,d),this._refreshCharAtlas(m,this._themeService.colors),this.handleGridChanged(m,0,m.rows-1)}_refreshCharAtlas(m,h){this._deviceCharWidth<=0&&this._deviceCharHeight<=0||(this._charAtlas=(0,a.acquireTextureAtlas)(m,this._optionsService.rawOptions,h,this._deviceCellWidth,this._deviceCellHeight,this._deviceCharWidth,this._deviceCharHeight,this._coreBrowserService.dpr),this._charAtlas.warmUp())}resize(m,h){this._deviceCellWidth=h.device.cell.width,this._deviceCellHeight=h.device.cell.height,this._deviceCharWidth=h.device.char.width,this._deviceCharHeight=h.device.char.height,this._deviceCharLeft=h.device.char.left,this._deviceCharTop=h.device.char.top,this._canvas.width=h.device.canvas.width,this._canvas.height=h.device.canvas.height,this._canvas.style.width=`${h.css.canvas.width}px`,this._canvas.style.height=`${h.css.canvas.height}px`,this._alpha||this._clearAll(),this._refreshCharAtlas(m,this._themeService.colors)}_fillBottomLineAtCells(m,h,d=1){this._ctx.fillRect(m*this._deviceCellWidth,(h+1)*this._deviceCellHeight-this._coreBrowserService.dpr-1,d*this._deviceCellWidth,this._coreBrowserService.dpr)}_clearAll(){this._alpha?this._ctx.clearRect(0,0,this._canvas.width,this._canvas.height):(this._ctx.fillStyle=this._themeService.colors.background.css,this._ctx.fillRect(0,0,this._canvas.width,this._canvas.height))}_clearCells(m,h,d,v){this._alpha?this._ctx.clearRect(m*this._deviceCellWidth,h*this._deviceCellHeight,d*this._deviceCellWidth,v*this._deviceCellHeight):(this._ctx.fillStyle=this._themeService.colors.background.css,this._ctx.fillRect(m*this._deviceCellWidth,h*this._deviceCellHeight,d*this._deviceCellWidth,v*this._deviceCellHeight))}_fillCharTrueColor(m,h,d,v){this._ctx.font=this._getFont(m,!1,!1),this._ctx.textBaseline=l.TEXT_BASELINE,this._clipCell(d,v,h.getWidth()),this._ctx.fillText(h.getChars(),d*this._deviceCellWidth+this._deviceCharLeft,v*this._deviceCellHeight+this._deviceCharTop+this._deviceCharHeight)}_clipCell(m,h,d){this._ctx.beginPath(),this._ctx.rect(m*this._deviceCellWidth,h*this._deviceCellHeight,d*this._deviceCellWidth,this._deviceCellHeight),this._ctx.clip()}_getFont(m,h,d){return`${d?"italic":""} ${h?m.options.fontWeightBold:m.options.fontWeight} ${m.options.fontSize*this._coreBrowserService.dpr}px ${m.options.fontFamily}`}}n.BaseRenderLayer=p},733:(s,n,o)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.LinkRenderLayer=void 0;let a=o(197),l=o(237),c=o(592);class u extends c.BaseRenderLayer{constructor(g,m,h,d,v,f,_){super(h,g,"link",m,!0,v,f,_),this.register(d.onShowLinkUnderline((S=>this._handleShowLinkUnderline(S)))),this.register(d.onHideLinkUnderline((S=>this._handleHideLinkUnderline(S))))}resize(g,m){super.resize(g,m),this._state=void 0}reset(g){this._clearCurrentLink()}_clearCurrentLink(){if(this._state){this._clearCells(this._state.x1,this._state.y1,this._state.cols-this._state.x1,1);let g=this._state.y2-this._state.y1-1;g>0&&this._clearCells(0,this._state.y1+1,this._state.cols,g),this._clearCells(0,this._state.y2,this._state.x2,1),this._state=void 0}}_handleShowLinkUnderline(g){if(g.fg===l.INVERTED_DEFAULT_COLOR?this._ctx.fillStyle=this._themeService.colors.background.css:g.fg!==void 0&&(0,a.is256Color)(g.fg)?this._ctx.fillStyle=this._themeService.colors.ansi[g.fg].css:this._ctx.fillStyle=this._themeService.colors.foreground.css,g.y1===g.y2)this._fillBottomLineAtCells(g.x1,g.y1,g.x2-g.x1);else{this._fillBottomLineAtCells(g.x1,g.y1,g.cols-g.x1);for(let m=g.y1+1;m<g.y2;m++)this._fillBottomLineAtCells(0,m,g.cols);this._fillBottomLineAtCells(0,g.y2,g.x2)}this._state=g}_handleHideLinkUnderline(g){this._clearCurrentLink()}}n.LinkRenderLayer=u},820:(s,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.addDisposableDomListener=void 0,n.addDisposableDomListener=function(o,a,l,c){o.addEventListener(a,l,c);let u=!1;return{dispose:()=>{u||(u=!0,o.removeEventListener(a,l,c))}}}},274:(s,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.CellColorResolver=void 0;let o,a=0,l=0,c=!1,u=!1,p=!1;n.CellColorResolver=class{constructor(g,m,h,d,v){this._terminal=g,this._selectionRenderModel=m,this._decorationService=h,this._coreBrowserService=d,this._themeService=v,this.result={fg:0,bg:0,ext:0}}resolve(g,m,h){this.result.bg=g.bg,this.result.fg=g.fg,this.result.ext=268435456&g.bg?g.extended.ext:0,l=0,a=0,u=!1,c=!1,p=!1,o=this._themeService.colors,this._decorationService.forEachDecorationAtCell(m,h,"bottom",(d=>{d.backgroundColorRGB&&(l=d.backgroundColorRGB.rgba>>8&16777215,u=!0),d.foregroundColorRGB&&(a=d.foregroundColorRGB.rgba>>8&16777215,c=!0)})),p=this._selectionRenderModel.isCellSelected(this._terminal,m,h),p&&(l=(this._coreBrowserService.isFocused?o.selectionBackgroundOpaque:o.selectionInactiveBackgroundOpaque).rgba>>8&16777215,u=!0,o.selectionForeground&&(a=o.selectionForeground.rgba>>8&16777215,c=!0)),this._decorationService.forEachDecorationAtCell(m,h,"top",(d=>{d.backgroundColorRGB&&(l=d.backgroundColorRGB.rgba>>8&16777215,u=!0),d.foregroundColorRGB&&(a=d.foregroundColorRGB.rgba>>8&16777215,c=!0)})),u&&(l=p?-16777216&g.bg&-134217729|l|50331648:-16777216&g.bg|l|50331648),c&&(a=-16777216&g.fg&-67108865|a|50331648),67108864&this.result.fg&&(u&&!c&&(a=(50331648&this.result.bg)==0?-134217728&this.result.fg|16777215&o.background.rgba>>8|50331648:-134217728&this.result.fg|67108863&this.result.bg,c=!0),!u&&c&&(l=(50331648&this.result.fg)==0?-67108864&this.result.bg|16777215&o.foreground.rgba>>8|50331648:-67108864&this.result.bg|67108863&this.result.fg,u=!0)),o=void 0,this.result.bg=u?l:this.result.bg,this.result.fg=c?a:this.result.fg}}},627:(s,n,o)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.removeTerminalFromCache=n.acquireTextureAtlas=void 0;let a=o(509),l=o(197),c=[];n.acquireTextureAtlas=function(u,p,g,m,h,d,v,f){let _=(0,l.generateConfig)(m,h,d,v,p,g,f);for(let C=0;C<c.length;C++){let y=c[C],w=y.ownedBy.indexOf(u);if(w>=0){if((0,l.configEquals)(y.config,_))return y.atlas;y.ownedBy.length===1?(y.atlas.dispose(),c.splice(C,1)):y.ownedBy.splice(w,1);break}}for(let C=0;C<c.length;C++){let y=c[C];if((0,l.configEquals)(y.config,_))return y.ownedBy.push(u),y.atlas}let S=u._core,b={atlas:new a.TextureAtlas(document,_,S.unicodeService),config:_,ownedBy:[u]};return c.push(b),b.atlas},n.removeTerminalFromCache=function(u){for(let p=0;p<c.length;p++){let g=c[p].ownedBy.indexOf(u);if(g!==-1){c[p].ownedBy.length===1?(c[p].atlas.dispose(),c.splice(p,1)):c[p].ownedBy.splice(g,1);break}}}},197:(s,n,o)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.is256Color=n.configEquals=n.generateConfig=void 0;let a=o(160);n.generateConfig=function(l,c,u,p,g,m,h){let d={foreground:m.foreground,background:m.background,cursor:a.NULL_COLOR,cursorAccent:a.NULL_COLOR,selectionForeground:a.NULL_COLOR,selectionBackgroundTransparent:a.NULL_COLOR,selectionBackgroundOpaque:a.NULL_COLOR,selectionInactiveBackgroundTransparent:a.NULL_COLOR,selectionInactiveBackgroundOpaque:a.NULL_COLOR,ansi:m.ansi.slice(),contrastCache:m.contrastCache,halfContrastCache:m.halfContrastCache};return{customGlyphs:g.customGlyphs,devicePixelRatio:h,letterSpacing:g.letterSpacing,lineHeight:g.lineHeight,deviceCellWidth:l,deviceCellHeight:c,deviceCharWidth:u,deviceCharHeight:p,fontFamily:g.fontFamily,fontSize:g.fontSize,fontWeight:g.fontWeight,fontWeightBold:g.fontWeightBold,allowTransparency:g.allowTransparency,drawBoldTextInBrightColors:g.drawBoldTextInBrightColors,minimumContrastRatio:g.minimumContrastRatio,colors:d}},n.configEquals=function(l,c){for(let u=0;u<l.colors.ansi.length;u++)if(l.colors.ansi[u].rgba!==c.colors.ansi[u].rgba)return!1;return l.devicePixelRatio===c.devicePixelRatio&&l.customGlyphs===c.customGlyphs&&l.lineHeight===c.lineHeight&&l.letterSpacing===c.letterSpacing&&l.fontFamily===c.fontFamily&&l.fontSize===c.fontSize&&l.fontWeight===c.fontWeight&&l.fontWeightBold===c.fontWeightBold&&l.allowTransparency===c.allowTransparency&&l.deviceCharWidth===c.deviceCharWidth&&l.deviceCharHeight===c.deviceCharHeight&&l.drawBoldTextInBrightColors===c.drawBoldTextInBrightColors&&l.minimumContrastRatio===c.minimumContrastRatio&&l.colors.foreground.rgba===c.colors.foreground.rgba&&l.colors.background.rgba===c.colors.background.rgba},n.is256Color=function(l){return(50331648&l)==16777216||(50331648&l)==33554432}},237:(s,n,o)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.TEXT_BASELINE=n.DIM_OPACITY=n.INVERTED_DEFAULT_COLOR=void 0;let a=o(399);n.INVERTED_DEFAULT_COLOR=257,n.DIM_OPACITY=.5,n.TEXT_BASELINE=a.isFirefox||a.isLegacyEdge?"bottom":"ideographic"},457:(s,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.CursorBlinkStateManager=void 0,n.CursorBlinkStateManager=class{constructor(o,a){this._renderCallback=o,this._coreBrowserService=a,this.isCursorVisible=!0,this._coreBrowserService.isFocused&&this._restartInterval()}get isPaused(){return!(this._blinkStartTimeout||this._blinkInterval)}dispose(){this._blinkInterval&&(this._coreBrowserService.window.clearInterval(this._blinkInterval),this._blinkInterval=void 0),this._blinkStartTimeout&&(this._coreBrowserService.window.clearTimeout(this._blinkStartTimeout),this._blinkStartTimeout=void 0),this._animationFrame&&(this._coreBrowserService.window.cancelAnimationFrame(this._animationFrame),this._animationFrame=void 0)}restartBlinkAnimation(){this.isPaused||(this._animationTimeRestarted=Date.now(),this.isCursorVisible=!0,this._animationFrame||(this._animationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>{this._renderCallback(),this._animationFrame=void 0}))))}_restartInterval(o=600){this._blinkInterval&&(this._coreBrowserService.window.clearInterval(this._blinkInterval),this._blinkInterval=void 0),this._blinkStartTimeout=this._coreBrowserService.window.setTimeout((()=>{if(this._animationTimeRestarted){let a=600-(Date.now()-this._animationTimeRestarted);if(this._animationTimeRestarted=void 0,a>0)return void this._restartInterval(a)}this.isCursorVisible=!1,this._animationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>{this._renderCallback(),this._animationFrame=void 0})),this._blinkInterval=this._coreBrowserService.window.setInterval((()=>{if(this._animationTimeRestarted){let a=600-(Date.now()-this._animationTimeRestarted);return this._animationTimeRestarted=void 0,void this._restartInterval(a)}this.isCursorVisible=!this.isCursorVisible,this._animationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>{this._renderCallback(),this._animationFrame=void 0}))}),600)}),o)}pause(){this.isCursorVisible=!0,this._blinkInterval&&(this._coreBrowserService.window.clearInterval(this._blinkInterval),this._blinkInterval=void 0),this._blinkStartTimeout&&(this._coreBrowserService.window.clearTimeout(this._blinkStartTimeout),this._blinkStartTimeout=void 0),this._animationFrame&&(this._coreBrowserService.window.cancelAnimationFrame(this._animationFrame),this._animationFrame=void 0)}resume(){this.pause(),this._animationTimeRestarted=void 0,this._restartInterval(),this.restartBlinkAnimation()}}},860:(s,n,o)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.tryDrawCustomChar=n.powerlineDefinitions=n.boxDrawingDefinitions=n.blockElementDefinitions=void 0;let a=o(374);n.blockElementDefinitions={"\u2580":[{x:0,y:0,w:8,h:4}],"\u2581":[{x:0,y:7,w:8,h:1}],"\u2582":[{x:0,y:6,w:8,h:2}],"\u2583":[{x:0,y:5,w:8,h:3}],"\u2584":[{x:0,y:4,w:8,h:4}],"\u2585":[{x:0,y:3,w:8,h:5}],"\u2586":[{x:0,y:2,w:8,h:6}],"\u2587":[{x:0,y:1,w:8,h:7}],"\u2588":[{x:0,y:0,w:8,h:8}],"\u2589":[{x:0,y:0,w:7,h:8}],"\u258A":[{x:0,y:0,w:6,h:8}],"\u258B":[{x:0,y:0,w:5,h:8}],"\u258C":[{x:0,y:0,w:4,h:8}],"\u258D":[{x:0,y:0,w:3,h:8}],"\u258E":[{x:0,y:0,w:2,h:8}],"\u258F":[{x:0,y:0,w:1,h:8}],"\u2590":[{x:4,y:0,w:4,h:8}],"\u2594":[{x:0,y:0,w:8,h:1}],"\u2595":[{x:7,y:0,w:1,h:8}],"\u2596":[{x:0,y:4,w:4,h:4}],"\u2597":[{x:4,y:4,w:4,h:4}],"\u2598":[{x:0,y:0,w:4,h:4}],"\u2599":[{x:0,y:0,w:4,h:8},{x:0,y:4,w:8,h:4}],"\u259A":[{x:0,y:0,w:4,h:4},{x:4,y:4,w:4,h:4}],"\u259B":[{x:0,y:0,w:4,h:8},{x:4,y:0,w:4,h:4}],"\u259C":[{x:0,y:0,w:8,h:4},{x:4,y:0,w:4,h:8}],"\u259D":[{x:4,y:0,w:4,h:4}],"\u259E":[{x:4,y:0,w:4,h:4},{x:0,y:4,w:4,h:4}],"\u259F":[{x:4,y:0,w:4,h:8},{x:0,y:4,w:8,h:4}],"\u{1FB70}":[{x:1,y:0,w:1,h:8}],"\u{1FB71}":[{x:2,y:0,w:1,h:8}],"\u{1FB72}":[{x:3,y:0,w:1,h:8}],"\u{1FB73}":[{x:4,y:0,w:1,h:8}],"\u{1FB74}":[{x:5,y:0,w:1,h:8}],"\u{1FB75}":[{x:6,y:0,w:1,h:8}],"\u{1FB76}":[{x:0,y:1,w:8,h:1}],"\u{1FB77}":[{x:0,y:2,w:8,h:1}],"\u{1FB78}":[{x:0,y:3,w:8,h:1}],"\u{1FB79}":[{x:0,y:4,w:8,h:1}],"\u{1FB7A}":[{x:0,y:5,w:8,h:1}],"\u{1FB7B}":[{x:0,y:6,w:8,h:1}],"\u{1FB7C}":[{x:0,y:0,w:1,h:8},{x:0,y:7,w:8,h:1}],"\u{1FB7D}":[{x:0,y:0,w:1,h:8},{x:0,y:0,w:8,h:1}],"\u{1FB7E}":[{x:7,y:0,w:1,h:8},{x:0,y:0,w:8,h:1}],"\u{1FB7F}":[{x:7,y:0,w:1,h:8},{x:0,y:7,w:8,h:1}],"\u{1FB80}":[{x:0,y:0,w:8,h:1},{x:0,y:7,w:8,h:1}],"\u{1FB81}":[{x:0,y:0,w:8,h:1},{x:0,y:2,w:8,h:1},{x:0,y:4,w:8,h:1},{x:0,y:7,w:8,h:1}],"\u{1FB82}":[{x:0,y:0,w:8,h:2}],"\u{1FB83}":[{x:0,y:0,w:8,h:3}],"\u{1FB84}":[{x:0,y:0,w:8,h:5}],"\u{1FB85}":[{x:0,y:0,w:8,h:6}],"\u{1FB86}":[{x:0,y:0,w:8,h:7}],"\u{1FB87}":[{x:6,y:0,w:2,h:8}],"\u{1FB88}":[{x:5,y:0,w:3,h:8}],"\u{1FB89}":[{x:3,y:0,w:5,h:8}],"\u{1FB8A}":[{x:2,y:0,w:6,h:8}],"\u{1FB8B}":[{x:1,y:0,w:7,h:8}],"\u{1FB95}":[{x:0,y:0,w:2,h:2},{x:4,y:0,w:2,h:2},{x:2,y:2,w:2,h:2},{x:6,y:2,w:2,h:2},{x:0,y:4,w:2,h:2},{x:4,y:4,w:2,h:2},{x:2,y:6,w:2,h:2},{x:6,y:6,w:2,h:2}],"\u{1FB96}":[{x:2,y:0,w:2,h:2},{x:6,y:0,w:2,h:2},{x:0,y:2,w:2,h:2},{x:4,y:2,w:2,h:2},{x:2,y:4,w:2,h:2},{x:6,y:4,w:2,h:2},{x:0,y:6,w:2,h:2},{x:4,y:6,w:2,h:2}],"\u{1FB97}":[{x:0,y:2,w:8,h:2},{x:0,y:6,w:8,h:2}]};let l={"\u2591":[[1,0,0,0],[0,0,0,0],[0,0,1,0],[0,0,0,0]],"\u2592":[[1,0],[0,0],[0,1],[0,0]],"\u2593":[[0,1],[1,1],[1,0],[1,1]]};n.boxDrawingDefinitions={"\u2500":{1:"M0,.5 L1,.5"},"\u2501":{3:"M0,.5 L1,.5"},"\u2502":{1:"M.5,0 L.5,1"},"\u2503":{3:"M.5,0 L.5,1"},"\u250C":{1:"M0.5,1 L.5,.5 L1,.5"},"\u250F":{3:"M0.5,1 L.5,.5 L1,.5"},"\u2510":{1:"M0,.5 L.5,.5 L.5,1"},"\u2513":{3:"M0,.5 L.5,.5 L.5,1"},"\u2514":{1:"M.5,0 L.5,.5 L1,.5"},"\u2517":{3:"M.5,0 L.5,.5 L1,.5"},"\u2518":{1:"M.5,0 L.5,.5 L0,.5"},"\u251B":{3:"M.5,0 L.5,.5 L0,.5"},"\u251C":{1:"M.5,0 L.5,1 M.5,.5 L1,.5"},"\u2523":{3:"M.5,0 L.5,1 M.5,.5 L1,.5"},"\u2524":{1:"M.5,0 L.5,1 M.5,.5 L0,.5"},"\u252B":{3:"M.5,0 L.5,1 M.5,.5 L0,.5"},"\u252C":{1:"M0,.5 L1,.5 M.5,.5 L.5,1"},"\u2533":{3:"M0,.5 L1,.5 M.5,.5 L.5,1"},"\u2534":{1:"M0,.5 L1,.5 M.5,.5 L.5,0"},"\u253B":{3:"M0,.5 L1,.5 M.5,.5 L.5,0"},"\u253C":{1:"M0,.5 L1,.5 M.5,0 L.5,1"},"\u254B":{3:"M0,.5 L1,.5 M.5,0 L.5,1"},"\u2574":{1:"M.5,.5 L0,.5"},"\u2578":{3:"M.5,.5 L0,.5"},"\u2575":{1:"M.5,.5 L.5,0"},"\u2579":{3:"M.5,.5 L.5,0"},"\u2576":{1:"M.5,.5 L1,.5"},"\u257A":{3:"M.5,.5 L1,.5"},"\u2577":{1:"M.5,.5 L.5,1"},"\u257B":{3:"M.5,.5 L.5,1"},"\u2550":{1:(m,h)=>`M0,${.5-h} L1,${.5-h} M0,${.5+h} L1,${.5+h}`},"\u2551":{1:(m,h)=>`M${.5-m},0 L${.5-m},1 M${.5+m},0 L${.5+m},1`},"\u2552":{1:(m,h)=>`M.5,1 L.5,${.5-h} L1,${.5-h} M.5,${.5+h} L1,${.5+h}`},"\u2553":{1:(m,h)=>`M${.5-m},1 L${.5-m},.5 L1,.5 M${.5+m},.5 L${.5+m},1`},"\u2554":{1:(m,h)=>`M1,${.5-h} L${.5-m},${.5-h} L${.5-m},1 M1,${.5+h} L${.5+m},${.5+h} L${.5+m},1`},"\u2555":{1:(m,h)=>`M0,${.5-h} L.5,${.5-h} L.5,1 M0,${.5+h} L.5,${.5+h}`},"\u2556":{1:(m,h)=>`M${.5+m},1 L${.5+m},.5 L0,.5 M${.5-m},.5 L${.5-m},1`},"\u2557":{1:(m,h)=>`M0,${.5+h} L${.5-m},${.5+h} L${.5-m},1 M0,${.5-h} L${.5+m},${.5-h} L${.5+m},1`},"\u2558":{1:(m,h)=>`M.5,0 L.5,${.5+h} L1,${.5+h} M.5,${.5-h} L1,${.5-h}`},"\u2559":{1:(m,h)=>`M1,.5 L${.5-m},.5 L${.5-m},0 M${.5+m},.5 L${.5+m},0`},"\u255A":{1:(m,h)=>`M1,${.5-h} L${.5+m},${.5-h} L${.5+m},0 M1,${.5+h} L${.5-m},${.5+h} L${.5-m},0`},"\u255B":{1:(m,h)=>`M0,${.5+h} L.5,${.5+h} L.5,0 M0,${.5-h} L.5,${.5-h}`},"\u255C":{1:(m,h)=>`M0,.5 L${.5+m},.5 L${.5+m},0 M${.5-m},.5 L${.5-m},0`},"\u255D":{1:(m,h)=>`M0,${.5-h} L${.5-m},${.5-h} L${.5-m},0 M0,${.5+h} L${.5+m},${.5+h} L${.5+m},0`},"\u255E":{1:(m,h)=>`M.5,0 L.5,1 M.5,${.5-h} L1,${.5-h} M.5,${.5+h} L1,${.5+h}`},"\u255F":{1:(m,h)=>`M${.5-m},0 L${.5-m},1 M${.5+m},0 L${.5+m},1 M${.5+m},.5 L1,.5`},"\u2560":{1:(m,h)=>`M${.5-m},0 L${.5-m},1 M1,${.5+h} L${.5+m},${.5+h} L${.5+m},1 M1,${.5-h} L${.5+m},${.5-h} L${.5+m},0`},"\u2561":{1:(m,h)=>`M.5,0 L.5,1 M0,${.5-h} L.5,${.5-h} M0,${.5+h} L.5,${.5+h}`},"\u2562":{1:(m,h)=>`M0,.5 L${.5-m},.5 M${.5-m},0 L${.5-m},1 M${.5+m},0 L${.5+m},1`},"\u2563":{1:(m,h)=>`M${.5+m},0 L${.5+m},1 M0,${.5+h} L${.5-m},${.5+h} L${.5-m},1 M0,${.5-h} L${.5-m},${.5-h} L${.5-m},0`},"\u2564":{1:(m,h)=>`M0,${.5-h} L1,${.5-h} M0,${.5+h} L1,${.5+h} M.5,${.5+h} L.5,1`},"\u2565":{1:(m,h)=>`M0,.5 L1,.5 M${.5-m},.5 L${.5-m},1 M${.5+m},.5 L${.5+m},1`},"\u2566":{1:(m,h)=>`M0,${.5-h} L1,${.5-h} M0,${.5+h} L${.5-m},${.5+h} L${.5-m},1 M1,${.5+h} L${.5+m},${.5+h} L${.5+m},1`},"\u2567":{1:(m,h)=>`M.5,0 L.5,${.5-h} M0,${.5-h} L1,${.5-h} M0,${.5+h} L1,${.5+h}`},"\u2568":{1:(m,h)=>`M0,.5 L1,.5 M${.5-m},.5 L${.5-m},0 M${.5+m},.5 L${.5+m},0`},"\u2569":{1:(m,h)=>`M0,${.5+h} L1,${.5+h} M0,${.5-h} L${.5-m},${.5-h} L${.5-m},0 M1,${.5-h} L${.5+m},${.5-h} L${.5+m},0`},"\u256A":{1:(m,h)=>`M.5,0 L.5,1 M0,${.5-h} L1,${.5-h} M0,${.5+h} L1,${.5+h}`},"\u256B":{1:(m,h)=>`M0,.5 L1,.5 M${.5-m},0 L${.5-m},1 M${.5+m},0 L${.5+m},1`},"\u256C":{1:(m,h)=>`M0,${.5+h} L${.5-m},${.5+h} L${.5-m},1 M1,${.5+h} L${.5+m},${.5+h} L${.5+m},1 M0,${.5-h} L${.5-m},${.5-h} L${.5-m},0 M1,${.5-h} L${.5+m},${.5-h} L${.5+m},0`},"\u2571":{1:"M1,0 L0,1"},"\u2572":{1:"M0,0 L1,1"},"\u2573":{1:"M1,0 L0,1 M0,0 L1,1"},"\u257C":{1:"M.5,.5 L0,.5",3:"M.5,.5 L1,.5"},"\u257D":{1:"M.5,.5 L.5,0",3:"M.5,.5 L.5,1"},"\u257E":{1:"M.5,.5 L1,.5",3:"M.5,.5 L0,.5"},"\u257F":{1:"M.5,.5 L.5,1",3:"M.5,.5 L.5,0"},"\u250D":{1:"M.5,.5 L.5,1",3:"M.5,.5 L1,.5"},"\u250E":{1:"M.5,.5 L1,.5",3:"M.5,.5 L.5,1"},"\u2511":{1:"M.5,.5 L.5,1",3:"M.5,.5 L0,.5"},"\u2512":{1:"M.5,.5 L0,.5",3:"M.5,.5 L.5,1"},"\u2515":{1:"M.5,.5 L.5,0",3:"M.5,.5 L1,.5"},"\u2516":{1:"M.5,.5 L1,.5",3:"M.5,.5 L.5,0"},"\u2519":{1:"M.5,.5 L.5,0",3:"M.5,.5 L0,.5"},"\u251A":{1:"M.5,.5 L0,.5",3:"M.5,.5 L.5,0"},"\u251D":{1:"M.5,0 L.5,1",3:"M.5,.5 L1,.5"},"\u251E":{1:"M0.5,1 L.5,.5 L1,.5",3:"M.5,.5 L.5,0"},"\u251F":{1:"M.5,0 L.5,.5 L1,.5",3:"M.5,.5 L.5,1"},"\u2520":{1:"M.5,.5 L1,.5",3:"M.5,0 L.5,1"},"\u2521":{1:"M.5,.5 L.5,1",3:"M.5,0 L.5,.5 L1,.5"},"\u2522":{1:"M.5,.5 L.5,0",3:"M0.5,1 L.5,.5 L1,.5"},"\u2525":{1:"M.5,0 L.5,1",3:"M.5,.5 L0,.5"},"\u2526":{1:"M0,.5 L.5,.5 L.5,1",3:"M.5,.5 L.5,0"},"\u2527":{1:"M.5,0 L.5,.5 L0,.5",3:"M.5,.5 L.5,1"},"\u2528":{1:"M.5,.5 L0,.5",3:"M.5,0 L.5,1"},"\u2529":{1:"M.5,.5 L.5,1",3:"M.5,0 L.5,.5 L0,.5"},"\u252A":{1:"M.5,.5 L.5,0",3:"M0,.5 L.5,.5 L.5,1"},"\u252D":{1:"M0.5,1 L.5,.5 L1,.5",3:"M.5,.5 L0,.5"},"\u252E":{1:"M0,.5 L.5,.5 L.5,1",3:"M.5,.5 L1,.5"},"\u252F":{1:"M.5,.5 L.5,1",3:"M0,.5 L1,.5"},"\u2530":{1:"M0,.5 L1,.5",3:"M.5,.5 L.5,1"},"\u2531":{1:"M.5,.5 L1,.5",3:"M0,.5 L.5,.5 L.5,1"},"\u2532":{1:"M.5,.5 L0,.5",3:"M0.5,1 L.5,.5 L1,.5"},"\u2535":{1:"M.5,0 L.5,.5 L1,.5",3:"M.5,.5 L0,.5"},"\u2536":{1:"M.5,0 L.5,.5 L0,.5",3:"M.5,.5 L1,.5"},"\u2537":{1:"M.5,.5 L.5,0",3:"M0,.5 L1,.5"},"\u2538":{1:"M0,.5 L1,.5",3:"M.5,.5 L.5,0"},"\u2539":{1:"M.5,.5 L1,.5",3:"M.5,0 L.5,.5 L0,.5"},"\u253A":{1:"M.5,.5 L0,.5",3:"M.5,0 L.5,.5 L1,.5"},"\u253D":{1:"M.5,0 L.5,1 M.5,.5 L1,.5",3:"M.5,.5 L0,.5"},"\u253E":{1:"M.5,0 L.5,1 M.5,.5 L0,.5",3:"M.5,.5 L1,.5"},"\u253F":{1:"M.5,0 L.5,1",3:"M0,.5 L1,.5"},"\u2540":{1:"M0,.5 L1,.5 M.5,.5 L.5,1",3:"M.5,.5 L.5,0"},"\u2541":{1:"M.5,.5 L.5,0 M0,.5 L1,.5",3:"M.5,.5 L.5,1"},"\u2542":{1:"M0,.5 L1,.5",3:"M.5,0 L.5,1"},"\u2543":{1:"M0.5,1 L.5,.5 L1,.5",3:"M.5,0 L.5,.5 L0,.5"},"\u2544":{1:"M0,.5 L.5,.5 L.5,1",3:"M.5,0 L.5,.5 L1,.5"},"\u2545":{1:"M.5,0 L.5,.5 L1,.5",3:"M0,.5 L.5,.5 L.5,1"},"\u2546":{1:"M.5,0 L.5,.5 L0,.5",3:"M0.5,1 L.5,.5 L1,.5"},"\u2547":{1:"M.5,.5 L.5,1",3:"M.5,.5 L.5,0 M0,.5 L1,.5"},"\u2548":{1:"M.5,.5 L.5,0",3:"M0,.5 L1,.5 M.5,.5 L.5,1"},"\u2549":{1:"M.5,.5 L1,.5",3:"M.5,0 L.5,1 M.5,.5 L0,.5"},"\u254A":{1:"M.5,.5 L0,.5",3:"M.5,0 L.5,1 M.5,.5 L1,.5"},"\u254C":{1:"M.1,.5 L.4,.5 M.6,.5 L.9,.5"},"\u254D":{3:"M.1,.5 L.4,.5 M.6,.5 L.9,.5"},"\u2504":{1:"M.0667,.5 L.2667,.5 M.4,.5 L.6,.5 M.7333,.5 L.9333,.5"},"\u2505":{3:"M.0667,.5 L.2667,.5 M.4,.5 L.6,.5 M.7333,.5 L.9333,.5"},"\u2508":{1:"M.05,.5 L.2,.5 M.3,.5 L.45,.5 M.55,.5 L.7,.5 M.8,.5 L.95,.5"},"\u2509":{3:"M.05,.5 L.2,.5 M.3,.5 L.45,.5 M.55,.5 L.7,.5 M.8,.5 L.95,.5"},"\u254E":{1:"M.5,.1 L.5,.4 M.5,.6 L.5,.9"},"\u254F":{3:"M.5,.1 L.5,.4 M.5,.6 L.5,.9"},"\u2506":{1:"M.5,.0667 L.5,.2667 M.5,.4 L.5,.6 M.5,.7333 L.5,.9333"},"\u2507":{3:"M.5,.0667 L.5,.2667 M.5,.4 L.5,.6 M.5,.7333 L.5,.9333"},"\u250A":{1:"M.5,.05 L.5,.2 M.5,.3 L.5,.45 L.5,.55 M.5,.7 L.5,.95"},"\u250B":{3:"M.5,.05 L.5,.2 M.5,.3 L.5,.45 L.5,.55 M.5,.7 L.5,.95"},"\u256D":{1:(m,h)=>`M.5,1 L.5,${.5+h/.15*.5} C.5,${.5+h/.15*.5},.5,.5,1,.5`},"\u256E":{1:(m,h)=>`M.5,1 L.5,${.5+h/.15*.5} C.5,${.5+h/.15*.5},.5,.5,0,.5`},"\u256F":{1:(m,h)=>`M.5,0 L.5,${.5-h/.15*.5} C.5,${.5-h/.15*.5},.5,.5,0,.5`},"\u2570":{1:(m,h)=>`M.5,0 L.5,${.5-h/.15*.5} C.5,${.5-h/.15*.5},.5,.5,1,.5`}},n.powerlineDefinitions={"\uE0B0":{d:"M0,0 L1,.5 L0,1",type:0,rightPadding:2},"\uE0B1":{d:"M-1,-.5 L1,.5 L-1,1.5",type:1,leftPadding:1,rightPadding:1},"\uE0B2":{d:"M1,0 L0,.5 L1,1",type:0,leftPadding:2},"\uE0B3":{d:"M2,-.5 L0,.5 L2,1.5",type:1,leftPadding:1,rightPadding:1},"\uE0B4":{d:"M0,0 L0,1 C0.552,1,1,0.776,1,.5 C1,0.224,0.552,0,0,0",type:0,rightPadding:1},"\uE0B5":{d:"M.2,1 C.422,1,.8,.826,.78,.5 C.8,.174,0.422,0,.2,0",type:1,rightPadding:1},"\uE0B6":{d:"M1,0 L1,1 C0.448,1,0,0.776,0,.5 C0,0.224,0.448,0,1,0",type:0,leftPadding:1},"\uE0B7":{d:"M.8,1 C0.578,1,0.2,.826,.22,.5 C0.2,0.174,0.578,0,0.8,0",type:1,leftPadding:1},"\uE0B8":{d:"M-.5,-.5 L1.5,1.5 L-.5,1.5",type:0},"\uE0B9":{d:"M-.5,-.5 L1.5,1.5",type:1,leftPadding:1,rightPadding:1},"\uE0BA":{d:"M1.5,-.5 L-.5,1.5 L1.5,1.5",type:0},"\uE0BC":{d:"M1.5,-.5 L-.5,1.5 L-.5,-.5",type:0},"\uE0BD":{d:"M1.5,-.5 L-.5,1.5",type:1,leftPadding:1,rightPadding:1},"\uE0BE":{d:"M-.5,-.5 L1.5,1.5 L1.5,-.5",type:0}},n.powerlineDefinitions["\uE0BB"]=n.powerlineDefinitions["\uE0BD"],n.powerlineDefinitions["\uE0BF"]=n.powerlineDefinitions["\uE0B9"],n.tryDrawCustomChar=function(m,h,d,v,f,_,S,b){let C=n.blockElementDefinitions[h];if(C)return(function(k,x,E,R,L,O){for(let I=0;I<x.length;I++){let P=x[I],A=L/8,D=O/8;k.fillRect(E+P.x*A,R+P.y*D,P.w*A,P.h*D)}})(m,C,d,v,f,_),!0;let y=l[h];if(y)return(function(k,x,E,R,L,O){let I=c.get(x);I||(I=new Map,c.set(x,I));let P=k.fillStyle;if(typeof P!="string")throw new Error(`Unexpected fillStyle type "${P}"`);let A=I.get(P);if(!A){let D=x[0].length,B=x.length,H=document.createElement("canvas");H.width=D,H.height=B;let j=(0,a.throwIfFalsy)(H.getContext("2d")),U=new ImageData(D,B),G,re,M,N;if(P.startsWith("#"))G=parseInt(P.slice(1,3),16),re=parseInt(P.slice(3,5),16),M=parseInt(P.slice(5,7),16),N=P.length>7&&parseInt(P.slice(7,9),16)||1;else{if(!P.startsWith("rgba"))throw new Error(`Unexpected fillStyle color format "${P}" when drawing pattern glyph`);[G,re,M,N]=P.substring(5,P.length-1).split(",").map(($=>parseFloat($)))}for(let $=0;$<B;$++)for(let z=0;z<D;z++)U.data[4*($*D+z)]=G,U.data[4*($*D+z)+1]=re,U.data[4*($*D+z)+2]=M,U.data[4*($*D+z)+3]=x[$][z]*(255*N);j.putImageData(U,0,0),A=(0,a.throwIfFalsy)(k.createPattern(H,null)),I.set(P,A)}k.fillStyle=A,k.fillRect(E,R,L,O)})(m,y,d,v,f,_),!0;let w=n.boxDrawingDefinitions[h];if(w)return(function(k,x,E,R,L,O,I){k.strokeStyle=k.fillStyle;for(let[P,A]of Object.entries(x)){let D;k.beginPath(),k.lineWidth=I*Number.parseInt(P),D=typeof A=="function"?A(.15,.15/O*L):A;for(let B of D.split(" ")){let H=B[0],j=p[H];if(!j){console.error(`Could not find drawing instructions for "${H}"`);continue}let U=B.substring(1).split(",");U[0]&&U[1]&&j(k,g(U,L,O,E,R,!0,I))}k.stroke(),k.closePath()}})(m,w,d,v,f,_,b),!0;let T=n.powerlineDefinitions[h];return!!T&&((function(k,x,E,R,L,O,I,P){var A,D;let B=new Path2D;B.rect(E,R,L,O),k.clip(B),k.beginPath();let H=I/12;k.lineWidth=P*H;for(let j of x.d.split(" ")){let U=j[0],G=p[U];if(!G){console.error(`Could not find drawing instructions for "${U}"`);continue}let re=j.substring(1).split(",");re[0]&&re[1]&&G(k,g(re,L,O,E,R,!1,P,((A=x.leftPadding)!==null&&A!==void 0?A:0)*(H/2),((D=x.rightPadding)!==null&&D!==void 0?D:0)*(H/2)))}x.type===1?(k.strokeStyle=k.fillStyle,k.stroke()):k.fill(),k.closePath()})(m,T,d,v,f,_,S,b),!0)};let c=new Map;function u(m,h,d=0){return Math.max(Math.min(m,h),d)}let p={C:(m,h)=>m.bezierCurveTo(h[0],h[1],h[2],h[3],h[4],h[5]),L:(m,h)=>m.lineTo(h[0],h[1]),M:(m,h)=>m.moveTo(h[0],h[1])};function g(m,h,d,v,f,_,S,b=0,C=0){let y=m.map((w=>parseFloat(w)||parseInt(w)));if(y.length<2)throw new Error("Too few arguments for instruction");for(let w=0;w<y.length;w+=2)y[w]*=h-b*S-C*S,_&&y[w]!==0&&(y[w]=u(Math.round(y[w]+.5)-.5,h,0)),y[w]+=v+b*S;for(let w=1;w<y.length;w+=2)y[w]*=d,_&&y[w]!==0&&(y[w]=u(Math.round(y[w]+.5)-.5,d,0)),y[w]+=f;return y}},56:(s,n,o)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.observeDevicePixelDimensions=void 0;let a=o(859);n.observeDevicePixelDimensions=function(l,c,u){let p=new c.ResizeObserver((g=>{let m=g.find((v=>v.target===l));if(!m)return;if(!("devicePixelContentBoxSize"in m))return p?.disconnect(),void(p=void 0);let h=m.devicePixelContentBoxSize[0].inlineSize,d=m.devicePixelContentBoxSize[0].blockSize;h>0&&d>0&&u(h,d)}));try{p.observe(l,{box:["device-pixel-content-box"]})}catch{p.disconnect(),p=void 0}return(0,a.toDisposable)((()=>p?.disconnect()))}},374:(s,n)=>{function o(a){return 57508<=a&&a<=57558}Object.defineProperty(n,"__esModule",{value:!0}),n.createRenderDimensions=n.excludeFromContrastRatioDemands=n.isRestrictedPowerlineGlyph=n.isPowerlineGlyph=n.throwIfFalsy=void 0,n.throwIfFalsy=function(a){if(!a)throw new Error("value must not be falsy");return a},n.isPowerlineGlyph=o,n.isRestrictedPowerlineGlyph=function(a){return 57520<=a&&a<=57527},n.excludeFromContrastRatioDemands=function(a){return o(a)||(function(l){return 9472<=l&&l<=9631})(a)},n.createRenderDimensions=function(){return{css:{canvas:{width:0,height:0},cell:{width:0,height:0}},device:{canvas:{width:0,height:0},cell:{width:0,height:0},char:{width:0,height:0,left:0,top:0}}}}},296:(s,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.createSelectionRenderModel=void 0;class o{constructor(){this.clear()}clear(){this.hasSelection=!1,this.columnSelectMode=!1,this.viewportStartRow=0,this.viewportEndRow=0,this.viewportCappedStartRow=0,this.viewportCappedEndRow=0,this.startCol=0,this.endCol=0,this.selectionStart=void 0,this.selectionEnd=void 0}update(l,c,u,p=!1){if(this.selectionStart=c,this.selectionEnd=u,!c||!u||c[0]===u[0]&&c[1]===u[1])return void this.clear();let g=c[1]-l.buffer.active.viewportY,m=u[1]-l.buffer.active.viewportY,h=Math.max(g,0),d=Math.min(m,l.rows-1);h>=l.rows||d<0?this.clear():(this.hasSelection=!0,this.columnSelectMode=p,this.viewportStartRow=g,this.viewportEndRow=m,this.viewportCappedStartRow=h,this.viewportCappedEndRow=d,this.startCol=c[0],this.endCol=u[0])}isCellSelected(l,c,u){return!!this.hasSelection&&(u-=l.buffer.active.viewportY,this.columnSelectMode?this.startCol<=this.endCol?c>=this.startCol&&u>=this.viewportCappedStartRow&&c<this.endCol&&u<=this.viewportCappedEndRow:c<this.startCol&&u>=this.viewportCappedStartRow&&c>=this.endCol&&u<=this.viewportCappedEndRow:u>this.viewportStartRow&&u<this.viewportEndRow||this.viewportStartRow===this.viewportEndRow&&u===this.viewportStartRow&&c>=this.startCol&&c<this.endCol||this.viewportStartRow<this.viewportEndRow&&u===this.viewportEndRow&&c<this.endCol||this.viewportStartRow<this.viewportEndRow&&u===this.viewportStartRow&&c>=this.startCol)}}n.createSelectionRenderModel=function(){return new o}},509:function(s,n,o){var a=this&&this.__decorate||function(T,k,x,E){var R,L=arguments.length,O=L<3?k:E===null?E=Object.getOwnPropertyDescriptor(k,x):E;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")O=Reflect.decorate(T,k,x,E);else for(var I=T.length-1;I>=0;I--)(R=T[I])&&(O=(L<3?R(O):L>3?R(k,x,O):R(k,x))||O);return L>3&&O&&Object.defineProperty(k,x,O),O};Object.defineProperty(n,"__esModule",{value:!0}),n.TextureAtlas=void 0;let l=o(237),c=o(860),u=o(374),p=o(160),g=o(345),m=o(485),h=o(385),d=o(147),v=o(855),f=o(776),_={texturePage:0,texturePosition:{x:0,y:0},texturePositionClipSpace:{x:0,y:0},offset:{x:0,y:0},size:{x:0,y:0},sizeClipSpace:{x:0,y:0}},S;class b{get pages(){return this._pages}constructor(k,x,E){this._document=k,this._config=x,this._unicodeService=E,this._didWarmUp=!1,this._cacheMap=new m.FourKeyMap,this._cacheMapCombined=new m.FourKeyMap,this._pages=[],this._activePages=[],this._workBoundingBox={top:0,left:0,bottom:0,right:0},this._workAttributeData=new d.AttributeData,this._textureSize=512,this._onAddTextureAtlasCanvas=new g.EventEmitter,this.onAddTextureAtlasCanvas=this._onAddTextureAtlasCanvas.event,this._onRemoveTextureAtlasCanvas=new g.EventEmitter,this.onRemoveTextureAtlasCanvas=this._onRemoveTextureAtlasCanvas.event,this._requestClearModel=!1,this._createNewPage(),this._tmpCanvas=w(k,4*this._config.deviceCellWidth+4,this._config.deviceCellHeight+4),this._tmpCtx=(0,u.throwIfFalsy)(this._tmpCanvas.getContext("2d",{alpha:this._config.allowTransparency,willReadFrequently:!0}))}dispose(){for(let k of this.pages)k.canvas.remove();this._onAddTextureAtlasCanvas.dispose()}warmUp(){this._didWarmUp||(this._doWarmUp(),this._didWarmUp=!0)}_doWarmUp(){let k=new h.IdleTaskQueue;for(let x=33;x<126;x++)k.enqueue((()=>{if(!this._cacheMap.get(x,v.DEFAULT_COLOR,v.DEFAULT_COLOR,v.DEFAULT_EXT)){let E=this._drawToCache(x,v.DEFAULT_COLOR,v.DEFAULT_COLOR,v.DEFAULT_EXT);this._cacheMap.set(x,v.DEFAULT_COLOR,v.DEFAULT_COLOR,v.DEFAULT_EXT,E)}}))}beginFrame(){return this._requestClearModel}clearTexture(){if(this._pages[0].currentRow.x!==0||this._pages[0].currentRow.y!==0){for(let k of this._pages)k.clear();this._cacheMap.clear(),this._cacheMapCombined.clear(),this._didWarmUp=!1}}_createNewPage(){if(b.maxAtlasPages&&this._pages.length>=Math.max(4,b.maxAtlasPages)){let x=this._pages.filter((A=>2*A.canvas.width<=(b.maxTextureSize||4096))).sort(((A,D)=>D.canvas.width!==A.canvas.width?D.canvas.width-A.canvas.width:D.percentageUsed-A.percentageUsed)),E=-1,R=0;for(let A=0;A<x.length;A++)if(x[A].canvas.width!==R)E=A,R=x[A].canvas.width;else if(A-E==3)break;let L=x.slice(E,E+4),O=L.map((A=>A.glyphs[0].texturePage)).sort(((A,D)=>A>D?1:-1)),I=this.pages.length-L.length,P=this._mergePages(L,I);P.version++;for(let A=O.length-1;A>=0;A--)this._deletePage(O[A]);this.pages.push(P),this._requestClearModel=!0,this._onAddTextureAtlasCanvas.fire(P.canvas)}let k=new C(this._document,this._textureSize);return this._pages.push(k),this._activePages.push(k),this._onAddTextureAtlasCanvas.fire(k.canvas),k}_mergePages(k,x){let E=2*k[0].canvas.width,R=new C(this._document,E,k);for(let[L,O]of k.entries()){let I=L*O.canvas.width%E,P=Math.floor(L/2)*O.canvas.height;R.ctx.drawImage(O.canvas,I,P);for(let D of O.glyphs)D.texturePage=x,D.sizeClipSpace.x=D.size.x/E,D.sizeClipSpace.y=D.size.y/E,D.texturePosition.x+=I,D.texturePosition.y+=P,D.texturePositionClipSpace.x=D.texturePosition.x/E,D.texturePositionClipSpace.y=D.texturePosition.y/E;this._onRemoveTextureAtlasCanvas.fire(O.canvas);let A=this._activePages.indexOf(O);A!==-1&&this._activePages.splice(A,1)}return R}_deletePage(k){this._pages.splice(k,1);for(let x=k;x<this._pages.length;x++){let E=this._pages[x];for(let R of E.glyphs)R.texturePage--;E.version++}}getRasterizedGlyphCombinedChar(k,x,E,R,L){return this._getFromCacheMap(this._cacheMapCombined,k,x,E,R,L)}getRasterizedGlyph(k,x,E,R,L){return this._getFromCacheMap(this._cacheMap,k,x,E,R,L)}_getFromCacheMap(k,x,E,R,L,O=!1){return S=k.get(x,E,R,L),S||(S=this._drawToCache(x,E,R,L,O),k.set(x,E,R,L,S)),S}_getColorFromAnsiIndex(k){if(k>=this._config.colors.ansi.length)throw new Error("No color found for idx "+k);return this._config.colors.ansi[k]}_getBackgroundColor(k,x,E,R){if(this._config.allowTransparency)return p.NULL_COLOR;let L;switch(k){case 16777216:case 33554432:L=this._getColorFromAnsiIndex(x);break;case 50331648:let O=d.AttributeData.toColorRGB(x);L=p.rgba.toColor(O[0],O[1],O[2]);break;default:L=E?p.color.opaque(this._config.colors.foreground):this._config.colors.background}return L}_getForegroundColor(k,x,E,R,L,O,I,P,A,D){let B=this._getMinimumContrastColor(k,x,E,R,L,O,!1,A,P,D);if(B)return B;let H;switch(L){case 16777216:case 33554432:this._config.drawBoldTextInBrightColors&&A&&O<8&&(O+=8),H=this._getColorFromAnsiIndex(O);break;case 50331648:let j=d.AttributeData.toColorRGB(O);H=p.rgba.toColor(j[0],j[1],j[2]);break;default:H=I?this._config.colors.background:this._config.colors.foreground}return this._config.allowTransparency&&(H=p.color.opaque(H)),P&&(H=p.color.multiplyOpacity(H,l.DIM_OPACITY)),H}_resolveBackgroundRgba(k,x,E){switch(k){case 16777216:case 33554432:return this._getColorFromAnsiIndex(x).rgba;case 50331648:return x<<8;default:return E?this._config.colors.foreground.rgba:this._config.colors.background.rgba}}_resolveForegroundRgba(k,x,E,R){switch(k){case 16777216:case 33554432:return this._config.drawBoldTextInBrightColors&&R&&x<8&&(x+=8),this._getColorFromAnsiIndex(x).rgba;case 50331648:return x<<8;default:return E?this._config.colors.background.rgba:this._config.colors.foreground.rgba}}_getMinimumContrastColor(k,x,E,R,L,O,I,P,A,D){if(this._config.minimumContrastRatio===1||D)return;let B=this._getContrastCache(A),H=B.getColor(k,R);if(H!==void 0)return H||void 0;let j=this._resolveBackgroundRgba(x,E,I),U=this._resolveForegroundRgba(L,O,I,P),G=p.rgba.ensureContrastRatio(j,U,this._config.minimumContrastRatio/(A?2:1));if(!G)return void B.setColor(k,R,null);let re=p.rgba.toColor(G>>24&255,G>>16&255,G>>8&255);return B.setColor(k,R,re),re}_getContrastCache(k){return k?this._config.colors.halfContrastCache:this._config.colors.contrastCache}_drawToCache(k,x,E,R,L=!1){let O=typeof k=="number"?String.fromCharCode(k):k,I=Math.min(this._config.deviceCellWidth*Math.max(O.length,2)+4,this._textureSize);this._tmpCanvas.width<I&&(this._tmpCanvas.width=I);let P=Math.min(this._config.deviceCellHeight+8,this._textureSize);if(this._tmpCanvas.height<P&&(this._tmpCanvas.height=P),this._tmpCtx.save(),this._workAttributeData.fg=E,this._workAttributeData.bg=x,this._workAttributeData.extended.ext=R,this._workAttributeData.isInvisible())return _;let A=!!this._workAttributeData.isBold(),D=!!this._workAttributeData.isInverse(),B=!!this._workAttributeData.isDim(),H=!!this._workAttributeData.isItalic(),j=!!this._workAttributeData.isUnderline(),U=!!this._workAttributeData.isStrikethrough(),G=!!this._workAttributeData.isOverline(),re=this._workAttributeData.getFgColor(),M=this._workAttributeData.getFgColorMode(),N=this._workAttributeData.getBgColor(),$=this._workAttributeData.getBgColorMode();if(D){let ie=re;re=N,N=ie;let oe=M;M=$,$=oe}let z=this._getBackgroundColor($,N,D,B);this._tmpCtx.globalCompositeOperation="copy",this._tmpCtx.fillStyle=z.css,this._tmpCtx.fillRect(0,0,this._tmpCanvas.width,this._tmpCanvas.height),this._tmpCtx.globalCompositeOperation="source-over";let se=A?this._config.fontWeightBold:this._config.fontWeight,X=H?"italic":"";this._tmpCtx.font=`${X} ${se} ${this._config.fontSize*this._config.devicePixelRatio}px ${this._config.fontFamily}`,this._tmpCtx.textBaseline=l.TEXT_BASELINE;let me=O.length===1&&(0,u.isPowerlineGlyph)(O.charCodeAt(0)),Le=O.length===1&&(0,u.isRestrictedPowerlineGlyph)(O.charCodeAt(0)),Ie=this._getForegroundColor(x,$,N,E,M,re,D,B,A,(0,u.excludeFromContrastRatioDemands)(O.charCodeAt(0)));this._tmpCtx.fillStyle=Ie.css;let de=Le?0:4,le=!1;this._config.customGlyphs!==!1&&(le=(0,c.tryDrawCustomChar)(this._tmpCtx,O,de,de,this._config.deviceCellWidth,this._config.deviceCellHeight,this._config.fontSize,this._config.devicePixelRatio));let Ct,$e=!me;if(Ct=typeof k=="number"?this._unicodeService.wcwidth(k):this._unicodeService.getStringCellWidth(k),j){this._tmpCtx.save();let ie=Math.max(1,Math.floor(this._config.fontSize*this._config.devicePixelRatio/15)),oe=ie%2==1?.5:0;if(this._tmpCtx.lineWidth=ie,this._workAttributeData.isUnderlineColorDefault())this._tmpCtx.strokeStyle=this._tmpCtx.fillStyle;else if(this._workAttributeData.isUnderlineColorRGB())$e=!1,this._tmpCtx.strokeStyle=`rgb(${d.AttributeData.toColorRGB(this._workAttributeData.getUnderlineColor()).join(",")})`;else{$e=!1;let dt=this._workAttributeData.getUnderlineColor();this._config.drawBoldTextInBrightColors&&this._workAttributeData.isBold()&&dt<8&&(dt+=8),this._tmpCtx.strokeStyle=this._getColorFromAnsiIndex(dt).css}this._tmpCtx.beginPath();let Pe=de,ve=Math.ceil(de+this._config.deviceCharHeight)-oe-(L?2*ie:0),ut=ve+ie,Ne=ve+2*ie;for(let dt=0;dt<Ct;dt++){this._tmpCtx.save();let ge=Pe+dt*this._config.deviceCellWidth,Zt=Pe+(dt+1)*this._config.deviceCellWidth,go=ge+this._config.deviceCellWidth/2;switch(this._workAttributeData.extended.underlineStyle){case 2:this._tmpCtx.moveTo(ge,ve),this._tmpCtx.lineTo(Zt,ve),this._tmpCtx.moveTo(ge,Ne),this._tmpCtx.lineTo(Zt,Ne);break;case 3:let vo=ie<=1?Ne:Math.ceil(de+this._config.deviceCharHeight-ie/2)-oe,us=ie<=1?ve:Math.ceil(de+this._config.deviceCharHeight+ie/2)-oe,fs=new Path2D;fs.rect(ge,ve,this._config.deviceCellWidth,Ne-ve),this._tmpCtx.clip(fs),this._tmpCtx.moveTo(ge-this._config.deviceCellWidth/2,ut),this._tmpCtx.bezierCurveTo(ge-this._config.deviceCellWidth/2,us,ge,us,ge,ut),this._tmpCtx.bezierCurveTo(ge,vo,go,vo,go,ut),this._tmpCtx.bezierCurveTo(go,us,Zt,us,Zt,ut),this._tmpCtx.bezierCurveTo(Zt,vo,Zt+this._config.deviceCellWidth/2,vo,Zt+this._config.deviceCellWidth/2,ut);break;case 4:this._tmpCtx.setLineDash([Math.round(ie),Math.round(ie)]),this._tmpCtx.moveTo(ge,ve),this._tmpCtx.lineTo(Zt,ve);break;case 5:this._tmpCtx.setLineDash([4*this._config.devicePixelRatio,3*this._config.devicePixelRatio]),this._tmpCtx.moveTo(ge,ve),this._tmpCtx.lineTo(Zt,ve);break;default:this._tmpCtx.moveTo(ge,ve),this._tmpCtx.lineTo(Zt,ve)}this._tmpCtx.stroke(),this._tmpCtx.restore()}if(this._tmpCtx.restore(),!le&&this._config.fontSize>=12&&!this._config.allowTransparency&&O!==" "){this._tmpCtx.save(),this._tmpCtx.textBaseline="alphabetic";let dt=this._tmpCtx.measureText(O);if(this._tmpCtx.restore(),"actualBoundingBoxDescent"in dt&&dt.actualBoundingBoxDescent>0){this._tmpCtx.save();let ge=new Path2D;ge.rect(Pe,ve-Math.ceil(ie/2),this._config.deviceCellWidth*Ct,Ne-ve+Math.ceil(ie/2)),this._tmpCtx.clip(ge),this._tmpCtx.lineWidth=3*this._config.devicePixelRatio,this._tmpCtx.strokeStyle=z.css,this._tmpCtx.strokeText(O,de,de+this._config.deviceCharHeight),this._tmpCtx.restore()}}}if(G){let ie=Math.max(1,Math.floor(this._config.fontSize*this._config.devicePixelRatio/15)),oe=ie%2==1?.5:0;this._tmpCtx.lineWidth=ie,this._tmpCtx.strokeStyle=this._tmpCtx.fillStyle,this._tmpCtx.beginPath(),this._tmpCtx.moveTo(de,de+oe),this._tmpCtx.lineTo(de+this._config.deviceCharWidth*Ct,de+oe),this._tmpCtx.stroke()}if(le||this._tmpCtx.fillText(O,de,de+this._config.deviceCharHeight),O==="_"&&!this._config.allowTransparency){let ie=y(this._tmpCtx.getImageData(de,de,this._config.deviceCellWidth,this._config.deviceCellHeight),z,Ie,$e);if(ie)for(let oe=1;oe<=5&&(this._tmpCtx.save(),this._tmpCtx.fillStyle=z.css,this._tmpCtx.fillRect(0,0,this._tmpCanvas.width,this._tmpCanvas.height),this._tmpCtx.restore(),this._tmpCtx.fillText(O,de,de+this._config.deviceCharHeight-oe),ie=y(this._tmpCtx.getImageData(de,de,this._config.deviceCellWidth,this._config.deviceCellHeight),z,Ie,$e),ie);oe++);}if(U){let ie=Math.max(1,Math.floor(this._config.fontSize*this._config.devicePixelRatio/10)),oe=this._tmpCtx.lineWidth%2==1?.5:0;this._tmpCtx.lineWidth=ie,this._tmpCtx.strokeStyle=this._tmpCtx.fillStyle,this._tmpCtx.beginPath(),this._tmpCtx.moveTo(de,de+Math.floor(this._config.deviceCharHeight/2)-oe),this._tmpCtx.lineTo(de+this._config.deviceCharWidth*Ct,de+Math.floor(this._config.deviceCharHeight/2)-oe),this._tmpCtx.stroke()}this._tmpCtx.restore();let be=this._tmpCtx.getImageData(0,0,this._tmpCanvas.width,this._tmpCanvas.height),kt;if(kt=this._config.allowTransparency?(function(ie){for(let oe=0;oe<ie.data.length;oe+=4)if(ie.data[oe+3]>0)return!1;return!0})(be):y(be,z,Ie,$e),kt)return _;let he=this._findGlyphBoundingBox(be,this._workBoundingBox,I,Le,le,de),ne,Y;for(;;){if(this._activePages.length===0){let ie=this._createNewPage();ne=ie,Y=ie.currentRow,Y.height=he.size.y;break}ne=this._activePages[this._activePages.length-1],Y=ne.currentRow;for(let ie of this._activePages)he.size.y<=ie.currentRow.height&&(ne=ie,Y=ie.currentRow);for(let ie=this._activePages.length-1;ie>=0;ie--)for(let oe of this._activePages[ie].fixedRows)oe.height<=Y.height&&he.size.y<=oe.height&&(ne=this._activePages[ie],Y=oe);if(Y.y+he.size.y>=ne.canvas.height||Y.height>he.size.y+2){let ie=!1;if(ne.currentRow.y+ne.currentRow.height+he.size.y>=ne.canvas.height){let oe;for(let Pe of this._activePages)if(Pe.currentRow.y+Pe.currentRow.height+he.size.y<Pe.canvas.height){oe=Pe;break}if(oe)ne=oe;else if(b.maxAtlasPages&&this._pages.length>=b.maxAtlasPages&&Y.y+he.size.y<=ne.canvas.height&&Y.height>=he.size.y&&Y.x+he.size.x<=ne.canvas.width)ie=!0;else{let Pe=this._createNewPage();ne=Pe,Y=Pe.currentRow,Y.height=he.size.y,ie=!0}}ie||(ne.currentRow.height>0&&ne.fixedRows.push(ne.currentRow),Y={x:0,y:ne.currentRow.y+ne.currentRow.height,height:he.size.y},ne.fixedRows.push(Y),ne.currentRow={x:0,y:Y.y+Y.height,height:0})}if(Y.x+he.size.x<=ne.canvas.width)break;Y===ne.currentRow?(Y.x=0,Y.y+=Y.height,Y.height=0):ne.fixedRows.splice(ne.fixedRows.indexOf(Y),1)}return he.texturePage=this._pages.indexOf(ne),he.texturePosition.x=Y.x,he.texturePosition.y=Y.y,he.texturePositionClipSpace.x=Y.x/ne.canvas.width,he.texturePositionClipSpace.y=Y.y/ne.canvas.height,he.sizeClipSpace.x/=ne.canvas.width,he.sizeClipSpace.y/=ne.canvas.height,Y.height=Math.max(Y.height,he.size.y),Y.x+=he.size.x,ne.ctx.putImageData(be,he.texturePosition.x-this._workBoundingBox.left,he.texturePosition.y-this._workBoundingBox.top,this._workBoundingBox.left,this._workBoundingBox.top,he.size.x,he.size.y),ne.addGlyph(he),ne.version++,he}_findGlyphBoundingBox(k,x,E,R,L,O){x.top=0;let I=R?this._config.deviceCellHeight:this._tmpCanvas.height,P=R?this._config.deviceCellWidth:E,A=!1;for(let D=0;D<I;D++){for(let B=0;B<P;B++){let H=D*this._tmpCanvas.width*4+4*B+3;if(k.data[H]!==0){x.top=D,A=!0;break}}if(A)break}x.left=0,A=!1;for(let D=0;D<O+P;D++){for(let B=0;B<I;B++){let H=B*this._tmpCanvas.width*4+4*D+3;if(k.data[H]!==0){x.left=D,A=!0;break}}if(A)break}x.right=P,A=!1;for(let D=O+P-1;D>=O;D--){for(let B=0;B<I;B++){let H=B*this._tmpCanvas.width*4+4*D+3;if(k.data[H]!==0){x.right=D,A=!0;break}}if(A)break}x.bottom=I,A=!1;for(let D=I-1;D>=0;D--){for(let B=0;B<P;B++){let H=D*this._tmpCanvas.width*4+4*B+3;if(k.data[H]!==0){x.bottom=D,A=!0;break}}if(A)break}return{texturePage:0,texturePosition:{x:0,y:0},texturePositionClipSpace:{x:0,y:0},size:{x:x.right-x.left+1,y:x.bottom-x.top+1},sizeClipSpace:{x:x.right-x.left+1,y:x.bottom-x.top+1},offset:{x:-x.left+O+(R||L?Math.floor((this._config.deviceCellWidth-this._config.deviceCharWidth)/2):0),y:-x.top+O+(R||L?this._config.lineHeight===1?0:Math.round((this._config.deviceCellHeight-this._config.deviceCharHeight)/2):0)}}}}n.TextureAtlas=b,a([f.traceCall],b.prototype,"_drawToCache",null);class C{get percentageUsed(){return this._usedPixels/(this.canvas.width*this.canvas.height)}get glyphs(){return this._glyphs}addGlyph(k){this._glyphs.push(k),this._usedPixels+=k.size.x*k.size.y}constructor(k,x,E){if(this._usedPixels=0,this._glyphs=[],this.version=0,this.currentRow={x:0,y:0,height:0},this.fixedRows=[],E)for(let R of E)this._glyphs.push(...R.glyphs),this._usedPixels+=R._usedPixels;this.canvas=w(k,x,x),this.ctx=(0,u.throwIfFalsy)(this.canvas.getContext("2d",{alpha:!0}))}clear(){this.ctx.clearRect(0,0,this.canvas.width,this.canvas.height),this.currentRow.x=0,this.currentRow.y=0,this.currentRow.height=0,this.fixedRows.length=0,this.version++}}function y(T,k,x,E){let R=k.rgba>>>24,L=k.rgba>>>16&255,O=k.rgba>>>8&255,I=x.rgba>>>24,P=x.rgba>>>16&255,A=x.rgba>>>8&255,D=Math.floor((Math.abs(R-I)+Math.abs(L-P)+Math.abs(O-A))/12),B=!0;for(let H=0;H<T.data.length;H+=4)T.data[H]===R&&T.data[H+1]===L&&T.data[H+2]===O||E&&Math.abs(T.data[H]-R)+Math.abs(T.data[H+1]-L)+Math.abs(T.data[H+2]-O)<D?T.data[H+3]=0:B=!1;return B}function w(T,k,x){let E=T.createElement("canvas");return E.width=k,E.height=x,E}},160:(s,n,o)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.contrastRatio=n.toPaddedHex=n.rgba=n.rgb=n.css=n.color=n.channels=n.NULL_COLOR=void 0;let a=o(399),l=0,c=0,u=0,p=0;var g,m,h,d,v;function f(S){let b=S.toString(16);return b.length<2?"0"+b:b}function _(S,b){return S<b?(b+.05)/(S+.05):(S+.05)/(b+.05)}n.NULL_COLOR={css:"#00000000",rgba:0},(function(S){S.toCss=function(b,C,y,w){return w!==void 0?`#${f(b)}${f(C)}${f(y)}${f(w)}`:`#${f(b)}${f(C)}${f(y)}`},S.toRgba=function(b,C,y,w=255){return(b<<24|C<<16|y<<8|w)>>>0}})(g||(n.channels=g={})),(function(S){function b(C,y){return p=Math.round(255*y),[l,c,u]=v.toChannels(C.rgba),{css:g.toCss(l,c,u,p),rgba:g.toRgba(l,c,u,p)}}S.blend=function(C,y){if(p=(255&y.rgba)/255,p===1)return{css:y.css,rgba:y.rgba};let w=y.rgba>>24&255,T=y.rgba>>16&255,k=y.rgba>>8&255,x=C.rgba>>24&255,E=C.rgba>>16&255,R=C.rgba>>8&255;return l=x+Math.round((w-x)*p),c=E+Math.round((T-E)*p),u=R+Math.round((k-R)*p),{css:g.toCss(l,c,u),rgba:g.toRgba(l,c,u)}},S.isOpaque=function(C){return(255&C.rgba)==255},S.ensureContrastRatio=function(C,y,w){let T=v.ensureContrastRatio(C.rgba,y.rgba,w);if(T)return v.toColor(T>>24&255,T>>16&255,T>>8&255)},S.opaque=function(C){let y=(255|C.rgba)>>>0;return[l,c,u]=v.toChannels(y),{css:g.toCss(l,c,u),rgba:y}},S.opacity=b,S.multiplyOpacity=function(C,y){return p=255&C.rgba,b(C,p*y/255)},S.toColorRGB=function(C){return[C.rgba>>24&255,C.rgba>>16&255,C.rgba>>8&255]}})(m||(n.color=m={})),(function(S){let b,C;if(!a.isNode){let y=document.createElement("canvas");y.width=1,y.height=1;let w=y.getContext("2d",{willReadFrequently:!0});w&&(b=w,b.globalCompositeOperation="copy",C=b.createLinearGradient(0,0,1,1))}S.toColor=function(y){if(y.match(/#[\da-f]{3,8}/i))switch(y.length){case 4:return l=parseInt(y.slice(1,2).repeat(2),16),c=parseInt(y.slice(2,3).repeat(2),16),u=parseInt(y.slice(3,4).repeat(2),16),v.toColor(l,c,u);case 5:return l=parseInt(y.slice(1,2).repeat(2),16),c=parseInt(y.slice(2,3).repeat(2),16),u=parseInt(y.slice(3,4).repeat(2),16),p=parseInt(y.slice(4,5).repeat(2),16),v.toColor(l,c,u,p);case 7:return{css:y,rgba:(parseInt(y.slice(1),16)<<8|255)>>>0};case 9:return{css:y,rgba:parseInt(y.slice(1),16)>>>0}}let w=y.match(/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(,\s*(0|1|\d?\.(\d+))\s*)?\)/);if(w)return l=parseInt(w[1]),c=parseInt(w[2]),u=parseInt(w[3]),p=Math.round(255*(w[5]===void 0?1:parseFloat(w[5]))),v.toColor(l,c,u,p);if(!b||!C)throw new Error("css.toColor: Unsupported css format");if(b.fillStyle=C,b.fillStyle=y,typeof b.fillStyle!="string")throw new Error("css.toColor: Unsupported css format");if(b.fillRect(0,0,1,1),[l,c,u,p]=b.getImageData(0,0,1,1).data,p!==255)throw new Error("css.toColor: Unsupported css format");return{rgba:g.toRgba(l,c,u,p),css:y}}})(h||(n.css=h={})),(function(S){function b(C,y,w){let T=C/255,k=y/255,x=w/255;return .2126*(T<=.03928?T/12.92:Math.pow((T+.055)/1.055,2.4))+.7152*(k<=.03928?k/12.92:Math.pow((k+.055)/1.055,2.4))+.0722*(x<=.03928?x/12.92:Math.pow((x+.055)/1.055,2.4))}S.relativeLuminance=function(C){return b(C>>16&255,C>>8&255,255&C)},S.relativeLuminance2=b})(d||(n.rgb=d={})),(function(S){function b(y,w,T){let k=y>>24&255,x=y>>16&255,E=y>>8&255,R=w>>24&255,L=w>>16&255,O=w>>8&255,I=_(d.relativeLuminance2(R,L,O),d.relativeLuminance2(k,x,E));for(;I<T&&(R>0||L>0||O>0);)R-=Math.max(0,Math.ceil(.1*R)),L-=Math.max(0,Math.ceil(.1*L)),O-=Math.max(0,Math.ceil(.1*O)),I=_(d.relativeLuminance2(R,L,O),d.relativeLuminance2(k,x,E));return(R<<24|L<<16|O<<8|255)>>>0}function C(y,w,T){let k=y>>24&255,x=y>>16&255,E=y>>8&255,R=w>>24&255,L=w>>16&255,O=w>>8&255,I=_(d.relativeLuminance2(R,L,O),d.relativeLuminance2(k,x,E));for(;I<T&&(R<255||L<255||O<255);)R=Math.min(255,R+Math.ceil(.1*(255-R))),L=Math.min(255,L+Math.ceil(.1*(255-L))),O=Math.min(255,O+Math.ceil(.1*(255-O))),I=_(d.relativeLuminance2(R,L,O),d.relativeLuminance2(k,x,E));return(R<<24|L<<16|O<<8|255)>>>0}S.ensureContrastRatio=function(y,w,T){let k=d.relativeLuminance(y>>8),x=d.relativeLuminance(w>>8);if(_(k,x)<T){if(x<k){let L=b(y,w,T),O=_(k,d.relativeLuminance(L>>8));if(O<T){let I=C(y,w,T);return O>_(k,d.relativeLuminance(I>>8))?L:I}return L}let E=C(y,w,T),R=_(k,d.relativeLuminance(E>>8));if(R<T){let L=b(y,w,T);return R>_(k,d.relativeLuminance(L>>8))?E:L}return E}},S.reduceLuminance=b,S.increaseLuminance=C,S.toChannels=function(y){return[y>>24&255,y>>16&255,y>>8&255,255&y]},S.toColor=function(y,w,T,k){return{css:g.toCss(y,w,T,k),rgba:g.toRgba(y,w,T,k)}}})(v||(n.rgba=v={})),n.toPaddedHex=f,n.contrastRatio=_},345:(s,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.forwardEvent=n.EventEmitter=void 0,n.EventEmitter=class{constructor(){this._listeners=[],this._disposed=!1}get event(){return this._event||(this._event=o=>(this._listeners.push(o),{dispose:()=>{if(!this._disposed){for(let a=0;a<this._listeners.length;a++)if(this._listeners[a]===o)return void this._listeners.splice(a,1)}}})),this._event}fire(o,a){let l=[];for(let c=0;c<this._listeners.length;c++)l.push(this._listeners[c]);for(let c=0;c<l.length;c++)l[c].call(void 0,o,a)}dispose(){this.clearListeners(),this._disposed=!0}clearListeners(){this._listeners&&(this._listeners.length=0)}},n.forwardEvent=function(o,a){return o((l=>a.fire(l)))}},859:(s,n)=>{function o(a){for(let l of a)l.dispose();a.length=0}Object.defineProperty(n,"__esModule",{value:!0}),n.getDisposeArrayDisposable=n.disposeArray=n.toDisposable=n.MutableDisposable=n.Disposable=void 0,n.Disposable=class{constructor(){this._disposables=[],this._isDisposed=!1}dispose(){this._isDisposed=!0;for(let a of this._disposables)a.dispose();this._disposables.length=0}register(a){return this._disposables.push(a),a}unregister(a){let l=this._disposables.indexOf(a);l!==-1&&this._disposables.splice(l,1)}},n.MutableDisposable=class{constructor(){this._isDisposed=!1}get value(){return this._isDisposed?void 0:this._value}set value(a){var l;this._isDisposed||a===this._value||((l=this._value)===null||l===void 0||l.dispose(),this._value=a)}clear(){this.value=void 0}dispose(){var a;this._isDisposed=!0,(a=this._value)===null||a===void 0||a.dispose(),this._value=void 0}},n.toDisposable=function(a){return{dispose:a}},n.disposeArray=o,n.getDisposeArrayDisposable=function(a){return{dispose:()=>o(a)}}},485:(s,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.FourKeyMap=n.TwoKeyMap=void 0;class o{constructor(){this._data={}}set(l,c,u){this._data[l]||(this._data[l]={}),this._data[l][c]=u}get(l,c){return this._data[l]?this._data[l][c]:void 0}clear(){this._data={}}}n.TwoKeyMap=o,n.FourKeyMap=class{constructor(){this._data=new o}set(a,l,c,u,p){this._data.get(a,l)||this._data.set(a,l,new o),this._data.get(a,l).set(c,u,p)}get(a,l,c,u){var p;return(p=this._data.get(a,l))===null||p===void 0?void 0:p.get(c,u)}clear(){this._data.clear()}}},399:(s,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.isChromeOS=n.isLinux=n.isWindows=n.isIphone=n.isIpad=n.isMac=n.getSafariVersion=n.isSafari=n.isLegacyEdge=n.isFirefox=n.isNode=void 0,n.isNode=typeof navigator>"u";let o=n.isNode?"node":navigator.userAgent,a=n.isNode?"node":navigator.platform;n.isFirefox=o.includes("Firefox"),n.isLegacyEdge=o.includes("Edge"),n.isSafari=/^((?!chrome|android).)*safari/i.test(o),n.getSafariVersion=function(){if(!n.isSafari)return 0;let l=o.match(/Version\/(\d+)/);return l===null||l.length<2?0:parseInt(l[1])},n.isMac=["Macintosh","MacIntel","MacPPC","Mac68K"].includes(a),n.isIpad=a==="iPad",n.isIphone=a==="iPhone",n.isWindows=["Windows","Win16","Win32","WinCE"].includes(a),n.isLinux=a.indexOf("Linux")>=0,n.isChromeOS=/\bCrOS\b/.test(o)},385:(s,n,o)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.DebouncedIdleTask=n.IdleTaskQueue=n.PriorityTaskQueue=void 0;let a=o(399);class l{constructor(){this._tasks=[],this._i=0}enqueue(p){this._tasks.push(p),this._start()}flush(){for(;this._i<this._tasks.length;)this._tasks[this._i]()||this._i++;this.clear()}clear(){this._idleCallback&&(this._cancelCallback(this._idleCallback),this._idleCallback=void 0),this._i=0,this._tasks.length=0}_start(){this._idleCallback||(this._idleCallback=this._requestCallback(this._process.bind(this)))}_process(p){this._idleCallback=void 0;let g=0,m=0,h=p.timeRemaining(),d=0;for(;this._i<this._tasks.length;){if(g=Date.now(),this._tasks[this._i]()||this._i++,g=Math.max(1,Date.now()-g),m=Math.max(g,m),d=p.timeRemaining(),1.5*m>d)return h-g<-20&&console.warn(`task queue exceeded allotted deadline by ${Math.abs(Math.round(h-g))}ms`),void this._start();h=d}this.clear()}}class c extends l{_requestCallback(p){return setTimeout((()=>p(this._createDeadline(16))))}_cancelCallback(p){clearTimeout(p)}_createDeadline(p){let g=Date.now()+p;return{timeRemaining:()=>Math.max(0,g-Date.now())}}}n.PriorityTaskQueue=c,n.IdleTaskQueue=!a.isNode&&"requestIdleCallback"in window?class extends l{_requestCallback(u){return requestIdleCallback(u)}_cancelCallback(u){cancelIdleCallback(u)}}:c,n.DebouncedIdleTask=class{constructor(){this._queue=new n.IdleTaskQueue}set(u){this._queue.clear(),this._queue.enqueue(u)}flush(){this._queue.flush()}}},147:(s,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.ExtendedAttrs=n.AttributeData=void 0;class o{constructor(){this.fg=0,this.bg=0,this.extended=new a}static toColorRGB(c){return[c>>>16&255,c>>>8&255,255&c]}static fromColorRGB(c){return(255&c[0])<<16|(255&c[1])<<8|255&c[2]}clone(){let c=new o;return c.fg=this.fg,c.bg=this.bg,c.extended=this.extended.clone(),c}isInverse(){return 67108864&this.fg}isBold(){return 134217728&this.fg}isUnderline(){return this.hasExtendedAttrs()&&this.extended.underlineStyle!==0?1:268435456&this.fg}isBlink(){return 536870912&this.fg}isInvisible(){return 1073741824&this.fg}isItalic(){return 67108864&this.bg}isDim(){return 134217728&this.bg}isStrikethrough(){return 2147483648&this.fg}isProtected(){return 536870912&this.bg}isOverline(){return 1073741824&this.bg}getFgColorMode(){return 50331648&this.fg}getBgColorMode(){return 50331648&this.bg}isFgRGB(){return(50331648&this.fg)==50331648}isBgRGB(){return(50331648&this.bg)==50331648}isFgPalette(){return(50331648&this.fg)==16777216||(50331648&this.fg)==33554432}isBgPalette(){return(50331648&this.bg)==16777216||(50331648&this.bg)==33554432}isFgDefault(){return(50331648&this.fg)==0}isBgDefault(){return(50331648&this.bg)==0}isAttributeDefault(){return this.fg===0&&this.bg===0}getFgColor(){switch(50331648&this.fg){case 16777216:case 33554432:return 255&this.fg;case 50331648:return 16777215&this.fg;default:return-1}}getBgColor(){switch(50331648&this.bg){case 16777216:case 33554432:return 255&this.bg;case 50331648:return 16777215&this.bg;default:return-1}}hasExtendedAttrs(){return 268435456&this.bg}updateExtended(){this.extended.isEmpty()?this.bg&=-268435457:this.bg|=268435456}getUnderlineColor(){if(268435456&this.bg&&~this.extended.underlineColor)switch(50331648&this.extended.underlineColor){case 16777216:case 33554432:return 255&this.extended.underlineColor;case 50331648:return 16777215&this.extended.underlineColor;default:return this.getFgColor()}return this.getFgColor()}getUnderlineColorMode(){return 268435456&this.bg&&~this.extended.underlineColor?50331648&this.extended.underlineColor:this.getFgColorMode()}isUnderlineColorRGB(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==50331648:this.isFgRGB()}isUnderlineColorPalette(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==16777216||(50331648&this.extended.underlineColor)==33554432:this.isFgPalette()}isUnderlineColorDefault(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==0:this.isFgDefault()}getUnderlineStyle(){return 268435456&this.fg?268435456&this.bg?this.extended.underlineStyle:1:0}}n.AttributeData=o;class a{get ext(){return this._urlId?-469762049&this._ext|this.underlineStyle<<26:this._ext}set ext(c){this._ext=c}get underlineStyle(){return this._urlId?5:(469762048&this._ext)>>26}set underlineStyle(c){this._ext&=-469762049,this._ext|=c<<26&469762048}get underlineColor(){return 67108863&this._ext}set underlineColor(c){this._ext&=-67108864,this._ext|=67108863&c}get urlId(){return this._urlId}set urlId(c){this._urlId=c}constructor(c=0,u=0){this._ext=0,this._urlId=0,this._ext=c,this._urlId=u}clone(){return new a(this._ext,this._urlId)}isEmpty(){return this.underlineStyle===0&&this._urlId===0}}n.ExtendedAttrs=a},782:(s,n,o)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.CellData=void 0;let a=o(133),l=o(855),c=o(147);class u extends c.AttributeData{constructor(){super(...arguments),this.content=0,this.fg=0,this.bg=0,this.extended=new c.ExtendedAttrs,this.combinedData=""}static fromCharData(g){let m=new u;return m.setFromCharData(g),m}isCombined(){return 2097152&this.content}getWidth(){return this.content>>22}getChars(){return 2097152&this.content?this.combinedData:2097151&this.content?(0,a.stringFromCodePoint)(2097151&this.content):""}getCode(){return this.isCombined()?this.combinedData.charCodeAt(this.combinedData.length-1):2097151&this.content}setFromCharData(g){this.fg=g[l.CHAR_DATA_ATTR_INDEX],this.bg=0;let m=!1;if(g[l.CHAR_DATA_CHAR_INDEX].length>2)m=!0;else if(g[l.CHAR_DATA_CHAR_INDEX].length===2){let h=g[l.CHAR_DATA_CHAR_INDEX].charCodeAt(0);if(55296<=h&&h<=56319){let d=g[l.CHAR_DATA_CHAR_INDEX].charCodeAt(1);56320<=d&&d<=57343?this.content=1024*(h-55296)+d-56320+65536|g[l.CHAR_DATA_WIDTH_INDEX]<<22:m=!0}else m=!0}else this.content=g[l.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|g[l.CHAR_DATA_WIDTH_INDEX]<<22;m&&(this.combinedData=g[l.CHAR_DATA_CHAR_INDEX],this.content=2097152|g[l.CHAR_DATA_WIDTH_INDEX]<<22)}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}}n.CellData=u},855:(s,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.WHITESPACE_CELL_CODE=n.WHITESPACE_CELL_WIDTH=n.WHITESPACE_CELL_CHAR=n.NULL_CELL_CODE=n.NULL_CELL_WIDTH=n.NULL_CELL_CHAR=n.CHAR_DATA_CODE_INDEX=n.CHAR_DATA_WIDTH_INDEX=n.CHAR_DATA_CHAR_INDEX=n.CHAR_DATA_ATTR_INDEX=n.DEFAULT_EXT=n.DEFAULT_ATTR=n.DEFAULT_COLOR=void 0,n.DEFAULT_COLOR=0,n.DEFAULT_ATTR=256|n.DEFAULT_COLOR<<9,n.DEFAULT_EXT=0,n.CHAR_DATA_ATTR_INDEX=0,n.CHAR_DATA_CHAR_INDEX=1,n.CHAR_DATA_WIDTH_INDEX=2,n.CHAR_DATA_CODE_INDEX=3,n.NULL_CELL_CHAR="",n.NULL_CELL_WIDTH=1,n.NULL_CELL_CODE=0,n.WHITESPACE_CELL_CHAR=" ",n.WHITESPACE_CELL_WIDTH=1,n.WHITESPACE_CELL_CODE=32},133:(s,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.Utf8ToUtf32=n.StringToUtf32=n.utf32ToString=n.stringFromCodePoint=void 0,n.stringFromCodePoint=function(o){return o>65535?(o-=65536,String.fromCharCode(55296+(o>>10))+String.fromCharCode(o%1024+56320)):String.fromCharCode(o)},n.utf32ToString=function(o,a=0,l=o.length){let c="";for(let u=a;u<l;++u){let p=o[u];p>65535?(p-=65536,c+=String.fromCharCode(55296+(p>>10))+String.fromCharCode(p%1024+56320)):c+=String.fromCharCode(p)}return c},n.StringToUtf32=class{constructor(){this._interim=0}clear(){this._interim=0}decode(o,a){let l=o.length;if(!l)return 0;let c=0,u=0;if(this._interim){let p=o.charCodeAt(u++);56320<=p&&p<=57343?a[c++]=1024*(this._interim-55296)+p-56320+65536:(a[c++]=this._interim,a[c++]=p),this._interim=0}for(let p=u;p<l;++p){let g=o.charCodeAt(p);if(55296<=g&&g<=56319){if(++p>=l)return this._interim=g,c;let m=o.charCodeAt(p);56320<=m&&m<=57343?a[c++]=1024*(g-55296)+m-56320+65536:(a[c++]=g,a[c++]=m)}else g!==65279&&(a[c++]=g)}return c}},n.Utf8ToUtf32=class{constructor(){this.interim=new Uint8Array(3)}clear(){this.interim.fill(0)}decode(o,a){let l=o.length;if(!l)return 0;let c,u,p,g,m=0,h=0,d=0;if(this.interim[0]){let _=!1,S=this.interim[0];S&=(224&S)==192?31:(240&S)==224?15:7;let b,C=0;for(;(b=63&this.interim[++C])&&C<4;)S<<=6,S|=b;let y=(224&this.interim[0])==192?2:(240&this.interim[0])==224?3:4,w=y-C;for(;d<w;){if(d>=l)return 0;if(b=o[d++],(192&b)!=128){d--,_=!0;break}this.interim[C++]=b,S<<=6,S|=63&b}_||(y===2?S<128?d--:a[m++]=S:y===3?S<2048||S>=55296&&S<=57343||S===65279||(a[m++]=S):S<65536||S>1114111||(a[m++]=S)),this.interim.fill(0)}let v=l-4,f=d;for(;f<l;){for(;!(!(f<v)||128&(c=o[f])||128&(u=o[f+1])||128&(p=o[f+2])||128&(g=o[f+3]));)a[m++]=c,a[m++]=u,a[m++]=p,a[m++]=g,f+=4;if(c=o[f++],c<128)a[m++]=c;else if((224&c)==192){if(f>=l)return this.interim[0]=c,m;if(u=o[f++],(192&u)!=128){f--;continue}if(h=(31&c)<<6|63&u,h<128){f--;continue}a[m++]=h}else if((240&c)==224){if(f>=l)return this.interim[0]=c,m;if(u=o[f++],(192&u)!=128){f--;continue}if(f>=l)return this.interim[0]=c,this.interim[1]=u,m;if(p=o[f++],(192&p)!=128){f--;continue}if(h=(15&c)<<12|(63&u)<<6|63&p,h<2048||h>=55296&&h<=57343||h===65279)continue;a[m++]=h}else if((248&c)==240){if(f>=l)return this.interim[0]=c,m;if(u=o[f++],(192&u)!=128){f--;continue}if(f>=l)return this.interim[0]=c,this.interim[1]=u,m;if(p=o[f++],(192&p)!=128){f--;continue}if(f>=l)return this.interim[0]=c,this.interim[1]=u,this.interim[2]=p,m;if(g=o[f++],(192&g)!=128){f--;continue}if(h=(7&c)<<18|(63&u)<<12|(63&p)<<6|63&g,h<65536||h>1114111)continue;a[m++]=h}}return m}}},776:function(s,n,o){var a=this&&this.__decorate||function(h,d,v,f){var _,S=arguments.length,b=S<3?d:f===null?f=Object.getOwnPropertyDescriptor(d,v):f;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")b=Reflect.decorate(h,d,v,f);else for(var C=h.length-1;C>=0;C--)(_=h[C])&&(b=(S<3?_(b):S>3?_(d,v,b):_(d,v))||b);return S>3&&b&&Object.defineProperty(d,v,b),b},l=this&&this.__param||function(h,d){return function(v,f){d(v,f,h)}};Object.defineProperty(n,"__esModule",{value:!0}),n.traceCall=n.setTraceLogger=n.LogService=void 0;let c=o(859),u=o(97),p={trace:u.LogLevelEnum.TRACE,debug:u.LogLevelEnum.DEBUG,info:u.LogLevelEnum.INFO,warn:u.LogLevelEnum.WARN,error:u.LogLevelEnum.ERROR,off:u.LogLevelEnum.OFF},g,m=n.LogService=class extends c.Disposable{get logLevel(){return this._logLevel}constructor(h){super(),this._optionsService=h,this._logLevel=u.LogLevelEnum.OFF,this._updateLogLevel(),this.register(this._optionsService.onSpecificOptionChange("logLevel",(()=>this._updateLogLevel()))),g=this}_updateLogLevel(){this._logLevel=p[this._optionsService.rawOptions.logLevel]}_evalLazyOptionalParams(h){for(let d=0;d<h.length;d++)typeof h[d]=="function"&&(h[d]=h[d]())}_log(h,d,v){this._evalLazyOptionalParams(v),h.call(console,(this._optionsService.options.logger?"":"xterm.js: ")+d,...v)}trace(h,...d){var v,f;this._logLevel<=u.LogLevelEnum.TRACE&&this._log((f=(v=this._optionsService.options.logger)===null||v===void 0?void 0:v.trace.bind(this._optionsService.options.logger))!==null&&f!==void 0?f:console.log,h,d)}debug(h,...d){var v,f;this._logLevel<=u.LogLevelEnum.DEBUG&&this._log((f=(v=this._optionsService.options.logger)===null||v===void 0?void 0:v.debug.bind(this._optionsService.options.logger))!==null&&f!==void 0?f:console.log,h,d)}info(h,...d){var v,f;this._logLevel<=u.LogLevelEnum.INFO&&this._log((f=(v=this._optionsService.options.logger)===null||v===void 0?void 0:v.info.bind(this._optionsService.options.logger))!==null&&f!==void 0?f:console.info,h,d)}warn(h,...d){var v,f;this._logLevel<=u.LogLevelEnum.WARN&&this._log((f=(v=this._optionsService.options.logger)===null||v===void 0?void 0:v.warn.bind(this._optionsService.options.logger))!==null&&f!==void 0?f:console.warn,h,d)}error(h,...d){var v,f;this._logLevel<=u.LogLevelEnum.ERROR&&this._log((f=(v=this._optionsService.options.logger)===null||v===void 0?void 0:v.error.bind(this._optionsService.options.logger))!==null&&f!==void 0?f:console.error,h,d)}};n.LogService=m=a([l(0,u.IOptionsService)],m),n.setTraceLogger=function(h){g=h},n.traceCall=function(h,d,v){if(typeof v.value!="function")throw new Error("not supported");let f=v.value;v.value=function(..._){if(g.logLevel!==u.LogLevelEnum.TRACE)return f.apply(this,_);g.trace(`GlyphRenderer#${f.name}(${_.map((b=>JSON.stringify(b))).join(", ")})`);let S=f.apply(this,_);return g.trace(`GlyphRenderer#${f.name} return`,S),S}}},726:(s,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.createDecorator=n.getServiceDependencies=n.serviceRegistry=void 0;let o="di$target",a="di$dependencies";n.serviceRegistry=new Map,n.getServiceDependencies=function(l){return l[a]||[]},n.createDecorator=function(l){if(n.serviceRegistry.has(l))return n.serviceRegistry.get(l);let c=function(u,p,g){if(arguments.length!==3)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");(function(m,h,d){h[o]===h?h[a].push({id:m,index:d}):(h[a]=[{id:m,index:d}],h[o]=h)})(c,u,g)};return c.toString=()=>l,n.serviceRegistry.set(l,c),c}},97:(s,n,o)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.IDecorationService=n.IUnicodeService=n.IOscLinkService=n.IOptionsService=n.ILogService=n.LogLevelEnum=n.IInstantiationService=n.ICharsetService=n.ICoreService=n.ICoreMouseService=n.IBufferService=void 0;let a=o(726);var l;n.IBufferService=(0,a.createDecorator)("BufferService"),n.ICoreMouseService=(0,a.createDecorator)("CoreMouseService"),n.ICoreService=(0,a.createDecorator)("CoreService"),n.ICharsetService=(0,a.createDecorator)("CharsetService"),n.IInstantiationService=(0,a.createDecorator)("InstantiationService"),(function(c){c[c.TRACE=0]="TRACE",c[c.DEBUG=1]="DEBUG",c[c.INFO=2]="INFO",c[c.WARN=3]="WARN",c[c.ERROR=4]="ERROR",c[c.OFF=5]="OFF"})(l||(n.LogLevelEnum=l={})),n.ILogService=(0,a.createDecorator)("LogService"),n.IOptionsService=(0,a.createDecorator)("OptionsService"),n.IOscLinkService=(0,a.createDecorator)("OscLinkService"),n.IUnicodeService=(0,a.createDecorator)("UnicodeService"),n.IDecorationService=(0,a.createDecorator)("DecorationService")}},e={};function r(s){var n=e[s];if(n!==void 0)return n.exports;var o=e[s]={exports:{}};return t[s].call(o.exports,o,o.exports,r),o.exports}var i={};return(()=>{var s=i;Object.defineProperty(s,"__esModule",{value:!0}),s.WebglAddon=void 0;let n=r(345),o=r(859),a=r(399),l=r(666),c=r(776);class u extends o.Disposable{constructor(g){if(a.isSafari&&(0,a.getSafariVersion)()<16)throw new Error("Webgl2 is only supported on Safari 16 and above");super(),this._preserveDrawingBuffer=g,this._onChangeTextureAtlas=this.register(new n.EventEmitter),this.onChangeTextureAtlas=this._onChangeTextureAtlas.event,this._onAddTextureAtlasCanvas=this.register(new n.EventEmitter),this.onAddTextureAtlasCanvas=this._onAddTextureAtlasCanvas.event,this._onRemoveTextureAtlasCanvas=this.register(new n.EventEmitter),this.onRemoveTextureAtlasCanvas=this._onRemoveTextureAtlasCanvas.event,this._onContextLoss=this.register(new n.EventEmitter),this.onContextLoss=this._onContextLoss.event}activate(g){let m=g._core;if(!g.element)return void this.register(m.onWillOpen((()=>this.activate(g))));this._terminal=g;let h=m.coreService,d=m.optionsService,v=m,f=v._renderService,_=v._characterJoinerService,S=v._charSizeService,b=v._coreBrowserService,C=v._decorationService,y=v._logService,w=v._themeService;(0,c.setTraceLogger)(y),this._renderer=this.register(new l.WebglRenderer(g,_,S,b,h,C,d,w,this._preserveDrawingBuffer)),this.register((0,n.forwardEvent)(this._renderer.onContextLoss,this._onContextLoss)),this.register((0,n.forwardEvent)(this._renderer.onChangeTextureAtlas,this._onChangeTextureAtlas)),this.register((0,n.forwardEvent)(this._renderer.onAddTextureAtlasCanvas,this._onAddTextureAtlasCanvas)),this.register((0,n.forwardEvent)(this._renderer.onRemoveTextureAtlasCanvas,this._onRemoveTextureAtlasCanvas)),f.setRenderer(this._renderer),this.register((0,o.toDisposable)((()=>{let T=this._terminal._core._renderService;T.setRenderer(this._terminal._core._createRenderer()),T.handleResize(g.cols,g.rows)})))}get textureAtlas(){var g;return(g=this._renderer)===null||g===void 0?void 0:g.textureAtlas}clearTextureAtlas(){var g;(g=this._renderer)===null||g===void 0||g.clearTextureAtlas()}}s.WebglAddon=u})(),i})()))});var sy=K(Q()),dE=K(zx());var jg=K(Q()),Wg=K(Wx());function Tr(t){if(typeof t!="object"||t===null)return!1;let e=Object.getPrototypeOf(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Symbol.toStringTag in t)&&!(Symbol.iterator in t)}function Vx(t){if(jg.isValidElement(t)||(0,Wg.isValidElementType)(t)||!Tr(t))return t;let e={};return Object.keys(t).forEach(r=>{e[r]=Vx(t[r])}),e}function De(t,e,r={clone:!0}){let i=r.clone?{...t}:t;return Tr(t)&&Tr(e)&&Object.keys(e).forEach(s=>{jg.isValidElement(e[s])||(0,Wg.isValidElementType)(e[s])?i[s]=e[s]:Tr(e[s])&&Object.prototype.hasOwnProperty.call(t,s)&&Tr(t[s])?i[s]=De(t[s],e[s],r):r.clone?i[s]=Tr(e[s])?Vx(e[s]):e[s]:i[s]=e[s]}),i}function pr(t,...e){let r=new URL(`https://mui.com/production-error/?code=${t}`);return e.forEach(i=>r.searchParams.append("args[]",i)),`Minified MUI error #${t}; visit ${r} for the full message.`}function Er(t){if(typeof t!="string")throw new Error(pr(7));return t.charAt(0).toUpperCase()+t.slice(1)}function $u(t,e=166){let r;function i(...s){let n=()=>{t.apply(this,s)};clearTimeout(r),r=setTimeout(n,e)}return i.clear=()=>{clearTimeout(r)},i}function qo(t){return t&&t.ownerDocument||document}function ju(t){return qo(t).defaultView||window}var Wu=K(Q()),YP=typeof window<"u"?Wu.useLayoutEffect:Wu.useEffect,nn=YP;var Bl=K(Q()),Ux=0;function XP(t){let[e,r]=Bl.useState(t),i=t||e;return Bl.useEffect(()=>{e==null&&(Ux+=1,r(`mui-${Ux}`))},[e]),i}var JP={...Bl},Kx=JP.useId;function Yo(t){if(Kx!==void 0){let e=Kx();return t??e}return XP(t)}var Vg=K(Q());function QP(t){let e=Vg.useRef(t);return nn(()=>{e.current=t}),Vg.useRef((...r)=>(0,e.current)(...r)).current}var Ug=QP;var Xo=K(Q());function zn(...t){let e=Xo.useRef(void 0),r=Xo.useCallback(i=>{let s=t.map(n=>{if(n==null)return null;if(typeof n=="function"){let o=n,a=o(i);return typeof a=="function"?a:()=>{o(null)}}return n.current=i,()=>{n.current=null}});return()=>{s.forEach(n=>n?.())}},t);return Xo.useMemo(()=>t.every(i=>i==null)?null:i=>{e.current&&(e.current(),e.current=void 0),i!=null&&(e.current=r(i))},t)}var qx=K(Q()),Gx={};function Jo(t,e){let r=qx.useRef(Gx);return r.current===Gx&&(r.current=t(e)),r}var Yx=K(Q()),ZP=[];function Kg(t){Yx.useEffect(t,ZP)}var Gg=class t{static create(){return new t}currentId=null;start(e,r){this.clear(),this.currentId=setTimeout(()=>{this.currentId=null,r()},e)}clear=()=>{this.currentId!==null&&(clearTimeout(this.currentId),this.currentId=null)};disposeEffect=()=>this.clear};function Vu(){let t=Jo(Gg.create).current;return Kg(t.disposeEffect),t}function Il(t){try{return t.matches(":focus-visible")}catch{}return!1}function wi(t,e){let r={...e};for(let i in t)if(Object.prototype.hasOwnProperty.call(t,i)){let s=i;if(s==="components"||s==="slots")r[s]={...t[s],...r[s]};else if(s==="componentsProps"||s==="slotProps"){let n=t[s],o=e[s];if(!o)r[s]=n||{};else if(!n)r[s]=o;else{r[s]={...o};for(let a in n)if(Object.prototype.hasOwnProperty.call(n,a)){let l=a;r[s][l]=wi(n[l],o[l])}}}else r[s]===void 0&&(r[s]=t[s])}return r}function Ye(t,e,r=void 0){let i={};for(let s in t){let n=t[s],o="",a=!0;for(let l=0;l<n.length;l+=1){let c=n[l];c&&(o+=(a===!0?"":" ")+e(c),a=!1,r&&r[c]&&(o+=" "+r[c]))}i[s]=o}return i}var Xx=t=>t,eR=()=>{let t=Xx;return{configure(e){t=e},generate(e){return t(e)},reset(){t=Xx}}},tR=eR(),Rs=tR;var rR={active:"active",checked:"checked",completed:"completed",disabled:"disabled",error:"error",expanded:"expanded",focused:"focused",focusVisible:"focusVisible",open:"open",readOnly:"readOnly",required:"required",selected:"selected"};function Xe(t,e,r="Mui"){let i=rR[e];return i?`${r}-${i}`:`${Rs.generate(t)}-${e}`}function Je(t,e,r="Mui"){let i={};return e.forEach(s=>{i[s]=Xe(t,s,r)}),i}function iR(t,e=Number.MIN_SAFE_INTEGER,r=Number.MAX_SAFE_INTEGER){return Math.max(e,Math.min(t,r))}var qg=iR;function nR(t){return typeof t=="string"}var Yg=nR;function sR(t,e,r){return t===void 0||Yg(t)?e:{...e,ownerState:{...e.ownerState,...r}}}var Nl=sR;function Jx(t){var e,r,i="";if(typeof t=="string"||typeof t=="number")i+=t;else if(typeof t=="object")if(Array.isArray(t)){var s=t.length;for(e=0;e<s;e++)t[e]&&(r=Jx(t[e]))&&(i&&(i+=" "),i+=r)}else for(r in t)t[r]&&(i&&(i+=" "),i+=r);return i}function oR(){for(var t,e,r=0,i="",s=arguments.length;r<s;r++)(t=arguments[r])&&(e=Jx(t))&&(i&&(i+=" "),i+=e);return i}var ue=oR;function aR(t,e=[]){if(t===void 0)return{};let r={};return Object.keys(t).filter(i=>i.match(/^on[A-Z]/)&&typeof t[i]=="function"&&!e.includes(i)).forEach(i=>{r[i]=t[i]}),r}var Xg=aR;function lR(t){if(t===void 0)return{};let e={};return Object.keys(t).filter(r=>!(r.match(/^on[A-Z]/)&&typeof t[r]=="function")).forEach(r=>{e[r]=t[r]}),e}var Uu=lR;function cR(t){let{getSlotProps:e,additionalProps:r,externalSlotProps:i,externalForwardedProps:s,className:n}=t;if(!e){let m=ue(r?.className,n,s?.className,i?.className),h={...r?.style,...s?.style,...i?.style},d={...r,...s,...i};return m.length>0&&(d.className=m),Object.keys(h).length>0&&(d.style=h),{props:d,internalRef:void 0}}let o=Xg({...s,...i}),a=Uu(i),l=Uu(s),c=e(o),u=ue(c?.className,r?.className,n,s?.className,i?.className),p={...c?.style,...r?.style,...s?.style,...i?.style},g={...c,...r,...l,...a};return u.length>0&&(g.className=u),Object.keys(p).length>0&&(g.style=p),{props:g,internalRef:c.ref}}var Fl=cR;function hR(t,e,r){return typeof t=="function"?t(e,r):t}var Hl=hR;function uR(t){let{elementType:e,externalSlotProps:r,ownerState:i,skipResolvingSlotProps:s=!1,...n}=t,o=s?{}:Hl(r,i),{props:a,internalRef:l}=Fl({...n,externalSlotProps:o}),c=zn(l,o?.ref,t.additionalProps?.ref);return Nl(e,{...a,ref:c},i)}var Ms=uR;var Oe=Er;var Ff=K(Q());var If=K(Q());var x$=K(Q());function fR(t,e){return e?De(t,e,{clone:!1}):t}var sn=fR;function Ku(t,e){if(!t.containerQueries)return e;let r=Object.keys(e).filter(i=>i.startsWith("@container")).sort((i,s)=>{let n=/min-width:\s*([0-9.]+)/;return+(i.match(n)?.[1]||0)-+(s.match(n)?.[1]||0)});return r.length?r.reduce((i,s)=>{let n=e[s];return delete i[s],i[s]=n,i},{...e}):e}function Jg(t,e){return e==="@"||e.startsWith("@")&&(t.some(r=>e.startsWith(`@${r}`))||!!e.match(/^@\d/))}function Qg(t,e){let r=e.match(/^@([^/]+)?\/?(.+)?$/);if(!r)return null;let[,i,s]=r,n=Number.isNaN(+i)?i||0:+i;return t.containerQueries(s).up(n)}function Gu(t){let e=(n,o)=>n.replace("@media",o?`@container ${o}`:"@container");function r(n,o){n.up=(...a)=>e(t.breakpoints.up(...a),o),n.down=(...a)=>e(t.breakpoints.down(...a),o),n.between=(...a)=>e(t.breakpoints.between(...a),o),n.only=(...a)=>e(t.breakpoints.only(...a),o),n.not=(...a)=>{let l=e(t.breakpoints.not(...a),o);return l.includes("not all and")?l.replace("not all and ","").replace("min-width:","width<").replace("max-width:","width>").replace("and","or"):l}}let i={},s=n=>(r(i,n),i);return r(s),{...t,containerQueries:s}}var zl={xs:0,sm:600,md:900,lg:1200,xl:1536},Qx={keys:["xs","sm","md","lg","xl"],up:t=>`@media (min-width:${zl[t]}px)`},dR={containerQueries:t=>({up:e=>{let r=typeof e=="number"?e:zl[e]||e;return typeof r=="number"&&(r=`${r}px`),t?`@container ${t} (min-width:${r})`:`@container (min-width:${r})`}})};function At(t,e,r){let i=t.theme||{};if(Array.isArray(e)){let n=i.breakpoints||Qx;return e.reduce((o,a,l)=>(o[n.up(n.keys[l])]=r(e[l]),o),{})}if(typeof e=="object"){let n=i.breakpoints||Qx;return Object.keys(e).reduce((o,a)=>{if(Jg(n.keys,a)){let l=Qg(i.containerQueries?i:dR,a);l&&(o[l]=r(e[a],a))}else if(Object.keys(n.values||zl).includes(a)){let l=n.up(a);o[l]=r(e[a],a)}else{let l=a;o[l]=e[l]}return o},{})}return r(e)}function Zg(t={}){return t.keys?.reduce((r,i)=>{let s=t.up(i);return r[s]={},r},{})||{}}function qu(t,e){return t.reduce((r,i)=>{let s=r[i];return(!s||Object.keys(s).length===0)&&delete r[i],r},e)}function Zx(t,...e){let r=Zg(t),i=[r,...e].reduce((s,n)=>De(s,n),{});return qu(Object.keys(r),i)}function pR(t,e){if(typeof t!="object")return{};let r={},i=Object.keys(e);return Array.isArray(t)?i.forEach((s,n)=>{n<t.length&&(r[s]=!0)}):i.forEach(s=>{t[s]!=null&&(r[s]=!0)}),r}function Yu({values:t,breakpoints:e,base:r}){let i=r||pR(t,e),s=Object.keys(i);if(s.length===0)return t;let n;return s.reduce((o,a,l)=>(Array.isArray(t)?(o[a]=t[l]!=null?t[l]:t[n],n=l):typeof t=="object"?(o[a]=t[a]!=null?t[a]:t[n],n=a):o[a]=t,o),{})}function Qo(t,e,r=!0){if(!e||typeof e!="string")return null;if(t&&t.vars&&r){let i=`vars.${e}`.split(".").reduce((s,n)=>s&&s[n]?s[n]:null,t);if(i!=null)return i}return e.split(".").reduce((i,s)=>i&&i[s]!=null?i[s]:null,t)}function $l(t,e,r,i=r){let s;return typeof t=="function"?s=t(r):Array.isArray(t)?s=t[r]||i:s=Qo(t,r)||i,e&&(s=e(s,i,t)),s}function mR(t){let{prop:e,cssProperty:r=t.prop,themeKey:i,transform:s}=t,n=o=>{if(o[e]==null)return null;let a=o[e],l=o.theme,c=Qo(l,i)||{};return At(o,a,p=>{let g=$l(c,s,p);return p===g&&typeof p=="string"&&(g=$l(c,s,`${e}${p==="default"?"":Er(p)}`,p)),r===!1?g:{[r]:g}})};return n.propTypes={},n.filterProps=[e],n}var Qe=mR;function Xu(t){let e={};return r=>(e[r]===void 0&&(e[r]=t(r)),e[r])}var gR={m:"margin",p:"padding"},vR={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},eb={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},_R=Xu(t=>{if(t.length>2)if(eb[t])t=eb[t];else return[t];let[e,r]=t.split(""),i=gR[e],s=vR[r]||"";return Array.isArray(s)?s.map(n=>i+n):[i+s]}),e0=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],t0=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"],tb=[...e0,...t0];function As(t,e,r,i){let s=Qo(t,e,!0)??r;return typeof s=="number"||typeof s=="string"?n=>typeof n=="string"?n:typeof s=="string"?`calc(${n} * ${s})`:s*n:Array.isArray(s)?n=>{if(typeof n=="string")return n;let o=Math.abs(n),a=s[o];return n>=0?a:typeof a=="number"?-a:`-${a}`}:typeof s=="function"?s:()=>{}}function Ls(t){return As(t,"spacing",8,"spacing")}function Ci(t,e){return typeof e=="string"||e==null?e:t(e)}function yR(t,e){return r=>t.reduce((i,s)=>(i[s]=Ci(e,r),i),{})}function SR(t,e,r,i){if(!e.includes(r))return null;let s=_R(r),n=yR(s,i),o=t[r];return At(t,o,n)}function r0(t,e){let r=Ls(t.theme);return Object.keys(t).map(i=>SR(t,e,i,r)).reduce(sn,{})}function lt(t){return r0(t,e0)}lt.propTypes={};lt.filterProps=e0;function ct(t){return r0(t,t0)}ct.propTypes={};ct.filterProps=t0;function rb(t){return r0(t,tb)}rb.propTypes={};rb.filterProps=tb;function xR(...t){let e=t.reduce((i,s)=>(s.filterProps.forEach(n=>{i[n]=s}),i),{}),r=i=>Object.keys(i).reduce((s,n)=>e[n]?sn(s,e[n](i)):s,{});return r.propTypes={},r.filterProps=t.reduce((i,s)=>i.concat(s.filterProps),[]),r}var on=xR;function Pr(t){return typeof t!="number"?t:`${t}px solid`}function Ur(t,e){return Qe({prop:t,themeKey:"borders",transform:e})}var bR=Ur("border",Pr),wR=Ur("borderTop",Pr),CR=Ur("borderRight",Pr),kR=Ur("borderBottom",Pr),TR=Ur("borderLeft",Pr),ER=Ur("borderColor"),PR=Ur("borderTopColor"),RR=Ur("borderRightColor"),MR=Ur("borderBottomColor"),AR=Ur("borderLeftColor"),LR=Ur("outline",Pr),DR=Ur("outlineColor"),jl=t=>{if(t.borderRadius!==void 0&&t.borderRadius!==null){let e=As(t.theme,"shape.borderRadius",4,"borderRadius"),r=i=>({borderRadius:Ci(e,i)});return At(t,t.borderRadius,r)}return null};jl.propTypes={};jl.filterProps=["borderRadius"];var w8=on(bR,wR,CR,kR,TR,ER,PR,RR,MR,AR,jl,LR,DR);var Wl=t=>{if(t.gap!==void 0&&t.gap!==null){let e=As(t.theme,"spacing",8,"gap"),r=i=>({gap:Ci(e,i)});return At(t,t.gap,r)}return null};Wl.propTypes={};Wl.filterProps=["gap"];var Vl=t=>{if(t.columnGap!==void 0&&t.columnGap!==null){let e=As(t.theme,"spacing",8,"columnGap"),r=i=>({columnGap:Ci(e,i)});return At(t,t.columnGap,r)}return null};Vl.propTypes={};Vl.filterProps=["columnGap"];var Ul=t=>{if(t.rowGap!==void 0&&t.rowGap!==null){let e=As(t.theme,"spacing",8,"rowGap"),r=i=>({rowGap:Ci(e,i)});return At(t,t.rowGap,r)}return null};Ul.propTypes={};Ul.filterProps=["rowGap"];var OR=Qe({prop:"gridColumn"}),BR=Qe({prop:"gridRow"}),IR=Qe({prop:"gridAutoFlow"}),NR=Qe({prop:"gridAutoColumns"}),FR=Qe({prop:"gridAutoRows"}),HR=Qe({prop:"gridTemplateColumns"}),zR=Qe({prop:"gridTemplateRows"}),$R=Qe({prop:"gridTemplateAreas"}),jR=Qe({prop:"gridArea"}),R8=on(Wl,Vl,Ul,OR,BR,IR,NR,FR,HR,zR,$R,jR);function Ds(t,e){return e==="grey"?e:t}var WR=Qe({prop:"color",themeKey:"palette",transform:Ds}),VR=Qe({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:Ds}),UR=Qe({prop:"backgroundColor",themeKey:"palette",transform:Ds}),D8=on(WR,VR,UR);function mr(t){return t<=1&&t!==0?`${t*100}%`:t}var KR=Qe({prop:"width",transform:mr}),Ju=t=>{if(t.maxWidth!==void 0&&t.maxWidth!==null){let e=r=>{let i=t.theme?.breakpoints?.values?.[r]||zl[r];return i?t.theme?.breakpoints?.unit!=="px"?{maxWidth:`${i}${t.theme.breakpoints.unit}`}:{maxWidth:i}:{maxWidth:mr(r)}};return At(t,t.maxWidth,e)}return null};Ju.filterProps=["maxWidth"];var GR=Qe({prop:"minWidth",transform:mr}),qR=Qe({prop:"height",transform:mr}),YR=Qe({prop:"maxHeight",transform:mr}),XR=Qe({prop:"minHeight",transform:mr}),F8=Qe({prop:"size",cssProperty:"width",transform:mr}),H8=Qe({prop:"size",cssProperty:"height",transform:mr}),JR=Qe({prop:"boxSizing"}),z8=on(KR,Ju,GR,qR,YR,XR,JR);var QR={border:{themeKey:"borders",transform:Pr},borderTop:{themeKey:"borders",transform:Pr},borderRight:{themeKey:"borders",transform:Pr},borderBottom:{themeKey:"borders",transform:Pr},borderLeft:{themeKey:"borders",transform:Pr},borderColor:{themeKey:"palette"},borderTopColor:{themeKey:"palette"},borderRightColor:{themeKey:"palette"},borderBottomColor:{themeKey:"palette"},borderLeftColor:{themeKey:"palette"},outline:{themeKey:"borders",transform:Pr},outlineColor:{themeKey:"palette"},borderRadius:{themeKey:"shape.borderRadius",style:jl},color:{themeKey:"palette",transform:Ds},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:Ds},backgroundColor:{themeKey:"palette",transform:Ds},p:{style:ct},pt:{style:ct},pr:{style:ct},pb:{style:ct},pl:{style:ct},px:{style:ct},py:{style:ct},padding:{style:ct},paddingTop:{style:ct},paddingRight:{style:ct},paddingBottom:{style:ct},paddingLeft:{style:ct},paddingX:{style:ct},paddingY:{style:ct},paddingInline:{style:ct},paddingInlineStart:{style:ct},paddingInlineEnd:{style:ct},paddingBlock:{style:ct},paddingBlockStart:{style:ct},paddingBlockEnd:{style:ct},m:{style:lt},mt:{style:lt},mr:{style:lt},mb:{style:lt},ml:{style:lt},mx:{style:lt},my:{style:lt},margin:{style:lt},marginTop:{style:lt},marginRight:{style:lt},marginBottom:{style:lt},marginLeft:{style:lt},marginX:{style:lt},marginY:{style:lt},marginInline:{style:lt},marginInlineStart:{style:lt},marginInlineEnd:{style:lt},marginBlock:{style:lt},marginBlockStart:{style:lt},marginBlockEnd:{style:lt},displayPrint:{cssProperty:!1,transform:t=>({"@media print":{display:t}})},display:{},overflow:{},textOverflow:{},visibility:{},whiteSpace:{},flexBasis:{},flexDirection:{},flexWrap:{},justifyContent:{},alignItems:{},alignContent:{},order:{},flex:{},flexGrow:{},flexShrink:{},alignSelf:{},justifyItems:{},justifySelf:{},gap:{style:Wl},rowGap:{style:Ul},columnGap:{style:Vl},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:"zIndex"},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:"shadows"},width:{transform:mr},maxWidth:{style:Ju},minWidth:{transform:mr},height:{transform:mr},maxHeight:{transform:mr},minHeight:{transform:mr},boxSizing:{},font:{themeKey:"font"},fontFamily:{themeKey:"typography"},fontSize:{themeKey:"typography"},fontStyle:{themeKey:"typography"},fontWeight:{themeKey:"typography"},letterSpacing:{},textTransform:{},lineHeight:{},textAlign:{},typography:{cssProperty:!1,themeKey:"typography"}},ai=QR;function ZR(...t){let e=t.reduce((i,s)=>i.concat(Object.keys(s)),[]),r=new Set(e);return t.every(i=>r.size===Object.keys(i).length)}function eM(t,e){return typeof t=="function"?t(e):t}function tM(){function t(r,i,s,n){let o={[r]:i,theme:s},a=n[r];if(!a)return{[r]:i};let{cssProperty:l=r,themeKey:c,transform:u,style:p}=a;if(i==null)return null;if(c==="typography"&&i==="inherit")return{[r]:i};let g=Qo(s,c)||{};return p?p(o):At(o,i,h=>{let d=$l(g,u,h);return h===d&&typeof h=="string"&&(d=$l(g,u,`${r}${h==="default"?"":Er(h)}`,h)),l===!1?d:{[l]:d}})}function e(r){let{sx:i,theme:s={},nested:n}=r||{};if(!i)return null;let o=s.unstable_sxConfig??ai;function a(l){let c=l;if(typeof l=="function")c=l(s);else if(typeof l!="object")return l;if(!c)return null;let u=Zg(s.breakpoints),p=Object.keys(u),g=u;return Object.keys(c).forEach(m=>{let h=eM(c[m],s);if(h!=null)if(typeof h=="object")if(o[m])g=sn(g,t(m,h,s,o));else{let d=At({theme:s},h,v=>({[m]:v}));ZR(d,h)?g[m]=e({sx:h,theme:s,nested:!0}):g=sn(g,d)}else g=sn(g,t(m,h,s,o))}),!n&&s.modularCssLayers?{"@layer sx":Ku(s,qu(p,g))}:Ku(s,qu(p,g))}return Array.isArray(i)?i.map(a):a(i)}return e}var ib=tM();ib.filterProps=["sx"];var gr=ib;var rM=t=>{let e={systemProps:{},otherProps:{}},r=t?.theme?.unstable_sxConfig??ai;return Object.keys(t).forEach(i=>{r[i]?e.systemProps[i]=t[i]:e.otherProps[i]=t[i]}),e};function $n(t){let{sx:e,...r}=t,{systemProps:i,otherProps:s}=rM(r),n;return Array.isArray(e)?n=[i,...e]:typeof e=="function"?n=(...o)=>{let a=e(...o);return Tr(a)?{...i,...a}:i}:n={...i,...e},{...s,sx:n}}var uL=K(Q());function Se(){return Se=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var i in r)({}).hasOwnProperty.call(r,i)&&(t[i]=r[i])}return t},Se.apply(null,arguments)}var C7=K(Q());function nb(t){var e=Object.create(null);return function(r){return e[r]===void 0&&(e[r]=t(r)),e[r]}}var iM=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|download|draggable|encType|enterKeyHint|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,nM=nb(function(t){return iM.test(t)||t.charCodeAt(0)===111&&t.charCodeAt(1)===110&&t.charCodeAt(2)<91}),sb=nM;var Vn=K(Q());var ca=K(Q());var sM=!1;function oM(t){if(t.sheet)return t.sheet;for(var e=0;e<document.styleSheets.length;e++)if(document.styleSheets[e].ownerNode===t)return document.styleSheets[e]}function aM(t){var e=document.createElement("style");return e.setAttribute("data-emotion",t.key),t.nonce!==void 0&&e.setAttribute("nonce",t.nonce),e.appendChild(document.createTextNode("")),e.setAttribute("data-s",""),e}var ob=(function(){function t(r){var i=this;this._insertTag=function(s){var n;i.tags.length===0?i.insertionPoint?n=i.insertionPoint.nextSibling:i.prepend?n=i.container.firstChild:n=i.before:n=i.tags[i.tags.length-1].nextSibling,i.container.insertBefore(s,n),i.tags.push(s)},this.isSpeedy=r.speedy===void 0?!sM:r.speedy,this.tags=[],this.ctr=0,this.nonce=r.nonce,this.key=r.key,this.container=r.container,this.prepend=r.prepend,this.insertionPoint=r.insertionPoint,this.before=null}var e=t.prototype;return e.hydrate=function(i){i.forEach(this._insertTag)},e.insert=function(i){this.ctr%(this.isSpeedy?65e3:1)===0&&this._insertTag(aM(this));var s=this.tags[this.tags.length-1];if(this.isSpeedy){var n=oM(s);try{n.insertRule(i,n.cssRules.length)}catch{}}else s.appendChild(document.createTextNode(i));this.ctr++},e.flush=function(){this.tags.forEach(function(i){var s;return(s=i.parentNode)==null?void 0:s.removeChild(i)}),this.tags=[],this.ctr=0},t})();var Ht="-ms-",Kl="-moz-",Re="-webkit-",Qu="comm",Zo="rule",ea="decl";var ab="@import";var Zu="@keyframes";var lb="@layer";var cb=Math.abs,Os=String.fromCharCode,hb=Object.assign;function ub(t,e){return mt(t,0)^45?(((e<<2^mt(t,0))<<2^mt(t,1))<<2^mt(t,2))<<2^mt(t,3):0}function ef(t){return t.trim()}function i0(t,e){return(t=e.exec(t))?t[0]:t}function we(t,e,r){return t.replace(e,r)}function Gl(t,e){return t.indexOf(e)}function mt(t,e){return t.charCodeAt(e)|0}function jn(t,e,r){return t.slice(e,r)}function nr(t){return t.length}function ta(t){return t.length}function ra(t,e){return e.push(t),t}function n0(t,e){return t.map(e).join("")}var tf=1,ia=1,fb=0,sr=0,xt=0,sa="";function ql(t,e,r,i,s,n,o){return{value:t,root:e,parent:r,type:i,props:s,children:n,line:tf,column:ia,length:o,return:""}}function oa(t,e){return hb(ql("",null,null,"",null,null,0),t,{length:-t.length},e)}function db(){return xt}function pb(){return xt=sr>0?mt(sa,--sr):0,ia--,xt===10&&(ia=1,tf--),xt}function or(){return xt=sr<fb?mt(sa,sr++):0,ia++,xt===10&&(ia=1,tf++),xt}function Kr(){return mt(sa,sr)}function Yl(){return sr}function aa(t,e){return jn(sa,t,e)}function na(t){switch(t){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function rf(t){return tf=ia=1,fb=nr(sa=t),sr=0,[]}function nf(t){return sa="",t}function la(t){return ef(aa(sr-1,s0(t===91?t+2:t===40?t+1:t)))}function mb(t){for(;(xt=Kr())&&xt<33;)or();return na(t)>2||na(xt)>3?"":" "}function gb(t,e){for(;--e&&or()&&!(xt<48||xt>102||xt>57&&xt<65||xt>70&&xt<97););return aa(t,Yl()+(e<6&&Kr()==32&&or()==32))}function s0(t){for(;or();)switch(xt){case t:return sr;case 34:case 39:t!==34&&t!==39&&s0(xt);break;case 40:t===41&&s0(t);break;case 92:or();break}return sr}function vb(t,e){for(;or()&&t+xt!==57;)if(t+xt===84&&Kr()===47)break;return"/*"+aa(e,sr-1)+"*"+Os(t===47?t:or())}function _b(t){for(;!na(Kr());)or();return aa(t,sr)}function xb(t){return nf(sf("",null,null,null,[""],t=rf(t),0,[0],t))}function sf(t,e,r,i,s,n,o,a,l){for(var c=0,u=0,p=o,g=0,m=0,h=0,d=1,v=1,f=1,_=0,S="",b=s,C=n,y=i,w=S;v;)switch(h=_,_=or()){case 40:if(h!=108&&mt(w,p-1)==58){Gl(w+=we(la(_),"&","&\f"),"&\f")!=-1&&(f=-1);break}case 34:case 39:case 91:w+=la(_);break;case 9:case 10:case 13:case 32:w+=mb(h);break;case 92:w+=gb(Yl()-1,7);continue;case 47:switch(Kr()){case 42:case 47:ra(lM(vb(or(),Yl()),e,r),l);break;default:w+="/"}break;case 123*d:a[c++]=nr(w)*f;case 125*d:case 59:case 0:switch(_){case 0:case 125:v=0;case 59+u:f==-1&&(w=we(w,/\f/g,"")),m>0&&nr(w)-p&&ra(m>32?Sb(w+";",i,r,p-1):Sb(we(w," ","")+";",i,r,p-2),l);break;case 59:w+=";";default:if(ra(y=yb(w,e,r,c,u,s,a,S,b=[],C=[],p),n),_===123)if(u===0)sf(w,e,y,y,b,n,p,a,C);else switch(g===99&&mt(w,3)===110?100:g){case 100:case 108:case 109:case 115:sf(t,y,y,i&&ra(yb(t,y,y,0,0,s,a,S,s,b=[],p),C),s,C,p,a,i?b:C);break;default:sf(w,y,y,y,[""],C,0,a,C)}}c=u=m=0,d=f=1,S=w="",p=o;break;case 58:p=1+nr(w),m=h;default:if(d<1){if(_==123)--d;else if(_==125&&d++==0&&pb()==125)continue}switch(w+=Os(_),_*d){case 38:f=u>0?1:(w+="\f",-1);break;case 44:a[c++]=(nr(w)-1)*f,f=1;break;case 64:Kr()===45&&(w+=la(or())),g=Kr(),u=p=nr(S=w+=_b(Yl())),_++;break;case 45:h===45&&nr(w)==2&&(d=0)}}return n}function yb(t,e,r,i,s,n,o,a,l,c,u){for(var p=s-1,g=s===0?n:[""],m=ta(g),h=0,d=0,v=0;h<i;++h)for(var f=0,_=jn(t,p+1,p=cb(d=o[h])),S=t;f<m;++f)(S=ef(d>0?g[f]+" "+_:we(_,/&\f/g,g[f])))&&(l[v++]=S);return ql(t,e,r,s===0?Zo:a,l,c,u)}function lM(t,e,r){return ql(t,e,r,Qu,Os(db()),jn(t,2,-2),0)}function Sb(t,e,r,i){return ql(t,e,r,ea,jn(t,0,i),jn(t,i+1,-1),i)}function Bs(t,e){for(var r="",i=ta(t),s=0;s<i;s++)r+=e(t[s],s,t,e)||"";return r}function bb(t,e,r,i){switch(t.type){case lb:if(t.children.length)break;case ab:case ea:return t.return=t.return||t.value;case Qu:return"";case Zu:return t.return=t.value+"{"+Bs(t.children,i)+"}";case Zo:t.value=t.props.join(",")}return nr(r=Bs(t.children,i))?t.return=t.value+"{"+r+"}":""}function wb(t){var e=ta(t);return function(r,i,s,n){for(var o="",a=0;a<e;a++)o+=t[a](r,i,s,n)||"";return o}}function Cb(t){return function(e){e.root||(e=e.return)&&t(e)}}var cM=function(e,r,i){for(var s=0,n=0;s=n,n=Kr(),s===38&&n===12&&(r[i]=1),!na(n);)or();return aa(e,sr)},hM=function(e,r){var i=-1,s=44;do switch(na(s)){case 0:s===38&&Kr()===12&&(r[i]=1),e[i]+=cM(sr-1,r,i);break;case 2:e[i]+=la(s);break;case 4:if(s===44){e[++i]=Kr()===58?"&\f":"",r[i]=e[i].length;break}default:e[i]+=Os(s)}while(s=or());return e},uM=function(e,r){return nf(hM(rf(e),r))},kb=new WeakMap,fM=function(e){if(!(e.type!=="rule"||!e.parent||e.length<1)){for(var r=e.value,i=e.parent,s=e.column===i.column&&e.line===i.line;i.type!=="rule";)if(i=i.parent,!i)return;if(!(e.props.length===1&&r.charCodeAt(0)!==58&&!kb.get(i))&&!s){kb.set(e,!0);for(var n=[],o=uM(r,n),a=i.props,l=0,c=0;l<o.length;l++)for(var u=0;u<a.length;u++,c++)e.props[c]=n[l]?o[l].replace(/&\f/g,a[u]):a[u]+" "+o[l]}}},dM=function(e){if(e.type==="decl"){var r=e.value;r.charCodeAt(0)===108&&r.charCodeAt(2)===98&&(e.return="",e.value="")}};function Tb(t,e){switch(ub(t,e)){case 5103:return Re+"print-"+t+t;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return Re+t+t;case 5349:case 4246:case 4810:case 6968:case 2756:return Re+t+Kl+t+Ht+t+t;case 6828:case 4268:return Re+t+Ht+t+t;case 6165:return Re+t+Ht+"flex-"+t+t;case 5187:return Re+t+we(t,/(\w+).+(:[^]+)/,Re+"box-$1$2"+Ht+"flex-$1$2")+t;case 5443:return Re+t+Ht+"flex-item-"+we(t,/flex-|-self/,"")+t;case 4675:return Re+t+Ht+"flex-line-pack"+we(t,/align-content|flex-|-self/,"")+t;case 5548:return Re+t+Ht+we(t,"shrink","negative")+t;case 5292:return Re+t+Ht+we(t,"basis","preferred-size")+t;case 6060:return Re+"box-"+we(t,"-grow","")+Re+t+Ht+we(t,"grow","positive")+t;case 4554:return Re+we(t,/([^-])(transform)/g,"$1"+Re+"$2")+t;case 6187:return we(we(we(t,/(zoom-|grab)/,Re+"$1"),/(image-set)/,Re+"$1"),t,"")+t;case 5495:case 3959:return we(t,/(image-set\([^]*)/,Re+"$1$`$1");case 4968:return we(we(t,/(.+:)(flex-)?(.*)/,Re+"box-pack:$3"+Ht+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+Re+t+t;case 4095:case 3583:case 4068:case 2532:return we(t,/(.+)-inline(.+)/,Re+"$1$2")+t;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(nr(t)-1-e>6)switch(mt(t,e+1)){case 109:if(mt(t,e+4)!==45)break;case 102:return we(t,/(.+:)(.+)-([^]+)/,"$1"+Re+"$2-$3$1"+Kl+(mt(t,e+3)==108?"$3":"$2-$3"))+t;case 115:return~Gl(t,"stretch")?Tb(we(t,"stretch","fill-available"),e)+t:t}break;case 4949:if(mt(t,e+1)!==115)break;case 6444:switch(mt(t,nr(t)-3-(~Gl(t,"!important")&&10))){case 107:return we(t,":",":"+Re)+t;case 101:return we(t,/(.+:)([^;!]+)(;|!.+)?/,"$1"+Re+(mt(t,14)===45?"inline-":"")+"box$3$1"+Re+"$2$3$1"+Ht+"$2box$3")+t}break;case 5936:switch(mt(t,e+11)){case 114:return Re+t+Ht+we(t,/[svh]\w+-[tblr]{2}/,"tb")+t;case 108:return Re+t+Ht+we(t,/[svh]\w+-[tblr]{2}/,"tb-rl")+t;case 45:return Re+t+Ht+we(t,/[svh]\w+-[tblr]{2}/,"lr")+t}return Re+t+Ht+t+t}return t}var pM=function(e,r,i,s){if(e.length>-1&&!e.return)switch(e.type){case ea:e.return=Tb(e.value,e.length);break;case Zu:return Bs([oa(e,{value:we(e.value,"@","@"+Re)})],s);case Zo:if(e.length)return n0(e.props,function(n){switch(i0(n,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return Bs([oa(e,{props:[we(n,/:(read-\w+)/,":"+Kl+"$1")]})],s);case"::placeholder":return Bs([oa(e,{props:[we(n,/:(plac\w+)/,":"+Re+"input-$1")]}),oa(e,{props:[we(n,/:(plac\w+)/,":"+Kl+"$1")]}),oa(e,{props:[we(n,/:(plac\w+)/,Ht+"input-$1")]})],s)}return""})}},mM=[pM],Eb=function(e){var r=e.key;if(r==="css"){var i=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(i,function(d){var v=d.getAttribute("data-emotion");v.indexOf(" ")!==-1&&(document.head.appendChild(d),d.setAttribute("data-s",""))})}var s=e.stylisPlugins||mM,n={},o,a=[];o=e.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+r+' "]'),function(d){for(var v=d.getAttribute("data-emotion").split(" "),f=1;f<v.length;f++)n[v[f]]=!0;a.push(d)});var l,c=[fM,dM];{var u,p=[bb,Cb(function(d){u.insert(d)})],g=wb(c.concat(s,p)),m=function(v){return Bs(xb(v),g)};l=function(v,f,_,S){u=_,m(v?v+"{"+f.styles+"}":f.styles),S&&(h.inserted[f.name]=!0)}}var h={key:r,sheet:new ob({key:r,container:o,nonce:e.nonce,speedy:e.speedy,prepend:e.prepend,insertionPoint:e.insertionPoint}),nonce:e.nonce,inserted:n,registered:{},insert:l};return h.sheet.hydrate(a),h};var an=K(Q());var PM=!0;function gf(t,e,r){var i="";return r.split(" ").forEach(function(s){t[s]!==void 0?e.push(t[s]+";"):s&&(i+=s+" ")}),i}var Xl=function(e,r,i){var s=e.key+"-"+r.name;(i===!1||PM===!1)&&e.registered[s]===void 0&&(e.registered[s]=r.styles)},Jl=function(e,r,i){Xl(e,r,i);var s=e.key+"-"+r.name;if(e.inserted[r.name]===void 0){var n=r;do e.insert(r===n?"."+s:"",n,e.sheet,!0),n=n.next;while(n!==void 0)}};function Hb(t){for(var e=0,r,i=0,s=t.length;s>=4;++i,s-=4)r=t.charCodeAt(i)&255|(t.charCodeAt(++i)&255)<<8|(t.charCodeAt(++i)&255)<<16|(t.charCodeAt(++i)&255)<<24,r=(r&65535)*1540483477+((r>>>16)*59797<<16),r^=r>>>24,e=(r&65535)*1540483477+((r>>>16)*59797<<16)^(e&65535)*1540483477+((e>>>16)*59797<<16);switch(s){case 3:e^=(t.charCodeAt(i+2)&255)<<16;case 2:e^=(t.charCodeAt(i+1)&255)<<8;case 1:e^=t.charCodeAt(i)&255,e=(e&65535)*1540483477+((e>>>16)*59797<<16)}return e^=e>>>13,e=(e&65535)*1540483477+((e>>>16)*59797<<16),((e^e>>>15)>>>0).toString(36)}var zb={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,scale:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1};function $b(t){var e=Object.create(null);return function(r){return e[r]===void 0&&(e[r]=t(r)),e[r]}}var RM=!1,MM=/[A-Z]|^ms/g,AM=/_EMO_([^_]+?)_([^]*?)_EMO_/g,Ub=function(e){return e.charCodeAt(1)===45},jb=function(e){return e!=null&&typeof e!="boolean"},u0=$b(function(t){return Ub(t)?t:t.replace(MM,"-$&").toLowerCase()}),Wb=function(e,r){switch(e){case"animation":case"animationName":if(typeof r=="string")return r.replace(AM,function(i,s,n){return ki={name:s,styles:n,next:ki},s})}return zb[e]!==1&&!Ub(e)&&typeof r=="number"&&r!==0?r+"px":r},LM="Component selectors can only be used in conjunction with @emotion/babel-plugin, the swc Emotion plugin, or another Emotion-aware compiler transform.";function Ql(t,e,r){if(r==null)return"";var i=r;if(i.__emotion_styles!==void 0)return i;switch(typeof r){case"boolean":return"";case"object":{var s=r;if(s.anim===1)return ki={name:s.name,styles:s.styles,next:ki},s.name;var n=r;if(n.styles!==void 0){var o=n.next;if(o!==void 0)for(;o!==void 0;)ki={name:o.name,styles:o.styles,next:ki},o=o.next;var a=n.styles+";";return a}return DM(t,e,r)}case"function":{if(t!==void 0){var l=ki,c=r(t);return ki=l,Ql(t,e,c)}break}}var u=r;if(e==null)return u;var p=e[u];return p!==void 0?p:u}function DM(t,e,r){var i="";if(Array.isArray(r))for(var s=0;s<r.length;s++)i+=Ql(t,e,r[s])+";";else for(var n in r){var o=r[n];if(typeof o!="object"){var a=o;e!=null&&e[a]!==void 0?i+=n+"{"+e[a]+"}":jb(a)&&(i+=u0(n)+":"+Wb(n,a)+";")}else{if(n==="NO_COMPONENT_SELECTOR"&&RM)throw new Error(LM);if(Array.isArray(o)&&typeof o[0]=="string"&&(e==null||e[o[0]]===void 0))for(var l=0;l<o.length;l++)jb(o[l])&&(i+=u0(n)+":"+Wb(n,o[l])+";");else{var c=Ql(t,e,o);switch(n){case"animation":case"animationName":{i+=u0(n)+":"+c+";";break}default:i+=n+"{"+c+"}"}}}}return i}var Vb=/label:\s*([^\s;{]+)\s*(;|$)/g,ki;function Wn(t,e,r){if(t.length===1&&typeof t[0]=="object"&&t[0]!==null&&t[0].styles!==void 0)return t[0];var i=!0,s="";ki=void 0;var n=t[0];if(n==null||n.raw===void 0)i=!1,s+=Ql(r,e,n);else{var o=n;s+=o[0]}for(var a=1;a<t.length;a++)if(s+=Ql(r,e,t[a]),i){var l=n;s+=l[a]}Vb.lastIndex=0;for(var c="",u;(u=Vb.exec(s))!==null;)c+="-"+u[1];var p=Hb(s)+c;return{name:p,styles:s,next:ki}}var Zl=K(Q()),OM=function(e){return e()},Kb=Zl.useInsertionEffect?Zl.useInsertionEffect:!1,vf=Kb||OM,f0=Kb||Zl.useLayoutEffect;var BM={}.hasOwnProperty,Gb=(0,an.createContext)(typeof HTMLElement<"u"?Eb({key:"css"}):null),IM=Gb.Provider;var ec=function(e){return(0,an.forwardRef)(function(r,i){var s=(0,an.useContext)(Gb);return e(r,s,i)})},Ti=(0,an.createContext)({});var h7=K(Fb());var qb=ec(function(t,e){var r=t.styles,i=Wn([r],void 0,(0,ca.useContext)(Ti)),s=(0,ca.useRef)();return f0(function(){var n=e.key+"-global",o=new e.sheet.constructor({key:n,nonce:e.sheet.nonce,container:e.sheet.container,speedy:e.sheet.isSpeedy}),a=!1,l=document.querySelector('style[data-emotion="'+n+" "+i.name+'"]');return e.sheet.tags.length&&(o.before=e.sheet.tags[0]),l!==null&&(a=!0,l.setAttribute("data-emotion",n),o.hydrate([l])),s.current=[o,a],function(){o.flush()}},[e]),f0(function(){var n=s.current,o=n[0],a=n[1];if(a){n[1]=!1;return}if(i.next!==void 0&&Jl(e,i.next,!0),o.tags.length){var l=o.tags[o.tags.length-1].nextElementSibling;o.before=l,o.flush()}e.insert("",i,o,!1)},[e,i.name]),null});function Is(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];return Wn(e)}var Ei=function(){var e=Is.apply(void 0,arguments),r="animation-"+e.name;return{name:r,styles:"@keyframes "+r+"{"+e.styles+"}",anim:1,toString:function(){return"_EMO_"+this.name+"_"+this.styles+"_EMO_"}}};var NM=sb,FM=function(e){return e!=="theme"},Yb=function(e){return typeof e=="string"&&e.charCodeAt(0)>96?NM:FM},Xb=function(e,r,i){var s;if(r){var n=r.shouldForwardProp;s=e.__emotion_forwardProp&&n?function(o){return e.__emotion_forwardProp(o)&&n(o)}:n}return typeof s!="function"&&i&&(s=e.__emotion_forwardProp),s};var HM=function(e){var r=e.cache,i=e.serialized,s=e.isStringTag;Xl(r,i,s);var n=vf(function(){return Jl(r,i,s)});return null},zM=function t(e,r){var i=e.__emotion_real===e,s=i&&e.__emotion_base||e,n,o;r!==void 0&&(n=r.label,o=r.target);var a=Xb(e,r,i),l=a||Yb(s),c=!l("as");return function(){var u=arguments,p=i&&e.__emotion_styles!==void 0?e.__emotion_styles.slice(0):[];if(n!==void 0&&p.push("label:"+n+";"),u[0]==null||u[0].raw===void 0)p.push.apply(p,u);else{p.push(u[0][0]);for(var g=u.length,m=1;m<g;m++)p.push(u[m],u[0][m])}var h=ec(function(d,v,f){var _=c&&d.as||s,S="",b=[],C=d;if(d.theme==null){C={};for(var y in d)C[y]=d[y];C.theme=(0,Vn.useContext)(Ti)}typeof d.className=="string"?S=gf(v.registered,b,d.className):d.className!=null&&(S=d.className+" ");var w=Wn(p.concat(b),v.registered,C);S+=v.key+"-"+w.name,o!==void 0&&(S+=" "+o);var T=c&&a===void 0?Yb(_):l,k={};for(var x in d)c&&x==="as"||T(x)&&(k[x]=d[x]);return k.className=S,k.ref=f,(0,Vn.createElement)(Vn.Fragment,null,(0,Vn.createElement)(HM,{cache:v,serialized:w,isStringTag:typeof _=="string"}),(0,Vn.createElement)(_,k))});return h.displayName=n!==void 0?n:"Styled("+(typeof s=="string"?s:s.displayName||s.name||"Component")+")",h.defaultProps=e.defaultProps,h.__emotion_real=h,h.__emotion_base=s,h.__emotion_styles=p,h.__emotion_forwardProp=a,Object.defineProperty(h,"toString",{value:function(){return"."+o}}),h.withComponent=function(d,v){return t(d,Se({},r,v,{shouldForwardProp:Xb(h,v,!0)})).apply(void 0,p)},h}},Jb=zM;var $M=["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","marquee","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"],d0=Jb.bind();$M.forEach(function(t){d0[t]=d0(t)});var Qb=d0;var D7=K(Q());var rw=K(_e());function qM(t){return t==null||Object.keys(t).length===0}function Ns(t){let{styles:e,defaultTheme:r={}}=t;return(0,rw.jsx)(qb,{styles:typeof e=="function"?s=>e(qM(s)?r:s):e})}function tc(t,e){return Qb(t,e)}function nw(t,e){Array.isArray(t.__emotion_styles)&&(t.__emotion_styles=e(t.__emotion_styles))}var iw=[];function li(t){return iw[0]=t,Wn(iw)}var mF=K(Q());var YM=t=>{let e=Object.keys(t).map(r=>({key:r,val:t[r]}))||[];return e.sort((r,i)=>r.val-i.val),e.reduce((r,i)=>({...r,[i.key]:i.val}),{})};function p0(t){let{values:e={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:r="px",step:i=5,...s}=t,n=YM(e),o=Object.keys(n);function a(g){return`@media (min-width:${typeof e[g]=="number"?e[g]:g}${r})`}function l(g){return`@media (max-width:${(typeof e[g]=="number"?e[g]:g)-i/100}${r})`}function c(g,m){let h=o.indexOf(m);return`@media (min-width:${typeof e[g]=="number"?e[g]:g}${r}) and (max-width:${(h!==-1&&typeof e[o[h]]=="number"?e[o[h]]:m)-i/100}${r})`}function u(g){return o.indexOf(g)+1<o.length?c(g,o[o.indexOf(g)+1]):a(g)}function p(g){let m=o.indexOf(g);return m===0?a(o[1]):m===o.length-1?l(o[m]):c(g,o[o.indexOf(g)+1]).replace("@media","@media not all and")}return{keys:o,values:n,up:a,down:l,between:c,only:u,not:p,unit:r,...s}}var XM={borderRadius:4},sw=XM;function ha(t=8,e=Ls({spacing:t})){if(t.mui)return t;let r=(...i)=>(i.length===0?[1]:i).map(n=>{let o=e(n);return typeof o=="number"?`${o}px`:o}).join(" ");return r.mui=!0,r}function m0(t,e){let r=this;if(r.vars){if(!r.colorSchemes?.[t]||typeof r.getColorSchemeSelector!="function")return{};let i=r.getColorSchemeSelector(t);return i==="&"?e:((i.includes("data-")||i.includes("."))&&(i=`*:where(${i.replace(/\s*&$/,"")}) &`),{[i]:e})}return r.palette.mode===t?e:{}}function JM(t={},...e){let{breakpoints:r={},palette:i={},spacing:s,shape:n={},...o}=t,a=p0(r),l=ha(s),c=De({breakpoints:a,direction:"ltr",components:{},palette:{mode:"light",...i},spacing:l,shape:{...sw,...n}},o);return c=Gu(c),c.applyStyles=m0,c=e.reduce((u,p)=>De(u,p),c),c.unstable_sxConfig={...ai,...o?.unstable_sxConfig},c.unstable_sx=function(p){return gr({sx:p,theme:this})},c}var ln=JM;var ow=K(Q());function QM(t){return Object.keys(t).length===0}function ZM(t=null){let e=ow.useContext(Ti);return!e||QM(e)?t:e}var Fs=ZM;var eA=ln();function tA(t=eA){return Fs(t)}var Pi=tA;var aw=K(_e());function g0(t){let e=li(t);return t!==e&&e.styles?(e.styles.match(/^@layer\s+[^{]*$/)||(e.styles=`@layer global{${e.styles}}`),e):t}function rA({styles:t,themeId:e,defaultTheme:r={}}){let i=Pi(r),s=e&&i[e]||i,n=typeof t=="function"?t(s):t;return s.modularCssLayers&&(Array.isArray(n)?n=n.map(o=>g0(typeof o=="function"?o(s):o)):n=g0(n)),(0,aw.jsx)(Ns,{styles:n})}var v0=rA;var lw=K(Q());var cw=K(_e());function rc(t={}){let{themeId:e,defaultTheme:r,defaultClassName:i="MuiBox-root",generateClassName:s}=t,n=tc("div",{shouldForwardProp:a=>a!=="theme"&&a!=="sx"&&a!=="as"})(gr);return lw.forwardRef(function(l,c){let u=Pi(r),{className:p,component:g="div",...m}=$n(l);return(0,cw.jsx)(n,{as:g,ref:c,className:ue(p,s?s(i):i),theme:e&&u[e]||u,...m})})}function ic(t){let{variants:e,...r}=t,i={variants:e,style:li(r),isProcessed:!0};return i.style===r||e&&e.forEach(s=>{typeof s.style!="function"&&(s.style=li(s.style))}),i}var iA=ln();function _0(t){return t!=="ownerState"&&t!=="theme"&&t!=="sx"&&t!=="as"}function Hs(t,e){return e&&t&&typeof t=="object"&&t.styles&&!t.styles.startsWith("@layer")&&(t.styles=`@layer ${e}{${String(t.styles)}}`),t}function nA(t){return t?(e,r)=>r[t]:null}function sA(t,e,r){t.theme=aA(t.theme)?r:t.theme[e]||t.theme}function yf(t,e,r){let i=typeof e=="function"?e(t):e;if(Array.isArray(i))return i.flatMap(s=>yf(t,s,r));if(Array.isArray(i?.variants)){let s;if(i.isProcessed)s=r?Hs(i.style,r):i.style;else{let{variants:n,...o}=i;s=r?Hs(li(o),r):o}return hw(t,i.variants,[s],r)}return i?.isProcessed?r?Hs(li(i.style),r):i.style:r?Hs(li(i),r):i}function hw(t,e,r=[],i=void 0){let s;e:for(let n=0;n<e.length;n+=1){let o=e[n];if(typeof o.props=="function"){if(s??={...t,...t.ownerState,ownerState:t.ownerState},!o.props(s))continue}else for(let a in o.props)if(t[a]!==o.props[a]&&t.ownerState?.[a]!==o.props[a])continue e;typeof o.style=="function"?(s??={...t,...t.ownerState,ownerState:t.ownerState},r.push(i?Hs(li(o.style(s)),i):o.style(s))):r.push(i?Hs(li(o.style),i):o.style)}return r}function ua(t={}){let{themeId:e,defaultTheme:r=iA,rootShouldForwardProp:i=_0,slotShouldForwardProp:s=_0}=t;function n(a){sA(a,e,r)}return(a,l={})=>{nw(a,y=>y.filter(w=>w!==gr));let{name:c,slot:u,skipVariantsResolver:p,skipSx:g,overridesResolver:m=nA(cA(u)),...h}=l,d=c&&c.startsWith("Mui")||u?"components":"custom",v=p!==void 0?p:u&&u!=="Root"&&u!=="root"||!1,f=g||!1,_=_0;u==="Root"||u==="root"?_=i:u?_=s:lA(a)&&(_=void 0);let S=tc(a,{shouldForwardProp:_,label:oA(c,u),...h}),b=y=>{if(y.__emotion_real===y)return y;if(typeof y=="function")return function(T){return yf(T,y,T.theme.modularCssLayers?d:void 0)};if(Tr(y)){let w=ic(y);return function(k){return w.variants?yf(k,w,k.theme.modularCssLayers?d:void 0):k.theme.modularCssLayers?Hs(w.style,d):w.style}}return y},C=(...y)=>{let w=[],T=y.map(b),k=[];if(w.push(n),c&&m&&k.push(function(L){let I=L.theme.components?.[c]?.styleOverrides;if(!I)return null;let P={};for(let A in I)P[A]=yf(L,I[A],L.theme.modularCssLayers?"theme":void 0);return m(L,P)}),c&&!v&&k.push(function(L){let I=L.theme?.components?.[c]?.variants;return I?hw(L,I,[],L.theme.modularCssLayers?"theme":void 0):null}),f||k.push(gr),Array.isArray(T[0])){let R=T.shift(),L=new Array(w.length).fill(""),O=new Array(k.length).fill(""),I;I=[...L,...R,...O],I.raw=[...L,...R.raw,...O],w.unshift(I)}let x=[...w,...T,...k],E=S(...x);return a.muiName&&(E.muiName=a.muiName),E};return S.withConfig&&(C.withConfig=S.withConfig),C}}function oA(t,e){return void 0}function aA(t){for(let e in t)return!1;return!0}function lA(t){return typeof t=="string"&&t.charCodeAt(0)>96}function cA(t){return t&&t.charAt(0).toLowerCase()+t.slice(1)}var hA=ua(),y0=hA;function S0(t){let{theme:e,name:r,props:i}=t;return!e||!e.components||!e.components[r]||!e.components[r].defaultProps?i:wi(e.components[r].defaultProps,i)}function fa({props:t,name:e,defaultTheme:r,themeId:i}){let s=Pi(r);return i&&(s=s[i]||s),S0({theme:s,name:e,props:t})}function b0(t,e=0,r=1){return qg(t,e,r)}function uA(t){t=t.slice(1);let e=new RegExp(`.{1,${t.length>=6?2:1}}`,"g"),r=t.match(e);return r&&r[0].length===1&&(r=r.map(i=>i+i)),r?`rgb${r.length===4?"a":""}(${r.map((i,s)=>s<3?parseInt(i,16):Math.round(parseInt(i,16)/255*1e3)/1e3).join(", ")})`:""}function Un(t){if(t.type)return t;if(t.charAt(0)==="#")return Un(uA(t));let e=t.indexOf("("),r=t.substring(0,e);if(!["rgb","rgba","hsl","hsla","color"].includes(r))throw new Error(pr(9,t));let i=t.substring(e+1,t.length-1),s;if(r==="color"){if(i=i.split(" "),s=i.shift(),i.length===4&&i[3].charAt(0)==="/"&&(i[3]=i[3].slice(1)),!["srgb","display-p3","a98-rgb","prophoto-rgb","rec-2020"].includes(s))throw new Error(pr(10,s))}else i=i.split(",");return i=i.map(n=>parseFloat(n)),{type:r,values:i,colorSpace:s}}var fA=t=>{let e=Un(t);return e.values.slice(0,3).map((r,i)=>e.type.includes("hsl")&&i!==0?`${r}%`:r).join(" ")},da=(t,e)=>{try{return fA(t)}catch{return t}};function Sf(t){let{type:e,colorSpace:r}=t,{values:i}=t;return e.includes("rgb")?i=i.map((s,n)=>n<3?parseInt(s,10):s):e.includes("hsl")&&(i[1]=`${i[1]}%`,i[2]=`${i[2]}%`),e.includes("color")?i=`${r} ${i.join(" ")}`:i=`${i.join(", ")}`,`${e}(${i})`}function w0(t){t=Un(t);let{values:e}=t,r=e[0],i=e[1]/100,s=e[2]/100,n=i*Math.min(s,1-s),o=(c,u=(c+r/30)%12)=>s-n*Math.max(Math.min(u-3,9-u,1),-1),a="rgb",l=[Math.round(o(0)*255),Math.round(o(8)*255),Math.round(o(4)*255)];return t.type==="hsla"&&(a+="a",l.push(e[3])),Sf({type:a,values:l})}function x0(t){t=Un(t);let e=t.type==="hsl"||t.type==="hsla"?Un(w0(t)).values:t.values;return e=e.map(r=>(t.type!=="color"&&(r/=255),r<=.03928?r/12.92:((r+.055)/1.055)**2.4)),Number((.2126*e[0]+.7152*e[1]+.0722*e[2]).toFixed(3))}function uw(t,e){let r=x0(t),i=x0(e);return(Math.max(r,i)+.05)/(Math.min(r,i)+.05)}function Ri(t,e){return t=Un(t),e=b0(e),(t.type==="rgb"||t.type==="hsl")&&(t.type+="a"),t.type==="color"?t.values[3]=`/${e}`:t.values[3]=e,Sf(t)}function nc(t,e,r){try{return Ri(t,e)}catch{return t}}function xf(t,e){if(t=Un(t),e=b0(e),t.type.includes("hsl"))t.values[2]*=1-e;else if(t.type.includes("rgb")||t.type.includes("color"))for(let r=0;r<3;r+=1)t.values[r]*=1-e;return Sf(t)}function je(t,e,r){try{return xf(t,e)}catch{return t}}function bf(t,e){if(t=Un(t),e=b0(e),t.type.includes("hsl"))t.values[2]+=(100-t.values[2])*e;else if(t.type.includes("rgb"))for(let r=0;r<3;r+=1)t.values[r]+=(255-t.values[r])*e;else if(t.type.includes("color"))for(let r=0;r<3;r+=1)t.values[r]+=(1-t.values[r])*e;return Sf(t)}function We(t,e,r){try{return bf(t,e)}catch{return t}}function dA(t,e=.15){return x0(t)>.5?xf(t,e):bf(t,e)}function sc(t,e,r){try{return dA(t,e)}catch{return t}}var ww=K(Q());var dw=K(Q());var fw=K(Q()),pA=fw.createContext(null),wf=pA;var C0=K(Q());function ci(){return C0.useContext(wf)}var mA=typeof Symbol=="function"&&Symbol.for,oc=mA?Symbol.for("mui.nested"):"__THEME_NESTED__";var pw=K(_e());function gA(t,e){return typeof e=="function"?e(t):{...t,...e}}function vA(t){let{children:e,theme:r}=t,i=ci(),s=dw.useMemo(()=>{let n=i===null?{...r}:gA(i,r);return n!=null&&(n[oc]=i!==null),n},[r,i]);return(0,pw.jsx)(wf.Provider,{value:s,children:e})}var Cf=vA;var kf=K(Q());var mw=K(_e()),gw=kf.createContext();function _A({value:t,...e}){return(0,mw.jsx)(gw.Provider,{value:t??!0,...e})}var Tf=()=>kf.useContext(gw)??!1,vw=_A;var Ef=K(Q());var _w=K(_e()),yw=Ef.createContext(void 0);function yA({value:t,children:e}){return(0,_w.jsx)(yw.Provider,{value:t,children:e})}function SA(t){let{theme:e,name:r,props:i}=t;if(!e||!e.components||!e.components[r])return i;let s=e.components[r];return s.defaultProps?wi(s.defaultProps,i):!s.styleOverrides&&!s.variants?wi(s,i):i}function k0({props:t,name:e}){let r=Ef.useContext(yw);return SA({props:t,name:e,theme:{components:r}})}var Pf=yA;var b9=K(Q());var Sw=K(_e());function T0(t){let e=Fs(),r=Yo()||"",{modularCssLayers:i}=t,s="mui.global, mui.components, mui.theme, mui.custom, mui.sx";return!i||e!==null?s="":typeof i=="string"?s=i.replace(/mui(?!\.)/g,s):s=`@layer ${s};`,nn(()=>{let n=document.querySelector("head");if(!n)return;let o=n.firstChild;if(s){if(o&&o.hasAttribute?.("data-mui-layer-order")&&o.getAttribute("data-mui-layer-order")===r)return;let a=document.createElement("style");a.setAttribute("data-mui-layer-order",r),a.textContent=s,n.prepend(a)}else n.querySelector(`style[data-mui-layer-order="${r}"]`)?.remove()},[s,r]),s?(0,Sw.jsx)(v0,{styles:s}):null}var pa=K(_e()),xw={};function bw(t,e,r,i=!1){return ww.useMemo(()=>{let s=t&&e[t]||e;if(typeof r=="function"){let n=r(s),o=t?{...e,[t]:n}:n;return i?()=>o:o}return t?{...e,[t]:r}:{...e,...r}},[t,e,r,i])}function xA(t){let{children:e,theme:r,themeId:i}=t,s=Fs(xw),n=ci()||xw,o=bw(i,s,r),a=bw(i,n,r,!0),l=(i?o[i]:o).direction==="rtl",c=T0(o);return(0,pa.jsx)(Cf,{theme:a,children:(0,pa.jsx)(Ti.Provider,{value:o,children:(0,pa.jsx)(vw,{value:l,children:(0,pa.jsxs)(Pf,{value:i?o[i].components:o.components,children:[c,e]})})})})}var ma=xA;var Cw={theme:void 0};function Rf(t){let e,r;return function(s){let n=e;return(n===void 0||s.theme!==r)&&(Cw.theme=s.theme,n=ic(t(Cw)),e=n,r=s.theme),n}}var $t=K(Q());var H9=K(Q()),kw=K(_e()),ac="mode",lc="color-scheme",bA="data-color-scheme";function E0(t){let{defaultMode:e="system",defaultLightColorScheme:r="light",defaultDarkColorScheme:i="dark",modeStorageKey:s=ac,colorSchemeStorageKey:n=lc,attribute:o=bA,colorSchemeNode:a="document.documentElement",nonce:l}=t||{},c="",u=o;if(o==="class"&&(u=".%s"),o==="data"&&(u="[data-%s]"),u.startsWith(".")){let g=u.substring(1);c+=`${a}.classList.remove('${g}'.replace('%s', light), '${g}'.replace('%s', dark));
      ${a}.classList.add('${g}'.replace('%s', colorScheme));`}let p=u.match(/\[([^\]]+)\]/);if(p){let[g,m]=p[1].split("=");m||(c+=`${a}.removeAttribute('${g}'.replace('%s', light));
      ${a}.removeAttribute('${g}'.replace('%s', dark));`),c+=`
      ${a}.setAttribute('${g}'.replace('%s', colorScheme), ${m?`${m}.replace('%s', colorScheme)`:'""'});`}else c+=`${a}.setAttribute('${u}', colorScheme);`;return(0,kw.jsx)("script",{suppressHydrationWarning:!0,nonce:typeof window>"u"?l:"",dangerouslySetInnerHTML:{__html:`(function() {
try {
  let colorScheme = '';
  const mode = localStorage.getItem('${s}') || '${e}';
  const dark = localStorage.getItem('${n}-dark') || '${i}';
  const light = localStorage.getItem('${n}-light') || '${r}';
  if (mode === 'system') {
    // handle system mode
    const mql = window.matchMedia('(prefers-color-scheme: dark)');
    if (mql.matches) {
      colorScheme = dark
    } else {
      colorScheme = light
    }
  }
  if (mode === 'light') {
    colorScheme = light;
  }
  if (mode === 'dark') {
    colorScheme = dark;
  }
  if (colorScheme) {
    ${c}
  }
} catch(e){}})();`}},"mui-color-scheme-init")}var zt=K(Q());function wA(){}var CA=({key:t,storageWindow:e})=>(!e&&typeof window<"u"&&(e=window),{get(r){if(typeof window>"u")return;if(!e)return r;let i;try{i=e.localStorage.getItem(t)}catch{}return i||r},set:r=>{if(e)try{e.localStorage.setItem(t,r)}catch{}},subscribe:r=>{if(!e)return wA;let i=s=>{let n=s.newValue;s.key===t&&r(n)};return e.addEventListener("storage",i),()=>{e.removeEventListener("storage",i)}}}),Tw=CA;function P0(){}function Ew(t){if(typeof window<"u"&&typeof window.matchMedia=="function"&&t==="system")return window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}function Pw(t,e){if(t.mode==="light"||t.mode==="system"&&t.systemMode==="light")return e("light");if(t.mode==="dark"||t.mode==="system"&&t.systemMode==="dark")return e("dark")}function kA(t){return Pw(t,e=>{if(e==="light")return t.lightColorScheme;if(e==="dark")return t.darkColorScheme})}function R0(t){let{defaultMode:e="light",defaultLightColorScheme:r,defaultDarkColorScheme:i,supportedColorSchemes:s=[],modeStorageKey:n=ac,colorSchemeStorageKey:o=lc,storageWindow:a=typeof window>"u"?void 0:window,storageManager:l=Tw,noSsr:c=!1}=t,u=s.join(","),p=s.length>1,g=zt.useMemo(()=>l?.({key:n,storageWindow:a}),[l,n,a]),m=zt.useMemo(()=>l?.({key:`${o}-light`,storageWindow:a}),[l,o,a]),h=zt.useMemo(()=>l?.({key:`${o}-dark`,storageWindow:a}),[l,o,a]),[d,v]=zt.useState(()=>{let T=g?.get(e)||e,k=m?.get(r)||r,x=h?.get(i)||i;return{mode:T,systemMode:Ew(T),lightColorScheme:k,darkColorScheme:x}}),[f,_]=zt.useState(c||!p);zt.useEffect(()=>{_(!0)},[]);let S=kA(d),b=zt.useCallback(T=>{v(k=>{if(T===k.mode)return k;let x=T??e;return g?.set(x),{...k,mode:x,systemMode:Ew(x)}})},[g,e]),C=zt.useCallback(T=>{T?typeof T=="string"?T&&!u.includes(T)?console.error(`\`${T}\` does not exist in \`theme.colorSchemes\`.`):v(k=>{let x={...k};return Pw(k,E=>{E==="light"&&(m?.set(T),x.lightColorScheme=T),E==="dark"&&(h?.set(T),x.darkColorScheme=T)}),x}):v(k=>{let x={...k},E=T.light===null?r:T.light,R=T.dark===null?i:T.dark;return E&&(u.includes(E)?(x.lightColorScheme=E,m?.set(E)):console.error(`\`${E}\` does not exist in \`theme.colorSchemes\`.`)),R&&(u.includes(R)?(x.darkColorScheme=R,h?.set(R)):console.error(`\`${R}\` does not exist in \`theme.colorSchemes\`.`)),x}):v(k=>(m?.set(r),h?.set(i),{...k,lightColorScheme:r,darkColorScheme:i}))},[u,m,h,r,i]),y=zt.useCallback(T=>{d.mode==="system"&&v(k=>{let x=T?.matches?"dark":"light";return k.systemMode===x?k:{...k,systemMode:x}})},[d.mode]),w=zt.useRef(y);return w.current=y,zt.useEffect(()=>{if(typeof window.matchMedia!="function"||!p)return;let T=(...x)=>w.current(...x),k=window.matchMedia("(prefers-color-scheme: dark)");return k.addListener(T),T(k),()=>{k.removeListener(T)}},[p]),zt.useEffect(()=>{if(p){let T=g?.subscribe(E=>{(!E||["light","dark","system"].includes(E))&&b(E||e)})||P0,k=m?.subscribe(E=>{(!E||u.match(E))&&C({light:E})})||P0,x=h?.subscribe(E=>{(!E||u.match(E))&&C({dark:E})})||P0;return()=>{T(),k(),x()}}},[C,b,u,e,a,p,g,m,h]),{...d,mode:f?d.mode:void 0,systemMode:f?d.systemMode:void 0,colorScheme:f?S:void 0,setMode:b,setColorScheme:C}}var ga=K(_e()),TA="*{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}";function Mf(t){let{themeId:e,theme:r={},modeStorageKey:i=ac,colorSchemeStorageKey:s=lc,disableTransitionOnChange:n=!1,defaultColorScheme:o,resolveTheme:a}=t,l={allColorSchemes:[],colorScheme:void 0,darkColorScheme:void 0,lightColorScheme:void 0,mode:void 0,setColorScheme:()=>{},setMode:()=>{},systemMode:void 0},c=$t.createContext(void 0),u=()=>$t.useContext(c)||l,p={},g={};function m(f){let{children:_,theme:S,modeStorageKey:b=i,colorSchemeStorageKey:C=s,disableTransitionOnChange:y=n,storageManager:w,storageWindow:T=typeof window>"u"?void 0:window,documentNode:k=typeof document>"u"?void 0:document,colorSchemeNode:x=typeof document>"u"?void 0:document.documentElement,disableNestedContext:E=!1,disableStyleSheetGeneration:R=!1,defaultMode:L="system",noSsr:O}=f,I=$t.useRef(!1),P=ci(),A=$t.useContext(c),D=!!A&&!E,B=$t.useMemo(()=>S||(typeof r=="function"?r():r),[S]),H=B[e],j=H||B,{colorSchemes:U=p,components:G=g,cssVarPrefix:re}=j,M=Object.keys(U).filter(oe=>!!U[oe]).join(","),N=$t.useMemo(()=>M.split(","),[M]),$=typeof o=="string"?o:o.light,z=typeof o=="string"?o:o.dark,se=U[$]&&U[z]?L:U[j.defaultColorScheme]?.palette?.mode||j.palette?.mode,{mode:X,setMode:me,systemMode:Le,lightColorScheme:Ie,darkColorScheme:de,colorScheme:le,setColorScheme:Ct}=R0({supportedColorSchemes:N,defaultLightColorScheme:$,defaultDarkColorScheme:z,modeStorageKey:b,colorSchemeStorageKey:C,defaultMode:se,storageManager:w,storageWindow:T,noSsr:O}),$e=X,be=le;D&&($e=A.mode,be=A.colorScheme);let kt=$t.useMemo(()=>{let oe=be||j.defaultColorScheme,Pe=j.generateThemeVars?.()||j.vars,ve={...j,components:G,colorSchemes:U,cssVarPrefix:re,vars:Pe};if(typeof ve.generateSpacing=="function"&&(ve.spacing=ve.generateSpacing()),oe){let ut=U[oe];ut&&typeof ut=="object"&&Object.keys(ut).forEach(Ne=>{ut[Ne]&&typeof ut[Ne]=="object"?ve[Ne]={...ve[Ne],...ut[Ne]}:ve[Ne]=ut[Ne]})}return a?a(ve):ve},[j,be,G,U,re]),he=j.colorSchemeSelector;nn(()=>{if(be&&x&&he&&he!=="media"){let oe=he,Pe=he;if(oe==="class"&&(Pe=".%s"),oe==="data"&&(Pe="[data-%s]"),oe?.startsWith("data-")&&!oe.includes("%s")&&(Pe=`[${oe}="%s"]`),Pe.startsWith("."))x.classList.remove(...N.map(ve=>Pe.substring(1).replace("%s",ve))),x.classList.add(Pe.substring(1).replace("%s",be));else{let ve=Pe.replace("%s",be).match(/\[([^\]]+)\]/);if(ve){let[ut,Ne]=ve[1].split("=");Ne||N.forEach(dt=>{x.removeAttribute(ut.replace(be,dt))}),x.setAttribute(ut,Ne?Ne.replace(/"|'/g,""):"")}else x.setAttribute(Pe,be)}}},[be,he,x,N]),$t.useEffect(()=>{let oe;if(y&&I.current&&k){let Pe=k.createElement("style");Pe.appendChild(k.createTextNode(TA)),k.head.appendChild(Pe),window.getComputedStyle(k.body),oe=setTimeout(()=>{k.head.removeChild(Pe)},1)}return()=>{clearTimeout(oe)}},[be,y,k]),$t.useEffect(()=>(I.current=!0,()=>{I.current=!1}),[]);let ne=$t.useMemo(()=>({allColorSchemes:N,colorScheme:be,darkColorScheme:de,lightColorScheme:Ie,mode:$e,setColorScheme:Ct,setMode:me,systemMode:Le}),[N,be,de,Ie,$e,Ct,me,Le,kt.colorSchemeSelector]),Y=!0;(R||j.cssVariables===!1||D&&P?.cssVarPrefix===re)&&(Y=!1);let ie=(0,ga.jsxs)($t.Fragment,{children:[(0,ga.jsx)(ma,{themeId:H?e:void 0,theme:kt,children:_}),Y&&(0,ga.jsx)(Ns,{styles:kt.generateStyleSheets?.()||[]})]});return D?ie:(0,ga.jsx)(c.Provider,{value:ne,children:ie})}let h=typeof o=="string"?o:o.light,d=typeof o=="string"?o:o.dark;return{CssVarsProvider:m,useColorScheme:u,getInitColorSchemeScript:f=>E0({colorSchemeStorageKey:s,defaultLightColorScheme:h,defaultDarkColorScheme:d,modeStorageKey:i,...f})}}function Af(t=""){function e(...i){if(!i.length)return"";let s=i[0];return typeof s=="string"&&!s.match(/(#|\(|\)|(-?(\d*\.)?\d+)(px|em|%|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc))|^(-?(\d*\.)?\d+)$|(\d+ \d+ \d+)/)?`, var(--${t?`${t}-`:""}${s}${e(...i.slice(1))})`:`, ${s}`}return(i,...s)=>`var(--${t?`${t}-`:""}${i}${e(...s)})`}var Rw=(t,e,r,i=[])=>{let s=t;e.forEach((n,o)=>{o===e.length-1?Array.isArray(s)?s[Number(n)]=r:s&&typeof s=="object"&&(s[n]=r):s&&typeof s=="object"&&(s[n]||(s[n]=i.includes(n)?[]:{}),s=s[n])})},EA=(t,e,r)=>{function i(s,n=[],o=[]){Object.entries(s).forEach(([a,l])=>{(!r||r&&!r([...n,a]))&&l!=null&&(typeof l=="object"&&Object.keys(l).length>0?i(l,[...n,a],Array.isArray(l)?[...o,a]:o):e([...n,a],l,o))})}i(t)},PA=(t,e)=>typeof e=="number"?["lineHeight","fontWeight","opacity","zIndex"].some(i=>t.includes(i))||t[t.length-1].toLowerCase().includes("opacity")?e:`${e}px`:e;function cc(t,e){let{prefix:r,shouldSkipGeneratingVar:i}=e||{},s={},n={},o={};return EA(t,(a,l,c)=>{if((typeof l=="string"||typeof l=="number")&&(!i||!i(a,l))){let u=`--${r?`${r}-`:""}${a.join("-")}`,p=PA(a,l);Object.assign(s,{[u]:p}),Rw(n,a,`var(${u})`,c),Rw(o,a,`var(${u}, ${p})`,c)}},a=>a[0]==="vars"),{css:s,vars:n,varsWithDefaults:o}}function RA(t,e={}){let{getSelector:r=v,disableCssColorScheme:i,colorSchemeSelector:s}=e,{colorSchemes:n={},components:o,defaultColorScheme:a="light",...l}=t,{vars:c,css:u,varsWithDefaults:p}=cc(l,e),g=p,m={},{[a]:h,...d}=n;if(Object.entries(d||{}).forEach(([S,b])=>{let{vars:C,css:y,varsWithDefaults:w}=cc(b,e);g=De(g,w),m[S]={css:y,vars:C}}),h){let{css:S,vars:b,varsWithDefaults:C}=cc(h,e);g=De(g,C),m[a]={css:S,vars:b}}function v(S,b){let C=s;if(s==="class"&&(C=".%s"),s==="data"&&(C="[data-%s]"),s?.startsWith("data-")&&!s.includes("%s")&&(C=`[${s}="%s"]`),S){if(C==="media")return t.defaultColorScheme===S?":root":{[`@media (prefers-color-scheme: ${n[S]?.palette?.mode||S})`]:{":root":b}};if(C)return t.defaultColorScheme===S?`:root, ${C.replace("%s",String(S))}`:C.replace("%s",String(S))}return":root"}return{vars:g,generateThemeVars:()=>{let S={...c};return Object.entries(m).forEach(([,{vars:b}])=>{S=De(S,b)}),S},generateStyleSheets:()=>{let S=[],b=t.defaultColorScheme||"light";function C(T,k){Object.keys(k).length&&S.push(typeof T=="string"?{[T]:{...k}}:T)}C(r(void 0,{...u}),u);let{[b]:y,...w}=m;if(y){let{css:T}=y,k=n[b]?.palette?.mode,x=!i&&k?{colorScheme:k,...T}:{...T};C(r(b,{...x}),x)}return Object.entries(w).forEach(([T,{css:k}])=>{let x=n[T]?.palette?.mode,E=!i&&x?{colorScheme:x,...k}:{...k};C(r(T,{...E}),E)}),S}}}var M0=RA;function A0(t){return function(r){return t==="media"?`@media (prefers-color-scheme: ${r})`:t?t.startsWith("data-")&&!t.includes("%s")?`[${t}="${r}"] &`:t==="class"?`.${r} &`:t==="data"?`[data-${r}] &`:`${t.replace("%s",r)} &`:"&"}}var va=K(Q());var Mw=K(_e()),MA=ln(),AA=y0("div",{name:"MuiStack",slot:"Root",overridesResolver:(t,e)=>e.root});function LA(t){return fa({props:t,name:"MuiStack",defaultTheme:MA})}function DA(t,e){let r=va.Children.toArray(t).filter(Boolean);return r.reduce((i,s,n)=>(i.push(s),n<r.length-1&&i.push(va.cloneElement(e,{key:`separator-${n}`})),i),[])}var OA=t=>({row:"Left","row-reverse":"Right",column:"Top","column-reverse":"Bottom"})[t],BA=({ownerState:t,theme:e})=>{let r={display:"flex",flexDirection:"column",...At({theme:e},Yu({values:t.direction,breakpoints:e.breakpoints.values}),i=>({flexDirection:i}))};if(t.spacing){let i=Ls(e),s=Object.keys(e.breakpoints.values).reduce((l,c)=>((typeof t.spacing=="object"&&t.spacing[c]!=null||typeof t.direction=="object"&&t.direction[c]!=null)&&(l[c]=!0),l),{}),n=Yu({values:t.direction,base:s}),o=Yu({values:t.spacing,base:s});typeof n=="object"&&Object.keys(n).forEach((l,c,u)=>{if(!n[l]){let g=c>0?n[u[c-1]]:"column";n[l]=g}}),r=De(r,At({theme:e},o,(l,c)=>t.useFlexGap?{gap:Ci(i,l)}:{"& > :not(style):not(style)":{margin:0},"& > :not(style) ~ :not(style)":{[`margin${OA(c?n[c]:t.direction)}`]:Ci(i,l)}}))}return r=Zx(e.breakpoints,r),r};function Lf(t={}){let{createStyledComponent:e=AA,useThemeProps:r=LA,componentName:i="MuiStack"}=t,s=()=>Ye({root:["root"]},l=>Xe(i,l),{}),n=e(BA);return va.forwardRef(function(l,c){let u=r(l),p=$n(u),{component:g="div",direction:m="column",spacing:h=0,divider:d,children:v,className:f,useFlexGap:_=!1,...S}=p,b={direction:m,spacing:h,useFlexGap:_},C=s();return(0,Mw.jsx)(n,{as:g,ownerState:b,ref:c,className:ue(C.root,f),...S,children:d?DA(v,d):v})})}var IA={black:"#000",white:"#fff"},_a=IA;var NA={50:"#fafafa",100:"#f5f5f5",200:"#eeeeee",300:"#e0e0e0",400:"#bdbdbd",500:"#9e9e9e",600:"#757575",700:"#616161",800:"#424242",900:"#212121",A100:"#f5f5f5",A200:"#eeeeee",A400:"#bdbdbd",A700:"#616161"},Aw=NA;var FA={50:"#f3e5f5",100:"#e1bee7",200:"#ce93d8",300:"#ba68c8",400:"#ab47bc",500:"#9c27b0",600:"#8e24aa",700:"#7b1fa2",800:"#6a1b9a",900:"#4a148c",A100:"#ea80fc",A200:"#e040fb",A400:"#d500f9",A700:"#aa00ff"},zs=FA;var HA={50:"#ffebee",100:"#ffcdd2",200:"#ef9a9a",300:"#e57373",400:"#ef5350",500:"#f44336",600:"#e53935",700:"#d32f2f",800:"#c62828",900:"#b71c1c",A100:"#ff8a80",A200:"#ff5252",A400:"#ff1744",A700:"#d50000"},$s=HA;var zA={50:"#fff3e0",100:"#ffe0b2",200:"#ffcc80",300:"#ffb74d",400:"#ffa726",500:"#ff9800",600:"#fb8c00",700:"#f57c00",800:"#ef6c00",900:"#e65100",A100:"#ffd180",A200:"#ffab40",A400:"#ff9100",A700:"#ff6d00"},ya=zA;var $A={50:"#e3f2fd",100:"#bbdefb",200:"#90caf9",300:"#64b5f6",400:"#42a5f5",500:"#2196f3",600:"#1e88e5",700:"#1976d2",800:"#1565c0",900:"#0d47a1",A100:"#82b1ff",A200:"#448aff",A400:"#2979ff",A700:"#2962ff"},js=$A;var jA={50:"#e1f5fe",100:"#b3e5fc",200:"#81d4fa",300:"#4fc3f7",400:"#29b6f6",500:"#03a9f4",600:"#039be5",700:"#0288d1",800:"#0277bd",900:"#01579b",A100:"#80d8ff",A200:"#40c4ff",A400:"#00b0ff",A700:"#0091ea"},Ws=jA;var WA={50:"#e8f5e9",100:"#c8e6c9",200:"#a5d6a7",300:"#81c784",400:"#66bb6a",500:"#4caf50",600:"#43a047",700:"#388e3c",800:"#2e7d32",900:"#1b5e20",A100:"#b9f6ca",A200:"#69f0ae",A400:"#00e676",A700:"#00c853"},Vs=WA;function Ow(){return{text:{primary:"rgba(0, 0, 0, 0.87)",secondary:"rgba(0, 0, 0, 0.6)",disabled:"rgba(0, 0, 0, 0.38)"},divider:"rgba(0, 0, 0, 0.12)",background:{paper:_a.white,default:_a.white},action:{active:"rgba(0, 0, 0, 0.54)",hover:"rgba(0, 0, 0, 0.04)",hoverOpacity:.04,selected:"rgba(0, 0, 0, 0.08)",selectedOpacity:.08,disabled:"rgba(0, 0, 0, 0.26)",disabledBackground:"rgba(0, 0, 0, 0.12)",disabledOpacity:.38,focus:"rgba(0, 0, 0, 0.12)",focusOpacity:.12,activatedOpacity:.12}}}var VA=Ow();function Bw(){return{text:{primary:_a.white,secondary:"rgba(255, 255, 255, 0.7)",disabled:"rgba(255, 255, 255, 0.5)",icon:"rgba(255, 255, 255, 0.5)"},divider:"rgba(255, 255, 255, 0.12)",background:{paper:"#121212",default:"#121212"},action:{active:_a.white,hover:"rgba(255, 255, 255, 0.08)",hoverOpacity:.08,selected:"rgba(255, 255, 255, 0.16)",selectedOpacity:.16,disabled:"rgba(255, 255, 255, 0.3)",disabledBackground:"rgba(255, 255, 255, 0.12)",disabledOpacity:.38,focus:"rgba(255, 255, 255, 0.12)",focusOpacity:.12,activatedOpacity:.24}}}var Lw=Bw();function Dw(t,e,r,i){let s=i.light||i,n=i.dark||i*1.5;t[e]||(t.hasOwnProperty(r)?t[e]=t[r]:e==="light"?t.light=bf(t.main,s):e==="dark"&&(t.dark=xf(t.main,n)))}function UA(t="light"){return t==="dark"?{main:js[200],light:js[50],dark:js[400]}:{main:js[700],light:js[400],dark:js[800]}}function KA(t="light"){return t==="dark"?{main:zs[200],light:zs[50],dark:zs[400]}:{main:zs[500],light:zs[300],dark:zs[700]}}function GA(t="light"){return t==="dark"?{main:$s[500],light:$s[300],dark:$s[700]}:{main:$s[700],light:$s[400],dark:$s[800]}}function qA(t="light"){return t==="dark"?{main:Ws[400],light:Ws[300],dark:Ws[700]}:{main:Ws[700],light:Ws[500],dark:Ws[900]}}function YA(t="light"){return t==="dark"?{main:Vs[400],light:Vs[300],dark:Vs[700]}:{main:Vs[800],light:Vs[500],dark:Vs[900]}}function XA(t="light"){return t==="dark"?{main:ya[400],light:ya[300],dark:ya[700]}:{main:"#ed6c02",light:ya[500],dark:ya[900]}}function Us(t){let{mode:e="light",contrastThreshold:r=3,tonalOffset:i=.2,...s}=t,n=t.primary||UA(e),o=t.secondary||KA(e),a=t.error||GA(e),l=t.info||qA(e),c=t.success||YA(e),u=t.warning||XA(e);function p(d){return uw(d,Lw.text.primary)>=r?Lw.text.primary:VA.text.primary}let g=({color:d,name:v,mainShade:f=500,lightShade:_=300,darkShade:S=700})=>{if(d={...d},!d.main&&d[f]&&(d.main=d[f]),!d.hasOwnProperty("main"))throw new Error(pr(11,v?` (${v})`:"",f));if(typeof d.main!="string")throw new Error(pr(12,v?` (${v})`:"",JSON.stringify(d.main)));return Dw(d,"light",_,i),Dw(d,"dark",S,i),d.contrastText||(d.contrastText=p(d.main)),d},m;return e==="light"?m=Ow():e==="dark"&&(m=Bw()),De({common:{..._a},mode:e,primary:g({color:n,name:"primary"}),secondary:g({color:o,name:"secondary",mainShade:"A400",lightShade:"A200",darkShade:"A700"}),error:g({color:a,name:"error"}),warning:g({color:u,name:"warning"}),info:g({color:l,name:"info"}),success:g({color:c,name:"success"}),grey:Aw,contrastThreshold:r,getContrastText:p,augmentColor:g,tonalOffset:i,...m},s)}function Df(t){let e={};return Object.entries(t).forEach(i=>{let[s,n]=i;typeof n=="object"&&(e[s]=`${n.fontStyle?`${n.fontStyle} `:""}${n.fontVariant?`${n.fontVariant} `:""}${n.fontWeight?`${n.fontWeight} `:""}${n.fontStretch?`${n.fontStretch} `:""}${n.fontSize||""}${n.lineHeight?`/${n.lineHeight} `:""}${n.fontFamily||""}`)}),e}function L0(t,e){return{toolbar:{minHeight:56,[t.up("xs")]:{"@media (orientation: landscape)":{minHeight:48}},[t.up("sm")]:{minHeight:64}},...e}}function JA(t){return Math.round(t*1e5)/1e5}var Iw={textTransform:"uppercase"},Nw='"Roboto", "Helvetica", "Arial", sans-serif';function hc(t,e){let{fontFamily:r=Nw,fontSize:i=14,fontWeightLight:s=300,fontWeightRegular:n=400,fontWeightMedium:o=500,fontWeightBold:a=700,htmlFontSize:l=16,allVariants:c,pxToRem:u,...p}=typeof e=="function"?e(t):e,g=i/14,m=u||(v=>`${v/l*g}rem`),h=(v,f,_,S,b)=>({fontFamily:r,fontWeight:v,fontSize:m(f),lineHeight:_,...r===Nw?{letterSpacing:`${JA(S/f)}em`}:{},...b,...c}),d={h1:h(s,96,1.167,-1.5),h2:h(s,60,1.2,-.5),h3:h(n,48,1.167,0),h4:h(n,34,1.235,.25),h5:h(n,24,1.334,0),h6:h(o,20,1.6,.15),subtitle1:h(n,16,1.75,.15),subtitle2:h(o,14,1.57,.1),body1:h(n,16,1.5,.15),body2:h(n,14,1.43,.15),button:h(o,14,1.75,.4,Iw),caption:h(n,12,1.66,.4),overline:h(n,12,2.66,1,Iw),inherit:{fontFamily:"inherit",fontWeight:"inherit",fontSize:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}};return De({htmlFontSize:l,pxToRem:m,fontFamily:r,fontSize:i,fontWeightLight:s,fontWeightRegular:n,fontWeightMedium:o,fontWeightBold:a,...d},p,{clone:!1})}function nt(...t){return[`${t[0]}px ${t[1]}px ${t[2]}px ${t[3]}px rgba(0,0,0,${.2})`,`${t[4]}px ${t[5]}px ${t[6]}px ${t[7]}px rgba(0,0,0,${.14})`,`${t[8]}px ${t[9]}px ${t[10]}px ${t[11]}px rgba(0,0,0,${.12})`].join(",")}var QA=["none",nt(0,2,1,-1,0,1,1,0,0,1,3,0),nt(0,3,1,-2,0,2,2,0,0,1,5,0),nt(0,3,3,-2,0,3,4,0,0,1,8,0),nt(0,2,4,-1,0,4,5,0,0,1,10,0),nt(0,3,5,-1,0,5,8,0,0,1,14,0),nt(0,3,5,-1,0,6,10,0,0,1,18,0),nt(0,4,5,-2,0,7,10,1,0,2,16,1),nt(0,5,5,-3,0,8,10,1,0,3,14,2),nt(0,5,6,-3,0,9,12,1,0,3,16,2),nt(0,6,6,-3,0,10,14,1,0,4,18,3),nt(0,6,7,-4,0,11,15,1,0,4,20,3),nt(0,7,8,-4,0,12,17,2,0,5,22,4),nt(0,7,8,-4,0,13,19,2,0,5,24,4),nt(0,7,9,-4,0,14,21,2,0,5,26,4),nt(0,8,9,-5,0,15,22,2,0,6,28,5),nt(0,8,10,-5,0,16,24,2,0,6,30,5),nt(0,8,11,-5,0,17,26,2,0,6,32,5),nt(0,9,11,-5,0,18,28,2,0,7,34,6),nt(0,9,12,-6,0,19,29,2,0,7,36,6),nt(0,10,13,-6,0,20,31,3,0,8,38,7),nt(0,10,13,-6,0,21,33,3,0,8,40,7),nt(0,10,14,-6,0,22,35,3,0,8,42,7),nt(0,11,14,-7,0,23,36,3,0,9,44,8),nt(0,11,15,-7,0,24,38,3,0,9,46,8)],Fw=QA;var ZA={easeInOut:"cubic-bezier(0.4, 0, 0.2, 1)",easeOut:"cubic-bezier(0.0, 0, 0.2, 1)",easeIn:"cubic-bezier(0.4, 0, 1, 1)",sharp:"cubic-bezier(0.4, 0, 0.6, 1)"},eL={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function Hw(t){return`${Math.round(t)}ms`}function tL(t){if(!t)return 0;let e=t/36;return Math.min(Math.round((4+15*e**.25+e/5)*10),3e3)}function D0(t){let e={...ZA,...t.easing},r={...eL,...t.duration};return{getAutoHeightDuration:tL,create:(s=["all"],n={})=>{let{duration:o=r.standard,easing:a=e.easeInOut,delay:l=0,...c}=n;return(Array.isArray(s)?s:[s]).map(u=>`${u} ${typeof o=="string"?o:Hw(o)} ${a} ${typeof l=="string"?l:Hw(l)}`).join(",")},...t,easing:e,duration:r}}var rL={mobileStepper:1e3,fab:1050,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500},zw=rL;function iL(t){return Tr(t)||typeof t>"u"||typeof t=="string"||typeof t=="boolean"||typeof t=="number"||Array.isArray(t)}function Of(t={}){let e={...t};function r(i){let s=Object.entries(i);for(let n=0;n<s.length;n++){let[o,a]=s[n];!iL(a)||o.startsWith("unstable_")?delete i[o]:Tr(a)&&(i[o]={...a},r(i[o]))}}return r(e),`import { unstable_createBreakpoints as createBreakpoints, createTransitions } from '@mui/material/styles';

const theme = ${JSON.stringify(e,null,2)};

theme.breakpoints = createBreakpoints(theme.breakpoints || {});
theme.transitions = createTransitions(theme.transitions || {});

export default theme;`}function nL(t={},...e){let{breakpoints:r,mixins:i={},spacing:s,palette:n={},transitions:o={},typography:a={},shape:l,...c}=t;if(t.vars&&t.generateThemeVars===void 0)throw new Error(pr(20));let u=Us(n),p=ln(t),g=De(p,{mixins:L0(p.breakpoints,i),palette:u,shadows:Fw.slice(),typography:hc(u,a),transitions:D0(o),zIndex:{...zw}});return g=De(g,c),g=e.reduce((m,h)=>De(m,h),g),g.unstable_sxConfig={...ai,...c?.unstable_sxConfig},g.unstable_sx=function(h){return gr({sx:h,theme:this})},g.toRuntimeSource=Of,g}var uc=nL;function Sa(t){let e;return t<1?e=5.11916*t**2:e=4.5*Math.log(t+1)+2,Math.round(e*10)/1e3}var sL=[...Array(25)].map((t,e)=>{if(e===0)return"none";let r=Sa(e);return`linear-gradient(rgba(255 255 255 / ${r}), rgba(255 255 255 / ${r}))`});function O0(t){return{inputPlaceholder:t==="dark"?.5:.42,inputUnderline:t==="dark"?.7:.42,switchTrackDisabled:t==="dark"?.2:.12,switchTrack:t==="dark"?.3:.38}}function B0(t){return t==="dark"?sL:[]}function I0(t){let{palette:e={mode:"light"},opacity:r,overlays:i,...s}=t,n=Us(e);return{palette:n,opacity:{...O0(n.mode),...r},overlays:i||B0(n.mode),...s}}function N0(t){return!!t[0].match(/(cssVarPrefix|colorSchemeSelector|modularCssLayers|rootSelector|typography|mixins|breakpoints|direction|transitions)/)||!!t[0].match(/sxConfig$/)||t[0]==="palette"&&!!t[1]?.match(/(mode|contrastThreshold|tonalOffset)/)}var oL=t=>[...[...Array(25)].map((e,r)=>`--${t?`${t}-`:""}overlays-${r}`),`--${t?`${t}-`:""}palette-AppBar-darkBg`,`--${t?`${t}-`:""}palette-AppBar-darkColor`],$w=oL;var jw=t=>(e,r)=>{let i=t.rootSelector||":root",s=t.colorSchemeSelector,n=s;if(s==="class"&&(n=".%s"),s==="data"&&(n="[data-%s]"),s?.startsWith("data-")&&!s.includes("%s")&&(n=`[${s}="%s"]`),t.defaultColorScheme===e){if(e==="dark"){let o={};return $w(t.cssVarPrefix).forEach(a=>{o[a]=r[a],delete r[a]}),n==="media"?{[i]:r,"@media (prefers-color-scheme: dark)":{[i]:o}}:n?{[n.replace("%s",e)]:o,[`${i}, ${n.replace("%s",e)}`]:r}:{[i]:{...r,...o}}}if(n&&n!=="media")return`${i}, ${n.replace("%s",String(e))}`}else if(e){if(n==="media")return{[`@media (prefers-color-scheme: ${String(e)})`]:{[i]:r}};if(n)return n.replace("%s",String(e))}return i};function aL(t,e){e.forEach(r=>{t[r]||(t[r]={})})}function W(t,e,r){!t[e]&&r&&(t[e]=r)}function fc(t){return typeof t!="string"||!t.startsWith("hsl")?t:w0(t)}function cn(t,e){`${e}Channel`in t||(t[`${e}Channel`]=da(fc(t[e]),`MUI: Can't create \`palette.${e}Channel\` because \`palette.${e}\` is not one of these formats: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color().
To suppress this warning, you need to explicitly provide the \`palette.${e}Channel\` as a string (in rgb format, for example "12 12 12") or undefined if you want to remove the channel token.`))}function lL(t){return typeof t=="number"?`${t}px`:typeof t=="string"||typeof t=="function"||Array.isArray(t)?t:"8px"}var Mi=t=>{try{return t()}catch{}},cL=(t="mui")=>Af(t);function F0(t,e,r,i){if(!e)return;e=e===!0?{}:e;let s=i==="dark"?"dark":"light";if(!r){t[i]=I0({...e,palette:{mode:s,...e?.palette}});return}let{palette:n,...o}=uc({...r,palette:{mode:s,...e?.palette}});return t[i]={...e,palette:n,opacity:{...O0(s),...e?.opacity},overlays:e?.overlays||B0(s)},o}function H0(t={},...e){let{colorSchemes:r={light:!0},defaultColorScheme:i,disableCssColorScheme:s=!1,cssVarPrefix:n="mui",shouldSkipGeneratingVar:o=N0,colorSchemeSelector:a=r.light&&r.dark?"media":void 0,rootSelector:l=":root",...c}=t,u=Object.keys(r)[0],p=i||(r.light&&u!=="light"?"light":u),g=cL(n),{[p]:m,light:h,dark:d,...v}=r,f={...v},_=m;if((p==="dark"&&!("dark"in r)||p==="light"&&!("light"in r))&&(_=!0),!_)throw new Error(pr(21,p));let S=F0(f,_,c,p);h&&!f.light&&F0(f,h,void 0,"light"),d&&!f.dark&&F0(f,d,void 0,"dark");let b={defaultColorScheme:p,...S,cssVarPrefix:n,colorSchemeSelector:a,rootSelector:l,getCssVar:g,colorSchemes:f,font:{...Df(S.typography),...S.font},spacing:lL(c.spacing)};Object.keys(b.colorSchemes).forEach(k=>{let x=b.colorSchemes[k].palette,E=R=>{let L=R.split("-"),O=L[1],I=L[2];return g(R,x[O][I])};if(x.mode==="light"&&(W(x.common,"background","#fff"),W(x.common,"onBackground","#000")),x.mode==="dark"&&(W(x.common,"background","#000"),W(x.common,"onBackground","#fff")),aL(x,["Alert","AppBar","Avatar","Button","Chip","FilledInput","LinearProgress","Skeleton","Slider","SnackbarContent","SpeedDialAction","StepConnector","StepContent","Switch","TableCell","Tooltip"]),x.mode==="light"){W(x.Alert,"errorColor",je(x.error.light,.6)),W(x.Alert,"infoColor",je(x.info.light,.6)),W(x.Alert,"successColor",je(x.success.light,.6)),W(x.Alert,"warningColor",je(x.warning.light,.6)),W(x.Alert,"errorFilledBg",E("palette-error-main")),W(x.Alert,"infoFilledBg",E("palette-info-main")),W(x.Alert,"successFilledBg",E("palette-success-main")),W(x.Alert,"warningFilledBg",E("palette-warning-main")),W(x.Alert,"errorFilledColor",Mi(()=>x.getContrastText(x.error.main))),W(x.Alert,"infoFilledColor",Mi(()=>x.getContrastText(x.info.main))),W(x.Alert,"successFilledColor",Mi(()=>x.getContrastText(x.success.main))),W(x.Alert,"warningFilledColor",Mi(()=>x.getContrastText(x.warning.main))),W(x.Alert,"errorStandardBg",We(x.error.light,.9)),W(x.Alert,"infoStandardBg",We(x.info.light,.9)),W(x.Alert,"successStandardBg",We(x.success.light,.9)),W(x.Alert,"warningStandardBg",We(x.warning.light,.9)),W(x.Alert,"errorIconColor",E("palette-error-main")),W(x.Alert,"infoIconColor",E("palette-info-main")),W(x.Alert,"successIconColor",E("palette-success-main")),W(x.Alert,"warningIconColor",E("palette-warning-main")),W(x.AppBar,"defaultBg",E("palette-grey-100")),W(x.Avatar,"defaultBg",E("palette-grey-400")),W(x.Button,"inheritContainedBg",E("palette-grey-300")),W(x.Button,"inheritContainedHoverBg",E("palette-grey-A100")),W(x.Chip,"defaultBorder",E("palette-grey-400")),W(x.Chip,"defaultAvatarColor",E("palette-grey-700")),W(x.Chip,"defaultIconColor",E("palette-grey-700")),W(x.FilledInput,"bg","rgba(0, 0, 0, 0.06)"),W(x.FilledInput,"hoverBg","rgba(0, 0, 0, 0.09)"),W(x.FilledInput,"disabledBg","rgba(0, 0, 0, 0.12)"),W(x.LinearProgress,"primaryBg",We(x.primary.main,.62)),W(x.LinearProgress,"secondaryBg",We(x.secondary.main,.62)),W(x.LinearProgress,"errorBg",We(x.error.main,.62)),W(x.LinearProgress,"infoBg",We(x.info.main,.62)),W(x.LinearProgress,"successBg",We(x.success.main,.62)),W(x.LinearProgress,"warningBg",We(x.warning.main,.62)),W(x.Skeleton,"bg",`rgba(${E("palette-text-primaryChannel")} / 0.11)`),W(x.Slider,"primaryTrack",We(x.primary.main,.62)),W(x.Slider,"secondaryTrack",We(x.secondary.main,.62)),W(x.Slider,"errorTrack",We(x.error.main,.62)),W(x.Slider,"infoTrack",We(x.info.main,.62)),W(x.Slider,"successTrack",We(x.success.main,.62)),W(x.Slider,"warningTrack",We(x.warning.main,.62));let R=sc(x.background.default,.8);W(x.SnackbarContent,"bg",R),W(x.SnackbarContent,"color",Mi(()=>x.getContrastText(R))),W(x.SpeedDialAction,"fabHoverBg",sc(x.background.paper,.15)),W(x.StepConnector,"border",E("palette-grey-400")),W(x.StepContent,"border",E("palette-grey-400")),W(x.Switch,"defaultColor",E("palette-common-white")),W(x.Switch,"defaultDisabledColor",E("palette-grey-100")),W(x.Switch,"primaryDisabledColor",We(x.primary.main,.62)),W(x.Switch,"secondaryDisabledColor",We(x.secondary.main,.62)),W(x.Switch,"errorDisabledColor",We(x.error.main,.62)),W(x.Switch,"infoDisabledColor",We(x.info.main,.62)),W(x.Switch,"successDisabledColor",We(x.success.main,.62)),W(x.Switch,"warningDisabledColor",We(x.warning.main,.62)),W(x.TableCell,"border",We(nc(x.divider,1),.88)),W(x.Tooltip,"bg",nc(x.grey[700],.92))}if(x.mode==="dark"){W(x.Alert,"errorColor",We(x.error.light,.6)),W(x.Alert,"infoColor",We(x.info.light,.6)),W(x.Alert,"successColor",We(x.success.light,.6)),W(x.Alert,"warningColor",We(x.warning.light,.6)),W(x.Alert,"errorFilledBg",E("palette-error-dark")),W(x.Alert,"infoFilledBg",E("palette-info-dark")),W(x.Alert,"successFilledBg",E("palette-success-dark")),W(x.Alert,"warningFilledBg",E("palette-warning-dark")),W(x.Alert,"errorFilledColor",Mi(()=>x.getContrastText(x.error.dark))),W(x.Alert,"infoFilledColor",Mi(()=>x.getContrastText(x.info.dark))),W(x.Alert,"successFilledColor",Mi(()=>x.getContrastText(x.success.dark))),W(x.Alert,"warningFilledColor",Mi(()=>x.getContrastText(x.warning.dark))),W(x.Alert,"errorStandardBg",je(x.error.light,.9)),W(x.Alert,"infoStandardBg",je(x.info.light,.9)),W(x.Alert,"successStandardBg",je(x.success.light,.9)),W(x.Alert,"warningStandardBg",je(x.warning.light,.9)),W(x.Alert,"errorIconColor",E("palette-error-main")),W(x.Alert,"infoIconColor",E("palette-info-main")),W(x.Alert,"successIconColor",E("palette-success-main")),W(x.Alert,"warningIconColor",E("palette-warning-main")),W(x.AppBar,"defaultBg",E("palette-grey-900")),W(x.AppBar,"darkBg",E("palette-background-paper")),W(x.AppBar,"darkColor",E("palette-text-primary")),W(x.Avatar,"defaultBg",E("palette-grey-600")),W(x.Button,"inheritContainedBg",E("palette-grey-800")),W(x.Button,"inheritContainedHoverBg",E("palette-grey-700")),W(x.Chip,"defaultBorder",E("palette-grey-700")),W(x.Chip,"defaultAvatarColor",E("palette-grey-300")),W(x.Chip,"defaultIconColor",E("palette-grey-300")),W(x.FilledInput,"bg","rgba(255, 255, 255, 0.09)"),W(x.FilledInput,"hoverBg","rgba(255, 255, 255, 0.13)"),W(x.FilledInput,"disabledBg","rgba(255, 255, 255, 0.12)"),W(x.LinearProgress,"primaryBg",je(x.primary.main,.5)),W(x.LinearProgress,"secondaryBg",je(x.secondary.main,.5)),W(x.LinearProgress,"errorBg",je(x.error.main,.5)),W(x.LinearProgress,"infoBg",je(x.info.main,.5)),W(x.LinearProgress,"successBg",je(x.success.main,.5)),W(x.LinearProgress,"warningBg",je(x.warning.main,.5)),W(x.Skeleton,"bg",`rgba(${E("palette-text-primaryChannel")} / 0.13)`),W(x.Slider,"primaryTrack",je(x.primary.main,.5)),W(x.Slider,"secondaryTrack",je(x.secondary.main,.5)),W(x.Slider,"errorTrack",je(x.error.main,.5)),W(x.Slider,"infoTrack",je(x.info.main,.5)),W(x.Slider,"successTrack",je(x.success.main,.5)),W(x.Slider,"warningTrack",je(x.warning.main,.5));let R=sc(x.background.default,.98);W(x.SnackbarContent,"bg",R),W(x.SnackbarContent,"color",Mi(()=>x.getContrastText(R))),W(x.SpeedDialAction,"fabHoverBg",sc(x.background.paper,.15)),W(x.StepConnector,"border",E("palette-grey-600")),W(x.StepContent,"border",E("palette-grey-600")),W(x.Switch,"defaultColor",E("palette-grey-300")),W(x.Switch,"defaultDisabledColor",E("palette-grey-600")),W(x.Switch,"primaryDisabledColor",je(x.primary.main,.55)),W(x.Switch,"secondaryDisabledColor",je(x.secondary.main,.55)),W(x.Switch,"errorDisabledColor",je(x.error.main,.55)),W(x.Switch,"infoDisabledColor",je(x.info.main,.55)),W(x.Switch,"successDisabledColor",je(x.success.main,.55)),W(x.Switch,"warningDisabledColor",je(x.warning.main,.55)),W(x.TableCell,"border",je(nc(x.divider,1),.68)),W(x.Tooltip,"bg",nc(x.grey[700],.92))}cn(x.background,"default"),cn(x.background,"paper"),cn(x.common,"background"),cn(x.common,"onBackground"),cn(x,"divider"),Object.keys(x).forEach(R=>{let L=x[R];R!=="tonalOffset"&&L&&typeof L=="object"&&(L.main&&W(x[R],"mainChannel",da(fc(L.main))),L.light&&W(x[R],"lightChannel",da(fc(L.light))),L.dark&&W(x[R],"darkChannel",da(fc(L.dark))),L.contrastText&&W(x[R],"contrastTextChannel",da(fc(L.contrastText))),R==="text"&&(cn(x[R],"primary"),cn(x[R],"secondary")),R==="action"&&(L.active&&cn(x[R],"active"),L.selected&&cn(x[R],"selected")))})}),b=e.reduce((k,x)=>De(k,x),b);let C={prefix:n,disableCssColorScheme:s,shouldSkipGeneratingVar:o,getSelector:jw(b)},{vars:y,generateThemeVars:w,generateStyleSheets:T}=M0(b,C);return b.vars=y,Object.entries(b.colorSchemes[b.defaultColorScheme]).forEach(([k,x])=>{b[k]=x}),b.generateThemeVars=w,b.generateStyleSheets=T,b.generateSpacing=function(){return ha(c.spacing,Ls(this))},b.getColorSchemeSelector=A0(a),b.spacing=b.generateSpacing(),b.shouldSkipGeneratingVar=o,b.unstable_sxConfig={...ai,...c?.unstable_sxConfig},b.unstable_sx=function(x){return gr({sx:x,theme:this})},b.toRuntimeSource=Of,b}function Ww(t,e,r){t.colorSchemes&&r&&(t.colorSchemes[e]={...r!==!0&&r,palette:Us({...r===!0?{}:r.palette,mode:e})})}function Ai(t={},...e){let{palette:r,cssVariables:i=!1,colorSchemes:s=r?void 0:{light:!0},defaultColorScheme:n=r?.mode,...o}=t,a=n||"light",l=s?.[a],c={...s,...r?{[a]:{...typeof l!="boolean"&&l,palette:r}}:void 0};if(i===!1){if(!("colorSchemes"in t))return uc(t,...e);let u=r;"palette"in t||c[a]&&(c[a]!==!0?u=c[a].palette:a==="dark"&&(u={mode:"dark"}));let p=uc({...t,palette:u},...e);return p.defaultColorScheme=a,p.colorSchemes=c,p.palette.mode==="light"&&(p.colorSchemes.light={...c.light!==!0&&c.light,palette:p.palette},Ww(p,"dark",c.dark)),p.palette.mode==="dark"&&(p.colorSchemes.dark={...c.dark!==!0&&c.dark,palette:p.palette},Ww(p,"light",c.light)),p}return!r&&!("light"in c)&&a==="light"&&(c.light=!0),H0({...o,colorSchemes:c,defaultColorScheme:a,...typeof i!="boolean"&&i},...e)}var hL=Ai(),xa=hL;var jt="$$material";function ba(){let t=Pi(xa);return t[jt]||t}var mL=K(_e());function fL(t){return t!=="ownerState"&&t!=="theme"&&t!=="sx"&&t!=="as"}var Vw=fL;var dL=t=>Vw(t)&&t!=="classes",Bf=dL;var pL=ua({themeId:jt,defaultTheme:xa,rootShouldForwardProp:Bf}),ye=pL;function Uw(){return $n}var gL=Rf,Yt=gL;var R$=K(Q());var vL=K(_e());function ht(t){return k0(t)}function Kw(t){return Xe("MuiSvgIcon",t)}var N$=Je("MuiSvgIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);var Nf=K(_e()),_L=t=>{let{color:e,fontSize:r,classes:i}=t,s={root:["root",e!=="inherit"&&`color${Oe(e)}`,`fontSize${Oe(r)}`]};return Ye(s,Kw,i)},yL=ye("svg",{name:"MuiSvgIcon",slot:"Root",overridesResolver:(t,e)=>{let{ownerState:r}=t;return[e.root,r.color!=="inherit"&&e[`color${Oe(r.color)}`],e[`fontSize${Oe(r.fontSize)}`]]}})(Yt(({theme:t})=>({userSelect:"none",width:"1em",height:"1em",display:"inline-block",flexShrink:0,transition:t.transitions?.create?.("fill",{duration:(t.vars??t).transitions?.duration?.shorter}),variants:[{props:e=>!e.hasSvgAsChild,style:{fill:"currentColor"}},{props:{fontSize:"inherit"},style:{fontSize:"inherit"}},{props:{fontSize:"small"},style:{fontSize:t.typography?.pxToRem?.(20)||"1.25rem"}},{props:{fontSize:"medium"},style:{fontSize:t.typography?.pxToRem?.(24)||"1.5rem"}},{props:{fontSize:"large"},style:{fontSize:t.typography?.pxToRem?.(35)||"2.1875rem"}},...Object.entries((t.vars??t).palette).filter(([,e])=>e&&e.main).map(([e])=>({props:{color:e},style:{color:(t.vars??t).palette?.[e]?.main}})),{props:{color:"action"},style:{color:(t.vars??t).palette?.action?.active}},{props:{color:"disabled"},style:{color:(t.vars??t).palette?.action?.disabled}},{props:{color:"inherit"},style:{color:void 0}}]}))),Gw=If.forwardRef(function(e,r){let i=ht({props:e,name:"MuiSvgIcon"}),{children:s,className:n,color:o="inherit",component:a="svg",fontSize:l="medium",htmlColor:c,inheritViewBox:u=!1,titleAccess:p,viewBox:g="0 0 24 24",...m}=i,h=If.isValidElement(s)&&s.type==="svg",d={...i,color:o,component:a,fontSize:l,instanceFontSize:e.fontSize,inheritViewBox:u,viewBox:g,hasSvgAsChild:h},v={};u||(v.viewBox=g);let f=_L(d);return(0,Nf.jsxs)(yL,{as:a,className:ue(f.root,n),focusable:"false",color:c,"aria-hidden":p?void 0:!0,role:p?"img":void 0,ref:r,...v,...m,...h&&s.props,ownerState:d,children:[h?s.props.children:s,p?(0,Nf.jsx)("title",{children:p}):null]})});Gw.muiName="SvgIcon";var Kn=Gw;var qw=K(_e());function hi(t,e){function r(i,s){return(0,qw.jsx)(Kn,{"data-testid":`${e}Icon`,ref:s,...i,children:t})}return r.muiName=Kn.muiName,Ff.memo(Ff.forwardRef(r))}var Ks=$u;var Yw=qo;var dc=ju;var z0=nn;var $0=Yo;var hn=Ug;var j0=zn;var Xw=K(_e()),Jw=hi((0,Xw.jsx)("path",{d:"M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}),"Close");var Qw=K(_e()),Zw=hi((0,Qw.jsx)("path",{d:"M20 4H4c-1.11 0-2 .9-2 2v12c0 1.1.89 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.89-2-2-2m0 14H4V8h16zm-2-1h-6v-2h6zM7.5 17l-1.41-1.41L8.67 13l-2.59-2.59L7.5 9l4 4z"}),"Terminal");function Gn(t,e){let{className:r,elementType:i,ownerState:s,externalForwardedProps:n,internalForwardedProps:o,shouldForwardComponentProp:a=!1,...l}=e,{component:c,slots:u={[t]:void 0},slotProps:p={[t]:void 0},...g}=n,m=u[t]||i,h=Hl(p[t],s),{props:{component:d,...v},internalRef:f}=Fl({className:r,...l,externalForwardedProps:t==="root"?g:void 0,externalSlotProps:h}),_=zn(f,h?.ref,e.ref),S=t==="root"?d||c:d,b=Nl(m,{...t==="root"&&!c&&!u[t]&&o,...t!=="root"&&!u[t]&&o,...v,...S&&!a&&{as:S},...S&&a&&{component:S},ref:_},s);return[m,b]}function SL(t){return typeof t.main=="string"}function xL(t,e=[]){if(!SL(t))return!1;for(let r of e)if(!t.hasOwnProperty(r)||typeof t[r]!="string")return!1;return!0}function Gs(t=[]){return([,e])=>e&&xL(e,t)}var tC=K(Q());function eC(t){return Xe("MuiPaper",t)}var Lj=Je("MuiPaper",["root","rounded","outlined","elevation","elevation0","elevation1","elevation2","elevation3","elevation4","elevation5","elevation6","elevation7","elevation8","elevation9","elevation10","elevation11","elevation12","elevation13","elevation14","elevation15","elevation16","elevation17","elevation18","elevation19","elevation20","elevation21","elevation22","elevation23","elevation24"]);var rC=K(_e()),bL=t=>{let{square:e,elevation:r,variant:i,classes:s}=t,n={root:["root",i,!e&&"rounded",i==="elevation"&&`elevation${r}`]};return Ye(n,eC,s)},wL=ye("div",{name:"MuiPaper",slot:"Root",overridesResolver:(t,e)=>{let{ownerState:r}=t;return[e.root,e[r.variant],!r.square&&e.rounded,r.variant==="elevation"&&e[`elevation${r.elevation}`]]}})(Yt(({theme:t})=>({backgroundColor:(t.vars||t).palette.background.paper,color:(t.vars||t).palette.text.primary,transition:t.transitions.create("box-shadow"),variants:[{props:({ownerState:e})=>!e.square,style:{borderRadius:t.shape.borderRadius}},{props:{variant:"outlined"},style:{border:`1px solid ${(t.vars||t).palette.divider}`}},{props:{variant:"elevation"},style:{boxShadow:"var(--Paper-shadow)",backgroundImage:"var(--Paper-overlay)"}}]}))),CL=tC.forwardRef(function(e,r){let i=ht({props:e,name:"MuiPaper"}),s=ba(),{className:n,component:o="div",elevation:a=1,square:l=!1,variant:c="elevation",...u}=i,p={...i,component:o,elevation:a,square:l,variant:c},g=bL(p);return(0,rC.jsx)(wL,{as:o,ownerState:p,className:ue(g.root,n),ref:r,...u,style:{...c==="elevation"&&{"--Paper-shadow":(s.vars||s).shadows[a],...s.vars&&{"--Paper-overlay":s.vars.overlays?.[a]},...!s.vars&&s.palette.mode==="dark"&&{"--Paper-overlay":`linear-gradient(${Ri("#fff",Sa(a))}, ${Ri("#fff",Sa(a))})`}},...u.style}})}),Hf=CL;var Li=K(Q());var zf=K(Q());var W0=class t{static create(){return new t}static use(){let e=Jo(t.create).current,[r,i]=zf.useState(!1);return e.shouldMount=r,e.setShouldMount=i,zf.useEffect(e.mountEffect,[r]),e}constructor(){this.ref={current:null},this.mounted=null,this.didMount=!1,this.shouldMount=!1,this.setShouldMount=null}mount(){return this.mounted||(this.mounted=kL(),this.shouldMount=!0,this.setShouldMount(this.shouldMount)),this.mounted}mountEffect=()=>{this.shouldMount&&!this.didMount&&this.ref.current!==null&&(this.didMount=!0,this.mounted.resolve())};start(...e){this.mount().then(()=>this.ref.current?.start(...e))}stop(...e){this.mount().then(()=>this.ref.current?.stop(...e))}pulsate(...e){this.mount().then(()=>this.ref.current?.pulsate(...e))}};function $f(){return W0.use()}function kL(){let t,e,r=new Promise((i,s)=>{t=i,e=s});return r.resolve=t,r.reject=e,r}var Pt=K(Q());function qn(t,e){if(t==null)return{};var r={};for(var i in t)if({}.hasOwnProperty.call(t,i)){if(e.indexOf(i)!==-1)continue;r[i]=t[i]}return r}function jf(t,e){return jf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},jf(t,e)}function pc(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,jf(t,e)}var iC=K(Q()),V0=iC.default.createContext(null);function mc(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}var gc=K(Q());var Gr=K(Q());function Wf(t,e){var r=function(n){return e&&(0,Gr.isValidElement)(n)?e(n):n},i=Object.create(null);return t&&Gr.Children.map(t,function(s){return s}).forEach(function(s){i[s.key]=r(s)}),i}function TL(t,e){t=t||{},e=e||{};function r(u){return u in e?e[u]:t[u]}var i=Object.create(null),s=[];for(var n in t)n in e?s.length&&(i[n]=s,s=[]):s.push(n);var o,a={};for(var l in e){if(i[l])for(o=0;o<i[l].length;o++){var c=i[l][o];a[i[l][o]]=r(c)}a[l]=r(l)}for(o=0;o<s.length;o++)a[s[o]]=r(s[o]);return a}function qs(t,e,r){return r[e]!=null?r[e]:t.props[e]}function nC(t,e){return Wf(t.children,function(r){return(0,Gr.cloneElement)(r,{onExited:e.bind(null,r),in:!0,appear:qs(r,"appear",t),enter:qs(r,"enter",t),exit:qs(r,"exit",t)})})}function sC(t,e,r){var i=Wf(t.children),s=TL(e,i);return Object.keys(s).forEach(function(n){var o=s[n];if((0,Gr.isValidElement)(o)){var a=n in e,l=n in i,c=e[n],u=(0,Gr.isValidElement)(c)&&!c.props.in;l&&(!a||u)?s[n]=(0,Gr.cloneElement)(o,{onExited:r.bind(null,o),in:!0,exit:qs(o,"exit",t),enter:qs(o,"enter",t)}):!l&&a&&!u?s[n]=(0,Gr.cloneElement)(o,{in:!1}):l&&a&&(0,Gr.isValidElement)(c)&&(s[n]=(0,Gr.cloneElement)(o,{onExited:r.bind(null,o),in:c.props.in,exit:qs(o,"exit",t),enter:qs(o,"enter",t)}))}}),s}var EL=Object.values||function(t){return Object.keys(t).map(function(e){return t[e]})},PL={component:"div",childFactory:function(e){return e}},U0=(function(t){pc(e,t);function e(i,s){var n;n=t.call(this,i,s)||this;var o=n.handleExited.bind(mc(n));return n.state={contextValue:{isMounting:!0},handleExited:o,firstRender:!0},n}var r=e.prototype;return r.componentDidMount=function(){this.mounted=!0,this.setState({contextValue:{isMounting:!1}})},r.componentWillUnmount=function(){this.mounted=!1},e.getDerivedStateFromProps=function(s,n){var o=n.children,a=n.handleExited,l=n.firstRender;return{children:l?nC(s,a):sC(s,o,a),firstRender:!1}},r.handleExited=function(s,n){var o=Wf(this.props.children);s.key in o||(s.props.onExited&&s.props.onExited(n),this.mounted&&this.setState(function(a){var l=Se({},a.children);return delete l[s.key],{children:l}}))},r.render=function(){var s=this.props,n=s.component,o=s.childFactory,a=qn(s,["component","childFactory"]),l=this.state.contextValue,c=EL(this.state.children).map(o);return delete a.appear,delete a.enter,delete a.exit,n===null?gc.default.createElement(V0.Provider,{value:l},c):gc.default.createElement(V0.Provider,{value:l},gc.default.createElement(n,a,c))},e})(gc.default.Component);U0.propTypes={};U0.defaultProps=PL;var K0=U0;var Vf=K(Q());var G0=K(_e());function RL(t){let{className:e,classes:r,pulsate:i=!1,rippleX:s,rippleY:n,rippleSize:o,in:a,onExited:l,timeout:c}=t,[u,p]=Vf.useState(!1),g=ue(e,r.ripple,r.rippleVisible,i&&r.ripplePulsate),m={width:o,height:o,top:-(o/2)+n,left:-(o/2)+s},h=ue(r.child,u&&r.childLeaving,i&&r.childPulsate);return!a&&!u&&p(!0),Vf.useEffect(()=>{if(!a&&l!=null){let d=setTimeout(l,c);return()=>{clearTimeout(d)}}},[l,a,c]),(0,G0.jsx)("span",{className:g,style:m,children:(0,G0.jsx)("span",{className:h})})}var oC=RL;var ML=Je("MuiTouchRipple",["root","ripple","rippleVisible","ripplePulsate","child","childLeaving","childPulsate"]),Mr=ML;var Uf=K(_e()),q0=550,AL=80,LL=Ei`
  0% {
    transform: scale(0);
    opacity: 0.1;
  }

  100% {
    transform: scale(1);
    opacity: 0.3;
  }
`,DL=Ei`
  0% {
    opacity: 1;
  }

  100% {
    opacity: 0;
  }
`,OL=Ei`
  0% {
    transform: scale(1);
  }

  50% {
    transform: scale(0.92);
  }

  100% {
    transform: scale(1);
  }
`,BL=ye("span",{name:"MuiTouchRipple",slot:"Root"})({overflow:"hidden",pointerEvents:"none",position:"absolute",zIndex:0,top:0,right:0,bottom:0,left:0,borderRadius:"inherit"}),IL=ye(oC,{name:"MuiTouchRipple",slot:"Ripple"})`
  opacity: 0;
  position: absolute;

  &.${Mr.rippleVisible} {
    opacity: 0.3;
    transform: scale(1);
    animation-name: ${LL};
    animation-duration: ${q0}ms;
    animation-timing-function: ${({theme:t})=>t.transitions.easing.easeInOut};
  }

  &.${Mr.ripplePulsate} {
    animation-duration: ${({theme:t})=>t.transitions.duration.shorter}ms;
  }

  & .${Mr.child} {
    opacity: 1;
    display: block;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background-color: currentColor;
  }

  & .${Mr.childLeaving} {
    opacity: 0;
    animation-name: ${DL};
    animation-duration: ${q0}ms;
    animation-timing-function: ${({theme:t})=>t.transitions.easing.easeInOut};
  }

  & .${Mr.childPulsate} {
    position: absolute;
    /* @noflip */
    left: 0px;
    top: 0;
    animation-name: ${OL};
    animation-duration: 2500ms;
    animation-timing-function: ${({theme:t})=>t.transitions.easing.easeInOut};
    animation-iteration-count: infinite;
    animation-delay: 200ms;
  }
`,NL=Pt.forwardRef(function(e,r){let i=ht({props:e,name:"MuiTouchRipple"}),{center:s=!1,classes:n={},className:o,...a}=i,[l,c]=Pt.useState([]),u=Pt.useRef(0),p=Pt.useRef(null);Pt.useEffect(()=>{p.current&&(p.current(),p.current=null)},[l]);let g=Pt.useRef(!1),m=Vu(),h=Pt.useRef(null),d=Pt.useRef(null),v=Pt.useCallback(b=>{let{pulsate:C,rippleX:y,rippleY:w,rippleSize:T,cb:k}=b;c(x=>[...x,(0,Uf.jsx)(IL,{classes:{ripple:ue(n.ripple,Mr.ripple),rippleVisible:ue(n.rippleVisible,Mr.rippleVisible),ripplePulsate:ue(n.ripplePulsate,Mr.ripplePulsate),child:ue(n.child,Mr.child),childLeaving:ue(n.childLeaving,Mr.childLeaving),childPulsate:ue(n.childPulsate,Mr.childPulsate)},timeout:q0,pulsate:C,rippleX:y,rippleY:w,rippleSize:T},u.current)]),u.current+=1,p.current=k},[n]),f=Pt.useCallback((b={},C={},y=()=>{})=>{let{pulsate:w=!1,center:T=s||C.pulsate,fakeElement:k=!1}=C;if(b?.type==="mousedown"&&g.current){g.current=!1;return}b?.type==="touchstart"&&(g.current=!0);let x=k?null:d.current,E=x?x.getBoundingClientRect():{width:0,height:0,left:0,top:0},R,L,O;if(T||b===void 0||b.clientX===0&&b.clientY===0||!b.clientX&&!b.touches)R=Math.round(E.width/2),L=Math.round(E.height/2);else{let{clientX:I,clientY:P}=b.touches&&b.touches.length>0?b.touches[0]:b;R=Math.round(I-E.left),L=Math.round(P-E.top)}if(T)O=Math.sqrt((2*E.width**2+E.height**2)/3),O%2===0&&(O+=1);else{let I=Math.max(Math.abs((x?x.clientWidth:0)-R),R)*2+2,P=Math.max(Math.abs((x?x.clientHeight:0)-L),L)*2+2;O=Math.sqrt(I**2+P**2)}b?.touches?h.current===null&&(h.current=()=>{v({pulsate:w,rippleX:R,rippleY:L,rippleSize:O,cb:y})},m.start(AL,()=>{h.current&&(h.current(),h.current=null)})):v({pulsate:w,rippleX:R,rippleY:L,rippleSize:O,cb:y})},[s,v,m]),_=Pt.useCallback(()=>{f({},{pulsate:!0})},[f]),S=Pt.useCallback((b,C)=>{if(m.clear(),b?.type==="touchend"&&h.current){h.current(),h.current=null,m.start(0,()=>{S(b,C)});return}h.current=null,c(y=>y.length>0?y.slice(1):y),p.current=C},[m]);return Pt.useImperativeHandle(r,()=>({pulsate:_,start:f,stop:S}),[_,f,S]),(0,Uf.jsx)(BL,{className:ue(Mr.root,n.root,o),ref:d,...a,children:(0,Uf.jsx)(K0,{component:null,exit:!0,children:l})})}),aC=NL;function lC(t){return Xe("MuiButtonBase",t)}var FL=Je("MuiButtonBase",["root","disabled","focusVisible"]),cC=FL;var Kf=K(_e()),HL=t=>{let{disabled:e,focusVisible:r,focusVisibleClassName:i,classes:s}=t,o=Ye({root:["root",e&&"disabled",r&&"focusVisible"]},lC,s);return r&&i&&(o.root+=` ${i}`),o},zL=ye("button",{name:"MuiButtonBase",slot:"Root",overridesResolver:(t,e)=>e.root})({display:"inline-flex",alignItems:"center",justifyContent:"center",position:"relative",boxSizing:"border-box",WebkitTapHighlightColor:"transparent",backgroundColor:"transparent",outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:"pointer",userSelect:"none",verticalAlign:"middle",MozAppearance:"none",WebkitAppearance:"none",textDecoration:"none",color:"inherit","&::-moz-focus-inner":{borderStyle:"none"},[`&.${cC.disabled}`]:{pointerEvents:"none",cursor:"default"},"@media print":{colorAdjust:"exact"}}),$L=Li.forwardRef(function(e,r){let i=ht({props:e,name:"MuiButtonBase"}),{action:s,centerRipple:n=!1,children:o,className:a,component:l="button",disabled:c=!1,disableRipple:u=!1,disableTouchRipple:p=!1,focusRipple:g=!1,focusVisibleClassName:m,LinkComponent:h="a",onBlur:d,onClick:v,onContextMenu:f,onDragLeave:_,onFocus:S,onFocusVisible:b,onKeyDown:C,onKeyUp:y,onMouseDown:w,onMouseLeave:T,onMouseUp:k,onTouchEnd:x,onTouchMove:E,onTouchStart:R,tabIndex:L=0,TouchRippleProps:O,touchRippleRef:I,type:P,...A}=i,D=Li.useRef(null),B=$f(),H=j0(B.ref,I),[j,U]=Li.useState(!1);c&&j&&U(!1),Li.useImperativeHandle(s,()=>({focusVisible:()=>{U(!0),D.current.focus()}}),[]);let G=B.shouldMount&&!u&&!c;Li.useEffect(()=>{j&&g&&!u&&B.pulsate()},[u,g,j,B]);let re=un(B,"start",w,p),M=un(B,"stop",f,p),N=un(B,"stop",_,p),$=un(B,"stop",k,p),z=un(B,"stop",Y=>{j&&Y.preventDefault(),T&&T(Y)},p),se=un(B,"start",R,p),X=un(B,"stop",x,p),me=un(B,"stop",E,p),Le=un(B,"stop",Y=>{Il(Y.target)||U(!1),d&&d(Y)},!1),Ie=hn(Y=>{D.current||(D.current=Y.currentTarget),Il(Y.target)&&(U(!0),b&&b(Y)),S&&S(Y)}),de=()=>{let Y=D.current;return l&&l!=="button"&&!(Y.tagName==="A"&&Y.href)},le=hn(Y=>{g&&!Y.repeat&&j&&Y.key===" "&&B.stop(Y,()=>{B.start(Y)}),Y.target===Y.currentTarget&&de()&&Y.key===" "&&Y.preventDefault(),C&&C(Y),Y.target===Y.currentTarget&&de()&&Y.key==="Enter"&&!c&&(Y.preventDefault(),v&&v(Y))}),Ct=hn(Y=>{g&&Y.key===" "&&j&&!Y.defaultPrevented&&B.stop(Y,()=>{B.pulsate(Y)}),y&&y(Y),v&&Y.target===Y.currentTarget&&de()&&Y.key===" "&&!Y.defaultPrevented&&v(Y)}),$e=l;$e==="button"&&(A.href||A.to)&&($e=h);let be={};$e==="button"?(be.type=P===void 0?"button":P,be.disabled=c):(!A.href&&!A.to&&(be.role="button"),c&&(be["aria-disabled"]=c));let kt=j0(r,D),he={...i,centerRipple:n,component:l,disabled:c,disableRipple:u,disableTouchRipple:p,focusRipple:g,tabIndex:L,focusVisible:j},ne=HL(he);return(0,Kf.jsxs)(zL,{as:$e,className:ue(ne.root,a),ownerState:he,onBlur:Le,onClick:v,onContextMenu:M,onFocus:Ie,onKeyDown:le,onKeyUp:Ct,onMouseDown:re,onMouseLeave:z,onMouseUp:$,onDragLeave:N,onTouchEnd:X,onTouchMove:me,onTouchStart:se,ref:kt,tabIndex:c?-1:L,type:P,...be,...A,children:[o,G?(0,Kf.jsx)(aC,{ref:H,center:n,...O}):null]})});function un(t,e,r,i=!1){return hn(s=>(r&&r(s),i||t[e](s),!0))}var Ys=$L;var uC=K(Q());function hC(t){return Xe("MuiCircularProgress",t)}var VW=Je("MuiCircularProgress",["root","determinate","indeterminate","colorPrimary","colorSecondary","svg","circle","circleDeterminate","circleIndeterminate","circleDisableShrink"]);var Gf=K(_e()),Yn=44,Y0=Ei`
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
`,X0=Ei`
  0% {
    stroke-dasharray: 1px, 200px;
    stroke-dashoffset: 0;
  }

  50% {
    stroke-dasharray: 100px, 200px;
    stroke-dashoffset: -15px;
  }

  100% {
    stroke-dasharray: 1px, 200px;
    stroke-dashoffset: -126px;
  }
`,jL=typeof Y0!="string"?Is`
        animation: ${Y0} 1.4s linear infinite;
      `:null,WL=typeof X0!="string"?Is`
        animation: ${X0} 1.4s ease-in-out infinite;
      `:null,VL=t=>{let{classes:e,variant:r,color:i,disableShrink:s}=t,n={root:["root",r,`color${Oe(i)}`],svg:["svg"],circle:["circle",`circle${Oe(r)}`,s&&"circleDisableShrink"]};return Ye(n,hC,e)},UL=ye("span",{name:"MuiCircularProgress",slot:"Root",overridesResolver:(t,e)=>{let{ownerState:r}=t;return[e.root,e[r.variant],e[`color${Oe(r.color)}`]]}})(Yt(({theme:t})=>({display:"inline-block",variants:[{props:{variant:"determinate"},style:{transition:t.transitions.create("transform")}},{props:{variant:"indeterminate"},style:jL||{animation:`${Y0} 1.4s linear infinite`}},...Object.entries(t.palette).filter(Gs()).map(([e])=>({props:{color:e},style:{color:(t.vars||t).palette[e].main}}))]}))),KL=ye("svg",{name:"MuiCircularProgress",slot:"Svg",overridesResolver:(t,e)=>e.svg})({display:"block"}),GL=ye("circle",{name:"MuiCircularProgress",slot:"Circle",overridesResolver:(t,e)=>{let{ownerState:r}=t;return[e.circle,e[`circle${Oe(r.variant)}`],r.disableShrink&&e.circleDisableShrink]}})(Yt(({theme:t})=>({stroke:"currentColor",variants:[{props:{variant:"determinate"},style:{transition:t.transitions.create("stroke-dashoffset")}},{props:{variant:"indeterminate"},style:{strokeDasharray:"80px, 200px",strokeDashoffset:0}},{props:({ownerState:e})=>e.variant==="indeterminate"&&!e.disableShrink,style:WL||{animation:`${X0} 1.4s ease-in-out infinite`}}]}))),qL=uC.forwardRef(function(e,r){let i=ht({props:e,name:"MuiCircularProgress"}),{className:s,color:n="primary",disableShrink:o=!1,size:a=40,style:l,thickness:c=3.6,value:u=0,variant:p="indeterminate",...g}=i,m={...i,color:n,disableShrink:o,size:a,thickness:c,value:u,variant:p},h=VL(m),d={},v={},f={};if(p==="determinate"){let _=2*Math.PI*((Yn-c)/2);d.strokeDasharray=_.toFixed(3),f["aria-valuenow"]=Math.round(u),d.strokeDashoffset=`${((100-u)/100*_).toFixed(3)}px`,v.transform="rotate(-90deg)"}return(0,Gf.jsx)(UL,{className:ue(h.root,s),style:{width:a,height:a,...v,...l},ownerState:m,ref:r,role:"progressbar",...f,...g,children:(0,Gf.jsx)(KL,{className:h.svg,ownerState:m,viewBox:`${Yn/2} ${Yn/2} ${Yn} ${Yn}`,children:(0,Gf.jsx)(GL,{className:h.circle,style:d,ownerState:m,cx:Yn,cy:Yn,r:(Yn-c)/2,fill:"none",strokeWidth:c})})})}),J0=qL;var pC=K(Q());function fC(t){return Xe("MuiTypography",t)}var oV=Je("MuiTypography",["root","h1","h2","h3","h4","h5","h6","subtitle1","subtitle2","body1","body2","inherit","button","caption","overline","alignLeft","alignRight","alignCenter","alignJustify","noWrap","gutterBottom","paragraph"]);var mC=K(_e()),YL={primary:!0,secondary:!0,error:!0,info:!0,success:!0,warning:!0,textPrimary:!0,textSecondary:!0,textDisabled:!0},XL=Uw(),JL=t=>{let{align:e,gutterBottom:r,noWrap:i,paragraph:s,variant:n,classes:o}=t,a={root:["root",n,t.align!=="inherit"&&`align${Oe(e)}`,r&&"gutterBottom",i&&"noWrap",s&&"paragraph"]};return Ye(a,fC,o)},QL=ye("span",{name:"MuiTypography",slot:"Root",overridesResolver:(t,e)=>{let{ownerState:r}=t;return[e.root,r.variant&&e[r.variant],r.align!=="inherit"&&e[`align${Oe(r.align)}`],r.noWrap&&e.noWrap,r.gutterBottom&&e.gutterBottom,r.paragraph&&e.paragraph]}})(Yt(({theme:t})=>({margin:0,variants:[{props:{variant:"inherit"},style:{font:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}},...Object.entries(t.typography).filter(([e,r])=>e!=="inherit"&&r&&typeof r=="object").map(([e,r])=>({props:{variant:e},style:r})),...Object.entries(t.palette).filter(Gs()).map(([e])=>({props:{color:e},style:{color:(t.vars||t).palette[e].main}})),...Object.entries(t.palette?.text||{}).filter(([,e])=>typeof e=="string").map(([e])=>({props:{color:`text${Oe(e)}`},style:{color:(t.vars||t).palette.text[e]}})),{props:({ownerState:e})=>e.align!=="inherit",style:{textAlign:"var(--Typography-textAlign)"}},{props:({ownerState:e})=>e.noWrap,style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}},{props:({ownerState:e})=>e.gutterBottom,style:{marginBottom:"0.35em"}},{props:({ownerState:e})=>e.paragraph,style:{marginBottom:16}}]}))),dC={h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",subtitle1:"h6",subtitle2:"h6",body1:"p",body2:"p",inherit:"p"},ZL=pC.forwardRef(function(e,r){let{color:i,...s}=ht({props:e,name:"MuiTypography"}),n=!YL[i],o=XL({...s,...n&&{color:i}}),{align:a="inherit",className:l,component:c,gutterBottom:u=!1,noWrap:p=!1,paragraph:g=!1,variant:m="body1",variantMapping:h=dC,...d}=o,v={...o,align:a,color:i,className:l,component:c,gutterBottom:u,noWrap:p,paragraph:g,variant:m,variantMapping:h},f=c||(g?"p":h[m]||dC[m])||"span",_=JL(v);return(0,mC.jsx)(QL,{as:f,ref:r,className:ue(_.root,l),...d,ownerState:v,style:{...a!=="inherit"&&{"--Typography-textAlign":a},...d.style}})}),Ar=ZL;function qf({props:t,name:e}){return fa({props:t,name:e,defaultTheme:xa,themeId:jt})}var _C=K(Q());var TV=K(Q());var gC=K(_e());function Q0({theme:t,...e}){let r=jt in t?t[jt]:void 0;return(0,gC.jsx)(ma,{...e,themeId:r?jt:void 0,theme:r||t})}var LV=K(Q());var MV=K(Q());var eD=K(_e()),vc={attribute:"data-mui-color-scheme",colorSchemeStorageKey:"mui-color-scheme",defaultLightColorScheme:"light",defaultDarkColorScheme:"dark",modeStorageKey:"mui-mode"};var tD=K(_e()),{CssVarsProvider:rD,useColorScheme:HV,getInitColorSchemeScript:zV}=Mf({themeId:jt,theme:()=>Ai({cssVariables:!0}),colorSchemeStorageKey:vc.colorSchemeStorageKey,modeStorageKey:vc.modeStorageKey,defaultColorScheme:{light:vc.defaultLightColorScheme,dark:vc.defaultDarkColorScheme},resolveTheme:t=>{let e={...t,typography:hc(t.palette,t.typography)};return e.unstable_sx=function(i){return gr({sx:i,theme:this})},e}});var vC=rD;var Z0=K(_e());function Yf({theme:t,...e}){let r=_C.useMemo(()=>{if(typeof t=="function")return t;let i=jt in t?t[jt]:t;return"colorSchemes"in i?null:"vars"in i?t:{...t,vars:null}},[t]);return r?(0,Z0.jsx)(Q0,{theme:r,...e}):(0,Z0.jsx)(vC,{theme:t,...e})}var _c=K(Q());function yC(t){return Xe("MuiButton",t)}var iD=Je("MuiButton",["root","text","textInherit","textPrimary","textSecondary","textSuccess","textError","textInfo","textWarning","outlined","outlinedInherit","outlinedPrimary","outlinedSecondary","outlinedSuccess","outlinedError","outlinedInfo","outlinedWarning","contained","containedInherit","containedPrimary","containedSecondary","containedSuccess","containedError","containedInfo","containedWarning","disableElevation","focusVisible","disabled","colorInherit","colorPrimary","colorSecondary","colorSuccess","colorError","colorInfo","colorWarning","textSizeSmall","textSizeMedium","textSizeLarge","outlinedSizeSmall","outlinedSizeMedium","outlinedSizeLarge","containedSizeSmall","containedSizeMedium","containedSizeLarge","sizeMedium","sizeSmall","sizeLarge","fullWidth","startIcon","endIcon","icon","iconSizeSmall","iconSizeMedium","iconSizeLarge","loading","loadingWrapper","loadingIconPlaceholder","loadingIndicator","loadingPositionCenter","loadingPositionStart","loadingPositionEnd"]),Xn=iD;var SC=K(Q()),nD=SC.createContext({}),xC=nD;var bC=K(Q()),sD=bC.createContext(void 0),wC=sD;var Di=K(_e()),oD=t=>{let{color:e,disableElevation:r,fullWidth:i,size:s,variant:n,loading:o,loadingPosition:a,classes:l}=t,c={root:["root",o&&"loading",n,`${n}${Oe(e)}`,`size${Oe(s)}`,`${n}Size${Oe(s)}`,`color${Oe(e)}`,r&&"disableElevation",i&&"fullWidth",o&&`loadingPosition${Oe(a)}`],startIcon:["icon","startIcon",`iconSize${Oe(s)}`],endIcon:["icon","endIcon",`iconSize${Oe(s)}`],loadingIndicator:["loadingIndicator"],loadingWrapper:["loadingWrapper"]},u=Ye(c,yC,l);return{...l,...u}},kC=[{props:{size:"small"},style:{"& > *:nth-of-type(1)":{fontSize:18}}},{props:{size:"medium"},style:{"& > *:nth-of-type(1)":{fontSize:20}}},{props:{size:"large"},style:{"& > *:nth-of-type(1)":{fontSize:22}}}],aD=ye(Ys,{shouldForwardProp:t=>Bf(t)||t==="classes",name:"MuiButton",slot:"Root",overridesResolver:(t,e)=>{let{ownerState:r}=t;return[e.root,e[r.variant],e[`${r.variant}${Oe(r.color)}`],e[`size${Oe(r.size)}`],e[`${r.variant}Size${Oe(r.size)}`],r.color==="inherit"&&e.colorInherit,r.disableElevation&&e.disableElevation,r.fullWidth&&e.fullWidth,r.loading&&e.loading]}})(Yt(({theme:t})=>{let e=t.palette.mode==="light"?t.palette.grey[300]:t.palette.grey[800],r=t.palette.mode==="light"?t.palette.grey.A100:t.palette.grey[700];return{...t.typography.button,minWidth:64,padding:"6px 16px",border:0,borderRadius:(t.vars||t).shape.borderRadius,transition:t.transitions.create(["background-color","box-shadow","border-color","color"],{duration:t.transitions.duration.short}),"&:hover":{textDecoration:"none"},[`&.${Xn.disabled}`]:{color:(t.vars||t).palette.action.disabled},variants:[{props:{variant:"contained"},style:{color:"var(--variant-containedColor)",backgroundColor:"var(--variant-containedBg)",boxShadow:(t.vars||t).shadows[2],"&:hover":{boxShadow:(t.vars||t).shadows[4],"@media (hover: none)":{boxShadow:(t.vars||t).shadows[2]}},"&:active":{boxShadow:(t.vars||t).shadows[8]},[`&.${Xn.focusVisible}`]:{boxShadow:(t.vars||t).shadows[6]},[`&.${Xn.disabled}`]:{color:(t.vars||t).palette.action.disabled,boxShadow:(t.vars||t).shadows[0],backgroundColor:(t.vars||t).palette.action.disabledBackground}}},{props:{variant:"outlined"},style:{padding:"5px 15px",border:"1px solid currentColor",borderColor:"var(--variant-outlinedBorder, currentColor)",backgroundColor:"var(--variant-outlinedBg)",color:"var(--variant-outlinedColor)",[`&.${Xn.disabled}`]:{border:`1px solid ${(t.vars||t).palette.action.disabledBackground}`}}},{props:{variant:"text"},style:{padding:"6px 8px",color:"var(--variant-textColor)",backgroundColor:"var(--variant-textBg)"}},...Object.entries(t.palette).filter(Gs()).map(([i])=>({props:{color:i},style:{"--variant-textColor":(t.vars||t).palette[i].main,"--variant-outlinedColor":(t.vars||t).palette[i].main,"--variant-outlinedBorder":t.vars?`rgba(${t.vars.palette[i].mainChannel} / 0.5)`:Ri(t.palette[i].main,.5),"--variant-containedColor":(t.vars||t).palette[i].contrastText,"--variant-containedBg":(t.vars||t).palette[i].main,"@media (hover: hover)":{"&:hover":{"--variant-containedBg":(t.vars||t).palette[i].dark,"--variant-textBg":t.vars?`rgba(${t.vars.palette[i].mainChannel} / ${t.vars.palette.action.hoverOpacity})`:Ri(t.palette[i].main,t.palette.action.hoverOpacity),"--variant-outlinedBorder":(t.vars||t).palette[i].main,"--variant-outlinedBg":t.vars?`rgba(${t.vars.palette[i].mainChannel} / ${t.vars.palette.action.hoverOpacity})`:Ri(t.palette[i].main,t.palette.action.hoverOpacity)}}}})),{props:{color:"inherit"},style:{color:"inherit",borderColor:"currentColor","--variant-containedBg":t.vars?t.vars.palette.Button.inheritContainedBg:e,"@media (hover: hover)":{"&:hover":{"--variant-containedBg":t.vars?t.vars.palette.Button.inheritContainedHoverBg:r,"--variant-textBg":t.vars?`rgba(${t.vars.palette.text.primaryChannel} / ${t.vars.palette.action.hoverOpacity})`:Ri(t.palette.text.primary,t.palette.action.hoverOpacity),"--variant-outlinedBg":t.vars?`rgba(${t.vars.palette.text.primaryChannel} / ${t.vars.palette.action.hoverOpacity})`:Ri(t.palette.text.primary,t.palette.action.hoverOpacity)}}}},{props:{size:"small",variant:"text"},style:{padding:"4px 5px",fontSize:t.typography.pxToRem(13)}},{props:{size:"large",variant:"text"},style:{padding:"8px 11px",fontSize:t.typography.pxToRem(15)}},{props:{size:"small",variant:"outlined"},style:{padding:"3px 9px",fontSize:t.typography.pxToRem(13)}},{props:{size:"large",variant:"outlined"},style:{padding:"7px 21px",fontSize:t.typography.pxToRem(15)}},{props:{size:"small",variant:"contained"},style:{padding:"4px 10px",fontSize:t.typography.pxToRem(13)}},{props:{size:"large",variant:"contained"},style:{padding:"8px 22px",fontSize:t.typography.pxToRem(15)}},{props:{disableElevation:!0},style:{boxShadow:"none","&:hover":{boxShadow:"none"},[`&.${Xn.focusVisible}`]:{boxShadow:"none"},"&:active":{boxShadow:"none"},[`&.${Xn.disabled}`]:{boxShadow:"none"}}},{props:{fullWidth:!0},style:{width:"100%"}},{props:{loadingPosition:"center"},style:{transition:t.transitions.create(["background-color","box-shadow","border-color"],{duration:t.transitions.duration.short}),[`&.${Xn.loading}`]:{color:"transparent"}}}]}})),lD=ye("span",{name:"MuiButton",slot:"StartIcon",overridesResolver:(t,e)=>{let{ownerState:r}=t;return[e.startIcon,r.loading&&e.startIconLoadingStart,e[`iconSize${Oe(r.size)}`]]}})(({theme:t})=>({display:"inherit",marginRight:8,marginLeft:-4,variants:[{props:{size:"small"},style:{marginLeft:-2}},{props:{loadingPosition:"start",loading:!0},style:{transition:t.transitions.create(["opacity"],{duration:t.transitions.duration.short}),opacity:0}},{props:{loadingPosition:"start",loading:!0,fullWidth:!0},style:{marginRight:-8}},...kC]})),cD=ye("span",{name:"MuiButton",slot:"EndIcon",overridesResolver:(t,e)=>{let{ownerState:r}=t;return[e.endIcon,r.loading&&e.endIconLoadingEnd,e[`iconSize${Oe(r.size)}`]]}})(({theme:t})=>({display:"inherit",marginRight:-4,marginLeft:8,variants:[{props:{size:"small"},style:{marginRight:-2}},{props:{loadingPosition:"end",loading:!0},style:{transition:t.transitions.create(["opacity"],{duration:t.transitions.duration.short}),opacity:0}},{props:{loadingPosition:"end",loading:!0,fullWidth:!0},style:{marginLeft:-8}},...kC]})),hD=ye("span",{name:"MuiButton",slot:"LoadingIndicator",overridesResolver:(t,e)=>e.loadingIndicator})(({theme:t})=>({display:"none",position:"absolute",visibility:"visible",variants:[{props:{loading:!0},style:{display:"flex"}},{props:{loadingPosition:"start"},style:{left:14}},{props:{loadingPosition:"start",size:"small"},style:{left:10}},{props:{variant:"text",loadingPosition:"start"},style:{left:6}},{props:{loadingPosition:"center"},style:{left:"50%",transform:"translate(-50%)",color:(t.vars||t).palette.action.disabled}},{props:{loadingPosition:"end"},style:{right:14}},{props:{loadingPosition:"end",size:"small"},style:{right:10}},{props:{variant:"text",loadingPosition:"end"},style:{right:6}},{props:{loadingPosition:"start",fullWidth:!0},style:{position:"relative",left:-10}},{props:{loadingPosition:"end",fullWidth:!0},style:{position:"relative",right:-10}}]})),CC=ye("span",{name:"MuiButton",slot:"LoadingIconPlaceholder",overridesResolver:(t,e)=>e.loadingIconPlaceholder})({display:"inline-block",width:"1em",height:"1em"}),uD=_c.forwardRef(function(e,r){let i=_c.useContext(xC),s=_c.useContext(wC),n=wi(i,e),o=ht({props:n,name:"MuiButton"}),{children:a,color:l="primary",component:c="button",className:u,disabled:p=!1,disableElevation:g=!1,disableFocusRipple:m=!1,endIcon:h,focusVisibleClassName:d,fullWidth:v=!1,id:f,loading:_=null,loadingIndicator:S,loadingPosition:b="center",size:C="medium",startIcon:y,type:w,variant:T="text",...k}=o,x=$0(f),E=S??(0,Di.jsx)(J0,{"aria-labelledby":x,color:"inherit",size:16}),R={...o,color:l,component:c,disabled:p,disableElevation:g,disableFocusRipple:m,fullWidth:v,loading:_,loadingIndicator:E,loadingPosition:b,size:C,type:w,variant:T},L=oD(R),O=(y||_&&b==="start")&&(0,Di.jsx)(lD,{className:L.startIcon,ownerState:R,children:y||(0,Di.jsx)(CC,{className:L.loadingIconPlaceholder,ownerState:R})}),I=(h||_&&b==="end")&&(0,Di.jsx)(cD,{className:L.endIcon,ownerState:R,children:h||(0,Di.jsx)(CC,{className:L.loadingIconPlaceholder,ownerState:R})}),P=s||"",A=typeof _=="boolean"?(0,Di.jsx)("span",{className:L.loadingWrapper,style:{display:"contents"},children:_&&(0,Di.jsx)(hD,{className:L.loadingIndicator,ownerState:R,children:E})}):null;return(0,Di.jsxs)(aD,{ownerState:R,className:ue(i.className,L.root,u,P),component:c,disabled:p||_,focusRipple:!m,focusVisibleClassName:ue(L.focusVisible,d),ref:r,type:w,id:_?x:f,...k,classes:L,children:[O,b!=="end"&&A,a,b==="end"&&A,I]})}),Xs=uD;var Oi=K(Q());var TC=K(_e()),EC=Oi.createContext(null);function fD(){let[t,e]=Oi.useState(null);return Oi.useEffect(()=>{e(`mui-p-${Math.round(Math.random()*1e5)}`)},[]),t}function yc(t){let{children:e,value:r}=t,i=fD(),s=Oi.useMemo(()=>({idPrefix:i,value:r}),[i,r]);return(0,TC.jsx)(EC.Provider,{value:s,children:e})}function Xf(){return Oi.useContext(EC)}function Jf(t,e){let{idPrefix:r}=t;return r===null?null:`${t.idPrefix}-P-${e}`}function Qf(t,e){let{idPrefix:r}=t;return r===null?null:`${t.idPrefix}-T-${e}`}var Jn=K(Q());var Ve=K(Q());function dD(t){return(1+Math.sin(Math.PI*t-Math.PI/2))/2}function ev(t,e,r,i={},s=()=>{}){let{ease:n=dD,duration:o=300}=i,a=null,l=e[t],c=!1,u=()=>{c=!0},p=g=>{if(c){s(new Error("Animation cancelled"));return}a===null&&(a=g);let m=Math.min(1,(g-a)/o);if(e[t]=n(m)*(r-l)+l,m>=1){requestAnimationFrame(()=>{s(null)});return}requestAnimationFrame(p)};return l===r?(s(new Error("Element already at target position")),u):(requestAnimationFrame(p),u)}var Sc=K(Q());var PC=K(_e()),pD={width:99,height:99,position:"absolute",top:-9999,overflow:"scroll"};function tv(t){let{onChange:e,...r}=t,i=Sc.useRef(),s=Sc.useRef(null),n=()=>{i.current=s.current.offsetHeight-s.current.clientHeight};return z0(()=>{let o=Ks(()=>{let l=i.current;n(),l!==i.current&&e(i.current)}),a=dc(s.current);return a.addEventListener("resize",o),()=>{o.clear(),a.removeEventListener("resize",o)}},[e]),Sc.useEffect(()=>{n(),e(i.current)},[e]),(0,PC.jsx)("div",{style:pD,...r,ref:s})}var BC=K(Q());var LU=K(Q());var RC=K(_e()),MC=hi((0,RC.jsx)("path",{d:"M15.41 16.09l-4.58-4.59 4.58-4.59L14 5.5l-6 6 6 6z"}),"KeyboardArrowLeft");var BU=K(Q());var AC=K(_e()),LC=hi((0,AC.jsx)("path",{d:"M8.59 16.34l4.58-4.59-4.58-4.59L10 5.75l6 6-6 6z"}),"KeyboardArrowRight");function DC(t){return Xe("MuiTabScrollButton",t)}var mD=Je("MuiTabScrollButton",["root","vertical","horizontal","disabled"]),OC=mD;var Zf=K(_e()),gD=t=>{let{classes:e,orientation:r,disabled:i}=t;return Ye({root:["root",r,i&&"disabled"]},DC,e)},vD=ye(Ys,{name:"MuiTabScrollButton",slot:"Root",overridesResolver:(t,e)=>{let{ownerState:r}=t;return[e.root,r.orientation&&e[r.orientation]]}})({width:40,flexShrink:0,opacity:.8,[`&.${OC.disabled}`]:{opacity:0},variants:[{props:{orientation:"vertical"},style:{width:"100%",height:40,"& svg":{transform:"var(--TabScrollButton-svgRotate)"}}}]}),_D=BC.forwardRef(function(e,r){let i=ht({props:e,name:"MuiTabScrollButton"}),{className:s,slots:n={},slotProps:o={},direction:a,orientation:l,disabled:c,...u}=i,p=Tf(),g={isRtl:p,...i},m=gD(g),h=n.StartScrollButtonIcon??MC,d=n.EndScrollButtonIcon??LC,v=Ms({elementType:h,externalSlotProps:o.startScrollButtonIcon,additionalProps:{fontSize:"small"},ownerState:g}),f=Ms({elementType:d,externalSlotProps:o.endScrollButtonIcon,additionalProps:{fontSize:"small"},ownerState:g});return(0,Zf.jsx)(vD,{component:"div",className:ue(m.root,s),ref:r,role:null,ownerState:g,tabIndex:null,...u,style:{...u.style,...l==="vertical"&&{"--TabScrollButton-svgRotate":`rotate(${p?-90:90}deg)`}},children:a==="left"?(0,Zf.jsx)(h,{...v}):(0,Zf.jsx)(d,{...f})})}),rv=_D;function IC(t){return Xe("MuiTabs",t)}var yD=Je("MuiTabs",["root","vertical","list","flexContainer","flexContainerVertical","centered","scroller","fixed","scrollableX","scrollableY","hideScrollbar","scrollButtons","scrollButtonsHideMobile","indicator"]),ed=yD;var fn=K(_e()),NC=(t,e)=>t===e?t.firstChild:e&&e.nextElementSibling?e.nextElementSibling:t.firstChild,FC=(t,e)=>t===e?t.lastChild:e&&e.previousElementSibling?e.previousElementSibling:t.lastChild,td=(t,e,r)=>{let i=!1,s=r(t,e);for(;s;){if(s===t.firstChild){if(i)return;i=!0}let n=s.disabled||s.getAttribute("aria-disabled")==="true";if(!s.hasAttribute("tabindex")||n)s=r(t,s);else{s.focus();return}}},SD=t=>{let{vertical:e,fixed:r,hideScrollbar:i,scrollableX:s,scrollableY:n,centered:o,scrollButtonsHideMobile:a,classes:l}=t;return Ye({root:["root",e&&"vertical"],scroller:["scroller",r&&"fixed",i&&"hideScrollbar",s&&"scrollableX",n&&"scrollableY"],list:["list","flexContainer",e&&"flexContainerVertical",e&&"vertical",o&&"centered"],indicator:["indicator"],scrollButtons:["scrollButtons",a&&"scrollButtonsHideMobile"],scrollableX:[s&&"scrollableX"],hideScrollbar:[i&&"hideScrollbar"]},IC,l)},xD=ye("div",{name:"MuiTabs",slot:"Root",overridesResolver:(t,e)=>{let{ownerState:r}=t;return[{[`& .${ed.scrollButtons}`]:e.scrollButtons},{[`& .${ed.scrollButtons}`]:r.scrollButtonsHideMobile&&e.scrollButtonsHideMobile},e.root,r.vertical&&e.vertical]}})(Yt(({theme:t})=>({overflow:"hidden",minHeight:48,WebkitOverflowScrolling:"touch",display:"flex",variants:[{props:({ownerState:e})=>e.vertical,style:{flexDirection:"column"}},{props:({ownerState:e})=>e.scrollButtonsHideMobile,style:{[`& .${ed.scrollButtons}`]:{[t.breakpoints.down("sm")]:{display:"none"}}}}]}))),bD=ye("div",{name:"MuiTabs",slot:"Scroller",overridesResolver:(t,e)=>{let{ownerState:r}=t;return[e.scroller,r.fixed&&e.fixed,r.hideScrollbar&&e.hideScrollbar,r.scrollableX&&e.scrollableX,r.scrollableY&&e.scrollableY]}})({position:"relative",display:"inline-block",flex:"1 1 auto",whiteSpace:"nowrap",variants:[{props:({ownerState:t})=>t.fixed,style:{overflowX:"hidden",width:"100%"}},{props:({ownerState:t})=>t.hideScrollbar,style:{scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"}}},{props:({ownerState:t})=>t.scrollableX,style:{overflowX:"auto",overflowY:"hidden"}},{props:({ownerState:t})=>t.scrollableY,style:{overflowY:"auto",overflowX:"hidden"}}]}),wD=ye("div",{name:"MuiTabs",slot:"List",overridesResolver:(t,e)=>{let{ownerState:r}=t;return[e.list,e.flexContainer,r.vertical&&e.flexContainerVertical,r.centered&&e.centered]}})({display:"flex",variants:[{props:({ownerState:t})=>t.vertical,style:{flexDirection:"column"}},{props:({ownerState:t})=>t.centered,style:{justifyContent:"center"}}]}),CD=ye("span",{name:"MuiTabs",slot:"Indicator",overridesResolver:(t,e)=>e.indicator})(Yt(({theme:t})=>({position:"absolute",height:2,bottom:0,width:"100%",transition:t.transitions.create(),variants:[{props:{indicatorColor:"primary"},style:{backgroundColor:(t.vars||t).palette.primary.main}},{props:{indicatorColor:"secondary"},style:{backgroundColor:(t.vars||t).palette.secondary.main}},{props:({ownerState:e})=>e.vertical,style:{height:"100%",width:2,right:0}}]}))),kD=ye(tv)({overflowX:"auto",overflowY:"hidden",scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"}}),HC={};var TD=Ve.forwardRef(function(e,r){let i=ht({props:e,name:"MuiTabs"}),s=ba(),n=Tf(),{"aria-label":o,"aria-labelledby":a,action:l,centered:c=!1,children:u,className:p,component:g="div",allowScrollButtonsMobile:m=!1,indicatorColor:h="primary",onChange:d,orientation:v="horizontal",ScrollButtonComponent:f,scrollButtons:_="auto",selectionFollowsFocus:S,slots:b={},slotProps:C={},TabIndicatorProps:y={},TabScrollButtonProps:w={},textColor:T="primary",value:k,variant:x="standard",visibleScrollbar:E=!1,...R}=i,L=x==="scrollable",O=v==="vertical",I=O?"scrollTop":"scrollLeft",P=O?"top":"left",A=O?"bottom":"right",D=O?"clientHeight":"clientWidth",B=O?"height":"width",H={...i,component:g,allowScrollButtonsMobile:m,indicatorColor:h,orientation:v,vertical:O,scrollButtons:_,textColor:T,variant:x,visibleScrollbar:E,fixed:!L,hideScrollbar:L&&!E,scrollableX:L&&!O,scrollableY:L&&O,centered:c&&!L,scrollButtonsHideMobile:!m},j=SD(H),U=Ms({elementType:b.StartScrollButtonIcon,externalSlotProps:C.startScrollButtonIcon,ownerState:H}),G=Ms({elementType:b.EndScrollButtonIcon,externalSlotProps:C.endScrollButtonIcon,ownerState:H}),[re,M]=Ve.useState(!1),[N,$]=Ve.useState(HC),[z,se]=Ve.useState(!1),[X,me]=Ve.useState(!1),[Le,Ie]=Ve.useState(!1),[de,le]=Ve.useState({overflow:"hidden",scrollbarWidth:0}),Ct=new Map,$e=Ve.useRef(null),be=Ve.useRef(null),kt={slots:b,slotProps:{indicator:y,scrollButton:w,...C}},he=()=>{let te=$e.current,ae;if(te){let Me=te.getBoundingClientRect();ae={clientWidth:te.clientWidth,scrollLeft:te.scrollLeft,scrollTop:te.scrollTop,scrollWidth:te.scrollWidth,top:Me.top,bottom:Me.bottom,left:Me.left,right:Me.right}}let Fe;if(te&&k!==!1){let Me=be.current.children;if(Me.length>0){let yt=Me[Ct.get(k)];Fe=yt?yt.getBoundingClientRect():null}}return{tabsMeta:ae,tabMeta:Fe}},ne=hn(()=>{let{tabsMeta:te,tabMeta:ae}=he(),Fe=0,Me;O?(Me="top",ae&&te&&(Fe=ae.top-te.top+te.scrollTop)):(Me=n?"right":"left",ae&&te&&(Fe=(n?-1:1)*(ae[Me]-te[Me]+te.scrollLeft)));let yt={[Me]:Fe,[B]:ae?ae[B]:0};if(typeof N[Me]!="number"||typeof N[B]!="number")$(yt);else{let mi=Math.abs(N[Me]-yt[Me]),ds=Math.abs(N[B]-yt[B]);(mi>=1||ds>=1)&&$(yt)}}),Y=(te,{animation:ae=!0}={})=>{ae?ev(I,$e.current,te,{duration:s.transitions.duration.standard}):$e.current[I]=te},ie=te=>{let ae=$e.current[I];O?ae+=te:ae+=te*(n?-1:1),Y(ae)},oe=()=>{let te=$e.current[D],ae=0,Fe=Array.from(be.current.children);for(let Me=0;Me<Fe.length;Me+=1){let yt=Fe[Me];if(ae+yt[D]>te){Me===0&&(ae=te);break}ae+=yt[D]}return ae},Pe=()=>{ie(-1*oe())},ve=()=>{ie(oe())},[ut,{onChange:Ne,...dt}]=Gn("scrollbar",{className:ue(j.scrollableX,j.hideScrollbar),elementType:kD,shouldForwardComponentProp:!0,externalForwardedProps:kt,ownerState:H}),ge=Ve.useCallback(te=>{Ne?.(te),le({overflow:null,scrollbarWidth:te})},[Ne]),[Zt,go]=Gn("scrollButtons",{className:ue(j.scrollButtons,w.className),elementType:rv,externalForwardedProps:kt,ownerState:H,additionalProps:{orientation:v,slots:{StartScrollButtonIcon:b.startScrollButtonIcon||b.StartScrollButtonIcon,EndScrollButtonIcon:b.endScrollButtonIcon||b.EndScrollButtonIcon},slotProps:{startScrollButtonIcon:U,endScrollButtonIcon:G}}}),vo=()=>{let te={};te.scrollbarSizeListener=L?(0,fn.jsx)(ut,{...dt,onChange:ge}):null;let Fe=L&&(_==="auto"&&(z||X)||_===!0);return te.scrollButtonStart=Fe?(0,fn.jsx)(Zt,{direction:n?"right":"left",onClick:Pe,disabled:!z,...go}):null,te.scrollButtonEnd=Fe?(0,fn.jsx)(Zt,{direction:n?"left":"right",onClick:ve,disabled:!X,...go}):null,te},us=hn(te=>{let{tabsMeta:ae,tabMeta:Fe}=he();if(!(!Fe||!ae)){if(Fe[P]<ae[P]){let Me=ae[I]+(Fe[P]-ae[P]);Y(Me,{animation:te})}else if(Fe[A]>ae[A]){let Me=ae[I]+(Fe[A]-ae[A]);Y(Me,{animation:te})}}}),fs=hn(()=>{L&&_!==!1&&Ie(!Le)});Ve.useEffect(()=>{let te=Ks(()=>{$e.current&&ne()}),ae,Fe=mi=>{mi.forEach(ds=>{ds.removedNodes.forEach(ja=>{ae?.unobserve(ja)}),ds.addedNodes.forEach(ja=>{ae?.observe(ja)})}),te(),fs()},Me=dc($e.current);Me.addEventListener("resize",te);let yt;return typeof ResizeObserver<"u"&&(ae=new ResizeObserver(te),Array.from(be.current.children).forEach(mi=>{ae.observe(mi)})),typeof MutationObserver<"u"&&(yt=new MutationObserver(Fe),yt.observe(be.current,{childList:!0})),()=>{te.clear(),Me.removeEventListener("resize",te),yt?.disconnect(),ae?.disconnect()}},[ne,fs]),Ve.useEffect(()=>{let te=Array.from(be.current.children),ae=te.length;if(typeof IntersectionObserver<"u"&&ae>0&&L&&_!==!1){let Fe=te[0],Me=te[ae-1],yt={root:$e.current,threshold:.99},mi=xp=>{se(!xp[0].isIntersecting)},ds=new IntersectionObserver(mi,yt);ds.observe(Fe);let ja=xp=>{me(!xp[0].isIntersecting)},ay=new IntersectionObserver(ja,yt);return ay.observe(Me),()=>{ds.disconnect(),ay.disconnect()}}},[L,_,Le,u?.length]),Ve.useEffect(()=>{M(!0)},[]),Ve.useEffect(()=>{ne()}),Ve.useEffect(()=>{us(HC!==N)},[us,N]),Ve.useImperativeHandle(l,()=>({updateIndicator:ne,updateScrollButtons:fs}),[ne,fs]);let[pE,mE]=Gn("indicator",{className:ue(j.indicator,y.className),elementType:CD,externalForwardedProps:kt,ownerState:H,additionalProps:{style:N}}),oy=(0,fn.jsx)(pE,{...mE}),lh=0,gE=Ve.Children.map(u,te=>{if(!Ve.isValidElement(te))return null;let ae=te.props.value===void 0?lh:te.props.value;Ct.set(ae,lh);let Fe=ae===k;return lh+=1,Ve.cloneElement(te,{fullWidth:x==="fullWidth",indicator:Fe&&!re&&oy,selected:Fe,selectionFollowsFocus:S,onChange:d,textColor:T,value:ae,...lh===1&&k===!1&&!te.props.tabIndex?{tabIndex:0}:{}})}),vE=te=>{if(te.altKey||te.shiftKey||te.ctrlKey||te.metaKey)return;let ae=be.current,Fe=Yw(ae).activeElement;if(Fe.getAttribute("role")!=="tab")return;let yt=v==="horizontal"?"ArrowLeft":"ArrowUp",mi=v==="horizontal"?"ArrowRight":"ArrowDown";switch(v==="horizontal"&&n&&(yt="ArrowRight",mi="ArrowLeft"),te.key){case yt:te.preventDefault(),td(ae,Fe,FC);break;case mi:te.preventDefault(),td(ae,Fe,NC);break;case"Home":te.preventDefault(),td(ae,null,NC);break;case"End":te.preventDefault(),td(ae,null,FC);break;default:break}},Sp=vo(),[_E,yE]=Gn("root",{ref:r,className:ue(j.root,p),elementType:xD,externalForwardedProps:{...kt,...R,component:g},ownerState:H}),[SE,xE]=Gn("scroller",{ref:$e,className:j.scroller,elementType:bD,externalForwardedProps:kt,ownerState:H,additionalProps:{style:{overflow:de.overflow,[O?`margin${n?"Left":"Right"}`:"marginBottom"]:E?void 0:-de.scrollbarWidth}}}),[bE,wE]=Gn("list",{ref:be,className:ue(j.list,j.flexContainer),elementType:wD,externalForwardedProps:kt,ownerState:H,getSlotProps:te=>({...te,onKeyDown:ae=>{vE(ae),te.onKeyDown?.(ae)}})});return(0,fn.jsxs)(_E,{...yE,children:[Sp.scrollButtonStart,Sp.scrollbarSizeListener,(0,fn.jsxs)(SE,{...xE,children:[(0,fn.jsx)(bE,{"aria-label":o,"aria-labelledby":a,"aria-orientation":v==="vertical"?"vertical":null,role:"tablist",...wE,children:gE}),re&&oy]}),Sp.scrollButtonEnd]})}),iv=TD;var zC=K(_e()),ED=["children"],PD=Jn.forwardRef(function(e,r){let{children:i}=e,s=qn(e,ED),n=Xf();if(n===null)throw new TypeError("No TabContext provided");let o=Jn.Children.map(i,a=>Jn.isValidElement(a)?Jn.cloneElement(a,{"aria-controls":Jf(n,a.props.value),id:Qf(n,a.props.value)}):null);return(0,zC.jsx)(iv,Se({},s,{ref:r,value:n.value,children:o}))}),rd=PD;var jC=K(Q());function $C(t){return Xe("MuiTabPanel",t)}var DK=Je("MuiTabPanel",["root","hidden"]);var WC=K(_e()),RD=["children","className","value","keepMounted"],MD=t=>{let{classes:e,hidden:r}=t;return Ye({root:["root",r&&"hidden"]},$C,e)},AD=ye("div",{name:"MuiTabPanel",slot:"Root",overridesResolver:(t,e)=>e.root})(({theme:t})=>({padding:t.spacing(3)})),LD=jC.forwardRef(function(e,r){let i=qf({props:e,name:"MuiTabPanel"}),{children:s,className:n,value:o,keepMounted:a=!1}=i,l=qn(i,RD),c=Se({},i),u=MD(c),p=Xf();if(p===null)throw new TypeError("No TabContext provided");let g=Jf(p,o),m=Qf(p,o);return(0,WC.jsx)(AD,Se({"aria-labelledby":m,className:ue(u.root,n),hidden:o!==p.value,id:g,ref:r,role:"tabpanel",ownerState:c},l,{children:(a||o===p.value)&&s}))}),id=LD;var DD=Je("MuiBox",["root"]),VC=DD;var OD=Ai(),BD=rc({themeId:jt,defaultTheme:OD,defaultClassName:VC.root,generateClassName:Rs.generate}),wa=BD;var ID=Lf({createStyledComponent:ye("div",{name:"MuiStack",slot:"Root",overridesResolver:(t,e)=>e.root}),useThemeProps:t=>ht({props:t,name:"MuiStack"})}),Xt=ID;var dn=K(Q());function UC(t){return Xe("MuiTab",t)}var ND=Je("MuiTab",["root","labelIcon","textColorInherit","textColorPrimary","textColorSecondary","selected","disabled","fullWidth","wrapped","iconWrapper","icon"]),Lr=ND;var nd=K(_e()),FD=t=>{let{classes:e,textColor:r,fullWidth:i,wrapped:s,icon:n,label:o,selected:a,disabled:l}=t,c={root:["root",n&&o&&"labelIcon",`textColor${Oe(r)}`,i&&"fullWidth",s&&"wrapped",a&&"selected",l&&"disabled"],icon:["iconWrapper","icon"]};return Ye(c,UC,e)},HD=ye(Ys,{name:"MuiTab",slot:"Root",overridesResolver:(t,e)=>{let{ownerState:r}=t;return[e.root,r.label&&r.icon&&e.labelIcon,e[`textColor${Oe(r.textColor)}`],r.fullWidth&&e.fullWidth,r.wrapped&&e.wrapped,{[`& .${Lr.iconWrapper}`]:e.iconWrapper},{[`& .${Lr.icon}`]:e.icon}]}})(Yt(({theme:t})=>({...t.typography.button,maxWidth:360,minWidth:90,position:"relative",minHeight:48,flexShrink:0,padding:"12px 16px",overflow:"hidden",whiteSpace:"normal",textAlign:"center",lineHeight:1.25,variants:[{props:({ownerState:e})=>e.label&&(e.iconPosition==="top"||e.iconPosition==="bottom"),style:{flexDirection:"column"}},{props:({ownerState:e})=>e.label&&e.iconPosition!=="top"&&e.iconPosition!=="bottom",style:{flexDirection:"row"}},{props:({ownerState:e})=>e.icon&&e.label,style:{minHeight:72,paddingTop:9,paddingBottom:9}},{props:({ownerState:e,iconPosition:r})=>e.icon&&e.label&&r==="top",style:{[`& > .${Lr.icon}`]:{marginBottom:6}}},{props:({ownerState:e,iconPosition:r})=>e.icon&&e.label&&r==="bottom",style:{[`& > .${Lr.icon}`]:{marginTop:6}}},{props:({ownerState:e,iconPosition:r})=>e.icon&&e.label&&r==="start",style:{[`& > .${Lr.icon}`]:{marginRight:t.spacing(1)}}},{props:({ownerState:e,iconPosition:r})=>e.icon&&e.label&&r==="end",style:{[`& > .${Lr.icon}`]:{marginLeft:t.spacing(1)}}},{props:{textColor:"inherit"},style:{color:"inherit",opacity:.6,[`&.${Lr.selected}`]:{opacity:1},[`&.${Lr.disabled}`]:{opacity:(t.vars||t).palette.action.disabledOpacity}}},{props:{textColor:"primary"},style:{color:(t.vars||t).palette.text.secondary,[`&.${Lr.selected}`]:{color:(t.vars||t).palette.primary.main},[`&.${Lr.disabled}`]:{color:(t.vars||t).palette.text.disabled}}},{props:{textColor:"secondary"},style:{color:(t.vars||t).palette.text.secondary,[`&.${Lr.selected}`]:{color:(t.vars||t).palette.secondary.main},[`&.${Lr.disabled}`]:{color:(t.vars||t).palette.text.disabled}}},{props:({ownerState:e})=>e.fullWidth,style:{flexShrink:1,flexGrow:1,flexBasis:0,maxWidth:"none"}},{props:({ownerState:e})=>e.wrapped,style:{fontSize:t.typography.pxToRem(12)}}]}))),zD=dn.forwardRef(function(e,r){let i=ht({props:e,name:"MuiTab"}),{className:s,disabled:n=!1,disableFocusRipple:o=!1,fullWidth:a,icon:l,iconPosition:c="top",indicator:u,label:p,onChange:g,onClick:m,onFocus:h,selected:d,selectionFollowsFocus:v,textColor:f="inherit",value:_,wrapped:S=!1,...b}=i,C={...i,disabled:n,disableFocusRipple:o,selected:d,icon:!!l,iconPosition:c,label:!!p,fullWidth:a,textColor:f,wrapped:S},y=FD(C),w=l&&p&&dn.isValidElement(l)?dn.cloneElement(l,{className:ue(y.icon,l.props.className)}):l,T=x=>{!d&&g&&g(x,_),m&&m(x)},k=x=>{v&&!d&&g&&g(x,_),h&&h(x)};return(0,nd.jsxs)(HD,{focusRipple:!o,className:ue(y.root,s),ref:r,role:"tab","aria-selected":d,disabled:n,onClick:T,onFocus:k,ownerState:C,tabIndex:d?0:-1,...b,children:[c==="top"||c==="start"?(0,nd.jsxs)(dn.Fragment,{children:[w,p]}):(0,nd.jsxs)(dn.Fragment,{children:[p,w]}),u]})}),sd=zD;var ke=K(Q());var od=K(Q()),$D=t=>od.createElement("svg",{id:"icon",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 100 100",width:29,height:28,...t},od.createElement("title",null,"plugin_icons_0918_RGB_openshift_black"),od.createElement("path",{d:"M85.36,14.64a50,50,0,1,0,0,70.72A50,50,0,0,0,85.36,14.64ZM26.07,55.75a30.5,30.5,0,0,1-.82-4.94l-4.34,1.58A29.77,29.77,0,0,1,74.83,32.77l4.33-1.58c.37.51.7,1,1,1.57h0A29.32,29.32,0,0,1,81.7,35.5l-9.24,3.37a30.22,30.22,0,0,1,2.92,10.72l4.91-1.79a30,30,0,0,1,0,4.13h0a29.49,29.49,0,0,1-2.71,10.75A29.84,29.84,0,0,1,38,77.1a29.49,29.49,0,0,1-9-6.47h0a29.9,29.9,0,0,1-2.65-3.21L21.48,69.2a30.05,30.05,0,0,1-4.65-10.08Zm.65-.24a19.54,19.54,0,0,0,5.15,9.91l4.92-1.79a19.33,19.33,0,0,0,3.57,2.88l-.24-.18a18.43,18.43,0,0,0,2.3,1.3,19.36,19.36,0,0,0,25.72-9.36,19,19,0,0,0,1.13-3.08c-.08.29-.16.58-.26.87a19,19,0,0,0,.88-4.48L65,53.37a19.39,19.39,0,0,0-2.42-10.9l9.25-3.37A21,21,0,0,0,70,36.46h0A17,17,0,0,0,68.78,35l0,0-4.34,1.58a19.31,19.31,0,0,0-33.08,12L35.67,47a16.24,16.24,0,0,0,0,2.09c0-.16,0-.33,0-.49A19.83,19.83,0,0,0,36,52.15Z"})),nv=$D;var ar=K(Q()),jD=t=>ar.createElement("svg",{"xmlns:dc":"http://purl.org/dc/elements/1.1/","xmlns:cc":"http://creativecommons.org/ns#","xmlns:rdf":"http://www.w3.org/1999/02/22-rdf-syntax-ns#","xmlns:svg":"http://www.w3.org/2000/svg",xmlns:"http://www.w3.org/2000/svg","xmlns:sodipodi":"http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd","xmlns:inkscape":"http://www.inkscape.org/namespaces/inkscape",width:16,height:16,viewBox:"0 0 4.2333332 4.2333335",id:"svg8","inkscape:version":"0.92.4 (unknown)","sodipodi:docname":"vscode-knative-new.svg",...t},ar.createElement("defs",{id:"defs2"}),ar.createElement("sodipodi:namedview",{id:"base",pagecolor:"#ffffff",bordercolor:"#666666",borderopacity:1,"inkscape:pageopacity":0,"inkscape:pageshadow":2,"inkscape:zoom":45.254834,"inkscape:cx":17.556751,"inkscape:cy":7.1095266,"inkscape:document-units":"mm","inkscape:current-layer":"layer1",showgrid:"false","inkscape:window-width":2560,"inkscape:window-height":1371,"inkscape:window-x":1920,"inkscape:window-y":32,"inkscape:window-maximized":1,units:"px","inkscape:pagecheckerboard":"true"}),ar.createElement("metadata",{id:"metadata5"},ar.createElement("rdf:RDF",null,ar.createElement("cc:Work",{"rdf:about":""},ar.createElement("dc:format",null,"image/svg+xml"),ar.createElement("dc:type",{"rdf:resource":"http://purl.org/dc/dcmitype/StillImage"}),ar.createElement("dc:title",null)))),ar.createElement("g",{"inkscape:label":"Layer 1","inkscape:groupmode":"layer",id:"layer1",transform:"translate(0,-292.76665)"},ar.createElement("path",{"sodipodi:type":"star",style:{opacity:1,fill:"none",fillOpacity:1,strokeWidth:.01216322,strokeMiterlimit:4,strokeDasharray:"none",stroke:"none",strokeOpacity:1},id:"path821","sodipodi:sides":7,"sodipodi:cx":1.8428989,"sodipodi:cy":294.96329,"sodipodi:r1":1.769226,"sodipodi:r2":1.5940177,"sodipodi:arg1":1.1246908,"sodipodi:arg2":1.5734898,"inkscape:flatsided":"true","inkscape:rounded":0,"inkscape:randomized":0,d:"m 2.6062411,296.55937 -1.5352712,-0.004 -0.95399294,-1.2029 0.34566145,-1.49586 1.38502569,-0.6624 1.3814374,0.66985 0.3375985,1.4977 z","inkscape:transform-center-x":.0010604645,"inkscape:transform-center-y":-.086589138}),ar.createElement("path",{"sodipodi:type":"star",style:{opacity:1,fill:"none",fillOpacity:1,stroke:"none",strokeWidth:.04429172,strokeMiterlimit:4,strokeDasharray:"none",strokeOpacity:1},id:"path823","sodipodi:sides":9,"sodipodi:cx":3.3682271,"sodipodi:cy":293.93885,"sodipodi:r1":.85589981,"sodipodi:r2":.76630896,"sodipodi:arg1":1.2193516,"sodipodi:arg2":1.5684175,"inkscape:flatsided":"true","inkscape:rounded":0,"inkscape:randomized":0,d:"m 3.6628744,294.74243 -0.5854683,0.001 -0.4493899,-0.37527 -0.1030371,-0.57633 0.2915279,-0.50772 0.5496839,-0.20155 0.5506366,0.19893 0.2939403,0.50633 -0.1002939,0.57682 z","inkscape:transform-center-x":-.0014770388,"inkscape:transform-center-y":-.040690139}),ar.createElement("path",{style:{opacity:1,fill:"#024c93",fillOpacity:1,stroke:"none",strokeWidth:.00167033,strokeMiterlimit:4,strokeDasharray:"none",strokeOpacity:1},d:"M 5.1419657,14.291291 4.0580464,14.285685 2.2696216,12.031782 C 0.96847903,10.391988 0.48120716,9.7703536 0.48123492,9.7502581 0.4812559,9.7350663 0.77192277,8.4662435 1.1271613,6.9306519 L 1.7730496,4.138667 4.3640692,2.8987666 C 5.78913,2.2168214 6.9657913,1.6584913 6.9788719,1.6580331 c 0.026185,-9.172e-4 2.9205373,1.3971822 2.9206092,1.4107824 2.21e-5,0.00465 -0.1011103,0.1843717 -0.2247439,0.3993864 l -0.2247887,0.390936 0.2006844,1.1221436 c 0.1890895,1.0573102 0.2022366,1.1233884 0.2275507,1.1436882 0.014776,0.01185 0.4072124,0.3399133 0.8720804,0.7290306 l 0.845213,0.707486 0.676723,5.8e-4 c 0.372198,3.193e-4 0.676724,0.00393 0.676724,0.00803 0,0.0041 0.112073,0.5045872 0.249052,1.1121999 0.136977,0.6076129 0.247601,1.1105504 0.24583,1.1176391 -0.0018,0.00709 -0.813396,1.0230107 -1.803611,2.2576057 l -1.8003877,2.244717 -1.8069611,-0.0027 c -0.9938287,-0.0015 -2.2947248,-0.0052 -2.8908805,-0.0083 z M 5.8668074,10.335266 V 9.2629919 L 6.1402588,8.9156927 c 0.2085033,-0.2648113 0.2760756,-0.3437202 0.2845,-0.3322304 0.00608,0.00829 0.343871,0.6470957 0.750654,1.4195727 l 0.7396054,1.404505 h 0.6998562 0.699856 L 9.3015828,11.38268 C 9.2943516,11.369008 8.8291,10.505911 8.2676902,9.4646884 7.6048124,8.2352767 7.2503544,7.5670887 7.2566692,7.5588146 7.2620175,7.5518071 7.7061504,6.9966849 8.2436316,6.3252096 8.7811126,5.6537344 9.2247056,5.0981308 9.2293936,5.0905349 9.2361787,5.0795412 9.0928334,5.0767242 8.5265963,5.0767242 H 7.8152754 L 6.8438035,6.3173512 5.8723317,7.5579783 5.8695221,6.3173512 5.8667126,5.0767242 H 5.236993 4.6072734 V 8.2421319 11.40754 h 0.629767 0.629767 z",id:"path985","inkscape:connector-curvature":0,transform:"matrix(0.26458333,0,0,0.26458333,0,292.76665)"}),ar.createElement("path",{style:{opacity:1,fill:"#52b3dd",fillOpacity:1,stroke:"none",strokeWidth:83517e-8,strokeMiterlimit:4,strokeDasharray:"none",strokeOpacity:1},d:"M 10.83885,6.6983371 C 10.387137,6.3211002 10.015386,6.0072525 10.012738,6.0008978 10.008462,5.9906375 9.6377179,3.9226169 9.6359523,3.8991777 9.6355615,3.8939898 9.8758158,3.4707491 10.169851,2.9586426 L 10.70446,2.02754 11.710827,1.6584347 c 0.553502,-0.2030079 1.008854,-0.3691541 1.011892,-0.3692138 0.003,-5.97e-5 0.434346,0.1548385 0.958461,0.3442183 0.524115,0.1893797 0.977796,0.3532986 1.00818,0.3642642 l 0.05524,0.019937 0.539897,0.9299614 0.539897,0.9299614 -0.182481,1.0503657 c -0.100364,0.5777011 -0.183714,1.0545575 -0.185222,1.0596809 -0.0015,0.00512 -0.370718,0.3195926 -0.820465,0.6988204 l -0.817723,0.6895051 -0.04518,0.00359 c -0.02485,0.00198 -0.510482,0.00384 -1.07918,0.00414 l -1.033994,5.486e-4 z m 1.499932,-1.79423 c 0,-0.7315883 8.3e-5,-0.733777 0.03277,-0.8593072 0.04913,-0.1887103 0.158499,-0.3295936 0.302349,-0.3894788 0.05914,-0.024618 0.111689,-0.034452 0.186929,-0.034976 0.08011,-5.584e-4 0.111367,0.00623 0.177828,0.038601 0.08742,0.042581 0.141891,0.1081906 0.166876,0.2009848 0.03004,0.1115534 0.03354,0.2173051 0.03363,1.014891 l 7.8e-5,0.6974393 h 0.403455 0.403455 l -0.0019,-0.8493568 C 14.042552,3.9495948 14.041552,3.8678595 14.032782,3.8100185 14.009232,3.6544486 13.977452,3.5442036 13.92645,3.441199 13.806369,3.1986592 13.605298,3.0597618 13.31991,3.0222072 c -0.09496,-0.012496 -0.269981,-0.00822 -0.353998,0.00864 -0.216838,0.043525 -0.419307,0.1645372 -0.580651,0.3470441 l -0.04376,0.0495 -0.0028,-0.1774318 -0.0028,-0.1774318 H 11.93551 11.535 l -0.0014,1.2498665 -0.0014,1.2498665 h 0.403284 0.403284 z",id:"path987","inkscape:connector-curvature":0,transform:"matrix(0.26458333,0,0,0.26458333,0,292.76665)"}))),KC=jD;var WD=0,xc=class{constructor(e,r){this.from=e,this.to=r}},Be=class{constructor(e={}){this.id=WD++,this.perNode=!!e.perNode,this.deserialize=e.deserialize||(()=>{throw new Error("This node type doesn't define a deserialize function")})}add(e){if(this.perNode)throw new RangeError("Can't add per-node props to node types");return typeof e!="function"&&(e=Dr.match(e)),r=>{let i=e(r);return i===void 0?null:[this,i]}}};Be.closedBy=new Be({deserialize:t=>t.split(" ")});Be.openedBy=new Be({deserialize:t=>t.split(" ")});Be.group=new Be({deserialize:t=>t.split(" ")});Be.isolate=new Be({deserialize:t=>{if(t&&t!="rtl"&&t!="ltr"&&t!="auto")throw new RangeError("Invalid value for isolate: "+t);return t||"auto"}});Be.contextHash=new Be({perNode:!0});Be.lookAhead=new Be({perNode:!0});Be.mounted=new Be({perNode:!0});var Ca=class{constructor(e,r,i){this.tree=e,this.overlay=r,this.parser=i}static get(e){return e&&e.props&&e.props[Be.mounted.id]}},VD=Object.create(null),Dr=class t{constructor(e,r,i,s=0){this.name=e,this.props=r,this.id=i,this.flags=s}static define(e){let r=e.props&&e.props.length?Object.create(null):VD,i=(e.top?1:0)|(e.skipped?2:0)|(e.error?4:0)|(e.name==null?8:0),s=new t(e.name||"",r,e.id,i);if(e.props){for(let n of e.props)if(Array.isArray(n)||(n=n(s)),n){if(n[0].perNode)throw new RangeError("Can't store a per-node prop on a node type");r[n[0].id]=n[1]}}return s}prop(e){return this.props[e.id]}get isTop(){return(this.flags&1)>0}get isSkipped(){return(this.flags&2)>0}get isError(){return(this.flags&4)>0}get isAnonymous(){return(this.flags&8)>0}is(e){if(typeof e=="string"){if(this.name==e)return!0;let r=this.prop(Be.group);return r?r.indexOf(e)>-1:!1}return this.id==e}static match(e){let r=Object.create(null);for(let i in e)for(let s of i.split(" "))r[s]=e[i];return i=>{for(let s=i.prop(Be.group),n=-1;n<(s?s.length:0);n++){let o=r[n<0?i.name:s[n]];if(o)return o}}}};Dr.none=new Dr("",Object.create(null),0,8);var ad=new WeakMap,GC=new WeakMap,Dt;(function(t){t[t.ExcludeBuffers=1]="ExcludeBuffers",t[t.IncludeAnonymous=2]="IncludeAnonymous",t[t.IgnoreMounts=4]="IgnoreMounts",t[t.IgnoreOverlays=8]="IgnoreOverlays"})(Dt||(Dt={}));var Jt=class t{constructor(e,r,i,s,n){if(this.type=e,this.children=r,this.positions=i,this.length=s,this.props=null,n&&n.length){this.props=Object.create(null);for(let[o,a]of n)this.props[typeof o=="number"?o:o.id]=a}}toString(){let e=Ca.get(this);if(e&&!e.overlay)return e.tree.toString();let r="";for(let i of this.children){let s=i.toString();s&&(r&&(r+=","),r+=s)}return this.type.name?(/\W/.test(this.type.name)&&!this.type.isError?JSON.stringify(this.type.name):this.type.name)+(r.length?"("+r+")":""):r}cursor(e=0){return new Cc(this.topNode,e)}cursorAt(e,r=0,i=0){let s=ad.get(this)||this.topNode,n=new Cc(s);return n.moveTo(e,r),ad.set(this,n._tree),n}get topNode(){return new Bi(this,0,0,null)}resolve(e,r=0){let i=bc(ad.get(this)||this.topNode,e,r,!1);return ad.set(this,i),i}resolveInner(e,r=0){let i=bc(GC.get(this)||this.topNode,e,r,!0);return GC.set(this,i),i}resolveStack(e,r=0){return UD(this,e,r)}iterate(e){let{enter:r,leave:i,from:s=0,to:n=this.length}=e,o=e.mode||0,a=(o&Dt.IncludeAnonymous)>0;for(let l=this.cursor(o|Dt.IncludeAnonymous);;){let c=!1;if(l.from<=n&&l.to>=s&&(!a&&l.type.isAnonymous||r(l)!==!1)){if(l.firstChild())continue;c=!0}for(;c&&i&&(a||!l.type.isAnonymous)&&i(l),!l.nextSibling();){if(!l.parent())return;c=!0}}}prop(e){return e.perNode?this.props?this.props[e.id]:void 0:this.type.prop(e)}get propValues(){let e=[];if(this.props)for(let r in this.props)e.push([+r,this.props[r]]);return e}balance(e={}){return this.children.length<=8?this:uv(Dr.none,this.children,this.positions,0,this.children.length,0,this.length,(r,i,s)=>new t(this.type,r,i,s,this.propValues),e.makeTree||((r,i,s)=>new t(Dr.none,r,i,s)))}static build(e){return KD(e)}};Jt.empty=new Jt(Dr.none,[],[],0);var sv=class t{constructor(e,r){this.buffer=e,this.index=r}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}get pos(){return this.index}next(){this.index-=4}fork(){return new t(this.buffer,this.index)}},Qn=class t{constructor(e,r,i){this.buffer=e,this.length=r,this.set=i}get type(){return Dr.none}toString(){let e=[];for(let r=0;r<this.buffer.length;)e.push(this.childString(r)),r=this.buffer[r+3];return e.join(",")}childString(e){let r=this.buffer[e],i=this.buffer[e+3],s=this.set.types[r],n=s.name;if(/\W/.test(n)&&!s.isError&&(n=JSON.stringify(n)),e+=4,i==e)return n;let o=[];for(;e<i;)o.push(this.childString(e)),e=this.buffer[e+3];return n+"("+o.join(",")+")"}findChild(e,r,i,s,n){let{buffer:o}=this,a=-1;for(let l=e;l!=r&&!(XC(n,s,o[l+1],o[l+2])&&(a=l,i>0));l=o[l+3]);return a}slice(e,r,i){let s=this.buffer,n=new Uint16Array(r-e),o=0;for(let a=e,l=0;a<r;){n[l++]=s[a++],n[l++]=s[a++]-i;let c=n[l++]=s[a++]-i;n[l++]=s[a++]-e,o=Math.max(o,c)}return new t(n,o,this.set)}};function XC(t,e,r,i){switch(t){case-2:return r<e;case-1:return i>=e&&r<e;case 0:return r<e&&i>e;case 1:return r<=e&&i>e;case 2:return i>e;case 4:return!0}}function bc(t,e,r,i){for(var s;t.from==t.to||(r<1?t.from>=e:t.from>e)||(r>-1?t.to<=e:t.to<e);){let o=!i&&t instanceof Bi&&t.index<0?null:t.parent;if(!o)return t;t=o}let n=i?0:Dt.IgnoreOverlays;if(i)for(let o=t,a=o.parent;a;o=a,a=o.parent)o instanceof Bi&&o.index<0&&((s=a.enter(e,r,n))===null||s===void 0?void 0:s.from)!=o.from&&(t=a);for(;;){let o=t.enter(e,r,n);if(!o)return t;t=o}}var cd=class{cursor(e=0){return new Cc(this,e)}getChild(e,r=null,i=null){let s=qC(this,e,r,i);return s.length?s[0]:null}getChildren(e,r=null,i=null){return qC(this,e,r,i)}resolve(e,r=0){return bc(this,e,r,!1)}resolveInner(e,r=0){return bc(this,e,r,!0)}matchContext(e){return ov(this.parent,e)}enterUnfinishedNodesBefore(e){let r=this.childBefore(e),i=this;for(;r;){let s=r.lastChild;if(!s||s.to!=r.to)break;s.type.isError&&s.from==s.to?(i=r,r=s.prevSibling):r=s}return i}get node(){return this}get next(){return this.parent}},Bi=class t extends cd{constructor(e,r,i,s){super(),this._tree=e,this.from=r,this.index=i,this._parent=s}get type(){return this._tree.type}get name(){return this._tree.type.name}get to(){return this.from+this._tree.length}nextChild(e,r,i,s,n=0){for(let o=this;;){for(let{children:a,positions:l}=o._tree,c=r>0?a.length:-1;e!=c;e+=r){let u=a[e],p=l[e]+o.from;if(XC(s,i,p,p+u.length)){if(u instanceof Qn){if(n&Dt.ExcludeBuffers)continue;let g=u.findChild(0,u.buffer.length,r,i-p,s);if(g>-1)return new wc(new av(o,u,e,p),null,g)}else if(n&Dt.IncludeAnonymous||!u.type.isAnonymous||hv(u)){let g;if(!(n&Dt.IgnoreMounts)&&(g=Ca.get(u))&&!g.overlay)return new t(g.tree,p,e,o);let m=new t(u,p,e,o);return n&Dt.IncludeAnonymous||!m.type.isAnonymous?m:m.nextChild(r<0?u.children.length-1:0,r,i,s)}}}if(n&Dt.IncludeAnonymous||!o.type.isAnonymous||(o.index>=0?e=o.index+r:e=r<0?-1:o._parent._tree.children.length,o=o._parent,!o))return null}}get firstChild(){return this.nextChild(0,1,0,4)}get lastChild(){return this.nextChild(this._tree.children.length-1,-1,0,4)}childAfter(e){return this.nextChild(0,1,e,2)}childBefore(e){return this.nextChild(this._tree.children.length-1,-1,e,-2)}enter(e,r,i=0){let s;if(!(i&Dt.IgnoreOverlays)&&(s=Ca.get(this._tree))&&s.overlay){let n=e-this.from;for(let{from:o,to:a}of s.overlay)if((r>0?o<=n:o<n)&&(r<0?a>=n:a>n))return new t(s.tree,s.overlay[0].from+this.from,-1,this)}return this.nextChild(0,1,e,r,i)}nextSignificantParent(){let e=this;for(;e.type.isAnonymous&&e._parent;)e=e._parent;return e}get parent(){return this._parent?this._parent.nextSignificantParent():null}get nextSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index+1,1,0,4):null}get prevSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index-1,-1,0,4):null}get tree(){return this._tree}toTree(){return this._tree}toString(){return this._tree.toString()}};function qC(t,e,r,i){let s=t.cursor(),n=[];if(!s.firstChild())return n;if(r!=null){for(let o=!1;!o;)if(o=s.type.is(r),!s.nextSibling())return n}for(;;){if(i!=null&&s.type.is(i))return n;if(s.type.is(e)&&n.push(s.node),!s.nextSibling())return i==null?n:[]}}function ov(t,e,r=e.length-1){for(let i=t;r>=0;i=i.parent){if(!i)return!1;if(!i.type.isAnonymous){if(e[r]&&e[r]!=i.name)return!1;r--}}return!0}var av=class{constructor(e,r,i,s){this.parent=e,this.buffer=r,this.index=i,this.start=s}},wc=class t extends cd{get name(){return this.type.name}get from(){return this.context.start+this.context.buffer.buffer[this.index+1]}get to(){return this.context.start+this.context.buffer.buffer[this.index+2]}constructor(e,r,i){super(),this.context=e,this._parent=r,this.index=i,this.type=e.buffer.set.types[e.buffer.buffer[i]]}child(e,r,i){let{buffer:s}=this.context,n=s.findChild(this.index+4,s.buffer[this.index+3],e,r-this.context.start,i);return n<0?null:new t(this.context,this,n)}get firstChild(){return this.child(1,0,4)}get lastChild(){return this.child(-1,0,4)}childAfter(e){return this.child(1,e,2)}childBefore(e){return this.child(-1,e,-2)}enter(e,r,i=0){if(i&Dt.ExcludeBuffers)return null;let{buffer:s}=this.context,n=s.findChild(this.index+4,s.buffer[this.index+3],r>0?1:-1,e-this.context.start,r);return n<0?null:new t(this.context,this,n)}get parent(){return this._parent||this.context.parent.nextSignificantParent()}externalSibling(e){return this._parent?null:this.context.parent.nextChild(this.context.index+e,e,0,4)}get nextSibling(){let{buffer:e}=this.context,r=e.buffer[this.index+3];return r<(this._parent?e.buffer[this._parent.index+3]:e.buffer.length)?new t(this.context,this._parent,r):this.externalSibling(1)}get prevSibling(){let{buffer:e}=this.context,r=this._parent?this._parent.index+4:0;return this.index==r?this.externalSibling(-1):new t(this.context,this._parent,e.findChild(r,this.index,-1,0,4))}get tree(){return null}toTree(){let e=[],r=[],{buffer:i}=this.context,s=this.index+4,n=i.buffer[this.index+3];if(n>s){let o=i.buffer[this.index+1];e.push(i.slice(s,n,o)),r.push(0)}return new Jt(this.type,e,r,this.to-this.from)}toString(){return this.context.buffer.childString(this.index)}};function JC(t){if(!t.length)return null;let e=0,r=t[0];for(let n=1;n<t.length;n++){let o=t[n];(o.from>r.from||o.to<r.to)&&(r=o,e=n)}let i=r instanceof Bi&&r.index<0?null:r.parent,s=t.slice();return i?s[e]=i:s.splice(e,1),new lv(s,r)}var lv=class{constructor(e,r){this.heads=e,this.node=r}get next(){return JC(this.heads)}};function UD(t,e,r){let i=t.resolveInner(e,r),s=null;for(let n=i instanceof Bi?i:i.context.parent;n;n=n.parent)if(n.index<0){let o=n.parent;(s||(s=[i])).push(o.resolve(e,r)),n=o}else{let o=Ca.get(n.tree);if(o&&o.overlay&&o.overlay[0].from<=e&&o.overlay[o.overlay.length-1].to>=e){let a=new Bi(o.tree,o.overlay[0].from+n.from,-1,n);(s||(s=[i])).push(bc(a,e,r,!1))}}return s?JC(s):i}var Cc=class{get name(){return this.type.name}constructor(e,r=0){if(this.mode=r,this.buffer=null,this.stack=[],this.index=0,this.bufferNode=null,e instanceof Bi)this.yieldNode(e);else{this._tree=e.context.parent,this.buffer=e.context;for(let i=e._parent;i;i=i._parent)this.stack.unshift(i.index);this.bufferNode=e,this.yieldBuf(e.index)}}yieldNode(e){return e?(this._tree=e,this.type=e.type,this.from=e.from,this.to=e.to,!0):!1}yieldBuf(e,r){this.index=e;let{start:i,buffer:s}=this.buffer;return this.type=r||s.set.types[s.buffer[e]],this.from=i+s.buffer[e+1],this.to=i+s.buffer[e+2],!0}yield(e){return e?e instanceof Bi?(this.buffer=null,this.yieldNode(e)):(this.buffer=e.context,this.yieldBuf(e.index,e.type)):!1}toString(){return this.buffer?this.buffer.buffer.childString(this.index):this._tree.toString()}enterChild(e,r,i){if(!this.buffer)return this.yield(this._tree.nextChild(e<0?this._tree._tree.children.length-1:0,e,r,i,this.mode));let{buffer:s}=this.buffer,n=s.findChild(this.index+4,s.buffer[this.index+3],e,r-this.buffer.start,i);return n<0?!1:(this.stack.push(this.index),this.yieldBuf(n))}firstChild(){return this.enterChild(1,0,4)}lastChild(){return this.enterChild(-1,0,4)}childAfter(e){return this.enterChild(1,e,2)}childBefore(e){return this.enterChild(-1,e,-2)}enter(e,r,i=this.mode){return this.buffer?i&Dt.ExcludeBuffers?!1:this.enterChild(1,e,r):this.yield(this._tree.enter(e,r,i))}parent(){if(!this.buffer)return this.yieldNode(this.mode&Dt.IncludeAnonymous?this._tree._parent:this._tree.parent);if(this.stack.length)return this.yieldBuf(this.stack.pop());let e=this.mode&Dt.IncludeAnonymous?this.buffer.parent:this.buffer.parent.nextSignificantParent();return this.buffer=null,this.yieldNode(e)}sibling(e){if(!this.buffer)return this._tree._parent?this.yield(this._tree.index<0?null:this._tree._parent.nextChild(this._tree.index+e,e,0,4,this.mode)):!1;let{buffer:r}=this.buffer,i=this.stack.length-1;if(e<0){let s=i<0?0:this.stack[i]+4;if(this.index!=s)return this.yieldBuf(r.findChild(s,this.index,-1,0,4))}else{let s=r.buffer[this.index+3];if(s<(i<0?r.buffer.length:r.buffer[this.stack[i]+3]))return this.yieldBuf(s)}return i<0?this.yield(this.buffer.parent.nextChild(this.buffer.index+e,e,0,4,this.mode)):!1}nextSibling(){return this.sibling(1)}prevSibling(){return this.sibling(-1)}atLastNode(e){let r,i,{buffer:s}=this;if(s){if(e>0){if(this.index<s.buffer.buffer.length)return!1}else for(let n=0;n<this.index;n++)if(s.buffer.buffer[n+3]<this.index)return!1;({index:r,parent:i}=s)}else({index:r,_parent:i}=this._tree);for(;i;{index:r,_parent:i}=i)if(r>-1)for(let n=r+e,o=e<0?-1:i._tree.children.length;n!=o;n+=e){let a=i._tree.children[n];if(this.mode&Dt.IncludeAnonymous||a instanceof Qn||!a.type.isAnonymous||hv(a))return!1}return!0}move(e,r){if(r&&this.enterChild(e,0,4))return!0;for(;;){if(this.sibling(e))return!0;if(this.atLastNode(e)||!this.parent())return!1}}next(e=!0){return this.move(1,e)}prev(e=!0){return this.move(-1,e)}moveTo(e,r=0){for(;(this.from==this.to||(r<1?this.from>=e:this.from>e)||(r>-1?this.to<=e:this.to<e))&&this.parent(););for(;this.enterChild(1,e,r););return this}get node(){if(!this.buffer)return this._tree;let e=this.bufferNode,r=null,i=0;if(e&&e.context==this.buffer)e:for(let s=this.index,n=this.stack.length;n>=0;){for(let o=e;o;o=o._parent)if(o.index==s){if(s==this.index)return o;r=o,i=n+1;break e}s=this.stack[--n]}for(let s=i;s<this.stack.length;s++)r=new wc(this.buffer,r,this.stack[s]);return this.bufferNode=new wc(this.buffer,r,this.index)}get tree(){return this.buffer?null:this._tree._tree}iterate(e,r){for(let i=0;;){let s=!1;if(this.type.isAnonymous||e(this)!==!1){if(this.firstChild()){i++;continue}this.type.isAnonymous||(s=!0)}for(;;){if(s&&r&&r(this),s=this.type.isAnonymous,!i)return;if(this.nextSibling())break;this.parent(),i--,s=!0}}}matchContext(e){if(!this.buffer)return ov(this.node.parent,e);let{buffer:r}=this.buffer,{types:i}=r.set;for(let s=e.length-1,n=this.stack.length-1;s>=0;n--){if(n<0)return ov(this._tree,e,s);let o=i[r.buffer[this.stack[n]]];if(!o.isAnonymous){if(e[s]&&e[s]!=o.name)return!1;s--}}return!0}};function hv(t){return t.children.some(e=>e instanceof Qn||!e.type.isAnonymous||hv(e))}function KD(t){var e;let{buffer:r,nodeSet:i,maxBufferLength:s=1024,reused:n=[],minRepeatType:o=i.types.length}=t,a=Array.isArray(r)?new sv(r,r.length):r,l=i.types,c=0,u=0;function p(C,y,w,T,k,x){let{id:E,start:R,end:L,size:O}=a,I=u,P=c;for(;O<0;)if(a.next(),O==-1){let j=n[E];w.push(j),T.push(R-C);return}else if(O==-3){c=E;return}else if(O==-4){u=E;return}else throw new RangeError(`Unrecognized record size: ${O}`);let A=l[E],D,B,H=R-C;if(L-R<=s&&(B=v(a.pos-y,k))){let j=new Uint16Array(B.size-B.skip),U=a.pos-B.size,G=j.length;for(;a.pos>U;)G=f(B.start,j,G);D=new Qn(j,L-B.start,i),H=B.start-C}else{let j=a.pos-O;a.next();let U=[],G=[],re=E>=o?E:-1,M=0,N=L;for(;a.pos>j;)re>=0&&a.id==re&&a.size>=0?(a.end<=N-s&&(h(U,G,R,M,a.end,N,re,I,P),M=U.length,N=a.end),a.next()):x>2500?g(R,j,U,G):p(R,j,U,G,re,x+1);if(re>=0&&M>0&&M<U.length&&h(U,G,R,M,R,N,re,I,P),U.reverse(),G.reverse(),re>-1&&M>0){let $=m(A,P);D=uv(A,U,G,0,U.length,0,L-R,$,$)}else D=d(A,U,G,L-R,I-L,P)}w.push(D),T.push(H)}function g(C,y,w,T){let k=[],x=0,E=-1;for(;a.pos>y;){let{id:R,start:L,end:O,size:I}=a;if(I>4)a.next();else{if(E>-1&&L<E)break;E<0&&(E=O-s),k.push(R,L,O),x++,a.next()}}if(x){let R=new Uint16Array(x*4),L=k[k.length-2];for(let O=k.length-3,I=0;O>=0;O-=3)R[I++]=k[O],R[I++]=k[O+1]-L,R[I++]=k[O+2]-L,R[I++]=I;w.push(new Qn(R,k[2]-L,i)),T.push(L-C)}}function m(C,y){return(w,T,k)=>{let x=0,E=w.length-1,R,L;if(E>=0&&(R=w[E])instanceof Jt){if(!E&&R.type==C&&R.length==k)return R;(L=R.prop(Be.lookAhead))&&(x=T[E]+R.length+L)}return d(C,w,T,k,x,y)}}function h(C,y,w,T,k,x,E,R,L){let O=[],I=[];for(;C.length>T;)O.push(C.pop()),I.push(y.pop()+w-k);C.push(d(i.types[E],O,I,x-k,R-x,L)),y.push(k-w)}function d(C,y,w,T,k,x,E){if(x){let R=[Be.contextHash,x];E=E?[R].concat(E):[R]}if(k>25){let R=[Be.lookAhead,k];E=E?[R].concat(E):[R]}return new Jt(C,y,w,T,E)}function v(C,y){let w=a.fork(),T=0,k=0,x=0,E=w.end-s,R={size:0,start:0,skip:0};e:for(let L=w.pos-C;w.pos>L;){let O=w.size;if(w.id==y&&O>=0){R.size=T,R.start=k,R.skip=x,x+=4,T+=4,w.next();continue}let I=w.pos-O;if(O<0||I<L||w.start<E)break;let P=w.id>=o?4:0,A=w.start;for(w.next();w.pos>I;){if(w.size<0)if(w.size==-3)P+=4;else break e;else w.id>=o&&(P+=4);w.next()}k=A,T+=O,x+=P}return(y<0||T==C)&&(R.size=T,R.start=k,R.skip=x),R.size>4?R:void 0}function f(C,y,w){let{id:T,start:k,end:x,size:E}=a;if(a.next(),E>=0&&T<o){let R=w;if(E>4){let L=a.pos-(E-4);for(;a.pos>L;)w=f(C,y,w)}y[--w]=R,y[--w]=x-C,y[--w]=k-C,y[--w]=T}else E==-3?c=T:E==-4&&(u=T);return w}let _=[],S=[];for(;a.pos>0;)p(t.start||0,t.bufferStart||0,_,S,-1,0);let b=(e=t.length)!==null&&e!==void 0?e:_.length?S[0]+_[0].length:0;return new Jt(l[t.topID],_.reverse(),S.reverse(),b)}var YC=new WeakMap;function ld(t,e){if(!t.isAnonymous||e instanceof Qn||e.type!=t)return 1;let r=YC.get(e);if(r==null){r=1;for(let i of e.children){if(i.type!=t||!(i instanceof Jt)){r=1;break}r+=ld(t,i)}YC.set(e,r)}return r}function uv(t,e,r,i,s,n,o,a,l){let c=0;for(let h=i;h<s;h++)c+=ld(t,e[h]);let u=Math.ceil(c*1.5/8),p=[],g=[];function m(h,d,v,f,_){for(let S=v;S<f;){let b=S,C=d[S],y=ld(t,h[S]);for(S++;S<f;S++){let w=ld(t,h[S]);if(y+w>=u)break;y+=w}if(S==b+1){if(y>u){let w=h[b];m(w.children,w.positions,0,w.children.length,d[b]+_);continue}p.push(h[b])}else{let w=d[S-1]+h[S-1].length-C;p.push(uv(t,h,d,b,S,C,w,null,l))}g.push(C+_-n)}}return m(e,r,i,s,0),(a||l)(p,g,o)}var Js=class t{constructor(e,r,i,s,n=!1,o=!1){this.from=e,this.to=r,this.tree=i,this.offset=s,this.open=(n?1:0)|(o?2:0)}get openStart(){return(this.open&1)>0}get openEnd(){return(this.open&2)>0}static addTree(e,r=[],i=!1){let s=[new t(0,e.length,e,0,!1,i)];for(let n of r)n.to>e.length&&s.push(n);return s}static applyChanges(e,r,i=128){if(!r.length)return e;let s=[],n=1,o=e.length?e[0]:null;for(let a=0,l=0,c=0;;a++){let u=a<r.length?r[a]:null,p=u?u.fromA:1e9;if(p-l>=i)for(;o&&o.from<p;){let g=o;if(l>=g.from||p<=g.to||c){let m=Math.max(g.from,l)-c,h=Math.min(g.to,p)-c;g=m>=h?null:new t(m,h,g.tree,g.offset+c,a>0,!!u)}if(g&&s.push(g),o.to>p)break;o=n<e.length?e[n++]:null}if(!u)break;l=u.toA,c=u.toA-u.toB}return s}},hd=class{startParse(e,r,i){return typeof e=="string"&&(e=new cv(e)),i=i?i.length?i.map(s=>new xc(s.from,s.to)):[new xc(0,0)]:[new xc(0,e.length)],this.createParse(e,r||[],i)}parse(e,r,i){let s=this.startParse(e,r,i);for(;;){let n=s.advance();if(n)return n}}},cv=class{constructor(e){this.string=e}get length(){return this.string.length}chunk(e){return this.string.slice(e)}get lineChunks(){return!1}read(e,r){return this.string.slice(e,r)}};var uJ=new Be({perNode:!0});var GD=0,ui=class t{constructor(e,r,i,s){this.name=e,this.set=r,this.base=i,this.modified=s,this.id=GD++}toString(){let{name:e}=this;for(let r of this.modified)r.name&&(e=`${r.name}(${e})`);return e}static define(e,r){let i=typeof e=="string"?e:"?";if(e instanceof t&&(r=e),r?.base)throw new Error("Can not derive from a modified tag");let s=new t(i,[],null,[]);if(s.set.push(s),r)for(let n of r.set)s.set.push(n);return s}static defineModifier(e){let r=new pd(e);return i=>i.modified.indexOf(r)>-1?i:pd.get(i.base||i,i.modified.concat(r).sort((s,n)=>s.id-n.id))}},qD=0,pd=class t{constructor(e){this.name=e,this.instances=[],this.id=qD++}static get(e,r){if(!r.length)return e;let i=r[0].instances.find(a=>a.base==e&&YD(r,a.modified));if(i)return i;let s=[],n=new ui(e.name,s,e,r);for(let a of r)a.instances.push(n);let o=XD(r);for(let a of e.set)if(!a.modified.length)for(let l of o)s.push(t.get(a,l));return n}};function YD(t,e){return t.length==e.length&&t.every((r,i)=>r==e[i])}function XD(t){let e=[[]];for(let r=0;r<t.length;r++)for(let i=0,s=e.length;i<s;i++)e.push(e[i].concat(t[r]));return e.sort((r,i)=>i.length-r.length)}function ek(t){let e=Object.create(null);for(let r in t){let i=t[r];Array.isArray(i)||(i=[i]);for(let s of r.split(" "))if(s){let n=[],o=2,a=s;for(let p=0;;){if(a=="..."&&p>0&&p+3==s.length){o=1;break}let g=/^"(?:[^"\\]|\\.)*?"|[^\/!]+/.exec(a);if(!g)throw new RangeError("Invalid path: "+s);if(n.push(g[0]=="*"?"":g[0][0]=='"'?JSON.parse(g[0]):g[0]),p+=g[0].length,p==s.length)break;let m=s[p++];if(p==s.length&&m=="!"){o=0;break}if(m!="/")throw new RangeError("Invalid path: "+s);a=s.slice(p)}let l=n.length-1,c=n[l];if(!c)throw new RangeError("Invalid path: "+s);let u=new ka(i,o,l>0?n.slice(0,l):null);e[c]=u.sort(e[c])}}return tk.add(e)}var tk=new Be,ka=class{constructor(e,r,i,s){this.tags=e,this.mode=r,this.context=i,this.next=s}get opaque(){return this.mode==0}get inherit(){return this.mode==1}sort(e){return!e||e.depth<this.depth?(this.next=e,this):(e.next=this.sort(e.next),e)}get depth(){return this.context?this.context.length:0}};ka.empty=new ka([],2,null);function mv(t,e){let r=Object.create(null);for(let n of t)if(!Array.isArray(n.tag))r[n.tag.id]=n.class;else for(let o of n.tag)r[o.id]=n.class;let{scope:i,all:s=null}=e||{};return{style:n=>{let o=s;for(let a of n)for(let l of a.set){let c=r[l.id];if(c){o=o?o+" "+c:c;break}}return o},scope:i}}function JD(t,e){let r=null;for(let i of t){let s=i.style(e);s&&(r=r?r+" "+s:s)}return r}function rk(t,e,r,i=0,s=t.length){let n=new dv(i,Array.isArray(e)?e:[e],r);n.highlightRange(t.cursor(),i,s,"",n.highlighters),n.flush(s)}var dv=class{constructor(e,r,i){this.at=e,this.highlighters=r,this.span=i,this.class=""}startSpan(e,r){r!=this.class&&(this.flush(e),e>this.at&&(this.at=e),this.class=r)}flush(e){e>this.at&&this.class&&this.span(this.at,e,this.class)}highlightRange(e,r,i,s,n){let{type:o,from:a,to:l}=e;if(a>=i||l<=r)return;o.isTop&&(n=this.highlighters.filter(m=>!m.scope||m.scope(o)));let c=s,u=QD(e)||ka.empty,p=JD(n,u.tags);if(p&&(c&&(c+=" "),c+=p,u.mode==1&&(s+=(s?" ":"")+p)),this.startSpan(Math.max(r,a),c),u.opaque)return;let g=e.tree&&e.tree.prop(Be.mounted);if(g&&g.overlay){let m=e.node.enter(g.overlay[0].from+a,1),h=this.highlighters.filter(v=>!v.scope||v.scope(g.tree.type)),d=e.firstChild();for(let v=0,f=a;;v++){let _=v<g.overlay.length?g.overlay[v]:null,S=_?_.from+a:l,b=Math.max(r,f),C=Math.min(i,S);if(b<C&&d)for(;e.from<C&&(this.highlightRange(e,b,C,s,n),this.startSpan(Math.min(C,e.to),c),!(e.to>=S||!e.nextSibling())););if(!_||S>i)break;f=_.to+a,f>r&&(this.highlightRange(m.cursor(),Math.max(r,_.from+a),Math.min(i,f),"",h),this.startSpan(Math.min(i,f),c))}d&&e.parent()}else if(e.firstChild()){g&&(s="");do if(!(e.to<=r)){if(e.from>=i)break;this.highlightRange(e,r,i,s,n),this.startSpan(Math.min(i,e.to),c)}while(e.nextSibling());e.parent()}}};function QD(t){let e=t.type.prop(tk);for(;e&&e.context&&!t.matchContext(e.context);)e=e.next;return e||null}var J=ui.define,ud=J(),Zn=J(),QC=J(Zn),ZC=J(Zn),es=J(),fd=J(es),fv=J(es),Fi=J(),Qs=J(Fi),Ii=J(),Ni=J(),pv=J(),kc=J(pv),dd=J(),F={comment:ud,lineComment:J(ud),blockComment:J(ud),docComment:J(ud),name:Zn,variableName:J(Zn),typeName:QC,tagName:J(QC),propertyName:ZC,attributeName:J(ZC),className:J(Zn),labelName:J(Zn),namespace:J(Zn),macroName:J(Zn),literal:es,string:fd,docString:J(fd),character:J(fd),attributeValue:J(fd),number:fv,integer:J(fv),float:J(fv),bool:J(es),regexp:J(es),escape:J(es),color:J(es),url:J(es),keyword:Ii,self:J(Ii),null:J(Ii),atom:J(Ii),unit:J(Ii),modifier:J(Ii),operatorKeyword:J(Ii),controlKeyword:J(Ii),definitionKeyword:J(Ii),moduleKeyword:J(Ii),operator:Ni,derefOperator:J(Ni),arithmeticOperator:J(Ni),logicOperator:J(Ni),bitwiseOperator:J(Ni),compareOperator:J(Ni),updateOperator:J(Ni),definitionOperator:J(Ni),typeOperator:J(Ni),controlOperator:J(Ni),punctuation:pv,separator:J(pv),bracket:kc,angleBracket:J(kc),squareBracket:J(kc),paren:J(kc),brace:J(kc),content:Fi,heading:Qs,heading1:J(Qs),heading2:J(Qs),heading3:J(Qs),heading4:J(Qs),heading5:J(Qs),heading6:J(Qs),contentSeparator:J(Fi),list:J(Fi),quote:J(Fi),emphasis:J(Fi),strong:J(Fi),link:J(Fi),monospace:J(Fi),strikethrough:J(Fi),inserted:J(),deleted:J(),changed:J(),invalid:J(),meta:dd,documentMeta:J(dd),annotation:J(dd),processingInstruction:J(dd),definition:ui.defineModifier("definition"),constant:ui.defineModifier("constant"),function:ui.defineModifier("function"),standard:ui.defineModifier("standard"),local:ui.defineModifier("local"),special:ui.defineModifier("special")};for(let t in F){let e=F[t];e instanceof ui&&(e.name=t)}var pJ=mv([{tag:F.link,class:"tok-link"},{tag:F.heading,class:"tok-heading"},{tag:F.emphasis,class:"tok-emphasis"},{tag:F.strong,class:"tok-strong"},{tag:F.keyword,class:"tok-keyword"},{tag:F.atom,class:"tok-atom"},{tag:F.bool,class:"tok-bool"},{tag:F.url,class:"tok-url"},{tag:F.labelName,class:"tok-labelName"},{tag:F.inserted,class:"tok-inserted"},{tag:F.deleted,class:"tok-deleted"},{tag:F.literal,class:"tok-literal"},{tag:F.string,class:"tok-string"},{tag:F.number,class:"tok-number"},{tag:[F.regexp,F.escape,F.special(F.string)],class:"tok-string2"},{tag:F.variableName,class:"tok-variableName"},{tag:F.local(F.variableName),class:"tok-variableName tok-local"},{tag:F.definition(F.variableName),class:"tok-variableName tok-definition"},{tag:F.special(F.variableName),class:"tok-variableName2"},{tag:F.definition(F.propertyName),class:"tok-propertyName tok-definition"},{tag:F.typeName,class:"tok-typeName"},{tag:F.namespace,class:"tok-namespace"},{tag:F.className,class:"tok-className"},{tag:F.macroName,class:"tok-macroName"},{tag:F.propertyName,class:"tok-propertyName"},{tag:F.operator,class:"tok-operator"},{tag:F.comment,class:"tok-comment"},{tag:F.meta,class:"tok-meta"},{tag:F.invalid,class:"tok-invalid"},{tag:F.punctuation,class:"tok-punctuation"}]);var Ae=class t{lineAt(e){if(e<0||e>this.length)throw new RangeError(`Invalid position ${e} in document of length ${this.length}`);return this.lineInner(e,!1,1,0)}line(e){if(e<1||e>this.lines)throw new RangeError(`Invalid line number ${e} in ${this.lines}-line document`);return this.lineInner(e,!0,1,0)}replace(e,r,i){[e,r]=Aa(this,e,r);let s=[];return this.decompose(0,e,s,2),i.length&&i.decompose(0,i.length,s,3),this.decompose(r,this.length,s,1),Ea.from(s,this.length-(r-e)+i.length)}append(e){return this.replace(this.length,this.length,e)}slice(e,r=this.length){[e,r]=Aa(this,e,r);let i=[];return this.decompose(e,r,i,0),Ea.from(i,r-e)}eq(e){if(e==this)return!0;if(e.length!=this.length||e.lines!=this.lines)return!1;let r=this.scanIdentical(e,1),i=this.length-this.scanIdentical(e,-1),s=new to(this),n=new to(e);for(let o=r,a=r;;){if(s.next(o),n.next(o),o=0,s.lineBreak!=n.lineBreak||s.done!=n.done||s.value!=n.value)return!1;if(a+=s.value.length,s.done||a>=i)return!0}}iter(e=1){return new to(this,e)}iterRange(e,r=this.length){return new yd(this,e,r)}iterLines(e,r){let i;if(e==null)i=this.iter();else{r==null&&(r=this.lines+1);let s=this.line(e).from;i=this.iterRange(s,Math.max(s,r==this.lines+1?this.length:r<=1?0:this.line(r-1).to))}return new Sd(i)}toString(){return this.sliceString(0)}toJSON(){let e=[];return this.flatten(e),e}constructor(){}static of(e){if(e.length==0)throw new RangeError("A document must have at least one line");return e.length==1&&!e[0]?t.empty:e.length<=32?new Or(e):Ea.from(Or.split(e,[]))}},Or=class t extends Ae{constructor(e,r=ZD(e)){super(),this.text=e,this.length=r}get lines(){return this.text.length}get children(){return null}lineInner(e,r,i,s){for(let n=0;;n++){let o=this.text[n],a=s+o.length;if((r?i:a)>=e)return new vv(s,a,i,o);s=a+1,i++}}decompose(e,r,i,s){let n=e<=0&&r>=this.length?this:new t(ik(this.text,e,r),Math.min(r,this.length)-Math.max(0,e));if(s&1){let o=i.pop(),a=vd(n.text,o.text.slice(),0,n.length);if(a.length<=32)i.push(new t(a,o.length+n.length));else{let l=a.length>>1;i.push(new t(a.slice(0,l)),new t(a.slice(l)))}}else i.push(n)}replace(e,r,i){if(!(i instanceof t))return super.replace(e,r,i);[e,r]=Aa(this,e,r);let s=vd(this.text,vd(i.text,ik(this.text,0,e)),r),n=this.length+i.length-(r-e);return s.length<=32?new t(s,n):Ea.from(t.split(s,[]),n)}sliceString(e,r=this.length,i=`
`){[e,r]=Aa(this,e,r);let s="";for(let n=0,o=0;n<=r&&o<this.text.length;o++){let a=this.text[o],l=n+a.length;n>e&&o&&(s+=i),e<l&&r>n&&(s+=a.slice(Math.max(0,e-n),r-n)),n=l+1}return s}flatten(e){for(let r of this.text)e.push(r)}scanIdentical(){return 0}static split(e,r){let i=[],s=-1;for(let n of e)i.push(n),s+=n.length+1,i.length==32&&(r.push(new t(i,s)),i=[],s=-1);return s>-1&&r.push(new t(i,s)),r}},Ea=class t extends Ae{constructor(e,r){super(),this.children=e,this.length=r,this.lines=0;for(let i of e)this.lines+=i.lines}lineInner(e,r,i,s){for(let n=0;;n++){let o=this.children[n],a=s+o.length,l=i+o.lines-1;if((r?l:a)>=e)return o.lineInner(e,r,i,s);s=a+1,i=l+1}}decompose(e,r,i,s){for(let n=0,o=0;o<=r&&n<this.children.length;n++){let a=this.children[n],l=o+a.length;if(e<=l&&r>=o){let c=s&((o<=e?1:0)|(l>=r?2:0));o>=e&&l<=r&&!c?i.push(a):a.decompose(e-o,r-o,i,c)}o=l+1}}replace(e,r,i){if([e,r]=Aa(this,e,r),i.lines<this.lines)for(let s=0,n=0;s<this.children.length;s++){let o=this.children[s],a=n+o.length;if(e>=n&&r<=a){let l=o.replace(e-n,r-n,i),c=this.lines-o.lines+l.lines;if(l.lines<c>>4&&l.lines>c>>6){let u=this.children.slice();return u[s]=l,new t(u,this.length-(r-e)+i.length)}return super.replace(n,a,l)}n=a+1}return super.replace(e,r,i)}sliceString(e,r=this.length,i=`
`){[e,r]=Aa(this,e,r);let s="";for(let n=0,o=0;n<this.children.length&&o<=r;n++){let a=this.children[n],l=o+a.length;o>e&&n&&(s+=i),e<l&&r>o&&(s+=a.sliceString(e-o,r-o,i)),o=l+1}return s}flatten(e){for(let r of this.children)r.flatten(e)}scanIdentical(e,r){if(!(e instanceof t))return 0;let i=0,[s,n,o,a]=r>0?[0,0,this.children.length,e.children.length]:[this.children.length-1,e.children.length-1,-1,-1];for(;;s+=r,n+=r){if(s==o||n==a)return i;let l=this.children[s],c=e.children[n];if(l!=c)return i+l.scanIdentical(c,r);i+=l.length+1}}static from(e,r=e.reduce((i,s)=>i+s.length+1,-1)){let i=0;for(let m of e)i+=m.lines;if(i<32){let m=[];for(let h of e)h.flatten(m);return new Or(m,r)}let s=Math.max(32,i>>5),n=s<<1,o=s>>1,a=[],l=0,c=-1,u=[];function p(m){let h;if(m.lines>n&&m instanceof t)for(let d of m.children)p(d);else m.lines>o&&(l>o||!l)?(g(),a.push(m)):m instanceof Or&&l&&(h=u[u.length-1])instanceof Or&&m.lines+h.lines<=32?(l+=m.lines,c+=m.length+1,u[u.length-1]=new Or(h.text.concat(m.text),h.length+1+m.length)):(l+m.lines>s&&g(),l+=m.lines,c+=m.length+1,u.push(m))}function g(){l!=0&&(a.push(u.length==1?u[0]:t.from(u,c)),c=-1,l=u.length=0)}for(let m of e)p(m);return g(),a.length==1?a[0]:new t(a,r)}};Ae.empty=new Or([""],0);function ZD(t){let e=-1;for(let r of t)e+=r.length+1;return e}function vd(t,e,r=0,i=1e9){for(let s=0,n=0,o=!0;n<t.length&&s<=i;n++){let a=t[n],l=s+a.length;l>=r&&(l>i&&(a=a.slice(0,i-s)),s<r&&(a=a.slice(r-s)),o?(e[e.length-1]+=a,o=!1):e.push(a)),s=l+1}return e}function ik(t,e,r){return vd(t,[""],e,r)}var to=class{constructor(e,r=1){this.dir=r,this.done=!1,this.lineBreak=!1,this.value="",this.nodes=[e],this.offsets=[r>0?1:(e instanceof Or?e.text.length:e.children.length)<<1]}nextInner(e,r){for(this.done=this.lineBreak=!1;;){let i=this.nodes.length-1,s=this.nodes[i],n=this.offsets[i],o=n>>1,a=s instanceof Or?s.text.length:s.children.length;if(o==(r>0?a:0)){if(i==0)return this.done=!0,this.value="",this;r>0&&this.offsets[i-1]++,this.nodes.pop(),this.offsets.pop()}else if((n&1)==(r>0?0:1)){if(this.offsets[i]+=r,e==0)return this.lineBreak=!0,this.value=`
`,this;e--}else if(s instanceof Or){let l=s.text[o+(r<0?-1:0)];if(this.offsets[i]+=r,l.length>Math.max(0,e))return this.value=e==0?l:r>0?l.slice(e):l.slice(0,l.length-e),this;e-=l.length}else{let l=s.children[o+(r<0?-1:0)];e>l.length?(e-=l.length,this.offsets[i]+=r):(r<0&&this.offsets[i]--,this.nodes.push(l),this.offsets.push(r>0?1:(l instanceof Or?l.text.length:l.children.length)<<1))}}}next(e=0){return e<0&&(this.nextInner(-e,-this.dir),e=this.value.length),this.nextInner(e,this.dir)}},yd=class{constructor(e,r,i){this.value="",this.done=!1,this.cursor=new to(e,r>i?-1:1),this.pos=r>i?e.length:0,this.from=Math.min(r,i),this.to=Math.max(r,i)}nextInner(e,r){if(r<0?this.pos<=this.from:this.pos>=this.to)return this.value="",this.done=!0,this;e+=Math.max(0,r<0?this.pos-this.to:this.from-this.pos);let i=r<0?this.pos-this.from:this.to-this.pos;e>i&&(e=i),i-=e;let{value:s}=this.cursor.next(e);return this.pos+=(s.length+e)*r,this.value=s.length<=i?s:r<0?s.slice(s.length-i):s.slice(0,i),this.done=!this.value,this}next(e=0){return e<0?e=Math.max(e,this.from-this.pos):e>0&&(e=Math.min(e,this.to-this.pos)),this.nextInner(e,this.cursor.dir)}get lineBreak(){return this.cursor.lineBreak&&this.value!=""}},Sd=class{constructor(e){this.inner=e,this.afterBreak=!0,this.value="",this.done=!1}next(e=0){let{done:r,lineBreak:i,value:s}=this.inner.next(e);return r&&this.afterBreak?(this.value="",this.afterBreak=!1):r?(this.done=!0,this.value=""):i?this.afterBreak?this.value="":(this.afterBreak=!0,this.next()):(this.value=s,this.afterBreak=!1),this}get lineBreak(){return!1}};typeof Symbol<"u"&&(Ae.prototype[Symbol.iterator]=function(){return this.iter()},to.prototype[Symbol.iterator]=yd.prototype[Symbol.iterator]=Sd.prototype[Symbol.iterator]=function(){return this});var vv=class{constructor(e,r,i,s){this.from=e,this.to=r,this.number=i,this.text=s}get length(){return this.to-this.from}};function Aa(t,e,r){return e=Math.max(0,Math.min(t.length,e)),[e,Math.max(e,Math.min(t.length,r))]}var Pa="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<Pa.length;t++)Pa[t]+=Pa[t-1];function e3(t){for(let e=1;e<Pa.length;e+=2)if(Pa[e]>t)return Pa[e-1]<=t;return!1}function nk(t){return t>=127462&&t<=127487}var sk=8205;function zi(t,e,r=!0,i=!0){return(r?uk:t3)(t,e,i)}function uk(t,e,r){if(e==t.length)return e;e&&fk(t.charCodeAt(e))&&dk(t.charCodeAt(e-1))&&e--;let i=_d(t,e);for(e+=_v(i);e<t.length;){let s=_d(t,e);if(i==sk||s==sk||r&&e3(s))e+=_v(s),i=s;else if(nk(s)){let n=0,o=e-2;for(;o>=0&&nk(_d(t,o));)n++,o-=2;if(n%2==0)break;e+=2}else break}return e}function t3(t,e,r){for(;e>0;){let i=uk(t,e-2,r);if(i<e)return i;e--}return 0}function fk(t){return t>=56320&&t<57344}function dk(t){return t>=55296&&t<56320}function _d(t,e){let r=t.charCodeAt(e);if(!dk(r)||e+1==t.length)return r;let i=t.charCodeAt(e+1);return fk(i)?(r-55296<<10)+(i-56320)+65536:r}function _v(t){return t<65536?1:2}var yv=/\r\n?|\n/,vr=(function(t){return t[t.Simple=0]="Simple",t[t.TrackDel=1]="TrackDel",t[t.TrackBefore=2]="TrackBefore",t[t.TrackAfter=3]="TrackAfter",t})(vr||(vr={})),ro=class t{constructor(e){this.sections=e}get length(){let e=0;for(let r=0;r<this.sections.length;r+=2)e+=this.sections[r];return e}get newLength(){let e=0;for(let r=0;r<this.sections.length;r+=2){let i=this.sections[r+1];e+=i<0?this.sections[r]:i}return e}get empty(){return this.sections.length==0||this.sections.length==2&&this.sections[1]<0}iterGaps(e){for(let r=0,i=0,s=0;r<this.sections.length;){let n=this.sections[r++],o=this.sections[r++];o<0?(e(i,s,n),s+=n):s+=o,i+=n}}iterChangedRanges(e,r=!1){Sv(this,e,r)}get invertedDesc(){let e=[];for(let r=0;r<this.sections.length;){let i=this.sections[r++],s=this.sections[r++];s<0?e.push(i,s):e.push(s,i)}return new t(e)}composeDesc(e){return this.empty?e:e.empty?this:pk(this,e)}mapDesc(e,r=!1){return e.empty?this:xv(this,e,r)}mapPos(e,r=-1,i=vr.Simple){let s=0,n=0;for(let o=0;o<this.sections.length;){let a=this.sections[o++],l=this.sections[o++],c=s+a;if(l<0){if(c>e)return n+(e-s);n+=a}else{if(i!=vr.Simple&&c>=e&&(i==vr.TrackDel&&s<e&&c>e||i==vr.TrackBefore&&s<e||i==vr.TrackAfter&&c>e))return null;if(c>e||c==e&&r<0&&!a)return e==s||r<0?n:n+l;n+=l}s=c}if(e>s)throw new RangeError(`Position ${e} is out of range for changeset of length ${s}`);return n}touchesRange(e,r=e){for(let i=0,s=0;i<this.sections.length&&s<=r;){let n=this.sections[i++],o=this.sections[i++],a=s+n;if(o>=0&&s<=r&&a>=e)return s<e&&a>r?"cover":!0;s=a}return!1}toString(){let e="";for(let r=0;r<this.sections.length;){let i=this.sections[r++],s=this.sections[r++];e+=(e?" ":"")+i+(s>=0?":"+s:"")}return e}toJSON(){return this.sections}static fromJSON(e){if(!Array.isArray(e)||e.length%2||e.some(r=>typeof r!="number"))throw new RangeError("Invalid JSON representation of ChangeDesc");return new t(e)}static create(e){return new t(e)}},Br=class t extends ro{constructor(e,r){super(e),this.inserted=r}apply(e){if(this.length!=e.length)throw new RangeError("Applying change set to a document with the wrong length");return Sv(this,(r,i,s,n,o)=>e=e.replace(s,s+(i-r),o),!1),e}mapDesc(e,r=!1){return xv(this,e,r,!0)}invert(e){let r=this.sections.slice(),i=[];for(let s=0,n=0;s<r.length;s+=2){let o=r[s],a=r[s+1];if(a>=0){r[s]=a,r[s+1]=o;let l=s>>1;for(;i.length<l;)i.push(Ae.empty);i.push(o?e.slice(n,n+o):Ae.empty)}n+=o}return new t(r,i)}compose(e){return this.empty?e:e.empty?this:pk(this,e,!0)}map(e,r=!1){return e.empty?this:xv(this,e,r,!0)}iterChanges(e,r=!1){Sv(this,e,r)}get desc(){return ro.create(this.sections)}filter(e){let r=[],i=[],s=[],n=new io(this);e:for(let o=0,a=0;;){let l=o==e.length?1e9:e[o++];for(;a<l||a==l&&n.len==0;){if(n.done)break e;let u=Math.min(n.len,l-a);Qt(s,u,-1);let p=n.ins==-1?-1:n.off==0?n.ins:0;Qt(r,u,p),p>0&&ts(i,r,n.text),n.forward(u),a+=u}let c=e[o++];for(;a<c;){if(n.done)break e;let u=Math.min(n.len,c-a);Qt(r,u,-1),Qt(s,u,n.ins==-1?-1:n.off==0?n.ins:0),n.forward(u),a+=u}}return{changes:new t(r,i),filtered:ro.create(s)}}toJSON(){let e=[];for(let r=0;r<this.sections.length;r+=2){let i=this.sections[r],s=this.sections[r+1];s<0?e.push(i):s==0?e.push([i]):e.push([i].concat(this.inserted[r>>1].toJSON()))}return e}static of(e,r,i){let s=[],n=[],o=0,a=null;function l(u=!1){if(!u&&!s.length)return;o<r&&Qt(s,r-o,-1);let p=new t(s,n);a=a?a.compose(p.map(a)):p,s=[],n=[],o=0}function c(u){if(Array.isArray(u))for(let p of u)c(p);else if(u instanceof t){if(u.length!=r)throw new RangeError(`Mismatched change set length (got ${u.length}, expected ${r})`);l(),a=a?a.compose(u.map(a)):u}else{let{from:p,to:g=p,insert:m}=u;if(p>g||p<0||g>r)throw new RangeError(`Invalid change range ${p} to ${g} (in doc of length ${r})`);let h=m?typeof m=="string"?Ae.of(m.split(i||yv)):m:Ae.empty,d=h.length;if(p==g&&d==0)return;p<o&&l(),p>o&&Qt(s,p-o,-1),Qt(s,g-p,d),ts(n,s,h),o=g}}return c(e),l(!a),a}static empty(e){return new t(e?[e,-1]:[],[])}static fromJSON(e){if(!Array.isArray(e))throw new RangeError("Invalid JSON representation of ChangeSet");let r=[],i=[];for(let s=0;s<e.length;s++){let n=e[s];if(typeof n=="number")r.push(n,-1);else{if(!Array.isArray(n)||typeof n[0]!="number"||n.some((o,a)=>a&&typeof o!="string"))throw new RangeError("Invalid JSON representation of ChangeSet");if(n.length==1)r.push(n[0],0);else{for(;i.length<s;)i.push(Ae.empty);i[s]=Ae.of(n.slice(1)),r.push(n[0],i[s].length)}}}return new t(r,i)}static createSet(e,r){return new t(e,r)}};function Qt(t,e,r,i=!1){if(e==0&&r<=0)return;let s=t.length-2;s>=0&&r<=0&&r==t[s+1]?t[s]+=e:e==0&&t[s]==0?t[s+1]+=r:i?(t[s]+=e,t[s+1]+=r):t.push(e,r)}function ts(t,e,r){if(r.length==0)return;let i=e.length-2>>1;if(i<t.length)t[t.length-1]=t[t.length-1].append(r);else{for(;t.length<i;)t.push(Ae.empty);t.push(r)}}function Sv(t,e,r){let i=t.inserted;for(let s=0,n=0,o=0;o<t.sections.length;){let a=t.sections[o++],l=t.sections[o++];if(l<0)s+=a,n+=a;else{let c=s,u=n,p=Ae.empty;for(;c+=a,u+=l,l&&i&&(p=p.append(i[o-2>>1])),!(r||o==t.sections.length||t.sections[o+1]<0);)a=t.sections[o++],l=t.sections[o++];e(s,c,n,u,p),s=c,n=u}}}function xv(t,e,r,i=!1){let s=[],n=i?[]:null,o=new io(t),a=new io(e);for(let l=-1;;)if(o.ins==-1&&a.ins==-1){let c=Math.min(o.len,a.len);Qt(s,c,-1),o.forward(c),a.forward(c)}else if(a.ins>=0&&(o.ins<0||l==o.i||o.off==0&&(a.len<o.len||a.len==o.len&&!r))){let c=a.len;for(Qt(s,a.ins,-1);c;){let u=Math.min(o.len,c);o.ins>=0&&l<o.i&&o.len<=u&&(Qt(s,0,o.ins),n&&ts(n,s,o.text),l=o.i),o.forward(u),c-=u}a.next()}else if(o.ins>=0){let c=0,u=o.len;for(;u;)if(a.ins==-1){let p=Math.min(u,a.len);c+=p,u-=p,a.forward(p)}else if(a.ins==0&&a.len<u)u-=a.len,a.next();else break;Qt(s,c,l<o.i?o.ins:0),n&&l<o.i&&ts(n,s,o.text),l=o.i,o.forward(o.len-u)}else{if(o.done&&a.done)return n?Br.createSet(s,n):ro.create(s);throw new Error("Mismatched change set lengths")}}function pk(t,e,r=!1){let i=[],s=r?[]:null,n=new io(t),o=new io(e);for(let a=!1;;){if(n.done&&o.done)return s?Br.createSet(i,s):ro.create(i);if(n.ins==0)Qt(i,n.len,0,a),n.next();else if(o.len==0&&!o.done)Qt(i,0,o.ins,a),s&&ts(s,i,o.text),o.next();else{if(n.done||o.done)throw new Error("Mismatched change set lengths");{let l=Math.min(n.len2,o.len),c=i.length;if(n.ins==-1){let u=o.ins==-1?-1:o.off?0:o.ins;Qt(i,l,u,a),s&&u&&ts(s,i,o.text)}else o.ins==-1?(Qt(i,n.off?0:n.len,l,a),s&&ts(s,i,n.textBit(l))):(Qt(i,n.off?0:n.len,o.off?0:o.ins,a),s&&!o.off&&ts(s,i,o.text));a=(n.ins>l||o.ins>=0&&o.len>l)&&(a||i.length>c),n.forward2(l),o.forward(l)}}}}var io=class{constructor(e){this.set=e,this.i=0,this.next()}next(){let{sections:e}=this.set;this.i<e.length?(this.len=e[this.i++],this.ins=e[this.i++]):(this.len=0,this.ins=-2),this.off=0}get done(){return this.ins==-2}get len2(){return this.ins<0?this.len:this.ins}get text(){let{inserted:e}=this.set,r=this.i-2>>1;return r>=e.length?Ae.empty:e[r]}textBit(e){let{inserted:r}=this.set,i=this.i-2>>1;return i>=r.length&&!e?Ae.empty:r[i].slice(this.off,e==null?void 0:this.off+e)}forward(e){e==this.len?this.next():(this.len-=e,this.off+=e)}forward2(e){this.ins==-1?this.forward(e):e==this.ins?this.next():(this.ins-=e,this.off+=e)}},Ta=class t{constructor(e,r,i){this.from=e,this.to=r,this.flags=i}get anchor(){return this.flags&32?this.to:this.from}get head(){return this.flags&32?this.from:this.to}get empty(){return this.from==this.to}get assoc(){return this.flags&8?-1:this.flags&16?1:0}get bidiLevel(){let e=this.flags&7;return e==7?null:e}get goalColumn(){let e=this.flags>>6;return e==16777215?void 0:e}map(e,r=-1){let i,s;return this.empty?i=s=e.mapPos(this.from,r):(i=e.mapPos(this.from,1),s=e.mapPos(this.to,-1)),i==this.from&&s==this.to?this:new t(i,s,this.flags)}extend(e,r=e){if(e<=this.anchor&&r>=this.anchor)return ce.range(e,r);let i=Math.abs(e-this.anchor)>Math.abs(r-this.anchor)?e:r;return ce.range(this.anchor,i)}eq(e,r=!1){return this.anchor==e.anchor&&this.head==e.head&&(!r||!this.empty||this.assoc==e.assoc)}toJSON(){return{anchor:this.anchor,head:this.head}}static fromJSON(e){if(!e||typeof e.anchor!="number"||typeof e.head!="number")throw new RangeError("Invalid JSON representation for SelectionRange");return ce.range(e.anchor,e.head)}static create(e,r,i){return new t(e,r,i)}},ce=class t{constructor(e,r){this.ranges=e,this.mainIndex=r}map(e,r=-1){return e.empty?this:t.create(this.ranges.map(i=>i.map(e,r)),this.mainIndex)}eq(e,r=!1){if(this.ranges.length!=e.ranges.length||this.mainIndex!=e.mainIndex)return!1;for(let i=0;i<this.ranges.length;i++)if(!this.ranges[i].eq(e.ranges[i],r))return!1;return!0}get main(){return this.ranges[this.mainIndex]}asSingle(){return this.ranges.length==1?this:new t([this.main],0)}addRange(e,r=!0){return t.create([e].concat(this.ranges),r?0:this.mainIndex+1)}replaceRange(e,r=this.mainIndex){let i=this.ranges.slice();return i[r]=e,t.create(i,this.mainIndex)}toJSON(){return{ranges:this.ranges.map(e=>e.toJSON()),main:this.mainIndex}}static fromJSON(e){if(!e||!Array.isArray(e.ranges)||typeof e.main!="number"||e.main>=e.ranges.length)throw new RangeError("Invalid JSON representation for EditorSelection");return new t(e.ranges.map(r=>Ta.fromJSON(r)),e.main)}static single(e,r=e){return new t([t.range(e,r)],0)}static create(e,r=0){if(e.length==0)throw new RangeError("A selection needs at least one range");for(let i=0,s=0;s<e.length;s++){let n=e[s];if(n.empty?n.from<=i:n.from<i)return t.normalized(e.slice(),r);i=n.to}return new t(e,r)}static cursor(e,r=0,i,s){return Ta.create(e,e,(r==0?0:r<0?8:16)|(i==null?7:Math.min(6,i))|(s??16777215)<<6)}static range(e,r,i,s){let n=(i??16777215)<<6|(s==null?7:Math.min(6,s));return r<e?Ta.create(r,e,48|n):Ta.create(e,r,(r>e?8:0)|n)}static normalized(e,r=0){let i=e[r];e.sort((s,n)=>s.from-n.from),r=e.indexOf(i);for(let s=1;s<e.length;s++){let n=e[s],o=e[s-1];if(n.empty?n.from<=o.to:n.from<o.to){let a=o.from,l=Math.max(n.to,o.to);s<=r&&r--,e.splice(--s,2,n.anchor>n.head?t.range(l,a):t.range(a,l))}}return new t(e,r)}};function mk(t,e){for(let r of t.ranges)if(r.to>e)throw new RangeError("Selection points outside of document")}var Av=0,fe=class t{constructor(e,r,i,s,n){this.combine=e,this.compareInput=r,this.compare=i,this.isStatic=s,this.id=Av++,this.default=e([]),this.extensions=typeof n=="function"?n(this):n}get reader(){return this}static define(e={}){return new t(e.combine||(r=>r),e.compareInput||((r,i)=>r===i),e.compare||(e.combine?(r,i)=>r===i:Lv),!!e.static,e.enables)}of(e){return new Ra([],this,0,e)}compute(e,r){if(this.isStatic)throw new Error("Can't compute a static facet");return new Ra(e,this,1,r)}computeN(e,r){if(this.isStatic)throw new Error("Can't compute a static facet");return new Ra(e,this,2,r)}from(e,r){return r||(r=i=>i),this.compute([e],i=>r(i.field(e)))}};function Lv(t,e){return t==e||t.length==e.length&&t.every((r,i)=>r===e[i])}var Ra=class{constructor(e,r,i,s){this.dependencies=e,this.facet=r,this.type=i,this.value=s,this.id=Av++}dynamicSlot(e){var r;let i=this.value,s=this.facet.compareInput,n=this.id,o=e[n]>>1,a=this.type==2,l=!1,c=!1,u=[];for(let p of this.dependencies)p=="doc"?l=!0:p=="selection"?c=!0:(((r=e[p.id])!==null&&r!==void 0?r:1)&1)==0&&u.push(e[p.id]);return{create(p){return p.values[o]=i(p),1},update(p,g){if(l&&g.docChanged||c&&(g.docChanged||g.selection)||bv(p,u)){let m=i(p);if(a?!ok(m,p.values[o],s):!s(m,p.values[o]))return p.values[o]=m,1}return 0},reconfigure:(p,g)=>{let m,h=g.config.address[n];if(h!=null){let d=Cd(g,h);if(this.dependencies.every(v=>v instanceof fe?g.facet(v)===p.facet(v):v instanceof pn?g.field(v,!1)==p.field(v,!1):!0)||(a?ok(m=i(p),d,s):s(m=i(p),d)))return p.values[o]=d,0}else m=i(p);return p.values[o]=m,1}}}};function ok(t,e,r){if(t.length!=e.length)return!1;for(let i=0;i<t.length;i++)if(!r(t[i],e[i]))return!1;return!0}function bv(t,e){let r=!1;for(let i of e)Ec(t,i)&1&&(r=!0);return r}function r3(t,e,r){let i=r.map(l=>t[l.id]),s=r.map(l=>l.type),n=i.filter(l=>!(l&1)),o=t[e.id]>>1;function a(l){let c=[];for(let u=0;u<i.length;u++){let p=Cd(l,i[u]);if(s[u]==2)for(let g of p)c.push(g);else c.push(p)}return e.combine(c)}return{create(l){for(let c of i)Ec(l,c);return l.values[o]=a(l),1},update(l,c){if(!bv(l,n))return 0;let u=a(l);return e.compare(u,l.values[o])?0:(l.values[o]=u,1)},reconfigure(l,c){let u=bv(l,i),p=c.config.facets[e.id],g=c.facet(e);if(p&&!u&&Lv(r,p))return l.values[o]=g,0;let m=a(l);return e.compare(m,g)?(l.values[o]=g,0):(l.values[o]=m,1)}}}var ak=fe.define({static:!0}),pn=class t{constructor(e,r,i,s,n){this.id=e,this.createF=r,this.updateF=i,this.compareF=s,this.spec=n,this.provides=void 0}static define(e){let r=new t(Av++,e.create,e.update,e.compare||((i,s)=>i===s),e);return e.provide&&(r.provides=e.provide(r)),r}create(e){let r=e.facet(ak).find(i=>i.field==this);return(r?.create||this.createF)(e)}slot(e){let r=e[this.id]>>1;return{create:i=>(i.values[r]=this.create(i),1),update:(i,s)=>{let n=i.values[r],o=this.updateF(n,s);return this.compareF(n,o)?0:(i.values[r]=o,1)},reconfigure:(i,s)=>s.config.address[this.id]!=null?(i.values[r]=s.field(this),0):(i.values[r]=this.create(i),1)}}init(e){return[this,ak.of({field:this,create:e})]}get extension(){return this}},Zs={lowest:4,low:3,default:2,high:1,highest:0};function Tc(t){return e=>new xd(e,t)}var Td={highest:Tc(Zs.highest),high:Tc(Zs.high),default:Tc(Zs.default),low:Tc(Zs.low),lowest:Tc(Zs.lowest)},xd=class{constructor(e,r){this.inner=e,this.prec=r}},bd=class t{of(e){return new Pc(this,e)}reconfigure(e){return t.reconfigure.of({compartment:this,extension:e})}get(e){return e.config.compartments.get(this)}},Pc=class{constructor(e,r){this.compartment=e,this.inner=r}},wd=class t{constructor(e,r,i,s,n,o){for(this.base=e,this.compartments=r,this.dynamicSlots=i,this.address=s,this.staticValues=n,this.facets=o,this.statusTemplate=[];this.statusTemplate.length<i.length;)this.statusTemplate.push(0)}staticFacet(e){let r=this.address[e.id];return r==null?e.default:this.staticValues[r>>1]}static resolve(e,r,i){let s=[],n=Object.create(null),o=new Map;for(let g of i3(e,r,o))g instanceof pn?s.push(g):(n[g.facet.id]||(n[g.facet.id]=[])).push(g);let a=Object.create(null),l=[],c=[];for(let g of s)a[g.id]=c.length<<1,c.push(m=>g.slot(m));let u=i?.config.facets;for(let g in n){let m=n[g],h=m[0].facet,d=u&&u[g]||[];if(m.every(v=>v.type==0))if(a[h.id]=l.length<<1|1,Lv(d,m))l.push(i.facet(h));else{let v=h.combine(m.map(f=>f.value));l.push(i&&h.compare(v,i.facet(h))?i.facet(h):v)}else{for(let v of m)v.type==0?(a[v.id]=l.length<<1|1,l.push(v.value)):(a[v.id]=c.length<<1,c.push(f=>v.dynamicSlot(f)));a[h.id]=c.length<<1,c.push(v=>r3(v,h,m))}}let p=c.map(g=>g(a));return new t(e,o,p,a,l,n)}};function i3(t,e,r){let i=[[],[],[],[],[]],s=new Map;function n(o,a){let l=s.get(o);if(l!=null){if(l<=a)return;let c=i[l].indexOf(o);c>-1&&i[l].splice(c,1),o instanceof Pc&&r.delete(o.compartment)}if(s.set(o,a),Array.isArray(o))for(let c of o)n(c,a);else if(o instanceof Pc){if(r.has(o.compartment))throw new RangeError("Duplicate use of compartment in extensions");let c=e.get(o.compartment)||o.inner;r.set(o.compartment,c),n(c,a)}else if(o instanceof xd)n(o.inner,o.prec);else if(o instanceof pn)i[a].push(o),o.provides&&n(o.provides,a);else if(o instanceof Ra)i[a].push(o),o.facet.extensions&&n(o.facet.extensions,Zs.default);else{let c=o.extension;if(!c)throw new Error(`Unrecognized extension value in extension set (${o}). This sometimes happens because multiple instances of @codemirror/state are loaded, breaking instanceof checks.`);n(c,a)}}return n(t,Zs.default),i.reduce((o,a)=>o.concat(a))}function Ec(t,e){if(e&1)return 2;let r=e>>1,i=t.status[r];if(i==4)throw new Error("Cyclic dependency between fields and/or facets");if(i&2)return i;t.status[r]=4;let s=t.computeSlot(t,t.config.dynamicSlots[r]);return t.status[r]=2|s}function Cd(t,e){return e&1?t.config.staticValues[e>>1]:t.values[e>>1]}var gk=fe.define(),wv=fe.define({combine:t=>t.some(e=>e),static:!0}),vk=fe.define({combine:t=>t.length?t[0]:void 0,static:!0}),_k=fe.define(),yk=fe.define(),Sk=fe.define(),xk=fe.define({combine:t=>t.length?t[0]:!1}),mn=class{constructor(e,r){this.type=e,this.value=r}static define(){return new Cv}},Cv=class{of(e){return new mn(this,e)}},kv=class{constructor(e){this.map=e}of(e){return new gt(this,e)}},gt=class t{constructor(e,r){this.type=e,this.value=r}map(e){let r=this.type.map(this.value,e);return r===void 0?void 0:r==this.value?this:new t(this.type,r)}is(e){return this.type==e}static define(e={}){return new kv(e.map||(r=>r))}static mapEffects(e,r){if(!e.length)return e;let i=[];for(let s of e){let n=s.map(r);n&&i.push(n)}return i}};gt.reconfigure=gt.define();gt.appendConfig=gt.define();var _r=class t{constructor(e,r,i,s,n,o){this.startState=e,this.changes=r,this.selection=i,this.effects=s,this.annotations=n,this.scrollIntoView=o,this._doc=null,this._state=null,i&&mk(i,r.newLength),n.some(a=>a.type==t.time)||(this.annotations=n.concat(t.time.of(Date.now())))}static create(e,r,i,s,n,o){return new t(e,r,i,s,n,o)}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(e){for(let r of this.annotations)if(r.type==e)return r.value}get docChanged(){return!this.changes.empty}get reconfigured(){return this.startState.config!=this.state.config}isUserEvent(e){let r=this.annotation(t.userEvent);return!!(r&&(r==e||r.length>e.length&&r.slice(0,e.length)==e&&r[e.length]=="."))}};_r.time=mn.define();_r.userEvent=mn.define();_r.addToHistory=mn.define();_r.remote=mn.define();function n3(t,e){let r=[];for(let i=0,s=0;;){let n,o;if(i<t.length&&(s==e.length||e[s]>=t[i]))n=t[i++],o=t[i++];else if(s<e.length)n=e[s++],o=e[s++];else return r;!r.length||r[r.length-1]<n?r.push(n,o):r[r.length-1]<o&&(r[r.length-1]=o)}}function bk(t,e,r){var i;let s,n,o;return r?(s=e.changes,n=Br.empty(e.changes.length),o=t.changes.compose(e.changes)):(s=e.changes.map(t.changes),n=t.changes.mapDesc(e.changes,!0),o=t.changes.compose(s)),{changes:o,selection:e.selection?e.selection.map(n):(i=t.selection)===null||i===void 0?void 0:i.map(s),effects:gt.mapEffects(t.effects,s).concat(gt.mapEffects(e.effects,n)),annotations:t.annotations.length?t.annotations.concat(e.annotations):e.annotations,scrollIntoView:t.scrollIntoView||e.scrollIntoView}}function Tv(t,e,r){let i=e.selection,s=Ma(e.annotations);return e.userEvent&&(s=s.concat(_r.userEvent.of(e.userEvent))),{changes:e.changes instanceof Br?e.changes:Br.of(e.changes||[],r,t.facet(vk)),selection:i&&(i instanceof ce?i:ce.single(i.anchor,i.head)),effects:Ma(e.effects),annotations:s,scrollIntoView:!!e.scrollIntoView}}function wk(t,e,r){let i=Tv(t,e.length?e[0]:{},t.doc.length);e.length&&e[0].filter===!1&&(r=!1);for(let n=1;n<e.length;n++){e[n].filter===!1&&(r=!1);let o=!!e[n].sequential;i=bk(i,Tv(t,e[n],o?i.changes.newLength:t.doc.length),o)}let s=_r.create(t,i.changes,i.selection,i.effects,i.annotations,i.scrollIntoView);return o3(r?s3(s):s)}function s3(t){let e=t.startState,r=!0;for(let s of e.facet(_k)){let n=s(t);if(n===!1){r=!1;break}Array.isArray(n)&&(r=r===!0?n:n3(r,n))}if(r!==!0){let s,n;if(r===!1)n=t.changes.invertedDesc,s=Br.empty(e.doc.length);else{let o=t.changes.filter(r);s=o.changes,n=o.filtered.mapDesc(o.changes).invertedDesc}t=_r.create(e,s,t.selection&&t.selection.map(n),gt.mapEffects(t.effects,n),t.annotations,t.scrollIntoView)}let i=e.facet(yk);for(let s=i.length-1;s>=0;s--){let n=i[s](t);n instanceof _r?t=n:Array.isArray(n)&&n.length==1&&n[0]instanceof _r?t=n[0]:t=wk(e,Ma(n),!1)}return t}function o3(t){let e=t.startState,r=e.facet(Sk),i=t;for(let s=r.length-1;s>=0;s--){let n=r[s](t);n&&Object.keys(n).length&&(i=bk(i,Tv(e,n,t.changes.newLength),!0))}return i==t?t:_r.create(e,t.changes,t.selection,i.effects,i.annotations,i.scrollIntoView)}var a3=[];function Ma(t){return t==null?a3:Array.isArray(t)?t:[t]}var Hi=(function(t){return t[t.Word=0]="Word",t[t.Space=1]="Space",t[t.Other=2]="Other",t})(Hi||(Hi={})),l3=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/,Ev;try{Ev=new RegExp("[\\p{Alphabetic}\\p{Number}_]","u")}catch{}function c3(t){if(Ev)return Ev.test(t);for(let e=0;e<t.length;e++){let r=t[e];if(/\w/.test(r)||r>"\x80"&&(r.toUpperCase()!=r.toLowerCase()||l3.test(r)))return!0}return!1}function h3(t){return e=>{if(!/\S/.test(e))return Hi.Space;if(c3(e))return Hi.Word;for(let r=0;r<t.length;r++)if(e.indexOf(t[r])>-1)return Hi.Word;return Hi.Other}}var vt=class t{constructor(e,r,i,s,n,o){this.config=e,this.doc=r,this.selection=i,this.values=s,this.status=e.statusTemplate.slice(),this.computeSlot=n,o&&(o._state=this);for(let a=0;a<this.config.dynamicSlots.length;a++)Ec(this,a<<1);this.computeSlot=null}field(e,r=!0){let i=this.config.address[e.id];if(i==null){if(r)throw new RangeError("Field is not present in this state");return}return Ec(this,i),Cd(this,i)}update(...e){return wk(this,e,!0)}applyTransaction(e){let r=this.config,{base:i,compartments:s}=r;for(let a of e.effects)a.is(bd.reconfigure)?(r&&(s=new Map,r.compartments.forEach((l,c)=>s.set(c,l)),r=null),s.set(a.value.compartment,a.value.extension)):a.is(gt.reconfigure)?(r=null,i=a.value):a.is(gt.appendConfig)&&(r=null,i=Ma(i).concat(a.value));let n;r?n=e.startState.values.slice():(r=wd.resolve(i,s,this),n=new t(r,this.doc,this.selection,r.dynamicSlots.map(()=>null),(l,c)=>c.reconfigure(l,this),null).values);let o=e.startState.facet(wv)?e.newSelection:e.newSelection.asSingle();new t(r,e.newDoc,o,n,(a,l)=>l.update(a,e),e)}replaceSelection(e){return typeof e=="string"&&(e=this.toText(e)),this.changeByRange(r=>({changes:{from:r.from,to:r.to,insert:e},range:ce.cursor(r.from+e.length)}))}changeByRange(e){let r=this.selection,i=e(r.ranges[0]),s=this.changes(i.changes),n=[i.range],o=Ma(i.effects);for(let a=1;a<r.ranges.length;a++){let l=e(r.ranges[a]),c=this.changes(l.changes),u=c.map(s);for(let g=0;g<a;g++)n[g]=n[g].map(u);let p=s.mapDesc(c,!0);n.push(l.range.map(p)),s=s.compose(u),o=gt.mapEffects(o,u).concat(gt.mapEffects(Ma(l.effects),p))}return{changes:s,selection:ce.create(n,r.mainIndex),effects:o}}changes(e=[]){return e instanceof Br?e:Br.of(e,this.doc.length,this.facet(t.lineSeparator))}toText(e){return Ae.of(e.split(this.facet(t.lineSeparator)||yv))}sliceDoc(e=0,r=this.doc.length){return this.doc.sliceString(e,r,this.lineBreak)}facet(e){let r=this.config.address[e.id];return r==null?e.default:(Ec(this,r),Cd(this,r))}toJSON(e){let r={doc:this.sliceDoc(),selection:this.selection.toJSON()};if(e)for(let i in e){let s=e[i];s instanceof pn&&this.config.address[s.id]!=null&&(r[i]=s.spec.toJSON(this.field(e[i]),this))}return r}static fromJSON(e,r={},i){if(!e||typeof e.doc!="string")throw new RangeError("Invalid JSON representation for EditorState");let s=[];if(i){for(let n in i)if(Object.prototype.hasOwnProperty.call(e,n)){let o=i[n],a=e[n];s.push(o.init(l=>o.spec.fromJSON(a,l)))}}return t.create({doc:e.doc,selection:ce.fromJSON(e.selection),extensions:r.extensions?s.concat([r.extensions]):s})}static create(e={}){let r=wd.resolve(e.extensions||[],new Map),i=e.doc instanceof Ae?e.doc:Ae.of((e.doc||"").split(r.staticFacet(t.lineSeparator)||yv)),s=e.selection?e.selection instanceof ce?e.selection:ce.single(e.selection.anchor,e.selection.head):ce.single(0);return mk(s,i.length),r.staticFacet(wv)||(s=s.asSingle()),new t(r,i,s,r.dynamicSlots.map(()=>null),(n,o)=>o.create(n),null)}get tabSize(){return this.facet(t.tabSize)}get lineBreak(){return this.facet(t.lineSeparator)||`
`}get readOnly(){return this.facet(xk)}phrase(e,...r){for(let i of this.facet(t.phrases))if(Object.prototype.hasOwnProperty.call(i,e)){e=i[e];break}return r.length&&(e=e.replace(/\$(\$|\d*)/g,(i,s)=>{if(s=="$")return"$";let n=+(s||1);return!n||n>r.length?i:r[n-1]})),e}languageDataAt(e,r,i=-1){let s=[];for(let n of this.facet(gk))for(let o of n(this,r,i))Object.prototype.hasOwnProperty.call(o,e)&&s.push(o[e]);return s}charCategorizer(e){return h3(this.languageDataAt("wordChars",e).join(""))}wordAt(e){let{text:r,from:i,length:s}=this.doc.lineAt(e),n=this.charCategorizer(e),o=e-i,a=e-i;for(;o>0;){let l=zi(r,o,!1);if(n(r.slice(l,o))!=Hi.Word)break;o=l}for(;a<s;){let l=zi(r,a);if(n(r.slice(a,l))!=Hi.Word)break;a=l}return o==a?null:ce.range(o+i,a+i)}};vt.allowMultipleSelections=wv;vt.tabSize=fe.define({combine:t=>t.length?t[0]:4});vt.lineSeparator=vk;vt.readOnly=xk;vt.phrases=fe.define({compare(t,e){let r=Object.keys(t),i=Object.keys(e);return r.length==i.length&&r.every(s=>t[s]==e[s])}});vt.languageData=gk;vt.changeFilter=_k;vt.transactionFilter=yk;vt.transactionExtender=Sk;bd.reconfigure=gt.define();var gn=class{eq(e){return this==e}range(e,r=e){return Rc.create(e,r,this)}};gn.prototype.startSide=gn.prototype.endSide=0;gn.prototype.point=!1;gn.prototype.mapMode=vr.TrackDel;var Rc=class t{constructor(e,r,i){this.from=e,this.to=r,this.value=i}static create(e,r,i){return new t(e,r,i)}};function Pv(t,e){return t.from-e.from||t.value.startSide-e.value.startSide}var Rv=class t{constructor(e,r,i,s){this.from=e,this.to=r,this.value=i,this.maxPoint=s}get length(){return this.to[this.to.length-1]}findIndex(e,r,i,s=0){let n=i?this.to:this.from;for(let o=s,a=n.length;;){if(o==a)return o;let l=o+a>>1,c=n[l]-e||(i?this.value[l].endSide:this.value[l].startSide)-r;if(l==o)return c>=0?o:a;c>=0?a=l:o=l+1}}between(e,r,i,s){for(let n=this.findIndex(r,-1e9,!0),o=this.findIndex(i,1e9,!1,n);n<o;n++)if(s(this.from[n]+e,this.to[n]+e,this.value[n])===!1)return!1}map(e,r){let i=[],s=[],n=[],o=-1,a=-1;for(let l=0;l<this.value.length;l++){let c=this.value[l],u=this.from[l]+e,p=this.to[l]+e,g,m;if(u==p){let h=r.mapPos(u,c.startSide,c.mapMode);if(h==null||(g=m=h,c.startSide!=c.endSide&&(m=r.mapPos(u,c.endSide),m<g)))continue}else if(g=r.mapPos(u,c.startSide),m=r.mapPos(p,c.endSide),g>m||g==m&&c.startSide>0&&c.endSide<=0)continue;(m-g||c.endSide-c.startSide)<0||(o<0&&(o=g),c.point&&(a=Math.max(a,m-g)),i.push(c),s.push(g-o),n.push(m-o))}return{mapped:i.length?new t(s,n,i,a):null,pos:o}}},bt=class t{constructor(e,r,i,s){this.chunkPos=e,this.chunk=r,this.nextLayer=i,this.maxPoint=s}static create(e,r,i,s){return new t(e,r,i,s)}get length(){let e=this.chunk.length-1;return e<0?0:Math.max(this.chunkEnd(e),this.nextLayer.length)}get size(){if(this.isEmpty)return 0;let e=this.nextLayer.size;for(let r of this.chunk)e+=r.value.length;return e}chunkEnd(e){return this.chunkPos[e]+this.chunk[e].length}update(e){let{add:r=[],sort:i=!1,filterFrom:s=0,filterTo:n=this.length}=e,o=e.filter;if(r.length==0&&!o)return this;if(i&&(r=r.slice().sort(Pv)),this.isEmpty)return r.length?t.of(r):this;let a=new kd(this,null,-1).goto(0),l=0,c=[],u=new no;for(;a.value||l<r.length;)if(l<r.length&&(a.from-r[l].from||a.startSide-r[l].value.startSide)>=0){let p=r[l++];u.addInner(p.from,p.to,p.value)||c.push(p)}else a.rangeIndex==1&&a.chunkIndex<this.chunk.length&&(l==r.length||this.chunkEnd(a.chunkIndex)<r[l].from)&&(!o||s>this.chunkEnd(a.chunkIndex)||n<this.chunkPos[a.chunkIndex])&&u.addChunk(this.chunkPos[a.chunkIndex],this.chunk[a.chunkIndex])?a.nextChunk():((!o||s>a.to||n<a.from||o(a.from,a.to,a.value))&&(u.addInner(a.from,a.to,a.value)||c.push(Rc.create(a.from,a.to,a.value))),a.next());return u.finishInner(this.nextLayer.isEmpty&&!c.length?t.empty:this.nextLayer.update({add:c,filter:o,filterFrom:s,filterTo:n}))}map(e){if(e.empty||this.isEmpty)return this;let r=[],i=[],s=-1;for(let o=0;o<this.chunk.length;o++){let a=this.chunkPos[o],l=this.chunk[o],c=e.touchesRange(a,a+l.length);if(c===!1)s=Math.max(s,l.maxPoint),r.push(l),i.push(e.mapPos(a));else if(c===!0){let{mapped:u,pos:p}=l.map(a,e);u&&(s=Math.max(s,u.maxPoint),r.push(u),i.push(p))}}let n=this.nextLayer.map(e);return r.length==0?n:new t(i,r,n||t.empty,s)}between(e,r,i){if(!this.isEmpty){for(let s=0;s<this.chunk.length;s++){let n=this.chunkPos[s],o=this.chunk[s];if(r>=n&&e<=n+o.length&&o.between(n,e-n,r-n,i)===!1)return}this.nextLayer.between(e,r,i)}}iter(e=0){return Mc.from([this]).goto(e)}get isEmpty(){return this.nextLayer==this}static iter(e,r=0){return Mc.from(e).goto(r)}static compare(e,r,i,s,n=-1){let o=e.filter(p=>p.maxPoint>0||!p.isEmpty&&p.maxPoint>=n),a=r.filter(p=>p.maxPoint>0||!p.isEmpty&&p.maxPoint>=n),l=lk(o,a,i),c=new eo(o,l,n),u=new eo(a,l,n);i.iterGaps((p,g,m)=>ck(c,p,u,g,m,s)),i.empty&&i.length==0&&ck(c,0,u,0,0,s)}static eq(e,r,i=0,s){s==null&&(s=999999999);let n=e.filter(u=>!u.isEmpty&&r.indexOf(u)<0),o=r.filter(u=>!u.isEmpty&&e.indexOf(u)<0);if(n.length!=o.length)return!1;if(!n.length)return!0;let a=lk(n,o),l=new eo(n,a,0).goto(i),c=new eo(o,a,0).goto(i);for(;;){if(l.to!=c.to||!Mv(l.active,c.active)||l.point&&(!c.point||!l.point.eq(c.point)))return!1;if(l.to>s)return!0;l.next(),c.next()}}static spans(e,r,i,s,n=-1){let o=new eo(e,null,n).goto(r),a=r,l=o.openStart;for(;;){let c=Math.min(o.to,i);if(o.point){let u=o.activeForPoint(o.to),p=o.pointFrom<r?u.length+1:o.point.startSide<0?u.length:Math.min(u.length,l);s.point(a,c,o.point,u,p,o.pointRank),l=Math.min(o.openEnd(c),u.length)}else c>a&&(s.span(a,c,o.active,l),l=o.openEnd(c));if(o.to>i)return l+(o.point&&o.to>i?1:0);a=o.to,o.next()}}static of(e,r=!1){let i=new no;for(let s of e instanceof Rc?[e]:r?u3(e):e)i.add(s.from,s.to,s.value);return i.finish()}static join(e){if(!e.length)return t.empty;let r=e[e.length-1];for(let i=e.length-2;i>=0;i--)for(let s=e[i];s!=t.empty;s=s.nextLayer)r=new t(s.chunkPos,s.chunk,r,Math.max(s.maxPoint,r.maxPoint));return r}};bt.empty=new bt([],[],null,-1);function u3(t){if(t.length>1)for(let e=t[0],r=1;r<t.length;r++){let i=t[r];if(Pv(e,i)>0)return t.slice().sort(Pv);e=i}return t}bt.empty.nextLayer=bt.empty;var no=class t{finishChunk(e){this.chunks.push(new Rv(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,e&&(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(e,r,i){this.addInner(e,r,i)||(this.nextLayer||(this.nextLayer=new t)).add(e,r,i)}addInner(e,r,i){let s=e-this.lastTo||i.startSide-this.last.endSide;if(s<=0&&(e-this.lastFrom||i.startSide-this.last.startSide)<0)throw new Error("Ranges must be added sorted by `from` position and `startSide`");return s<0?!1:(this.from.length==250&&this.finishChunk(!0),this.chunkStart<0&&(this.chunkStart=e),this.from.push(e-this.chunkStart),this.to.push(r-this.chunkStart),this.last=i,this.lastFrom=e,this.lastTo=r,this.value.push(i),i.point&&(this.maxPoint=Math.max(this.maxPoint,r-e)),!0)}addChunk(e,r){if((e-this.lastTo||r.value[0].startSide-this.last.endSide)<0)return!1;this.from.length&&this.finishChunk(!0),this.setMaxPoint=Math.max(this.setMaxPoint,r.maxPoint),this.chunks.push(r),this.chunkPos.push(e);let i=r.value.length-1;return this.last=r.value[i],this.lastFrom=r.from[i]+e,this.lastTo=r.to[i]+e,!0}finish(){return this.finishInner(bt.empty)}finishInner(e){if(this.from.length&&this.finishChunk(!1),this.chunks.length==0)return e;let r=bt.create(this.chunkPos,this.chunks,this.nextLayer?this.nextLayer.finishInner(e):e,this.setMaxPoint);return this.from=null,r}};function lk(t,e,r){let i=new Map;for(let n of t)for(let o=0;o<n.chunk.length;o++)n.chunk[o].maxPoint<=0&&i.set(n.chunk[o],n.chunkPos[o]);let s=new Set;for(let n of e)for(let o=0;o<n.chunk.length;o++){let a=i.get(n.chunk[o]);a!=null&&(r?r.mapPos(a):a)==n.chunkPos[o]&&!r?.touchesRange(a,a+n.chunk[o].length)&&s.add(n.chunk[o])}return s}var kd=class{constructor(e,r,i,s=0){this.layer=e,this.skip=r,this.minPoint=i,this.rank=s}get startSide(){return this.value?this.value.startSide:0}get endSide(){return this.value?this.value.endSide:0}goto(e,r=-1e9){return this.chunkIndex=this.rangeIndex=0,this.gotoInner(e,r,!1),this}gotoInner(e,r,i){for(;this.chunkIndex<this.layer.chunk.length;){let s=this.layer.chunk[this.chunkIndex];if(!(this.skip&&this.skip.has(s)||this.layer.chunkEnd(this.chunkIndex)<e||s.maxPoint<this.minPoint))break;this.chunkIndex++,i=!1}if(this.chunkIndex<this.layer.chunk.length){let s=this.layer.chunk[this.chunkIndex].findIndex(e-this.layer.chunkPos[this.chunkIndex],r,!0);(!i||this.rangeIndex<s)&&this.setRangeIndex(s)}this.next()}forward(e,r){(this.to-e||this.endSide-r)<0&&this.gotoInner(e,r,!0)}next(){for(;;)if(this.chunkIndex==this.layer.chunk.length){this.from=this.to=1e9,this.value=null;break}else{let e=this.layer.chunkPos[this.chunkIndex],r=this.layer.chunk[this.chunkIndex],i=e+r.from[this.rangeIndex];if(this.from=i,this.to=e+r.to[this.rangeIndex],this.value=r.value[this.rangeIndex],this.setRangeIndex(this.rangeIndex+1),this.minPoint<0||this.value.point&&this.to-this.from>=this.minPoint)break}}setRangeIndex(e){if(e==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=e}nextChunk(){this.chunkIndex++,this.rangeIndex=0,this.next()}compare(e){return this.from-e.from||this.startSide-e.startSide||this.rank-e.rank||this.to-e.to||this.endSide-e.endSide}},Mc=class t{constructor(e){this.heap=e}static from(e,r=null,i=-1){let s=[];for(let n=0;n<e.length;n++)for(let o=e[n];!o.isEmpty;o=o.nextLayer)o.maxPoint>=i&&s.push(new kd(o,r,i,n));return s.length==1?s[0]:new t(s)}get startSide(){return this.value?this.value.startSide:0}goto(e,r=-1e9){for(let i of this.heap)i.goto(e,r);for(let i=this.heap.length>>1;i>=0;i--)gv(this.heap,i);return this.next(),this}forward(e,r){for(let i of this.heap)i.forward(e,r);for(let i=this.heap.length>>1;i>=0;i--)gv(this.heap,i);(this.to-e||this.value.endSide-r)<0&&this.next()}next(){if(this.heap.length==0)this.from=this.to=1e9,this.value=null,this.rank=-1;else{let e=this.heap[0];this.from=e.from,this.to=e.to,this.value=e.value,this.rank=e.rank,e.value&&e.next(),gv(this.heap,0)}}};function gv(t,e){for(let r=t[e];;){let i=(e<<1)+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++),r.compare(s)<0)break;t[i]=r,t[e]=s,e=i}}var eo=class{constructor(e,r,i){this.minPoint=i,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=Mc.from(e,r,i)}goto(e,r=-1e9){return this.cursor.goto(e,r),this.active.length=this.activeTo.length=this.activeRank.length=0,this.minActive=-1,this.to=e,this.endSide=r,this.openStart=-1,this.next(),this}forward(e,r){for(;this.minActive>-1&&(this.activeTo[this.minActive]-e||this.active[this.minActive].endSide-r)<0;)this.removeActive(this.minActive);this.cursor.forward(e,r)}removeActive(e){md(this.active,e),md(this.activeTo,e),md(this.activeRank,e),this.minActive=hk(this.active,this.activeTo)}addActive(e){let r=0,{value:i,to:s,rank:n}=this.cursor;for(;r<this.activeRank.length&&(n-this.activeRank[r]||s-this.activeTo[r])>0;)r++;gd(this.active,r,i),gd(this.activeTo,r,s),gd(this.activeRank,r,n),e&&gd(e,r,this.cursor.from),this.minActive=hk(this.active,this.activeTo)}next(){let e=this.to,r=this.point;this.point=null;let i=this.openStart<0?[]:null;for(;;){let s=this.minActive;if(s>-1&&(this.activeTo[s]-this.cursor.from||this.active[s].endSide-this.cursor.startSide)<0){if(this.activeTo[s]>e){this.to=this.activeTo[s],this.endSide=this.active[s].endSide;break}this.removeActive(s),i&&md(i,s)}else if(this.cursor.value)if(this.cursor.from>e){this.to=this.cursor.from,this.endSide=this.cursor.startSide;break}else{let n=this.cursor.value;if(!n.point)this.addActive(i),this.cursor.next();else if(r&&this.cursor.to==this.to&&this.cursor.from<this.cursor.to)this.cursor.next();else{this.point=n,this.pointFrom=this.cursor.from,this.pointRank=this.cursor.rank,this.to=this.cursor.to,this.endSide=n.endSide,this.cursor.next(),this.forward(this.to,this.endSide);break}}else{this.to=this.endSide=1e9;break}}if(i){this.openStart=0;for(let s=i.length-1;s>=0&&i[s]<e;s--)this.openStart++}}activeForPoint(e){if(!this.active.length)return this.active;let r=[];for(let i=this.active.length-1;i>=0&&!(this.activeRank[i]<this.pointRank);i--)(this.activeTo[i]>e||this.activeTo[i]==e&&this.active[i].endSide>=this.point.endSide)&&r.push(this.active[i]);return r.reverse()}openEnd(e){let r=0;for(let i=this.activeTo.length-1;i>=0&&this.activeTo[i]>e;i--)r++;return r}};function ck(t,e,r,i,s,n){t.goto(e),r.goto(i);let o=i+s,a=i,l=i-e;for(;;){let c=t.to+l-r.to||t.endSide-r.endSide,u=c<0?t.to+l:r.to,p=Math.min(u,o);if(t.point||r.point?t.point&&r.point&&(t.point==r.point||t.point.eq(r.point))&&Mv(t.activeForPoint(t.to),r.activeForPoint(r.to))||n.comparePoint(a,p,t.point,r.point):p>a&&!Mv(t.active,r.active)&&n.compareRange(a,p,t.active,r.active),u>o)break;a=u,c<=0&&t.next(),c>=0&&r.next()}}function Mv(t,e){if(t.length!=e.length)return!1;for(let r=0;r<t.length;r++)if(t[r]!=e[r]&&!t[r].eq(e[r]))return!1;return!0}function md(t,e){for(let r=e,i=t.length-1;r<i;r++)t[r]=t[r+1];t.pop()}function gd(t,e,r){for(let i=t.length-1;i>=e;i--)t[i+1]=t[i];t[e]=r}function hk(t,e){let r=-1,i=1e9;for(let s=0;s<e.length;s++)(e[s]-i||t[s].endSide-t[r].endSide)<0&&(r=s,i=e[s]);return r}function Ck(t,e,r,i){for(let s=0,n=0;;){if(n>=e)return s;if(s==t.length)break;n+=t.charCodeAt(s)==9?r-n%r:1,s=zi(t,s)}return i===!0?-1:t.length}var kk=typeof Symbol>"u"?"__\u037C":Symbol.for("\u037C"),Dv=typeof Symbol>"u"?"__styleSet"+Math.floor(Math.random()*1e8):Symbol("styleSet"),Tk=typeof globalThis<"u"?globalThis:typeof window<"u"?window:{},qr=class{constructor(e,r){this.rules=[];let{finish:i}=r||{};function s(o){return/^@/.test(o)?[o]:o.split(/,\s*/)}function n(o,a,l,c){let u=[],p=/^@(\w+)\b/.exec(o[0]),g=p&&p[1]=="keyframes";if(p&&a==null)return l.push(o[0]+";");for(let m in a){let h=a[m];if(/&/.test(m))n(m.split(/,\s*/).map(d=>o.map(v=>d.replace(/&/,v))).reduce((d,v)=>d.concat(v)),h,l);else if(h&&typeof h=="object"){if(!p)throw new RangeError("The value of a property ("+m+") should be a primitive value.");n(s(m),h,u,g)}else h!=null&&u.push(m.replace(/_.*/,"").replace(/[A-Z]/g,d=>"-"+d.toLowerCase())+": "+h+";")}(u.length||g)&&l.push((i&&!p&&!c?o.map(i):o).join(", ")+" {"+u.join(" ")+"}")}for(let o in e)n(s(o),e[o],this.rules)}getRules(){return this.rules.join(`
`)}static newName(){let e=Tk[kk]||1;return Tk[kk]=e+1,"\u037C"+e.toString(36)}static mount(e,r,i){let s=e[Dv],n=i&&i.nonce;s?n&&s.setNonce(n):s=new Ov(e,n),s.mount(Array.isArray(r)?r:[r],e)}},Ek=new Map,Ov=class{constructor(e,r){let i=e.ownerDocument||e,s=i.defaultView;if(!e.head&&e.adoptedStyleSheets&&s.CSSStyleSheet){let n=Ek.get(i);if(n)return e[Dv]=n;this.sheet=new s.CSSStyleSheet,Ek.set(i,this)}else this.styleTag=i.createElement("style"),r&&this.styleTag.setAttribute("nonce",r);this.modules=[],e[Dv]=this}mount(e,r){let i=this.sheet,s=0,n=0;for(let o=0;o<e.length;o++){let a=e[o],l=this.modules.indexOf(a);if(l<n&&l>-1&&(this.modules.splice(l,1),n--,l=-1),l==-1){if(this.modules.splice(n++,0,a),i)for(let c=0;c<a.rules.length;c++)i.insertRule(a.rules[c],s++)}else{for(;n<l;)s+=this.modules[n++].rules.length;s+=a.rules.length,n++}}if(i)r.adoptedStyleSheets.indexOf(this.sheet)<0&&(r.adoptedStyleSheets=[this.sheet,...r.adoptedStyleSheets]);else{let o="";for(let l=0;l<this.modules.length;l++)o+=this.modules[l].getRules()+`
`;this.styleTag.textContent=o;let a=r.head||r;this.styleTag.parentNode!=a&&a.insertBefore(this.styleTag,a.firstChild)}}setNonce(e){this.styleTag&&this.styleTag.getAttribute("nonce")!=e&&this.styleTag.setAttribute("nonce",e)}};var so={8:"Backspace",9:"Tab",10:"Enter",12:"NumLock",13:"Enter",16:"Shift",17:"Control",18:"Alt",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",44:"PrintScreen",45:"Insert",46:"Delete",59:";",61:"=",91:"Meta",92:"Meta",106:"*",107:"+",108:",",109:"-",110:".",111:"/",144:"NumLock",145:"ScrollLock",160:"Shift",161:"Shift",162:"Control",163:"Control",164:"Alt",165:"Alt",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"},Pd={48:")",49:"!",50:"@",51:"#",52:"$",53:"%",54:"^",55:"&",56:"*",57:"(",59:":",61:"+",173:"_",186:":",187:"+",188:"<",189:"_",190:">",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},_J=typeof navigator<"u"&&/Mac/.test(navigator.platform),yJ=typeof navigator<"u"&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent);for(wt=0;wt<10;wt++)so[48+wt]=so[96+wt]=String(wt);var wt;for(wt=1;wt<=24;wt++)so[wt+111]="F"+wt;var wt;for(wt=65;wt<=90;wt++)so[wt]=String.fromCharCode(wt+32),Pd[wt]=String.fromCharCode(wt);var wt;for(Ed in so)Pd.hasOwnProperty(Ed)||(Pd[Ed]=so[Ed]);var Ed;function zc(t){let e;return t.nodeType==11?e=t.getSelection?t:t.ownerDocument:e=t,e.getSelection()}function Hv(t,e){return e?t==e||t.contains(e.nodeType!=1?e.parentNode:e):!1}function p3(t){let e=t.activeElement;for(;e&&e.shadowRoot;)e=e.shadowRoot.activeElement;return e}function Id(t,e){if(!e.anchorNode)return!1;try{return Hv(t,e.anchorNode)}catch{return!1}}function $c(t){return t.nodeType==3?lo(t,0,t.nodeValue.length).getClientRects():t.nodeType==1?t.getClientRects():[]}function Bc(t,e,r,i){return r?Pk(t,e,r,i,-1)||Pk(t,e,r,i,1):!1}function ao(t){for(var e=0;;e++)if(t=t.previousSibling,!t)return e}function Hd(t){return t.nodeType==1&&/^(DIV|P|LI|UL|OL|BLOCKQUOTE|DD|DT|H\d|SECTION|PRE)$/.test(t.nodeName)}function Pk(t,e,r,i,s){for(;;){if(t==r&&e==i)return!0;if(e==(s<0?0:vn(t))){if(t.nodeName=="DIV")return!1;let n=t.parentNode;if(!n||n.nodeType!=1)return!1;e=ao(t)+(s<0?0:1),t=n}else if(t.nodeType==1){if(t=t.childNodes[e+(s<0?-1:0)],t.nodeType==1&&t.contentEditable=="false")return!1;e=s<0?vn(t):0}else return!1}}function vn(t){return t.nodeType==3?t.nodeValue.length:t.childNodes.length}function Xd(t,e){let r=e?t.left:t.right;return{left:r,right:r,top:t.top,bottom:t.bottom}}function m3(t){let e=t.visualViewport;return e?{left:0,right:e.width,top:0,bottom:e.height}:{left:0,right:t.innerWidth,top:0,bottom:t.innerHeight}}function s2(t,e){let r=e.width/t.offsetWidth,i=e.height/t.offsetHeight;return(r>.995&&r<1.005||!isFinite(r)||Math.abs(e.width-t.offsetWidth)<1)&&(r=1),(i>.995&&i<1.005||!isFinite(i)||Math.abs(e.height-t.offsetHeight)<1)&&(i=1),{scaleX:r,scaleY:i}}function g3(t,e,r,i,s,n,o,a){let l=t.ownerDocument,c=l.defaultView||window;for(let u=t,p=!1;u&&!p;)if(u.nodeType==1){let g,m=u==l.body,h=1,d=1;if(m)g=m3(c);else{if(/^(fixed|sticky)$/.test(getComputedStyle(u).position)&&(p=!0),u.scrollHeight<=u.clientHeight&&u.scrollWidth<=u.clientWidth){u=u.assignedSlot||u.parentNode;continue}let _=u.getBoundingClientRect();({scaleX:h,scaleY:d}=s2(u,_)),g={left:_.left,right:_.left+u.clientWidth*h,top:_.top,bottom:_.top+u.clientHeight*d}}let v=0,f=0;if(s=="nearest")e.top<g.top?(f=-(g.top-e.top+o),r>0&&e.bottom>g.bottom+f&&(f=e.bottom-g.bottom+f+o)):e.bottom>g.bottom&&(f=e.bottom-g.bottom+o,r<0&&e.top-f<g.top&&(f=-(g.top+f-e.top+o)));else{let _=e.bottom-e.top,S=g.bottom-g.top;f=(s=="center"&&_<=S?e.top+_/2-S/2:s=="start"||s=="center"&&r<0?e.top-o:e.bottom-S+o)-g.top}if(i=="nearest"?e.left<g.left?(v=-(g.left-e.left+n),r>0&&e.right>g.right+v&&(v=e.right-g.right+v+n)):e.right>g.right&&(v=e.right-g.right+n,r<0&&e.left<g.left+v&&(v=-(g.left+v-e.left+n))):v=(i=="center"?e.left+(e.right-e.left)/2-(g.right-g.left)/2:i=="start"==a?e.left-n:e.right-(g.right-g.left)+n)-g.left,v||f)if(m)c.scrollBy(v,f);else{let _=0,S=0;if(f){let b=u.scrollTop;u.scrollTop+=f/d,S=(u.scrollTop-b)*d}if(v){let b=u.scrollLeft;u.scrollLeft+=v/h,_=(u.scrollLeft-b)*h}e={left:e.left-_,top:e.top-S,right:e.right-_,bottom:e.bottom-S},_&&Math.abs(_-v)<1&&(i="nearest"),S&&Math.abs(S-f)<1&&(s="nearest")}if(m)break;u=u.assignedSlot||u.parentNode}else if(u.nodeType==11)u=u.host;else break}function v3(t){let e=t.ownerDocument,r,i;for(let s=t.parentNode;s&&!(s==e.body||r&&i);)if(s.nodeType==1)!i&&s.scrollHeight>s.clientHeight&&(i=s),!r&&s.scrollWidth>s.clientWidth&&(r=s),s=s.assignedSlot||s.parentNode;else if(s.nodeType==11)s=s.host;else break;return{x:r,y:i}}var zv=class{constructor(){this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}eq(e){return this.anchorNode==e.anchorNode&&this.anchorOffset==e.anchorOffset&&this.focusNode==e.focusNode&&this.focusOffset==e.focusOffset}setRange(e){let{anchorNode:r,focusNode:i}=e;this.set(r,Math.min(e.anchorOffset,r?vn(r):0),i,Math.min(e.focusOffset,i?vn(i):0))}set(e,r,i,s){this.anchorNode=e,this.anchorOffset=r,this.focusNode=i,this.focusOffset=s}},La=null;function o2(t){if(t.setActive)return t.setActive();if(La)return t.focus(La);let e=[];for(let r=t;r&&(e.push(r,r.scrollTop,r.scrollLeft),r!=r.ownerDocument);r=r.parentNode);if(t.focus(La==null?{get preventScroll(){return La={preventScroll:!0},!0}}:void 0),!La){La=!1;for(let r=0;r<e.length;){let i=e[r++],s=e[r++],n=e[r++];i.scrollTop!=s&&(i.scrollTop=s),i.scrollLeft!=n&&(i.scrollLeft=n)}}}var Rk;function lo(t,e,r=e){let i=Rk||(Rk=document.createRange());return i.setEnd(t,r),i.setStart(t,e),i}function Oa(t,e,r,i){let s={key:e,code:e,keyCode:r,which:r,cancelable:!0};i&&({altKey:s.altKey,ctrlKey:s.ctrlKey,shiftKey:s.shiftKey,metaKey:s.metaKey}=i);let n=new KeyboardEvent("keydown",s);n.synthetic=!0,t.dispatchEvent(n);let o=new KeyboardEvent("keyup",s);return o.synthetic=!0,t.dispatchEvent(o),n.defaultPrevented||o.defaultPrevented}function _3(t){for(;t;){if(t&&(t.nodeType==9||t.nodeType==11&&t.host))return t;t=t.assignedSlot||t.parentNode}return null}function a2(t){for(;t.attributes.length;)t.removeAttributeNode(t.attributes[0])}function y3(t,e){let r=e.focusNode,i=e.focusOffset;if(!r||e.anchorNode!=r||e.anchorOffset!=i)return!1;for(i=Math.min(i,vn(r));;)if(i){if(r.nodeType!=1)return!1;let s=r.childNodes[i-1];s.contentEditable=="false"?i--:(r=s,i=vn(r))}else{if(r==t)return!0;i=ao(r),r=r.parentNode}}function l2(t){return t.scrollTop>Math.max(1,t.scrollHeight-t.clientHeight-4)}function c2(t,e){for(let r=t,i=e;;){if(r.nodeType==3&&i>0)return{node:r,offset:i};if(r.nodeType==1&&i>0){if(r.contentEditable=="false")return null;r=r.childNodes[i-1],i=vn(r)}else if(r.parentNode&&!Hd(r))i=ao(r),r=r.parentNode;else return null}}function h2(t,e){for(let r=t,i=e;;){if(r.nodeType==3&&i<r.nodeValue.length)return{node:r,offset:i};if(r.nodeType==1&&i<r.childNodes.length){if(r.contentEditable=="false")return null;r=r.childNodes[i],i=0}else if(r.parentNode&&!Hd(r))i=ao(r)+1,r=r.parentNode;else return null}}var lr=class t{constructor(e,r,i=!0){this.node=e,this.offset=r,this.precise=i}static before(e,r){return new t(e.parentNode,ao(e),r)}static after(e,r){return new t(e.parentNode,ao(e)+1,r)}},m_=[],Ze=class t{constructor(){this.parent=null,this.dom=null,this.flags=2}get overrideDOMText(){return null}get posAtStart(){return this.parent?this.parent.posBefore(this):0}get posAtEnd(){return this.posAtStart+this.length}posBefore(e){let r=this.posAtStart;for(let i of this.children){if(i==e)return r;r+=i.length+i.breakAfter}throw new RangeError("Invalid child in posBefore")}posAfter(e){return this.posBefore(e)+e.length}sync(e,r){if(this.flags&2){let i=this.dom,s=null,n;for(let o of this.children){if(o.flags&7){if(!o.dom&&(n=s?s.nextSibling:i.firstChild)){let a=t.get(n);(!a||!a.parent&&a.canReuseDOM(o))&&o.reuseDOM(n)}o.sync(e,r),o.flags&=-8}if(n=s?s.nextSibling:i.firstChild,r&&!r.written&&r.node==i&&n!=o.dom&&(r.written=!0),o.dom.parentNode==i)for(;n&&n!=o.dom;)n=Mk(n);else i.insertBefore(o.dom,n);s=o.dom}for(n=s?s.nextSibling:i.firstChild,n&&r&&r.node==i&&(r.written=!0);n;)n=Mk(n)}else if(this.flags&1)for(let i of this.children)i.flags&7&&(i.sync(e,r),i.flags&=-8)}reuseDOM(e){}localPosFromDOM(e,r){let i;if(e==this.dom)i=this.dom.childNodes[r];else{let s=vn(e)==0?0:r==0?-1:1;for(;;){let n=e.parentNode;if(n==this.dom)break;s==0&&n.firstChild!=n.lastChild&&(e==n.firstChild?s=-1:s=1),e=n}s<0?i=e:i=e.nextSibling}if(i==this.dom.firstChild)return 0;for(;i&&!t.get(i);)i=i.nextSibling;if(!i)return this.length;for(let s=0,n=0;;s++){let o=this.children[s];if(o.dom==i)return n;n+=o.length+o.breakAfter}}domBoundsAround(e,r,i=0){let s=-1,n=-1,o=-1,a=-1;for(let l=0,c=i,u=i;l<this.children.length;l++){let p=this.children[l],g=c+p.length;if(c<e&&g>r)return p.domBoundsAround(e,r,c);if(g>=e&&s==-1&&(s=l,n=c),c>r&&p.dom.parentNode==this.dom){o=l,a=u;break}u=g,c=g+p.breakAfter}return{from:n,to:a<0?i+this.length:a,startDOM:(s?this.children[s-1].dom.nextSibling:null)||this.dom.firstChild,endDOM:o<this.children.length&&o>=0?this.children[o].dom:null}}markDirty(e=!1){this.flags|=2,this.markParentsDirty(e)}markParentsDirty(e){for(let r=this.parent;r;r=r.parent){if(e&&(r.flags|=2),r.flags&1)return;r.flags|=1,e=!1}}setParent(e){this.parent!=e&&(this.parent=e,this.flags&7&&this.markParentsDirty(!0))}setDOM(e){this.dom!=e&&(this.dom&&(this.dom.cmView=null),this.dom=e,e.cmView=this)}get rootView(){for(let e=this;;){let r=e.parent;if(!r)return e;e=r}}replaceChildren(e,r,i=m_){this.markDirty();for(let s=e;s<r;s++){let n=this.children[s];n.parent==this&&i.indexOf(n)<0&&n.destroy()}this.children.splice(e,r-e,...i);for(let s=0;s<i.length;s++)i[s].setParent(this)}ignoreMutation(e){return!1}ignoreEvent(e){return!1}childCursor(e=this.length){return new zd(this.children,e,this.children.length)}childPos(e,r=1){return this.childCursor().findPos(e,r)}toString(){let e=this.constructor.name.replace("View","");return e+(this.children.length?"("+this.children.join()+")":this.length?"["+(e=="Text"?this.text:this.length)+"]":"")+(this.breakAfter?"#":"")}static get(e){return e.cmView}get isEditable(){return!0}get isWidget(){return!1}get isHidden(){return!1}merge(e,r,i,s,n,o){return!1}become(e){return!1}canReuseDOM(e){return e.constructor==this.constructor&&!((this.flags|e.flags)&8)}getSide(){return 0}destroy(){for(let e of this.children)e.parent==this&&e.destroy();this.parent=null}};Ze.prototype.breakAfter=0;function Mk(t){let e=t.nextSibling;return t.parentNode.removeChild(t),e}var zd=class{constructor(e,r,i){this.children=e,this.pos=r,this.i=i,this.off=0}findPos(e,r=1){for(;;){if(e>this.pos||e==this.pos&&(r>0||this.i==0||this.children[this.i-1].breakAfter))return this.off=e-this.pos,this;let i=this.children[--this.i];this.pos-=i.length+i.breakAfter}}};function u2(t,e,r,i,s,n,o,a,l){let{children:c}=t,u=c.length?c[e]:null,p=n.length?n[n.length-1]:null,g=p?p.breakAfter:o;if(!(e==i&&u&&!o&&!g&&n.length<2&&u.merge(r,s,n.length?p:null,r==0,a,l))){if(i<c.length){let m=c[i];m&&(s<m.length||m.breakAfter&&p?.breakAfter)?(e==i&&(m=m.split(s),s=0),!g&&p&&m.merge(0,s,p,!0,0,l)?n[n.length-1]=m:((s||m.children.length&&!m.children[0].length)&&m.merge(0,s,null,!1,0,l),n.push(m))):m?.breakAfter&&(p?p.breakAfter=1:o=1),i++}for(u&&(u.breakAfter=o,r>0&&(!o&&n.length&&u.merge(r,u.length,n[0],!1,a,0)?u.breakAfter=n.shift().breakAfter:(r<u.length||u.children.length&&u.children[u.children.length-1].length==0)&&u.merge(r,u.length,null,!1,a,0),e++));e<i&&n.length;)if(c[i-1].become(n[n.length-1]))i--,n.pop(),l=n.length?0:a;else if(c[e].become(n[0]))e++,n.shift(),a=n.length?0:l;else break;!n.length&&e&&i<c.length&&!c[e-1].breakAfter&&c[i].merge(0,0,c[e-1],!1,a,l)&&e--,(e<i||n.length)&&t.replaceChildren(e,i,n)}}function f2(t,e,r,i,s,n){let o=t.childCursor(),{i:a,off:l}=o.findPos(r,1),{i:c,off:u}=o.findPos(e,-1),p=e-r;for(let g of i)p+=g.length;t.length+=p,u2(t,c,u,a,l,i,0,s,n)}var yr=typeof navigator<"u"?navigator:{userAgent:"",vendor:"",platform:""},$v=typeof document<"u"?document:{documentElement:{style:{}}},jv=/Edge\/(\d+)/.exec(yr.userAgent),d2=/MSIE \d/.test(yr.userAgent),Wv=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(yr.userAgent),Jd=!!(d2||Wv||jv),Ak=!Jd&&/gecko\/(\d+)/i.test(yr.userAgent),Bv=!Jd&&/Chrome\/(\d+)/.exec(yr.userAgent),Lk="webkitFontSmoothing"in $v.documentElement.style,p2=!Jd&&/Apple Computer/.test(yr.vendor),Dk=p2&&(/Mobile\/\w+/.test(yr.userAgent)||yr.maxTouchPoints>2),ee={mac:Dk||/Mac/.test(yr.platform),windows:/Win/.test(yr.platform),linux:/Linux|X11/.test(yr.platform),ie:Jd,ie_version:d2?$v.documentMode||6:Wv?+Wv[1]:jv?+jv[1]:0,gecko:Ak,gecko_version:Ak?+(/Firefox\/(\d+)/.exec(yr.userAgent)||[0,0])[1]:0,chrome:!!Bv,chrome_version:Bv?+Bv[1]:0,ios:Dk,android:/Android\b/.test(yr.userAgent),webkit:Lk,safari:p2,webkit_version:Lk?+(/\bAppleWebKit\/(\d+)/.exec(yr.userAgent)||[0,0])[1]:0,tabSize:$v.documentElement.style.tabSize!=null?"tab-size":"-moz-tab-size"},S3=256,Ki=class t extends Ze{constructor(e){super(),this.text=e}get length(){return this.text.length}createDOM(e){this.setDOM(e||document.createTextNode(this.text))}sync(e,r){this.dom||this.createDOM(),this.dom.nodeValue!=this.text&&(r&&r.node==this.dom&&(r.written=!0),this.dom.nodeValue=this.text)}reuseDOM(e){e.nodeType==3&&this.createDOM(e)}merge(e,r,i){return this.flags&8||i&&(!(i instanceof t)||this.length-(r-e)+i.length>S3||i.flags&8)?!1:(this.text=this.text.slice(0,e)+(i?i.text:"")+this.text.slice(r),this.markDirty(),!0)}split(e){let r=new t(this.text.slice(e));return this.text=this.text.slice(0,e),this.markDirty(),r.flags|=this.flags&8,r}localPosFromDOM(e,r){return e==this.dom?r:r?this.text.length:0}domAtPos(e){return new lr(this.dom,e)}domBoundsAround(e,r,i){return{from:i,to:i+this.length,startDOM:this.dom,endDOM:this.dom.nextSibling}}coordsAt(e,r){return x3(this.dom,e,r)}},ns=class t extends Ze{constructor(e,r=[],i=0){super(),this.mark=e,this.children=r,this.length=i;for(let s of r)s.setParent(this)}setAttrs(e){if(a2(e),this.mark.class&&(e.className=this.mark.class),this.mark.attrs)for(let r in this.mark.attrs)e.setAttribute(r,this.mark.attrs[r]);return e}canReuseDOM(e){return super.canReuseDOM(e)&&!((this.flags|e.flags)&8)}reuseDOM(e){e.nodeName==this.mark.tagName.toUpperCase()&&(this.setDOM(e),this.flags|=6)}sync(e,r){this.dom?this.flags&4&&this.setAttrs(this.dom):this.setDOM(this.setAttrs(document.createElement(this.mark.tagName))),super.sync(e,r)}merge(e,r,i,s,n,o){return i&&(!(i instanceof t&&i.mark.eq(this.mark))||e&&n<=0||r<this.length&&o<=0)?!1:(f2(this,e,r,i?i.children.slice():[],n-1,o-1),this.markDirty(),!0)}split(e){let r=[],i=0,s=-1,n=0;for(let a of this.children){let l=i+a.length;l>e&&r.push(i<e?a.split(e-i):a),s<0&&i>=e&&(s=n),i=l,n++}let o=this.length-e;return this.length=e,s>-1&&(this.children.length=s,this.markDirty()),new t(this.mark,r,o)}domAtPos(e){return m2(this,e)}coordsAt(e,r){return v2(this,e,r)}};function x3(t,e,r){let i=t.nodeValue.length;e>i&&(e=i);let s=e,n=e,o=0;e==0&&r<0||e==i&&r>=0?ee.chrome||ee.gecko||(e?(s--,o=1):n<i&&(n++,o=-1)):r<0?s--:n<i&&n++;let a=lo(t,s,n).getClientRects();if(!a.length)return null;let l=a[(o?o<0:r>=0)?0:a.length-1];return ee.safari&&!o&&l.width==0&&(l=Array.prototype.find.call(a,c=>c.width)||l),o?Xd(l,o<0):l||null}var $d=class t extends Ze{static create(e,r,i){return new t(e,r,i)}constructor(e,r,i){super(),this.widget=e,this.length=r,this.side=i,this.prevWidget=null}split(e){let r=t.create(this.widget,this.length-e,this.side);return this.length-=e,r}sync(e){(!this.dom||!this.widget.updateDOM(this.dom,e))&&(this.dom&&this.prevWidget&&this.prevWidget.destroy(this.dom),this.prevWidget=null,this.setDOM(this.widget.toDOM(e)),this.widget.editable||(this.dom.contentEditable="false"))}getSide(){return this.side}merge(e,r,i,s,n,o){return i&&(!(i instanceof t)||!this.widget.compare(i.widget)||e>0&&n<=0||r<this.length&&o<=0)?!1:(this.length=e+(i?i.length:0)+(this.length-r),!0)}become(e){return e instanceof t&&e.side==this.side&&this.widget.constructor==e.widget.constructor?(this.widget.compare(e.widget)||this.markDirty(!0),this.dom&&!this.prevWidget&&(this.prevWidget=this.widget),this.widget=e.widget,this.length=e.length,!0):!1}ignoreMutation(){return!0}ignoreEvent(e){return this.widget.ignoreEvent(e)}get overrideDOMText(){if(this.length==0)return Ae.empty;let e=this;for(;e.parent;)e=e.parent;let{view:r}=e,i=r&&r.state.doc,s=this.posAtStart;return i?i.slice(s,s+this.length):Ae.empty}domAtPos(e){return(this.length?e==0:this.side>0)?lr.before(this.dom):lr.after(this.dom,e==this.length)}domBoundsAround(){return null}coordsAt(e,r){let i=this.widget.coordsAt(this.dom,e,r);if(i)return i;let s=this.dom.getClientRects(),n=null;if(!s.length)return null;let o=this.side?this.side<0:e>0;for(let a=o?s.length-1:0;n=s[a],!(e>0?a==0:a==s.length-1||n.top<n.bottom);a+=o?-1:1);return Xd(n,!o)}get isEditable(){return!1}get isWidget(){return!0}get isHidden(){return this.widget.isHidden}destroy(){super.destroy(),this.dom&&this.widget.destroy(this.dom)}},jc=class t extends Ze{constructor(e){super(),this.side=e}get length(){return 0}merge(){return!1}become(e){return e instanceof t&&e.side==this.side}split(){return new t(this.side)}sync(){if(!this.dom){let e=document.createElement("img");e.className="cm-widgetBuffer",e.setAttribute("aria-hidden","true"),this.setDOM(e)}}getSide(){return this.side}domAtPos(e){return this.side>0?lr.before(this.dom):lr.after(this.dom)}localPosFromDOM(){return 0}domBoundsAround(){return null}coordsAt(e){return this.dom.getBoundingClientRect()}get overrideDOMText(){return Ae.empty}get isHidden(){return!0}};Ki.prototype.children=$d.prototype.children=jc.prototype.children=m_;function m2(t,e){let r=t.dom,{children:i}=t,s=0;for(let n=0;s<i.length;s++){let o=i[s],a=n+o.length;if(!(a==n&&o.getSide()<=0)){if(e>n&&e<a&&o.dom.parentNode==r)return o.domAtPos(e-n);if(e<=n)break;n=a}}for(let n=s;n>0;n--){let o=i[n-1];if(o.dom.parentNode==r)return o.domAtPos(o.length)}for(let n=s;n<i.length;n++){let o=i[n];if(o.dom.parentNode==r)return o.domAtPos(0)}return new lr(r,0)}function g2(t,e,r){let i,{children:s}=t;r>0&&e instanceof ns&&s.length&&(i=s[s.length-1])instanceof ns&&i.mark.eq(e.mark)?g2(i,e.children[0],r-1):(s.push(e),e.setParent(t)),t.length+=e.length}function v2(t,e,r){let i=null,s=-1,n=null,o=-1;function a(c,u){for(let p=0,g=0;p<c.children.length&&g<=u;p++){let m=c.children[p],h=g+m.length;h>=u&&(m.children.length?a(m,u-g):(!n||n.isHidden&&r>0)&&(h>u||g==h&&m.getSide()>0)?(n=m,o=u-g):(g<u||g==h&&m.getSide()<0&&!m.isHidden)&&(i=m,s=u-g)),g=h}}a(t,e);let l=(r<0?i:n)||i||n;return l?l.coordsAt(Math.max(0,l==i?s:o),r):b3(t)}function b3(t){let e=t.dom.lastChild;if(!e)return t.dom.getBoundingClientRect();let r=$c(e);return r[r.length-1]||null}function Vv(t,e){for(let r in t)r=="class"&&e.class?e.class+=" "+t.class:r=="style"&&e.style?e.style+=";"+t.style:e[r]=t[r];return e}var Ok=Object.create(null);function jd(t,e,r){if(t==e)return!0;t||(t=Ok),e||(e=Ok);let i=Object.keys(t),s=Object.keys(e);if(i.length-(r&&i.indexOf(r)>-1?1:0)!=s.length-(r&&s.indexOf(r)>-1?1:0))return!1;for(let n of i)if(n!=r&&(s.indexOf(n)==-1||t[n]!==e[n]))return!1;return!0}function Uv(t,e,r){let i=!1;if(e)for(let s in e)r&&s in r||(i=!0,s=="style"?t.style.cssText="":t.removeAttribute(s));if(r)for(let s in r)e&&e[s]==r[s]||(i=!0,s=="style"?t.style.cssText=r[s]:t.setAttribute(s,r[s]));return i}function w3(t){let e=Object.create(null);for(let r=0;r<t.attributes.length;r++){let i=t.attributes[r];e[i.name]=i.value}return e}var Ba=class{eq(e){return!1}updateDOM(e,r){return!1}compare(e){return this==e||this.constructor==e.constructor&&this.eq(e)}get estimatedHeight(){return-1}get lineBreaks(){return 0}ignoreEvent(e){return!0}coordsAt(e,r,i){return null}get isHidden(){return!1}get editable(){return!1}destroy(e){}},Vi=(function(t){return t[t.Text=0]="Text",t[t.WidgetBefore=1]="WidgetBefore",t[t.WidgetAfter=2]="WidgetAfter",t[t.WidgetRange=3]="WidgetRange",t})(Vi||(Vi={})),_t=class extends gn{constructor(e,r,i,s){super(),this.startSide=e,this.endSide=r,this.widget=i,this.spec=s}get heightRelevant(){return!1}static mark(e){return new Wc(e)}static widget(e){let r=Math.max(-1e4,Math.min(1e4,e.side||0)),i=!!e.block;return r+=i&&!e.inlineOrder?r>0?3e8:-4e8:r>0?1e8:-1e8,new ss(e,r,r,i,e.widget||null,!1)}static replace(e){let r=!!e.block,i,s;if(e.isBlockGap)i=-5e8,s=4e8;else{let{start:n,end:o}=_2(e,r);i=(n?r?-3e8:-1:5e8)-1,s=(o?r?2e8:1:-6e8)+1}return new ss(e,i,s,r,e.widget||null,!0)}static line(e){return new Vc(e)}static set(e,r=!1){return bt.of(e,r)}hasHeight(){return this.widget?this.widget.estimatedHeight>-1:!1}};_t.none=bt.empty;var Wc=class t extends _t{constructor(e){let{start:r,end:i}=_2(e);super(r?-1:5e8,i?1:-6e8,null,e),this.tagName=e.tagName||"span",this.class=e.class||"",this.attrs=e.attributes||null}eq(e){var r,i;return this==e||e instanceof t&&this.tagName==e.tagName&&(this.class||((r=this.attrs)===null||r===void 0?void 0:r.class))==(e.class||((i=e.attrs)===null||i===void 0?void 0:i.class))&&jd(this.attrs,e.attrs,"class")}range(e,r=e){if(e>=r)throw new RangeError("Mark decorations may not be empty");return super.range(e,r)}};Wc.prototype.point=!1;var Vc=class t extends _t{constructor(e){super(-2e8,-2e8,null,e)}eq(e){return e instanceof t&&this.spec.class==e.spec.class&&jd(this.spec.attributes,e.spec.attributes)}range(e,r=e){if(r!=e)throw new RangeError("Line decoration ranges must be zero-length");return super.range(e,r)}};Vc.prototype.mapMode=vr.TrackBefore;Vc.prototype.point=!0;var ss=class t extends _t{constructor(e,r,i,s,n,o){super(r,i,n,e),this.block=s,this.isReplace=o,this.mapMode=s?r<=0?vr.TrackBefore:vr.TrackAfter:vr.TrackDel}get type(){return this.startSide!=this.endSide?Vi.WidgetRange:this.startSide<=0?Vi.WidgetBefore:Vi.WidgetAfter}get heightRelevant(){return this.block||!!this.widget&&(this.widget.estimatedHeight>=5||this.widget.lineBreaks>0)}eq(e){return e instanceof t&&C3(this.widget,e.widget)&&this.block==e.block&&this.startSide==e.startSide&&this.endSide==e.endSide}range(e,r=e){if(this.isReplace&&(e>r||e==r&&this.startSide>0&&this.endSide<=0))throw new RangeError("Invalid range for replacement decoration");if(!this.isReplace&&r!=e)throw new RangeError("Widget decorations can only have zero-length ranges");return super.range(e,r)}};ss.prototype.point=!0;function _2(t,e=!1){let{inclusiveStart:r,inclusiveEnd:i}=t;return r==null&&(r=t.inclusive),i==null&&(i=t.inclusive),{start:r??e,end:i??e}}function C3(t,e){return t==e||!!(t&&e&&t.compare(e))}function Kv(t,e,r,i=0){let s=r.length-1;s>=0&&r[s]+i>=t?r[s]=Math.max(r[s],e):r.push(t,e)}var Wt=class t extends Ze{constructor(){super(...arguments),this.children=[],this.length=0,this.prevAttrs=void 0,this.attrs=null,this.breakAfter=0}merge(e,r,i,s,n,o){if(i){if(!(i instanceof t))return!1;this.dom||i.transferDOM(this)}return s&&this.setDeco(i?i.attrs:null),f2(this,e,r,i?i.children.slice():[],n,o),!0}split(e){let r=new t;if(r.breakAfter=this.breakAfter,this.length==0)return r;let{i,off:s}=this.childPos(e);s&&(r.append(this.children[i].split(s),0),this.children[i].merge(s,this.children[i].length,null,!1,0,0),i++);for(let n=i;n<this.children.length;n++)r.append(this.children[n],0);for(;i>0&&this.children[i-1].length==0;)this.children[--i].destroy();return this.children.length=i,this.markDirty(),this.length=e,r}transferDOM(e){this.dom&&(this.markDirty(),e.setDOM(this.dom),e.prevAttrs=this.prevAttrs===void 0?this.attrs:this.prevAttrs,this.prevAttrs=void 0,this.dom=null)}setDeco(e){jd(this.attrs,e)||(this.dom&&(this.prevAttrs=this.attrs,this.markDirty()),this.attrs=e)}append(e,r){g2(this,e,r)}addLineDeco(e){let r=e.spec.attributes,i=e.spec.class;r&&(this.attrs=Vv(r,this.attrs||{})),i&&(this.attrs=Vv({class:i},this.attrs||{}))}domAtPos(e){return m2(this,e)}reuseDOM(e){e.nodeName=="DIV"&&(this.setDOM(e),this.flags|=6)}sync(e,r){var i;this.dom?this.flags&4&&(a2(this.dom),this.dom.className="cm-line",this.prevAttrs=this.attrs?null:void 0):(this.setDOM(document.createElement("div")),this.dom.className="cm-line",this.prevAttrs=this.attrs?null:void 0),this.prevAttrs!==void 0&&(Uv(this.dom,this.prevAttrs,this.attrs),this.dom.classList.add("cm-line"),this.prevAttrs=void 0),super.sync(e,r);let s=this.dom.lastChild;for(;s&&Ze.get(s)instanceof ns;)s=s.lastChild;if(!s||!this.length||s.nodeName!="BR"&&((i=Ze.get(s))===null||i===void 0?void 0:i.isEditable)==!1&&(!ee.ios||!this.children.some(n=>n instanceof Ki))){let n=document.createElement("BR");n.cmIgnore=!0,this.dom.appendChild(n)}}measureTextSize(){if(this.children.length==0||this.length>20)return null;let e=0,r;for(let i of this.children){if(!(i instanceof Ki)||/[^ -~]/.test(i.text))return null;let s=$c(i.dom);if(s.length!=1)return null;e+=s[0].width,r=s[0].height}return e?{lineHeight:this.dom.getBoundingClientRect().height,charWidth:e/this.length,textHeight:r}:null}coordsAt(e,r){let i=v2(this,e,r);if(!this.children.length&&i&&this.parent){let{heightOracle:s}=this.parent.view.viewState,n=i.bottom-i.top;if(Math.abs(n-s.lineHeight)<2&&s.textHeight<n){let o=(n-s.textHeight)/2;return{top:i.top+o,bottom:i.bottom-o,left:i.left,right:i.left}}}return i}become(e){return e instanceof t&&this.children.length==0&&e.children.length==0&&jd(this.attrs,e.attrs)&&this.breakAfter==e.breakAfter}covers(){return!0}static find(e,r){for(let i=0,s=0;i<e.children.length;i++){let n=e.children[i],o=s+n.length;if(o>=r){if(n instanceof t)return n;if(o>r)break}s=o+n.breakAfter}return null}},oo=class t extends Ze{constructor(e,r,i){super(),this.widget=e,this.length=r,this.deco=i,this.breakAfter=0,this.prevWidget=null}merge(e,r,i,s,n,o){return i&&(!(i instanceof t)||!this.widget.compare(i.widget)||e>0&&n<=0||r<this.length&&o<=0)?!1:(this.length=e+(i?i.length:0)+(this.length-r),!0)}domAtPos(e){return e==0?lr.before(this.dom):lr.after(this.dom,e==this.length)}split(e){let r=this.length-e;this.length=e;let i=new t(this.widget,r,this.deco);return i.breakAfter=this.breakAfter,i}get children(){return m_}sync(e){(!this.dom||!this.widget.updateDOM(this.dom,e))&&(this.dom&&this.prevWidget&&this.prevWidget.destroy(this.dom),this.prevWidget=null,this.setDOM(this.widget.toDOM(e)),this.widget.editable||(this.dom.contentEditable="false"))}get overrideDOMText(){return this.parent?this.parent.view.state.doc.slice(this.posAtStart,this.posAtEnd):Ae.empty}domBoundsAround(){return null}become(e){return e instanceof t&&e.widget.constructor==this.widget.constructor?(e.widget.compare(this.widget)||this.markDirty(!0),this.dom&&!this.prevWidget&&(this.prevWidget=this.widget),this.widget=e.widget,this.length=e.length,this.deco=e.deco,this.breakAfter=e.breakAfter,!0):!1}ignoreMutation(){return!0}ignoreEvent(e){return this.widget.ignoreEvent(e)}get isEditable(){return!1}get isWidget(){return!0}coordsAt(e,r){let i=this.widget.coordsAt(this.dom,e,r);return i||(this.widget instanceof Uc?null:Xd(this.dom.getBoundingClientRect(),this.length?e==0:r<=0))}destroy(){super.destroy(),this.dom&&this.widget.destroy(this.dom)}covers(e){let{startSide:r,endSide:i}=this.deco;return r==i?!1:e<0?r<0:i>0}},Uc=class extends Ba{constructor(e){super(),this.height=e}toDOM(){let e=document.createElement("div");return e.className="cm-gap",this.updateDOM(e),e}eq(e){return e.height==this.height}updateDOM(e){return e.style.height=this.height+"px",!0}get editable(){return!0}get estimatedHeight(){return this.height}ignoreEvent(){return!1}},Ic=class t{constructor(e,r,i,s){this.doc=e,this.pos=r,this.end=i,this.disallowBlockEffectsFor=s,this.content=[],this.curLine=null,this.breakAtStart=0,this.pendingBuffer=0,this.bufferMarks=[],this.atCursorPos=!0,this.openStart=-1,this.openEnd=-1,this.text="",this.textOff=0,this.cursor=e.iter(),this.skip=r}posCovered(){if(this.content.length==0)return!this.breakAtStart&&this.doc.lineAt(this.pos).from!=this.pos;let e=this.content[this.content.length-1];return!(e.breakAfter||e instanceof oo&&e.deco.endSide<0)}getLine(){return this.curLine||(this.content.push(this.curLine=new Wt),this.atCursorPos=!0),this.curLine}flushBuffer(e=this.bufferMarks){this.pendingBuffer&&(this.curLine.append(Rd(new jc(-1),e),e.length),this.pendingBuffer=0)}addBlockWidget(e){this.flushBuffer(),this.curLine=null,this.content.push(e)}finish(e){this.pendingBuffer&&e<=this.bufferMarks.length?this.flushBuffer():this.pendingBuffer=0,!this.posCovered()&&!(e&&this.content.length&&this.content[this.content.length-1]instanceof oo)&&this.getLine()}buildText(e,r,i){for(;e>0;){if(this.textOff==this.text.length){let{value:n,lineBreak:o,done:a}=this.cursor.next(this.skip);if(this.skip=0,a)throw new Error("Ran out of text content when drawing inline views");if(o){this.posCovered()||this.getLine(),this.content.length?this.content[this.content.length-1].breakAfter=1:this.breakAtStart=1,this.flushBuffer(),this.curLine=null,this.atCursorPos=!0,e--;continue}else this.text=n,this.textOff=0}let s=Math.min(this.text.length-this.textOff,e,512);this.flushBuffer(r.slice(r.length-i)),this.getLine().append(Rd(new Ki(this.text.slice(this.textOff,this.textOff+s)),r),i),this.atCursorPos=!0,this.textOff+=s,e-=s,i=0}}span(e,r,i,s){this.buildText(r-e,i,s),this.pos=r,this.openStart<0&&(this.openStart=s)}point(e,r,i,s,n,o){if(this.disallowBlockEffectsFor[o]&&i instanceof ss){if(i.block)throw new RangeError("Block decorations may not be specified via plugins");if(r>this.doc.lineAt(this.pos).to)throw new RangeError("Decorations that replace line breaks may not be specified via plugins")}let a=r-e;if(i instanceof ss)if(i.block)i.startSide>0&&!this.posCovered()&&this.getLine(),this.addBlockWidget(new oo(i.widget||os.block,a,i));else{let l=$d.create(i.widget||os.inline,a,a?0:i.startSide),c=this.atCursorPos&&!l.isEditable&&n<=s.length&&(e<r||i.startSide>0),u=!l.isEditable&&(e<r||n>s.length||i.startSide<=0),p=this.getLine();this.pendingBuffer==2&&!c&&!l.isEditable&&(this.pendingBuffer=0),this.flushBuffer(s),c&&(p.append(Rd(new jc(1),s),n),n=s.length+Math.max(0,n-s.length)),p.append(Rd(l,s),n),this.atCursorPos=u,this.pendingBuffer=u?e<r||n>s.length?1:2:0,this.pendingBuffer&&(this.bufferMarks=s.slice())}else this.doc.lineAt(this.pos).from==this.pos&&this.getLine().addLineDeco(i);a&&(this.textOff+a<=this.text.length?this.textOff+=a:(this.skip+=a-(this.text.length-this.textOff),this.text="",this.textOff=0),this.pos=r),this.openStart<0&&(this.openStart=n)}static build(e,r,i,s,n){let o=new t(e,r,i,n);return o.openEnd=bt.spans(s,r,i,o),o.openStart<0&&(o.openStart=o.openEnd),o.finish(o.openEnd),o}};function Rd(t,e){for(let r of e)t=new ns(r,[t],t.length);return t}var os=class extends Ba{constructor(e){super(),this.tag=e}eq(e){return e.tag==this.tag}toDOM(){return document.createElement(this.tag)}updateDOM(e){return e.nodeName.toLowerCase()==this.tag}get isHidden(){return!0}};os.inline=new os("span");os.block=new os("div");var Ot=(function(t){return t[t.LTR=0]="LTR",t[t.RTL=1]="RTL",t})(Ot||(Ot={})),co=Ot.LTR,g_=Ot.RTL;function y2(t){let e=[];for(let r=0;r<t.length;r++)e.push(1<<+t[r]);return e}var k3=y2("88888888888888888888888888888888888666888888787833333333337888888000000000000000000000000008888880000000000000000000000000088888888888888888888888888888888888887866668888088888663380888308888800000000000000000000000800000000000000000000000000000008"),T3=y2("4444448826627288999999999992222222222222222222222222222222222222222222222229999999999999999999994444444444644222822222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222999999949999999229989999223333333333"),Gv=Object.create(null),$i=[];for(let t of["()","[]","{}"]){let e=t.charCodeAt(0),r=t.charCodeAt(1);Gv[e]=r,Gv[r]=-e}function S2(t){return t<=247?k3[t]:1424<=t&&t<=1524?2:1536<=t&&t<=1785?T3[t-1536]:1774<=t&&t<=2220?4:8192<=t&&t<=8204?256:64336<=t&&t<=65023?4:1}var E3=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac\ufb50-\ufdff]/,Wi=class{get dir(){return this.level%2?g_:co}constructor(e,r,i){this.from=e,this.to=r,this.level=i}side(e,r){return this.dir==r==e?this.to:this.from}forward(e,r){return e==(this.dir==r)}static find(e,r,i,s){let n=-1;for(let o=0;o<e.length;o++){let a=e[o];if(a.from<=r&&a.to>=r){if(a.level==i)return o;(n<0||(s!=0?s<0?a.from<r:a.to>r:e[n].level>a.level))&&(n=o)}}if(n<0)throw new RangeError("Index out of range");return n}};function x2(t,e){if(t.length!=e.length)return!1;for(let r=0;r<t.length;r++){let i=t[r],s=e[r];if(i.from!=s.from||i.to!=s.to||i.direction!=s.direction||!x2(i.inner,s.inner))return!1}return!0}var Ke=[];function P3(t,e,r,i,s){for(let n=0;n<=i.length;n++){let o=n?i[n-1].to:e,a=n<i.length?i[n].from:r,l=n?256:s;for(let c=o,u=l,p=l;c<a;c++){let g=S2(t.charCodeAt(c));g==512?g=u:g==8&&p==4&&(g=16),Ke[c]=g==4?2:g,g&7&&(p=g),u=g}for(let c=o,u=l,p=l;c<a;c++){let g=Ke[c];if(g==128)c<a-1&&u==Ke[c+1]&&u&24?g=Ke[c]=u:Ke[c]=256;else if(g==64){let m=c+1;for(;m<a&&Ke[m]==64;)m++;let h=c&&u==8||m<r&&Ke[m]==8?p==1?1:8:256;for(let d=c;d<m;d++)Ke[d]=h;c=m-1}else g==8&&p==1&&(Ke[c]=1);u=g,g&7&&(p=g)}}}function R3(t,e,r,i,s){let n=s==1?2:1;for(let o=0,a=0,l=0;o<=i.length;o++){let c=o?i[o-1].to:e,u=o<i.length?i[o].from:r;for(let p=c,g,m,h;p<u;p++)if(m=Gv[g=t.charCodeAt(p)])if(m<0){for(let d=a-3;d>=0;d-=3)if($i[d+1]==-m){let v=$i[d+2],f=v&2?s:v&4?v&1?n:s:0;f&&(Ke[p]=Ke[$i[d]]=f),a=d;break}}else{if($i.length==189)break;$i[a++]=p,$i[a++]=g,$i[a++]=l}else if((h=Ke[p])==2||h==1){let d=h==s;l=d?0:1;for(let v=a-3;v>=0;v-=3){let f=$i[v+2];if(f&2)break;if(d)$i[v+2]|=2;else{if(f&4)break;$i[v+2]|=4}}}}}function M3(t,e,r,i){for(let s=0,n=i;s<=r.length;s++){let o=s?r[s-1].to:t,a=s<r.length?r[s].from:e;for(let l=o;l<a;){let c=Ke[l];if(c==256){let u=l+1;for(;;)if(u==a){if(s==r.length)break;u=r[s++].to,a=s<r.length?r[s].from:e}else if(Ke[u]==256)u++;else break;let p=n==1,g=(u<e?Ke[u]:i)==1,m=p==g?p?1:2:i;for(let h=u,d=s,v=d?r[d-1].to:t;h>l;)h==v&&(h=r[--d].from,v=d?r[d-1].to:t),Ke[--h]=m;l=u}else n=c,l++}}}function qv(t,e,r,i,s,n,o){let a=i%2?2:1;if(i%2==s%2)for(let l=e,c=0;l<r;){let u=!0,p=!1;if(c==n.length||l<n[c].from){let d=Ke[l];d!=a&&(u=!1,p=d==16)}let g=!u&&a==1?[]:null,m=u?i:i+1,h=l;e:for(;;)if(c<n.length&&h==n[c].from){if(p)break e;let d=n[c];if(!u)for(let v=d.to,f=c+1;;){if(v==r)break e;if(f<n.length&&n[f].from==v)v=n[f++].to;else{if(Ke[v]==a)break e;break}}if(c++,g)g.push(d);else{d.from>l&&o.push(new Wi(l,d.from,m));let v=d.direction==co!=!(m%2);Yv(t,v?i+1:i,s,d.inner,d.from,d.to,o),l=d.to}h=d.to}else{if(h==r||(u?Ke[h]!=a:Ke[h]==a))break;h++}g?qv(t,l,h,i+1,s,g,o):l<h&&o.push(new Wi(l,h,m)),l=h}else for(let l=r,c=n.length;l>e;){let u=!0,p=!1;if(!c||l>n[c-1].to){let d=Ke[l-1];d!=a&&(u=!1,p=d==16)}let g=!u&&a==1?[]:null,m=u?i:i+1,h=l;e:for(;;)if(c&&h==n[c-1].to){if(p)break e;let d=n[--c];if(!u)for(let v=d.from,f=c;;){if(v==e)break e;if(f&&n[f-1].to==v)v=n[--f].from;else{if(Ke[v-1]==a)break e;break}}if(g)g.push(d);else{d.to<l&&o.push(new Wi(d.to,l,m));let v=d.direction==co!=!(m%2);Yv(t,v?i+1:i,s,d.inner,d.from,d.to,o),l=d.from}h=d.from}else{if(h==e||(u?Ke[h-1]!=a:Ke[h-1]==a))break;h--}g?qv(t,h,l,i+1,s,g,o):h<l&&o.push(new Wi(h,l,m)),l=h}}function Yv(t,e,r,i,s,n,o){let a=e%2?2:1;P3(t,s,n,i,a),R3(t,s,n,i,a),M3(s,n,i,a),qv(t,s,n,e,r,i,o)}function A3(t,e,r){if(!t)return[new Wi(0,0,e==g_?1:0)];if(e==co&&!r.length&&!E3.test(t))return b2(t.length);if(r.length)for(;t.length>Ke.length;)Ke[Ke.length]=256;let i=[],s=e==co?0:1;return Yv(t,s,s,r,0,t.length,i),i}function b2(t){return[new Wi(0,t,0)]}var w2="";function L3(t,e,r,i,s){var n;let o=i.head-t.from,a=Wi.find(e,o,(n=i.bidiLevel)!==null&&n!==void 0?n:-1,i.assoc),l=e[a],c=l.side(s,r);if(o==c){let g=a+=s?1:-1;if(g<0||g>=e.length)return null;l=e[a=g],o=l.side(!s,r),c=l.side(s,r)}let u=zi(t.text,o,l.forward(s,r));(u<l.from||u>l.to)&&(u=c),w2=t.text.slice(Math.min(o,u),Math.max(o,u));let p=a==(s?e.length-1:0)?null:e[a+(s?1:-1)];return p&&u==c&&p.level+(s?0:1)<l.level?ce.cursor(p.side(!s,r)+t.from,p.forward(s,r)?1:-1,p.level):ce.cursor(u+t.from,l.forward(s,r)?-1:1,l.level)}function D3(t,e,r){for(let i=e;i<r;i++){let s=S2(t.charCodeAt(i));if(s==1)return co;if(s==2||s==4)return g_}return co}var C2=fe.define(),k2=fe.define(),T2=fe.define(),E2=fe.define(),Xv=fe.define(),P2=fe.define(),R2=fe.define(),v_=fe.define(),__=fe.define(),M2=fe.define({combine:t=>t.some(e=>e)}),O3=fe.define({combine:t=>t.some(e=>e)}),A2=fe.define(),Nc=class t{constructor(e,r="nearest",i="nearest",s=5,n=5,o=!1){this.range=e,this.y=r,this.x=i,this.yMargin=s,this.xMargin=n,this.isSnapshot=o}map(e){return e.empty?this:new t(this.range.map(e),this.y,this.x,this.yMargin,this.xMargin,this.isSnapshot)}clip(e){return this.range.to<=e.doc.length?this:new t(ce.cursor(e.doc.length),this.y,this.x,this.yMargin,this.xMargin,this.isSnapshot)}},Md=gt.define({map:(t,e)=>t.map(e)}),L2=gt.define();function fi(t,e,r){let i=t.facet(E2);i.length?i[0](e):window.onerror?window.onerror(String(e),r,void 0,void 0,e):r?console.error(r+":",e):console.error(e)}var rs=fe.define({combine:t=>t.length?t[0]:!0}),B3=0,Ac=fe.define(),ho=class t{constructor(e,r,i,s,n){this.id=e,this.create=r,this.domEventHandlers=i,this.domEventObservers=s,this.extension=n(this)}static define(e,r){let{eventHandlers:i,eventObservers:s,provide:n,decorations:o}=r||{};return new t(B3++,e,i,s,a=>{let l=[Ac.of(a)];return o&&l.push(Kc.of(c=>{let u=c.plugin(a);return u?o(u):_t.none})),n&&l.push(n(a)),l})}static fromClass(e,r){return t.define(i=>new e(i),r)}},Fc=class{constructor(e){this.spec=e,this.mustUpdate=null,this.value=null}update(e){if(this.value){if(this.mustUpdate){let r=this.mustUpdate;if(this.mustUpdate=null,this.value.update)try{this.value.update(r)}catch(i){if(fi(r.state,i,"CodeMirror plugin crashed"),this.value.destroy)try{this.value.destroy()}catch{}this.deactivate()}}}else if(this.spec)try{this.value=this.spec.create(e)}catch(r){fi(e.state,r,"CodeMirror plugin crashed"),this.deactivate()}return this}destroy(e){var r;if(!((r=this.value)===null||r===void 0)&&r.destroy)try{this.value.destroy()}catch(i){fi(e.state,i,"CodeMirror plugin crashed")}}deactivate(){this.spec=this.value=null}},D2=fe.define(),y_=fe.define(),Kc=fe.define(),O2=fe.define(),S_=fe.define(),B2=fe.define();function Bk(t,e){let r=t.state.facet(B2);if(!r.length)return r;let i=r.map(n=>n instanceof Function?n(t):n),s=[];return bt.spans(i,e.from,e.to,{point(){},span(n,o,a,l){let c=n-e.from,u=o-e.from,p=s;for(let g=a.length-1;g>=0;g--,l--){let m=a[g].spec.bidiIsolate,h;if(m==null&&(m=D3(e.text,c,u)),l>0&&p.length&&(h=p[p.length-1]).to==c&&h.direction==m)h.to=u,p=h.inner;else{let d={from:c,to:u,direction:m,inner:[]};p.push(d),p=d.inner}}}}),s}var I2=fe.define();function N2(t){let e=0,r=0,i=0,s=0;for(let n of t.state.facet(I2)){let o=n(t);o&&(o.left!=null&&(e=Math.max(e,o.left)),o.right!=null&&(r=Math.max(r,o.right)),o.top!=null&&(i=Math.max(i,o.top)),o.bottom!=null&&(s=Math.max(s,o.bottom)))}return{left:e,right:r,top:i,bottom:s}}var Lc=fe.define(),Ui=class t{constructor(e,r,i,s){this.fromA=e,this.toA=r,this.fromB=i,this.toB=s}join(e){return new t(Math.min(this.fromA,e.fromA),Math.max(this.toA,e.toA),Math.min(this.fromB,e.fromB),Math.max(this.toB,e.toB))}addToSet(e){let r=e.length,i=this;for(;r>0;r--){let s=e[r-1];if(!(s.fromA>i.toA)){if(s.toA<i.fromA)break;i=i.join(s),e.splice(r-1,1)}}return e.splice(r,0,i),e}static extendWithRanges(e,r){if(r.length==0)return e;let i=[];for(let s=0,n=0,o=0,a=0;;s++){let l=s==e.length?null:e[s],c=o-a,u=l?l.fromB:1e9;for(;n<r.length&&r[n]<u;){let p=r[n],g=r[n+1],m=Math.max(a,p),h=Math.min(u,g);if(m<=h&&new t(m+c,h+c,m,h).addToSet(i),g>u)break;n+=2}if(!l)return i;new t(l.fromA,l.toA,l.fromB,l.toB).addToSet(i),o=l.toA,a=l.toB}}},Wd=class t{constructor(e,r,i){this.view=e,this.state=r,this.transactions=i,this.flags=0,this.startState=e.state,this.changes=Br.empty(this.startState.doc.length);for(let n of i)this.changes=this.changes.compose(n.changes);let s=[];this.changes.iterChangedRanges((n,o,a,l)=>s.push(new Ui(n,o,a,l))),this.changedRanges=s}static create(e,r,i){return new t(e,r,i)}get viewportChanged(){return(this.flags&4)>0}get heightChanged(){return(this.flags&2)>0}get geometryChanged(){return this.docChanged||(this.flags&10)>0}get focusChanged(){return(this.flags&1)>0}get docChanged(){return!this.changes.empty}get selectionSet(){return this.transactions.some(e=>e.selection)}get empty(){return this.flags==0&&this.transactions.length==0}},Vd=class extends Ze{get length(){return this.view.state.doc.length}constructor(e){super(),this.view=e,this.decorations=[],this.dynamicDecorationMap=[!1],this.domChanged=null,this.hasComposition=null,this.markedForComposition=new Set,this.editContextFormatting=_t.none,this.lastCompositionAfterCursor=!1,this.minWidth=0,this.minWidthFrom=0,this.minWidthTo=0,this.impreciseAnchor=null,this.impreciseHead=null,this.forceSelection=!1,this.lastUpdate=Date.now(),this.setDOM(e.contentDOM),this.children=[new Wt],this.children[0].setParent(this),this.updateDeco(),this.updateInner([new Ui(0,0,0,e.state.doc.length)],0,null)}update(e){var r;let i=e.changedRanges;this.minWidth>0&&i.length&&(i.every(({fromA:c,toA:u})=>u<this.minWidthFrom||c>this.minWidthTo)?(this.minWidthFrom=e.changes.mapPos(this.minWidthFrom,1),this.minWidthTo=e.changes.mapPos(this.minWidthTo,1)):this.minWidth=this.minWidthFrom=this.minWidthTo=0),this.updateEditContextFormatting(e);let s=-1;this.view.inputState.composing>=0&&!this.view.observer.editContext&&(!((r=this.domChanged)===null||r===void 0)&&r.newSel?s=this.domChanged.newSel.head:!j3(e.changes,this.hasComposition)&&!e.selectionSet&&(s=e.state.selection.main.head));let n=s>-1?N3(this.view,e.changes,s):null;if(this.domChanged=null,this.hasComposition){this.markedForComposition.clear();let{from:c,to:u}=this.hasComposition;i=new Ui(c,u,e.changes.mapPos(c,-1),e.changes.mapPos(u,1)).addToSet(i.slice())}this.hasComposition=n?{from:n.range.fromB,to:n.range.toB}:null,(ee.ie||ee.chrome)&&!n&&e&&e.state.doc.lines!=e.startState.doc.lines&&(this.forceSelection=!0);let o=this.decorations,a=this.updateDeco(),l=z3(o,a,e.changes);return i=Ui.extendWithRanges(i,l),!(this.flags&7)&&i.length==0?!1:(this.updateInner(i,e.startState.doc.length,n),e.transactions.length&&(this.lastUpdate=Date.now()),!0)}updateInner(e,r,i){this.view.viewState.mustMeasureContent=!0,this.updateChildren(e,r,i);let{observer:s}=this.view;s.ignore(()=>{this.dom.style.height=this.view.viewState.contentHeight/this.view.scaleY+"px",this.dom.style.flexBasis=this.minWidth?this.minWidth+"px":"";let o=ee.chrome||ee.ios?{node:s.selectionRange.focusNode,written:!1}:void 0;this.sync(this.view,o),this.flags&=-8,o&&(o.written||s.selectionRange.focusNode!=o.node)&&(this.forceSelection=!0),this.dom.style.height=""}),this.markedForComposition.forEach(o=>o.flags&=-9);let n=[];if(this.view.viewport.from||this.view.viewport.to<this.view.state.doc.length)for(let o of this.children)o instanceof oo&&o.widget instanceof Uc&&n.push(o.dom);s.updateGaps(n)}updateChildren(e,r,i){let s=i?i.range.addToSet(e.slice()):e,n=this.childCursor(r);for(let o=s.length-1;;o--){let a=o>=0?s[o]:null;if(!a)break;let{fromA:l,toA:c,fromB:u,toB:p}=a,g,m,h,d;if(i&&i.range.fromB<p&&i.range.toB>u){let b=Ic.build(this.view.state.doc,u,i.range.fromB,this.decorations,this.dynamicDecorationMap),C=Ic.build(this.view.state.doc,i.range.toB,p,this.decorations,this.dynamicDecorationMap);m=b.breakAtStart,h=b.openStart,d=C.openEnd;let y=this.compositionView(i);C.breakAtStart?y.breakAfter=1:C.content.length&&y.merge(y.length,y.length,C.content[0],!1,C.openStart,0)&&(y.breakAfter=C.content[0].breakAfter,C.content.shift()),b.content.length&&y.merge(0,0,b.content[b.content.length-1],!0,0,b.openEnd)&&b.content.pop(),g=b.content.concat(y).concat(C.content)}else({content:g,breakAtStart:m,openStart:h,openEnd:d}=Ic.build(this.view.state.doc,u,p,this.decorations,this.dynamicDecorationMap));let{i:v,off:f}=n.findPos(c,1),{i:_,off:S}=n.findPos(l,-1);u2(this,_,S,v,f,g,m,h,d)}i&&this.fixCompositionDOM(i)}updateEditContextFormatting(e){this.editContextFormatting=this.editContextFormatting.map(e.changes);for(let r of e.transactions)for(let i of r.effects)i.is(L2)&&(this.editContextFormatting=i.value)}compositionView(e){let r=new Ki(e.text.nodeValue);r.flags|=8;for(let{deco:s}of e.marks)r=new ns(s,[r],r.length);let i=new Wt;return i.append(r,0),i}fixCompositionDOM(e){let r=(n,o)=>{o.flags|=8|(o.children.some(l=>l.flags&7)?1:0),this.markedForComposition.add(o);let a=Ze.get(n);a&&a!=o&&(a.dom=null),o.setDOM(n)},i=this.childPos(e.range.fromB,1),s=this.children[i.i];r(e.line,s);for(let n=e.marks.length-1;n>=-1;n--)i=s.childPos(i.off,1),s=s.children[i.i],r(n>=0?e.marks[n].node:e.text,s)}updateSelection(e=!1,r=!1){(e||!this.view.observer.selectionRange.focusNode)&&this.view.observer.readSelectionRange();let i=this.view.root.activeElement,s=i==this.dom,n=!s&&Id(this.dom,this.view.observer.selectionRange)&&!(i&&this.dom.contains(i));if(!(s||r||n))return;let o=this.forceSelection;this.forceSelection=!1;let a=this.view.state.selection.main,l=this.moveToLine(this.domAtPos(a.anchor)),c=a.empty?l:this.moveToLine(this.domAtPos(a.head));if(ee.gecko&&a.empty&&!this.hasComposition&&I3(l)){let p=document.createTextNode("");this.view.observer.ignore(()=>l.node.insertBefore(p,l.node.childNodes[l.offset]||null)),l=c=new lr(p,0),o=!0}let u=this.view.observer.selectionRange;(o||!u.focusNode||(!Bc(l.node,l.offset,u.anchorNode,u.anchorOffset)||!Bc(c.node,c.offset,u.focusNode,u.focusOffset))&&!this.suppressWidgetCursorChange(u,a))&&(this.view.observer.ignore(()=>{ee.android&&ee.chrome&&this.dom.contains(u.focusNode)&&$3(u.focusNode,this.dom)&&(this.dom.blur(),this.dom.focus({preventScroll:!0}));let p=zc(this.view.root);if(p)if(a.empty){if(ee.gecko){let g=F3(l.node,l.offset);if(g&&g!=3){let m=(g==1?c2:h2)(l.node,l.offset);m&&(l=new lr(m.node,m.offset))}}p.collapse(l.node,l.offset),a.bidiLevel!=null&&p.caretBidiLevel!==void 0&&(p.caretBidiLevel=a.bidiLevel)}else if(p.extend){p.collapse(l.node,l.offset);try{p.extend(c.node,c.offset)}catch{}}else{let g=document.createRange();a.anchor>a.head&&([l,c]=[c,l]),g.setEnd(c.node,c.offset),g.setStart(l.node,l.offset),p.removeAllRanges(),p.addRange(g)}n&&this.view.root.activeElement==this.dom&&(this.dom.blur(),i&&i.focus())}),this.view.observer.setSelectionRange(l,c)),this.impreciseAnchor=l.precise?null:new lr(u.anchorNode,u.anchorOffset),this.impreciseHead=c.precise?null:new lr(u.focusNode,u.focusOffset)}suppressWidgetCursorChange(e,r){return this.hasComposition&&r.empty&&Bc(e.focusNode,e.focusOffset,e.anchorNode,e.anchorOffset)&&this.posFromDOM(e.focusNode,e.focusOffset)==r.head}enforceCursorAssoc(){if(this.hasComposition)return;let{view:e}=this,r=e.state.selection.main,i=zc(e.root),{anchorNode:s,anchorOffset:n}=e.observer.selectionRange;if(!i||!r.empty||!r.assoc||!i.modify)return;let o=Wt.find(this,r.head);if(!o)return;let a=o.posAtStart;if(r.head==a||r.head==a+o.length)return;let l=this.coordsAt(r.head,-1),c=this.coordsAt(r.head,1);if(!l||!c||l.bottom>c.top)return;let u=this.domAtPos(r.head+r.assoc);i.collapse(u.node,u.offset),i.modify("move",r.assoc<0?"forward":"backward","lineboundary"),e.observer.readSelectionRange();let p=e.observer.selectionRange;e.docView.posFromDOM(p.anchorNode,p.anchorOffset)!=r.from&&i.collapse(s,n)}moveToLine(e){let r=this.dom,i;if(e.node!=r)return e;for(let s=e.offset;!i&&s<r.childNodes.length;s++){let n=Ze.get(r.childNodes[s]);n instanceof Wt&&(i=n.domAtPos(0))}for(let s=e.offset-1;!i&&s>=0;s--){let n=Ze.get(r.childNodes[s]);n instanceof Wt&&(i=n.domAtPos(n.length))}return i?new lr(i.node,i.offset,!0):e}nearest(e){for(let r=e;r;){let i=Ze.get(r);if(i&&i.rootView==this)return i;r=r.parentNode}return null}posFromDOM(e,r){let i=this.nearest(e);if(!i)throw new RangeError("Trying to find position for a DOM position outside of the document");return i.localPosFromDOM(e,r)+i.posAtStart}domAtPos(e){let{i:r,off:i}=this.childCursor().findPos(e,-1);for(;r<this.children.length-1;){let s=this.children[r];if(i<s.length||s instanceof Wt)break;r++,i=0}return this.children[r].domAtPos(i)}coordsAt(e,r){let i=null,s=0;for(let n=this.length,o=this.children.length-1;o>=0;o--){let a=this.children[o],l=n-a.breakAfter,c=l-a.length;if(l<e)break;if(c<=e&&(c<e||a.covers(-1))&&(l>e||a.covers(1))&&(!i||a instanceof Wt&&!(i instanceof Wt&&r>=0)))i=a,s=c;else if(i&&c==e&&l==e&&a instanceof oo&&Math.abs(r)<2){if(a.deco.startSide<0)break;o&&(i=null)}n=c}return i?i.coordsAt(e-s,r):null}coordsForChar(e){let{i:r,off:i}=this.childPos(e,1),s=this.children[r];if(!(s instanceof Wt))return null;for(;s.children.length;){let{i:a,off:l}=s.childPos(i,1);for(;;a++){if(a==s.children.length)return null;if((s=s.children[a]).length)break}i=l}if(!(s instanceof Ki))return null;let n=zi(s.text,i);if(n==i)return null;let o=lo(s.dom,i,n).getClientRects();for(let a=0;a<o.length;a++){let l=o[a];if(a==o.length-1||l.top<l.bottom&&l.left<l.right)return l}return null}measureVisibleLineHeights(e){let r=[],{from:i,to:s}=e,n=this.view.contentDOM.clientWidth,o=n>Math.max(this.view.scrollDOM.clientWidth,this.minWidth)+1,a=-1,l=this.view.textDirection==Ot.LTR;for(let c=0,u=0;u<this.children.length;u++){let p=this.children[u],g=c+p.length;if(g>s)break;if(c>=i){let m=p.dom.getBoundingClientRect();if(r.push(m.height),o){let h=p.dom.lastChild,d=h?$c(h):[];if(d.length){let v=d[d.length-1],f=l?v.right-m.left:m.right-v.left;f>a&&(a=f,this.minWidth=n,this.minWidthFrom=c,this.minWidthTo=g)}}}c=g+p.breakAfter}return r}textDirectionAt(e){let{i:r}=this.childPos(e,1);return getComputedStyle(this.children[r].dom).direction=="rtl"?Ot.RTL:Ot.LTR}measureTextSize(){for(let n of this.children)if(n instanceof Wt){let o=n.measureTextSize();if(o)return o}let e=document.createElement("div"),r,i,s;return e.className="cm-line",e.style.width="99999px",e.style.position="absolute",e.textContent="abc def ghi jkl mno pqr stu",this.view.observer.ignore(()=>{this.dom.appendChild(e);let n=$c(e.firstChild)[0];r=e.getBoundingClientRect().height,i=n?n.width/27:7,s=n?n.height:r,e.remove()}),{lineHeight:r,charWidth:i,textHeight:s}}childCursor(e=this.length){let r=this.children.length;return r&&(e-=this.children[--r].length),new zd(this.children,e,r)}computeBlockGapDeco(){let e=[],r=this.view.viewState;for(let i=0,s=0;;s++){let n=s==r.viewports.length?null:r.viewports[s],o=n?n.from-1:this.length;if(o>i){let a=(r.lineBlockAt(o).bottom-r.lineBlockAt(i).top)/this.view.scaleY;e.push(_t.replace({widget:new Uc(a),block:!0,inclusive:!0,isBlockGap:!0}).range(i,o))}if(!n)break;i=n.to+1}return _t.set(e)}updateDeco(){let e=1,r=this.view.state.facet(Kc).map(n=>(this.dynamicDecorationMap[e++]=typeof n=="function")?n(this.view):n),i=!1,s=this.view.state.facet(O2).map((n,o)=>{let a=typeof n=="function";return a&&(i=!0),a?n(this.view):n});for(s.length&&(this.dynamicDecorationMap[e++]=i,r.push(bt.join(s))),this.decorations=[this.editContextFormatting,...r,this.computeBlockGapDeco(),this.view.viewState.lineGapDeco];e<this.decorations.length;)this.dynamicDecorationMap[e++]=!1;return this.decorations}scrollIntoView(e){if(e.isSnapshot){let c=this.view.viewState.lineBlockAt(e.range.head);this.view.scrollDOM.scrollTop=c.top-e.yMargin,this.view.scrollDOM.scrollLeft=e.xMargin;return}for(let c of this.view.state.facet(A2))try{if(c(this.view,e.range,e))return!0}catch(u){fi(this.view.state,u,"scroll handler")}let{range:r}=e,i=this.coordsAt(r.head,r.empty?r.assoc:r.head>r.anchor?-1:1),s;if(!i)return;!r.empty&&(s=this.coordsAt(r.anchor,r.anchor>r.head?-1:1))&&(i={left:Math.min(i.left,s.left),top:Math.min(i.top,s.top),right:Math.max(i.right,s.right),bottom:Math.max(i.bottom,s.bottom)});let n=N2(this.view),o={left:i.left-n.left,top:i.top-n.top,right:i.right+n.right,bottom:i.bottom+n.bottom},{offsetWidth:a,offsetHeight:l}=this.view.scrollDOM;g3(this.view.scrollDOM,o,r.head<r.anchor?-1:1,e.x,e.y,Math.max(Math.min(e.xMargin,a),-a),Math.max(Math.min(e.yMargin,l),-l),this.view.textDirection==Ot.LTR)}};function I3(t){return t.node.nodeType==1&&t.node.firstChild&&(t.offset==0||t.node.childNodes[t.offset-1].contentEditable=="false")&&(t.offset==t.node.childNodes.length||t.node.childNodes[t.offset].contentEditable=="false")}function F2(t,e){let r=t.observer.selectionRange;if(!r.focusNode)return null;let i=c2(r.focusNode,r.focusOffset),s=h2(r.focusNode,r.focusOffset),n=i||s;if(s&&i&&s.node!=i.node){let a=Ze.get(s.node);if(!a||a instanceof Ki&&a.text!=s.node.nodeValue)n=s;else if(t.docView.lastCompositionAfterCursor){let l=Ze.get(i.node);!l||l instanceof Ki&&l.text!=i.node.nodeValue||(n=s)}}if(t.docView.lastCompositionAfterCursor=n!=i,!n)return null;let o=e-n.offset;return{from:o,to:o+n.node.nodeValue.length,node:n.node}}function N3(t,e,r){let i=F2(t,r);if(!i)return null;let{node:s,from:n,to:o}=i,a=s.nodeValue;if(/[\n\r]/.test(a)||t.state.doc.sliceString(i.from,i.to)!=a)return null;let l=e.invertedDesc,c=new Ui(l.mapPos(n),l.mapPos(o),n,o),u=[];for(let p=s.parentNode;;p=p.parentNode){let g=Ze.get(p);if(g instanceof ns)u.push({node:p,deco:g.mark});else{if(g instanceof Wt||p.nodeName=="DIV"&&p.parentNode==t.contentDOM)return{range:c,text:s,marks:u,line:p};if(p!=t.contentDOM)u.push({node:p,deco:new Wc({inclusive:!0,attributes:w3(p),tagName:p.tagName.toLowerCase()})});else return null}}}function F3(t,e){return t.nodeType!=1?0:(e&&t.childNodes[e-1].contentEditable=="false"?1:0)|(e<t.childNodes.length&&t.childNodes[e].contentEditable=="false"?2:0)}var H3=class{constructor(){this.changes=[]}compareRange(e,r){Kv(e,r,this.changes)}comparePoint(e,r){Kv(e,r,this.changes)}};function z3(t,e,r){let i=new H3;return bt.compare(t,e,r,i),i.changes}function $3(t,e){for(let r=t;r&&r!=e;r=r.assignedSlot||r.parentNode)if(r.nodeType==1&&r.contentEditable=="false")return!0;return!1}function j3(t,e){let r=!1;return e&&t.iterChangedRanges((i,s)=>{i<e.to&&s>e.from&&(r=!0)}),r}function W3(t,e,r=1){let i=t.charCategorizer(e),s=t.doc.lineAt(e),n=e-s.from;if(s.length==0)return ce.cursor(e);n==0?r=1:n==s.length&&(r=-1);let o=n,a=n;r<0?o=zi(s.text,n,!1):a=zi(s.text,n);let l=i(s.text.slice(o,a));for(;o>0;){let c=zi(s.text,o,!1);if(i(s.text.slice(c,o))!=l)break;o=c}for(;a<s.length;){let c=zi(s.text,a);if(i(s.text.slice(a,c))!=l)break;a=c}return ce.range(o+s.from,a+s.from)}function V3(t,e){return e.left>t?e.left-t:Math.max(0,t-e.right)}function U3(t,e){return e.top>t?e.top-t:Math.max(0,t-e.bottom)}function Iv(t,e){return t.top<e.bottom-1&&t.bottom>e.top+1}function Ik(t,e){return e<t.top?{top:e,left:t.left,right:t.right,bottom:t.bottom}:t}function Nk(t,e){return e>t.bottom?{top:t.top,left:t.left,right:t.right,bottom:e}:t}function Jv(t,e,r){let i,s,n,o,a=!1,l,c,u,p;for(let h=t.firstChild;h;h=h.nextSibling){let d=$c(h);for(let v=0;v<d.length;v++){let f=d[v];s&&Iv(s,f)&&(f=Ik(Nk(f,s.bottom),s.top));let _=V3(e,f),S=U3(r,f);if(_==0&&S==0)return h.nodeType==3?Fk(h,e,r):Jv(h,e,r);if(!i||o>S||o==S&&n>_){i=h,s=f,n=_,o=S;let b=S?r<f.top?-1:1:_?e<f.left?-1:1:0;a=!b||(b>0?v<d.length-1:v>0)}_==0?r>f.bottom&&(!u||u.bottom<f.bottom)?(l=h,u=f):r<f.top&&(!p||p.top>f.top)&&(c=h,p=f):u&&Iv(u,f)?u=Nk(u,f.bottom):p&&Iv(p,f)&&(p=Ik(p,f.top))}}if(u&&u.bottom>=r?(i=l,s=u):p&&p.top<=r&&(i=c,s=p),!i)return{node:t,offset:0};let g=Math.max(s.left,Math.min(s.right,e));if(i.nodeType==3)return Fk(i,g,r);if(a&&i.contentEditable!="false")return Jv(i,g,r);let m=Array.prototype.indexOf.call(t.childNodes,i)+(e>=(s.left+s.right)/2?1:0);return{node:t,offset:m}}function Fk(t,e,r){let i=t.nodeValue.length,s=-1,n=1e9,o=0;for(let a=0;a<i;a++){let l=lo(t,a,a+1).getClientRects();for(let c=0;c<l.length;c++){let u=l[c];if(u.top==u.bottom)continue;o||(o=e-u.left);let p=(u.top>r?u.top-r:r-u.bottom)-1;if(u.left-1<=e&&u.right+1>=e&&p<n){let g=e>=(u.left+u.right)/2,m=g;if((ee.chrome||ee.gecko)&&lo(t,a).getBoundingClientRect().left==u.right&&(m=!g),p<=0)return{node:t,offset:a+(m?1:0)};s=a+(m?1:0),n=p}}}return{node:t,offset:s>-1?s:o>0?t.nodeValue.length:0}}function H2(t,e,r,i=-1){var s,n;let o=t.contentDOM.getBoundingClientRect(),a=o.top+t.viewState.paddingTop,l,{docHeight:c}=t.viewState,{x:u,y:p}=e,g=p-a;if(g<0)return 0;if(g>c)return t.state.doc.length;for(let b=t.viewState.heightOracle.textHeight/2,C=!1;l=t.elementAtHeight(g),l.type!=Vi.Text;)for(;g=i>0?l.bottom+b:l.top-b,!(g>=0&&g<=c);){if(C)return r?null:0;C=!0,i=-i}p=a+g;let m=l.from;if(m<t.viewport.from)return t.viewport.from==0?0:r?null:Hk(t,o,l,u,p);if(m>t.viewport.to)return t.viewport.to==t.state.doc.length?t.state.doc.length:r?null:Hk(t,o,l,u,p);let h=t.dom.ownerDocument,d=t.root.elementFromPoint?t.root:h,v=d.elementFromPoint(u,p);v&&!t.contentDOM.contains(v)&&(v=null),v||(u=Math.max(o.left+1,Math.min(o.right-1,u)),v=d.elementFromPoint(u,p),v&&!t.contentDOM.contains(v)&&(v=null));let f,_=-1;if(v&&((s=t.docView.nearest(v))===null||s===void 0?void 0:s.isEditable)!=!1){if(h.caretPositionFromPoint){let b=h.caretPositionFromPoint(u,p);b&&({offsetNode:f,offset:_}=b)}else if(h.caretRangeFromPoint){let b=h.caretRangeFromPoint(u,p);b&&({startContainer:f,startOffset:_}=b,(!t.contentDOM.contains(f)||ee.safari&&K3(f,_,u)||ee.chrome&&G3(f,_,u))&&(f=void 0))}}if(!f||!t.docView.dom.contains(f)){let b=Wt.find(t.docView,m);if(!b)return g>l.top+l.height/2?l.to:l.from;({node:f,offset:_}=Jv(b.dom,u,p))}let S=t.docView.nearest(f);if(!S)return null;if(S.isWidget&&((n=S.dom)===null||n===void 0?void 0:n.nodeType)==1){let b=S.dom.getBoundingClientRect();return e.y<b.top||e.y<=b.bottom&&e.x<=(b.left+b.right)/2?S.posAtStart:S.posAtEnd}else return S.localPosFromDOM(f,_)+S.posAtStart}function Hk(t,e,r,i,s){let n=Math.round((i-e.left)*t.defaultCharacterWidth);if(t.lineWrapping&&r.height>t.defaultLineHeight*1.5){let a=t.viewState.heightOracle.textHeight,l=Math.floor((s-r.top-(t.defaultLineHeight-a)*.5)/a);n+=l*t.viewState.heightOracle.lineLength}let o=t.state.sliceDoc(r.from,r.to);return r.from+Ck(o,n,t.state.tabSize)}function K3(t,e,r){let i;if(t.nodeType!=3||e!=(i=t.nodeValue.length))return!1;for(let s=t.nextSibling;s;s=s.nextSibling)if(s.nodeType!=1||s.nodeName!="BR")return!1;return lo(t,i-1,i).getBoundingClientRect().left>r}function G3(t,e,r){if(e!=0)return!1;for(let s=t;;){let n=s.parentNode;if(!n||n.nodeType!=1||n.firstChild!=s)return!1;if(n.classList.contains("cm-line"))break;s=n}let i=t.nodeType==1?t.getBoundingClientRect():lo(t,0,Math.max(t.nodeValue.length,1)).getBoundingClientRect();return r-i.left>5}function q3(t,e){let r=t.lineBlockAt(e);if(Array.isArray(r.type)){for(let i of r.type)if(i.to>e||i.to==e&&(i.to==r.to||i.type==Vi.Text))return i}return r}function Y3(t,e,r,i){let s=q3(t,e.head),n=!i||s.type!=Vi.Text||!(t.lineWrapping||s.widgetLineBreaks)?null:t.coordsAtPos(e.assoc<0&&e.head>s.from?e.head-1:e.head);if(n){let o=t.dom.getBoundingClientRect(),a=t.textDirectionAt(s.from),l=t.posAtCoords({x:r==(a==Ot.LTR)?o.right-1:o.left+1,y:(n.top+n.bottom)/2});if(l!=null)return ce.cursor(l,r?-1:1)}return ce.cursor(r?s.to:s.from,r?-1:1)}function zk(t,e,r,i){let s=t.state.doc.lineAt(e.head),n=t.bidiSpans(s),o=t.textDirectionAt(s.from);for(let a=e,l=null;;){let c=L3(s,n,o,a,r),u=w2;if(!c){if(s.number==(r?t.state.doc.lines:1))return a;u=`
`,s=t.state.doc.line(s.number+(r?1:-1)),n=t.bidiSpans(s),c=t.visualLineSide(s,!r)}if(l){if(!l(u))return a}else{if(!i)return c;l=i(u)}a=c}}function X3(t,e,r){let i=t.state.charCategorizer(e),s=i(r);return n=>{let o=i(n);return s==Hi.Space&&(s=o),s==o}}function J3(t,e,r,i){let s=e.head,n=r?1:-1;if(s==(r?t.state.doc.length:0))return ce.cursor(s,e.assoc);let o=e.goalColumn,a,l=t.contentDOM.getBoundingClientRect(),c=t.coordsAtPos(s,e.assoc||-1),u=t.documentTop;if(c)o==null&&(o=c.left-l.left),a=n<0?c.top:c.bottom;else{let m=t.viewState.lineBlockAt(s);o==null&&(o=Math.min(l.right-l.left,t.defaultCharacterWidth*(s-m.from))),a=(n<0?m.top:m.bottom)+u}let p=l.left+o,g=i??t.viewState.heightOracle.textHeight>>1;for(let m=0;;m+=10){let h=a+(g+m)*n,d=H2(t,{x:p,y:h},!1,n);if(h<l.top||h>l.bottom||(n<0?d<s:d>s)){let v=t.docView.coordsForChar(d),f=!v||h<v.top?-1:1;return ce.cursor(d,f,void 0,o)}}}function Nd(t,e,r){for(;;){let i=0;for(let s of t)s.between(e-1,e+1,(n,o,a)=>{if(e>n&&e<o){let l=i||r||(e-n<o-e?-1:1);e=l<0?n:o,i=l}});if(!i)return e}}function Nv(t,e,r){let i=Nd(t.state.facet(S_).map(s=>s(t)),r.from,e.head>r.from?-1:1);return i==r.from?r:ce.cursor(i,i<r.from?1:-1)}var Dc="\uFFFF",Qv=class{constructor(e,r){this.points=e,this.text="",this.lineSeparator=r.facet(vt.lineSeparator)}append(e){this.text+=e}lineBreak(){this.text+=Dc}readRange(e,r){if(!e)return this;let i=e.parentNode;for(let s=e;;){this.findPointBefore(i,s);let n=this.text.length;this.readNode(s);let o=s.nextSibling;if(o==r)break;let a=Ze.get(s),l=Ze.get(o);(a&&l?a.breakAfter:(a?a.breakAfter:Hd(s))||Hd(o)&&(s.nodeName!="BR"||s.cmIgnore)&&this.text.length>n)&&this.lineBreak(),s=o}return this.findPointBefore(i,r),this}readTextNode(e){let r=e.nodeValue;for(let i of this.points)i.node==e&&(i.pos=this.text.length+Math.min(i.offset,r.length));for(let i=0,s=this.lineSeparator?null:/\r\n?|\n/g;;){let n=-1,o=1,a;if(this.lineSeparator?(n=r.indexOf(this.lineSeparator,i),o=this.lineSeparator.length):(a=s.exec(r))&&(n=a.index,o=a[0].length),this.append(r.slice(i,n<0?r.length:n)),n<0)break;if(this.lineBreak(),o>1)for(let l of this.points)l.node==e&&l.pos>this.text.length&&(l.pos-=o-1);i=n+o}}readNode(e){if(e.cmIgnore)return;let r=Ze.get(e),i=r&&r.overrideDOMText;if(i!=null){this.findPointInside(e,i.length);for(let s=i.iter();!s.next().done;)s.lineBreak?this.lineBreak():this.append(s.value)}else e.nodeType==3?this.readTextNode(e):e.nodeName=="BR"?e.nextSibling&&this.lineBreak():e.nodeType==1&&this.readRange(e.firstChild,null)}findPointBefore(e,r){for(let i of this.points)i.node==e&&e.childNodes[i.offset]==r&&(i.pos=this.text.length)}findPointInside(e,r){for(let i of this.points)(e.nodeType==3?i.node==e:e.contains(i.node))&&(i.pos=this.text.length+(Q3(e,i.node,i.offset)?r:0))}};function Q3(t,e,r){for(;;){if(!e||r<vn(e))return!1;if(e==t)return!0;r=ao(e)+1,e=e.parentNode}}var Ud=class{constructor(e,r){this.node=e,this.offset=r,this.pos=-1}},Zv=class{constructor(e,r,i,s){this.typeOver=s,this.bounds=null,this.text="",this.domChanged=r>-1;let{impreciseHead:n,impreciseAnchor:o}=e.docView;if(e.state.readOnly&&r>-1)this.newSel=null;else if(r>-1&&(this.bounds=e.docView.domBoundsAround(r,i,0))){let a=n||o?[]:tO(e),l=new Qv(a,e.state);l.readRange(this.bounds.startDOM,this.bounds.endDOM),this.text=l.text,this.newSel=rO(a,this.bounds.from)}else{let a=e.observer.selectionRange,l=n&&n.node==a.focusNode&&n.offset==a.focusOffset||!Hv(e.contentDOM,a.focusNode)?e.state.selection.main.head:e.docView.posFromDOM(a.focusNode,a.focusOffset),c=o&&o.node==a.anchorNode&&o.offset==a.anchorOffset||!Hv(e.contentDOM,a.anchorNode)?e.state.selection.main.anchor:e.docView.posFromDOM(a.anchorNode,a.anchorOffset),u=e.viewport;if((ee.ios||ee.chrome)&&e.state.selection.main.empty&&l!=c&&(u.from>0||u.to<e.state.doc.length)){let p=Math.min(l,c),g=Math.max(l,c),m=u.from-p,h=u.to-g;(m==0||m==1||p==0)&&(h==0||h==-1||g==e.state.doc.length)&&(l=0,c=e.state.doc.length)}this.newSel=ce.single(c,l)}}};function z2(t,e){let r,{newSel:i}=e,s=t.state.selection.main,n=t.inputState.lastKeyTime>Date.now()-100?t.inputState.lastKeyCode:-1;if(e.bounds){let{from:o,to:a}=e.bounds,l=s.from,c=null;(n===8||ee.android&&e.text.length<a-o)&&(l=s.to,c="end");let u=eO(t.state.doc.sliceString(o,a,Dc),e.text,l-o,c);u&&(ee.chrome&&n==13&&u.toB==u.from+2&&e.text.slice(u.from,u.toB)==Dc+Dc&&u.toB--,r={from:o+u.from,to:o+u.toA,insert:Ae.of(e.text.slice(u.from,u.toB).split(Dc))})}else i&&(!t.hasFocus&&t.state.facet(rs)||i.main.eq(s))&&(i=null);if(!r&&!i)return!1;if(!r&&e.typeOver&&!s.empty&&i&&i.main.empty?r={from:s.from,to:s.to,insert:t.state.doc.slice(s.from,s.to)}:r&&r.from>=s.from&&r.to<=s.to&&(r.from!=s.from||r.to!=s.to)&&s.to-s.from-(r.to-r.from)<=4?r={from:s.from,to:s.to,insert:t.state.doc.slice(s.from,r.from).append(r.insert).append(t.state.doc.slice(r.to,s.to))}:(ee.mac||ee.android)&&r&&r.from==r.to&&r.from==s.head-1&&/^\. ?$/.test(r.insert.toString())&&t.contentDOM.getAttribute("autocorrect")=="off"?(i&&r.insert.length==2&&(i=ce.single(i.main.anchor-1,i.main.head-1)),r={from:s.from,to:s.to,insert:Ae.of([" "])}):ee.chrome&&r&&r.from==r.to&&r.from==s.head&&r.insert.toString()==`
 `&&t.lineWrapping&&(i&&(i=ce.single(i.main.anchor-1,i.main.head-1)),r={from:s.from,to:s.to,insert:Ae.of([" "])}),r)return x_(t,r,i,n);if(i&&!i.main.eq(s)){let o=!1,a="select";return t.inputState.lastSelectionTime>Date.now()-50&&(t.inputState.lastSelectionOrigin=="select"&&(o=!0),a=t.inputState.lastSelectionOrigin),t.dispatch({selection:i,scrollIntoView:o,userEvent:a}),!0}else return!1}function x_(t,e,r,i=-1){if(ee.ios&&t.inputState.flushIOSKey(e))return!0;let s=t.state.selection.main;if(ee.android&&(e.to==s.to&&(e.from==s.from||e.from==s.from-1&&t.state.sliceDoc(e.from,s.from)==" ")&&e.insert.length==1&&e.insert.lines==2&&Oa(t.contentDOM,"Enter",13)||(e.from==s.from-1&&e.to==s.to&&e.insert.length==0||i==8&&e.insert.length<e.to-e.from&&e.to>s.head)&&Oa(t.contentDOM,"Backspace",8)||e.from==s.from&&e.to==s.to+1&&e.insert.length==0&&Oa(t.contentDOM,"Delete",46)))return!0;let n=e.insert.toString();t.inputState.composing>=0&&t.inputState.composing++;let o,a=()=>o||(o=Z3(t,e,r));return t.state.facet(P2).some(l=>l(t,e.from,e.to,n,a))||t.dispatch(a()),!0}function Z3(t,e,r){let i,s=t.state,n=s.selection.main;if(e.from>=n.from&&e.to<=n.to&&e.to-e.from>=(n.to-n.from)/3&&(!r||r.main.empty&&r.main.from==e.from+e.insert.length)&&t.inputState.composing<0){let a=n.from<e.from?s.sliceDoc(n.from,e.from):"",l=n.to>e.to?s.sliceDoc(e.to,n.to):"";i=s.replaceSelection(t.state.toText(a+e.insert.sliceString(0,void 0,t.state.lineBreak)+l))}else{let a=s.changes(e),l=r&&r.main.to<=a.newLength?r.main:void 0;if(s.selection.ranges.length>1&&t.inputState.composing>=0&&e.to<=n.to&&e.to>=n.to-10){let c=t.state.sliceDoc(e.from,e.to),u,p=r&&F2(t,r.main.head);if(p){let h=e.insert.length-(e.to-e.from);u={from:p.from,to:p.to-h}}else u=t.state.doc.lineAt(n.head);let g=n.to-e.to,m=n.to-n.from;i=s.changeByRange(h=>{if(h.from==n.from&&h.to==n.to)return{changes:a,range:l||h.map(a)};let d=h.to-g,v=d-c.length;if(h.to-h.from!=m||t.state.sliceDoc(v,d)!=c||h.to>=u.from&&h.from<=u.to)return{range:h};let f=s.changes({from:v,to:d,insert:e.insert}),_=h.to-n.to;return{changes:f,range:l?ce.range(Math.max(0,l.anchor+_),Math.max(0,l.head+_)):h.map(f)}})}else i={changes:a,selection:l&&s.selection.replaceRange(l)}}let o="input.type";return(t.composing||t.inputState.compositionPendingChange&&t.inputState.compositionEndedAt>Date.now()-50)&&(t.inputState.compositionPendingChange=!1,o+=".compose",t.inputState.compositionFirstChange&&(o+=".start",t.inputState.compositionFirstChange=!1)),s.update(i,{userEvent:o,scrollIntoView:!0})}function eO(t,e,r,i){let s=Math.min(t.length,e.length),n=0;for(;n<s&&t.charCodeAt(n)==e.charCodeAt(n);)n++;if(n==s&&t.length==e.length)return null;let o=t.length,a=e.length;for(;o>0&&a>0&&t.charCodeAt(o-1)==e.charCodeAt(a-1);)o--,a--;if(i=="end"){let l=Math.max(0,n-Math.min(o,a));r-=o+l-n}if(o<n&&t.length<e.length){let l=r<=n&&r>=o?n-r:0;n-=l,a=n+(a-o),o=n}else if(a<n){let l=r<=n&&r>=a?n-r:0;n-=l,o=n+(o-a),a=n}return{from:n,toA:o,toB:a}}function tO(t){let e=[];if(t.root.activeElement!=t.contentDOM)return e;let{anchorNode:r,anchorOffset:i,focusNode:s,focusOffset:n}=t.observer.selectionRange;return r&&(e.push(new Ud(r,i)),(s!=r||n!=i)&&e.push(new Ud(s,n))),e}function rO(t,e){if(t.length==0)return null;let r=t[0].pos,i=t.length==2?t[1].pos:r;return r>-1&&i>-1?ce.single(r+e,i+e):null}var e_=class{setSelectionOrigin(e){this.lastSelectionOrigin=e,this.lastSelectionTime=Date.now()}constructor(e){this.view=e,this.lastKeyCode=0,this.lastKeyTime=0,this.lastTouchTime=0,this.lastFocusTime=0,this.lastScrollTop=0,this.lastScrollLeft=0,this.pendingIOSKey=void 0,this.tabFocusMode=-1,this.lastSelectionOrigin=null,this.lastSelectionTime=0,this.lastContextMenu=0,this.scrollHandlers=[],this.handlers=Object.create(null),this.composing=-1,this.compositionFirstChange=null,this.compositionEndedAt=0,this.compositionPendingKey=!1,this.compositionPendingChange=!1,this.mouseSelection=null,this.draggedContent=null,this.handleEvent=this.handleEvent.bind(this),this.notifiedFocused=e.hasFocus,ee.safari&&e.contentDOM.addEventListener("input",()=>null),ee.gecko&&_O(e.contentDOM.ownerDocument)}handleEvent(e){!hO(this.view,e)||this.ignoreDuringComposition(e)||e.type=="keydown"&&this.keydown(e)||this.runHandlers(e.type,e)}runHandlers(e,r){let i=this.handlers[e];if(i){for(let s of i.observers)s(this.view,r);for(let s of i.handlers){if(r.defaultPrevented)break;if(s(this.view,r)){r.preventDefault();break}}}}ensureHandlers(e){let r=iO(e),i=this.handlers,s=this.view.contentDOM;for(let n in r)if(n!="scroll"){let o=!r[n].handlers.length,a=i[n];a&&o!=!a.handlers.length&&(s.removeEventListener(n,this.handleEvent),a=null),a||s.addEventListener(n,this.handleEvent,{passive:o})}for(let n in i)n!="scroll"&&!r[n]&&s.removeEventListener(n,this.handleEvent);this.handlers=r}keydown(e){if(this.lastKeyCode=e.keyCode,this.lastKeyTime=Date.now(),e.keyCode==9&&this.tabFocusMode>-1&&(!this.tabFocusMode||Date.now()<=this.tabFocusMode))return!0;if(this.tabFocusMode>0&&e.keyCode!=27&&sO.indexOf(e.keyCode)<0&&(this.tabFocusMode=-1),ee.android&&ee.chrome&&!e.synthetic&&(e.keyCode==13||e.keyCode==8))return this.view.observer.delayAndroidKey(e.key,e.keyCode),!0;let r;return ee.ios&&!e.synthetic&&!e.altKey&&!e.metaKey&&((r=$2.find(i=>i.keyCode==e.keyCode))&&!e.ctrlKey||nO.indexOf(e.key)>-1&&e.ctrlKey&&!e.shiftKey)?(this.pendingIOSKey=r||e,setTimeout(()=>this.flushIOSKey(),250),!0):(e.keyCode!=229&&this.view.observer.forceFlush(),!1)}flushIOSKey(e){let r=this.pendingIOSKey;return!r||r.key=="Enter"&&e&&e.from<e.to&&/^\S+$/.test(e.insert.toString())?!1:(this.pendingIOSKey=void 0,Oa(this.view.contentDOM,r.key,r.keyCode,r instanceof KeyboardEvent?r:void 0))}ignoreDuringComposition(e){return/^key/.test(e.type)?this.composing>0?!0:ee.safari&&!ee.ios&&this.compositionPendingKey&&Date.now()-this.compositionEndedAt<100?(this.compositionPendingKey=!1,!0):!1:!1}startMouseSelection(e){this.mouseSelection&&this.mouseSelection.destroy(),this.mouseSelection=e}update(e){this.view.observer.update(e),this.mouseSelection&&this.mouseSelection.update(e),this.draggedContent&&e.docChanged&&(this.draggedContent=this.draggedContent.map(e.changes)),e.transactions.length&&(this.lastKeyCode=this.lastSelectionTime=0)}destroy(){this.mouseSelection&&this.mouseSelection.destroy()}};function $k(t,e){return(r,i)=>{try{return e.call(t,i,r)}catch(s){fi(r.state,s)}}}function iO(t){let e=Object.create(null);function r(i){return e[i]||(e[i]={observers:[],handlers:[]})}for(let i of t){let s=i.spec;if(s&&s.domEventHandlers)for(let n in s.domEventHandlers){let o=s.domEventHandlers[n];o&&r(n).handlers.push($k(i.value,o))}if(s&&s.domEventObservers)for(let n in s.domEventObservers){let o=s.domEventObservers[n];o&&r(n).observers.push($k(i.value,o))}}for(let i in di)r(i).handlers.push(di[i]);for(let i in Xr)r(i).observers.push(Xr[i]);return e}var $2=[{key:"Backspace",keyCode:8,inputType:"deleteContentBackward"},{key:"Enter",keyCode:13,inputType:"insertParagraph"},{key:"Enter",keyCode:13,inputType:"insertLineBreak"},{key:"Delete",keyCode:46,inputType:"deleteContentForward"}],nO="dthko",sO=[16,17,18,20,91,92,224,225],Ad=6;function Ld(t){return Math.max(0,t)*.7+8}function oO(t,e){return Math.max(Math.abs(t.clientX-e.clientX),Math.abs(t.clientY-e.clientY))}var t_=class{constructor(e,r,i,s){this.view=e,this.startEvent=r,this.style=i,this.mustSelect=s,this.scrollSpeed={x:0,y:0},this.scrolling=-1,this.lastEvent=r,this.scrollParents=v3(e.contentDOM),this.atoms=e.state.facet(S_).map(o=>o(e));let n=e.contentDOM.ownerDocument;n.addEventListener("mousemove",this.move=this.move.bind(this)),n.addEventListener("mouseup",this.up=this.up.bind(this)),this.extend=r.shiftKey,this.multiple=e.state.facet(vt.allowMultipleSelections)&&aO(e,r),this.dragging=cO(e,r)&&V2(r)==1?null:!1}start(e){this.dragging===!1&&this.select(e)}move(e){if(e.buttons==0)return this.destroy();if(this.dragging||this.dragging==null&&oO(this.startEvent,e)<10)return;this.select(this.lastEvent=e);let r=0,i=0,s=0,n=0,o=this.view.win.innerWidth,a=this.view.win.innerHeight;this.scrollParents.x&&({left:s,right:o}=this.scrollParents.x.getBoundingClientRect()),this.scrollParents.y&&({top:n,bottom:a}=this.scrollParents.y.getBoundingClientRect());let l=N2(this.view);e.clientX-l.left<=s+Ad?r=-Ld(s-e.clientX):e.clientX+l.right>=o-Ad&&(r=Ld(e.clientX-o)),e.clientY-l.top<=n+Ad?i=-Ld(n-e.clientY):e.clientY+l.bottom>=a-Ad&&(i=Ld(e.clientY-a)),this.setScrollSpeed(r,i)}up(e){this.dragging==null&&this.select(this.lastEvent),this.dragging||e.preventDefault(),this.destroy()}destroy(){this.setScrollSpeed(0,0);let e=this.view.contentDOM.ownerDocument;e.removeEventListener("mousemove",this.move),e.removeEventListener("mouseup",this.up),this.view.inputState.mouseSelection=this.view.inputState.draggedContent=null}setScrollSpeed(e,r){this.scrollSpeed={x:e,y:r},e||r?this.scrolling<0&&(this.scrolling=setInterval(()=>this.scroll(),50)):this.scrolling>-1&&(clearInterval(this.scrolling),this.scrolling=-1)}scroll(){let{x:e,y:r}=this.scrollSpeed;e&&this.scrollParents.x&&(this.scrollParents.x.scrollLeft+=e,e=0),r&&this.scrollParents.y&&(this.scrollParents.y.scrollTop+=r,r=0),(e||r)&&this.view.win.scrollBy(e,r),this.dragging===!1&&this.select(this.lastEvent)}skipAtoms(e){let r=null;for(let i=0;i<e.ranges.length;i++){let s=e.ranges[i],n=null;if(s.empty){let o=Nd(this.atoms,s.from,0);o!=s.from&&(n=ce.cursor(o,-1))}else{let o=Nd(this.atoms,s.from,-1),a=Nd(this.atoms,s.to,1);(o!=s.from||a!=s.to)&&(n=ce.range(s.from==s.anchor?o:a,s.from==s.head?o:a))}n&&(r||(r=e.ranges.slice()),r[i]=n)}return r?ce.create(r,e.mainIndex):e}select(e){let{view:r}=this,i=this.skipAtoms(this.style.get(e,this.extend,this.multiple));(this.mustSelect||!i.eq(r.state.selection,this.dragging===!1))&&this.view.dispatch({selection:i,userEvent:"select.pointer"}),this.mustSelect=!1}update(e){e.transactions.some(r=>r.isUserEvent("input.type"))?this.destroy():this.style.update(e)&&setTimeout(()=>this.select(this.lastEvent),20)}};function aO(t,e){let r=t.state.facet(C2);return r.length?r[0](e):ee.mac?e.metaKey:e.ctrlKey}function lO(t,e){let r=t.state.facet(k2);return r.length?r[0](e):ee.mac?!e.altKey:!e.ctrlKey}function cO(t,e){let{main:r}=t.state.selection;if(r.empty)return!1;let i=zc(t.root);if(!i||i.rangeCount==0)return!0;let s=i.getRangeAt(0).getClientRects();for(let n=0;n<s.length;n++){let o=s[n];if(o.left<=e.clientX&&o.right>=e.clientX&&o.top<=e.clientY&&o.bottom>=e.clientY)return!0}return!1}function hO(t,e){if(!e.bubbles)return!0;if(e.defaultPrevented)return!1;for(let r=e.target,i;r!=t.contentDOM;r=r.parentNode)if(!r||r.nodeType==11||(i=Ze.get(r))&&i.ignoreEvent(e))return!1;return!0}var di=Object.create(null),Xr=Object.create(null),j2=ee.ie&&ee.ie_version<15||ee.ios&&ee.webkit_version<604;function uO(t){let e=t.dom.parentNode;if(!e)return;let r=e.appendChild(document.createElement("textarea"));r.style.cssText="position: fixed; left: -10000px; top: 10px",r.focus(),setTimeout(()=>{t.focus(),r.remove(),W2(t,r.value)},50)}function Qd(t,e,r){for(let i of t.facet(e))r=i(r,t);return r}function W2(t,e){e=Qd(t.state,v_,e);let{state:r}=t,i,s=1,n=r.toText(e),o=n.lines==r.selection.ranges.length;if(r_!=null&&r.selection.ranges.every(l=>l.empty)&&r_==n.toString()){let l=-1;i=r.changeByRange(c=>{let u=r.doc.lineAt(c.from);if(u.from==l)return{range:c};l=u.from;let p=r.toText((o?n.line(s++).text:e)+r.lineBreak);return{changes:{from:u.from,insert:p},range:ce.cursor(c.from+p.length)}})}else o?i=r.changeByRange(l=>{let c=n.line(s++);return{changes:{from:l.from,to:l.to,insert:c.text},range:ce.cursor(l.from+c.length)}}):i=r.replaceSelection(n);t.dispatch(i,{userEvent:"input.paste",scrollIntoView:!0})}Xr.scroll=t=>{t.inputState.lastScrollTop=t.scrollDOM.scrollTop,t.inputState.lastScrollLeft=t.scrollDOM.scrollLeft};di.keydown=(t,e)=>(t.inputState.setSelectionOrigin("select"),e.keyCode==27&&t.inputState.tabFocusMode!=0&&(t.inputState.tabFocusMode=Date.now()+2e3),!1);Xr.touchstart=(t,e)=>{t.inputState.lastTouchTime=Date.now(),t.inputState.setSelectionOrigin("select.pointer")};Xr.touchmove=t=>{t.inputState.setSelectionOrigin("select.pointer")};di.mousedown=(t,e)=>{if(t.observer.flush(),t.inputState.lastTouchTime>Date.now()-2e3)return!1;let r=null;for(let i of t.state.facet(T2))if(r=i(t,e),r)break;if(!r&&e.button==0&&(r=pO(t,e)),r){let i=!t.hasFocus;t.inputState.startMouseSelection(new t_(t,e,r,i)),i&&t.observer.ignore(()=>{o2(t.contentDOM);let n=t.root.activeElement;n&&!n.contains(t.contentDOM)&&n.blur()});let s=t.inputState.mouseSelection;if(s)return s.start(e),s.dragging===!1}return!1};function jk(t,e,r,i){if(i==1)return ce.cursor(e,r);if(i==2)return W3(t.state,e,r);{let s=Wt.find(t.docView,e),n=t.state.doc.lineAt(s?s.posAtEnd:e),o=s?s.posAtStart:n.from,a=s?s.posAtEnd:n.to;return a<t.state.doc.length&&a==n.to&&a++,ce.range(o,a)}}var Wk=(t,e,r)=>e>=r.top&&e<=r.bottom&&t>=r.left&&t<=r.right;function fO(t,e,r,i){let s=Wt.find(t.docView,e);if(!s)return 1;let n=e-s.posAtStart;if(n==0)return 1;if(n==s.length)return-1;let o=s.coordsAt(n,-1);if(o&&Wk(r,i,o))return-1;let a=s.coordsAt(n,1);return a&&Wk(r,i,a)?1:o&&o.bottom>=i?-1:1}function Vk(t,e){let r=t.posAtCoords({x:e.clientX,y:e.clientY},!1);return{pos:r,bias:fO(t,r,e.clientX,e.clientY)}}var dO=ee.ie&&ee.ie_version<=11,Uk=null,Kk=0,Gk=0;function V2(t){if(!dO)return t.detail;let e=Uk,r=Gk;return Uk=t,Gk=Date.now(),Kk=!e||r>Date.now()-400&&Math.abs(e.clientX-t.clientX)<2&&Math.abs(e.clientY-t.clientY)<2?(Kk+1)%3:1}function pO(t,e){let r=Vk(t,e),i=V2(e),s=t.state.selection;return{update(n){n.docChanged&&(r.pos=n.changes.mapPos(r.pos),s=s.map(n.changes))},get(n,o,a){let l=Vk(t,n),c,u=jk(t,l.pos,l.bias,i);if(r.pos!=l.pos&&!o){let p=jk(t,r.pos,r.bias,i),g=Math.min(p.from,u.from),m=Math.max(p.to,u.to);u=g<u.from?ce.range(g,m):ce.range(m,g)}return o?s.replaceRange(s.main.extend(u.from,u.to)):a&&i==1&&s.ranges.length>1&&(c=mO(s,l.pos))?c:a?s.addRange(u):ce.create([u])}}}function mO(t,e){for(let r=0;r<t.ranges.length;r++){let{from:i,to:s}=t.ranges[r];if(i<=e&&s>=e)return ce.create(t.ranges.slice(0,r).concat(t.ranges.slice(r+1)),t.mainIndex==r?0:t.mainIndex-(t.mainIndex>r?1:0))}return null}di.dragstart=(t,e)=>{let{selection:{main:r}}=t.state;if(e.target.draggable){let s=t.docView.nearest(e.target);if(s&&s.isWidget){let n=s.posAtStart,o=n+s.length;(n>=r.to||o<=r.from)&&(r=ce.range(n,o))}}let{inputState:i}=t;return i.mouseSelection&&(i.mouseSelection.dragging=!0),i.draggedContent=r,e.dataTransfer&&(e.dataTransfer.setData("Text",Qd(t.state,__,t.state.sliceDoc(r.from,r.to))),e.dataTransfer.effectAllowed="copyMove"),!1};di.dragend=t=>(t.inputState.draggedContent=null,!1);function qk(t,e,r,i){if(r=Qd(t.state,v_,r),!r)return;let s=t.posAtCoords({x:e.clientX,y:e.clientY},!1),{draggedContent:n}=t.inputState,o=i&&n&&lO(t,e)?{from:n.from,to:n.to}:null,a={from:s,insert:r},l=t.state.changes(o?[o,a]:a);t.focus(),t.dispatch({changes:l,selection:{anchor:l.mapPos(s,-1),head:l.mapPos(s,1)},userEvent:o?"move.drop":"input.drop"}),t.inputState.draggedContent=null}di.drop=(t,e)=>{if(!e.dataTransfer)return!1;if(t.state.readOnly)return!0;let r=e.dataTransfer.files;if(r&&r.length){let i=Array(r.length),s=0,n=()=>{++s==r.length&&qk(t,e,i.filter(o=>o!=null).join(t.state.lineBreak),!1)};for(let o=0;o<r.length;o++){let a=new FileReader;a.onerror=n,a.onload=()=>{/[\x00-\x08\x0e-\x1f]{2}/.test(a.result)||(i[o]=a.result),n()},a.readAsText(r[o])}return!0}else{let i=e.dataTransfer.getData("Text");if(i)return qk(t,e,i,!0),!0}return!1};di.paste=(t,e)=>{if(t.state.readOnly)return!0;t.observer.flush();let r=j2?null:e.clipboardData;return r?(W2(t,r.getData("text/plain")||r.getData("text/uri-list")),!0):(uO(t),!1)};function gO(t,e){let r=t.dom.parentNode;if(!r)return;let i=r.appendChild(document.createElement("textarea"));i.style.cssText="position: fixed; left: -10000px; top: 10px",i.value=e,i.focus(),i.selectionEnd=e.length,i.selectionStart=0,setTimeout(()=>{i.remove(),t.focus()},50)}function vO(t){let e=[],r=[],i=!1;for(let s of t.selection.ranges)s.empty||(e.push(t.sliceDoc(s.from,s.to)),r.push(s));if(!e.length){let s=-1;for(let{from:n}of t.selection.ranges){let o=t.doc.lineAt(n);o.number>s&&(e.push(o.text),r.push({from:o.from,to:Math.min(t.doc.length,o.to+1)})),s=o.number}i=!0}return{text:Qd(t,__,e.join(t.lineBreak)),ranges:r,linewise:i}}var r_=null;di.copy=di.cut=(t,e)=>{let{text:r,ranges:i,linewise:s}=vO(t.state);if(!r&&!s)return!1;r_=s?r:null,e.type=="cut"&&!t.state.readOnly&&t.dispatch({changes:i,scrollIntoView:!0,userEvent:"delete.cut"});let n=j2?null:e.clipboardData;return n?(n.clearData(),n.setData("text/plain",r),!0):(gO(t,r),!1)};var U2=mn.define();function K2(t,e){let r=[];for(let i of t.facet(R2)){let s=i(t,e);s&&r.push(s)}return r?t.update({effects:r,annotations:U2.of(!0)}):null}function G2(t){setTimeout(()=>{let e=t.hasFocus;if(e!=t.inputState.notifiedFocused){let r=K2(t.state,e);r?t.dispatch(r):t.update([])}},10)}Xr.focus=t=>{t.inputState.lastFocusTime=Date.now(),!t.scrollDOM.scrollTop&&(t.inputState.lastScrollTop||t.inputState.lastScrollLeft)&&(t.scrollDOM.scrollTop=t.inputState.lastScrollTop,t.scrollDOM.scrollLeft=t.inputState.lastScrollLeft),G2(t)};Xr.blur=t=>{t.observer.clearSelectionRange(),G2(t)};Xr.compositionstart=Xr.compositionupdate=t=>{t.observer.editContext||(t.inputState.compositionFirstChange==null&&(t.inputState.compositionFirstChange=!0),t.inputState.composing<0&&(t.inputState.composing=0))};Xr.compositionend=t=>{t.observer.editContext||(t.inputState.composing=-1,t.inputState.compositionEndedAt=Date.now(),t.inputState.compositionPendingKey=!0,t.inputState.compositionPendingChange=t.observer.pendingRecords().length>0,t.inputState.compositionFirstChange=null,ee.chrome&&ee.android?t.observer.flushSoon():t.inputState.compositionPendingChange?Promise.resolve().then(()=>t.observer.flush()):setTimeout(()=>{t.inputState.composing<0&&t.docView.hasComposition&&t.update([])},50))};Xr.contextmenu=t=>{t.inputState.lastContextMenu=Date.now()};di.beforeinput=(t,e)=>{var r,i;if(e.inputType=="insertReplacementText"&&t.observer.editContext){let n=(r=e.dataTransfer)===null||r===void 0?void 0:r.getData("text/plain"),o=e.getTargetRanges();if(n&&o.length){let a=o[0],l=t.posAtDOM(a.startContainer,a.startOffset),c=t.posAtDOM(a.endContainer,a.endOffset);return x_(t,{from:l,to:c,insert:t.state.toText(n)},null),!0}}let s;if(ee.chrome&&ee.android&&(s=$2.find(n=>n.inputType==e.inputType))&&(t.observer.delayAndroidKey(s.key,s.keyCode),s.key=="Backspace"||s.key=="Delete")){let n=((i=window.visualViewport)===null||i===void 0?void 0:i.height)||0;setTimeout(()=>{var o;(((o=window.visualViewport)===null||o===void 0?void 0:o.height)||0)>n+10&&t.hasFocus&&(t.contentDOM.blur(),t.focus())},100)}return ee.ios&&e.inputType=="deleteContentForward"&&t.observer.flushSoon(),ee.safari&&e.inputType=="insertText"&&t.inputState.composing>=0&&setTimeout(()=>Xr.compositionend(t,e),20),!1};var Yk=new Set;function _O(t){Yk.has(t)||(Yk.add(t),t.addEventListener("copy",()=>{}),t.addEventListener("cut",()=>{}))}var Xk=["pre-wrap","normal","pre-line","break-spaces"],Ia=!1;function Jk(){Ia=!1}var i_=class{constructor(e){this.lineWrapping=e,this.doc=Ae.empty,this.heightSamples={},this.lineHeight=14,this.charWidth=7,this.textHeight=14,this.lineLength=30}heightForGap(e,r){let i=this.doc.lineAt(r).number-this.doc.lineAt(e).number+1;return this.lineWrapping&&(i+=Math.max(0,Math.ceil((r-e-i*this.lineLength*.5)/this.lineLength))),this.lineHeight*i}heightForLine(e){return this.lineWrapping?(1+Math.max(0,Math.ceil((e-this.lineLength)/(this.lineLength-5))))*this.lineHeight:this.lineHeight}setDoc(e){return this.doc=e,this}mustRefreshForWrapping(e){return Xk.indexOf(e)>-1!=this.lineWrapping}mustRefreshForHeights(e){let r=!1;for(let i=0;i<e.length;i++){let s=e[i];s<0?i++:this.heightSamples[Math.floor(s*10)]||(r=!0,this.heightSamples[Math.floor(s*10)]=!0)}return r}refresh(e,r,i,s,n,o){let a=Xk.indexOf(e)>-1,l=Math.round(r)!=Math.round(this.lineHeight)||this.lineWrapping!=a;if(this.lineWrapping=a,this.lineHeight=r,this.charWidth=i,this.textHeight=s,this.lineLength=n,l){this.heightSamples={};for(let c=0;c<o.length;c++){let u=o[c];u<0?c++:this.heightSamples[Math.floor(u*10)]=!0}}return l}},n_=class{constructor(e,r){this.from=e,this.heights=r,this.index=0}get more(){return this.index<this.heights.length}},ji=class t{constructor(e,r,i,s,n){this.from=e,this.length=r,this.top=i,this.height=s,this._content=n}get type(){return typeof this._content=="number"?Vi.Text:Array.isArray(this._content)?this._content:this._content.type}get to(){return this.from+this.length}get bottom(){return this.top+this.height}get widget(){return this._content instanceof ss?this._content.widget:null}get widgetLineBreaks(){return typeof this._content=="number"?this._content:0}join(e){let r=(Array.isArray(this._content)?this._content:[this]).concat(Array.isArray(e._content)?e._content:[e]);return new t(this.from,this.length+e.length,this.top,this.height+e.height,r)}},rt=(function(t){return t[t.ByPos=0]="ByPos",t[t.ByHeight=1]="ByHeight",t[t.ByPosNoHeight=2]="ByPosNoHeight",t})(rt||(rt={})),Fd=.001,Ir=class t{constructor(e,r,i=2){this.length=e,this.height=r,this.flags=i}get outdated(){return(this.flags&2)>0}set outdated(e){this.flags=(e?2:0)|this.flags&-3}setHeight(e){this.height!=e&&(Math.abs(this.height-e)>Fd&&(Ia=!0),this.height=e)}replace(e,r,i){return t.of(i)}decomposeLeft(e,r){r.push(this)}decomposeRight(e,r){r.push(this)}applyChanges(e,r,i,s){let n=this,o=i.doc;for(let a=s.length-1;a>=0;a--){let{fromA:l,toA:c,fromB:u,toB:p}=s[a],g=n.lineAt(l,rt.ByPosNoHeight,i.setDoc(r),0,0),m=g.to>=c?g:n.lineAt(c,rt.ByPosNoHeight,i,0,0);for(p+=m.to-c,c=m.to;a>0&&g.from<=s[a-1].toA;)l=s[a-1].fromA,u=s[a-1].fromB,a--,l<g.from&&(g=n.lineAt(l,rt.ByPosNoHeight,i,0,0));u+=g.from-l,l=g.from;let h=o_.build(i.setDoc(o),e,u,p);n=Kd(n,n.replace(l,c,h))}return n.updateHeight(i,0)}static empty(){return new Yr(0,0)}static of(e){if(e.length==1)return e[0];let r=0,i=e.length,s=0,n=0;for(;;)if(r==i)if(s>n*2){let a=e[r-1];a.break?e.splice(--r,1,a.left,null,a.right):e.splice(--r,1,a.left,a.right),i+=1+a.break,s-=a.size}else if(n>s*2){let a=e[i];a.break?e.splice(i,1,a.left,null,a.right):e.splice(i,1,a.left,a.right),i+=2+a.break,n-=a.size}else break;else if(s<n){let a=e[r++];a&&(s+=a.size)}else{let a=e[--i];a&&(n+=a.size)}let o=0;return e[r-1]==null?(o=1,r--):e[r]==null&&(o=1,i++),new s_(t.of(e.slice(0,r)),o,t.of(e.slice(i)))}};function Kd(t,e){return t==e?t:(t.constructor!=e.constructor&&(Ia=!0),e)}Ir.prototype.size=1;var Gd=class extends Ir{constructor(e,r,i){super(e,r),this.deco=i}blockAt(e,r,i,s){return new ji(s,this.length,i,this.height,this.deco||0)}lineAt(e,r,i,s,n){return this.blockAt(0,i,s,n)}forEachLine(e,r,i,s,n,o){e<=n+this.length&&r>=n&&o(this.blockAt(0,i,s,n))}updateHeight(e,r=0,i=!1,s){return s&&s.from<=r&&s.more&&this.setHeight(s.heights[s.index++]),this.outdated=!1,this}toString(){return`block(${this.length})`}},Yr=class t extends Gd{constructor(e,r){super(e,r,null),this.collapsed=0,this.widgetHeight=0,this.breaks=0}blockAt(e,r,i,s){return new ji(s,this.length,i,this.height,this.breaks)}replace(e,r,i){let s=i[0];return i.length==1&&(s instanceof t||s instanceof is&&s.flags&4)&&Math.abs(this.length-s.length)<10?(s instanceof is?s=new t(s.length,this.height):s.height=this.height,this.outdated||(s.outdated=!1),s):Ir.of(i)}updateHeight(e,r=0,i=!1,s){return s&&s.from<=r&&s.more?this.setHeight(s.heights[s.index++]):(i||this.outdated)&&this.setHeight(Math.max(this.widgetHeight,e.heightForLine(this.length-this.collapsed))+this.breaks*e.lineHeight),this.outdated=!1,this}toString(){return`line(${this.length}${this.collapsed?-this.collapsed:""}${this.widgetHeight?":"+this.widgetHeight:""})`}},is=class t extends Ir{constructor(e){super(e,0)}heightMetrics(e,r){let i=e.doc.lineAt(r).number,s=e.doc.lineAt(r+this.length).number,n=s-i+1,o,a=0;if(e.lineWrapping){let l=Math.min(this.height,e.lineHeight*n);o=l/n,this.length>n+1&&(a=(this.height-l)/(this.length-n-1))}else o=this.height/n;return{firstLine:i,lastLine:s,perLine:o,perChar:a}}blockAt(e,r,i,s){let{firstLine:n,lastLine:o,perLine:a,perChar:l}=this.heightMetrics(r,s);if(r.lineWrapping){let c=s+(e<r.lineHeight?0:Math.round(Math.max(0,Math.min(1,(e-i)/this.height))*this.length)),u=r.doc.lineAt(c),p=a+u.length*l,g=Math.max(i,e-p/2);return new ji(u.from,u.length,g,p,0)}else{let c=Math.max(0,Math.min(o-n,Math.floor((e-i)/a))),{from:u,length:p}=r.doc.line(n+c);return new ji(u,p,i+a*c,a,0)}}lineAt(e,r,i,s,n){if(r==rt.ByHeight)return this.blockAt(e,i,s,n);if(r==rt.ByPosNoHeight){let{from:m,to:h}=i.doc.lineAt(e);return new ji(m,h-m,0,0,0)}let{firstLine:o,perLine:a,perChar:l}=this.heightMetrics(i,n),c=i.doc.lineAt(e),u=a+c.length*l,p=c.number-o,g=s+a*p+l*(c.from-n-p);return new ji(c.from,c.length,Math.max(s,Math.min(g,s+this.height-u)),u,0)}forEachLine(e,r,i,s,n,o){e=Math.max(e,n),r=Math.min(r,n+this.length);let{firstLine:a,perLine:l,perChar:c}=this.heightMetrics(i,n);for(let u=e,p=s;u<=r;){let g=i.doc.lineAt(u);if(u==e){let h=g.number-a;p+=l*h+c*(e-n-h)}let m=l+c*g.length;o(new ji(g.from,g.length,p,m,0)),p+=m,u=g.to+1}}replace(e,r,i){let s=this.length-r;if(s>0){let n=i[i.length-1];n instanceof t?i[i.length-1]=new t(n.length+s):i.push(null,new t(s-1))}if(e>0){let n=i[0];n instanceof t?i[0]=new t(e+n.length):i.unshift(new t(e-1),null)}return Ir.of(i)}decomposeLeft(e,r){r.push(new t(e-1),null)}decomposeRight(e,r){r.push(null,new t(this.length-e-1))}updateHeight(e,r=0,i=!1,s){let n=r+this.length;if(s&&s.from<=r+this.length&&s.more){let o=[],a=Math.max(r,s.from),l=-1;for(s.from>r&&o.push(new t(s.from-r-1).updateHeight(e,r));a<=n&&s.more;){let u=e.doc.lineAt(a).length;o.length&&o.push(null);let p=s.heights[s.index++];l==-1?l=p:Math.abs(p-l)>=Fd&&(l=-2);let g=new Yr(u,p);g.outdated=!1,o.push(g),a+=u+1}a<=n&&o.push(null,new t(n-a).updateHeight(e,a));let c=Ir.of(o);return(l<0||Math.abs(c.height-this.height)>=Fd||Math.abs(l-this.heightMetrics(e,r).perLine)>=Fd)&&(Ia=!0),Kd(this,c)}else(i||this.outdated)&&(this.setHeight(e.heightForGap(r,r+this.length)),this.outdated=!1);return this}toString(){return`gap(${this.length})`}},s_=class extends Ir{constructor(e,r,i){super(e.length+r+i.length,e.height+i.height,r|(e.outdated||i.outdated?2:0)),this.left=e,this.right=i,this.size=e.size+i.size}get break(){return this.flags&1}blockAt(e,r,i,s){let n=i+this.left.height;return e<n?this.left.blockAt(e,r,i,s):this.right.blockAt(e,r,n,s+this.left.length+this.break)}lineAt(e,r,i,s,n){let o=s+this.left.height,a=n+this.left.length+this.break,l=r==rt.ByHeight?e<o:e<a,c=l?this.left.lineAt(e,r,i,s,n):this.right.lineAt(e,r,i,o,a);if(this.break||(l?c.to<a:c.from>a))return c;let u=r==rt.ByPosNoHeight?rt.ByPosNoHeight:rt.ByPos;return l?c.join(this.right.lineAt(a,u,i,o,a)):this.left.lineAt(a,u,i,s,n).join(c)}forEachLine(e,r,i,s,n,o){let a=s+this.left.height,l=n+this.left.length+this.break;if(this.break)e<l&&this.left.forEachLine(e,r,i,s,n,o),r>=l&&this.right.forEachLine(e,r,i,a,l,o);else{let c=this.lineAt(l,rt.ByPos,i,s,n);e<c.from&&this.left.forEachLine(e,c.from-1,i,s,n,o),c.to>=e&&c.from<=r&&o(c),r>c.to&&this.right.forEachLine(c.to+1,r,i,a,l,o)}}replace(e,r,i){let s=this.left.length+this.break;if(r<s)return this.balanced(this.left.replace(e,r,i),this.right);if(e>this.left.length)return this.balanced(this.left,this.right.replace(e-s,r-s,i));let n=[];e>0&&this.decomposeLeft(e,n);let o=n.length;for(let a of i)n.push(a);if(e>0&&Qk(n,o-1),r<this.length){let a=n.length;this.decomposeRight(r,n),Qk(n,a)}return Ir.of(n)}decomposeLeft(e,r){let i=this.left.length;if(e<=i)return this.left.decomposeLeft(e,r);r.push(this.left),this.break&&(i++,e>=i&&r.push(null)),e>i&&this.right.decomposeLeft(e-i,r)}decomposeRight(e,r){let i=this.left.length,s=i+this.break;if(e>=s)return this.right.decomposeRight(e-s,r);e<i&&this.left.decomposeRight(e,r),this.break&&e<s&&r.push(null),r.push(this.right)}balanced(e,r){return e.size>2*r.size||r.size>2*e.size?Ir.of(this.break?[e,null,r]:[e,r]):(this.left=Kd(this.left,e),this.right=Kd(this.right,r),this.setHeight(e.height+r.height),this.outdated=e.outdated||r.outdated,this.size=e.size+r.size,this.length=e.length+this.break+r.length,this)}updateHeight(e,r=0,i=!1,s){let{left:n,right:o}=this,a=r+n.length+this.break,l=null;return s&&s.from<=r+n.length&&s.more?l=n=n.updateHeight(e,r,i,s):n.updateHeight(e,r,i),s&&s.from<=a+o.length&&s.more?l=o=o.updateHeight(e,a,i,s):o.updateHeight(e,a,i),l?this.balanced(n,o):(this.height=this.left.height+this.right.height,this.outdated=!1,this)}toString(){return this.left+(this.break?" ":"-")+this.right}};function Qk(t,e){let r,i;t[e]==null&&(r=t[e-1])instanceof is&&(i=t[e+1])instanceof is&&t.splice(e-1,3,new is(r.length+1+i.length))}var yO=5,o_=class t{constructor(e,r){this.pos=e,this.oracle=r,this.nodes=[],this.lineStart=-1,this.lineEnd=-1,this.covering=null,this.writtenTo=e}get isCovered(){return this.covering&&this.nodes[this.nodes.length-1]==this.covering}span(e,r){if(this.lineStart>-1){let i=Math.min(r,this.lineEnd),s=this.nodes[this.nodes.length-1];s instanceof Yr?s.length+=i-this.pos:(i>this.pos||!this.isCovered)&&this.nodes.push(new Yr(i-this.pos,-1)),this.writtenTo=i,r>i&&(this.nodes.push(null),this.writtenTo++,this.lineStart=-1)}this.pos=r}point(e,r,i){if(e<r||i.heightRelevant){let s=i.widget?i.widget.estimatedHeight:0,n=i.widget?i.widget.lineBreaks:0;s<0&&(s=this.oracle.lineHeight);let o=r-e;i.block?this.addBlock(new Gd(o,s,i)):(o||n||s>=yO)&&this.addLineDeco(s,n,o)}else r>e&&this.span(e,r);this.lineEnd>-1&&this.lineEnd<this.pos&&(this.lineEnd=this.oracle.doc.lineAt(this.pos).to)}enterLine(){if(this.lineStart>-1)return;let{from:e,to:r}=this.oracle.doc.lineAt(this.pos);this.lineStart=e,this.lineEnd=r,this.writtenTo<e&&((this.writtenTo<e-1||this.nodes[this.nodes.length-1]==null)&&this.nodes.push(this.blankContent(this.writtenTo,e-1)),this.nodes.push(null)),this.pos>e&&this.nodes.push(new Yr(this.pos-e,-1)),this.writtenTo=this.pos}blankContent(e,r){let i=new is(r-e);return this.oracle.doc.lineAt(e).to==r&&(i.flags|=4),i}ensureLine(){this.enterLine();let e=this.nodes.length?this.nodes[this.nodes.length-1]:null;if(e instanceof Yr)return e;let r=new Yr(0,-1);return this.nodes.push(r),r}addBlock(e){this.enterLine();let r=e.deco;r&&r.startSide>0&&!this.isCovered&&this.ensureLine(),this.nodes.push(e),this.writtenTo=this.pos=this.pos+e.length,r&&r.endSide>0&&(this.covering=e)}addLineDeco(e,r,i){let s=this.ensureLine();s.length+=i,s.collapsed+=i,s.widgetHeight=Math.max(s.widgetHeight,e),s.breaks+=r,this.writtenTo=this.pos=this.pos+i}finish(e){let r=this.nodes.length==0?null:this.nodes[this.nodes.length-1];this.lineStart>-1&&!(r instanceof Yr)&&!this.isCovered?this.nodes.push(new Yr(0,-1)):(this.writtenTo<this.pos||r==null)&&this.nodes.push(this.blankContent(this.writtenTo,this.pos));let i=e;for(let s of this.nodes)s instanceof Yr&&s.updateHeight(this.oracle,i),i+=s?s.length:1;return this.nodes}static build(e,r,i,s){let n=new t(i,e);return bt.spans(r,i,s,n,0),n.finish(i)}};function SO(t,e,r){let i=new a_;return bt.compare(t,e,r,i,0),i.changes}var a_=class{constructor(){this.changes=[]}compareRange(){}comparePoint(e,r,i,s){(e<r||i&&i.heightRelevant||s&&s.heightRelevant)&&Kv(e,r,this.changes,5)}};function xO(t,e){let r=t.getBoundingClientRect(),i=t.ownerDocument,s=i.defaultView||window,n=Math.max(0,r.left),o=Math.min(s.innerWidth,r.right),a=Math.max(0,r.top),l=Math.min(s.innerHeight,r.bottom);for(let c=t.parentNode;c&&c!=i.body;)if(c.nodeType==1){let u=c,p=window.getComputedStyle(u);if((u.scrollHeight>u.clientHeight||u.scrollWidth>u.clientWidth)&&p.overflow!="visible"){let g=u.getBoundingClientRect();n=Math.max(n,g.left),o=Math.min(o,g.right),a=Math.max(a,g.top),l=Math.min(c==t.parentNode?s.innerHeight:l,g.bottom)}c=p.position=="absolute"||p.position=="fixed"?u.offsetParent:u.parentNode}else if(c.nodeType==11)c=c.host;else break;return{left:n-r.left,right:Math.max(n,o)-r.left,top:a-(r.top+e),bottom:Math.max(a,l)-(r.top+e)}}function bO(t,e){let r=t.getBoundingClientRect();return{left:0,right:r.right-r.left,top:e,bottom:r.bottom-(r.top+e)}}var Hc=class{constructor(e,r,i){this.from=e,this.to=r,this.size=i}static same(e,r){if(e.length!=r.length)return!1;for(let i=0;i<e.length;i++){let s=e[i],n=r[i];if(s.from!=n.from||s.to!=n.to||s.size!=n.size)return!1}return!0}draw(e,r){return _t.replace({widget:new l_(this.size*(r?e.scaleY:e.scaleX),r)}).range(this.from,this.to)}},l_=class extends Ba{constructor(e,r){super(),this.size=e,this.vertical=r}eq(e){return e.size==this.size&&e.vertical==this.vertical}toDOM(){let e=document.createElement("div");return this.vertical?e.style.height=this.size+"px":(e.style.width=this.size+"px",e.style.height="2px",e.style.display="inline-block"),e}get estimatedHeight(){return this.vertical?this.size:-1}},qd=class{constructor(e){this.state=e,this.pixelViewport={left:0,right:window.innerWidth,top:0,bottom:0},this.inView=!0,this.paddingTop=0,this.paddingBottom=0,this.contentDOMWidth=0,this.contentDOMHeight=0,this.editorHeight=0,this.editorWidth=0,this.scrollTop=0,this.scrolledToBottom=!1,this.scaleX=1,this.scaleY=1,this.scrollAnchorPos=0,this.scrollAnchorHeight=-1,this.scaler=Zk,this.scrollTarget=null,this.printing=!1,this.mustMeasureContent=!0,this.defaultTextDirection=Ot.LTR,this.visibleRanges=[],this.mustEnforceCursorAssoc=!1;let r=e.facet(y_).some(i=>typeof i!="function"&&i.class=="cm-lineWrapping");this.heightOracle=new i_(r),this.stateDeco=e.facet(Kc).filter(i=>typeof i!="function"),this.heightMap=Ir.empty().applyChanges(this.stateDeco,Ae.empty,this.heightOracle.setDoc(e.doc),[new Ui(0,0,0,e.doc.length)]);for(let i=0;i<2&&(this.viewport=this.getViewport(0,null),!!this.updateForViewport());i++);this.updateViewportLines(),this.lineGaps=this.ensureLineGaps([]),this.lineGapDeco=_t.set(this.lineGaps.map(i=>i.draw(this,!1))),this.computeVisibleRanges()}updateForViewport(){let e=[this.viewport],{main:r}=this.state.selection;for(let i=0;i<=1;i++){let s=i?r.head:r.anchor;if(!e.some(({from:n,to:o})=>s>=n&&s<=o)){let{from:n,to:o}=this.lineBlockAt(s);e.push(new Da(n,o))}}return this.viewports=e.sort((i,s)=>i.from-s.from),this.updateScaler()}updateScaler(){let e=this.scaler;return this.scaler=this.heightMap.height<=7e6?Zk:new c_(this.heightOracle,this.heightMap,this.viewports),e.eq(this.scaler)?0:2}updateViewportLines(){this.viewportLines=[],this.heightMap.forEachLine(this.viewport.from,this.viewport.to,this.heightOracle.setDoc(this.state.doc),0,0,e=>{this.viewportLines.push(Oc(e,this.scaler))})}update(e,r=null){this.state=e.state;let i=this.stateDeco;this.stateDeco=this.state.facet(Kc).filter(u=>typeof u!="function");let s=e.changedRanges,n=Ui.extendWithRanges(s,SO(i,this.stateDeco,e?e.changes:Br.empty(this.state.doc.length))),o=this.heightMap.height,a=this.scrolledToBottom?null:this.scrollAnchorAt(this.scrollTop);Jk(),this.heightMap=this.heightMap.applyChanges(this.stateDeco,e.startState.doc,this.heightOracle.setDoc(this.state.doc),n),(this.heightMap.height!=o||Ia)&&(e.flags|=2),a?(this.scrollAnchorPos=e.changes.mapPos(a.from,-1),this.scrollAnchorHeight=a.top):(this.scrollAnchorPos=-1,this.scrollAnchorHeight=this.heightMap.height);let l=n.length?this.mapViewport(this.viewport,e.changes):this.viewport;(r&&(r.range.head<l.from||r.range.head>l.to)||!this.viewportIsAppropriate(l))&&(l=this.getViewport(0,r));let c=l.from!=this.viewport.from||l.to!=this.viewport.to;this.viewport=l,e.flags|=this.updateForViewport(),(c||!e.changes.empty||e.flags&2)&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>4e3)&&this.updateLineGaps(this.ensureLineGaps(this.mapLineGaps(this.lineGaps,e.changes))),e.flags|=this.computeVisibleRanges(),r&&(this.scrollTarget=r),!this.mustEnforceCursorAssoc&&e.selectionSet&&e.view.lineWrapping&&e.state.selection.main.empty&&e.state.selection.main.assoc&&!e.state.facet(O3)&&(this.mustEnforceCursorAssoc=!0)}measure(e){let r=e.contentDOM,i=window.getComputedStyle(r),s=this.heightOracle,n=i.whiteSpace;this.defaultTextDirection=i.direction=="rtl"?Ot.RTL:Ot.LTR;let o=this.heightOracle.mustRefreshForWrapping(n),a=r.getBoundingClientRect(),l=o||this.mustMeasureContent||this.contentDOMHeight!=a.height;this.contentDOMHeight=a.height,this.mustMeasureContent=!1;let c=0,u=0;if(a.width&&a.height){let{scaleX:b,scaleY:C}=s2(r,a);(b>.005&&Math.abs(this.scaleX-b)>.005||C>.005&&Math.abs(this.scaleY-C)>.005)&&(this.scaleX=b,this.scaleY=C,c|=8,o=l=!0)}let p=(parseInt(i.paddingTop)||0)*this.scaleY,g=(parseInt(i.paddingBottom)||0)*this.scaleY;(this.paddingTop!=p||this.paddingBottom!=g)&&(this.paddingTop=p,this.paddingBottom=g,c|=10),this.editorWidth!=e.scrollDOM.clientWidth&&(s.lineWrapping&&(l=!0),this.editorWidth=e.scrollDOM.clientWidth,c|=8);let m=e.scrollDOM.scrollTop*this.scaleY;this.scrollTop!=m&&(this.scrollAnchorHeight=-1,this.scrollTop=m),this.scrolledToBottom=l2(e.scrollDOM);let h=(this.printing?bO:xO)(r,this.paddingTop),d=h.top-this.pixelViewport.top,v=h.bottom-this.pixelViewport.bottom;this.pixelViewport=h;let f=this.pixelViewport.bottom>this.pixelViewport.top&&this.pixelViewport.right>this.pixelViewport.left;if(f!=this.inView&&(this.inView=f,f&&(l=!0)),!this.inView&&!this.scrollTarget)return 0;let _=a.width;if((this.contentDOMWidth!=_||this.editorHeight!=e.scrollDOM.clientHeight)&&(this.contentDOMWidth=a.width,this.editorHeight=e.scrollDOM.clientHeight,c|=8),l){let b=e.docView.measureVisibleLineHeights(this.viewport);if(s.mustRefreshForHeights(b)&&(o=!0),o||s.lineWrapping&&Math.abs(_-this.contentDOMWidth)>s.charWidth){let{lineHeight:C,charWidth:y,textHeight:w}=e.docView.measureTextSize();o=C>0&&s.refresh(n,C,y,w,_/y,b),o&&(e.docView.minWidth=0,c|=8)}d>0&&v>0?u=Math.max(d,v):d<0&&v<0&&(u=Math.min(d,v)),Jk();for(let C of this.viewports){let y=C.from==this.viewport.from?b:e.docView.measureVisibleLineHeights(C);this.heightMap=(o?Ir.empty().applyChanges(this.stateDeco,Ae.empty,this.heightOracle,[new Ui(0,0,0,e.state.doc.length)]):this.heightMap).updateHeight(s,0,o,new n_(C.from,y))}Ia&&(c|=2)}let S=!this.viewportIsAppropriate(this.viewport,u)||this.scrollTarget&&(this.scrollTarget.range.head<this.viewport.from||this.scrollTarget.range.head>this.viewport.to);return S&&(c&2&&(c|=this.updateScaler()),this.viewport=this.getViewport(u,this.scrollTarget),c|=this.updateForViewport()),(c&2||S)&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>4e3)&&this.updateLineGaps(this.ensureLineGaps(o?[]:this.lineGaps,e)),c|=this.computeVisibleRanges(),this.mustEnforceCursorAssoc&&(this.mustEnforceCursorAssoc=!1,e.docView.enforceCursorAssoc()),c}get visibleTop(){return this.scaler.fromDOM(this.pixelViewport.top)}get visibleBottom(){return this.scaler.fromDOM(this.pixelViewport.bottom)}getViewport(e,r){let i=.5-Math.max(-.5,Math.min(.5,e/1e3/2)),s=this.heightMap,n=this.heightOracle,{visibleTop:o,visibleBottom:a}=this,l=new Da(s.lineAt(o-i*1e3,rt.ByHeight,n,0,0).from,s.lineAt(a+(1-i)*1e3,rt.ByHeight,n,0,0).to);if(r){let{head:c}=r.range;if(c<l.from||c>l.to){let u=Math.min(this.editorHeight,this.pixelViewport.bottom-this.pixelViewport.top),p=s.lineAt(c,rt.ByPos,n,0,0),g;r.y=="center"?g=(p.top+p.bottom)/2-u/2:r.y=="start"||r.y=="nearest"&&c<l.from?g=p.top:g=p.bottom-u,l=new Da(s.lineAt(g-1e3/2,rt.ByHeight,n,0,0).from,s.lineAt(g+u+1e3/2,rt.ByHeight,n,0,0).to)}}return l}mapViewport(e,r){let i=r.mapPos(e.from,-1),s=r.mapPos(e.to,1);return new Da(this.heightMap.lineAt(i,rt.ByPos,this.heightOracle,0,0).from,this.heightMap.lineAt(s,rt.ByPos,this.heightOracle,0,0).to)}viewportIsAppropriate({from:e,to:r},i=0){if(!this.inView)return!0;let{top:s}=this.heightMap.lineAt(e,rt.ByPos,this.heightOracle,0,0),{bottom:n}=this.heightMap.lineAt(r,rt.ByPos,this.heightOracle,0,0),{visibleTop:o,visibleBottom:a}=this;return(e==0||s<=o-Math.max(10,Math.min(-i,250)))&&(r==this.state.doc.length||n>=a+Math.max(10,Math.min(i,250)))&&s>o-2*1e3&&n<a+2*1e3}mapLineGaps(e,r){if(!e.length||r.empty)return e;let i=[];for(let s of e)r.touchesRange(s.from,s.to)||i.push(new Hc(r.mapPos(s.from),r.mapPos(s.to),s.size));return i}ensureLineGaps(e,r){let i=this.heightOracle.lineWrapping,s=i?1e4:2e3,n=s>>1,o=s<<1;if(this.defaultTextDirection!=Ot.LTR&&!i)return[];let a=[],l=(u,p,g,m)=>{if(p-u<n)return;let h=this.state.selection.main,d=[h.from];h.empty||d.push(h.to);for(let f of d)if(f>u&&f<p){l(u,f-10,g,m),l(f+10,p,g,m);return}let v=CO(e,f=>f.from>=g.from&&f.to<=g.to&&Math.abs(f.from-u)<n&&Math.abs(f.to-p)<n&&!d.some(_=>f.from<_&&f.to>_));if(!v){if(p<g.to&&r&&i&&r.visibleRanges.some(f=>f.from<=p&&f.to>=p)){let f=r.moveToLineBoundary(ce.cursor(p),!1,!0).head;f>u&&(p=f)}v=new Hc(u,p,this.gapSize(g,u,p,m))}a.push(v)},c=u=>{if(u.length<o||u.type!=Vi.Text)return;let p=wO(u.from,u.to,this.stateDeco);if(p.total<o)return;let g=this.scrollTarget?this.scrollTarget.range.head:null,m,h;if(i){let d=s/this.heightOracle.lineLength*this.heightOracle.lineHeight,v,f;if(g!=null){let _=Od(p,g),S=((this.visibleBottom-this.visibleTop)/2+d)/u.height;v=_-S,f=_+S}else v=(this.visibleTop-u.top-d)/u.height,f=(this.visibleBottom-u.top+d)/u.height;m=Dd(p,v),h=Dd(p,f)}else{let d=p.total*this.heightOracle.charWidth,v=s*this.heightOracle.charWidth,f,_;if(g!=null){let S=Od(p,g),b=((this.pixelViewport.right-this.pixelViewport.left)/2+v)/d;f=S-b,_=S+b}else f=(this.pixelViewport.left-v)/d,_=(this.pixelViewport.right+v)/d;m=Dd(p,f),h=Dd(p,_)}m>u.from&&l(u.from,m,u,p),h<u.to&&l(h,u.to,u,p)};for(let u of this.viewportLines)Array.isArray(u.type)?u.type.forEach(c):c(u);return a}gapSize(e,r,i,s){let n=Od(s,i)-Od(s,r);return this.heightOracle.lineWrapping?e.height*n:s.total*this.heightOracle.charWidth*n}updateLineGaps(e){Hc.same(e,this.lineGaps)||(this.lineGaps=e,this.lineGapDeco=_t.set(e.map(r=>r.draw(this,this.heightOracle.lineWrapping))))}computeVisibleRanges(){let e=this.stateDeco;this.lineGaps.length&&(e=e.concat(this.lineGapDeco));let r=[];bt.spans(e,this.viewport.from,this.viewport.to,{span(s,n){r.push({from:s,to:n})},point(){}},20);let i=r.length!=this.visibleRanges.length||this.visibleRanges.some((s,n)=>s.from!=r[n].from||s.to!=r[n].to);return this.visibleRanges=r,i?4:0}lineBlockAt(e){return e>=this.viewport.from&&e<=this.viewport.to&&this.viewportLines.find(r=>r.from<=e&&r.to>=e)||Oc(this.heightMap.lineAt(e,rt.ByPos,this.heightOracle,0,0),this.scaler)}lineBlockAtHeight(e){return e>=this.viewportLines[0].top&&e<=this.viewportLines[this.viewportLines.length-1].bottom&&this.viewportLines.find(r=>r.top<=e&&r.bottom>=e)||Oc(this.heightMap.lineAt(this.scaler.fromDOM(e),rt.ByHeight,this.heightOracle,0,0),this.scaler)}scrollAnchorAt(e){let r=this.lineBlockAtHeight(e+8);return r.from>=this.viewport.from||this.viewportLines[0].top-e>200?r:this.viewportLines[0]}elementAtHeight(e){return Oc(this.heightMap.blockAt(this.scaler.fromDOM(e),this.heightOracle,0,0),this.scaler)}get docHeight(){return this.scaler.toDOM(this.heightMap.height)}get contentHeight(){return this.docHeight+this.paddingTop+this.paddingBottom}},Da=class{constructor(e,r){this.from=e,this.to=r}};function wO(t,e,r){let i=[],s=t,n=0;return bt.spans(r,t,e,{span(){},point(o,a){o>s&&(i.push({from:s,to:o}),n+=o-s),s=a}},20),s<e&&(i.push({from:s,to:e}),n+=e-s),{total:n,ranges:i}}function Dd({total:t,ranges:e},r){if(r<=0)return e[0].from;if(r>=1)return e[e.length-1].to;let i=Math.floor(t*r);for(let s=0;;s++){let{from:n,to:o}=e[s],a=o-n;if(i<=a)return n+i;i-=a}}function Od(t,e){let r=0;for(let{from:i,to:s}of t.ranges){if(e<=s){r+=e-i;break}r+=s-i}return r/t.total}function CO(t,e){for(let r of t)if(e(r))return r}var Zk={toDOM(t){return t},fromDOM(t){return t},scale:1,eq(t){return t==this}},c_=class t{constructor(e,r,i){let s=0,n=0,o=0;this.viewports=i.map(({from:a,to:l})=>{let c=r.lineAt(a,rt.ByPos,e,0,0).top,u=r.lineAt(l,rt.ByPos,e,0,0).bottom;return s+=u-c,{from:a,to:l,top:c,bottom:u,domTop:0,domBottom:0}}),this.scale=(7e6-s)/(r.height-s);for(let a of this.viewports)a.domTop=o+(a.top-n)*this.scale,o=a.domBottom=a.domTop+(a.bottom-a.top),n=a.bottom}toDOM(e){for(let r=0,i=0,s=0;;r++){let n=r<this.viewports.length?this.viewports[r]:null;if(!n||e<n.top)return s+(e-i)*this.scale;if(e<=n.bottom)return n.domTop+(e-n.top);i=n.bottom,s=n.domBottom}}fromDOM(e){for(let r=0,i=0,s=0;;r++){let n=r<this.viewports.length?this.viewports[r]:null;if(!n||e<n.domTop)return i+(e-s)/this.scale;if(e<=n.domBottom)return n.top+(e-n.domTop);i=n.bottom,s=n.domBottom}}eq(e){return e instanceof t?this.scale==e.scale&&this.viewports.length==e.viewports.length&&this.viewports.every((r,i)=>r.from==e.viewports[i].from&&r.to==e.viewports[i].to):!1}};function Oc(t,e){if(e.scale==1)return t;let r=e.toDOM(t.top),i=e.toDOM(t.bottom);return new ji(t.from,t.length,r,i-r,Array.isArray(t._content)?t._content.map(s=>Oc(s,e)):t._content)}var Bd=fe.define({combine:t=>t.join(" ")}),h_=fe.define({combine:t=>t.indexOf(!0)>-1}),u_=qr.newName(),q2=qr.newName(),Y2=qr.newName(),X2={"&light":"."+q2,"&dark":"."+Y2};function f_(t,e,r){return new qr(e,{finish(i){return/&/.test(i)?i.replace(/&\w*/,s=>{if(s=="&")return t;if(!r||!r[s])throw new RangeError(`Unsupported selector: ${s}`);return r[s]}):t+" "+i}})}var kO=f_("."+u_,{"&":{position:"relative !important",boxSizing:"border-box","&.cm-focused":{outline:"1px dotted #212121"},display:"flex !important",flexDirection:"column"},".cm-scroller":{display:"flex !important",alignItems:"flex-start !important",fontFamily:"monospace",lineHeight:1.4,height:"100%",overflowX:"auto",position:"relative",zIndex:0,overflowAnchor:"none"},".cm-content":{margin:0,flexGrow:2,flexShrink:0,display:"block",whiteSpace:"pre",wordWrap:"normal",boxSizing:"border-box",minHeight:"100%",padding:"4px 0",outline:"none","&[contenteditable=true]":{WebkitUserModify:"read-write-plaintext-only"}},".cm-lineWrapping":{whiteSpace_fallback:"pre-wrap",whiteSpace:"break-spaces",wordBreak:"break-word",overflowWrap:"anywhere",flexShrink:1},"&light .cm-content":{caretColor:"black"},"&dark .cm-content":{caretColor:"white"},".cm-line":{display:"block",padding:"0 2px 0 6px"},".cm-layer":{position:"absolute",left:0,top:0,contain:"size style","& > *":{position:"absolute"}},"&light .cm-selectionBackground":{background:"#d9d9d9"},"&dark .cm-selectionBackground":{background:"#222"},"&light.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground":{background:"#d7d4f0"},"&dark.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground":{background:"#233"},".cm-cursorLayer":{pointerEvents:"none"},"&.cm-focused > .cm-scroller > .cm-cursorLayer":{animation:"steps(1) cm-blink 1.2s infinite"},"@keyframes cm-blink":{"0%":{},"50%":{opacity:0},"100%":{}},"@keyframes cm-blink2":{"0%":{},"50%":{opacity:0},"100%":{}},".cm-cursor, .cm-dropCursor":{borderLeft:"1.2px solid black",marginLeft:"-0.6px",pointerEvents:"none"},".cm-cursor":{display:"none"},"&dark .cm-cursor":{borderLeftColor:"#444"},".cm-dropCursor":{position:"absolute"},"&.cm-focused > .cm-scroller > .cm-cursorLayer .cm-cursor":{display:"block"},".cm-iso":{unicodeBidi:"isolate"},".cm-announced":{position:"fixed",top:"-10000px"},"@media print":{".cm-announced":{display:"none"}},"&light .cm-activeLine":{backgroundColor:"#cceeff44"},"&dark .cm-activeLine":{backgroundColor:"#99eeff33"},"&light .cm-specialChar":{color:"red"},"&dark .cm-specialChar":{color:"#f78"},".cm-gutters":{flexShrink:0,display:"flex",height:"100%",boxSizing:"border-box",insetInlineStart:0,zIndex:200},"&light .cm-gutters":{backgroundColor:"#f5f5f5",color:"#6c6c6c",borderRight:"1px solid #ddd"},"&dark .cm-gutters":{backgroundColor:"#333338",color:"#ccc"},".cm-gutter":{display:"flex !important",flexDirection:"column",flexShrink:0,boxSizing:"border-box",minHeight:"100%",overflow:"hidden"},".cm-gutterElement":{boxSizing:"border-box"},".cm-lineNumbers .cm-gutterElement":{padding:"0 3px 0 5px",minWidth:"20px",textAlign:"right",whiteSpace:"nowrap"},"&light .cm-activeLineGutter":{backgroundColor:"#e2f2ff"},"&dark .cm-activeLineGutter":{backgroundColor:"#222227"},".cm-panels":{boxSizing:"border-box",position:"sticky",left:0,right:0,zIndex:300},"&light .cm-panels":{backgroundColor:"#f5f5f5",color:"black"},"&light .cm-panels-top":{borderBottom:"1px solid #ddd"},"&light .cm-panels-bottom":{borderTop:"1px solid #ddd"},"&dark .cm-panels":{backgroundColor:"#333338",color:"white"},".cm-tab":{display:"inline-block",overflow:"hidden",verticalAlign:"bottom"},".cm-widgetBuffer":{verticalAlign:"text-top",height:"1em",width:0,display:"inline"},".cm-placeholder":{color:"#888",display:"inline-block",verticalAlign:"top"},".cm-highlightSpace:before":{content:"attr(data-display)",position:"absolute",pointerEvents:"none",color:"#888"},".cm-highlightTab":{backgroundImage:`url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="200" height="20"><path stroke="%23888" stroke-width="1" fill="none" d="M1 10H196L190 5M190 15L196 10M197 4L197 16"/></svg>')`,backgroundSize:"auto 100%",backgroundPosition:"right 90%",backgroundRepeat:"no-repeat"},".cm-trailingSpace":{backgroundColor:"#ff332255"},".cm-button":{verticalAlign:"middle",color:"inherit",fontSize:"70%",padding:".2em 1em",borderRadius:"1px"},"&light .cm-button":{backgroundImage:"linear-gradient(#eff1f5, #d9d9df)",border:"1px solid #888","&:active":{backgroundImage:"linear-gradient(#b4b4b4, #d0d3d6)"}},"&dark .cm-button":{backgroundImage:"linear-gradient(#393939, #111)",border:"1px solid #888","&:active":{backgroundImage:"linear-gradient(#111, #333)"}},".cm-textfield":{verticalAlign:"middle",color:"inherit",fontSize:"70%",border:"1px solid silver",padding:".2em .5em"},"&light .cm-textfield":{backgroundColor:"white"},"&dark .cm-textfield":{border:"1px solid #555",backgroundColor:"inherit"}},X2),TO={childList:!0,characterData:!0,subtree:!0,attributes:!0,characterDataOldValue:!0},Fv=ee.ie&&ee.ie_version<=11,d_=class{constructor(e){this.view=e,this.active=!1,this.editContext=null,this.selectionRange=new zv,this.selectionChanged=!1,this.delayedFlush=-1,this.resizeTimeout=-1,this.queue=[],this.delayedAndroidKey=null,this.flushingAndroidKey=-1,this.lastChange=0,this.scrollTargets=[],this.intersection=null,this.resizeScroll=null,this.intersecting=!1,this.gapIntersection=null,this.gaps=[],this.printQuery=null,this.parentCheck=-1,this.dom=e.contentDOM,this.observer=new MutationObserver(r=>{for(let i of r)this.queue.push(i);(ee.ie&&ee.ie_version<=11||ee.ios&&e.composing)&&r.some(i=>i.type=="childList"&&i.removedNodes.length||i.type=="characterData"&&i.oldValue.length>i.target.nodeValue.length)?this.flushSoon():this.flush()}),window.EditContext&&e.constructor.EDIT_CONTEXT!==!1&&!(ee.chrome&&ee.chrome_version<126)&&(this.editContext=new p_(e),e.state.facet(rs)&&(e.contentDOM.editContext=this.editContext.editContext)),Fv&&(this.onCharData=r=>{this.queue.push({target:r.target,type:"characterData",oldValue:r.prevValue}),this.flushSoon()}),this.onSelectionChange=this.onSelectionChange.bind(this),this.onResize=this.onResize.bind(this),this.onPrint=this.onPrint.bind(this),this.onScroll=this.onScroll.bind(this),window.matchMedia&&(this.printQuery=window.matchMedia("print")),typeof ResizeObserver=="function"&&(this.resizeScroll=new ResizeObserver(()=>{var r;((r=this.view.docView)===null||r===void 0?void 0:r.lastUpdate)<Date.now()-75&&this.onResize()}),this.resizeScroll.observe(e.scrollDOM)),this.addWindowListeners(this.win=e.win),this.start(),typeof IntersectionObserver=="function"&&(this.intersection=new IntersectionObserver(r=>{this.parentCheck<0&&(this.parentCheck=setTimeout(this.listenForScroll.bind(this),1e3)),r.length>0&&r[r.length-1].intersectionRatio>0!=this.intersecting&&(this.intersecting=!this.intersecting,this.intersecting!=this.view.inView&&this.onScrollChanged(document.createEvent("Event")))},{threshold:[0,.001]}),this.intersection.observe(this.dom),this.gapIntersection=new IntersectionObserver(r=>{r.length>0&&r[r.length-1].intersectionRatio>0&&this.onScrollChanged(document.createEvent("Event"))},{})),this.listenForScroll(),this.readSelectionRange()}onScrollChanged(e){this.view.inputState.runHandlers("scroll",e),this.intersecting&&this.view.measure()}onScroll(e){this.intersecting&&this.flush(!1),this.editContext&&this.view.requestMeasure(this.editContext.measureReq),this.onScrollChanged(e)}onResize(){this.resizeTimeout<0&&(this.resizeTimeout=setTimeout(()=>{this.resizeTimeout=-1,this.view.requestMeasure()},50))}onPrint(e){(e.type=="change"||!e.type)&&!e.matches||(this.view.viewState.printing=!0,this.view.measure(),setTimeout(()=>{this.view.viewState.printing=!1,this.view.requestMeasure()},500))}updateGaps(e){if(this.gapIntersection&&(e.length!=this.gaps.length||this.gaps.some((r,i)=>r!=e[i]))){this.gapIntersection.disconnect();for(let r of e)this.gapIntersection.observe(r);this.gaps=e}}onSelectionChange(e){let r=this.selectionChanged;if(!this.readSelectionRange()||this.delayedAndroidKey)return;let{view:i}=this,s=this.selectionRange;if(i.state.facet(rs)?i.root.activeElement!=this.dom:!Id(i.dom,s))return;let n=s.anchorNode&&i.docView.nearest(s.anchorNode);if(n&&n.ignoreEvent(e)){r||(this.selectionChanged=!1);return}(ee.ie&&ee.ie_version<=11||ee.android&&ee.chrome)&&!i.state.selection.main.empty&&s.focusNode&&Bc(s.focusNode,s.focusOffset,s.anchorNode,s.anchorOffset)?this.flushSoon():this.flush(!1)}readSelectionRange(){let{view:e}=this,r=zc(e.root);if(!r)return!1;let i=ee.safari&&e.root.nodeType==11&&p3(this.dom.ownerDocument)==this.dom&&EO(this.view,r)||r;if(!i||this.selectionRange.eq(i))return!1;let s=Id(this.dom,i);return s&&!this.selectionChanged&&e.inputState.lastFocusTime>Date.now()-200&&e.inputState.lastTouchTime<Date.now()-300&&y3(this.dom,i)?(this.view.inputState.lastFocusTime=0,e.docView.updateSelection(),!1):(this.selectionRange.setRange(i),s&&(this.selectionChanged=!0),!0)}setSelectionRange(e,r){this.selectionRange.set(e.node,e.offset,r.node,r.offset),this.selectionChanged=!1}clearSelectionRange(){this.selectionRange.set(null,0,null,0)}listenForScroll(){this.parentCheck=-1;let e=0,r=null;for(let i=this.dom;i;)if(i.nodeType==1)!r&&e<this.scrollTargets.length&&this.scrollTargets[e]==i?e++:r||(r=this.scrollTargets.slice(0,e)),r&&r.push(i),i=i.assignedSlot||i.parentNode;else if(i.nodeType==11)i=i.host;else break;if(e<this.scrollTargets.length&&!r&&(r=this.scrollTargets.slice(0,e)),r){for(let i of this.scrollTargets)i.removeEventListener("scroll",this.onScroll);for(let i of this.scrollTargets=r)i.addEventListener("scroll",this.onScroll)}}ignore(e){if(!this.active)return e();try{return this.stop(),e()}finally{this.start(),this.clear()}}start(){this.active||(this.observer.observe(this.dom,TO),Fv&&this.dom.addEventListener("DOMCharacterDataModified",this.onCharData),this.active=!0)}stop(){this.active&&(this.active=!1,this.observer.disconnect(),Fv&&this.dom.removeEventListener("DOMCharacterDataModified",this.onCharData))}clear(){this.processRecords(),this.queue.length=0,this.selectionChanged=!1}delayAndroidKey(e,r){var i;if(!this.delayedAndroidKey){let s=()=>{let n=this.delayedAndroidKey;n&&(this.clearDelayedAndroidKey(),this.view.inputState.lastKeyCode=n.keyCode,this.view.inputState.lastKeyTime=Date.now(),!this.flush()&&n.force&&Oa(this.dom,n.key,n.keyCode))};this.flushingAndroidKey=this.view.win.requestAnimationFrame(s)}(!this.delayedAndroidKey||e=="Enter")&&(this.delayedAndroidKey={key:e,keyCode:r,force:this.lastChange<Date.now()-50||!!(!((i=this.delayedAndroidKey)===null||i===void 0)&&i.force)})}clearDelayedAndroidKey(){this.win.cancelAnimationFrame(this.flushingAndroidKey),this.delayedAndroidKey=null,this.flushingAndroidKey=-1}flushSoon(){this.delayedFlush<0&&(this.delayedFlush=this.view.win.requestAnimationFrame(()=>{this.delayedFlush=-1,this.flush()}))}forceFlush(){this.delayedFlush>=0&&(this.view.win.cancelAnimationFrame(this.delayedFlush),this.delayedFlush=-1),this.flush()}pendingRecords(){for(let e of this.observer.takeRecords())this.queue.push(e);return this.queue}processRecords(){let e=this.pendingRecords();e.length&&(this.queue=[]);let r=-1,i=-1,s=!1;for(let n of e){let o=this.readMutation(n);o&&(o.typeOver&&(s=!0),r==-1?{from:r,to:i}=o:(r=Math.min(o.from,r),i=Math.max(o.to,i)))}return{from:r,to:i,typeOver:s}}readChange(){let{from:e,to:r,typeOver:i}=this.processRecords(),s=this.selectionChanged&&Id(this.dom,this.selectionRange);if(e<0&&!s)return null;e>-1&&(this.lastChange=Date.now()),this.view.inputState.lastFocusTime=0,this.selectionChanged=!1;let n=new Zv(this.view,e,r,i);return this.view.docView.domChanged={newSel:n.newSel?n.newSel.main:null},n}flush(e=!0){if(this.delayedFlush>=0||this.delayedAndroidKey)return!1;e&&this.readSelectionRange();let r=this.readChange();if(!r)return this.view.requestMeasure(),!1;let i=this.view.state,s=z2(this.view,r);return this.view.state==i&&(r.domChanged||r.newSel&&!r.newSel.main.eq(this.view.state.selection.main))&&this.view.update([]),s}readMutation(e){let r=this.view.docView.nearest(e.target);if(!r||r.ignoreMutation(e))return null;if(r.markDirty(e.type=="attributes"),e.type=="attributes"&&(r.flags|=4),e.type=="childList"){let i=e2(r,e.previousSibling||e.target.previousSibling,-1),s=e2(r,e.nextSibling||e.target.nextSibling,1);return{from:i?r.posAfter(i):r.posAtStart,to:s?r.posBefore(s):r.posAtEnd,typeOver:!1}}else return e.type=="characterData"?{from:r.posAtStart,to:r.posAtEnd,typeOver:e.target.nodeValue==e.oldValue}:null}setWindow(e){e!=this.win&&(this.removeWindowListeners(this.win),this.win=e,this.addWindowListeners(this.win))}addWindowListeners(e){e.addEventListener("resize",this.onResize),this.printQuery?this.printQuery.addEventListener?this.printQuery.addEventListener("change",this.onPrint):this.printQuery.addListener(this.onPrint):e.addEventListener("beforeprint",this.onPrint),e.addEventListener("scroll",this.onScroll),e.document.addEventListener("selectionchange",this.onSelectionChange)}removeWindowListeners(e){e.removeEventListener("scroll",this.onScroll),e.removeEventListener("resize",this.onResize),this.printQuery?this.printQuery.removeEventListener?this.printQuery.removeEventListener("change",this.onPrint):this.printQuery.removeListener(this.onPrint):e.removeEventListener("beforeprint",this.onPrint),e.document.removeEventListener("selectionchange",this.onSelectionChange)}update(e){this.editContext&&(this.editContext.update(e),e.startState.facet(rs)!=e.state.facet(rs)&&(e.view.contentDOM.editContext=e.state.facet(rs)?this.editContext.editContext:null))}destroy(){var e,r,i;this.stop(),(e=this.intersection)===null||e===void 0||e.disconnect(),(r=this.gapIntersection)===null||r===void 0||r.disconnect(),(i=this.resizeScroll)===null||i===void 0||i.disconnect();for(let s of this.scrollTargets)s.removeEventListener("scroll",this.onScroll);this.removeWindowListeners(this.win),clearTimeout(this.parentCheck),clearTimeout(this.resizeTimeout),this.win.cancelAnimationFrame(this.delayedFlush),this.win.cancelAnimationFrame(this.flushingAndroidKey),this.editContext&&(this.view.contentDOM.editContext=null,this.editContext.destroy())}};function e2(t,e,r){for(;e;){let i=Ze.get(e);if(i&&i.parent==t)return i;let s=e.parentNode;e=s!=t.dom?s:r>0?e.nextSibling:e.previousSibling}return null}function t2(t,e){let r=e.startContainer,i=e.startOffset,s=e.endContainer,n=e.endOffset,o=t.docView.domAtPos(t.state.selection.main.anchor);return Bc(o.node,o.offset,s,n)&&([r,i,s,n]=[s,n,r,i]),{anchorNode:r,anchorOffset:i,focusNode:s,focusOffset:n}}function EO(t,e){if(e.getComposedRanges){let s=e.getComposedRanges(t.root)[0];if(s)return t2(t,s)}let r=null;function i(s){s.preventDefault(),s.stopImmediatePropagation(),r=s.getTargetRanges()[0]}return t.contentDOM.addEventListener("beforeinput",i,!0),t.dom.ownerDocument.execCommand("indent"),t.contentDOM.removeEventListener("beforeinput",i,!0),r?t2(t,r):null}var p_=class{constructor(e){this.from=0,this.to=0,this.pendingContextChange=null,this.handlers=Object.create(null),this.resetRange(e.state);let r=this.editContext=new window.EditContext({text:e.state.doc.sliceString(this.from,this.to),selectionStart:this.toContextPos(Math.max(this.from,Math.min(this.to,e.state.selection.main.anchor))),selectionEnd:this.toContextPos(e.state.selection.main.head)});this.handlers.textupdate=i=>{let{anchor:s}=e.state.selection.main,n={from:this.toEditorPos(i.updateRangeStart),to:this.toEditorPos(i.updateRangeEnd),insert:Ae.of(i.text.split(`
`))};n.from==this.from&&s<this.from?n.from=s:n.to==this.to&&s>this.to&&(n.to=s),!(n.from==n.to&&!n.insert.length)&&(this.pendingContextChange=n,e.state.readOnly||x_(e,n,ce.single(this.toEditorPos(i.selectionStart),this.toEditorPos(i.selectionEnd))),this.pendingContextChange&&(this.revertPending(e.state),this.setSelection(e.state)))},this.handlers.characterboundsupdate=i=>{let s=[],n=null;for(let o=this.toEditorPos(i.rangeStart),a=this.toEditorPos(i.rangeEnd);o<a;o++){let l=e.coordsForChar(o);n=l&&new DOMRect(l.left,l.top,l.right-l.left,l.bottom-l.top)||n||new DOMRect,s.push(n)}r.updateCharacterBounds(i.rangeStart,s)},this.handlers.textformatupdate=i=>{let s=[];for(let n of i.getTextFormats()){let o=n.underlineStyle,a=n.underlineThickness;if(o!="None"&&a!="None"){let l=`text-decoration: underline ${o=="Dashed"?"dashed ":o=="Squiggle"?"wavy ":""}${a=="Thin"?1:2}px`;s.push(_t.mark({attributes:{style:l}}).range(this.toEditorPos(n.rangeStart),this.toEditorPos(n.rangeEnd)))}}e.dispatch({effects:L2.of(_t.set(s))})},this.handlers.compositionstart=()=>{e.inputState.composing<0&&(e.inputState.composing=0,e.inputState.compositionFirstChange=!0)},this.handlers.compositionend=()=>{e.inputState.composing=-1,e.inputState.compositionFirstChange=null};for(let i in this.handlers)r.addEventListener(i,this.handlers[i]);this.measureReq={read:i=>{this.editContext.updateControlBounds(i.contentDOM.getBoundingClientRect());let s=zc(i.root);s&&s.rangeCount&&this.editContext.updateSelectionBounds(s.getRangeAt(0).getBoundingClientRect())}}}applyEdits(e){let r=0,i=!1,s=this.pendingContextChange;return e.changes.iterChanges((n,o,a,l,c)=>{if(i)return;let u=c.length-(o-n);if(s&&o>=s.to)if(s.from==n&&s.to==o&&s.insert.eq(c)){s=this.pendingContextChange=null,r+=u,this.to+=u;return}else s=null,this.revertPending(e.state);if(n+=r,o+=r,o<=this.from)this.from+=u,this.to+=u;else if(n<this.to){if(n<this.from||o>this.to||this.to-this.from+c.length>3e4){i=!0;return}this.editContext.updateText(this.toContextPos(n),this.toContextPos(o),c.toString()),this.to+=u}r+=u}),s&&!i&&this.revertPending(e.state),!i}update(e){let r=this.pendingContextChange;!this.applyEdits(e)||!this.rangeIsValid(e.state)?(this.pendingContextChange=null,this.resetRange(e.state),this.editContext.updateText(0,this.editContext.text.length,e.state.doc.sliceString(this.from,this.to)),this.setSelection(e.state)):(e.docChanged||e.selectionSet||r)&&this.setSelection(e.state),(e.geometryChanged||e.docChanged||e.selectionSet)&&e.view.requestMeasure(this.measureReq)}resetRange(e){let{head:r}=e.selection.main;this.from=Math.max(0,r-1e4),this.to=Math.min(e.doc.length,r+1e4)}revertPending(e){let r=this.pendingContextChange;this.pendingContextChange=null,this.editContext.updateText(this.toContextPos(r.from),this.toContextPos(r.from+r.insert.length),e.doc.sliceString(r.from,r.to))}setSelection(e){let{main:r}=e.selection,i=this.toContextPos(Math.max(this.from,Math.min(this.to,r.anchor))),s=this.toContextPos(r.head);(this.editContext.selectionStart!=i||this.editContext.selectionEnd!=s)&&this.editContext.updateSelection(i,s)}rangeIsValid(e){let{head:r}=e.selection.main;return!(this.from>0&&r-this.from<500||this.to<e.doc.length&&this.to-r<500||this.to-this.from>1e4*3)}toEditorPos(e){return e+this.from}toContextPos(e){return e-this.from}destroy(){for(let e in this.handlers)this.editContext.removeEventListener(e,this.handlers[e])}},Ce=class t{get state(){return this.viewState.state}get viewport(){return this.viewState.viewport}get visibleRanges(){return this.viewState.visibleRanges}get inView(){return this.viewState.inView}get composing(){return this.inputState.composing>0}get compositionStarted(){return this.inputState.composing>=0}get root(){return this._root}get win(){return this.dom.ownerDocument.defaultView||window}constructor(e={}){var r;this.plugins=[],this.pluginMap=new Map,this.editorAttrs={},this.contentAttrs={},this.bidiCache=[],this.destroyed=!1,this.updateState=2,this.measureScheduled=-1,this.measureRequests=[],this.contentDOM=document.createElement("div"),this.scrollDOM=document.createElement("div"),this.scrollDOM.tabIndex=-1,this.scrollDOM.className="cm-scroller",this.scrollDOM.appendChild(this.contentDOM),this.announceDOM=document.createElement("div"),this.announceDOM.className="cm-announced",this.announceDOM.setAttribute("aria-live","polite"),this.dom=document.createElement("div"),this.dom.appendChild(this.announceDOM),this.dom.appendChild(this.scrollDOM),e.parent&&e.parent.appendChild(this.dom);let{dispatch:i}=e;this.dispatchTransactions=e.dispatchTransactions||i&&(s=>s.forEach(n=>i(n,this)))||(s=>this.update(s)),this.dispatch=this.dispatch.bind(this),this._root=e.root||_3(e.parent)||document,this.viewState=new qd(e.state||vt.create(e)),e.scrollTo&&e.scrollTo.is(Md)&&(this.viewState.scrollTarget=e.scrollTo.value.clip(this.viewState.state)),this.plugins=this.state.facet(Ac).map(s=>new Fc(s));for(let s of this.plugins)s.update(this);this.observer=new d_(this),this.inputState=new e_(this),this.inputState.ensureHandlers(this.plugins),this.docView=new Vd(this),this.mountStyles(),this.updateAttrs(),this.updateState=0,this.requestMeasure(),!((r=document.fonts)===null||r===void 0)&&r.ready&&document.fonts.ready.then(()=>this.requestMeasure())}dispatch(...e){let r=e.length==1&&e[0]instanceof _r?e:e.length==1&&Array.isArray(e[0])?e[0]:[this.state.update(...e)];this.dispatchTransactions(r,this)}update(e){if(this.updateState!=0)throw new Error("Calls to EditorView.update are not allowed while an update is in progress");let r=!1,i=!1,s,n=this.state;for(let g of e){if(g.startState!=n)throw new RangeError("Trying to update state with a transaction that doesn't start from the previous state.");n=g.state}if(this.destroyed){this.viewState.state=n;return}let o=this.hasFocus,a=0,l=null;e.some(g=>g.annotation(U2))?(this.inputState.notifiedFocused=o,a=1):o!=this.inputState.notifiedFocused&&(this.inputState.notifiedFocused=o,l=K2(n,o),l||(a=1));let c=this.observer.delayedAndroidKey,u=null;if(c?(this.observer.clearDelayedAndroidKey(),u=this.observer.readChange(),(u&&!this.state.doc.eq(n.doc)||!this.state.selection.eq(n.selection))&&(u=null)):this.observer.clear(),n.facet(vt.phrases)!=this.state.facet(vt.phrases))return this.setState(n);s=Wd.create(this,n,e),s.flags|=a;let p=this.viewState.scrollTarget;try{this.updateState=2;for(let g of e){if(p&&(p=p.map(g.changes)),g.scrollIntoView){let{main:m}=g.state.selection;p=new Nc(m.empty?m:ce.cursor(m.head,m.head>m.anchor?-1:1))}for(let m of g.effects)m.is(Md)&&(p=m.value.clip(this.state))}this.viewState.update(s,p),this.bidiCache=Yd.update(this.bidiCache,s.changes),s.empty||(this.updatePlugins(s),this.inputState.update(s)),r=this.docView.update(s),this.state.facet(Lc)!=this.styleModules&&this.mountStyles(),i=this.updateAttrs(),this.showAnnouncements(e),this.docView.updateSelection(r,e.some(g=>g.isUserEvent("select.pointer")))}finally{this.updateState=0}if(s.startState.facet(Bd)!=s.state.facet(Bd)&&(this.viewState.mustMeasureContent=!0),(r||i||p||this.viewState.mustEnforceCursorAssoc||this.viewState.mustMeasureContent)&&this.requestMeasure(),r&&this.docViewUpdate(),!s.empty)for(let g of this.state.facet(Xv))try{g(s)}catch(m){fi(this.state,m,"update listener")}(l||u)&&Promise.resolve().then(()=>{l&&this.state==l.startState&&this.dispatch(l),u&&!z2(this,u)&&c.force&&Oa(this.contentDOM,c.key,c.keyCode)})}setState(e){if(this.updateState!=0)throw new Error("Calls to EditorView.setState are not allowed while an update is in progress");if(this.destroyed){this.viewState.state=e;return}this.updateState=2;let r=this.hasFocus;try{for(let i of this.plugins)i.destroy(this);this.viewState=new qd(e),this.plugins=e.facet(Ac).map(i=>new Fc(i)),this.pluginMap.clear();for(let i of this.plugins)i.update(this);this.docView.destroy(),this.docView=new Vd(this),this.inputState.ensureHandlers(this.plugins),this.mountStyles(),this.updateAttrs(),this.bidiCache=[]}finally{this.updateState=0}r&&this.focus(),this.requestMeasure()}updatePlugins(e){let r=e.startState.facet(Ac),i=e.state.facet(Ac);if(r!=i){let s=[];for(let n of i){let o=r.indexOf(n);if(o<0)s.push(new Fc(n));else{let a=this.plugins[o];a.mustUpdate=e,s.push(a)}}for(let n of this.plugins)n.mustUpdate!=e&&n.destroy(this);this.plugins=s,this.pluginMap.clear()}else for(let s of this.plugins)s.mustUpdate=e;for(let s=0;s<this.plugins.length;s++)this.plugins[s].update(this);r!=i&&this.inputState.ensureHandlers(this.plugins)}docViewUpdate(){for(let e of this.plugins){let r=e.value;if(r&&r.docViewUpdate)try{r.docViewUpdate(this)}catch(i){fi(this.state,i,"doc view update listener")}}}measure(e=!0){if(this.destroyed)return;if(this.measureScheduled>-1&&this.win.cancelAnimationFrame(this.measureScheduled),this.observer.delayedAndroidKey){this.measureScheduled=-1,this.requestMeasure();return}this.measureScheduled=0,e&&this.observer.forceFlush();let r=null,i=this.scrollDOM,s=i.scrollTop*this.scaleY,{scrollAnchorPos:n,scrollAnchorHeight:o}=this.viewState;Math.abs(s-this.viewState.scrollTop)>1&&(o=-1),this.viewState.scrollAnchorHeight=-1;try{for(let a=0;;a++){if(o<0)if(l2(i))n=-1,o=this.viewState.heightMap.height;else{let m=this.viewState.scrollAnchorAt(s);n=m.from,o=m.top}this.updateState=1;let l=this.viewState.measure(this);if(!l&&!this.measureRequests.length&&this.viewState.scrollTarget==null)break;if(a>5){console.warn(this.measureRequests.length?"Measure loop restarted more than 5 times":"Viewport failed to stabilize");break}let c=[];l&4||([this.measureRequests,c]=[c,this.measureRequests]);let u=c.map(m=>{try{return m.read(this)}catch(h){return fi(this.state,h),r2}}),p=Wd.create(this,this.state,[]),g=!1;p.flags|=l,r?r.flags|=l:r=p,this.updateState=2,p.empty||(this.updatePlugins(p),this.inputState.update(p),this.updateAttrs(),g=this.docView.update(p),g&&this.docViewUpdate());for(let m=0;m<c.length;m++)if(u[m]!=r2)try{let h=c[m];h.write&&h.write(u[m],this)}catch(h){fi(this.state,h)}if(g&&this.docView.updateSelection(!0),!p.viewportChanged&&this.measureRequests.length==0){if(this.viewState.editorHeight)if(this.viewState.scrollTarget){this.docView.scrollIntoView(this.viewState.scrollTarget),this.viewState.scrollTarget=null,o=-1;continue}else{let h=(n<0?this.viewState.heightMap.height:this.viewState.lineBlockAt(n).top)-o;if(h>1||h<-1){s=s+h,i.scrollTop=s/this.scaleY,o=-1;continue}}break}}}finally{this.updateState=0,this.measureScheduled=-1}if(r&&!r.empty)for(let a of this.state.facet(Xv))a(r)}get themeClasses(){return u_+" "+(this.state.facet(h_)?Y2:q2)+" "+this.state.facet(Bd)}updateAttrs(){let e=i2(this,D2,{class:"cm-editor"+(this.hasFocus?" cm-focused ":" ")+this.themeClasses}),r={spellcheck:"false",autocorrect:"off",autocapitalize:"off",translate:"no",contenteditable:this.state.facet(rs)?"true":"false",class:"cm-content",style:`${ee.tabSize}: ${this.state.tabSize}`,role:"textbox","aria-multiline":"true"};this.state.readOnly&&(r["aria-readonly"]="true"),i2(this,y_,r);let i=this.observer.ignore(()=>{let s=Uv(this.contentDOM,this.contentAttrs,r),n=Uv(this.dom,this.editorAttrs,e);return s||n});return this.editorAttrs=e,this.contentAttrs=r,i}showAnnouncements(e){let r=!0;for(let i of e)for(let s of i.effects)if(s.is(t.announce)){r&&(this.announceDOM.textContent=""),r=!1;let n=this.announceDOM.appendChild(document.createElement("div"));n.textContent=s.value}}mountStyles(){this.styleModules=this.state.facet(Lc);let e=this.state.facet(t.cspNonce);qr.mount(this.root,this.styleModules.concat(kO).reverse(),e?{nonce:e}:void 0)}readMeasured(){if(this.updateState==2)throw new Error("Reading the editor layout isn't allowed during an update");this.updateState==0&&this.measureScheduled>-1&&this.measure(!1)}requestMeasure(e){if(this.measureScheduled<0&&(this.measureScheduled=this.win.requestAnimationFrame(()=>this.measure())),e){if(this.measureRequests.indexOf(e)>-1)return;if(e.key!=null){for(let r=0;r<this.measureRequests.length;r++)if(this.measureRequests[r].key===e.key){this.measureRequests[r]=e;return}}this.measureRequests.push(e)}}plugin(e){let r=this.pluginMap.get(e);return(r===void 0||r&&r.spec!=e)&&this.pluginMap.set(e,r=this.plugins.find(i=>i.spec==e)||null),r&&r.update(this).value}get documentTop(){return this.contentDOM.getBoundingClientRect().top+this.viewState.paddingTop}get documentPadding(){return{top:this.viewState.paddingTop,bottom:this.viewState.paddingBottom}}get scaleX(){return this.viewState.scaleX}get scaleY(){return this.viewState.scaleY}elementAtHeight(e){return this.readMeasured(),this.viewState.elementAtHeight(e)}lineBlockAtHeight(e){return this.readMeasured(),this.viewState.lineBlockAtHeight(e)}get viewportLineBlocks(){return this.viewState.viewportLines}lineBlockAt(e){return this.viewState.lineBlockAt(e)}get contentHeight(){return this.viewState.contentHeight}moveByChar(e,r,i){return Nv(this,e,zk(this,e,r,i))}moveByGroup(e,r){return Nv(this,e,zk(this,e,r,i=>X3(this,e.head,i)))}visualLineSide(e,r){let i=this.bidiSpans(e),s=this.textDirectionAt(e.from),n=i[r?i.length-1:0];return ce.cursor(n.side(r,s)+e.from,n.forward(!r,s)?1:-1)}moveToLineBoundary(e,r,i=!0){return Y3(this,e,r,i)}moveVertically(e,r,i){return Nv(this,e,J3(this,e,r,i))}domAtPos(e){return this.docView.domAtPos(e)}posAtDOM(e,r=0){return this.docView.posFromDOM(e,r)}posAtCoords(e,r=!0){return this.readMeasured(),H2(this,e,r)}coordsAtPos(e,r=1){this.readMeasured();let i=this.docView.coordsAt(e,r);if(!i||i.left==i.right)return i;let s=this.state.doc.lineAt(e),n=this.bidiSpans(s),o=n[Wi.find(n,e-s.from,-1,r)];return Xd(i,o.dir==Ot.LTR==r>0)}coordsForChar(e){return this.readMeasured(),this.docView.coordsForChar(e)}get defaultCharacterWidth(){return this.viewState.heightOracle.charWidth}get defaultLineHeight(){return this.viewState.heightOracle.lineHeight}get textDirection(){return this.viewState.defaultTextDirection}textDirectionAt(e){return!this.state.facet(M2)||e<this.viewport.from||e>this.viewport.to?this.textDirection:(this.readMeasured(),this.docView.textDirectionAt(e))}get lineWrapping(){return this.viewState.heightOracle.lineWrapping}bidiSpans(e){if(e.length>PO)return b2(e.length);let r=this.textDirectionAt(e.from),i;for(let n of this.bidiCache)if(n.from==e.from&&n.dir==r&&(n.fresh||x2(n.isolates,i=Bk(this,e))))return n.order;i||(i=Bk(this,e));let s=A3(e.text,r,i);return this.bidiCache.push(new Yd(e.from,e.to,r,i,!0,s)),s}get hasFocus(){var e;return(this.dom.ownerDocument.hasFocus()||ee.safari&&((e=this.inputState)===null||e===void 0?void 0:e.lastContextMenu)>Date.now()-3e4)&&this.root.activeElement==this.contentDOM}focus(){this.observer.ignore(()=>{o2(this.contentDOM),this.docView.updateSelection()})}setRoot(e){this._root!=e&&(this._root=e,this.observer.setWindow((e.nodeType==9?e:e.ownerDocument).defaultView||window),this.mountStyles())}destroy(){this.root.activeElement==this.contentDOM&&this.contentDOM.blur();for(let e of this.plugins)e.destroy(this);this.plugins=[],this.inputState.destroy(),this.docView.destroy(),this.dom.remove(),this.observer.destroy(),this.measureScheduled>-1&&this.win.cancelAnimationFrame(this.measureScheduled),this.destroyed=!0}static scrollIntoView(e,r={}){return Md.of(new Nc(typeof e=="number"?ce.cursor(e):e,r.y,r.x,r.yMargin,r.xMargin))}scrollSnapshot(){let{scrollTop:e,scrollLeft:r}=this.scrollDOM,i=this.viewState.scrollAnchorAt(e);return Md.of(new Nc(ce.cursor(i.from),"start","start",i.top-e,r,!0))}setTabFocusMode(e){e==null?this.inputState.tabFocusMode=this.inputState.tabFocusMode<0?0:-1:typeof e=="boolean"?this.inputState.tabFocusMode=e?0:-1:this.inputState.tabFocusMode!=0&&(this.inputState.tabFocusMode=Date.now()+e)}static domEventHandlers(e){return ho.define(()=>({}),{eventHandlers:e})}static domEventObservers(e){return ho.define(()=>({}),{eventObservers:e})}static theme(e,r){let i=qr.newName(),s=[Bd.of(i),Lc.of(f_(`.${i}`,e))];return r&&r.dark&&s.push(h_.of(!0)),s}static baseTheme(e){return Td.lowest(Lc.of(f_("."+u_,e,X2)))}static findFromDOM(e){var r;let i=e.querySelector(".cm-content"),s=i&&Ze.get(i)||Ze.get(e);return((r=s?.rootView)===null||r===void 0?void 0:r.view)||null}};Ce.styleModule=Lc;Ce.inputHandler=P2;Ce.clipboardInputFilter=v_;Ce.clipboardOutputFilter=__;Ce.scrollHandler=A2;Ce.focusChangeEffect=R2;Ce.perLineTextDirection=M2;Ce.exceptionSink=E2;Ce.updateListener=Xv;Ce.editable=rs;Ce.mouseSelectionStyle=T2;Ce.dragMovesSelection=k2;Ce.clickAddsSelectionRange=C2;Ce.decorations=Kc;Ce.outerDecorations=O2;Ce.atomicRanges=S_;Ce.bidiIsolatedRanges=B2;Ce.scrollMargins=I2;Ce.darkTheme=h_;Ce.cspNonce=fe.define({combine:t=>t.length?t[0]:""});Ce.contentAttributes=y_;Ce.editorAttributes=D2;Ce.lineWrapping=Ce.contentAttributes.of({class:"cm-lineWrapping"});Ce.announce=gt.define();var PO=4096,r2={},Yd=class t{constructor(e,r,i,s,n,o){this.from=e,this.to=r,this.dir=i,this.isolates=s,this.fresh=n,this.order=o}static update(e,r){if(r.empty&&!e.some(n=>n.fresh))return e;let i=[],s=e.length?e[e.length-1].dir:Ot.LTR;for(let n=Math.max(0,e.length-10);n<e.length;n++){let o=e[n];o.dir==s&&!r.touchesRange(o.from,o.to)&&i.push(new t(r.mapPos(o.from,1),r.mapPos(o.to,-1),o.dir,o.isolates,!1,o.order))}return i}};function i2(t,e,r){for(let i=t.state.facet(e),s=i.length-1;s>=0;s--){let n=i[s],o=typeof n=="function"?n(t):n;o&&Vv(o,r)}return r}var TJ=ee.mac?"mac":ee.windows?"win":ee.linux?"linux":"key";var RO=!ee.ios;var n2={".cm-line":{"& ::selection, &::selection":{backgroundColor:"transparent !important"}},".cm-content":{"& :focus":{caretColor:"initial !important","&::selection, & ::selection":{backgroundColor:"Highlight !important"}}}};RO&&(n2[".cm-line"].caretColor=n2[".cm-content"].caretColor="transparent !important");var EJ=/x/.unicode!=null?"gu":"g";var _n=class extends gn{compare(e){return this==e||this.constructor==e.constructor&&this.eq(e)}eq(e){return!1}destroy(e){}};_n.prototype.elementClass="";_n.prototype.toDOM=void 0;_n.prototype.mapMode=vr.TrackBefore;_n.prototype.startSide=_n.prototype.endSide=-1;_n.prototype.point=!0;var b_,qc=new Be;var MO=new Be,Jr=class{constructor(e,r,i=[],s=""){this.data=e,this.name=s,vt.prototype.hasOwnProperty("tree")||Object.defineProperty(vt.prototype,"tree",{get(){return Yc(this)}}),this.parser=r,this.extension=[Na.of(this),vt.languageData.of((n,o,a)=>{let l=J2(n,o,a),c=l.type.prop(qc);if(!c)return[];let u=n.facet(c),p=l.type.prop(MO);if(p){let g=l.resolve(o-l.from,a);for(let m of p)if(m.test(g,n)){let h=n.facet(m.facet);return m.type=="replace"?h:h.concat(u)}}return u})].concat(i)}isActiveAt(e,r,i=-1){return J2(e,r,i).type.prop(qc)==this.data}findRegions(e){let r=e.facet(Na);if(r?.data==this.data)return[{from:0,to:e.doc.length}];if(!r||!r.allowsNesting)return[];let i=[],s=(n,o)=>{if(n.prop(qc)==this.data){i.push({from:o,to:o+n.length});return}let a=n.prop(Be.mounted);if(a){if(a.tree.prop(qc)==this.data){if(a.overlay)for(let l of a.overlay)i.push({from:l.from+o,to:l.to+o});else i.push({from:o,to:o+n.length});return}else if(a.overlay){let l=i.length;if(s(a.tree,a.overlay[0].from+o),i.length>l)return}}for(let l=0;l<n.children.length;l++){let c=n.children[l];c instanceof Jt&&s(c,n.positions[l]+o)}};return s(Yc(e),0),i}get allowsNesting(){return!0}};Jr.setState=gt.define();function J2(t,e,r){let i=t.facet(Na),s=Yc(t).topNode;if(!i||i.allowsNesting)for(let n=s;n;n=n.enter(e,r,Dt.ExcludeBuffers))n.type.isTop&&(s=n);return s}function Yc(t){let e=t.field(Jr.state,!1);return e?e.tree:Jt.empty}var T_=class{constructor(e){this.doc=e,this.cursorPos=0,this.string="",this.cursor=e.iter()}get length(){return this.doc.length}syncTo(e){return this.string=this.cursor.next(e-this.cursorPos).value,this.cursorPos=e+this.string.length,this.cursorPos-this.string.length}chunk(e){return this.syncTo(e),this.string}get lineChunks(){return!0}read(e,r){let i=this.cursorPos-this.string.length;return e<i||r>=this.cursorPos?this.doc.sliceString(e,r):this.string.slice(e-i,r-i)}},Gc=null,E_=class t{constructor(e,r,i=[],s,n,o,a,l){this.parser=e,this.state=r,this.fragments=i,this.tree=s,this.treeLen=n,this.viewport=o,this.skipped=a,this.scheduleOn=l,this.parse=null,this.tempSkipped=[]}static create(e,r,i){return new t(e,r,[],Jt.empty,0,i,[],null)}startParse(){return this.parser.startParse(new T_(this.state.doc),this.fragments)}work(e,r){return r!=null&&r>=this.state.doc.length&&(r=void 0),this.tree!=Jt.empty&&this.isDone(r??this.state.doc.length)?(this.takeTree(),!0):this.withContext(()=>{var i;if(typeof e=="number"){let s=Date.now()+e;e=()=>Date.now()>s}for(this.parse||(this.parse=this.startParse()),r!=null&&(this.parse.stoppedAt==null||this.parse.stoppedAt>r)&&r<this.state.doc.length&&this.parse.stopAt(r);;){let s=this.parse.advance();if(s)if(this.fragments=this.withoutTempSkipped(Js.addTree(s,this.fragments,this.parse.stoppedAt!=null)),this.treeLen=(i=this.parse.stoppedAt)!==null&&i!==void 0?i:this.state.doc.length,this.tree=s,this.parse=null,this.treeLen<(r??this.state.doc.length))this.parse=this.startParse();else return!0;if(e())return!1}})}takeTree(){let e,r;this.parse&&(e=this.parse.parsedPos)>=this.treeLen&&((this.parse.stoppedAt==null||this.parse.stoppedAt>e)&&this.parse.stopAt(e),this.withContext(()=>{for(;!(r=this.parse.advance()););}),this.treeLen=e,this.tree=r,this.fragments=this.withoutTempSkipped(Js.addTree(this.tree,this.fragments,!0)),this.parse=null)}withContext(e){let r=Gc;Gc=this;try{return e()}finally{Gc=r}}withoutTempSkipped(e){for(let r;r=this.tempSkipped.pop();)e=Q2(e,r.from,r.to);return e}changes(e,r){let{fragments:i,tree:s,treeLen:n,viewport:o,skipped:a}=this;if(this.takeTree(),!e.empty){let l=[];if(e.iterChangedRanges((c,u,p,g)=>l.push({fromA:c,toA:u,fromB:p,toB:g})),i=Js.applyChanges(i,l),s=Jt.empty,n=0,o={from:e.mapPos(o.from,-1),to:e.mapPos(o.to,1)},this.skipped.length){a=[];for(let c of this.skipped){let u=e.mapPos(c.from,1),p=e.mapPos(c.to,-1);u<p&&a.push({from:u,to:p})}}}return new t(this.parser,r,i,s,n,o,a,this.scheduleOn)}updateViewport(e){if(this.viewport.from==e.from&&this.viewport.to==e.to)return!1;this.viewport=e;let r=this.skipped.length;for(let i=0;i<this.skipped.length;i++){let{from:s,to:n}=this.skipped[i];s<e.to&&n>e.from&&(this.fragments=Q2(this.fragments,s,n),this.skipped.splice(i--,1))}return this.skipped.length>=r?!1:(this.reset(),!0)}reset(){this.parse&&(this.takeTree(),this.parse=null)}skipUntilInView(e,r){this.skipped.push({from:e,to:r})}static getSkippingParser(e){return new class extends hd{createParse(r,i,s){let n=s[0].from,o=s[s.length-1].to;return{parsedPos:n,advance(){let l=Gc;if(l){for(let c of s)l.tempSkipped.push(c);e&&(l.scheduleOn=l.scheduleOn?Promise.all([l.scheduleOn,e]):e)}return this.parsedPos=o,new Jt(Dr.none,[],[],o-n)},stoppedAt:null,stopAt(){}}}}}isDone(e){e=Math.min(e,this.state.doc.length);let r=this.fragments;return this.treeLen>=e&&r.length&&r[0].from==0&&r[0].to>=e}static get(){return Gc}};function Q2(t,e,r){return Js.applyChanges(t,[{fromA:e,toA:r,fromB:e,toB:r}])}var Xc=class t{constructor(e){this.context=e,this.tree=e.tree}apply(e){if(!e.docChanged&&this.tree==this.context.tree)return this;let r=this.context.changes(e.changes,e.state),i=this.context.treeLen==e.startState.doc.length?void 0:Math.max(e.changes.mapPos(this.context.treeLen),r.viewport.to);return r.work(20,i)||r.takeTree(),new t(r)}static init(e){let r=Math.min(3e3,e.doc.length),i=E_.create(e.facet(Na).parser,e,{from:0,to:r});return i.work(20,r)||i.takeTree(),new t(i)}};Jr.state=pn.define({create:Xc.init,update(t,e){for(let r of e.effects)if(r.is(Jr.setState))return r.value;return e.startState.facet(Na)!=e.state.facet(Na)?Xc.init(e.state):t.apply(e)}});var rT=t=>{let e=setTimeout(()=>t(),500);return()=>clearTimeout(e)};typeof requestIdleCallback<"u"&&(rT=t=>{let e=-1,r=setTimeout(()=>{e=requestIdleCallback(t,{timeout:400})},100);return()=>e<0?clearTimeout(r):cancelIdleCallback(e)});var w_=typeof navigator<"u"&&(!((b_=navigator.scheduling)===null||b_===void 0)&&b_.isInputPending)?()=>navigator.scheduling.isInputPending():null,AO=ho.fromClass(class{constructor(e){this.view=e,this.working=null,this.workScheduled=0,this.chunkEnd=-1,this.chunkBudget=-1,this.work=this.work.bind(this),this.scheduleWork()}update(e){let r=this.view.state.field(Jr.state).context;(r.updateViewport(e.view.viewport)||this.view.viewport.to>r.treeLen)&&this.scheduleWork(),(e.docChanged||e.selectionSet)&&(this.view.hasFocus&&(this.chunkBudget+=50),this.scheduleWork()),this.checkAsyncSchedule(r)}scheduleWork(){if(this.working)return;let{state:e}=this.view,r=e.field(Jr.state);(r.tree!=r.context.tree||!r.context.isDone(e.doc.length))&&(this.working=rT(this.work))}work(e){this.working=null;let r=Date.now();if(this.chunkEnd<r&&(this.chunkEnd<0||this.view.hasFocus)&&(this.chunkEnd=r+3e4,this.chunkBudget=3e3),this.chunkBudget<=0)return;let{state:i,viewport:{to:s}}=this.view,n=i.field(Jr.state);if(n.tree==n.context.tree&&n.context.isDone(s+1e5))return;let o=Date.now()+Math.min(this.chunkBudget,100,e&&!w_?Math.max(25,e.timeRemaining()-5):1e9),a=n.context.treeLen<s&&i.doc.length>s+1e3,l=n.context.work(()=>w_&&w_()||Date.now()>o,s+(a?0:1e5));this.chunkBudget-=Date.now()-r,(l||this.chunkBudget<=0)&&(n.context.takeTree(),this.view.dispatch({effects:Jr.setState.of(new Xc(n.context))})),this.chunkBudget>0&&!(l&&!a)&&this.scheduleWork(),this.checkAsyncSchedule(n.context)}checkAsyncSchedule(e){e.scheduleOn&&(this.workScheduled++,e.scheduleOn.then(()=>this.scheduleWork()).catch(r=>fi(this.view.state,r)).then(()=>this.workScheduled--),e.scheduleOn=null)}destroy(){this.working&&this.working()}isWorking(){return!!(this.working||this.workScheduled>0)}},{eventHandlers:{focus(){this.scheduleWork()}}}),Na=fe.define({combine(t){return t.length?t[0]:null},enables:t=>[Jr.state,AO,Ce.contentAttributes.compute([t],e=>{let r=e.facet(t);return r&&r.name?{"data-language":r.name}:{}})]});var Fa=class t{constructor(e,r){this.specs=e;let i;function s(a){let l=qr.newName();return(i||(i=Object.create(null)))["."+l]=a,l}let n=typeof r.all=="string"?r.all:r.all?s(r.all):void 0,o=r.scope;this.scope=o instanceof Jr?a=>a.prop(qc)==o.data:o?a=>a==o:void 0,this.style=mv(e.map(a=>({tag:a.tag,class:a.class||s(Object.assign({},a,{tag:null}))})),{all:n}).style,this.module=i?new qr(i):null,this.themeType=r.themeType}static define(e,r){return new t(e,r||{})}},P_=fe.define(),iT=fe.define({combine(t){return t.length?[t[0]]:null}});function C_(t){let e=t.facet(P_);return e.length?e:t.facet(iT)}function nT(t,e){let r=[LO],i;return t instanceof Fa&&(t.module&&r.push(Ce.styleModule.of(t.module)),i=t.themeType),e?.fallback?r.push(iT.of(t)):i?r.push(P_.computeN([Ce.darkTheme],s=>s.facet(Ce.darkTheme)==(i=="dark")?[t]:[])):r.push(P_.of(t)),r}var R_=class{constructor(e){this.markCache=Object.create(null),this.tree=Yc(e.state),this.decorations=this.buildDeco(e,C_(e.state)),this.decoratedTo=e.viewport.to}update(e){let r=Yc(e.state),i=C_(e.state),s=i!=C_(e.startState),{viewport:n}=e.view,o=e.changes.mapPos(this.decoratedTo,1);r.length<n.to&&!s&&r.type==this.tree.type&&o>=n.to?(this.decorations=this.decorations.map(e.changes),this.decoratedTo=o):(r!=this.tree||e.viewportChanged||s)&&(this.tree=r,this.decorations=this.buildDeco(e.view,i),this.decoratedTo=n.to)}buildDeco(e,r){if(!r||!this.tree.length)return _t.none;let i=new no;for(let{from:s,to:n}of e.visibleRanges)rk(this.tree,r,(o,a,l)=>{i.add(o,a,this.markCache[l]||(this.markCache[l]=_t.mark({class:l})))},s,n);return i.finish()}},LO=Td.high(ho.fromClass(R_,{decorations:t=>t.decorations})),NJ=Fa.define([{tag:F.meta,color:"#404740"},{tag:F.link,textDecoration:"underline"},{tag:F.heading,textDecoration:"underline",fontWeight:"bold"},{tag:F.emphasis,fontStyle:"italic"},{tag:F.strong,fontWeight:"bold"},{tag:F.strikethrough,textDecoration:"line-through"},{tag:F.keyword,color:"#708"},{tag:[F.atom,F.bool,F.url,F.contentSeparator,F.labelName],color:"#219"},{tag:[F.literal,F.inserted],color:"#164"},{tag:[F.string,F.deleted],color:"#a11"},{tag:[F.regexp,F.escape,F.special(F.string)],color:"#e40"},{tag:F.definition(F.variableName),color:"#00f"},{tag:F.local(F.variableName),color:"#30a"},{tag:[F.typeName,F.namespace],color:"#085"},{tag:F.className,color:"#167"},{tag:[F.special(F.variableName),F.macroName],color:"#256"},{tag:F.definition(F.propertyName),color:"#00c"},{tag:F.comment,color:"#940"},{tag:F.invalid,color:"#f00"}]);var DO=Object.create(null),Z2=[Dr.none];var eT=[],tT=Object.create(null),OO=Object.create(null);for(let[t,e]of[["variable","variableName"],["variable-2","variableName.special"],["string-2","string.special"],["def","variableName.definition"],["tag","tagName"],["attribute","attributeName"],["type","typeName"],["builtin","variableName.standard"],["qualifier","modifier"],["error","invalid"],["header","heading"],["property","propertyName"]])OO[t]=BO(DO,e);function k_(t,e){eT.indexOf(t)>-1||(eT.push(t),console.warn(e))}function BO(t,e){let r=[];for(let a of e.split(" ")){let l=[];for(let c of a.split(".")){let u=t[c]||F[c];u?typeof u=="function"?l.length?l=l.map(u):k_(c,`Modifier ${c} used at start of tag`):l.length?k_(c,`Tag ${c} used as modifier`):l=Array.isArray(u)?u:[u]:k_(c,`Unknown highlighting tag ${c}`)}for(let c of l)r.push(c)}if(!r.length)return 0;let i=e.replace(/ /g,"_"),s=i+" "+r.map(a=>a.id),n=tT[s];if(n)return n.id;let o=tT[s]=Dr.define({id:Z2.length,name:i,props:[ek({[i]:r})]});return Z2.push(o),o.id}var FJ={rtl:_t.mark({class:"cm-iso",inclusive:!0,attributes:{dir:"rtl"},bidiIsolate:Ot.RTL}),ltr:_t.mark({class:"cm-iso",inclusive:!0,attributes:{dir:"ltr"},bidiIsolate:Ot.LTR}),auto:_t.mark({class:"cm-iso",inclusive:!0,attributes:{dir:"auto"},bidiIsolate:null})};var Zd=t=>{var{theme:e,settings:r={},styles:i=[]}=t,s={".cm-gutters":{}},n={};r.background&&(n.backgroundColor=r.background),r.backgroundImage&&(n.backgroundImage=r.backgroundImage),r.foreground&&(n.color=r.foreground),r.fontSize&&(n.fontSize=r.fontSize),(r.background||r.foreground)&&(s["&"]=n),r.fontFamily&&(s["&.cm-editor .cm-scroller"]={fontFamily:r.fontFamily}),r.gutterBackground&&(s[".cm-gutters"].backgroundColor=r.gutterBackground),r.gutterForeground&&(s[".cm-gutters"].color=r.gutterForeground),r.gutterBorder&&(s[".cm-gutters"].borderRightColor=r.gutterBorder),r.caret&&(s[".cm-content"]={caretColor:r.caret},s[".cm-cursor, .cm-dropCursor"]={borderLeftColor:r.caret});var o={};r.gutterActiveForeground&&(o.color=r.gutterActiveForeground),r.lineHighlight&&(s[".cm-activeLine"]={backgroundColor:r.lineHighlight},o.backgroundColor=r.lineHighlight),s[".cm-activeLineGutter"]=o,r.selection&&(s["&.cm-focused .cm-selectionBackground, & .cm-line::selection, & .cm-selectionLayer .cm-selectionBackground, .cm-content ::selection"]={background:r.selection+" !important"}),r.selectionMatch&&(s["& .cm-selectionMatch"]={backgroundColor:r.selectionMatch});var a=Ce.theme(s,{dark:e==="dark"}),l=Fa.define(i),c=[a,nT(l)];return c};var IO={background:"#ffffff",foreground:"#383a42",caret:"#000",selection:"#add6ff",selectionMatch:"#a8ac94",lineHighlight:"#99999926",gutterBackground:"#fff",gutterForeground:"#237893",gutterActiveForeground:"#0b216f",fontFamily:'Menlo, Monaco, Consolas, "Andale Mono", "Ubuntu Mono", "Courier New", monospace'},NO=[{tag:[F.keyword,F.operatorKeyword,F.modifier,F.color,F.constant(F.name),F.standard(F.name),F.standard(F.tagName),F.special(F.brace),F.atom,F.bool,F.special(F.variableName)],color:"#0000ff"},{tag:[F.moduleKeyword,F.controlKeyword],color:"#af00db"},{tag:[F.name,F.deleted,F.character,F.macroName,F.propertyName,F.variableName,F.labelName,F.definition(F.name)],color:"#0070c1"},{tag:F.heading,fontWeight:"bold",color:"#0070c1"},{tag:[F.typeName,F.className,F.tagName,F.number,F.changed,F.annotation,F.self,F.namespace],color:"#267f99"},{tag:[F.function(F.variableName),F.function(F.propertyName)],color:"#795e26"},{tag:[F.number],color:"#098658"},{tag:[F.operator,F.punctuation,F.separator,F.url,F.escape,F.regexp],color:"#383a42"},{tag:[F.regexp],color:"#af00db"},{tag:[F.special(F.string),F.processingInstruction,F.string,F.inserted],color:"#a31515"},{tag:[F.angleBracket],color:"#383a42"},{tag:F.strong,fontWeight:"bold"},{tag:F.emphasis,fontStyle:"italic"},{tag:F.strikethrough,textDecoration:"line-through"},{tag:[F.meta,F.comment],color:"#008000"},{tag:F.link,color:"#4078f2",textDecoration:"underline"},{tag:F.invalid,color:"#e45649"}];function M_(t){var{theme:e="light",settings:r={},styles:i=[]}=t||{};return Zd({theme:e,settings:Se({},IO,r),styles:[...NO,...i]})}var GJ=M_();var FO={background:"#1e1e1e",foreground:"#9cdcfe",caret:"#c6c6c6",selection:"#6199ff2f",selectionMatch:"#72a1ff59",lineHighlight:"#ffffff0f",gutterBackground:"#1e1e1e",gutterForeground:"#838383",gutterActiveForeground:"#fff",fontFamily:'Menlo, Monaco, Consolas, "Andale Mono", "Ubuntu Mono", "Courier New", monospace'},HO=[{tag:[F.keyword,F.operatorKeyword,F.modifier,F.color,F.constant(F.name),F.standard(F.name),F.standard(F.tagName),F.special(F.brace),F.atom,F.bool,F.special(F.variableName)],color:"#569cd6"},{tag:[F.controlKeyword,F.moduleKeyword],color:"#c586c0"},{tag:[F.name,F.deleted,F.character,F.macroName,F.propertyName,F.variableName,F.labelName,F.definition(F.name)],color:"#9cdcfe"},{tag:F.heading,fontWeight:"bold",color:"#9cdcfe"},{tag:[F.typeName,F.className,F.tagName,F.number,F.changed,F.annotation,F.self,F.namespace],color:"#4ec9b0"},{tag:[F.function(F.variableName),F.function(F.propertyName)],color:"#dcdcaa"},{tag:[F.number],color:"#b5cea8"},{tag:[F.operator,F.punctuation,F.separator,F.url,F.escape,F.regexp],color:"#d4d4d4"},{tag:[F.regexp],color:"#d16969"},{tag:[F.special(F.string),F.processingInstruction,F.string,F.inserted],color:"#ce9178"},{tag:[F.angleBracket],color:"#808080"},{tag:F.strong,fontWeight:"bold"},{tag:F.emphasis,fontStyle:"italic"},{tag:F.strikethrough,textDecoration:"line-through"},{tag:[F.meta,F.comment],color:"#6a9955"},{tag:F.link,color:"#6a9955",textDecoration:"underline"},{tag:F.invalid,color:"#ff0000"}];function A_(t){var{theme:e="dark",settings:r={},styles:i=[]}=t||{};return Zd({theme:e,settings:Se({},FO,r),styles:[...HO,...i]})}var QJ=A_();function sT(t){let e=window.getComputedStyle(document.body);return Ai({palette:{mode:t,text:{primary:e.getPropertyValue("--vscode-foreground"),secondary:e.getPropertyValue("--vscode-descriptionForeground")},primary:{main:e.getPropertyValue("--vscode-button-background")},error:{main:e.getPropertyValue("--vscode-editorError-foreground")},warning:{main:e.getPropertyValue("--vscode-editorWarning-foreground")},info:{main:e.getPropertyValue("--vscode-editorInfo-foreground")},success:{main:e.getPropertyValue("--vscode-debugIcon-startForeground")},textSecondary:{main:e.getPropertyValue("--vscode-descriptionForeground")}},typography:{allVariants:{fontFamily:e.getPropertyValue("--vscode-font-family")}},components:{MuiCard:{variants:[{props:{variant:"outlined"},style:{width:"35em",backgroundColor:e.getPropertyValue("--vscode-editor-inactiveSelectionBackground")}}]},MuiTypography:{variants:[{props:{variant:"h4"},style:{fontSize:"1em",fontWeight:"650",color:e.getPropertyValue("--vscode-foreground")}},{props:{variant:"h5"},style:{fontSize:"2.3em",fontWeight:"650",color:e.getPropertyValue("--vscode-foreground")}},{props:{variant:"h6"},style:{fontSize:"1.5em",fontWeight:"600",color:e.getPropertyValue("--vscode-foreground")}},{props:{variant:"body1"},style:{fontSize:"0.9em",color:e.getPropertyValue("--vscode-foreground")}},{props:{variant:"body2"},style:{color:e.getPropertyValue("--vscode-descriptionForeground")}}]},MuiAccordion:{variants:[{props:{className:"accordion"},style:{width:"100%",color:e.getPropertyValue("--vscode-editor-foreground"),backgroundColor:e.getPropertyValue("--vscode-editor-background")}}]},MuiSelect:{variants:[{props:{className:"selectFolder"},style:{width:"100%",color:e.getPropertyValue("--vscode-editor-foreground"),backgroundColor:e.getPropertyValue("--vscode-editor-background")}}]},MuiButton:{defaultProps:{style:{whiteSpace:"nowrap",backgroundColor:e.getPropertyValue("--vscode-button-background"),color:e.getPropertyValue("--vscode-button-foreground")}}},MuiPaper:{variants:[{props:{variant:"elevation"},style:{backgroundColor:e.getPropertyValue("--vscode-editor-background")}}]}}})}var aQ=A_({settings:{background:"var(--vscode-editor-background)",foreground:"var(--vscode-editor-foreground)",caret:"var(--vscode-editorCursor-foreground)",selection:"var(--vscode-editor-selectionBackground)",selectionMatch:"var(--vscode-editor-findMatchBackground)",lineHighlight:"var(--vscode-editor-lineHighlightBackground)",gutterBackground:"var(--vscode-editorGutter-background)",gutterForeground:"var(--vscode-editorHint-foreground)",fontFamily:"var(--vscode-editor-font-family)",fontSize:"var(--vscode-editor-font-size)"}}),lQ=M_({settings:{background:"var(--vscode-editor-background)",foreground:"var(--vscode-editor-foreground)",caret:"var(--vscode-editorCursor-foreground)",selection:"var(--vscode-editor-selectionBackground)",selectionMatch:"var(--vscode-editor-findMatchBackground)",lineHighlight:"var(--vscode-editor-lineHighlightBackground)",gutterBackground:"var(--vscode-editorGutter-background)",gutterForeground:"var(--vscode-editorHint-foreground)",fontFamily:"var(--vscode-editor-font-family)",fontSize:"var(--vscode-editor-font-size)"}});var Ee=K(Q()),uT=K(aT()),fT=K(lT()),dT=K(cT()),pT=K(hT());var zO=t=>Ee.default.createElement(Hf,{variant:"outlined",sx:{borderRadius:"6px",backgroundColor:"var(--vscode-editor-background)",borderColor:"var(--vscode-menu-border)",boxShadow:"0px 0px 8px var(--vscode-widget-shadow)"}},Ee.default.createElement(Xt,{direction:"column",minWidth:"200px",marginX:"4px",marginY:"3px"},Ee.default.createElement(Xs,{variant:"text",onClick:t.onCopyHandler,sx:{width:"100%",textTransform:"none","&:hover":{backgroundColor:"color-mix(in srgb, var(--vscode-button-background) 50%, black)"},paddingY:"4px"}},Ee.default.createElement(Xt,{direction:"row",justifyContent:"space-between",marginX:"13px",style:{width:"100%"}},Ee.default.createElement(Ar,{variant:"body1"},"Copy"),Ee.default.createElement(Ar,{variant:"body1"},"Ctrl+Shift+C"))),Ee.default.createElement(Xs,{variant:"text",onClick:t.onSelectAllHandler,sx:{width:"100%",textTransform:"none","&:hover":{backgroundColor:"color-mix(in srgb, var(--vscode-button-background) 50%, black)"},paddingY:"4px"}},Ee.default.createElement(Xt,{direction:"row",justifyContent:"space-between",marginX:"13px",style:{width:"100%"}},Ee.default.createElement(Ar,{variant:"body1"},"Select All"),Ee.default.createElement(Ar,{variant:"body1"},"Ctrl+Shift+A"))),Ee.default.createElement(Xs,{variant:"text",onClick:t.onPasteHandler,sx:{width:"100%",textTransform:"none","&:hover":{backgroundColor:"color-mix(in srgb, var(--vscode-button-background) 50%, black)"},paddingY:"4px"}},Ee.default.createElement(Xt,{direction:"row",justifyContent:"space-between",marginX:"13px",style:{width:"100%"}},Ee.default.createElement(Ar,{variant:"body1"},"Paste"),Ee.default.createElement(Ar,{variant:"body1"},"Ctrl+Shift+V"))),Ee.default.createElement(Xs,{variant:"text",onClick:t.onClearHandler,sx:{width:"100%",textTransform:"none","&:hover":{backgroundColor:"color-mix(in srgb, var(--vscode-button-background) 50%, black)"},paddingY:"4px"}},Ee.default.createElement(Xt,{direction:"row",justifyContent:"flex-start",marginX:"13px",style:{width:"100%"}},Ee.default.createElement(Ar,{variant:"body1"},"Clear"))))),mT=t=>{let e=Ee.default.useRef(null),[r,i]=Ee.default.useState(!1),s=Ee.default.useRef(null),n=_=>{_.preventDefault(),i(!0);let{pageX:S,pageY:b}=_;s.current.style.left=`${S}px`,s.current.style.top=`${b}px`;let C=()=>{i(!1)};document.addEventListener("click",C)},o=()=>{navigator.clipboard.writeText(g.getSelection()),i(!1)},a=()=>{navigator.clipboard.readText().then(_=>{g.paste(_)}),i(!1)},l=()=>{g.selectAll(),i(!1)},c=()=>{g.clear(),window.vscodeApi.postMessage({kind:"termClear",data:{uuid:t.uuid}})},u=Ee.default.useMemo(()=>new fT.FitAddon,[]);function p(_,S){window.vscodeApi.postMessage({kind:"openExternal",data:{uuid:t.uuid,url:S}})}let[g]=Ee.default.useState(()=>{let _=new uT.Terminal;return _.loadAddon(new dT.WebLinksAddon(p)),_.loadAddon(new pT.WebglAddon),_.loadAddon(u),_.attachCustomKeyEventHandler(S=>{if(S.shiftKey&&S.ctrlKey){if(S.code==="KeyC"&&g.hasSelection)return navigator.clipboard.writeText(g.getSelection()),S.stopPropagation(),!1;if(S.code==="KeyA")return g.selectAll(),S.stopPropagation(),!1;if(S.code==="KeyV")return Ks(()=>{navigator.clipboard.readText().then(b=>{g.paste(b)})}),S.stopPropagation(),!1}return!0}),_});Ee.default.useEffect(()=>{let _=S=>{S.preventDefault()};return window.addEventListener("contextmenu",_),window.removeEventListener("contextmenu",_)});let m,h=(_,S)=>{let b=window.getComputedStyle(document.body),C={foreground:b.getPropertyValue("--vscode-terminal-foreground"),background:b.getPropertyValue("--vscode-terminal-background")||b.getPropertyValue("--vscode-panel-background"),cursor:b.getPropertyValue("--vscode-terminalCursor-foreground")||b.getPropertyValue("--vscode-terminal-foreground"),cursorAccent:b.getPropertyValue("--vscode-terminalCursor-background")||void 0,selectionBackground:b.getPropertyValue("--vscode-terminal-selectionBackground"),black:b.getPropertyValue("--vscode-terminal-ansiBlack"),red:b.getPropertyValue("--vscode-terminal-ansiRed"),green:b.getPropertyValue("--vscode-terminal-ansiGreen"),yellow:b.getPropertyValue("--vscode-terminal-ansiYellow"),blue:b.getPropertyValue("--vscode-terminal-ansiBlue"),magenta:b.getPropertyValue("--vscode-terminal-ansiMagenta"),cyan:b.getPropertyValue("--vscode-terminal-ansiCyan"),white:b.getPropertyValue("--vscode-terminal-ansiWhite"),brightBlack:b.getPropertyValue("--vscode-terminal-ansiBrightBlack"),brightRed:b.getPropertyValue("--vscode-terminal-ansiBrightRed"),brightGreen:b.getPropertyValue("--vscode-terminal-ansiBrightGreen"),brightYellow:b.getPropertyValue("--vscode-terminal-ansiBrightYellow"),brightBlue:b.getPropertyValue("--vscode-terminal-ansiBrightBlue"),brightMagenta:b.getPropertyValue("--vscode-terminal-ansiBrightMagenta"),brightCyan:b.getPropertyValue("--vscode-terminal-ansiBrightCyan"),brightWhite:b.getPropertyValue("--vscode-terminal-ansiBrightWhite")};g.options.theme=C,g.options.fontSize=S;let y=_.split(",").map(w=>w.trim());y.length&&y[0]&&(g.options.fontFamily=y[0])};Ee.default.useEffect(()=>(g&&(g.open(e.current),h(t.initialFontFamily,t.initialFontSize),u.fit()),()=>{}),[g,e]),Ee.default.useEffect(()=>(window.vscodeApi.postMessage({kind:"termInit",data:{uuid:t.uuid}}),()=>{window.vscodeApi.postMessage({kind:"termSuspend",data:{uuid:t.uuid}})}),[]),Ee.default.useEffect(()=>{let _=g.onData(S=>{window.vscodeApi.postMessage({kind:"input",data:{uuid:t.uuid,data:S}})});return()=>{_.dispose()}});let d=function(_){_.data.data.uuid===t.uuid?_.data.kind==="termInit"?g.write(_.data.data.serializedOutput):_.data.kind==="termOutput"&&g.write(_.data.data.output):_.data.kind==="setTheme"&&h(_.data.data.fontFamily,_.data.data.fontSize)};Ee.default.useEffect(()=>(window.addEventListener("message",d),()=>{window.removeEventListener("message",d)}),[]);let v=function(){let _=u.proposeDimensions();window.vscodeApi.postMessage({kind:"resize",data:{uuid:t.uuid,..._}}),u.fit()},f=function(_){m&&clearTimeout(m),m=setTimeout(v,200)};return Ee.default.useEffect(()=>(addEventListener("resize",f),()=>{removeEventListener("resize",f)}),[u]),Ee.default.createElement(wa,{onContextMenu:n,marginY:"8px",marginX:"16px",width:"100%",height:"100%",overflow:"scroll"},Ee.default.createElement("div",{style:{zIndex:1e3,position:"absolute",display:r?"block":"none"},ref:s},Ee.default.createElement(zO,{onCopyHandler:o,onSelectAllHandler:l,onClearHandler:c,onPasteHandler:a})),Ee.default.createElement("div",{name:"terminal-instance",style:{width:"100%",height:"100%",display:"flex",flexFlow:"column",overflow:"hidden"},ref:e}))};var $O=t=>{let e=ye("div")(({theme:r})=>({...r.typography.button,textTransform:"none",fontSize:"var(--vscode-font-size)"}));return ke.default.createElement(Xt,{color:"inherit",sx:{paddingLeft:"10px",paddingBottom:"0px",paddingTop:"0px"},direction:"row",spacing:1,alignItems:"center",justifyContent:"space-evenly"},ke.default.createElement(Zw,{sx:{fontSize:"var(--vscode-font-size)"},color:"inherit"}),ke.default.createElement(e,{color:"inherit"},t.name),ke.default.createElement(Jw,{sx:{fontSize:"var(--vscode-font-size)"},color:"inherit",onClick:r=>{t.closeTab()}}))},gT=()=>{let[t,e]=ke.default.useState("dark"),r=ke.default.useRef("monospace"),i=ke.default.useRef(16),s=ke.default.useMemo(()=>sT(t),[t]),[n,o]=ke.default.useState([]),[a,l]=ke.default.useState(0),[c,u]=ke.default.useState(0),[p,g]=ke.default.useState(!1);function m(){n.length===0?l(0):(a>=n.length||n.length>c)&&l(n.length-1),u(n.length)}let h=function(S){window.vscodeApi.postMessage({kind:"closeTerminal",data:{uuid:S}}),o(b=>{let C=b.findIndex(y=>y.terminal.props.uuid===S);return[...b.slice(0,C),...b.slice(C+1,b.length)]})},d=function(S){if(S.data.kind==="createTerminal"){let b=S.data.data.uuid;o([...n,{name:S.data.data.name,terminal:ke.default.createElement(mT,{uuid:b,initialFontFamily:r.current,initialFontSize:i.current})}]),g(S.data.data.isKnative)}else if(S.data.kind==="termExit"){let b=S.data.data.uuid;h(b)}else if(S.data.kind==="setTheme")e(S.data.data.kind===1?"light":"dark"),r.current=S.data.data.fontFamily,i.current=S.data.data.fontSize;else if(S.data.kind==="switchToTerminal"){for(let b=0;b<n.length;b++)if(n[b].terminal.props.uuid===S.data.data.uuid){l(b);break}}else S.data.kind==="iconCheck"&&g(S.data.data.isKnative)};ke.default.useEffect(()=>{m()},[n]),ke.default.useEffect(()=>(window.addEventListener("message",d),()=>{window.removeEventListener("message",d)}),[n,t,a]),ke.default.useEffect(()=>(window.vscodeApi.postMessage({kind:"termMuxUp",data:void 0}),()=>{}));function v(S,b){l(b)}function f(S){let b=n[S];h(b.terminal.props.uuid)}function _(S,b){S.button===1&&f(b)}return n.length?ke.default.createElement(Yf,{theme:s},ke.default.createElement(yc,{value:`${a}`},ke.default.createElement(Xt,{sx:{width:"100%"}},ke.default.createElement(wa,{sx:{borderBottom:1,borderColor:"divider"}},ke.default.createElement(Xt,{direction:"row"},ke.default.createElement(rd,{onChange:v,sx:{minHeight:"36px"}},ke.default.createElement(Xt,{justifyContent:"center",width:"100%"},ke.default.createElement(Kn,{component:p?KC:nv,htmlColor:p?"inherit":"red",inheritViewBox:!0,sx:{paddingLeft:"16px",paddingRight:"16px",fontSize:"calc(var(--vscode-font-size) * 1.5)"}})),n.map((S,b)=>ke.default.createElement(sd,{sx:{padding:"0px",minHeight:"36px"},label:ke.default.createElement($O,{name:S.name,closeTab:()=>{f(b)}}),value:`${b}`,key:S.terminal.props.uuid,onAuxClick:C=>{_(C,b)}}))))),n.map((S,b)=>ke.default.createElement(id,{sx:{margin:"0px",padding:"0px",flex:"1",height:"calc(100% - 36px)"},value:`${b}`,key:S.terminal.props.uuid},S.terminal))))):ke.default.createElement(Xt,{justifyContent:"center",width:"100%",direction:"column"},ke.default.createElement(Xt,{direction:"row",justifyContent:"center",alignItems:"center"},ke.default.createElement(Kn,{component:nv,htmlColor:"red",inheritViewBox:!0,sx:{paddingLeft:"16px",paddingRight:"16px",fontSize:"calc(var(--vscode-font-size) * 1.5)"}}),ke.default.createElement(Ar,null,"No terminals opened.")),ke.default.createElement(Xt,{direction:"row",justifyContent:"center",alignItems:"center"},ke.default.createElement(Ar,{variant:"caption"},"Terminals related to operations performed on the OpenShift cluster will appear here")))};var ny=K(Q());var pi=K(Q(),1),jO=(0,pi.createContext)(null),I_={didCatch:!1,error:null},np=class extends pi.Component{constructor(e){super(e),this.resetErrorBoundary=this.resetErrorBoundary.bind(this),this.state=I_}static getDerivedStateFromError(e){return{didCatch:!0,error:e}}resetErrorBoundary(){let{error:e}=this.state;if(e!==null){for(var r,i,s=arguments.length,n=new Array(s),o=0;o<s;o++)n[o]=arguments[o];(r=(i=this.props).onReset)===null||r===void 0||r.call(i,{args:n,reason:"imperative-api"}),this.setState(I_)}}componentDidCatch(e,r){var i,s;(i=(s=this.props).onError)===null||i===void 0||i.call(s,e,r)}componentDidUpdate(e,r){let{didCatch:i}=this.state,{resetKeys:s}=this.props;if(i&&r.error!==null&&WO(e.resetKeys,s)){var n,o;(n=(o=this.props).onReset)===null||n===void 0||n.call(o,{next:s,prev:e.resetKeys,reason:"keys"}),this.setState(I_)}}render(){let{children:e,fallbackRender:r,FallbackComponent:i,fallback:s}=this.props,{didCatch:n,error:o}=this.state,a=e;if(n){let l={error:o,resetErrorBoundary:this.resetErrorBoundary};if(typeof r=="function")a=r(l);else if(i)a=(0,pi.createElement)(i,l);else if(s!==void 0)a=s;else throw o}return(0,pi.createElement)(jO.Provider,{value:{didCatch:n,error:o,resetErrorBoundary:this.resetErrorBoundary}},a)}};function WO(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];return t.length!==e.length||t.some((r,i)=>!Object.is(r,e[i]))}var VO=["checked","disabled","error","focused","focusVisible","required","expanded","selected"];function sp(t={}){let{disableGlobal:e=!1,productionPrefix:r="jss",seed:i=""}=t,s=i===""?"":`${i}-`,n=0,o=()=>(n+=1,n);return(a,l)=>{let c=l.options.name;if(c&&c.startsWith("Mui")&&!l.options.link&&!e){if(VO.includes(a.key))return`Mui-${a.key}`;let p=`${s}${c}-${a.key}`;return!l.options.theme[oc]||i!==""?p:`${p}-${o()}`}return`${s}${r}${o()}`}}function Jc(t){return t}var vT=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},UO=(typeof window>"u"?"undefined":vT(window))==="object"&&(typeof document>"u"?"undefined":vT(document))==="object"&&document.nodeType===9,uo=UO;function fo(t){"@babel/helpers - typeof";return fo=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},fo(t)}function _T(t,e){if(fo(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var i=r.call(t,e||"default");if(fo(i)!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function yT(t){var e=_T(t,"string");return fo(e)=="symbol"?e:e+""}function ST(t,e){for(var r=0;r<e.length;r++){var i=e[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,yT(i.key),i)}}function N_(t,e,r){return e&&ST(t.prototype,e),r&&ST(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}var KO={}.constructor;function z_(t){if(t==null||typeof t!="object")return t;if(Array.isArray(t))return t.map(z_);if(t.constructor!==KO)return t;var e={};for(var r in t)e[r]=z_(t[r]);return e}function op(t,e,r){t===void 0&&(t="unnamed");var i=r.jss,s=z_(e),n=i.plugins.onCreateRule(t,s,r);return n||(t[0],null)}var xT=function(e,r){for(var i="",s=0;s<e.length&&e[s]!=="!important";s++)i&&(i+=r),i+=e[s];return i},as=function(e){if(!Array.isArray(e))return e;var r="";if(Array.isArray(e[0]))for(var i=0;i<e.length&&e[i]!=="!important";i++)r&&(r+=", "),r+=xT(e[i]," ");else r=xT(e,", ");return e[e.length-1]==="!important"&&(r+=" !important"),r};function Ha(t){return t&&t.format===!1?{linebreak:"",space:""}:{linebreak:`
`,space:" "}}function Qc(t,e){for(var r="",i=0;i<e;i++)r+="  ";return r+t}function eh(t,e,r){r===void 0&&(r={});var i="";if(!e)return i;var s=r,n=s.indent,o=n===void 0?0:n,a=e.fallbacks;r.format===!1&&(o=-1/0);var l=Ha(r),c=l.linebreak,u=l.space;if(t&&o++,a)if(Array.isArray(a))for(var p=0;p<a.length;p++){var g=a[p];for(var m in g){var h=g[m];h!=null&&(i&&(i+=c),i+=Qc(m+":"+u+as(h)+";",o))}}else for(var d in a){var v=a[d];v!=null&&(i&&(i+=c),i+=Qc(d+":"+u+as(v)+";",o))}for(var f in e){var _=e[f];_!=null&&f!=="fallbacks"&&(i&&(i+=c),i+=Qc(f+":"+u+as(_)+";",o))}return!i&&!r.allowEmpty||!t?i:(o--,i&&(i=""+c+i+c),Qc(""+t+u+"{"+i,o)+Qc("}",o))}var GO=/([[\].#*$><+~=|^:(),"'`\s])/g,bT=typeof CSS<"u"&&CSS.escape,K_=(function(t){return bT?bT(t):t.replace(GO,"\\$1")}),MT=(function(){function t(r,i,s){this.type="style",this.isProcessed=!1;var n=s.sheet,o=s.Renderer;this.key=r,this.options=s,this.style=i,n?this.renderer=n.renderer:o&&(this.renderer=new o)}var e=t.prototype;return e.prop=function(i,s,n){if(s===void 0)return this.style[i];var o=n?n.force:!1;if(!o&&this.style[i]===s)return this;var a=s;(!n||n.process!==!1)&&(a=this.options.jss.plugins.onChangeValue(s,i,this));var l=a==null||a===!1,c=i in this.style;if(l&&!c&&!o)return this;var u=l&&c;if(u?delete this.style[i]:this.style[i]=a,this.renderable&&this.renderer)return u?this.renderer.removeProperty(this.renderable,i):this.renderer.setProperty(this.renderable,i,a),this;var p=this.options.sheet;return p&&p.attached,this},t})(),$_=(function(t){pc(e,t);function e(i,s,n){var o;o=t.call(this,i,s,n)||this;var a=n.selector,l=n.scoped,c=n.sheet,u=n.generateId;return a?o.selectorText=a:l!==!1&&(o.id=u(mc(mc(o)),c),o.selectorText="."+K_(o.id)),o}var r=e.prototype;return r.applyTo=function(s){var n=this.renderer;if(n){var o=this.toJSON();for(var a in o)n.setProperty(s,a,o[a])}return this},r.toJSON=function(){var s={};for(var n in this.style){var o=this.style[n];typeof o!="object"?s[n]=o:Array.isArray(o)&&(s[n]=as(o))}return s},r.toString=function(s){var n=this.options.sheet,o=n?n.options.link:!1,a=o?Se({},s,{allowEmpty:!0}):s;return eh(this.selectorText,this.style,a)},N_(e,[{key:"selector",set:function(s){if(s!==this.selectorText){this.selectorText=s;var n=this.renderer,o=this.renderable;if(!(!o||!n)){var a=n.setSelector(o,s);a||n.replaceRule(o,this)}}},get:function(){return this.selectorText}}]),e})(MT),qO={onCreateRule:function(e,r,i){return e[0]==="@"||i.parent&&i.parent.type==="keyframes"?null:new $_(e,r,i)}},F_={indent:1,children:!0},YO=/@([\w-]+)/,XO=(function(){function t(r,i,s){this.type="conditional",this.isProcessed=!1,this.key=r;var n=r.match(YO);this.at=n?n[1]:"unknown",this.query=s.name||"@"+this.at,this.options=s,this.rules=new th(Se({},s,{parent:this}));for(var o in i)this.rules.add(o,i[o]);this.rules.process()}var e=t.prototype;return e.getRule=function(i){return this.rules.get(i)},e.indexOf=function(i){return this.rules.indexOf(i)},e.addRule=function(i,s,n){var o=this.rules.add(i,s,n);return o?(this.options.jss.plugins.onProcessRule(o),o):null},e.replaceRule=function(i,s,n){var o=this.rules.replace(i,s,n);return o&&this.options.jss.plugins.onProcessRule(o),o},e.toString=function(i){i===void 0&&(i=F_);var s=Ha(i),n=s.linebreak;if(i.indent==null&&(i.indent=F_.indent),i.children==null&&(i.children=F_.children),i.children===!1)return this.query+" {}";var o=this.rules.toString(i);return o?this.query+" {"+n+o+n+"}":""},t})(),JO=/@container|@media|@supports\s+/,QO={onCreateRule:function(e,r,i){return JO.test(e)?new XO(e,r,i):null}},H_={indent:1,children:!0},ZO=/@keyframes\s+([\w-]+)/,j_=(function(){function t(r,i,s){this.type="keyframes",this.at="@keyframes",this.isProcessed=!1;var n=r.match(ZO);n&&n[1]?this.name=n[1]:this.name="noname",this.key=this.type+"-"+this.name,this.options=s;var o=s.scoped,a=s.sheet,l=s.generateId;this.id=o===!1?this.name:K_(l(this,a)),this.rules=new th(Se({},s,{parent:this}));for(var c in i)this.rules.add(c,i[c],Se({},s,{parent:this}));this.rules.process()}var e=t.prototype;return e.toString=function(i){i===void 0&&(i=H_);var s=Ha(i),n=s.linebreak;if(i.indent==null&&(i.indent=H_.indent),i.children==null&&(i.children=H_.children),i.children===!1)return this.at+" "+this.id+" {}";var o=this.rules.toString(i);return o&&(o=""+n+o+n),this.at+" "+this.id+" {"+o+"}"},t})(),e4=/@keyframes\s+/,t4=/\$([\w-]+)/g,W_=function(e,r){return typeof e=="string"?e.replace(t4,function(i,s){return s in r?r[s]:i}):e},wT=function(e,r,i){var s=e[r],n=W_(s,i);n!==s&&(e[r]=n)},r4={onCreateRule:function(e,r,i){return typeof e=="string"&&e4.test(e)?new j_(e,r,i):null},onProcessStyle:function(e,r,i){return r.type!=="style"||!i||("animation-name"in e&&wT(e,"animation-name",i.keyframes),"animation"in e&&wT(e,"animation",i.keyframes)),e},onChangeValue:function(e,r,i){var s=i.options.sheet;if(!s)return e;switch(r){case"animation":return W_(e,s.keyframes);case"animation-name":return W_(e,s.keyframes);default:return e}}},i4=(function(t){pc(e,t);function e(){return t.apply(this,arguments)||this}var r=e.prototype;return r.toString=function(s){var n=this.options.sheet,o=n?n.options.link:!1,a=o?Se({},s,{allowEmpty:!0}):s;return eh(this.key,this.style,a)},e})(MT),n4={onCreateRule:function(e,r,i){return i.parent&&i.parent.type==="keyframes"?new i4(e,r,i):null}},s4=(function(){function t(r,i,s){this.type="font-face",this.at="@font-face",this.isProcessed=!1,this.key=r,this.style=i,this.options=s}var e=t.prototype;return e.toString=function(i){var s=Ha(i),n=s.linebreak;if(Array.isArray(this.style)){for(var o="",a=0;a<this.style.length;a++)o+=eh(this.at,this.style[a]),this.style[a+1]&&(o+=n);return o}return eh(this.at,this.style,i)},t})(),o4=/@font-face/,a4={onCreateRule:function(e,r,i){return o4.test(e)?new s4(e,r,i):null}},l4=(function(){function t(r,i,s){this.type="viewport",this.at="@viewport",this.isProcessed=!1,this.key=r,this.style=i,this.options=s}var e=t.prototype;return e.toString=function(i){return eh(this.key,this.style,i)},t})(),c4={onCreateRule:function(e,r,i){return e==="@viewport"||e==="@-ms-viewport"?new l4(e,r,i):null}},h4=(function(){function t(r,i,s){this.type="simple",this.isProcessed=!1,this.key=r,this.value=i,this.options=s}var e=t.prototype;return e.toString=function(i){if(Array.isArray(this.value)){for(var s="",n=0;n<this.value.length;n++)s+=this.key+" "+this.value[n]+";",this.value[n+1]&&(s+=`
`);return s}return this.key+" "+this.value+";"},t})(),u4={"@charset":!0,"@import":!0,"@namespace":!0},f4={onCreateRule:function(e,r,i){return e in u4?new h4(e,r,i):null}},CT=[qO,QO,r4,n4,a4,c4,f4],d4={process:!0},kT={force:!0,process:!0},th=(function(){function t(r){this.map={},this.raw={},this.index=[],this.counter=0,this.options=r,this.classes=r.classes,this.keyframes=r.keyframes}var e=t.prototype;return e.add=function(i,s,n){var o=this.options,a=o.parent,l=o.sheet,c=o.jss,u=o.Renderer,p=o.generateId,g=o.scoped,m=Se({classes:this.classes,parent:a,sheet:l,jss:c,Renderer:u,generateId:p,scoped:g,name:i,keyframes:this.keyframes,selector:void 0},n),h=i;i in this.raw&&(h=i+"-d"+this.counter++),this.raw[h]=s,h in this.classes&&(m.selector="."+K_(this.classes[h]));var d=op(h,s,m);if(!d)return null;this.register(d);var v=m.index===void 0?this.index.length:m.index;return this.index.splice(v,0,d),d},e.replace=function(i,s,n){var o=this.get(i),a=this.index.indexOf(o);o&&this.remove(o);var l=n;return a!==-1&&(l=Se({},n,{index:a})),this.add(i,s,l)},e.get=function(i){return this.map[i]},e.remove=function(i){this.unregister(i),delete this.raw[i.key],this.index.splice(this.index.indexOf(i),1)},e.indexOf=function(i){return this.index.indexOf(i)},e.process=function(){var i=this.options.jss.plugins;this.index.slice(0).forEach(i.onProcessRule,i)},e.register=function(i){this.map[i.key]=i,i instanceof $_?(this.map[i.selector]=i,i.id&&(this.classes[i.key]=i.id)):i instanceof j_&&this.keyframes&&(this.keyframes[i.name]=i.id)},e.unregister=function(i){delete this.map[i.key],i instanceof $_?(delete this.map[i.selector],delete this.classes[i.key]):i instanceof j_&&delete this.keyframes[i.name]},e.update=function(){var i,s,n;if(typeof(arguments.length<=0?void 0:arguments[0])=="string"?(i=arguments.length<=0?void 0:arguments[0],s=arguments.length<=1?void 0:arguments[1],n=arguments.length<=2?void 0:arguments[2]):(s=arguments.length<=0?void 0:arguments[0],n=arguments.length<=1?void 0:arguments[1],i=null),i)this.updateOne(this.get(i),s,n);else for(var o=0;o<this.index.length;o++)this.updateOne(this.index[o],s,n)},e.updateOne=function(i,s,n){n===void 0&&(n=d4);var o=this.options,a=o.jss.plugins,l=o.sheet;if(i.rules instanceof t){i.rules.update(s,n);return}var c=i.style;if(a.onUpdate(s,i,l,n),n.process&&c&&c!==i.style){a.onProcessStyle(i.style,i,l);for(var u in i.style){var p=i.style[u],g=c[u];p!==g&&i.prop(u,p,kT)}for(var m in c){var h=i.style[m],d=c[m];h==null&&h!==d&&i.prop(m,null,kT)}}},e.toString=function(i){for(var s="",n=this.options.sheet,o=n?n.options.link:!1,a=Ha(i),l=a.linebreak,c=0;c<this.index.length;c++){var u=this.index[c],p=u.toString(i);!p&&!o||(s&&(s+=l),s+=p)}return s},t})(),AT=(function(){function t(r,i){this.attached=!1,this.deployed=!1,this.classes={},this.keyframes={},this.options=Se({},i,{sheet:this,parent:this,classes:this.classes,keyframes:this.keyframes}),i.Renderer&&(this.renderer=new i.Renderer(this)),this.rules=new th(this.options);for(var s in r)this.rules.add(s,r[s]);this.rules.process()}var e=t.prototype;return e.attach=function(){return this.attached?this:(this.renderer&&this.renderer.attach(),this.attached=!0,this.deployed||this.deploy(),this)},e.detach=function(){return this.attached?(this.renderer&&this.renderer.detach(),this.attached=!1,this):this},e.addRule=function(i,s,n){var o=this.queue;this.attached&&!o&&(this.queue=[]);var a=this.rules.add(i,s,n);return a?(this.options.jss.plugins.onProcessRule(a),this.attached?(this.deployed&&(o?o.push(a):(this.insertRule(a),this.queue&&(this.queue.forEach(this.insertRule,this),this.queue=void 0))),a):(this.deployed=!1,a)):null},e.replaceRule=function(i,s,n){var o=this.rules.get(i);if(!o)return this.addRule(i,s,n);var a=this.rules.replace(i,s,n);return a&&this.options.jss.plugins.onProcessRule(a),this.attached?(this.deployed&&this.renderer&&(a?o.renderable&&this.renderer.replaceRule(o.renderable,a):this.renderer.deleteRule(o)),a):(this.deployed=!1,a)},e.insertRule=function(i){this.renderer&&this.renderer.insertRule(i)},e.addRules=function(i,s){var n=[];for(var o in i){var a=this.addRule(o,i[o],s);a&&n.push(a)}return n},e.getRule=function(i){return this.rules.get(i)},e.deleteRule=function(i){var s=typeof i=="object"?i:this.rules.get(i);return!s||this.attached&&!s.renderable?!1:(this.rules.remove(s),this.attached&&s.renderable&&this.renderer?this.renderer.deleteRule(s.renderable):!0)},e.indexOf=function(i){return this.rules.indexOf(i)},e.deploy=function(){return this.renderer&&this.renderer.deploy(),this.deployed=!0,this},e.update=function(){var i;return(i=this.rules).update.apply(i,arguments),this},e.updateOne=function(i,s,n){return this.rules.updateOne(i,s,n),this},e.toString=function(i){return this.rules.toString(i)},t})(),p4=(function(){function t(){this.plugins={internal:[],external:[]},this.registry={}}var e=t.prototype;return e.onCreateRule=function(i,s,n){for(var o=0;o<this.registry.onCreateRule.length;o++){var a=this.registry.onCreateRule[o](i,s,n);if(a)return a}return null},e.onProcessRule=function(i){if(!i.isProcessed){for(var s=i.options.sheet,n=0;n<this.registry.onProcessRule.length;n++)this.registry.onProcessRule[n](i,s);i.style&&this.onProcessStyle(i.style,i,s),i.isProcessed=!0}},e.onProcessStyle=function(i,s,n){for(var o=0;o<this.registry.onProcessStyle.length;o++)s.style=this.registry.onProcessStyle[o](s.style,s,n)},e.onProcessSheet=function(i){for(var s=0;s<this.registry.onProcessSheet.length;s++)this.registry.onProcessSheet[s](i)},e.onUpdate=function(i,s,n,o){for(var a=0;a<this.registry.onUpdate.length;a++)this.registry.onUpdate[a](i,s,n,o)},e.onChangeValue=function(i,s,n){for(var o=i,a=0;a<this.registry.onChangeValue.length;a++)o=this.registry.onChangeValue[a](o,s,n);return o},e.use=function(i,s){s===void 0&&(s={queue:"external"});var n=this.plugins[s.queue];n.indexOf(i)===-1&&(n.push(i),this.registry=[].concat(this.plugins.external,this.plugins.internal).reduce(function(o,a){for(var l in a)l in o&&o[l].push(a[l]);return o},{onCreateRule:[],onProcessRule:[],onProcessStyle:[],onProcessSheet:[],onChangeValue:[],onUpdate:[]}))},t})(),m4=(function(){function t(){this.registry=[]}var e=t.prototype;return e.add=function(i){var s=this.registry,n=i.options.index;if(s.indexOf(i)===-1){if(s.length===0||n>=this.index){s.push(i);return}for(var o=0;o<s.length;o++)if(s[o].options.index>n){s.splice(o,0,i);return}}},e.reset=function(){this.registry=[]},e.remove=function(i){var s=this.registry.indexOf(i);this.registry.splice(s,1)},e.toString=function(i){for(var s=i===void 0?{}:i,n=s.attached,o=qn(s,["attached"]),a=Ha(o),l=a.linebreak,c="",u=0;u<this.registry.length;u++){var p=this.registry[u];n!=null&&p.attached!==n||(c&&(c+=l),c+=p.toString(o))}return c},N_(t,[{key:"index",get:function(){return this.registry.length===0?0:this.registry[this.registry.length-1].options.index}}]),t})(),Zc=new m4,V_=typeof globalThis<"u"?globalThis:typeof window<"u"&&window.Math===Math?window:typeof self<"u"&&self.Math===Math?self:Function("return this")(),U_="2f1acc6c3a606b082e5eef5e54414ffb";V_[U_]==null&&(V_[U_]=0);var TT=V_[U_]++,g4=1e10,ET=function(e){e===void 0&&(e={});var r=0,i=function(n,o){r+=1,r>g4;var a="",l="";return o&&(o.options.classNamePrefix&&(l=o.options.classNamePrefix),o.options.jss.id!=null&&(a=String(o.options.jss.id))),e.minify?""+(l||"c")+TT+a+r:l+n.key+"-"+TT+(a?"-"+a:"")+"-"+r};return i},LT=function(e){var r;return function(){return r||(r=e()),r}},v4=function(e,r){try{return e.attributeStyleMap?e.attributeStyleMap.get(r):e.style.getPropertyValue(r)}catch{return""}},_4=function(e,r,i){try{var s=i;if(Array.isArray(i)&&(s=as(i)),e.attributeStyleMap)e.attributeStyleMap.set(r,s);else{var n=s?s.indexOf("!important"):-1,o=n>-1?s.substr(0,n-1):s;e.style.setProperty(r,o,n>-1?"important":"")}}catch{return!1}return!0},y4=function(e,r){try{e.attributeStyleMap?e.attributeStyleMap.delete(r):e.style.removeProperty(r)}catch{}},S4=function(e,r){return e.selectorText=r,e.selectorText===r},DT=LT(function(){return document.querySelector("head")});function x4(t,e){for(var r=0;r<t.length;r++){var i=t[r];if(i.attached&&i.options.index>e.index&&i.options.insertionPoint===e.insertionPoint)return i}return null}function b4(t,e){for(var r=t.length-1;r>=0;r--){var i=t[r];if(i.attached&&i.options.insertionPoint===e.insertionPoint)return i}return null}function w4(t){for(var e=DT(),r=0;r<e.childNodes.length;r++){var i=e.childNodes[r];if(i.nodeType===8&&i.nodeValue.trim()===t)return i}return null}function C4(t){var e=Zc.registry;if(e.length>0){var r=x4(e,t);if(r&&r.renderer)return{parent:r.renderer.element.parentNode,node:r.renderer.element};if(r=b4(e,t),r&&r.renderer)return{parent:r.renderer.element.parentNode,node:r.renderer.element.nextSibling}}var i=t.insertionPoint;if(i&&typeof i=="string"){var s=w4(i);if(s)return{parent:s.parentNode,node:s.nextSibling}}return!1}function k4(t,e){var r=e.insertionPoint,i=C4(e);if(i!==!1&&i.parent){i.parent.insertBefore(t,i.node);return}if(r&&typeof r.nodeType=="number"){var s=r,n=s.parentNode;n&&n.insertBefore(t,s.nextSibling);return}DT().appendChild(t)}var T4=LT(function(){var t=document.querySelector('meta[property="csp-nonce"]');return t?t.getAttribute("content"):null}),PT=function(e,r,i){try{"insertRule"in e?e.insertRule(r,i):"appendRule"in e&&e.appendRule(r)}catch{return!1}return e.cssRules[i]},RT=function(e,r){var i=e.cssRules.length;return r===void 0||r>i?i:r},E4=function(){var e=document.createElement("style");return e.textContent=`
`,e},P4=(function(){function t(r){this.getPropertyValue=v4,this.setProperty=_4,this.removeProperty=y4,this.setSelector=S4,this.hasInsertedRules=!1,this.cssRules=[],r&&Zc.add(r),this.sheet=r;var i=this.sheet?this.sheet.options:{},s=i.media,n=i.meta,o=i.element;this.element=o||E4(),this.element.setAttribute("data-jss",""),s&&this.element.setAttribute("media",s),n&&this.element.setAttribute("data-meta",n);var a=T4();a&&this.element.setAttribute("nonce",a)}var e=t.prototype;return e.attach=function(){if(!(this.element.parentNode||!this.sheet)){k4(this.element,this.sheet.options);var i=!!(this.sheet&&this.sheet.deployed);this.hasInsertedRules&&i&&(this.hasInsertedRules=!1,this.deploy())}},e.detach=function(){if(this.sheet){var i=this.element.parentNode;i&&i.removeChild(this.element),this.sheet.options.link&&(this.cssRules=[],this.element.textContent=`
`)}},e.deploy=function(){var i=this.sheet;if(i){if(i.options.link){this.insertRules(i.rules);return}this.element.textContent=`
`+i.toString()+`
`}},e.insertRules=function(i,s){for(var n=0;n<i.index.length;n++)this.insertRule(i.index[n],n,s)},e.insertRule=function(i,s,n){if(n===void 0&&(n=this.element.sheet),i.rules){var o=i,a=n;if(i.type==="conditional"||i.type==="keyframes"){var l=RT(n,s);if(a=PT(n,o.toString({children:!1}),l),a===!1)return!1;this.refCssRule(i,l,a)}return this.insertRules(o.rules,a),a}var c=i.toString();if(!c)return!1;var u=RT(n,s),p=PT(n,c,u);return p===!1?!1:(this.hasInsertedRules=!0,this.refCssRule(i,u,p),p)},e.refCssRule=function(i,s,n){i.renderable=n,i.options.parent instanceof AT&&this.cssRules.splice(s,0,n)},e.deleteRule=function(i){var s=this.element.sheet,n=this.indexOf(i);return n===-1?!1:(s.deleteRule(n),this.cssRules.splice(n,1),!0)},e.indexOf=function(i){return this.cssRules.indexOf(i)},e.replaceRule=function(i,s){var n=this.indexOf(i);return n===-1?!1:(this.element.sheet.deleteRule(n),this.cssRules.splice(n,1),this.insertRule(s,n))},e.getRules=function(){return this.element.sheet.cssRules},t})(),R4=0,M4=(function(){function t(r){this.id=R4++,this.version="10.10.0",this.plugins=new p4,this.options={id:{minify:!1},createGenerateId:ET,Renderer:uo?P4:null,plugins:[]},this.generateId=ET({minify:!1});for(var i=0;i<CT.length;i++)this.plugins.use(CT[i],{queue:"internal"});this.setup(r)}var e=t.prototype;return e.setup=function(i){return i===void 0&&(i={}),i.createGenerateId&&(this.options.createGenerateId=i.createGenerateId),i.id&&(this.options.id=Se({},this.options.id,i.id)),(i.createGenerateId||i.id)&&(this.generateId=this.options.createGenerateId(this.options.id)),i.insertionPoint!=null&&(this.options.insertionPoint=i.insertionPoint),"Renderer"in i&&(this.options.Renderer=i.Renderer),i.plugins&&this.use.apply(this,i.plugins),this},e.createStyleSheet=function(i,s){s===void 0&&(s={});var n=s,o=n.index;typeof o!="number"&&(o=Zc.index===0?0:Zc.index+1);var a=new AT(i,Se({},s,{jss:this,generateId:s.generateId||this.generateId,insertionPoint:this.options.insertionPoint,Renderer:this.options.Renderer,index:o}));return this.plugins.onProcessSheet(a),a},e.removeStyleSheet=function(i){return i.detach(),Zc.remove(i),this},e.createRule=function(i,s,n){if(s===void 0&&(s={}),n===void 0&&(n={}),typeof i=="object")return this.createRule(void 0,i,s);var o=Se({},n,{name:i,jss:this,Renderer:this.options.Renderer});o.generateId||(o.generateId=this.generateId),o.classes||(o.classes={}),o.keyframes||(o.keyframes={});var a=op(i,s,o);return a&&this.plugins.onProcessRule(a),a},e.use=function(){for(var i=this,s=arguments.length,n=new Array(s),o=0;o<s;o++)n[o]=arguments[o];return n.forEach(function(a){i.plugins.use(a)}),this},t})(),G_=function(e){return new M4(e)};var ap=typeof CSS=="object"&&CSS!=null&&"number"in CSS;function q_(t){var e=null;for(var r in t){var i=t[r],s=typeof i;if(s==="function")e||(e={}),e[r]=i;else if(s==="object"&&i!==null&&!Array.isArray(i)){var n=q_(i);n&&(e||(e={}),e[r]=n)}}return e}var hee=G_();var OT=Date.now(),Y_="fnValues"+OT,X_="fnStyle"+ ++OT,A4=function(){return{onCreateRule:function(r,i,s){if(typeof i!="function")return null;var n=op(r,{},s);return n[X_]=i,n},onProcessStyle:function(r,i){if(Y_ in i||X_ in i)return r;var s={};for(var n in r){var o=r[n];typeof o=="function"&&(delete r[n],s[n]=o)}return i[Y_]=s,r},onUpdate:function(r,i,s,n){var o=i,a=o[X_];if(a&&(o.style=a(r)||{},0))for(var l in o.style);var c=o[Y_];if(c)for(var u in c)o.prop(u,c[u](r),n)}}},BT=A4;var ls="@global",J_="@global ",L4=(function(){function t(r,i,s){this.type="global",this.at=ls,this.isProcessed=!1,this.key=r,this.options=s,this.rules=new th(Se({},s,{parent:this}));for(var n in i)this.rules.add(n,i[n]);this.rules.process()}var e=t.prototype;return e.getRule=function(i){return this.rules.get(i)},e.addRule=function(i,s,n){var o=this.rules.add(i,s,n);return o&&this.options.jss.plugins.onProcessRule(o),o},e.replaceRule=function(i,s,n){var o=this.rules.replace(i,s,n);return o&&this.options.jss.plugins.onProcessRule(o),o},e.indexOf=function(i){return this.rules.indexOf(i)},e.toString=function(i){return this.rules.toString(i)},t})(),D4=(function(){function t(r,i,s){this.type="global",this.at=ls,this.isProcessed=!1,this.key=r,this.options=s;var n=r.substr(J_.length);this.rule=s.jss.createRule(n,i,Se({},s,{parent:this}))}var e=t.prototype;return e.toString=function(i){return this.rule?this.rule.toString(i):""},t})(),O4=/\s*,\s*/g;function IT(t,e){for(var r=t.split(O4),i="",s=0;s<r.length;s++)i+=e+" "+r[s].trim(),r[s+1]&&(i+=", ");return i}function B4(t,e){var r=t.options,i=t.style,s=i?i[ls]:null;if(s){for(var n in s)e.addRule(n,s[n],Se({},r,{selector:IT(n,t.selector)}));delete i[ls]}}function I4(t,e){var r=t.options,i=t.style;for(var s in i)if(!(s[0]!=="@"||s.substr(0,ls.length)!==ls)){var n=IT(s.substr(ls.length),t.selector);e.addRule(n,i[s],Se({},r,{selector:n})),delete i[s]}}function N4(){function t(r,i,s){if(!r)return null;if(r===ls)return new L4(r,i,s);if(r[0]==="@"&&r.substr(0,J_.length)===J_)return new D4(r,i,s);var n=s.parent;return n&&(n.type==="global"||n.options.parent&&n.options.parent.type==="global")&&(s.scoped=!1),!s.selector&&s.scoped===!1&&(s.selector=r),null}function e(r,i){r.type!=="style"||!i||(B4(r,i),I4(r,i))}return{onCreateRule:t,onProcessRule:e}}var NT=N4;var FT=/\s*,\s*/g,F4=/&/g,H4=/\$([\w-]+)/g;function z4(){function t(s,n){return function(o,a){var l=s.getRule(a)||n&&n.getRule(a);return l?l.selector:a}}function e(s,n){for(var o=n.split(FT),a=s.split(FT),l="",c=0;c<o.length;c++)for(var u=o[c],p=0;p<a.length;p++){var g=a[p];l&&(l+=", "),l+=g.indexOf("&")!==-1?g.replace(F4,u):u+" "+g}return l}function r(s,n,o){if(o)return Se({},o,{index:o.index+1});var a=s.options.nestingLevel;a=a===void 0?1:a+1;var l=Se({},s.options,{nestingLevel:a,index:n.indexOf(s)+1});return delete l.name,l}function i(s,n,o){if(n.type!=="style")return s;var a=n,l=a.options.parent,c,u;for(var p in s){var g=p.indexOf("&")!==-1,m=p[0]==="@";if(!(!g&&!m)){if(c=r(a,l,c),g){var h=e(p,a.selector);u||(u=t(l,o)),h=h.replace(H4,u);var d=a.key+"-"+p;"replaceRule"in l?l.replaceRule(d,s[p],Se({},c,{selector:h})):l.addRule(d,s[p],Se({},c,{selector:h}))}else m&&l.addRule(p,{},c).addRule(a.key,s[p],{selector:a.selector});delete s[p]}}return s}return{onProcessStyle:i}}var HT=z4;var $4=/[A-Z]/g,j4=/^ms-/,Q_={};function W4(t){return"-"+t.toLowerCase()}function V4(t){if(Q_.hasOwnProperty(t))return Q_[t];var e=t.replace($4,W4);return Q_[t]=j4.test(e)?"-"+e:e}var Z_=V4;function lp(t){var e={};for(var r in t){var i=r.indexOf("--")===0?r:Z_(r);e[i]=t[r]}return t.fallbacks&&(Array.isArray(t.fallbacks)?e.fallbacks=t.fallbacks.map(lp):e.fallbacks=lp(t.fallbacks)),e}function U4(){function t(r){if(Array.isArray(r)){for(var i=0;i<r.length;i++)r[i]=lp(r[i]);return r}return lp(r)}function e(r,i,s){if(i.indexOf("--")===0)return r;var n=Z_(i);return i===n?r:(s.prop(n,r),null)}return{onProcessStyle:t,onChangeValue:e}}var zT=U4;var V=ap&&CSS?CSS.px:"px",cp=ap&&CSS?CSS.ms:"ms",za=ap&&CSS?CSS.percent:"%",K4={"animation-delay":cp,"animation-duration":cp,"background-position":V,"background-position-x":V,"background-position-y":V,"background-size":V,border:V,"border-bottom":V,"border-bottom-left-radius":V,"border-bottom-right-radius":V,"border-bottom-width":V,"border-left":V,"border-left-width":V,"border-radius":V,"border-right":V,"border-right-width":V,"border-top":V,"border-top-left-radius":V,"border-top-right-radius":V,"border-top-width":V,"border-width":V,"border-block":V,"border-block-end":V,"border-block-end-width":V,"border-block-start":V,"border-block-start-width":V,"border-block-width":V,"border-inline":V,"border-inline-end":V,"border-inline-end-width":V,"border-inline-start":V,"border-inline-start-width":V,"border-inline-width":V,"border-start-start-radius":V,"border-start-end-radius":V,"border-end-start-radius":V,"border-end-end-radius":V,margin:V,"margin-bottom":V,"margin-left":V,"margin-right":V,"margin-top":V,"margin-block":V,"margin-block-end":V,"margin-block-start":V,"margin-inline":V,"margin-inline-end":V,"margin-inline-start":V,padding:V,"padding-bottom":V,"padding-left":V,"padding-right":V,"padding-top":V,"padding-block":V,"padding-block-end":V,"padding-block-start":V,"padding-inline":V,"padding-inline-end":V,"padding-inline-start":V,"mask-position-x":V,"mask-position-y":V,"mask-size":V,height:V,width:V,"min-height":V,"max-height":V,"min-width":V,"max-width":V,bottom:V,left:V,top:V,right:V,inset:V,"inset-block":V,"inset-block-end":V,"inset-block-start":V,"inset-inline":V,"inset-inline-end":V,"inset-inline-start":V,"box-shadow":V,"text-shadow":V,"column-gap":V,"column-rule":V,"column-rule-width":V,"column-width":V,"font-size":V,"font-size-delta":V,"letter-spacing":V,"text-decoration-thickness":V,"text-indent":V,"text-stroke":V,"text-stroke-width":V,"word-spacing":V,motion:V,"motion-offset":V,outline:V,"outline-offset":V,"outline-width":V,perspective:V,"perspective-origin-x":za,"perspective-origin-y":za,"transform-origin":za,"transform-origin-x":za,"transform-origin-y":za,"transform-origin-z":za,"transition-delay":cp,"transition-duration":cp,"vertical-align":V,"flex-basis":V,"shape-margin":V,size:V,gap:V,grid:V,"grid-gap":V,"row-gap":V,"grid-row-gap":V,"grid-column-gap":V,"grid-template-rows":V,"grid-template-columns":V,"grid-auto-rows":V,"grid-auto-columns":V,"box-shadow-x":V,"box-shadow-y":V,"box-shadow-blur":V,"box-shadow-spread":V,"font-line-height":V,"text-shadow-x":V,"text-shadow-y":V,"text-shadow-blur":V};function $T(t){var e=/(-[a-z])/g,r=function(o){return o[1].toUpperCase()},i={};for(var s in t)i[s]=t[s],i[s.replace(e,r)]=t[s];return i}var G4=$T(K4);function rh(t,e,r){if(e==null)return e;if(Array.isArray(e))for(var i=0;i<e.length;i++)e[i]=rh(t,e[i],r);else if(typeof e=="object")if(t==="fallbacks")for(var s in e)e[s]=rh(s,e[s],r);else for(var n in e)e[n]=rh(t+"-"+n,e[n],r);else if(typeof e=="number"&&isNaN(e)===!1){var o=r[t]||G4[t];return o&&!(e===0&&o===V)?typeof o=="function"?o(e).toString():""+e+o:e.toString()}return e}function q4(t){t===void 0&&(t={});var e=$T(t);function r(s,n){if(n.type!=="style")return s;for(var o in s)s[o]=rh(o,s[o],e);return s}function i(s,n){return rh(n,s,e)}return{onProcessStyle:r,onChangeValue:i}}var jT=q4;function ih(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,i=Array(e);r<e;r++)i[r]=t[r];return i}function WT(t){if(Array.isArray(t))return ih(t)}function VT(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function UT(t,e){if(t){if(typeof t=="string")return ih(t,e);var r={}.toString.call(t).slice(8,-1);return r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set"?Array.from(t):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?ih(t,e):void 0}}function KT(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function GT(t){return WT(t)||VT(t)||UT(t)||KT()}var nh="",ey="",JT="",QT="",Y4=uo&&"ontouchstart"in document.documentElement;if(uo){hp={Moz:"-moz-",ms:"-ms-",O:"-o-",Webkit:"-webkit-"},qT=document.createElement("p"),up=qT.style,YT="Transform";for(fp in hp)if(fp+YT in up){nh=fp,ey=hp[fp];break}nh==="Webkit"&&"msHyphens"in up&&(nh="ms",ey=hp.ms,QT="edge"),nh==="Webkit"&&"-apple-trailing-word"in up&&(JT="apple")}var hp,qT,up,YT,fp,pe={js:nh,css:ey,vendor:JT,browser:QT,isTouch:Y4};function ZT(t){return t[1]==="-"||pe.js==="ms"?t:"@"+pe.css+"keyframes"+t.substr(10)}var X4={noPrefill:["appearance"],supportedProperty:function(e){return e!=="appearance"?!1:pe.js==="ms"?"-webkit-"+e:pe.css+e}},J4={noPrefill:["color-adjust"],supportedProperty:function(e){return e!=="color-adjust"?!1:pe.js==="Webkit"?pe.css+"print-"+e:e}},Q4=/[-\s]+(.)?/g;function Z4(t,e){return e?e.toUpperCase():""}function ty(t){return t.replace(Q4,Z4)}function hs(t){return ty("-"+t)}var eB={noPrefill:["mask"],supportedProperty:function(e,r){if(!/^mask/.test(e))return!1;if(pe.js==="Webkit"){var i="mask-image";if(ty(i)in r)return e;if(pe.js+hs(i)in r)return pe.css+e}return e}},tB={noPrefill:["text-orientation"],supportedProperty:function(e){return e!=="text-orientation"?!1:pe.vendor==="apple"&&!pe.isTouch?pe.css+e:e}},rB={noPrefill:["transform"],supportedProperty:function(e,r,i){return e!=="transform"?!1:i.transform?e:pe.css+e}},iB={noPrefill:["transition"],supportedProperty:function(e,r,i){return e!=="transition"?!1:i.transition?e:pe.css+e}},nB={noPrefill:["writing-mode"],supportedProperty:function(e){return e!=="writing-mode"?!1:pe.js==="Webkit"||pe.js==="ms"&&pe.browser!=="edge"?pe.css+e:e}},sB={noPrefill:["user-select"],supportedProperty:function(e){return e!=="user-select"?!1:pe.js==="Moz"||pe.js==="ms"||pe.vendor==="apple"?pe.css+e:e}},oB={supportedProperty:function(e,r){if(!/^break-/.test(e))return!1;if(pe.js==="Webkit"){var i="WebkitColumn"+hs(e);return i in r?pe.css+"column-"+e:!1}if(pe.js==="Moz"){var s="page"+hs(e);return s in r?"page-"+e:!1}return!1}},aB={supportedProperty:function(e,r){if(!/^(border|margin|padding)-inline/.test(e))return!1;if(pe.js==="Moz")return e;var i=e.replace("-inline","");return pe.js+hs(i)in r?pe.css+i:!1}},lB={supportedProperty:function(e,r){return ty(e)in r?e:!1}},cB={supportedProperty:function(e,r){var i=hs(e);return e[0]==="-"||e[0]==="-"&&e[1]==="-"?e:pe.js+i in r?pe.css+e:pe.js!=="Webkit"&&"Webkit"+i in r?"-webkit-"+e:!1}},hB={supportedProperty:function(e){return e.substring(0,11)!=="scroll-snap"?!1:pe.js==="ms"?""+pe.css+e:e}},uB={supportedProperty:function(e){return e!=="overscroll-behavior"?!1:pe.js==="ms"?pe.css+"scroll-chaining":e}},fB={"flex-grow":"flex-positive","flex-shrink":"flex-negative","flex-basis":"flex-preferred-size","justify-content":"flex-pack",order:"flex-order","align-items":"flex-align","align-content":"flex-line-pack"},dB={supportedProperty:function(e,r){var i=fB[e];return i&&pe.js+hs(i)in r?pe.css+i:!1}},eE={flex:"box-flex","flex-grow":"box-flex","flex-direction":["box-orient","box-direction"],order:"box-ordinal-group","align-items":"box-align","flex-flow":["box-orient","box-direction"],"justify-content":"box-pack"},pB=Object.keys(eE),mB=function(e){return pe.css+e},gB={supportedProperty:function(e,r,i){var s=i.multiple;if(pB.indexOf(e)>-1){var n=eE[e];if(!Array.isArray(n))return pe.js+hs(n)in r?pe.css+n:!1;if(!s)return!1;for(var o=0;o<n.length;o++)if(!(pe.js+hs(n[0])in r))return!1;return n.map(mB)}return!1}},tE=[X4,J4,eB,tB,rB,iB,nB,sB,oB,aB,lB,cB,hB,uB,dB,gB],XT=tE.filter(function(t){return t.supportedProperty}).map(function(t){return t.supportedProperty}),vB=tE.filter(function(t){return t.noPrefill}).reduce(function(t,e){return t.push.apply(t,GT(e.noPrefill)),t},[]),sh,po={};if(uo){sh=document.createElement("p"),dp=window.getComputedStyle(document.documentElement,"");for(pp in dp)isNaN(pp)||(po[dp[pp]]=dp[pp]);vB.forEach(function(t){return delete po[t]})}var dp,pp;function mp(t,e){if(e===void 0&&(e={}),!sh)return t;if(po[t]!=null)return po[t];(t==="transition"||t==="transform")&&(e[t]=t in sh.style);for(var r=0;r<XT.length&&(po[t]=XT[r](t,sh.style,e),!po[t]);r++);try{sh.style[t]=""}catch{return!1}return po[t]}var $a={},_B={transition:1,"transition-property":1,"-webkit-transition":1,"-webkit-transition-property":1},yB=/(^\s*[\w-]+)|, (\s*[\w-]+)(?![^()]*\))/g,cs;function SB(t,e,r){if(e==="var")return"var";if(e==="all")return"all";if(r==="all")return", all";var i=e?mp(e):", "+mp(r);return i||e||r}uo&&(cs=document.createElement("p"));function ry(t,e){var r=e;if(!cs||t==="content")return e;if(typeof r!="string"||!isNaN(parseInt(r,10)))return r;var i=t+r;if($a[i]!=null)return $a[i];try{cs.style[t]=r}catch{return $a[i]=!1,!1}if(_B[t])r=r.replace(yB,SB);else if(cs.style[t]===""&&(r=pe.css+r,r==="-ms-flex"&&(cs.style[t]="-ms-flexbox"),cs.style[t]=r,cs.style[t]===""))return $a[i]=!1,!1;return cs.style[t]="",$a[i]=r,$a[i]}function xB(){function t(s){if(s.type==="keyframes"){var n=s;n.at=ZT(n.at)}}function e(s){for(var n in s){var o=s[n];if(n==="fallbacks"&&Array.isArray(o)){s[n]=o.map(e);continue}var a=!1,l=mp(n);l&&l!==n&&(a=!0);var c=!1,u=ry(l,as(o));u&&u!==o&&(c=!0),(a||c)&&(a&&delete s[n],s[l||n]=u||o)}return s}function r(s,n){return n.type!=="style"?s:e(s)}function i(s,n){return ry(n,as(s))||s}return{onProcessRule:t,onProcessStyle:r,onChangeValue:i}}var rE=xB;function bB(){var t=function(r,i){return r.length===i.length?r>i?1:-1:r.length-i.length};return{onProcessStyle:function(r,i){if(i.type!=="style")return r;for(var s={},n=Object.keys(r).sort(t),o=0;o<n.length;o++)s[n[o]]=r[n[o]];return s}}}var iE=bB;function gp(){return{plugins:[BT(),NT(),HT(),zT(),jT(),typeof window>"u"?null:rE(),iE()]}}var Qr=K(Q());function oh(t={}){let{baseClasses:e,newClasses:r,Component:i}=t;if(!r)return e;let s={...e};return Object.keys(r).forEach(n=>{r[n]&&(s[n]=`${e[n]} ${r[n]}`)}),s}var wB={set:(t,e,r,i)=>{let s=t.get(e);s||(s=new Map,t.set(e,s)),s.set(r,i)},get:(t,e,r)=>{let i=t.get(e);return i?i.get(r):void 0},delete:(t,e,r)=>{t.get(e).delete(r)}},mo=wB;function iy(){let t=ci();return t?.$$material??t}var vp=K(Q());var CB=K(_e()),kB=G_(gp()),TB=sp(),EB=new Map;var PB={disableGeneration:!1,generateClassName:TB,jss:kB,sheetsCache:null,sheetsManager:EB,sheetsRegistry:null},nE=vp.createContext(PB);var sE=-1e9;function oE(){return sE+=1,sE}function aE(t){return t.length===0}function _p(t){let{variant:e,...r}=t,i=e||"";return Object.keys(r).sort().forEach(s=>{s==="color"?i+=aE(i)?t[s]:Er(t[s]):i+=`${aE(i)?s:Er(s)}${Er(t[s].toString())}`}),i}var RB={},lE=RB;function yp(t){let e=typeof t=="function";return{create:(r,i)=>{let s;try{s=e?t(r):t}catch(l){throw l}if(!i||!r.components||!r.components[i]||!r.components[i].styleOverrides&&!r.components[i].variants)return s;let n=r.components[i].styleOverrides||{},o=r.components[i].variants||[],a={...s};return Object.keys(n).forEach(l=>{a[l]=De(a[l]||{},n[l])}),o.forEach(l=>{let c=_p(l.props);a[c]=De(a[c]||{},l.style)}),a},options:{}}}function MB({state:t,stylesOptions:e},r,i){if(e.disableGeneration)return r||{};t.cacheClasses||(t.cacheClasses={value:null,lastProp:null,lastJSS:{}});let s=!1;return t.classes!==t.cacheClasses.lastJSS&&(t.cacheClasses.lastJSS=t.classes,s=!0),r!==t.cacheClasses.lastProp&&(t.cacheClasses.lastProp=r,s=!0),s&&(t.cacheClasses.value=oh({baseClasses:t.cacheClasses.lastJSS,newClasses:r,Component:i})),t.cacheClasses.value}function AB({state:t,theme:e,stylesOptions:r,stylesCreator:i,name:s},n){if(r.disableGeneration)return;let o=mo.get(r.sheetsManager,i,e);o||(o={refs:0,staticSheet:null,dynamicStyles:null},mo.set(r.sheetsManager,i,e,o));let a={...i.options,...r,theme:e,flip:typeof r.flip=="boolean"?r.flip:e.direction==="rtl"};a.generateId=a.serverGenerateClassName||a.generateClassName;let l=r.sheetsRegistry;if(o.refs===0){let c;r.sheetsCache&&(c=mo.get(r.sheetsCache,i,e));let u=i.create(e,s);c||(c=r.jss.createStyleSheet(u,{link:!1,...a}),c.attach(),r.sheetsCache&&mo.set(r.sheetsCache,i,e,c)),l&&l.add(c),o.staticSheet=c,o.dynamicStyles=q_(u)}if(o.dynamicStyles){let c=r.jss.createStyleSheet(o.dynamicStyles,{link:!0,...a});c.update(n),c.attach(),t.dynamicSheet=c,t.classes=oh({baseClasses:o.staticSheet.classes,newClasses:c.classes}),l&&l.add(c)}else t.classes=o.staticSheet.classes;o.refs+=1}function LB({state:t},e){t.dynamicSheet&&t.dynamicSheet.update(e)}function DB({state:t,theme:e,stylesOptions:r,stylesCreator:i}){if(r.disableGeneration)return;let s=mo.get(r.sheetsManager,i,e);s.refs-=1;let n=r.sheetsRegistry;s.refs===0&&(mo.delete(r.sheetsManager,i,e),r.jss.removeStyleSheet(s.staticSheet),n&&n.remove(s.staticSheet)),t.dynamicSheet&&(r.jss.removeStyleSheet(t.dynamicSheet),n&&n.remove(t.dynamicSheet))}function OB(t,e){let r=Qr.useRef([]),i,s=Qr.useMemo(()=>({}),e);r.current!==s&&(r.current=s,i=t()),Qr.useEffect(()=>()=>{i&&i()},[s])}function ah(t,e={}){let{name:r,classNamePrefix:i,Component:s,defaultTheme:n=lE,...o}=e,a=yp(t),l=r||i||"makeStyles";return a.options={index:oE(),name:r,meta:l,classNamePrefix:l},(u={})=>{let p=iy()||n,g={...Qr.useContext(nE),...o},m=Qr.useRef(),h=Qr.useRef();return OB(()=>{let v={name:r,state:{},stylesCreator:a,stylesOptions:g,theme:p};return AB(v,u),h.current=!1,m.current=v,()=>{DB(v)}},[p,a]),Qr.useEffect(()=>{h.current&&LB(m.current,u),h.current=!0}),MB(m.current,u.classes,s)}}var hE=K(Q());var cE=t=>Jc({error:{position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)",fontSize:"large",color:"Red",border:"2px solid var(--vscode-focusBorder)",padding:"1.5rem"}});var BB=ah(cE),uE=({message:t})=>{let e=BB();return hE.createElement("div",{className:e.error},t)};function fE(t){return ny.createElement(np,{fallback:ny.createElement(uE,{message:`Webview ${t.webviewName} encountered an error preventing it from being displayed`}),onError:(e,r)=>{window.vscodeApi.postMessage({action:"sendTelemetry",data:{actionName:"webviewRenderError",properties:{webviewName:t.webviewName,error:JSON.stringify(e),stackTrace:JSON.stringify(r.componentStack)}}})},children:t.children})}dE.render(sy.createElement(fE,{webviewName:"openshiftTerminal"},sy.createElement(gT,null)),document.getElementById("root"));
/*! Bundled license information:

react/cjs/react.production.min.js:
  (**
   * @license React
   * react.production.min.js
   *
   * Copyright (c) Facebook, Inc. and its affiliates.
   *
   * This source code is licensed under the MIT license found in the
   * LICENSE file in the root directory of this source tree.
   *)

scheduler/cjs/scheduler.production.min.js:
  (**
   * @license React
   * scheduler.production.min.js
   *
   * Copyright (c) Facebook, Inc. and its affiliates.
   *
   * This source code is licensed under the MIT license found in the
   * LICENSE file in the root directory of this source tree.
   *)

react-dom/cjs/react-dom.production.min.js:
  (**
   * @license React
   * react-dom.production.min.js
   *
   * Copyright (c) Facebook, Inc. and its affiliates.
   *
   * This source code is licensed under the MIT license found in the
   * LICENSE file in the root directory of this source tree.
   *)

react-is/cjs/react-is.production.js:
  (**
   * @license React
   * react-is.production.js
   *
   * Copyright (c) Meta Platforms, Inc. and affiliates.
   *
   * This source code is licensed under the MIT license found in the
   * LICENSE file in the root directory of this source tree.
   *)

react-is/cjs/react-is.production.min.js:
  (** @license React v16.13.1
   * react-is.production.min.js
   *
   * Copyright (c) Facebook, Inc. and its affiliates.
   *
   * This source code is licensed under the MIT license found in the
   * LICENSE file in the root directory of this source tree.
   *)

react/cjs/react-jsx-runtime.production.min.js:
  (**
   * @license React
   * react-jsx-runtime.production.min.js
   *
   * Copyright (c) Facebook, Inc. and its affiliates.
   *
   * This source code is licensed under the MIT license found in the
   * LICENSE file in the root directory of this source tree.
   *)

@mui/styled-engine/index.js:
  (**
   * @mui/styled-engine v6.5.0
   *
   * @license MIT
   * This source code is licensed under the MIT license found in the
   * LICENSE file in the root directory of this source tree.
   *)

@mui/private-theming/index.js:
  (**
   * @mui/private-theming v6.4.9
   *
   * @license MIT
   * This source code is licensed under the MIT license found in the
   * LICENSE file in the root directory of this source tree.
   *)

@mui/lab/index.js:
  (**
   * @mui/lab v6.0.0-dev.240424162023-9968b4889d
   *
   * @license MIT
   * This source code is licensed under the MIT license found in the
   * LICENSE file in the root directory of this source tree.
   *)

@mui/material/index.js:
  (**
   * @mui/material v6.5.0
   *
   * @license MIT
   * This source code is licensed under the MIT license found in the
   * LICENSE file in the root directory of this source tree.
   *)

jss/dist/jss.esm.js:
  (**
   * A better abstraction over CSS.
   *
   * @copyright Oleg Isonen (Slobodskoi) / Isonen 2014-present
   * @website https://github.com/cssinjs/jss
   * @license MIT
   *)

@mui/styles/index.js:
  (**
   * @mui/styles v6.5.0
   *
   * @license MIT
   * This source code is licensed under the MIT license found in the
   * LICENSE file in the root directory of this source tree.
   *)
*/
