@opensumi/cli-engine 3.6.2-next-1733919984.0 → 3.6.2-next-1734078245.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -22760,7 +22760,7 @@ html li {
22760
22760
  .N5Su84eKea48wQ389CkO .W0byfPdLyGo0uOyb_Ip_ .loM19ADa5Aa4ROX3ZEYF {
22761
22761
  align-content: center;
22762
22762
  height: inherit;
22763
- max-width: calc(100% - 140px);
22763
+ max-width: calc(100% - 120px);
22764
22764
  display: flex;
22765
22765
  }
22766
22766
  .N5Su84eKea48wQ389CkO .W0byfPdLyGo0uOyb_Ip_ .loM19ADa5Aa4ROX3ZEYF .G2mf_5LfmZRGmguxw2wt {
@@ -23097,7 +23097,7 @@ html li {
23097
23097
  .merge_editor_container .title_head_container .content {
23098
23098
  align-content: center;
23099
23099
  height: inherit;
23100
- max-width: calc(100% - 140px);
23100
+ max-width: calc(100% - 120px);
23101
23101
  display: flex;
23102
23102
  }
23103
23103
  .merge_editor_container .title_head_container .content .title {
@@ -28099,7 +28099,7 @@ a {
28099
28099
  }
28100
28100
  `},73136:(x,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getMentionBoxStyle=void 0;const t=20,n=({maxRows:s=10,minRows:o=2})=>({control:{fontSize:12},highlighter:{overflow:"hidden"},input:{margin:0},"&multiLine":{control:{border:"none"},highlighter:{padding:9},input:{boxSizing:"content-box",padding:"8px 0",lineHeight:`${t}px`,minHeight:`${t*o}px`,maxHeight:`${t*s}px`,outline:0,border:0,overflowY:"auto"}},suggestions:{dataA:"aaa",list:{backgroundColor:"var(--kt-selectDropdown-background)",fontSize:12,maxHeight:200,overflowY:"auto"},item:{backgroundColor:"var(--kt-selectDropdown-background)",color:"var(--kt-selectDropdown-foreground)",padding:"4px 16px","&focused":{backgroundColor:"var(--kt-selectDropdown-selectionBackground)"}}}});e.getMentionBoxStyle=n},5167:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.COMMENT_TREE_NODE_HEIGHT=e.CommentNodeRendered=void 0;const n=t(85608),s=n.__importDefault(t(53373)),o=n.__importStar(t(14041)),f=t(41869),b=t(53711),g=n.__importDefault(t(65887)),_=({item:E,defaultLeftPadding:u=8,leftPadding:h=8,decorations:c,onClick:r,onTwistierClick:l})=>{const a=(0,f.useDesignStyles)(g.default.expansion_toggle,"expansion_toggle"),d=(0,o.useCallback)(I=>{E.onSelect?E.onSelect(E):r(I,E)},[r]),m=(0,o.useCallback)(I=>{l(I,E)},[l]),p=`${u+(E.depth||0)*(h||0)+(b.CommentContentNode.is(E)?16:b.CommentFileNode.is(E)?0:28)}px`,v={height:e.COMMENT_TREE_NODE_HEIGHT,lineHeight:`${e.COMMENT_TREE_NODE_HEIGHT}px`,paddingLeft:p},y=(0,o.useCallback)(I=>{if(b.CommentContentNode.is(I)||b.CommentFileNode.is(I))return o.default.createElement("div",{className:(0,s.default)(g.default.icon,I.icon),style:{height:e.COMMENT_TREE_NODE_HEIGHT,lineHeight:`${e.COMMENT_TREE_NODE_HEIGHT}px`}})},[]),S=(0,o.useCallback)(I=>b.CommentContentNode.is(I)?o.default.createElement("div",{className:(0,s.default)(g.default.segment,g.default.displayname)},I.renderedLabel?I.renderedLabel:o.default.createElement(o.default.Fragment,null,I.comment,o.default.createElement("span",{className:g.default.separator},"\xB7"),I.author.name)):o.default.createElement("div",{className:(0,s.default)(g.default.segment,g.default.displayname)},I.renderedLabel),[]),A=(0,o.useCallback)(I=>o.default.createElement("div",{className:(0,s.default)(g.default.segment_grow,g.default.description)},I.renderedDescription),[]),T=(0,o.useCallback)(I=>o.default.createElement("div",{onClick:m,className:(0,s.default)(g.default.segment,a,(0,f.getIcon)("arrow-right"),{[`${g.default.mod_collapsed}`]:!I.expanded})}),[m]),D=(0,o.useCallback)(I=>{if(b.CommentFileNode.is(I)||I?.isAllowToggle)return T(I)},[]),w=(0,o.useCallback)(()=>E.tooltip,[E]);return o.default.createElement("div",{key:E.id,onClick:d,title:w(),className:(0,s.default)(g.default.comment_node,c?c.classlist:null),style:v,"data-id":E.id},o.default.createElement("div",{className:g.default.content},D(E),y(E),o.default.createElement("div",{className:g.default.overflow_wrap},S(E),A(E))))};e.CommentNodeRendered=_,e.COMMENT_TREE_NODE_HEIGHT=22},47842:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CommentModelService=e.CommentTreeModel=void 0;const n=t(85608),s=t(76003),o=t(97267),f=t(41869),b=t(23418),g=t(69635),_=t(53711),E=n.__importDefault(t(65887));let u=class extends o.TreeModel{constructor(r){super(),this.init(r)}};e.CommentTreeModel=u,e.CommentTreeModel=u=n.__decorate([(0,s.Injectable)({multiple:!0}),n.__param(0,(0,s.Optional)()),n.__metadata("design:paramtypes",[_.CommentRoot])],u);let h=class extends f.Disposable{constructor(){super(),this.selectedDecoration=new o.Decoration(E.default.mod_selected),this.focusedDecoration=new o.Decoration(E.default.mod_focused),this._selectedNodes=[],this.onDidUpdateTreeModelEmitter=new f.Emitter,this.disposableCollection=new f.DisposableCollection,this.applyFocusedDecoration=(r,l=!0)=>{var a;if(r){for(const d of this._selectedNodes)this.selectedDecoration.removeTarget(d);this.focusedNode&&this.focusedDecoration.removeTarget(this.focusedNode),this.selectedDecoration.addTarget(r),this.focusedDecoration.addTarget(r),this._focusedNode=r,this._selectedNodes=[r],l&&((a=this.treeModel)===null||a===void 0||a.dispatchChange())}},this.removeFocusedDecoration=()=>{var r;this.focusedNode&&(this.focusedDecoration.removeTarget(this.focusedNode),(r=this.treeModel)===null||r===void 0||r.dispatchChange()),this._focusedNode=null},this.handleTreeBlur=()=>{this.removeFocusedDecoration()},this.handleTwistierClick=async(r,l)=>{(_.CommentFileNode.is(l)||l?.isAllowToggle)&&this.toggleDirectory(l)},this.handleItemClick=async(r,l)=>{this.applyFocusedDecoration(l),(_.CommentFileNode.is(l)||l?.isAllowToggle)&&this.toggleDirectory(l);let a,d;l instanceof _.CommentReplyNode||l instanceof _.CommentContentNode?(a=l.thread.uri,d=l.thread.range):a=l.resource,this.editorService.open(a,{range:d}).then(()=>{l.thread&&l.thread.show()})},this.toggleDirectory=r=>{r.expanded?this.commentTreeHandle.collapseNode(r):this.commentTreeHandle.expandNode(r)},this._whenReady=this.initTreeModel()}get onDidUpdateTreeModel(){return this.onDidUpdateTreeModelEmitter.event}get whenReady(){return this._whenReady}get commentTreeHandle(){return this._commentTreeHandle}get decorations(){return this._decorations}get treeModel(){return this._treeModel}get focusedNode(){return this._focusedNode}get selectedNodes(){return this._selectedNodes}async initTreeModel(){const r=await this.commentService.resolveChildren();if(!r)return;const l=r[0];l&&(this._treeModel=this.injector.get(u,[l]),await this._treeModel.ensureReady,this.initDecorations(l),this.disposables.push(f.Event.any(this.commentService.onThreadsCommentChange,this.commentService.onThreadsChanged,this.commentService.onThreadsCreated)(()=>{this.refresh()})),this.onDidUpdateTreeModelEmitter.fire(this._treeModel))}initDecorations(r){return this._decorations=new o.DecorationsManager(r),this._decorations.addDecoration(this.selectedDecoration),this._decorations.addDecoration(this.focusedDecoration),this._decorations}handleTreeHandler(r){this._commentTreeHandle=r}async refresh(){await this.whenReady,(0,f.runWhenIdle)(()=>{this.treeModel.root.refresh()})}async collapsedAll(){return await this.whenReady,this.treeModel.root.collapsedAll()}dispose(){this.disposableCollection.dispose()}};e.CommentModelService=h,n.__decorate([(0,s.Autowired)(g.ICommentsService),n.__metadata("design:type",Object)],h.prototype,"commentService",void 0),n.__decorate([(0,s.Autowired)(s.INJECTOR_TOKEN),n.__metadata("design:type",s.Injector)],h.prototype,"injector",void 0),n.__decorate([(0,s.Autowired)(b.WorkbenchEditorService),n.__metadata("design:type",b.WorkbenchEditorService)],h.prototype,"editorService",void 0),e.CommentModelService=h=n.__decorate([(0,s.Injectable)(),n.__metadata("design:paramtypes",[])],h)},53711:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CommentReplyNode=e.CommentContentNode=e.CommentFileNode=e.CommentRoot=void 0;const n=t(97267);class s extends n.CompositeTreeNode{static is(_){return!!_&&!_.parent}constructor(_){super(_,void 0)}get expanded(){return!0}}e.CommentRoot=s;class o extends n.CompositeTreeNode{static is(_){return n.CompositeTreeNode.is(_)&&"threads"in _}constructor(_,E,u="",h,c,r,l){super(_,l),this.threads=E,this.tooltip=h,this.icon=c,this.resource=r,this.isExpanded=!0,this._renderedLabel=this.resource.displayName,this._renderedDescription=u}set label(_){this._renderedLabel=_}set description(_){this._renderedDescription=_}get renderedLabel(){return this._renderedLabel}get renderedDescription(){return this._renderedDescription}set onSelect(_){this._onSelectHandler=_}get onSelect(){return this._onSelectHandler}}e.CommentFileNode=o;class f extends n.CompositeTreeNode{static is(_){return n.CompositeTreeNode.is(_)&&"author"in _}constructor(_,E,u,h="",c,r,l,a){super(_,a),this.thread=E,this.comment=u,this.icon=c,this.author=r,this.resource=l,this._renderedDescription=h,this.isExpanded=!0,this._isAllowToggle=!1}get isAllowToggle(){return this._isAllowToggle}setIsAllowToggle(_){this._isAllowToggle=_}set label(_){this._renderedLabel=_}set description(_){this._renderedDescription=_}get renderedLabel(){return this._renderedLabel}get renderedDescription(){return this._renderedDescription}set onSelect(_){this._onSelectHandler=_}get onSelect(){return this._onSelectHandler}}e.CommentContentNode=f;class b extends n.TreeNode{constructor(_,E,u,h="",c,r,l){super(_,l),this.thread=E,this.icon=c,this.resource=r,this._renderedLabel=u,this._renderedDescription=h}set label(_){this._renderedLabel=_}set description(_){this._renderedDescription=_}get renderedLabel(){return this._renderedLabel}get renderedDescription(){return this._renderedDescription}set onSelect(_){this._onSelectHandler=_}get onSelect(){return this._onSelectHandler}}e.CommentReplyNode=b},69635:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CommentReactionClick=e.CommentPanelCollapse=e.SwitchCommandReaction=e.CloseThreadId=e.CollapseId=e.ICommentsService=e.CommentsContribution=e.ICommentsFeatureRegistry=e.CommentPanelId=e.CommentGutterType=e.CommentThreadCollapsibleState=e.CommentMode=void 0;const n=t(41869);var s;(function(_){_[_.Editor=0]="Editor",_[_.Preview=1]="Preview"})(s||(e.CommentMode=s={}));var o;(function(_){_[_.Collapsed=0]="Collapsed",_[_.Expanded=1]="Expanded"})(o||(e.CommentThreadCollapsibleState=o={}));var f;(function(_){_.Thread="thread",_.Empty="empty"})(f||(e.CommentGutterType=f={})),e.CommentPanelId="CommentPanel",e.ICommentsFeatureRegistry=Symbol("ICommentsFeatureRegistry"),e.CommentsContribution=Symbol("CommentsContribution"),e.ICommentsService=Symbol("ICommentsService"),e.CollapseId="comments.panel.action.collapse",e.CloseThreadId="comments.thread.action.close",e.SwitchCommandReaction="comments.comment.action.switchCommand";class b extends n.BasicEvent{}e.CommentPanelCollapse=b;class g extends n.BasicEvent{}e.CommentReactionClick=g},86077:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),t(85608).__exportStar(t(69635),e)},79383:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Badge=void 0;const n=t(85608),s=n.__importDefault(t(53373)),o=n.__importDefault(t(14041));t(4418);const f=({className:b,children:g,..._})=>o.default.createElement("span",{className:(0,s.default)("kt-badge",b),..._},g);e.Badge=f},48412:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Button=void 0;const n=t(85608),s=n.__importDefault(t(53373)),o=n.__importDefault(t(14041)),f=t(99613),b=t(54713);t(71682);const g=()=>o.default.createElement("svg",{viewBox:"0 0 1024 1024",focusable:"false",className:"kt-button-anticon-spin","data-icon":"loading",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true"},o.default.createElement("path",{d:"M988 548c-19.9 0-36-16.1-36-36 0-59.4-11.6-117-34.6-171.3a440.45 440.45 0 0 0-94.3-139.9 437.71 437.71 0 0 0-139.9-94.3C629 83.6 571.4 72 512 72c-19.9 0-36-16.1-36-36s16.1-36 36-36c69.1 0 136.2 13.5 199.3 40.3C772.3 66 827 103 874 150c47 47 83.9 101.8 109.7 162.7 26.7 63.1 40.2 130.2 40.2 199.3.1 19.9-16 36-35.9 36z"}));function _(){}e.Button=o.default.memo(({children:E,loading:u,className:h,type:c="primary",htmlType:r,size:l,ghost:a=!1,onClick:d,disabled:m,block:p,iconClass:v,icon:y,more:S,moreIconClass:A,menu:T,moreVisible:D,placement:w,title:I,onVisibleChange:R,...M})=>{const O=(0,s.default)("kt-button",h,{[`kt-${c}-button-loading`]:u,[`ghost-${c}-button`]:a&&!u&&c!=="link",[`${c}-button`]:c,[`${l}-button-size`]:l,"ghost-button":a&&c!=="link","block-button":p}),P=(0,s.default)(h,{"kt-clickable-icon":!!d});if(c==="icon")return o.default.createElement(b.Icon,{tooltip:I,disabled:m,icon:y,onClick:u||m?_:d,className:P,iconClass:v,...M});const L=v?o.default.createElement(b.Icon,{iconClass:v,disabled:m}):null;return T?o.default.createElement(f.Dropdown,{visible:D,className:"kt-menu",overlay:T,trigger:["click"],onVisibleChange:R,placement:w},o.default.createElement("button",{...M,disabled:m,className:O,type:r,onClick:u||m?_:d},u&&c!=="link"&&o.default.createElement(g,null),L&&L,E,S&&o.default.createElement(b.Icon,{iconClass:A||(0,b.getIcon)("down"),className:"kt-button-secondary-more"}))):o.default.createElement("button",{...M,disabled:m,className:O,type:r,onClick:u||m?_:d},u&&c!=="link"&&o.default.createElement(g,null),L&&L,E)})},7273:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CheckBox=void 0;const n=t(85608),s=n.__importDefault(t(53373)),o=n.__importDefault(t(14041)),f=t(65973);t(6099);const b=()=>o.default.createElement("svg",{fill:"currentColor",width:"1em",height:"1em",viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg"},o.default.createElement("path",{d:"M912 190h-69.9c-9.8 0-19.1 4.5-25.1 12.2L404.7 724.5 207 474c-6.1-7.7-15.3-12.2-25.1-12.2H112c-6.7 0-10.4 7.7-6.3 12.9l273.9 347c12.8 16.2 37.4 16.2 50.3 0l488.4-618.9c4.1-5.1.4-12.8-6.3-12.8z"})),g=({insertClass:_,className:E,label:u,size:h="default",disabled:c,checked:r,wrapTabIndex:l,...a})=>{(0,f.warning)(!_,"`insertClass` was deprecated, please use `className` instead");const d=a;return d.checked=r??!1,o.default.createElement("label",{className:(0,s.default)("kt-checkbox",_,E,{"kt-checkbox-large":h==="large","kt-checkbox-disabled":c}),tabIndex:l},o.default.createElement("span",{className:"kt-checkbox-lump"},o.default.createElement("input",{type:"checkbox",disabled:c,...d}),o.default.createElement("span",{className:"kt-checkbox-icon"},o.default.createElement(b,null))),u||" ")};e.CheckBox=g,e.CheckBox.displayName="OpenSumiCheckBox"},58998:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ClickOutside=void 0;const s=t(85608).__importDefault(t(14041)),o=({mouseEvents:f=["click"],onOutsideClick:b,children:g,..._})=>{const E=s.default.useRef(null),u=s.default.useCallback(h=>{E.current&&h.target&&!E.current.contains(h.target)&&b(h)},[b]);return s.default.useEffect(()=>(f.forEach(h=>{window.addEventListener(h,u,!0)}),()=>{f.forEach(h=>{window.removeEventListener(h,u,!0)})}),[f]),s.default.createElement("div",{..._,ref:E},g)};e.ClickOutside=o},50570:(x,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MessageType=void 0;var t;(function(n){n[n.Error=0]="Error",n[n.Warning=1]="Warning",n[n.Info=2]="Info",n[n.Empty=3]="Empty"})(t||(e.MessageType=t={}))},89832:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Dialog=e.DialogContent=void 0;const n=t(85608),s=n.__importDefault(t(53373)),o=n.__importDefault(t(14041)),f=t(43718),b=t(48412),g=t(50570),_=t(54713),E=t(79024);t(65773);const u=({onCancel:r,onOk:l,cancelText:a,okText:d})=>o.default.createElement(o.default.Fragment,null,o.default.createElement(b.Button,{onClick:r,type:"secondary"},a||(0,f.localize)("ButtonCancel")),o.default.createElement(b.Button,{onClick:l},d||(0,f.localize)("ButtonOK"))),h=({onClose:r,closable:l,type:a="confirm",messageType:d=g.MessageType.Info,icon:m,message:p,buttons:v,title:y,onOk:S,onCancel:A,okText:T,cancelText:D})=>{const{getIcon:w}=o.default.useContext(_.IconContext);return o.default.createElement(o.default.Fragment,null,o.default.createElement("div",{className:"kt-dialog-content"},m&&o.default.createElement("div",{style:{color:m.color},className:(0,s.default)("kt-dialog-icon",(0,_.getIcon)(m.className)||w(m.className))}),o.default.createElement("div",{className:"kt-dialog-content_area"},o.default.createElement("div",{className:"kt-dialog-content_title"},y),p&&o.default.createElement("span",{className:"kt-dialog-message"},p)),l&&a!=="basic"&&o.default.createElement("button",{className:(0,s.default)("kt-dialog-closex",(0,_.getIcon)("close")),onClick:r})),d!==g.MessageType.Empty&&a!=="basic"&&o.default.createElement("div",{className:"kt-dialog-buttonWrap"},a==="confirm"?v||o.default.createElement(u,{onCancel:A,onOk:S,okText:T,cancelText:D}):o.default.createElement(b.Button,{onClick:r},"OK")))};e.DialogContent=h;const c=({visible:r,onClose:l,closable:a,afterClose:d,messageType:m,icon:p,message:v,detail:y,buttons:S,type:A="confirm",title:T,onOk:D,onCancel:w,okText:I,cancelText:R,getContainer:M,keyboard:O,...P})=>o.default.createElement(E.Overlay,{visible:r,onClose:l,title:A==="basic"?T:null,closable:A==="basic",getContainer:M,keyboard:O,footer:A==="basic"?S||o.default.createElement(u,{onCancel:w,onOk:D,okText:I,cancelText:R}):void 0,afterClose:d,...P},o.default.createElement(e.DialogContent,{title:v,message:y,buttons:S,visible:r,icon:p,...P}));e.Dialog=c},99665:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});const n=t(85608),s=n.__importDefault(t(62596)),o=n.__importDefault(t(53373)),f=n.__importStar(t(14041)),b=t(48412),g=n.__importDefault(t(35060)),_=E=>{var u;const{prefixCls:h,type:c="primary",size:r="default",danger:l,disabled:a,loading:d,onClick:m,htmlType:p,children:v,className:y,overlay:S,trigger:A,align:T,visible:D,onVisibleChange:w,placement:I,getPopupContainer:R,href:M,icon:O=f.createElement(s.default,null),title:P,buttonsRender:L=U=>U,mouseEnterDelay:N,mouseLeaveDelay:k,overlayClassName:B,overlayStyle:F,...W}=E,V=h||"kt-dropdown-button",H={align:T,overlay:S,disabled:a,trigger:a?[]:A,getPopupContainer:R,mouseEnterDelay:N,mouseLeaveDelay:k,overlayClassName:B,overlayStyle:F};H.placement=(u=E?.placement)!==null&&u!==void 0?u:"bottomRight";const G=f.createElement(b.Button,{size:r,type:c,disabled:a,loading:d,onClick:m,htmlType:p,title:P},v),K=f.createElement(b.Button,{size:r,type:c},O??f.createElement(s.default,null)),[z,j]=L([G,K]);return f.createElement("div",{...W,className:(0,o.default)(V,y)},z,f.createElement(g.default,{...H},j))};e.default=_},35060:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});const n=t(85608),s=n.__importDefault(t(64797)),o=n.__importDefault(t(53373)),f=n.__importDefault(t(9527)),b=n.__importDefault(t(14041)),g=t(43953),_=t(65973),E=(0,g.tuple)("topLeft","topCenter","topRight","bottomLeft","bottomCenter","bottomRight");class u extends b.default.Component{constructor(){super(...arguments),this.renderOverlay=c=>{const{overlay:r}=this.props;let l;typeof r=="function"?l=r():l=r,l=b.default.Children.only(l);const a=l.props;(0,_.warning)(!a.mode||a.mode==="vertical",`[Dropdown] mode="${a.mode}" is not supported for Dropdown's Menu.`);const{selectable:d=!1,focusable:m=!0}=a,p=b.default.createElement("span",{className:`${c}-menu-submenu-arrow`},b.default.createElement(s.default,{className:`${c}-menu-submenu-arrow-icon`}));return typeof l.type=="string"?r:b.default.cloneElement(l,{mode:"vertical",selectable:d,focusable:m,expandIcon:p})},this.renderDropDown=()=>{const{prefixCls:c,children:r,trigger:l,disabled:a,getPopupContainer:d}=this.props,m=c||"kt-dropdown",p=b.default.Children.only(r),v=b.default.cloneElement(p,{className:(0,o.default)(p.props.className,`${m}-trigger`),disabled:a}),y=a?[]:l;let S;return y&&y.indexOf("contextMenu")!==-1&&(S=!0),b.default.createElement(f.default,{alignPoint:S,...this.props,prefixCls:m,getPopupContainer:d,transitionName:this.getTransitionName(),trigger:y,overlay:()=>this.renderOverlay(m)},v)}}getTransitionName(){const{placement:c="",transitionName:r}=this.props;return r!==void 0?r:c.indexOf("top")>=0?"slide-down":"slide-up"}render(){return this.renderDropDown()}}u.defaultProps={mouseEnterDelay:.15,mouseLeaveDelay:.1,placement:"bottomLeft"},e.default=u},99613:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DropdownButton=e.Dropdown=void 0;const n=t(85608),s=n.__importDefault(t(35060));e.Dropdown=s.default;const o=n.__importDefault(t(99665));e.DropdownButton=o.default,t(34643)},80564:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Icon=e._InternalIcon=e.IconContext=void 0,e.IconContextProvider=g;const n=t(85608),s=n.__importDefault(t(53373)),o=n.__importDefault(t(14041)),f=t(12122),b=t(76577);t(1914),e.IconContext=o.default.createContext({getIcon:(E,u)=>E});function g(E){return o.default.createElement(e.IconContext.Provider,{value:E.value},o.default.createElement(e.IconContext.Consumer,null,u=>E.value===u?E.children:null))}const _=function(E,u){const{size:h="small",loading:c,icon:r,iconClass:l,className:a,tooltip:d,rotate:m,anim:p,fill:v,disabled:y,onClick:S,children:A,resourceOptions:T,animate:D,style:w={},...I}=E,R={rotate:m,anim:p,fill:v};let M;if(r)if(f.defaultIconMap[r])M=(0,b.getIcon)(r,R);else{const{getIcon:O,getResourceIcon:P}=o.default.useContext(e.IconContext);T&&P?M=P(r,T):M=O(r,R)}else M=l;return D&&D==="spin"&&(w.animation="kt-icon-spin 1.5s steps(30) infinite"),o.default.createElement("span",{...I,title:d,onClick:S,ref:u,className:(0,s.default)("kt-icon",M,a,{"kt-icon-loading":c,"kt-icon-disabled":!!y,[`kt-icon-${h}`]:!!h,"kt-icon-clickable":!!S,"kt-icon-resource":!!T,expanded:!!T&&T.isOpenedDirectory}),style:w},A)};e._InternalIcon=o.default.memo(o.default.forwardRef(_)),e.Icon=o.default.memo(o.default.forwardRef(_))},10391:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.createFromIconfontCN=h;const n=t(85608),s=n.__importDefault(t(53373)),o=n.__importDefault(t(14041)),f=t(80564),b=t(76577),g=new Set;function _(c){return!!(typeof c=="string"&&c.length&&!g.has(c))}function E(c,r=0){const l=c[r];if(_(l)){const a=document.createElement("script");a.setAttribute("src",l),a.setAttribute("data-namespace",l),c.length>r+1&&(a.onload=()=>{E(c,r+1)},a.onerror=()=>{E(c,r+1)}),g.add(l),document.body.appendChild(a)}}const u={width:"1em",height:"1em",fill:"currentColor"};function h(c={}){const{scriptUrl:r,extraCommonProps:l={}}=c;r&&typeof document<"u"&&typeof window<"u"&&typeof document.createElement=="function"&&(Array.isArray(r)?E(r.reverse()):E([r]));const a=o.default.forwardRef((d,m)=>{const{icon:p,children:v,rotate:y,anim:S,fill:A,className:T="",...D}=d,w={rotate:y,anim:S,fill:A};let I=null;p&&(I=o.default.createElement("svg",{...u,focusable:"false"},o.default.createElement("use",{xlinkHref:`#${p}`}))),v&&(I=v);const R=(0,b.getIconShapeClxList)(w);return o.default.createElement(f._InternalIcon,{...l,...D,className:(0,s.default)(T,R),ref:m},I)});return a.displayName="Iconfont",a}},12122:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.iconManager=e.defaultIconMap=e.defaultIconfont=void 0;const s=t(85608).__importDefault(t(65973)),o=t(81139);Object.defineProperty(e,"defaultIconfont",{enumerable:!0,get:function(){return o.defaultIconfont}});const f={"search-close":"close-square",fold:"collapse-all","setting-general":"setting","setting-file":"file-text","setting-extension":"extension","run-debug":"start","toggle-breakpoints":"deactivate-breakpoints",withdraw:"fallback",terminate1:"stop",stop1:"stop",add:"plus",rundebug:"start",terminate:"stop"},b=Object.assign({},o.defaultIconfont,f);e.defaultIconMap=new Proxy(b,{get(E,u){const h=f[u];return(0,s.default)(!h,`Icon '${u}' was a typo, please use '${h}' instead`),E[u]}});class g{constructor(){this._ktIconPrefixes=[],this._iconMap={}}update(u,h){this._iconMap[u]=h,this._ktIconPrefixes.push(u)}getIconClx(u){if(!u)return(0,s.default)(!1,"not a valid icon key:"+u),[];let h=this._ktIconPrefixes.length;for(;!this._iconMap[this._ktIconPrefixes[--h]][u]&&h!==0;);const c=this._iconMap[this._ktIconPrefixes[h]][u];return c?[`${this._ktIconPrefixes[h]}${c}`]:((0,s.default)(!1,"\u56FE\u6807\u5E93\u7F3A\u5931\u56FE\u6807:"+u),[])}}e.iconManager=new g,e.iconManager.update("kaitian-icon kticon-",e.defaultIconMap)},81139:(x,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.defaultIconfont=void 0,e.defaultIconfont={"Gitlab-fill":"Gitlab-fill",PR:"PR",ab:"ab",abl:"abl","activate-breakpoints":"activate-breakpoints","add-comments":"add-comments",afresh:"afresh","arrow-down":"arrow-down","arrow-right":"arrow-right",arrowdown:"arrowdown",arrowleft:"arrowleft",arrowright:"arrowright",arrowup:"arrowup",bash:"bash",bell:"bell",branches:"branches","breakpoint-activate":"breakpoint-activate","breakpoint-deactivate":"breakpoint-deactivate","breakpoint-disabled":"breakpoint-disabled","breakpoint-enabled":"breakpoint-enabled","breakpoint-stop":"breakpoint-stop","breakpoint-stop-before":"breakpoint-stop-before",brew:"brew","browser-preview":"browser-preview","caret-right":"caret-right",check:"check","check-circle-fill":"check-circle-fill","check-close-circle-o":"check-close-circle-o","check-square-o":"check-square-o","circle-pause":"circle-pause",clear:"clear","clear-bold":"clear-bold",close:"close","close-all":"close-all","close-circle":"close-circle","close-circle-fill":"close-circle-fill",close1:"close1",close_square:"close_square","cloud-download":"cloud-download","cloud-server":"cloud-server",code:"code","collapse-all":"collapse-all",commit:"commit","content-search":"content-search",continue:"continue",control:"control",copy:"copy","create-pullrequest":"create-pullrequest","deactivate-breakpoints":"deactivate-breakpoints",debug:"debug","debug-alt-small":"debug-alt-small","debug-restart-frame":"debug-restart-frame","default-menu-icon":"default-menu-icon",delete:"delete",deploy:"deploy",detail:"detail",discard:"discard",disconnect:"disconnect","dock-down":"dock-down","dock-right":"dock-right",doubleleft:"doubleleft",doubleright:"doubleright",down:"down","down-arrow":"down-arrow",download:"download",drag:"drag",edit:"edit",editor:"editor",ellipsis:"ellipsis",embed:"embed",error:"error",expand:"expand","expand-all":"expand-all",experiment:"experiment",explorer:"explorer",extension:"extension",eye:"eye","eye-close":"eye-close","file-copy":"file-copy","file-default":"file-default","file-exclamation":"file-exclamation","file-text":"file-text",filter:"filter",focus:"focus",folder:"folder","folder-default":"folder-default","follow-cursor":"follow-cursor",fullescreen:"fullescreen",fullscreen:"fullscreen","fullscreen-exit":"fullscreen-exit",git:"git","github-fill":"github-fill",gitlab:"gitlab","global-search":"global-search",go:"go",hex:"hex","info-circle":"info-circle","info-circle-fill":"info-circle-fill",insert:"insert",java:"java",keyboard:"keyboard",kotlin:"kotlin",layout:"layout",layout1:"layout1",left:"left","left-nav-close":"left-nav-close","left-nav-open":"left-nav-open","left-right-subfield":"left-right-subfield",line:"line",link:"link",loading:"loading","magic-wand":"magic-wand",max:"max","menubar-dashboard-back":"menubar-dashboard-back","menubar-edit":"menubar-edit","menubar-file":"menubar-file","menubar-go":"menubar-go","menubar-selection":"menubar-selection","menubar-setting":"menubar-setting","menubar-tool":"menubar-tool","menubar-view":"menubar-view","menubar-workspace":"menubar-workspace",message:"message",min:"min",minus:"minus",mobile:"mobile","mobile-phone":"mobile-phone",more:"more","new-file":"new-file","new-folder":"new-folder",node:"node",open:"open","open-changes":"open-changes",openfile:"openfile","out-link":"out-link",pause:"pause",pin:"pin",pipeline:"pipeline",plus:"plus","project-information":"project-information",python:"python","question-circle":"question-circle","question-circle-o":"question-circle-o",receive:"receive",refresh:"refresh",regex:"regex",reload:"reload",replace:"replace",repository:"repository",retrieval:"retrieval",revoke:"revoke","revoke-white":"revoke-white",right:"right","right-arrow":"right-arrow",rollback:"rollback",run:"run",rust:"rust","save-all":"save-all",scm:"scm",search:"search",send:"send","send-hollow":"send-hollow","send-solid":"send-solid",setting:"setting",sever:"sever",share:"share",shrink:"shrink",smile:"smile",start:"start",step:"step","step-in":"step-in","step-out":"step-out",stop:"stop",swap:"swap",sync:"sync",team:"team",terminal:"terminal",test:"test",thumbs:"thumbs","thumbs-fill":"thumbs-fill",thumbsdown:"thumbsdown","thumbsdown-fill":"thumbsdown-fill","time-circle":"time-circle",toolkit:"toolkit",tree:"tree",undock:"undock",unfullscreen:"unfullscreen",unmax:"unmax",unorderedlist:"unorderedlist",unpin:"unpin",up:"up","up-down-subfield":"up-down-subfield",vim:"vim",wait:"wait","warning-circle":"warning-circle",window:"window","window-close":"window-close","window-maximize":"window-maximize",zsh:"zsh"}},54713:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.createFromIconfontCN=void 0;const n=t(85608);n.__exportStar(t(80564),e),n.__exportStar(t(76577),e);var s=t(10391);Object.defineProperty(e,"createFromIconfontCN",{enumerable:!0,get:function(){return s.createFromIconfontCN}})},76577:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.updateKaitianIconMap=e.getKaitianIcon=e.ANIM_TYPE=e.ROTATE_TYPE=void 0,e.updateIconMap=g,e.getIconShapeClxList=_,e.getIcon=E;const n=t(12122);var s;(function(u){u[u.rotate_90=0]="rotate_90",u[u.rotate_180=1]="rotate_180",u[u.rotate_270=2]="rotate_270",u[u.flip_horizontal=3]="flip_horizontal",u[u.flip_vertical=4]="flip_vertical",u[u.flip_both=5]="flip_both"})(s||(e.ROTATE_TYPE=s={}));var o;(function(u){u[u.spin=0]="spin",u[u.pulse=1]="pulse"})(o||(e.ANIM_TYPE=o={}));const f=["rotate-90","rotate-180","rotate-270","flip-horizontal","flip-vertical","flip-both"],b=["spin","pulse"];function g(u,h){n.iconManager.update(u,h)}function _(u){const{rotate:h,anim:c,fill:r}=u||{},l=[];return h!==void 0&&l.push(`iconfont-${f[h]}`),c!==void 0&&l.push(`iconfont-anim-${b[c]}`),r&&l.push("toggled"),l}function E(u,h){const c=n.iconManager.getIconClx(u),r=_(h);return c.push(...r),c.join(" ")}e.getKaitianIcon=E,e.updateKaitianIconMap=g},97267:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});const n=t(85608);t(39328),n.__exportStar(t(48412),e),n.__exportStar(t(79383),e),n.__exportStar(t(50708),e),n.__exportStar(t(7273),e),n.__exportStar(t(14640),e),n.__exportStar(t(54076),e),n.__exportStar(t(79024),e),n.__exportStar(t(89832),e),n.__exportStar(t(54713),e),n.__exportStar(t(18875),e),n.__exportStar(t(91397),e),n.__exportStar(t(31059),e),n.__exportStar(t(72871),e),n.__exportStar(t(91416),e),n.__exportStar(t(34128),e),n.__exportStar(t(50570),e),n.__exportStar(t(77011),e),n.__exportStar(t(3660),e),n.__exportStar(t(58998),e),n.__exportStar(t(4981),e),n.__exportStar(t(99613),e)},15857:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.HistoryInputBox=void 0;const s=t(85608).__importDefault(t(14041)),o=t(44198),f=t(63924);class b extends s.default.Component{constructor(){super(...arguments),this.inputRef=s.default.createRef(),this.addToHistory=_=>{this.history&&_&&_!==this.getCurrentValue()&&this.history.add(_)},this.getHistory=()=>this.history&&this.history.getHistory()||[],this.showNextValue=()=>{const _=this.getCurrentValue()||"";this.history&&!this.history.has(_)&&this.addToHistory(_);let E=this.getNextValue();E&&(E=E===_?this.getNextValue():E),E&&this.onValueChange(E)},this.showPreviousValue=()=>{const _=this.getCurrentValue()||"";this.history&&!this.history.has(_)&&this.addToHistory(_);let E=this.getPreviousValue();E&&(E=E===_?this.getPreviousValue():E),E&&this.onValueChange(E)},this.clearHistory=()=>{this.history&&this.history.clear()},this.getCurrentValue=()=>{if(!this.history)return null;let _=this.history.current();return _||(_=this.history.last(),this.history.next()),_},this.getPreviousValue=()=>this.history&&(this.history.previous()||this.history.first())||null,this.getNextValue=()=>this.history&&(this.history.next()||this.history.last())||null,this.onValueChange=_=>{const{onValueChange:E}=this.props;this.setState({inputValue:_}),E&&E(_)},this.onKeyDown=_=>{const{onKeyDown:E}=this.props;E&&E(_)},this.focus=()=>{this.inputRef&&this.inputRef.current&&this.inputRef.current.focus()}}componentDidMount(){var _;const{history:E,onReady:u}=this.props;this.history=new o.HistoryNavigator(E||[],100),this.inputProps={...this.props},delete this.inputProps.onReady,this.setState({inputValue:((_=this.props.value)!==null&&_!==void 0?_:this.props.defaultValue)||""}),typeof u=="function"&&u({addToHistory:this.addToHistory,getHistory:this.getHistory,clearHistory:this.clearHistory,getCurrentValue:this.getCurrentValue,showNextValue:this.showNextValue,showPreviousValue:this.showPreviousValue,focus:this.focus})}render(){const _=this.state&&this.state.inputValue;return s.default.createElement(f.Input,{ref:this.inputRef,...this.inputProps,onValueChange:this.onValueChange,onKeyDown:this.onKeyDown,value:_})}}e.HistoryInputBox=b},63924:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Input=void 0;const n=t(85608),s=n.__importDefault(t(53373)),o=n.__importDefault(t(14041)),f=t(54713),b=n.__importDefault(t(65973));t(41065);function g(E){return typeof E>"u"}function _(E,u,h){if(typeof h=="function"){let c=u;if(u.type==="click"){c=Object.create(u),c.target=E,c.currentTarget=E;const r=E.value;E.value="",h(c),E.value=r;return}h(c)}}e.Input=o.default.forwardRef((E,u)=>{const{defaultValue:h,className:c,wrapperStyle:r,size:l="default",controls:a,onChange:d,selection:m,addonBefore:p,addonAfter:v,persistFocus:y=!0,hasClear:S,afterClear:A,value:T,onValueChange:D,onPressEnter:w,onKeyDown:I,as:R="input",...M}=E;(0,b.default)(!a,"[@opensumi/ide-components Input]: `controls` was deprecated, please use `addonAfter` instead");const O=o.default.useRef(null),[P,L]=o.default.useState(!1),[N,k]=o.default.useState(()=>(T??h)||""),[B,F]=o.default.useState(()=>(T??h)||"");o.default.useImperativeHandle(u,()=>O.current),o.default.useEffect(()=>{m&&!g(m.start)&&!P&&O.current.setSelectionRange(m.start,m.end)},[m,P]),o.default.useEffect(()=>{T===null||typeof T>"u"||(T!==B&&T!==N&&k(T),T!==B&&F(T))},[T]);const W=$=>{H($.target.value),_(O.current,$,d)},V=$=>{$.preventDefault(),H(""),_(O.current,$,d),typeof A=="function"&&A()},H=$=>{k($),typeof D=="function"&&D($),P||L(!0)},G=$=>{$.keyCode===13&&typeof w=="function"&&w($),typeof I=="function"&&I($)},K=v||a,z=y?{onMouseDown:$=>{$.preventDefault()}}:{},j=($,Y)=>$?o.default.createElement("div",{className:(0,s.default)("kt-input-addon",Y),...z},o.default.Children.map($,Q=>o.default.isValidElement(Q)?o.default.cloneElement(Q,z):null)):null,U=(0,s.default)("kt-input",c,{[`kt-input-${l}`]:l,"kt-input-disabled":E.disabled});return o.default.createElement("div",{className:U,style:r},j(p,"kt-input-addon-before"),o.default.createElement("div",{className:"kt-input-box"},o.default.createElement(R,{ref:O,type:"text",autoCapitalize:"off",autoCorrect:"off",autoComplete:"off",spellCheck:!1,...M,value:N,onChange:W,onKeyDown:G}),S&&N&&o.default.createElement(f.Icon,{className:"kt-input-clear",icon:"close-circle-fill",onClick:V,...z})),j(K,"kt-input-addon-after"))}),e.Input.displayName="OpenSumiInput"},64545:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.InputNumber=void 0;const n=t(85608),s=n.__importDefault(t(53373)),o=n.__importDefault(t(99158)),f=n.__importDefault(t(14041));t(41065),t(17107);const b="kt-input-number",g=_=>{const{value:E,size:u="default",wrapperStyle:h,className:c,disabled:r,min:l,max:a,onChange:d,...m}=_,p=y=>{d&&d(y)},v=(0,s.default)("kt-input","kt-input-number",c,{[`kt-input-${u}`]:u,"kt-input-disabled":r});return f.default.createElement("div",{className:v,style:h},f.default.createElement("div",{className:"kt-input-box"},f.default.createElement(o.default,{prefixCls:b,min:l,max:a,value:E,type:"number",onChange:p,controls:!0,...m})))};e.InputNumber=g,e.InputNumber.displayName="OpenSumiInputNumber"},10413:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.bindInputElement=g;const s=t(85608).__importDefault(t(14041)),o=t(63924);class f extends s.default.Component{constructor(){super(...arguments),this.placeholderInputRef=s.default.createRef()}render(){const E={...this.props};return delete E.inputElement,delete E.innerRef,s.default.createElement(o.Input,{...E,type:"text",id:this.props.id,ref:this.placeholderInputRef})}componentDidMount(){const{innerRef:E,inputElement:u}=this.props;this.placeholderInputRef.current.parentElement.replaceChild(u,this.placeholderInputRef.current),this.applyAttributes(),u.focus(),typeof E=="function"?E(u):E!==null&&typeof E=="object"&&E.current===null&&(E.current=u)}UNSAFE_componentWillUnmount(){const{innerRef:E,inputElement:u}=this.props;u.parentElement.replaceChild(this.placeholderInputRef.current,u),E!==null&&typeof E=="object"&&E.current&&(E.current=null)}shouldComponentUpdate(E){return this.applyAttributes(E),!1}applyAttributes(E=this.props){const{className:u,id:h,inputElement:c,style:r}=E;if(typeof u=="string"&&(c.className=u),typeof h=="string"&&(c.id=h),r!==null&&typeof r=="object")for(const l in r)typeof r[l]=="string"&&c[l]&&(c[l]=r[l])}}const b=s.default.forwardRef((_,E)=>s.default.createElement(f,{..._,innerRef:E}));function g(_){return E=>s.default.createElement(b,{...E,inputElement:_})}},61172:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TextArea=void 0;const s=t(85608).__importDefault(t(14041)),o=t(63924);e.TextArea=s.default.forwardRef((f,b)=>s.default.createElement(o.Input,{...f,as:"textarea",ref:b})),e.TextArea.displayName="OpenSumiTextArea"},34390:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ValidateInput=e.VALIDATE_TYPE=void 0;const n=t(85608),s=n.__importDefault(t(53373)),o=n.__importDefault(t(14041)),f=t(63924);t(13254);var b;(function(g){g[g.INFO=1]="INFO",g[g.ERROR=2]="ERROR",g[g.WARNING=3]="WARNING",g[g.IGNORE=4]="IGNORE"})(b||(e.VALIDATE_TYPE=b={})),e.ValidateInput=o.default.forwardRef(({type:g,className:_,validate:E,onChange:u,onValueChange:h,validateMessage:c,popup:r=!0,...l},a)=>{const[d,m]=o.default.useState();o.default.useEffect(()=>{m(c)},[c]);const p=(0,s.default)({"validate-error":d&&d.type===b.ERROR,"validate-warning":d&&d.type===b.WARNING,"validate-info":d&&d.type===b.INFO}),v=()=>{if(d&&d.message)return o.default.createElement("div",{className:(0,s.default)("validate-message",p,{popup:r})},d.message)},y=S=>{const A=S.target;let T;if(A.type==="number"?T=S.target.valueAsNumber:T=S.target.value,typeof E=="function"){let D;g==="number"?/^[0-9]+$/.test(T)?D=E(Number(T)):D=E(String(T)):D=E(T),m(D)}typeof u=="function"&&u(S),typeof h=="function"&&h(T)};return o.default.createElement("div",{className:(0,s.default)("input-box",{popup:r})},o.default.createElement(f.Input,{type:g,ref:a,className:(0,s.default)(_,d,p),onChange:y,...l}),v())}),e.ValidateInput.displayName="ValidateInput"},50708:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});const n=t(85608);n.__exportStar(t(61172),e),n.__exportStar(t(63924),e),n.__exportStar(t(34390),e),n.__exportStar(t(10413),e),n.__exportStar(t(64545),e)},3660:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),t(85608).__exportStar(t(3205),e)},3205:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Loading=void 0;const s=t(85608).__importDefault(t(14041));t(21221),e.Loading=s.default.memo(()=>s.default.createElement("div",{className:"loading_indicator"})),e.Loading.displayName="Loading"},4981:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LocalizeContext=void 0,e.LocalizeContextProvider=g,e.ComponentContextProvider=_;const s=t(85608).__importDefault(t(14041)),o=t(54713),f=t(65973),b=E=>((0,f.warning)(!1,"Using the default localize fn"),"");e.LocalizeContext=s.default.createContext({localize:b}),e.LocalizeContext.displayName="LocalizeContext";function g(E){return s.default.createElement(e.LocalizeContext.Provider,{value:E.value},s.default.createElement(e.LocalizeContext.Consumer,null,u=>E.value===u?E.children:null))}function _(E){return s.default.createElement(o.IconContextProvider,{value:E.value},s.default.createElement(g,{value:{localize:E.value.localize}},E.children))}},13719:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});const n=t(85608);n.__exportStar(t(44547),e),n.__exportStar(t(32592),e)},32592:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MarkdownReactParser=void 0;const n=t(33714);class s extends n.marked.Renderer{constructor(f){super(),this.unescapeInfo=new Map([["&quot;",'"'],["&nbsp;"," "],["&amp;","&"],["&#39;","'"],["&lt;","<"],["&gt;",">"]]),this.renderer=f.renderer}parse(f){return f.map(b=>{switch(b.type){case"html":return this.renderer.html(b.text);case"space":return null;case"heading":{const g=b.depth;return this.renderer.heading(this.parseInline(b.tokens),g)}case"paragraph":return this.renderer.paragraph(this.parseInline(b.tokens));case"text":{const g=b;return g.tokens?this.parseInline(g.tokens):b.text}case"blockquote":{const g=b,_=this.parse(g.tokens);return this.renderer.blockquote(_)}case"list":{const _=b.items.map(E=>{var u;const h=[];return E.task&&h.push(this.renderer.checkbox((u=E.checked)!==null&&u!==void 0?u:!1)),h.push(this.parse(E.tokens)),this.renderer.listItem(h)});return this.renderer.list(_,b.ordered)}case"code":return this.renderer.code(b.text,b.lang);case"table":{const g=b,_=g.header.map((r,l)=>this.renderer.tableCell(this.parseInline(r.tokens),{header:!0,align:b.align[l]})),E=this.renderer.tableRow(_),u=this.renderer.tableHeader(E),h=g.rows.map(r=>{const l=r.map((a,d)=>this.renderer.tableCell(this.parseInline(a.tokens),{header:!1,align:b.align[d]}));return this.renderer.tableRow(l)}),c=this.renderer.tableBody(h);return this.renderer.table([u,c])}case"hr":return this.renderer.hr();default:return console.warn(`Token with "${b.type}" type was not found`),null}})}parseInline(f=[]){return f.map(b=>{switch(b.type){case"text":{const g=b.text.replace(/&(#\d+|[a-zA-Z]+);/g,_=>{var E;return(E=this.unescapeInfo.get(_))!==null&&E!==void 0?E:_});return this.renderer.text(g)}case"strong":return this.renderer.strong(this.parseInline(b.tokens));case"em":return this.renderer.em(this.parseInline(b.tokens));case"del":return this.renderer.del(this.parseInline(b.tokens));case"codespan":return this.renderer.codespan(unescape(b.text));case"link":return this.renderer.link(b.href,this.parseInline(b.tokens));case"image":return this.renderer.image(b.href,b.text,b.title);case"html":return this.renderer.html(b.text);case"br":return this.renderer.br();case"escape":return this.renderer.text(b.text);default:return console.warn(`Token with "${b.type}" type was not found`),null}})}}e.MarkdownReactParser=s},44547:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MarkdownReactRenderer=void 0;const s=t(85608).__importStar(t(14041));class o{constructor(b={}){this.uid=0,this.options=b}node(b,g=null,_={}){const E={key:`marked-react-${this.uid}`};return this.incrementUID(),(0,s.createElement)(b,{..._,...E},g)}incrementUID(){this.uid+=1}heading(b,g){return this.node(`h${g}`,b)}paragraph(b){return this.node("p",b)}joinBase(b,g){if(!g)return b;try{return new URL(b,g).href}catch{return b}}link(b,g){const _=this.joinBase(b,this.options.baseURL);return this.node("a",g,{href:_,target:"_blank",rel:"noopener noreferrer"})}image(b,g,_=null){const E=this.joinBase(b,this.options.baseURL);return this.node("img",null,{src:E,alt:g,title:_})}codespan(b,g=null){const _=g?`${this.options.langPrefix}${g}`:null;return this.node("code",b,{className:_})}code(b,g){return this.node("pre",this.codespan(b,g))}blockquote(b){return this.node("blockquote",b)}list(b,g){return this.node(g?"ol":"ul",b)}listItem(b){return this.node("li",b)}checkbox(b){return this.node("input",null,{type:"checkbox",disabled:!0,checked:b})}table(b){return this.node("table",b)}tableHeader(b){return this.node("thead",b)}tableBody(b){return this.node("tbody",b)}tableRow(b){return this.node("tr",b)}tableCell(b,g){const _=g.header?"th":"td";return this.node(_,b,{align:g.align})}strong(b){return this.node("strong",b)}em(b){return this.node("em",b)}del(b){return this.node("del",b)}text(b){return b}html(b){return s.default.createElement("div",{dangerouslySetInnerHTML:{__html:b}})}hr(){return this.node("hr")}br(){return this.node("br")}}e.MarkdownReactRenderer=o},56849:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DefaultMarkedRenderer=e.linkify=void 0,e.Markdown=_;const n=t(85608),s=t(33714),o=n.__importDefault(t(14041)),f=t(39777),b=(E,u,h)=>`<a rel="noopener" ${f.DATA_SET_COMMAND}="${E}" title="${u??E}">${h}</a>`;e.linkify=b;class g extends s.Renderer{link(u,h,c){return(0,e.linkify)(u,h,c)}}e.DefaultMarkedRenderer=g;function _(E){const u=(r,l)=>s.marked.parse(r,{renderer:l}),[h,c]=o.default.useState(u(E.value||"",E.renderer));return o.default.useEffect(()=>{c(u(E.value||"",E.renderer))},[E.renderer,E.value]),o.default.createElement(f.RenderWrapper,{opener:E.opener,html:h})}},39777:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.RenderWrapper=e.DATA_SET_COMMAND=void 0;const s=t(85608).__importStar(t(14041));t(28566),e.DATA_SET_COMMAND="data-command";const o=f=>{const b=(0,s.useRef)(),{html:g,opener:_}=f;(0,s.useEffect)(()=>(b&&b.current&&b.current.addEventListener("click",E),()=>{b&&b.current&&b.current.removeEventListener("click",E)}),[]);const E=u=>{let h=u.target;if(h.className.includes("codicon")&&(h=h.parentNode),h.tagName.toLowerCase()==="a"&&h.hasAttribute(e.DATA_SET_COMMAND)){const c=h.getAttribute(e.DATA_SET_COMMAND);c&&_&&_.open(c)}};return s.default.createElement("div",{className:"kt-md-renderer-wrap",dangerouslySetInnerHTML:{__html:g},ref:b})};e.RenderWrapper=o},98113:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});const s=(0,t(14041).createContext)({inlineCollapsed:!1});e.default=s},64063:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});const n=t(85608),s=t(31363),o=n.__importDefault(t(14041)),f=n.__importDefault(t(98113));class b extends o.default.Component{constructor(){super(...arguments),this.renderItem=()=>{const{title:_,...E}=this.props;return o.default.createElement(f.default.Consumer,null,({inlineCollapsed:u})=>u?o.default.createElement(s.Item,{...E,title:_}):o.default.createElement(s.Item,{...E,title:_}))}}render(){return this.renderItem()}}b.isMenuItem=!0,e.default=b},91886:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});const n=t(85608),s=n.__importDefault(t(39067)),o=t(31363),f=n.__importDefault(t(14041));class b extends f.default.Component{render(){const{popupClassName:_}=this.props;return f.default.createElement(o.SubMenu,{...this.props,popupClassName:_})}}b.contextTypes={antdMenuTheme:s.default.string},b.isSubMenu=1,e.default=b},45803:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Menu=void 0;const n=t(85608),s=n.__importDefault(t(53373)),o=n.__importStar(t(31363)),f=n.__importDefault(t(14041)),b=t(90146),g=t(2835),_=t(47768),E=t(65973),u=n.__importDefault(t(98113)),h=n.__importDefault(t(64063)),c=n.__importDefault(t(91886));t(42985);class r extends f.default.Component{static getDerivedStateFromProps(d,m){const{prevProps:p}=m,v={prevProps:d};return p.mode==="inline"&&d.mode!=="inline"&&(v.switchingModeFromInline=!0),"openKeys"in d?v.openKeys=d.openKeys:(d.inlineCollapsed&&!p.inlineCollapsed&&(v.switchingModeFromInline=!0,v.inlineOpenKeys=m.openKeys,v.openKeys=[]),!d.inlineCollapsed&&p.inlineCollapsed&&(v.openKeys=m.inlineOpenKeys,v.inlineOpenKeys=[])),v}constructor(d){super(d),this.handleMouseEnter=p=>{this.restoreModeVerticalFromInline();const{onMouseEnter:v}=this.props;v&&v(p)},this.handleTransitionEnd=p=>{const v=p.propertyName==="width"&&p.target===p.currentTarget,{className:y}=p.target,S=Object.prototype.toString.call(y)==="[object SVGAnimatedString]"?y.animVal:y,A=p.propertyName==="font-size"&&S.indexOf("anticon")>=0;(v||A)&&this.restoreModeVerticalFromInline()},this.handleClick=p=>{this.handleOpenChange([]);const{onClick:v}=this.props;v&&v(p)},this.handleOpenChange=p=>{this.setOpenKeys(p);const{onOpenChange:v}=this.props;v&&v(p)},this.renderMenu=()=>{const{prefixCls:p,className:v}=this.props,y=this.getRealMenuMode(),S=this.getOpenMotionProps(y),A=p||"kt-inner-menu",T=(0,s.default)(v,{[`${A}-inline-collapsed`]:this.getInlineCollapsed()}),D={openKeys:this.state.openKeys,onOpenChange:this.handleOpenChange,className:T,mode:y,...S};return y!=="inline"&&(D.onClick=this.handleClick),this.getInlineCollapsed()&&(D.openKeys=[]),f.default.createElement(o.default,{...this.props,...D,prefixCls:A,onTransitionEnd:this.handleTransitionEnd,onMouseEnter:this.handleMouseEnter})},(0,E.warning)(!("onOpen"in d||"onClose"in d),"[Menu] `onOpen` and `onClose` are removed, please use `onOpenChange` instead, see: https://u.ant.design/menu-on-open-change."),(0,E.warning)(!("inlineCollapsed"in d&&d.mode!=="inline"),"[Menu] `inlineCollapsed` should only be used when `mode` is inline.");let m;"openKeys"in d?m=d.openKeys:"defaultOpenKeys"in d&&(m=d.defaultOpenKeys),this.state={openKeys:m||[],switchingModeFromInline:!1,inlineOpenKeys:[],prevProps:d}}componentWillUnmount(){_.wrapperRaf.cancel(this.mountRafId)}setOpenKeys(d){"openKeys"in this.props||this.setState({openKeys:d})}getRealMenuMode(){const d=this.getInlineCollapsed();if(this.state.switchingModeFromInline&&d)return"inline";const{mode:m}=this.props;return d?"vertical":m}getInlineCollapsed(){const{inlineCollapsed:d}=this.props;return d}getOpenMotionProps(d){const{openTransitionName:m,openAnimation:p,motion:v}=this.props;return v?{motion:v}:p?((0,E.warning)(typeof p=="string","[Menu] `openAnimation` do not support object. Please use `motion` instead."),{openAnimation:p}):m?{openTransitionName:m}:d==="horizontal"?{motion:{motionName:"slide-up"}}:d==="inline"?{motion:g.collapseMotion}:{motion:{motionName:""}}}restoreModeVerticalFromInline(){const{switchingModeFromInline:d}=this.state;d&&this.setState({switchingModeFromInline:!1})}render(){return f.default.createElement(u.default.Provider,{value:{inlineCollapsed:this.getInlineCollapsed()||!1}},this.renderMenu())}}r.defaultProps={className:"",focusable:!1},(0,b.polyfill)(r);class l extends f.default.Component{render(){return f.default.createElement(r,{...this.props})}}e.Menu=l,l.Divider=o.Divider,l.Item=h.default,l.SubMenu=c.default,l.ItemGroup=o.ItemGroup},31059:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.message=void 0;const s=t(85608).__importDefault(t(71036));t(38663);function o(f){return(b,g)=>new Promise(_=>{s.default[f](b,g,_)})}e.message={success:o("success"),error:o("error"),info:o("info"),warning:o("warning"),loading:o("loading")}},71036:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});const n=t(85608),s=n.__importDefault(t(29517)),o=n.__importDefault(t(96041)),f=n.__importDefault(t(63492)),b=n.__importDefault(t(36117)),g=n.__importDefault(t(59303)),_=n.__importDefault(t(75056)),E=n.__importDefault(t(14041));let u=3,h,c,r=1,l="kt-message",a="move-up",d,m;function p(T){if(c){T(c);return}_.default.newInstance({prefixCls:l,transitionName:a,style:{top:h},getContainer:d,maxCount:m},D=>{if(c){T(c);return}c=D,T(D)})}const v={info:b.default,success:s.default,error:o.default,warning:f.default,loading:g.default};function y(T){const D=T.duration!==void 0?T.duration:u,w=T.key||r++,I=new Promise(M=>{const O=()=>(typeof T.onClose=="function"&&T.onClose(),M(!0));p(P=>{const L=v[T.type];P.notice({key:w,duration:D,style:{},content:E.default.createElement("div",{className:`${l}-custom-content${T.type?` ${l}-${T.type}`:""}`},T.icon||L&&E.default.createElement(L,null),E.default.createElement("span",null,T.content)),onClose:O})})}),R=()=>{c&&c.removeNotice(w)};return R.then=(M,O)=>I.then(M,O),R.promise=I,R}function S(T){return Object.prototype.toString.call(T)==="[object Object]"&&!!T.content}const A={open:y,config(T){T.top!==void 0&&(h=T.top,c=null),T.duration!==void 0&&(u=T.duration),T.prefixCls!==void 0&&(l=T.prefixCls),T.getContainer!==void 0&&(d=T.getContainer),T.transitionName!==void 0&&(a=T.transitionName,c=null),T.maxCount!==void 0&&(m=T.maxCount,c=null)},destroy(){c&&(c.destroy(),c=null)}};["success","info","warning","error","loading"].forEach(T=>{A[T]=(D,w,I)=>S(D)?A.open({...D,type:T}):(typeof w=="function"&&(I=w,w=void 0),A.open({content:D,duration:w,type:T,onClose:I}))}),A.warn=A.warning,e.default=A},6656:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.destroyFns=void 0;const n=t(85608),s=n.__importDefault(t(22143)),o=n.__importDefault(t(53373)),f=n.__importDefault(t(39067)),b=n.__importDefault(t(79773)),g=n.__importDefault(t(25946)),_=n.__importDefault(t(14041)),E=t(48412),u=t(69587);let h;e.destroyFns=[];const c=l=>{h={x:l.pageX,y:l.pageY},setTimeout(()=>h=null,100)};typeof window<"u"&&window.document&&window.document.documentElement&&(0,g.default)(document.documentElement,"click",c);class r extends _.default.Component{constructor(){super(...arguments),this.handleCancel=a=>{const{onCancel:d}=this.props;d&&d(a)},this.handleOk=a=>{const{onOk:d}=this.props;d&&d(a)},this.renderFooter=a=>{const{okText:d,okType:m,cancelText:p,confirmLoading:v}=this.props;return _.default.createElement("div",null,_.default.createElement(E.Button,{onClick:this.handleCancel,...this.props.cancelButtonProps},p||a.cancelText),_.default.createElement(E.Button,{type:m,loading:v,onClick:this.handleOk,...this.props.okButtonProps},d||a.okText))},this.renderModal=()=>{const{prefixCls:a,footer:d,visible:m,wrapClassName:p,centered:v,getContainer:y,closeIcon:S,closable:A=!0,...T}=this.props,D=a||"kt-modal",w=this.renderFooter((0,u.getConfirmLocale)()),I=_.default.createElement("span",{className:`${D}-close-x`},S||_.default.createElement(s.default,{className:`${D}-close-icon`}));return _.default.createElement(b.default,{...T,animation:this.props.animation,getContainer:y,prefixCls:D,wrapClassName:(0,o.default)({[`${D}-centered`]:!!v},p),footer:d===void 0?w:d,visible:m,mousePosition:h,onClose:this.handleCancel,closeIcon:I})}}render(){return this.renderModal()}}r.defaultProps={width:520,confirmLoading:!1,visible:!1,okType:"primary"},r.propTypes={prefixCls:f.default.string,onOk:f.default.func,onCancel:f.default.func,okText:f.default.node,cancelText:f.default.node,centered:f.default.bool,width:f.default.oneOfType([f.default.number,f.default.string]),confirmLoading:f.default.bool,visible:f.default.bool,footer:f.default.node,title:f.default.node,closable:f.default.bool,closeIcon:f.default.node},e.default=r},53017:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Modal=void 0;const s=t(85608).__importDefault(t(6656));e.Modal=s.default,t(61349)},69587:(x,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.changeConfirmLocale=s,e.getConfirmLocale=o;const t={okText:"OK",cancelText:"Cancel",justOkText:"OK"};let n={...t};function s(f){f?n={...n,...f}:n={...t}}function o(){return n}},18875:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.notification=void 0,e.open=h,e.close=c,e.update=r;const n=t(85608),s=n.__importDefault(t(53373)),o=n.__importDefault(t(14041)),f=t(70392),b=t(48412),g=t(50570),_=n.__importDefault(t(70748));t(1477);const E={[g.MessageType.Info]:15,[g.MessageType.Warning]:18,[g.MessageType.Error]:20};_.default.config({placement:"bottomRight"}),e.notification=_.default;const u=new Map;function h(a,d,m=!0,p,v,y,S,A){return(0,f.createCancelablePromise)(T=>(T.onCancellationRequested(()=>{c(p)}),new Promise(D=>{const w={key:p,className:(0,s.default)("kt-notification-wrapper",{"kt-notification-info":d===g.MessageType.Info,"kt-notification-error":d===g.MessageType.Error,"kt-notification-warn":d===g.MessageType.Warning}),duration:(0,f.isUndefined)(S)?E[d]:S,onClose:()=>{A&&A(),u.delete(p),D(void 0)},btn:v?v.map((I,R)=>{const M=typeof I=="string",O={className:`${(0,s.default)("kt-notification-button")}${M?"":I.class}`,ghost:M?R===0:!I.primary,key:M?I:I.id,onClick:()=>{D(I),_.default.close(p),M||I.run()}},P=M?I:I.label;return o.default.createElement(b.Button,{size:"small",...O},P)}):null,message:a,description:y};u.set(p,[d,w]),m||(w.closeIcon=o.default.createElement("span",null)),l(d,w)})))}function c(a){e.notification.close(a)}function r(a,d){const m=u.get(a);l(m[0],{...m[1],key:a,message:d})}function l(a,d){switch(a){case g.MessageType.Info:e.notification.info(d);break;case g.MessageType.Warning:e.notification.warning(d);break;case g.MessageType.Error:e.notification.error(d);break;default:e.notification.open(d);break}}},70748:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});const n=t(85608),s=n.__importDefault(t(55435)),o=n.__importDefault(t(31079)),f=n.__importDefault(t(22143)),b=n.__importDefault(t(5550)),g=n.__importDefault(t(74339)),_=n.__importDefault(t(75056)),E=n.__importDefault(t(14041)),u=t(70392),h={};let c=4.5,r=24,l=24,a="topRight",d,m;function p(D){const{duration:w,placement:I,bottom:R,top:M,getContainer:O,closeIcon:P}=D;w!==void 0&&(c=w),I!==void 0&&(a=I),R!==void 0&&(l=R),M!==void 0&&(r=M),O!==void 0&&(d=O),P!==void 0&&(m=P)}function v(D,w=r,I=l){let R;switch(D){case"topLeft":R={left:0,top:w,bottom:"auto"};break;case"topRight":R={right:0,top:w,bottom:"auto"};break;case"bottomLeft":R={left:0,top:"auto",bottom:I};break;default:R={right:0,top:"auto",bottom:I};break}return R}function y({prefixCls:D,placement:w=a,getContainer:I=d,top:R,bottom:M,closeIcon:O=m},P){const L=`${D}-${w}`;if(h[L]){P(h[L]);return}const N=E.default.createElement("span",{className:`${D}-close-x`},O||E.default.createElement(f.default,{className:`${D}-close-icon`}));_.default.newInstance({prefixCls:D,className:`${D}-${w}`,style:v(w,R,M),getContainer:I,closeIcon:N},k=>{h[L]=k,P(k)})}const S={success:s.default,info:g.default,error:o.default,warning:b.default};function A(D){const w=D.prefixCls||"kt-notification",I=`${w}-notice`,R=(0,u.isUndefined)(D.duration)?c:D.duration;let M=null;D.icon?M=E.default.createElement("span",{className:`${I}-icon`},D.icon):D.type&&(M=E.default.createElement(S[D.type]||null,{className:`${I}-icon ${I}-icon-${D.type}`}));const{placement:O,top:P,bottom:L,getContainer:N,closeIcon:k}=D;y({prefixCls:w,placement:O,top:P,bottom:L,getContainer:N,closeIcon:k},B=>{B.notice({content:E.default.createElement("div",{className:M?`${I}-with-icon`:""},M,E.default.createElement("div",{className:`${I}-message`},D.message),E.default.createElement("div",{className:`${I}-description`},D.description),D.btn?E.default.createElement("span",{className:`${I}-btn`},D.btn):null),duration:R,closable:!0,onClose:D.onClose,onClick:D.onClick,key:D.key,style:D.style||{},className:D.className})})}const T={open:A,close(D){Object.keys(h).forEach(w=>h[w].removeNotice(D))},config:p,destroy(){Object.keys(h).forEach(D=>{h[D].destroy(),delete h[D]})}};["success","info","warning","error"].forEach(D=>{T[D]=w=>T.open({...w,type:D})}),T.warn=T.warning,e.default=T},79024:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Overlay=void 0;const n=t(85608),s=n.__importDefault(t(53373)),o=n.__importDefault(t(14041)),f=t(53017);t(45531);const b=({maskClosable:g=!1,closable:_=!0,className:E,onClose:u,children:h,footer:c,title:r,getContainer:l,keyboard:a,...d})=>o.default.createElement(f.Modal,{footer:c||null,maskClosable:g,closable:_,onCancel:u,title:r,getContainer:l,className:(0,s.default)("kt-overlay",E),keyboard:a,...d},h);e.Overlay=b},91397:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Popover=e.PopoverPosition=e.PopoverTriggerType=void 0;const n=t(85608),s=n.__importDefault(t(53373)),o=n.__importDefault(t(6208)),f=n.__importStar(t(14041));t(14856);const b=t(48412);var g;(function(u){u.hover="hover",u.click="click",u.focus="focus"})(g||(e.PopoverTriggerType=g={}));var _;(function(u){u.top="top",u.bottom="bottom",u.left="left",u.right="right",u.topLeft="topLeft",u.topRight="topRight",u.bottomLeft="bottomLeft",u.bottomRight="bottomRight",u.leftTop="leftTop",u.leftBottom="leftBottom",u.rightTop="rightTop",u.rightBottom="rightBottom"})(_||(e.PopoverPosition=_={}));const E=({children:u,trigger:h=g.hover,visible:c,content:r,position:l=_.top,showArrow:a=!0,title:d,titleClassName:m,overlay:p,overlayClassName:v,overlayStyle:y,action:S,delay:A,zIndex:T=1e3,onClickAction:D,onVisibleChange:w,getTooltipContainer:I,...R})=>{const M=(0,f.useCallback)(P=>{D&&D(P)},[D]),O=(0,f.useMemo)(()=>p||(!d&&!r?null:f.default.createElement(f.default.Fragment,null,d&&f.default.createElement("p",{className:(0,s.default)("kt-popover-title",m)},d,S&&f.default.createElement(b.Button,{size:"small",type:"link",onClick:M},S)),r||"")),[p,r,S,M]);return O?f.default.createElement(o.default,{...R,visible:c,placement:l,mouseEnterDelay:A?A/1e3:void 0,trigger:h,showArrow:a,onVisibleChange:w,overlayClassName:v,prefixCls:"kt-popover",overlayStyle:y,getTooltipContainer:I,overlay:O,zIndex:T},f.default.createElement("div",{className:"kt-popover-trigger"},u)):u};e.Popover=E},8573:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.RecycleList=e.RECYCLE_LIST_OVER_SCAN_COUNT=e.RECYCLE_LIST_STABILIZATION_TIME=void 0;const n=t(85608),s=n.__importDefault(t(53373)),o=n.__importStar(t(14041)),f=n.__importDefault(t(19686)),b=t(58723),g=t(77011);e.RECYCLE_LIST_STABILIZATION_TIME=500,e.RECYCLE_LIST_OVER_SCAN_COUNT=50;const _=({width:E,height:u,maxHeight:h,minHeight:c,className:r,style:l,data:a,onReady:d,onScroll:m,itemHeight:p,header:v,footer:y,template:S,paddingBottomSize:A,getSize:T,hiddenVerticalScrollbar:D,hiddenHorizontalScrollbar:w})=>{const I=(0,o.useRef)(),R=(0,o.useRef)(),M=(0,o.useRef)({}),O=(0,o.useRef)(0),P=(0,o.useRef)();(0,o.useEffect)(()=>{typeof d=="function"&&d({scrollTo:$=>{var Y;(Y=I.current)===null||Y===void 0||Y.scrollTo($)},scrollToIndex:($,Y="start")=>{var Q,te;let re=$;if(v&&re++,typeof p=="number")(Q=I.current)===null||Q===void 0||Q.scrollToItem(re,Y);else{P.current&&clearTimeout(P.current);const de=(M.current?Object.keys(M.current):[]).slice(0,re).reduce((q,_e)=>q+N(_e),0);(te=I.current)===null||te===void 0||te.scrollToItem($,Y),P.current=setTimeout(()=>{var q;(M.current?Object.keys(M.current):[]).slice(0,re).reduce((J,le)=>J+N(le),0)!==de&&((q=I.current)===null||q===void 0||q.scrollToItem($,Y)),P.current=null},e.RECYCLE_LIST_STABILIZATION_TIME)}}})},[]);const L=(U,$)=>{var Y;M.current[U]!==$&&(M.current={...M.current,[U]:$},I.current&&((Y=I.current)===null||Y===void 0||Y.resetAfterIndex(0)))},N=(0,o.useCallback)(U=>T?T(Number(U)):(M?.current||[])[U]||p||100,[p,T]),k=(0,o.useCallback)(()=>{if(h){let U=0;for(let $=0;$<a.length;$++)U+=N($);return U>h?h:U}},[h,a]),B=(0,o.useCallback)(()=>{if(c)return c},[c,a]),F=(0,o.useMemo)(()=>{let U=a.length;return v&&U++,y&&U++,U},[a,y,v]),W=({index:U,style:$})=>{let Y;if(U===0&&v)return o.default.createElement("div",{style:$},o.default.createElement(v,null));if(U+1===F&&y)return o.default.createElement("div",{style:$},o.default.createElement(y,null));if(v?Y=a[U-1]:Y=a[U],!Y)return o.default.createElement("div",{style:$});const Q={"aria-setsize":F,"aria-posinset":U};return o.default.createElement("div",{tabIndex:0,style:$,role:"listitem",...Q},o.default.createElement(S,{data:Y,index:U}))},V=({index:U,style:$})=>{const Y=(0,o.useRef)(null),Q=(0,o.useRef)(),te=()=>{if(Y.current){let ae=0;for(let de=0;de<Y.current.children.length;de++)ae+=Y.current.children[de].getBoundingClientRect().height;L(U,ae)}};(0,o.useEffect)(()=>{if(Y.current&&I.current){Q.current=new MutationObserver(()=>{te()});const ae={childList:!0,attributes:!0,characterData:!0,attributeFilter:["class","style"],attributeOldValue:!0,characterDataOldValue:!0};Q.current.observe(Y.current,ae),te()}return()=>{Q.current.disconnect()}},[Y.current]);let re;return U===0&&v?o.default.createElement("div",{style:$},o.default.createElement(v,null)):U+1===F&&y?o.default.createElement("div",{style:$},o.default.createElement(y,null)):(v?re=a[U-1]:re=a[U],re?o.default.createElement("div",{style:$,ref:Y},o.default.createElement(S,{data:re,index:U})):o.default.createElement("div",{style:$}))},H=(0,o.useMemo)(()=>a.reduce(($,Y)=>$+N(Y),0)/a.length,[a]),G=(0,o.useCallback)(U=>{O.current=U.scrollOffset,m&&m(U)},[m]),K=(0,o.useMemo)(()=>(0,o.forwardRef)((U,$)=>{const{style:Y,...Q}=U;return o.default.createElement("div",{ref:$,style:{...Y,height:`${parseFloat(Y.height)+(A||0)}px`},...Q})}),[A]),z=(0,o.useMemo)(()=>(0,o.forwardRef)((U,$)=>o.default.createElement(g.Scrollbars,{hiddenVertical:D,hiddenHorizontal:w,...U,thumbSize:10,forwardedRef:$})),[D,w]);return(()=>{const U=typeof p!="number",$=!E||!u;return(()=>{const Q=({width:te,height:re})=>{R.current&&(R.current.scrollTop=O.current);const ae=k(),de=B();let q=re;return de?q=Math.min(re,de):ae&&(q=ae),U?o.default.createElement(b.VariableSizeList,{onScroll:G,width:te,height:q,itemData:[],itemSize:N,itemCount:F,overscanCount:e.RECYCLE_LIST_OVER_SCAN_COUNT,ref:I,style:{transform:"translate3d(0px, 0px, 0px)",...l},className:(0,s.default)(r,"kt-recycle-list"),innerElementType:K,outerElementType:z,estimatedItemSize:H},V):o.default.createElement(b.FixedSizeList,{onScroll:G,width:te,height:q,itemData:[],itemSize:p,itemCount:F,overscanCount:e.RECYCLE_LIST_OVER_SCAN_COUNT,ref:I,outerRef:R,style:{transform:"translate3d(0px, 0px, 0px)",...l},className:(0,s.default)(r,"recycle-list"),innerElementType:K,outerElementType:z},W)};return $?o.default.createElement(f.default,null,Q):Q({width:E,height:u})})()})()};e.RecycleList=_},34128:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),t(85608).__exportStar(t(8573),e)},57621:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.RecycleTree=e.RenderErrorType=void 0;const n=t(85608),s=n.__importDefault(t(39050)),o=n.__importStar(t(14041)),f=t(58723),b=t(70392),g=t(77011),_=t(48103),E=t(65601),u=t(43685),h=t(13429),c=t(34054);var r;(function(d){d[d.RENDER_ITEM=0]="RENDER_ITEM",d[d.GET_RENDED_KEY=1]="GET_RENDED_KEY",d[d.RENDER_ERROR=2]="RENDER_ERROR"})(r||(e.RenderErrorType=r={}));const l=o.default.forwardRef((d,m)=>{const{style:p,...v}=d;return o.default.createElement("div",{ref:m,style:{...p,height:`${parseFloat(p.height)+a.PADDING_BOTTOM_SIZE}px`},...v})});class a extends o.default.Component{constructor(){super(...arguments),this.idxToRendererPropsCache=new Map,this.dynamicSizeMap=new Map,this.listRef=o.default.createRef(),this.disposables=new b.DisposableCollection,this.onErrorEmitter=new b.Emitter,this.onDidUpdateEmitter=new b.Emitter,this.onDidModelChangeEmitter=new b.Emitter,this.newPromptInsertionIndex=-1,this.idToFilterRendererPropsCache=new Map,this.filterFlattenBranchChildrenCache=new Map,this.filterWatcherDisposeCollection=new b.DisposableCollection,this.queueUpdatePromise=null,this.updateCancelToken=new b.CancellationTokenSource,this.expandNodeCancelToken=new b.CancellationTokenSource,this.willUpdateTasks=0,this.queueUpdateThrottler=new b.Throttler,this.doBatchUpdate=(()=>{const m=(p,v)=>{if(this.disposables.disposed)return;const{root:y}=this.props.model;let S=-1;if(this.promptTargetID>-1&&this.promptHandle instanceof E.NewPromptHandle&&this.promptHandle.parent&&this.promptHandle.parent.expanded&&y.isItemVisibleAtSurface(this.promptHandle.parent)&&!this.promptHandle.destroyed){const A=y.getIndexAtTreeNodeId(this.promptTargetID);if(A>-1||this.promptHandle.parent===y)if(this.promptHandle.type===c.TreeNodeType.TreeNode){const T=this.promptHandle.parent;T?S=this.getNewPromptInsertIndex(A,T):S=A+1}else S=A+1;else this.promptTargetID=-1}if(S===-1&&this.promptHandle&&this.promptHandle.constructor===E.NewPromptHandle&&!this.promptHandle.destroyed&&this.promptHandle.destroy(),this.newPromptInsertionIndex=S,this.idxToRendererPropsCache.clear(),v.isCancellationRequested){p();return}this.forceUpdate(()=>{p(),this.props.filter&&this.props.filterProvider&&this.props.filterProvider.filterAlways&&this.filterItems(this.props.filter)})};return()=>{const p=(S,A)=>{const T=!!this.willUpdateTasks;if(this.willUpdateTasks=0,!T)A.resolve();else{this.updateCancelToken.cancel(),this.updateCancelToken=new b.CancellationTokenSource;const D=this.updateCancelToken.token;requestAnimationFrame(()=>{if(D.isCancellationRequested){A();return}m(A,D)})}return S};let v;const y=new Promise(S=>v=S);return y.then(()=>{this.onDidUpdateEmitter.fire()}),p(y,v),y}})(),this.batchUpdate=()=>(this.willUpdateTasks++,this.queueUpdatePromise=this.queueUpdateThrottler.queue(this.doBatchUpdate),this.queueUpdatePromise),this.promptNewTreeNode=m=>this.promptNew(m),this.promptNewCompositeTreeNode=m=>this.promptNew(m,c.TreeNodeType.CompositeTreeNode),this.promptRename=async(m,p)=>{var v,y;const{root:S}=this.props.model,A=typeof m=="string"?await S.getTreeNodeByPath(m):m;if(!u.TreeNode.is(A)||u.CompositeTreeNode.isRoot(A))throw new TypeError(`Cannot rename object of type ${typeof A}`);const T=new _.RenamePromptHandle(p||A.name,A);return this.promptHandle=T,this.promptTargetID=A.id,S.isItemVisibleAtSurface(A)?await this.batchUpdate():await A.parent.setExpanded(!0),(y=(v=this.listRef)===null||v===void 0?void 0:v.current)===null||y===void 0||y.scrollToItem(S.getIndexAtTreeNodeId(this.promptTargetID)),this.promptHandle},this.expandNode=async m=>{const{root:p}=this.props.model,v=typeof m=="string"?p.getTreeNodeByPath(m):m;if(this.expandNodeCancelToken.token.isCancellationRequested&&(this.expandNodeCancelToken=new b.CancellationTokenSource),v&&u.CompositeTreeNode.is(v)&&!v.disposed)return v.setExpanded(!1,!1,!0,this.expandNodeCancelToken.token)},this.collapseNode=async m=>{const{root:p}=this.props.model,v=typeof m=="string"?p.getTreeNodeByPath(m):m;if(v&&u.CompositeTreeNode.is(v)&&!v.disposed)return this.expandNodeCancelToken.cancel(),v.setCollapsed()},this._isEnsuring=!1,this.ensureVisible=async(m,p="smart",v=!1)=>{if(this._isEnsuring)return;this._isEnsuring=!0;const{root:y}=this.props.model,S=typeof m=="string"?y.getTreeNodeByPath(m)||await y.loadTreeNodeByPath(m):m;if(S&&!y.isItemVisibleAtSurface(S)&&await y.loadTreeNodeByPath(S.path),!u.TreeNode.is(S)||u.CompositeTreeNode.isRoot(S)){this._isEnsuring=!1;return}return v?this.tryScrollIntoViewWhileStable(S,p):this.tryScrollIntoView(S,p),this._isEnsuring=!1,S},this.getItemAtIndex=m=>{const{filter:p}=this.props;if(p&&this.filterFlattenBranch.length>0)return this.idToFilterRendererPropsCache.get(this.filterFlattenBranch[m]);let v=this.idxToRendererPropsCache.get(m);if(!v){const y=this.newPromptInsertionIndex,{root:S}=this.props.model;if(y>-1&&this.promptHandle&&this.promptHandle.constructor===E.NewPromptHandle&&!this.promptHandle.destroyed)if(m===y)v={itemType:c.TreeNodeType.NewPrompt,item:this.promptHandle};else{const A=S.getTreeNodeAtIndex(m-(m>=y?1:0));v={itemType:u.CompositeTreeNode.is(A)?c.TreeNodeType.CompositeTreeNode:c.TreeNodeType.TreeNode,item:A}}else{const A=S.getTreeNodeAtIndex(m);A&&A.id===this.promptTargetID&&this.promptHandle&&this.promptHandle.constructor===_.RenamePromptHandle&&!this.promptHandle.destroyed?v={itemType:c.TreeNodeType.RenamePrompt,item:this.promptHandle}:v={itemType:u.CompositeTreeNode.is(A)?c.TreeNodeType.CompositeTreeNode:c.TreeNodeType.TreeNode,item:A}}this.idxToRendererPropsCache.set(m,v)}return v},this.handleListScroll=({scrollOffset:m})=>{const{model:p,height:v,itemHeight:y}=this.props;if(p.state.saveScrollOffset(m),!this.promptHandle||!y)return;let S;this.promptHandle instanceof E.NewPromptHandle&&this.newPromptInsertionIndex>-1?S=this.newPromptInsertionIndex:S=p.root.getIndexAtTreeNodeId(this.promptHandle.id),(m+v<S*y||S*y<m)&&this.promptHandle.destroy()},this.getItemKey=m=>{const p=this.getItemAtIndex(m),{getItemKey:v}=this.props,y=v?v(p):void 0;return y??m},this.filterItems=m=>{const{model:{root:p},filterProvider:v}=this.props;if(this.filterWatcherDisposeCollection.dispose(),this.idToFilterRendererPropsCache.clear(),!m)return;const y=/\//.test(m),S=new Set,A=new Map,T=[];for(let D=0,w=p.branchSize;D<w;D++){const I=p.getTreeNodeAtIndex(D);T.push(I)}if(y)T.forEach(D=>{if(D&&D.path.indexOf(m)>-1){S.add(D.id);let w=D.parent;for(;w&&!u.CompositeTreeNode.isRoot(w);)S.add(w.id),w=w.parent}});else{let D=[];v?D=s.default.filter(m,T,v.fuzzyOptions()):D=s.default.filter(m,T,a.FILTER_FUZZY_OPTIONS);const w=I=>{const R=I.children||[];if(R.length>0)for(const M of R)S.add(M.id),u.CompositeTreeNode.is(M)&&M.expanded&&w(M)};D.forEach(I=>{const R=I.original;S.add(R.id);let M=R.parent;for(A.set(R.id,()=>o.default.createElement("div",{style:{flex:1,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},dangerouslySetInnerHTML:{__html:I.string||""}})),u.CompositeTreeNode.is(R)&&w(R);M&&!u.CompositeTreeNode.isRoot(M);)S.add(M.id),M=M.parent})}this.filterFlattenBranch=new Array(S.size);for(let D=0,w=0,I=p.branchSize;w<I;w++){const R=p.getTreeNodeAtIndex(w);R&&S.has(R.id)&&(this.filterFlattenBranch[D]=R.id,u.CompositeTreeNode.is(R)?this.idToFilterRendererPropsCache.set(R.id,{item:R,itemType:c.TreeNodeType.CompositeTreeNode,template:A.has(R.id)?A.get(R.id):void 0}):this.idToFilterRendererPropsCache.set(R.id,{item:R,itemType:c.TreeNodeType.TreeNode,template:A.has(R.id)?A.get(R.id):void 0}),D++)}this.filterWatcherDisposeCollection.push(p.watcher.on(c.TreeNodeEvent.DidChangeExpansionState,(D,w)=>{const I=this.filterFlattenBranch.indexOf(D.id);if(w){const R=this.filterFlattenBranchChildrenCache.get(D.id);R&&R.length>0&&(this.filterFlattenBranch=(0,u.spliceArray)(this.filterFlattenBranch,I+1,0,R),this.filterFlattenBranchChildrenCache.delete(D.id))}else{const R=[];for(let M=I+1;M<this.filterFlattenBranch.length;M++){const O=p.getTreeNodeById(this.filterFlattenBranch[M]);if(O&&O.depth>D.depth)R.push(O.id);else break}this.filterFlattenBranchChildrenCache.set(D.id,R),this.filterFlattenBranch=(0,u.spliceArray)(this.filterFlattenBranch,I+1,R.length)}})),this.filterWatcherDisposeCollection.push(b.Disposable.create(()=>{this.filterFlattenBranchChildrenCache.clear()}))},this.renderItem=({index:m,style:p})=>{var v,y,S,A,T,D,w;const{children:I,overflow:R="ellipsis",supportDynamicHeights:M}=this.props,O=this.getItemAtIndex(m),P=(0,o.useRef)(null),L=(0,o.useMemo)(()=>M?()=>{let V=0;if(P.current){const H=P.current;V=Array.from(H.children).reduce((G,K)=>G+K.getBoundingClientRect().height,0)}return V&&(this.dynamicSizeMap.set(m,V),this.layoutItem()),Math.max(V,a.DEFAULT_ITEM_HEIGHT)}:()=>{},[M]);if((0,o.useEffect)(()=>{P.current&&L()},[]),!O)return o.default.createElement(o.default.Fragment,null);const{item:N,itemType:k,template:B}=O;if(!N)return o.default.createElement("div",{style:p});let F;u.CompositeTreeNode.is(N)?F={"aria-label":(v=N.accessibilityInformation)===null||v===void 0?void 0:v.label,"aria-expanded":N.expanded,"aria-level":N.depth,"aria-setsize":(S=(y=N.parent)===null||y===void 0?void 0:y.children)===null||S===void 0?void 0:S.length,"aria-posinset":m}:u.TreeNode.is(N)&&(F={"aria-label":(A=N.accessibilityInformation)===null||A===void 0?void 0:A.label,"aria-level":N.depth,"aria-setsize":(D=(T=N.parent)===null||T===void 0?void 0:T.children)===null||D===void 0?void 0:D.length,"aria-posinset":m});const W=R==="ellipsis"?p:{...p,width:"auto",minWidth:"100%"};return o.default.createElement("div",{ref:P,style:W,role:((w=N.accessibilityInformation)===null||w===void 0?void 0:w.role)||"treeiem",...F},o.default.createElement(h.NodeRendererWrap,{item:N,depth:N.depth,itemType:k,template:B,hasPrompt:!!this.promptHandle&&!this.promptHandle.destroyed,expanded:u.CompositeTreeNode.is(N)?N.expanded:void 0},I))},this.layoutItem=()=>{var m,p,v,y;if(this.props.supportDynamicHeights&&this.listRef&&!((m=this.listRef)===null||m===void 0)&&m.current&&"_getRangeToRender"in((p=this.listRef)===null||p===void 0?void 0:p.current)){const S=(v=this.listRef)===null||v===void 0?void 0:v.current._getRangeToRender();if(S){const A=S[0];((y=this.listRef)===null||y===void 0?void 0:y.current).resetAfterIndex(A)}}}}getNewPromptInsertIndex(m,p){const{root:v}=this.props.model;let y=m+1;for(;y-m<=p.branchSize;y++){const S=v.getTreeNodeAtIndex(y);if(!S)return y;if(!u.CompositeTreeNode.is(S)){if(S?.depth>p.depth+1)continue;return y}}return y}UNSAFE_componentWillUpdate(m){this.props.filter!==m.filter&&this.filterItems(m.filter),this.props.model!==m.model&&(this.idxToRendererPropsCache.clear(),this.idToFilterRendererPropsCache.clear(),this.dynamicSizeMap.clear())}componentDidUpdate(m){var p,v;if(this.props.model!==m.model){this.disposables.dispose();const{model:y}=this.props;(v=(p=this.listRef)===null||p===void 0?void 0:p.current)===null||v===void 0||v.scrollTo(y.state.scrollOffset),this.disposables.push(y.onChange(this.batchUpdate.bind(this))),this.disposables.push(y.state.onDidLoadState(()=>{var S,A;(A=(S=this.listRef)===null||S===void 0?void 0:S.current)===null||A===void 0||A.scrollTo(y.state.scrollOffset)})),this.onDidModelChangeEmitter.fire({preModel:m.model,nextModel:y})}}async promptNew(m,p=c.TreeNodeType.TreeNode){var v,y;const{root:S}=this.props.model;let A=typeof m=="string"?await S.getTreeNodeByPath(m):m;if(p!==c.TreeNodeType.TreeNode&&p!==c.TreeNodeType.CompositeTreeNode)throw new TypeError(`Invalid type supplied. Expected 'TreeNodeType.TreeNode' or 'TreeNodeType.CompositeTreeNode', got ${p}`);if(A&&!u.CompositeTreeNode.is(A)&&(A=A.parent,!u.CompositeTreeNode.is(A)))throw new TypeError(`Cannot create new prompt at object of type ${typeof A}`);if(!A)throw new Error(`Cannot find node at ${m}`);const T=new E.NewPromptHandle(p,A);return this.promptHandle=T,this.promptTargetID=A.id,A!==S&&(!A.expanded||!S.isItemVisibleAtSurface(A))?await A.setExpanded(!0):await this.batchUpdate(),this.newPromptInsertionIndex>=0?(y=(v=this.listRef)===null||v===void 0?void 0:v.current)===null||y===void 0||y.scrollToItem(this.newPromptInsertionIndex):this.tryScrollIntoViewWhileStable(this.promptHandle),this.promptHandle}tryScrollIntoView(m,p="auto"){var v,y,S,A;const{root:T}=this.props.model;m.constructor===E.NewPromptHandle&&!m.destroyed?(y=(v=this.listRef)===null||v===void 0?void 0:v.current)===null||y===void 0||y.scrollToItem(this.newPromptInsertionIndex):T.isItemVisibleAtSurface(m)&&((A=(S=this.listRef)===null||S===void 0?void 0:S.current)===null||A===void 0||A.scrollToItem(T.getIndexAtTreeNode(m),p))}tryScrollIntoViewWhileStable(m,p="smart"){const{root:v}=this.props.model;if(this.tryEnsureVisibleTimes>a.TRY_ENSURE_VISIBLE_MAX_TIMES){this.tryEnsureVisibleTimes=0;return}b.Event.once(this.props.model.onChange)(async()=>{var y,S,A,T;await this.queueUpdatePromise,m.constructor===E.NewPromptHandle&&!m.destroyed?(S=(y=this.listRef)===null||y===void 0?void 0:y.current)===null||S===void 0||S.scrollToItem(this.newPromptInsertionIndex):v.isItemVisibleAtSurface(m)?((T=(A=this.listRef)===null||A===void 0?void 0:A.current)===null||T===void 0||T.scrollToItem(v.getIndexAtTreeNode(m),p),this.tryEnsureVisibleTimes=0):(this.tryEnsureVisibleTimes++,this.tryScrollIntoViewWhileStable(m,p))})}componentDidMount(){var m,p;const{model:v,onReady:y}=this.props;if((p=(m=this.listRef)===null||m===void 0?void 0:m.current)===null||p===void 0||p.scrollTo(v.state.scrollOffset),this.disposables.push(v.onChange(this.batchUpdate.bind(this))),this.disposables.push(v.state.onDidLoadState(()=>{var S,A;(A=(S=this.listRef)===null||S===void 0?void 0:S.current)===null||A===void 0||A.scrollTo(v.state.scrollOffset)})),typeof y=="function"){const S={promptNewTreeNode:this.promptNewTreeNode,promptNewCompositeTreeNode:this.promptNewCompositeTreeNode,promptRename:this.promptRename,expandNode:this.expandNode,collapseNode:this.collapseNode,ensureVisible:this.ensureVisible,getModel:()=>this.props.model,layoutItem:this.layoutItem,getCurrentSize:()=>({width:this.props.width,height:this.props.height}),onDidChangeModel:this.onDidModelChangeEmitter.event,onDidUpdate:this.onDidUpdateEmitter.event,onOnceDidUpdate:b.Event.once(this.onDidUpdateEmitter.event),onError:this.onErrorEmitter.event};y(S)}}componentWillUnmount(){this.disposables.dispose()}set promptHandle(m){this._promptHandle!==m&&(this._promptHandle instanceof _.PromptHandle&&!this._promptHandle.destroyed&&this._promptHandle.destroy(),m.onDestroy(this.batchUpdate),this._promptHandle=m)}get promptHandle(){return this._promptHandle}get adjustedRowCount(){const{root:m}=this.props.model,{filter:p}=this.props;return p?this.filterFlattenBranch.length:this.newPromptInsertionIndex>-1&&this.promptHandle&&this.promptHandle.constructor===E.NewPromptHandle&&!this.promptHandle.destroyed?m.branchSize+1:m.branchSize}getItemSize(m){return this.dynamicSizeMap.get(m)||this.props.itemHeight}render(){const{children:m,itemHeight:p,width:v="100%",height:y,style:S,className:A,placeholder:T,overScanCount:D,leaveBottomBlank:w,supportDynamicHeights:I}=this.props;if(T&&this.adjustedRowCount===0){const M=T;return o.default.createElement(M,null)}const R={children:m,height:y,width:v,itemData:[],itemCount:this.adjustedRowCount,itemKey:this.getItemKey,overscanCount:D||a.DEFAULT_OVER_SCAN_COUNT,onScroll:this.handleListScroll,style:{transform:"translate3d(0px, 0px, 0px)",...S},className:A,outerElementType:g.ScrollbarsVirtualList};return w&&(R.innerElementType=l),I?o.default.createElement(f.VariableSizeList,{ref:this.listRef,itemSize:this.getItemSize.bind(this),...R},this.renderItem):o.default.createElement(f.FixedSizeList,{ref:this.listRef,itemSize:p,...R},this.renderItem)}}e.RecycleTree=a,a.PADDING_BOTTOM_SIZE=22,a.DEFAULT_ITEM_HEIGHT=22,a.TRY_ENSURE_VISIBLE_MAX_TIMES=5,a.FILTER_FUZZY_OPTIONS={pre:"<match>",post:"</match>",extract:d=>d?.name||""},a.DEFAULT_OVER_SCAN_COUNT=50},13429:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NodeRendererWrap=void 0;const s=t(85608).__importDefault(t(14041));class o extends s.default.Component{render(){const{item:b,itemType:g,children:_,template:E,hasPrompt:u}=this.props;return s.default.createElement(_,{item:b,itemType:g,template:E,hasPrompt:u,key:b.id})}shouldComponentUpdate(b){return!0}}e.NodeRendererWrap=o},75821:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BasicRecycleTree=void 0;const n=t(85608),s=n.__importStar(t(14041)),o=n.__importDefault(t(26737)),f=t(58998),b=t(57621),g=t(64013),_=t(84225),E=t(17462),u=t(78569),h=t(45203);t(12794),t(34728),n.__exportStar(t(92532),e);const c=({width:r,height:l,itemHeight:a=22,itemClassname:d,indent:m,baseIndent:p,containerClassname:v,onClick:y,onContextMenu:S,onTwistierClick:A,onIconClick:T,onDbClick:D,resolveChildren:w,sortComparator:I,treeData:R,inlineMenus:M,inlineMenuActuator:O,onReady:P,contextMenus:L,contextMenuActuator:N,treeName:k,leaveBottomBlank:B=!0})=>{const[F,W]=(0,s.useState)({show:!1}),[V,H]=(0,s.useState)([]),[G,K]=(0,s.useState)(),z=(0,s.useRef)(!1),j=(0,s.useRef)(),U=(0,s.useRef)(),$=(0,s.useRef)(null),Y=(0,s.useCallback)(X=>{var oe;return s.default.createElement(E.BasicTreeNodeRenderer,{item:X.item,itemType:X.itemType,itemHeight:a,indent:m,baseIndent:p,className:d,inlineMenus:M,inlineMenuActuator:O,onClick:ae,onDbClick:q,onContextMenu:_e,onTwistierClick:J,onIconClick:de,decorations:(oe=j.current)===null||oe===void 0?void 0:oe.decorations.getDecorations(X.item)})},[G]);(0,s.useEffect)(()=>{var X,oe;j.current=new h.BasicTreeService(R,w,I,{treeName:k});const se=(X=j.current)===null||X===void 0?void 0:X.onDidUpdateTreeModel(ue=>{Q(ue)}),he=()=>{var ue;(ue=j.current)===null||ue===void 0||ue.enactiveFocusedDecoration()};return(oe=$.current)===null||oe===void 0||oe.addEventListener("blur",he,!0),()=>{var ue,ve;z.current=!0,(ue=$.current)===null||ue===void 0||ue.removeEventListener("blur",he,!0),se.dispose(),(ve=j.current)===null||ve===void 0||ve.dispose()}},[]),(0,s.useEffect)(()=>{var X;(X=j.current)===null||X===void 0||X.updateTreeData(R)},[R]);const Q=async X=>{X&&await X.ensureReady,z.current||K(X)},te=async X=>{var oe;(oe=j.current)===null||oe===void 0||oe.activeFocusedDecoration(X),u.BasicCompositeTreeNode.is(X)&&pe(X)},re=(0,s.useCallback)(X=>{P&&P({...X,selectItem:te,focusItem:async oe=>{var se;const he=`/${k}/${oe}`;await G?.ensureReady;const ue=await X.ensureVisible(he,"auto",!0);ue&&((se=j.current)===null||se===void 0||se.activeFocusedDecoration(ue))}}),U.current=X},[j.current]),ae=(0,s.useCallback)((X,oe)=>{te(oe),y&&y(X,oe)},[y]),de=(0,s.useCallback)((X,oe)=>{T&&T(X,oe)},[T]),q=(0,s.useCallback)((X,oe)=>{D&&D(X,oe)},[D]),_e=(0,s.useCallback)((X,oe)=>{var se,he;if(oe?(se=j.current)===null||se===void 0||se.activeContextMenuDecoration(oe):(he=j.current)===null||he===void 0||he.enactiveFocusedDecoration(),S)S(X,oe);else{let ue=[];Array.isArray(L)?ue=L:typeof L=="function"&&(ue=L(oe));const ve=new Set,ne={};for(const Ae of ue)ve.add(Ae.group||"-1"),ne[Ae.group||"-1"]||(ne[Ae.group||"-1"]=[]),ne[Ae.group||"-1"].push(Ae);const fe=Array.from(ve).sort((Ae,Ie)=>Ae.localeCompare(Ie,"kn",{numeric:!0}));let Ce=[];for(const Ae of fe)Ce=Ce.concat(ne[Ae].map(Ie=>({id:Ie.id,label:Ie.title,group:Ie.group}))),Ce=Ce.concat([{id:`${Ae}_divider`,label:"",type:"divider"}]);Ce.pop(),JSON.stringify(Ce)!==JSON.stringify(V)&&H(Ce);const{x:be,y:Se}=X.nativeEvent;W({show:!0,point:{pageX:be,pageY:Se},activeNode:oe})}},[D]),pe=(0,s.useCallback)(X=>{var oe,se;X.expanded?(oe=U.current)===null||oe===void 0||oe.collapseNode(X):(se=U.current)===null||se===void 0||se.expandNode(X)},[]),J=(0,s.useCallback)((X,oe)=>{u.BasicCompositeTreeNode.is(oe)&&pe(oe),A&&A(X,oe)},[A]),le=(0,s.useCallback)(()=>{var X;(X=j.current)===null||X===void 0||X.enactiveFocusedDecoration()},[]),ie=(0,s.useCallback)((X,oe)=>{S&&S(X,oe)},[]),ge=(0,s.useCallback)(()=>{W({...F,show:!1})},[F]),ee=(0,s.useCallback)(()=>L?s.default.createElement(o.default,{popupPlacement:"bottomLeft",popupVisible:F.show,action:["contextMenu"],popupAlign:{overflow:{adjustX:1,adjustY:1},offset:[window.scrollX,window.scrollY]},point:F.point||{},builtinPlacements:_.placements,popup:s.default.createElement(f.ClickOutside,{className:"basic_tree_menubars",mouseEvents:["click","contextmenu"],onOutsideClick:ge},V.map(({id:X,label:oe,type:se})=>s.default.createElement(g.BasicMenuItem,{key:X,id:X,label:oe,type:se,focusMode:F.show,onClick:he=>{N&&N(F.activeNode,he),W({show:!1})}}))),alignPoint:!0}):null,[V,N,F]);return s.default.createElement("div",{className:"basic_tree",tabIndex:-1,ref:$,onClick:le,onContextMenu:ie},ee(),G?s.default.createElement(b.RecycleTree,{height:l,width:r,itemHeight:a,model:G,onReady:re,className:v,leaveBottomBlank:B},Y):null)};e.BasicRecycleTree=c},64013:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BasicMenuItem=void 0;const n=t(85608),s=n.__importDefault(t(53373)),o=n.__importDefault(t(14041)),f=({id:b,label:g,type:_,focusMode:E,onClick:u})=>{const[h,c]=o.default.useState(!1),r=o.default.useCallback(()=>{c(E?!0:a=>!a),u(b)},[b]),l=o.default.useCallback(()=>{},[b,E]);return _==="divider"?o.default.createElement("div",{className:"basic_menu_item_divider"}):o.default.createElement("div",{className:(0,s.default)("basic_menu_item",{"menu-open":h}),onMouseOver:l,onClick:r},g)};e.BasicMenuItem=f},84225:(x,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.placements=void 0;const t={adjustX:1,adjustY:1},n=[0,0];e.placements={bottomLeft:{points:["tl","bl"],overflow:t,offset:[0,4],targetOffset:n}}},78569:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BasicTreeNode=e.BasicCompositeTreeNode=e.BasicTreeRoot=void 0;const n=t(43685);class s extends n.CompositeTreeNode{constructor(g,_,E,u={}){super(g,_,void 0,{treeName:u.treeName}),this._raw=E}get name(){var g;return(g=this.getMetadata("treeName"))!==null&&g!==void 0?g:`BasicTreeRoot_${this.id}`}get raw(){return this._raw}get expanded(){return!0}}e.BasicTreeRoot=s;class o extends n.CompositeTreeNode{constructor(g,_,E,u){super(g,_,void 0,{name:E.label}),this.isExpanded=E.expanded||!1,this.id=u||this.id,this._displayName=E.label,this._raw=E}get displayName(){return this._displayName}get renderLabel(){return this.raw.renderLabel}get icon(){return this.raw.icon}get iconClassName(){return this.raw.iconClassName}get className(){return this.raw.className}get twisterClassName(){return this.raw.twisterClassName}get twisterPlaceholderClassName(){return this.raw.twisterPlaceholderClassName}get indentOffset(){return this.raw.indentOffset}get description(){return this.raw.description}get raw(){return this._raw}get expandable(){return!!this._raw.expandable}}e.BasicCompositeTreeNode=o;class f extends n.TreeNode{constructor(g,_,E,u){super(g,_,void 0,{name:E.label}),this.id=u||this.id,this._displayName=E.label,this._raw=E}get displayName(){return this._displayName}get renderLabel(){return this.raw.renderLabel}get description(){return this.raw.description}get icon(){return this.raw.icon}get iconClassName(){return this.raw.iconClassName}get className(){return this.raw.className}get twisterClassName(){return this.raw.twisterClassName}get indentOffset(){return this.raw.indentOffset}get twisterPlaceholderClassName(){return this.raw.twisterPlaceholderClassName}get raw(){return this._raw}}e.BasicTreeNode=f},17462:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BasicTreeNodeRenderer=void 0;const n=t(85608),s=n.__importDefault(t(53373)),o=n.__importStar(t(14041)),f=t(48412),b=t(54713),g=t(3660),_=t(78569),E=t(92532);t(12794);const u=({item:h,className:c,itemHeight:r=22,indent:l=8,baseIndent:a=8,onClick:d,onDbClick:m,onTwistierClick:p,onIconClick:v,onContextMenu:y,decorations:S,inlineMenus:A=[],inlineMenuActuator:T=()=>{}})=>{const D=(0,o.useCallback)(z=>{d&&(z.stopPropagation(),d(z,h))},[d]),w=(0,o.useCallback)(z=>{m&&(z.stopPropagation(),m(z,h))},[m]),I=(0,o.useCallback)(z=>{y&&(z.stopPropagation(),z.preventDefault(),y(z,h))},[y]),R=(0,o.useCallback)(z=>{z.stopPropagation(),p?p(z,h):d&&d(z,h)},[d,p]),M=(0,o.useCallback)(z=>{z.stopPropagation(),v?v(z,h):d&&d(z,h)},[d,v]);let P=(h.depth>0?h.depth-1:0)*l;a&&(P+=a),h.indentOffset&&(P+=h.indentOffset);const L={height:r,lineHeight:`${r}px`,paddingLeft:`${P}px`},N=(0,o.useCallback)(z=>o.default.createElement(b.Icon,{onClick:M,icon:z.icon,className:(0,s.default)("icon",z.iconClassName)}),[]),k=(0,o.useCallback)(z=>z.displayName.replace(/\n/g,"\u21B5"),[]),B=(0,o.useCallback)(z=>z.displayName&&o.default.createElement("div",{className:(0,s.default)("segment","display_name")},k(z)),[]),F=(0,o.useCallback)(z=>z.renderLabel,[]),W=(0,o.useCallback)(z=>z.description?typeof z.description=="string"?o.default.createElement("div",{className:(0,s.default)("segment_grow","description")},z.description):z.description:null,[]),V=(0,o.useCallback)(z=>{if(Array.isArray(A))return A;if(typeof A=="function")return A(z)},[A]),H=()=>{var z;const j=_.BasicCompositeTreeNode.is(h),U=(z=V(h))===null||z===void 0?void 0:z.filter(Y=>j?Y.position===E.IBasicInlineMenuPosition.TREE_CONTAINER:Y.position===E.IBasicInlineMenuPosition.TREE_NODE);if(!U?.length)return null;const $=(0,o.useCallback)((Y,Q)=>{Y.stopPropagation(),T(h,Q)},[]);return o.default.createElement("div",{className:(0,s.default)("segment","tail")},U.map(Y=>o.default.createElement(f.Button,{style:{marginRight:"5px"},type:"icon",key:`${h.id}-${Y.icon}`,icon:Y.icon,title:Y.title,onClick:Q=>$(Q,Y)})))},G=(z,j)=>S&&S?.classlist.indexOf(E.DECORATIONS.LOADING)>-1?o.default.createElement(g.Loading,null):o.default.createElement(b.Icon,{className:(0,s.default)("segment","expansion_toggle",z.twisterClassName,{mod_collapsed:!z.expanded}),onClick:j,icon:"arrow-right"}),K=z=>{if(!z.expandable)return o.default.createElement("div",{className:(0,s.default)("segment","expansion_toggle",z.twisterPlaceholderClassName)});if(_.BasicCompositeTreeNode.is(z))return G(z,R)};return o.default.createElement("div",{key:h.id,onClick:D,onDoubleClick:w,onContextMenu:I,className:(0,s.default)("tree_node",c,S?S.classlist:null,h.className),style:L,"data-id":h.id},o.default.createElement("div",{className:"content"},K(h),N(h),o.default.createElement("div",{className:"overflow_wrap"},F(h)||B(h),W(h)),H()))};e.BasicTreeNodeRenderer=u},45203:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BasicTreeModel=e.BasicTreeService=void 0;const n=t(70392),s=t(43685),o=t(34054),f=t(78569),b=t(92532);class g extends s.Tree{constructor(u,h,c,r={}){super(),this._treeData=u,this._resolveChildren=h,this._sortComparator=c,this.treeOptions=r,this.selectedDecoration=new s.Decoration(b.DECORATIONS.SELECTED),this.focusedDecoration=new s.Decoration(b.DECORATIONS.FOCUSED),this.contextMenuDecoration=new s.Decoration(b.DECORATIONS.ACTIVED),this.loadingDecoration=new s.Decoration(b.DECORATIONS.LOADING),this._selectedNodes=[],this.disposableCollection=new n.DisposableCollection,this.decorationDisposableCollection=new n.DisposableCollection,this.onDidUpdateTreeModelEmitter=new n.Emitter,this.sortComparator=(l,a)=>{if(this._sortComparator){const d=this._sortComparator(l.raw,a.raw);if(typeof d<"u")return d}return super.sortComparator(l,a)},this.activeFocusedDecoration=l=>{var a;this._contextMenuNode&&(this.clearDecoration(this.contextMenuDecoration),this.clearDecoration(this.focusedDecoration),this.clearDecoration(this.selectedDecoration),this._contextMenuNode=void 0),l&&(this.selectedNodes.length>0&&this.clearDecoration(this.selectedDecoration),this.focusedNode&&(this.clearDecoration(this.focusedDecoration),this._focusedNode=void 0),this.selectedDecoration.addTarget(l),this.focusedDecoration.addTarget(l),this._focusedNode=l,this._selectedNodes=[l],(a=this.model)===null||a===void 0||a.dispatchChange())},this.activeContextMenuDecoration=l=>{var a;this._contextMenuNode&&(this.clearDecoration(this.contextMenuDecoration),this._contextMenuNode=void 0),this.focusedNode&&(this.clearDecoration(this.focusedDecoration),this._focusedNode=void 0),this.contextMenuDecoration.addTarget(l),this._contextMenuNode=l,(a=this.model)===null||a===void 0||a.dispatchChange()},this.enactiveFocusedDecoration=()=>{var l;this.focusedNode&&(this.clearDecoration(this.focusedDecoration),this._focusedNode=void 0,(l=this.model)===null||l===void 0||l.dispatchChange())},this.disposableCollection.push(this.onDidUpdateTreeModelEmitter)}setUpTreeModel(){this._root=new f.BasicTreeRoot(this,void 0,{children:this._treeData,label:"",command:"",icon:""},{treeName:this.treeOptions.treeName}),this._model=new _,this._model.init(this._root),this.initDecorations(this._root),this.onDidUpdateTreeModelEmitter.fire(this._model)}resetState(){this._selectedNodes=[],this._contextMenuNode=void 0,this._focusedNode=void 0}get onDidUpdateTreeModel(){return this.onDidUpdateTreeModelEmitter.event}get model(){return this._model}get root(){return this._root}get decorations(){return this._decorations}initDecorations(u){this.decorationDisposableCollection.dispose(),this._decorations=new s.DecorationsManager(u),this._decorations.addDecoration(this.selectedDecoration),this._decorations.addDecoration(this.focusedDecoration),this._decorations.addDecoration(this.contextMenuDecoration),this._decorations.addDecoration(this.loadingDecoration),this.decorationDisposableCollection.push(u.watcher.on(o.TreeNodeEvent.WillResolveChildren,h=>{this.loadingDecoration.addTarget(h)})),this.decorationDisposableCollection.push(u.watcher.on(o.TreeNodeEvent.DidResolveChildren,h=>{this.loadingDecoration.removeTarget(h)})),this.decorationDisposableCollection.push(this._decorations)}updateTreeData(u){this._treeData=u,this.resetState(),this.setUpTreeModel()}async resolveChildren(u){return this._resolveChildren?this.transformTreeNode(u,this._resolveChildren(u?.raw)||[]):this.transformTreeNode(u,u?.raw.children||[])}transformTreeNode(u,h){if(!h)return[];const c=[];for(const r of h)r.children?c.push(new f.BasicCompositeTreeNode(this,u,r)):c.push(new f.BasicTreeNode(this,u,r));return c}get selectedNodes(){return this._selectedNodes}get focusedNode(){return this._focusedNode}get contextMenuNode(){return this._contextMenuNode}clearDecoration(u){for(const h of u.appliedTargets.keys())u.removeTarget(h)}dispose(){super.dispose(),this.disposableCollection.dispose(),this.decorationDisposableCollection.dispose()}}e.BasicTreeService=g;class _ extends s.TreeModel{}e.BasicTreeModel=_},92532:(x,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DECORATIONS=e.IBasicInlineMenuPosition=void 0;var t;(function(n){n[n.TREE_NODE=1]="TREE_NODE",n[n.TREE_CONTAINER=2]="TREE_CONTAINER"})(t||(e.IBasicInlineMenuPosition=t={})),e.DECORATIONS={SELECTED:"mod_selected",FOCUSED:"mod_focused",ACTIVED:"mod_actived",LOADING:"mod_loading"}},24786:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.RecycleTreeAdaptiveDecorator=void 0;const s=t(85608).__importDefault(t(14041)),o=t(34054),f=b=>g=>{const{model:_,itemHeight:E,onReady:u}=g,h=s.default.useRef(),c=s.default.useRef(!1),[r,l]=s.default.useState(0),a=()=>{l(_.root.branchSize*E)},d=m=>{u&&u({...m,promptNewTreeNode:async p=>{var v;const y=await m.promptNewTreeNode(p);return!((v=h.current)===null||v===void 0)&&v.root.branchSize?l(h.current.root.branchSize*E+E):l(E),c.current=!1,y.onDestroy(()=>{var S;!((S=h.current)===null||S===void 0)&&S.root.branchSize&&l(h.current.root.branchSize*E)}),y.onCancel(()=>{h.current&&l(h.current.root.branchSize*E)}),y.onBlur(()=>c.current),y},promptNewCompositeTreeNode:async p=>{var v;const y=await m.promptNewCompositeTreeNode(p);return!((v=h.current)===null||v===void 0)&&v.root.branchSize?l(h.current.root.branchSize*E+E):l(E),y.onDestroy(()=>{var S;!((S=h.current)===null||S===void 0)&&S.root.branchSize&&l(h.current.root.branchSize*E)}),y.onCancel(()=>{var S;!((S=h.current)===null||S===void 0)&&S.root.branchSize&&l(h.current.root.branchSize*E)}),y.onBlur(()=>c.current),y}})};return s.default.useEffect(()=>{h.current=_,h.current.root&&(l(h.current.root.branchSize*E),h.current.root.watcher.on(o.TreeNodeEvent.DidChangeExpansionState,a))},[_]),s.default.useEffect(()=>{setTimeout(()=>{c.current=!0},100)},[r]),s.default.createElement(s.default.Fragment,null,s.default.createElement(b,{...g,height:r,onReady:d}))};e.RecycleTreeAdaptiveDecorator=f},326:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.RecycleTreeFilterDecorator=void 0;const n=t(85608),s=n.__importDefault(t(97331)),o=n.__importStar(t(14041)),f=t(54713),b=t(50708),g=t(4981);t(69715);const _=30,E=500,u=c=>{const{localize:r}=o.default.useContext(g.LocalizeContext);return o.default.createElement("div",{className:"kt-recycle-tree-filter-wrapper"},o.default.createElement(b.Input,{hasClear:!0,autoFocus:!0,className:"kt-recycle-tree-filter-input",size:"small",...c,placeholder:c.placeholder||r("tree.filter.placeholder"),addonBefore:o.default.createElement(f.Icon,{className:"kt-recycle-tree-filter-icon",icon:"retrieval"})}))},h=c=>r=>{const[l,a]=o.default.useState(""),[d,m]=o.default.useState(""),{beforeFilterValueChange:p,filterEnabled:v,height:y,filterPlaceholder:S,filterAfterClear:A,onReady:T,onFilterBlur:D,filterAutoFocus:w,...I}=r,R=(0,s.default)(async P=>{p&&await p(P),m(P)},E),M=(0,o.useCallback)(P=>{a(P),R(P)},[l]),O=(0,o.useCallback)(P=>{T&&T({...P,clearFilter:()=>{m(""),a("")}})},[T]);return o.default.createElement(o.default.Fragment,null,v&&o.default.createElement(u,{afterClear:A,placeholder:S,value:l,autoFocus:w,onBlur:D,onValueChange:M}),o.default.createElement(c,{...I,height:y-(v?_:0),onReady:O,filter:d}))};e.RecycleTreeFilterDecorator=h},72731:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});const n=t(85608);n.__exportStar(t(326),e),n.__exportStar(t(24786),e)},91416:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});const n=t(85608);n.__exportStar(t(57621),e),n.__exportStar(t(13429),e),n.__exportStar(t(48103),e),n.__exportStar(t(43685),e),n.__exportStar(t(34054),e),n.__exportStar(t(72731),e),n.__exportStar(t(75821),e)},65601:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NewPromptHandle=void 0;const n=t(43685),s=t(65747);class o extends s.PromptHandle{constructor(b,g){super(),this.type=b,this.parent=g,this._id=n.TreeNode.nextId()}get id(){return this._id}get depth(){return this.parent.depth+1}}e.NewPromptHandle=o},65747:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.PromptHandle=e.VALIDATE_CLASS_NAME=e.PROMPT_VALIDATE_TYPE=void 0;const n=t(70392),s=t(50708),o=t(84605),f=E=>new Promise(u=>setTimeout(u,E));var b;(function(E){E[E.INFO=1]="INFO",E[E.ERROR=2]="ERROR",E[E.WARNING=3]="WARNING"})(b||(e.PROMPT_VALIDATE_TYPE=b={}));var g;(function(E){E.INFO="validate-info",E.ERROR="validate-error",E.WARNING="validate-warning"})(g||(e.VALIDATE_CLASS_NAME=g={}));class _{constructor(){this.disposables=new n.DisposableCollection,this.isInPendingCommitState=!1,this._destroyed=!1,this._hasValidateElement=!1,this._hasAddonAfter=!1,this._inComposition=!1,this.onChangeEmitter=new n.Emitter,this.onCommitEmitter=new n.Emitter,this.onCancelEmitter=new n.Emitter,this.onFocusEmitter=new n.Emitter,this.onBlurEmitter=new n.Emitter,this.onDestroyEmitter=new n.Emitter,this.markdownRenderer=(0,o.createMarkedRenderer)(),this.handleClick=u=>{u.stopPropagation()},this.handleDBClick=u=>{u.stopPropagation()},this.handleCompositionstart=()=>{this._inComposition=!0},this.handleCompositionend=()=>{this._inComposition=!1},this.handleKeyup=()=>{this._inComposition||this.onChangeEmitter.fire(this.$.value)},this.handleKeydown=async u=>{if(!this._inComposition){if(u.key==="Escape"){if((await this.onCancelEmitter.fireAndAwait(this.$.value)).some(c=>c.result===!1||!!c.err))return;this.destroy()}if(u.key==="Enter"){if(this.isInPendingCommitState=!0,this.$.disabled=!0,(await this.onCommitEmitter.fireAndAwait(this.$.value)).some(c=>c.result===!1||!!c.err)){this.isInPendingCommitState=!1,this.$.disabled=!1,this.$.focus();return}this.isInPendingCommitState=!1,this.$.disabled=!1,this.destroy()}}},this.handleFocus=()=>{this.onFocusEmitter.fire(this.$.value)},this.handleBlur=async u=>{await f(0),!(!this.$.isConnected&&!this.destroyed||(await this.onBlurEmitter.fireAndAwait(this.$.value)).some(c=>c.result===!1||!!c.err))&&(this.isInPendingCommitState||this.destroy())},this.$=document.createElement("input"),this.$.setAttribute("type","text"),this.$.setAttribute("name","no_keybinding"),this.$.setAttribute("spellcheck","false"),this.$.setAttribute("autoCapitalize","off"),this.$.setAttribute("autoCorrect","off"),this.$.setAttribute("autoComplete","off"),this.ProxiedInput=(0,s.bindInputElement)(this.$),this.$.addEventListener("click",this.handleClick),this.$.addEventListener("dblclick",this.handleDBClick),this.$.addEventListener("keyup",this.handleKeyup),this.$.addEventListener("keydown",this.handleKeydown),this.$.addEventListener("focus",this.handleFocus),this.$.addEventListener("blur",this.handleBlur),this.$.addEventListener("compositionstart",this.handleCompositionstart),this.$.addEventListener("compositionend",this.handleCompositionend),this.$validate=document.createElement("div"),this.$validate.setAttribute("style","top: 100%;"),this.$addonAfter=document.createElement("div"),this.$addonAfter.setAttribute("class","kt-input-addon-after")}get destroyed(){return this._destroyed}get onChange(){return this.onChangeEmitter.event}get onCommit(){return this.onCommitEmitter.event}get onCancel(){return this.onCancelEmitter.event}get onFocus(){return this.onFocusEmitter.event}get onBlur(){return this.onBlurEmitter.event}get onDestroy(){return this.onDestroyEmitter.event}focus(){this.$.focus()}setSelectionRange(u,h){this.$.setSelectionRange(u,h)}addClassName(u){this.$.classList.add(u)}removeClassName(u){this.$.classList.remove(u)}addAddonAfter(u){var h,c;!this._hasAddonAfter&&!this._destroyed&&((c=(h=this.$.parentElement)===null||h===void 0?void 0:h.parentElement)===null||c===void 0||c.appendChild(this.$addonAfter),this._hasAddonAfter=!0);const r=document.createElement("div");r.setAttribute("class",u),this.$addonAfter.appendChild(r)}removeAddonAfter(){var u,h,c;this._hasAddonAfter&&((u=this.$addonAfter.firstChild)===null||u===void 0||u.remove(),(c=(h=this.$.parentElement)===null||h===void 0?void 0:h.parentElement)===null||c===void 0||c.removeChild(this.$addonAfter),this._hasAddonAfter=!1)}addValidateMessage(u){var h,c,r,l,a,d,m;!this._hasValidateElement&&!this._destroyed&&((r=(c=(h=this.$.parentElement)===null||h===void 0?void 0:h.parentElement)===null||c===void 0?void 0:c.parentElement)===null||r===void 0||r.appendChild(this.$validate),this._hasValidateElement=!0);let p="validate-message popup ";u&&u.type===b.ERROR?this._validateClassName=g.ERROR:u&&u.type===b.WARNING?this._validateClassName=g.WARNING:this._validateClassName=g.INFO,p+=this._validateClassName,this.$validate.classList.value=p,this.$validate.innerHTML=(0,o.toMarkdownHtml)(u.message||"",{renderer:this.markdownRenderer}),(a=(l=this.$.parentElement)===null||l===void 0?void 0:l.parentElement)===null||a===void 0||a.classList.remove(g.INFO,g.ERROR,g.WARNING),(m=(d=this.$.parentElement)===null||d===void 0?void 0:d.parentElement)===null||m===void 0||m.classList.add(this._validateClassName)}removeValidateMessage(){var u,h,c,r,l;this._hasValidateElement&&((c=(h=(u=this.$.parentElement)===null||u===void 0?void 0:u.parentElement)===null||h===void 0?void 0:h.parentElement)===null||c===void 0||c.removeChild(this.$validate),this._hasValidateElement=!1,(l=(r=this.$.parentElement)===null||r===void 0?void 0:r.parentElement)===null||l===void 0||l.classList.remove(this._validateClassName))}destroy(){if(this._destroyed)return;const u=this.focusPrevActiveElement();this._destroyed=!0,this.$.removeEventListener("click",this.handleClick),this.$.removeEventListener("keyup",this.handleKeyup),this.$.removeEventListener("keydown",this.handleKeydown),this.$.removeEventListener("focus",this.handleFocus),this.$.removeEventListener("blur",this.handleBlur),this.removeValidateMessage(),this.removeAddonAfter(),this.$.disabled=!1,this.onDestroyEmitter.fire(this.$.value),this.disposables.dispose(),requestAnimationFrame(()=>{u?.focus()})}focusPrevActiveElement(){let u=this.$.parentElement;for(;u&&!(typeof u.attributes.tabindex<"u");)u=u?.parentElement;return u}}e.PromptHandle=_},58357:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.RenamePromptHandle=void 0;const n=t(65747);class s extends n.PromptHandle{constructor(f,b){super(),this.originalFileName=f,this.target=b,this.$.value=f,this.setSelectionRange(0,f.lastIndexOf("."))}get id(){return this.target.id}get depth(){return this.target.depth}}e.RenamePromptHandle=s},48103:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});const n=t(85608);n.__exportStar(t(65747),e),n.__exportStar(t(58357),e),n.__exportStar(t(65601),e)},29805:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Tree=void 0;const n=t(70392),s=t(26353);class o{constructor(){this.onChangedEmitter=new n.Emitter,this.toDispose=new n.DisposableCollection,this.nodes={}}dispose(){var b;this.toDispose.dispose(),(b=this._root)===null||b===void 0||b.dispose()}get root(){return this._root}set root(b){var g;b!==this._root&&((g=this._root)===null||g===void 0||g.dispose(),this._root=b)}fireChanged(){this.onChangedEmitter.fire(void 0)}sortComparator(b,g){return b.constructor===g.constructor?b.name>g.name?1:b.name<g.name?-1:0:s.CompositeTreeNode.is(b)?-1:s.CompositeTreeNode.is(g)?1:0}}e.Tree=o},26353:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CompositeTreeNode=e.TreeNode=e.BranchOperatorStatus=void 0,e.spliceArray=f;const n=t(70392),s=t(34054),{Path:o}=n.path;function f(E,u,h=0,c){const r=E.slice(0);return r.splice(u,h,...c||[]),r}var b;(function(E){E[E.EXPANDED=1]="EXPANDED",E[E.SHRINKED=2]="SHRINKED"})(b||(e.BranchOperatorStatus=b={}));class g{static is(u){return!!u&&"depth"in u&&"name"in u&&"path"in u&&"id"in u}static getTreeNodeById(u){return g.idToTreeNode.get(u)}static getTreeNodeByPath(u){return g.pathToTreeNode.get(u)}static setTreeNode(u,h,c){g.idToTreeNode.set(u,c),g.pathToTreeNode.set(h,c)}static removeTreeNode(u,h){g.idToTreeNode.delete(u),g.pathToTreeNode.delete(h)}static getIdByPath(u){return g.pathToId.get(u)}static setIdByPath(u,h){return g.pathToId.set(u,h)}static getGlobalTreeState(u){let h=g.pathToGlobalTreeState.get(u);return h||(h={isExpanding:!1,isLoadingPath:!1,isRefreshing:!1,refreshCancelToken:new n.CancellationTokenSource,loadPathCancelToken:new n.CancellationTokenSource}),h}static setGlobalTreeState(u,h){let c=g.pathToGlobalTreeState.get(u);return c||(c={isExpanding:!1,isLoadingPath:!1,isRefreshing:!1,refreshCancelToken:new n.CancellationTokenSource,loadPathCancelToken:new n.CancellationTokenSource}),c={...c,...h},g.pathToGlobalTreeState.set(u,c),c}constructor(u,h,c,r){this._uid=g.nextId(),this._parent=h,this._tree=u,this._disposed=!1,this._visible=!0,this._metadata={...r||{}},this._depth=h?h.depth+1:0,c?this._watcher=c:h&&(this._watcher=h.watcher)}get disposed(){return this._disposed}get depth(){return this._depth}get parent(){return this._parent}set parent(u){this._parent=u,this._path=""}get type(){return s.TreeNodeType.TreeNode}get id(){return this._uid}set id(u){this._uid=u}get displayName(){return this.name}get name(){return this.parent?this.getMetadata("name")||String(this.id):`root_${this.id}`}set name(u){this.addMetadata("name",u),this._path=""}get path(){return this._path||(this.parent?this._path=new o(this.parent.path).join(this.name).toString():this._path=new o(`${o.separator}${this.name}`).toString()),this._path}get accessibilityInformation(){return{label:this.name,role:"treeitem"}}getMetadata(u){return u==="name"&&!this._metadata[u]&&(this._metadata[u]=String(g.nextId())),this._metadata[u]}addMetadata(u,h){if(!(u in this._metadata))this._metadata[u]=h,this._watcher.notifyDidChangeMetadata(this,{type:s.MetadataChangeType.Added,key:u,prevValue:void 0,value:h});else{const c=this._metadata[u];this._metadata[u]=h,this._watcher.notifyDidChangeMetadata(this,{type:s.MetadataChangeType.Updated,key:u,prevValue:c,value:h})}}removeMetadata(u){if(u in this._metadata){const h=this._metadata[u];delete this._metadata[u],this._watcher.notifyDidChangeMetadata(this,{type:s.MetadataChangeType.Removed,key:u,prevValue:h,value:void 0})}}mv(u,h=this.name){const c=this._parent;if(u===null||!_.is(u)){this.parent=void 0,this.dispose();return}const r=c!==u,l=this.path;this._depth=u.depth+1,(r||h!==this.name)&&(this.name=h,r&&this._watcher.notifyWillChangeParent(this,c,u),this.parent&&(this.parent.unlinkItem(this,!0),this.parent=u,this.parent.insertItem(this)),r&&this._watcher.notifyDidChangeParent(this,c,u)),this.path!==l&&this._watcher.notifyDidChangePath(this)}get visible(){return this._visible}setVisible(u){return this._visible=u,this}dispose(){this._disposed||(g.removeTreeNode(this.id,this.path),this._disposed=!0,this._watcher.notifyDidDispose(this))}}e.TreeNode=g,g.nextId=(()=>{let E=0;return()=>E++})(),g.idToTreeNode=new Map,g.pathToTreeNode=new Map,g.pathToId=new Map,g.pathToGlobalTreeState=new Map;class _ extends g{static defaultSortComparator(u,h){return u.constructor===h.constructor?u.name>h.name?1:u.name<h.name?-1:0:_.is(u)?-1:_.is(h)?1:0}static is(u){return!!u&&"children"in u}static isRoot(u){return _.is(u)&&!u.parent}generatorWatcher(){const u=new n.Emitter,h=u.event,c=new n.DisposableCollection,r=a=>{this.watchEvents.delete(a)};return{notifyWillProcessWatchEvent:(a,d)=>{u.fire({type:s.TreeNodeEvent.WillProcessWatchEvent,args:[a,d]})},notifyWillChangeParent:(a,d,m)=>{u.fire({type:s.TreeNodeEvent.WillChangeParent,args:[a,d,m]})},notifyDidChangeParent:(a,d,m)=>{u.fire({type:s.TreeNodeEvent.DidChangeParent,args:[a,d,m]})},notifyDidDispose:a=>{u.fire({type:s.TreeNodeEvent.DidDispose,args:[a]})},notifyDidProcessWatchEvent:(a,d)=>{u.fire({type:s.TreeNodeEvent.DidProcessWatchEvent,args:[a,d]})},notifyDidChangePath:a=>{u.fire({type:s.TreeNodeEvent.DidChangePath,args:[a]})},notifyWillChangeExpansionState:(a,d)=>{const m=this.isItemVisibleAtSurface(a);u.fire({type:s.TreeNodeEvent.WillChangeExpansionState,args:[a,d,m]})},notifyDidChangeExpansionState:(a,d)=>{const m=this.isItemVisibleAtSurface(a);u.fire({type:s.TreeNodeEvent.DidChangeExpansionState,args:[a,d,m]})},notifyDidChangeMetadata:(a,d)=>{u.fire({type:s.TreeNodeEvent.DidChangeMetadata,args:[a,d]})},notifyDidUpdateBranch:()=>{u.fire({type:s.TreeNodeEvent.BranchDidUpdate,args:[]})},notifyWillResolveChildren:(a,d)=>{u.fire({type:s.TreeNodeEvent.WillResolveChildren,args:[a,d]})},notifyDidResolveChildren:(a,d)=>{u.fire({type:s.TreeNodeEvent.DidResolveChildren,args:[a,d]})},on:(a,d)=>{const m=h(p=>{p.type===a&&d(...p.args)});return c.push(m),m},onWatchEvent:(a,d)=>{const m=r;return this.watchEvents.set(a,{terminator:m,callback:d}),m},dispose:c}}constructor(u,h,c,r){super(u,h,c,r),this._children=null,this._lock=!1,this.refreshThrottler=new n.ThrottledDelayer(_.REFRESH_DELAY),this.toRefreshPathQueue=new Set,this.handleWatchEvent=async l=>{switch(this.watcher.notifyWillProcessWatchEvent(this,l),l.type){case s.WatchEvent.Moved:{const{oldPath:a,newPath:d}=l;if(typeof a!="string")throw new TypeError("Expected oldPath to be a string");if(typeof d!="string")throw new TypeError("Expected newPath to be a string");if(o.isRelative(a))throw new TypeError("oldPath must be absolute");if(o.isRelative(d))throw new TypeError("newPath must be absolute");this.transferItem(a,d);break}case s.WatchEvent.Added:{const{node:a}=l;if(!g.is(a))throw new TypeError("Expected node to be a TreeNode");this.insertItem(a);break}case s.WatchEvent.Removed:{const{path:a}=l,d=new o(a),m=d.dir.toString(),p=d.base.toString();if(m===this.path&&this.children){const v=this.children.find(y=>y.name===p);v&&this.unlinkItem(v)}break}default:this.isItemVisibleAtRootSurface(this)?await this.refresh():(this.isExpanded=!1,this._children=null);break}this.watcher.notifyDidProcessWatchEvent(this,l)},this.isExpanded=!h,this._branchSize=0,h?this._watcher=h.watcher:(this.watchEvents=new Map,this._watcher=this.generatorWatcher(),this._root=this,g.setTreeNode(this.id,this.path,this))}set name(u){const h=this.path;!_.isRoot(this)&&typeof this.watchTerminator=="function"?(this.watchTerminator(h),this.addMetadata("name",u),this.watchTerminator=this.watcher.onWatchEvent(this.path,this.handleWatchEvent)):this.addMetadata("name",u),this._path=""}get name(){return this.parent?this.getMetadata("name"):`root_${this.id}`}get watcher(){return this._watcher}get type(){return s.TreeNodeType.CompositeTreeNode}get children(){return this._children}get expanded(){return this.isExpanded}get branchSize(){return this._branchSize}get flattenedBranch(){return this._flattenedBranch}get lock(){return this._lock}get root(){return(0,n.isUndefined)(this._root)&&(this._root=this.getRoot()||null),this._root}getRoot(){let u=this.parent;for(;u&&u.parent;)u=u.parent;return u}async ensureLoaded(u){if(!this._children)return await this.hardReloadChildren(u)}async setExpanded(u=!0,h=!1,c=!0,r){if(!this.disposed&&!_.isRoot(this)&&!this.isExpanded){if(c){const l=g.getGlobalTreeState(this.path);l.loadPathCancelToken.cancel(),l.refreshCancelToken.cancel(),g.setGlobalTreeState(this.path,{isExpanding:!0})}if(this.isExpanded=!0,this._children===null&&(this._watcher.notifyWillResolveChildren(this,this.isExpanded),await this.hardReloadChildren(r),this._watcher.notifyDidResolveChildren(this,this.isExpanded),!this.isExpanded||r?.isCancellationRequested)){c&&g.setGlobalTreeState(this.path,{isExpanding:!1});return}if(u&&this.parent&&_.is(this.parent)&&await this.parent.setExpanded(!0,!h,!1,r),r?.isCancellationRequested){c&&g.setGlobalTreeState(this.path,{isExpanding:!1});return}this.isExpanded&&(this._watcher.notifyWillChangeExpansionState(this,!0),this.expandBranch(this,h),this._watcher.notifyDidChangeExpansionState(this,!0)),c&&(g.setGlobalTreeState(this.path,{isExpanding:!1}),g.setTreeNode(this.id,this.path,this))}}getAllExpandedNodePath(){var u,h;const c=[];let r=0;_.isRoot(this)||(r=((u=this.root)===null||u===void 0?void 0:u.getIndexAtTreeNodeId(this.id))+1);const l=r+this.branchSize;for(let a=r;a<l;a++){const d=(h=this.root)===null||h===void 0?void 0:h.getTreeNodeAtIndex(a);_.is(d)&&d.expanded&&c.push(d.path)}return c}getAllCollapsedNodePath(){let u=[];if(this.children){for(let h=0;h<this.children.length;h++){const c=this.children[h];_.is(c)&&(c.isExpanded?u=u.concat(c.getAllCollapsedNodePath()):u.push(c.path))}return u}else return u}async resolveChildrens(u){var h,c,r;let l=this.children,a=[];try{l=await this._tree.resolveChildren(this)||[]}catch{l=[]}if(u?.isCancellationRequested)return!1;const d=new Array(l.length);this._children=Array(l.length);for(let p=0;p<l.length;p++){const v=l[p];v.id=g.getIdByPath(v.path)||v.id,this._children[p]=v,g.setIdByPath(v.path,v.id)}(h=this._children)===null||h===void 0||h.sort(this._tree.sortComparator||_.defaultSortComparator);for(let p=0;p<l.length;p++)d[p]=this._children[p].id;const m=[];for(let p=0,v=((c=this.children)===null||c===void 0?void 0:c.length)||0;p<v;p++){const y=(r=this.children)===null||r===void 0?void 0:r[p];if(_.is(y)&&y.expanded){const S=await y.resolveChildrens(u);if(S&&(a=a.concat(S)),u?.isCancellationRequested)return;m.push(y)}}this._branchSize=d.length,this.setFlattenedBranch(d);for(let p=0;p<m.length;p++){const v=m[p];v.expandBranch(v,!0)}return a.concat(m.map(p=>p.path.toString()))}updateTreeNodeCache(u){var h;if(g.setTreeNode(u.id,u.path,u),_.is(u)&&u.expanded&&(!((h=u.children)===null||h===void 0)&&h.length))for(let c=0;c<u.children.length;c++){const r=u.children[c];this.updateTreeNodeCache(r)}}async refreshTreeNodeByPaths(u=this.getAllExpandedNodePath(),h,c){if(!_.is(this))return;let r;const l=this.children;let a=this.children||[];if(this.expanded){if(this===c){try{a=await this._tree.resolveChildren(this)||[]}catch{a=[]}if(h?.isCancellationRequested)return;if(!this.expanded){if(this.children&&this.children&&this.parent){for(let d=0;d<this.children.length;d++)this.children[d].dispose();this._children=null}return}}for(;r=u.shift();){if(!(r.indexOf(`${this.path}${o.separator}`)>-1)){r===this.path&&(r=void 0);break}const m=a?.find(p=>p.path===r);if(m){if(_.is(m)&&!m.expanded){m.isExpanded=!0;const p=await m.resolveChildrens(h);if(h?.isCancellationRequested||(p&&(u=u.filter(v=>!p.find(y=>y.includes(v)))),u.length>0&&!h?.isCancellationRequested&&(u=await m.refreshTreeNodeByPaths([...u],h,c)||[],h?.isCancellationRequested)))return}}else{if(!a||a.length===0)break;for(let p=0;p<a.length;p++){const v=a[p];if(r.indexOf(`${v.path}${o.separator}`)===0&&_.is(v)){if(!_.is(v))continue;v.isExpanded=!0;const S=await v.resolveChildrens(h);if(h?.isCancellationRequested||(S&&(u=u.filter(A=>!S.find(T=>T===A))),v.path!==r&&!u.includes(v.path)&&u.unshift(r),u.length>0&&(u=await v.refreshTreeNodeByPaths([...u],h,c)||[],h?.isCancellationRequested)))return;break}}}}if(r){if(u.unshift(r),this===c){if(l){this.shrinkBranch(this,!0);for(let p=0;p<l.length;p++){const v=l[p];v?.dispose()}}const d=[],m=new Array(a.length);this._children=Array(a.length);for(let p=0;p<a.length;p++){const v=a[p];v.id=g.getIdByPath(v.path)||v.id,this._children[p]=v,g.setIdByPath(v.path,v.id),_.is(v)&&v.expanded&&d.push(v)}this._children.sort(this._tree.sortComparator||_.defaultSortComparator);for(let p=0;p<a.length;p++)m[p]=this._children[p].id;this._branchSize=m.length,this.setFlattenedBranch(m,!0),this.watcher.notifyDidUpdateBranch()}return this.parent!==c&&this.expandBranch(this,!0),u}else if(_.isRoot(this)){if(this.children){this.shrinkBranch(this,!0);for(let v=0;v<this.children.length;v++){const y=this.children[v];y?.dispose()}}const d=[],m=[],p=new Array(a.length);this._children=Array(a.length);for(let v=0;v<a.length;v++){const y=a[v];if(y.id=g.getIdByPath(y.path)||y.id,this._children[v]=y,g.setIdByPath(y.path,y.id),_.is(y)&&y.expanded){if(!y.children&&(await y.resolveChildrens(h),h?.isCancellationRequested))return;d.push(y)}else m.push(y)}this._children.sort(this._tree.sortComparator||_.defaultSortComparator);for(let v=0;v<a.length;v++)p[v]=this._children[v].id;this._branchSize=p.length,this.setFlattenedBranch(p,!0);for(let v=0;v<d.length;v++){const y=d[v];y.expandBranch(y,!0),this.updateTreeNodeCache(y)}for(let v=0;v<m.length;v++){const y=m[v];this.updateTreeNodeCache(y)}typeof this.watchTerminator=="function"&&this.watchTerminator(this.path),this.watchTerminator=this.watcher.onWatchEvent(this.path,this.handleWatchEvent),this.watcher.notifyDidUpdateBranch()}else{const d=[];if(this===c){if(this.children&&this.shrinkBranch(this,!0),this.children)for(let p=0,v=this.children.length;p<v;p++)this.children[p].dispose();const m=new Array(a.length);this._children=Array(a.length);for(let p=0,v=a.length;p<v;p++){const y=a[p];y.id=g.getIdByPath(y.path)||y.id,this._children[p]=y,g.setIdByPath(y.path,y.id),_.is(y)&&y.expanded&&d.push(y),this.updateTreeNodeCache(y)}this._children.sort(this._tree.sortComparator||_.defaultSortComparator);for(let p=0;p<a.length;p++)m[p]=this._children[p].id;this._branchSize=m.length,this.setFlattenedBranch(m);for(let p=0;p<d.length;p++){const v=d[p];v.expandBranch(v,!0)}}else for(let m=0;m<a.length;m++){const p=a[m];p.expanded&&d.push(p)}for(let m=0;m<d.length;m++){const p=d[m];p.expandBranch(p,!0)}typeof this.watchTerminator=="function"&&this.watchTerminator(this.path),this.watchTerminator=this.watcher.onWatchEvent(this.path,this.handleWatchEvent),this===c&&this.expandBranch(this)}}else{if(this.children&&this.children&&this.parent){for(let d=0,m=this.children.length;d<m;d++)this.children[d].dispose();this._children=null}return}}async expandedAll(u=this.getAllCollapsedNodePath()){if(!_.isRoot(this))return;u=u.sort((c,r)=>o.pathDepth(c)-o.pathDepth(r));let h;for(;u.length>0;){h=u.pop();const c=g.getTreeNodeByPath(h);_.is(c)&&await c.setExpanded(!1,!0)}this.watcher.notifyDidUpdateBranch()}async collapsedAll(u=this.getAllExpandedNodePath()){if(!_.isRoot(this))return;u=u.sort((c,r)=>o.pathDepth(c)-o.pathDepth(r));let h;for(;u.length>0;){h=u.pop();const c=g.getTreeNodeByPath(h);_.is(c)&&c.setCollapsed(!0)}this.watcher.notifyDidUpdateBranch()}setCollapsed(u=!1){if(_.isRoot(this)||this.disposed||!this.isExpanded)return;const h=g.getGlobalTreeState(this.path);h.isExpanding||(h.loadPathCancelToken.cancel(),h.refreshCancelToken.cancel(),this._watcher.notifyWillChangeExpansionState(this,!1),this._children&&this.parent&&this.shrinkBranch(this,u),this.isExpanded=!1,g.setTreeNode(this.id,this.path,this),this._watcher.notifyDidChangeExpansionState(this,!1))}mv(u,h=this.name){const c=this.path;if(super.mv(u,h),typeof this.watchTerminator=="function"&&(this.watchTerminator(c),this.watchTerminator=this.watcher.onWatchEvent(this.path,this.handleWatchEvent)),this.children)for(let r=0;r<this.children.length;r++){const l=this.children[r];l.mv(l.parent,l.name)}}insertItem(u){if(u.parent!==this){u.mv(this,u.name);return}if(this.children){for(let m=0;m<this.children.length;m++)if(this.children[m].path===u.path){this.children[m]=u;return}}const h=1+(u instanceof _&&u.expanded?u._branchSize:0);this._children&&(this._children.push(u),this._children.sort(this._tree.sortComparator||_.defaultSortComparator)),this._branchSize+=h;let c=this;for(;!c._flattenedBranch;)c.parent&&(c=c.parent,c._branchSize+=h);if(!this._children)return;let r=this._children.indexOf(u),l;const a=this._children[r-1];a?r=c._flattenedBranch.indexOf(a.id)+(a instanceof _&&a.expanded?a._branchSize:0):r=c._flattenedBranch.indexOf(this.id),r===-1&&this._branchSize===1&&(r=0),l=r+1,c._flattenedBranch.length===0&&(l=0);let d=[u.id];return u instanceof _&&u.expanded&&u._flattenedBranch&&(d=d.concat(u._flattenedBranch),u.setFlattenedBranch(null)),c.setFlattenedBranch(f(c._flattenedBranch,l,0,d)),g.setTreeNode(u.id,u.path,u),u}unlinkItem(u,h){var c;if(!this._children)return;const r=this._children.indexOf(u);if(r===-1||!this.isItemVisibleAtRootSurface(this))return;(c=this._children)===null||c===void 0||c.splice(r,1);const l=1+(u instanceof _&&u.expanded?u._branchSize:0);this._branchSize-=l;let a=this;for(;!a._flattenedBranch;)a.parent&&(a=a.parent,a._branchSize-=l);const d=a._flattenedBranch.indexOf(u.id);d!==-1&&(u instanceof _&&u.expanded&&u.setFlattenedBranch(a._flattenedBranch.slice(d+1,d+l)),a.setFlattenedBranch(f(a._flattenedBranch,d,l)),!h&&u.parent===this&&u.mv(null))}transferItem(u,h){var c;const r=new o(u),l=r.dir.toString();if(l!==this.path)return;const a=r.base.toString(),d=(c=this._children)===null||c===void 0?void 0:c.find(y=>y.name===a);if(!d)return;const m=new o(h),p=m.dir.toString(),v=p===l?this:g.getTreeNodeByPath(p);if(!_.is(v)){this.unlinkItem(d);return}return d.mv(v,m.base.toString()),d}dispose(){if(this.watchEvents){const u=this.watchEvents.get(this.path);u&&u.terminator(),this.watchEvents.clear()}this._children&&(this.isExpanded=!1,this._children.forEach(u=>{u.dispose()}),this._children=null,this._flattenedBranch=null),super.dispose()}setFlattenedBranch(u,h){this._flattenedBranch=u,_.isRoot(this)&&!h&&this.watcher.notifyDidUpdateBranch()}expandBranch(u,h){if(this!==u&&u._flattenedBranch&&(this._branchSize+=u._branchSize),this!==u&&this._flattenedBranch){const c=this._flattenedBranch.indexOf(u.id)+1;if(c===0)return;this.setFlattenedBranch(f(this._flattenedBranch,c,0,u._flattenedBranch),h),u.setFlattenedBranch(null,h)}else this.parent&&this.parent.expandBranch(u,h)}shrinkBranch(u,h){if(this!==u&&(this._branchSize-=u._branchSize),this!==u&&this._flattenedBranch){const c=this._flattenedBranch.indexOf(u.id)+1;if(c===0)return;u.setFlattenedBranch(this._flattenedBranch.slice(c,c+u._branchSize),h),this.setFlattenedBranch(f(this._flattenedBranch,c,u._flattenedBranch?u._flattenedBranch.length:0),h)}else this.parent&&this.parent.shrinkBranch(u,h)}async hardReloadChildren(u){let h;const c=this.path;try{h=await this._tree.resolveChildren(this)||[]}catch{h=[]}if(!this.expanded||u?.isCancellationRequested)return!1;this.path!==c&&g.setGlobalTreeState(c,{isExpanding:!1,isLoadingPath:!1,isRefreshing:!1});const r=[],l=new Array(h.length),a=new Array(h.length);for(let d=0;d<h.length;d++){const m=h[d];if(m.id=g.getIdByPath(m.path)||m.id,a[d]=m,g.setIdByPath(m.path,m.id),_.is(m)&&m.expanded){if(m.children||await m.resolveChildrens(u),u?.isCancellationRequested)return!1;r.push(m)}}a.sort(this._tree.sortComparator||_.defaultSortComparator);for(let d=0;d<h.length;d++)l[d]=a[d].id;if(this.children&&this.shrinkBranch(this),this.children)for(let d=0;d<this.children.length;d++){const m=this.children[d];m?.dispose()}for(let d=0;d<a.length;d++)this.updateTreeNodeCache(a[d]);this._children=a,this._branchSize=l.length,this.setFlattenedBranch(l);for(let d=0;d<r.length;d++){const m=r[d];m.expandBranch(m,!0)}return typeof this.watchTerminator=="function"&&this.watchTerminator(this.path),this.watchTerminator=this.watcher.onWatchEvent(this.path,this.handleWatchEvent),!0}moveNode(u,h){if(typeof u!="string")throw new TypeError("Expected oldPath to be a string");if(typeof h!="string")throw new TypeError("Expected newPath to be a string");if(o.isRelative(u))throw new TypeError("oldPath must be absolute");if(o.isRelative(h))throw new TypeError("newPath must be absolute");return this.transferItem(u,h)}addNode(u){if(!g.is(u))throw new TypeError("Expected node to be a TreeNode");return this.insertItem(u)}removeNode(u){const h=new o(u),c=h.dir.toString(),r=h.base.toString();if(c===this.path&&this.children){const l=this.children.find(a=>a.name===r);l&&this.unlinkItem(l)}}async refresh(u,h){if(!_.isRoot(this))return await this.root.refresh(u,this);const c=g.getGlobalTreeState(this.path);if(c.isLoadingPath||c.isExpanding)return;let r;if(u&&!u.token.isCancellationRequested)g.setGlobalTreeState(this.path,{isRefreshing:!0,refreshCancelToken:u}),r=u.token;else if(c.refreshCancelToken.token.isCancellationRequested){const l=new n.CancellationTokenSource;g.setGlobalTreeState(this.path,{isRefreshing:!0,refreshCancelToken:l}),r=l.token}else r=c.refreshCancelToken.token;this.toRefreshPathQueue.add((h||this).path),await this.refreshThrottler.trigger(()=>this.doRefresh(r)),g.setGlobalTreeState(this.path,{isRefreshing:!1})}async doRefresh(u){const h=this.getRefreshNode()||this;if(!_.is(h))return;const c=h.getAllExpandedNodePath();await h.refreshTreeNodeByPaths(c,u,h)}getRefreshNode(){let u=Array.from(this.toRefreshPathQueue);if(this.toRefreshPathQueue.clear(),!u.length)return this.root;if(u=u.sort((r,l)=>{const a=o.pathDepth(r),d=o.pathDepth(l);return a-d}),u.length===1||o.pathDepth(u[0])===1)return g.getTreeNodeByPath(u[0]);const h=u.map(r=>new o(r));let c=h[0];for(let r=1,l=h.length;r<l;r++)if(!c.isEqualOrParent(h[r]))for(;!c.isRoot&&(c=c.dir,!(!c||c.isEqualOrParent(h[r]))););return c?g.getTreeNodeByPath(c.toString()):this.root}isItemVisibleAtRootSurface(u){let h=u;for(;h.parent;)h=h.parent;return h.isItemVisibleAtSurface(u)}isItemVisibleAtSurface(u){return u===this?!0:!!this._flattenedBranch&&this._flattenedBranch.indexOf(u.id)>-1}transformToRelativePath(u){const{splitPath:h}=o,c=h(u);return c.shift(),c}async loadTreeNodeByPath(u,h=!1){if(!_.isRoot(this))return;const c=g.getGlobalTreeState(this.path);if(c.isExpanding)return;c.refreshCancelToken.cancel(),c.loadPathCancelToken.cancel();const r=new n.CancellationTokenSource;g.setGlobalTreeState(this.path,{isLoadingPath:!0,loadPathCancelToken:r});const l=r.token,a=[],{splitPath:d,isRelative:m}=o,p=m(u)?d(u):this.transformToRelativePath(u);if(p.length===0)return g.setGlobalTreeState(this.path,{isLoadingPath:!1}),this;if(this.children||await this.ensureLoaded(l),l.isCancellationRequested){g.setGlobalTreeState(this.path,{isLoadingPath:!1});return}let v=this._children,y,S="",A;for(;v&&(A=p.shift());){let T=v.find(D=>D.name.indexOf(A)===0);if(T){if(_.is(T)){if(T._watcher.notifyWillChangeExpansionState(T,!0),T.isExpanded=!0,!T.children&&(await T.resolveChildrens(l),l.isCancellationRequested)){g.setGlobalTreeState(this.path,{isLoadingPath:!1});return}a.push(T),T._watcher.notifyDidChangeExpansionState(T,!0)}if(p.length===0){y=T;break}}if(!T&&y){const D=d(y.name).slice(1);if(D[0]===A){for(D.shift();D.length>0&&D[0]===p[0];)D.shift(),p.shift();A=p.shift(),T=v.find(w=>w.name.indexOf(A)===0)}}if(!T||!_.is(T)&&p.length>0)break;if(_.is(T)){if(T.name.indexOf(o.separator)>0){const w=d(T.name).slice(1);for(;w.length>0&&w[0]===p[0];)w.shift(),p.shift()}if(!T._children&&(S=T.path,_.is(T))){if(T.isExpanded=!0,!T.children&&(await T.resolveChildrens(l),l.isCancellationRequested)){g.setGlobalTreeState(this.path,{isLoadingPath:!1});return}a.push(T)}if(T&&p.length===0){y=T;break}else{if(S&&S!==T.path){const w=d(S),I=d(T.path);I.length>w.length&&p.splice(0,I.length-w.length)}v=T._children,y=T}}}if(y){let T;if(y.disposed){g.setGlobalTreeState(this.path,{isLoadingPath:!1});return}for(;T=a.pop();)T.expandBranch(T,!0),a.length===0&&this.updateTreeNodeCache(T);return h||this.watcher.notifyDidUpdateBranch(),g.setGlobalTreeState(this.path,{isLoadingPath:!1}),y}g.setGlobalTreeState(this.path,{isLoadingPath:!1})}getIndexAtTreeNodeId(u){return this._flattenedBranch?this._flattenedBranch.indexOf(u):-1}getIndexAtTreeNode(u){return this._flattenedBranch?this._flattenedBranch.indexOf(u.id):-1}getTreeNodeAtIndex(u){var h;const c=(h=this._flattenedBranch)===null||h===void 0?void 0:h[u];if(c)return g.getTreeNodeById(c)}getTreeNodeById(u){return g.getTreeNodeById(u)}getTreeNodeByPath(u){return g.getTreeNodeByPath(u)}}e.CompositeTreeNode=_,_.REFRESH_DELAY=200},58781:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CompositeDecoration=e.ChangeReason=e.CompositeDecorationType=e.ClasslistComposite=void 0;const n=t(70392),s=t(96336);class o{constructor(E,u){this.addChangeListener=E,this.removeChangeListener=u}}e.ClasslistComposite=o;var f;(function(_){_[_.Applicable=1]="Applicable",_[_.Inheritable=2]="Inheritable"})(f||(e.CompositeDecorationType=f={}));var b;(function(_){_[_.UnTargetDecoration=1]="UnTargetDecoration",_[_.TargetDecoration=2]="TargetDecoration"})(b||(e.ChangeReason=b={}));class g{constructor(E,u,h){this.handleDecorationDidAddClassname=c=>{const{classname:r}=c;!this.selfOwned||!r||(this.compositeCssClasslist.classlist.push(r),this.notifyClasslistChange())},this.handleDecorationDidRemoveClassname=c=>{const{classname:r}=c;if(!this.selfOwned||!r)return;const l=this.compositeCssClasslist.classlist.indexOf(r);l>-1&&(this.compositeCssClasslist.classlist.splice(l,1),this.notifyClasslistChange())},this.mergeDecorationClasslist=c=>{const{decoration:r}=c;this.selfOwned&&(this.compositeCssClasslist.classlist.push(...r.cssClassList),this.notifyClasslistChange())},this.handleDecorationDisable=c=>{const{decoration:r}=c;this.removeDecorationClasslist(r)},this.target=E,this.type=u,this.linkedComposites=new Set,this.classlistChangeCallbacks=new Set,this.compositeCssClasslist=new o(this.classlistChangeCallbacks.add.bind(this.classlistChangeCallbacks),this.classlistChangeCallbacks.delete.bind(this.classlistChangeCallbacks)),h?(this.selfOwned=!1,this.parent=h,this.renderedDecorations=h.renderedDecorations,this.compositeCssClasslist.classlist=h.compositeCssClasslist.classlist,h.linkedComposites.add(this)):(this.renderedDecorations=new Map,this.targetedDecorations=new Set,this.negatedDecorations=new Set,this.compositeCssClasslist.classlist=[],this.selfOwned=!0)}changeParent(E){if(E){if(!this.selfOwned)return this.parentOwn(E);for(const[u]of this.renderedDecorations)this.recursiveRefresh(this,!1,b.UnTargetDecoration,u,!1);this.parent!==E&&(this.parent.linkedComposites.delete(this),this.parent=E,E.linkedComposites.add(this));for(const[u]of E.renderedDecorations)this.recursiveRefresh(this,!1,b.TargetDecoration,u,!1)}}add(E){const u=E.appliedTargets.get(this.target),h=u&&(u===s.TargetMatchMode.Self||u===s.TargetMatchMode.SelfAndChildren),c=u&&(u===s.TargetMatchMode.Children||u===s.TargetMatchMode.SelfAndChildren);if(!(this.type===f.Applicable&&!h)&&!(this.type===f.Inheritable&&!c)){if(!this.selfOwned){this.selfOwn(b.TargetDecoration,E),this.targetedDecorations.add(E);return}this.targetedDecorations.has(E)||(this.targetedDecorations.add(E),this.recursiveRefresh(this,!1,b.TargetDecoration,E))}}remove(E){if(this.selfOwned&&this.targetedDecorations.delete(E)){if(this.negatedDecorations.size===0&&this.targetedDecorations.size===0&&this.parent)return this.parentOwn(void 0,b.UnTargetDecoration,E);this.recursiveRefresh(this,!1,b.UnTargetDecoration,E)}}negate(E){const u=E.negatedTargets.get(this.target),h=u&&(u===s.TargetMatchMode.Self||u===s.TargetMatchMode.SelfAndChildren),c=u&&(u===s.TargetMatchMode.Children||u===s.TargetMatchMode.SelfAndChildren);if(!(this.type===f.Applicable&&!h)&&!(this.type===f.Inheritable&&!c)){if(!this.selfOwned){this.selfOwn(b.UnTargetDecoration,E),this.negatedDecorations.add(E);return}this.negatedDecorations.has(E)||(this.negatedDecorations.add(E),this.renderedDecorations.has(E)&&this.removeDecorationClasslist(E))}}unNegate(E){if(this.selfOwned&&this.negatedDecorations.delete(E)){if(this.negatedDecorations.size===0&&this.targetedDecorations.size===0&&this.parent)return this.parentOwn();!this.renderedDecorations.has(E)&&(this.parent.renderedDecorations.has(E)||E.appliedTargets.has(this.target))&&this.recursiveRefresh(this,!1,b.TargetDecoration,E)}}selfOwn(E,u){if(this.selfOwned)throw new Error("CompositeDecoration is already self owned");const h=this.parent;this.selfOwned=!0,this.compositeCssClasslist.classlist=[],this.renderedDecorations=new Map,this.targetedDecorations=new Set,this.negatedDecorations=new Set;for(const[c]of h.renderedDecorations)c!==u&&this.processCompositeAlteration(b.TargetDecoration,c);E===b.UnTargetDecoration&&this.parent.renderedDecorations.has(u)&&!this.renderedDecorations.has(u)&&this.notifyClasslistChange(!1),this.recursiveRefresh(this,!0,E,u)}parentOwn(E,u,h){this.selfOwned=!1,this.targetedDecorations&&this.targetedDecorations.clear(),this.negatedDecorations&&this.negatedDecorations.clear(),E&&this.parent!==E&&(this.parent&&this.parent.linkedComposites.delete(this),E.linkedComposites.add(this),this.parent=E),this.recursiveRefresh(this,!0,u,h)}processCompositeAlteration(E,u){if(!this.selfOwned)throw new Error("CompositeDecoration is not self owned");if(E===b.UnTargetDecoration){const h=this.renderedDecorations.get(u);if(h){const c=u.appliedTargets.get(this.target),r=c&&(c===s.TargetMatchMode.Self||c===s.TargetMatchMode.SelfAndChildren),l=c&&(c===s.TargetMatchMode.Children||c===s.TargetMatchMode.SelfAndChildren);return r&&this.type===f.Applicable||l&&this.type===f.Inheritable?!1:(this.removeDecorationClasslist(u,!1),h&&h.dispose(),this.renderedDecorations.delete(u))}return!1}if(E===b.TargetDecoration){const h=u.negatedTargets.get(this.target),c=h&&(h===s.TargetMatchMode.Self||h===s.TargetMatchMode.SelfAndChildren),r=h&&(h===s.TargetMatchMode.Children||h===s.TargetMatchMode.SelfAndChildren);if(c&&this.type===f.Applicable||r&&this.type===f.Inheritable)return!1;if(!this.renderedDecorations.has(u)){const l=new n.DisposableCollection;return l.push(u.onDidAddCSSClassname(this.handleDecorationDidAddClassname)),l.push(u.onDidRemoveCSSClassname(this.handleDecorationDidRemoveClassname)),l.push(u.onDidDisableDecoration(this.handleDecorationDisable)),l.push(u.onDidEnableDecoration(this.mergeDecorationClasslist)),this.renderedDecorations.set(u,l),u.disabled?!1:(this.compositeCssClasslist.classlist.push(...u.cssClassList),!0)}}return!1}recursiveRefresh(E,u,h,c,r=!0){if(!this.selfOwned&&u&&(this.renderedDecorations=this.parent.renderedDecorations,this.compositeCssClasslist.classlist=this.parent.compositeCssClasslist.classlist),this.selfOwned&&u&&E!==this){for(const[l]of this.renderedDecorations)this.processCompositeAlteration(b.UnTargetDecoration,l);for(const[l]of this.parent.renderedDecorations)this.processCompositeAlteration(b.TargetDecoration,l);r&&this.notifyClasslistChange(!1)}else this.selfOwned&&h===b.UnTargetDecoration&&c&&this.renderedDecorations.has(c)?(this.processCompositeAlteration(h,c),r&&this.notifyClasslistChange(!1)):this.selfOwned&&h===b.TargetDecoration&&c&&this.processCompositeAlteration(h,c)&&r?this.notifyClasslistChange(!1):!this.selfOwned&&r&&this.notifyClasslistChange(!1);for(const l of this.linkedComposites)l.recursiveRefresh(E,u,h,c,r)}removeDecorationClasslist(E,u=!0){if(this.selfOwned){for(const h of E.cssClassList){const c=this.compositeCssClasslist.classlist.indexOf(h);c>-1&&this.compositeCssClasslist.classlist.splice(c,1)}u&&this.notifyClasslistChange()}}notifyClasslistChange(E=!0){for(const u of[...this.classlistChangeCallbacks])u();if(E)for(const u of this.linkedComposites)u.selfOwned||u.notifyClasslistChange()}}e.CompositeDecoration=g},96336:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Decoration=e.TargetMatchMode=void 0;const n=t(70392),s=t(26353);var o;(function(b){b[b.None=1]="None",b[b.Self=2]="Self",b[b.Children=3]="Children",b[b.SelfAndChildren=4]="SelfAndChildren"})(o||(e.TargetMatchMode=o={}));class f{constructor(...g){if(this._appliedTargets=new Map,this._negatedTargets=new Map,this._disabled=!1,this.appliedTargetsDisposables=new WeakMap,this.negatedTargetsDisposables=new WeakMap,this.onDidAddCSSClassnameEmitter=new n.Emitter,this.onDidRemoveCSSClassnameEmitter=new n.Emitter,this.onDidDisableDecorationEmitter=new n.Emitter,this.onDidEnableDecorationEmitter=new n.Emitter,this.onDidAddTargetEmitter=new n.Emitter,this.onDidRemoveTargetEmitter=new n.Emitter,this.onDidNegateTargetEmitter=new n.Emitter,this.onDidUnNegateTargetEmitter=new n.Emitter,Array.isArray(g))if(g.every(_=>typeof _=="string"))this._cssClassList=new Set(g);else throw new TypeError("classlist must be of type `Array<string>`");else this._cssClassList=new Set}get disabled(){return this._disabled}set disabled(g){this._disabled=g,g?this.onDidDisableDecorationEmitter.fire({decoration:this}):this.onDidEnableDecorationEmitter.fire({decoration:this})}get appliedTargets(){return this._appliedTargets}get negatedTargets(){return this._negatedTargets}get cssClassList(){return this._cssClassList}get onDidAddCSSClassname(){return this.onDidAddCSSClassnameEmitter.event}get onDidRemoveCSSClassname(){return this.onDidRemoveCSSClassnameEmitter.event}get onDidDisableDecoration(){return this.onDidDisableDecorationEmitter.event}get onDidEnableDecoration(){return this.onDidEnableDecorationEmitter.event}get onDidAddTarget(){return this.onDidAddTargetEmitter.event}get onDidRemoveTarget(){return this.onDidRemoveTargetEmitter.event}get onDidNegateTarget(){return this.onDidNegateTargetEmitter.event}get onDidUnNegateTarget(){return this.onDidUnNegateTargetEmitter.event}addCSSClass(g){this._cssClassList.has(g)||(this._cssClassList.add(g),this.onDidAddCSSClassnameEmitter.fire({decoration:this,classname:g}))}removeCSSClass(g){this._cssClassList.has(g)&&(this._cssClassList.delete(g),this.onDidRemoveCSSClassnameEmitter.fire({decoration:this,classname:g}))}hasTarget(g){return!!this._appliedTargets.get(g)}addTarget(g,_=o.Self){if(this._appliedTargets.get(g)===_||!s.TreeNode.is(g))return;this._appliedTargets.set(g,_);const u=n.Disposable.create(()=>{this.removeTarget(g)});return this.appliedTargetsDisposables.set(g,u),this.onDidAddTargetEmitter.fire({decoration:this,target:g}),u}removeTarget(g){if(this._appliedTargets.delete(g)){const _=this.appliedTargetsDisposables.get(g);_&&_.dispose(),this.onDidRemoveTargetEmitter.fire({decoration:this,target:g})}}clearAppliedTarget(){const g=Array.from(this._appliedTargets.keys());for(const _ of g)this.removeTarget(_)}clearNegateTarget(){const g=Array.from(this._negatedTargets.keys());for(const _ of g)this.unNegateTarget(_)}negateTarget(g,_=o.Self){if(this._negatedTargets.get(g)===_||!s.TreeNode.is(g))return;this._negatedTargets.set(g,_);const u=n.Disposable.create(()=>{this.unNegateTarget(g)});return this.negatedTargetsDisposables.set(g,u),this.onDidNegateTargetEmitter.fire({decoration:this,target:g}),u}unNegateTarget(g){if(this._negatedTargets.delete(g)){const _=this.negatedTargetsDisposables.get(g);_&&_.dispose(),this.onDidUnNegateTargetEmitter.fire({decoration:this,target:g})}}}e.Decoration=f},29701:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DecorationsManager=void 0;const n=t(70392),s=t(34054),o=t(26353),f=t(58781);class b{constructor(_){this.root=_,this.decorations=new Map,this.decorationsMeta=new WeakMap,this.disposables=new n.DisposableCollection,this.disposed=!1,this.targetDecoration=E=>{const{decoration:u,target:h}=E,c=this.getDecorationData(h);if(c){const{applicable:r,inheritable:l}=c;r.add(u),l&&l.add(u)}},this.updateTarget=()=>{for(const[E]of this.decorations)for(const[u,h]of Array.from(E.appliedTargets)){E.removeTarget(u);const c=this.root.getTreeNodeByPath(u.path);c&&E.addTarget(c,h)}},this.unTargetDecoration=E=>{const{decoration:u,target:h}=E,c=this.getDecorationData(h);if(c){const{applicable:r,inheritable:l}=c;r.remove(u),l&&l.remove(u)}},this.negateDecoration=E=>{const{decoration:u,target:h}=E,c=this.getDecorationData(h);if(c){const{applicable:r,inheritable:l}=c;r.negate(u),l&&l.negate(u)}},this.unNegateDecoration=E=>{const{decoration:u,target:h}=E,c=this.getDecorationData(h);if(c){const{applicable:r,inheritable:l}=c;r.unNegate(u),l&&l.unNegate(u)}},this.switchParent=(E,u,h)=>{const c=this.decorationsMeta.get(E);if(!c)return;const r=this.getDecorationData(h);r&&(c.applicable.changeParent(r.inheritable),c.inheritable&&c.inheritable.changeParent(r.inheritable))},this.decorationsMeta.set(_,{applicable:new f.CompositeDecoration(_,f.CompositeDecorationType.Applicable),inheritable:new f.CompositeDecoration(_,f.CompositeDecorationType.Inheritable)}),this.disposables.push(_.watcher.on(s.TreeNodeEvent.DidChangeParent,this.switchParent)),this.disposables.push(_.watcher.on(s.TreeNodeEvent.DidDispose,E=>this.decorationsMeta.delete(E))),this.disposables.push(_.watcher.on(s.TreeNodeEvent.BranchDidUpdate,this.updateTarget))}dispose(){for(const[_]of this.decorations)this.removeDecoration(_);this.disposables.dispose(),this.disposed=!0}addDecoration(_){if(this.disposed)throw new Error("DecorationManager disposed");if(this.decorations.has(_))return;const E=new n.DisposableCollection;E.push(_.onDidAddTarget(this.targetDecoration)),E.push(_.onDidRemoveTarget(this.unTargetDecoration)),E.push(_.onDidNegateTarget(this.negateDecoration)),E.push(_.onDidUnNegateTarget(this.unNegateDecoration)),this.decorations.set(_,E);for(const[u]of _.appliedTargets)this.targetDecoration({decoration:_,target:u});for(const[u]of _.negatedTargets)this.negateDecoration({decoration:_,target:u})}removeDecoration(_){const E=this.decorations.get(_);if(E){for(const[u]of _.appliedTargets){const h=this.decorationsMeta.get(u);h&&(h.applicable.remove(_),h.inheritable&&h.inheritable.remove(_))}for(const[u]of _.negatedTargets){const h=this.decorationsMeta.get(u);h&&(h.applicable.unNegate(_),h.inheritable&&h.inheritable.unNegate(_))}E.dispose(),this.decorations.delete(_)}}getDecorations(_){if(!_||!o.TreeNode.is(_))return;const E=this.getDecorationData(_);if(E)return E.applicable.compositeCssClasslist}getDecorationData(_){if(this.disposed)return;const E=this.decorationsMeta.get(_);if(E)return E;if(!_||!_.parent)return;const u=this.getDecorationData(_.parent);if(u){const h={applicable:new f.CompositeDecoration(_,f.CompositeDecorationType.Applicable,u.inheritable),inheritable:o.CompositeTreeNode.is(_)?new f.CompositeDecoration(_,f.CompositeDecorationType.Inheritable,u.inheritable):void 0};return this.decorationsMeta.set(_,h),h}}}e.DecorationsManager=b},24936:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});const n=t(85608);n.__exportStar(t(96336),e),n.__exportStar(t(29701),e),n.__exportStar(t(58781),e)},43685:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});const n=t(85608);n.__exportStar(t(29805),e),n.__exportStar(t(26353),e),n.__exportStar(t(58615),e),n.__exportStar(t(24936),e)},13674:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TreeModel=void 0;const n=t(70392),s=t(34054),o=t(70609);class f{constructor(){this.onChangeEmitter=new n.Emitter,this.dispatchChange=()=>{this.onChangeEmitter.fire()}}get onChange(){return this.onChangeEmitter.event}get ensureReady(){return this._ensureReady}get root(){return this._root}set root(g){this._root=g,this.initState(g),this.root&&(this._ensureReady=this.root.ensureLoaded())}get state(){return this._state}set state(g){this._state=g}init(g){this.root=g,this.root.watcher.on(s.TreeNodeEvent.BranchDidUpdate,this.dispatchChange)}initState(g){this.state=new o.TreeStateManager(g)}loadTreeState(g){return typeof g=="string"&&(g=JSON.parse(g)),this.state.loadTreeState(g)}getTreeStateWatcher(g=!1){return new o.TreeStateWatcher(this.state,g)}resolveChildren(g){return Promise.resolve(Array.from(g.children))}}e.TreeModel=f},58615:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),t(85608).__exportStar(t(13674),e)},12165:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TreeStateManager=e.Operation=void 0;const n=t(70392),s=t(34054),o=t(26353),{Path:f}=n.path;var b;(function(E){E[E.SetExpanded=1]="SetExpanded",E[E.SetCollapsed=2]="SetCollapsed",E[E.SetActive=3]="SetActive"})(b||(e.Operation=b={}));var g;(function(E){E[E.Expanded=1]="Expanded",E[E.Collapsed=2]="Collapsed",E[E.Disabled=4]="Disabled"})(g||(g={}));class _{constructor(u){this.expandedDirectories=new Map,this._scrollOffset=0,this.stashing=!1,this.stashLockingItems=new Set,this.onDidLoadStateEmitter=new n.Emitter,this.onChangeScrollOffsetEmitter=new n.Emitter,this.onDidChangeExpansionStateEmitter=new n.Emitter,this.onDidChangeRelativePathEmitter=new n.Emitter,this.handleExpansionChange=(h,c,r)=>{var l;if(this.stashing&&this.stashKeyframes&&this.stashKeyframes.set(h.id,c?g.Expanded:g.Collapsed),this.stashKeyframes&&!this.stashing){if(c){let d=h;for(;d;){if(this.stashKeyframes.has(d.id)){let m=this.stashKeyframes.get(d.id);m=m|g.Disabled,this.stashKeyframes.set(d.id,m)}d=d.parent}this.stashLockingItems.add(h)}if(this.stashLockingItems&&this.stashLockingItems.has(h)&&!c){let d=h;for(;d;){if(this.stashKeyframes.has(d.id)){let m=this.stashKeyframes.get(d.id);m&=~g.Disabled,this.stashKeyframes.set(d.id,m)}d=d.parent}this.stashLockingItems.delete(h)}}let a=this.expandedDirectories.get(h);c&&!a?(a=(l=new f(this.root.path).relative(new f(h.path)))===null||l===void 0?void 0:l.toString(),this.expandedDirectories.set(h,a),this.onDidChangeExpansionStateEmitter.fire({relativePath:a,isExpanded:c,isVisibleAtSurface:r})):!c&&a&&(this.expandedDirectories.delete(h),this.onDidChangeExpansionStateEmitter.fire({relativePath:a,isExpanded:c,isVisibleAtSurface:r}))},this.handleDidChangePath=h=>{var c;if(this.expandedDirectories.has(h)){const r=this.expandedDirectories.get(h),l=(c=new f(this.root.path).relative(new f(h.path)))===null||c===void 0?void 0:c.toString();this.expandedDirectories.set(h,l),this.onDidChangeRelativePathEmitter.fire({prevPath:r,newPath:l})}},this.root=u,this.root.watcher.on(s.TreeNodeEvent.DidChangeExpansionState,this.handleExpansionChange),this.root.watcher.on(s.TreeNodeEvent.DidChangePath,this.handleDidChangePath)}get scrollOffset(){return this._scrollOffset}saveScrollOffset(u){this._scrollOffset=u,this.onChangeScrollOffsetEmitter.fire(u)}get onDidLoadState(){return this.onDidLoadStateEmitter.event}get onChangeScrollOffset(){return this.onChangeScrollOffsetEmitter.event}get onDidChangeExpansionState(){return this.onDidChangeExpansionStateEmitter.event}get onDidChangeRelativePath(){return this.onDidChangeRelativePathEmitter.event}async loadTreeState(u){if(u){for(const h of u.expandedDirectories.buried)try{const c=await this.root.loadTreeNodeByPath(h);if(!c)break;c&&o.CompositeTreeNode.is(c)&&c.setCollapsed()}catch{}for(const h of u.expandedDirectories.atSurface)try{if(!await this.root.loadTreeNodeByPath(h,!0))break}catch{}this._scrollOffset=typeof u.scrollPosition=="number"&&u.scrollPosition>-1?u.scrollPosition:this._scrollOffset,this.root.watcher.notifyDidUpdateBranch(),this.onDidLoadStateEmitter.fire()}}excludeFromStash(u){this.stashKeyframes&&!this.stashing&&this.handleExpansionChange(o.CompositeTreeNode.is(u)?u:u.parent,!0,this.root.isItemVisibleAtSurface(u))}beginStashing(){this.stashing=!0,this.stashKeyframes=new Map}endStashing(){this.stashing=!1,this.stashLockingItems.clear()}async reverseStash(){if(!this.stashKeyframes)return;this.endStashing();const u=Array.from(this.stashKeyframes);this.stashKeyframes=null;for(const[h,c]of u){const r=(c&g.Disabled)===g.Disabled,l=o.TreeNode.getTreeNodeById(h);!l||r||((c&g.Expanded)===g.Expanded?l.setCollapsed():(c&g.Collapsed)===g.Collapsed&&await l.setExpanded())}}}e.TreeStateManager=_},72782:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TreeStateWatcher=void 0;const n=t(70392),s=t(13440);class o{constructor(b,g=!1){this._disposed=!1,this.disposables=new n.DisposableCollection,this.onDidTreeStateChangeEmitter=new n.Emitter,this.currentState={specVersion:1,scrollPosition:0,expandedDirectories:{atSurface:[],buried:[]}},this.disposables.push(b.onChangeScrollOffset(_=>{this.currentState.scrollPosition=_,this.onDidTreeStateChangeEmitter.fire(s.TreeStateWatcherChangeType.ScrollOffset)})),this.disposables.push(b.onDidChangeRelativePath(({prevPath:_,newPath:E})=>{let u=!1;const h=new Set(this.currentState.expandedDirectories.atSurface);if(h.has(_)&&(h.delete(_),h.add(E),u=!0),this.currentState.expandedDirectories.atSurface=Array.from(h),g){const c=new Set(this.currentState.expandedDirectories.buried);c.has(_)&&(h.delete(_),h.add(E),u=!0),this.currentState.expandedDirectories.buried=Array.from(c)}u&&this.onDidTreeStateChangeEmitter.fire(s.TreeStateWatcherChangeType.PathsUpdated)})),this.disposables.push(b.onDidChangeExpansionState(({relativePath:_,isExpanded:E,isVisibleAtSurface:u})=>{let h=!1;const c=new Set(this.currentState.expandedDirectories.atSurface),r=new Set(this.currentState.expandedDirectories.buried);if(c.has(_)&&(!E||!u)){c.delete(_);const a=Array.from(c).filter(d=>d.indexOf(_)>=0);for(const d of a)c.delete(d),r.has(d)||r.add(d);h=!0}else E&&u&&(c.add(_),h=!0);this.currentState.expandedDirectories.atSurface=Array.from(c),g||(r.has(_)&&(!E||u)?(r.delete(_),h=!0):E&&!u&&(r.add(_),h=!0),this.currentState.expandedDirectories.buried=Array.from(r)),h&&this.onDidTreeStateChangeEmitter.fire(s.TreeStateWatcherChangeType.DirExpansionState)}))}get onDidChange(){return this.onDidTreeStateChangeEmitter.event}dispose(){this._disposed||(this._disposed=!0,this.disposables.dispose())}snapshot(){return{...this.currentState,expandedDirectories:{atSurface:this.currentState.expandedDirectories.atSurface.slice(),buried:this.currentState.expandedDirectories.buried.slice()}}}toString(){return JSON.stringify(this.currentState)}}e.TreeStateWatcher=o},70609:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TreeStateWatcher=e.TreeStateManager=void 0;var n=t(12165);Object.defineProperty(e,"TreeStateManager",{enumerable:!0,get:function(){return n.TreeStateManager}});var s=t(72782);Object.defineProperty(e,"TreeStateWatcher",{enumerable:!0,get:function(){return s.TreeStateWatcher}})},13440:(x,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TreeStateWatcherChangeType=e.TreeStateEvent=void 0;var t;(function(s){s[s.DidChangeScrollOffset=1]="DidChangeScrollOffset",s[s.DidChangeDirExpansionState=2]="DidChangeDirExpansionState",s[s.DidChangeRelativePath=3]="DidChangeRelativePath",s[s.DidChange=4]="DidChange",s[s.DidLoadState=5]="DidLoadState"})(t||(e.TreeStateEvent=t={}));var n;(function(s){s[s.ScrollOffset=1]="ScrollOffset",s[s.DirExpansionState=2]="DirExpansionState",s[s.PathsUpdated=3]="PathsUpdated"})(n||(e.TreeStateWatcherChangeType=n={}))},34054:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});const n=t(85608);n.__exportStar(t(79632),e),n.__exportStar(t(32281),e),n.__exportStar(t(3754),e)},32281:(x,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TreeNodeType=void 0;var t;(function(n){n[n.TreeNode=1]="TreeNode",n[n.CompositeTreeNode=2]="CompositeTreeNode",n[n.NewPrompt=3]="NewPrompt",n[n.RenamePrompt=4]="RenamePrompt"})(t||(e.TreeNodeType=t={}))},79632:(x,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})},3754:(x,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MetadataChangeType=e.WatchEvent=e.TreeNodeEvent=void 0;var t;(function(o){o[o.WillChangeExpansionState=1]="WillChangeExpansionState",o[o.DidChangeExpansionState=2]="DidChangeExpansionState",o[o.WillChangeParent=3]="WillChangeParent",o[o.DidChangeParent=4]="DidChangeParent",o[o.DidDispose=5]="DidDispose",o[o.BranchDidUpdate=6]="BranchDidUpdate",o[o.DidChangePath=7]="DidChangePath",o[o.DidProcessWatchEvent=8]="DidProcessWatchEvent",o[o.WillProcessWatchEvent=9]="WillProcessWatchEvent",o[o.DidChangeMetadata=10]="DidChangeMetadata",o[o.DidResolveChildren=11]="DidResolveChildren",o[o.WillResolveChildren=12]="WillResolveChildren"})(t||(e.TreeNodeEvent=t={}));var n;(function(o){o[o.Added=1]="Added",o[o.Removed=2]="Removed",o[o.Changed=3]="Changed",o[o.Moved=4]="Moved"})(n||(e.WatchEvent=n={}));var s;(function(o){o[o.Added=1]="Added",o[o.Updated=2]="Updated",o[o.Removed=3]="Removed"})(s||(e.MetadataChangeType=s={}))},77011:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ScrollbarsVirtualList=e.Scrollbars=void 0;const n=t(85608),s=n.__importDefault(t(53373)),o=n.__importDefault(t(97331)),f=n.__importStar(t(14041)),b=t(70392),g=t(56875);t(93324);const _=({onScroll:E,onUpdate:u,forwardedRef:h,style:c,children:r,className:l,onReachBottom:a,tabBarMode:d,thumbSize:m=5,hiddenVertical:p,hiddenHorizontal:v,universal:y=!1})=>{const S=(0,f.useRef)(new b.DisposableCollection),A=(0,f.useRef)(),T=(0,f.useCallback)(M=>{M?(A.current=M.view,h&&(typeof h=="function"?h(M.view):h.current=M.view)):h&&typeof h=="function"&&h(null)},[]),D=(0,f.useRef)(),w=(0,f.useRef)(),I=(0,f.useCallback)(M=>{if(!M)return;const{scrollTop:O,scrollHeight:P,clientHeight:L}=M;if(P===0&&L===0)return;(O+100)/(P-L)>1&&a&&a()},[a]),R=(0,f.useCallback)((0,o.default)(M=>{if(!M)return;const{scrollTop:O,scrollLeft:P}=M,L=1/20*Math.min(O,20),N=1/20*Math.min(P,20);D.current&&(D.current.style.opacity=String(L)),w.current&&(w.current.style.opacity=String(N)),I(M),u&&u(M)},100),[u,I,D.current,w.current]);return(0,f.useEffect)(()=>{const M=O=>{A.current&&(O.preventDefault(),O.stopPropagation(),A.current.clientHeight>=A.current.scrollHeight&&(O.deltaY!==0&&(A.current.scrollLeft+=O.deltaY),O.deltaX!==0&&(A.current.scrollLeft+=O.deltaX)))};return d&&A.current&&A.current.addEventListener("wheel",M),()=>{var O;(O=A.current)===null||O===void 0||O.removeEventListener("wheel",M)}},[A.current,d]),(0,f.useEffect)(()=>()=>S.current.dispose(),[]),f.default.createElement(g.Scrollbars,{ref:T,style:{...c,overflow:"hidden"},className:(0,s.default)(l,"kt-scrollbar"),onUpdate:R,onScroll:E,universal:y,renderTrackHorizontal:({style:M,...O})=>{const P={...M,height:m,left:0,right:0,bottom:1};return v&&(P.display="none"),f.default.createElement("div",{...O,style:P})},renderTrackVertical:({style:M,...O})=>{const P={...M,width:m,top:0,right:1,bottom:0};return p&&(P.display="none"),f.default.createElement("div",{...O,style:P})},renderThumbVertical:({style:M,className:O,...P})=>{const L={...M,width:m};return p&&(L.display="none"),f.default.createElement("div",{...P,style:L,className:(0,s.default)(O,"scrollbar-thumb-vertical")})},renderThumbHorizontal:({style:M,className:O,...P})=>{const L={...M,height:m,display:"none"};return v&&(L.display="none"),f.default.createElement("div",{...P,style:L,className:(0,s.default)(O,"scrollbar-thumb-horizontal")})}},f.default.createElement("div",{ref:M=>{D.current=M},className:"scrollbar-decoration-vertical"}),f.default.createElement("div",{ref:M=>{w.current=M},className:"scrollbar-decoration-horizontal"}),r)};e.Scrollbars=_,e.Scrollbars.displayName="CustomScrollbars",e.ScrollbarsVirtualList=f.default.forwardRef((E,u)=>f.default.createElement(e.Scrollbars,{...E,thumbSize:10,forwardedRef:u})),e.ScrollbarsVirtualList.displayName="ScrollbarsVirtualList"},14640:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SelectOptionsList=e.Option=void 0,e.isDataOptions=h,e.isDataOptionGroups=c,e.Select=p;const n=t(85608),s=n.__importDefault(t(53373)),o=n.__importStar(t(14041));t(11110);const f=t(54713),b=({value:y,children:S,disabled:A,onClick:T,className:D,...w})=>o.default.createElement("span",{...w,className:(0,s.default)(D,{"kt-option-disabled":A}),onClick:()=>T&&!A&&T(y)},S);e.Option=b;function g(...y){}function _(y,S){return S?y.props[S]:y.props.value}function E(y,S){let A=[];return Array.isArray(y)?A=o.default.Children.toArray(y).map(S):A=[S(y)],A}function u(y,S,A=(T,D)=>T===D){const D=o.default.Children.toArray(S).filter(w=>o.default.isValidElement(w)).find(w=>{var I;return w.props&&A((I=w.props)===null||I===void 0?void 0:I.value,y)?w:null});return D?.props}function h(y){return y?y.length===0?!0:r(y[0]):!1}function c(y){return y?y.length===0?!0:l(y[0]):!1}function r(y){return y.value!==void 0}function l(y){return y.groupName!==void 0&&h(y.options)}function a(y){return o.default.createElement(o.default.Fragment,null,y.data.iconClass?o.default.createElement("div",{className:(0,s.default)(y.data.iconClass,"kt-select-option-icon")}):void 0,y.data.label)}function d({group:y,index:S}){return o.default.createElement("div",{key:"header_"+S,className:"kt-select-group-header"},y.iconClass?o.default.createElement("div",{className:(0,s.default)(y.iconClass,"kt-select-option-icon")}):void 0,o.default.createElement("div",null,y.groupName))}function m(y,S){let A=S.label;if(A===void 0)try{A=S.value.toString()}catch{A=void 0}return typeof A=="string"?A.indexOf(y)!==-1:!1}function p({disabled:y,options:S,size:A="default",children:T,value:D,onChange:w,onMouseEnter:I,optionLabelProp:R,style:M,optionStyle:O,className:P,maxHeight:L,equals:N=(te,re)=>te===re,optionRenderer:k=a,groupTitleRenderer:B,footerComponent:F,headerComponent:W,showSearch:V=!1,filterOption:H=m,searchPlaceholder:G="",emptyComponent:K,selectedRenderer:z,onBeforeShowOptions:j,allowOptionsOverflow:U,dropdownRenderType:$="fixed",description:Y,notMatchWarning:Q}){const[te,re]=(0,o.useState)(!1),[ae,de]=(0,o.useState)(""),q=o.default.useRef(null),_e=o.default.useRef(null),pe=(0,o.useCallback)(he=>{he.preventDefault(),he.stopPropagation();const ue=!te;ue&&j&&j()||re(ue)},[te,j,j]),le=(0,o.useCallback)(()=>{var he,ue,ve,ne,fe,Ce,be,Se,Ae;if(S&&h(S)){for(const Ie of S)if(N(D,Ie.value))return{iconClass:Ie.iconClass,label:Ie.label,value:Ie.value};return{iconClass:(he=S[0])===null||he===void 0?void 0:he.iconClass,label:(ue=S[0])===null||ue===void 0?void 0:ue.label,value:(ve=S[0])===null||ve===void 0?void 0:ve.value}}else if(S&&c(S)){for(const Ie of S)for(const De of Ie.options)if(N(D,De.value))return{iconClass:De.iconClass,label:De.label,value:De.value};return{iconClass:(fe=(ne=S[0])===null||ne===void 0?void 0:ne.options[0])===null||fe===void 0?void 0:fe.iconClass,label:(be=(Ce=S[0])===null||Ce===void 0?void 0:Ce.options[0])===null||be===void 0?void 0:be.label,value:(Ae=(Se=S[0])===null||Se===void 0?void 0:Se.options[0])===null||Ae===void 0?void 0:Ae.value}}else{const Ie=T&&u(D,T);if(Ie)return{label:Ie.label||Ie.value,value:Ie.value}}return{label:D,value:D,notMatch:!0}},[S,D,T])(),ie=(0,s.default)("kt-select-options",{"kt-select-options-visible":te,[`kt-select-options-${A}`]:A}),ge=Q&&le.notMatch,ee=(0,s.default)("kt-select-value",{"kt-select-warning":ge,"kt-select-disabled":y,"kt-select-value-active":te,[`kt-select-value-${A}`]:A});function X(he,ue){var ve;if(!he)return null;(typeof he=="string"||typeof he=="number")&&(he=o.default.createElement(e.Option,{value:he,label:String(he),key:`${he}_${ue}`},he));const ne=he,fe=((ve=ne.props)===null||ve===void 0?void 0:ve.disabled)||!1;return o.default.createElement("div",{key:`${ne.props.value}_${ue}`,className:(0,s.default)({"kt-select-option-select":D===ne.props.value}),onMouseEnter:()=>I?.(ne.props.value,ue),onClick:fe?g:()=>{re(!1),w&&w(_(he,R))}},he)}if((0,o.useEffect)(()=>{!te&&ae&&de("")},[]),(0,o.useEffect)(()=>{if(q.current&&_e.current){const he=q.current.getBoundingClientRect();U?(_e.current.style.minWidth=`${he.width}px`,_e.current.style.maxWidth=`${window.innerWidth-he.left-4}px`):_e.current.style.width=`${he.width}px`;const ue=window.innerHeight-he.bottom-50;ue<_e.current.clientHeight?_e.current.style.bottom=q.current.clientHeight+4+"px":_e.current.style.maxHeight=`${ue}px`,_e.current.style.position=$==="fixed"?"fixed":"absolute"}if(te){const he=()=>{re(!1)};return document.addEventListener("click",he),()=>{document.removeEventListener("click",he)}}},[te]),ae){if(S&&h(S))S=S.filter(he=>H(ae,he));else if(S&&c(S)){const he=[];for(const ue of S){const ve={iconClass:ue.iconClass,groupName:ue.groupName,options:ue.options.filter(ne=>H(ae,ne,ue))};ve.options.length>0&&he.push(ve)}S=he}}const oe=()=>{const he=z;return o.default.createElement(o.default.Fragment,null,he?o.default.createElement(he,{data:le}):o.default.createElement(o.default.Fragment,null,le.iconClass?o.default.createElement("div",{className:(0,s.default)(le.iconClass,"kt-select-option-icon")}):void 0,o.default.createElement("span",{className:"kt-select-option"},le.label)),o.default.createElement(f.Icon,{iconClass:(0,s.default)((0,f.getIcon)("down"),"kt-select-value-default-icon")}))},se=()=>o.default.createElement("input",{className:(0,s.default)("kt-select-search"),onChange:he=>{de(he.target.value)},value:ae,autoFocus:!0,placeholder:G||""});return o.default.createElement("div",{className:(0,s.default)("kt-select-container",P),ref:q},o.default.createElement("div",{className:ee,onClick:pe,style:M},V&&te?se():oe()),ge&&o.default.createElement("div",{className:"kt-select-warning-text"},Q),te&&(h(S)||c(S)?o.default.createElement(e.SelectOptionsList,{optionRenderer:k,options:S,equals:N,optionStyle:O,currentValue:D,size:A,onSelect:he=>{w&&w(he),re(!1)},groupTitleRenderer:B,className:ie,style:{maxHeight:`${L}px`},ref:_e,footerComponent:F,headerComponent:W,emptyComponent:K}):o.default.createElement("div",{className:ie,style:{maxHeight:`${L}px`},ref:_e},S&&S.map((he,ue)=>X(he,ue)),T&&E(T,X),Y&&o.default.createElement(v,{text:Y}),o.default.createElement("div",{className:"kt-select-overlay",onClick:pe}))))}function v({text:y}){return o.default.createElement(o.default.Fragment,null,o.default.createElement("div",{className:"kt-option-divider"}),o.default.createElement("div",{className:"kt-option-description"},y))}e.SelectOptionsList=o.default.forwardRef((y,S)=>{const{options:A,optionRenderer:T=a,equals:D=(K,z)=>K===z,onSelect:w,currentValue:I,optionStyle:R,size:M,className:O,style:P,groupTitleRenderer:L=d,renderCheck:N,headerComponent:k,footerComponent:B,emptyComponent:F}=y,W=(0,s.default)("kt-select-options",{[`kt-select-options-${M}`]:!0},O);function V(K){return K.map((z,j)=>{const U=o.default.createElement(L,{group:z,index:j});return o.default.createElement(o.default.Fragment,{key:"group_"+j},U,H(z.options))})}function H(K){return K&&K.map((z,j)=>{const U=D(I,z.value);return o.default.createElement(e.Option,{value:j,key:j,className:(0,s.default)({"kt-select-option-select":U,"kt-select-option-default":!0,"kt-option-with-check":N}),onClick:()=>w(z.value),style:R},N&&D(I,z.value)?o.default.createElement("div",{className:"kt-option-check"},o.default.createElement(f.Icon,{icon:"check"})):void 0,o.default.createElement(T,{data:z,isCurrent:U}))})}let G;return c(A)?G=A.filter(K=>K.options.length>0).length===0:G=A.length===0,o.default.createElement("div",{className:W,style:P,ref:S,onClick:K=>{K.stopPropagation()}},k?o.default.createElement(k,null):null,G&&F?o.default.createElement(F,null):(c(A)?V(A):H(A))||F&&o.default.createElement(F,null),B?o.default.createElement(B,null):null)})},54076:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Tabs=void 0;const n=t(85608),s=n.__importDefault(t(53373)),o=n.__importDefault(t(14041));t(1030);const f=b=>{const{tabs:g,className:_,value:E,onChange:u,mini:h,style:c,...r}=b,l=o.default.useCallback(a=>{typeof u=="function"&&u(a)},[]);return o.default.createElement("div",{...r,style:c,className:(0,s.default)("kt-tabs",_,{"kt-tabs-mini":h})},g.map((a,d)=>{const m=d===E?"kt-tab-selected":"";return typeof a=="string"?o.default.createElement("div",{key:d,className:(0,s.default)("kt-tab",m,{"kt-mini-tab":h}),onClick:l.bind(null,d)},a):o.default.createElement("div",{key:d,className:(0,s.default)("kt-custom-tab",m,{"kt-mini-tab":h}),onClick:l.bind(null,d)},a)}))};e.Tabs=f},72871:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Tooltip=void 0;const n=t(85608),s=n.__importDefault(t(53373)),o=n.__importStar(t(14041));t(24571);const f=({title:b,children:g,delay:_})=>{const[E,u]=(0,o.useState)(!1),h=(0,o.useRef)(null),c=(0,o.useRef)(null),r=(0,o.useRef)(null),l=(0,o.useRef)(null);(0,o.useEffect)(()=>()=>clearTimeout(l.current),[]);function a(){if(E){l.current&&clearTimeout(l.current);return}l.current=setTimeout(()=>{if(u(!0),c.current&&h.current&&r.current){const{x:m,y:p,width:v,height:y}=h.current.getBoundingClientRect(),S=c.current.getBoundingClientRect();p<S.height*1.5?(r.current.className+=" kt-tooltip-reverse-arrow",c.current.style.top=`${p+y+S.height/2}px`):c.current.style.top=`${p-S.height*1.5}px`,m+S.width/2>=document.body.offsetWidth?(r.current.style.right=`${v/2-7}px`,c.current.style.left=`${m+v-S.width}px`):m-S.width/2<=0?(r.current.style.left=`${v/2-7}px`,c.current.style.left=`${m}px`):(r.current.style.left=`${S.width/2-7}px`,c.current.style.left=`${m+v/2-S.width/2}px`)}clearTimeout(l.current)},_||500)}function d(){l.current&&clearTimeout(l.current),u(!1)}return o.default.createElement("p",{ref:h,className:"kt-tooltip-wrapper",onMouseEnter:a,onMouseLeave:d},g,E&&o.default.createElement("span",{ref:c,className:(0,s.default)("kt-tooltip-content")},b,o.default.createElement("span",{ref:r,className:"kt-tooltip-arrow-placeholder"})))};e.Tooltip=f},40604:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Deprecated=f;const n=t(85608),s=n.__importDefault(t(14041)),o=n.__importDefault(t(65973));function f(b,g){return _=>(s.default.useEffect(()=>{(0,o.default)(!1,`${b.displayName||b.name} is deprecated: ${g}`)},[]),s.default.createElement(b,_))}},84605:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});const n=t(85608);n.__exportStar(t(40604),e),n.__exportStar(t(65973),e),n.__exportStar(t(43953),e),n.__exportStar(t(2835),e),n.__exportStar(t(47768),e),n.__exportStar(t(26809),e)},26809:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.parseWithoutEscape=e.toMarkdownHtml=e.parseMarkdown=e.createMarkedRenderer=e.marked=void 0;const n=t(33714);Object.defineProperty(e,"marked",{enumerable:!0,get:function(){return n.marked}});const s=()=>new n.Renderer;e.createMarkedRenderer=s;const o=(g,_,E)=>{if(!E)return n.marked.parse(g,_);_?n.marked.parse(g,_,E):n.marked.parse(g,E)};e.parseMarkdown=o;const f=(g,_)=>(0,n.marked)(g,_);e.toMarkdownHtml=f;const b=g=>(g.type==="escape"&&(g.text=g.raw),g);e.parseWithoutEscape=b},2835:(x,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.collapseMotion=void 0;const t=()=>({height:0,opacity:0}),n=o=>({height:o.scrollHeight,opacity:1}),s=o=>({height:o.offsetHeight});e.collapseMotion={motionName:"kt-motion-collapse",onAppearStart:t,onEnterStart:t,onAppearActive:n,onEnterActive:n,onLeaveStart:s,onLeaveActive:t}},47768:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.wrapperRaf=b;const s=t(85608).__importDefault(t(10719));let o=0;const f={};function b(g,_=1){const E=o++;let u=_;function h(){u-=1,u<=0?(g(),delete f[E]):f[E]=(0,s.default)(h)}return f[E]=(0,s.default)(h),E}b.cancel=function(_){_!==void 0&&(s.default.cancel(f[_]),delete f[_])},b.ids=f},43953:(x,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.tupleNum=e.tuple=void 0;const t=(...s)=>s;e.tuple=t;const n=(...s)=>s;e.tupleNum=n},65973:(x,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.warning=n,e.note=s,e.resetWarned=o,e.call=f,e.warningOnce=b,e.noteOnce=g;let t={};function n(_,E){}function s(_,E){}function o(){t={}}function f(_,E,u){!E&&!t[u]&&(_(!1,u),t[u]=!0)}function b(_,E){f(n,_,E)}function g(_,E){f(s,_,E)}e.default=b},91802:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.VirtualList=void 0;const s=t(85608).__importStar(t(14041)),o=t(24241),f=t(77011),b=({data:g,className:_,template:E,refSetter:u,onRangeChanged:h})=>{const c=(0,s.useRef)(null);return(0,s.useEffect)(()=>{u?.(c.current)},[c.current]),s.default.createElement(f.Scrollbars,{thumbSize:0},s.default.createElement(o.Virtuoso,{rangeChanged:r=>{h?.(r)},overscan:20,ref:c,style:{height:"100%"},className:_,data:g,itemContent:(r,l)=>s.default.createElement(E,{index:r,data:l})}))};e.VirtualList=b},18740:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),t(85608).__exportStar(t(59019),e)},59019:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.WSChannelHandler=void 0;const n=t(40396),s=t(43718),o=t(54558),f=t(47561);class b{onChannelCreated(_,E){return this._onChannelCreatedEmitter.on(_,E)}constructor(_,E,u={}){this.connection=_,this._disposables=new s.DisposableStore,this._onChannelCreatedEmitter=this._disposables.add(new n.EventEmitter),this.channelMap=new Map,this.channelCloseEventMap=new s.MultiMap,this.logger=console,this.openingBarrier=new s.Barrier,this.logger=u.logger||this.logger,this.clientId=E,this.LOG_TAG=`[WSChannelHandler] [client-id:${this.clientId}]`;const h=u.serializer||o.furySerializer;this.wrappedConnection=(0,o.wrapSerializer)(this.connection,h)}replaceLogger(_){_&&(this.logger=_)}setReporter(_){this.reporterService=_}heartbeatMessage(){this.heartbeatMessageTimer&&clearTimeout(this.heartbeatMessageTimer),this.heartbeatMessageTimer=setTimeout(()=>{this.channelMap.forEach(_=>{_.ping()}),this.heartbeatMessage()},1e4)}async initHandler(){this.wrappedConnection.onMessage(E=>{switch(this.heartbeatMessage(),E.kind){case"pong":break;default:{const u=this.channelMap.get(E.id);u?u.dispatch(E):this.logger.warn(this.LOG_TAG,`channel ${E.id} not found`)}}});const _=()=>{this.channelMap.size>0&&this.channelMap.forEach(E=>{E.open(E.channelPath,this.clientId)})};this.connection.onClose((E,u)=>{this.channelMap.forEach(h=>{h.close(E,u)})}),this.connection.isOpen()&&(this.heartbeatMessage(),this.openingBarrier.open()),this.connection.onOpen(()=>{this.heartbeatMessage(),this.openingBarrier.isOpen()?_():this.openingBarrier.open()}),await this.openingBarrier.wait()}fillKey(_){return`${this.clientId}:${_}`}getChannel(_){return this.channelMap.get(this.fillKey(_))}async openChannel(_){const E=this.fillKey(_);this.channelMap.has(E)&&(this.channelMap.get(E).dispose(),this.logger.log(this.LOG_TAG,`channel ${E} already exists, dispose it`));const u=new f.WSChannel(this.wrappedConnection,{id:E,logger:this.logger,ensureServerReady:!0});this.channelMap.set(u.id,u),this._onChannelCreatedEmitter.emit(_,u);let h=0;u.onOpen(()=>{h++,h>1?(u.fireReopen(),this.logger.log(this.LOG_TAG,`channel reconnect ${this.clientId}:${u.channelPath}, count: ${h}`)):this.logger.log(this.LOG_TAG,`channel open ${this.clientId}:${u.channelPath}`);const l=this.channelCloseEventMap.get(u.id);l&&(l.forEach(a=>{this.reporterService&&this.reporterService.point(s.REPORT_NAME.CHANNEL_RECONNECT,s.REPORT_NAME.CHANNEL_RECONNECT,a)}),this.channelCloseEventMap.delete(u.id))}),u.onClose((l,a)=>{this.channelCloseEventMap.set(u.id,{channelPath:_,closeEvent:{code:l,reason:a},connectInfo:navigator.connection}),this.logger.log(this.LOG_TAG,`channel ${_} closed, code: ${l}, reason: ${a}`)});const c=new s.Deferred,r=u.onOpen(()=>{c.resolve(),r.dispose()});return u.open(_,this.clientId),await c.promise,u}dispose(){this.heartbeatMessageTimer&&clearTimeout(this.heartbeatMessageTimer),this._disposables.dispose()}awaitChannelReady(_){const E=this.getChannel(_),u=new s.Deferred;if(E)E.onServerReady(()=>{u.resolve()});else{const h=this.onChannelCreated(_,c=>{c.onServerReady(()=>{u.resolve()}),h.dispose()})}return u.promise}}e.WSChannelHandler=b},98710:(x,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Cursor=e.Buffers=e.emptyBuffer=void 0,e.copy=t,e.emptyBuffer=new Uint8Array(0);function t(o,f,b,g,_){f.set(o.subarray(g,_),b)}class n{constructor(){this.buffers=[],this.size=0}get byteLength(){return this.size}push(f){this.buffers.push(f),this.size+=f.length}unshift(f){this.buffers.unshift(f),this.size+=f.length}slice(f,b){const g=this.buffers;if(b===void 0&&(b=this.size),f===void 0&&(f=0),b>this.size&&(b=this.size),f>=b)return e.emptyBuffer;let _=0,E=0;for(;E<g.length&&_+g[E].length<=f;E++)_+=g[E].length;const u=new Uint8Array(b-f);let h=0;for(let c=E;h<b-f&&c<g.length;c++){const r=g[c].length,l=h===0?f-_:0,a=h+r>=b-f?Math.min(l+(b-f)-h,r):r;t(g[c],u,h,l,a),h+=a-l}return u}pos(f){if(f<0||f>=this.size)throw new Error(`out of range, ${f} not in [0, ${this.size})`);let b=f,g=0,_=null;for(;;){if(_=this.buffers[g],b<_.length)return{buf:g,offset:b};b-=_.length,g++}}copy(f,b=0,g=0,_=this.size){return t(this.slice(g,_),f,b,0,_-g)}splice(f,b,...g){const _=this.buffers,E=f>=0?f:this.size-f;b===void 0?b=this.size-E:b>this.size-E&&(b=this.size-E);for(const r of g)this.size+=r.length;const u=new n;let h=0,c=0;for(;c<_.length&&h+_[c].length<E;c++)h+=_[c].length;if(E-h>0){const r=E-h;if(r+b<_[c].length){u.push(_[c].slice(r,r+b));const l=_[c],a=new Uint8Array(r);for(let m=0;m<r;m++)a[m]=l[m];const d=new Uint8Array(l.length-r-b);for(let m=r+b;m<l.length;m++)d[m-b-r]=l[m];if(g.length>0){const m=g.slice();m.unshift(a),m.push(d),_.splice.apply(_,[c,1,...m]),c+=m.length,g=[]}else _.splice(c,1,a,d),c+=2}else u.push(_[c].slice(r)),_[c]=_[c].slice(0,r),c++}for(g.length>0&&(_.splice.apply(_,[c,0,...g]),c+=g.length);u.byteLength<b;){const r=_[c],l=r.length,a=Math.min(l,b-u.byteLength);a===l?(u.push(r),_.splice(c,1)):(u.push(r.slice(0,a)),_[c]=_[c].slice(a))}return this.size-=u.byteLength,u}get(f){const{buf:b,offset:g}=this.pos(f);return this.buffers[b][g]}set(f,b){const{buf:g,offset:_}=this.pos(f);this.buffers[g][_]=b}cursor(f=0){return new s(this,f)}dispose(){this.buffers=[],this.size=0}}e.Buffers=n;class s{constructor(f,b=0){this.buffers=f,this.offset=b,this.chunkIndex=0,this.chunkOffset=0,this.updatePosition()}updatePosition(){if(this.offset===0){this.chunkIndex=0,this.chunkOffset=0;return}const{buf:f,offset:b}=this.buffers.pos(this.offset);this.chunkIndex=f,this.chunkOffset=b}get line(){return this.chunkIndex}get lineWidth(){return this.buffers.buffers[this.chunkIndex].byteLength}get value(){return this.buffers.buffers[this.chunkIndex][this.chunkOffset]}get lineOffset(){return this.chunkOffset}*iterator(){for(;this.chunkIndex<this.buffers.buffers.length;){const f=this.buffers.buffers[this.chunkIndex],b=f.byteLength;for(;this.chunkOffset<b;){const g=f[this.chunkOffset];this.chunkOffset++,this.offset++,yield g}this.chunkOffset=0,this.chunkIndex++}}read(f){const b=this.offset+f,g=this.buffers.slice(this.offset,b);return this.skip(f),g}skip(f){let b=0;for(;this.chunkIndex<this.buffers.buffers.length;){const _=this.buffers.buffers[this.chunkIndex].byteLength;for(;this.chunkOffset<_;)if(this.chunkOffset++,this.offset++,++b===f)return;this.chunkOffset=0,this.chunkIndex++}}moveTo(f){this.offset=f,this.updatePosition()}dispose(){this.buffers=null,this.offset=0}reset(){this.offset=0,this.chunkIndex=0,this.chunkOffset=0}}e.Cursor=s},30613:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Capturer=e.ResponseStatus=e.MessageType=void 0,e.getCapturer=g;const n=t(43718),s=t(65265);var o;(function(E){E.SendNotification="sendNotification",E.SendRequest="sendRequest",E.RequestResult="requestResult",E.OnNotification="onNotification",E.OnRequest="onRequest",E.OnRequestResult="onRequestResult"})(o||(e.MessageType=o={}));var f;(function(E){E.Success="success",E.Fail="fail"})(f||(e.ResponseStatus=f={}));const b=typeof t.g>"u"?typeof window>"u"?{__OPENSUMI_DEVTOOLS_GLOBAL_HOOK__:void 0}:window:t.g;function g(){const E=b.__OPENSUMI_DEVTOOLS_GLOBAL_HOOK__;if(E)return E.captureRPC}class _{constructor(u){this.source=u,this._disposables=new n.DisposableStore,this.capturer=null,this.setupListener=h=>{const{command:c}=h.detail;c===s.DevtoolsLantencyCommand.Start?this.capturer=g():c===s.DevtoolsLantencyCommand.Stop&&(this.capturer=null)},this.prefix=(0,n.randomString)(6),this.capturer=g(),typeof b.addEventListener=="function"&&(b.addEventListener(s.EDevtoolsEvent.Latency,this.setupListener),this._disposables.add({dispose:()=>{b.removeEventListener(s.EDevtoolsEvent.Latency,this.setupListener)}}))}capture(u){if(!this.capturer)return;const h={...u,source:this.source};h.data&&(0,n.isUint8Array)(h.data)&&(h.data="<Uint8Array>"),u.requestId&&(h.requestId=`${this.prefix}-${u.requestId}`),u.error&&(h.error=(0,n.transformErrorForSerialization)(u.error)),this.capturer(h)}captureOnRequest(u,h,c){this.capturer&&this.capture({type:o.OnRequest,requestId:`\u2193${u}`,serviceMethod:h,arguments:c})}captureOnRequestResult(u,h,c){this.capturer&&this.capture({type:o.OnRequestResult,status:f.Success,requestId:`\u2193${u}`,serviceMethod:h,data:c})}captureOnRequestFail(u,h,c){this.capturer&&this.capture({type:o.OnRequestResult,status:f.Fail,requestId:`\u2193${u}`,serviceMethod:h,error:c})}captureSendRequest(u,h,c){this.capturer&&this.capture({type:o.SendRequest,requestId:u,serviceMethod:h,arguments:c})}captureSendRequestResult(u,h,c){this.capturer&&this.capture({type:o.RequestResult,status:f.Success,requestId:u,serviceMethod:h,data:c})}captureSendRequestFail(u,h,c){this.capturer&&this.capture({type:o.RequestResult,status:f.Fail,requestId:u,serviceMethod:h,error:c})}captureSendNotification(u,h,c){this.capturer&&this.capture({type:o.SendNotification,serviceMethod:h,arguments:c,requestId:u})}captureOnNotification(u,h,c){this.capturer&&this.capture({type:o.OnNotification,serviceMethod:h,arguments:c,requestId:`\u2193${u}`})}dispose(){this._disposables.dispose()}}e.Capturer=_},29433:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),t(85608).__exportStar(t(39048),e)},39048:(x,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ErrorMessageCode=void 0;var t;(function(n){n[n.ChannelNotFound=1]="ChannelNotFound"})(t||(e.ErrorMessageCode=t={}))},9811:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.initRPCService=f,e.createRPCService=b,e.getRPCService=g;const n=t(85608),s=t(62199),o=t(8140);function f(_){return{createRPCService:(E,u)=>{const h=b(E,_);return u&&h.onRequestService(u),h},getRPCService:E=>g(E,_)}}function b(_,E){return new s.RPCServiceStub(_,E,o.ServiceType.Service).getProxy()}function g(_,E){return new s.RPCServiceStub(_,E,o.ServiceType.Stub).getProxy()}n.__exportStar(t(62199),e)},35821:(x,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BaseConnection=void 0;class t{}e.BaseConnection=t},57358:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LengthFieldBasedFrameDecoder=e.indicator=void 0;const n=t(89212),s=t(43718),o=t(98710);e.indicator=new Uint8Array([13,10,13,10]);class f{constructor(){this.dataEmitter=new s.Emitter,this.onData=this.dataEmitter.event,this.buffers=new o.Buffers,this.cursor=this.buffers.cursor(),this.contentLength=-1,this.state=0,this.lengthFieldLength=4}reset(){this.contentLength=-1,this.state=0,this.cursor.reset()}push(g){this.buffers.push(g);let _=!1;for(;!_;)_=this.readFrame()}readFrame(){if(this.readLengthField()){const _=this.cursor.offset,E=_+this.contentLength,u=this.buffers.slice(_,E);if(this.dataEmitter.fire(u),this.buffers.byteLength>E)return this.contentLength=-1,this.state=0,this.cursor.moveTo(E),!1;this.buffers.splice(0,E),this.reset()}return!0}readLengthField(){const g=this.buffers.byteLength;if(this.state!==4){if(this.cursor.offset+e.indicator.length>g)return!1;this.readIndicator()}if(this.state!==4)return!1;if(this.contentLength===-1){if(this.cursor.offset+this.lengthFieldLength>g)return!1;const _=this.cursor.read(this.lengthFieldLength);this.contentLength=(0,s.readUInt32LE)(_,0)}return!(this.cursor.offset+this.contentLength>g)}readIndicator(){const g=this.cursor.iterator();let _=g.next();for(;!_.done;){switch(_.value){case 13:switch(this.state){case 0:this.state=1;break;case 2:this.state=3;break;default:this.state=0;break}break;case 10:switch(this.state){case 1:this.state=2;break;case 3:this.state=4,g.return();break;default:this.state=0;break}break;default:this.state=0;break}_=g.next()}}dispose(){this.dataEmitter.dispose(),this.buffers.dispose()}static construct(g){return f.writer.reset(),f.writer.buffer(e.indicator),f.writer.uint32(g.byteLength),f.writer.buffer(g),f.writer.dump()}}e.LengthFieldBasedFrameDecoder=f,f.writer=(0,n.BinaryWriter)({})},34982:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});const n=t(85608);n.__exportStar(t(35821),e),n.__exportStar(t(71056),e),n.__exportStar(t(57625),e),n.__exportStar(t(15272),e)},92917:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MessagePortConnection=void 0;const n=t(35821);class s extends n.BaseConnection{constructor(f){super(),this.port=f,f.start()}send(f){this.port.postMessage(f)}onMessage(f){const b=g=>{f(g.data)};return this.port.addEventListener("message",b),{dispose:()=>{this.port.removeEventListener("message",b)}}}onceClose(f){return this.port.addEventListener("close",f),{dispose:()=>{this.port.addEventListener("close",f)}}}dispose(){}}e.MessagePortConnection=s},71056:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NodeMessagePortConnection=void 0;const n=t(35821);class s extends n.BaseConnection{constructor(f){super(),this.port=f}send(f){this.port.postMessage(f)}onMessage(f){return this.port.on("message",f),{dispose:()=>{this.port.off("message",f)}}}onceClose(f){return this.port.once("close",f),{dispose:()=>{this.port.off("close",f)}}}dispose(){this.port.removeAllListeners()}}e.NodeMessagePortConnection=s},91493:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ReconnectingWebSocketConnection=void 0;const s=t(85608).__importDefault(t(31133)),o=t(35821);class f extends o.BaseConnection{constructor(g){super(),this.socket=g}send(g){this.socket.send(g)}isOpen(){return this.socket.readyState===this.socket.OPEN}onOpen(g){return this.socket.addEventListener("open",g),{dispose:()=>{this.socket.removeEventListener("open",g)}}}onMessage(g){const _=E=>{var u,h;let c;if(E.data instanceof Blob)c=E.data.arrayBuffer();else if(E.data instanceof ArrayBuffer)c=Promise.resolve(E.data);else if(((h=(u=E.data)===null||u===void 0?void 0:u.constructor)===null||h===void 0?void 0:h.name)==="Buffer")c=Promise.resolve(E.data);else throw new Error("unknown message type, expect Blob or ArrayBuffer, received: "+typeof E.data);c.then(r=>g(new Uint8Array(r,0,r.byteLength)))};return this.socket.addEventListener("message",_),{dispose:()=>{this.socket.removeEventListener("message",_)}}}onceClose(g){const _=this.onClose(E);return{dispose:()=>{_.dispose()}};function E(u,h){g(u,h),_.dispose()}}onClose(g){const _=E=>{g(E.code,E.reason)};return this.socket.addEventListener("close",_),{dispose:()=>{this.socket.removeEventListener("close",_)}}}onError(g){const _=E=>{g(E.error)};return this.socket.addEventListener("error",_),{dispose:()=>{this.socket.removeEventListener("error",_)}}}dispose(){}static forURL(g,_,E){const u=new s.default(g,_,E);return u.binaryType="arraybuffer",new f(u)}}e.ReconnectingWebSocketConnection=f},57625:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NetSocketConnection=void 0;const n=t(36932);class s extends n.StreamConnection{constructor(f){super(f,f),this.socket=f}isOpen(){return this.socket.readyState==="open"}onOpen(f){return this.socket.on("connect",f),{dispose:()=>{this.socket.off("connect",f)}}}destroy(){this.socket.destroy()}}e.NetSocketConnection=s},36932:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.StreamConnection=void 0;const n=t(35821),s=t(57358);class o extends n.BaseConnection{constructor(b,g){super(),this.readable=b,this.writable=g,this.decoder=new s.LengthFieldBasedFrameDecoder;const _=E=>{this.decoder.push(E)};this.readable.on("data",_),this.readable.once("close",()=>{this.decoder.dispose(),this.readable.off("data",_)})}send(b){const g=s.LengthFieldBasedFrameDecoder.construct(b);this.writable.write(g,()=>{})}onMessage(b){return this.decoder.onData(b)}onceClose(b){const g=this.onClose(_);return{dispose:()=>{g.dispose()}};function _(E,u){b(E,u),g.dispose()}}onClose(b){const g=_=>{b(_?1:0,_?"had error":"")};return this.readable.on("close",g),this.writable!==this.readable&&this.writable.on("close",g),{dispose:()=>{this.readable.off("close",g),this.writable!==this.readable&&this.writable.off("close",g)}}}onError(b){return this.readable.on("error",b),this.writable!==this.readable&&this.writable.on("error",b),{dispose:()=>{this.readable.off("error",b),this.writable!==this.readable&&this.writable.off("error",b)}}}dispose(){this.decoder.dispose()}}e.StreamConnection=o},15272:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.WSWebSocketConnection=void 0;const n=t(35821);class s extends n.BaseConnection{constructor(f){super(),this.socket=f}send(f){this.socket.send(f)}onMessage(f){return this.socket.on("message",f),{dispose:()=>{this.socket.off("message",f)}}}onceClose(f){return this.socket.once("close",f),{dispose:()=>{this.socket.off("close",f)}}}isOpen(){return this.socket.readyState===this.socket.OPEN}dispose(){this.socket.removeAllListeners()}}e.WSWebSocketConnection=s},90750:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),t(85608).__exportStar(t(34982),e)},91676:(x,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.METHOD_NOT_REGISTERED=void 0,e.METHOD_NOT_REGISTERED="$$METHOD_NOT_REGISTERED"},89104:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ExtObjectTransfer=e.AnySerializer=e.ProtocolType=void 0;const n=t(43718);var s;(function(g){g[g.String=0]="String",g[g.Buffer=1]="Buffer",g[g.Number=2]="Number",g[g.JSONObject=3]="JSONObject",g[g.BigInt=4]="BigInt",g[g.Array=5]="Array",g[g.Object=6]="Object",g[g.Undefined=7]="Undefined",g[g.Null=8]="Null",g[g.Boolean=9]="Boolean"})(s||(e.ProtocolType=s={}));class o{constructor(_,E,u){this.writer=_,this.reader=E,this.objectTransfer=u,this.deserialize=h=>(this.reader.reset(h),this.read()),this.serialize=h=>(this.writer.reset(),this.write(h),this.writer.dump())}write(_){var E;const{writer:u}=this,h=typeof _;switch(u.reserve(1),_){case null:u.uint8(s.Null);return;default:switch(h){case"undefined":u.uint8(s.Undefined);break;case"string":u.uint8(s.String),u.stringOfVarUInt32(_);break;case"boolean":u.reserve(1),u.uint8(s.Boolean),u.uint8(_?1:0);break;case"number":u.reserve(8),u.uint8(s.Number),u.double(_);break;case"bigint":u.reserve(8),u.uint8(s.BigInt),u.int64(_);break;case"object":if(Array.isArray(_)){u.reserve(4),u.uint8(s.Array),u.varUInt32(_.length);for(const c of _)this.write(c)}else(0,n.isUint8Array)(_)?(u.reserve(4),u.uint8(s.Buffer),u.varUInt32(_.byteLength),u.buffer(_)):(u.uint8(s.JSONObject),u.stringOfVarUInt32(JSON.stringify(_,(E=this.objectTransfer)===null||E===void 0?void 0:E.replacer)));break;default:throw new Error(`Unknown type ${h}`)}}}read(){var _;const{reader:E}=this,u=E.uint8();switch(u){case s.Undefined:return;case s.Null:return null;case s.String:return E.stringOfVarUInt32();case s.Buffer:{const h=E.varUInt32();return E.buffer(h)}case s.Number:return E.double();case s.JSONObject:{const h=E.stringOfVarUInt32();return JSON.parse(h,(_=this.objectTransfer)===null||_===void 0?void 0:_.reviver)}case s.BigInt:return E.int64();case s.Array:{const h=E.varUInt32(),c=[];for(let r=0;r<h;r++)c.push(this.read());return c}case s.Boolean:return E.uint8()===1;default:throw new Error(`Unknown type ${u}`)}}}e.AnySerializer=o;var f;(function(g){g.CODE_URI="CodeURI",g.BUFFER="Buffer"})(f||(f={}));class b{static replacer(_,E){if(E){switch(E.$mid){case 1:{const u=n.Uri.revive(E);return{$type:f.CODE_URI,data:u.toString()}}}if(E instanceof Uint8Array||E instanceof Uint32Array||E instanceof Uint16Array)return{$type:"Buffer",data:Array.from(E)};if(E instanceof ArrayBuffer)return{$type:"Buffer",data:Array.from(new Uint8Array(E))};if(E.type==="Buffer")return{$type:"Buffer",data:E.data}}return E}static reviver(_,E){if(E&&E.$type!==void 0&&E.data!==void 0)switch(E.$type){case f.CODE_URI:return n.Uri.parse(E.data);case f.BUFFER:return Uint8Array.from(E.data)}return E}}e.ExtObjectTransfer=b},94846:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.oneOf=void 0;const n=t(26246),s=t(4405),o=8,f=(b,g)=>{g||(g=(0,s.furyFactory)());const{fury:_,reader:E,writer:u}=g,h=new Array(o),c=new Array(o),r={};return b.forEach((d,m)=>{const p=d.options.tag;h[m]=(0,n.generateSerializer)(_,d),c[m]=p,r[p]=m}),{deserialize:d=>{E.reset(d);const m=E.uint8();let p;switch(m){case 0:p=h[0].read();break;case 1:p=h[1].read();break;case 2:p=h[2].read();break;case 3:p=h[3].read();break;case 4:p=h[4].read();break;case 5:p=h[5].read();break;case 6:p=h[6].read();break;case 7:p=h[7].read();break}return p.kind=c[m],p},serialize:d=>{const m=r[d.kind];switch(u.reset(),u.uint8(m),m){case 0:h[0].write(d);break;case 1:h[1].write(d);break;case 2:h[2].write(d);break;case 3:h[3].write(d);break;case 4:h[4].write(d);break;case 5:h[5].write(d);break;case 6:h[6].write(d);break;case 7:h[7].write(d);break}return u.dump()}}};e.oneOf=f},4405:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.furyFactory=void 0;const s=t(85608).__importDefault(t(97419)),o=f=>{const b=new s.default(f),g=b.binaryReader,_=b.binaryWriter;return{fury:b,reader:g,writer:_}};e.furyFactory=o},25285:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});const n=t(85608);n.__exportStar(t(66748),e),n.__exportStar(t(62199),e),n.__exportStar(t(86058),e),n.__exportStar(t(15726),e),n.__exportStar(t(30613),e),n.__exportStar(t(47561),e),n.__exportStar(t(9811),e),n.__exportStar(t(8140),e),n.__exportStar(t(90750),e),n.__exportStar(t(54558),e),n.__exportStar(t(29433),e)},16908:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CommonServerProtocol=void 0;const n=t(26387),s=t(43718);e.CommonServerProtocol={name:s.CommonServerPath,methods:[{method:"getBackendOS",request:[],response:{type:n.Type.uint16()}}]}},52890:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.PositionProto=e.SelectionProto=e.RangeProto=e.UriComponentsProto=void 0;const n=t(26387);e.UriComponentsProto=n.Type.object("uri-components",{scheme:n.Type.string(),authority:n.Type.string(),path:n.Type.string(),query:n.Type.string(),fragment:n.Type.string()}),e.RangeProto=n.Type.object("range",{startLineNumber:n.Type.uint32(),startColumn:n.Type.uint32(),endLineNumber:n.Type.uint32(),endColumn:n.Type.uint32()}),e.SelectionProto=n.Type.object("selection",{selectionStartLineNumber:n.Type.uint32(),selectionStartColumn:n.Type.uint32(),positionLineNumber:n.Type.uint32(),positionColumn:n.Type.uint32()}),e.PositionProto=n.Type.object("position",{lineNumber:n.Type.uint32(),column:n.Type.uint32()})},11431:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ExtensionDocumentProtocol=void 0;const n=t(26387),s=t(52890);e.ExtensionDocumentProtocol={name:"ExtHostDocuments",methods:[{method:"$fireModelChangedEvent",request:[{name:"event",type:n.Type.object("model-changed-event",{changes:n.Type.array(n.Type.object("model-changed-event-changes",{range:s.RangeProto,rangeLength:n.Type.uint32(),rangeOffset:n.Type.uint32(),text:n.Type.string()})),uri:n.Type.string(),versionId:n.Type.uint32(),eol:n.Type.string(),dirty:n.Type.bool(),isRedoing:n.Type.bool(),isUndoing:n.Type.bool()})}]},{method:"$fireModelOpenedEvent",request:[{name:"event",type:n.Type.object("model-open-event",{uri:n.Type.string(),lines:n.Type.array(n.Type.string()),eol:n.Type.string(),versionId:n.Type.uint32(),languageId:n.Type.string(),dirty:n.Type.bool()})}]},{method:"$provideTextDocumentContent",request:[{name:"path",type:n.Type.string()},{name:"encoding",type:n.Type.string()}],response:{type:n.Type.string()}}]}},26166:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.RPCServiceCenter=void 0,e.getNotificationName=u,e.getRequestName=h,e.getMethodName=c;const n=t(43718),s=t(96068),o=t(91676),f=t(8140),b=t(66748),g=t(92408),_=200;class E{constructor(l,a){this.bench=l,this._disposables=new n.DisposableStore,this.proxies=[],this.serviceRegistry=this._disposables.add(new g.ServiceRegistry),this.protocolRegistry=this._disposables.add(new g.ProtocolRegistry),this.deferred=new n.Deferred,this._reportThreshold=_,this.uid=(0,n.randomString)(6),this.logger=a||console}setReporter(l,a=_){this._reporterService=l,this._reportThreshold=a}registerService(l,a){a===f.ServiceType.Service&&this.bench&&this.bench.registerService(l)}ready(){return this.deferred.promise}loadProtocol(l){this.protocolRegistry.addProtocol(l,{nameConverter:a=>c(l.name,a)})}setSumiConnection(l){this.proxies.length===0&&this.deferred.resolve(),this.protocolRegistry.applyTo(l.io);const a=new b.ProxySumi(this.serviceRegistry,this.logger);a.listen(l);const d=(0,s.addElement)(this.proxies,a);return{dispose:()=>{d.dispose(),a.dispose()}}}setConnection(l){this.proxies.length===0&&this.deferred.resolve();const a=new b.ProxyJson(this.serviceRegistry,this.logger);a.listen(l);const d=(0,s.addElement)(this.proxies,a);return{dispose:()=>{d.dispose(),a.dispose()}}}onRequest(l,a,d){this.serviceRegistry.register(c(l,a),d)}onRequestService(l,a){this.serviceRegistry.registerService(a,{nameConverter:d=>c(l,d)})}async broadcast(l,a,...d){await this.ready();const m=c(l,a);let p;this._reporterService&&(p=this._reporterService.time(n.REPORT_NAME.RPC_TIMMING_MEASURE));const v=await Promise.all(this.proxies.map(A=>A.invoke(m,...d))),y=[],S=[];for(const A of v)A===o.METHOD_NOT_REGISTERED?y.push(A):S.push(A);if(y.length>0&&this.logger.warn(`broadcast rpc \`${m}\` getting doubtful responses: ${y.join(",")}`),S.length===0)throw p&&p.timeEnd(m,{success:!1},{minimumReportThresholdTime:this._reportThreshold}),new Error(`broadcast rpc \`${m}\` error: no remote service can handle this call`);return p&&p.timeEnd(m,{success:!0},{minimumReportThresholdTime:this._reportThreshold}),S.length===1?S[0]:S}dispose(){this._disposables.dispose(),this.proxies.forEach(l=>l.dispose()),this.proxies=[]}}e.RPCServiceCenter=E;function u(r,l){return`on:${r}:${l}`}function h(r,l){return`${r}:${l}`}function c(r,l){return l.startsWith("on")?u(r,l):h(r,l)}},62199:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.RPCService=void 0;const n=t(85608);n.__exportStar(t(68855),e),n.__exportStar(t(26166),e),n.__exportStar(t(92408),e);class s{get client(){return this.rpcClient?this.rpcClient[0]:void 0}}e.RPCService=s},59875:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ProxyBase=void 0;const n=t(43718),s=new Set(["then","finally"]);let o=0;class f{constructor(g,_){this.registry=g,this.connectionPromise=new n.Deferred,this._disposables=new n.DisposableStore,this.logger=_||console,this.registry.onServicesUpdate(E=>{this.connection&&this.bindMethods(E)})}nextRequestId(){return String(o++)}listen(g){this.connection=g,this._disposables.add(this.connection),this.bindMethods(this.registry.methods()),g.listen(),this.connectionPromise.resolve()}listenService(g){this.registry.registerService(g)}dispose(){this._disposables.dispose()}getInvokeProxy(){return new Proxy(Object.create(null),{get:(g,_)=>typeof _!="string"?null:s.has(_)?Promise.resolve():(g[_]||(g[_]=(...E)=>this.invoke(_,...E)),g[_])})}}e.ProxyBase=f},66748:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});const n=t(85608);n.__exportStar(t(33716),e),n.__exportStar(t(16420),e)},33716:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ProxyJson=void 0;const n=t(30613),s=t(91676),o=t(59875);class f extends o.ProxyBase{constructor(){super(...arguments),this.engine="json",this.capturer=this._disposables.add(new n.Capturer(this.engine))}bindMethods(g){for(const _ of g)_.startsWith("on")?this.connection.onNotification(_,async(...E)=>{this.capturer.captureOnNotification("_",_,E);try{await this.registry.invoke(_,...this.serializeArguments(E))}catch(u){this.logger.warn(`notification exec ${_} error`,u)}}):this.connection.onRequest(_,async(...E)=>{const u=this.nextRequestId();this.capturer.captureOnRequest(u,_,E);try{const h=await this.registry.invoke(_,...this.serializeArguments(E));return this.capturer.captureOnRequestResult(u,_,h),{error:!1,data:h}}catch(h){return this.capturer.captureOnRequestFail(u,_,h),{error:!0,data:{message:h.message,stack:h.stack}}}})}async invoke(g,..._){await this.connectionPromise.promise;let E=!1;if(_.length===1&&Array.isArray(_[0])&&(E=!0),g.startsWith("on"))this.capturer.captureSendNotification("_",g,_),E?this.connection.sendNotification(g,[..._]):this.connection.sendNotification(g,..._);else{const u=this.nextRequestId();let h;E?h=this.connection.sendRequest(g,[..._]):h=this.connection.sendRequest(g,..._),this.capturer.captureSendRequest(u,g,_);const c=await h;if(c.error){const r=new Error(c.data.message);throw c.data.stack&&(r.stack=c.data.stack),this.capturer.captureSendRequestFail(u,g,c.data),r}else return this.capturer.captureSendRequestResult(u,g,c.data),c.data}}serializeArguments(g){const _=g[g.length-1];return g.length===2&&Array.isArray(g[0])&&Object.prototype.hasOwnProperty.call(_,"_isCancelled")?[...g[0],_]:g}listen(g){super.listen(g),this._disposables.add(g.onRequest(_=>{if(!this.registry.has(_)){const E=this.nextRequestId();this.capturer.captureOnRequest(E,_,[]);const u={data:s.METHOD_NOT_REGISTERED};return this.capturer.captureOnRequestFail(E,_,u.data),u}}))}}e.ProxyJson=f},16420:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ProxySumi=void 0;const n=t(91676),s=t(59875);class o extends s.ProxyBase{constructor(){super(...arguments),this.engine="sumi"}bindMethods(b){for(const g of b)g.startsWith("on")?this.connection.onNotification(g,async(..._)=>{try{await this.registry.invoke(g,..._)}catch(E){this.logger.warn(`notification exec ${g} error`,E)}}):this.connection.onRequest(g,async(..._)=>await this.registry.invoke(g,..._))}async invoke(b,...g){if(await this.connectionPromise.promise,b.startsWith("on"))this.connection.sendNotification(b,...g);else return await this.connection.sendRequest(b,...g)}listen(b){super.listen(b),this._disposables.add(b.onRequestNotFound(()=>{throw n.METHOD_NOT_REGISTERED}))}}e.ProxySumi=o},92408:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ProtocolRegistry=e.ServiceRegistry=void 0,e.getServiceMethods=o;const n=t(43718),s=new Set(["constructor"]);function o(g){const _=new Set;let E=g;do{const h=Object.getOwnPropertyNames(E);for(const c of h)s.has(c)||typeof g[c]=="function"&&_.add(c)}while(E=Object.getPrototypeOf(E));const u=Array.from(_);return u.sort(),u}class f{constructor(){this._disposables=new n.DisposableStore,this.emitter=this._disposables.add(new n.Emitter),this.onServicesUpdate=this.emitter.event,this.serviceMethodMap=new Map}register(_,E){this.serviceMethodMap.set(_,E),this.emitter.fire([_])}registerService(_,E){const u=[],{nameConverter:h}=E||{},c=o(_);for(const r of c){let l=r;h&&(l=h(r)),this.serviceMethodMap.set(l,_[r].bind(_)),u.push(l)}this.emitter.fire(u)}has(_){return this.serviceMethodMap.has(_)}invoke(_,...E){return this.serviceMethodMap.get(_)(...E)}methods(){return Array.from(this.serviceMethodMap.keys())}dispose(){this._disposables.dispose()}}e.ServiceRegistry=f;class b{constructor(){this._disposables=new n.DisposableStore,this.emitter=this._disposables.add(new n.Emitter),this.onProtocolUpdate=this.emitter.event,this.protocolMap=new Map}addProtocol(_,E){const u=[],{nameConverter:h}=E||{},{methods:c}=_;for(const r of c){let l=r.method;h&&(l=h(l)),this.protocolMap.set(l,{...r,method:l}),u.push(l)}this.emitter.fire(u)}applyTo(_){if(_.loadProtocolMethod){for(const E of this.protocolMap.values())_.loadProtocolMethod(E);this._disposables.add(this.onProtocolUpdate(E=>{if(_.loadProtocolMethod)for(const u of E){const h=this.protocolMap.get(u);h&&_.loadProtocolMethod(h)}}))}}dispose(){this._disposables.dispose()}}e.ProtocolRegistry=b},68855:(x,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.RPCServiceStub=void 0;class t{constructor(s,o,f){this.serviceName=s,this.center=o,this.type=f,this.getProxy=()=>new Proxy(this,{get:(b,g)=>typeof g=="symbol"?Promise.resolve():(b[g]||(b[g]=(..._)=>this.broadcast(g,..._)),b[g])}),this.center.registerService(s,this.type)}on(s,o){this.onRequest(s,o)}onRequestService(s){this.center.onRequestService(this.serviceName,s)}onRequest(s,o){this.center.onRequest(this.serviceName,s,o)}broadcast(s,...o){return this.center.broadcast(this.serviceName,s,...o)}}e.RPCServiceStub=t},97349:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SumiConnection=void 0;const n=t(43718),s=t(70392),o=t(93062),f=t(30613),b=t(90750),g=t(91676),_=t(48218),E=t(76339),u={},h={chunked:!0};class c{constructor(l,a={}){this.socket=l,this.options=a,this.disposable=new s.DisposableStore,this._requestHandlers=new Map,this._notificationHandlers=new Map,this._requestId=0,this._callbacks=new Map,this._reqTimeoutHandles=new Map,this._cancellationTokenSources=new Map,this._knownCanceledRequests=new Set,this.activeRequestPool=new Map,a.logger?this.logger=a.logger:this.logger=(0,n.getDebugLogger)(),this.io=a.io||new E.MessageIO,this.capturer=new f.Capturer(a.name||"sumi"),this.disposable.add(this.capturer)}sendNotification(l,...a){const d=this._requestId++;this.capturer.captureSendNotification(d,l,a),this.socket.send(this.io.Notification(d,l,u,a))}sendRequest(l,...a){return new Promise((d,m)=>{const p=this._requestId++;if(this._callbacks.set(p,(y,S,A)=>{if(S){if(this.traceRequestError(p,l,a,S),S===g.METHOD_NOT_REGISTERED){d(S);return}m(S);return}this.capturer.captureSendRequestResult(p,l,A),d(A)}),this.options.timeout&&this.options.timeout!==-1){const y=setTimeout(()=>{this._handleTimeout(l,p)},this.options.timeout);this._reqTimeoutHandles.set(p,y)}const v=a.length&&s.CancellationToken.isCancellationToken(a[a.length-1])?a.pop():void 0;if(v&&v.isCancellationRequested)return Promise.reject((0,s.canceled)());v&&v.onCancellationRequested(()=>this.cancelRequest(p)),this.capturer.captureSendRequest(p,l,a),this.socket.send(this.io.Request(p,l,{cancelable:!!v||void 0},a))})}cancelRequest(l){this.socket.send(this.io.Cancel(l))}_handleTimeout(l,a){if(!this._callbacks.has(a)||!this._reqTimeoutHandles.has(a))return;const d=this._callbacks.get(a);this._callbacks.delete(a),this._reqTimeoutHandles.delete(a),d(u,new _.MethodTimeoutError(l))}onRequest(l,a){return this._requestHandlers.set(l,a),{dispose:()=>{this._requestHandlers.delete(l)}}}onRequestNotFound(l){return this._starRequestHandler=l,{dispose:()=>{this._starRequestHandler=void 0}}}onNotification(l,a){return this._notificationHandlers.set(l,a),{dispose:()=>{this._notificationHandlers.delete(l)}}}onNotificationNotFound(l){return this._starNotificationHandler=l,{dispose:()=>{this._starNotificationHandler=void 0}}}listen(){this.disposable.add(this.socket.onMessage(l=>{const a=this.io.parse(l),d=a.kind,m=a.requestId;switch(d){case E.OperationType.Error:case E.OperationType.Response:{const{headers:p,method:v}=a,y=a.error,S=a.result;this._reqTimeoutHandles.has(m)&&(clearTimeout(this._reqTimeoutHandles.get(m)),this._reqTimeoutHandles.delete(m));const A=(T,D,w)=>{const I=this._callbacks.get(m);if(!I){this.logger.error(`Cannot find callback for request ${m}: ${v}`);return}this._callbacks.delete(m),I(T,D,w)};if(p&&p.chunked){let T;if(this.activeRequestPool.has(m)?T=this.activeRequestPool.get(m):(T=new o.SumiReadableStream,this.activeRequestPool.set(m,T),A(p,void 0,T)),S===null){T.end(),this.activeRequestPool.delete(m);break}if(y){T.emitError(y);break}T.emitData(S);break}A(p,y,S);break}case E.OperationType.Notification:case E.OperationType.Request:{const{method:p,headers:v,args:y}=a;if(v.cancelable){const S=new s.CancellationTokenSource;this._cancellationTokenSources.set(m,S),y.push(S.token),this._knownCanceledRequests.has(m)&&(S.cancel(),this._knownCanceledRequests.delete(m))}switch(d){case E.OperationType.Request:{this.capturer.captureOnRequest(m,p,y);let S;try{let D;const w=this._requestHandlers.get(p);w?D=w(...y):this._starRequestHandler&&(D=this._starRequestHandler(p,y)),S=Promise.resolve(D)}catch(D){S=Promise.reject(D)}const A=D=>{this.capturer.captureOnRequestResult(m,p,D),(0,o.isReadableStream)(D)?(0,o.listenReadable)(D,{onData:w=>{this.socket.send(this.io.Response(m,p,h,w))},onEnd:()=>{this.socket.send(this.io.Response(m,p,h,null)),this._cancellationTokenSources.delete(m)},onError:w=>{this.socket.send(this.io.Error(m,p,h,w)),this._cancellationTokenSources.delete(m)}}):(this.socket.send(this.io.Response(m,p,u,D)),this._cancellationTokenSources.delete(m))},T=D=>{this.traceRequestError(m,p,y,D),this.socket.send(this.io.Error(m,p,u,D)),this._cancellationTokenSources.delete(m)};S.then(A).catch(T);break}case E.OperationType.Notification:{this.capturer.captureOnNotification(m,p,y);const S=this._notificationHandlers.get(p);S?S(...y):this._starNotificationHandler&&this._starNotificationHandler(p,y);break}}break}case E.OperationType.Cancel:{const p=this._cancellationTokenSources.get(m);p?p.cancel():this._knownCanceledRequests.add(m);break}default:break}}))}dispose(){this.disposable.dispose()}static forWSWebSocket(l,a={}){return new c(new b.WSWebSocketConnection(l),a)}static forNetSocket(l,a={}){return new c(new b.NetSocketConnection(l),a)}traceRequestError(l,a,d,m){this.capturer.captureSendRequestFail(l,a,m)}toJSON(){throw new Error(`You're trying to serialize a SumiConnection instance, which is not allowed.
28101
28101
  Please check your code, and remove the rpc proxy reference.`)}}e.SumiConnection=c},48218:(x,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MethodTimeoutError=void 0;class t extends Error{constructor(s){super(`method ${s} timeout`)}}e.MethodTimeoutError=t},76339:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.RawMessageIO=e.MessageIO=e.IMessageIO=e.AnyProtocolSerializer=e.HeadersProto=e.OperationType=void 0;const n=t(26387),s=t(26246),o=t(86560),f=t(89104),b=t(4405),g=1;var _;(function(a){a[a.Request=0]="Request",a[a.Notification=1]="Notification",a[a.Response=2]="Response",a[a.Cancel=3]="Cancel",a[a.Error=4]="Error"})(_||(e.OperationType=_={})),e.HeadersProto={Request:n.Type.object("req-headers",{cancelable:n.Type.bool()}),Response:n.Type.object("resp-headers",{chunked:n.Type.bool()})};const E={Request:_.Request<<8|g,Notification:_.Notification<<8|g,Response:_.Response<<8|g,Cancel:_.Cancel<<8|g,Error:_.Error<<8|g};class u{constructor(d,m){this.fury=m;const p=[];for(const S of d.request)p.push(S.type);const v=n.Type.tuple(p);let y=n.Type.any();d.response&&d.response.type&&(y=d.response.type),this.request=this.fury.registerSerializer(v),this.result=this.fury.registerSerializer(y)}writeRequest(d){return this.request.serializer.write(d)}readRequest(){return this.request.serializer.read()}writeResponse(d){return this.result.serializer.write(d)}readResponse(){return this.result.serializer.read()}}class h{constructor(d,m,p){this.writer=d,this.reader=m,this.anySerializer=new f.AnySerializer(this.writer,this.reader,p)}writeRequest(d){this.anySerializer.write(d)}readRequest(){return this.anySerializer.read()}writeResponse(d){this.anySerializer.write(d)}readResponse(){return this.anySerializer.read()}}e.AnyProtocolSerializer=h;class c{}e.IMessageIO=c;class r extends c{constructor(){super(),this.serializerMap=new Map;const d=(0,b.furyFactory)();this.fury=d.fury,this.reader=d.reader,this.writer=d.writer,this.requestHeadersSerializer=(0,s.generateSerializer)(this.fury,e.HeadersProto.Request),this.responseHeadersSerializer=(0,s.generateSerializer)(this.fury,e.HeadersProto.Response),this.anySerializer=new h(this.writer,this.reader)}setAnySerializer(d){this.anySerializer=d}has(d){return this.serializerMap.has(d)}loadProtocol(d,m){const{methods:p}=d;for(const v of p)this.loadProtocolMethod(v,m)}loadProtocolMethod(d,m){let p=d.method;m?.nameConverter&&(p=m.nameConverter(p)),this.serializerMap.set(p,new u(d,this.fury))}getProcessor(d){const m=this.serializerMap.get(d);return m||this.anySerializer}Notification(d,m,p,v){const{writer:y}=this;return y.reset(),y.uint16(E.Notification),y.uint32(d),y.stringOfVarUInt32(m),this.requestHeadersSerializer.write(p),this.getProcessor(m).writeRequest(v),y.dump()}Request(d,m,p,v){const{writer:y}=this;return y.reset(),y.uint16(E.Request),y.uint32(d),y.stringOfVarUInt32(m),this.requestHeadersSerializer.write(p),this.getProcessor(m).writeRequest(v),y.dump()}Cancel(d){const{writer:m}=this;return m.reset(),m.uint16(E.Cancel),m.uint32(d),m.dump()}Response(d,m,p,v){const{writer:y}=this;return y.reset(),y.uint16(E.Response),y.uint32(d),y.stringOfVarUInt32(m),this.responseHeadersSerializer.write(p),this.getProcessor(m).writeResponse(v),y.dump()}Error(d,m,p,v){const{writer:y}=this;return y.reset(),y.uint16(E.Error),y.uint32(d),y.stringOfVarUInt32(m),this.responseHeadersSerializer.write(p),y.stringOfVarUInt32((0,o.stringifyError)(v)),y.dump()}parse(d){const{reader:m}=this;m.reset(d),m.skip(1);const p=m.uint8(),v=m.uint32();switch(p){case _.Request:case _.Notification:{const y=m.stringOfVarUInt32(),S=this.requestHeadersSerializer.read(),A=this.getProcessor(y).readRequest();return{kind:p,requestId:v,method:y,headers:S,args:A}}case _.Error:{const y=m.stringOfVarUInt32(),S=this.responseHeadersSerializer.read(),A=(0,o.parseError)(m.stringOfVarUInt32());return{kind:_.Error,requestId:v,method:y,headers:S,error:A}}case _.Response:{const y=m.stringOfVarUInt32(),S=this.responseHeadersSerializer.read(),A=this.getProcessor(y).readResponse();return{kind:_.Response,requestId:v,method:y,headers:S,result:A}}case _.Cancel:return{kind:_.Cancel,requestId:v};default:throw new Error(`Unknown message type: ${p}`)}}}e.MessageIO=r;class l{Request(d,m,p,v){return{kind:_.Request,requestId:d,method:m,headers:p,args:v}}Notification(d,m,p,v){return{kind:_.Notification,requestId:d,method:m,headers:p,args:v}}Cancel(d){return{kind:_.Cancel,requestId:d}}Response(d,m,p,v){return{kind:_.Response,requestId:d,headers:p,method:m,result:v}}Error(d,m,p,v){return{kind:_.Error,requestId:d,method:m,headers:p,error:v}}parse(d){return d}}e.RawMessageIO=l},86058:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SumiConnectionMultiplexer=e.IRPCProtocol=e.ProxyIdentifier=void 0,e.createExtMessageIO=b;const n=t(89104),s=t(97349),o=t(76339);class f{constructor(E){this.serviceId=E,this.countId=++f.count}static for(E){return new f(E)}}e.ProxyIdentifier=f,f.count=0,e.IRPCProtocol=Symbol("IRPCProtocol");function b(_){const E=new o.MessageIO;return E.setAnySerializer(new o.AnyProtocolSerializer(E.writer,E.reader,n.ExtObjectTransfer)),_?.forEach((u,h)=>{E.loadProtocol(u,{nameConverter:c=>g.getRPCName(h.serviceId,c)})}),E}class g extends s.SumiConnection{static getRPCName(E,u){return`${E}${g.SEP}${u}`}static extractServiceAndMethod(E){const u=E.indexOf(g.SEP);return[E.substring(0,u),E.substring(u+g.SEP_LENGTH)]}static normalizeServiceId(E){return E.replace(/\//g,"_")}constructor(E,u={}){super(E,{...u,io:u.io||b()}),this.socket=E,this.options=u,this._locals=new Map,this._proxies=new Map,this.onRequestNotFound((h,c)=>this.invoke(h,c)),this.listen()}set(E,u){const h=g.normalizeServiceId(E.serviceId);return this._locals.set(h,u),u}get(E){return this._locals.get(g.normalizeServiceId(E.serviceId))}getProxy(E){const u=g.normalizeServiceId(E.serviceId);return this._proxies.has(u)||this._proxies.set(u,this._createProxy(u)),this._proxies.get(u)}_createProxy(E){const u={get:(h,c)=>{if(typeof c=="symbol")return null;if(!h[c])if(c.charCodeAt(0)===36){const r=g.getRPCName(E,c);h[c]=(...l)=>this.sendRequest(r,...l)}else c==="toJSON"&&(h[c]=()=>{throw new Error("Cannot serialize a rpc protocol proxy object")});return h[c]}};return new Proxy(Object.create(null),u)}async invoke(E,u){const[h,c]=g.extractServiceAndMethod(E),r=this._locals.get(h);if(!r)throw new Error("Unknown actor "+h);const l=await r[c];if(typeof l!="function")throw new Error("Unknown method "+c+" on actor "+h);return l.apply(r,u)}getSocket(){return this.socket}}e.SumiConnectionMultiplexer=g,g.SEP="/",g.SEP_LENGTH=g.SEP.length},15726:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.RPCProtocol=e.MessageIO=e.ObjectTransfer=e.ProxyIdentifier=e.IRPCProtocol=e.RPCProtocolEnv=void 0,e.createExtHostContextProxyIdentifier=f,e.createMainContextProxyIdentifier=b;const n=t(43718),s=t(86058);Object.defineProperty(e,"IRPCProtocol",{enumerable:!0,get:function(){return s.IRPCProtocol}}),Object.defineProperty(e,"ProxyIdentifier",{enumerable:!0,get:function(){return s.ProxyIdentifier}});var o;(function(h){h[h.MAIN=0]="MAIN",h[h.EXT=1]="EXT"})(o||(e.RPCProtocolEnv=o={}));function f(h){return new s.ProxyIdentifier(h)}function b(h){return new s.ProxyIdentifier(h)}var g;(function(h){function c(l,a){if(a){if(a.$mid===1)return{$type:"VSCODE_URI",data:n.Uri.revive(a).toString()};if(a instanceof Uint8Array||a instanceof Uint32Array||a instanceof Uint16Array)return{$type:"Buffer",data:Array.from(a)};if(a instanceof ArrayBuffer)return{$type:"Buffer",data:Array.from(new Uint8Array(a))};if(a.type==="Buffer")return{$type:"Buffer",data:a.data}}return a}h.replacer=c;function r(l,a){if(a&&a.$type!==void 0&&a.data!==void 0){if(a.$type==="VSCODE_URI")return n.Uri.parse(a.data);if(a.$type==="Buffer")return Uint8Array.from(a.data)}return a}h.reviver=r})(g||(e.ObjectTransfer=g={}));class _{static cancel(c,r){return`{"type":4,"id":"${c}"}`}static serializeRequest(c,r,l,a){return a=a.map(d=>{if(d instanceof Error){const m=Array.prototype.slice.call(arguments);return m[0]=d.stack,m.join(`
28102
- `)}return d}),`{"type": 1, "id": "${c}", "proxyId": "${r}", "method": "${l}", "args": ${JSON.stringify(a,g.replacer)}}`}static serializeReplyOK(c,r,l){if(typeof r>"u")return`{"type": 2, "id": "${c}"}`;try{return`{"type": 2, "id": "${c}", "res": ${JSON.stringify(r,g.replacer)}}`}catch{return l&&l.warn("res",r),`{"type": 2, "id": "${c}", "res": {}}`}}static serializeReplyError(c,r,l){try{return`{"type": 3, "id": "${c}", "res": ${JSON.stringify((0,n.transformErrorForSerialization)(r),g.replacer)}}`}catch{return l&&l.error("error",r),`{"type": 3, "id": "${c}", "res": {}}`}}}e.MessageIO=_;function E(){const h=new Error("Canceled");return h.name=h.message,h}class u{constructor(c,r){this._protocol=c,this._locals=new Map,this._proxies=new Map,this._pendingRPCReplies=new Map,this._cancellationTokenSources=new Map,this._timeoutHandles=new Map,this._lastMessageId=0,this.logger=r||console,this.logger.error("You are using the deprecated class: 'RPCProtocol'. Please use the new one: 'SumiConnectionMultiplexer'"),this._protocol.onMessage(l=>this._receiveOneMessage(l))}set(c,r){return this._locals.set(c.serviceId,r),r}get(c){return this._locals.get(c.serviceId)}getProxy(c){return this._proxies.has(c.serviceId)||this._proxies.set(c.serviceId,this._createProxy(c.serviceId)),this._proxies.get(c.serviceId)}_createProxy(c){const r={get:(l,a)=>typeof a=="symbol"?null:(!l[a]&&a.charCodeAt(0)===36&&(l[a]=(...d)=>this._remoteCall(c,a,d)),l[a])};return new Proxy(Object.create(null),r)}_remoteCall(c,r,l){const a=l.length&&n.CancellationToken.isCancellationToken(l[l.length-1])?l.pop():void 0;if(a&&a.isCancellationRequested)return Promise.reject(E());const d=String(++this._lastMessageId),m=new n.Deferred;a&&(l.push("add.cancellation.token"),a.onCancellationRequested(()=>this._protocol.send(_.cancel(d)))),this._pendingRPCReplies.set(d,m);const p=_.serializeRequest(d,c,r,l);if(this._protocol.send(p),this._protocol.timeout&&this._protocol.timeout!==-1){const v=setTimeout(()=>{this._handleTimeout(d)},this._protocol.timeout);this._timeoutHandles.set(d,v)}return m.promise}_receiveOneMessage(c){const r=JSON.parse(c,g.reviver);switch(this._timeoutHandles.has(r.id)&&(typeof clearTimeout=="function"&&clearTimeout(this._timeoutHandles.get(r.id)),this._timeoutHandles.delete(r.id)),r.type){case 1:this._receiveRequest(r);break;case 2:this._receiveReply(r);break;case 4:this._receiveCancel(r);break;case 3:this._receiveError(r);break}}_receiveCancel(c){const r=this._cancellationTokenSources.get(c.id);r&&r.cancel()}_receiveError(c){const r=c.id;if(!this._pendingRPCReplies.has(r))return;const l=this._pendingRPCReplies.get(r);this._pendingRPCReplies.delete(r);let a;c.res&&(c.res.$isError?(a=new Error,a.name=c.res.name,a.message=c.res.message,a.stack=c.res.stack):a=c.res),l.reject(a)}_receiveRequest(c){const r=c.id,l=c.proxyId,a=c.method,d=c.args.map(v=>v===null?void 0:v);if(d.length&&d[d.length-1]==="add.cancellation.token"?d.pop():!1){const v=new n.CancellationTokenSource;this._cancellationTokenSources.set(r,v),d.push(v.token)}this._invokeHandler(l,a,d).then(v=>{this._protocol.send(_.serializeReplyOK(r,v)),this._cancellationTokenSources.delete(r)}).catch(v=>{this._protocol.send(_.serializeReplyError(r,v)),this._cancellationTokenSources.delete(r)})}_invokeHandler(c,r,l){try{return this._doInvokeHandler(c,r,l)}catch(a){return Promise.reject(a)}}async _doInvokeHandler(c,r,l){const a=this._locals.get(c);if(!a)throw new Error("Unknown actor "+c);const d=await a[r];if(typeof d!="function")throw new Error("Unknown method "+r+" on actor "+c);return d.apply(a,l)}_receiveReply(c){const r=c.id;if(!this._pendingRPCReplies.has(r))return;const l=this._pendingRPCReplies.get(r);this._pendingRPCReplies.delete(r),l.resolve(c.res)}_handleTimeout(c){if(!this._pendingRPCReplies.has(c)||!this._timeoutHandles.has(c))return;const r=this._pendingRPCReplies.get(c);this._pendingRPCReplies.delete(c),this._timeoutHandles.delete(c),r.reject(new Error("RPC Timeout: "+c))}}e.RPCProtocol=u},64592:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.furySerializer=e.CloseProtocol=e.BinaryProtocol=e.DataProtocol=e.ErrorProtocol=e.ServerReadyProtocol=e.OpenProtocol=e.PongProtocol=e.PingProtocol=void 0;const n=t(26387),s=t(94846);function o(){return{id:n.Type.string()}}e.PingProtocol=n.Type.object("ping",{...o()}),e.PongProtocol=n.Type.object("pong",{...o()}),e.OpenProtocol=n.Type.object("open",{...o(),clientId:n.Type.string(),path:n.Type.string(),traceId:n.Type.string()}),e.ServerReadyProtocol=n.Type.object("server-ready",{...o(),traceId:n.Type.string()}),e.ErrorProtocol=n.Type.object("error",{...o(),code:n.Type.uint16(),message:n.Type.string()}),e.DataProtocol=n.Type.object("data",{...o(),content:n.Type.string()}),e.BinaryProtocol=n.Type.object("binary",{...o(),binary:n.Type.binary()}),e.CloseProtocol=n.Type.object("close",{...o(),code:n.Type.uint32(),reason:n.Type.string()});const f=(0,s.oneOf)([e.PingProtocol,e.PongProtocol,e.OpenProtocol,e.ServerReadyProtocol,e.DataProtocol,e.BinaryProtocol,e.CloseProtocol,e.ErrorProtocol]);e.furySerializer=f},54558:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.wrapSerializer=void 0;const n=t(85608);n.__exportStar(t(64592),e),n.__exportStar(t(43620),e),n.__exportStar(t(41619),e);const s=(o,f)=>({onceClose(b){return o.onceClose(b)},onMessage(b){return o.onMessage(g=>{b(f.deserialize(g))})},send(b){o.send(f.serialize(b))}});e.wrapSerializer=s},43620:(x,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.rawSerializer=void 0,e.rawSerializer={serialize:t=>t,deserialize:t=>t}},41619:(x,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})},76271:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.RPCServiceChannelPath=e.BaseCommonChannelHandler=e.CommonChannelPathHandler=void 0,e.injectConnectionProviders=_;const n=t(39048),s=t(54558),o=t(47561);class f{constructor(){this.handlerMap=new Map,this.paramsKey=new Map}register(u,h){const c=u.indexOf("/:"),r=c>=0;let l=u;r&&(l=u.slice(0,c),this.paramsKey.set(l,u.slice(c+2))),this.handlerMap.has(l)||this.handlerMap.set(l,[]);const a=this.handlerMap.get(l),d=h.handler.bind(h),m=(p,v,y)=>{h.connection=p,d(p,v,y)};h.handler=m,a.push(h),this.handlerMap.set(l,a)}getParams(u,h){const c={};if(this.paramsKey.has(u)){const r=this.paramsKey.get(u);r&&(c[r]=h)}return c}removeHandler(u,h){const c=u.indexOf(":"),r=c>=0;let l=u;r&&(l=u.slice(0,c));const a=this.handlerMap.get(l)||[],d=a.indexOf(h);d!==-1&&a.splice(d,1),this.handlerMap.set(u,a)}get(u){return this.handlerMap.get(u)}disposeConnectionClientId(u,h){this.handlerMap.forEach(c=>{c.forEach(r=>{r.dispose(u,h)})})}openChannel(u,h,c){let r=this.get(u),l;if(!r){const a=u.indexOf("/");a>=0&&(r=this.get(u.slice(0,a)),l=this.getParams(u.slice(0,a),u.slice(a+1)))}if(r)for(let a=0,d=r.length;a<d;a++)r[a].handler(h,c,l)}getAll(){return Array.from(this.handlerMap.values())}}e.CommonChannelPathHandler=f;var b;(function(E){E[E.ConnectionClosed=1]="ConnectionClosed",E[E.NewChannelOpened=2]="NewChannelOpened"})(b||(b={}));class g{constructor(u,h,c=console,r={}){this.handlerId=u,this.commonChannelPathHandler=h,this.logger=c,this.channelMap=new Map,this.heartbeatTimer=null,this.serializer=s.furySerializer,r.serializer&&(this.serializer=r.serializer)}heartbeat(u){this.heartbeatTimer&&clearTimeout(this.heartbeatTimer),this.heartbeatTimer=setTimeout(()=>{this.doHeartbeat(u),this.heartbeat(u)},5e3)}receiveConnection(u){let h;this.heartbeat(u);const c=(0,s.wrapSerializer)(u,this.serializer);c.onMessage(r=>{try{switch(r.kind){case"open":{const{id:l,path:a,traceId:d}=r;h=r.clientId,this.logger.log(`open a new connection channel ${h} with path ${a}`);let m=this.channelMap.get(l);m&&(m.close(b.NewChannelOpened,"new channel opened for the same channel id"),m.dispose()),m=new o.WSServerChannel(c,{id:l,clientId:h,logger:this.logger}),this.channelMap.set(l,m),this.commonChannelPathHandler.openChannel(a,m,h),m.serverReady(d);break}default:{const{id:l}=r,a=this.channelMap.get(l);a?a.dispatch(r):(c.send({kind:"error",id:l,code:n.ErrorMessageCode.ChannelNotFound,message:`channel ${l} not found`}),this.logger.warn(`channel ${l} is not found`))}}}catch(l){this.logger.error("handle connection message error",l)}}),u.onceClose(()=>{this.logger.log(`connection ${h} is closed, dispose all channels`),this.commonChannelPathHandler.disposeConnectionClientId(u,h),Array.from(this.channelMap.values()).filter(r=>r.clientId===h).forEach(r=>{r.close(b.ConnectionClosed,"connection closed"),r.dispose(),this.channelMap.delete(r.id),this.logger.log(`Remove connection channel ${r.id}`)})})}dispose(){this.heartbeatTimer&&clearTimeout(this.heartbeatTimer)}}e.BaseCommonChannelHandler=g,e.RPCServiceChannelPath="RPCService";function _(E){const u=new f;E.addProviders({token:f,useValue:u})}},8140:(x,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ServiceType=void 0;var t;(function(n){n[n.Service=0]="Service",n[n.Stub=1]="Stub"})(t||(e.ServiceType=t={}))},47561:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.WSServerChannel=e.WSChannel=void 0;const n=t(40396),s=t(43718),o=t(39048),f=t(97349);var b;(function(u){u[u.ReSend=0]="ReSend",u[u.Sended=1]="Sended",u[u.Success=2]="Success",u[u.Failed=3]="Failed"})(b||(b={}));class g{constructor(){this.map=new Map,this.deliveryTimeout=500,this.timerMap=new Map}setDeliveryTimeout(h){this.deliveryTimeout=h}set(h,c){this.map.set(h,c)}get(h){return this.map.get(h)}success(h){this.map.set(h,b.Success);const c=this.timerMap.get(h);c&&clearTimeout(c)}dispose(){this.timerMap.forEach(h=>{clearTimeout(h)})}stop(h){const c=this.timerMap.get(h);c&&clearTimeout(c)}send(h,c){this.set(h,b.Sended),this.guard(h,c)}guard(h,c){const r=this.timerMap.get(h);r&&clearTimeout(r);const l=setTimeout(()=>{this.set(h,b.ReSend),c.whenRetry()},this.deliveryTimeout);this.timerMap.set(h,l)}}class _{constructor(h,c){this.connection=h,this._disposables=new s.DisposableStore,this.emitter=this._disposables.add(new n.EventEmitter),this.onBinaryQueue=this._disposables.add(new s.EventQueue),this.sendQueue=[],this._isServerReady=!1,this.stateTracer=new g,this.LOG_TAG="[WSChannel]",this.logger=console;const{id:r,logger:l,ensureServerReady:a}=c;this.id=r,this.LOG_TAG=`[WSChannel id:${this.id}]`,l&&(this.logger=l),this._ensureServerReady=!!a,c.deliveryTimeout&&this.stateTracer.setDeliveryTimeout(c.deliveryTimeout),this._disposables.add(this.emitter.on("binary",d=>this.onBinaryQueue.push(d)))}inqueue(h){if(this._ensureServerReady&&!this._isServerReady){this.sendQueue||(this.sendQueue=[]),this.sendQueue.push(h);return}this.connection.send(h)}ensureMessageDeliveried(h,c=(0,s.randomString)(16)){const r=this.stateTracer.get(c);if(r&&r>=b.Sended){this.logger.error(`message already send already success or in progress, traceId: ${c}, state: ${r}`);return}h.traceId=c,this.connection.send(h),this.stateTracer.send(c,{whenRetry:()=>{if(this._isServerReady){this.stateTracer.stop(c);return}this.ensureMessageDeliveried(h,c)}})}onMessage(h){return this.emitter.on("message",h)}onBinary(h){return this.onBinaryQueue.on(h)}onOpen(h){return this.emitter.on("open",h)}onReopen(h){return this.emitter.on("reopen",h)}pause(){this._isServerReady=!1}onServerReady(h){if(this._isServerReady){h();return}return this.emitter.on("open",h)}resume(){if(this._isServerReady=!0,this.sendQueue){for(const h of this.sendQueue)this.connection.send(h);this.sendQueue=[]}}dispatch(h){switch(h.kind){case"server-ready":h.traceId&&this.stateTracer.success(h.traceId),this.resume(),this.emitter.emit("open",h.id);break;case"data":this.emitter.emit("message",h.content);break;case"binary":this.emitter.emit("binary",h.binary);break;case"error":switch(this.logger.error(this.LOG_TAG,`receive error: id: ${h.id}, code: ${h.code}, error: ${h.message}`),h.code){case o.ErrorMessageCode.ChannelNotFound:this.channelPath&&(this.pause(),this.open(this.channelPath,this.clientId));break}break}}open(h,c){this.channelPath=h,this.clientId=c,this.LOG_TAG=`[WSChannel id=${this.id} path=${h}]`;const r={kind:"open",id:this.id,path:h,clientId:c};this._ensureServerReady?this.ensureMessageDeliveried(r):this.connection.send(r)}send(h){this.inqueue({kind:"data",id:this.id,content:h})}sendBinary(h){this.inqueue({kind:"binary",id:this.id,binary:h})}onError(){}close(h,c){this.pause(),this.emitter.emit("close",h,c)}fireReopen(){this.emitter.emit("reopen")}onClose(h){return this.emitter.on("close",h)}onceClose(h){return this.emitter.once("close",h)}createConnection(){return{onceClose:h=>this.onceClose(h),onMessage:h=>this.onBinary(h),send:h=>{this.sendBinary(h)},dispose(){}}}createSumiConnection(h={}){return new f.SumiConnection(this.createConnection(),h)}dispose(){this.stateTracer.dispose(),this.sendQueue=[],this._disposables.dispose()}ping(){this.connection.send({kind:"ping",id:this.id})}}e.WSChannel=_;class E extends _{constructor(h,c){super(h,c),this.connection=h,this.messageQueue=[],this.clientId=c.clientId}serverReady(h){this.connection.send({kind:"server-ready",id:this.id,traceId:h})}dispatch(h){switch(h.kind){case"data":this.emitter.emit("message",h.content);break;case"binary":this.emitter.emit("binary",h.binary);break;case"ping":this.connection.send({kind:"pong",id:this.id});break}}}e.WSServerChannel=E},8919:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),t(85608).__exportStar(t(25285),e)},70650:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AINativeConfigService=e.DEFAULT_CAPABILITIES=void 0;const n=t(85608),s=t(76003),o=t(1149),f=t(11050);e.DEFAULT_CAPABILITIES={supportsMarkers:!0,supportsChatAssistant:!0,supportsInlineChat:!0,supportsInlineCompletion:!0,supportsConflictResolve:!0,supportsRenameSuggestions:!0,supportsProblemFix:!0,supportsTerminalDetection:!0,supportsTerminalCommandSuggest:!0};const b={};Object.keys(e.DEFAULT_CAPABILITIES).forEach(_=>{b[_]=!1});let g=class{constructor(){this.aiModuleLoaded=!1,this.internalCapabilities=e.DEFAULT_CAPABILITIES}setDefaultCapabilities(E){for(const u in this.internalCapabilities)Object.prototype.hasOwnProperty.call(this.internalCapabilities,u)&&(this.internalCapabilities[u]=E)}enableCapabilities(){this.setDefaultCapabilities(!0)}disableCapabilities(){this.setDefaultCapabilities(!1)}get capabilities(){if(!this.aiModuleLoaded)return b;const{AINativeConfig:E}=this.appConfig;return E?.capabilities?{...this.internalCapabilities,...E.capabilities}:this.internalCapabilities}setAINativeModuleLoaded(E){this.aiModuleLoaded=E}};e.AINativeConfigService=g,n.__decorate([(0,s.Autowired)(f.AppConfig),n.__metadata("design:type",Object)],g.prototype,"appConfig",void 0),n.__decorate([(0,s.Autowired)(o.LayoutViewSizeConfig),n.__metadata("design:type",o.LayoutViewSizeConfig)],g.prototype,"layoutViewSize",void 0),e.AINativeConfigService=g=n.__decorate([(0,s.Injectable)()],g)},41480:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AIReporter=void 0;const n=t(85608),s=t(76003),o=t(43718),f=t(52664);let b=class{constructor(){this.reportInfoCache=new Map,this.reporterCancelHandler=new Map}getRelationId(){return(0,o.uuid)()}getCacheReportInfo(_){return this.reportInfoCache.get(_)}getCommonReportInfo(){return{}}start(_,E){const u=this.getRelationId();this.report(u,{...E,msgType:_,isStart:!0});const h=setTimeout(()=>{this.report(u,{...E,success:!1})},60*1e3);return this.reporterCancelHandler.set(u,h),u}end(_,E){const u=this.reporterCancelHandler.get(_);u&&clearTimeout(u),this.report(_,{success:!0,...E,isStart:!1})}record(_,E){E||(E=this.getRelationId());const u=this.reportInfoCache.get(E)||{},h={...this.getCommonReportInfo(),...u,..._,relationId:E};return this.reportInfoCache.set(E,h),h}report(_,E){const u=this.record(E,_);this.reporter.point(f.AI_REPORTER_NAME,E.msgType||u.msgType,u)}};e.AIReporter=b,n.__decorate([(0,s.Autowired)(o.IReporterService),n.__metadata("design:type",Object)],b.prototype,"reporter",void 0),e.AIReporter=b=n.__decorate([(0,s.Injectable)()],b)},57925:(x,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AI_MULTI_LINE_COMPLETION_ACCEPT=e.AI_MULTI_LINE_COMPLETION_DISCARD=e.AI_CODE_ACTION=e.AI_CHAT_VISIBLE=e.AI_INLINE_COMPLETION_REPORTER=e.AI_INLINE_DIFF_PARTIAL_EDIT=e.AI_INLINE_COMPLETION_VISIBLE=e.AI_INLINE_CHAT_INTERACTIVE_INPUT_VISIBLE=e.AI_INLINE_CHAT_VISIBLE=void 0,e.AI_INLINE_CHAT_VISIBLE={id:"ai.inlineChat.visible"},e.AI_INLINE_CHAT_INTERACTIVE_INPUT_VISIBLE={id:"ai.inlineChat.interactiveInput.visible"},e.AI_INLINE_COMPLETION_VISIBLE={id:"ai.inline.completion.visible"},e.AI_INLINE_DIFF_PARTIAL_EDIT={id:"ai.inline.diff.partial.edit"},e.AI_INLINE_COMPLETION_REPORTER={id:"ai.inline.completion.reporter"},e.AI_CHAT_VISIBLE={id:"ai.chat.visible"},e.AI_CODE_ACTION={id:"ai.code.action"},e.AI_MULTI_LINE_COMPLETION_DISCARD={id:"ai.multiLine.completion.discard"},e.AI_MULTI_LINE_COMPLETION_ACCEPT={id:"ai.multiLine.completion.accept"}},38070:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MergeConflictReportService=void 0;const n=t(85608),s=t(76003),o=t(43718),f=t(70650);let b=class extends o.Disposable{constructor(){super(...arguments),this.reportInfoMap=new Map,this.unique2RelationMap=new Map}record(_,E){if(!this.aiNativeConfigService.capabilities.supportsConflictResolve)return E;let u="";return this.unique2RelationMap.has(_)?(u=this.unique2RelationMap.get(_),this.aiReporter.record(E,u)):(u=this.aiReporter.record({...E,msgType:o.AIServiceType.MergeConflict,message:o.AIServiceType.MergeConflict,editorMode:E.editorMode||o.MergeConflictEditorMode.traditional}).relationId,this.unique2RelationMap.set(_,u)),{...E,relationId:u}}report(_,E){if(!this.aiNativeConfigService.capabilities.supportsConflictResolve)return;const u=this.record(_,E);this.aiReporter.end(u.relationId,u)}reportIncrementNum(_,E){if(!this.aiNativeConfigService.capabilities.supportsConflictResolve)return;const u=this.unique2RelationMap.get(_);if(!u)return;const h=this.aiReporter.getCacheReportInfo(u)[E]||0;this.report(_,{[E]:h+1})}dispose(){super.dispose(),this.reportInfoMap.clear()}};e.MergeConflictReportService=b,n.__decorate([(0,s.Autowired)(f.AINativeConfigService),n.__metadata("design:type",f.AINativeConfigService)],b.prototype,"aiNativeConfigService",void 0),n.__decorate([(0,s.Autowired)(o.IAIReporter),n.__metadata("design:type",Object)],b.prototype,"aiReporter",void 0),e.MergeConflictReportService=b=n.__decorate([(0,s.Injectable)()],b)},95040:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IAIInlineChatService=void 0,t(85608).__exportStar(t(70650),e),e.IAIInlineChatService=Symbol("IAIInlineChatService")},12956:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ClientAppStateService=e.ClientAppStateEvent=void 0;const n=t(85608),s=t(76003),o=t(43718);class f extends o.BasicEvent{}e.ClientAppStateEvent=f;let b=class{constructor(){this._state="init",this.deferred={}}get state(){return this._state}set state(_){_!==this._state&&(this._state=_,this.deferred[_]===void 0&&(this.deferred[_]=new o.Deferred),this.deferred[_].resolve(),this.eventBus.fire(new f(_)))}reachedState(_){return this.deferred[_]===void 0&&(this.deferred[_]=new o.Deferred),this.deferred[_].promise}reachedAnyState(..._){return Promise.race(_.map(E=>this.reachedState(E)))}};e.ClientAppStateService=b,n.__decorate([(0,s.Autowired)(o.IEventBus),n.__metadata("design:type",Object)],b.prototype,"eventBus",void 0),e.ClientAppStateService=b=n.__decorate([(0,s.Injectable)()],b)},59555:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ApplicationService=void 0;const n=t(85608),s=t(76003),o=t(59019),f=t(43718),b=t(11050),g=t(42101);let _=class{constructor(){this._initialized=new f.Deferred}async initializeData(){this._backendOS=await this.commonServer.getBackendOS(),this._initialized.resolve()}get frontendOS(){return f.OS.type()}get backendOS(){if(this._backendOS)return this._backendOS;if(this.appConfig.isElectronRenderer)return this.frontendOS;throw new Error("Can't get backend os type before initialize, if you want wait to get backend os, please use async method: getBackendOS")}async getBackendOS(){return await this._initialized.promise,this.backendOS}get clientId(){return this.injector.get(o.WSChannelHandler).clientId}get windowId(){return this.appConfig.isElectronRenderer?g.electronEnv.currentWindowId:this.injector.get(o.WSChannelHandler).clientId}};e.ApplicationService=_,n.__decorate([(0,s.Autowired)(f.CommonServerPath),n.__metadata("design:type",Object)],_.prototype,"commonServer",void 0),n.__decorate([(0,s.Autowired)(b.AppConfig),n.__metadata("design:type",Object)],_.prototype,"appConfig",void 0),n.__decorate([(0,s.Autowired)(s.INJECTOR_TOKEN),n.__metadata("design:type",s.Injector)],_.prototype,"injector",void 0),e.ApplicationService=_=n.__decorate([(0,s.Injectable)()],_)},16884:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});const n=t(85608);n.__exportStar(t(12956),e),n.__exportStar(t(59555),e)},22914:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BaseConnectionHelper=void 0;const n=t(85608),s=t(76003),o=t(18740),f=t(43718),b=t(32796),g=t(38578),_=(0,f.getDebugLogger)();let E=class{async createRPCServiceChannel(h){var c;const r=this.createConnection(),l=(c=this.appConfig.clientId)!==null&&c!==void 0?c:this.getDefaultClientId(),a=new o.WSChannelHandler(r,l,{logger:_});return(0,b.createConnectionService)(this.injector,h,a)}};e.BaseConnectionHelper=E,n.__decorate([(0,s.Autowired)(s.INJECTOR_TOKEN),n.__metadata("design:type",s.Injector)],E.prototype,"injector",void 0),n.__decorate([(0,s.Autowired)(g.AppConfig),n.__metadata("design:type",Object)],E.prototype,"appConfig",void 0),n.__decorate([(0,s.Autowired)(f.IReporterService),n.__metadata("design:type",Object)],E.prototype,"reporterService",void 0),e.BaseConnectionHelper=E=n.__decorate([(0,s.Injectable)({multiple:!0})],E)},41320:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BrowserRuntime=void 0;const n=t(85608),s=t(76003),o=t(44142),f=t(6858),b=t(53206);let g=class extends f.RendererRuntime{constructor(){super(...arguments),this.runtimeName=o.ESupportRuntime.Web}registerRuntimeModuleProviders(E,u){u.webProviders&&E.addProviders(...u.webProviders)}registerRuntimeInnerProviders(E){(0,b.injectBrowserInnerProviders)(E)}};e.BrowserRuntime=g,e.BrowserRuntime=g=n.__decorate([(0,s.Injectable)()],g)},53206:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.injectBrowserInnerProviders=o;const n=t(93899),s=t(97222);function o(f){f.addProviders({token:n.ICtxMenuRenderer,useClass:s.BrowserCtxMenuRenderer})}},55267:(x,e,t)=>{"use strict";var n;Object.defineProperty(e,"__esModule",{value:!0}),e.WebConnectionHelper=void 0;const s=t(85608),o=t(76003),f=t(91493),b=t(43718),g=t(22914);let _=n=class extends g.BaseConnectionHelper{constructor(u){super(),this.options=u,this.clientId=n.clientIdFactory()}getDefaultClientId(){return this.clientId}createConnection(){return f.ReconnectingWebSocketConnection.forURL(this.options.connectionPath,this.options.connectionProtocols)}static clientIdFactory(){return`CLIENT_ID_${(0,b.uuid)()}`}};e.WebConnectionHelper=_,e.WebConnectionHelper=_=n=s.__decorate([(0,o.Injectable)({multiple:!0}),s.__metadata("design:paramtypes",[Object])],_)},44142:(x,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.treeSitterWasmCDNUri=e.onigWasmCDNUri=e.ESupportRuntime=void 0;var t;(function(n){n.Electron="electron",n.Web="web"})(t||(e.ESupportRuntime=t={})),e.onigWasmCDNUri="https://g.alicdn.com/kaitian/vscode-oniguruma-wasm/1.5.1/onig.wasm",e.treeSitterWasmCDNUri="https://gw.alipayobjects.com/os/lib/opensumi/tree-sitter-wasm/0.0.2"},59574:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ElectronRendererRuntime=void 0;const n=t(85608),s=t(76003),o=t(42101),f=t(44142),b=t(6858),g=t(38892);let _=class extends b.RendererRuntime{constructor(){super(...arguments),this.runtimeName=f.ESupportRuntime.Electron}registerRuntimeModuleProviders(h,c){c.electronProviders&&h.addProviders(...c.electronProviders)}registerRuntimeInnerProviders(h){(0,g.injectElectronInnerProviders)(h)}mergeAppConfig(h){return E(h)}async provideResourceUri(h){switch(h){case b.EKnownResources.OnigWasm:return o.electronEnv.onigWasmUri||this.appConfig.onigWasmUri||f.onigWasmCDNUri;case b.EKnownResources.TreeSitterWasmDirectory:return o.electronEnv.treeSitterWasmDirectoryUri||this.appConfig.treeSitterWasmDirectoryUri||f.treeSitterWasmCDNUri;default:throw new Error(`Unknown resource: ${h}`)}}};e.ElectronRendererRuntime=_,e.ElectronRendererRuntime=_=n.__decorate([(0,s.Injectable)()],_);function E(u){var h;const c=(h=o.electronEnv.metadata)!==null&&h!==void 0?h:{},r={...u,appRoot:u.appRoot||o.electronEnv.appPath,extensionDir:u.extensionDir||c.extensionDir};return c.extensionDevelopmentHost&&(u.extensionDevelopmentHost=c.extensionDevelopmentHost),c.extensionCandidate&&(u.extensionCandidate=(u.extensionCandidate||[]).concat(o.electronEnv.metadata.extensionCandidate||[])),r}},38892:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.injectElectronInnerProviders=_;const n=t(43718),s=t(37406),o=t(93899),f=t(27790),b=t(11050),g=t(42101);function _(E){const u=E.get(b.AppConfig);E.addProviders({token:n.IElectronMainMenuService,useValue:(0,g.createElectronMainApi)(n.IElectronMainMenuService,u.devtools)},{token:s.IElectronMainUIService,useValue:(0,g.createElectronMainApi)(s.IElectronMainUIService,u.devtools)},{token:s.IElectronMainLifeCycleService,useValue:(0,g.createElectronMainApi)(s.IElectronMainLifeCycleService,u.devtools)},{token:s.IElectronURLService,useValue:(0,g.createElectronMainApi)(s.IElectronURLService,u.devtools)},{token:f.IElectronMenuFactory,useClass:f.ElectronMenuFactory},{token:f.IElectronMenuBarService,useClass:f.ElectronMenuBarService},{token:o.ICtxMenuRenderer,useClass:f.ElectronCtxMenuRenderer})}},63977:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ElectronConnectionHelper=void 0;const n=t(85608),s=t(76003),o=t(42101),f=t(22914);let b=class extends f.BaseConnectionHelper{getDefaultClientId(){return o.electronEnv.metadata.windowClientId}createConnection(){return(0,o.createNetSocketConnection)()}};e.ElectronConnectionHelper=b,e.ElectronConnectionHelper=b=n.__decorate([(0,s.Injectable)({multiple:!0})],b)},18379:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ConnectionHelperFactory=g;const n=t(85608),s=t(38578),o=t(55267),f=t(44142),b=t(63977);n.__exportStar(t(55267),e),n.__exportStar(t(63977),e),n.__exportStar(t(22914),e),n.__exportStar(t(44142),e);function g(_){return E=>{const u=_.get(s.AppConfig);let h;switch(E){case f.ESupportRuntime.Electron:h=_.get(b.ElectronConnectionHelper);break;case f.ESupportRuntime.Web:h=_.get(o.WebConnectionHelper,[{connectionPath:u.connectionPath,connectionProtocols:u.connectionProtocols}]);break;default:throw new Error(`Unknown backend type: ${E}`)}return h}}},6858:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.RendererRuntime=e.EKnownResources=void 0;const n=t(85608),s=t(76003),o=t(11050),f=t(44142);var b;(function(_){_.OnigWasm="wasm:onig",_.TreeSitterWasmDirectory="wasm:tree-sitter"})(b||(e.EKnownResources=b={}));let g=class{mergeAppConfig(E){return E}async provideResourceUri(E){switch(E){case b.OnigWasm:return this.appConfig.onigWasmUri||f.onigWasmCDNUri;case b.TreeSitterWasmDirectory:return this.appConfig.treeSitterWasmDirectoryUri||f.treeSitterWasmCDNUri;default:throw new Error(`Unknown resource: ${E}`)}}};e.RendererRuntime=g,n.__decorate([(0,s.Autowired)(o.AppConfig),n.__metadata("design:type",Object)],g.prototype,"appConfig",void 0),e.RendererRuntime=g=n.__decorate([(0,s.Injectable)()],g)},37638:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AuthenticationContribution=void 0;const n=t(85608),s=t(76003),o=t(43718),f=t(66549);let b=class{onStart(){this.authenticationService.initialize()}registerCommands(_){_.registerCommand({id:o.noAccountsId,label:"%authentication.noAccounts%"},{execute:()=>{}})}};e.AuthenticationContribution=b,n.__decorate([(0,s.Autowired)(o.IAuthenticationService),n.__metadata("design:type",Object)],b.prototype,"authenticationService",void 0),e.AuthenticationContribution=b=n.__decorate([(0,o.Domain)(f.ClientAppContribution,o.CommandContribution)],b)},10605:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AuthenticationService=void 0;const n=t(85608),s=t(76003),o=t(43718),f=t(93899);let b=class extends o.Disposable{constructor(){super(...arguments),this._onDidRegisterAuthenticationProvider=this.registerDispose(new o.Emitter),this.onDidRegisterAuthenticationProvider=this._onDidRegisterAuthenticationProvider.event,this._onDidUnregisterAuthenticationProvider=this.registerDispose(new o.Emitter),this.onDidUnregisterAuthenticationProvider=this._onDidUnregisterAuthenticationProvider.event,this._onDidChangeSessions=this.registerDispose(new o.Emitter),this.onDidChangeSessions=this._onDidChangeSessions.event,this._authenticationProviders=new Map,this._signInRequestItems=new Map}async initialize(){this._storage=await this.getStorage(new o.URI("authentication").withScheme(o.STORAGE_SCHEMA.GLOBAL));const _=new Map;this.onDidChangeSessions(async E=>{if(E.event.added.length>0){const u=await this.getSessions(E.providerId);u.forEach(h=>{if(u.find(y=>_.get(y.id)))return;const c=new o.DisposableCollection,r=`account-sign-out-${E.providerId}-${h.id}`,l=this.commands.registerCommand({id:r,label:(0,o.formatLocalize)("authentication.signOut",E.label)},{execute:async()=>{await this.signOutOfAccount(E.providerId,h.account.label)}}),a=`manage-trusted-${E.providerId}-${h.id}`,d=this.commands.registerCommand({id:a,label:"%authentication.manageTrustedExtensions%"},{execute:async()=>{await this.manageTrustedExtensionsForAccount(E.providerId,h.account.label)}}),m=`${E.providerId}${h.account.label}`,p=this.menus.registerMenuItem(f.MenuId.AccountsContext,{submenu:m,label:`${h.account.label} (${E.label})`}),v=this.menus.registerMenuItems(m,[{command:a},{command:r}]);c.push(p),c.push(v),c.push(l),c.push(d),_.set(h.id,c)})}E.event.removed.length>0&&E.event.removed.forEach(u=>{const h=_.get(u.id);h&&(h.dispose(),_.delete(u.id))})})}get storage(){return this._storage}registerAuthenticationProvider(_,E){this._authenticationProviders.set(_,E),this._onDidRegisterAuthenticationProvider.fire({id:_,label:E.label}),this.updateAccountsMenuItem()}async sessionsUpdate(_,E){const u=this._authenticationProviders.get(_);u&&(this._onDidChangeSessions.fire({providerId:_,label:u.label,event:E}),await u.updateSessionItems(E),this.updateAccountsMenuItem(),E.added&&await this.updateNewSessionRequests(u))}async updateNewSessionRequests(_){const E=this._signInRequestItems.get(_.id);if(!E)return;const u=await _.getSessions();Object.keys(E).forEach(h=>{if(u.some(c=>c.scopes.slice().sort().join("")===h)){const c=E[h];c&&c.disposables.forEach(r=>r.dispose()),delete E[h],Object.keys(E).length===0?this._signInRequestItems.delete(_.id):this._signInRequestItems.set(_.id,E)}})}getTrustedKey(_,E){return`trusted-${_}-${E}`}async getAllowedExtensions(_,E){const u=this.getTrustedKey(_,E);let h=[];try{const c=await this.storage.get(u);c&&(h=JSON.parse(c))}catch(c){this.logger.warn("read allow extensions error: "+c)}return h}async setAllowedExtensions(_,E,u){const h=this.getTrustedKey(_,E);await this.storage.set(h,JSON.stringify(u))}async removeAllowedExtensions(_,E){const u=this.getTrustedKey(_,E);await this.storage.delete(u)}async updatedAllowedExtension(_,E,u,h,c){const r=await this.getAllowedExtensions(_,E),l=r.findIndex(a=>a.id===u);l===-1?r.push({id:u,name:h,allowed:c}):r[l].allowed=c,await this.setAllowedExtensions(_,E,r)}async isAccessAllowed(_,E,u){const c=(await this.getAllowedExtensions(_,E)).find(r=>r.id===u);return c?c.allowed!==void 0?c.allowed:!0:!1}async tryActivateProvider(_){await this.eventBus.fireAndAwait(new o.ExtensionActivateEvent({topic:"onView",data:_}));let E=this._authenticationProviders.get(_);if(E)return E;const u=new Promise((c,r)=>{this.onDidRegisterAuthenticationProvider(l=>{if(l.id===_)if(E=this._authenticationProviders.get(_),E)c(E);else throw new Error(`No authentication provider '${_}' is currently registered.`)})}),h=new Promise((c,r)=>{setTimeout(()=>{r(new Error(`didRegister ${_} timeout`))},5e3)});return Promise.race([u,h])}async getSessions(_){try{return await(this._authenticationProviders.get(_)||await this.tryActivateProvider(_)).getSessions()}catch{throw new Error(`No authentication provider '${_}' is currently registered.`)}}isAuthenticationProviderRegistered(_){return this._authenticationProviders.has(_)}getProviderIds(){const _=[];return this._authenticationProviders.forEach(E=>{_.push(E.id)}),_}unregisterAuthenticationProvider(_){const E=this._authenticationProviders.get(_);E&&(E.dispose(),this._authenticationProviders.delete(_),this._onDidUnregisterAuthenticationProvider.fire({id:_,label:E.label}),this.updateAccountsMenuItem())}updateAccountsMenuItem(){let _=!1;this._authenticationProviders.forEach(E=>{_=_||E.hasSessions()}),_&&this._noAccountsMenuItem&&(this._noAccountsMenuItem.dispose(),this._noAccountsMenuItem=void 0),!_&&!this._noAccountsMenuItem&&(this._noAccountsMenuItem=this.menus.registerMenuItem(f.MenuId.AccountsContext,{group:"0_accounts",command:o.noAccountsId}))}async requestNewSession(_,E,u,h){let c=this._authenticationProviders.get(_);if(c||await new Promise((r,l)=>{this.onDidRegisterAuthenticationProvider(a=>{a.id===_&&(c=this._authenticationProviders.get(_),r())})}),c){const r=this._signInRequestItems.get(_),l=E.sort().join("");if(r&&r[l]&&r[l].requestingExtensionIds.includes(u))return;const d=this.commands.registerCommand({id:`${u}signIn`,label:(0,o.formatLocalize)("authentication.signInRequests",h)},{execute:async()=>{const p=await this.login(_,E),v=p.account.label,y=await this.getAllowedExtensions(_,v);y.find(S=>S.id===u)||(y.push({id:u,name:h}),await this.setAllowedExtensions(_,v,y)),await this.setExtensionSessionId(h,_,p.id)}}),m=this.menus.registerMenuItem(f.MenuId.AccountsContext,{group:"2_signInRequests",command:`${u}signIn`});if(r){const p=r[l]||{disposables:[],requestingExtensionIds:[]};r[l]={disposables:[...p.disposables,m,d],requestingExtensionIds:[...p.requestingExtensionIds,u]},this._signInRequestItems.set(_,r)}else this._signInRequestItems.set(_,{[l]:{disposables:[m,d],requestingExtensionIds:[u]}})}}getLabel(_){const E=this._authenticationProviders.get(_);if(E)return E.label;throw new Error(`No authentication provider '${_}' has been declared.`)}supportsMultipleAccounts(_){const E=this._authenticationProviders.get(_);if(E)return E.supportsMultipleAccounts;throw new Error(`No authentication provider '${_}' is currently registered.`)}async login(_,E){try{return await(this._authenticationProviders.get(_)||await this.tryActivateProvider(_)).login(E)}catch(u){throw new Error(`No authentication provider '${_}' is currently registered, error messge: ${u.message}`)}}logout(_,E){const u=this._authenticationProviders.get(_);if(u)return u.logout(E);throw new Error(`No authentication provider '${_}' is currently registered.`)}manageTrustedExtensionsForAccount(_,E){const u=this._authenticationProviders.get(_);if(u)return u.manageTrustedExtensions(E);throw new Error(`No authentication provider '${_}' is currently registered.`)}signOutOfAccount(_,E){const u=this._authenticationProviders.get(_);if(u)return u.signOut(E);throw new Error(`No authentication provider '${_}' is currently registered.`)}getUsagesKey(_,E){return`usages-${_}-${E}`}async getAccountUsages(_,E){const u=this.getUsagesKey(_,E),h=await this.storage.get(u);let c=[];if(h)try{c=JSON.parse(h)}catch(r){this.logger.warn("parse account usages error: "+r)}return c}async addAccountUsage(_,E,u,h){const c=this.getUsagesKey(_,E),r=await this.getAccountUsages(_,E),l=r.findIndex(a=>a.extensionId===u);l>-1?r.splice(l,1,{extensionId:u,extensionName:h,lastUsed:Date.now()}):r.push({extensionId:u,extensionName:h,lastUsed:Date.now()}),await this.storage.set(c,JSON.stringify(r))}async removeAccountUsage(_,E){const u=this.getUsagesKey(_,E);await this.storage.delete(u)}getExtensionSessionIdKey(_,E){return`session-${_}-${E}`}async getExtensionSessionId(_,E){const u=this.getExtensionSessionIdKey(_,E);return await this.storage.get(u)}async setExtensionSessionId(_,E,u){const h=this.getExtensionSessionIdKey(_,E);await this.storage.set(h,u)}async removeExtensionSessionId(_,E){const u=this.getExtensionSessionIdKey(_,E);await this.storage.delete(u)}};e.AuthenticationService=b,n.__decorate([(0,s.Autowired)(o.ILogger),n.__metadata("design:type",Object)],b.prototype,"logger",void 0),n.__decorate([(0,s.Autowired)(o.StorageProvider),n.__metadata("design:type",Function)],b.prototype,"getStorage",void 0),n.__decorate([(0,s.Autowired)(o.IEventBus),n.__metadata("design:type",Object)],b.prototype,"eventBus",void 0),n.__decorate([(0,s.Autowired)(f.IMenuRegistry),n.__metadata("design:type",f.IMenuRegistry)],b.prototype,"menus",void 0),n.__decorate([(0,s.Autowired)(o.CommandRegistry),n.__metadata("design:type",Object)],b.prototype,"commands",void 0),e.AuthenticationService=b=n.__decorate([(0,s.Injectable)()],b)},72746:(x,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})},33916:(x,e,t)=>{"use strict";var n;n={value:!0},e.j=void 0,t(29810);const s=t(76003),o=t(43718),f=t(4588),b=t(37406),g=t(16884),_=t(18379),E=t(41320),u=t(59574),h=t(6858),c=t(36206),r=t(66963),l=t(18193),a=t(41118),d=t(1149),m=t(11949),p=t(64102),v=t(78132),y=t(11050),S=t(67304),A=t(79951),T=t(79248),D=t(96302),w=t(71843);t(99696);class I{constructor(M){var O,P,L;this.opts=M,this.appInitialized=new o.Deferred,this.browserModules=[],this._disposables=new o.DisposableCollection,this._inComposition=!1,this._handleBeforeUpload=$=>{if(this.config.isElectronRenderer){if(this.stateService.state==="electron_confirmed_close")return;$.returnValue="",$.preventDefault(),this.stateService.state!=="electron_asking_close"&&(this.stateService.state="electron_asking_close",this.preventStopElectron().then(Y=>{if(Y)this.stateService.state="ready";else return this.stopContributionsElectron().then(()=>{this.stateService.state="electron_confirmed_close";const Q=this.injector.get(b.IElectronMainLifeCycleService);setTimeout(()=>{Q.closeWindow(A.electronEnv.currentWindowId)},0)})}))}else if(this.preventStop())return($||window.event).returnValue=!0,!0},this._handleUnload=()=>{this.stateService.state="closing_window",this.config.isElectronRenderer||(this.disposeSideEffect(),this.stopContributions())},this._handleResize=()=>{},this._handleKeydown=$=>{$&&$.target.name!==a.NO_KEYBINDING_NAME&&!this._inComposition&&this.keybindingService.run($)},this._handleKeyup=$=>{this.keybindingService.resolveModifierKey($)},this._handleCompositionstart=()=>{this._inComposition=!0},this._handleCompositionend=()=>{this._inComposition=!1},this._handleWheel=()=>{};const{modules:N,contributions:k,iconStyleSheets:B,useCdnIcon:F,editorBackgroundImage:W,defaultPreferences:V,allowSetDocumentTitleFollowWorkspaceDir:H=!0,...G}=M;this.initEarlyPreference(M.workspaceDir||"");const K=(0,v.getPreferenceLanguageId)(V);(0,o.setLanguageId)(K),this.injector=M.injector||new s.Injector,this.modules=N,this.modules.forEach($=>this.resolveModuleDeps($)),this.browserModules=M.modulesInstances||[];const z=(O=M.isElectronRenderer)!==null&&O!==void 0?O:this.detectRuntime()===_.ESupportRuntime.Electron;this.config={appName:f.DEFAULT_APPLICATION_NAME,appHost:z?f.DEFAULT_APPLICATION_DESKTOP_HOST:f.DEFAULT_APPLICATION_WEB_HOST,appRoot:M.appRoot||"",uriScheme:f.DEFAULT_URI_SCHEME,...G,isElectronRenderer:z,workspaceDir:M.workspaceDir||"",extensionDir:M.extensionDir||"",injector:this.injector,wsPath:M.wsPath||`ws://${window.location.hostname}:8000`,layoutConfig:M.layoutConfig,editorBackgroundImage:M.editorBackgroundImage||W,allowSetDocumentTitleFollowWorkspaceDir:H,devtools:(P=M.devtools)!==null&&P!==void 0?P:!1,rpcMessageTimeout:M.rpcMessageTimeout||-1},this.config.connectionPath=M.connectionPath||`${this.config.wsPath}/service`;const j=this.injector.get(d.LayoutViewSizeConfig);j.init(M.layoutViewSize),this.config.layoutViewSize=j,this.injector.get(d.DesignLayoutConfig).setLayout(M.designLayout,(L=M.AINativeConfig)===null||L===void 0?void 0:L.layout),this.injector.addProviders({token:c.IClientApp,useValue:this}),this.injector.addProviders({token:y.AppConfig,useValue:this.config}),this.runtime=z?this.injector.get(u.ElectronRendererRuntime):this.injector.get(E.BrowserRuntime),this.injector.addProviders({token:h.RendererRuntime,useValue:this.runtime}),this.config.devtools&&(window.__OPENSUMI_DEVTOOLS_GLOBAL_HOOK__={}),M.extensionDevelopmentPath&&(this.config.extensionCandidate=(this.config.extensionCandidate||[]).concat(Array.isArray(M.extensionDevelopmentPath)?M.extensionDevelopmentPath.map($=>(0,o.asExtensionCandidate)($,!0)):[(0,o.asExtensionCandidate)(M.extensionDevelopmentPath,!0)]),this.config.extensionDevelopmentHost=!0),this.config=this.runtime.mergeAppConfig(this.config),k&&this.injector.addProviders(...k),this.initBaseProvider(),this.initFields(),this.appendIconStyleSheets(B,F),this.createBrowserModules(V)}resolveModuleDeps(M){const O=Reflect.getMetadata("dependencies",M);O&&O.forEach(P=>{this.modules.indexOf(P)===-1&&this.modules.push(P)})}get lifeCycleService(){return this.injector.get(o.AppLifeCycleServiceToken)}async start(M,O,P){const N=this.injector.get(o.IReporterService).time(o.REPORT_NAME.MEASURE);this.lifeCycleService.phase=1,P?(console.error("You're using deprecated method 'start()' with connection parameter"),console.error("We introduced a new connection service to replace the old one"),(0,D.bindConnectionServiceDeprecated)(this.injector,this.modules,P)):O&&await this.createConnection(O),N.timeEnd("ClientApp.createConnection"),this.logger=this.injector.get(o.ILogger),this.stateService.state="client_connected",this.registerEventListeners(),await this.injector.get(o.IApplicationService).initializeData(),await this.measure("Contributions.start",()=>this.startContributions(M)),this.stateService.state="started_contributions",this.stateService.state="ready",this.lifeCycleService.phase=4,N.timeEnd("Framework.ready")}async createConnection(M){(await this.injector.get(_.ConnectionHelperFactory)(M).createRPCServiceChannel(this.modules)).onReopen(()=>{this.onReconnectContributions()})}onReconnectContributions(){const M=this.contributions;for(const O of M)O.onReconnect&&O.onReconnect(this)}initBaseProvider(){(0,w.injectInnerProviders)(this.injector),this.runtime.registerRuntimeInnerProviders(this.injector)}initFields(){this.contributionsProvider=this.injector.get(r.ClientAppContribution),this.commandRegistry=this.injector.get(o.CommandRegistry),this.keybindingRegistry=this.injector.get(a.KeybindingRegistry),this.keybindingService=this.injector.get(a.KeybindingService),this.stateService=this.injector.get(g.ClientAppStateService),this.nextMenuRegistry=this.injector.get(p.IMenuRegistry)}createBrowserModules(M){const O=this.injector;for(const P of this.modules){const L=O.get(P);this.browserModules.push(L),L.providers&&this.injector.addProviders(...L.providers),this.runtime.registerRuntimeModuleProviders(this.injector,L),L.preferences&&L.preferences(this.injector)}(0,l.injectCorePreferences)(this.injector),this.injectPreferenceService(this.injector,M),this.injectStorageProvider(this.injector);for(const P of this.browserModules)if(P.contributionProvider)if(Array.isArray(P.contributionProvider))for(const L of P.contributionProvider)(0,o.createContributionProvider)(this.injector,L);else(0,o.createContributionProvider)(this.injector,P.contributionProvider)}get contributions(){return this.contributionsProvider.getContributions()}async startContributions(M){await this.measure("RenderApp.render",()=>this.renderApp(M)),this.lifeCycleService.phase=2,await this.measure("Contributions.initialize",()=>this.initializeContributions()),await this.initializeCoreRegistry(),this.stateService.state="core_module_initialized",this.lifeCycleService.phase=3,await this.measure("Contributions.onStart",()=>this.onStartContributions()),await this.runContributionsPhase(this.contributions,"onDidStart")}async initializeCoreRegistry(){this.commandRegistry.initialize(),await this.keybindingRegistry.initialize(),this.nextMenuRegistry.initialize()}async initializeContributions(){await this.runContributionsPhase(this.contributions,"initialize"),this.appInitialized.resolve(),this.logger.verbose("contributions.initialize done")}async onStartContributions(){await this.runContributionsPhase(this.contributions,"onStart")}async runContributionsPhase(M,O){return await Promise.all(M.map(P=>this.contributionPhaseRunner(P,O)))}async contributionPhaseRunner(M,O){const P=M[O];if(typeof P=="function")try{const L=M.constructor.name+"."+O;return await this.measure(L,()=>P.call(M,this))}catch(L){this.logger.error(`Could not run contribution#${O}`,L)}}async renderApp(M){await(0,T.renderClientApp)(this,M),this.injector.get(o.IEventBus).fire(new m.RenderedEvent)}async measure(M,O){const L=this.injector.get(o.IReporterService).time(o.REPORT_NAME.MEASURE),N=await O();return L.timeEnd(M),N}preventStop(){const O=this.injector.get(l.CorePreferences)["application.confirmExit"];if(O==="never")return!1;for(const P of this.contributions)if(P.onWillStop)try{if(P.onWillStop(this))return!0}catch(L){(0,o.getDebugLogger)().error(L)}return O==="always"}async preventStopElectron(){if(this.injector.get(l.CorePreferences)["application.confirmExit"]==="never")return!1;for(const P of this.contributions)if(P.onWillStop)try{if(await P.onWillStop(this))return!0}catch(L){(0,o.getDebugLogger)().error(L)}return!1}stopContributions(){for(const M of this.contributions)if(M.onStop)try{M.onStop(this)}catch(O){this.logger.error("Could not stop contribution",O)}}async stopContributionsElectron(){const M=[];for(const O of this.contributions)O.onStop&&M.push((async()=>{try{await O.onStop(this)}catch(P){this.logger.error("Could not stop contribution",P)}})());await Promise.all(M)}registerEventListeners(){window.addEventListener("beforeunload",this._handleBeforeUpload),window.addEventListener("unload",this._handleUnload),window.addEventListener("resize",this._handleResize),window.addEventListener("compositionstart",this._handleCompositionstart),window.addEventListener("compositionend",this._handleCompositionend),window.addEventListener("keydown",this._handleKeydown,!0),window.addEventListener("keyup",this._handleKeyup,!0),o.isOSX&&document.body.addEventListener("wheel",this._handleWheel,{passive:!1})}injectPreferenceService(M,O){const P=()=>L=>{const N=M.get(v.PreferenceProvider,{tag:L});return N.asScope(L),N};if((0,v.injectPreferenceConfigurations)(M),(0,v.injectPreferenceSchemaProvider)(M),M.addProviders({token:v.PreferenceProviderProvider,useFactory:P},{token:v.PreferenceService,useClass:v.PreferenceServiceImpl}),O){const N=M.get(v.PreferenceProviderProvider)(v.PreferenceScope.Default);for(const k of Object.keys(O))N.setPreference(k,O[k])}}injectStorageProvider(M){M.addProviders({token:o.DefaultStorageProvider,useClass:o.DefaultStorageProvider}),M.addProviders({token:o.StorageProvider,useFactory:O=>P=>O.get(o.DefaultStorageProvider).get(P)}),(0,o.createContributionProvider)(M,o.StorageResolverContribution)}fireOnReload(M=!1){window.location.reload(M)}appendIconStyleSheets(M,O){const P=O?[S.DEFAULT_CDN_ICON,S.IDE_OCTICONS_CN_CSS,S.IDE_CODICONS_CN_CSS]:[];M&&M.length&&M.forEach(L=>{this.updateIconMap(L.prefix,L.iconMap),P.push(L.cssPath)});for(const L of P){const N=document.createElement("link");N.setAttribute("rel","stylesheet"),N.setAttribute("href",L),document.getElementsByTagName("head")[0].appendChild(N)}}updateIconMap(M,O){M==="kaitian-icon kticon-"&&this.logger.error(`The icon prefix '${M}' conflicts with the built-in icon, please check the icon configuration.`),(0,S.updateIconMap)(M,O)}initEarlyPreference(M){this._disposables.push((0,v.registerLocalStorageProvider)(o.GeneralSettingsId.Theme,M)),this._disposables.push((0,v.registerLocalStorageProvider)(o.GeneralSettingsId.Icon,M)),this._disposables.push((0,v.registerLocalStorageProvider)(o.GeneralSettingsId.Language,M))}async dispose(){window.removeEventListener("beforeunload",this._handleBeforeUpload),window.removeEventListener("unload",this._handleUnload),window.removeEventListener("resize",this._handleResize),window.removeEventListener("compositionstart",this._handleCompositionstart),window.removeEventListener("compositionend",this._handleCompositionend),window.removeEventListener("keydown",this._handleKeydown,!0),o.isOSX&&document.body.removeEventListener("wheel",this._handleWheel),this._disposables.dispose(),this.disposeSideEffect()}disposeSideEffect(){for(const M of this.contributions)if(M.onDisposeSideEffects)try{M.onDisposeSideEffects(this)}catch(O){this.logger.error("Could not dispose contribution",O)}}detectRuntime(){return window.isElectronRenderer||typeof navigator=="object"&&typeof navigator.userAgent=="string"&&navigator.userAgent.indexOf("Electron")>=0?_.ESupportRuntime.Electron:_.ESupportRuntime.Web}}e.j=I},79248:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.App=l,e.renderClientApp=m;const n=t(85608),s=n.__importDefault(t(14041)),o=n.__importDefault(t(25873)),f=t(97267),b=t(43718),g=t(28003),_=t(68456),E=t(11050),u=t(52564),h=t(26542),c=t(67304),r=t(75206);function l(p){const v=p.app.injector,y=v.get(b.IEventBus),S=v.get(h.LabelService),A=s.default.useCallback((T,D)=>S.getIcon(b.URI.parse(T),D),[]);return s.default.useEffect(()=>{let T;const D=()=>{T&&window.cancelAnimationFrame(T),T=window.requestAnimationFrame(()=>{T=null,u.allSlot.forEach(w=>{y.fire(new _.ResizeEvent({slotLocation:w.slot})),y.fireDirective(_.ResizeEvent.createDirective(w.slot))})})};return window.addEventListener("resize",D),()=>{window.removeEventListener("resize",D)}},[]),s.default.createElement(f.ComponentContextProvider,{value:{getIcon:c.getIcon,localize:b.localize,getResourceIcon:A}},s.default.createElement(E.ConfigProvider,{value:p.app.config},s.default.createElement(p.main,{callback:p.callback}),p.overlays&&p.overlays.map((T,D)=>s.default.createElement(T,{key:D}))))}const a=p=>v=>{o.default.createRoot(p).render(s.default.createElement(v,null))},d=(0,b.getDebugLogger)();function m(p,v){let y=p.config.layoutComponent||g.DefaultLayout;const S=p.browserModules.filter(R=>R.isOverlay).map(R=>R.component?R.component:(d.warn("Overlay module does not have component",R),null)).filter(Boolean),A=p.injector;A.get(r.ClientAppContextContribution).getContributions().forEach(R=>y=R.registerClientAppContext(y,A));const w=R=>s.default.createElement(l,{...R,app:p,main:y,overlays:S});return(typeof v=="function"?v:a(v))(w)}},96302:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.createConnectionService=_,e.bindConnectionServiceDeprecated=E;const n=t(8919),s=t(18740),o=t(76271),f=t(43718),b=t(16884),g=t(11050);async function _(h,c,r,l={}){var a;const d=h.get(g.AppConfig),m=h.get(f.IReporterService);r.setReporter(m);const p=h.get(f.IEventBus),v=h.get(b.ClientAppStateService),y=()=>{v.reachedState("core_module_initialized").then(()=>{p.fire(new f.BrowserConnectionOpenEvent)})};r.connection.isOpen()&&y(),r.connection.onOpen(()=>{y()}),r.connection.onClose(()=>{v.reachedState("core_module_initialized").then(()=>{p.fire(new f.BrowserConnectionCloseEvent)})}),r.connection.onError(D=>{v.reachedState("core_module_initialized").then(()=>{p.fire(new f.BrowserConnectionErrorEvent(D))})}),await r.initHandler(),h.addProviders({token:s.WSChannelHandler,useValue:r});const S=await r.openChannel(o.RPCServiceChannelPath),A=new n.RPCServiceCenter;return A.setSumiConnection(S.createSumiConnection(l)),!((a=d?.measure)===null||a===void 0)&&a.connection&&A.setReporter(m,d.measure.connection.minimumReportThresholdTime),u(h,c,A),h.get(f.ILogger).reportToServer(),S}function E(h,c,r){const l=new n.RPCServiceCenter,a=l.setConnection(r),d=r.onClose(()=>{a.dispose(),d.dispose()});u(h,c,l)}function u(h,c,r){const{getRPCService:l}=(0,n.initRPCService)(r),a=[],d=[];for(const m of c){const p=h.get(m);if(p.backServices)for(const v of p.backServices)a.push(v),v.protocol&&r.loadProtocol(v.protocol)}for(const m of a){const{servicePath:p}=m,v=l(p),y={token:p,useValue:v};h.addProviders(y),m.clientToken&&d.push(m)}for(const m of d){const{servicePath:p}=m,v=l(p);if(m.clientToken){const y=h.get(m.clientToken);v.onRequestService(y)}}}},75206:(x,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ClientAppContextContribution=void 0,e.ClientAppContextContribution=Symbol("ClientAppContextContribution")},32796:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});const n=t(85608);n.__exportStar(t(72746),e),n.__exportStar(t(79248),e),n.__exportStar(t(96302),e),n.__exportStar(t(75206),e)},71843:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.injectInnerProviders=z;const n=t(43718),s=t(96405),o=t(16872),f=t(41480),b=t(12956),g=t(59555),_=t(18379),E=t(10605),u=t(66963),h=t(71707),c=t(80832),r=t(23396),l=t(77273),a=t(41118),d=t(37015),m=t(68456),p=t(75694),v=t(93899),y=t(77666),S=t(90697),A=t(73967),T=t(78132),D=t(68969),w=t(11719),I=t(52564),R=t(26542),M=t(52993),O=t(10845),P=t(40827),L=t(32242),N=t(99e3),k=t(42637),B=t(62652),F=t(27957),W=t(45670),V=t(66894),H=t(63921),G=t(75206),K=t(82493);function z(j){(0,n.createContributionProvider)(j,u.ClientAppContribution),(0,n.createContributionProvider)(j,n.CommandContribution),(0,n.createContributionProvider)(j,l.FsProviderContribution),(0,n.createContributionProvider)(j,a.KeybindingContribution),(0,n.createContributionProvider)(j,v.MenuContribution),(0,n.createContributionProvider)(j,m.ComponentContribution),(0,n.createContributionProvider)(j,I.SlotRendererContribution),(0,n.createContributionProvider)(j,T.PreferenceContribution),(0,n.createContributionProvider)(j,W.VariableContribution),(0,n.createContributionProvider)(j,m.TabBarToolbarContribution),(0,n.createContributionProvider)(j,k.ToolBarActionContribution),(0,n.createContributionProvider)(j,L.StaticResourceContribution),(0,n.createContributionProvider)(j,G.ClientAppContextContribution);const U=[{token:n.IEventBus,useClass:n.EventBusImpl},{token:n.CommandService,useClass:n.CommandServiceImpl},{token:n.CommandRegistry,useClass:n.CommandRegistryImpl},{token:a.KeybindingRegistry,useClass:a.KeybindingRegistryImpl},{token:a.KeybindingService,useFactory:$=>$.get(a.KeybindingRegistry)},{token:o.KeyboardNativeLayoutService,useClass:d.BrowserKeyboardLayoutImpl},{token:o.KeyboardLayoutChangeNotifierService,useFactory:$=>$.get(o.KeyboardNativeLayoutService)},{token:d.KeyValidator,useFactory:$=>$.get(o.KeyboardNativeLayoutService)},b.ClientAppStateService,{token:p.ILogger,useClass:p.Logger},{token:p.Logger,useAlias:p.ILogger},{token:m.ComponentRegistry,useClass:m.ComponentRegistryImpl},{token:W.VariableRegistry,useClass:W.VariableRegistryImpl},{token:v.AbstractMenuService,useClass:v.MenuServiceImpl},{token:v.AbstractContextMenuService,useClass:v.ContextMenuServiceImpl},{token:v.IMenuRegistry,useClass:v.MenuRegistryImpl},{token:y.IToolbarActionService,useClass:y.ToolbarActionService},{token:v.AbstractMenubarService,useClass:v.MenubarServiceImpl},{token:n.IReporter,useClass:n.DefaultReporter},{token:n.IReporterService,useClass:n.ReporterService},{token:n.ReporterMetadata,useValue:{host:n.REPORT_HOST.BROWSER}},{token:D.IProgressService,useClass:w.ProgressService},{token:k.IToolbarRegistry,useClass:F.NextToolbarRegistryImpl},{token:k.IToolbarPopoverRegistry,useClass:B.ToolbarPopoverRegistry},F.ToolbarClientAppContribution,{token:n.IProblemPatternRegistry,useClass:n.ProblemPatternRegistryImpl},{token:n.IProblemMatcherRegistry,useClass:n.ProblemMatchersRegistryImpl},{token:n.ITaskDefinitionRegistry,useClass:n.TaskDefinitionRegistryImpl},{token:S.IOpenerService,useClass:A.OpenerService},{token:V.IWindowService,useClass:H.WindowService},{token:n.IApplicationService,useClass:g.ApplicationService},{token:M.IClipboardService,useClass:M.BrowserClipboardService},{token:O.IExternalUriService,useClass:O.ExternalUriService},{token:n.IAuthenticationService,useClass:E.AuthenticationService},{token:R.ICryptoService,useClass:R.CryptoService},{token:R.ICredentialsService,useClass:R.CredentialsService},{token:s.IHashCalculateService,useClass:s.HashCalculateServiceImpl},{token:n.IExtensionsSchemaService,useClass:r.ExtensionsPointServiceImpl},{token:n.AppLifeCycleServiceToken,useClass:K.AppLifeCycleService},{token:L.StaticResourceService,useClass:N.StaticResourceServiceImpl},P.StaticResourceClientAppContribution,{token:h.ISplitPanelService,useClass:h.SplitPanelService},{token:n.IAIReporter,useClass:f.AIReporter},{token:c.IDesignStyleService,useClass:c.DesignStyleService},{token:_.ConnectionHelperFactory,useFactory:_.ConnectionHelperFactory}];j.addProviders(...U)}},82493:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AppLifeCycleService=void 0;const n=t(85608),s=t(76003),o=t(43718);let f=class{constructor(){this.onDidChangeLifecyclePhaseEmitter=new o.Emitter,this.onDidLifeCyclePhaseChange=this.onDidChangeLifecyclePhaseEmitter.event}set phase(g){this.lifeCyclePhase=g,this.onDidChangeLifecyclePhaseEmitter.fire(this.lifeCyclePhase)}get phase(){return this.lifeCyclePhase}};e.AppLifeCycleService=f,e.AppLifeCycleService=f=n.__decorate([(0,s.Injectable)()],f)},99696:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});const s=t(85608).__importDefault(t(99126));typeof window.ResizeObserver>"u"&&(window.ResizeObserver=s.default)},36206:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BrowserModule=e.IClientApp=void 0;const n=t(85608),s=t(76003),o=t(43718);e.IClientApp=Symbol("CLIENT_APP_TOKEN");class f extends o.BasicModule{}e.BrowserModule=f,n.__decorate([(0,s.Autowired)(e.IClientApp),n.__metadata("design:type",Object)],f.prototype,"app",void 0)},14109:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MERGE_CONFLICT_COMMANDS=e.SCM_COMMANDS=e.QUICK_OPEN_COMMANDS=e.MARKER_COMMANDS=e.LAYOUT_COMMANDS=e.TERMINAL_COMMANDS=e.DIALOG_COMMANDS=e.KEYBOARD_COMMANDS=e.WORKSPACE_COMMANDS=e.OUTLINE_COMMANDS=e.SEARCH_COMMANDS=e.DIFF_EDITOR_COMMANDS=e.EDITOR_COMMANDS=e.COMMON_COMMANDS=e.OPEN_EDITORS_COMMANDS=e.FILE_COMMANDS=void 0;const n=t(67304);var s;(function(v){const y="file";v.NEW_FILE={id:"file.new",category:y,iconClass:(0,n.getIcon)("new-file")},v.RENAME_FILE={id:"file.rename",category:y},v.DELETE_FILE={id:"file.delete",category:y},v.NEW_FOLDER={id:"file.folder.new",category:y,iconClass:(0,n.getIcon)("new-folder")},v.COMPARE_SELECTED={id:"file.compare",category:y},v.OPEN_FILE={id:"file.open",category:y},v.SAVE_FILE={id:"file.save",category:y},v.COLLAPSE_ALL={id:"filetree.collapse.all",category:y,iconClass:(0,n.getIcon)("collapse-all")},v.REFRESH_ALL={id:"filetree.refresh.all",category:y,iconClass:(0,n.getIcon)("refresh")},v.OPEN_RESOURCES={id:"filetree.open.file",category:y},v.OPEN_TO_THE_SIDE={id:"filetree.open.side",category:y},v.OPEN_TYPE_WITH={id:"filetree.open.with",category:y},v.COPY_PATH={id:"filetree.copy.path",category:y,label:"%file.copy.path%"},v.COPY_RELATIVE_PATH={id:"filetree.copy.relativepath",category:y},v.COPY_FILE={id:"filetree.copy.file",category:y},v.CUT_FILE={id:"filetree.cut.file",category:y},v.PASTE_FILE={id:"filetree.paste.file",category:y},v.SELECT_CURRENT_NODE={id:"filetree.selectCurrentNode",category:y},v.LOCATION={id:"filetree.location",category:y},v.LOCATION_WITH_EDITOR={id:"filetree.location_with_editor",category:y,iconClass:(0,n.getIcon)("focus")},v.OPEN_FOLDER={id:"filetree.open.folder",category:y,label:"%file.open.folder%"},v.VSCODE_OPEN_FOLDER={id:"filetree.open.vscode_open_folder",category:y},v.OPEN_WORKSPACE={id:"filetree.open.workspace",category:y,label:"%file.open.workspace%"},v.SEARCH_ON_FOLDER={id:"filetree.search.folder",category:y},v.FOCUS_FILES={id:"filetree.focus.files",category:y,label:"%file.focus.files%"},v.FILTER_TOGGLE={id:"filetree.files.filter_toggle",category:y,iconClass:(0,n.getIcon)("retrieval")},v.FILTER_OPEN={id:"filetree.files.filter_open",category:y},v.OPEN_TERMINAL_WITH_PATH={id:"filetree.openTerminalWithPath",category:y},v.FILTER_CLOSE={id:"filetree.quitFilterMode",category:y},v.NEXT={id:"filetree.next",category:y},v.PREV={id:"filetree.prev",category:y},v.COLLAPSE={id:"filetree.collapse",category:y},v.EXPAND={id:"filetree.expand",category:y},v.REVEAL_IN_EXPLORER={id:"filetree.revealInExplorer",category:y},v.TOGGLE_OR_OPEN={id:"filetree.toggleOrOpen",category:y}})(s||(e.FILE_COMMANDS=s={}));var o;(function(v){const y="openeditors";v.SAVE_ALL={id:"opened.editors.save.all",category:y,iconClass:(0,n.getIcon)("save-all")},v.CLOSE_ALL={id:"opened.editors.close.all",category:y,iconClass:(0,n.getIcon)("close-all")},v.SAVE_BY_GROUP={id:"opened.editors.save.byGroup"},v.CLOSE_BY_GROUP={id:"opened.editors.close.byGroup"},v.OPEN={id:"opened.editors.open",category:y},v.CLOSE={id:"opened.editors.close",category:y},v.OPEN_TO_THE_SIDE={id:"opened.editors.openToTheSide",category:y},v.COMPARE_SELECTED={id:"opened.editors.compare",category:y},v.COPY_RELATIVE_PATH={id:"opened.editors.copyRelativePath",category:y},v.COPY_PATH={id:"opened.editors.copyPath",category:y},v.LOCATION={id:"opened.editors.location",category:y}})(o||(e.OPEN_EDITORS_COMMANDS=o={}));var f;(function(v){v.FIND={id:"core.find",label:"%common.find%"},v.REPLACE={id:"core.replace",label:"%common.replace%"},v.ABOUT_COMMAND={id:"core.about",label:"%common.about%"},v.OPEN_PREFERENCES={id:"core.openpreference",label:"%common.preference.open%"},v.LOCATE_PREFERENCES={id:"workbench.preferences.locate"},v.OPEN_KEYMAPS={id:"core.keymaps.open",label:"%common.keymaps.open%"},v.OPEN_LAUNCH_CONFIGURATION={id:"core.launchConfiguration.open",label:"%debug.action.open.configuration%"},v.ENVIRONMENT_VARIABLE={id:"core.environment.variable"}})(f||(e.COMMON_COMMANDS=f={}));var b;(function(v){const y="editor";v.API_OPEN_EDITOR_COMMAND_ID="_workbench.open",v.API_OPEN_DIFF_EDITOR_COMMAND_ID="_workbench.diff",v.API_OPEN_WITH_EDITOR_COMMAND_ID="_workbench.openWith",v.NEW_UNTITLED_FILE={id:"file.new.untitled",category:y,label:"%file.new%",iconClass:(0,n.getIcon)("new-file")},v.UNDO={id:"editor.undo",category:y,label:"%editor.undo%"},v.REDO={id:"editor.redo",category:y,label:"%editor.redo%"},v.SELECT_ALL={id:"editor.selectAll",category:y,label:"%selection.all%"},v.OPEN_RESOURCE={id:"editor.openUri",category:y},v.OPEN_RESOURCES={id:"editor.openUris",category:y},v.SAVE_URI={id:"editor.saveUri",category:y},v.SAVE_CURRENT={id:"editor.saveCurrent",category:y,label:"%editor.saveCurrent%"},v.FOCUS_IF_NOT_ACTIVATE_ELEMENT={id:"editor.focusIfNotActivateElement",category:y,label:"%editor.saveCurrent%"},v.COMPARE={id:"editor.compare",category:y},v.OPEN_MERGEEDITOR={id:"editor.open.mergeEditor",category:y},v.OPEN_MERGEEDITOR_DEV={id:"editor.open.mergeEditor.dev",category:"Merge Editor (Dev)",label:"Open Merge Editor State from Json"},v.MERGEEDITOR_RESET={id:"editor.mergeEditor.reset",category:y,label:"%mergeEditor.reset%"},v.CLOSE={id:"editor.close",category:y,label:"%editor.closeCurrent%"},v.CLOSE_ALL_IN_GROUP={id:"editor.closeAllInGroup",category:y,label:"%editor.closeAllInGroup%"},v.CLOSE_OTHER_IN_GROUP={id:"editor.closeOtherEditorsInGroup",category:y,label:"%editor.closeOtherEditors%"},v.CLOSE_ALL={id:"editor.closeAll",category:y,label:"%editor.close.all%"},v.CLOSE_SAVED={id:"editor.closeSaved",category:y,label:"%editor.closeSaved%"},v.SAVE_ALL={id:"editor.saveAll",category:y,label:"%editor.saveAll%"},v.CLOSE_TO_RIGHT={id:"editor.closeToRight",category:y,label:"%editor.closeToRight%"},v.GET_CURRENT={id:"editor.getCurrent",category:y},v.GET_CURRENT_RESOURCE={id:"editor.getCurrentResource",category:y},v.SPLIT_TO_LEFT={id:"editor.splitToLeft",category:y,label:"%editor.splitToLeft%"},v.SPLIT_TO_RIGHT={id:"editor.splitToRight",category:y,label:"%editor.splitToRight%",iconClass:(0,n.getIcon)("embed")},v.SPLIT_TO_TOP={id:"editor.splitToTop",category:y,label:"%editor.splitToTop%"},v.SPLIT_TO_BOTTOM={id:"editor.splitToBottom",category:y,label:"%editor.splitToBottom%"},v.CHANGE_LANGUAGE={id:"editor.changeLanguage",category:y},v.CHANGE_ENCODING={id:"editor.changeEncoding",category:y},v.GET_ENCODING={id:"editor.getEncoding",category:y},v.CHANGE_EOL={id:"editor.changeEol",category:y},v.NAVIGATE_LEFT={id:"editor.navigateLeft",category:y},v.NAVIGATE_RIGHT={id:"editor.navigateRight",category:y},v.NAVIGATE_UP={id:"editor.navigateUp",category:y},v.NAVIGATE_DOWN={id:"editor.navigateDown",category:y},v.NAVIGATE_NEXT={id:"editor.navigateNext",category:y},v.NAVIGATE_PREVIOUS={id:"editor.navigatePrevious",category:y},v.PREVIOUS={id:"editor.previous",category:y},v.NEXT={id:"editor.next",category:y},v.PREVIOUS_IN_GROUP={id:"editor.previousInGroup",category:y},v.NEXT_IN_GROUP={id:"editor.nextInGroup",category:y},v.LAST_IN_GROUP={id:"editor.lastInGroup",category:y},v.CLOSE_OTHER_GROUPS={id:"editor.closeOtherGroup",category:y,label:"%editor.closeEditorsInOtherGroups%"},v.OPEN_EDITOR_AT_INDEX={id:"editor.openEditorAtIndex",category:y},v.EVEN_EDITOR_GROUPS={id:"editor.evenEditorGroups",category:y,label:"%editor.resetEditorGroups%"},v.REVERT_DOCUMENT={id:"editor.document.revert",category:y,label:"%editor.revert%"},v.REVERT_AND_CLOSE={id:"editor.revertAndClose",category:y},v.GO_FORWARD={id:"editor.goForward",category:y},v.GO_BACK={id:"editor.goBack",category:y},v.PIN_CURRENT={id:"editor.pinCurrent",category:y},v.COPY_CURRENT_PATH={id:"editor.copyCurrentPath",category:y},v.GO_TO_GROUP={id:"editor.goToGroup",category:y},v.MOVE_GROUP={id:"editor.moveGroup",category:y},v.REOPEN_CLOSED={id:"editor.reopenClosed",category:y},v.FOCUS={id:"editor.focus",category:y},v.TEST_TOKENIZE={id:"editor.tokenize.test",category:y,label:"%editor.tokenize.test%"},v.AUTO_SAVE={id:"editor.autoSave",category:y},v.FOCUS_ACTIVE_EDITOR_GROUP={id:"editor.focusActiveEditorGroup",category:y},v.COMPONENT_UNDO={id:"editor.componentUndo",category:y},v.COMPONENT_REDO={id:"editor.componentRedo"},v.SEARCH_WORKSPACE_SYMBOL={id:"editor.workspaceSymbol.quickopen",label:"%editor.workspaceSymbol.quickopen%",category:y},v.SEARCH_WORKSPACE_SYMBOL_CLASS={id:"editor.workspaceSymbolClass.quickopen",label:"%editor.workspaceSymbolClass.quickopen%",category:y},v.GO_TO_LINE={id:"editor.action.gotoLine",label:"%editor.goToLine%",category:y},v.QUICK_OPEN={id:"workbench.action.quickOpen",category:y,label:"%editor.quickOpen%"},v.TOGGLE_WORD_WRAP={id:"editor.toggleWordWrap",label:"%editor.toggleWordWrap%",category:y},v.FORMAT_DOCUMENT={id:"editor.action.formatDocument",category:y},v.FORMAT_SELECTION={id:"editor.action.formatSelection",category:y},v.FORMAT_DOCUMENT_WITH={id:"editor.action.formatDocument.multiple",category:y,label:"%editor.formatDocument.label.multiple%"},v.FORMAT_SELECTION_WITH={id:"editor.action.formatSelection.multiple",category:y,label:"%editor.formatSelection.label.multiple%"},v.COPY_PATH={id:"editor.action.copyPath",category:y,label:"%editor.copyPath%"},v.COPY_RELATIVE_PATH={id:"editor.action.copyRelativePath",category:y,label:"%editor.copyRelativePath%"}})(b||(e.EDITOR_COMMANDS=b={}));var g;(function(v){const y="diff-editor";v.REVERT={id:"editor.diff.revert",category:y},v.ACCEPT={id:"editor.diff.accept",category:y},v.TOGGLE_COLLAPSE_UNCHANGED_REGIONS={id:"editor.diff.toggleCollapseUnchangedRegions",category:y}})(g||(e.DIFF_EDITOR_COMMANDS=g={}));var _;(function(v){const y="search";v.OPEN_SEARCH={id:"content-search.openSearch",category:y,label:"Open search sidebar"},v.REFRESH={id:"file-search.refresh",label:"refresh search",iconClass:(0,n.getIcon)("refresh"),category:y},v.CLEAN={id:"file-search.clean",label:"clean search",iconClass:(0,n.getIcon)("clear"),category:y},v.GET_RECENT_SEARCH_WORD={id:"search.getRecentSearchWordCmd",category:y},v.GET_BACK_RECENT_SEARCH_WORD={id:"search.getBackRecentSearchWordCmd",category:y},v.MENU_REPLACE={id:"search.menu.replace",category:y,label:"%search.replace.title%"},v.MENU_REPLACE_ALL={id:"search.menu.replaceAll",category:y,label:"%search.replaceAll.label%"},v.MENU_HIDE={id:"search.menu.hide",category:y,label:"%search.result.hide%"},v.MENU_COPY={id:"search.menu.copy",category:y,label:"%file.copy.file%"},v.MENU_COPY_ALL={id:"search.menu.copyAll",category:y,label:"%search.menu.copyAll%"},v.MENU_COPY_PATH={id:"search.menu.copyPath",category:y,label:"%file.copy.path%"},v.REPLACE={id:"search.replace",category:y},v.CLOSE={id:"search.close",category:y}})(_||(e.SEARCH_COMMANDS=_={}));var E;(function(v){const y="outline";v.OUTLINE_COLLAPSE_ALL={id:"outline.collapse.all",category:y},v.OUTLINE_FOLLOW_CURSOR={id:"outline.follow.cursor",category:y},v.OUTLINE_SORT_KIND={id:"outline.sort.kind",category:y},v.OUTLINE_SORT_NAME={id:"outline.sort.name",category:y},v.OUTLINE_SORT_POSITION={id:"outline.sort.position",category:y}})(E||(e.OUTLINE_COMMANDS=E={}));var u;(function(v){const y="workspace";v.ADD_WORKSPACE_FOLDER={id:"workspace.addFolderToWorkspace",label:"%workspace.addFolderToWorkspace%",category:y},v.REMOVE_WORKSPACE_FOLDER={id:"workspace.removeFolderFromWorkspace",label:"%workspace.removeFolderFromWorkspace%",category:y},v.SAVE_WORKSPACE_AS_FILE={id:"workspace.saveWorkspaceAsFile",label:"%workspace.saveWorkspaceAsFile%",category:y}})(u||(e.WORKSPACE_COMMANDS=u={}));var h;(function(v){const y="keyboard";v.CHOOSE_KEYBOARD_LAYOUT={id:"keyboard.chooseKeyboardLayout",label:"%keyboard.chooseKeyboardLayout%",category:y}})(h||(e.KEYBOARD_COMMANDS=h={}));var c;(function(v){const y="dialog";v.ENSURE={id:"dialog.ensure",category:y}})(c||(e.DIALOG_COMMANDS=c={}));var r;(function(v){v.CATEGORY="%terminal.name%",v.FOCUS_NEXT_TERMINAL={id:"workbench.action.terminal.focusNextPane",label:"%terminal.focusNext.inTerminalGroup%",category:v.CATEGORY},v.FOCUS_PREVIOUS_TERMINAL={id:"workbench.action.terminal.focusPreviousPane",label:"%terminal.focusPrevious.inTerminalGroup%",category:v.CATEGORY},v.SPLIT={id:"terminal.split",label:"%terminal.split%",category:v.CATEGORY},v.ADD={id:"terminal.add",label:"%terminal.new%",category:v.CATEGORY},v.REMOVE={id:"terminal.remove",label:"%terminal.remove%",category:v.CATEGORY},v.CLEAR={id:"terminal.clear",label:"%terminal.clear%",category:v.CATEGORY},v.OPEN_SEARCH={id:"terminal.search",label:"%terminal.search%",category:v.CATEGORY},v.SEARCH_NEXT={id:"terminal.search.next",label:"%terminal.search.next%",category:v.CATEGORY},v.OPEN_WITH_PATH={id:"terminal.openWithPath",category:v.CATEGORY},v.CLEAR_CONTENT={id:"terminal.clearContent",label:"%terminal.menu.clearCurrentContent%",category:v.CATEGORY},v.CLEAR_ALL_CONTENT={id:"terminal.clearAllContent",label:"%terminal.menu.clearAllContents%",category:v.CATEGORY},v.TAB_RENAME={id:"terminal.tabRename",category:v.CATEGORY},v.SELECT_ALL_CONTENT={id:"terminal.selectAllContent",label:"%terminal.menu.selectAllContent%",category:v.CATEGORY},v.MORE_SETTINGS={id:"terminal.moreSettings",label:"%terminal.menu.moreSettings%",category:v.CATEGORY},v.SELECT_TYPE={id:"terminal.selectType",category:v.CATEGORY},v.SELECT_ZSH={id:"terminal.selectTypeZsh",label:"zsh",category:v.CATEGORY},v.SELECT_BASH={id:"terminal.selectTypeBash",label:"bash",category:v.CATEGORY},v.SELECT_SH={id:"terminal.selectTypeSh",label:"sh",category:v.CATEGORY},v.SELECT_CMD={id:"terminal.selectTypeCMD",label:"cmd",category:v.CATEGORY},v.SELECT_POWERSHELL={id:"terminal.selectTypePowerShell",label:"powershell",category:v.CATEGORY},v.COPY={id:"terminal.copy",label:"%edit.copy%",category:v.CATEGORY},v.PASTE={id:"terminal.paste",label:"%edit.paste%",category:v.CATEGORY},v.SELECT_ALL={id:"terminal.selectAll",label:"%terminal.menu.selectCurrentContent%",category:v.CATEGORY},v.RE_LAUNCH={id:"terminal.relaunch",category:v.CATEGORY},v.TOGGLE_TERMINAL={id:"terminal.toggleTerminal",label:"%terminal.toggleTerminal%",category:v.CATEGORY},v.KILL_PROCESS={id:"terminal.killProcess",label:"%terminal.killProcess%",category:v.CATEGORY}})(r||(e.TERMINAL_COMMANDS=r={}));var l;(function(v){const y="view";v.QUICK_OPEN_VIEW={id:"layout.action.quickOpenView",category:y},v.OPEN_VIEW={id:"layout.action.openView",label:"%layout.action.openView%",category:y},v.MAXIMIZE_EDITOR={id:"layout.action.Maximizeeditor",category:y},v.TOGGLE_SIDEBAR_VISIBILITY={id:"main-layout.left-panel.toggle",category:y}})(l||(e.LAYOUT_COMMANDS=l={}));var a;(function(v){const y="marker";v.SHOW_ERRORS_WARNINGS={id:"marker.action.showErrorsWarnings",category:y},v.TOGGLE_SHOW_ERRORS_WARNINGS={id:"marker.action.toggleShowErrorsWarnings",category:y}})(a||(e.MARKER_COMMANDS=a={}));var d;(function(v){v.OPEN={id:"editor.action.quickCommand"},v.OPEN_OUTLINE={id:"editor.action.quickOutline"},v.OPEN_VIEW={id:"editor.action.quickView"},v.OPEN_WITH_COMMAND={id:"editor.action.quickCommand.withCommand"}})(d||(e.QUICK_OPEN_COMMANDS=d={}));var m;(function(v){const y="SCM";v.GetSCMResource={id:"scm.getResource",category:y},v._GIT_OPEN_MERGE_EDITOR={id:"_git.openMergeEditor"},v.GIT_OPEN_MERGE_EDITOR={id:"git.openMergeEditor"}})(m||(e.SCM_COMMANDS=m={}));var p;(function(v){const y="MergeConflict";v.AI_ACCEPT={id:"merge-conflict.ai.accept",category:y},v.ALL_RESET={id:"merge-conflict.ai.all-reset",category:y},v.AI_ALL_ACCEPT={id:"merge-conflict.ai.all-accept",category:y},v.AI_ALL_ACCEPT_STOP={id:"merge-conflict.ai.all-accept-stop",category:y}})(p||(e.MERGE_CONFLICT_COMMANDS=p={}))},22780:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ClientCommonContribution=e.locationProtocolContextKey=e.inputFocusedContextKey=void 0;const n=t(85608),s=t(76003),o=t(97267),f=t(43718),b=t(53736),g=t(18193),_=t(22366),E=t(41118),u=t(1149),h=t(64102),c=t(39496),r=t(78132),l=t(11050),a=t(14109),d=t(66549);e.inputFocusedContextKey="inputFocus",e.locationProtocolContextKey="locationProtocol";let m=class{constructor(){this.schema=g.corePreferenceSchema;const v={"application.supportsOpenFolder":!!this.appConfig.isElectronRenderer&&!this.appConfig.isRemote,"application.supportsOpenWorkspace":!!this.appConfig.isElectronRenderer&&!this.appConfig.isRemote,"debug.toolbar.top":this.appConfig.isElectronRenderer?0:this.layoutViewSize.menubarHeight},y=Object.keys(this.schema.properties);for(const S of y)this.schema.properties[S].default=v[S]||this.schema.properties[S].default}onStart(){this.contextKeyService.createKey(e.locationProtocolContextKey,window.location.protocol.split(":")[0]),this.inputFocusedContext=this.contextKeyService.createKey(e.inputFocusedContextKey,!1),window.addEventListener("focusin",this.updateInputContextKeys.bind(this))}onStop(){window.removeEventListener("focusin",this.updateInputContextKeys.bind(this))}activeElementIsInput(){return!!document.activeElement&&(document.activeElement.tagName==="INPUT"||document.activeElement.tagName==="TEXTAREA")}updateInputContextKeys(){const v=this.activeElementIsInput();if(this.inputFocusedContext.set(v),v){const y=(0,_.trackFocus)(document.activeElement);f.Event.once(y.onDidBlur)(()=>{this.inputFocusedContext.set(this.activeElementIsInput()),y.dispose()})}}registerCommands(v){v.registerCommand(a.EDITOR_COMMANDS.UNDO),v.registerCommand(a.EDITOR_COMMANDS.REDO),v.registerCommand(a.EDITOR_COMMANDS.SELECT_ALL),v.registerCommand(a.COMMON_COMMANDS.ABOUT_COMMAND,{execute:()=>{alert((0,f.replaceLocalizePlaceholder)(this.appConfig.appName))}})}registerMenus(v){v.registerMenubarItem(c.MenuId.MenubarFileMenu,{label:(0,f.localize)("menu-bar.title.file"),order:1,iconClass:(0,o.getIcon)("menubar-file")}),v.registerMenubarItem(c.MenuId.MenubarEditMenu,{label:(0,f.localize)("menu-bar.title.edit"),order:2,iconClass:(0,o.getIcon)("menubar-edit")}),v.registerMenubarItem(c.MenuId.MenubarSelectionMenu,{label:(0,f.localize)("menu-bar.title.selection"),order:3,iconClass:(0,o.getIcon)("menubar-selection")}),v.registerMenubarItem(c.MenuId.MenubarViewMenu,{label:(0,f.localize)("menu-bar.title.view"),order:4,iconClass:(0,o.getIcon)("menubar-view")}),v.registerMenubarItem(c.MenuId.MenubarGoMenu,{label:(0,f.localize)("menu-bar.title.go"),order:5,iconClass:(0,o.getIcon)("menubar-go")}),v.registerMenubarItem(c.MenuId.MenubarTerminalMenu,{label:(0,f.localize)("menu-bar.title.terminal"),order:5,iconClass:(0,o.getIcon)("terminal")}),v.registerMenubarItem(c.MenuId.MenubarHelpMenu,{label:(0,f.localize)("menu-bar.title.help"),order:999,iconClass:(0,o.getIcon)("question-circle")}),v.registerMenuItems(c.MenuId.MenubarFileMenu,[{command:a.FILE_COMMANDS.OPEN_FOLDER.id,group:"1_open",when:"config.application.supportsOpenFolder"},{command:a.FILE_COMMANDS.OPEN_WORKSPACE.id,group:"1_open",when:"config.application.supportsOpenWorkspace"},{command:a.WORKSPACE_COMMANDS.ADD_WORKSPACE_FOLDER.id,group:"1_open",when:"config.workspace.supportMultiRootWorkspace"},{command:a.WORKSPACE_COMMANDS.SAVE_WORKSPACE_AS_FILE.id,group:"1_open",when:"config.workspace.supportMultiRootWorkspace"},{command:a.EDITOR_COMMANDS.NEW_UNTITLED_FILE.id,group:"2_new"},{command:{id:a.EDITOR_COMMANDS.SAVE_CURRENT.id,label:(0,f.localize)("file.save")},group:"3_save"},{command:{id:a.EDITOR_COMMANDS.SAVE_ALL.id,label:(0,f.localize)("file.saveAll")},group:"3_save"},{command:{id:a.EDITOR_COMMANDS.AUTO_SAVE.id,label:(0,f.localize)("file.autoSave")},toggledWhen:"config.editor.autoSave != off",group:"4_autosave"}]),v.registerMenuItems(c.MenuId.MenubarGoMenu,[{command:{id:a.EDITOR_COMMANDS.GO_BACK.id,label:(0,f.localize)("editor.goBack")},group:"1_go"},{command:{id:a.EDITOR_COMMANDS.GO_FORWARD.id,label:(0,f.localize)("editor.goForward")},group:"1_go"},{command:{id:a.EDITOR_COMMANDS.QUICK_OPEN.id,label:(0,f.localize)("editor.quickOpen")},group:"2_go_file"},{command:{id:a.EDITOR_COMMANDS.SEARCH_WORKSPACE_SYMBOL.id,label:(0,f.localize)("editor.workspaceSymbol.quickopen")},group:"2_go_file"},{command:{id:a.EDITOR_COMMANDS.GO_TO_LINE.id,label:(0,f.localize)("editor.goToLine")},group:"3_go_infile"},{command:{id:"editor.action.jumpToBracket",label:(0,f.localize)("menu-bar.go.jumpToBracket")},group:"3_go_infile"},{command:{id:"editor.action.marker.nextInFiles",label:(0,f.localize)("menu-bar.go.nextProblemInFiles")},group:"6_go_problem"},{command:{id:"editor.action.marker.prevInFiles",label:(0,f.localize)("menu-bar.go.prevProblemInFiles")},group:"6_go_problem"}]),v.registerMenuItems(c.MenuId.MenubarTerminalMenu,[{command:{id:a.TERMINAL_COMMANDS.ADD.id,label:a.TERMINAL_COMMANDS.ADD.label},group:"1_terminal"},{command:{id:a.TERMINAL_COMMANDS.SPLIT.id,label:a.TERMINAL_COMMANDS.SPLIT.label},group:"1_terminal"}])}registerKeybindings(v){v.registerKeybinding({command:a.EDITOR_COMMANDS.SELECT_ALL.id,keybinding:"ctrlcmd+a",when:"editorFocus"}),v.registerKeybinding({command:a.EDITOR_COMMANDS.UNDO.id,keybinding:"ctrlcmd+z",when:"editorFocus"}),v.registerKeybinding({command:a.EDITOR_COMMANDS.REDO.id,keybinding:"ctrlcmd+shift+z",when:"editorFocus"})}};e.ClientCommonContribution=m,n.__decorate([(0,s.Autowired)(f.CommandService),n.__metadata("design:type",Object)],m.prototype,"commandService",void 0),n.__decorate([(0,s.Autowired)(b.IContextKeyService),n.__metadata("design:type",Object)],m.prototype,"contextKeyService",void 0),n.__decorate([(0,s.Autowired)(l.AppConfig),n.__metadata("design:type",Object)],m.prototype,"appConfig",void 0),n.__decorate([(0,s.Autowired)(u.LayoutViewSizeConfig),n.__metadata("design:type",u.LayoutViewSizeConfig)],m.prototype,"layoutViewSize",void 0),e.ClientCommonContribution=m=n.__decorate([(0,f.Domain)(f.CommandContribution,d.ClientAppContribution,r.PreferenceContribution,h.MenuContribution,E.KeybindingContribution),n.__metadata("design:paramtypes",[])],m)},66549:(x,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ClientAppContribution=void 0,e.ClientAppContribution=Symbol("ClientAppContribution")},34505:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ClientCommonModule=void 0;const n=t(85608),s=t(76003),o=t(16908),f=t(43718),b=t(37638),g=t(36206),_=t(136),E=t(90697),u=t(45829),h=t(44867),c=t(22780),r=t(10797),l=t(17821);let a=class extends g.BrowserModule{constructor(){super(...arguments),this.contributionProvider=[E.OpenerContribution],this.providers=[c.ClientCommonContribution,h.DefaultOpenerContribution,h.OpenerContributionClient,b.AuthenticationContribution,_.HashCalculateContribution],this.electronProviders=[r.ClientElectronCommonContribution,u.ElectronOpenerContributionClient],this.webProviders=[l.ClientWebCommonContribution],this.backServices=[{servicePath:f.CommonServerPath,protocol:o.CommonServerProtocol},{servicePath:f.KeytarServicePath},{servicePath:f.CryptoServicePath}]}};e.ClientCommonModule=a,e.ClientCommonModule=a=n.__decorate([(0,s.Injectable)()],a)},98881:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.RecentStorage=void 0;const n=t(85608),s=t(76003),o=t(43718);let f=class{async getScopeStorage(){return this.recentStorage=this.recentStorage||await this.getStorage(o.STORAGE_NAMESPACE.RECENT_DATA),this.recentStorage}async getGlobalStorage(){return this.recentGlobalStorage=this.recentGlobalStorage||await this.getStorage(o.STORAGE_NAMESPACE.GLOBAL_RECENT_DATA),this.recentGlobalStorage}};e.RecentStorage=f,n.__decorate([(0,s.Autowired)(o.StorageProvider),n.__metadata("design:type",Function)],f.prototype,"getStorage",void 0),e.RecentStorage=f=n.__decorate([(0,s.Injectable)()],f)},30144:(x,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EXTENSION_CONTAINER_ID=e.SCM_CONTAINER_ID=e.SEARCH_CONTAINER_ID=e.EXPLORER_CONTAINER_ID=e.DEBUG_CONTAINER_ID=e.TEST_RESULT_CONTAINER_ID=e.DEBUG_CONSOLE_CONTAINER_ID=e.TERMINAL_CONTAINER_ID=e.OUTPUT_CONTAINER_ID=e.MARKER_CONTAINER_ID=void 0,e.MARKER_CONTAINER_ID="markers",e.OUTPUT_CONTAINER_ID="output",e.TERMINAL_CONTAINER_ID="terminal",e.DEBUG_CONSOLE_CONTAINER_ID="debug-console",e.TEST_RESULT_CONTAINER_ID="test-result",e.DEBUG_CONTAINER_ID="debug",e.EXPLORER_CONTAINER_ID="explorer",e.SEARCH_CONTAINER_ID="search",e.SCM_CONTAINER_ID="scm",e.EXTENSION_CONTAINER_ID="extension"},10797:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ClientElectronCommonContribution=void 0;const n=t(85608),s=t(76003),o=t(43718),f=t(64102),b=t(39496),g=t(11050);let _=class{registerMenus(u){u.registerMenubarItem(b.MenuId.MenubarAppMenu,{label:(0,o.localize)("app.name",this.appConfig.appName),order:0}),u.registerMenuItems(b.MenuId.MenubarEditMenu,[{command:{id:"electron.undo",label:(0,o.localize)("editor.undo")},nativeRole:"undo",group:"1_undo"},{command:{id:"electron.redo",label:(0,o.localize)("editor.redo")},group:"1_undo",nativeRole:"redo"},{command:{label:(0,o.localize)("edit.cut"),id:"electron.cut"},nativeRole:"cut",group:"2_clipboard"},{command:{label:(0,o.localize)("edit.copy"),id:"electron.copy"},nativeRole:"copy",group:"2_clipboard"},{command:{label:(0,o.localize)("edit.paste"),id:"electron.paste"},nativeRole:"paste",group:"2_clipboard"},{command:{label:(0,o.localize)("edit.selectAll"),id:"electron.selectAll"},nativeRole:"selectAll",group:"2_clipboard"}]),u.registerMenuItems(b.MenuId.MenubarAppMenu,[{command:{id:"electron.quit",label:(0,o.localize)("app.quit")},nativeRole:"quit",group:"4_quit"}])}};e.ClientElectronCommonContribution=_,n.__decorate([(0,s.Autowired)(g.AppConfig),n.__metadata("design:type",Object)],_.prototype,"appConfig",void 0),e.ClientElectronCommonContribution=_=n.__decorate([(0,o.Domain)(f.MenuContribution)],_)},66963:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});const n=t(85608);n.__exportStar(t(14109),e),n.__exportStar(t(34505),e),n.__exportStar(t(66549),e),n.__exportStar(t(98881),e)},17821:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ClientWebCommonContribution=void 0;const n=t(85608),s=t(43718),o=t(64102),f=t(39496),b=t(14109);let g=class{registerMenus(E){E.registerMenuItems(f.MenuId.MenubarEditMenu,[{command:b.EDITOR_COMMANDS.REDO.id,group:"1_undo"},{command:b.EDITOR_COMMANDS.UNDO.id,group:"1_undo"}]),E.registerMenuItem(f.MenuId.MenubarHelpMenu,{command:{id:b.COMMON_COMMANDS.ABOUT_COMMAND.id,label:b.COMMON_COMMANDS.ABOUT_COMMAND.label},nativeRole:"about",group:"0_about"})}};e.ClientWebCommonContribution=g,e.ClientWebCommonContribution=g=n.__decorate([(0,s.Domain)(o.MenuContribution)],g)},25918:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TitleActionList=e.InlineActionWidget=e.MenuActionList=void 0,e.InlineActionBar=p,e.InlineMenuBar=v;const n=t(85608),s=n.__importDefault(t(53373)),o=n.__importStar(t(14041)),f=t(97267),b=t(45803),g=t(43718),_=t(93899),E=t(48560),u=t(79951),h=t(55693),c=n.__importDefault(t(17647)),r=n.__importDefault(t(54859)),l=({data:y,hasSubmenu:S,disabled:A,iconService:T,hasChecked:D})=>o.default.createElement("div",{className:(0,s.default)(r.default.menuAction,{[r.default.disabled]:A,[r.default.checked]:y.checked})},o.default.createElement("div",{className:(0,s.default)({[r.default.icon]:D})},y.checked?o.default.createElement(f.Icon,{icon:"check"}):null),o.default.createElement("div",{className:r.default.label},y.label?(0,u.transformLabelWithCodicon)(g.strings.mnemonicButtonLabel(y.label,!0),{margin:"0 3px"},T?.fromString.bind(T)):""),o.default.createElement("div",{className:r.default.tip},y.keybinding?o.default.createElement("div",{className:r.default.shortcut},y.keybinding):null,S?o.default.createElement("div",{className:r.default.submenuIcon},o.default.createElement(f.Icon,{icon:"right"})):null,!y.keybinding&&!S&&y.extraDesc&&o.default.createElement("div",{className:r.default.extraDesc},y.extraDesc))),a=({data:y=[],context:S=[],afterClick:A,style:T,iconService:D,renderSubMenuTitle:w,renderMenuItem:I})=>{if(!y.length)return null;const R=o.default.useCallback(L=>{const{key:N,item:k}=L;if([_.SeparatorMenuItemNode.ID,_.SubmenuItemNode.ID].includes(N))return;const F=(Array.isArray(k.props.children)?k.props.children[0]:k.props.children).props.data;F&&(typeof F.execute=="function"&&F.execute(S),typeof A=="function"&&A(F))},[y,S]),M=o.default.useCallback((L,N)=>{if(w){const k=w(L,{hasSubmenu:!0,disabled:!1});if(k)return k}return o.default.createElement(l,{hasChecked:N,hasSubmenu:!0,data:L,iconService:D})},[w]),O=o.default.useCallback((L,N)=>{if(I){const k=I(L,{hasSubmenu:!1,disabled:L.disabled});if(k)return k}return o.default.createElement(l,{hasChecked:N,data:L,disabled:L.disabled,iconService:D})},[I]),P=o.default.useCallback(L=>{const N=L.some(k=>k.checked);return L.map((k,B)=>{if(k.id===_.SeparatorMenuItemNode.ID)return null;const F=L[B+1]&&L[B+1].id===_.SeparatorMenuItemNode.ID;return k.id===_.SubmenuItemNode.ID?!Array.isArray(k.children)||!k.children.length?null:o.default.createElement(o.default.Fragment,{key:`${k.id}-${k.submenuId}-${B}`},o.default.createElement(b.Menu.SubMenu,{key:`${k.id}-${k.submenuId}-${B}`,className:r.default.submenuItem,popupClassName:"kt-menu",title:M(k,N)},P(k.children)),F?o.default.createElement(b.Menu.Divider,{key:`divider-${B}`,className:r.default.menuItemDivider}):null):o.default.createElement(o.default.Fragment,{key:`${k.id}-${B}`},o.default.createElement(b.Menu.Item,{id:`${k.id}-${B}`,key:`${k.id}-${B}`,className:r.default.menuItem,disabled:k.disabled},O(k,N)),F?o.default.createElement(b.Menu.Divider,{key:`divider-${B}`,className:r.default.menuItemDivider}):null)})},[]);return o.default.createElement(b.Menu,{className:"kt-menu",selectable:!1,motion:{motionLeave:!1,motionEnter:!1},builtinPlacements:c.default,onClick:R,style:T},P(y))};e.MenuActionList=a;const d=({type:y,icon:S,disabled:A,onClick:T,title:D})=>{const w=(0,h.useDesignStyles)(r.default.btnAction,"btnAction");if(y==="icon")return o.default.createElement(f.Button,{size:"small",type:y,className:w,onClick:T,title:D,icon:S||"ellipsis"});const I={};return(0,g.isBoolean)(A)&&(I.disabled=A),o.default.createElement(f.Button,{size:"small",type:"secondary",className:w,onClick:T,...I,title:D},o.default.createElement(f.Icon,{icon:S||"ellipsis"}))};d.displayName="EllipsisWidget",e.InlineActionWidget=o.default.memo(({iconService:y,type:S="icon",data:A,context:T=[],className:D,afterClick:w,...I})=>{const R=(0,h.useDesignStyles)(r.default.iconAction,"iconAction"),M=(0,h.useDesignStyles)(r.default.btnAction,"btnAction"),[O,P]=(0,o.useState)(!1),L=o.default.useCallback(async(F,...W)=>{if(F&&(F.preventDefault(),F.stopPropagation()),!O){if(P(!0),A.id===_.SubmenuItemNode.ID&&F){const V={x:F.clientX,y:F.clientY};await A.execute([V,...T])}else typeof A.execute=="function"&&await A.execute([...T,...W]);P(!1),typeof w=="function"&&w()}},[A,T]),[N,k]=o.default.useMemo(()=>{let F=A.tooltip||A.label;const W=A.label;return A.keybinding&&(F=`${F} (${A.keybinding})`),[F,W]},[A]),B=A.id===_.SubmenuItemNode.ID;return S==="icon"&&!A.type?o.default.createElement(f.Button,{type:A.icon?"icon":"link",className:(0,s.default)(R,D,{[r.default.disabled]:A.disabled,[r.default.submenuIconAction]:B}),title:N,iconClass:A.icon,onClick:L,...I},!A.icon&&k):A.type==="checkbox"?o.default.createElement(f.CheckBox,{className:(0,s.default)(D,M),disabled:A.disabled,label:A.label,title:N,checked:A.checked,onChange:F=>L(void 0,F.target.checked),...I}):o.default.createElement(f.Button,{loading:O,className:(0,s.default)(D,M),disabled:A.disabled,onClick:L,size:"small",type:A.type,title:N,...I},(0,u.transformLabelWithCodicon)(k,{margin:"0 3px"},y?.fromString.bind(y)),B&&o.default.createElement(f.Icon,{icon:"down",className:"kt-button-secondary-more"}))}),e.InlineActionWidget.displayName="InlineAction";const m=({data:y,context:S})=>{const A=o.default.useCallback(()=>y.getExecuteArgs(S),[y,S]);return o.default.createElement(y.component,{getExecuteArgs:A})};m.displayName="CustomAction",e.TitleActionList=o.default.memo(({type:y="icon",nav:S=[],more:A=[],moreIcon:T,moreTitle:D,context:w=[],extraNavActions:I=[],moreAtFirst:R=!1,className:M,afterClick:O,menuId:P,iconService:L,regroup:N=(...k)=>k})=>{const k=(0,E.useInjectable)(_.ICtxMenuRenderer),B=(0,E.useInjectable)(_.AbstractMenuService),F=(0,h.useDesignStyles)(r.default.titleActions,"titleActions"),[W,V]=N(S,A),H=o.default.useCallback(K=>{K.preventDefault(),K.stopPropagation(),V&&k.show({anchor:{x:K.clientX,y:K.clientY},menuNodes:V,args:w,onHide:O})},[V,w]);if(W.length===0&&V.length===0&&I.length===0)return null;const G=V.length>0?o.default.createElement(d,{disabled:V[0].disabled,icon:T,type:y,onClick:H,title:D}):null;return o.default.createElement("div",{className:(0,s.default)([F,M]),"data-menu-id":P},R&&G,W.map(K=>{if(K.id===_.ComponentMenuItemNode.ID)return o.default.createElement(m,{context:w,data:K,key:K.nodeId});if(K.id===_.SubmenuItemNode.ID){const j=B.createMenu(K.submenuId);if(!((0,_.generateMergedCtxMenu)({menus:j}).length>0))return}if(K.id===_.SeparatorMenuItemNode.ID)return o.default.createElement("span",{key:`vertical-divider-${K.id}`,className:r.default.verticalDivider});const z=K.id===_.SubmenuItemNode.ID?K.submenuId:K.id;return o.default.createElement(e.InlineActionWidget,{id:z,key:z,className:(0,s.default)({[r.default.selected]:K.checked}),type:y,data:K,afterClick:O,context:w,iconService:L})}),Array.isArray(I)&&I.length?o.default.createElement(o.default.Fragment,null,W.length&&o.default.createElement("span",{className:r.default.divider}),I):null,!R&&G)}),e.TitleActionList.displayName="TitleActionList";function p(y){const{menus:S,context:A,separator:T="navigation",debounce:D,isFlattenMenu:w=!1,...I}=y,[R,M]=(0,h.useMenus)(S,T,A,D),O=(0,o.useMemo)(()=>w?[...R,...M]:R,[R,M,w]);return o.default.createElement(e.TitleActionList,{menuId:S.menuId,nav:O,more:T==="inline"||w?[]:M,...I})}function v(y){const{iconService:S,menus:A,context:T,moreIcon:D,moreTitle:w,separator:I="navigation",...R}=y,[M,O]=(0,h.useContextMenus)(A);return o.default.createElement(e.TitleActionList,{menuId:A.menuId,nav:M,more:I==="inline"?[]:O,moreIcon:D,moreTitle:w,context:T,iconService:S,...R})}v.displayName="InlineMenuBar"},17647:(x,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.placements=void 0;const t={adjustX:1,adjustY:1},n=[0,0];e.placements={topLeft:{points:["bl","tl"],overflow:t,offset:[0,-4],targetOffset:n},topCenter:{points:["bc","tc"],overflow:t,offset:[0,-4],targetOffset:n},topRight:{points:["br","tr"],overflow:t,offset:[0,-4],targetOffset:n},bottomLeft:{points:["tl","bl"],overflow:t,offset:[0,4],targetOffset:n},bottomCenter:{points:["tc","bc"],overflow:t,offset:[0,4],targetOffset:n},bottomRight:{points:["tr","br"],overflow:t,offset:[0,4],targetOffset:n}},e.default=e.placements},89847:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AIAction=void 0;const n=t(85608),s=n.__importDefault(t(53373)),o=n.__importStar(t(14041)),f=t(43718),b=t(22689),g=t(48560),_=t(57995),E=t(24951),u=t(49716),h=t(52141),c=n.__importDefault(t(27410)),r=(0,b.createLayoutEventType)(f.AIInlineChatContentWidgetId),l=new CustomEvent(r,{bubbles:!0}),a=d=>{const{operationList:m,moreOperation:p,showClose:v=!0,onClickItem:y,onClose:S,customOperationRender:A,loading:T,loadingShowOperation:D=!1}=d,w=o.default.useRef(null),[I,R]=(0,g.useHover)(),M=(0,o.useCallback)(()=>{S?.()},[S]);(0,g.useChange)(R,()=>{var L;(L=w.current)===null||L===void 0||L.dispatchEvent(l)});const O=(0,o.useCallback)(()=>T&&D?o.default.createElement("div",{className:c.default.loading_mask}):null,[T,D]),P=(0,o.useCallback)(()=>{if(T&&!D)return null;const L=o.default.createElement(o.default.Fragment,null,m?.map(({name:N,title:k,id:B},F)=>k?o.default.createElement(h.EnhancePopover,{id:B,title:k,key:`popover_${F}`},o.default.createElement(_.EnhanceIcon,{wrapperClassName:c.default.operate_item,onClick:()=>y?.(B)},o.default.createElement("span",{key:F},N))):o.default.createElement(_.EnhanceIcon,{wrapperClassName:c.default.operate_item,onClick:()=>y?.(B),key:F},o.default.createElement("span",null,N))),p?.length?o.default.createElement(_.EnhanceIconWithCtxMenu,{icon:"more",menuNodes:p,wrapperClassName:c.default.operate_btn,skew:{x:-83,y:5}}):null);return o.default.createElement("div",{ref:I,className:c.default.operate_container},O(),o.default.createElement(E.LineVertical,{height:"100%",margin:"0 8px",maxHeight:14,minHeight:14}),A?o.default.createElement("div",{className:c.default.custom_operation_wrapper},A):o.default.createElement("div",{className:c.default.default_operation_wrapper},L))},[A,m,p,T,D]);return o.default.createElement("div",{ref:w,className:(0,s.default)(c.default.ai_action_wrapper,T&&c.default.loading,D&&c.default.loading_show_operation)},o.default.createElement(o.default.Fragment,null,o.default.createElement("div",{className:c.default.stable_container},T?o.default.createElement(h.EnhancePopover,{id:"inline_chat_loading",title:(0,f.localize)("aiNative.inline.chat.operate.loading.cancel")},o.default.createElement(u.Loading,{className:c.default.loading_icon})):o.default.createElement(_.AILogoAvatar,{className:c.default.ai_action_icon})),P(),v&&o.default.createElement("div",{className:c.default.close_container},o.default.createElement(E.LineVertical,{height:"100%",margin:"0px 8px",maxHeight:14,minHeight:14}),o.default.createElement(_.EnhanceIcon,{wrapperClassName:c.default.operate_btn,icon:"window-close",onClick:M}))))};e.AIAction=a},66205:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ContentWidgetContainerPanel=void 0;const n=t(85608),s=n.__importDefault(t(14041)),o=n.__importDefault(t(41771)),f=b=>s.default.createElement("div",{className:o.default.inline_chat_container_panel,style:b.style},b.children);e.ContentWidgetContainerPanel=f},57995:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AILogoAvatar=e.EnhanceIconWithCtxMenu=e.EnhanceIcon=void 0;const n=t(85608),s=n.__importDefault(t(53373)),o=n.__importStar(t(14041)),f=t(43718),b=t(81878),g=t(97222),_=t(48560),E=n.__importDefault(t(42798));e.EnhanceIcon=o.default.forwardRef((c,r)=>o.default.createElement("div",{className:(0,s.default)(c.wrapperClassName,E.default.ai_enhance_icon),style:c.wrapperStyle,onClick:c.onClick,ref:r,tabIndex:c.tabIndex,role:c.role,"aria-label":c.ariaLabel,"aria-pressed":c.ariaPressed},o.default.createElement(b.Icon,{className:(0,s.default)(c.className,E.default.icon),children:null,onClick:()=>null,style:(c.icon||c.iconClass)&&c.children?{marginRight:5}:{},icon:c.icon,iconClass:c.iconClass}),c.children&&o.default.createElement("span",{className:E.default.children_wrap},c.children)));const u=c=>{const{children:r,menuNodes:l,skew:a,id:d,...m}=c,p=(0,_.useInjectable)(f.CommandService),v=(0,_.useInjectable)(g.IBrowserCtxMenu),[y,S]=o.default.useState(void 0),A=o.default.useRef(null);o.default.useEffect(()=>{T()},[A.current,a]);const T=(0,o.useCallback)(w=>{requestAnimationFrame(()=>{if(A.current){const I=A.current.getBoundingClientRect(),{x:R,y:M,width:O,height:P}=I,L={x:R+O,y:M+P};a&&(L.x+=a.x,L.y+=a.y),S(L),w&&w(L)}})},[A.current,a]),D=o.default.useCallback(()=>{y&&(l?T(w=>{v.show({anchor:w,menuNodes:l})}):d&&p.executeCommand(d))},[A.current,l,y,d]);return o.default.createElement(e.EnhanceIcon,{ref:A,onClick:D,...m},r)};e.EnhanceIconWithCtxMenu=u;const h=c=>o.default.createElement("div",{className:(0,s.default)(E.default.ai_logo_avatar_container,c.className)},o.default.createElement(b.Icon,{icon:"magic-wand",className:(0,s.default)(c.iconClassName,E.default.avatar_icon)}));e.AILogoAvatar=h},89195:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});const n=t(85608);n.__exportStar(t(89847),e),n.__exportStar(t(57995),e),n.__exportStar(t(50610),e),n.__exportStar(t(24951),e),n.__exportStar(t(52141),e),n.__exportStar(t(75777),e),n.__exportStar(t(49716),e),n.__exportStar(t(83913),e)},50610:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AIInlineResult=void 0;const n=t(85608),s=n.__importDefault(t(53373)),o=n.__importDefault(t(14041)),f=t(57995),b=t(24951),g=t(75777),_=n.__importDefault(t(5011)),E=u=>{const{iconItems:h,isRenderThumbs:c=!0,isRenderClose:r=!1,closeClick:l}=u;return o.default.createElement("div",{className:_.default.ai_inline_result_panel},o.default.createElement("div",{className:_.default.side},h.map(({icon:a,text:d,onClick:m,btnType:p},v)=>o.default.createElement(f.EnhanceIcon,{wrapperClassName:(0,s.default)(_.default.operate_btn,p==="default"?_.default.default:""),icon:a,onClick:m,key:v},o.default.createElement("span",null,d)))),c&&o.default.createElement(o.default.Fragment,null,o.default.createElement(b.LineVertical,{height:"60%",margin:"0px 6px 0 6px"}),o.default.createElement("div",{className:_.default.side},o.default.createElement(g.Thumbs,{wrapperClassName:_.default.operate_icon}))),r&&o.default.createElement(o.default.Fragment,null,o.default.createElement(f.EnhanceIcon,{wrapperClassName:_.default.operate_btn,icon:"close",onClick:l})))};e.AIInlineResult=E},83913:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.InteractiveInput=void 0;const n=t(85608),s=n.__importDefault(t(53373)),o=n.__importStar(t(14041)),f=t(97267),b=t(43718),g=t(89195),_=n.__importDefault(t(42348)),E=160,u=32;e.InteractiveInput=o.default.forwardRef((h,c)=>{const{placeholder:r,onKeyDown:l,onBlur:a,onValueChange:d,onHeightChange:m,onFocus:p,onSend:v,disabled:y=!1,className:S,height:A,width:T,sendBtnClassName:D,popoverPosition:w,autoFocus:I}=h,R=(0,o.useRef)(null),[M,O]=(0,o.useState)(h.value||""),[P,L]=(0,o.useState)(A||u),[N,k]=(0,o.useState)(!1);(0,o.useImperativeHandle)(c,()=>R.current),(0,o.useEffect)(()=>{R&&R.current&&I&&R.current.focus()},[R]),(0,o.useEffect)(()=>{var z;const j=h.value;(0,b.isUndefined)(j)||j!==((z=R.current)===null||z===void 0?void 0:z.value)&&O(j||"")},[h.value,M,R]),(0,o.useEffect)(()=>{(0,b.isUndefined)(A)||A!==P&&L(A)},[A,P,m]),(0,o.useEffect)(()=>{if(!M){L(u);return}if(R&&R.current&&P<=E){R.current.style.height="0px";const z=R.current.scrollHeight;R.current.style.height=Math.min(z,E)+"px";const j=Math.min(z+12,E);L(j)}},[R,M,m,P]),(0,o.useEffect)(()=>{m?.(P)},[P]);const B=(0,o.useCallback)(z=>{O(z),d?.(z)},[d]),F=(0,o.useCallback)(z=>{k(!0),p?.(z)},[p]),W=(0,o.useCallback)(z=>{k(!1),a?.(z)},[a]),V=(0,o.useCallback)(()=>{y||M.trim()&&v?.(M)},[v,M,y]),H=(0,o.useCallback)(z=>{if(z.key==="Enter"&&!z.nativeEvent.isComposing){if(z.shiftKey)return;z.preventDefault(),V();return}l?.(z)},[l,V]),G=(0,o.useMemo)(()=>o.default.createElement("div",{className:_.default.input_icon_container},o.default.createElement("div",{className:(0,s.default)(_.default.send_chat_btn,N&&_.default.active,y&&_.default.disabled,D)},y?o.default.createElement("div",{className:_.default.ai_loading},o.default.createElement("div",{className:_.default.loader}),o.default.createElement("div",{className:_.default.loader}),o.default.createElement("div",{className:_.default.loader})):o.default.createElement(f.Popover,{id:`ai_chat_input_send_${(0,b.uuid)(4)}`,content:(0,b.localize)("aiNative.chat.enter.send"),delay:1500,position:w??f.PopoverPosition.top,disable:y},o.default.createElement(g.EnhanceIcon,{wrapperClassName:_.default.send_icon,className:(0,f.getIcon)("send-solid"),onClick:V,tabIndex:0,role:"button",ariaLabel:(0,b.localize)("aiNative.chat.enter.send")})))),[N,y,D,M,w]),K=(0,o.useMemo)(()=>(0,b.isUndefined)(T)?"100%":T+"px",[T]);return o.default.createElement(f.TextArea,{ref:R,placeholder:r,wrapperStyle:{height:P+"px",width:K},style:{height:P-10+"px"},value:M,onKeyDown:H,onFocus:F,onBlur:W,onValueChange:B,disabled:y,className:(0,s.default)(_.default.interactive_input_container,N?_.default.active:null,S),addonAfter:G})}),e.InteractiveInput.displayName="interactiveInput"},24951:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.HorizontalVertical=e.LineVertical=void 0;const s=t(85608).__importDefault(t(14041)),o={backgroundColor:"var(--editorGroup-border)",height:"100%",width:"1px",minWidth:"1px"},f={backgroundColor:"var(--editorGroup-border)",width:"100%",height:"1px",minHeight:"1px"},b=_=>s.default.createElement("span",{style:{...o,..._}});e.LineVertical=b;const g=_=>s.default.createElement("span",{style:{...f,..._}});e.HorizontalVertical=g},49716:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Loading=void 0;const n=t(85608),s=n.__importDefault(t(53373)),o=n.__importDefault(t(14041)),f=t(97267),b=n.__importDefault(t(43135));e.Loading=o.default.memo(g=>o.default.createElement(f.Icon,{className:(0,s.default)(g.className,b.default.loading_indicator),iconClass:(0,f.getIcon)("loading")})),e.Loading.displayName="Loading"},52141:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EnhancePopover=void 0;const s=t(85608).__importStar(t(14041)),o=t(97267),f=t(43718),b=g=>{const{children:_,id:E,title:u,onClick:h}=g,[c,r]=s.default.useState(!1),l=(0,s.useMemo)(()=>E+(0,f.uuid)(6),[E]),a=(0,s.useCallback)(m=>{r(!1),h&&h(m)},[h]),d=(0,s.useCallback)(m=>{r(m)},[]);return s.default.createElement(o.Popover,{id:l,title:u,onClick:a,display:c,onDisplayChange:d},_)};e.EnhancePopover=b},75777:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Thumbs=void 0;const s=t(85608).__importStar(t(14041)),o=t(43718),f=t(95040),b=t(81878),g=t(48560),_=t(67304),E=t(57995),u=h=>{const c=(0,g.useInjectable)(f.IAIInlineChatService),{relationId:r,onClick:l,wrapperClassName:a}=h,[d,m]=(0,s.useState)("thumbs"),[p,v]=(0,s.useState)("thumbsdown"),y=(0,s.useCallback)(T=>{l&&l(T),c&&c.fireThumbsEvent(T)},[r,c]),S=(0,s.useCallback)(T=>{T==="up"&&d==="thumbs"&&(m("thumbs-fill"),v(!1),y(!0)),T==="up"&&d==="thumbs-fill"&&(m("thumbs"),v("thumbsdown")),T==="down"&&p==="thumbsdown"&&(v("thumbsdown-fill"),m(!1),y(!1)),T==="down"&&p==="thumbsdown-fill"&&(v("thumbsdown"),m("thumbs"))},[d,p]),A=(0,g.useUUID)();return s.default.createElement(s.default.Fragment,null,typeof d=="string"&&s.default.createElement(b.Popover,{id:`ai-chat-thumbsup-${A}`,title:(0,o.localize)("aiNative.inline.chat.operate.thumbsup.title")},s.default.createElement(E.EnhanceIcon,{wrapperClassName:a,onClick:()=>S("up"),className:(0,_.getExternalIcon)(d,_.KTICON_OWNER),tabIndex:0,role:"button",ariaLabel:(0,o.localize)("aiNative.inline.chat.operate.thumbsup.title"),ariaPressed:d==="thumbs-fill"?"true":"false"})),typeof p=="string"&&s.default.createElement(b.Popover,{id:`ai-chat-thumbsdown-${A}`,title:(0,o.localize)("aiNative.inline.chat.operate.thumbsdown.title")},s.default.createElement(E.EnhanceIcon,{wrapperClassName:a,onClick:()=>S("down"),className:(0,_.getExternalIcon)(p,_.KTICON_OWNER),tabIndex:0,role:"button",ariaLabel:(0,o.localize)("aiNative.inline.chat.operate.thumbsdown.title"),ariaPressed:p==="thumbsdown-fill"?"true":"false"})))};e.Thumbs=u},81878:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Scroll=e.Scrollbars=e.NativeSelect=void 0;const n=t(85608);n.__exportStar(t(97885),e),n.__exportStar(t(73215),e),n.__exportStar(t(32293),e);var s=t(77331);Object.defineProperty(e,"NativeSelect",{enumerable:!0,get:function(){return s.Select}}),n.__exportStar(t(48412),e),n.__exportStar(t(79383),e),n.__exportStar(t(50708),e),n.__exportStar(t(7273),e),n.__exportStar(t(14640),e),n.__exportStar(t(54076),e),n.__exportStar(t(79024),e),n.__exportStar(t(89832),e),n.__exportStar(t(54713),e),n.__exportStar(t(18875),e),n.__exportStar(t(91397),e),n.__exportStar(t(31059),e),n.__exportStar(t(72871),e),n.__exportStar(t(34128),e);var o=t(77011);Object.defineProperty(e,"Scrollbars",{enumerable:!0,get:function(){return o.Scrollbars}}),Object.defineProperty(e,"Scroll",{enumerable:!0,get:function(){return o.Scrollbars}})},57327:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BoxPanel=void 0;const n=t(85608),s=n.__importDefault(t(53373)),o=n.__importStar(t(14041)),f=t(48560),b=t(38578),g=t(55693),_=t(25719),E=n.__importDefault(t(91290)),u=({className:h,children:c=[],direction:r="left-to-right",...l})=>{const a=o.default.Children.toArray(c),d=(0,f.useInjectable)(b.AppConfig),m=(0,g.useDesignStyles)(E.default["box-panel"],"box-panel");(0,o.useEffect)(()=>{d.didRendered&&d.didRendered()},[]);const p=_.Layout.getStyleProperties(r);return o.default.createElement("div",{...l,className:(0,s.default)(m,h),style:{flexDirection:p.direction,zIndex:l.zIndex||l["z-index"]}},a.map((v,y)=>{const S=v.props||{};return o.default.createElement("div",{key:y,id:S["data-wrapper-id"],className:(0,s.default)(E.default.wrapper,S["data-wrapper-class"]),style:{flex:S.flex,overflow:S.overflow,zIndex:S.zIndex||S["z-index"],[p.minSize]:S.defaultSize,backgroundColor:S.backgroundColor}},v)}))};e.BoxPanel=u},28003:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DefaultLayout=e.getStorageValue=void 0,e.ToolbarActionBasedLayout=_,e.fixLayout=E;const s=t(85608).__importDefault(t(14041)),o=t(52564),f=t(57327),b=t(99333),g=()=>{let u={},h={};try{const c=localStorage.getItem("layout");c&&(u=JSON.parse(c));const r=localStorage.getItem("theme");r&&(h=JSON.parse(r))}catch{}return{layout:E(u),colors:h}};e.getStorageValue=g,e.DefaultLayout=_;function _(u={}){var h,c,r,l,a,d;const{layout:m}=(0,e.getStorageValue)();return s.default.createElement(f.BoxPanel,{direction:"top-to-bottom"},s.default.createElement(o.SlotRenderer,{id:"top",defaultSize:u.topSlotDefaultSize||0,slot:"top",zIndex:u.topSlotZIndex}),s.default.createElement(b.SplitPanel,{id:"main-horizontal",flex:1},s.default.createElement(o.SlotRenderer,{slot:"left",isTabbar:!0,defaultSize:!((h=m.left)===null||h===void 0)&&h.currentId?((c=m.left)===null||c===void 0?void 0:c.size)||310:49,minResize:280,maxResize:480,minSize:49}),s.default.createElement(b.SplitPanel,{id:"main-vertical",minResize:300,flexGrow:1,direction:"top-to-bottom"},s.default.createElement(o.SlotRenderer,{flex:2,flexGrow:1,minResize:200,slot:"main"}),s.default.createElement(o.SlotRenderer,{flex:1,defaultSize:!((r=m.bottom)===null||r===void 0)&&r.currentId?(l=m.bottom)===null||l===void 0?void 0:l.size:24,minResize:160,slot:"bottom",isTabbar:!0})),s.default.createElement(o.SlotRenderer,{slot:"right",isTabbar:!0,defaultSize:!((a=m.right)===null||a===void 0)&&a.currentId?((d=m.right)===null||d===void 0?void 0:d.size)||310:0,minResize:280,maxResize:480,minSize:0})),s.default.createElement(o.SlotRenderer,{id:"statusBar",defaultSize:24,slot:"statusBar"}))}function E(u){const h={...u};for(const c in u)u[c]&&(u[c].size||(h[c].currentId=""));return h}},32293:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});const n=t(85608);n.__exportStar(t(25719),e),n.__exportStar(t(99333),e),n.__exportStar(t(57327),e),n.__exportStar(t(28003),e)},25719:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Layout=void 0;const n=t(73215),s={"left-to-right":{direction:"row",size:"width",domSize:"clientHeight",minSize:"minWidth",maxSize:"maxWidth"},"right-to-left":{direction:"row-reverse",size:"width",domSize:"clientHeight",minSize:"minWidth",maxSize:"maxWidth"},"top-to-bottom":{direction:"column",size:"height",domSize:"clientWidth",minSize:"minHeight",maxSize:"maxHeight"},"bottom-to-top":{direction:"column-reverse",size:"height",domSize:"clientWidth",minSize:"minHeight",maxSize:"maxHeight"}};var o;(function(f){function b(l){return s[l]}f.getStyleProperties=b;function g(l){return s[l].direction}f.getFlexDirection=g;function _(l){return s[l].size}f.getSizeProperty=_;function E(l){return s[l].domSize}f.getDomSizeProperty=E;function u(l){return s[l].minSize}f.getMinSizeProperty=u;function h(l){return s[l].maxSize}f.getMaxSizeProperty=h;function c(l){return l==="bottom-to-top"||l==="top-to-bottom"?n.ResizeHandleVertical:n.ResizeHandleHorizontal}f.getResizeHandle=c;function r(l){return l==="bottom-to-top"||l==="top-to-bottom"?"row":"column"}f.getTabbarDirection=r})(o||(e.Layout=o={}))},99333:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SplitPanel=e.PanelContext=void 0;const n=t(85608),s=n.__importDefault(t(53373)),o=n.__importDefault(t(14041)),f=t(43718),b=t(68456),g=t(48560),_=t(73215),E=t(25719),u=t(71707),h=n.__importDefault(t(91290));e.PanelContext=o.default.createContext({setSize:(a,d)=>{},setRelativeSize:(a,d,m)=>{},getSize:a=>0,getRelativeSize:a=>[0,0],lockSize:(a,d)=>{},setMaxSize:(a,d)=>{},hidePanel:a=>{}});const c=(a,d,m)=>{var p,v;return(v=a&&a.props&&((p=a.props[d])!==null&&p!==void 0?p:a.props[`data-sp-${d}`]))!==null&&v!==void 0?v:m};function r(a,d){return c(a,"savedSize")?c(a,"savedSize")+"px":c(a,"defaultSize")!==void 0?c(a,"defaultSize")+"px":c(a,"flex")?c(a,"flex")/d*100+"%":1/d*100+"%"}const l=a=>{const d=(0,g.useInjectable)(u.SplitPanelManager).getService(a.id),{id:m,className:p,headerSize:v,resizeHandleClassName:y,style:S,children:A=[],direction:T="left-to-right",resizeKeep:D=!0,dynamicTarget:w}=o.default.useMemo(()=>d.interceptProps(a),[d,d.interceptProps,a]),I=E.Layout.getResizeHandle(T),R=E.Layout.getStyleProperties(T),M=o.default.useMemo(()=>o.default.Children.toArray(A),[A]),O=o.default.useMemo(()=>M.find(pe=>c(pe,"flexGrow")),[M]),P=o.default.useMemo(()=>M.reduce((pe,J)=>pe+c(J,"flex",1),0),[M]),L=o.default.useRef([]),N=(0,g.useInjectable)(f.IEventBus),k=o.default.useRef(),B=o.default.useRef(M.map(()=>!1)),F=o.default.useRef(M.map(()=>!1)),W=o.default.useRef(B.current.slice(0,M.length-1)),[V,H]=o.default.useState(W.current),[G,K]=o.default.useState(F.current),[z,j]=o.default.useState(B.current);d.panels=[];const U=o.default.useCallback(pe=>(J,le)=>{const ie=le?pe-1:pe,ge=L.current[ie];ge&&ge.setAbsoluteSize(J!==void 0?J:c(M[pe],"defaultSize"),le,D)},[L.current]),$=o.default.useCallback(pe=>(J,le,ie)=>{const ge=ie?pe-1:pe,ee=L.current[ge];ee&&ee.setRelativeSize(J,le)},[L.current]),Y=o.default.useCallback(pe=>J=>{const le=J?pe-1:pe,ie=L.current[le];return ie?ie.getAbsoluteSize(J):0},[L.current]),Q=o.default.useCallback(pe=>J=>{const le=J?pe-1:pe,ie=L.current[le];return ie?ie.getRelativeSize():[0,0]},[L.current]),te=o.default.useCallback(pe=>(J,le)=>{const ie=le?pe-1:pe,ge=W.current.map((ee,X)=>X===ie?J!==void 0?J:!ee:ee);W.current=ge,H(ge)},[L.current]),re=o.default.useCallback(pe=>J=>{const le=B.current.map((ie,ge)=>ge===pe?J!==void 0?J:!ie:ie);B.current=le,j(le)},[L.current]),ae=o.default.useCallback(pe=>J=>{const le=F.current.map((ge,ee)=>ee===pe?J!==void 0?!J:!ge:ge);F.current=le;const ie=c(M[pe],"slot")||c(M[pe],"id");ie&&de(ie),K(le)},[M,F.current]),de=o.default.useCallback(pe=>{pe&&(N.fire(new b.ResizeEvent({slotLocation:pe})),N.fireDirective(b.ResizeEvent.createDirective(pe)))},[N]),q=o.default.useMemo(()=>M.map((pe,J)=>{const le=[],ie=c(pe,"minSize"),ge=c(pe,"maxSize"),ee=c(pe,"flexGrow");if(J!==0){const X=J===1?M[J-1]:M[J];let oe;ee?oe=_.ResizeFlexMode.Prev:c(M[J-1],"flexGrow")&&(oe=_.ResizeFlexMode.Next),c(X,"noResize")||V[J-1]||le.push(o.default.createElement(I,{className:y,onResize:()=>{const he=c(M[J-1],"slot")||c(M[J-1],"id"),ue=c(M[J],"slot")||c(M[J],"id");de(he),de(ue)},noColor:!0,findNextElement:w?he=>d.getFirstResizablePanel(J-1,he):void 0,findPrevElement:w?he=>d.getFirstResizablePanel(J-1,he,!0):void 0,key:`split-handle-${J}`,delegate:he=>{L.current.push(he)},flexMode:oe}))}return le.push(o.default.createElement(e.PanelContext.Provider,{key:J,value:{setSize:U(J),getSize:Y(J),setRelativeSize:$(J),getRelativeSize:Q(J),lockSize:te(J),setMaxSize:re(J),hidePanel:ae(J)}},o.default.createElement("div",{"data-min-resize":c(pe,"minResize"),"data-max-resize":c(pe,"maxResize"),ref:X=>{X&&d.panels.indexOf(X)===-1&&d.panels.push(X)},className:r(pe,P)===`${v}px`?_.RESIZE_LOCK:"",id:c(pe,"id"),style:{...c(pe,"flex")&&!c(pe,"savedSize")&&!O?{flex:c(pe,"flex")}:{[R.size]:r(pe,P)},[R.minSize]:ie?ie+"px":"-1px",[R.maxSize]:z[J]&&ge?ge+"px":"unset",...ee!==void 0?{flexGrow:ee}:{},display:G[J]?"none":"block"}},pe))),le}).filter(Boolean),[A,M,y,w,L.current,G,V]);return o.default.useEffect(()=>{k.current&&d.setRootNode(k.current);const pe=N.onDirective(b.ResizeEvent.createDirective(m),()=>{M.forEach(J=>{de(c(J,"slot")||c(J,"id"))})});return()=>{pe.dispose()}},[]),o.default.useMemo(()=>{const{minResize:pe,flexGrow:J,minSize:le,maxSize:ie,savedSize:ge,defaultSize:ee,flex:X,noResize:oe,slot:se,headerSize:he,...ue}=a;return delete ue.resizeHandleClassName,delete ue.dynamicTarget,delete ue.resizeKeep,delete ue.direction,d.renderSplitPanel(o.default.createElement("div",{...ue,ref:ve=>k.current=ve,className:(0,s.default)(h.default["split-panel"],p),style:{flexDirection:R.direction,...S},"data-min-resize":pe,"data-max-resize":ie,"data-min-size":le,"data-max-size":ie,"data-saved-size":ge,"data-default-size":ee,"data-header-size":he,"data-flex":X,"data-flex-grow":J,"data-no-resize":oe,"data-slot":se}),q,ue)},[d,d.renderSplitPanel,q,k,S,a])};e.SplitPanel=l},71707:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SplitPanelManager=e.SplitPanelService=e.ISplitPanelService=void 0;const n=t(85608),s=n.__importDefault(t(14041)),o=t(76003),f=t(43718),b=t(38578),g=t(73215);e.ISplitPanelService=Symbol("ISplitPanelService");let _=class extends f.Disposable{constructor(h){super(),this.panelId=h,this._whenReadyDeferred=new f.Deferred,this.panels=[]}get isVisible(){return this.rootNode&&this.rootNode.clientHeight>0||!1}get whenReady(){return this._whenReadyDeferred.promise}setRootNode(h){this.rootNode=h,this._whenReadyDeferred.resolve()}getFirstResizablePanel(h,c,r){if(r){if(c){for(let l=h;l>=0;l--)if(!this.panels[l].classList.contains(g.RESIZE_LOCK))return this.panels[l]}else for(let l=h;l>=0;l--)if(!this.panels[l].classList.contains(g.RESIZE_LOCK))return this.panels[l]}else if(c){for(let l=h+1;l<this.panels.length;l++)if(!this.panels[l].classList.contains(g.RESIZE_LOCK))return this.panels[l]}else for(let l=h+1;l<this.panels.length;l++)if(!this.panels[l].classList.contains(g.RESIZE_LOCK))return this.panels[l]}checkChildNoResize(h){var c,r;if(h&&h.type===b.SlotRenderer){const l=(r=this.appConfig.layoutConfig[(c=h.props)===null||c===void 0?void 0:c.slot])===null||r===void 0?void 0:r.modules;if(!l||l.length===0)return!0}return!1}renderSplitPanel(h,c,r){return s.default.cloneElement(h,{...r,...h.props},c)}interceptProps(h){return h}};e.SplitPanelService=_,n.__decorate([(0,o.Autowired)(b.AppConfig),n.__metadata("design:type",Object)],_.prototype,"appConfig",void 0),e.SplitPanelService=_=n.__decorate([(0,o.Injectable)({multiple:!0}),n.__metadata("design:paramtypes",[String])],_);let E=class{constructor(){this.services=new Map}getService(h){let c=this.services.get(h);return c||(c=this.injector.get(e.ISplitPanelService,[h]),this.services.set(h,c)),c}};e.SplitPanelManager=E,n.__decorate([(0,o.Autowired)(o.INJECTOR_TOKEN),n.__metadata("design:type",o.Injector)],E.prototype,"injector",void 0),e.SplitPanelManager=E=n.__decorate([(0,o.Injectable)()],E)},89897:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),t(85608).__exportStar(t(85266),e)},85266:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Loading=void 0;const s=t(85608).__importDefault(t(14041));t(18182);const o=()=>s.default.createElement("div",{className:"loading_indicator "});e.Loading=o,e.Loading.displayName="Loading"},97885:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});const s=t(85608).__importDefault(t(43144)),o=t(48560),f=({id:b,className:g,children:_})=>{const E=(0,o.usePortal)(b,g);return s.default.createPortal(_,E)};e.default=f},73215:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ResizeHandleVertical=e.ResizeHandleHorizontal=e.ResizeFlexMode=e.RESIZE_LOCK=void 0,e.preventWebviewCatchMouseEvents=_,e.allowWebviewCatchMouseEvents=E;const n=t(85608),s=n.__importDefault(t(53373)),o=n.__importDefault(t(14041)),f=t(22366),b=n.__importDefault(t(57482));e.RESIZE_LOCK="resize-lock";var g;(function(c){c.Prev="prev",c.Next="next",c.Percentage="Percentage"})(g||(e.ResizeFlexMode=g={}));function _(){const c=document.getElementsByTagName("iframe"),r=document.getElementsByTagName("webview"),l=document.getElementsByClassName("shadow-root-host");for(const a of r)a.classList.add("none-pointer-event");for(const a of c)a.classList.add("none-pointer-event");for(const a of l)a?.classList.add("none-pointer-event")}function E(){const c=document.getElementsByTagName("iframe"),r=document.getElementsByTagName("webview"),l=document.getElementsByClassName("shadow-root-host");for(const a of r)a.classList.remove("none-pointer-event");for(const a of c)a.classList.remove("none-pointer-event");for(const a of l)a?.classList.remove("none-pointer-event")}const u=c=>{const r=o.default.useRef(),l=o.default.useRef(!1),a=o.default.useRef(0),d=o.default.useRef(0),m=o.default.useRef(0),p=o.default.useRef(),v=o.default.useRef(),y=o.default.useRef(),S=(k,B)=>{const F=c.findPrevElement?c.findPrevElement():p.current,W=c.findNextElement?c.findNextElement():v.current;if(F&&F.classList.contains(e.RESIZE_LOCK)||W&&W.classList.contains(e.RESIZE_LOCK))return;const V=r.current.parentElement.offsetWidth,H=Number(F?.dataset.minResize||0),G=Number(W?.dataset.minResize||0),K=Number(F?.dataset.maxResize||0),z=Number(W?.dataset.maxResize||0);(H||G)&&(k*V<=H||B*V<=G)||(K||z)&&(k*V>=K||B*V>=z)||(W&&(W.style.width=B*100+"%"),F&&(F.style.width=k*100+"%"),c.onResize&&W&&F&&c.onResize(F,W))},A=(k,B,F,W)=>{var V,H;const G=c.findPrevElement?c.findPrevElement(W):p.current,K=c.findNextElement?c.findNextElement(W):v.current,z=Number((V=G?.dataset.minResize)!==null&&V!==void 0?V:0),j=Number((H=K?.dataset.minResize)!==null&&H!==void 0?H:0),U=G?.dataset.maxResize?Number(G?.dataset.maxResize):null,$=K?.dataset.maxResize?Number(K?.dataset.maxResize):null,Y=c.flexMode===g.Prev,Q=Y?G:K,te=Y?K:G;let re=Y?k:B;F||((z||j)&&(Y?z>k?re=z:j>B&&(re=k+B-j):j>B?re=j:z>k&&(re=k+B-z)),(U||$)&&(Y?U&&U<=k?re=U:$&&$>B&&(re=k+B-$):$&&$<=B?re=$:U&&U>B&&(re=k+B-U))),Q.style.width=re+"px",Q.style.flexGrow="0",Q.style.flexShrink="1",te.style.width="0",te.style.flexGrow="1",te.style.flexShrink="0",c.onResize&&K&&G&&c.onResize(G,K)},T=(k,B)=>{const F=p.current,W=v.current;let V;c.flexMode?V=(F.offsetWidth+W.offsetWidth)/F.parentElement.offsetWidth*100:V=+v.current.style.width.replace("%","")+ +p.current.style.width.replace("%",""),W&&(W.style.width=B/(k+B)*V+"%"),F&&(F.style.width=k/(k+B)*V+"%"),D(k,B),c.onResize&&W&&F&&c.onResize(F,W)},D=(k,B)=>{const F=p.current,W=v.current;let V=!1;F&&(k===0?(F.classList.add("kt_display_none"),V=!0):F.classList.remove("kt_display_none")),W&&(B===0?(W.classList.add("kt_display_none"),V=!0):W.classList.remove("kt_display_none")),r.current&&(V?r.current.classList.add("none-pointer-event"):r.current.classList.remove("none-pointer-event"))},w=()=>{const k=p.current.clientWidth,B=v.current.clientWidth,F=k+B,W=[];return W.push(k/F),W.push(B/F),W},I=(k,B)=>{f.fastdom.measure(()=>{const F=p.current.clientWidth,W=v.current.clientWidth,V=F+W;if(c.flexMode){const H=c.flexMode===g.Prev?k:V-k,G=c.flexMode===g.Next?k:V-k;A(H,G,!0)}else{const H=+v.current.style.width.replace("%",""),G=+p.current.style.width.replace("%",""),K=H+G;B?(v.current.style.width=K*(k/V)+"%",p.current.style.width=K*(1-k/V)+"%"):(p.current.style.width=K*(k/V)+"%",v.current.style.width=K*(1-k/V)+"%")}B?D(V-k,k):D(k,V-k),c.onResize&&c.onResize(p.current,v.current)})},R=k=>k?v.current.clientWidth:p.current.clientWidth,M=k=>{const B=k.classList,F=b.default["resize-overflow-hidden"];B?.contains(F)||B.add(F)},O=k=>{const B=k.classList,F=b.default["resize-overflow-hidden"];B?.contains(F)&&B.remove(F)},P=k=>{if(k.preventDefault(),r.current&&r.current.classList.contains("no-resize"))return;const B=d.current+k.pageX-a.current,F=m.current-(k.pageX-a.current);y.current&&y.current.dispose(),y.current=f.fastdom.mutate(()=>{if(c.flexMode)A(B,F);else{const W=r.current.parentElement.offsetWidth;S(B/W,F/W)}})},L=()=>{l.current=!1,document.removeEventListener("mousemove",P),document.removeEventListener("mouseup",L),c.onFinished&&c.onFinished(),f.fastdom.mutate(()=>{var k;(k=r.current)===null||k===void 0||k.classList.remove(b.default.active),O(p.current),O(v.current),E()})},N=k=>{l.current=!0,document.addEventListener("mousemove",P),document.addEventListener("mouseup",L),a.current=k.pageX,f.fastdom.measure(()=>{d.current=p.current.offsetWidth,m.current=v.current.offsetWidth,f.fastdom.mutate(()=>{var B;(B=r.current)===null||B===void 0||B.classList.add(b.default.active),M(p.current),M(v.current),_()})})};return o.default.useEffect(()=>(r.current&&(r.current.addEventListener("mousedown",N),p.current=r.current.previousSibling,v.current=r.current.nextSibling),()=>{r.current&&(r.current.removeEventListener("mousedown",N),r.current.removeEventListener("mousemove",P),r.current.removeEventListener("mouseup",L))}),[]),c.delegate&&c.delegate({setSize:S,setAbsoluteSize:I,getAbsoluteSize:R,setRelativeSize:T,getRelativeSize:w}),o.default.createElement("div",{ref:k=>{r.current=k},className:(0,s.default)({[b.default["resize-handle-horizontal"]]:!0,[b.default["with-color"]]:!c.noColor,[c.className||""]:!0})})};e.ResizeHandleHorizontal=u;const h=c=>{const r=o.default.useRef(),l=o.default.useRef(!1),a=o.default.useRef(0),d=o.default.useRef(0),m=o.default.useRef(0),p=o.default.useRef(),v=o.default.useRef(),y=o.default.useRef(),S=o.default.useRef(),A=(k,B,F)=>{const W=c.findPrevElement?c.findPrevElement(F):p.current,V=c.findNextElement?c.findNextElement(F):v.current;!V||!W||W.classList.contains(e.RESIZE_LOCK)||V.classList.contains(e.RESIZE_LOCK)||(V.style.height=B*100+"%",W.style.height=k*100+"%",c.onResize&&c.onResize(W,V))},T=(k,B,F,W)=>{var V,H;const G=c.findPrevElement?c.findPrevElement(W):p.current,K=c.findNextElement?c.findNextElement(W):v.current;let z,j,U=0;const $=Number(((V=G?.dataset)===null||V===void 0?void 0:V.minResize)||0),Y=Number(((H=K?.dataset)===null||H===void 0?void 0:H.minResize)||0);c.flexMode===g.Prev?(z=G,j=K,U=k,F||($>k?U=$:Y>B&&(U=k+B-Y))):(z=K,j=G,U=B,F||(Y>B?U=Y:$>k&&(U=k+B-$))),z.style.height=U+"px",z.style.flexGrow="0",z.style.flexShrink="1",j.style.height="0",j.style.flexGrow="1",j.style.flexShrink="0",c.onResize&&K&&G&&c.onResize(G,K)},D=(k,B)=>{const F=p.current,W=v.current;let V;c.flexMode?V=(F.offsetHeight+W.offsetHeight)/F.parentElement.offsetHeight*100:V=+W.style.height.replace("%","")+ +F.style.height.replace("%",""),W&&(W.style.height=B/(k+B)*V+"%"),F&&(F.style.height=k/(k+B)*V+"%"),w(k,B),c.onResize&&W&&F&&c.onResize(F,W)},w=(k,B)=>{const F=p.current,W=v.current;let V=!1;F&&(k===0?(F.classList.add("kt_display_none"),V=!0):F.classList.remove("kt_display_none")),W&&(B===0?(W.classList.add("kt_display_none"),V=!0):W.classList.remove("kt_display_none")),r.current&&(V?r.current.classList.add("none-pointer-event"):r.current.classList.remove("none-pointer-event"))},I=()=>{const k=p.current.clientHeight,B=v.current.clientHeight,F=k+B,W=[];return W.push(k/F),W.push(B/F),W},R=(k,B,F,W)=>{F.classList.contains(e.RESIZE_LOCK)||W.classList.contains(e.RESIZE_LOCK)||(W.style.height=B+"px",F.style.height=k+"px",W.style.flex="unset",F.style.flex="unset",c.onResize&&W&&F&&c.onResize(F,W))},M=(k,B,F)=>{const W=p.current.clientHeight,V=v.current.clientHeight,H=W+V;if(c.flexMode){const G=c.flexMode===g.Prev?k:H-k,K=c.flexMode===g.Next?k:H-k;T(G,K,!0)}else{const G=+v.current.style.height.replace(/\%|px/,""),K=+p.current.style.height.replace(/\%|px/,""),z=G+K;if(B){F&&(p.current.style.height=z*(1-k/H)+"%");const j=z*(k/H);v.current.style.height=j===0?j+"px":j+"%"}else p.current.style.height=z*(k/H)+"%",F&&(v.current.style.height=z*(1-k/H)+"%")}B?w(H-k,k):w(k,H-k),c.onResize&&c.onResize(p.current,v.current)},O=k=>k?v.current.clientHeight:p.current.clientHeight,P=k=>{l.current=!0,document.addEventListener("mousemove",L),document.addEventListener("mouseup",N),a.current=k.pageY,S.current=v.current,y.current=p.current,f.fastdom.measure(()=>{d.current=p.current.offsetHeight,m.current=v.current.offsetHeight,f.fastdom.mutate(()=>{var B;(B=r.current)===null||B===void 0||B.classList.add(b.default.active),_()})})},L=k=>{k.preventDefault(),!(r.current&&r.current.classList.contains("no-resize"))&&f.fastdom.measure(()=>{const B=k.pageY>a.current,F=c.findNextElement?c.findNextElement(B):null,W=c.findPrevElement?c.findPrevElement(B):null;if(F!==null&&S.current!==F||W!==null&&y.current!==W){if(!F||!W)return;S.current=F,y.current=W,a.current=k.pageY,d.current=y.current.offsetHeight,m.current=S.current.offsetHeight}const V=d.current+k.pageY-a.current,H=m.current-(k.pageY-a.current),G=Number(y.current.dataset.minResize||0),K=Number(S.current.dataset.minResize||0);(G||K)&&(V<=G||H<=K)||f.fastdom.mutate(()=>{if(c.flexMode===g.Prev||c.flexMode===g.Next)T(V,H);else if(c.flexMode===g.Percentage){const z=r.current.parentElement.offsetHeight;A(V/z,H/z)}else R(V,H,y.current,S.current)})})},N=k=>{l.current=!1,document.removeEventListener("mousemove",L),document.removeEventListener("mouseup",N),f.fastdom.mutate(()=>{var B;(B=r.current)===null||B===void 0||B.classList.remove(b.default.active),c.onFinished&&c.onFinished(),E()})};return o.default.useEffect(()=>(r.current.addEventListener("mousedown",P),p.current=r.current.previousSibling,v.current=r.current.nextSibling,()=>{r.current.removeEventListener("mousedown",P),document.removeEventListener("mousemove",L),document.removeEventListener("mouseup",N)}),[]),c.delegate&&c.delegate({setSize:A,setAbsoluteSize:M,getAbsoluteSize:O,setRelativeSize:D,getRelativeSize:I}),o.default.createElement("div",{ref:k=>k&&(r.current=k),className:(0,s.default)({[b.default["resize-handle-vertical"]]:!0,[c.className||""]:!0,[b.default["with-color"]]:!c.noColor})})};e.ResizeHandleVertical=h},77331:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Select=void 0;const n=t(85608),s=n.__importDefault(t(53373)),o=n.__importDefault(t(14041));n.__exportStar(t(88706),e);const f=b=>(b={...b,className:(0,s.default)("kt_select",b.className)},o.default.createElement("select",{...b}));e.Select=f},53736:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ContextKeyChangeEvent=e.IContextKeyService=void 0;const n=t(43718);e.IContextKeyService=Symbol("IContextKeyService");class s extends n.BasicEvent{}e.ContextKeyChangeEvent=s},50394:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MultiLineEditsIsVisible=e.InlineDiffPartialEditsIsVisible=e.InlineInputWidgetIsVisible=e.InlineHintWidgetIsVisible=e.InlineCompletionIsTrigger=e.InlineChatIsVisible=void 0;const n=t(40191);e.InlineChatIsVisible=new n.RawContextKey("ai.native.inlineChatIsVisible",!1),e.InlineCompletionIsTrigger=new n.RawContextKey("ai.native.inlineCompletionIsTrigger",!1),e.InlineHintWidgetIsVisible=new n.RawContextKey("ai.native.inlineHintWidgetIsVisible",!1),e.InlineInputWidgetIsVisible=new n.RawContextKey("ai.native.inlineInputWidgetIsVisible",!1),e.InlineDiffPartialEditsIsVisible=new n.RawContextKey("ai.native.inlineDiffPartialEditsIsVisible",!1),e.MultiLineEditsIsVisible=new n.RawContextKey("ai.native.multiLineEditsIsVisible",!1)},20162:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.FileDialogViewVisibleContext=e.DialogViewVisibleContext=void 0;const n=t(40191);e.DialogViewVisibleContext=new n.RawContextKey("dialogViewVisible",!1),e.FileDialogViewVisibleContext=new n.RawContextKey("fileDialogViewVisible",!1)},16413:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ExplorerCompressedLastFocusContext=e.ExplorerCompressedFirstFocusContext=e.ExplorerCompressedFocusContext=e.FilesExplorerFilteredContext=e.FilesExplorerInputFocusedContext=e.FilesExplorerFocusedContext=e.ExplorerFilteredContext=e.ExplorerFocusedContext=e.ExplorerResourceCut=e.ExplorerViewletVisibleContext=e.ExplorerResourceIsFolderContext=void 0;const n=t(40191);e.ExplorerResourceIsFolderContext=new n.RawContextKey("explorerResourceIsFolder",!1),e.ExplorerViewletVisibleContext=new n.RawContextKey("explorerViewletVisible",!0),e.ExplorerResourceCut=new n.RawContextKey("explorerResourceCut",!1),e.ExplorerFocusedContext=new n.RawContextKey("explorerViewletFocus",!1),e.ExplorerFilteredContext=new n.RawContextKey("explorerViewletFilter",!1),e.FilesExplorerFocusedContext=new n.RawContextKey("filesExplorerFocus",!1),e.FilesExplorerInputFocusedContext=new n.RawContextKey("filesExplorerInputFocus",!1),e.FilesExplorerFilteredContext=new n.RawContextKey("filesExplorerFilteredContext",!1),e.ExplorerCompressedFocusContext=new n.RawContextKey("explorerViewletCompressedFocus",!1),e.ExplorerCompressedFirstFocusContext=new n.RawContextKey("explorerViewletCompressedFirstFocus",!1),e.ExplorerCompressedLastFocusContext=new n.RawContextKey("explorerViewletCompressedLastFocus",!1)},66e3:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});const n=t(85608);n.__exportStar(t(16413),e),n.__exportStar(t(91830),e),n.__exportStar(t(29906),e),n.__exportStar(t(96774),e),n.__exportStar(t(73537),e),n.__exportStar(t(20162),e)},379:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ShowExcludedFilesFilterContextKey=e.ShowActiveFileFilterContextKey=e.ShowInfoFilterContextKey=e.ShowWarningsFilterContextKey=e.ShowErrorsFilterContextKey=e.RelatedInformationFocusContextKey=e.MarkerViewFilterFocusContextKey=e.MarkerFocusContextKey=e.MarkersTreeVisibilityContextKey=void 0;const n=t(40191);e.MarkersTreeVisibilityContextKey=new n.RawContextKey("problemsVisibility",!1),e.MarkerFocusContextKey=new n.RawContextKey("problemFocus",!1),e.MarkerViewFilterFocusContextKey=new n.RawContextKey("problemsFilterFocus",!1),e.RelatedInformationFocusContextKey=new n.RawContextKey("relatedInformationFocus",!1),e.ShowErrorsFilterContextKey=new n.RawContextKey("problems.filter.errors",!0),e.ShowWarningsFilterContextKey=new n.RawContextKey("problems.filter.warnings",!0),e.ShowInfoFilterContextKey=new n.RawContextKey("problems.filter.info",!0),e.ShowActiveFileFilterContextKey=new n.RawContextKey("problems.filter.activeFile",!1),e.ShowExcludedFilesFilterContextKey=new n.RawContextKey("problems.filter.excludedFiles",!0)},96774:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.OutlineFollowCursorContext=e.OutlineSortTypeContext=void 0;const n=t(40191);e.OutlineSortTypeContext=new n.RawContextKey("outlineSortType",0),e.OutlineFollowCursorContext=new n.RawContextKey("outlineFollowCursor",!1)},91830:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ResourceContextKey=void 0;const n=t(43718),s=t(63214);class o{constructor(b,g=s.getLanguageIdFromMonaco,_="resource"){if(this.contextKeyService=b,this.languageResolver=g,!_)throw new Error("resource key prefix cannot be empty!");this.resourceScheme=this.contextKeyService.createKey(_+"Scheme",""),this.resourceFilename=this.contextKeyService.createKey(_+"Filename",""),this.resourceExtname=this.contextKeyService.createKey(_+"Extname",""),this.resourceLangId=this.contextKeyService.createKey(_+"LangId",""),this.resourceKey=this.contextKeyService.createKey(_,""),this.isFileSystemResource=this.contextKeyService.createKey("isFileSystem"+_.substr(0,1).toUpperCase()+_.substr(1),!1)}set(b){if(!b){this.reset();return}const g=this.resourceKey.get();b.isEqual(new n.URI(g))||(this.resourceScheme.set(b.scheme),this.resourceFilename.set(b.path.name+b.path.ext),this.resourceExtname.set(b.path.ext),this.resourceLangId.set(this.languageResolver(b)),this.resourceKey.set(b.toString()),this.isFileSystemResource.set(b.scheme===n.Schemes.file))}reset(){this.resourceScheme.set(""),this.resourceFilename.set(""),this.resourceExtname.set(""),this.resourceLangId.set(""),this.resourceKey.set(""),this.isFileSystemResource.set(!1)}}e.ResourceContextKey=o},67386:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.InTreeViewKey=e.ViewHasSomeCollapsibleKey=e.ViewHasFilePatternKey=e.ViewHasReplacePatternKey=e.ViewHasSearchPatternKey=e.MatchFocusKey=e.ResourceFolderFocusKey=e.FolderFocusKey=e.FileFocusKey=e.FileMatchOrFolderMatchWithResourceFocusKey=e.FileMatchOrFolderMatchFocusKey=e.FileMatchOrMatchFocusKey=e.FirstMatchFocusKey=e.ReplaceActiveKey=e.PatternExcludesFocusedKey=e.PatternIncludesFocusedKey=e.InputBoxFocusedKey=e.SearchViewVisibleKey=e.HasSearchResults=e.ReplaceInputBoxFocusedKey=e.SearchInputBoxFocusedKey=e.SearchViewFocusedKey=void 0;const n=t(40191);e.SearchViewFocusedKey=new n.RawContextKey("searchViewletFocus",!1),e.SearchInputBoxFocusedKey=new n.RawContextKey("searchInputBoxFocus",!1),e.ReplaceInputBoxFocusedKey=new n.RawContextKey("replaceInputBoxFocus",!1),e.HasSearchResults=new n.RawContextKey("hasSearchResult",!1),e.SearchViewVisibleKey=new n.RawContextKey("searchViewletVisible",!0),e.InputBoxFocusedKey=new n.RawContextKey("inputBoxFocus",!1),e.PatternIncludesFocusedKey=new n.RawContextKey("patternIncludesInputBoxFocus",!1),e.PatternExcludesFocusedKey=new n.RawContextKey("patternExcludesInputBoxFocus",!1),e.ReplaceActiveKey=new n.RawContextKey("replaceActive",!1),e.FirstMatchFocusKey=new n.RawContextKey("firstMatchFocus",!1),e.FileMatchOrMatchFocusKey=new n.RawContextKey("fileMatchOrMatchFocus",!1),e.FileMatchOrFolderMatchFocusKey=new n.RawContextKey("fileMatchOrFolderMatchFocus",!1),e.FileMatchOrFolderMatchWithResourceFocusKey=new n.RawContextKey("fileMatchOrFolderMatchWithResourceFocus",!1),e.FileFocusKey=new n.RawContextKey("fileMatchFocus",!1),e.FolderFocusKey=new n.RawContextKey("folderMatchFocus",!1),e.ResourceFolderFocusKey=new n.RawContextKey("folderMatchWithResourceFocus",!1),e.MatchFocusKey=new n.RawContextKey("matchFocus",!1),e.ViewHasSearchPatternKey=new n.RawContextKey("viewHasSearchPattern",!1),e.ViewHasReplacePatternKey=new n.RawContextKey("viewHasReplacePattern",!1),e.ViewHasFilePatternKey=new n.RawContextKey("viewHasFilePattern",!1),e.ViewHasSomeCollapsibleKey=new n.RawContextKey("viewHasSomeCollapsibleResult",!1),e.InTreeViewKey=new n.RawContextKey("inTreeView",!1)},29906:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ShellExecutionSupported=e.IsTerminalFocused=e.IsTerminalViewInitialized=void 0;const n=t(40191);e.IsTerminalViewInitialized=new n.RawContextKey("isTerminalViewInitialized",!1),e.IsTerminalFocused=new n.RawContextKey("isTerminalFocused",!1),e.ShellExecutionSupported=new n.RawContextKey("shellExecutionSupported",!0)},12288:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TestingCanRefreshTests=e.TestingIsPeekVisible=e.TestingIsInPeek=e.TestingIsRunning=e.TestingHasAnyResults=e.TestingServiceHasDebuggableContextKey=e.TestingServiceProviderCount=void 0;const n=t(40191);e.TestingServiceProviderCount=new n.RawContextKey("service.testing.providerCount",0),e.TestingServiceHasDebuggableContextKey=new n.RawContextKey("service.testing.hasDebuggableContext",!1),e.TestingHasAnyResults=new n.RawContextKey("testing.hasAnyResults",!1),e.TestingIsRunning=new n.RawContextKey("testing.isRunning",!1),e.TestingIsInPeek=new n.RawContextKey("testing.isInPeek",!0),e.TestingIsPeekVisible=new n.RawContextKey("testing.isPeekVisible",!1),e.TestingCanRefreshTests=new n.RawContextKey("testing.canRefresh",!1)},73537:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.VirtualWorkspace=e.WorkspaceTrusted=e.WorkspaceFolderCount=e.WorkbenchState=void 0;const n=t(40191);e.WorkbenchState=new n.RawContextKey("workbenchState","empty"),e.WorkspaceFolderCount=new n.RawContextKey("workspaceFolderCount",0),e.WorkspaceTrusted=new n.RawContextKey("isWorkspaceTrusted",!0),e.VirtualWorkspace=new n.RawContextKey("virtualWorkspace",!1)},18193:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CorePreferences=e.corePreferenceSchema=e.FILE_TREE_DEFAULTS=e.FILES_DEFAULTS=void 0,e.injectCorePreferences=b;const n=t(43718),s=t(69734),o=t(78132),f={confirmDelete:!0,confirmMove:!0};e.FILES_DEFAULTS={filesWatcherExclude:{"**/.git/objects/**":!0,"**/.git/subtree-cache/**":!0,"**/node_modules/**/*":!0,"**/.hg/store/**":!0},filesExclude:{"**/.git":!0,"**/.svn":!0,"**/.hg":!0,"**/CVS":!0,"**/.DS_Store":!0}},e.FILE_TREE_DEFAULTS={baseIndent:10,indent:8},e.corePreferenceSchema={type:"object",properties:{[n.GeneralSettingsId.Language]:{type:"string",enum:(0,n.getAvailableLanguages)().map(g=>g.languageId),default:s.LOCALE_TYPES.EN_US},[n.GeneralSettingsId.Theme]:{type:"string",default:"vs-dark",enum:[]},"general.askReloadOnLanguageChange":{type:"boolean",default:!0,description:"%preference.description.general.askReloadOnLanguageChange%"},[n.GeneralSettingsId.Icon]:{type:"string",default:"vs-minimal",enum:[]},[n.GeneralSettingsId.ProductIconTheme]:{type:"string",default:"opensumi-icons",enum:["opensumi-icons"]},"workbench.colorCustomizations":{type:"object",description:"%preference.workbench.colorCustomizations%",default:{}},"application.supportsOpenFolder":{type:"boolean",default:!1,description:"Whether default open folder behavior is supported"},"application.supportsOpenWorkspace":{type:"boolean",default:!1,description:"Whether default open workspace behavior is supported"},"application.confirmExit":{type:"string",enum:["never","ifRequired","always"],default:"always",description:"When to confirm before closing the application window."},"application.preferMarkdownPreview":{type:"boolean",default:!1,description:"Use markdown preview first"},"application.invalidExthostReload":{type:"string",enum:["ifRequired","always"],default:"ifRequired",description:"Reload strategy when exthost process became invalid."},"workbench.list.openMode":{type:"string",enum:["singleClick","doubleClick"],default:"singleClick",description:"%preference.workbench.list.openMode%"},"workbench.commandPalette.history":{type:"number",default:50,minimum:0,description:"Controls the number of recently used commands to keep in history for the command palette. Set to 0 to disable command history."},"workbench.refactoringChanges.showPreviewStrategy":{type:"string",default:"askMe",enum:["show","hide","askMe"],description:"%preference.workbench.refactoringChanges.showPreviewStrategy%"},"workbench.quickOpen.preserveInput":{type:"boolean",default:!0,description:"%workbench.quickOpen.preserveInput%"},"workbench.hideSlotTabBarWhenHidePanel":{type:"boolean",default:!1,description:"%workbench.hideSlotTabBarWhenHidePanel%"},"explorer.confirmMove":{type:"boolean",default:f.confirmDelete,description:"%preference.explorer.confirm.move%"},"explorer.confirmDelete":{type:"boolean",default:f.confirmMove,description:"%preference.explorer.confirm.delete%"},"explorer.fileTree.baseIndent":{type:"number",default:e.FILE_TREE_DEFAULTS.baseIndent},"explorer.fileTree.indent":{type:"number",default:e.FILE_TREE_DEFAULTS.indent},"explorer.compactFolders":{type:"boolean",description:"%preference.explorer.compactFolders%",default:!0},"explorer.autoReveal":{type:"boolean",default:!0},"debug.toolbar.float":{type:"boolean",default:!0},"debug.breakpoint.editorHint":{type:"boolean",default:!0,description:"%preference.debug.breakpoint.editorHint%"},"debug.breakpoint.showBreakpointsInOverviewRuler":{type:"boolean",default:!1,description:"%preference.debug.breakpoint.showBreakpointsInOverviewRuler%"},"debug.toolbar.top":{type:"number",default:0,description:"%preference.debug.toolbar.top%"},"debug.toolbar.height":{type:"number",default:30,description:"%preference.debug.toolbar.height%"},"debug.console.filter.mode":{type:"string",enum:["filter","matcher"],default:"filter"},"files.exclude":{type:"object",description:"%preference.files.exclude%",default:e.FILES_DEFAULTS.filesExclude,additionalProperties:{anyOf:[{type:"boolean",description:(0,n.localize)("files.exclude.boolean","The glob pattern to match file paths against. Set to true or false to enable or disable the pattern.")}]}},"files.watcherExclude":{type:"object",default:e.FILES_DEFAULTS.filesWatcherExclude,description:"%preference.files.watcherExclude%"},"files.associations":{type:"object",markdownDescription:"%preference.files.associations%"},"files.encoding":{type:"string",description:"%preference.files.encoding%",default:"utf8",enum:Object.keys(n.SUPPORTED_ENCODINGS)},"files.eol":{type:"string",enum:[`
28102
+ `)}return d}),`{"type": 1, "id": "${c}", "proxyId": "${r}", "method": "${l}", "args": ${JSON.stringify(a,g.replacer)}}`}static serializeReplyOK(c,r,l){if(typeof r>"u")return`{"type": 2, "id": "${c}"}`;try{return`{"type": 2, "id": "${c}", "res": ${JSON.stringify(r,g.replacer)}}`}catch{return l&&l.warn("res",r),`{"type": 2, "id": "${c}", "res": {}}`}}static serializeReplyError(c,r,l){try{return`{"type": 3, "id": "${c}", "res": ${JSON.stringify((0,n.transformErrorForSerialization)(r),g.replacer)}}`}catch{return l&&l.error("error",r),`{"type": 3, "id": "${c}", "res": {}}`}}}e.MessageIO=_;function E(){const h=new Error("Canceled");return h.name=h.message,h}class u{constructor(c,r){this._protocol=c,this._locals=new Map,this._proxies=new Map,this._pendingRPCReplies=new Map,this._cancellationTokenSources=new Map,this._timeoutHandles=new Map,this._lastMessageId=0,this.logger=r||console,this.logger.error("You are using the deprecated class: 'RPCProtocol'. Please use the new one: 'SumiConnectionMultiplexer'"),this._protocol.onMessage(l=>this._receiveOneMessage(l))}set(c,r){return this._locals.set(c.serviceId,r),r}get(c){return this._locals.get(c.serviceId)}getProxy(c){return this._proxies.has(c.serviceId)||this._proxies.set(c.serviceId,this._createProxy(c.serviceId)),this._proxies.get(c.serviceId)}_createProxy(c){const r={get:(l,a)=>typeof a=="symbol"?null:(!l[a]&&a.charCodeAt(0)===36&&(l[a]=(...d)=>this._remoteCall(c,a,d)),l[a])};return new Proxy(Object.create(null),r)}_remoteCall(c,r,l){const a=l.length&&n.CancellationToken.isCancellationToken(l[l.length-1])?l.pop():void 0;if(a&&a.isCancellationRequested)return Promise.reject(E());const d=String(++this._lastMessageId),m=new n.Deferred;a&&(l.push("add.cancellation.token"),a.onCancellationRequested(()=>this._protocol.send(_.cancel(d)))),this._pendingRPCReplies.set(d,m);const p=_.serializeRequest(d,c,r,l);if(this._protocol.send(p),this._protocol.timeout&&this._protocol.timeout!==-1){const v=setTimeout(()=>{this._handleTimeout(d)},this._protocol.timeout);this._timeoutHandles.set(d,v)}return m.promise}_receiveOneMessage(c){const r=JSON.parse(c,g.reviver);switch(this._timeoutHandles.has(r.id)&&(typeof clearTimeout=="function"&&clearTimeout(this._timeoutHandles.get(r.id)),this._timeoutHandles.delete(r.id)),r.type){case 1:this._receiveRequest(r);break;case 2:this._receiveReply(r);break;case 4:this._receiveCancel(r);break;case 3:this._receiveError(r);break}}_receiveCancel(c){const r=this._cancellationTokenSources.get(c.id);r&&r.cancel()}_receiveError(c){const r=c.id;if(!this._pendingRPCReplies.has(r))return;const l=this._pendingRPCReplies.get(r);this._pendingRPCReplies.delete(r);let a;c.res&&(c.res.$isError?(a=new Error,a.name=c.res.name,a.message=c.res.message,a.stack=c.res.stack):a=c.res),l.reject(a)}_receiveRequest(c){const r=c.id,l=c.proxyId,a=c.method,d=c.args.map(v=>v===null?void 0:v);if(d.length&&d[d.length-1]==="add.cancellation.token"?d.pop():!1){const v=new n.CancellationTokenSource;this._cancellationTokenSources.set(r,v),d.push(v.token)}this._invokeHandler(l,a,d).then(v=>{this._protocol.send(_.serializeReplyOK(r,v)),this._cancellationTokenSources.delete(r)}).catch(v=>{this._protocol.send(_.serializeReplyError(r,v)),this._cancellationTokenSources.delete(r)})}_invokeHandler(c,r,l){try{return this._doInvokeHandler(c,r,l)}catch(a){return Promise.reject(a)}}async _doInvokeHandler(c,r,l){const a=this._locals.get(c);if(!a)throw new Error("Unknown actor "+c);const d=await a[r];if(typeof d!="function")throw new Error("Unknown method "+r+" on actor "+c);return d.apply(a,l)}_receiveReply(c){const r=c.id;if(!this._pendingRPCReplies.has(r))return;const l=this._pendingRPCReplies.get(r);this._pendingRPCReplies.delete(r),l.resolve(c.res)}_handleTimeout(c){if(!this._pendingRPCReplies.has(c)||!this._timeoutHandles.has(c))return;const r=this._pendingRPCReplies.get(c);this._pendingRPCReplies.delete(c),this._timeoutHandles.delete(c),r.reject(new Error("RPC Timeout: "+c))}}e.RPCProtocol=u},64592:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.furySerializer=e.CloseProtocol=e.BinaryProtocol=e.DataProtocol=e.ErrorProtocol=e.ServerReadyProtocol=e.OpenProtocol=e.PongProtocol=e.PingProtocol=void 0;const n=t(26387),s=t(94846);function o(){return{id:n.Type.string()}}e.PingProtocol=n.Type.object("ping",{...o()}),e.PongProtocol=n.Type.object("pong",{...o()}),e.OpenProtocol=n.Type.object("open",{...o(),clientId:n.Type.string(),path:n.Type.string(),traceId:n.Type.string()}),e.ServerReadyProtocol=n.Type.object("server-ready",{...o(),traceId:n.Type.string()}),e.ErrorProtocol=n.Type.object("error",{...o(),code:n.Type.uint16(),message:n.Type.string()}),e.DataProtocol=n.Type.object("data",{...o(),content:n.Type.string()}),e.BinaryProtocol=n.Type.object("binary",{...o(),binary:n.Type.binary()}),e.CloseProtocol=n.Type.object("close",{...o(),code:n.Type.uint32(),reason:n.Type.string()});const f=(0,s.oneOf)([e.PingProtocol,e.PongProtocol,e.OpenProtocol,e.ServerReadyProtocol,e.DataProtocol,e.BinaryProtocol,e.CloseProtocol,e.ErrorProtocol]);e.furySerializer=f},54558:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.wrapSerializer=void 0;const n=t(85608);n.__exportStar(t(64592),e),n.__exportStar(t(43620),e),n.__exportStar(t(41619),e);const s=(o,f)=>({onceClose(b){return o.onceClose(b)},onMessage(b){return o.onMessage(g=>{b(f.deserialize(g))})},send(b){o.send(f.serialize(b))}});e.wrapSerializer=s},43620:(x,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.rawSerializer=void 0,e.rawSerializer={serialize:t=>t,deserialize:t=>t}},41619:(x,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})},76271:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.RPCServiceChannelPath=e.BaseCommonChannelHandler=e.CommonChannelPathHandler=void 0,e.injectConnectionProviders=_;const n=t(39048),s=t(54558),o=t(47561);class f{constructor(){this.handlerMap=new Map,this.paramsKey=new Map}register(u,h){const c=u.indexOf("/:"),r=c>=0;let l=u;r&&(l=u.slice(0,c),this.paramsKey.set(l,u.slice(c+2))),this.handlerMap.has(l)||this.handlerMap.set(l,[]);const a=this.handlerMap.get(l),d=h.handler.bind(h),m=(p,v,y)=>{h.connection=p,d(p,v,y)};h.handler=m,a.push(h),this.handlerMap.set(l,a)}getParams(u,h){const c={};if(this.paramsKey.has(u)){const r=this.paramsKey.get(u);r&&(c[r]=h)}return c}removeHandler(u,h){const c=u.indexOf(":"),r=c>=0;let l=u;r&&(l=u.slice(0,c));const a=this.handlerMap.get(l)||[],d=a.indexOf(h);d!==-1&&a.splice(d,1),this.handlerMap.set(u,a)}get(u){return this.handlerMap.get(u)}disposeConnectionClientId(u,h){this.handlerMap.forEach(c=>{c.forEach(r=>{r.dispose(u,h)})})}openChannel(u,h,c){let r=this.get(u),l;if(!r){const a=u.indexOf("/");a>=0&&(r=this.get(u.slice(0,a)),l=this.getParams(u.slice(0,a),u.slice(a+1)))}if(r)for(let a=0,d=r.length;a<d;a++)r[a].handler(h,c,l)}getAll(){return Array.from(this.handlerMap.values())}}e.CommonChannelPathHandler=f;var b;(function(E){E[E.ConnectionClosed=1]="ConnectionClosed",E[E.NewChannelOpened=2]="NewChannelOpened"})(b||(b={}));class g{constructor(u,h,c=console,r={}){this.handlerId=u,this.commonChannelPathHandler=h,this.logger=c,this.channelMap=new Map,this.heartbeatTimer=null,this.serializer=s.furySerializer,r.serializer&&(this.serializer=r.serializer)}heartbeat(u){this.heartbeatTimer&&clearTimeout(this.heartbeatTimer),this.heartbeatTimer=setTimeout(()=>{this.doHeartbeat(u),this.heartbeat(u)},5e3)}receiveConnection(u){let h;this.heartbeat(u);const c=(0,s.wrapSerializer)(u,this.serializer);c.onMessage(r=>{try{switch(r.kind){case"open":{const{id:l,path:a,traceId:d}=r;h=r.clientId,this.logger.log(`open a new connection channel ${h} with path ${a}`);let m=this.channelMap.get(l);m&&(m.close(b.NewChannelOpened,"new channel opened for the same channel id"),m.dispose()),m=new o.WSServerChannel(c,{id:l,clientId:h,logger:this.logger}),this.channelMap.set(l,m),this.commonChannelPathHandler.openChannel(a,m,h),m.serverReady(d);break}default:{const{id:l}=r,a=this.channelMap.get(l);a?a.dispatch(r):(c.send({kind:"error",id:l,code:n.ErrorMessageCode.ChannelNotFound,message:`channel ${l} not found`}),this.logger.warn(`channel ${l} is not found`))}}}catch(l){this.logger.error("handle connection message error",l)}}),u.onceClose(()=>{this.logger.log(`connection ${h} is closed, dispose all channels`),this.commonChannelPathHandler.disposeConnectionClientId(u,h),Array.from(this.channelMap.values()).filter(r=>r.clientId===h).forEach(r=>{r.close(b.ConnectionClosed,"connection closed"),r.dispose(),this.channelMap.delete(r.id),this.logger.log(`Remove connection channel ${r.id}`)})})}dispose(){this.heartbeatTimer&&clearTimeout(this.heartbeatTimer)}}e.BaseCommonChannelHandler=g,e.RPCServiceChannelPath="RPCService";function _(E){const u=new f;E.addProviders({token:f,useValue:u})}},8140:(x,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ServiceType=void 0;var t;(function(n){n[n.Service=0]="Service",n[n.Stub=1]="Stub"})(t||(e.ServiceType=t={}))},47561:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.WSServerChannel=e.WSChannel=void 0;const n=t(40396),s=t(43718),o=t(39048),f=t(97349);var b;(function(u){u[u.ReSend=0]="ReSend",u[u.Sended=1]="Sended",u[u.Success=2]="Success",u[u.Failed=3]="Failed"})(b||(b={}));class g{constructor(){this.map=new Map,this.deliveryTimeout=500,this.timerMap=new Map}setDeliveryTimeout(h){this.deliveryTimeout=h}set(h,c){this.map.set(h,c)}get(h){return this.map.get(h)}success(h){this.map.set(h,b.Success);const c=this.timerMap.get(h);c&&clearTimeout(c)}dispose(){this.timerMap.forEach(h=>{clearTimeout(h)})}stop(h){const c=this.timerMap.get(h);c&&clearTimeout(c)}send(h,c){this.set(h,b.Sended),this.guard(h,c)}guard(h,c){const r=this.timerMap.get(h);r&&clearTimeout(r);const l=setTimeout(()=>{this.set(h,b.ReSend),c.whenRetry()},this.deliveryTimeout);this.timerMap.set(h,l)}}class _{constructor(h,c){this.connection=h,this._disposables=new s.DisposableStore,this.emitter=this._disposables.add(new n.EventEmitter),this.onBinaryQueue=this._disposables.add(new s.EventQueue),this.sendQueue=[],this._isServerReady=!1,this.stateTracer=new g,this.LOG_TAG="[WSChannel]",this.logger=console;const{id:r,logger:l,ensureServerReady:a}=c;this.id=r,this.LOG_TAG=`[WSChannel id:${this.id}]`,l&&(this.logger=l),this._ensureServerReady=!!a,c.deliveryTimeout&&this.stateTracer.setDeliveryTimeout(c.deliveryTimeout),this._disposables.add(this.emitter.on("binary",d=>this.onBinaryQueue.push(d)))}inqueue(h){if(this._ensureServerReady&&!this._isServerReady){this.sendQueue||(this.sendQueue=[]),this.sendQueue.push(h);return}this.connection.send(h)}ensureMessageDeliveried(h,c=(0,s.randomString)(16)){const r=this.stateTracer.get(c);if(r&&r>=b.Sended){this.logger.error(`message already send already success or in progress, traceId: ${c}, state: ${r}`);return}h.traceId=c,this.connection.send(h),this.stateTracer.send(c,{whenRetry:()=>{if(this._isServerReady){this.stateTracer.stop(c);return}this.ensureMessageDeliveried(h,c)}})}onMessage(h){return this.emitter.on("message",h)}onBinary(h){return this.onBinaryQueue.on(h)}onOpen(h){return this.emitter.on("open",h)}onReopen(h){return this.emitter.on("reopen",h)}pause(){this._isServerReady=!1}onServerReady(h){if(this._isServerReady){h();return}return this.emitter.on("open",h)}resume(){if(this._isServerReady=!0,this.sendQueue){for(const h of this.sendQueue)this.connection.send(h);this.sendQueue=[]}}dispatch(h){switch(h.kind){case"server-ready":h.traceId&&this.stateTracer.success(h.traceId),this.resume(),this.emitter.emit("open",h.id);break;case"data":this.emitter.emit("message",h.content);break;case"binary":this.emitter.emit("binary",h.binary);break;case"error":switch(this.logger.error(this.LOG_TAG,`receive error: id: ${h.id}, code: ${h.code}, error: ${h.message}`),h.code){case o.ErrorMessageCode.ChannelNotFound:this.channelPath&&(this.pause(),this.open(this.channelPath,this.clientId));break}break}}open(h,c){this.channelPath=h,this.clientId=c,this.LOG_TAG=`[WSChannel id=${this.id} path=${h}]`;const r={kind:"open",id:this.id,path:h,clientId:c};this._ensureServerReady?this.ensureMessageDeliveried(r):this.connection.send(r)}send(h){this.inqueue({kind:"data",id:this.id,content:h})}sendBinary(h){this.inqueue({kind:"binary",id:this.id,binary:h})}onError(){}close(h,c){this.pause(),this.emitter.emit("close",h,c)}fireReopen(){this.emitter.emit("reopen")}onClose(h){return this.emitter.on("close",h)}onceClose(h){return this.emitter.once("close",h)}createConnection(){return{onceClose:h=>this.onceClose(h),onMessage:h=>this.onBinary(h),send:h=>{this.sendBinary(h)},dispose(){}}}createSumiConnection(h={}){return new f.SumiConnection(this.createConnection(),h)}dispose(){this.stateTracer.dispose(),this.sendQueue=[],this._disposables.dispose()}ping(){this.connection.send({kind:"ping",id:this.id})}}e.WSChannel=_;class E extends _{constructor(h,c){super(h,c),this.connection=h,this.messageQueue=[],this.clientId=c.clientId}serverReady(h){this.connection.send({kind:"server-ready",id:this.id,traceId:h})}dispatch(h){switch(h.kind){case"data":this.emitter.emit("message",h.content);break;case"binary":this.emitter.emit("binary",h.binary);break;case"ping":this.connection.send({kind:"pong",id:this.id});break}}}e.WSServerChannel=E},8919:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),t(85608).__exportStar(t(25285),e)},70650:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AINativeConfigService=e.DEFAULT_CAPABILITIES=void 0;const n=t(85608),s=t(76003),o=t(1149),f=t(11050);e.DEFAULT_CAPABILITIES={supportsMarkers:!0,supportsChatAssistant:!0,supportsInlineChat:!0,supportsInlineCompletion:!0,supportsConflictResolve:!0,supportsRenameSuggestions:!0,supportsProblemFix:!0,supportsTerminalDetection:!0,supportsTerminalCommandSuggest:!0};const b={};Object.keys(e.DEFAULT_CAPABILITIES).forEach(_=>{b[_]=!1});let g=class{constructor(){this.aiModuleLoaded=!1,this.internalCapabilities=e.DEFAULT_CAPABILITIES}setDefaultCapabilities(E){for(const u in this.internalCapabilities)Object.prototype.hasOwnProperty.call(this.internalCapabilities,u)&&(this.internalCapabilities[u]=E)}enableCapabilities(){this.setDefaultCapabilities(!0)}disableCapabilities(){this.setDefaultCapabilities(!1)}get capabilities(){if(!this.aiModuleLoaded)return b;const{AINativeConfig:E}=this.appConfig;return E?.capabilities?{...this.internalCapabilities,...E.capabilities}:this.internalCapabilities}setAINativeModuleLoaded(E){this.aiModuleLoaded=E}};e.AINativeConfigService=g,n.__decorate([(0,s.Autowired)(f.AppConfig),n.__metadata("design:type",Object)],g.prototype,"appConfig",void 0),n.__decorate([(0,s.Autowired)(o.LayoutViewSizeConfig),n.__metadata("design:type",o.LayoutViewSizeConfig)],g.prototype,"layoutViewSize",void 0),e.AINativeConfigService=g=n.__decorate([(0,s.Injectable)()],g)},41480:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AIReporter=void 0;const n=t(85608),s=t(76003),o=t(43718),f=t(52664);let b=class{constructor(){this.reportInfoCache=new Map,this.reporterCancelHandler=new Map}getRelationId(){return(0,o.uuid)()}getCacheReportInfo(_){return this.reportInfoCache.get(_)}getCommonReportInfo(){return{}}start(_,E){const u=this.getRelationId();this.report(u,{...E,msgType:_,isStart:!0});const h=setTimeout(()=>{this.report(u,{...E,success:!1})},60*1e3);return this.reporterCancelHandler.set(u,h),u}end(_,E){const u=this.reporterCancelHandler.get(_);u&&clearTimeout(u),this.report(_,{success:!0,...E,isStart:!1})}record(_,E){E||(E=this.getRelationId());const u=this.reportInfoCache.get(E)||{},h={...this.getCommonReportInfo(),...u,..._,relationId:E};return this.reportInfoCache.set(E,h),h}report(_,E){const u=this.record(E,_);this.reporter.point(f.AI_REPORTER_NAME,E.msgType||u.msgType,u)}};e.AIReporter=b,n.__decorate([(0,s.Autowired)(o.IReporterService),n.__metadata("design:type",Object)],b.prototype,"reporter",void 0),e.AIReporter=b=n.__decorate([(0,s.Injectable)()],b)},57925:(x,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AI_MULTI_LINE_COMPLETION_ACCEPT=e.AI_MULTI_LINE_COMPLETION_DISCARD=e.AI_CODE_ACTION=e.AI_CHAT_VISIBLE=e.AI_INLINE_COMPLETION_REPORTER=e.AI_INLINE_DIFF_PARTIAL_EDIT=e.AI_INLINE_COMPLETION_VISIBLE=e.AI_INLINE_CHAT_INTERACTIVE_INPUT_VISIBLE=e.AI_INLINE_CHAT_VISIBLE=void 0,e.AI_INLINE_CHAT_VISIBLE={id:"ai.inlineChat.visible"},e.AI_INLINE_CHAT_INTERACTIVE_INPUT_VISIBLE={id:"ai.inlineChat.interactiveInput.visible"},e.AI_INLINE_COMPLETION_VISIBLE={id:"ai.inline.completion.visible"},e.AI_INLINE_DIFF_PARTIAL_EDIT={id:"ai.inline.diff.partial.edit"},e.AI_INLINE_COMPLETION_REPORTER={id:"ai.inline.completion.reporter"},e.AI_CHAT_VISIBLE={id:"ai.chat.visible"},e.AI_CODE_ACTION={id:"ai.code.action"},e.AI_MULTI_LINE_COMPLETION_DISCARD={id:"ai.multiLine.completion.discard"},e.AI_MULTI_LINE_COMPLETION_ACCEPT={id:"ai.multiLine.completion.accept"}},38070:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MergeConflictReportService=void 0;const n=t(85608),s=t(76003),o=t(43718),f=t(70650);let b=class extends o.Disposable{constructor(){super(...arguments),this.reportInfoMap=new Map,this.unique2RelationMap=new Map}record(_,E){if(!this.aiNativeConfigService.capabilities.supportsConflictResolve)return E;let u="";return this.unique2RelationMap.has(_)?(u=this.unique2RelationMap.get(_),this.aiReporter.record(E,u)):(u=this.aiReporter.record({...E,msgType:o.AIServiceType.MergeConflict,message:o.AIServiceType.MergeConflict,editorMode:E.editorMode||o.MergeConflictEditorMode.traditional}).relationId,this.unique2RelationMap.set(_,u)),{...E,relationId:u}}report(_,E){if(!this.aiNativeConfigService.capabilities.supportsConflictResolve)return;const u=this.record(_,E);this.aiReporter.end(u.relationId,u)}reportIncrementNum(_,E){if(!this.aiNativeConfigService.capabilities.supportsConflictResolve)return;const u=this.unique2RelationMap.get(_);if(!u)return;const h=this.aiReporter.getCacheReportInfo(u)[E]||0;this.report(_,{[E]:h+1})}dispose(){super.dispose(),this.reportInfoMap.clear()}};e.MergeConflictReportService=b,n.__decorate([(0,s.Autowired)(f.AINativeConfigService),n.__metadata("design:type",f.AINativeConfigService)],b.prototype,"aiNativeConfigService",void 0),n.__decorate([(0,s.Autowired)(o.IAIReporter),n.__metadata("design:type",Object)],b.prototype,"aiReporter",void 0),e.MergeConflictReportService=b=n.__decorate([(0,s.Injectable)()],b)},95040:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IAIInlineChatService=void 0,t(85608).__exportStar(t(70650),e),e.IAIInlineChatService=Symbol("IAIInlineChatService")},12956:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ClientAppStateService=e.ClientAppStateEvent=void 0;const n=t(85608),s=t(76003),o=t(43718);class f extends o.BasicEvent{}e.ClientAppStateEvent=f;let b=class{constructor(){this._state="init",this.deferred={}}get state(){return this._state}set state(_){_!==this._state&&(this._state=_,this.deferred[_]===void 0&&(this.deferred[_]=new o.Deferred),this.deferred[_].resolve(),this.eventBus.fire(new f(_)))}reachedState(_){return this.deferred[_]===void 0&&(this.deferred[_]=new o.Deferred),this.deferred[_].promise}reachedAnyState(..._){return Promise.race(_.map(E=>this.reachedState(E)))}};e.ClientAppStateService=b,n.__decorate([(0,s.Autowired)(o.IEventBus),n.__metadata("design:type",Object)],b.prototype,"eventBus",void 0),e.ClientAppStateService=b=n.__decorate([(0,s.Injectable)()],b)},59555:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ApplicationService=void 0;const n=t(85608),s=t(76003),o=t(59019),f=t(43718),b=t(11050),g=t(42101);let _=class{constructor(){this._initialized=new f.Deferred}async initializeData(){this._backendOS=await this.commonServer.getBackendOS(),this._initialized.resolve()}get frontendOS(){return f.OS.type()}get backendOS(){if(this._backendOS)return this._backendOS;if(this.appConfig.isElectronRenderer)return this.frontendOS;throw new Error("Can't get backend os type before initialize, if you want wait to get backend os, please use async method: getBackendOS")}async getBackendOS(){return await this._initialized.promise,this.backendOS}get clientId(){return this.injector.get(o.WSChannelHandler).clientId}get windowId(){return this.appConfig.isElectronRenderer?g.electronEnv.currentWindowId:this.injector.get(o.WSChannelHandler).clientId}};e.ApplicationService=_,n.__decorate([(0,s.Autowired)(f.CommonServerPath),n.__metadata("design:type",Object)],_.prototype,"commonServer",void 0),n.__decorate([(0,s.Autowired)(b.AppConfig),n.__metadata("design:type",Object)],_.prototype,"appConfig",void 0),n.__decorate([(0,s.Autowired)(s.INJECTOR_TOKEN),n.__metadata("design:type",s.Injector)],_.prototype,"injector",void 0),e.ApplicationService=_=n.__decorate([(0,s.Injectable)()],_)},16884:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});const n=t(85608);n.__exportStar(t(12956),e),n.__exportStar(t(59555),e)},22914:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BaseConnectionHelper=void 0;const n=t(85608),s=t(76003),o=t(18740),f=t(43718),b=t(32796),g=t(38578),_=(0,f.getDebugLogger)();let E=class{async createRPCServiceChannel(h){var c;const r=this.createConnection(),l=(c=this.appConfig.clientId)!==null&&c!==void 0?c:this.getDefaultClientId(),a=new o.WSChannelHandler(r,l,{logger:_});return(0,b.createConnectionService)(this.injector,h,a)}};e.BaseConnectionHelper=E,n.__decorate([(0,s.Autowired)(s.INJECTOR_TOKEN),n.__metadata("design:type",s.Injector)],E.prototype,"injector",void 0),n.__decorate([(0,s.Autowired)(g.AppConfig),n.__metadata("design:type",Object)],E.prototype,"appConfig",void 0),n.__decorate([(0,s.Autowired)(f.IReporterService),n.__metadata("design:type",Object)],E.prototype,"reporterService",void 0),e.BaseConnectionHelper=E=n.__decorate([(0,s.Injectable)({multiple:!0})],E)},41320:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BrowserRuntime=void 0;const n=t(85608),s=t(76003),o=t(44142),f=t(6858),b=t(53206);let g=class extends f.RendererRuntime{constructor(){super(...arguments),this.runtimeName=o.ESupportRuntime.Web}registerRuntimeModuleProviders(E,u){u.webProviders&&E.addProviders(...u.webProviders)}registerRuntimeInnerProviders(E){(0,b.injectBrowserInnerProviders)(E)}};e.BrowserRuntime=g,e.BrowserRuntime=g=n.__decorate([(0,s.Injectable)()],g)},53206:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.injectBrowserInnerProviders=o;const n=t(93899),s=t(97222);function o(f){f.addProviders({token:n.ICtxMenuRenderer,useClass:s.BrowserCtxMenuRenderer})}},55267:(x,e,t)=>{"use strict";var n;Object.defineProperty(e,"__esModule",{value:!0}),e.WebConnectionHelper=void 0;const s=t(85608),o=t(76003),f=t(91493),b=t(43718),g=t(22914);let _=n=class extends g.BaseConnectionHelper{constructor(u){super(),this.options=u,this.clientId=n.clientIdFactory()}getDefaultClientId(){return this.clientId}createConnection(){return f.ReconnectingWebSocketConnection.forURL(this.options.connectionPath,this.options.connectionProtocols)}static clientIdFactory(){return`CLIENT_ID_${(0,b.uuid)()}`}};e.WebConnectionHelper=_,e.WebConnectionHelper=_=n=s.__decorate([(0,o.Injectable)({multiple:!0}),s.__metadata("design:paramtypes",[Object])],_)},44142:(x,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.treeSitterWasmCDNUri=e.onigWasmCDNUri=e.ESupportRuntime=void 0;var t;(function(n){n.Electron="electron",n.Web="web"})(t||(e.ESupportRuntime=t={})),e.onigWasmCDNUri="https://g.alicdn.com/kaitian/vscode-oniguruma-wasm/1.5.1/onig.wasm",e.treeSitterWasmCDNUri="https://gw.alipayobjects.com/os/lib/opensumi/tree-sitter-wasm/0.0.2"},59574:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ElectronRendererRuntime=void 0;const n=t(85608),s=t(76003),o=t(42101),f=t(44142),b=t(6858),g=t(38892);let _=class extends b.RendererRuntime{constructor(){super(...arguments),this.runtimeName=f.ESupportRuntime.Electron}registerRuntimeModuleProviders(h,c){c.electronProviders&&h.addProviders(...c.electronProviders)}registerRuntimeInnerProviders(h){(0,g.injectElectronInnerProviders)(h)}mergeAppConfig(h){return E(h)}async provideResourceUri(h){switch(h){case b.EKnownResources.OnigWasm:return o.electronEnv.onigWasmUri||this.appConfig.onigWasmUri||f.onigWasmCDNUri;case b.EKnownResources.TreeSitterWasmDirectory:return o.electronEnv.treeSitterWasmDirectoryUri||this.appConfig.treeSitterWasmDirectoryUri||f.treeSitterWasmCDNUri;default:throw new Error(`Unknown resource: ${h}`)}}};e.ElectronRendererRuntime=_,e.ElectronRendererRuntime=_=n.__decorate([(0,s.Injectable)()],_);function E(u){var h;const c=(h=o.electronEnv.metadata)!==null&&h!==void 0?h:{},r={...u,appRoot:u.appRoot||o.electronEnv.appPath,extensionDir:u.extensionDir||c.extensionDir};return c.extensionDevelopmentHost&&(u.extensionDevelopmentHost=c.extensionDevelopmentHost),c.extensionCandidate&&(u.extensionCandidate=(u.extensionCandidate||[]).concat(o.electronEnv.metadata.extensionCandidate||[])),r}},38892:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.injectElectronInnerProviders=_;const n=t(43718),s=t(37406),o=t(93899),f=t(27790),b=t(11050),g=t(42101);function _(E){const u=E.get(b.AppConfig);E.addProviders({token:n.IElectronMainMenuService,useValue:(0,g.createElectronMainApi)(n.IElectronMainMenuService,u.devtools)},{token:s.IElectronMainUIService,useValue:(0,g.createElectronMainApi)(s.IElectronMainUIService,u.devtools)},{token:s.IElectronMainLifeCycleService,useValue:(0,g.createElectronMainApi)(s.IElectronMainLifeCycleService,u.devtools)},{token:s.IElectronURLService,useValue:(0,g.createElectronMainApi)(s.IElectronURLService,u.devtools)},{token:f.IElectronMenuFactory,useClass:f.ElectronMenuFactory},{token:f.IElectronMenuBarService,useClass:f.ElectronMenuBarService},{token:o.ICtxMenuRenderer,useClass:f.ElectronCtxMenuRenderer})}},63977:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ElectronConnectionHelper=void 0;const n=t(85608),s=t(76003),o=t(42101),f=t(22914);let b=class extends f.BaseConnectionHelper{getDefaultClientId(){return o.electronEnv.metadata.windowClientId}createConnection(){return(0,o.createNetSocketConnection)()}};e.ElectronConnectionHelper=b,e.ElectronConnectionHelper=b=n.__decorate([(0,s.Injectable)({multiple:!0})],b)},18379:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ConnectionHelperFactory=g;const n=t(85608),s=t(38578),o=t(55267),f=t(44142),b=t(63977);n.__exportStar(t(55267),e),n.__exportStar(t(63977),e),n.__exportStar(t(22914),e),n.__exportStar(t(44142),e);function g(_){return E=>{const u=_.get(s.AppConfig);let h;switch(E){case f.ESupportRuntime.Electron:h=_.get(b.ElectronConnectionHelper);break;case f.ESupportRuntime.Web:h=_.get(o.WebConnectionHelper,[{connectionPath:u.connectionPath,connectionProtocols:u.connectionProtocols}]);break;default:throw new Error(`Unknown backend type: ${E}`)}return h}}},6858:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.RendererRuntime=e.EKnownResources=void 0;const n=t(85608),s=t(76003),o=t(11050),f=t(44142);var b;(function(_){_.OnigWasm="wasm:onig",_.TreeSitterWasmDirectory="wasm:tree-sitter"})(b||(e.EKnownResources=b={}));let g=class{mergeAppConfig(E){return E}async provideResourceUri(E){switch(E){case b.OnigWasm:return this.appConfig.onigWasmUri||f.onigWasmCDNUri;case b.TreeSitterWasmDirectory:return this.appConfig.treeSitterWasmDirectoryUri||f.treeSitterWasmCDNUri;default:throw new Error(`Unknown resource: ${E}`)}}};e.RendererRuntime=g,n.__decorate([(0,s.Autowired)(o.AppConfig),n.__metadata("design:type",Object)],g.prototype,"appConfig",void 0),e.RendererRuntime=g=n.__decorate([(0,s.Injectable)()],g)},37638:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AuthenticationContribution=void 0;const n=t(85608),s=t(76003),o=t(43718),f=t(66549);let b=class{onStart(){this.authenticationService.initialize()}registerCommands(_){_.registerCommand({id:o.noAccountsId,label:"%authentication.noAccounts%"},{execute:()=>{}})}};e.AuthenticationContribution=b,n.__decorate([(0,s.Autowired)(o.IAuthenticationService),n.__metadata("design:type",Object)],b.prototype,"authenticationService",void 0),e.AuthenticationContribution=b=n.__decorate([(0,o.Domain)(f.ClientAppContribution,o.CommandContribution)],b)},10605:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AuthenticationService=void 0;const n=t(85608),s=t(76003),o=t(43718),f=t(93899);let b=class extends o.Disposable{constructor(){super(...arguments),this._onDidRegisterAuthenticationProvider=this.registerDispose(new o.Emitter),this.onDidRegisterAuthenticationProvider=this._onDidRegisterAuthenticationProvider.event,this._onDidUnregisterAuthenticationProvider=this.registerDispose(new o.Emitter),this.onDidUnregisterAuthenticationProvider=this._onDidUnregisterAuthenticationProvider.event,this._onDidChangeSessions=this.registerDispose(new o.Emitter),this.onDidChangeSessions=this._onDidChangeSessions.event,this._authenticationProviders=new Map,this._signInRequestItems=new Map}async initialize(){this._storage=await this.getStorage(new o.URI("authentication").withScheme(o.STORAGE_SCHEMA.GLOBAL));const _=new Map;this.onDidChangeSessions(async E=>{if(E.event.added.length>0){const u=await this.getSessions(E.providerId);u.forEach(h=>{if(u.find(y=>_.get(y.id)))return;const c=new o.DisposableCollection,r=`account-sign-out-${E.providerId}-${h.id}`,l=this.commands.registerCommand({id:r,label:(0,o.formatLocalize)("authentication.signOut",E.label)},{execute:async()=>{await this.signOutOfAccount(E.providerId,h.account.label)}}),a=`manage-trusted-${E.providerId}-${h.id}`,d=this.commands.registerCommand({id:a,label:"%authentication.manageTrustedExtensions%"},{execute:async()=>{await this.manageTrustedExtensionsForAccount(E.providerId,h.account.label)}}),m=`${E.providerId}${h.account.label}`,p=this.menus.registerMenuItem(f.MenuId.AccountsContext,{submenu:m,label:`${h.account.label} (${E.label})`}),v=this.menus.registerMenuItems(m,[{command:a},{command:r}]);c.push(p),c.push(v),c.push(l),c.push(d),_.set(h.id,c)})}E.event.removed.length>0&&E.event.removed.forEach(u=>{const h=_.get(u.id);h&&(h.dispose(),_.delete(u.id))})})}get storage(){return this._storage}registerAuthenticationProvider(_,E){this._authenticationProviders.set(_,E),this._onDidRegisterAuthenticationProvider.fire({id:_,label:E.label}),this.updateAccountsMenuItem()}async sessionsUpdate(_,E){const u=this._authenticationProviders.get(_);u&&(this._onDidChangeSessions.fire({providerId:_,label:u.label,event:E}),await u.updateSessionItems(E),this.updateAccountsMenuItem(),E.added&&await this.updateNewSessionRequests(u))}async updateNewSessionRequests(_){const E=this._signInRequestItems.get(_.id);if(!E)return;const u=await _.getSessions();Object.keys(E).forEach(h=>{if(u.some(c=>c.scopes.slice().sort().join("")===h)){const c=E[h];c&&c.disposables.forEach(r=>r.dispose()),delete E[h],Object.keys(E).length===0?this._signInRequestItems.delete(_.id):this._signInRequestItems.set(_.id,E)}})}getTrustedKey(_,E){return`trusted-${_}-${E}`}async getAllowedExtensions(_,E){const u=this.getTrustedKey(_,E);let h=[];try{const c=await this.storage.get(u);c&&(h=JSON.parse(c))}catch(c){this.logger.warn("read allow extensions error: "+c)}return h}async setAllowedExtensions(_,E,u){const h=this.getTrustedKey(_,E);await this.storage.set(h,JSON.stringify(u))}async removeAllowedExtensions(_,E){const u=this.getTrustedKey(_,E);await this.storage.delete(u)}async updatedAllowedExtension(_,E,u,h,c){const r=await this.getAllowedExtensions(_,E),l=r.findIndex(a=>a.id===u);l===-1?r.push({id:u,name:h,allowed:c}):r[l].allowed=c,await this.setAllowedExtensions(_,E,r)}async isAccessAllowed(_,E,u){const c=(await this.getAllowedExtensions(_,E)).find(r=>r.id===u);return c?c.allowed!==void 0?c.allowed:!0:!1}async tryActivateProvider(_){await this.eventBus.fireAndAwait(new o.ExtensionActivateEvent({topic:"onView",data:_}));let E=this._authenticationProviders.get(_);if(E)return E;const u=new Promise((c,r)=>{this.onDidRegisterAuthenticationProvider(l=>{if(l.id===_)if(E=this._authenticationProviders.get(_),E)c(E);else throw new Error(`No authentication provider '${_}' is currently registered.`)})}),h=new Promise((c,r)=>{setTimeout(()=>{r(new Error(`didRegister ${_} timeout`))},5e3)});return Promise.race([u,h])}async getSessions(_){try{return await(this._authenticationProviders.get(_)||await this.tryActivateProvider(_)).getSessions()}catch{throw new Error(`No authentication provider '${_}' is currently registered.`)}}isAuthenticationProviderRegistered(_){return this._authenticationProviders.has(_)}getProviderIds(){const _=[];return this._authenticationProviders.forEach(E=>{_.push(E.id)}),_}unregisterAuthenticationProvider(_){const E=this._authenticationProviders.get(_);E&&(E.dispose(),this._authenticationProviders.delete(_),this._onDidUnregisterAuthenticationProvider.fire({id:_,label:E.label}),this.updateAccountsMenuItem())}updateAccountsMenuItem(){let _=!1;this._authenticationProviders.forEach(E=>{_=_||E.hasSessions()}),_&&this._noAccountsMenuItem&&(this._noAccountsMenuItem.dispose(),this._noAccountsMenuItem=void 0),!_&&!this._noAccountsMenuItem&&(this._noAccountsMenuItem=this.menus.registerMenuItem(f.MenuId.AccountsContext,{group:"0_accounts",command:o.noAccountsId}))}async requestNewSession(_,E,u,h){let c=this._authenticationProviders.get(_);if(c||await new Promise((r,l)=>{this.onDidRegisterAuthenticationProvider(a=>{a.id===_&&(c=this._authenticationProviders.get(_),r())})}),c){const r=this._signInRequestItems.get(_),l=E.sort().join("");if(r&&r[l]&&r[l].requestingExtensionIds.includes(u))return;const d=this.commands.registerCommand({id:`${u}signIn`,label:(0,o.formatLocalize)("authentication.signInRequests",h)},{execute:async()=>{const p=await this.login(_,E),v=p.account.label,y=await this.getAllowedExtensions(_,v);y.find(S=>S.id===u)||(y.push({id:u,name:h}),await this.setAllowedExtensions(_,v,y)),await this.setExtensionSessionId(h,_,p.id)}}),m=this.menus.registerMenuItem(f.MenuId.AccountsContext,{group:"2_signInRequests",command:`${u}signIn`});if(r){const p=r[l]||{disposables:[],requestingExtensionIds:[]};r[l]={disposables:[...p.disposables,m,d],requestingExtensionIds:[...p.requestingExtensionIds,u]},this._signInRequestItems.set(_,r)}else this._signInRequestItems.set(_,{[l]:{disposables:[m,d],requestingExtensionIds:[u]}})}}getLabel(_){const E=this._authenticationProviders.get(_);if(E)return E.label;throw new Error(`No authentication provider '${_}' has been declared.`)}supportsMultipleAccounts(_){const E=this._authenticationProviders.get(_);if(E)return E.supportsMultipleAccounts;throw new Error(`No authentication provider '${_}' is currently registered.`)}async login(_,E){try{return await(this._authenticationProviders.get(_)||await this.tryActivateProvider(_)).login(E)}catch(u){throw new Error(`No authentication provider '${_}' is currently registered, error messge: ${u.message}`)}}logout(_,E){const u=this._authenticationProviders.get(_);if(u)return u.logout(E);throw new Error(`No authentication provider '${_}' is currently registered.`)}manageTrustedExtensionsForAccount(_,E){const u=this._authenticationProviders.get(_);if(u)return u.manageTrustedExtensions(E);throw new Error(`No authentication provider '${_}' is currently registered.`)}signOutOfAccount(_,E){const u=this._authenticationProviders.get(_);if(u)return u.signOut(E);throw new Error(`No authentication provider '${_}' is currently registered.`)}getUsagesKey(_,E){return`usages-${_}-${E}`}async getAccountUsages(_,E){const u=this.getUsagesKey(_,E),h=await this.storage.get(u);let c=[];if(h)try{c=JSON.parse(h)}catch(r){this.logger.warn("parse account usages error: "+r)}return c}async addAccountUsage(_,E,u,h){const c=this.getUsagesKey(_,E),r=await this.getAccountUsages(_,E),l=r.findIndex(a=>a.extensionId===u);l>-1?r.splice(l,1,{extensionId:u,extensionName:h,lastUsed:Date.now()}):r.push({extensionId:u,extensionName:h,lastUsed:Date.now()}),await this.storage.set(c,JSON.stringify(r))}async removeAccountUsage(_,E){const u=this.getUsagesKey(_,E);await this.storage.delete(u)}getExtensionSessionIdKey(_,E){return`session-${_}-${E}`}async getExtensionSessionId(_,E){const u=this.getExtensionSessionIdKey(_,E);return await this.storage.get(u)}async setExtensionSessionId(_,E,u){const h=this.getExtensionSessionIdKey(_,E);await this.storage.set(h,u)}async removeExtensionSessionId(_,E){const u=this.getExtensionSessionIdKey(_,E);await this.storage.delete(u)}};e.AuthenticationService=b,n.__decorate([(0,s.Autowired)(o.ILogger),n.__metadata("design:type",Object)],b.prototype,"logger",void 0),n.__decorate([(0,s.Autowired)(o.StorageProvider),n.__metadata("design:type",Function)],b.prototype,"getStorage",void 0),n.__decorate([(0,s.Autowired)(o.IEventBus),n.__metadata("design:type",Object)],b.prototype,"eventBus",void 0),n.__decorate([(0,s.Autowired)(f.IMenuRegistry),n.__metadata("design:type",f.IMenuRegistry)],b.prototype,"menus",void 0),n.__decorate([(0,s.Autowired)(o.CommandRegistry),n.__metadata("design:type",Object)],b.prototype,"commands",void 0),e.AuthenticationService=b=n.__decorate([(0,s.Injectable)()],b)},72746:(x,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})},33916:(x,e,t)=>{"use strict";var n;n={value:!0},e.j=void 0,t(29810);const s=t(76003),o=t(43718),f=t(4588),b=t(37406),g=t(16884),_=t(18379),E=t(41320),u=t(59574),h=t(6858),c=t(36206),r=t(66963),l=t(18193),a=t(41118),d=t(1149),m=t(11949),p=t(64102),v=t(78132),y=t(11050),S=t(67304),A=t(79951),T=t(79248),D=t(96302),w=t(71843);t(99696);class I{constructor(M){var O,P,L;this.opts=M,this.appInitialized=new o.Deferred,this.browserModules=[],this._disposables=new o.DisposableCollection,this._inComposition=!1,this._handleBeforeUpload=$=>{if(this.config.isElectronRenderer){if(this.stateService.state==="electron_confirmed_close")return;$.returnValue="",$.preventDefault(),this.stateService.state!=="electron_asking_close"&&(this.stateService.state="electron_asking_close",this.preventStopElectron().then(Y=>{if(Y)this.stateService.state="ready";else return this.stopContributionsElectron().then(()=>{this.stateService.state="electron_confirmed_close";const Q=this.injector.get(b.IElectronMainLifeCycleService);setTimeout(()=>{Q.closeWindow(A.electronEnv.currentWindowId)},0)})}))}else if(this.preventStop())return($||window.event).returnValue=!0,!0},this._handleUnload=()=>{this.stateService.state="closing_window",this.config.isElectronRenderer||(this.disposeSideEffect(),this.stopContributions())},this._handleResize=()=>{},this._handleKeydown=$=>{$&&$.target.name!==a.NO_KEYBINDING_NAME&&!this._inComposition&&this.keybindingService.run($)},this._handleKeyup=$=>{this.keybindingService.resolveModifierKey($)},this._handleCompositionstart=()=>{this._inComposition=!0},this._handleCompositionend=()=>{this._inComposition=!1},this._handleWheel=()=>{};const{modules:N,contributions:k,iconStyleSheets:B,useCdnIcon:F,editorBackgroundImage:W,defaultPreferences:V,allowSetDocumentTitleFollowWorkspaceDir:H=!0,...G}=M;this.initEarlyPreference(M.workspaceDir||"");const K=(0,v.getPreferenceLanguageId)(V);(0,o.setLanguageId)(K),this.injector=M.injector||new s.Injector,this.modules=N,this.modules.forEach($=>this.resolveModuleDeps($)),this.browserModules=M.modulesInstances||[];const z=(O=M.isElectronRenderer)!==null&&O!==void 0?O:this.detectRuntime()===_.ESupportRuntime.Electron;this.config={appName:f.DEFAULT_APPLICATION_NAME,appHost:z?f.DEFAULT_APPLICATION_DESKTOP_HOST:f.DEFAULT_APPLICATION_WEB_HOST,appRoot:M.appRoot||"",uriScheme:f.DEFAULT_URI_SCHEME,...G,isElectronRenderer:z,workspaceDir:M.workspaceDir||"",extensionDir:M.extensionDir||"",injector:this.injector,wsPath:M.wsPath||`ws://${window.location.hostname}:8000`,layoutConfig:M.layoutConfig,editorBackgroundImage:M.editorBackgroundImage||W,allowSetDocumentTitleFollowWorkspaceDir:H,devtools:(P=M.devtools)!==null&&P!==void 0?P:!1,rpcMessageTimeout:M.rpcMessageTimeout||-1},this.config.connectionPath=M.connectionPath||`${this.config.wsPath}/service`;const j=this.injector.get(d.LayoutViewSizeConfig);j.init(M.layoutViewSize),this.config.layoutViewSize=j,this.injector.get(d.DesignLayoutConfig).setLayout(M.designLayout,(L=M.AINativeConfig)===null||L===void 0?void 0:L.layout),this.injector.addProviders({token:c.IClientApp,useValue:this}),this.injector.addProviders({token:y.AppConfig,useValue:this.config}),this.runtime=z?this.injector.get(u.ElectronRendererRuntime):this.injector.get(E.BrowserRuntime),this.injector.addProviders({token:h.RendererRuntime,useValue:this.runtime}),this.config.devtools&&(window.__OPENSUMI_DEVTOOLS_GLOBAL_HOOK__={}),M.extensionDevelopmentPath&&(this.config.extensionCandidate=(this.config.extensionCandidate||[]).concat(Array.isArray(M.extensionDevelopmentPath)?M.extensionDevelopmentPath.map($=>(0,o.asExtensionCandidate)($,!0)):[(0,o.asExtensionCandidate)(M.extensionDevelopmentPath,!0)]),this.config.extensionDevelopmentHost=!0),this.config=this.runtime.mergeAppConfig(this.config),k&&this.injector.addProviders(...k),this.initBaseProvider(),this.initFields(),this.appendIconStyleSheets(B,F),this.createBrowserModules(V)}resolveModuleDeps(M){const O=Reflect.getMetadata("dependencies",M);O&&O.forEach(P=>{this.modules.indexOf(P)===-1&&this.modules.push(P)})}get lifeCycleService(){return this.injector.get(o.AppLifeCycleServiceToken)}async start(M,O,P){const N=this.injector.get(o.IReporterService).time(o.REPORT_NAME.MEASURE);this.lifeCycleService.phase=1,P?(console.error("You're using deprecated method 'start()' with connection parameter"),console.error("We introduced a new connection service to replace the old one"),(0,D.bindConnectionServiceDeprecated)(this.injector,this.modules,P)):O&&await this.createConnection(O),N.timeEnd("ClientApp.createConnection"),this.logger=this.injector.get(o.ILogger),this.stateService.state="client_connected",this.registerEventListeners(),await this.injector.get(o.IApplicationService).initializeData(),await this.measure("Contributions.start",()=>this.startContributions(M)),this.stateService.state="started_contributions",this.stateService.state="ready",this.lifeCycleService.phase=4,N.timeEnd("Framework.ready")}async createConnection(M){(await this.injector.get(_.ConnectionHelperFactory)(M).createRPCServiceChannel(this.modules)).onReopen(()=>{this.onReconnectContributions()})}onReconnectContributions(){const M=this.contributions;for(const O of M)O.onReconnect&&O.onReconnect(this)}initBaseProvider(){(0,w.injectInnerProviders)(this.injector),this.runtime.registerRuntimeInnerProviders(this.injector)}initFields(){this.contributionsProvider=this.injector.get(r.ClientAppContribution),this.commandRegistry=this.injector.get(o.CommandRegistry),this.keybindingRegistry=this.injector.get(a.KeybindingRegistry),this.keybindingService=this.injector.get(a.KeybindingService),this.stateService=this.injector.get(g.ClientAppStateService),this.nextMenuRegistry=this.injector.get(p.IMenuRegistry)}createBrowserModules(M){const O=this.injector;for(const P of this.modules){const L=O.get(P);this.browserModules.push(L),L.providers&&this.injector.addProviders(...L.providers),this.runtime.registerRuntimeModuleProviders(this.injector,L),L.preferences&&L.preferences(this.injector)}(0,l.injectCorePreferences)(this.injector),this.injectPreferenceService(this.injector,M),this.injectStorageProvider(this.injector);for(const P of this.browserModules)if(P.contributionProvider)if(Array.isArray(P.contributionProvider))for(const L of P.contributionProvider)(0,o.createContributionProvider)(this.injector,L);else(0,o.createContributionProvider)(this.injector,P.contributionProvider)}get contributions(){return this.contributionsProvider.getContributions()}async startContributions(M){await this.measure("RenderApp.render",()=>this.renderApp(M)),this.lifeCycleService.phase=2,await this.measure("Contributions.initialize",()=>this.initializeContributions()),await this.initializeCoreRegistry(),this.stateService.state="core_module_initialized",this.lifeCycleService.phase=3,await this.measure("Contributions.onStart",()=>this.onStartContributions()),await this.runContributionsPhase(this.contributions,"onDidStart")}async initializeCoreRegistry(){this.commandRegistry.initialize(),await this.keybindingRegistry.initialize(),this.nextMenuRegistry.initialize()}async initializeContributions(){await this.runContributionsPhase(this.contributions,"initialize"),this.appInitialized.resolve(),this.logger.verbose("contributions.initialize done")}async onStartContributions(){await this.runContributionsPhase(this.contributions,"onStart")}async runContributionsPhase(M,O){return await Promise.all(M.map(P=>this.contributionPhaseRunner(P,O)))}async contributionPhaseRunner(M,O){const P=M[O];if(typeof P=="function")try{const L=M.constructor.name+"."+O;return await this.measure(L,()=>P.call(M,this))}catch(L){this.logger.error(`Could not run contribution#${O}`,L)}}async renderApp(M){await(0,T.renderClientApp)(this,M),this.injector.get(o.IEventBus).fire(new m.RenderedEvent)}async measure(M,O){const L=this.injector.get(o.IReporterService).time(o.REPORT_NAME.MEASURE),N=await O();return L.timeEnd(M),N}preventStop(){const O=this.injector.get(l.CorePreferences)["application.confirmExit"];if(O==="never")return!1;for(const P of this.contributions)if(P.onWillStop)try{if(P.onWillStop(this))return!0}catch(L){(0,o.getDebugLogger)().error(L)}return O==="always"}async preventStopElectron(){if(this.injector.get(l.CorePreferences)["application.confirmExit"]==="never")return!1;for(const P of this.contributions)if(P.onWillStop)try{if(await P.onWillStop(this))return!0}catch(L){(0,o.getDebugLogger)().error(L)}return!1}stopContributions(){for(const M of this.contributions)if(M.onStop)try{M.onStop(this)}catch(O){this.logger.error("Could not stop contribution",O)}}async stopContributionsElectron(){const M=[];for(const O of this.contributions)O.onStop&&M.push((async()=>{try{await O.onStop(this)}catch(P){this.logger.error("Could not stop contribution",P)}})());await Promise.all(M)}registerEventListeners(){window.addEventListener("beforeunload",this._handleBeforeUpload),window.addEventListener("unload",this._handleUnload),window.addEventListener("resize",this._handleResize),window.addEventListener("compositionstart",this._handleCompositionstart),window.addEventListener("compositionend",this._handleCompositionend),window.addEventListener("keydown",this._handleKeydown,!0),window.addEventListener("keyup",this._handleKeyup,!0),o.isOSX&&document.body.addEventListener("wheel",this._handleWheel,{passive:!1})}injectPreferenceService(M,O){const P=()=>L=>{const N=M.get(v.PreferenceProvider,{tag:L});return N.asScope(L),N};if((0,v.injectPreferenceConfigurations)(M),(0,v.injectPreferenceSchemaProvider)(M),M.addProviders({token:v.PreferenceProviderProvider,useFactory:P},{token:v.PreferenceService,useClass:v.PreferenceServiceImpl}),O){const N=M.get(v.PreferenceProviderProvider)(v.PreferenceScope.Default);for(const k of Object.keys(O))N.setPreference(k,O[k])}}injectStorageProvider(M){M.addProviders({token:o.DefaultStorageProvider,useClass:o.DefaultStorageProvider}),M.addProviders({token:o.StorageProvider,useFactory:O=>P=>O.get(o.DefaultStorageProvider).get(P)}),(0,o.createContributionProvider)(M,o.StorageResolverContribution)}fireOnReload(M=!1){window.location.reload(M)}appendIconStyleSheets(M,O){const P=O?[S.DEFAULT_CDN_ICON,S.IDE_OCTICONS_CN_CSS,S.IDE_CODICONS_CN_CSS]:[];M&&M.length&&M.forEach(L=>{this.updateIconMap(L.prefix,L.iconMap),P.push(L.cssPath)});for(const L of P){const N=document.createElement("link");N.setAttribute("rel","stylesheet"),N.setAttribute("href",L),document.getElementsByTagName("head")[0].appendChild(N)}}updateIconMap(M,O){M==="kaitian-icon kticon-"&&this.logger.error(`The icon prefix '${M}' conflicts with the built-in icon, please check the icon configuration.`),(0,S.updateIconMap)(M,O)}initEarlyPreference(M){this._disposables.push((0,v.registerLocalStorageProvider)(o.GeneralSettingsId.Theme,M)),this._disposables.push((0,v.registerLocalStorageProvider)(o.GeneralSettingsId.Icon,M)),this._disposables.push((0,v.registerLocalStorageProvider)(o.GeneralSettingsId.Language,M))}async dispose(){window.removeEventListener("beforeunload",this._handleBeforeUpload),window.removeEventListener("unload",this._handleUnload),window.removeEventListener("resize",this._handleResize),window.removeEventListener("compositionstart",this._handleCompositionstart),window.removeEventListener("compositionend",this._handleCompositionend),window.removeEventListener("keydown",this._handleKeydown,!0),o.isOSX&&document.body.removeEventListener("wheel",this._handleWheel),this._disposables.dispose(),this.disposeSideEffect()}disposeSideEffect(){for(const M of this.contributions)if(M.onDisposeSideEffects)try{M.onDisposeSideEffects(this)}catch(O){this.logger.error("Could not dispose contribution",O)}}detectRuntime(){return window.isElectronRenderer||typeof navigator=="object"&&typeof navigator.userAgent=="string"&&navigator.userAgent.indexOf("Electron")>=0?_.ESupportRuntime.Electron:_.ESupportRuntime.Web}}e.j=I},79248:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.App=l,e.renderClientApp=m;const n=t(85608),s=n.__importDefault(t(14041)),o=n.__importDefault(t(25873)),f=t(97267),b=t(43718),g=t(28003),_=t(68456),E=t(11050),u=t(52564),h=t(26542),c=t(67304),r=t(75206);function l(p){const v=p.app.injector,y=v.get(b.IEventBus),S=v.get(h.LabelService),A=s.default.useCallback((T,D)=>S.getIcon(b.URI.parse(T),D),[]);return s.default.useEffect(()=>{let T;const D=()=>{T&&window.cancelAnimationFrame(T),T=window.requestAnimationFrame(()=>{T=null,u.allSlot.forEach(w=>{y.fire(new _.ResizeEvent({slotLocation:w.slot})),y.fireDirective(_.ResizeEvent.createDirective(w.slot))})})};return window.addEventListener("resize",D),()=>{window.removeEventListener("resize",D)}},[]),s.default.createElement(f.ComponentContextProvider,{value:{getIcon:c.getIcon,localize:b.localize,getResourceIcon:A}},s.default.createElement(E.ConfigProvider,{value:p.app.config},s.default.createElement(p.main,{callback:p.callback}),p.overlays&&p.overlays.map((T,D)=>s.default.createElement(T,{key:D}))))}const a=p=>v=>{o.default.createRoot(p).render(s.default.createElement(v,null))},d=(0,b.getDebugLogger)();function m(p,v){let y=p.config.layoutComponent||g.DefaultLayout;const S=p.browserModules.filter(R=>R.isOverlay).map(R=>R.component?R.component:(d.warn("Overlay module does not have component",R),null)).filter(Boolean),A=p.injector;A.get(r.ClientAppContextContribution).getContributions().forEach(R=>y=R.registerClientAppContext(y,A));const w=R=>s.default.createElement(l,{...R,app:p,main:y,overlays:S});return(typeof v=="function"?v:a(v))(w)}},96302:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.createConnectionService=_,e.bindConnectionServiceDeprecated=E;const n=t(8919),s=t(18740),o=t(76271),f=t(43718),b=t(16884),g=t(11050);async function _(h,c,r,l={}){var a;const d=h.get(g.AppConfig),m=h.get(f.IReporterService);r.setReporter(m);const p=h.get(f.IEventBus),v=h.get(b.ClientAppStateService),y=()=>{v.reachedState("core_module_initialized").then(()=>{p.fire(new f.BrowserConnectionOpenEvent)})};r.connection.isOpen()&&y(),r.connection.onOpen(()=>{y()}),r.connection.onClose(()=>{v.reachedState("core_module_initialized").then(()=>{p.fire(new f.BrowserConnectionCloseEvent)})}),r.connection.onError(D=>{v.reachedState("core_module_initialized").then(()=>{p.fire(new f.BrowserConnectionErrorEvent(D))})}),await r.initHandler(),h.addProviders({token:s.WSChannelHandler,useValue:r});const S=await r.openChannel(o.RPCServiceChannelPath),A=new n.RPCServiceCenter;return A.setSumiConnection(S.createSumiConnection(l)),!((a=d?.measure)===null||a===void 0)&&a.connection&&A.setReporter(m,d.measure.connection.minimumReportThresholdTime),u(h,c,A),h.get(f.ILogger).reportToServer(),S}function E(h,c,r){const l=new n.RPCServiceCenter,a=l.setConnection(r),d=r.onClose(()=>{a.dispose(),d.dispose()});u(h,c,l)}function u(h,c,r){const{getRPCService:l}=(0,n.initRPCService)(r),a=[],d=[];for(const m of c){const p=h.get(m);if(p.backServices)for(const v of p.backServices)a.push(v),v.protocol&&r.loadProtocol(v.protocol)}for(const m of a){const{servicePath:p}=m,v=l(p),y={token:p,useValue:v};h.addProviders(y),m.clientToken&&d.push(m)}for(const m of d){const{servicePath:p}=m,v=l(p);if(m.clientToken){const y=h.get(m.clientToken);v.onRequestService(y)}}}},75206:(x,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ClientAppContextContribution=void 0,e.ClientAppContextContribution=Symbol("ClientAppContextContribution")},32796:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});const n=t(85608);n.__exportStar(t(72746),e),n.__exportStar(t(79248),e),n.__exportStar(t(96302),e),n.__exportStar(t(75206),e)},71843:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.injectInnerProviders=z;const n=t(43718),s=t(96405),o=t(16872),f=t(41480),b=t(12956),g=t(59555),_=t(18379),E=t(10605),u=t(66963),h=t(71707),c=t(80832),r=t(23396),l=t(77273),a=t(41118),d=t(37015),m=t(68456),p=t(75694),v=t(93899),y=t(77666),S=t(90697),A=t(73967),T=t(78132),D=t(68969),w=t(11719),I=t(52564),R=t(26542),M=t(52993),O=t(10845),P=t(40827),L=t(32242),N=t(99e3),k=t(42637),B=t(62652),F=t(27957),W=t(45670),V=t(66894),H=t(63921),G=t(75206),K=t(82493);function z(j){(0,n.createContributionProvider)(j,u.ClientAppContribution),(0,n.createContributionProvider)(j,n.CommandContribution),(0,n.createContributionProvider)(j,l.FsProviderContribution),(0,n.createContributionProvider)(j,a.KeybindingContribution),(0,n.createContributionProvider)(j,v.MenuContribution),(0,n.createContributionProvider)(j,m.ComponentContribution),(0,n.createContributionProvider)(j,I.SlotRendererContribution),(0,n.createContributionProvider)(j,T.PreferenceContribution),(0,n.createContributionProvider)(j,W.VariableContribution),(0,n.createContributionProvider)(j,m.TabBarToolbarContribution),(0,n.createContributionProvider)(j,k.ToolBarActionContribution),(0,n.createContributionProvider)(j,L.StaticResourceContribution),(0,n.createContributionProvider)(j,G.ClientAppContextContribution);const U=[{token:n.IEventBus,useClass:n.EventBusImpl},{token:n.CommandService,useClass:n.CommandServiceImpl},{token:n.CommandRegistry,useClass:n.CommandRegistryImpl},{token:a.KeybindingRegistry,useClass:a.KeybindingRegistryImpl},{token:a.KeybindingService,useFactory:$=>$.get(a.KeybindingRegistry)},{token:o.KeyboardNativeLayoutService,useClass:d.BrowserKeyboardLayoutImpl},{token:o.KeyboardLayoutChangeNotifierService,useFactory:$=>$.get(o.KeyboardNativeLayoutService)},{token:d.KeyValidator,useFactory:$=>$.get(o.KeyboardNativeLayoutService)},b.ClientAppStateService,{token:p.ILogger,useClass:p.Logger},{token:p.Logger,useAlias:p.ILogger},{token:m.ComponentRegistry,useClass:m.ComponentRegistryImpl},{token:W.VariableRegistry,useClass:W.VariableRegistryImpl},{token:v.AbstractMenuService,useClass:v.MenuServiceImpl},{token:v.AbstractContextMenuService,useClass:v.ContextMenuServiceImpl},{token:v.IMenuRegistry,useClass:v.MenuRegistryImpl},{token:y.IToolbarActionService,useClass:y.ToolbarActionService},{token:v.AbstractMenubarService,useClass:v.MenubarServiceImpl},{token:n.IReporter,useClass:n.DefaultReporter},{token:n.IReporterService,useClass:n.ReporterService},{token:n.ReporterMetadata,useValue:{host:n.REPORT_HOST.BROWSER}},{token:D.IProgressService,useClass:w.ProgressService},{token:k.IToolbarRegistry,useClass:F.NextToolbarRegistryImpl},{token:k.IToolbarPopoverRegistry,useClass:B.ToolbarPopoverRegistry},F.ToolbarClientAppContribution,{token:n.IProblemPatternRegistry,useClass:n.ProblemPatternRegistryImpl},{token:n.IProblemMatcherRegistry,useClass:n.ProblemMatchersRegistryImpl},{token:n.ITaskDefinitionRegistry,useClass:n.TaskDefinitionRegistryImpl},{token:S.IOpenerService,useClass:A.OpenerService},{token:V.IWindowService,useClass:H.WindowService},{token:n.IApplicationService,useClass:g.ApplicationService},{token:M.IClipboardService,useClass:M.BrowserClipboardService},{token:O.IExternalUriService,useClass:O.ExternalUriService},{token:n.IAuthenticationService,useClass:E.AuthenticationService},{token:R.ICryptoService,useClass:R.CryptoService},{token:R.ICredentialsService,useClass:R.CredentialsService},{token:s.IHashCalculateService,useClass:s.HashCalculateServiceImpl},{token:n.IExtensionsSchemaService,useClass:r.ExtensionsPointServiceImpl},{token:n.AppLifeCycleServiceToken,useClass:K.AppLifeCycleService},{token:L.StaticResourceService,useClass:N.StaticResourceServiceImpl},P.StaticResourceClientAppContribution,{token:h.ISplitPanelService,useClass:h.SplitPanelService},{token:n.IAIReporter,useClass:f.AIReporter},{token:c.IDesignStyleService,useClass:c.DesignStyleService},{token:_.ConnectionHelperFactory,useFactory:_.ConnectionHelperFactory}];j.addProviders(...U)}},82493:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AppLifeCycleService=void 0;const n=t(85608),s=t(76003),o=t(43718);let f=class{constructor(){this.onDidChangeLifecyclePhaseEmitter=new o.Emitter,this.onDidLifeCyclePhaseChange=this.onDidChangeLifecyclePhaseEmitter.event}set phase(g){this.lifeCyclePhase=g,this.onDidChangeLifecyclePhaseEmitter.fire(this.lifeCyclePhase)}get phase(){return this.lifeCyclePhase}};e.AppLifeCycleService=f,e.AppLifeCycleService=f=n.__decorate([(0,s.Injectable)()],f)},99696:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});const s=t(85608).__importDefault(t(99126));typeof window.ResizeObserver>"u"&&(window.ResizeObserver=s.default)},36206:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BrowserModule=e.IClientApp=void 0;const n=t(85608),s=t(76003),o=t(43718);e.IClientApp=Symbol("CLIENT_APP_TOKEN");class f extends o.BasicModule{}e.BrowserModule=f,n.__decorate([(0,s.Autowired)(e.IClientApp),n.__metadata("design:type",Object)],f.prototype,"app",void 0)},14109:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MERGE_CONFLICT_COMMANDS=e.SCM_COMMANDS=e.QUICK_OPEN_COMMANDS=e.MARKER_COMMANDS=e.LAYOUT_COMMANDS=e.TERMINAL_COMMANDS=e.DIALOG_COMMANDS=e.KEYBOARD_COMMANDS=e.WORKSPACE_COMMANDS=e.OUTLINE_COMMANDS=e.SEARCH_COMMANDS=e.DIFF_EDITOR_COMMANDS=e.EDITOR_COMMANDS=e.COMMON_COMMANDS=e.OPEN_EDITORS_COMMANDS=e.FILE_COMMANDS=void 0;const n=t(67304);var s;(function(v){const y="file";v.NEW_FILE={id:"file.new",category:y,iconClass:(0,n.getIcon)("new-file")},v.RENAME_FILE={id:"file.rename",category:y},v.DELETE_FILE={id:"file.delete",category:y},v.NEW_FOLDER={id:"file.folder.new",category:y,iconClass:(0,n.getIcon)("new-folder")},v.COMPARE_SELECTED={id:"file.compare",category:y},v.OPEN_FILE={id:"file.open",category:y},v.SAVE_FILE={id:"file.save",category:y},v.COLLAPSE_ALL={id:"filetree.collapse.all",category:y,iconClass:(0,n.getIcon)("collapse-all")},v.REFRESH_ALL={id:"filetree.refresh.all",category:y,iconClass:(0,n.getIcon)("refresh")},v.OPEN_RESOURCES={id:"filetree.open.file",category:y},v.OPEN_TO_THE_SIDE={id:"filetree.open.side",category:y},v.OPEN_TYPE_WITH={id:"filetree.open.with",category:y},v.COPY_PATH={id:"filetree.copy.path",category:y,label:"%file.copy.path%"},v.COPY_RELATIVE_PATH={id:"filetree.copy.relativepath",category:y},v.COPY_FILE={id:"filetree.copy.file",category:y},v.CUT_FILE={id:"filetree.cut.file",category:y},v.PASTE_FILE={id:"filetree.paste.file",category:y},v.SELECT_CURRENT_NODE={id:"filetree.selectCurrentNode",category:y},v.LOCATION={id:"filetree.location",category:y},v.LOCATION_WITH_EDITOR={id:"filetree.location_with_editor",category:y,iconClass:(0,n.getIcon)("focus")},v.OPEN_FOLDER={id:"filetree.open.folder",category:y,label:"%file.open.folder%"},v.VSCODE_OPEN_FOLDER={id:"filetree.open.vscode_open_folder",category:y},v.OPEN_WORKSPACE={id:"filetree.open.workspace",category:y,label:"%file.open.workspace%"},v.SEARCH_ON_FOLDER={id:"filetree.search.folder",category:y},v.FOCUS_FILES={id:"filetree.focus.files",category:y,label:"%file.focus.files%"},v.FILTER_TOGGLE={id:"filetree.files.filter_toggle",category:y,iconClass:(0,n.getIcon)("retrieval")},v.FILTER_OPEN={id:"filetree.files.filter_open",category:y},v.OPEN_TERMINAL_WITH_PATH={id:"filetree.openTerminalWithPath",category:y},v.FILTER_CLOSE={id:"filetree.quitFilterMode",category:y},v.NEXT={id:"filetree.next",category:y},v.PREV={id:"filetree.prev",category:y},v.COLLAPSE={id:"filetree.collapse",category:y},v.EXPAND={id:"filetree.expand",category:y},v.REVEAL_IN_EXPLORER={id:"filetree.revealInExplorer",category:y},v.TOGGLE_OR_OPEN={id:"filetree.toggleOrOpen",category:y}})(s||(e.FILE_COMMANDS=s={}));var o;(function(v){const y="openeditors";v.SAVE_ALL={id:"opened.editors.save.all",category:y,iconClass:(0,n.getIcon)("save-all")},v.CLOSE_ALL={id:"opened.editors.close.all",category:y,iconClass:(0,n.getIcon)("close-all")},v.SAVE_BY_GROUP={id:"opened.editors.save.byGroup"},v.CLOSE_BY_GROUP={id:"opened.editors.close.byGroup"},v.OPEN={id:"opened.editors.open",category:y},v.CLOSE={id:"opened.editors.close",category:y},v.OPEN_TO_THE_SIDE={id:"opened.editors.openToTheSide",category:y},v.COMPARE_SELECTED={id:"opened.editors.compare",category:y},v.COPY_RELATIVE_PATH={id:"opened.editors.copyRelativePath",category:y},v.COPY_PATH={id:"opened.editors.copyPath",category:y},v.LOCATION={id:"opened.editors.location",category:y}})(o||(e.OPEN_EDITORS_COMMANDS=o={}));var f;(function(v){v.FIND={id:"core.find",label:"%common.find%"},v.REPLACE={id:"core.replace",label:"%common.replace%"},v.ABOUT_COMMAND={id:"core.about",label:"%common.about%"},v.OPEN_PREFERENCES={id:"core.openpreference",label:"%common.preference.open%"},v.LOCATE_PREFERENCES={id:"workbench.preferences.locate"},v.OPEN_KEYMAPS={id:"core.keymaps.open",label:"%common.keymaps.open%"},v.OPEN_LAUNCH_CONFIGURATION={id:"core.launchConfiguration.open",label:"%debug.action.open.configuration%"},v.ENVIRONMENT_VARIABLE={id:"core.environment.variable"}})(f||(e.COMMON_COMMANDS=f={}));var b;(function(v){const y="editor";v.API_OPEN_EDITOR_COMMAND_ID="_workbench.open",v.API_OPEN_DIFF_EDITOR_COMMAND_ID="_workbench.diff",v.API_OPEN_WITH_EDITOR_COMMAND_ID="_workbench.openWith",v.NEW_UNTITLED_FILE={id:"file.new.untitled",category:y,label:"%file.new%",iconClass:(0,n.getIcon)("new-file")},v.UNDO={id:"editor.undo",category:y,label:"%editor.undo%"},v.REDO={id:"editor.redo",category:y,label:"%editor.redo%"},v.SELECT_ALL={id:"editor.selectAll",category:y,label:"%selection.all%"},v.OPEN_RESOURCE={id:"editor.openUri",category:y},v.OPEN_RESOURCES={id:"editor.openUris",category:y},v.SAVE_URI={id:"editor.saveUri",category:y},v.SAVE_CURRENT={id:"editor.saveCurrent",category:y,label:"%editor.saveCurrent%"},v.FOCUS_IF_NOT_ACTIVATE_ELEMENT={id:"editor.focusIfNotActivateElement",category:y,label:"%editor.saveCurrent%"},v.COMPARE={id:"editor.compare",category:y},v.OPEN_MERGEEDITOR={id:"editor.open.mergeEditor",category:y},v.OPEN_MERGEEDITOR_DEV={id:"editor.open.mergeEditor.dev",category:"Merge Editor (Dev)",label:"Open Merge Editor State from Json"},v.MERGEEDITOR_RESET={id:"editor.mergeEditor.reset",category:y,label:"%mergeEditor.reset%"},v.CLOSE={id:"editor.close",category:y,label:"%editor.closeCurrent%"},v.CLOSE_ALL_IN_GROUP={id:"editor.closeAllInGroup",category:y,label:"%editor.closeAllInGroup%"},v.CLOSE_OTHER_IN_GROUP={id:"editor.closeOtherEditorsInGroup",category:y,label:"%editor.closeOtherEditors%"},v.CLOSE_ALL={id:"editor.closeAll",category:y,label:"%editor.close.all%"},v.CLOSE_SAVED={id:"editor.closeSaved",category:y,label:"%editor.closeSaved%"},v.SAVE_ALL={id:"editor.saveAll",category:y,label:"%editor.saveAll%"},v.CLOSE_TO_RIGHT={id:"editor.closeToRight",category:y,label:"%editor.closeToRight%"},v.GET_CURRENT={id:"editor.getCurrent",category:y},v.GET_CURRENT_RESOURCE={id:"editor.getCurrentResource",category:y},v.SPLIT_TO_LEFT={id:"editor.splitToLeft",category:y,label:"%editor.splitToLeft%"},v.SPLIT_TO_RIGHT={id:"editor.splitToRight",category:y,label:"%editor.splitToRight%",iconClass:(0,n.getIcon)("embed")},v.SPLIT_TO_TOP={id:"editor.splitToTop",category:y,label:"%editor.splitToTop%"},v.SPLIT_TO_BOTTOM={id:"editor.splitToBottom",category:y,label:"%editor.splitToBottom%"},v.CHANGE_LANGUAGE={id:"editor.changeLanguage",category:y},v.CHANGE_ENCODING={id:"editor.changeEncoding",category:y},v.GET_ENCODING={id:"editor.getEncoding",category:y},v.CHANGE_EOL={id:"editor.changeEol",category:y},v.NAVIGATE_LEFT={id:"editor.navigateLeft",category:y},v.NAVIGATE_RIGHT={id:"editor.navigateRight",category:y},v.NAVIGATE_UP={id:"editor.navigateUp",category:y},v.NAVIGATE_DOWN={id:"editor.navigateDown",category:y},v.NAVIGATE_NEXT={id:"editor.navigateNext",category:y},v.NAVIGATE_PREVIOUS={id:"editor.navigatePrevious",category:y},v.PREVIOUS={id:"editor.previous",category:y},v.NEXT={id:"editor.next",category:y},v.PREVIOUS_IN_GROUP={id:"editor.previousInGroup",category:y},v.NEXT_IN_GROUP={id:"editor.nextInGroup",category:y},v.LAST_IN_GROUP={id:"editor.lastInGroup",category:y},v.CLOSE_OTHER_GROUPS={id:"editor.closeOtherGroup",category:y,label:"%editor.closeEditorsInOtherGroups%"},v.OPEN_EDITOR_AT_INDEX={id:"editor.openEditorAtIndex",category:y},v.EVEN_EDITOR_GROUPS={id:"editor.evenEditorGroups",category:y,label:"%editor.resetEditorGroups%"},v.REVERT_DOCUMENT={id:"editor.document.revert",category:y,label:"%editor.revert%"},v.REVERT_AND_CLOSE={id:"editor.revertAndClose",category:y},v.GO_FORWARD={id:"editor.goForward",category:y},v.GO_BACK={id:"editor.goBack",category:y},v.PIN_CURRENT={id:"editor.pinCurrent",category:y},v.COPY_CURRENT_PATH={id:"editor.copyCurrentPath",category:y},v.GO_TO_GROUP={id:"editor.goToGroup",category:y},v.MOVE_GROUP={id:"editor.moveGroup",category:y},v.REOPEN_CLOSED={id:"editor.reopenClosed",category:y},v.FOCUS={id:"editor.focus",category:y},v.TEST_TOKENIZE={id:"editor.tokenize.test",category:y,label:"%editor.tokenize.test%"},v.AUTO_SAVE={id:"editor.autoSave",category:y},v.FOCUS_ACTIVE_EDITOR_GROUP={id:"editor.focusActiveEditorGroup",category:y},v.COMPONENT_UNDO={id:"editor.componentUndo",category:y},v.COMPONENT_REDO={id:"editor.componentRedo"},v.SEARCH_WORKSPACE_SYMBOL={id:"editor.workspaceSymbol.quickopen",label:"%editor.workspaceSymbol.quickopen%",category:y},v.SEARCH_WORKSPACE_SYMBOL_CLASS={id:"editor.workspaceSymbolClass.quickopen",label:"%editor.workspaceSymbolClass.quickopen%",category:y},v.GO_TO_LINE={id:"editor.action.gotoLine",label:"%editor.goToLine%",category:y},v.QUICK_OPEN={id:"workbench.action.quickOpen",category:y,label:"%editor.quickOpen%"},v.TOGGLE_WORD_WRAP={id:"editor.toggleWordWrap",label:"%editor.toggleWordWrap%",category:y},v.FORMAT_DOCUMENT={id:"editor.action.formatDocument",category:y},v.FORMAT_SELECTION={id:"editor.action.formatSelection",category:y},v.FORMAT_DOCUMENT_WITH={id:"editor.action.formatDocument.multiple",category:y,label:"%editor.formatDocument.label.multiple%"},v.FORMAT_SELECTION_WITH={id:"editor.action.formatSelection.multiple",category:y,label:"%editor.formatSelection.label.multiple%"},v.COPY_PATH={id:"editor.action.copyPath",category:y,label:"%editor.copyPath%"},v.COPY_RELATIVE_PATH={id:"editor.action.copyRelativePath",category:y,label:"%editor.copyRelativePath%"}})(b||(e.EDITOR_COMMANDS=b={}));var g;(function(v){const y="diff-editor";v.REVERT={id:"editor.diff.revert",category:y},v.ACCEPT={id:"editor.diff.accept",category:y},v.TOGGLE_COLLAPSE_UNCHANGED_REGIONS={id:"editor.diff.toggleCollapseUnchangedRegions",category:y}})(g||(e.DIFF_EDITOR_COMMANDS=g={}));var _;(function(v){const y="search";v.OPEN_SEARCH={id:"content-search.openSearch",category:y,label:"Open search sidebar"},v.REFRESH={id:"file-search.refresh",label:"refresh search",iconClass:(0,n.getIcon)("refresh"),category:y},v.CLEAN={id:"file-search.clean",label:"clean search",iconClass:(0,n.getIcon)("clear"),category:y},v.GET_RECENT_SEARCH_WORD={id:"search.getRecentSearchWordCmd",category:y},v.GET_BACK_RECENT_SEARCH_WORD={id:"search.getBackRecentSearchWordCmd",category:y},v.MENU_REPLACE={id:"search.menu.replace",category:y,label:"%search.replace.title%"},v.MENU_REPLACE_ALL={id:"search.menu.replaceAll",category:y,label:"%search.replaceAll.label%"},v.MENU_HIDE={id:"search.menu.hide",category:y,label:"%search.result.hide%"},v.MENU_COPY={id:"search.menu.copy",category:y,label:"%file.copy.file%"},v.MENU_COPY_ALL={id:"search.menu.copyAll",category:y,label:"%search.menu.copyAll%"},v.MENU_COPY_PATH={id:"search.menu.copyPath",category:y,label:"%file.copy.path%"},v.REPLACE={id:"search.replace",category:y},v.CLOSE={id:"search.close",category:y}})(_||(e.SEARCH_COMMANDS=_={}));var E;(function(v){const y="outline";v.OUTLINE_COLLAPSE_ALL={id:"outline.collapse.all",category:y},v.OUTLINE_FOLLOW_CURSOR={id:"outline.follow.cursor",category:y},v.OUTLINE_SORT_KIND={id:"outline.sort.kind",category:y},v.OUTLINE_SORT_NAME={id:"outline.sort.name",category:y},v.OUTLINE_SORT_POSITION={id:"outline.sort.position",category:y}})(E||(e.OUTLINE_COMMANDS=E={}));var u;(function(v){const y="workspace";v.ADD_WORKSPACE_FOLDER={id:"workspace.addFolderToWorkspace",label:"%workspace.addFolderToWorkspace%",category:y},v.REMOVE_WORKSPACE_FOLDER={id:"workspace.removeFolderFromWorkspace",label:"%workspace.removeFolderFromWorkspace%",category:y},v.SAVE_WORKSPACE_AS_FILE={id:"workspace.saveWorkspaceAsFile",label:"%workspace.saveWorkspaceAsFile%",category:y}})(u||(e.WORKSPACE_COMMANDS=u={}));var h;(function(v){const y="keyboard";v.CHOOSE_KEYBOARD_LAYOUT={id:"keyboard.chooseKeyboardLayout",label:"%keyboard.chooseKeyboardLayout%",category:y}})(h||(e.KEYBOARD_COMMANDS=h={}));var c;(function(v){const y="dialog";v.ENSURE={id:"dialog.ensure",category:y}})(c||(e.DIALOG_COMMANDS=c={}));var r;(function(v){v.CATEGORY="%terminal.name%",v.FOCUS_NEXT_TERMINAL={id:"workbench.action.terminal.focusNextPane",label:"%terminal.focusNext.inTerminalGroup%",category:v.CATEGORY},v.FOCUS_PREVIOUS_TERMINAL={id:"workbench.action.terminal.focusPreviousPane",label:"%terminal.focusPrevious.inTerminalGroup%",category:v.CATEGORY},v.SPLIT={id:"terminal.split",label:"%terminal.split%",category:v.CATEGORY},v.ADD={id:"terminal.add",label:"%terminal.new%",category:v.CATEGORY},v.REMOVE={id:"terminal.remove",label:"%terminal.remove%",category:v.CATEGORY},v.CLEAR={id:"terminal.clear",label:"%terminal.clear%",category:v.CATEGORY},v.OPEN_SEARCH={id:"terminal.search",label:"%terminal.search%",category:v.CATEGORY},v.SEARCH_NEXT={id:"terminal.search.next",label:"%terminal.search.next%",category:v.CATEGORY},v.OPEN_WITH_PATH={id:"terminal.openWithPath",category:v.CATEGORY},v.CLEAR_CONTENT={id:"terminal.clearContent",label:"%terminal.menu.clearCurrentContent%",category:v.CATEGORY},v.CLEAR_ALL_CONTENT={id:"terminal.clearAllContent",label:"%terminal.menu.clearAllContents%",category:v.CATEGORY},v.TAB_RENAME={id:"terminal.tabRename",category:v.CATEGORY},v.SELECT_ALL_CONTENT={id:"terminal.selectAllContent",label:"%terminal.menu.selectAllContent%",category:v.CATEGORY},v.MORE_SETTINGS={id:"terminal.moreSettings",label:"%terminal.menu.moreSettings%",category:v.CATEGORY},v.SELECT_TYPE={id:"terminal.selectType",category:v.CATEGORY},v.SELECT_ZSH={id:"terminal.selectTypeZsh",label:"zsh",category:v.CATEGORY},v.SELECT_BASH={id:"terminal.selectTypeBash",label:"bash",category:v.CATEGORY},v.SELECT_SH={id:"terminal.selectTypeSh",label:"sh",category:v.CATEGORY},v.SELECT_CMD={id:"terminal.selectTypeCMD",label:"cmd",category:v.CATEGORY},v.SELECT_POWERSHELL={id:"terminal.selectTypePowerShell",label:"powershell",category:v.CATEGORY},v.COPY={id:"terminal.copy",label:"%edit.copy%",category:v.CATEGORY},v.PASTE={id:"terminal.paste",label:"%edit.paste%",category:v.CATEGORY},v.SELECT_ALL={id:"terminal.selectAll",label:"%terminal.menu.selectCurrentContent%",category:v.CATEGORY},v.RE_LAUNCH={id:"terminal.relaunch",category:v.CATEGORY},v.TOGGLE_TERMINAL={id:"terminal.toggleTerminal",label:"%terminal.toggleTerminal%",category:v.CATEGORY},v.KILL_PROCESS={id:"terminal.killProcess",label:"%terminal.killProcess%",category:v.CATEGORY}})(r||(e.TERMINAL_COMMANDS=r={}));var l;(function(v){const y="view";v.QUICK_OPEN_VIEW={id:"layout.action.quickOpenView",category:y},v.OPEN_VIEW={id:"layout.action.openView",label:"%layout.action.openView%",category:y},v.MAXIMIZE_EDITOR={id:"layout.action.Maximizeeditor",category:y},v.TOGGLE_SIDEBAR_VISIBILITY={id:"main-layout.left-panel.toggle",category:y}})(l||(e.LAYOUT_COMMANDS=l={}));var a;(function(v){const y="marker";v.SHOW_ERRORS_WARNINGS={id:"marker.action.showErrorsWarnings",category:y},v.TOGGLE_SHOW_ERRORS_WARNINGS={id:"marker.action.toggleShowErrorsWarnings",category:y}})(a||(e.MARKER_COMMANDS=a={}));var d;(function(v){v.OPEN={id:"editor.action.quickCommand"},v.OPEN_OUTLINE={id:"editor.action.quickOutline"},v.OPEN_VIEW={id:"editor.action.quickView"},v.OPEN_WITH_COMMAND={id:"editor.action.quickCommand.withCommand"}})(d||(e.QUICK_OPEN_COMMANDS=d={}));var m;(function(v){const y="SCM";v.GetSCMResource={id:"scm.getResource",category:y},v._GIT_OPEN_MERGE_EDITOR={id:"_git.openMergeEditor"},v.GIT_OPEN_MERGE_EDITOR={id:"git.openMergeEditor"}})(m||(e.SCM_COMMANDS=m={}));var p;(function(v){const y="MergeConflict";v.AI_ACCEPT={id:"merge-conflict.ai.accept",category:y},v.ALL_RESET={id:"merge-conflict.ai.all-reset",category:y},v.AI_ALL_ACCEPT={id:"merge-conflict.ai.all-accept",category:y},v.AI_ALL_ACCEPT_STOP={id:"merge-conflict.ai.all-accept-stop",category:y}})(p||(e.MERGE_CONFLICT_COMMANDS=p={}))},22780:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ClientCommonContribution=e.locationProtocolContextKey=e.inputFocusedContextKey=void 0;const n=t(85608),s=t(76003),o=t(97267),f=t(43718),b=t(53736),g=t(18193),_=t(22366),E=t(41118),u=t(1149),h=t(64102),c=t(39496),r=t(78132),l=t(11050),a=t(14109),d=t(66549);e.inputFocusedContextKey="inputFocus",e.locationProtocolContextKey="locationProtocol";let m=class{constructor(){this.schema=g.corePreferenceSchema;const v={"application.supportsOpenFolder":!!this.appConfig.isElectronRenderer&&!this.appConfig.isRemote,"application.supportsOpenWorkspace":!!this.appConfig.isElectronRenderer&&!this.appConfig.isRemote,"debug.toolbar.top":this.appConfig.isElectronRenderer?0:this.layoutViewSize.menubarHeight},y=Object.keys(this.schema.properties);for(const S of y)this.schema.properties[S].default=v[S]||this.schema.properties[S].default}onStart(){this.contextKeyService.createKey(e.locationProtocolContextKey,window.location.protocol.split(":")[0]),this.inputFocusedContext=this.contextKeyService.createKey(e.inputFocusedContextKey,!1),window.addEventListener("focusin",this.updateInputContextKeys.bind(this))}onStop(){window.removeEventListener("focusin",this.updateInputContextKeys.bind(this))}activeElementIsInput(){return!!document.activeElement&&(document.activeElement.tagName==="INPUT"||document.activeElement.tagName==="TEXTAREA")}updateInputContextKeys(){const v=this.activeElementIsInput();if(this.inputFocusedContext.set(v),v){const y=(0,_.trackFocus)(document.activeElement);f.Event.once(y.onDidBlur)(()=>{this.inputFocusedContext.set(this.activeElementIsInput()),y.dispose()})}}registerCommands(v){v.registerCommand(a.EDITOR_COMMANDS.UNDO),v.registerCommand(a.EDITOR_COMMANDS.REDO),v.registerCommand(a.EDITOR_COMMANDS.SELECT_ALL),v.registerCommand(a.COMMON_COMMANDS.ABOUT_COMMAND,{execute:()=>{alert((0,f.replaceLocalizePlaceholder)(this.appConfig.appName))}})}registerMenus(v){v.registerMenubarItem(c.MenuId.MenubarFileMenu,{label:(0,f.localize)("menu-bar.title.file"),order:1,iconClass:(0,o.getIcon)("menubar-file")}),v.registerMenubarItem(c.MenuId.MenubarEditMenu,{label:(0,f.localize)("menu-bar.title.edit"),order:2,iconClass:(0,o.getIcon)("menubar-edit")}),v.registerMenubarItem(c.MenuId.MenubarSelectionMenu,{label:(0,f.localize)("menu-bar.title.selection"),order:3,iconClass:(0,o.getIcon)("menubar-selection")}),v.registerMenubarItem(c.MenuId.MenubarViewMenu,{label:(0,f.localize)("menu-bar.title.view"),order:4,iconClass:(0,o.getIcon)("menubar-view")}),v.registerMenubarItem(c.MenuId.MenubarGoMenu,{label:(0,f.localize)("menu-bar.title.go"),order:5,iconClass:(0,o.getIcon)("menubar-go")}),v.registerMenubarItem(c.MenuId.MenubarTerminalMenu,{label:(0,f.localize)("menu-bar.title.terminal"),order:5,iconClass:(0,o.getIcon)("terminal")}),v.registerMenubarItem(c.MenuId.MenubarHelpMenu,{label:(0,f.localize)("menu-bar.title.help"),order:999,iconClass:(0,o.getIcon)("question-circle")}),v.registerMenuItems(c.MenuId.MenubarFileMenu,[{command:a.FILE_COMMANDS.OPEN_FOLDER.id,group:"1_open",when:"config.application.supportsOpenFolder"},{command:a.FILE_COMMANDS.OPEN_WORKSPACE.id,group:"1_open",when:"config.application.supportsOpenWorkspace"},{command:a.WORKSPACE_COMMANDS.ADD_WORKSPACE_FOLDER.id,group:"1_open",when:"config.workspace.supportMultiRootWorkspace"},{command:a.WORKSPACE_COMMANDS.SAVE_WORKSPACE_AS_FILE.id,group:"1_open",when:"config.workspace.supportMultiRootWorkspace"},{command:a.EDITOR_COMMANDS.NEW_UNTITLED_FILE.id,group:"2_new"},{command:{id:a.EDITOR_COMMANDS.SAVE_CURRENT.id,label:(0,f.localize)("file.save")},group:"3_save"},{command:{id:a.EDITOR_COMMANDS.SAVE_ALL.id,label:(0,f.localize)("file.saveAll")},group:"3_save"},{command:{id:a.EDITOR_COMMANDS.AUTO_SAVE.id,label:(0,f.localize)("file.autoSave")},toggledWhen:"config.editor.autoSave != off",group:"4_autosave"}]),v.registerMenuItems(c.MenuId.MenubarGoMenu,[{command:{id:a.EDITOR_COMMANDS.GO_BACK.id,label:(0,f.localize)("editor.goBack")},group:"1_go"},{command:{id:a.EDITOR_COMMANDS.GO_FORWARD.id,label:(0,f.localize)("editor.goForward")},group:"1_go"},{command:{id:a.EDITOR_COMMANDS.QUICK_OPEN.id,label:(0,f.localize)("editor.quickOpen")},group:"2_go_file"},{command:{id:a.EDITOR_COMMANDS.SEARCH_WORKSPACE_SYMBOL.id,label:(0,f.localize)("editor.workspaceSymbol.quickopen")},group:"2_go_file"},{command:{id:a.EDITOR_COMMANDS.GO_TO_LINE.id,label:(0,f.localize)("editor.goToLine")},group:"3_go_infile"},{command:{id:"editor.action.jumpToBracket",label:(0,f.localize)("menu-bar.go.jumpToBracket")},group:"3_go_infile"},{command:{id:"editor.action.marker.nextInFiles",label:(0,f.localize)("menu-bar.go.nextProblemInFiles")},group:"6_go_problem"},{command:{id:"editor.action.marker.prevInFiles",label:(0,f.localize)("menu-bar.go.prevProblemInFiles")},group:"6_go_problem"}]),v.registerMenuItems(c.MenuId.MenubarTerminalMenu,[{command:{id:a.TERMINAL_COMMANDS.ADD.id,label:a.TERMINAL_COMMANDS.ADD.label},group:"1_terminal"},{command:{id:a.TERMINAL_COMMANDS.SPLIT.id,label:a.TERMINAL_COMMANDS.SPLIT.label},group:"1_terminal"}])}registerKeybindings(v){v.registerKeybinding({command:a.EDITOR_COMMANDS.SELECT_ALL.id,keybinding:"ctrlcmd+a",when:"editorFocus"}),v.registerKeybinding({command:a.EDITOR_COMMANDS.UNDO.id,keybinding:"ctrlcmd+z",when:"editorFocus"}),v.registerKeybinding({command:a.EDITOR_COMMANDS.REDO.id,keybinding:"ctrlcmd+shift+z",when:"editorFocus"})}};e.ClientCommonContribution=m,n.__decorate([(0,s.Autowired)(f.CommandService),n.__metadata("design:type",Object)],m.prototype,"commandService",void 0),n.__decorate([(0,s.Autowired)(b.IContextKeyService),n.__metadata("design:type",Object)],m.prototype,"contextKeyService",void 0),n.__decorate([(0,s.Autowired)(l.AppConfig),n.__metadata("design:type",Object)],m.prototype,"appConfig",void 0),n.__decorate([(0,s.Autowired)(u.LayoutViewSizeConfig),n.__metadata("design:type",u.LayoutViewSizeConfig)],m.prototype,"layoutViewSize",void 0),e.ClientCommonContribution=m=n.__decorate([(0,f.Domain)(f.CommandContribution,d.ClientAppContribution,r.PreferenceContribution,h.MenuContribution,E.KeybindingContribution),n.__metadata("design:paramtypes",[])],m)},66549:(x,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ClientAppContribution=void 0,e.ClientAppContribution=Symbol("ClientAppContribution")},34505:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ClientCommonModule=void 0;const n=t(85608),s=t(76003),o=t(16908),f=t(43718),b=t(37638),g=t(36206),_=t(136),E=t(90697),u=t(45829),h=t(44867),c=t(22780),r=t(10797),l=t(17821);let a=class extends g.BrowserModule{constructor(){super(...arguments),this.contributionProvider=[E.OpenerContribution],this.providers=[c.ClientCommonContribution,h.DefaultOpenerContribution,h.OpenerContributionClient,b.AuthenticationContribution,_.HashCalculateContribution],this.electronProviders=[r.ClientElectronCommonContribution,u.ElectronOpenerContributionClient],this.webProviders=[l.ClientWebCommonContribution],this.backServices=[{servicePath:f.CommonServerPath,protocol:o.CommonServerProtocol},{servicePath:f.KeytarServicePath},{servicePath:f.CryptoServicePath}]}};e.ClientCommonModule=a,e.ClientCommonModule=a=n.__decorate([(0,s.Injectable)()],a)},98881:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.RecentStorage=void 0;const n=t(85608),s=t(76003),o=t(43718);let f=class{async getScopeStorage(){return this.recentStorage=this.recentStorage||await this.getStorage(o.STORAGE_NAMESPACE.RECENT_DATA),this.recentStorage}async getGlobalStorage(){return this.recentGlobalStorage=this.recentGlobalStorage||await this.getStorage(o.STORAGE_NAMESPACE.GLOBAL_RECENT_DATA),this.recentGlobalStorage}};e.RecentStorage=f,n.__decorate([(0,s.Autowired)(o.StorageProvider),n.__metadata("design:type",Function)],f.prototype,"getStorage",void 0),e.RecentStorage=f=n.__decorate([(0,s.Injectable)()],f)},30144:(x,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EXTENSION_CONTAINER_ID=e.SCM_CONTAINER_ID=e.SEARCH_CONTAINER_ID=e.EXPLORER_CONTAINER_ID=e.DEBUG_CONTAINER_ID=e.TEST_RESULT_CONTAINER_ID=e.DEBUG_CONSOLE_CONTAINER_ID=e.TERMINAL_CONTAINER_ID=e.OUTPUT_CONTAINER_ID=e.MARKER_CONTAINER_ID=void 0,e.MARKER_CONTAINER_ID="markers",e.OUTPUT_CONTAINER_ID="output",e.TERMINAL_CONTAINER_ID="terminal",e.DEBUG_CONSOLE_CONTAINER_ID="debug-console",e.TEST_RESULT_CONTAINER_ID="test-result",e.DEBUG_CONTAINER_ID="debug",e.EXPLORER_CONTAINER_ID="explorer",e.SEARCH_CONTAINER_ID="search",e.SCM_CONTAINER_ID="scm",e.EXTENSION_CONTAINER_ID="extension"},10797:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ClientElectronCommonContribution=void 0;const n=t(85608),s=t(76003),o=t(43718),f=t(64102),b=t(39496),g=t(11050);let _=class{registerMenus(u){u.registerMenubarItem(b.MenuId.MenubarAppMenu,{label:(0,o.localize)("app.name",this.appConfig.appName),order:0}),u.registerMenuItems(b.MenuId.MenubarEditMenu,[{command:{id:"electron.undo",label:(0,o.localize)("editor.undo")},nativeRole:"undo",group:"1_undo"},{command:{id:"electron.redo",label:(0,o.localize)("editor.redo")},group:"1_undo",nativeRole:"redo"},{command:{label:(0,o.localize)("edit.cut"),id:"electron.cut"},nativeRole:"cut",group:"2_clipboard"},{command:{label:(0,o.localize)("edit.copy"),id:"electron.copy"},nativeRole:"copy",group:"2_clipboard"},{command:{label:(0,o.localize)("edit.paste"),id:"electron.paste"},nativeRole:"paste",group:"2_clipboard"},{command:{label:(0,o.localize)("edit.selectAll"),id:"electron.selectAll"},nativeRole:"selectAll",group:"2_clipboard"}]),u.registerMenuItems(b.MenuId.MenubarAppMenu,[{command:{id:"electron.quit",label:(0,o.localize)("app.quit")},nativeRole:"quit",group:"4_quit"}])}};e.ClientElectronCommonContribution=_,n.__decorate([(0,s.Autowired)(g.AppConfig),n.__metadata("design:type",Object)],_.prototype,"appConfig",void 0),e.ClientElectronCommonContribution=_=n.__decorate([(0,o.Domain)(f.MenuContribution)],_)},66963:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});const n=t(85608);n.__exportStar(t(14109),e),n.__exportStar(t(34505),e),n.__exportStar(t(66549),e),n.__exportStar(t(98881),e)},17821:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ClientWebCommonContribution=void 0;const n=t(85608),s=t(43718),o=t(64102),f=t(39496),b=t(14109);let g=class{registerMenus(E){E.registerMenuItems(f.MenuId.MenubarEditMenu,[{command:b.EDITOR_COMMANDS.REDO.id,group:"1_undo"},{command:b.EDITOR_COMMANDS.UNDO.id,group:"1_undo"}]),E.registerMenuItem(f.MenuId.MenubarHelpMenu,{command:{id:b.COMMON_COMMANDS.ABOUT_COMMAND.id,label:b.COMMON_COMMANDS.ABOUT_COMMAND.label},nativeRole:"about",group:"0_about"})}};e.ClientWebCommonContribution=g,e.ClientWebCommonContribution=g=n.__decorate([(0,s.Domain)(o.MenuContribution)],g)},25918:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TitleActionList=e.InlineActionWidget=e.MenuActionList=void 0,e.InlineActionBar=p,e.InlineMenuBar=v;const n=t(85608),s=n.__importDefault(t(53373)),o=n.__importStar(t(14041)),f=t(97267),b=t(45803),g=t(43718),_=t(93899),E=t(48560),u=t(79951),h=t(55693),c=n.__importDefault(t(17647)),r=n.__importDefault(t(54859)),l=({data:y,hasSubmenu:S,disabled:A,iconService:T,hasChecked:D})=>o.default.createElement("div",{className:(0,s.default)(r.default.menuAction,{[r.default.disabled]:A,[r.default.checked]:y.checked})},o.default.createElement("div",{className:(0,s.default)({[r.default.icon]:D})},y.checked?o.default.createElement(f.Icon,{icon:"check"}):null),o.default.createElement("div",{className:r.default.label},y.label?(0,u.transformLabelWithCodicon)(g.strings.mnemonicButtonLabel(y.label,!0),{margin:"0 3px"},T?.fromString.bind(T)):""),o.default.createElement("div",{className:r.default.tip},y.keybinding?o.default.createElement("div",{className:r.default.shortcut},y.keybinding):null,S?o.default.createElement("div",{className:r.default.submenuIcon},o.default.createElement(f.Icon,{icon:"right"})):null,!y.keybinding&&!S&&y.extraDesc&&o.default.createElement("div",{className:r.default.extraDesc},y.extraDesc))),a=({data:y=[],context:S=[],afterClick:A,style:T,iconService:D,renderSubMenuTitle:w,renderMenuItem:I})=>{if(!y.length)return null;const R=o.default.useCallback(L=>{const{key:N,item:k}=L;if([_.SeparatorMenuItemNode.ID,_.SubmenuItemNode.ID].includes(N))return;const F=(Array.isArray(k.props.children)?k.props.children[0]:k.props.children).props.data;F&&(typeof F.execute=="function"&&F.execute(S),typeof A=="function"&&A(F))},[y,S]),M=o.default.useCallback((L,N)=>{if(w){const k=w(L,{hasSubmenu:!0,disabled:!1});if(k)return k}return o.default.createElement(l,{hasChecked:N,hasSubmenu:!0,data:L,iconService:D})},[w]),O=o.default.useCallback((L,N)=>{if(I){const k=I(L,{hasSubmenu:!1,disabled:L.disabled});if(k)return k}return o.default.createElement(l,{hasChecked:N,data:L,disabled:L.disabled,iconService:D})},[I]),P=o.default.useCallback(L=>{const N=L.some(k=>k.checked);return L.map((k,B)=>{if(k.id===_.SeparatorMenuItemNode.ID)return null;const F=L[B+1]&&L[B+1].id===_.SeparatorMenuItemNode.ID;return k.id===_.SubmenuItemNode.ID?!Array.isArray(k.children)||!k.children.length?null:o.default.createElement(o.default.Fragment,{key:`${k.id}-${k.submenuId}-${B}`},o.default.createElement(b.Menu.SubMenu,{key:`${k.id}-${k.submenuId}-${B}`,className:r.default.submenuItem,popupClassName:"kt-menu",title:M(k,N)},P(k.children)),F?o.default.createElement(b.Menu.Divider,{key:`divider-${B}`,className:r.default.menuItemDivider}):null):o.default.createElement(o.default.Fragment,{key:`${k.id}-${B}`},o.default.createElement(b.Menu.Item,{id:`${k.id}-${B}`,key:`${k.id}-${B}`,className:r.default.menuItem,disabled:k.disabled},O(k,N)),F?o.default.createElement(b.Menu.Divider,{key:`divider-${B}`,className:r.default.menuItemDivider}):null)})},[]);return o.default.createElement(b.Menu,{className:"kt-menu",selectable:!1,motion:{motionLeave:!1,motionEnter:!1},builtinPlacements:c.default,onClick:R,style:T},P(y))};e.MenuActionList=a;const d=({type:y,icon:S,disabled:A,onClick:T,title:D})=>{const w=(0,h.useDesignStyles)(r.default.btnAction,"btnAction");if(y==="icon")return o.default.createElement(f.Button,{size:"small",type:y,className:w,onClick:T,title:D,icon:S||"ellipsis"});const I={};return(0,g.isBoolean)(A)&&(I.disabled=A),o.default.createElement(f.Button,{size:"small",type:"secondary",className:w,onClick:T,...I,title:D},o.default.createElement(f.Icon,{icon:S||"ellipsis"}))};d.displayName="EllipsisWidget",e.InlineActionWidget=o.default.memo(({iconService:y,type:S="icon",data:A,context:T=[],className:D,afterClick:w,...I})=>{const R=(0,h.useDesignStyles)(r.default.iconAction,"iconAction"),M=(0,h.useDesignStyles)(r.default.btnAction,"btnAction"),[O,P]=(0,o.useState)(!1),L=o.default.useCallback(async(F,...W)=>{if(F&&(F.preventDefault(),F.stopPropagation()),!O){if(P(!0),A.id===_.SubmenuItemNode.ID&&F){const V={x:F.clientX,y:F.clientY};await A.execute([V,...T])}else typeof A.execute=="function"&&await A.execute([...T,...W]);P(!1),typeof w=="function"&&w()}},[A,T]),[N,k]=o.default.useMemo(()=>{let F=A.tooltip||A.label;const W=A.label;return A.keybinding&&(F=`${F} (${A.keybinding})`),[F,W]},[A]),B=A.id===_.SubmenuItemNode.ID;return S==="icon"&&!A.type?o.default.createElement(f.Button,{type:A.icon?"icon":"link",className:(0,s.default)(R,D,{[r.default.disabled]:A.disabled,[r.default.submenuIconAction]:B}),title:N,iconClass:A.icon,onClick:L,...I},!A.icon&&k):A.type==="checkbox"?o.default.createElement(f.CheckBox,{className:(0,s.default)(D,M),disabled:A.disabled,label:A.label,title:N,checked:A.checked,onChange:F=>L(void 0,F.target.checked),...I}):o.default.createElement(f.Button,{loading:O,className:(0,s.default)(D,M),disabled:A.disabled,onClick:L,size:"small",type:A.type,title:N,...I},(0,u.transformLabelWithCodicon)(k,{margin:"0 3px"},y?.fromString.bind(y)),B&&o.default.createElement(f.Icon,{icon:"down",className:"kt-button-secondary-more"}))}),e.InlineActionWidget.displayName="InlineAction";const m=({data:y,context:S})=>{const A=o.default.useCallback(()=>y.getExecuteArgs(S),[y,S]);return o.default.createElement(y.component,{getExecuteArgs:A})};m.displayName="CustomAction",e.TitleActionList=o.default.memo(({type:y="icon",nav:S=[],more:A=[],moreIcon:T,moreTitle:D,context:w=[],extraNavActions:I=[],moreAtFirst:R=!1,className:M,afterClick:O,menuId:P,iconService:L,regroup:N=(...k)=>k})=>{const k=(0,E.useInjectable)(_.ICtxMenuRenderer),B=(0,E.useInjectable)(_.AbstractMenuService),F=(0,h.useDesignStyles)(r.default.titleActions,"titleActions"),[W,V]=N(S,A),H=o.default.useCallback(K=>{K.preventDefault(),K.stopPropagation(),V&&k.show({anchor:{x:K.clientX,y:K.clientY},menuNodes:V,args:w,onHide:O})},[V,w]);if(W.length===0&&V.length===0&&I.length===0)return null;const G=V.length>0?o.default.createElement(d,{disabled:V[0].disabled,icon:T,type:y,onClick:H,title:D}):null;return o.default.createElement("div",{className:(0,s.default)([F,M]),"data-menu-id":P},R&&G,W.map(K=>{if(K.id===_.ComponentMenuItemNode.ID)return o.default.createElement(m,{context:w,data:K,key:K.nodeId});if(K.id===_.SubmenuItemNode.ID){const j=B.createMenu(K.submenuId);if(!((0,_.generateMergedCtxMenu)({menus:j}).length>0))return}if(K.id===_.SeparatorMenuItemNode.ID)return o.default.createElement("span",{key:`vertical-divider-${K.id}`,className:r.default.verticalDivider});const z=K.id===_.SubmenuItemNode.ID?K.submenuId:K.id;return o.default.createElement(e.InlineActionWidget,{id:z,key:z,className:(0,s.default)({[r.default.selected]:K.checked}),type:y,data:K,afterClick:O,context:w,iconService:L})}),Array.isArray(I)&&I.length?o.default.createElement(o.default.Fragment,null,W.length&&o.default.createElement("span",{className:r.default.divider}),I):null,!R&&G)}),e.TitleActionList.displayName="TitleActionList";function p(y){const{menus:S,context:A,separator:T="navigation",debounce:D,isFlattenMenu:w=!1,...I}=y,[R,M]=(0,h.useMenus)(S,T,A,D),O=(0,o.useMemo)(()=>w?[...R,...M]:R,[R,M,w]);return o.default.createElement(e.TitleActionList,{menuId:S.menuId,nav:O,more:T==="inline"||w?[]:M,...I})}function v(y){const{iconService:S,menus:A,context:T,moreIcon:D,moreTitle:w,separator:I="navigation",...R}=y,[M,O]=(0,h.useContextMenus)(A);return o.default.createElement(e.TitleActionList,{menuId:A.menuId,nav:M,more:I==="inline"?[]:O,moreIcon:D,moreTitle:w,context:T,iconService:S,...R})}v.displayName="InlineMenuBar"},17647:(x,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.placements=void 0;const t={adjustX:1,adjustY:1},n=[0,0];e.placements={topLeft:{points:["bl","tl"],overflow:t,offset:[0,-4],targetOffset:n},topCenter:{points:["bc","tc"],overflow:t,offset:[0,-4],targetOffset:n},topRight:{points:["br","tr"],overflow:t,offset:[0,-4],targetOffset:n},bottomLeft:{points:["tl","bl"],overflow:t,offset:[0,4],targetOffset:n},bottomCenter:{points:["tc","bc"],overflow:t,offset:[0,4],targetOffset:n},bottomRight:{points:["tr","br"],overflow:t,offset:[0,4],targetOffset:n}},e.default=e.placements},89847:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AIAction=void 0;const n=t(85608),s=n.__importDefault(t(53373)),o=n.__importStar(t(14041)),f=t(43718),b=t(22689),g=t(48560),_=t(57995),E=t(24951),u=t(49716),h=t(52141),c=n.__importDefault(t(27410)),r=(0,b.createLayoutEventType)(f.AIInlineChatContentWidgetId),l=new CustomEvent(r,{bubbles:!0}),a=d=>{const{operationList:m,moreOperation:p,showClose:v=!0,onClickItem:y,onClose:S,customOperationRender:A,loading:T,loadingShowOperation:D=!1}=d,w=o.default.useRef(null),[I,R]=(0,g.useHover)(),M=(0,o.useCallback)(()=>{S?.()},[S]);(0,g.useChange)(R,()=>{var L;(L=w.current)===null||L===void 0||L.dispatchEvent(l)});const O=(0,o.useCallback)(()=>T&&D?o.default.createElement("div",{className:c.default.loading_mask}):null,[T,D]),P=(0,o.useCallback)(()=>{if(T&&!D)return null;const L=o.default.createElement(o.default.Fragment,null,m?.map(({name:N,title:k,id:B},F)=>k?o.default.createElement(h.EnhancePopover,{id:B,title:k,key:`popover_${F}`},o.default.createElement(_.EnhanceIcon,{wrapperClassName:c.default.operate_item,onClick:()=>y?.(B)},o.default.createElement("span",{key:F},N))):o.default.createElement(_.EnhanceIcon,{wrapperClassName:c.default.operate_item,onClick:()=>y?.(B),key:F},o.default.createElement("span",null,N))),p?.length?o.default.createElement(_.EnhanceIconWithCtxMenu,{icon:"more",menuNodes:p,wrapperClassName:c.default.operate_btn,skew:{x:-83,y:5}}):null);return o.default.createElement("div",{ref:I,className:c.default.operate_container},O(),o.default.createElement(E.LineVertical,{height:"100%",margin:"0 8px",maxHeight:14,minHeight:14}),A?o.default.createElement("div",{className:c.default.custom_operation_wrapper},A):o.default.createElement("div",{className:c.default.default_operation_wrapper},L))},[A,m,p,T,D]);return o.default.createElement("div",{ref:w,className:(0,s.default)(c.default.ai_action_wrapper,T&&c.default.loading,D&&c.default.loading_show_operation)},o.default.createElement(o.default.Fragment,null,o.default.createElement("div",{className:c.default.stable_container},T?o.default.createElement(h.EnhancePopover,{id:"inline_chat_loading",title:(0,f.localize)("aiNative.inline.chat.operate.loading.cancel")},o.default.createElement(u.Loading,{className:c.default.loading_icon})):o.default.createElement(_.AILogoAvatar,{className:c.default.ai_action_icon})),P(),v&&o.default.createElement("div",{className:c.default.close_container},o.default.createElement(E.LineVertical,{height:"100%",margin:"0px 8px",maxHeight:14,minHeight:14}),o.default.createElement(_.EnhanceIcon,{wrapperClassName:c.default.operate_btn,icon:"window-close",onClick:M}))))};e.AIAction=a},66205:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ContentWidgetContainerPanel=void 0;const n=t(85608),s=n.__importDefault(t(14041)),o=n.__importDefault(t(41771)),f=b=>s.default.createElement("div",{className:o.default.inline_chat_container_panel,style:b.style},b.children);e.ContentWidgetContainerPanel=f},57995:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AILogoAvatar=e.EnhanceIconWithCtxMenu=e.EnhanceIcon=void 0;const n=t(85608),s=n.__importDefault(t(53373)),o=n.__importStar(t(14041)),f=t(43718),b=t(81878),g=t(97222),_=t(48560),E=n.__importDefault(t(42798));e.EnhanceIcon=o.default.forwardRef((c,r)=>o.default.createElement("div",{className:(0,s.default)(c.wrapperClassName,E.default.ai_enhance_icon),style:c.wrapperStyle,onClick:c.onClick,ref:r,tabIndex:c.tabIndex,role:c.role,"aria-label":c.ariaLabel,"aria-pressed":c.ariaPressed},o.default.createElement(b.Icon,{className:(0,s.default)(c.className,E.default.icon),children:null,onClick:()=>null,style:(c.icon||c.iconClass)&&c.children?{marginRight:5}:{},icon:c.icon,iconClass:c.iconClass}),c.children&&o.default.createElement("span",{className:E.default.children_wrap},c.children)));const u=c=>{const{children:r,menuNodes:l,skew:a,id:d,...m}=c,p=(0,_.useInjectable)(f.CommandService),v=(0,_.useInjectable)(g.IBrowserCtxMenu),[y,S]=o.default.useState(void 0),A=o.default.useRef(null);o.default.useEffect(()=>{T()},[A.current,a]);const T=(0,o.useCallback)(w=>{requestAnimationFrame(()=>{if(A.current){const I=A.current.getBoundingClientRect(),{x:R,y:M,width:O,height:P}=I,L={x:R+O,y:M+P};a&&(L.x+=a.x,L.y+=a.y),S(L),w&&w(L)}})},[A.current,a]),D=o.default.useCallback(()=>{y&&(l?T(w=>{v.show({anchor:w,menuNodes:l})}):d&&p.executeCommand(d))},[A.current,l,y,d]);return o.default.createElement(e.EnhanceIcon,{ref:A,onClick:D,...m},r)};e.EnhanceIconWithCtxMenu=u;const h=c=>o.default.createElement("div",{className:(0,s.default)(E.default.ai_logo_avatar_container,c.className)},o.default.createElement(b.Icon,{icon:"magic-wand",className:(0,s.default)(c.iconClassName,E.default.avatar_icon)}));e.AILogoAvatar=h},89195:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});const n=t(85608);n.__exportStar(t(89847),e),n.__exportStar(t(57995),e),n.__exportStar(t(50610),e),n.__exportStar(t(24951),e),n.__exportStar(t(52141),e),n.__exportStar(t(75777),e),n.__exportStar(t(49716),e),n.__exportStar(t(83913),e)},50610:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AIInlineResult=void 0;const n=t(85608),s=n.__importDefault(t(53373)),o=n.__importDefault(t(14041)),f=t(57995),b=t(24951),g=t(75777),_=n.__importDefault(t(5011)),E=u=>{const{iconItems:h,isRenderThumbs:c=!0,isRenderClose:r=!1,closeClick:l}=u;return o.default.createElement("div",{className:_.default.ai_inline_result_panel},o.default.createElement("div",{className:_.default.side},h.map(({icon:a,text:d,onClick:m,btnType:p},v)=>o.default.createElement(f.EnhanceIcon,{wrapperClassName:(0,s.default)(_.default.operate_btn,p==="default"?_.default.default:""),icon:a,onClick:m,key:v},o.default.createElement("span",null,d)))),c&&o.default.createElement(o.default.Fragment,null,o.default.createElement(b.LineVertical,{height:"60%",margin:"0px 6px 0 6px"}),o.default.createElement("div",{className:_.default.side},o.default.createElement(g.Thumbs,{wrapperClassName:_.default.operate_icon}))),r&&o.default.createElement(o.default.Fragment,null,o.default.createElement(f.EnhanceIcon,{wrapperClassName:_.default.operate_btn,icon:"close",onClick:l})))};e.AIInlineResult=E},83913:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.InteractiveInput=void 0;const n=t(85608),s=n.__importDefault(t(53373)),o=n.__importStar(t(14041)),f=t(97267),b=t(43718),g=t(89195),_=n.__importDefault(t(42348)),E=160,u=32;e.InteractiveInput=o.default.forwardRef((h,c)=>{const{placeholder:r,onKeyDown:l,onBlur:a,onValueChange:d,onHeightChange:m,onFocus:p,onSend:v,disabled:y=!1,className:S,height:A,width:T,sendBtnClassName:D,popoverPosition:w,autoFocus:I}=h,R=(0,o.useRef)(null),[M,O]=(0,o.useState)(h.value||""),[P,L]=(0,o.useState)(A||u),[N,k]=(0,o.useState)(!1);(0,o.useImperativeHandle)(c,()=>R.current),(0,o.useEffect)(()=>{R&&R.current&&I&&R.current.focus()},[R]),(0,o.useEffect)(()=>{var z;const j=h.value;(0,b.isUndefined)(j)||j!==((z=R.current)===null||z===void 0?void 0:z.value)&&O(j||"")},[h.value,M,R]),(0,o.useEffect)(()=>{(0,b.isUndefined)(A)||A!==P&&L(A)},[A,P,m]),(0,o.useEffect)(()=>{if(!M){L(u);return}if(R&&R.current&&P<=E){R.current.style.height="0px";const z=R.current.scrollHeight;R.current.style.height=Math.min(z,E)+"px";const j=Math.min(z+12,E);L(j)}},[R,M,m,P]),(0,o.useEffect)(()=>{m?.(P)},[P]);const B=(0,o.useCallback)(z=>{O(z),d?.(z)},[d]),F=(0,o.useCallback)(z=>{k(!0),p?.(z)},[p]),W=(0,o.useCallback)(z=>{k(!1),a?.(z)},[a]),V=(0,o.useCallback)(()=>{y||M.trim()&&v?.(M)},[v,M,y]),H=(0,o.useCallback)(z=>{if(z.key==="Enter"&&!z.nativeEvent.isComposing){if(z.shiftKey)return;z.preventDefault(),V();return}l?.(z)},[l,V]),G=(0,o.useMemo)(()=>o.default.createElement("div",{className:_.default.input_icon_container},o.default.createElement("div",{className:(0,s.default)(_.default.send_chat_btn,N&&_.default.active,y&&_.default.disabled,D)},y?o.default.createElement("div",{className:_.default.ai_loading},o.default.createElement("div",{className:_.default.loader}),o.default.createElement("div",{className:_.default.loader}),o.default.createElement("div",{className:_.default.loader})):o.default.createElement(f.Popover,{id:`ai_chat_input_send_${(0,b.uuid)(4)}`,content:(0,b.localize)("aiNative.chat.enter.send"),delay:1500,position:w??f.PopoverPosition.top,disable:y},o.default.createElement(g.EnhanceIcon,{wrapperClassName:_.default.send_icon,className:(0,f.getIcon)("send-solid"),onClick:V,tabIndex:0,role:"button",ariaLabel:(0,b.localize)("aiNative.chat.enter.send")})))),[N,y,D,M,w]),K=(0,o.useMemo)(()=>(0,b.isUndefined)(T)?"100%":T+"px",[T]);return o.default.createElement(f.TextArea,{ref:R,placeholder:r,wrapperStyle:{height:P+"px",width:K},style:{height:P-10+"px"},value:M,onKeyDown:H,onFocus:F,onBlur:W,onValueChange:B,disabled:y,className:(0,s.default)(_.default.interactive_input_container,N?_.default.active:null,S),addonAfter:G})}),e.InteractiveInput.displayName="interactiveInput"},24951:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.HorizontalVertical=e.LineVertical=void 0;const s=t(85608).__importDefault(t(14041)),o={backgroundColor:"var(--editorGroup-border)",height:"100%",width:"1px",minWidth:"1px"},f={backgroundColor:"var(--editorGroup-border)",width:"100%",height:"1px",minHeight:"1px"},b=_=>s.default.createElement("span",{style:{...o,..._}});e.LineVertical=b;const g=_=>s.default.createElement("span",{style:{...f,..._}});e.HorizontalVertical=g},49716:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Loading=void 0;const n=t(85608),s=n.__importDefault(t(53373)),o=n.__importDefault(t(14041)),f=t(97267),b=n.__importDefault(t(43135));e.Loading=o.default.memo(g=>o.default.createElement(f.Icon,{className:(0,s.default)(g.className,b.default.loading_indicator),iconClass:(0,f.getIcon)("loading")})),e.Loading.displayName="Loading"},52141:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EnhancePopover=void 0;const s=t(85608).__importStar(t(14041)),o=t(97267),f=t(43718),b=g=>{const{children:_,id:E,title:u,onClick:h}=g,[c,r]=s.default.useState(!1),l=(0,s.useMemo)(()=>E+(0,f.uuid)(6),[E]),a=(0,s.useCallback)(m=>{r(!1),h&&h(m)},[h]),d=(0,s.useCallback)(m=>{r(m)},[]);return s.default.createElement(o.Popover,{id:l,title:u,onClick:a,display:c,onDisplayChange:d},_)};e.EnhancePopover=b},75777:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Thumbs=void 0;const s=t(85608).__importStar(t(14041)),o=t(43718),f=t(95040),b=t(81878),g=t(48560),_=t(67304),E=t(57995),u=h=>{const c=(0,g.useInjectable)(f.IAIInlineChatService),{relationId:r,onClick:l,wrapperClassName:a}=h,[d,m]=(0,s.useState)("thumbs"),[p,v]=(0,s.useState)("thumbsdown"),y=(0,s.useCallback)(T=>{l&&l(T),c&&c.fireThumbsEvent(T)},[r,c]),S=(0,s.useCallback)(T=>{T==="up"&&d==="thumbs"&&(m("thumbs-fill"),v(!1),y(!0)),T==="up"&&d==="thumbs-fill"&&(m("thumbs"),v("thumbsdown")),T==="down"&&p==="thumbsdown"&&(v("thumbsdown-fill"),m(!1),y(!1)),T==="down"&&p==="thumbsdown-fill"&&(v("thumbsdown"),m("thumbs"))},[d,p]),A=(0,g.useUUID)();return s.default.createElement(s.default.Fragment,null,typeof d=="string"&&s.default.createElement(b.Popover,{id:`ai-chat-thumbsup-${A}`,title:(0,o.localize)("aiNative.inline.chat.operate.thumbsup.title")},s.default.createElement(E.EnhanceIcon,{wrapperClassName:a,onClick:()=>S("up"),className:(0,_.getExternalIcon)(d,_.KTICON_OWNER),tabIndex:0,role:"button",ariaLabel:(0,o.localize)("aiNative.inline.chat.operate.thumbsup.title"),ariaPressed:d==="thumbs-fill"?"true":"false"})),typeof p=="string"&&s.default.createElement(b.Popover,{id:`ai-chat-thumbsdown-${A}`,title:(0,o.localize)("aiNative.inline.chat.operate.thumbsdown.title")},s.default.createElement(E.EnhanceIcon,{wrapperClassName:a,onClick:()=>S("down"),className:(0,_.getExternalIcon)(p,_.KTICON_OWNER),tabIndex:0,role:"button",ariaLabel:(0,o.localize)("aiNative.inline.chat.operate.thumbsdown.title"),ariaPressed:p==="thumbsdown-fill"?"true":"false"})))};e.Thumbs=u},81878:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Scroll=e.Scrollbars=e.NativeSelect=void 0;const n=t(85608);n.__exportStar(t(97885),e),n.__exportStar(t(73215),e),n.__exportStar(t(32293),e);var s=t(77331);Object.defineProperty(e,"NativeSelect",{enumerable:!0,get:function(){return s.Select}}),n.__exportStar(t(48412),e),n.__exportStar(t(79383),e),n.__exportStar(t(50708),e),n.__exportStar(t(7273),e),n.__exportStar(t(14640),e),n.__exportStar(t(54076),e),n.__exportStar(t(79024),e),n.__exportStar(t(89832),e),n.__exportStar(t(54713),e),n.__exportStar(t(18875),e),n.__exportStar(t(91397),e),n.__exportStar(t(31059),e),n.__exportStar(t(72871),e),n.__exportStar(t(34128),e);var o=t(77011);Object.defineProperty(e,"Scrollbars",{enumerable:!0,get:function(){return o.Scrollbars}}),Object.defineProperty(e,"Scroll",{enumerable:!0,get:function(){return o.Scrollbars}})},57327:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BoxPanel=void 0;const n=t(85608),s=n.__importDefault(t(53373)),o=n.__importStar(t(14041)),f=t(48560),b=t(38578),g=t(55693),_=t(25719),E=n.__importDefault(t(91290)),u=({className:h,children:c=[],direction:r="left-to-right",...l})=>{const a=o.default.Children.toArray(c),d=(0,f.useInjectable)(b.AppConfig),m=(0,g.useDesignStyles)(E.default["box-panel"],"box-panel");(0,o.useEffect)(()=>{d.didRendered&&d.didRendered()},[]);const p=_.Layout.getStyleProperties(r);return o.default.createElement("div",{...l,className:(0,s.default)(m,h),style:{flexDirection:p.direction,zIndex:l.zIndex||l["z-index"]}},a.map((v,y)=>{const S=v.props||{};return o.default.createElement("div",{key:y,id:S["data-wrapper-id"],className:(0,s.default)(E.default.wrapper,S["data-wrapper-class"]),style:{flex:S.flex,overflow:S.overflow,zIndex:S.zIndex||S["z-index"],[p.minSize]:S.defaultSize,backgroundColor:S.backgroundColor}},v)}))};e.BoxPanel=u},28003:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DefaultLayout=e.getStorageValue=void 0,e.ToolbarActionBasedLayout=_,e.fixLayout=E;const s=t(85608).__importDefault(t(14041)),o=t(52564),f=t(57327),b=t(99333),g=()=>{let u={},h={};try{const c=localStorage.getItem("layout");c&&(u=JSON.parse(c));const r=localStorage.getItem("theme");r&&(h=JSON.parse(r))}catch{}return{layout:E(u),colors:h}};e.getStorageValue=g,e.DefaultLayout=_;function _(u={}){var h,c,r,l,a,d;const{layout:m}=(0,e.getStorageValue)();return s.default.createElement(f.BoxPanel,{direction:"top-to-bottom"},s.default.createElement(o.SlotRenderer,{id:"top",defaultSize:u.topSlotDefaultSize||0,slot:"top",zIndex:u.topSlotZIndex}),s.default.createElement(b.SplitPanel,{id:"main-horizontal",flex:1},s.default.createElement(o.SlotRenderer,{slot:"left",isTabbar:!0,defaultSize:!((h=m.left)===null||h===void 0)&&h.currentId?((c=m.left)===null||c===void 0?void 0:c.size)||310:49,minResize:280,maxResize:480,minSize:49}),s.default.createElement(b.SplitPanel,{id:"main-vertical",minResize:300,flexGrow:1,direction:"top-to-bottom"},s.default.createElement(o.SlotRenderer,{flex:2,flexGrow:1,minResize:200,slot:"main"}),s.default.createElement(o.SlotRenderer,{flex:1,defaultSize:!((r=m.bottom)===null||r===void 0)&&r.currentId?(l=m.bottom)===null||l===void 0?void 0:l.size:24,minResize:160,slot:"bottom",isTabbar:!0})),s.default.createElement(o.SlotRenderer,{slot:"right",isTabbar:!0,defaultSize:!((a=m.right)===null||a===void 0)&&a.currentId?((d=m.right)===null||d===void 0?void 0:d.size)||310:0,minResize:280,maxResize:480,minSize:0})),s.default.createElement(o.SlotRenderer,{id:"statusBar",defaultSize:24,slot:"statusBar"}))}function E(u){const h={...u};for(const c in u)u[c]&&(u[c].size||(h[c].currentId=""));return h}},32293:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});const n=t(85608);n.__exportStar(t(25719),e),n.__exportStar(t(99333),e),n.__exportStar(t(57327),e),n.__exportStar(t(28003),e)},25719:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Layout=void 0;const n=t(73215),s={"left-to-right":{direction:"row",size:"width",domSize:"clientHeight",minSize:"minWidth",maxSize:"maxWidth"},"right-to-left":{direction:"row-reverse",size:"width",domSize:"clientHeight",minSize:"minWidth",maxSize:"maxWidth"},"top-to-bottom":{direction:"column",size:"height",domSize:"clientWidth",minSize:"minHeight",maxSize:"maxHeight"},"bottom-to-top":{direction:"column-reverse",size:"height",domSize:"clientWidth",minSize:"minHeight",maxSize:"maxHeight"}};var o;(function(f){function b(l){return s[l]}f.getStyleProperties=b;function g(l){return s[l].direction}f.getFlexDirection=g;function _(l){return s[l].size}f.getSizeProperty=_;function E(l){return s[l].domSize}f.getDomSizeProperty=E;function u(l){return s[l].minSize}f.getMinSizeProperty=u;function h(l){return s[l].maxSize}f.getMaxSizeProperty=h;function c(l){return l==="bottom-to-top"||l==="top-to-bottom"?n.ResizeHandleVertical:n.ResizeHandleHorizontal}f.getResizeHandle=c;function r(l){return l==="bottom-to-top"||l==="top-to-bottom"?"row":"column"}f.getTabbarDirection=r})(o||(e.Layout=o={}))},99333:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SplitPanel=e.PanelContext=void 0;const n=t(85608),s=n.__importDefault(t(53373)),o=n.__importDefault(t(14041)),f=t(43718),b=t(68456),g=t(48560),_=t(73215),E=t(25719),u=t(71707),h=n.__importDefault(t(91290));e.PanelContext=o.default.createContext({setSize:(a,d)=>{},setRelativeSize:(a,d,m)=>{},getSize:a=>0,getRelativeSize:a=>[0,0],lockSize:(a,d)=>{},setMaxSize:(a,d)=>{},hidePanel:a=>{}});const c=(a,d,m)=>{var p,v;return(v=a&&a.props&&((p=a.props[d])!==null&&p!==void 0?p:a.props[`data-sp-${d}`]))!==null&&v!==void 0?v:m};function r(a,d){return c(a,"savedSize")?c(a,"savedSize")+"px":c(a,"defaultSize")!==void 0?c(a,"defaultSize")+"px":c(a,"flex")?c(a,"flex")/d*100+"%":1/d*100+"%"}const l=a=>{const d=(0,g.useInjectable)(u.SplitPanelManager).getService(a.id),{id:m,className:p,headerSize:v,resizeHandleClassName:y,style:S,children:A=[],direction:T="left-to-right",resizeKeep:D=!0,dynamicTarget:w}=o.default.useMemo(()=>d.interceptProps(a),[d,d.interceptProps,a]),I=E.Layout.getResizeHandle(T),R=E.Layout.getStyleProperties(T),M=o.default.useMemo(()=>o.default.Children.toArray(A),[A]),O=o.default.useMemo(()=>M.find(pe=>c(pe,"flexGrow")),[M]),P=o.default.useMemo(()=>M.reduce((pe,J)=>pe+c(J,"flex",1),0),[M]),L=o.default.useRef([]),N=(0,g.useInjectable)(f.IEventBus),k=o.default.useRef(),B=o.default.useRef(M.map(()=>!1)),F=o.default.useRef(M.map(()=>!1)),W=o.default.useRef(B.current.slice(0,M.length-1)),[V,H]=o.default.useState(W.current),[G,K]=o.default.useState(F.current),[z,j]=o.default.useState(B.current);d.panels=[];const U=o.default.useCallback(pe=>(J,le)=>{const ie=le?pe-1:pe,ge=L.current[ie];ge&&ge.setAbsoluteSize(J!==void 0?J:c(M[pe],"defaultSize"),le,D)},[L.current]),$=o.default.useCallback(pe=>(J,le,ie)=>{const ge=ie?pe-1:pe,ee=L.current[ge];ee&&ee.setRelativeSize(J,le)},[L.current]),Y=o.default.useCallback(pe=>J=>{const le=J?pe-1:pe,ie=L.current[le];return ie?ie.getAbsoluteSize(J):0},[L.current]),Q=o.default.useCallback(pe=>J=>{const le=J?pe-1:pe,ie=L.current[le];return ie?ie.getRelativeSize():[0,0]},[L.current]),te=o.default.useCallback(pe=>(J,le)=>{const ie=le?pe-1:pe,ge=W.current.map((ee,X)=>X===ie?J!==void 0?J:!ee:ee);W.current=ge,H(ge)},[L.current]),re=o.default.useCallback(pe=>J=>{const le=B.current.map((ie,ge)=>ge===pe?J!==void 0?J:!ie:ie);B.current=le,j(le)},[L.current]),ae=o.default.useCallback(pe=>J=>{const le=F.current.map((ge,ee)=>ee===pe?J!==void 0?!J:!ge:ge);F.current=le;const ie=c(M[pe],"slot")||c(M[pe],"id");ie&&de(ie),K(le)},[M,F.current]),de=o.default.useCallback(pe=>{pe&&(N.fire(new b.ResizeEvent({slotLocation:pe})),N.fireDirective(b.ResizeEvent.createDirective(pe)))},[N]),q=o.default.useMemo(()=>M.map((pe,J)=>{const le=[],ie=c(pe,"minSize"),ge=c(pe,"maxSize"),ee=c(pe,"flexGrow");if(J!==0){const X=J===1?M[J-1]:M[J];let oe;ee?oe=_.ResizeFlexMode.Prev:c(M[J-1],"flexGrow")&&(oe=_.ResizeFlexMode.Next),c(X,"noResize")||V[J-1]||le.push(o.default.createElement(I,{className:y,onResize:()=>{const he=c(M[J-1],"slot")||c(M[J-1],"id"),ue=c(M[J],"slot")||c(M[J],"id");de(he),de(ue)},noColor:!0,findNextElement:w?he=>d.getFirstResizablePanel(J-1,he):void 0,findPrevElement:w?he=>d.getFirstResizablePanel(J-1,he,!0):void 0,key:`split-handle-${J}`,delegate:he=>{L.current.push(he)},flexMode:oe}))}return le.push(o.default.createElement(e.PanelContext.Provider,{key:J,value:{setSize:U(J),getSize:Y(J),setRelativeSize:$(J),getRelativeSize:Q(J),lockSize:te(J),setMaxSize:re(J),hidePanel:ae(J)}},o.default.createElement("div",{"data-min-resize":c(pe,"minResize"),"data-max-resize":c(pe,"maxResize"),ref:X=>{X&&d.panels.indexOf(X)===-1&&d.panels.push(X)},className:r(pe,P)===`${v}px`?_.RESIZE_LOCK:"",id:c(pe,"id"),style:{...c(pe,"flex")&&!c(pe,"savedSize")&&!O?{flex:c(pe,"flex")}:{[R.size]:r(pe,P)},[R.minSize]:ie?ie+"px":"-1px",[R.maxSize]:z[J]&&ge?ge+"px":"unset",...ee!==void 0?{flexGrow:ee}:{},display:G[J]?"none":"block"}},pe))),le}).filter(Boolean),[A,M,y,w,L.current,G,V]);return o.default.useEffect(()=>{k.current&&d.setRootNode(k.current);const pe=N.onDirective(b.ResizeEvent.createDirective(m),()=>{M.forEach(J=>{de(c(J,"slot")||c(J,"id"))})});return()=>{pe.dispose()}},[]),o.default.useMemo(()=>{const{minResize:pe,flexGrow:J,minSize:le,maxSize:ie,savedSize:ge,defaultSize:ee,flex:X,noResize:oe,slot:se,headerSize:he,...ue}=a;return delete ue.resizeHandleClassName,delete ue.dynamicTarget,delete ue.resizeKeep,delete ue.direction,d.renderSplitPanel(o.default.createElement("div",{...ue,ref:ve=>k.current=ve,className:(0,s.default)(h.default["split-panel"],p),style:{flexDirection:R.direction,...S},"data-min-resize":pe,"data-max-resize":ie,"data-min-size":le,"data-max-size":ie,"data-saved-size":ge,"data-default-size":ee,"data-header-size":he,"data-flex":X,"data-flex-grow":J,"data-no-resize":oe,"data-slot":se}),q,ue)},[d,d.renderSplitPanel,q,k,S,a])};e.SplitPanel=l},71707:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SplitPanelManager=e.SplitPanelService=e.ISplitPanelService=void 0;const n=t(85608),s=n.__importDefault(t(14041)),o=t(76003),f=t(43718),b=t(38578),g=t(73215);e.ISplitPanelService=Symbol("ISplitPanelService");let _=class extends f.Disposable{constructor(h){super(),this.panelId=h,this._whenReadyDeferred=new f.Deferred,this.panels=[]}get isVisible(){return this.rootNode&&this.rootNode.clientHeight>0||!1}get whenReady(){return this._whenReadyDeferred.promise}setRootNode(h){this.rootNode=h,this._whenReadyDeferred.resolve()}getFirstResizablePanel(h,c,r){if(r){if(c){for(let l=h;l>=0;l--)if(!this.panels[l].classList.contains(g.RESIZE_LOCK))return this.panels[l]}else for(let l=h;l>=0;l--)if(!this.panels[l].classList.contains(g.RESIZE_LOCK))return this.panels[l]}else if(c){for(let l=h+1;l<this.panels.length;l++)if(!this.panels[l].classList.contains(g.RESIZE_LOCK))return this.panels[l]}else for(let l=h+1;l<this.panels.length;l++)if(!this.panels[l].classList.contains(g.RESIZE_LOCK))return this.panels[l]}checkChildNoResize(h){var c,r;if(h&&h.type===b.SlotRenderer){const l=(r=this.appConfig.layoutConfig[(c=h.props)===null||c===void 0?void 0:c.slot])===null||r===void 0?void 0:r.modules;if(!l||l.length===0)return!0}return!1}renderSplitPanel(h,c,r){return s.default.cloneElement(h,{...r,...h.props},c)}interceptProps(h){return h}};e.SplitPanelService=_,n.__decorate([(0,o.Autowired)(b.AppConfig),n.__metadata("design:type",Object)],_.prototype,"appConfig",void 0),e.SplitPanelService=_=n.__decorate([(0,o.Injectable)({multiple:!0}),n.__metadata("design:paramtypes",[String])],_);let E=class{constructor(){this.services=new Map}getService(h){let c=this.services.get(h);return c||(c=this.injector.get(e.ISplitPanelService,[h]),this.services.set(h,c)),c}};e.SplitPanelManager=E,n.__decorate([(0,o.Autowired)(o.INJECTOR_TOKEN),n.__metadata("design:type",o.Injector)],E.prototype,"injector",void 0),e.SplitPanelManager=E=n.__decorate([(0,o.Injectable)()],E)},89897:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),t(85608).__exportStar(t(85266),e)},85266:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Loading=void 0;const s=t(85608).__importDefault(t(14041));t(18182);const o=()=>s.default.createElement("div",{className:"loading_indicator "});e.Loading=o,e.Loading.displayName="Loading"},97885:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});const s=t(85608).__importDefault(t(43144)),o=t(48560),f=({id:b,className:g,children:_})=>{const E=(0,o.usePortal)(b,g);return s.default.createPortal(_,E)};e.default=f},73215:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ResizeHandleVertical=e.ResizeHandleHorizontal=e.ResizeFlexMode=e.RESIZE_LOCK=void 0,e.preventWebviewCatchMouseEvents=_,e.allowWebviewCatchMouseEvents=E;const n=t(85608),s=n.__importDefault(t(53373)),o=n.__importDefault(t(14041)),f=t(22366),b=n.__importDefault(t(57482));e.RESIZE_LOCK="resize-lock";var g;(function(c){c.Prev="prev",c.Next="next",c.Percentage="Percentage"})(g||(e.ResizeFlexMode=g={}));function _(){const c=document.getElementsByTagName("iframe"),r=document.getElementsByTagName("webview"),l=document.getElementsByClassName("shadow-root-host");for(const a of r)a.classList.add("none-pointer-event");for(const a of c)a.classList.add("none-pointer-event");for(const a of l)a?.classList.add("none-pointer-event")}function E(){const c=document.getElementsByTagName("iframe"),r=document.getElementsByTagName("webview"),l=document.getElementsByClassName("shadow-root-host");for(const a of r)a.classList.remove("none-pointer-event");for(const a of c)a.classList.remove("none-pointer-event");for(const a of l)a?.classList.remove("none-pointer-event")}const u=c=>{const r=o.default.useRef(),l=o.default.useRef(!1),a=o.default.useRef(0),d=o.default.useRef(0),m=o.default.useRef(0),p=o.default.useRef(),v=o.default.useRef(),y=o.default.useRef(),S=(k,B)=>{const F=c.findPrevElement?c.findPrevElement():p.current,W=c.findNextElement?c.findNextElement():v.current;if(F&&F.classList.contains(e.RESIZE_LOCK)||W&&W.classList.contains(e.RESIZE_LOCK))return;const V=r.current.parentElement.offsetWidth,H=Number(F?.dataset.minResize||0),G=Number(W?.dataset.minResize||0),K=Number(F?.dataset.maxResize||0),z=Number(W?.dataset.maxResize||0);(H||G)&&(k*V<=H||B*V<=G)||(K||z)&&(k*V>=K||B*V>=z)||(W&&(W.style.width=B*100+"%"),F&&(F.style.width=k*100+"%"),c.onResize&&W&&F&&c.onResize(F,W))},A=(k,B,F,W)=>{var V,H;const G=c.findPrevElement?c.findPrevElement(W):p.current,K=c.findNextElement?c.findNextElement(W):v.current,z=Number((V=G?.dataset.minResize)!==null&&V!==void 0?V:0),j=Number((H=K?.dataset.minResize)!==null&&H!==void 0?H:0),U=G?.dataset.maxResize?Number(G?.dataset.maxResize):null,$=K?.dataset.maxResize?Number(K?.dataset.maxResize):null,Y=c.flexMode===g.Prev,Q=Y?G:K,te=Y?K:G;let re=Y?k:B;F||((z||j)&&(Y?z>k?re=z:j>B&&(re=k+B-j):j>B?re=j:z>k&&(re=k+B-z)),(U||$)&&(Y?U&&U<=k?re=U:$&&$>B&&(re=k+B-$):$&&$<=B?re=$:U&&U>B&&(re=k+B-U))),Q.style.width=re+"px",Q.style.flexGrow="0",Q.style.flexShrink="1",te.style.width="0",te.style.flexGrow="1",te.style.flexShrink="0",c.onResize&&K&&G&&c.onResize(G,K)},T=(k,B)=>{const F=p.current,W=v.current;let V;c.flexMode?V=(F.offsetWidth+W.offsetWidth)/F.parentElement.offsetWidth*100:V=+v.current.style.width.replace("%","")+ +p.current.style.width.replace("%",""),W&&(W.style.width=B/(k+B)*V+"%"),F&&(F.style.width=k/(k+B)*V+"%"),D(k,B),c.onResize&&W&&F&&c.onResize(F,W)},D=(k,B)=>{const F=p.current,W=v.current;let V=!1;F&&(k===0?(F.classList.add("kt_display_none"),V=!0):F.classList.remove("kt_display_none")),W&&(B===0?(W.classList.add("kt_display_none"),V=!0):W.classList.remove("kt_display_none")),r.current&&(V?r.current.classList.add("none-pointer-event"):r.current.classList.remove("none-pointer-event"))},w=()=>{const k=p.current.clientWidth,B=v.current.clientWidth,F=k+B,W=[];return W.push(k/F),W.push(B/F),W},I=(k,B)=>{f.fastdom.measure(()=>{const F=p.current.clientWidth,W=v.current.clientWidth,V=F+W;if(c.flexMode){const H=c.flexMode===g.Prev?k:V-k,G=c.flexMode===g.Next?k:V-k;A(H,G,!0)}else{const H=+v.current.style.width.replace("%",""),G=+p.current.style.width.replace("%",""),K=H+G;B?(v.current.style.width=K*(k/V)+"%",p.current.style.width=K*(1-k/V)+"%"):(p.current.style.width=K*(k/V)+"%",v.current.style.width=K*(1-k/V)+"%")}B?D(V-k,k):D(k,V-k),c.onResize&&c.onResize(p.current,v.current)})},R=k=>k?v.current.clientWidth:p.current.clientWidth,M=k=>{const B=k.classList,F=b.default["resize-overflow-hidden"];B?.contains(F)||B.add(F)},O=k=>{const B=k.classList,F=b.default["resize-overflow-hidden"];B?.contains(F)&&B.remove(F)},P=k=>{if(k.preventDefault(),r.current&&r.current.classList.contains("no-resize"))return;const B=d.current+k.pageX-a.current,F=m.current-(k.pageX-a.current);y.current&&y.current.dispose(),y.current=f.fastdom.mutate(()=>{if(c.flexMode)A(B,F);else{const W=r.current.parentElement.offsetWidth;S(B/W,F/W)}})},L=()=>{l.current=!1,document.removeEventListener("mousemove",P),document.removeEventListener("mouseup",L),c.onFinished&&c.onFinished(),f.fastdom.mutate(()=>{var k;(k=r.current)===null||k===void 0||k.classList.remove(b.default.active),O(p.current),O(v.current),E()})},N=k=>{l.current=!0,document.addEventListener("mousemove",P),document.addEventListener("mouseup",L),a.current=k.pageX,f.fastdom.measure(()=>{d.current=p.current.offsetWidth,m.current=v.current.offsetWidth,f.fastdom.mutate(()=>{var B;(B=r.current)===null||B===void 0||B.classList.add(b.default.active),M(p.current),M(v.current),_()})})};return o.default.useEffect(()=>(r.current&&(r.current.addEventListener("mousedown",N),p.current=r.current.previousSibling,v.current=r.current.nextSibling),()=>{r.current&&(r.current.removeEventListener("mousedown",N),r.current.removeEventListener("mousemove",P),r.current.removeEventListener("mouseup",L))}),[]),c.delegate&&c.delegate({setSize:S,setAbsoluteSize:I,getAbsoluteSize:R,setRelativeSize:T,getRelativeSize:w}),o.default.createElement("div",{ref:k=>{r.current=k},className:(0,s.default)({[b.default["resize-handle-horizontal"]]:!0,[b.default["with-color"]]:!c.noColor,[c.className||""]:!0})})};e.ResizeHandleHorizontal=u;const h=c=>{const r=o.default.useRef(),l=o.default.useRef(!1),a=o.default.useRef(0),d=o.default.useRef(0),m=o.default.useRef(0),p=o.default.useRef(),v=o.default.useRef(),y=o.default.useRef(),S=o.default.useRef(),A=(k,B,F)=>{const W=c.findPrevElement?c.findPrevElement(F):p.current,V=c.findNextElement?c.findNextElement(F):v.current;!V||!W||W.classList.contains(e.RESIZE_LOCK)||V.classList.contains(e.RESIZE_LOCK)||(V.style.height=B*100+"%",W.style.height=k*100+"%",c.onResize&&c.onResize(W,V))},T=(k,B,F,W)=>{var V,H;const G=c.findPrevElement?c.findPrevElement(W):p.current,K=c.findNextElement?c.findNextElement(W):v.current;let z,j,U=0;const $=Number(((V=G?.dataset)===null||V===void 0?void 0:V.minResize)||0),Y=Number(((H=K?.dataset)===null||H===void 0?void 0:H.minResize)||0);c.flexMode===g.Prev?(z=G,j=K,U=k,F||($>k?U=$:Y>B&&(U=k+B-Y))):(z=K,j=G,U=B,F||(Y>B?U=Y:$>k&&(U=k+B-$))),z.style.height=U+"px",z.style.flexGrow="0",z.style.flexShrink="1",j.style.height="0",j.style.flexGrow="1",j.style.flexShrink="0",c.onResize&&K&&G&&c.onResize(G,K)},D=(k,B)=>{const F=p.current,W=v.current;let V;c.flexMode?V=(F.offsetHeight+W.offsetHeight)/F.parentElement.offsetHeight*100:V=+W.style.height.replace("%","")+ +F.style.height.replace("%",""),W&&(W.style.height=B/(k+B)*V+"%"),F&&(F.style.height=k/(k+B)*V+"%"),w(k,B),c.onResize&&W&&F&&c.onResize(F,W)},w=(k,B)=>{const F=p.current,W=v.current;let V=!1;F&&(k===0?(F.classList.add("kt_display_none"),V=!0):F.classList.remove("kt_display_none")),W&&(B===0?(W.classList.add("kt_display_none"),V=!0):W.classList.remove("kt_display_none")),r.current&&(V?r.current.classList.add("none-pointer-event"):r.current.classList.remove("none-pointer-event"))},I=()=>{const k=p.current.clientHeight,B=v.current.clientHeight,F=k+B,W=[];return W.push(k/F),W.push(B/F),W},R=(k,B,F,W)=>{F.classList.contains(e.RESIZE_LOCK)||W.classList.contains(e.RESIZE_LOCK)||(W.style.height=B+"px",F.style.height=k+"px",W.style.flex="unset",F.style.flex="unset",c.onResize&&W&&F&&c.onResize(F,W))},M=(k,B,F)=>{if(!p.current||!v.current)return;const W=p.current.clientHeight,V=v.current.clientHeight,H=W+V;if(c.flexMode){const G=c.flexMode===g.Prev?k:H-k,K=c.flexMode===g.Next?k:H-k;T(G,K,!0)}else{const G=+v.current.style.height.replace(/\%|px/,""),K=+p.current.style.height.replace(/\%|px/,""),z=G+K;if(B){F&&(p.current.style.height=z*(1-k/H)+"%");const j=z*(k/H);v.current.style.height=j===0?j+"px":j+"%"}else p.current.style.height=z*(k/H)+"%",F&&(v.current.style.height=z*(1-k/H)+"%")}B?w(H-k,k):w(k,H-k),c.onResize&&c.onResize(p.current,v.current)},O=k=>k?v.current.clientHeight:p.current.clientHeight,P=k=>{l.current=!0,document.addEventListener("mousemove",L),document.addEventListener("mouseup",N),a.current=k.pageY,S.current=v.current,y.current=p.current,f.fastdom.measure(()=>{d.current=p.current.offsetHeight,m.current=v.current.offsetHeight,f.fastdom.mutate(()=>{var B;(B=r.current)===null||B===void 0||B.classList.add(b.default.active),_()})})},L=k=>{k.preventDefault(),!(r.current&&r.current.classList.contains("no-resize"))&&f.fastdom.measure(()=>{const B=k.pageY>a.current,F=c.findNextElement?c.findNextElement(B):null,W=c.findPrevElement?c.findPrevElement(B):null;if(F!==null&&S.current!==F||W!==null&&y.current!==W){if(!F||!W)return;S.current=F,y.current=W,a.current=k.pageY,d.current=y.current.offsetHeight,m.current=S.current.offsetHeight}const V=d.current+k.pageY-a.current,H=m.current-(k.pageY-a.current),G=Number(y.current.dataset.minResize||0),K=Number(S.current.dataset.minResize||0);(G||K)&&(V<=G||H<=K)||f.fastdom.mutate(()=>{if(c.flexMode===g.Prev||c.flexMode===g.Next)T(V,H);else if(c.flexMode===g.Percentage){const z=r.current.parentElement.offsetHeight;A(V/z,H/z)}else R(V,H,y.current,S.current)})})},N=k=>{l.current=!1,document.removeEventListener("mousemove",L),document.removeEventListener("mouseup",N),f.fastdom.mutate(()=>{var B;(B=r.current)===null||B===void 0||B.classList.remove(b.default.active),c.onFinished&&c.onFinished(),E()})};return o.default.useEffect(()=>(r.current.addEventListener("mousedown",P),p.current=r.current.previousSibling,v.current=r.current.nextSibling,()=>{r.current.removeEventListener("mousedown",P),document.removeEventListener("mousemove",L),document.removeEventListener("mouseup",N)}),[]),c.delegate&&c.delegate({setSize:A,setAbsoluteSize:M,getAbsoluteSize:O,setRelativeSize:D,getRelativeSize:I}),o.default.createElement("div",{ref:k=>k&&(r.current=k),className:(0,s.default)({[b.default["resize-handle-vertical"]]:!0,[c.className||""]:!0,[b.default["with-color"]]:!c.noColor})})};e.ResizeHandleVertical=h},77331:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Select=void 0;const n=t(85608),s=n.__importDefault(t(53373)),o=n.__importDefault(t(14041));n.__exportStar(t(88706),e);const f=b=>(b={...b,className:(0,s.default)("kt_select",b.className)},o.default.createElement("select",{...b}));e.Select=f},53736:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ContextKeyChangeEvent=e.IContextKeyService=void 0;const n=t(43718);e.IContextKeyService=Symbol("IContextKeyService");class s extends n.BasicEvent{}e.ContextKeyChangeEvent=s},50394:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MultiLineEditsIsVisible=e.InlineDiffPartialEditsIsVisible=e.InlineInputWidgetIsVisible=e.InlineHintWidgetIsVisible=e.InlineCompletionIsTrigger=e.InlineChatIsVisible=void 0;const n=t(40191);e.InlineChatIsVisible=new n.RawContextKey("ai.native.inlineChatIsVisible",!1),e.InlineCompletionIsTrigger=new n.RawContextKey("ai.native.inlineCompletionIsTrigger",!1),e.InlineHintWidgetIsVisible=new n.RawContextKey("ai.native.inlineHintWidgetIsVisible",!1),e.InlineInputWidgetIsVisible=new n.RawContextKey("ai.native.inlineInputWidgetIsVisible",!1),e.InlineDiffPartialEditsIsVisible=new n.RawContextKey("ai.native.inlineDiffPartialEditsIsVisible",!1),e.MultiLineEditsIsVisible=new n.RawContextKey("ai.native.multiLineEditsIsVisible",!1)},20162:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.FileDialogViewVisibleContext=e.DialogViewVisibleContext=void 0;const n=t(40191);e.DialogViewVisibleContext=new n.RawContextKey("dialogViewVisible",!1),e.FileDialogViewVisibleContext=new n.RawContextKey("fileDialogViewVisible",!1)},16413:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ExplorerCompressedLastFocusContext=e.ExplorerCompressedFirstFocusContext=e.ExplorerCompressedFocusContext=e.FilesExplorerFilteredContext=e.FilesExplorerInputFocusedContext=e.FilesExplorerFocusedContext=e.ExplorerFilteredContext=e.ExplorerFocusedContext=e.ExplorerResourceCut=e.ExplorerViewletVisibleContext=e.ExplorerResourceIsFolderContext=void 0;const n=t(40191);e.ExplorerResourceIsFolderContext=new n.RawContextKey("explorerResourceIsFolder",!1),e.ExplorerViewletVisibleContext=new n.RawContextKey("explorerViewletVisible",!0),e.ExplorerResourceCut=new n.RawContextKey("explorerResourceCut",!1),e.ExplorerFocusedContext=new n.RawContextKey("explorerViewletFocus",!1),e.ExplorerFilteredContext=new n.RawContextKey("explorerViewletFilter",!1),e.FilesExplorerFocusedContext=new n.RawContextKey("filesExplorerFocus",!1),e.FilesExplorerInputFocusedContext=new n.RawContextKey("filesExplorerInputFocus",!1),e.FilesExplorerFilteredContext=new n.RawContextKey("filesExplorerFilteredContext",!1),e.ExplorerCompressedFocusContext=new n.RawContextKey("explorerViewletCompressedFocus",!1),e.ExplorerCompressedFirstFocusContext=new n.RawContextKey("explorerViewletCompressedFirstFocus",!1),e.ExplorerCompressedLastFocusContext=new n.RawContextKey("explorerViewletCompressedLastFocus",!1)},66e3:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});const n=t(85608);n.__exportStar(t(16413),e),n.__exportStar(t(91830),e),n.__exportStar(t(29906),e),n.__exportStar(t(96774),e),n.__exportStar(t(73537),e),n.__exportStar(t(20162),e)},379:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ShowExcludedFilesFilterContextKey=e.ShowActiveFileFilterContextKey=e.ShowInfoFilterContextKey=e.ShowWarningsFilterContextKey=e.ShowErrorsFilterContextKey=e.RelatedInformationFocusContextKey=e.MarkerViewFilterFocusContextKey=e.MarkerFocusContextKey=e.MarkersTreeVisibilityContextKey=void 0;const n=t(40191);e.MarkersTreeVisibilityContextKey=new n.RawContextKey("problemsVisibility",!1),e.MarkerFocusContextKey=new n.RawContextKey("problemFocus",!1),e.MarkerViewFilterFocusContextKey=new n.RawContextKey("problemsFilterFocus",!1),e.RelatedInformationFocusContextKey=new n.RawContextKey("relatedInformationFocus",!1),e.ShowErrorsFilterContextKey=new n.RawContextKey("problems.filter.errors",!0),e.ShowWarningsFilterContextKey=new n.RawContextKey("problems.filter.warnings",!0),e.ShowInfoFilterContextKey=new n.RawContextKey("problems.filter.info",!0),e.ShowActiveFileFilterContextKey=new n.RawContextKey("problems.filter.activeFile",!1),e.ShowExcludedFilesFilterContextKey=new n.RawContextKey("problems.filter.excludedFiles",!0)},96774:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.OutlineFollowCursorContext=e.OutlineSortTypeContext=void 0;const n=t(40191);e.OutlineSortTypeContext=new n.RawContextKey("outlineSortType",0),e.OutlineFollowCursorContext=new n.RawContextKey("outlineFollowCursor",!1)},91830:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ResourceContextKey=void 0;const n=t(43718),s=t(63214);class o{constructor(b,g=s.getLanguageIdFromMonaco,_="resource"){if(this.contextKeyService=b,this.languageResolver=g,!_)throw new Error("resource key prefix cannot be empty!");this.resourceScheme=this.contextKeyService.createKey(_+"Scheme",""),this.resourceFilename=this.contextKeyService.createKey(_+"Filename",""),this.resourceExtname=this.contextKeyService.createKey(_+"Extname",""),this.resourceLangId=this.contextKeyService.createKey(_+"LangId",""),this.resourceKey=this.contextKeyService.createKey(_,""),this.isFileSystemResource=this.contextKeyService.createKey("isFileSystem"+_.substr(0,1).toUpperCase()+_.substr(1),!1)}set(b){if(!b){this.reset();return}const g=this.resourceKey.get();b.isEqual(new n.URI(g))||(this.resourceScheme.set(b.scheme),this.resourceFilename.set(b.path.name+b.path.ext),this.resourceExtname.set(b.path.ext),this.resourceLangId.set(this.languageResolver(b)),this.resourceKey.set(b.toString()),this.isFileSystemResource.set(b.scheme===n.Schemes.file))}reset(){this.resourceScheme.set(""),this.resourceFilename.set(""),this.resourceExtname.set(""),this.resourceLangId.set(""),this.resourceKey.set(""),this.isFileSystemResource.set(!1)}}e.ResourceContextKey=o},67386:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.InTreeViewKey=e.ViewHasSomeCollapsibleKey=e.ViewHasFilePatternKey=e.ViewHasReplacePatternKey=e.ViewHasSearchPatternKey=e.MatchFocusKey=e.ResourceFolderFocusKey=e.FolderFocusKey=e.FileFocusKey=e.FileMatchOrFolderMatchWithResourceFocusKey=e.FileMatchOrFolderMatchFocusKey=e.FileMatchOrMatchFocusKey=e.FirstMatchFocusKey=e.ReplaceActiveKey=e.PatternExcludesFocusedKey=e.PatternIncludesFocusedKey=e.InputBoxFocusedKey=e.SearchViewVisibleKey=e.HasSearchResults=e.ReplaceInputBoxFocusedKey=e.SearchInputBoxFocusedKey=e.SearchViewFocusedKey=void 0;const n=t(40191);e.SearchViewFocusedKey=new n.RawContextKey("searchViewletFocus",!1),e.SearchInputBoxFocusedKey=new n.RawContextKey("searchInputBoxFocus",!1),e.ReplaceInputBoxFocusedKey=new n.RawContextKey("replaceInputBoxFocus",!1),e.HasSearchResults=new n.RawContextKey("hasSearchResult",!1),e.SearchViewVisibleKey=new n.RawContextKey("searchViewletVisible",!0),e.InputBoxFocusedKey=new n.RawContextKey("inputBoxFocus",!1),e.PatternIncludesFocusedKey=new n.RawContextKey("patternIncludesInputBoxFocus",!1),e.PatternExcludesFocusedKey=new n.RawContextKey("patternExcludesInputBoxFocus",!1),e.ReplaceActiveKey=new n.RawContextKey("replaceActive",!1),e.FirstMatchFocusKey=new n.RawContextKey("firstMatchFocus",!1),e.FileMatchOrMatchFocusKey=new n.RawContextKey("fileMatchOrMatchFocus",!1),e.FileMatchOrFolderMatchFocusKey=new n.RawContextKey("fileMatchOrFolderMatchFocus",!1),e.FileMatchOrFolderMatchWithResourceFocusKey=new n.RawContextKey("fileMatchOrFolderMatchWithResourceFocus",!1),e.FileFocusKey=new n.RawContextKey("fileMatchFocus",!1),e.FolderFocusKey=new n.RawContextKey("folderMatchFocus",!1),e.ResourceFolderFocusKey=new n.RawContextKey("folderMatchWithResourceFocus",!1),e.MatchFocusKey=new n.RawContextKey("matchFocus",!1),e.ViewHasSearchPatternKey=new n.RawContextKey("viewHasSearchPattern",!1),e.ViewHasReplacePatternKey=new n.RawContextKey("viewHasReplacePattern",!1),e.ViewHasFilePatternKey=new n.RawContextKey("viewHasFilePattern",!1),e.ViewHasSomeCollapsibleKey=new n.RawContextKey("viewHasSomeCollapsibleResult",!1),e.InTreeViewKey=new n.RawContextKey("inTreeView",!1)},29906:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ShellExecutionSupported=e.IsTerminalFocused=e.IsTerminalViewInitialized=void 0;const n=t(40191);e.IsTerminalViewInitialized=new n.RawContextKey("isTerminalViewInitialized",!1),e.IsTerminalFocused=new n.RawContextKey("isTerminalFocused",!1),e.ShellExecutionSupported=new n.RawContextKey("shellExecutionSupported",!0)},12288:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TestingCanRefreshTests=e.TestingIsPeekVisible=e.TestingIsInPeek=e.TestingIsRunning=e.TestingHasAnyResults=e.TestingServiceHasDebuggableContextKey=e.TestingServiceProviderCount=void 0;const n=t(40191);e.TestingServiceProviderCount=new n.RawContextKey("service.testing.providerCount",0),e.TestingServiceHasDebuggableContextKey=new n.RawContextKey("service.testing.hasDebuggableContext",!1),e.TestingHasAnyResults=new n.RawContextKey("testing.hasAnyResults",!1),e.TestingIsRunning=new n.RawContextKey("testing.isRunning",!1),e.TestingIsInPeek=new n.RawContextKey("testing.isInPeek",!0),e.TestingIsPeekVisible=new n.RawContextKey("testing.isPeekVisible",!1),e.TestingCanRefreshTests=new n.RawContextKey("testing.canRefresh",!1)},73537:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.VirtualWorkspace=e.WorkspaceTrusted=e.WorkspaceFolderCount=e.WorkbenchState=void 0;const n=t(40191);e.WorkbenchState=new n.RawContextKey("workbenchState","empty"),e.WorkspaceFolderCount=new n.RawContextKey("workspaceFolderCount",0),e.WorkspaceTrusted=new n.RawContextKey("isWorkspaceTrusted",!0),e.VirtualWorkspace=new n.RawContextKey("virtualWorkspace",!1)},18193:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CorePreferences=e.corePreferenceSchema=e.FILE_TREE_DEFAULTS=e.FILES_DEFAULTS=void 0,e.injectCorePreferences=b;const n=t(43718),s=t(69734),o=t(78132),f={confirmDelete:!0,confirmMove:!0};e.FILES_DEFAULTS={filesWatcherExclude:{"**/.git/objects/**":!0,"**/.git/subtree-cache/**":!0,"**/node_modules/**/*":!0,"**/.hg/store/**":!0},filesExclude:{"**/.git":!0,"**/.svn":!0,"**/.hg":!0,"**/CVS":!0,"**/.DS_Store":!0}},e.FILE_TREE_DEFAULTS={baseIndent:10,indent:8},e.corePreferenceSchema={type:"object",properties:{[n.GeneralSettingsId.Language]:{type:"string",enum:(0,n.getAvailableLanguages)().map(g=>g.languageId),default:s.LOCALE_TYPES.EN_US},[n.GeneralSettingsId.Theme]:{type:"string",default:"vs-dark",enum:[]},"general.askReloadOnLanguageChange":{type:"boolean",default:!0,description:"%preference.description.general.askReloadOnLanguageChange%"},[n.GeneralSettingsId.Icon]:{type:"string",default:"vs-minimal",enum:[]},[n.GeneralSettingsId.ProductIconTheme]:{type:"string",default:"opensumi-icons",enum:["opensumi-icons"]},"workbench.colorCustomizations":{type:"object",description:"%preference.workbench.colorCustomizations%",default:{}},"application.supportsOpenFolder":{type:"boolean",default:!1,description:"Whether default open folder behavior is supported"},"application.supportsOpenWorkspace":{type:"boolean",default:!1,description:"Whether default open workspace behavior is supported"},"application.confirmExit":{type:"string",enum:["never","ifRequired","always"],default:"always",description:"When to confirm before closing the application window."},"application.preferMarkdownPreview":{type:"boolean",default:!1,description:"Use markdown preview first"},"application.invalidExthostReload":{type:"string",enum:["ifRequired","always"],default:"ifRequired",description:"Reload strategy when exthost process became invalid."},"workbench.list.openMode":{type:"string",enum:["singleClick","doubleClick"],default:"singleClick",description:"%preference.workbench.list.openMode%"},"workbench.commandPalette.history":{type:"number",default:50,minimum:0,description:"Controls the number of recently used commands to keep in history for the command palette. Set to 0 to disable command history."},"workbench.refactoringChanges.showPreviewStrategy":{type:"string",default:"askMe",enum:["show","hide","askMe"],description:"%preference.workbench.refactoringChanges.showPreviewStrategy%"},"workbench.quickOpen.preserveInput":{type:"boolean",default:!0,description:"%workbench.quickOpen.preserveInput%"},"workbench.hideSlotTabBarWhenHidePanel":{type:"boolean",default:!1,description:"%workbench.hideSlotTabBarWhenHidePanel%"},"explorer.confirmMove":{type:"boolean",default:f.confirmDelete,description:"%preference.explorer.confirm.move%"},"explorer.confirmDelete":{type:"boolean",default:f.confirmMove,description:"%preference.explorer.confirm.delete%"},"explorer.fileTree.baseIndent":{type:"number",default:e.FILE_TREE_DEFAULTS.baseIndent},"explorer.fileTree.indent":{type:"number",default:e.FILE_TREE_DEFAULTS.indent},"explorer.compactFolders":{type:"boolean",description:"%preference.explorer.compactFolders%",default:!0},"explorer.autoReveal":{type:"boolean",default:!0},"debug.toolbar.float":{type:"boolean",default:!0},"debug.breakpoint.editorHint":{type:"boolean",default:!0,description:"%preference.debug.breakpoint.editorHint%"},"debug.breakpoint.showBreakpointsInOverviewRuler":{type:"boolean",default:!1,description:"%preference.debug.breakpoint.showBreakpointsInOverviewRuler%"},"debug.toolbar.top":{type:"number",default:0,description:"%preference.debug.toolbar.top%"},"debug.toolbar.height":{type:"number",default:30,description:"%preference.debug.toolbar.height%"},"debug.console.filter.mode":{type:"string",enum:["filter","matcher"],default:"filter"},"files.exclude":{type:"object",description:"%preference.files.exclude%",default:e.FILES_DEFAULTS.filesExclude,additionalProperties:{anyOf:[{type:"boolean",description:(0,n.localize)("files.exclude.boolean","The glob pattern to match file paths against. Set to true or false to enable or disable the pattern.")}]}},"files.watcherExclude":{type:"object",default:e.FILES_DEFAULTS.filesWatcherExclude,description:"%preference.files.watcherExclude%"},"files.associations":{type:"object",markdownDescription:"%preference.files.associations%"},"files.encoding":{type:"string",description:"%preference.files.encoding%",default:"utf8",enum:Object.keys(n.SUPPORTED_ENCODINGS)},"files.eol":{type:"string",enum:[`
28103
28103
  `,`\r
28104
28104
  `,"auto"],default:"auto"},"files.trimFinalNewlines":{type:"boolean",default:!1},"files.trimTrailingWhitespace":{type:"boolean",default:!1},"files.insertFinalNewline":{type:"boolean",default:!1},"files.autoGuessEncoding":{type:"boolean",default:!1,description:"%preference.files.autoGuessEncoding%",included:Object.keys(n.SUPPORTED_ENCODINGS).length>1},"settings.userBeforeWorkspace":{type:"boolean",default:!1,description:"%settings.configuration.userBeforeWorkspace%"},"output.maxChannelLine":{type:"number",default:5e4,description:"%output.maxChannelLineDesc%"},"output.enableLogHighlight":{type:"boolean",default:!0,description:"%output.enableLogHighlightDesc%"},"output.enableSmartScroll":{type:"boolean",default:!0,description:"%output.enableSmartScrollDesc%"},"debug.inline.values":{type:"boolean",default:!1},"debug.console.wordWrap":{type:"boolean",default:!0},"toolbar.ignoreActions":{type:"object",patternProperties:{".*":{type:"array",items:[{type:"string"}]}},description:"%preference.toolbar.ignoreActions%"},"toolbar.buttonDisplay":{type:"string",enum:["icon","iconAndText"],default:"iconAndText",description:"%preference.toolbar.buttonDisplay%"},"toolbar.buttonTitleStyle":{type:"string",enum:["vertical","horizontal"],default:"horizontal"},"view.saveLayoutWithWorkspace":{type:"boolean",default:!1},"menubar.compactMode":{type:"boolean",default:!1},"editor.codeActionWidget.showHeaders":{type:"boolean",default:!0},"mergeEditor.autoApplyNonConflictChanges":{type:"boolean",default:!1}}},e.CorePreferences=Symbol("CorePreferences");function b(g){g.addProviders({token:e.CorePreferences,useFactory:_=>{const E=_.get(o.PreferenceService);return(0,o.createPreferenceProxy)(E,e.corePreferenceSchema)}})}},2758:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DesignStyleService=void 0;const n=t(85608),s=n.__importDefault(t(53373)),o=t(76003),f="design-";let b=class{get styles(){return this._styles}setStyles(_){this._styles=_}wrapStyles(_,E){return this._styles?_?(0,s.default)(_,this._styles[f+E]):"":_||""}};e.DesignStyleService=b,e.DesignStyleService=b=n.__decorate([(0,o.Injectable)()],b)},80832:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});const n=t(85608);n.__exportStar(t(2758),e),n.__exportStar(t(66597),e),n.__exportStar(t(68576),e)},68576:(x,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.StackingLevelStr=e.StackingLevel=void 0,e.StackingLevel=Object.freeze({Background:0,Workbench:1,Toolbar:2,XtermDecoration:8,ToolbarDropdown:10,EditorTabbarCurrent:11,ResizeHandle:12,EditorTabbarOverlay:15,EditorFloatingContainer:20,Popup:100,Overlay:800,PopoverComponent:999,PopoverComponentArrow:1e3,OverlayTop:1e3}),e.StackingLevelStr=Object.fromEntries(Object.entries(e.StackingLevel).map(([t,n])=>[t,n.toString()]))},66597:(x,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IDesignStyleService=void 0,e.IDesignStyleService=Symbol("IDesignStyleService")},4246:(x,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.withPrevented=t;function t(n){return s=>{s.preventDefault(),s.stopPropagation(),n&&n(s)}}},19636:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});const n=t(70392);class s{constructor(v,y){this._runner=v,this.priority=y,this._disposed=!1}run(){if(!this._disposed)try{this._runner()}catch(v){(0,n.onUnexpectedError)(v)}}dispose(){this._disposed=!0}}const o=new n.Heap({comparator:(p,v)=>v.priority-p.priority}),f=new n.Heap({comparator:(p,v)=>v.priority-p.priority});let b=o,g=f;function _(){b===o?(b=f,g=o):(b=o,g=f)}let E,u=!1;function h(){for(E=void 0,u=!0,_();b.size>0;)b.pop().run();u=!1}function c(){E||(E=requestAnimationFrame(h))}function r(p){u?b.add(p):g.add(p)}function l(p){const v=new s(p,1e4);return r(v),c(),v}function a(p){const v=new s(p,-1e4);return r(v),c(),v}function d(p){const v=new s(p,1e4);return g.add(v),c(),v}const m={measure:l,measureAtNextFrame:d,mutate:a};e.default=m},22366:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MouseEventButton=e.fastdom=e.FocusTracker=e.DomListener=e.EventType=void 0,e.isAncestor=b,e.addDisposableListener=_,e.trackFocus=u,e.createClassNameTokens=h,e.addClassName=c;const n=t(85608),s=t(43718),o=t(77714),f=n.__importDefault(t(19636));e.fastdom=f.default,n.__exportStar(t(4246),e),e.EventType={CLICK:"click",DBLCLICK:"dblclick",MOUSE_UP:"mouseup",MOUSE_DOWN:"mousedown",MOUSE_OVER:"mouseover",MOUSE_MOVE:"mousemove",MOUSE_OUT:"mouseout",MOUSE_ENTER:"mouseenter",MOUSE_LEAVE:"mouseleave",CONTEXT_MENU:"contextmenu",WHEEL:"wheel",KEY_DOWN:"keydown",KEY_PRESS:"keypress",KEY_UP:"keyup",LOAD:"load",UNLOAD:"unload",ABORT:"abort",ERROR:"error",RESIZE:"resize",SCROLL:"scroll",FULLSCREEN_CHANGE:"fullscreenchange",WK_FULLSCREEN_CHANGE:"webkitfullscreenchange",SELECT:"select",CHANGE:"change",SUBMIT:"submit",RESET:"reset",FOCUS:"focus",FOCUS_IN:"focusin",FOCUS_OUT:"focusout",BLUR:"blur",INPUT:"input",STORAGE:"storage",DRAG_START:"dragstart",DRAG:"drag",DRAG_ENTER:"dragenter",DRAG_LEAVE:"dragleave",DRAG_OVER:"dragover",DROP:"drop",DRAG_END:"dragend",ANIMATION_START:s.isWebKit?"webkitAnimationStart":"animationstart",ANIMATION_END:s.isWebKit?"webkitAnimationEnd":"animationend",ANIMATION_ITERATION:s.isWebKit?"webkitAnimationIteration":"animationiteration"};function b(r,l){for(;r;){if(r===l)return!0;r=r.parentNode}return!1}class g{constructor(l,a,d,m){this._node=l,this._type=a,this._handler=d,this._useCapture=m||!1,this._node.addEventListener(this._type,this._handler,this._useCapture)}dispose(){this._handler&&(this._node.removeEventListener(this._type,this._handler,this._useCapture),this._node=null,this._handler=null)}}e.DomListener=g;function _(r,l,a,d){return new g(r,l,a,d)}class E extends s.Disposable{constructor(l){super(),this.didFocus=new s.Emitter,this.onDidFocus=this.didFocus.event,this.didBlur=new s.Emitter,this.onDidBlur=this.didBlur.event;let a=b(document.activeElement,l),d=!1;const m=()=>{d=!1,a||(a=!0,this.didFocus.fire())},p=()=>{a&&(d=!0,window.setTimeout(()=>{d&&(d=!1,a=!1,this.didBlur.fire())},0))};this.addDispose(this.didBlur),this.addDispose(this.didFocus),this.addDispose(new g(l,e.EventType.FOCUS,m,!0)),this.addDispose(new g(l,e.EventType.BLUR,p,!0))}}e.FocusTracker=E;function u(r){return new E(r)}e.MouseEventButton={Left:0,Middle:1,Right:2,Back:3,Forward:4};function h(r){return r.split(o.space).filter(Boolean)}function c(r,l){const a=h(l);r.classList.add(...a)}},5910:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EncodingRegistry=void 0;const n=t(85608),s=t(76003),o=t(43718),f=t(78132),b=t(63214);let g=class{constructor(){this.encodingOverrides=[]}registerOverride(E){return this.encodingOverrides.push(E),o.Disposable.create(()=>{const u=this.encodingOverrides.indexOf(E);u!==-1&&this.encodingOverrides.splice(u,1)})}getEncodingForResource(E,u){let h;const c=this.getEncodingOverride(E);return c?h=c:u?h=u:h=this.preferenceService.get("files.encoding",void 0,E.toString(),(0,b.getLanguageIdFromMonaco)(E)||void 0)||"",!h||!(0,o.encodingExists)(h)?o.UTF8:h}getEncodingOverride(E){if(this.encodingOverrides&&this.encodingOverrides.length){for(const u of this.encodingOverrides)if(u.parent&&E.isEqualOrParent(u.parent)||u.extension&&E.path.ext===`.${u.extension}`||u.scheme&&u.scheme===E.scheme)return u.encoding}}};e.EncodingRegistry=g,n.__decorate([(0,s.Autowired)(f.PreferenceService),n.__metadata("design:type",Object)],g.prototype,"preferenceService",void 0),e.EncodingRegistry=g=n.__decorate([(0,s.Injectable)()],g)},12637:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ExtensionsPointServiceImpl=e.OPENSUMI_EXTENSION_JSON_URI=e.EXTENSION_JSON_URI=void 0;const n=t(85608),s=n.__importDefault(t(56757)),o=n.__importDefault(t(46123)),f=n.__importDefault(t(52103)),b=n.__importDefault(t(41263)),g=t(76003),_=t(22689),E=t(14790),u=t(96702);e.EXTENSION_JSON_URI="vscode://schemas/vscode-extensions",e.OPENSUMI_EXTENSION_JSON_URI="vscode://schemas/opensumi-extensions";let h=class{registerSchema(){this.schemaRegistry.registerSchema(e.OPENSUMI_EXTENSION_JSON_URI,E.OpenSumiExtensionPackageSchema,["package.json"]),this.schemaRegistry.registerSchema(e.EXTENSION_JSON_URI,u.VSCodeExtensionPackageSchema,["package.json"])}appendPropertiesFactory(r){const l=r==="opensumi"?E.OpenSumiExtensionPackageSchema.properties.sumiContributes.properties:u.VSCodeExtensionPackageSchema.properties.contributes.properties;return(a,d)=>{const{extensionPoint:m,jsonSchema:p}=d,v=a.concat(m).filter(Boolean);if((0,f.default)(l,v)){const y=(0,o.default)(l,v.concat("properties"));(0,s.default)(p.properties,y)}(0,b.default)(l,v,p)}}appendOpenSumiProperties(r,l){this.appendPropertiesFactory("opensumi")(r,l)}appendVScodeProperties(r,l){this.appendPropertiesFactory("vscode")(r,l)}appendExtensionPoint(r,l){if(!l)return;const{frameworkKind:a=["vscode"]}=l;a.includes("opensumi")&&this.appendOpenSumiProperties(r,l),a.includes("vscode")&&this.appendVScodeProperties(r,l),this.registerSchema()}registerExtensionPoint(r){r&&this.appendExtensionPoint([],r)}};e.ExtensionsPointServiceImpl=h,n.__decorate([(0,g.Autowired)(_.IJSONSchemaRegistry),n.__metadata("design:type",Object)],h.prototype,"schemaRegistry",void 0),e.ExtensionsPointServiceImpl=h=n.__decorate([(0,g.Injectable)()],h)},23396:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});const n=t(85608);n.__exportStar(t(12637),e),n.__exportStar(t(96702),e),n.__exportStar(t(14790),e)},21634:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.browserViews=void 0;const n=t(43718);var s;(function(o){o.properties={type:"object",required:["type","view"],defaultSnippets:[{label:"type",bodyText:JSON.stringify({type:"${1:add}",view:[{id:"${2}"}]},null," ")}],properties:{type:{type:"string",enum:["add","replace"]},view:{type:"array",items:{type:"object",required:["id"],defaultSnippets:[{label:'{"id":""}',description:"",bodyText:JSON.stringify({id:"${3}"},null," ")}],properties:{id:{type:"string",description:(0,n.localize)("sumiContributes.browserViews.view.id")},icon:{type:"string",markdownDescription:(0,n.localize)("sumiContributes.browserViews.view.icon")},iconPath:{type:"string",description:(0,n.localize)("sumiContributes.browserViews.view.iconPath")},title:{type:"string",description:(0,n.localize)("sumiContributes.browserViews.view.title")},titleComponentId:{type:"string",description:(0,n.localize)("sumiContributes.browserViews.view.titleComponentId")},expanded:{type:"boolean",description:(0,n.localize)("sumiContributes.browserViews.view.expanded")}}}}}},o.schema={description:(0,n.localize)("sumiContributes.browserViews"),type:"object",properties:{left:{...o.properties,description:(0,n.localize)("sumiContributes.browserViews.left")},right:{...o.properties,description:(0,n.localize)("sumiContributes.browserViews.right")},bottom:{...o.properties,description:(0,n.localize)("sumiContributes.browserViews.bottom")}}}})(s||(e.browserViews=s={}))},57559:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.menus=void 0;const n=t(43718),s=t(93899),o={type:"object",required:["command"],defaultSnippets:[{body:{command:"${1}"}}],properties:{command:{description:(0,n.localize)("sumiContributes.common.command"),type:"string"},when:{description:(0,n.localize)("sumiContributes.common.when"),type:"string"},group:{description:(0,n.localize)("sumiContributes.common.group"),type:"string"}}},f={type:"object",required:["id","title"],properties:{id:{description:(0,n.localize)("sumiContributes.submenus.id"),type:"string"},title:{description:(0,n.localize)("sumiContributes.submenus.title"),type:"string"},group:{description:(0,n.localize)("sumiContributes.common.group"),type:"string"},when:{type:"string",description:(0,n.localize)("sumiContributes.common.when")},icon:{description:(0,n.localize)("sumiContributes.submenus.icon"),anyOf:[{type:"string"},{type:"object",properties:{light:{description:(0,n.localize)("sumiContributes.submenus.icon.light"),type:"string"},dark:{description:(0,n.localize)("sumiContributes.submenus.dark"),type:"string"}}}]}}},b=[{id:s.MenuId.CommandPalette,description:(0,n.localize)("sumiContributes.menu.api.CommandPalette")},{id:s.MenuId.ActivityBarExtra,description:(0,n.localize)("sumiContributes.menu.api.ActivityBarExtra")},{id:s.MenuId.ActivityBarTopExtra,description:(0,n.localize)("sumiContributes.menu.api.ActivityBarTopExtra")},{id:s.MenuId.DebugBreakpointsContext,description:(0,n.localize)("sumiContributes.menu.api.DebugBreakpointsContext")},{id:s.MenuId.DebugCallStackContext,description:(0,n.localize)("sumiContributes.menu.api.DebugCallStackContext")},{id:s.MenuId.DebugConsoleContext,description:(0,n.localize)("sumiContributes.menu.api.DebugConsoleContext")},{id:s.MenuId.DebugVariablesContext,description:(0,n.localize)("sumiContributes.menu.api.DebugVariablesContext")},{id:s.MenuId.DebugWatchContext,description:(0,n.localize)("sumiContributes.menu.api.DebugWatchContext")},{id:s.MenuId.DebugToolBar,description:(0,n.localize)("sumiContributes.menu.api.DebugToolBar")},{id:s.MenuId.EditorContext,description:(0,n.localize)("sumiContributes.menu.api.EditorContext")},{id:s.MenuId.EditorTitle,description:(0,n.localize)("sumiContributes.menu.api.EditorTitle")},{id:s.MenuId.EditorTitleContext,description:(0,n.localize)("sumiContributes.menu.api.EditorTitleContext")},{id:s.MenuId.ExplorerContext,description:(0,n.localize)("sumiContributes.menu.api.ExplorerContext")},{id:s.MenuId.MenubarAppMenu,description:(0,n.localize)("sumiContributes.menu.api.MenubarAppMenu")},{id:s.MenuId.MenubarEditMenu,description:(0,n.localize)("sumiContributes.menu.api.MenubarEditMenu")},{id:s.MenuId.MenubarFileMenu,description:(0,n.localize)("sumiContributes.menu.api.MenubarFileMenu")},{id:s.MenuId.MenubarGoMenu,description:(0,n.localize)("sumiContributes.menu.api.MenubarGoMenu")},{id:s.MenuId.MenubarHelpMenu,description:(0,n.localize)("sumiContributes.menu.api.MenubarHelpMenu")},{id:s.MenuId.MenubarViewMenu,description:(0,n.localize)("sumiContributes.menu.api.MenubarViewMenu")},{id:s.MenuId.MenubarSelectionMenu,description:(0,n.localize)("sumiContributes.menu.api.MenubarSelectionMenu")},{id:s.MenuId.MenubarTerminalMenu,description:(0,n.localize)("sumiContributes.menu.api.MenubarTerminalMenu")},{id:s.MenuId.TerminalInstanceContext,description:(0,n.localize)("sumiContributes.menu.api.TerminalInstanceContext")},{id:s.MenuId.TerminalNewDropdownContext,description:(0,n.localize)("sumiContributes.menu.api.TerminalNewDropdownContext")},{id:s.MenuId.TerminalTabContext,description:(0,n.localize)("sumiContributes.menu.api.TerminalTabContext")},{id:s.MenuId.OpenEditorsContext,description:(0,n.localize)("sumiContributes.menu.api.OpenEditorsContext")},{id:s.MenuId.SCMResourceContext,description:(0,n.localize)("sumiContributes.menu.api.SCMResourceContext")},{id:s.MenuId.SCMResourceGroupContext,description:(0,n.localize)("sumiContributes.menu.api.SCMResourceGroupContext")},{id:s.MenuId.SCMResourceFolderContext,description:(0,n.localize)("sumiContributes.menu.api.SCMResourceFolderContext")},{id:s.MenuId.SCMTitle,description:(0,n.localize)("sumiContributes.menu.api.SCMTitle")},{id:s.MenuId.SCMInput,description:(0,n.localize)("sumiContributes.menu.api.SCMInput")},{id:s.MenuId.SearchContext,description:(0,n.localize)("sumiContributes.menu.api.SearchContext")},{id:s.MenuId.StatusBarContext,description:(0,n.localize)("sumiContributes.menu.api.StatusBarContext")},{id:s.MenuId.ViewItemContext,description:(0,n.localize)("sumiContributes.menu.api.ViewItemContext")},{id:s.MenuId.ViewTitle,description:(0,n.localize)("sumiContributes.menu.api.ViewTitle")},{id:s.MenuId.SettingsIconMenu,description:(0,n.localize)("sumiContributes.menu.api.SettingsIconMenu")}],g=(E,u,h)=>E.reduce((c,r)=>(c[u(r)]=h?h(r):r,c),Object.create(null));var _;(function(E){E.schema={description:(0,n.localize)("sumiContributes.menu"),type:"object",properties:g(b,u=>u.id,u=>({type:"array",description:u.description,items:o}))},E.subMenusSchema={description:(0,n.localize)("sumiContributes.submenus"),type:"object",additionalProperties:f}})(_||(e.menus=_={}))},14790:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.OpenSumiExtensionPackageSchema=void 0;const n=t(43718);e.OpenSumiExtensionPackageSchema={properties:{sumiContributes:{description:(0,n.localize)("sumiContributes.contributes"),type:"object",properties:{},default:{}}}}},9905:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.toolbar=void 0;const n=t(43718),s=(g,_)=>`${JSON.stringify(g)}: ${_}`,o={type:"object",properties:{title:{type:"string",description:(0,n.localize)("sumiContributes.toolbar.actions.title")},iconPath:{type:"string",description:(0,n.localize)("sumiContributes.toolbar.actions.iconPath")},iconMaskMode:{type:"boolean",description:(0,n.localize)("sumiContributes.toolbar.actions.iconMaskMode")},width:{type:"number",description:(0,n.localize)("sumiContributes.toolbar.actions.button.states.width")},height:{type:"number",description:(0,n.localize)("sumiContributes.toolbar.actions.button.states.height")},showTitle:{type:"boolean",description:(0,n.localize)("sumiContributes.toolbar.actions.button.states.showTitle")},iconForeground:{type:"string",description:(0,n.localize)("sumiContributes.toolbar.actions.button.states.iconForeground")},iconBackground:{type:"string",description:(0,n.localize)("sumiContributes.toolbar.actions.button.states.iconBackground")},titleForeground:{type:"string",description:(0,n.localize)("sumiContributes.toolbar.actions.button.states.titleForeground")},titleBackground:{type:"string",description:(0,n.localize)("sumiContributes.toolbar.actions.button.states.titleBackground")},titleSize:{type:"string",description:(0,n.localize)("sumiContributes.toolbar.actions.button.states.titleSize")},iconSize:{type:"string",description:(0,n.localize)("sumiContributes.toolbar.actions.button.states.iconSize")},background:{type:"string",description:(0,n.localize)("sumiContributes.toolbar.actions.button.states.background")},btnStyle:{type:"string",description:(0,n.localize)("sumiContributes.toolbar.actions.button.states.btnStyle"),enum:["inline","button"]},btnTitleStyle:{type:"string",description:(0,n.localize)("sumiContributes.toolbar.actions.button.states.btnTitleStyle"),enum:["vertical","horizontal"],enumDescriptions:[(0,n.localize)("sumiContributes.toolbar.actions.button.states.btnTitleStyle.vertical"),(0,n.localize)("sumiContributes.toolbar.actions.button.states.btnTitleStyle.horizontal")]}}},f={type:"object",properties:{backgroundColor:{type:"string",description:(0,n.localize)("sumiContributes.toolbar.actions.select.states.backgroundColor")},labelForegroundColor:{type:"string",description:(0,n.localize)("sumiContributes.toolbar.actions.select.states.labelForegroundColor")},iconForegroundColor:{type:"string",description:(0,n.localize)("sumiContributes.toolbar.actions.select.states.iconForegroundColor")},width:{type:"number",description:(0,n.localize)("sumiContributes.toolbar.actions.select.states.width")},minWidth:{type:"number",description:(0,n.localize)("sumiContributes.toolbar.actions.select.states.minWidth")}}};var b;(function(g){g.schema={type:"object",description:(0,n.localize)("sumiContributes.toolbar"),properties:{actions:{type:"array",markdownDescription:(0,n.localize)("sumiContributes.toolbar.actions"),items:{type:"object",required:["id","description"],defaultSnippets:[{label:s({type:"button"},(0,n.localize)("sumiContributes.toolbar.actions.type.button")),body:{id:"${2}",type:"button",description:"${3}",title:"${4}",iconPath:"${5}"}},{label:s({type:"select"},(0,n.localize)("sumiContributes.toolbar.actions.type.select")),body:{id:"${2}",type:"select",description:"${3}",options:["${4}"],defaultValue:"${5}"}}],properties:{id:{type:"string",description:(0,n.localize)("sumiContributes.toolbar.actions.id")},weight:{type:"number",description:(0,n.localize)("sumiContributes.toolbar.actions.weight")},preferredPosition:{type:"object",description:(0,n.localize)("sumiContributes.toolbar.actions.preferredPosition"),properties:{location:{type:"string",description:(0,n.localize)("sumiContributes.toolbar.actions.preferredPosition.location")},group:{type:"string",description:(0,n.localize)("sumiContributes.toolbar.actions.preferredPosition.group")}}},strictPosition:{type:"object",description:(0,n.localize)("sumiContributes.toolbar.actions.strictPosition"),required:["location","group"],defaultSnippets:[{body:{location:"${1}",group:"${2}"}}],properties:{location:{type:"string",description:(0,n.localize)("sumiContributes.toolbar.actions.preferredPosition.location")},group:{type:"string",description:(0,n.localize)("sumiContributes.toolbar.actions.preferredPosition.group")}}},description:{type:"string",description:(0,n.localize)("sumiContributes.toolbar.actions.description")},command:{type:"string",description:(0,n.localize)("sumiContributes.toolbar.actions.command")},defaultState:{type:"string",description:(0,n.localize)("sumiContributes.toolbar.actions.defaultState")}},oneOf:[{required:["type","title","iconPath"],properties:{type:{type:"string",description:(0,n.localize)("sumiContributes.toolbar.actions.type"),enum:["button"],enumDescriptions:[(0,n.localize)("sumiContributes.toolbar.actions.type.button")],default:"button"},title:{type:"string",description:(0,n.localize)("sumiContributes.toolbar.actions.title")},iconPath:{type:"string",description:(0,n.localize)("sumiContributes.toolbar.actions.iconPath")},iconMaskMode:{type:"boolean",description:(0,n.localize)("sumiContributes.toolbar.actions.iconMaskMode")},states:{type:"object",description:(0,n.localize)("sumiContributes.toolbar.actions.button.states"),additionalProperties:o,properties:{default:o}},popoverComponent:{type:"string",description:(0,n.localize)("sumiContributes.toolbar.actions.popoverComponent")},popoverStyle:{type:"object",description:(0,n.localize)("sumiContributes.toolbar.actions.popoverStyle"),properties:{position:{type:"string",description:(0,n.localize)("sumiContributes.toolbar.actions.popoverStyle.position"),enum:["top","bottom"],enumDescriptions:[(0,n.localize)("sumiContributes.toolbar.actions.popoverStyle.position.top"),(0,n.localize)("sumiContributes.toolbar.actions.popoverStyle.position.bottom")]},horizontalOffset:{type:"number",description:(0,n.localize)("sumiContributes.toolbar.actions.popoverStyle.horizontalOffset")},hideOnClickOutside:{type:"boolean",description:(0,n.localize)("sumiContributes.toolbar.actions.popoverStyle.hideOnClickOutside")},noContainerStyle:{type:"boolean",description:(0,n.localize)("sumiContributes.toolbar.actions.popoverStyle.noContainerStyle")},minWidth:{type:"number",description:(0,n.localize)("sumiContributes.toolbar.actions.popoverStyle.minWidth")},minHeight:{type:"number",description:(0,n.localize)("sumiContributes.toolbar.actions.popoverStyle.minHeight")}}},when:{type:"string",description:(0,n.localize)("sumiContributes.toolbar.actions.when")}}},{required:["type","options","defaultValue"],properties:{type:{type:"string",description:(0,n.localize)("sumiContributes.toolbar.actions.type"),enum:["select"],enumDescriptions:[(0,n.localize)("sumiContributes.toolbar.actions.type.select")],default:"select"},options:{type:"array",description:(0,n.localize)("sumiContributes.toolbar.actions.select.options"),required:["value"],items:{type:"object",defaultSnippets:[{label:s({value:""},(0,n.localize)("sumiContributes.toolbar.actions.select.options.value")),body:{value:"${1}"}}],properties:{iconPath:{type:"string",description:(0,n.localize)("sumiContributes.toolbar.actions.select.options.iconPath")},iconMaskMode:{type:"boolean",description:(0,n.localize)("sumiContributes.toolbar.actions.select.options.iconMaskMode")},label:{type:"string",description:(0,n.localize)("sumiContributes.toolbar.actions.select.options.label")},value:{type:"string",description:(0,n.localize)("sumiContributes.toolbar.actions.select.options.value")}}}},defaultValue:{type:"string",description:(0,n.localize)("sumiContributes.toolbar.actions.select.defaultValue")},optionEqualityKey:{type:"string",description:(0,n.localize)("sumiContributes.toolbar.actions.select.optionEqualityKey")},states:{type:"object",description:(0,n.localize)("sumiContributes.toolbar.actions.select.states"),additionalProperties:f}}}]}}}}})(b||(e.toolbar=b={}))},96702:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.VSCodeExtensionPackageSchema=e.EXTENSION_IDENTIFIER_PATTERN=void 0;const n=t(43718);e.EXTENSION_IDENTIFIER_PATTERN="^([a-z0-9A-Z][a-z0-9-A-Z]*)\\.([a-z0-9A-Z][a-z0-9-A-Z]*)$",e.VSCodeExtensionPackageSchema={properties:{engines:{type:"object",description:(0,n.localize)("vscode.extension.engines","Engine compatibility."),properties:{vscode:{type:"string",description:(0,n.localize)("vscode.extension.engines.vscode","For VS Code extensions, specifies the VS Code version that the extension is compatible with. Cannot be *. For example: ^0.10.5 indicates compatibility with a minimum VS Code version of 0.10.5."),default:"^1.22.0"}}},publisher:{description:(0,n.localize)("vscode.extension.publisher","The publisher of the VS Code extension."),type:"string"},displayName:{description:(0,n.localize)("vscode.extension.displayName","The display name for the extension used in the VS Code gallery."),type:"string"},categories:{description:(0,n.localize)("vscode.extension.categories","The categories used by the VS Code gallery to categorize the extension."),type:"array",uniqueItems:!0,items:{oneOf:[{type:"string",enum:["Programming Languages","Snippets","Linters","Themes","Debuggers","Other","Keymaps","Formatters","Extension Packs","SCM Providers","Azure","Language Packs"]},{type:"string",const:"Languages",deprecationMessage:(0,n.localize)("vscode.extension.category.languages.deprecated","Use 'Programming Languages' instead")}]}},galleryBanner:{type:"object",description:(0,n.localize)("vscode.extension.galleryBanner","Banner used in the VS Code marketplace."),properties:{color:{description:(0,n.localize)("vscode.extension.galleryBanner.color","The banner color on the VS Code marketplace page header."),type:"string"},theme:{description:(0,n.localize)("vscode.extension.galleryBanner.theme","The color theme for the font used in the banner."),type:"string",enum:["dark","light"]}}},contributes:{description:(0,n.localize)("vscode.extension.contributes","All contributions of the VS Code extension represented by this package."),type:"object",properties:{},default:{}},preview:{type:"boolean",description:(0,n.localize)("vscode.extension.preview","Sets the extension to be flagged as a Preview in the Marketplace.")},activationEvents:{description:(0,n.localize)("vscode.extension.activationEvents","Activation events for the VS Code extension."),type:"array",items:{type:"string",defaultSnippets:[{label:"onLanguage",description:(0,n.localize)("vscode.extension.activationEvents.onLanguage","An activation event emitted whenever a file that resolves to the specified language gets opened."),body:"onLanguage:${1:languageId}"},{label:"onCommand",description:(0,n.localize)("vscode.extension.activationEvents.onCommand","An activation event emitted whenever the specified command gets invoked."),body:"onCommand:${2:commandId}"},{label:"onDebug",description:(0,n.localize)("vscode.extension.activationEvents.onDebug","An activation event emitted whenever a user is about to start debugging or about to setup debug configurations."),body:"onDebug"},{label:"onDebugInitialConfigurations",description:(0,n.localize)("vscode.extension.activationEvents.onDebugInitialConfigurations",'An activation event emitted whenever a "launch.json" needs to be created (and all provideDebugConfigurations methods need to be called).'),body:"onDebugInitialConfigurations"},{label:"onDebugResolve",description:(0,n.localize)("vscode.extension.activationEvents.onDebugResolve","An activation event emitted whenever a debug session with the specific type is about to be launched (and a corresponding resolveDebugConfiguration method needs to be called)."),body:"onDebugResolve:${6:type}"},{label:"onDebugAdapterProtocolTracker",description:(0,n.localize)("vscode.extension.activationEvents.onDebugAdapterProtocolTracker","An activation event emitted whenever a debug session with the specific type is about to be launched and a debug protocol tracker might be needed."),body:"onDebugAdapterProtocolTracker:${6:type}"},{label:"workspaceContains",description:(0,n.localize)("vscode.extension.activationEvents.workspaceContains","An activation event emitted whenever a folder is opened that contains at least a file matching the specified glob pattern."),body:"workspaceContains:${4:filePattern}"},{label:"onFileSystem",description:(0,n.localize)("vscode.extension.activationEvents.onFileSystem","An activation event emitted whenever a file or folder is accessed with the given scheme."),body:"onFileSystem:${1:scheme}"},{label:"onSearch",description:(0,n.localize)("vscode.extension.activationEvents.onSearch","An activation event emitted whenever a search is started in the folder with the given scheme."),body:"onSearch:${7:scheme}"},{label:"onView",body:"onView:${5:viewId}",description:(0,n.localize)("vscode.extension.activationEvents.onView","An activation event emitted whenever the specified view is expanded.")},{label:"onUri",body:"onUri",description:(0,n.localize)("vscode.extension.activationEvents.onUri","An activation event emitted whenever a system-wide Uri directed towards this extension is open.")},{label:"*",description:(0,n.localize)("vscode.extension.activationEvents.star","An activation event emitted on VS Code startup. To ensure a great end user experience, please use this activation event in your extension only when no other activation events combination works in your use-case."),body:"*"}]}},badges:{type:"array",description:(0,n.localize)("vscode.extension.badges","Array of badges to display in the sidebar of the Marketplace's extension page."),items:{type:"object",required:["url","href","description"],properties:{url:{type:"string",description:(0,n.localize)("vscode.extension.badges.url","Badge image URL.")},href:{type:"string",description:(0,n.localize)("vscode.extension.badges.href","Badge link.")},description:{type:"string",description:(0,n.localize)("vscode.extension.badges.description","Badge description.")}}}},markdown:{type:"string",description:(0,n.localize)("vscode.extension.markdown","Controls the Markdown rendering engine used in the Marketplace. Either github (default) or standard."),enum:["github","standard"],default:"github"},qna:{default:"marketplace",description:(0,n.localize)("vscode.extension.qna","Controls the Q&A link in the Marketplace. Set to marketplace to enable the default Marketplace Q & A site. Set to a string to provide the URL of a custom Q & A site. Set to false to disable Q & A altogether."),anyOf:[{type:["string","boolean"],enum:["marketplace",!1]},{type:"string"}]},extensionDependencies:{description:(0,n.localize)("vscode.extension.extensionDependencies","Dependencies to other extensions. The identifier of an extension is always ${publisher}.${name}. For example: vscode.csharp."),type:"array",uniqueItems:!0,items:{type:"string",pattern:e.EXTENSION_IDENTIFIER_PATTERN}},extensionPack:{description:(0,n.localize)("vscode.extension.contributes.extensionPack","A set of extensions that can be installed together. The identifier of an extension is always ${publisher}.${name}. For example: vscode.csharp."),type:"array",uniqueItems:!0,items:{type:"string",pattern:e.EXTENSION_IDENTIFIER_PATTERN}},extensionKind:{description:(0,n.localize)("extensionKind","Define the kind of an extension. `ui` extensions are installed and run on the local machine while `workspace` extensions are run on the remote."),type:"string",enum:["ui","workspace"],enumDescriptions:[(0,n.localize)("ui","UI extension kind. In a remote window, such extensions are enabled only when available on the local machine."),(0,n.localize)("workspace","Workspace extension kind. In a remote window, such extensions are enabled only when available on the remote.")],default:"workspace"},scripts:{type:"object",properties:{"vscode:prepublish":{description:(0,n.localize)("vscode.extension.scripts.prepublish","Script executed before the package is published as a VS Code extension."),type:"string"},"vscode:uninstall":{description:(0,n.localize)("vscode.extension.scripts.uninstall","Uninstall hook for VS Code extension. Script that gets executed when the extension is completely uninstalled from VS Code which is when VS Code is restarted (shutdown and start) after the extension is uninstalled. Only Node scripts are supported."),type:"string"}}},icon:{type:"string",description:(0,n.localize)("vscode.extension.icon","The path to a 128x128 pixel icon.")}}}},53746:(x,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})},77273:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.FsProviderContribution=e.FilesChangeEvent=void 0;const n=t(43718);class s extends n.BasicEvent{}e.FilesChangeEvent=s,e.FsProviderContribution=Symbol("FsProviderContribution")},136:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.HashCalculateContribution=void 0;const n=t(85608),s=t(76003),o=t(98295),f=t(96405),b=t(66549);let g=class{async initialize(){try{await this.hashCalculateService.initialize()}catch(E){throw new Error(`hashCalculateService init fail:
28105
28105
  ${E.message}`)}}};e.HashCalculateContribution=g,n.__decorate([(0,s.Autowired)(f.IHashCalculateService),n.__metadata("design:type",Object)],g.prototype,"hashCalculateService",void 0),e.HashCalculateContribution=g=n.__decorate([(0,o.Domain)(b.ClientAppContribution)],g)},41869:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});const n=t(85608);n.__exportStar(t(43718),e),n.__exportStar(t(48560),e),n.__exportStar(t(38578),e),n.__exportStar(t(36206),e),n.__exportStar(t(32796),e),n.__exportStar(t(78132),e),n.__exportStar(t(41118),e),n.__exportStar(t(37015),e),n.__exportStar(t(16884),e),n.__exportStar(t(68456),e),n.__exportStar(t(77273),e),n.__exportStar(t(42637),e),n.__exportStar(t(89378),e),n.__exportStar(t(53746),e),n.__exportStar(t(95040),e),n.__exportStar(t(80832),e),n.__exportStar(t(75694),e),n.__exportStar(t(79951),e),n.__exportStar(t(17544),e),n.__exportStar(t(53736),e),n.__exportStar(t(66963),e),n.__exportStar(t(22689),e),n.__exportStar(t(74404),e),n.__exportStar(t(45670),e),n.__exportStar(t(22366),e),n.__exportStar(t(18193),e),n.__exportStar(t(67304),e),n.__exportStar(t(66894),e),n.__exportStar(t(90697),e),n.__exportStar(t(26542),e),n.__exportStar(t(5910),e),n.__exportStar(t(61943),e),n.__exportStar(t(23396),e),n.__exportStar(t(40827),e),n.__exportStar(t(53736),e)},41118:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),t(85608).__exportStar(t(95376),e)},95376:(x,e,t)=>{"use strict";var n;Object.defineProperty(e,"__esModule",{value:!0}),e.NO_KEYBINDING_NAME=e.KeybindingRegistryImpl=e.KeybindingService=e.keybindingServicePath=e.KeybindingRegistry=e.KeybindingContribution=e.KeybindingsResultCollection=e.Keybinding=e.KeybindingWeight=e.KeybindingScope=void 0;const s=t(85608),o=t(76003),f=t(43718),b=t(53736),g=t(81331),_=t(7967),E=t(26542);var u;(function(a){a[a.DEFAULT=0]="DEFAULT",a[a.USER=1]="USER",a[a.WORKSPACE=2]="WORKSPACE",a[a.END=3]="END"})(u||(e.KeybindingScope=u={}));var h;(function(a){a[a.Default=0]="Default",a[a.EditorCore=1]="EditorCore",a[a.EditorContrib=100]="EditorContrib",a[a.WorkbenchContrib=200]="WorkbenchContrib",a[a.BuiltinExtension=300]="BuiltinExtension",a[a.ExternalExtension=400]="ExternalExtension"})(h||(e.KeybindingWeight=h={})),function(a){a.length=a.END-a.DEFAULT}(u||(e.KeybindingScope=u={}));var c;(function(a){function d(p){const v={command:p.command,keybinding:p.keybinding};return JSON.stringify(v)}a.stringify=d;function m(p){return!!p&&p===Object(p)&&"command"in p&&"keybinding"in p}a.is=m})(c||(e.Keybinding=c={}));var r;(function(a){class d{constructor(){this.full=[],this.partial=[],this.shadow=[]}merge(p){return this.full.push(...p.full),this.partial.push(...p.partial),this.shadow.push(...p.shadow),this}filter(p){const v=new d;return v.full=this.full.filter(p),v.partial=this.partial.filter(p),v.shadow=this.shadow.filter(p),v}}a.KeybindingsResult=d})(r||(e.KeybindingsResultCollection=r={})),e.KeybindingContribution=Symbol("KeybindingContribution"),e.KeybindingRegistry=Symbol("KeybindingRegistry"),e.keybindingServicePath="/services/keybindings",e.KeybindingService=Symbol("KeybindingService");let l=n=class{constructor(){this.keymaps=[...Array(u.length)].map(()=>[]),this.keySequence=[],this.convertKeySequence=[],this.modifierKeySequence=[],this.keybindingsChanged=new f.Emitter}async initialize(){await this.keyboardLayoutService.initialize(),this.keyboardLayoutService.onKeyboardLayoutChanged(()=>{this.clearResolvedKeybindings()});for(const d of this.keybindingContributionProvider.getContributions())d.registerKeybindings(this)}get onKeybindingsChanged(){return this.keybindingsChanged.event}registerKeybinding(d,m=u.DEFAULT){return this.doRegisterKeybinding(d,m)}registerKeybindings(d,m=u.DEFAULT){return this.doRegisterKeybindings(d,m)}convertMonacoWhen(d){return d?typeof d=="string"?d:d.serialize():""}unregisterKeybinding(d,m=u.DEFAULT){const p=c.is(d)?d.keybinding:d,v=this.keymaps[m];let y;c.is(d)&&d.when?y=v.filter(S=>this.isKeybindingEqual(S.keybinding,d.keybinding)&&this.isKeybindingWhenEqual(S.when,d.when)):y=v.filter(S=>this.isKeybindingEqual(S.keybinding,p)),y.forEach(S=>{const A=v.indexOf(S);A>=0&&v.splice(A,1)})}isKeybindingWhenEqual(d,m){return this.convertMonacoWhen(d)===this.convertMonacoWhen(m)}isKeybindingEqual(d,m){return this.acceleratorForSequenceKeyString(d)===this.acceleratorForSequenceKeyString(m)}acceleratorForSequenceKeyString(d){const p=d.split(" ").map(v=>_.KeyCode.parse(v));return this.acceleratorForSequence(p,"+").join(" ")}doRegisterKeybindings(d,m=u.DEFAULT){const p=new f.Disposable;for(const v of d)p.addDispose(this.doRegisterKeybinding(v,m));return p}doRegisterKeybinding(d,m=u.DEFAULT){try{this.resolveKeybinding(d,!0),this.keymaps[m].unshift(d)}catch(p){this.logger.warn(`Could not register keybinding:
@@ -28129,7 +28129,7 @@ ${p}`)}return this.keybindingsChanged.fire({affectsCommands:[d.command]}),{dispo
28129
28129
  `)?y.description.slice(0,-1):y.description}getConsoleModel(y){return this.debugSessionModelMap.get(y)}dispose(){this.disposeTreeModel(),this.disposeDebugConsole()}disposeTreeModel(){this.treeModelDisposableCollection.disposed||this.treeModelDisposableCollection.dispose()}disposeDebugConsole(){this.debugConsoleDisposableCollection.disposed||this.debugConsoleDisposableCollection.dispose()}async init(){this.debugConsoleDisposableCollection.push(this.manager.onDidDestroyDebugSession(y=>{this.debugSessionModelMap.delete(y.id),this.debugSessionModelMap.size>0&&this.initTreeModel(this.manager.currentSession)})),this.debugConsoleDisposableCollection.push(this.manager.onDidChangeActiveDebugSession(y=>{y.current&&this.initTreeModel(y.current)}))}listenTreeViewChange(){this.disposeTreeModel(),this.treeModel&&(this.treeModelDisposableCollection.push(this.treeModel.root.watcher.on(f.TreeNodeEvent.WillResolveChildren,y=>{this.loadingDecoration.addTarget(y)})),this.treeModelDisposableCollection.push(this.treeModel.root.watcher.on(f.TreeNodeEvent.DidResolveChildren,y=>{this.loadingDecoration.removeTarget(y)})))}async initTreeModel(y,S){if(!y){this._activeDebugSessionModel=void 0,this.onDidUpdateTreeModelEmitter.fire(this._activeDebugSessionModel);return}const A=y.hasSeparateRepl()?y.id:y.parentSession.id;if(this.debugSessionModelMap.has(A)&&!S){const T=this.debugSessionModelMap.get(A);T?.debugConsoleSession.addChildSession(y),this._activeDebugSessionModel=T}else{const T=new h.DebugConsoleRoot({});if(!T)return;const D=this.injector.get(l.DebugConsoleTreeModel,[T]),w=this.injector.get(a.DebugConsoleSession,[y,D]);this._activeDebugSessionModel={treeModel:D,debugConsoleSession:w},w.onDidChange(async()=>{if(!D)return;const I=D.root.branchSize,R=w.resolveChildren();D.root.updatePresetChildren(R),I!==R.length&&(this.refresh(),D.isScrollBottom&&await this.treeHandle.ensureVisible(R[R.length-1]),D?.dispatchChange())}),this.debugSessionModelMap.set(A,this._activeDebugSessionModel),this.initDecorations(T),this.listenTreeViewChange()}return this.onDidUpdateTreeModelEmitter.fire(this._activeDebugSessionModel),this._activeDebugSessionModel}initDecorations(y){this._decorations=new f.DecorationsManager(y),this._decorations.addDecoration(this.selectedDecoration),this._decorations.addDecoration(this.contextMenuDecoration),this._decorations.addDecoration(this.loadingDecoration)}removeNodeDecoration(){this.decorations&&(this.decorations.removeDecoration(this.selectedDecoration),this.decorations.removeDecoration(this.contextMenuDecoration),this.decorations.removeDecoration(this.loadingDecoration))}handleTreeHandler(y){this._debugWatchTreeHandle=y}dispatchWatchEvent(y,S,A){const T=y.watchEvents.get(S);T&&T.callback&&T.callback(A)}collapsedAll(){var y;(y=this.treeModel)===null||y===void 0||y.root.collapsedAll()}async refresh(y){if(!y)if(this.treeModel)y=this.treeModel.root;else return;!h.ExpressionContainer.is(y)&&y.parent&&(y=y.parent),this.queueChangeEvent(y.path,()=>{this.onDidRefreshedEmitter.fire()})}queueChangeEvent(y,S){this.flushEventQueueDeferred||(this.flushEventQueueDeferred=new b.Deferred,clearTimeout(this._eventFlushTimeout),this._eventFlushTimeout=setTimeout(async()=>{var A;await this.flushEventQueue(),(A=this.flushEventQueueDeferred)===null||A===void 0||A.resolve(),this.flushEventQueueDeferred=null,S()},n.DEFAULT_REFRESH_DELAY)),this._changeEventDispatchQueue.indexOf(y)===-1&&this._changeEventDispatchQueue.push(y)}async execute(y){if(!this.treeModel)return;const S=this.treeModel.root,A=new u.AnsiConsoleNode(y,S,this.linkDetector);this.dispatchWatchEvent(S,S.path,{type:f.WatchEvent.Added,node:A,id:S.id});const T=new h.DebugConsoleNode({session:this.manager.currentSession},y,S);await T.evaluate(),this.dispatchWatchEvent(S,S.path,{type:f.WatchEvent.Added,node:T,id:S.id}),this.treeHandle.ensureVisible(T,"end",!0)}};e.DebugConsoleModelService=p,p.DEFAULT_REFRESH_DELAY=200,s.__decorate([(0,o.Autowired)(o.INJECTOR_TOKEN),s.__metadata("design:type",o.Injector)],p.prototype,"injector",void 0),s.__decorate([(0,o.Autowired)(g.ICtxMenuRenderer),s.__metadata("design:type",g.ICtxMenuRenderer)],p.prototype,"ctxMenuRenderer",void 0),s.__decorate([(0,o.Autowired)(g.AbstractContextMenuService),s.__metadata("design:type",g.AbstractContextMenuService)],p.prototype,"contextMenuService",void 0),s.__decorate([(0,o.Autowired)(c.DebugViewModel),s.__metadata("design:type",c.DebugViewModel)],p.prototype,"viewModel",void 0),s.__decorate([(0,o.Autowired)(b.IContextKeyService),s.__metadata("design:type",Object)],p.prototype,"contextKeyService",void 0),s.__decorate([(0,o.Autowired)(_.IDebugSessionManager),s.__metadata("design:type",Object)],p.prototype,"manager",void 0),s.__decorate([(0,o.Autowired)(b.IClipboardService),s.__metadata("design:type",Object)],p.prototype,"clipboardService",void 0),s.__decorate([(0,o.Autowired)(E.LinkDetector),s.__metadata("design:type",E.LinkDetector)],p.prototype,"linkDetector",void 0),s.__decorate([(0,o.Autowired)(r.DebugContextKey),s.__metadata("design:type",r.DebugContextKey)],p.prototype,"debugContextKey",void 0),e.DebugConsoleModelService=p=n=s.__decorate([(0,o.Injectable)(),s.__metadata("design:paramtypes",[])],p)},11456:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DebugConsoleContribution=e.DEBUG_CONSOLE_VIEW_ID=void 0;const n=t(85608),s=t(76003),o=t(41869),f=t(93899),b=t(98295),g=t(64582),_=t(17280),E=t(4983),u=t(1276),h=t(4161),c=t(35199),r=t(5131);e.DEBUG_CONSOLE_VIEW_ID="debug-console-view";let l=class{registerComponent(d){d.register("debug-console",{id:e.DEBUG_CONSOLE_VIEW_ID,component:r.DebugConsoleView},{title:(0,o.localize)("debug.console.panel.title"),priority:8,containerId:g.DEBUG_CONSOLE_CONTAINER_ID,iconClass:(0,o.getIcon)("debug"),titleComponent:h.DebugConsoleFilterView})}registerToolbarItems(d){d.registerItem({id:g.DEBUG_COMMANDS.CLEAR_CONSOLE.id,command:g.DEBUG_COMMANDS.CLEAR_CONSOLE.id,iconClass:(0,o.getIcon)("clear"),viewId:g.DEBUG_CONSOLE_CONTAINER_ID,tooltip:g.DEBUG_COMMANDS.CLEAR_CONSOLE.label})}registerCommands(d){d.registerCommand(g.DEBUG_COMMANDS.CLEAR_CONSOLE,{execute:()=>{this.debugConsoleModelService.clear()}}),d.registerCommand(g.DEBUG_COMMANDS.COPY_CONSOLE_ITEM,{execute:m=>{this.debugConsoleModelService.copy(m)}}),d.registerCommand(g.DEBUG_COMMANDS.COPY_CONSOLE_ALL,{execute:()=>{this.debugConsoleModelService.copyAll()}}),d.registerCommand(g.DEBUG_COMMANDS.COLLAPSE_ALL_CONSOLE_ITEM,{execute:()=>{this.debugConsoleModelService.collapseAll()},isEnabled:()=>this.debugContextKey.contextInDebugConsole.get()===!0}),d.registerCommand(g.DEBUG_COMMANDS.CONSOLE_ENTER_EVALUATE,{execute:()=>{this.debugConsoleService.runExecute()}}),d.registerCommand(g.DEBUG_COMMANDS.CONSOLE_INPUT_DOWN_ARROW,{execute:()=>{this.debugConsoleService.showNextValue()}}),d.registerCommand(g.DEBUG_COMMANDS.CONSOLE_INPUT_UP_ARROW,{execute:()=>{this.debugConsoleService.showPreviousValue()}}),d.registerCommand(g.DEBUG_COMMANDS.CONSOLE_FILTER_FOCUS,{execute:()=>{this.debugConsoleFilterService.focusInput()}})}registerMenus(d){d.registerMenuItem(f.MenuId.DebugConsoleContext,{command:{id:g.DEBUG_COMMANDS.COPY_CONSOLE_ITEM.id,label:(0,o.localize)("debug.console.copy")},group:"copy"}),d.registerMenuItem(f.MenuId.DebugConsoleContext,{command:{id:g.DEBUG_COMMANDS.COPY_CONSOLE_ALL.id,label:(0,o.localize)("debug.console.copyAll")},group:"copy"}),d.registerMenuItem(f.MenuId.DebugConsoleContext,{command:{id:g.DEBUG_COMMANDS.CLEAR_CONSOLE.id,label:(0,o.localize)("debug.console.clear")},group:"other"}),d.registerMenuItem(f.MenuId.DebugConsoleContext,{command:{id:g.DEBUG_COMMANDS.COLLAPSE_ALL_CONSOLE_ITEM.id,label:(0,o.localize)("debug.console.collapseAll")},group:"other"})}registerKeybindings(d){d.registerKeybinding({command:g.DEBUG_COMMANDS.CONSOLE_ENTER_EVALUATE.id,keybinding:"enter",when:`${E.CONTEXT_IN_DEBUG_REPL.raw} && ${E.CONTEXT_IN_DEBUG_MODE.raw}`,priority:0}),d.registerKeybinding({command:g.DEBUG_COMMANDS.CONSOLE_INPUT_DOWN_ARROW.id,keybinding:"down",when:`${E.CONTEXT_IN_DEBUG_REPL.raw} && ${E.CONTEXT_IN_DEBUG_MODE.raw}`}),d.registerKeybinding({command:g.DEBUG_COMMANDS.CONSOLE_INPUT_UP_ARROW.id,keybinding:"up",when:`${E.CONTEXT_IN_DEBUG_REPL.raw} && ${E.CONTEXT_IN_DEBUG_MODE.raw}`}),d.registerKeybinding({command:g.DEBUG_COMMANDS.CONSOLE_FILTER_FOCUS.id,keybinding:"ctrlcmd+f",when:`${E.CONTEXT_IN_DEBUG_REPL.raw}`})}};e.DebugConsoleContribution=l,n.__decorate([(0,s.Autowired)(g.IDebugConsoleModelService),n.__metadata("design:type",Object)],l.prototype,"debugConsoleModelService",void 0),n.__decorate([(0,s.Autowired)(o.IContextKeyService),n.__metadata("design:type",Object)],l.prototype,"contextKeyService",void 0),n.__decorate([(0,s.Autowired)(c.DebugConsoleService),n.__metadata("design:type",c.DebugConsoleService)],l.prototype,"debugConsoleService",void 0),n.__decorate([(0,s.Autowired)(u.DebugConsoleFilterService),n.__metadata("design:type",u.DebugConsoleFilterService)],l.prototype,"debugConsoleFilterService",void 0),n.__decorate([(0,s.Autowired)(_.DebugContextKey),n.__metadata("design:type",_.DebugContextKey)],l.prototype,"debugContextKey",void 0),e.DebugConsoleContribution=l=n.__decorate([(0,b.Domain)(o.ComponentContribution,o.TabBarToolbarContribution,o.CommandContribution,f.MenuContribution,o.KeybindingContribution)],l)},35199:(x,e,t)=>{"use strict";var n;Object.defineProperty(e,"__esModule",{value:!0}),e.DebugConsoleService=void 0;const s=t(85608),o=t(76003),f=t(41869),b=t(43718),g=t(54414),_=t(57517),E=t(63067),u=s.__importStar(t(20868)),h=t(52902),c=t(52416),r=t(44198),l=t(64582),a=t(38029),d=t(17280),m=t(15153),p="consoleinputdecoration",v="debug.console.history",y=18,S=D=>D.replace(/^\S/,w=>w.toUpperCase()),A={...(0,_.getSimpleEditorOptions)(),scrollbar:{horizontal:"visible",vertical:"hidden",handleMouseWheel:!0},acceptSuggestionOnEnter:"on"};let T=n=class{constructor(){this._consoleInputElement=null,this._updateDisposable=null,this._onConsoleInputValueChange=new b.Emitter,this.onConsoleInputValueChange=this._onConsoleInputValueChange.event,this._onInputHeightChange=new b.Emitter,this.onInputHeightChange=this._onInputHeightChange.event}get _isReadonly(){const w=this.manager.currentSession;return!(w&&w.state!==l.DebugState.Inactive)}get isVisible(){const w=this.mainLayoutService.getTabbarHandler(l.DEBUG_CONSOLE_CONTAINER_ID);return w&&w.isVisible}get consoleModel(){return this.debugConsoleModelService}activate(){const w=this.mainLayoutService.getTabbarHandler(l.DEBUG_CONSOLE_CONTAINER_ID);w&&!w.isVisible&&w.activate()}focusInput(){this.inputEditor&&this.inputEditor.monacoEditor.focus()}async init(w){var I;if(!w)return;const R=await this.storageProvider(b.STORAGE_NAMESPACE.DEBUG);this.history=new r.HistoryNavigator(R.get(v,[]),50),!(!((I=this.inputEditor)===null||I===void 0)&&I.monacoEditor)&&(this._consoleInputElement=w,this.inputEditor=this.editorService.createCodeEditor(this._consoleInputElement,{...A,readOnly:!this.contextKeyService.getContextValue(l.CONTEXT_IN_DEBUG_MODE_KEY)}),this.debugContextKey=this.injector.get(d.DebugContextKey,[this.inputEditor.monacoEditor.contextKeyService]),this.contextKeyService.onDidChangeContext(M=>{M.payload.affectsSome(n.keySet)&&(this.contextKeyService.match(l.CONTEXT_IN_DEBUG_MODE_KEY)?(this.updateReadOnly(!1),this.updateInputDecoration(),this.debugContextKey.contextInDebugMode.set(!0)):(this.updateReadOnly(!0),this.debugContextKey&&this.debugContextKey.contextInDebugMode.set(!1)))}),this.registerDecorationType(),await this.createConsoleInput(),this.setMode())}get contextInDebugRepl(){return this.debugContextKey.contextInDebugRepl}get consoleInputValue(){return this._consoleModel&&this._consoleModel.getValue()||""}showPreviousValue(){this._isReadonly||this.navigateHistory(!0)}showNextValue(){this._isReadonly||this.navigateHistory(!1)}async runExecute(){if(!this.inputEditor)return;const w=this.inputEditor.monacoEditor,I=w.getValue();await this.consoleModel.execute(I),this.history.add(I),w.setValue("")}navigateHistory(w){const I=w?this.history.previous():this.history.next();if(I&&this.inputEditor&&this.inputEditor.monacoEditor){const{monacoEditor:R}=this.inputEditor;R.setValue(I),R.setPosition({lineNumber:1,column:I.length+1})}}get consoleInputUri(){return new b.URI("debug/console/input").withScheme(b.Schemes.walkThroughSnippet)}async createConsoleInput(){var w;if(!(!((w=this.inputEditor)===null||w===void 0)&&w.monacoEditor))return;const{monacoEditor:I}=this.inputEditor,M=(await this.documentService.createModelReference(this.consoleInputUri)).instance.getMonacoModel();M.updateOptions({tabSize:2}),this._consoleModel=M,I.setModel(M),setTimeout(()=>{this.layoutBody()},0),I.onDidFocusEditorText(()=>{this.contextInDebugRepl.set(!0),this.updateInputDecoration()}),I.onDidBlurEditorText(()=>{this.contextInDebugRepl.set(!1),this.updateInputDecoration()}),I.onDidChangeModelContent(()=>{const O=I.getModel().getLineCount();this.layoutBody(O*18)}),this.manager.onDidChangeActiveDebugSession(()=>{this.registerCompletion(),this.setMode()}),await this.updateInputDecoration()}layoutBody(w,I){var R;if(!this.inputEditor)return;const{monacoEditor:M}=this.inputEditor,O=Math.max(w||y,M.getContentHeight());M.layout({width:I||((R=this._consoleInputElement)===null||R===void 0?void 0:R.offsetWidth),height:O}),this._onInputHeightChange.fire(O)}updateReadOnly(w){this.inputEditor&&this.inputEditor.monacoEditor.updateOptions({readOnly:w})}async updateInputDecoration(){if(!this.inputEditor)return;const w=[];if(this._isReadonly&&this.inputEditor.monacoEditor.hasTextFocus()&&!this.inputEditor.monacoEditor.getValue()){const I=(0,c.transparent)(c.editorForeground,.4)(await this.themeService.getCurrentTheme());w.push({range:{startLineNumber:0,endLineNumber:0,startColumn:0,endColumn:1},renderOptions:{after:{contentText:(0,f.localize)("debug.console.input.placeholder"),color:I?I.toString():void 0}}})}this.inputEditor.monacoEditor.setDecorationsByType("debug-console-input",p,w)}setMode(){var w;if(!this.inputEditor)return;const I=this.manager.currentSession;if(!I)return;const R=I.currentEditor();R&&this.inputEditor.monacoEditor.getModel().setLanguage((w=R.getModel())===null||w===void 0?void 0:w.getLanguageId())}registerDecorationType(){this.overrideServicesRegistry.getRegisteredService(f.ServiceNames.CODE_EDITOR_SERVICE).registerDecorationType("console-input-decoration",p,{})}registerCompletion(){var w;this._updateDisposable&&(this._updateDisposable.dispose(),this._updateDisposable=null);const I=this.manager.currentSession;if(!I)return;const R=I.currentEditor();R&&(this._updateDisposable=h.monaco.languages.registerCompletionItemProvider((w=R.getModel())===null||w===void 0?void 0:w.getLanguageId(),{_debugDisplayName:"DebugConsoleCompletionProvider",triggerCharacters:["."],provideCompletionItems:async(M,O,P)=>{var L;if(!(!((L=this.manager.currentSession)===null||L===void 0)&&L.capabilities.supportsCompletionsRequest))return;if(M.uri.toString()!==this.consoleInputUri.toString())return null;const N=this.manager.currentSession,{triggerCharacter:k}=P;let B=M.getWordAtPosition(O);if(B&&N){const{word:F,startColumn:W,endColumn:V}=B;return{suggestions:(await N.sendRequest("completions",{text:F,column:V,frameId:N.currentFrame&&N.currentFrame.raw.id})).body.targets.map(G=>({label:G.label,insertText:G.text||G.label,sortText:G.sortText,kind:u.languages.CompletionItemKind[S(G.type||"property")],range:{startLineNumber:O.lineNumber,endLineNumber:O.lineNumber,startColumn:W,endColumn:V}}))}}if(B=M.getWordAtPosition({lineNumber:O.lineNumber,column:O.column-1}),B&&N&&k){const{word:F,endColumn:W}=B;return{suggestions:(await N.sendRequest("completions",{text:F+k,column:W+1,frameId:N.currentFrame&&N.currentFrame.raw.id})).body.targets.map(H=>({label:H.label,insertText:H.text||H.label,sortText:H.sortText,kind:u.languages.CompletionItemKind[S(H.type||"property")],range:{startLineNumber:O.lineNumber,endLineNumber:O.lineNumber,startColumn:W+1,endColumn:W+1}}))}}return null}}))}disable(){var w,I;this._updateDisposable&&(this._updateDisposable.dispose(),this._updateDisposable=null),(w=this.inputEditor)===null||w===void 0||w.monacoEditor.setValue(""),(I=this.inputEditor)===null||I===void 0||I.monacoEditor.setModel(null)}};e.DebugConsoleService=T,T.keySet=new Set([l.CONTEXT_IN_DEBUG_MODE_KEY]),s.__decorate([(0,o.Autowired)(l.IDebugConsoleModelService),s.__metadata("design:type",m.DebugConsoleModelService)],T.prototype,"debugConsoleModelService",void 0),s.__decorate([(0,o.Autowired)(E.IMainLayoutService),s.__metadata("design:type",Object)],T.prototype,"mainLayoutService",void 0),s.__decorate([(0,o.Autowired)(_.IEditorDocumentModelService),s.__metadata("design:type",Object)],T.prototype,"documentService",void 0),s.__decorate([(0,o.Autowired)(g.EditorCollectionService),s.__metadata("design:type",g.EditorCollectionService)],T.prototype,"editorService",void 0),s.__decorate([(0,o.Autowired)(b.CommandRegistry),s.__metadata("design:type",Object)],T.prototype,"commands",void 0),s.__decorate([(0,o.Autowired)(f.IContextKeyService),s.__metadata("design:type",Object)],T.prototype,"contextKeyService",void 0),s.__decorate([(0,o.Autowired)(l.IDebugSessionManager),s.__metadata("design:type",a.DebugSessionManager)],T.prototype,"manager",void 0),s.__decorate([(0,o.Autowired)(c.IThemeService),s.__metadata("design:type",Object)],T.prototype,"themeService",void 0),s.__decorate([(0,o.Autowired)(f.MonacoOverrideServiceRegistry),s.__metadata("design:type",f.MonacoOverrideServiceRegistry)],T.prototype,"overrideServicesRegistry",void 0),s.__decorate([(0,o.Autowired)(f.StorageProvider),s.__metadata("design:type",Function)],T.prototype,"storageProvider",void 0),s.__decorate([(0,o.Autowired)(o.INJECTOR_TOKEN),s.__metadata("design:type",o.Injector)],T.prototype,"injector",void 0),e.DebugConsoleService=T=n=s.__decorate([(0,o.Injectable)()],T)},5131:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DEBUG_CONSOLE_TREE_FIELD_NAME=e.DEBUG_CONSOLE_TREE_NODE_HEIGHT=e.DebugConsoleRenderedNode=e.DebugConsoleView=void 0;const n=t(85608),s=n.__importDefault(t(53373)),o=n.__importDefault(t(14041)),f=t(97267),b=t(41869),g=t(43718),_=t(72260),E=t(64582),u=t(58542),h=t(5905),c=t(16170),r=t(1276),l=n.__importDefault(t(80315)),a=t(35199),d=({viewState:p})=>{const v=(0,b.useInjectable)(a.DebugConsoleService),y=(0,b.useInjectable)(r.DebugConsoleFilterService),S=(0,b.useInjectable)(b.PreferenceService),{consoleModel:A}=v,{height:T,width:D}=p,[w,I]=o.default.useState(),[R,M]=o.default.useState(26),[O,P]=o.default.useState(""),[L,N]=o.default.useState(!0),k=o.default.useRef(null),B=o.default.useRef(null),F=(0,b.useInjectable)(_.IMainLayoutService),W=(0,b.useDesignStyles)(l.default.debug_console_output,"debug_console_output"),V=(0,b.useDesignStyles)(l.default.variable_repl_bar,"variable_repl_bar");o.default.useEffect(()=>{if(k&&k.current){const re=F.getTabbarHandler(E.DEBUG_CONSOLE_CONTAINER_ID);if(re?.isActivated())v.init(k.current);else{const ae=re?.onActivate(()=>{v.init(k.current),ae?.dispose()})}}},[k.current]),o.default.useEffect(()=>{const re=new g.Disposable;return re.addDispose(A.onDidUpdateTreeModel(async ae=>{ae&&await ae.treeModel.ensureReady,I(ae)})),re.addDispose(y.onDidValueChange(ae=>{P(ae)})),re.addDispose(v.onInputHeightChange(ae=>{M(ae)})),re.addDispose(S.onSpecificPreferenceChange("debug.console.wordWrap",ae=>{const{newValue:de}=ae;N(de)})),N(!!S.get("debug.console.wordWrap",L)),()=>{A.removeNodeDecoration(),re.dispose()}},[]);const H=re=>{A.handleTreeHandler({...re,getModel:()=>w?.treeModel,hasDirectFocus:()=>B.current===document.activeElement})},G=(re,ae,de)=>{const q=window.getSelection();q&&q.type==="Range"&&q.rangeCount>0&&re.stopPropagation();const{handleTwistierClick:_e}=A;ae&&_e(ae,de)},K=(re,ae)=>{const{handleContextMenu:de}=A;de(re,ae)},z=re=>{const{handleContextMenu:ae}=A;ae(re)},j=re=>{const{enactiveNodeDecoration:ae}=A;ae(),v.focusInput()},U=re=>{const{enactiveNodeDecoration:ae}=A;ae()},$=()=>"filter",Y=()=>({pre:"<match>",post:"</match>",extract:re=>re.description?re.description:re.name}),Q=o.default.useCallback(re=>{const ae=A.decorations.getDecorations(re.item);return o.default.createElement(e.DebugConsoleRenderedNode,{item:re.item,itemType:re.itemType,decorations:ae,filterValue:O,filterMode:$(),onClick:G,onTwistierClick:G,onContextMenu:K,defaultLeftPadding:14,isWordWrap:L,leftPadding:8})},[w,O,L]),te=()=>w?o.default.createElement(f.RecycleTree,{height:Math.max(T-R,26),width:D,itemHeight:e.DEBUG_CONSOLE_TREE_NODE_HEIGHT,onReady:H,overScanCount:10,filter:$()==="filter"?O:"",filterProvider:{fuzzyOptions:Y,filterAlways:!0},model:w.treeModel,overflow:"auto",supportDynamicHeights:L},Q):null;return o.default.createElement("div",{className:l.default.debug_console,onContextMenu:z,onClick:j},o.default.createElement("div",{className:W,tabIndex:-1,onBlur:U,ref:B,"data-name":e.DEBUG_CONSOLE_TREE_FIELD_NAME},te()),o.default.createElement("div",{className:V,style:{maxHeight:T-26+"px"}},o.default.createElement("div",{className:l.default.variable_repl_bar_icon},o.default.createElement("span",{className:(0,b.getIcon)("right")})),o.default.createElement("div",{className:l.default.variable_repl_editor,ref:k})))};e.DebugConsoleView=d;const m=({item:p,decorations:v,defaultLeftPadding:y,leftPadding:S,filterMode:A,filterValue:T,onClick:D,onTwistierClick:w,onContextMenu:I,isWordWrap:R,itemType:M})=>{const O=(0,b.useInjectable)(r.DebugConsoleFilterService),P=(0,b.useInjectable)(u.LinkDetector),[L,N]=o.default.useState(),k=(0,b.useDesignStyles)(l.default.expansion_toggle,"expansion_toggle");o.default.useEffect(()=>{const Q=window.getComputedStyle(c.AnsiConsoleNode.is(p)?p.el:P.linkify(p.description),null),te=`${Q.fontStyle} ${Q.fontWeight} ${Q.fontSize}/${Q.lineHeight} ${Q.fontFamily}`;N(te)},[p]);const B=Q=>{D(Q,p,f.CompositeTreeNode.is(p)?f.TreeNodeType.CompositeTreeNode:f.TreeNodeType.TreeNode)},F=Q=>{Q.nativeEvent.which!==0&&(M===f.TreeNodeType.TreeNode||M===f.TreeNodeType.CompositeTreeNode)&&I&&I(Q,p,M)},W=()=>c.AnsiConsoleNode.is(p)?"":(c.DebugConsoleNode.is(p)?"":p.name)+(p.description&&!c.DebugConsoleNode.is(p)?": ":""),V=(Q,te)=>h.CharWidthReader.getInstance().getCharWidth(Q,te),H=o.default.useCallback(()=>{if(!L)return;const Q=W()+p.description,te=O.findMatches(Q||""),re=pe=>Number(pe.toFixed(4)),ae=(pe,J)=>Array.from({length:J},(le,ie)=>ie).reduce((le,ie)=>le+re(V(Q.charAt(pe+ie),L)),0),de=new Map,q=(pe,J)=>{if(pe>0){const le=(ge,ee,X)=>Array.from({length:ge-ee},(oe,se)=>ee+se).reduce((oe,se)=>re(oe+V(Q.charAt(se),L)),X);let ie;if(J!==0&&de.has(te[J].startIndex)){const ge=de.get(te[J].startIndex);ie=le(pe,ge.startIndex,ge.left)}else ie=le(pe,0,0);return de.set(pe,{startIndex:pe,left:ie}),ie}return 0};return te.map((pe,J)=>({height:16,top:3,width:ae(pe.startIndex,pe.count),left:q(pe.startIndex,Math.max(0,J-1))})).map(pe=>o.default.createElement("div",{key:pe.left,className:l.default.block,style:pe}))},[T,L]),G=Q=>c.AnsiConsoleNode.is(Q)||Q instanceof c.DebugConsoleNode&&Q.variablesReference===0?null:o.default.createElement("div",{className:(0,s.default)(l.default.debug_console_node_segment,!c.DebugConsoleNode.is(Q)&&l.default.debug_console_node_displayname,l.default.debug_console_variable,p.description?l.default.name:l.default.info)},o.default.createElement(c.TreeWithLinkWrapper,{html:P.linkify(W())})),K=Q=>{const te=/^true|false$/i,re=/^(['"]).*\1$/,ae=Q.description||"",de=[l.default.debug_console_variable];return c.AnsiConsoleNode.is(Q)?o.default.createElement("div",{className:(0,s.default)(l.default.debug_console_node_segment,l.default.debug_console_node_displayname)},Q.template()):(p.variableType==="number"||p.variableType==="boolean"||p.variableType==="string"?de.push(l.default[p.variableType]):isNaN(+ae)?te.test(ae)?de.push(l.default.boolean):re.test(ae)&&de.push(l.default.string):de.push(l.default.number),o.default.createElement("div",{className:(0,s.default)(l.default.debug_console_node_segment_grow,l.default.debug_console_node_description,...de)},o.default.createElement(c.TreeWithLinkWrapper,{html:P.linkify(ae)})))},z=()=>o.default.createElement("div",{className:(0,s.default)(l.default.debug_console_node_segment,l.default.debug_console_node_tail)},j()),j=()=>{var Q,te,re;return c.AnsiConsoleNode.is(p)?o.default.createElement("div",{className:l.default.debug_console_node_status,title:(Q=p.source)===null||Q===void 0?void 0:Q.path},!((te=p.source)===null||te===void 0)&&te.name?`${(re=p.source)===null||re===void 0?void 0:re.name}:${p.line}`:""):o.default.createElement("div",{className:l.default.debug_console_node_status},p.badge)},U=()=>p.tooltip,$=(Q,te)=>{const re=ae=>{te(ae,Q,M)};return v&&v?.classlist.indexOf(l.default.mod_loading)>-1?o.default.createElement("div",{className:(0,s.default)(l.default.debug_console_node_segment,k)},o.default.createElement(f.Loading,null)):Q instanceof c.DebugConsoleNode&&Q.variablesReference===0?null:o.default.createElement("div",{onClick:re,className:(0,s.default)(l.default.debug_console_node_segment,k,(0,b.getIcon)("right"),{[`${l.default.mod_collapsed}`]:!Q.expanded})})},Y=Q=>{if(f.CompositeTreeNode.is(Q))return $(Q,w)};return o.default.createElement("div",{key:p.id,onClick:B,onContextMenu:F,title:U(),className:(0,s.default)(l.default.debug_console_node,v?v.classlist:null),style:{paddingLeft:`${(y||8)+(p.depth||0)*(S||0)}px`},"data-id":p.id},o.default.createElement("div",{className:(0,s.default)(l.default.debug_console_node_content)},Y(p),o.default.createElement("div",{className:l.default.debug_console_node_overflow_wrap,style:{whiteSpace:R?"pre-wrap":"nowrap",cursor:p instanceof c.DebugVariableContainer?"pointer":"initial"}},G(p),K(p)),z()),o.default.createElement("div",{className:l.default.debug_console_selection},A==="matcher"&&H()))};e.DebugConsoleRenderedNode=m,e.DEBUG_CONSOLE_TREE_NODE_HEIGHT=22,e.DEBUG_CONSOLE_TREE_FIELD_NAME="DEBUG_CONSOLE_TREE_FIELD"},32756:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DebugViewModel=void 0;const n=t(85608),s=t(76003),o=t(41869),f=t(26296),b=t(38029);let g=class{constructor(){this.onDidChangeEmitter=new o.Emitter,this.onDidChange=this.onDidChangeEmitter.event,this.onDidChangeBreakpointsEmitter=new o.Emitter,this.onDidChangeBreakpoints=this.onDidChangeBreakpointsEmitter.event,this.toDispose=new o.DisposableCollection(this.onDidChangeEmitter,this.onDidChangeBreakpointsEmitter),this._sessions=new Set}fireDidChange(){this.onDidChangeEmitter.fire(void 0)}fireDidChangeBreakpoints(E){this.onDidChangeBreakpointsEmitter.fire(E)}get sessions(){return this._sessions.values()}get sessionCount(){return this._sessions.size}push(E){this._sessions.has(E)||(this._sessions.add(E),this.fireDidChange())}delete(E){return this._sessions.delete(E)?(this.fireDidChange(),!0):!1}get session(){return this.sessions.next().value}get id(){return this.session&&this.session.id||"-1"}get label(){return this.session&&this.session.label||"Unknown Session"}has(E){return!!E&&this._sessions.has(E)}init(E){E&&this.push(E),this.toDispose.push(this.manager.onDidChangeActiveDebugSession(({previous:u,current:h})=>{this.has(u)&&!this.has(h)&&this.fireDidChange()})),this.toDispose.push(this.manager.onDidChange(u=>{this.has(u)&&this.fireDidChange()})),this.toDispose.push(this.manager.onDidDestroyDebugSession(u=>{this.has(u)&&this.fireDidChange()}))}dispose(){this.toDispose.dispose()}get threads(){if(this.manager.currentSession)return this.manager.currentSession.getThreads(()=>!0)}get currentSession(){const{currentSession:E}=this.manager;return this.has(E)&&E||this.session}set currentSession(E){this.manager.updateCurrentSession(E)}get state(){const{currentSession:E}=this;return E&&E.state||f.DebugState.Inactive}get currentThread(){const{currentSession:E}=this;return E&&E.currentThread}get currentFrame(){const{currentThread:E}=this;return E&&E.currentFrame}async start(){const{session:E}=this;if(!E)return;const u=await this.manager.start(E.options);u&&(this._sessions.delete(E),this._sessions.add(u),this.fireDidChange())}async restart(){const{currentSession:E}=this;if(!E)return;const u=await this.manager.restart(E);u!==E&&(this._sessions.delete(E),this._sessions.add(u)),this.fireDidChange()}report(E,u,h){return this.manager.report(E,u,h)}reportTime(E,u){return this.manager.reportTime(E,u)}reportAction(E,u,h){return this.manager.reportAction(E,u,h)}};e.DebugViewModel=g,n.__decorate([(0,s.Autowired)(f.IDebugSessionManager),n.__metadata("design:type",b.DebugSessionManager)],g.prototype,"manager",void 0),e.DebugViewModel=g=n.__decorate([(0,s.Injectable)()],g)},13739:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DebugStackFramesView=void 0;const n=t(85608),s=n.__importDefault(t(53373)),o=n.__importStar(t(14041)),f=t(97267),b=t(41869),g=t(64582),_=t(50755),E=n.__importDefault(t(12920)),u=t(85294),h=c=>{const{viewState:r,frames:l,thread:a,indent:d=0,session:m,isBottom:p}=c,[v,y]=(0,o.useState)(),[S,A]=(0,o.useState)(!1),[T,D]=(0,o.useState)([]),[w,I]=(0,o.useState)(""),[R,M]=(0,o.useState)(!1),O=(0,b.useInjectable)(g.IDebugSessionManager),P=(0,o.useRef)([]),L=(0,b.useInjectable)(u.DebugCallStackService),N=(0,o.useCallback)(async()=>{var U,$;if(!a)return;const Y=typeof((U=a.stoppedDetails)===null||U===void 0?void 0:U.totalFrames)=="number"?(($=a.stoppedDetails)===null||$===void 0?void 0:$.totalFrames)-a.frameCount:void 0,Q=await a.fetchFrames(Y);W(Q)},[T]),k=U=>{U&&U.source&&U.source.open({},U)},B=(0,o.useCallback)(U=>{const $=P.current.slice(0);let Y=-1;U.nextFrame?Y=$.findIndex(Q=>{var te;return _.DebugStackFrame.is(Q)&&Q.id===((te=U.nextFrame)===null||te===void 0?void 0:te.id)}):Y=$.length,Y>-1&&($.splice(Y-1,1,...U.frames),P.current=$,D($))},[P.current]),F=(0,o.useCallback)((U,$)=>{var Y,Q,te,re;const ae=$.length;let de=-1,q=U.length>0?U[U.length+de]:void 0;for(;q&&!_.DebugStackFrame.is(q);)de-=1,q=U[U.length+de];const _e=U.slice(0,U.length+de+1),pe=q?$.findIndex(ge=>ge.id===q?.id)+1:0;let J=[],le,ie=!1;for(let ge=pe;ge<ae;ge++)if(!((Y=$[ge].source)===null||Y===void 0)&&Y.raw.origin)if(ie)if(le===((Q=$[ge].source)===null||Q===void 0?void 0:Q.raw.origin)){J.push($[ge]);continue}else J.length>1?(_e.push(new _.ShowMoreDebugStackFrame($[ge],J,m,le,B)),de-=J.length-1):_e.push(J[0]),J=[],ie=!1,le=(te=$[ge].source)===null||te===void 0?void 0:te.raw.origin,J.push($[ge]);else ie=!0,J.push($[ge]),le=(re=$[ge].source)===null||re===void 0?void 0:re.raw.origin;else ie&&J.length>0&&(J.length>1?(_e.push(new _.ShowMoreDebugStackFrame($[ge],J,m,le,B)),de-=J.length-1):_e.push(J[0]),J=[],ie=!1),_e.push($[ge]);return ie&&J.length>0&&(J.length>1?_e.push(new _.ShowMoreDebugStackFrame(void 0,J,m,le,B)):_e.push(J[0])),_e},[]),W=(0,o.useCallback)(U=>{P.current=F(P.current,U),D(P.current)},[T,F]),V=(0,o.useCallback)(U=>{y(U)},[v]);(0,o.useEffect)(()=>{W([...l]);const U=new b.DisposableCollection;return U.push(O.onDidChangeActiveDebugSession(({previous:$})=>{$&&$!==a.session&&V(void 0)})),()=>{U.dispose()}},[]),(0,o.useEffect)(()=>{if(a){const U=a.frames.find($=>!!$.source);U&&(V(U.raw.id),k(U))}},[a.frameCount]),(0,o.useEffect)(()=>{if(a)if(a.stoppedDetails){const{framesErrorMessage:U,totalFrames:$}=a.stoppedDetails;I(U||""),$&&$>a.frameCount?M(!0):M(!1)}else M(!1);else M(!1)},[T]);const H=({data:U})=>{var $,Y;const Q=U,te=_.DebugStackFrame.is(Q)&&Q.raw.presentationHint==="label",re=_.DebugStackFrame.is(Q)&&Q.raw.presentationHint==="subtle",ae=_.DebugStackFrame.is(Q)&&((Y=($=Q.raw)===null||$===void 0?void 0:$.source)===null||Y===void 0?void 0:Y.presentationHint)==="deemphasize",de=(0,o.useCallback)(()=>{if(!(te||re)){if(!_.DebugStackFrame.is(Q)){Q.open();return}O.updateCurrentSession(Q.session),Q.session.currentThread=Q.thread,V(Q.raw.id),k(Q)}},[U]),q=J=>{J.preventDefault(),J.stopPropagation(),_.DebugStackFrame.is(Q)&&Q.canRestart&&Q.restart()},_e={paddingLeft:`${d}px`};_.DebugStackFrame.is(Q)&&ae&&(_e.color="var(--list-deemphasizedForeground)");const pe=(0,o.useCallback)(J=>_.DebugStackFrame.is(J)?o.default.createElement(o.default.Fragment,null,o.default.createElement("span",{className:(0,s.default)(E.default.debug_stack_frames_item_label,te&&E.default.label,re&&E.default.subtle)},J.raw&&J.raw.name),!te&&o.default.createElement("span",{className:E.default.debug_stack_frames_item_description},J.raw&&J.raw.source&&J.raw.source.name||(0,b.localize)("debug.stack.frame.noSource")),o.default.createElement(o.default.Fragment,null,J.canRestart&&o.default.createElement("a",{title:"",onClick:le=>q(le),className:(0,s.default)(E.default.debug_restart_frame_icon,(0,b.getIcon)("debug-restart-frame"))}),!te&&!ae&&o.default.createElement("div",{className:(0,s.default)(!(0,b.isUndefined)(J.raw.line)&&E.default.debug_stack_frames_item_badge)},J.raw&&J.raw.line,!(0,b.isUndefined)(J.raw.line)&&":",J.raw&&J.raw.column))):o.default.createElement("span",{className:E.default.debug_stack_frames_load_more},J.name),[]);return o.default.createElement("div",{style:_e,className:(0,s.default)(E.default.debug_stack_frames_item,te&&E.default.is_label,_.DebugStackFrame.is(Q)&&v===Q.raw.id&&E.default.selected,_.DebugStackFrame.is(Q)&&!(Q.raw&&Q.raw.source&&Q.raw.source.name)&&E.default.debug_stack_frames_item_hidden),onClick:de,onContextMenu:J=>L.handleContextMenu(J,U)},pe(Q))},G=(0,o.useCallback)(()=>{const U=async()=>{A(!0),await N(),A(!1)};return o.default.createElement("div",{className:E.default.debug_stack_frames_item,onClick:U},o.default.createElement("span",{className:E.default.debug_stack_frames_load_more},(0,b.localize)("debug.stack.loadMore")))},[S,N]),K=(0,o.useCallback)(()=>o.default.createElement("div",{className:E.default.debug_stack_frames_item},o.default.createElement("span",{className:E.default.debug_stack_frames_load_more},(0,b.localize)("debug.stack.loading"))),[]),z=(0,o.useCallback)(U=>o.default.createElement("div",{className:E.default.debug_stack_frames_item},o.default.createElement("span",{className:E.default.debug_stack_frames_error_message,title:U},U)),[]);if(w)return o.default.createElement("div",{className:E.default.debug_stack_frames},z(w));const j=(0,o.useCallback)(()=>S?K():R?G():null,[S,R]);return o.default.createElement(f.RecycleList,{data:T,template:H,itemHeight:22,width:r.width,height:(S||R?(T.length+1)*22:T.length*22)+(p?10:0),footer:S||R?j:void 0})};e.DebugStackFramesView=h},75651:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DebugStackSessionView=void 0;const n=t(85608),s=n.__importDefault(t(53373)),o=n.__importStar(t(14041)),f=t(41869),b=t(64582),g=t(8701),_=n.__importDefault(t(12920)),E=t(61520),u=t(85294),h=c=>{const{session:r,viewState:l}=c,a=(0,f.useInjectable)(b.IDebugSessionManager),d=(0,f.useInjectable)(u.DebugCallStackService),[m,p]=(0,o.useState)([]),[v,y]=(0,o.useState)([]),[S,A]=(0,o.useState)([]),[T,D]=(0,o.useState)([]),[w,I]=(0,o.useState)(!0),[R,M]=(0,o.useState)(!1),[O,P]=(0,o.useState)(!0),L=a.sessions.length>1,N=r.supportsThreadIdCorrespond,k=(0,o.useRef)(!1),B=()=>{var K,z;const j=a.sessions.filter($=>$.parentSession),U=[];for(;j[0];)((z=a.getSession((K=j[0].parentSession)===null||K===void 0?void 0:K.id))===null||z===void 0?void 0:z.id)===r.id&&U.push(j[0]),j.shift();return U},F=async()=>{P(!0);const K=await r.fetchThreads();P(!1),y(K)};(0,o.useEffect)(()=>{const K=new f.DisposableCollection;return K.push(a.onDidCreateDebugSession(()=>{if(k.current)return;const z=B();D(z)})),K.push(a.onDidDestroyDebugSession(()=>{if(k.current)return;const z=B();D(z)})),()=>{k.current=!0,K.dispose()}},[]);const W=(0,o.useCallback)(K=>{p(K)},[m]),V=(0,o.useCallback)(K=>{A(K)},[S]);(0,o.useEffect)(()=>{W(Array.from(r.threads));const K=new f.DisposableCollection;return K.push(r.onDidChange(()=>{W([...r.threads])})),K.push(r.onDidThread(async({body:{reason:z}})=>{r.supportsThreadIdCorrespond&&r.state===b.DebugState.Stopped&&z==="started"&&await F()})),K.push(r.onDidStop(async()=>{if(!r.supportsThreadIdCorrespond)return;const z=Array.from(r.multipleThreadPaused.values());V(z),await F()})),K.push(r.onDidContinued(async()=>{if(!r.supportsThreadIdCorrespond)return;const z=Array.from(r.multipleThreadPaused.values());V(z)})),()=>{K.dispose()}},[]);const H=()=>{if(r.state!==b.DebugState.Stopped)return null;if(N&&w)return O?o.default.createElement("div",{className:_.default.debug_stack_item_loading},o.default.createElement("span",null,(0,f.localize)("debug.stack.loading"))):v.map((K,z)=>!r.hasInMultipleThreadPaused(K.raw.id)&&o.default.createElement(g.DebugStackThreadView,{key:K.id,indent:L?16:0,viewState:l,thread:K,session:r,isBottom:z===v.length-1}))};if((K=>{if(K.threads.some(j=>j.frameCount>0))return!1;const z=B();return!(z.length!==1||!z[0].compact)})(r)){const K=B();return o.default.createElement("div",{className:_.default.debug_stack_item},K.map(z=>o.default.createElement(e.DebugStackSessionView,{key:z.id,viewState:l,session:z,indent:1})))}return o.default.createElement("div",{className:_.default.debug_stack_item,onContextMenu:K=>d.handleContextMenu(K,r)},L&&o.default.createElement("div",{className:_.default.debug_stack_item_label,onMouseEnter:()=>M(!0),onMouseLeave:()=>M(!1)},N||m.length>0?o.default.createElement(o.default.Fragment,null,o.default.createElement("div",{className:w?(0,f.getIcon)("arrow-down"):(0,f.getIcon)("arrow-right"),onClick:()=>I(!w)}),o.default.createElement("div",{className:(0,s.default)([(0,f.getIcon)("debug"),_.default.debug_session_icon])})):o.default.createElement("div",{style:{width:30}}),o.default.createElement("div",{className:_.default.debug_stack_item_label_title},r.label),R&&o.default.createElement(E.DebugStackOperationView,{session:r})),N&&w?S.map((K,z)=>o.default.createElement(g.DebugStackThreadView,{key:K.id,indent:L?16:0,viewState:l,thread:K,session:r,isBottom:z===S.length-1})):null,!N&&(!L||w)&&m.map((K,z)=>o.default.createElement(g.DebugStackThreadView,{key:K.id,indent:L?16:0,viewState:l,thread:K,session:r,isBottom:z===m.length-1})),T.length>0&&T.map(K=>w&&o.default.createElement(e.DebugStackSessionView,{key:K.id,viewState:l,session:K,indent:1})),H())};e.DebugStackSessionView=h},8701:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DebugStackThreadView=void 0;const n=t(85608),s=n.__importStar(t(14041)),o=t(97267),f=t(41869),b=t(64582),g=t(13739),_=n.__importDefault(t(12920)),E=t(61520),u=t(85294),h=c=>{var r;const{thread:l,viewState:a,indent:d,session:m,isBottom:p}=c,v=(0,f.useInjectable)(b.IDebugSessionManager),y=(0,f.useInjectable)(u.DebugCallStackService),[S,A]=(0,s.useState)(!0),[T,D]=(0,s.useState)(l.frames),w=v.sessions.length>1,I=!((r=v.currentSession)===null||r===void 0)&&r.supportsThreadIdCorrespond?!0:v.sessions.length>1||v.sessions[0]&&v.sessions[0].threadCount>1,R=(0,s.useCallback)(O=>{A(O)},[S]);(0,s.useEffect)(()=>{const O=new f.DisposableCollection;return O.push(m.onDidChangeCallStack(()=>{D(l.frames),l.stopped&&v.currentThread&&v.currentThread.id===l.id?R(!0):R(!1)})),()=>{O.dispose()}},[]);const M=l.stopped&&l.stoppedDetails?l.raw.id===l.stoppedDetails.threadId?`${(0,f.localize)("debug.stack.frame.because")} ${l.stoppedDetails.reason} ${(0,f.localize)("debug.stack.frame.stopped")}`:(0,f.localize)("debug.stack.frame.stopped"):(0,f.localize)("debug.stack.frame.running");return s.default.createElement("div",{className:_.default.debug_stack_item,onContextMenu:O=>y.handleContextMenu(O,l)},I&&s.default.createElement("div",{style:{paddingLeft:`${d}px`},className:_.default.debug_stack_item_label},l.frames.length>0?s.default.createElement("div",{className:S?(0,f.getIcon)("arrow-down"):(0,f.getIcon)("arrow-right"),onClick:()=>A(!S)}):s.default.createElement("div",{style:{width:14}}),s.default.createElement("div",{className:_.default.debug_threads_item},l.raw.name),s.default.createElement(s.default.Fragment,null,s.default.createElement("div",{className:_.default.debug_threads_operation},s.default.createElement(E.DebugStackOperationView,{thread:l})),s.default.createElement("span",{className:_.default.debug_threads_description},s.default.createElement(o.Badge,null,M.toUpperCase())))),(!I||S)&&l.frames.length>0&&s.default.createElement(g.DebugStackFramesView,{indent:I?w?38:30:8,isBottom:p,viewState:a,thread:l,frames:T,session:m}))};e.DebugStackThreadView=h},37243:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DebugCallStackContribution=void 0;const n=t(85608),s=t(76003),o=t(41869),f=t(93899),b=t(64582),g=t(4983),_=t(26296),E=t(38029);function u(r){return r&&typeof r.sessionId=="string"&&typeof r.threadId=="string"&&typeof r.frameId=="string"}function h(r,l){if(u(l)){const a=r.getSession(l.sessionId);if(a){const d=[a.currentThread,...a.threads].find(m=>m.id===l.threadId);if(d)return d.frames.find(m=>m.id===l.frameId)}}}let c=class{registerCommands(l){l.registerCommand(b.DEBUG_COMMANDS.RESTART_FRAME,{execute:async(a,d)=>{const m=h(this.debugSessionManager,d);m&&await m.restart()}}),l.registerCommand(b.DEBUG_COMMANDS.COPY_STACK_TRACE,{execute:async(a,d)=>{const m=h(this.debugSessionManager,d);if(m){const p=m.thread.frames.map(v=>`${v.raw&&v.raw.name} (${v.raw&&v.raw.source&&v.raw.source.path}:${v.raw&&v.raw.line})`);this.clipboardService.writeText(p.join(`
28130
28130
  `))}}})}registerMenus(l){l.registerMenuItem(f.MenuId.DebugCallStackContext,{command:{id:b.DEBUG_COMMANDS.RESTART_FRAME.id,label:(0,o.localize)("debugger.menu.restartFrame")},when:`${g.CONTEXT_CALLSTACK_ITEM_TYPE.equalsTo("stackFrame")} && ${g.CONTEXT_RESTART_FRAME_SUPPORTED.raw}`,enabledWhen:g.CONTEXT_STACK_FRAME_SUPPORTS_RESTART.raw,order:10}),l.registerMenuItem(f.MenuId.DebugCallStackContext,{command:{id:b.DEBUG_COMMANDS.COPY_STACK_TRACE.id,label:(0,o.localize)("debugger.menu.copyCallstack")},when:g.CONTEXT_CALLSTACK_ITEM_TYPE.equalsTo("stackFrame"),order:20})}};e.DebugCallStackContribution=c,n.__decorate([(0,s.Autowired)(_.IDebugSessionManager),n.__metadata("design:type",E.DebugSessionManager)],c.prototype,"debugSessionManager",void 0),n.__decorate([(0,s.Autowired)(o.IClipboardService),n.__metadata("design:type",Object)],c.prototype,"clipboardService",void 0),e.DebugCallStackContribution=c=n.__decorate([(0,o.Domain)(f.MenuContribution,o.CommandContribution)],c)},61520:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DebugStackOperationView=void 0;const n=t(85608),s=n.__importDefault(t(14041)),o=t(41869),f=t(66498),b=t(96090),g=n.__importDefault(t(12920)),_=E=>{const{session:u,thread:h}=E,{doStop:c,doStepIn:r,doStepOut:l,doStepOver:a,doContinue:d,doRestart:m,doPause:p,updateCurrentSession:v}=(0,o.useInjectable)(b.DebugToolbarService);if(u&&!h){const y=S=>{v(u),S()};return s.default.createElement("div",{className:g.default.debug_stack_session_operations},s.default.createElement(f.DebugAction,{run:()=>y(m),icon:"reload",label:(0,o.localize)("debug.action.restart")}),s.default.createElement(f.DebugAction,{run:()=>y(c),icon:"stop",label:(0,o.localize)("debug.action.stop")}))}if(!u&&h){const{stopped:y}=h,S=T=>{h.session.currentThread=h,T()},A=T=>T?s.default.createElement(f.DebugAction,{run:()=>S(d),icon:"continue",label:(0,o.localize)("debug.action.continue")}):s.default.createElement(f.DebugAction,{run:()=>S(p),enabled:!0,icon:"pause",label:(0,o.localize)("debug.action.pause")});return s.default.createElement("div",{className:g.default.debug_stack_thread_operations},A(y),s.default.createElement(f.DebugAction,{run:()=>S(a),enabled:y,icon:"step",label:(0,o.localize)("debug.action.step-over")}),s.default.createElement(f.DebugAction,{run:()=>S(r),enabled:y,icon:"step-in",label:(0,o.localize)("debug.action.step-into")}),s.default.createElement(f.DebugAction,{run:()=>S(l),enabled:y,icon:"step-out",label:(0,o.localize)("debug.action.step-out")}))}return null};e.DebugStackOperationView=_},85294:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DebugCallStackService=void 0;const n=t(85608),s=t(76003),o=t(93899),f=t(50755),b=t(4983),g=t(17280),_=t(29539);let E=class{constructor(){this.handleContextMenu=(h,c)=>{this.stackFrameSupportsRestart.reset(),h.stopPropagation(),h.preventDefault(),c instanceof _.DebugSession?this.callStackItemType.set("session"):c instanceof f.DebugThread?this.callStackItemType.set("thread"):c instanceof f.DebugStackFrame?(this.callStackItemType.set("stackFrame"),this.stackFrameSupportsRestart.set(c.canRestart)):this.callStackItemType.reset();const{x:r,y:l}=h.nativeEvent,a=this.contextMenuService.createMenu({id:o.MenuId.DebugCallStackContext,contextKeyService:this.debugContextKey.contextKeyScoped}),d=a.getMergedMenuNodes();a.dispose();const m=()=>{var v;return c instanceof f.DebugStackFrame?!((v=c.source)===null||v===void 0)&&v.inMemory?c.source.raw.path||c.source.reference||c.source.name:c.source?c.source.uri.toString():"":c instanceof f.DebugThread||c instanceof _.DebugSession?c.id:""},p=()=>c instanceof f.DebugStackFrame?{sessionId:c.session.id,threadId:c.thread.id,frameId:c.id}:c instanceof f.DebugThread?{sessionId:c.session.id,threadId:c.id}:c instanceof _.DebugSession?{sessionId:c.id}:void 0;this.ctxMenuRenderer.show({anchor:{x:r,y:l},menuNodes:d,args:[m(),p()],contextKeyService:this.debugContextKey.contextKeyScoped})},this.stackFrameSupportsRestart||(this.stackFrameSupportsRestart=b.CONTEXT_STACK_FRAME_SUPPORTS_RESTART.bind(this.debugContextKey.contextKeyScoped)),this.callStackItemType||(this.callStackItemType=b.CONTEXT_CALLSTACK_ITEM_TYPE.bind(this.debugContextKey.contextKeyScoped))}};e.DebugCallStackService=E,n.__decorate([(0,s.Autowired)(o.AbstractContextMenuService),n.__metadata("design:type",o.AbstractContextMenuService)],E.prototype,"contextMenuService",void 0),n.__decorate([(0,s.Autowired)(o.ICtxMenuRenderer),n.__metadata("design:type",o.ICtxMenuRenderer)],E.prototype,"ctxMenuRenderer",void 0),n.__decorate([(0,s.Autowired)(g.DebugContextKey),n.__metadata("design:type",g.DebugContextKey)],E.prototype,"debugContextKey",void 0),e.DebugCallStackService=E=n.__decorate([(0,s.Injectable)(),n.__metadata("design:paramtypes",[])],E)},18028:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DebugCallStackView=void 0;const n=t(85608),s=n.__importDefault(t(14041)),o=t(41869),f=t(64582),b=t(75651),g=n.__importDefault(t(12920)),_=({viewState:E})=>{const u=(0,o.useInjectable)(f.IDebugSessionManager),[h,c]=s.default.useState([]);return s.default.useEffect(()=>{const r=u.onDidStartDebugSession(a=>{h.push(a),c([...h])}),l=u.onDidDestroyDebugSession(a=>{const d=h.findIndex(m=>m.id===a.id);h.splice(d,1),c([...h])});return()=>{r.dispose(),l.dispose()}},[]),s.default.createElement("div",{className:g.default.call_stack_wrapper},h.filter(r=>!r.parentSession).map(r=>s.default.createElement(b.DebugStackSessionView,{key:r.id,viewState:E,session:r,indent:0})))};e.DebugCallStackView=_},59334:(x,e,t)=>{"use strict";var n;Object.defineProperty(e,"__esModule",{value:!0}),e.DebugVariablesModel=void 0;const s=t(85608),o=t(76003),f=t(97267),b=t(41869),g=t(98650);let _=n=class extends f.TreeModel{constructor(u){super(),this.flushDispatchChangeDelayer=new b.ThrottledDelayer(n.DEFAULT_FLUSH_DELAY),this.init(u)}init(u){this.root=u,this.root.watcher.on(f.TreeNodeEvent.BranchDidUpdate,()=>{this.flushDispatchChangeDelayer.isTriggered()||this.flushDispatchChangeDelayer.cancel(),this.flushDispatchChangeDelayer.trigger(async()=>{this.dispatchChange()})})}};e.DebugVariablesModel=_,_.DEFAULT_FLUSH_DELAY=100,e.DebugVariablesModel=_=n=s.__decorate([(0,o.Injectable)({multiple:!0}),s.__param(0,(0,o.Optional)()),s.__metadata("design:paramtypes",[g.ExpressionContainer])],_)},30865:(x,e,t)=>{"use strict";var n;Object.defineProperty(e,"__esModule",{value:!0}),e.DebugVariablesModelService=void 0;const s=t(85608),o=s.__importDefault(t(46343)),f=t(76003),b=t(97267),g=t(41869),_=t(93899),E=t(98650),u=t(32756),h=t(17280),c=t(59334),r=s.__importDefault(t(57259));class l{constructor(){this._keepExpandedScopesMap=new Map}getMirrorScope(m){return Array.from(this._keepExpandedScopesMap.keys()).find(p=>(0,o.default)(p,m.getRawScope()))}set(m){const p=m.getRawScope();if(p){const v=this.getMirrorScope(m);if(v){const y=this._keepExpandedScopesMap.get(v);let S;m.expanded?S=Array.from(new Set([...y,m.variablesReference])):S=y.filter(A=>A!==m.variablesReference),this._keepExpandedScopesMap.set(v,S)}else this._keepExpandedScopesMap.set(p,m.expanded?[m.variablesReference]:[])}}get(m){const p=this.getMirrorScope(m);return p?this._keepExpandedScopesMap.get(p)||[]:[]}clear(){this._keepExpandedScopesMap.clear()}}let a=n=class{constructor(){this.selectedDecoration=new b.Decoration(r.default.mod_selected),this.focusedDecoration=new b.Decoration(r.default.mod_focused),this.contextMenuDecoration=new b.Decoration(r.default.mod_actived),this.loadingDecoration=new b.Decoration(r.default.mod_loading),this._selectedNodes=[],this.onDidRefreshedEmitter=new g.Emitter,this.onDidUpdateTreeModelEmitter=new g.Emitter,this.flushDispatchChangeDelayer=new g.ThrottledDelayer(n.DEFAULT_TRIGGER_DELAY),this.disposableCollection=new g.DisposableCollection,this.keepExpandedScopesModel=new l,this.activeNodeDecoration=(m,p=!0)=>{var v;if(this.contextMenuNode&&(this.contextMenuDecoration.removeTarget(this.contextMenuNode),this._contextMenuNode=void 0),m){if(this.selectedNodes.length>0)for(const y of this.selectedDecoration.appliedTargets.keys())this.selectedDecoration.removeTarget(y);this.focusedNode&&this.focusedDecoration.removeTarget(this.focusedNode),this.selectedDecoration.addTarget(m),this.focusedDecoration.addTarget(m),this._focusedNode=m,this._selectedNodes=[m],p&&((v=this.treeModel)===null||v===void 0||v.dispatchChange())}},this.activeNodeActivedDecoration=m=>{var p;this.contextMenuNode&&this.contextMenuDecoration.removeTarget(this.contextMenuNode),this.focusedNode&&(this.focusedDecoration.removeTarget(this.focusedNode),this._focusedNode=void 0),this.contextMenuDecoration.addTarget(m),this._contextMenuNode=m,(p=this.treeModel)===null||p===void 0||p.dispatchChange()},this.enactiveNodeDecoration=()=>{var m;this.focusedNode&&(this.focusedDecoration.removeTarget(this.focusedNode),this._focusedNode=void 0),this.contextMenuNode&&this.contextMenuDecoration.removeTarget(this.contextMenuNode),(m=this.treeModel)===null||m===void 0||m.dispatchChange()},this.handleContextMenu=(m,p)=>{var v;if(m.stopPropagation(),m.preventDefault(),!p||p instanceof E.DebugScope){this.enactiveNodeDecoration(),this.debugContextKey.contextVariableEvaluateNamePresent.set(!1);return}this._currentVariableInternalContext=p;const{x:y,y:S}=m.nativeEvent;p&&(this.activeNodeActivedDecoration(p),this.debugContextKey.contextDebugProtocolVariableMenu.set(p.variableMenuContext),this.debugContextKey.contextVariableEvaluateNamePresent.set(!!p.evaluateName)),!((v=p.session)===null||v===void 0)&&v.capabilities.supportsReadMemoryRequest&&p.memoryReference!==void 0?this.debugContextKey.contextCanViewMemory.set(!0):this.debugContextKey.contextCanViewMemory.set(!1);const A=this.contextMenuService.createMenu({id:_.MenuId.DebugVariablesContext,contextKeyService:this.debugContextKey.contextKeyScoped}),T=A.getMergedMenuNodes();A.dispose(),this.ctxMenuRenderer.show({anchor:{x:y,y:S},menuNodes:T,args:[p.toDebugProtocolObject()]})},this.handleTreeBlur=()=>{this.enactiveNodeDecoration()},this.handleItemClick=m=>{this.activeNodeDecoration(m)},this.handleTwistierClick=(m,p)=>{p===b.TreeNodeType.CompositeTreeNode?(this.activeNodeDecoration(m,!1),this.toggleDirectory(m)):this.activeNodeDecoration(m)},this.toggleDirectory=async m=>{m.expanded?m.setCollapsed():await m.setExpanded(!0),this.keepExpandedScopesModel.set(m)},this.listenViewModelChange()}get flushEventQueuePromise(){return this.flushEventQueueDeferred&&this.flushEventQueueDeferred.promise}get treeHandle(){return this._debugVariablesTreeHandle}get decorations(){return this._decorations}get treeModel(){return this._activeTreeModel}get currentVariableInternalContext(){return this._currentVariableInternalContext}get focusedNode(){return this._focusedNode}get selectedNodes(){return this._selectedNodes}get contextMenuNode(){return this._contextMenuNode}get onDidUpdateTreeModel(){return this.onDidUpdateTreeModelEmitter.event}get onDidRefreshed(){return this.onDidRefreshedEmitter.event}dispose(){this.disposableCollection.disposed||this.disposableCollection.dispose()}listenViewModelChange(){this.viewModel.onDidChange(async()=>{this.flushDispatchChangeDelayer.isTriggered()||this.flushDispatchChangeDelayer.cancel(),this.flushDispatchChangeDelayer.trigger(async()=>{var m,p;if(this.viewModel&&this.viewModel.currentSession&&!this.viewModel.currentSession.terminated){const v=await this.initTreeModel(this.viewModel.currentSession);this._activeTreeModel=v,await((m=this._activeTreeModel)===null||m===void 0?void 0:m.ensureReady);const y=((p=this._activeTreeModel)===null||p===void 0?void 0:p.root.children)||[];if(y.length>0&&y.every(A=>!A.expanded))for(const A of y)A.getRawScope().expensive===!1&&!A.expanded&&await this.toggleDirectory(A);const S=async A=>{for(const T of A)this.keepExpandedScopesModel.get(T).includes(T.variablesReference)&&(await T.setExpanded(!0),Array.isArray(T.children)&&await S(T.children))};y.forEach(async A=>{Array.isArray(A.children)&&await S(A.children)})}else this._activeTreeModel=void 0,this.keepExpandedScopesModel.clear();this.onDidUpdateTreeModelEmitter.fire(this._activeTreeModel)})})}listenTreeViewChange(){this.dispose(),this.treeModel&&(this.disposableCollection.push(this.treeModel.root.watcher.on(b.TreeNodeEvent.WillResolveChildren,m=>{this.loadingDecoration.addTarget(m)})),this.disposableCollection.push(this.treeModel.root.watcher.on(b.TreeNodeEvent.DidResolveChildren,m=>{this.loadingDecoration.removeTarget(m)})))}async initTreeModel(m){const p=new E.DebugVariableRoot(m);if(p)return this._activeTreeModel=this.injector.get(c.DebugVariablesModel,[p]),this.initDecorations(p),this.listenTreeViewChange(),this._activeTreeModel}initDecorations(m){this._decorations=new b.DecorationsManager(m),this._decorations.addDecoration(this.selectedDecoration),this._decorations.addDecoration(this.focusedDecoration),this._decorations.addDecoration(this.contextMenuDecoration),this._decorations.addDecoration(this.loadingDecoration)}removeNodeDecoration(){this.decorations&&(this.decorations.removeDecoration(this.selectedDecoration),this.decorations.removeDecoration(this.focusedDecoration),this.decorations.removeDecoration(this.loadingDecoration),this.decorations.removeDecoration(this.contextMenuDecoration))}handleTreeHandler(m){this._debugVariablesTreeHandle={...m,getModel:()=>this.treeModel}}async copyEvaluateName(m){m&&await this.clipboardService.writeText(m.evaluateName)}async copyValue(m){if(!m)return;const v=await(async()=>{if(m.session&&m.session.capabilities.supportsValueFormattingOptions)try{const{variable:{evaluateName:y}}=m;if(y){const S=await m.session.evaluate(y,"clipboard");if(S)return S.result}return""}catch{return""}else return m.value})();v&&await this.clipboardService.writeText(v)}};e.DebugVariablesModelService=a,a.DEFAULT_TRIGGER_DELAY=200,s.__decorate([(0,f.Autowired)(f.INJECTOR_TOKEN),s.__metadata("design:type",f.Injector)],a.prototype,"injector",void 0),s.__decorate([(0,f.Autowired)(_.ICtxMenuRenderer),s.__metadata("design:type",_.ICtxMenuRenderer)],a.prototype,"ctxMenuRenderer",void 0),s.__decorate([(0,f.Autowired)(_.AbstractContextMenuService),s.__metadata("design:type",_.AbstractContextMenuService)],a.prototype,"contextMenuService",void 0),s.__decorate([(0,f.Autowired)(u.DebugViewModel),s.__metadata("design:type",u.DebugViewModel)],a.prototype,"viewModel",void 0),s.__decorate([(0,f.Autowired)(g.IClipboardService),s.__metadata("design:type",Object)],a.prototype,"clipboardService",void 0),s.__decorate([(0,f.Autowired)(h.DebugContextKey),s.__metadata("design:type",h.DebugContextKey)],a.prototype,"debugContextKey",void 0),e.DebugVariablesModelService=a=n=s.__decorate([(0,f.Injectable)(),s.__metadata("design:paramtypes",[])],a)},86752:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.VariablesPanelContribution=void 0;const n=t(85608),s=t(76003),o=t(41869),f=t(93899),b=t(43718),g=t(57517),_=t(14951),E=t(2156),u=t(72665),h=t(94170),c=t(87423),r=t(64582),l=t(61752),a=t(32756),d=t(4983),m=t(95033),p=t(30865);let v=class{registerCommands(S){S.registerCommand(r.DEBUG_COMMANDS.SET_VARIABLE_VALUE,{execute:async()=>{var D;this.reporterService.point(r.DEBUG_REPORT_NAME===null||r.DEBUG_REPORT_NAME===void 0?void 0:r.DEBUG_REPORT_NAME.DEBUG_VARIABLES,r.DEBUG_COMMANDS.SET_VARIABLE_VALUE.id);const{currentVariableInternalContext:w}=this.debugVariablesModelService;if(!w)return;const I=await this.quickInputService.open({placeHolder:(0,o.localize)("debugger.menu.setValue.param"),value:w.description.replace(/^\"(.*)\"$/,"$1")});if(I!=null){try{await w.setValue(I)}catch(R){this.messageService.error(R.message)}(D=this.debugVariablesModelService.treeModel)===null||D===void 0||D.dispatchChange()}}}),S.registerCommand(r.DEBUG_COMMANDS.COPY_VARIABLE_VALUE,{execute:async()=>{const{currentVariableInternalContext:D}=this.debugVariablesModelService;this.debugVariablesModelService.copyValue(D)}}),S.registerCommand(r.DEBUG_COMMANDS.COPY_EVALUATE_PATH,{execute:async()=>{const{currentVariableInternalContext:D}=this.debugVariablesModelService;this.debugVariablesModelService.copyEvaluateName(D)}}),S.registerCommand(r.DEBUG_COMMANDS.ADD_TO_WATCH_ID,{execute:async D=>{const{currentVariableInternalContext:w}=this.debugVariablesModelService;if(D instanceof b.URI){const I=this.workbenchEditorService.currentEditor;if(!I?.monacoEditor||!I?.monacoEditor.hasModel())return;const R=I.monacoEditor,M=R.getModel().getValueInRange(R.getSelection());this.debugWatchModelService.addWatchExpression(M);return}else w&&this.debugWatchModelService.addWatchExpression(w.evaluateName)}});const A="ms-vscode.hexeditor",T=`${b.CUSTOM_EDITOR_SCHEME}-hexEditor.hexedit`;S.registerCommand(r.DEBUG_COMMANDS.VIEW_MEMORY_ID,{execute:async D=>{var w;const I=await this.commandService.executeCommand("extension.getDescription",A);if(I&&I.enabled){const R=(w=this.viewModel.currentSession)===null||w===void 0?void 0:w.id,M=D.memoryReference;this.workbenchEditorService.open(b.URI.from({scheme:d.DEBUG_MEMORY_SCHEME,authority:R,path:"/"+encodeURIComponent(M||"")+"/memory.bin"}),{disableNavigate:!0,preview:!0,forceOpenType:{type:g.EditorOpenType.component,componentId:T}})}else this.messageService.warning((0,o.localize)("debug.variables.view.memory.prompt.hexEditor.notInstalled"))}})}async initialize(){this.fileSystem.registerProvider(d.DEBUG_MEMORY_SCHEME,this.debugMemoryFileSystemProvider)}registerResource(S){S.registerResourceProvider({scheme:d.DEBUG_MEMORY_SCHEME,provideResource:async A=>({uri:A,icon:(0,o.getIcon)("hex"),name:A.displayName})})}registerMenus(S){var A;S.registerMenuItem(f.MenuId.DebugVariablesContext,{command:{id:r.DEBUG_COMMANDS.SET_VARIABLE_VALUE.id,label:(0,o.localize)("debugger.menu.setValue")},order:10,when:d.CONTEXT_SET_VARIABLE_SUPPORTED.raw,group:"3_modification"}),S.registerMenuItem(f.MenuId.DebugVariablesContext,{command:{id:r.DEBUG_COMMANDS.COPY_VARIABLE_VALUE.id,label:(0,o.localize)("debugger.menu.copyValue")},order:10,group:"5_cutcopypaste"}),S.registerMenuItem(f.MenuId.DebugVariablesContext,{command:{id:r.DEBUG_COMMANDS.COPY_EVALUATE_PATH.id,label:(0,o.localize)("debugger.menu.copyEvaluatePath")},when:d.CONTEXT_VARIABLE_EVALUATE_NAME_PRESENT.raw,order:20,group:"5_cutcopypaste"}),S.registerMenuItem(f.MenuId.DebugVariablesContext,{command:{id:r.DEBUG_COMMANDS.ADD_TO_WATCH_ID.id,label:(0,o.localize)("debugger.menu.addToWatchExpressions")},when:d.CONTEXT_VARIABLE_EVALUATE_NAME_PRESENT.raw,order:100,group:"z_commands"}),S.registerMenuItem(f.MenuId.EditorContext,{command:{id:r.DEBUG_COMMANDS.ADD_TO_WATCH_ID.id,label:(0,o.localize)("debugger.menu.addToWatchExpressions")},when:(A=c.ContextKeyExpr.and(h.EditorContextKeys.hasNonEmptySelection,h.EditorContextKeys.editorTextFocus))===null||A===void 0?void 0:A.keys().reduce((T,D)=>T+" && "+D,d.CONTEXT_IN_DEBUG_MODE.raw),group:"debug",order:1}),S.registerMenuItem(f.MenuId.DebugVariablesContext,{command:{id:r.DEBUG_COMMANDS.VIEW_MEMORY_ID.id,label:(0,o.localize)("debug.variables.view.memory")},iconClass:"",when:`${d.CONTEXT_CAN_VIEW_MEMORY.equalsTo(!0)} && ${d.CONTEXT_IN_DEBUG_MODE.equalsTo(!0)}`,type:"icon"})}};e.VariablesPanelContribution=v,n.__decorate([(0,s.Autowired)(o.IQuickInputService),n.__metadata("design:type",Object)],v.prototype,"quickInputService",void 0),n.__decorate([(0,s.Autowired)(p.DebugVariablesModelService),n.__metadata("design:type",p.DebugVariablesModelService)],v.prototype,"debugVariablesModelService",void 0),n.__decorate([(0,s.Autowired)(m.DebugWatchModelService),n.__metadata("design:type",m.DebugWatchModelService)],v.prototype,"debugWatchModelService",void 0),n.__decorate([(0,s.Autowired)(g.WorkbenchEditorService),n.__metadata("design:type",g.WorkbenchEditorService)],v.prototype,"workbenchEditorService",void 0),n.__decorate([(0,s.Autowired)(u.IMessageService),n.__metadata("design:type",Object)],v.prototype,"messageService",void 0),n.__decorate([(0,s.Autowired)(o.IReporterService),n.__metadata("design:type",Object)],v.prototype,"reporterService",void 0),n.__decorate([(0,s.Autowired)(b.CommandService),n.__metadata("design:type",Object)],v.prototype,"commandService",void 0),n.__decorate([(0,s.Autowired)(a.DebugViewModel),n.__metadata("design:type",a.DebugViewModel)],v.prototype,"viewModel",void 0),n.__decorate([(0,s.Autowired)(_.IFileServiceClient),n.__metadata("design:type",E.FileServiceClient)],v.prototype,"fileSystem",void 0),n.__decorate([(0,s.Autowired)(l.DebugMemoryFileSystemProvider),n.__metadata("design:type",l.DebugMemoryFileSystemProvider)],v.prototype,"debugMemoryFileSystemProvider",void 0),e.VariablesPanelContribution=v=n.__decorate([(0,o.Domain)(o.ClientAppContribution,g.BrowserEditorContribution,f.MenuContribution,o.CommandContribution)],v)},28875:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DEBUG_VARIABLE_TREE_NODE_HEIGHT=e.DebugVariableRenderedNode=e.DebugVariableView=e.DEBUG_VARIABLE_TREE_FIELD_NAME=void 0;const n=t(85608),s=n.__importDefault(t(53373)),o=n.__importDefault(t(14041)),f=t(97267),b=t(41869),g=t(98650),_=t(30865),E=n.__importDefault(t(57259));e.DEBUG_VARIABLE_TREE_FIELD_NAME="DEBUG_VARIABLE_TREE_FIELD";const u=({viewState:c})=>{const r=(0,b.useInjectable)(_.DebugVariablesModelService),l=o.default.useRef(null),[a,d]=o.default.useState(),m=22,{width:p,height:v}=c;o.default.useEffect(()=>{const M=r.onDidUpdateTreeModel(async O=>{d(O)});return()=>{M.dispose(),r.removeNodeDecoration(),d(void 0)}},[]);const y=M=>{r.handleTreeHandler({...M,hasDirectFocus:()=>l.current===document.activeElement})},S=(M,O,P)=>{M.stopPropagation();const{handleTwistierClick:L}=r;O&&L(O,P)},A=(M,O)=>{const{handleContextMenu:P}=r;P(M,O)},T=M=>{const{handleContextMenu:O}=r;O(M)},D=M=>{const{enactiveNodeDecoration:O}=r;O()},w=M=>{const{enactiveNodeDecoration:O}=r;O()},I=o.default.useCallback(M=>{const O=r.decorations.getDecorations(M.item);return o.default.createElement(e.DebugVariableRenderedNode,{item:M.item,itemType:M.itemType,decorations:O,onClick:S,onTwistierClick:S,onContextMenu:A,defaultLeftPadding:0,leftPadding:8})},[a]),R=()=>a?o.default.createElement(f.RecycleTree,{height:v,width:p,itemHeight:m,onReady:y,model:a,placeholder:()=>o.default.createElement("span",null),overflow:"auto"},I):o.default.createElement("span",null);return o.default.createElement("div",{className:E.default.debug_variables_container,tabIndex:-1,ref:l,onContextMenu:T,onClick:D,onBlur:w,"data-name":e.DEBUG_VARIABLE_TREE_FIELD_NAME},R())};e.DebugVariableView=u;const h=({item:c,decorations:r,defaultLeftPadding:l,leftPadding:a,onClick:d,onTwistierClick:m,onContextMenu:p,itemType:v})=>{const y=(0,b.useDesignStyles)(E.default.expansion_toggle,"expansion_toggle"),S=L=>{d(L,c,f.CompositeTreeNode.is(c)?f.TreeNodeType.CompositeTreeNode:f.TreeNodeType.TreeNode)},A=L=>{L.nativeEvent.which!==0&&(v===f.TreeNodeType.TreeNode||v===f.TreeNodeType.CompositeTreeNode)&&p&&p(L,c,v)},T=`${(l||8)+(c.depth||0)*(a||0)+(g.ExpressionContainer.is(c)?0:16)}px`,D={height:e.DEBUG_VARIABLE_TREE_NODE_HEIGHT,lineHeight:`${e.DEBUG_VARIABLE_TREE_NODE_HEIGHT}px`,paddingLeft:T},w=L=>o.default.createElement("div",{className:(0,s.default)(E.default.debug_variables_node_segment,E.default.debug_variables_node_displayname,E.default.debug_variables_variable,L.description?E.default.name:"")},L.displayName,L.description?":":""),I=L=>{const N=/^true|false$/i,k=/^(['"]).*\1$/,B=L.description?L.description.replace("function","\u0192 "):"",F=[E.default.debug_variables_variable];return c.variableType==="number"||c.variableType==="boolean"||c.variableType==="string"?F.push(E.default[c.variableType]):isNaN(+B)?N.test(B)?F.push(E.default.boolean):k.test(B)&&F.push(E.default.string):F.push(E.default.number),o.default.createElement("div",{className:(0,s.default)(E.default.debug_variables_node_segment_grow,E.default.debug_variables_node_description,...F)},B)},R=()=>o.default.createElement("div",{className:(0,s.default)(E.default.debug_variables_node_segment,E.default.debug_variables_node_tail)},M()),M=()=>o.default.createElement("div",{className:E.default.debug_variables_node_status},c.badge),O=(L,N)=>{const k=B=>{N(B,L,v)};return r&&r?.classlist.indexOf(E.default.mod_loading)>-1?o.default.createElement("div",{className:(0,s.default)(E.default.debug_variables_node_segment,y)},o.default.createElement(f.Loading,null)):o.default.createElement("div",{onClick:k,className:(0,s.default)(E.default.debug_variables_node_segment,y,(0,b.getIcon)("right"),{[`${E.default.mod_collapsed}`]:!L.expanded})})},P=L=>{if(f.CompositeTreeNode.is(L))return O(L,m)};return o.default.createElement("div",{key:c.id,onClick:S,onContextMenu:A,title:c.description||"",className:(0,s.default)(E.default.debug_variables_node,r?r.classlist:null),style:D,"data-id":c.id},o.default.createElement("div",{className:(0,s.default)(E.default.debug_variables_node_content)},P(c),o.default.createElement("div",{className:E.default.debug_variables_node_overflow_wrap},w(c),I(c)),R()))};e.DebugVariableRenderedNode=h,e.DEBUG_VARIABLE_TREE_NODE_HEIGHT=22},85454:(x,e,t)=>{"use strict";var n;Object.defineProperty(e,"__esModule",{value:!0}),e.DebugWatchModel=void 0;const s=t(85608),o=t(76003),f=t(97267),b=t(41869),g=t(98650);let _=n=class extends f.TreeModel{constructor(u){super(),this.flushDispatchChangeDelayer=new b.ThrottledDelayer(n.DEFAULT_FLUSH_DELAY),this.init(u)}init(u){this.root=u,this.root.watcher.on(f.TreeNodeEvent.BranchDidUpdate,()=>{this.flushDispatchChangeDelayer.isTriggered()||this.flushDispatchChangeDelayer.cancel(),this.flushDispatchChangeDelayer.trigger(async()=>{this.dispatchChange()})})}};e.DebugWatchModel=_,_.DEFAULT_FLUSH_DELAY=100,e.DebugWatchModel=_=n=s.__decorate([(0,o.Injectable)({multiple:!0}),s.__param(0,(0,o.Optional)()),s.__metadata("design:paramtypes",[g.ExpressionContainer])],_)},95033:(x,e,t)=>{"use strict";var n;Object.defineProperty(e,"__esModule",{value:!0}),e.DebugWatchModelService=void 0;const s=t(85608),o=t(76003),f=t(97267),b=t(41869),g=t(93899),_=t(38029),E=t(50755),u=t(98650),h=t(32756),c=t(4983),r=t(26296),l=t(85454),a=s.__importDefault(t(21315)),{Path:d}=b.path;let m=n=class{constructor(){this._changeEventDispatchQueue=[],this.selectedDecoration=new f.Decoration(a.default.mod_selected),this.focusedDecoration=new f.Decoration(a.default.mod_focused),this.contextMenuDecoration=new f.Decoration(a.default.mod_actived),this.loadingDecoration=new f.Decoration(a.default.mod_loading),this._selectedNodes=[],this.onDidRefreshedEmitter=new b.Emitter,this.onDidUpdateTreeModelEmitter=new b.Emitter,this.flushDispatchChangeDelayer=new b.ThrottledDelayer(n.DEFAULT_TRIGGER_DELAY),this.disposableCollection=new b.DisposableCollection,this.loadedDeferred=new b.Deferred,this.activeNodeDecoration=(v,y=!0)=>{var S;if(c.CONTEXT_WATCH_EXPRESSIONS_FOCUSED.bind(this.contextKeyService),this.contextMenuNode&&(this.focusedDecoration.removeTarget(this.contextMenuNode),this.selectedDecoration.removeTarget(this.contextMenuNode),this._contextMenuNode=void 0),v){if(this.selectedNodes.length>0)for(const A of this.selectedDecoration.appliedTargets.keys())this.selectedDecoration.removeTarget(A);this.focusedNode&&this.focusedDecoration.removeTarget(this.focusedNode),this.selectedDecoration.addTarget(v),this.focusedDecoration.addTarget(v),this._focusedNode=v,this._selectedNodes=[v],y&&((S=this.treeModel)===null||S===void 0||S.dispatchChange())}},this.activeNodeActivedDecoration=v=>{var y;this.contextMenuNode&&this.contextMenuDecoration.removeTarget(this.contextMenuNode),this.focusedNode&&(this.focusedDecoration.removeTarget(this.focusedNode),this._focusedNode=void 0),this.contextMenuDecoration.addTarget(v),this._contextMenuNode=v,(y=this.treeModel)===null||y===void 0||y.dispatchChange()},this.enactiveNodeDecoration=()=>{var v;c.CONTEXT_WATCH_EXPRESSIONS_FOCUSED.bind(this.contextKeyService).set(!1),this.focusedNode&&(this.focusedDecoration.removeTarget(this.focusedNode),this._focusedNode=void 0),this.contextMenuNode&&this.contextMenuDecoration.removeTarget(this.contextMenuNode),(v=this.treeModel)===null||v===void 0||v.dispatchChange()},this.handleContextMenu=(v,y)=>{var S;v.stopPropagation(),v.preventDefault();const{x:A,y:T}=v.nativeEvent;y?this.activeNodeActivedDecoration(y):this.enactiveNodeDecoration();let D;y?D=y:D=(S=this.treeModel)===null||S===void 0?void 0:S.root,this.watchItemType.set(D instanceof u.DebugWatchNode?"expression":D instanceof u.DebugVariable||D instanceof u.DebugVariableContainer?"variable":void 0);const w=this.contextMenuService.createMenu({id:g.MenuId.DebugWatchContext,contextKeyService:this.contextMenuContextKeyService}),I=w.getMergedMenuNodes();w.dispose(),this.ctxMenuRenderer.show({anchor:{x:A,y:T},menuNodes:I,args:[D]})},this.handleTreeBlur=()=>{this.enactiveNodeDecoration()},this.handleItemClick=v=>{this.activeNodeDecoration(v)},this.handleTwistierClick=(v,y)=>{if(y===f.TreeNodeType.CompositeTreeNode){if(u.DebugWatchNode.is(v)&&v.available){this.activeNodeDecoration(v,!1),this.toggleDirectory(v);return}else if(v.variablesReference){this.activeNodeDecoration(v,!1),this.toggleDirectory(v);return}}this.activeNodeDecoration(v)},this.toggleDirectory=async v=>{v.expanded?this.treeHandle.collapseNode(v):this.treeHandle.expandNode(v)},this.proxyPrompt=v=>{let y=!1;const S=async A=>{if(!y){if(y=!0,A){if(v instanceof f.NewPromptHandle){const T=v.parent;if(v.addAddonAfter("loading_indicator"),T.session)this.addWatchExpression(A);else{const D=new u.DebugWatchNode(T.session,A,T);this.dispatchWatchEvent(T.path,{type:f.WatchEvent.Added,node:D,id:T.id}),this.debugWatch.addWatchExpression(A)}}else if(v instanceof f.RenamePromptHandle){const T=v.target,D=T.parent;if(v.addAddonAfter("loading_indicator"),D.session)this.debugWatch.renameWatchExpression(T.name,A),this.initTreeModel();else{const w=new d(T.path).dir.join(A).toString();this.dispatchWatchEvent(D.path,{type:f.WatchEvent.Moved,oldPath:T.path,newPath:w}),this.debugWatch.renameWatchExpression(T.name,A)}}}return!0}};v.destroyed||(v.onCommit(S),v.onBlur(S))},this.flushEventQueue=()=>{let v;if(!this._changeEventDispatchQueue||this._changeEventDispatchQueue.length===0)return;this._changeEventDispatchQueue.sort((S,A)=>{const T=d.pathDepth(S),D=d.pathDepth(A);return T-D});const y=[this._changeEventDispatchQueue[0]];for(const S of this._changeEventDispatchQueue)y.some(A=>S.indexOf(A)===0)||y.push(S);return v=(0,b.pSeries)(y.map(S=>async()=>{var A,T;const D=(T=(A=this.treeModel)===null||A===void 0?void 0:A.root)===null||T===void 0?void 0:T.watchEvents.get(S);return D&&typeof D.callback=="function"&&await D.callback({type:f.WatchEvent.Changed,path:S}),null})),this._changeEventDispatchQueue=[],v},this.debugWatch=new E.DebugWatch(this.manager,this.reporterService),this.init(),this.watchItemType=c.CONTEXT_WATCH_ITEM_TYPE.bind(this.contextKeyService)}get flushEventQueuePromise(){return this.flushEventQueueDeferred&&this.flushEventQueueDeferred.promise}get contextMenuContextKeyService(){return this._contextMenuContextKeyService||(this._contextMenuContextKeyService=this.contextKeyService.createScoped()),this._contextMenuContextKeyService}get treeHandle(){return this._debugWatchTreeHandle}get decorations(){return this._decorations}get treeModel(){return this._activeTreeModel}get focusedNode(){return this._focusedNode}get selectedNodes(){return this._selectedNodes}get contextMenuNode(){return this._contextMenuNode}get onDidUpdateTreeModel(){return this.onDidUpdateTreeModelEmitter.event}get onDidRefreshed(){return this.onDidRefreshedEmitter.event}dispose(){this.disposableCollection.disposed||this.disposableCollection.dispose()}async save(v=[]){await(await this.storageProvider(b.STORAGE_NAMESPACE.DEBUG)).set(n.DEBUG_WATCHER_EXPRESSIONS_STORAGE_KEY,v)}async load(){const y=await(await this.storageProvider(b.STORAGE_NAMESPACE.DEBUG)).get(n.DEBUG_WATCHER_EXPRESSIONS_STORAGE_KEY,[]);await this.debugWatch.updateWatchExpressions(y),this.loadedDeferred.resolve()}async init(){await this.loadedDeferred.promise,this.initTreeModel(),this.listenDebugWatchChange()}listenDebugWatchChange(){this.debugWatch.onDidChange(async()=>{this.flushDispatchChangeDelayer.isTriggered()||this.flushDispatchChangeDelayer.cancel(),this.flushDispatchChangeDelayer.trigger(async()=>{this.initTreeModel()})}),this.debugWatch.onDidVariableChange(async()=>{this.refresh()}),this.debugWatch.onDidExpressionChange(v=>{this.save(v)})}listenTreeViewChange(){this.dispose(),this.treeModel&&(this.disposableCollection.push(this.treeModel.root.watcher.on(f.TreeNodeEvent.WillResolveChildren,v=>{this.loadingDecoration.addTarget(v)})),this.disposableCollection.push(this.treeModel.root.watcher.on(f.TreeNodeEvent.DidResolveChildren,v=>{this.loadingDecoration.removeTarget(v)})))}async initTreeModel(){const v=await this.debugWatch.getRoot();if(v)return this._activeTreeModel=this.injector.get(l.DebugWatchModel,[v]),this.initDecorations(v),this.listenTreeViewChange(),this.onDidUpdateTreeModelEmitter.fire(this._activeTreeModel),this._activeTreeModel}initDecorations(v){this._decorations=new f.DecorationsManager(v),this._decorations.addDecoration(this.selectedDecoration),this._decorations.addDecoration(this.focusedDecoration),this._decorations.addDecoration(this.contextMenuDecoration),this._decorations.addDecoration(this.loadingDecoration)}removeNodeDecoration(){this.decorations&&(this.decorations.removeDecoration(this.selectedDecoration),this.decorations.removeDecoration(this.focusedDecoration),this.decorations.removeDecoration(this.contextMenuDecoration),this.decorations.removeDecoration(this.loadingDecoration))}handleTreeHandler(v){this._debugWatchTreeHandle=v}async newDebugWatchNodePrompt(){this.treeModel&&this.proxyPrompt(await this.treeHandle.promptNewTreeNode(this.treeModel.root))}async renameDebugWatchNodePrompt(v){this.treeModel&&this.proxyPrompt(await this.treeHandle.promptRename(v))}removeDebugWatchNode(v){this.debugWatch.removeWatchExpression(v.name),v.session?this.initTreeModel():this.dispatchWatchEvent(v.parent.path,{type:f.WatchEvent.Removed,path:v.path})}async copyValue(v){const y=await v.getClipboardValue();y&&await this.clipboardService.writeText(y)}async clearAllExpression(){this.debugWatch.updateWatchExpressions([]),await this.initTreeModel(),this.save()}addWatchExpression(v){this.debugWatch.addWatchExpression(v),this.initTreeModel()}dispatchWatchEvent(v,y){var S;const A=(S=this.treeModel)===null||S===void 0?void 0:S.root.watchEvents.get(v);A&&A.callback&&A.callback(y)}collapsedAll(){var v;(v=this.treeModel)===null||v===void 0||v.root.collapsedAll()}async refresh(v){if(!v)if(this.treeModel)v=this.treeModel.root;else return;!u.ExpressionContainer.is(v)&&v.parent&&(v=v.parent),this.queueChangeEvent(v.path,()=>{this.onDidRefreshedEmitter.fire()})}queueChangeEvent(v,y){this.flushEventQueueDeferred||(this.flushEventQueueDeferred=new b.Deferred,clearTimeout(this._eventFlushTimeout),this._eventFlushTimeout=setTimeout(async()=>{var S;await this.flushEventQueue(),(S=this.flushEventQueueDeferred)===null||S===void 0||S.resolve(),this.flushEventQueueDeferred=null,y()},n.DEFAULT_REFRESH_DELAY)),this._changeEventDispatchQueue.indexOf(v)===-1&&this._changeEventDispatchQueue.push(v)}};e.DebugWatchModelService=m,m.DEFAULT_REFRESH_DELAY=100,m.DEFAULT_TRIGGER_DELAY=200,m.DEBUG_WATCHER_EXPRESSIONS_STORAGE_KEY="watchers",s.__decorate([(0,o.Autowired)(o.INJECTOR_TOKEN),s.__metadata("design:type",o.Injector)],m.prototype,"injector",void 0),s.__decorate([(0,o.Autowired)(g.ICtxMenuRenderer),s.__metadata("design:type",g.ICtxMenuRenderer)],m.prototype,"ctxMenuRenderer",void 0),s.__decorate([(0,o.Autowired)(g.AbstractContextMenuService),s.__metadata("design:type",g.AbstractContextMenuService)],m.prototype,"contextMenuService",void 0),s.__decorate([(0,o.Autowired)(h.DebugViewModel),s.__metadata("design:type",h.DebugViewModel)],m.prototype,"viewModel",void 0),s.__decorate([(0,o.Autowired)(r.IDebugSessionManager),s.__metadata("design:type",_.DebugSessionManager)],m.prototype,"manager",void 0),s.__decorate([(0,o.Autowired)(b.IReporterService),s.__metadata("design:type",Object)],m.prototype,"reporterService",void 0),s.__decorate([(0,o.Autowired)(b.IContextKeyService),s.__metadata("design:type",Object)],m.prototype,"contextKeyService",void 0),s.__decorate([(0,o.Autowired)(b.StorageProvider),s.__metadata("design:type",Function)],m.prototype,"storageProvider",void 0),s.__decorate([(0,o.Autowired)(b.IClipboardService),s.__metadata("design:type",Object)],m.prototype,"clipboardService",void 0),e.DebugWatchModelService=m=n=s.__decorate([(0,o.Injectable)(),s.__metadata("design:paramtypes",[])],m)},14600:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.WatchPanelContribution=void 0;const n=t(85608),s=t(76003),o=t(41869),f=t(93899),b=t(64582),g=t(98650),_=t(4983),E=t(95033);let u=class{registerCommands(c){c.registerCommand(b.DEBUG_COMMANDS.ADD_WATCHER,{execute:()=>{this.debugWatchModelService.newDebugWatchNodePrompt()}}),c.registerCommand(b.DEBUG_COMMANDS.COLLAPSE_ALL_WATCHER,{execute:()=>{this.debugWatchModelService.collapsedAll()}}),c.registerCommand(b.DEBUG_COMMANDS.REMOVE_ALL_WATCHER,{execute:()=>{this.debugWatchModelService.clearAllExpression()}}),c.registerCommand(b.DEBUG_COMMANDS.REMOVE_WATCHER,{execute:r=>{r instanceof g.DebugWatchNode&&this.debugWatchModelService.removeDebugWatchNode(r);const[l]=this.debugWatchModelService.selectedNodes;l instanceof g.DebugWatchNode&&this.debugWatchModelService.removeDebugWatchNode(l)}}),c.registerCommand(b.DEBUG_COMMANDS.EDIT_WATCHER,{execute:r=>{this.debugWatchModelService.renameDebugWatchNodePrompt(r)}}),c.registerCommand(b.DEBUG_COMMANDS.COPY_WATCHER_VALUE,{execute:r=>{this.debugWatchModelService.copyValue(r)}})}registerToolbarItems(c){c.registerItem({id:b.DEBUG_COMMANDS.REMOVE_ALL_WATCHER.id,command:b.DEBUG_COMMANDS.REMOVE_ALL_WATCHER.id,iconClass:(0,o.getIcon)("close-all"),viewId:b.DEBUG_WATCH_ID,tooltip:(0,o.localize)("debug.watch.removeAll")}),c.registerItem({id:b.DEBUG_COMMANDS.COLLAPSE_ALL_WATCHER.id,iconClass:(0,o.getIcon)("collapse-all"),command:b.DEBUG_COMMANDS.COLLAPSE_ALL_WATCHER.id,viewId:b.DEBUG_WATCH_ID,tooltip:(0,o.localize)("debug.watch.collapseAll"),when:_.CONTEXT_IN_DEBUG_MODE.raw}),c.registerItem({id:b.DEBUG_COMMANDS.ADD_WATCHER.id,iconClass:(0,o.getIcon)("plus"),command:b.DEBUG_COMMANDS.ADD_WATCHER.id,viewId:b.DEBUG_WATCH_ID,tooltip:(0,o.localize)("debug.watch.add"),when:_.CONTEXT_IN_DEBUG_MODE.raw})}registerMenus(c){c.registerMenuItem(f.MenuId.DebugWatchContext,{command:{id:b.DEBUG_COMMANDS.ADD_WATCHER.id,label:(0,o.localize)("debug.watch.add")},order:10,group:"3_modification"}),c.registerMenuItem(f.MenuId.DebugWatchContext,{command:{id:b.DEBUG_COMMANDS.EDIT_WATCHER.id,label:(0,o.localize)("debug.watch.edit")},when:_.CONTEXT_WATCH_ITEM_TYPE.equalsTo("expression"),order:20,group:"3_modification"}),c.registerMenuItem(f.MenuId.DebugWatchContext,{command:{id:b.DEBUG_COMMANDS.COPY_WATCHER_VALUE.id,label:(0,o.localize)("debug.watch.copyValue")},when:`${_.CONTEXT_WATCH_ITEM_TYPE.equalsTo("expression")} || ${_.CONTEXT_WATCH_ITEM_TYPE.equalsTo("variable")} && ${_.CONTEXT_IN_DEBUG_MODE.raw}`,order:30,enabledWhen:_.CONTEXT_IN_DEBUG_MODE.raw,group:"3_modification"}),c.registerMenuItem(f.MenuId.DebugWatchContext,{command:{id:b.DEBUG_COMMANDS.REMOVE_WATCHER.id,label:(0,o.localize)("debug.watch.remove")},when:_.CONTEXT_WATCH_ITEM_TYPE.equalsTo("expression"),order:10,group:"z_commands"}),c.registerMenuItem(f.MenuId.DebugWatchContext,{command:{id:b.DEBUG_COMMANDS.REMOVE_ALL_WATCHER.id,label:(0,o.localize)("debug.watch.removeAll")},order:20,group:"z_commands"})}registerKeybindings(c){c.registerKeybinding({command:b.DEBUG_COMMANDS.REMOVE_WATCHER.id,keybinding:"ctrlcmd+backspace",when:_.CONTEXT_WATCH_EXPRESSIONS_FOCUSED.raw})}onStart(){this.debugWatchModelService.load()}};e.WatchPanelContribution=u,n.__decorate([(0,s.Autowired)(E.DebugWatchModelService),n.__metadata("design:type",E.DebugWatchModelService)],u.prototype,"debugWatchModelService",void 0),e.WatchPanelContribution=u=n.__decorate([(0,o.Domain)(o.ClientAppContribution,f.MenuContribution,o.CommandContribution,o.TabBarToolbarContribution,o.KeybindingContribution)],u)},64611:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DEBUG_WATCH_TREE_NODE_HEIGHT=e.DebugWatchRenderedNode=e.DebugWatchView=e.DEBUG_WATCH_TREE_FIELD_NAME=void 0;const n=t(85608),s=n.__importDefault(t(53373)),o=n.__importDefault(t(14041)),f=t(97267),b=t(41869),g=t(98650),_=t(95033),E=n.__importDefault(t(21315));e.DEBUG_WATCH_TREE_FIELD_NAME="DEBUG_WATCH_TREE_FIELD";const u=({viewState:c})=>{const r=(0,b.useInjectable)(_.DebugWatchModelService),l=22,a=o.default.useRef(null),[d,m]=o.default.useState(),{height:p}=c;o.default.useEffect(()=>v(),[]);const v=()=>{const M=r.treeModel;let O=!0;const P=new b.DisposableCollection;return P.push(b.Disposable.create(()=>{O=!1})),M&&M.ensureReady.then(()=>{O&&m(M)}),P.push(r.onDidUpdateTreeModel(async L=>{L&&await L.ensureReady,O&&m(L)})),()=>{r.removeNodeDecoration(),P.dispose()}},y=M=>{r.handleTreeHandler({...M,getModel:()=>d,hasDirectFocus:()=>a.current===document.activeElement})},S=(M,O,P)=>{M.stopPropagation();const{handleTwistierClick:L}=r;O&&L(O,P)},A=(M,O)=>{const{handleContextMenu:P}=r;P(M,O)},T=M=>{const{handleContextMenu:O}=r;O(M)},D=M=>{const{enactiveNodeDecoration:O}=r;O()},w=M=>{const{enactiveNodeDecoration:O}=r;O()},I=o.default.useCallback(M=>{const O=r.decorations.getDecorations(M.item);return o.default.createElement(e.DebugWatchRenderedNode,{item:M.item,itemType:M.itemType,decorations:O,onClick:S,onTwistierClick:S,onContextMenu:A,defaultLeftPadding:12,leftPadding:8})},[d]),R=()=>d?o.default.createElement(f.RecycleTree,{height:p,itemHeight:l,onReady:y,model:d,placeholder:()=>o.default.createElement("span",null)},I):o.default.createElement("span",null);return o.default.createElement("div",{className:E.default.debug_watch_container,tabIndex:-1,ref:a,onContextMenu:T,onClick:D,onBlur:w,"data-name":e.DEBUG_WATCH_TREE_FIELD_NAME},R())};e.DebugWatchView=u;const h=({item:c,decorations:r,defaultLeftPadding:l,leftPadding:a,onClick:d,onTwistierClick:m,onContextMenu:p,itemType:v})=>{const y=(0,b.useDesignStyles)(E.default.expansion_toggle,"expansion_toggle"),S=v===f.TreeNodeType.RenamePrompt,A=v===f.TreeNodeType.NewPrompt,T=S||A,D=B=>{const F=c.getRawWatch();F&&d(B,c,F.variablesReference>0?f.TreeNodeType.CompositeTreeNode:f.TreeNodeType.TreeNode)},w=B=>{B.nativeEvent.which!==0&&(v===f.TreeNodeType.TreeNode||v===f.TreeNodeType.CompositeTreeNode)&&p&&p(B,c,v)},I={height:e.DEBUG_WATCH_TREE_NODE_HEIGHT,lineHeight:`${e.DEBUG_WATCH_TREE_NODE_HEIGHT}px`,paddingLeft:`${(l||8)+(c.depth||0)*(a||0)}px`},R=B=>T&&B instanceof f.PromptHandle?o.default.createElement("div",{className:(0,s.default)(E.default.debug_watch_node_segment,E.default.debug_watch_node_inputbox)},o.default.createElement("div",{className:(0,s.default)("input-box",E.default.debug_watch_node_prompt_box)},o.default.createElement(B.ProxiedInput,{wrapperStyle:{height:e.DEBUG_WATCH_TREE_NODE_HEIGHT,padding:"0 5px"}}))):o.default.createElement("div",{className:(0,s.default)(E.default.debug_watch_node_segment,E.default.debug_watch_node_displayname,E.default.debug_watch_variable,B.description?E.default.name:"")},B.name,B.description?":":""),M=B=>{const F=/^true|false$/i,W=/^(['"]).*\1$/,V=B.description?B.description.replace("function","\u0192 "):"",H=[E.default.debug_watch_variable];return T?null:(c.variableType==="number"||c.variableType==="boolean"||c.variableType==="string"?H.push(E.default[c.variableType]):isNaN(+V)?F.test(V)?H.push(E.default.boolean):W.test(V)&&H.push(E.default.string):H.push(E.default.number),o.default.createElement("div",{className:(0,s.default)(E.default.debug_watch_node_segment_grow,E.default.debug_watch_node_description,...H)},V))},O=()=>o.default.createElement("div",{className:(0,s.default)(E.default.debug_watch_node_segment,E.default.debug_watch_node_tail)},P()),P=()=>o.default.createElement("div",{className:E.default.debug_watch_node_status},c.badge),L=()=>c.tooltip,N=(B,F)=>{const W=V=>{F(V,B,v)};return r&&r?.classlist.indexOf(E.default.mod_loading)>-1?o.default.createElement("div",{className:(0,s.default)(E.default.debug_watch_node_segment,y)},o.default.createElement(f.Loading,null)):o.default.createElement("div",{onClick:W,className:(0,s.default)(E.default.debug_watch_node_segment,y,(0,b.getIcon)("right"),{[`${E.default.mod_collapsed}`]:!B.expanded})})},k=B=>{if(g.DebugWatchNode.is(B)){if(B.available&&B.variablesReference)return N(B,m)}else if(g.ExpressionContainer.is(B)&&B.variablesReference)return N(B,m)};return o.default.createElement("div",{key:c.id,onClick:D,onContextMenu:w,title:L(),className:(0,s.default)(E.default.debug_watch_node,r?r.classlist:null),style:I,"data-id":c.id},o.default.createElement("div",{className:(0,s.default)(E.default.debug_watch_node_content)},k(c),o.default.createElement("div",{style:{height:e.DEBUG_WATCH_TREE_NODE_HEIGHT},className:T?E.default.debug_watch_node_prompt_wrap:E.default.debug_watch_node_overflow_wrap},R(c),M(c)),O()))};e.DebugWatchRenderedNode=h,e.DEBUG_WATCH_TREE_NODE_HEIGHT=22},46118:(x,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DEBUG_COMMANDS=void 0;var t;(function(n){n.ADD_WATCHER={id:"debug.watch.add"},n.COLLAPSE_ALL_WATCHER={id:"debug.watch.collapseAll"},n.REMOVE_ALL_WATCHER={id:"debug.watch.removeAll"},n.REMOVE_WATCHER={id:"debug.watch.remove"},n.EDIT_WATCHER={id:"debug.watch.edit"},n.COPY_WATCHER_VALUE={id:"debug.watch.copyValue"},n.REMOVE_ALL_BREAKPOINTS={id:"debug.breakpoints.remove.all"},n.TOGGLE_BREAKPOINTS={id:"debug.breakpoints.toggle"},n.ACTIVE_BREAKPOINTS={id:"debug.breakpoints.active"},n.DEACTIVE_BREAKPOINTS={id:"debug.breakpoints.deactive"},n.START={id:"debug.start"},n.NEXT={id:"debug.next"},n.PREV={id:"debug.prev"},n.OVER={id:"debug.over"},n.STOP={id:"debug.stop"},n.CONTINUE={id:"debug.continue"},n.RESTART={id:"debug.restart"},n.PAUSE={id:"debug.pause"},n.DELETE_BREAKPOINT={id:"debug.delete.breakpoint",label:"%debug.menu.delete.breakpoint%"},n.EDIT_BREAKPOINT={id:"debug.edit.breakpoint",label:"%debug.menu.edit.breakpoint%"},n.DISABLE_BREAKPOINT={id:"debug.disable.breakpoint",label:"%debug.menu.disable.breakpoint%"},n.ENABLE_BREAKPOINT={id:"debug.enable.breakpoint",label:"%debug.menu.enable.breakpoint%"},n.ENABLE_LOGPOINT={id:"debug.enable.logpoint",label:"%debug.menu.enable.logpoint"},n.ADD_BREAKPOINT={id:"debug.add.breakpoint",label:"%debug.menu.add.breakpoint%"},n.ADD_LOGPOINT={id:"debug.add.logpoint",label:"%debug.menu.add.logpoint%"},n.ADD_CONDITIONAL_BREAKPOINT={id:"debug.add.conditional",label:"%debug.menu.add.conditional%"},n.RESTART_FRAME={id:"debug.callstack.restart.frame"},n.COPY_STACK_TRACE={id:"debug.callstack.copy"},n.SET_VARIABLE_VALUE={id:"debug.variables.setValue"},n.COPY_VARIABLE_VALUE={id:"debug.variables.copy"},n.COPY_EVALUATE_PATH={id:"debug.evaluate.copy"},n.ADD_TO_WATCH_ID={id:"debug.addToWatchExpressions"},n.VIEW_MEMORY_ID={id:"debug.variables.view.memory"},n.CLEAR_CONSOLE={id:"debug.console.clear",label:"%debug.console.clear%"},n.COPY_CONSOLE_ITEM={id:"debug.console.copy"},n.COPY_CONSOLE_ALL={id:"debug.console.copyALl"},n.COLLAPSE_ALL_CONSOLE_ITEM={id:"debug.console.collapseAll",label:"%debug.console.collapseAll%"},n.CONSOLE_ENTER_EVALUATE={id:"debug.console.keybing.enter.evaluate"},n.CONSOLE_INPUT_DOWN_ARROW={id:"debug.console.input.down.arrow"},n.CONSOLE_INPUT_UP_ARROW={id:"debug.console.input.up.arrow"},n.CONSOLE_FILTER_FOCUS={id:"debug.console.filter.input.focus"},n.RUN_TO_CURSOR={id:"debug.action.runToCursor",label:"%debug.action.runToCursor%"},n.FORCE_RUN_TO_CURSOR={id:"debug.action.forceRunToCursor",label:"%debug.action.forceRunToCursor%"},n.EXCEPTION_WIDGET_CLOSE={id:"debug.action.closeExceptionWidget"},n.SHOW_ALL_AUTOMATIC_DEBUG_CONFIGURATIONS={id:"debug.showAllAutomaticDebugConfigurations"}})(t||(e.DEBUG_COMMANDS=t={}))},4983:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CONTEXT_DEBUGGERS_AVAILABLE=e.CONTEXT_BREAKPOINTS_EXIST=e.CONTEXT_STEP_INTO_TARGETS_SUPPORTED=e.CONTEXT_JUMP_TO_CURSOR_SUPPORTED=e.CONTEXT_STACK_FRAME_SUPPORTS_RESTART=e.CONTEXT_RESTART_FRAME_SUPPORTED=e.CONTEXT_STEP_BACK_SUPPORTED=e.CONTEXT_FOCUSED_SESSION_IS_ATTACH=e.CONTEXT_LOADED_SCRIPTS_ITEM_TYPE=e.CONTEXT_LOADED_SCRIPTS_SUPPORTED=e.CONTEXT_BREAKPOINT_SUPPORTS_CONDITION=e.CONTEXT_BREAKPOINT_ACCESS_TYPE=e.CONTEXT_BREAKPOINT_ITEM_TYPE=e.CONTEXT_WATCH_ITEM_TYPE=e.CONTEXT_CALLSTACK_SESSION_HAS_ONE_THREAD=e.CONTEXT_CALLSTACK_ITEM_STOPPED=e.CONTEXT_CALLSTACK_SESSION_IS_ATTACH=e.CONTEXT_CALLSTACK_ITEM_TYPE=e.CONTEXT_BREAKPOINT_INPUT_FOCUSED=e.CONTEXT_EXPRESSION_SELECTED=e.CONTEXT_VARIABLES_FOCUSED=e.CONTEXT_WATCH_EXPRESSIONS_EXIST=e.CONTEXT_WATCH_EXPRESSIONS_FOCUSED=e.CONTEXT_BREAKPOINTS_FOCUSED=e.CONTEXT_IN_BREAKPOINT_WIDGET=e.CONTEXT_BREAKPOINT_WIDGET_VISIBLE=e.CONTEXT_IN_DEBUG_CONSOLE=e.CONTEXT_IN_DEBUG_REPL=e.CONTEXT_IN_DEBUG_MODE=e.CONTEXT_DEBUG_UX=e.CONTEXT_DEBUG_UX_KEY=e.CONTEXT_DEBUG_STATE=e.CONTEXT_DEBUG_CONFIGURATION_TYPE=e.CONTEXT_DEBUG_TYPE=e.CONTEXT_DEBUG_TYPE_KEY=e.CONTEXT_IN_DEBUG_MODE_KEY=e.CONTEXT_DEBUG_STOPPED_KEY=e.DEBUG_SCHEME=e.DEBUG_FLOATING_CLICK_WIDGET=e.DEBUG_STACK_ID=e.DEBUG_WELCOME_ID=e.DEBUG_BREAKPOINTS_ID=e.DEBUG_VARIABLES_ID=e.DEBUG_THREAD_ID=e.DEBUG_WATCH_ID=e.DEBUG_MEMORY_SCHEME=e.LAUNCH_VIEW_COMPONENT_ID=e.LAUNCH_VIEW_SCHEME=e.DEBUG_CONTAINER_ID=e.DEBUG_CONSOLE_CONTAINER_ID=void 0,e.CONTEXT_ACTIVE_BREAKPOINTS=e.CONTEXT_CAN_VIEW_MEMORY=e.CONTEXT_MULTI_SESSION_DEBUG=e.CONTEXT_MULTI_SESSION_REPL=e.CONTEXT_EXCEPTION_WIDGET_VISIBLE=e.CONTEXT_VARIABLE_EVALUATE_NAME_PRESENT=e.CONTEXT_BREAK_WHEN_VALUE_IS_READ_SUPPORTED=e.CONTEXT_BREAK_WHEN_VALUE_IS_ACCESSED_SUPPORTED=e.CONTEXT_BREAK_WHEN_VALUE_CHANGES_SUPPORTED=e.CONTEXT_SET_VARIABLE_SUPPORTED=e.CONTEXT_DEBUG_PROTOCOL_VARIABLE_MENU_CONTEXT=void 0;const n=t(30144);Object.defineProperty(e,"DEBUG_CONSOLE_CONTAINER_ID",{enumerable:!0,get:function(){return n.DEBUG_CONSOLE_CONTAINER_ID}}),Object.defineProperty(e,"DEBUG_CONTAINER_ID",{enumerable:!0,get:function(){return n.DEBUG_CONTAINER_ID}});const s=t(40191);e.LAUNCH_VIEW_SCHEME="launch_view_scheme",e.LAUNCH_VIEW_COMPONENT_ID="launch-view",e.DEBUG_MEMORY_SCHEME="vscode-debug-memory",e.DEBUG_WATCH_ID="debug-watch",e.DEBUG_THREAD_ID="debug-thread",e.DEBUG_VARIABLES_ID="debug-variable",e.DEBUG_BREAKPOINTS_ID="debug-breakpoints",e.DEBUG_WELCOME_ID="debug-welcome",e.DEBUG_STACK_ID="debug-stack",e.DEBUG_FLOATING_CLICK_WIDGET="debug.overlayWidget.floatingClickWidget",e.DEBUG_SCHEME="debug",e.CONTEXT_DEBUG_STOPPED_KEY="debugStopped",e.CONTEXT_IN_DEBUG_MODE_KEY="inDebugMode",e.CONTEXT_DEBUG_TYPE_KEY="debugType",e.CONTEXT_DEBUG_TYPE=new s.RawContextKey("debugType",void 0),e.CONTEXT_DEBUG_CONFIGURATION_TYPE=new s.RawContextKey("debugConfigurationType",void 0),e.CONTEXT_DEBUG_STATE=new s.RawContextKey("debugState","Inactive"),e.CONTEXT_DEBUG_UX_KEY="debugUx",e.CONTEXT_DEBUG_UX=new s.RawContextKey(e.CONTEXT_DEBUG_UX_KEY,"default"),e.CONTEXT_IN_DEBUG_MODE=new s.RawContextKey("inDebugMode",!1),e.CONTEXT_IN_DEBUG_REPL=new s.RawContextKey("inDebugRepl",!1),e.CONTEXT_IN_DEBUG_CONSOLE=new s.RawContextKey("inDebugConsole",!1),e.CONTEXT_BREAKPOINT_WIDGET_VISIBLE=new s.RawContextKey("breakpointWidgetVisible",!1),e.CONTEXT_IN_BREAKPOINT_WIDGET=new s.RawContextKey("inBreakpointWidget",!1),e.CONTEXT_BREAKPOINTS_FOCUSED=new s.RawContextKey("breakpointsFocused",!0),e.CONTEXT_WATCH_EXPRESSIONS_FOCUSED=new s.RawContextKey("watchExpressionsFocused",!0),e.CONTEXT_WATCH_EXPRESSIONS_EXIST=new s.RawContextKey("watchExpressionsExist",!1),e.CONTEXT_VARIABLES_FOCUSED=new s.RawContextKey("variablesFocused",!0),e.CONTEXT_EXPRESSION_SELECTED=new s.RawContextKey("expressionSelected",!1),e.CONTEXT_BREAKPOINT_INPUT_FOCUSED=new s.RawContextKey("breakpointInputFocused",!1),e.CONTEXT_CALLSTACK_ITEM_TYPE=new s.RawContextKey("callStackItemType",void 0),e.CONTEXT_CALLSTACK_SESSION_IS_ATTACH=new s.RawContextKey("callStackSessionIsAttach",!1),e.CONTEXT_CALLSTACK_ITEM_STOPPED=new s.RawContextKey("callStackItemStopped",!1),e.CONTEXT_CALLSTACK_SESSION_HAS_ONE_THREAD=new s.RawContextKey("callStackSessionHasOneThread",!1),e.CONTEXT_WATCH_ITEM_TYPE=new s.RawContextKey("watchItemType",void 0),e.CONTEXT_BREAKPOINT_ITEM_TYPE=new s.RawContextKey("breakpointItemType",void 0),e.CONTEXT_BREAKPOINT_ACCESS_TYPE=new s.RawContextKey("breakpointAccessType",void 0),e.CONTEXT_BREAKPOINT_SUPPORTS_CONDITION=new s.RawContextKey("breakpointSupportsCondition",!1),e.CONTEXT_LOADED_SCRIPTS_SUPPORTED=new s.RawContextKey("loadedScriptsSupported",!1),e.CONTEXT_LOADED_SCRIPTS_ITEM_TYPE=new s.RawContextKey("loadedScriptsItemType",void 0),e.CONTEXT_FOCUSED_SESSION_IS_ATTACH=new s.RawContextKey("focusedSessionIsAttach",!1),e.CONTEXT_STEP_BACK_SUPPORTED=new s.RawContextKey("stepBackSupported",!1),e.CONTEXT_RESTART_FRAME_SUPPORTED=new s.RawContextKey("restartFrameSupported",!1),e.CONTEXT_STACK_FRAME_SUPPORTS_RESTART=new s.RawContextKey("stackFrameSupportsRestart",!1),e.CONTEXT_JUMP_TO_CURSOR_SUPPORTED=new s.RawContextKey("jumpToCursorSupported",!1),e.CONTEXT_STEP_INTO_TARGETS_SUPPORTED=new s.RawContextKey("stepIntoTargetsSupported",!1),e.CONTEXT_BREAKPOINTS_EXIST=new s.RawContextKey("breakpointsExist",!1),e.CONTEXT_DEBUGGERS_AVAILABLE=new s.RawContextKey("debuggersAvailable",!1),e.CONTEXT_DEBUG_PROTOCOL_VARIABLE_MENU_CONTEXT=new s.RawContextKey("debugProtocolVariableMenuContext",void 0),e.CONTEXT_SET_VARIABLE_SUPPORTED=new s.RawContextKey("debugSetVariableSupported",!1),e.CONTEXT_BREAK_WHEN_VALUE_CHANGES_SUPPORTED=new s.RawContextKey("breakWhenValueChangesSupported",!1),e.CONTEXT_BREAK_WHEN_VALUE_IS_ACCESSED_SUPPORTED=new s.RawContextKey("breakWhenValueIsAccessedSupported",!1),e.CONTEXT_BREAK_WHEN_VALUE_IS_READ_SUPPORTED=new s.RawContextKey("breakWhenValueIsReadSupported",!1),e.CONTEXT_VARIABLE_EVALUATE_NAME_PRESENT=new s.RawContextKey("variableEvaluateNamePresent",!1),e.CONTEXT_EXCEPTION_WIDGET_VISIBLE=new s.RawContextKey("exceptionWidgetVisible",!1),e.CONTEXT_MULTI_SESSION_REPL=new s.RawContextKey("multiSessionRepl",!1),e.CONTEXT_MULTI_SESSION_DEBUG=new s.RawContextKey("multiSessionDebug",!1),e.CONTEXT_CAN_VIEW_MEMORY=new s.RawContextKey("canViewMemory",void 0),e.CONTEXT_ACTIVE_BREAKPOINTS=new s.RawContextKey("activateBreakpoints",!0)},95581:(x,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})},53670:(x,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MASSIVE_PROPERTY_FLAG=e.DEFAULT_CONFIGURATION_INDEX_SEPARATOR=e.DEFAULT_CONFIGURATION_NAME_SEPARATOR=e.DEFAULT_NO_CONFIGURATION_KEY=e.DEFAULT_DYNAMIC_CONFIGURATION_KEY=e.DEFAULT_EDIT_CONFIGURATION_KEY=e.DEFAULT_ADD_CONFIGURATION_KEY=e.DebugConfiguration=void 0;var t;(function(n){function s(o){return!!o&&typeof o=="object"&&"type"in o&&"name"in o&&"request"in o}n.is=s})(t||(e.DebugConfiguration=t={})),e.DEFAULT_ADD_CONFIGURATION_KEY="__ADD_CONF__",e.DEFAULT_EDIT_CONFIGURATION_KEY="__EDIT_CONF__",e.DEFAULT_DYNAMIC_CONFIGURATION_KEY="__DYNAMIC_CONF__",e.DEFAULT_NO_CONFIGURATION_KEY="__NO_CONF__",e.DEFAULT_CONFIGURATION_NAME_SEPARATOR="__CONF__",e.DEFAULT_CONFIGURATION_INDEX_SEPARATOR="__INDEX__",e.MASSIVE_PROPERTY_FLAG="massive_property_flag"},70049:(x,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IDebugConsoleModelService=void 0,e.IDebugConsoleModelService=Symbol("IDebugConsoleModelService")},24395:(x,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DebugEditor=void 0,e.DebugEditor=Symbol("DebugEditor")},2242:(x,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})},32385:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IDebugModelManager=e.DebugModelSupportedEventType=e.MemoryRegion=e.IDebugModel=e.DebugModelFactory=e.DebugAdapterContribution=e.DebugAdapterFactory=e.DebugAdapterSessionFactory=e.DebugAdapterSession=void 0;const n=t(43718);e.DebugAdapterSession=Symbol("DebugAdapterSession"),e.DebugAdapterSessionFactory=Symbol("DebugAdapterSessionFactory"),e.DebugAdapterFactory=Symbol("DebugAdapterFactory"),e.DebugAdapterContribution=Symbol("DebugAdapterContribution"),e.DebugModelFactory=Symbol("DebugModelFactory"),e.IDebugModel=Symbol("IDebugModel");class s extends n.Disposable{constructor(b,g){super(),this.memoryReference=b,this.session=g,this.invalidateEmitter=this.registerDispose(new n.Emitter),this.onDidInvalidate=this.invalidateEmitter.event,this.writable=!!this.session.capabilities.supportsWriteMemoryRequest,this.registerDispose(g.onDidInvalidateMemory(_=>{_.body.memoryReference===b&&this.invalidate(_.body.offset,_.body.count-_.body.offset)}))}async read(b,g){var _;const E=g-b,u=b,h=await this.session.readMemory(this.memoryReference,u,E);if(h===void 0||!(!((_=h.body)===null||_===void 0)&&_.data))return[{type:1,offset:u,length:E}];let c;try{c=(0,n.decodeBase64)(h.body.data)}catch(a){return[{type:2,offset:u,length:E,error:a.message}]}const r=h.body.unreadableBytes||0,l=E-r;if(c.byteLength<l){const a=n.BinaryBuffer.alloc(l-c.byteLength);a.buffer.fill(0),c=n.BinaryBuffer.concat([c,a],l)}else c.byteLength>l&&(c=c.slice(0,l));return r?[{type:0,offset:u,length:l,data:c},{type:1,offset:u+l,length:r}]:[{type:0,offset:u,length:E,data:c}]}async write(b,g){var _,E;const u=await this.session.writeMemory(this.memoryReference,b,(0,n.encodeBase64)(g),!0),h=(E=(_=u?.body)===null||_===void 0?void 0:_.bytesWritten)!==null&&E!==void 0?E:g.byteLength;return this.invalidate(b,b+h),h}dispose(){super.dispose()}invalidate(b,g){this.invalidateEmitter.fire({fromOffset:b,toOffset:g})}}e.MemoryRegion=s;var o;(function(f){f.down="Down",f.move="Move",f.leave="Leave",f.contextMenu="contextMenu"})(o||(e.DebugModelSupportedEventType=o={})),e.IDebugModelManager=Symbol("DebugModelManager")},79845:(x,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IDebugProgress=void 0,e.IDebugProgress=Symbol("DebugProgress")},60709:(x,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.JSON_SCHEMA_TYPE=e.launchDefaultSchemaUri=e.launchExtensionSchemaUri=e.launchSchemaUri=void 0,e.launchSchemaUri="vscode://schemas/launch",e.launchExtensionSchemaUri="vscode://schemas/launch/extension",e.launchDefaultSchemaUri="vscode://schemas/launch/default";var t;(function(n){n.ARRAY="array",n.BOOLEAN="boolean",n.NULL="null",n.NUMBER="number",n.OBJECT="object",n.STRING="string"})(t||(e.JSON_SCHEMA_TYPE=t={}))},70159:(x,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ILaunchService=e.IDebugService=e.IDebugServer=e.DebugAdapterPath=e.DebugConfigurationProviderTriggerKind=void 0;var t;(function(n){n[n.Initial=1]="Initial",n[n.Dynamic=2]="Dynamic"})(t||(e.DebugConfigurationProviderTriggerKind=t={})),e.DebugAdapterPath="DebugAdaptor",e.IDebugServer=Symbol("DebugServer"),e.IDebugService=Symbol("DebugService"),e.ILaunchService=Symbol("ILaunchService")},50883:(x,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IDebugSessionDTO=void 0;var t;(function(n){function s(o){return"id"in o}n.is=s})(t||(e.IDebugSessionDTO=t={}))},26296:(x,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IDebugSessionManager=e.IDebugSession=e.DebugState=void 0,e.getSequenceId=s;var t;(function(o){o[o.Inactive=0]="Inactive",o[o.Initializing=1]="Initializing",o[o.Running=2]="Running",o[o.Stopped=3]="Stopped"})(t||(e.DebugState=t={})),e.IDebugSession=Symbol("DebugSession"),e.IDebugSessionManager=Symbol("DebugSessionManager");let n=1;function s(){return n++}},64582:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});const n=t(85608);n.__exportStar(t(53670),e),n.__exportStar(t(70159),e),n.__exportStar(t(2242),e),n.__exportStar(t(95581),e),n.__exportStar(t(32385),e),n.__exportStar(t(26296),e),n.__exportStar(t(70049),e),n.__exportStar(t(50883),e),n.__exportStar(t(24395),e),n.__exportStar(t(79845),e),n.__exportStar(t(60709),e),n.__exportStar(t(7428),e),n.__exportStar(t(37723),e),n.__exportStar(t(4983),e),n.__exportStar(t(71120),e),n.__exportStar(t(46118),e)},7428:(x,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})},71120:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.isWindowsDriveLetter=s,e.hasDriveLetter=o,e.getDriveLetter=f,e.prepareCommand=b;const n=t(43718);function s(g){return g>=65&&g<=90||g>=97&&g<=122}function o(g,_=n.isWindows){return _?s(g.charCodeAt(0))&&g.charCodeAt(1)===58:!1}function f(g){return o(g)?g[0]:void 0}function b(g,_,E,u,h){g=g.trim().toLowerCase();let c;g.indexOf("powershell")>=0||g.indexOf("pwsh")>=0?c=1:g.indexOf("cmd.exe")>=0?c=0:g.indexOf("bash")>=0?c=2:n.isWindows?c=0:c=2;let r,l=" ";switch(c){case 1:if(r=a=>(a=a.replace(/'/g,"''"),a.length>0&&a.charAt(a.length-1)==="\\"?`'${a}\\'`:`'${a}'`),u){const a=f(u);a&&(l+=`${a}:; `),l+=`cd ${r(u)}; `}if(h)for(const a in h){const d=h[a];d===null?l+=`Remove-Item env:${a}; `:l+=`\${env:${a}}='${d}'; `}if(_.length>0){const a=_.shift(),d=E?a:r(a);l+=d[0]==="'"?`& ${d} `:`${d} `;for(const m of _)l+=m==="<"||m===">"||E?m:r(m),l+=" "}break;case 0:if(r=a=>(a=a.replace(/"/g,'""'),a=a.replace(/([><!^&|])/g,"^$1"),' "'.split("").some(d=>a.includes(d))||a.length===0?`"${a}"`:a),u){const a=f(u);a&&(l+=`${a}: && `),l+=`cd ${r(u)} && `}if(h){l+='cmd /C "';for(const a in h){let d=h[a];d===null?l+=`set "${a}=" && `:(d=d.replace(/[&^|<>]/g,m=>`^${m}`),l+=`set "${a}=${d}" && `)}}for(const a of _)l+=a==="<"||a===">"||E?a:r(a),l+=" ";h&&(l+='"');break;case 2:{r=d=>(d=d.replace(/(["'\\$!><#()[\]*&^| ;{}`])/g,"\\$1"),d.length===0?'""':d);const a=d=>/[^\w@%/+=,.:^-]/.test(d)?`'${d.replace(/'/g,"'\\''")}'`:d;if(u&&(l+=`cd ${r(u)} ; `),h){l+="/usr/bin/env";for(const d in h){const m=h[d];m===null?l+=` -u ${a(d)}`:l+=` ${a(`${d}=${m}`)}`}l+=" "}for(const d of _)l+=d==="<"||d===">"||E?d:r(d),l+=" ";break}}return l}},37723:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DebugConfigurationsReadyEvent=e.DEBUG_REPORT_NAME=void 0;const n=t(43718);var s;(function(f){f.DEBUG_SESSION_START_TIME="debugSessionStartTime",f.DEBUG_PRE_LAUNCH_TASK_TIME="debugPreLaunchTaskTime",f.DEBUG_TOOLBAR_OPERATION_TIME="debugToolBarOperationTime",f.DEBUG_TOOLBAR_OPERATION="debugToolBarOperation",f.DEBUG_PANEL_OPERATION_FOLDEXPR="debugPanelOperationFoldexpr",f.DEBUG_WATCH="debugWatch",f.DEBUG_VARIABLES="debugVariables",f.DEBUG_BREAKPOINT="debugBreakpoint",f.DEBUG_ADAPTER_PROTOCOL_TIME="debugAdapterProtocolTime",f.DEBUG_STOPPED="debugStopped",f.DEBUG_UI_FRONTEND_TIME="debugFrontEndTime"})(s||(e.DEBUG_REPORT_NAME=s={}));class o extends n.BasicEvent{}e.DebugConfigurationsReadyEvent=o},66482:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),t(85608).__exportStar(t(64582),e)},83670:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.FileDecorationsService=void 0;const n=t(85608),s=t(76003),o=t(43718),{isFalsyOrWhitespace:f}=o.strings,{asArray:b}=o.arrays;class g{constructor(){this._data=o.TernarySearchTree.forPaths()}affectsResource(l){return this._data.get(l.toString())||this._data.findSuperstr(l.toString())!==void 0}static debouncer(l,a){if(l||(l=new g),Array.isArray(a))for(const d of a)l._data.set(d.toString(),!0);else l._data.set(a.toString(),!0);return l}}class _{constructor(l,a){this.source=l,this.thenable=a}}class E{constructor(l,a,d){this._provider=l,this._uriEmitter=a,this._flushEmitter=d,this.data=o.TernarySearchTree.forPaths(),this._dispoable=this._provider.onDidChange(m=>{if(!m)this.data.clear(),this._flushEmitter.fire({affectsResource(){return!0}});else for(const p of m)this._fetchData(p)})}dispose(){this._dispoable.dispose(),this.data.clear()}knowsAbout(l){return!!this.data.get(l.toString())||!!this.data.findSuperstr(l.toString())}getOrRetrieve(l,a,d){const m=l.toString();let p=this.data.get(m);if(p===void 0&&(p=this._fetchData(l)),p&&!(p instanceof _)&&d(p,!1),a){const v=this.data.findSuperstr(m);if(v)for(let y=v.next();!y.done;y=v.next())y.value&&!(y.value instanceof _)&&d(y.value,!0)}}_fetchData(l){const a=this.data.get(l.toString());a instanceof _&&(a.source.cancel(),this.data.delete(l.toString()));const d=new o.CancellationTokenSource,m=this._provider.provideDecorations(l,d.token);if((0,o.isThenable)(m)){const p=new _(d,Promise.resolve(m).then(v=>{this.data.get(l.toString())===p&&this._keepItem(l,v)}).catch(v=>{!(0,o.isPromiseCanceledError)(v)&&this.data.get(l.toString())===p&&this.data.delete(l.toString())}));return this.data.set(l.toString(),p),null}else return this._keepItem(l,m)}_keepItem(l,a){const d=a||null,m=this.data.set(l.toString(),d);return(d||m)&&this._uriEmitter.fire(l),d}}function u(r){return b(r).map(({color:a,letter:d})=>`${a}/${d}`).join(",")}function h(r){const l=b(r);if(l.length)return{key:u(r),color:l[0].color,badge:l.filter(a=>!f(a.letter)).map(a=>a.letter).join(","),tooltip:l.filter(a=>!f(a.tooltip)).map(a=>a.tooltip).join(" \u2022 ")}}let c=class extends o.Disposable{constructor(){super(...arguments),this.logger=(0,o.getDebugLogger)(),this._data=new o.LinkedList,this._onDidChangeDecorationsDelayed=new o.Emitter,this._onDidChangeDecorations=new o.Emitter,this.onDidChangeDecorations=o.Event.any(this._onDidChangeDecorations.event,o.Event.debounce(this._onDidChangeDecorationsDelayed.event,g.debouncer,void 0,void 0,500))}dispose(){(0,o.dispose)(this._onDidChangeDecorations),(0,o.dispose)(this._onDidChangeDecorationsDelayed)}registerDecorationsProvider(l){this.logger.log("DecorationService#registerDecorationsProvider",l);const a=new E(l,this._onDidChangeDecorationsDelayed,this._onDidChangeDecorations),d=this._data.push(a);return this._onDidChangeDecorations.fire({affectsResource(){return!0}}),(0,o.toDisposable)(()=>{d(),this._onDidChangeDecorations.fire({affectsResource:m=>a.knowsAbout(m)}),a.dispose()})}getDecoration(l,a){const d=[];let m=!1;for(let p=this._data.iterator(),v=p.next();!v.done;v=p.next())v.value.getOrRetrieve(l,a,(y,S)=>{(!S||y.bubble)&&(d.push(y),m=S||m)});if(d.length!==0)return this.asDecoration(d,m)}asDecoration(l,a){l.sort((m,p)=>(p.weight||0)-(m.weight||0));const d=h(l);return d&&a&&(d.badge="\u2022",d.tooltip=(0,o.localize)("bubbleTitle","Contains emphasized items")),d}};e.FileDecorationsService=c,e.FileDecorationsService=c=n.__decorate([(0,s.Injectable)()],c)},4958:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DecorationModule=void 0;const n=t(85608),s=t(76003),o=t(41869),f=t(93364),b=t(83670);let g=class extends o.BrowserModule{constructor(){super(...arguments),this.providers=[{token:f.IDecorationsService,useClass:b.FileDecorationsService}]}};e.DecorationModule=g,e.DecorationModule=g=n.__decorate([(0,s.Injectable)()],g)},93364:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IDecorationsService=void 0;const n=t(43718);class s extends n.Disposable{}e.IDecorationsService=s},87323:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),t(85608).__exportStar(t(93364),e)},41893:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),t(85608).__exportStar(t(87323),e)},67988:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DesignCoreContribution=void 0;const n=t(85608),s=t(76003),o=t(41869),f=t(1149),b=t(43718),g=t(14951),_=t(2156),E=t(11090),u=t(37517);let h=class{initialize(){this.fileSystem.registerProvider(b.Schemes.design,this.designThemeFileSystemProvider),this.layoutViewSize.setEditorTabsHeight(36,f.ConfigPriority.ModuleDefined),this.layoutViewSize.setStatusBarHeight(36,f.ConfigPriority.ModuleDefined),this.layoutViewSize.setAccordionHeaderSizeHeight(36,f.ConfigPriority.ModuleDefined)}registerRenderer(r){r.registerSlotRenderer(o.SlotLocation.left,E.DesignLeftTabRenderer),r.registerSlotRenderer(o.SlotLocation.bottom,E.DesignBottomTabRenderer),r.registerSlotRenderer(o.SlotLocation.right,E.DesignRightTabRenderer)}};e.DesignCoreContribution=h,n.__decorate([(0,s.Autowired)(g.IFileServiceClient),n.__metadata("design:type",_.FileServiceClient)],h.prototype,"fileSystem",void 0),n.__decorate([(0,s.Autowired)(),n.__metadata("design:type",u.DesignThemeFileSystemProvider)],h.prototype,"designThemeFileSystemProvider",void 0),n.__decorate([(0,s.Autowired)(f.LayoutViewSizeConfig),n.__metadata("design:type",f.LayoutViewSizeConfig)],h.prototype,"layoutViewSize",void 0),e.DesignCoreContribution=h=n.__decorate([(0,s.Injectable)(),(0,o.Domain)(o.ClientAppContribution,o.SlotRendererContribution)],h)},17242:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DesignModule=void 0;const n=t(85608),s=t(76003),o=t(41869),f=t(71707),b=t(80832),g=t(97222),_=t(43718),E=t(57517),u=t(52416),h=t(51706),c=t(9132),r=t(67988),l=t(3013),a=t(31385),d=t(72141),m=t(45365),p=n.__importDefault(t(49107)),v=n.__importDefault(t(13925)),y=n.__importDefault(t(63080)),S=t(98741);let A=class extends o.BrowserModule{constructor(){super(...arguments),this.providers=[l.DesignMenuBarContribution,r.DesignCoreContribution],this.preferences=D=>{t.e(454).then(t.bind(t,77454)),D.get(b.IDesignStyleService).setStyles(p.default),(0,S.overrideColorToken)(),(0,S.overrideMonacoColorToken)();const I=D.get(_.AppLifeCycleServiceToken);_.Event.once(_.Event.filter(I.onDidLifeCyclePhaseChange,R=>R===3))(()=>{const R=D.get(u.IThemeService);[v.default,y.default].forEach(M=>{R.registerThemes([{id:M.id,label:M.name,path:"",extensionId:M.id,uiTheme:M.base}],o.URI.parse(`${M.id}.json`).withQuery(M.id).withScheme(_.Schemes.design))})}),D.overrideProviders({token:u.IThemeStore,useClass:class extends h.ThemeStore{async getThemeData(R,M){const O=await super.getThemeData(R,M);return document.body.classList.remove(y.default.designThemeType),document.body.classList.remove(v.default.designThemeType),v.default.id===R?.id?document.body.classList.add(v.default.designThemeType):y.default.id===R?.id&&document.body.classList.add(y.default.designThemeType),O}},override:!0,isDefault:!0},{token:u.IThemeService,useClass:class extends c.WorkbenchThemeService{async ensureValidTheme(){return super.ensureValidTheme(v.default.id)}},override:!0,isDefault:!0},{token:E.IEditorTabService,useClass:a.DesignEditorTabService,override:!0,isDefault:!0},{token:f.ISplitPanelService,useClass:m.DesignSplitPanelService,override:!0,isDefault:!0},{token:g.IBrowserCtxMenu,useClass:d.DesignBrowserCtxMenuService})}}};e.DesignModule=A,e.DesignModule=A=n.__decorate([(0,s.Injectable)()],A)},11090:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DesignRightTabRenderer=e.DesignBottomTabRenderer=e.DesignLeftTabRenderer=void 0;const n=t(85608),s=n.__importDefault(t(53373)),o=n.__importDefault(t(14041)),f=t(19951),b=({className:E,components:u,tabbarView:h})=>o.default.createElement(f.LeftTabRenderer,{className:(0,s.default)(E,"design_left_slot"),components:u,tabbarView:h});e.DesignLeftTabRenderer=b;const g=({className:E,components:u})=>o.default.createElement(f.BottomTabRenderer,{className:(0,s.default)(E,"design_bottom_slot"),components:u});e.DesignBottomTabRenderer=g;const _=({className:E,components:u,tabbarView:h,tabpanelView:c})=>o.default.createElement(f.RightTabRenderer,{className:(0,s.default)("design_right_slot",E),components:u,tabbarView:h,tabpanelView:c});e.DesignRightTabRenderer=_},3013:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DesignMenuBarContribution=void 0;const n=t(85608),s=t(76003),o=t(41869),f=t(93899),b=t(64267),g=t(38879),_=t(12458);let E=class extends o.Disposable{constructor(){super(),this.menubarStore.unregisterMenusBarByCompact(f.MenuId.DesignMenuBarTopExtra);let h;this.addDispose(this.menubarStore.onDidMenuBarChange(c=>{h&&h.dispose(),h=this.menuRegistry.registerMenuItems(f.MenuId.DesignMenuBarTopExtra,c.map(r=>({label:r.label,submenu:r.id,iconClass:r.iconClass,group:r.group||"1_navigation",order:r.order||100})))}))}registerComponent(h){h.register(g.DESIGN_MENUBAR_CONTAINER_VIEW_ID,{component:_.DesignMenuBarView,id:g.DESIGN_MENUBAR_CONTAINER_VIEW_ID})}};e.DesignMenuBarContribution=E,n.__decorate([(0,s.Autowired)(b.MenubarStore),n.__metadata("design:type",b.MenubarStore)],E.prototype,"menubarStore",void 0),n.__decorate([(0,s.Autowired)(f.IMenuRegistry),n.__metadata("design:type",f.IMenuRegistry)],E.prototype,"menuRegistry",void 0),e.DesignMenuBarContribution=E=n.__decorate([(0,o.Domain)(o.ComponentContribution),n.__metadata("design:paramtypes",[])],E)},12458:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DesignMenuBarView=void 0;const n=t(85608),s=n.__importDefault(t(53373)),o=n.__importStar(t(14041)),f=t(41869),b=t(81878),g=t(89195),_=t(1149),E=t(63373),u=t(93899),h=t(43718),c=t(63067),r=t(38879),l=n.__importDefault(t(52151)),a=n.__importDefault(t(90946)),d=()=>{const p=(0,f.useInjectable)(u.AbstractContextMenuService),v=(0,f.useInjectable)(_.DesignLayoutConfig),y=(0,f.useInjectable)(u.ICtxMenuRenderer),S=o.useRef(null),[A,T]=o.useState(void 0);o.useEffect(()=>{D()},[]);const D=o.useCallback(M=>{requestAnimationFrame(()=>{if(S.current){const O=S.current.getBoundingClientRect(),{x:P,y:L,width:N,height:k}=O,B={x:P,y:L+k};T(B),M&&M(B)}})},[S.current]),w=o.useMemo(()=>p.createMenu({id:u.MenuId.DesignMenuBarTopExtra}),[p]),I=o.useCallback(()=>{if(!A)return;const M=w.getMergedMenuNodes();w.dispose(),D(O=>{y.show({anchor:O,menuNodes:M})})},[A,w]),R=o.useMemo(()=>v.menubarLogo||l.default,[v.menubarLogo]);return o.createElement(o.Fragment,null,o.createElement(g.EnhanceIcon,{wrapperClassName:a.default.ai_enhance_menu,ref:S,onClick:I},o.createElement("div",{className:a.default.logo_container},o.createElement("img",{className:a.default.extra_top_icon,src:R,alt:""}),o.createElement(b.Icon,{className:(0,s.default)((0,f.getIcon)("down"),a.default.caret_icon)}))))},m=()=>{const p=(0,f.useInjectable)(h.CommandService),v=(0,f.useInjectable)(c.IMainLayoutService),y=(0,f.useInjectable)(f.AINativeConfigService),[S,A]=o.useState(!1);o.useEffect(()=>{requestAnimationFrame(()=>{A(D())});const I=v.getTabbarService(f.SlotLocation.left).onCurrentChange(({previousId:R,currentId:M})=>{R&&!M?A(!1):!R&&M&&A(!0)});return()=>{I.dispose()}},[]);const T=o.useCallback(()=>{p.executeCommand("main-layout.left-panel.toggle"),requestAnimationFrame(()=>{A(D())})},[]),D=o.useCallback(()=>!!v.getTabbarService(f.SlotLocation.left).currentContainerId.get(),[v]);return o.createElement("div",{id:E.VIEW_CONTAINERS.MENUBAR,className:a.default.menu_bar_view,style:{height:y.layoutViewSize.menubarHeight}},o.createElement("div",{className:a.default.container},o.createElement("div",{className:a.default.left},o.createElement(g.EnhanceIcon,{wrapperClassName:a.default.enhance_menu,icon:S?"left-nav-open":"left-nav-close",onClick:T}),o.createElement("span",{className:a.default.dividing}),o.createElement("div",{className:a.default.top_menus_bar},o.createElement(d,null)),o.createElement(f.SlotRenderer,{id:"design-menubar-left",slot:r.DESIGN_MENU_BAR_LEFT,flex:1})),o.createElement("div",{className:a.default.right},o.createElement(f.SlotRenderer,{id:"design-menubar-right",slot:r.DESIGN_MENU_BAR_RIGHT,flex:1}))))};e.DesignMenuBarView=m},31385:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DesignEditorTabService=void 0;const n=t(85608),s=n.__importDefault(t(53373)),o=n.__importStar(t(14041)),f=t(76003),b=t(81878),g=t(1149),_=t(43718),E=t(30612),u=n.__importDefault(t(49107)),h=r=>{const{children:l}=r,[a,d]=o.default.useState(!1),m=(0,o.useMemo)(()=>"editor-tab-close-"+(0,_.uuid)(6),[]),p=(0,o.useCallback)(()=>{d(!1)},[]),v=(0,o.useMemo)(()=>(0,_.formatLocalize)("editor.closeTab.title",_.isMacintosh?"\u2318W":"Ctrl+W"),[]);return o.default.createElement(b.Popover,{delay:1e3,position:b.PopoverPosition.bottom,id:m,title:v,onClickAction:p,display:a},o.default.createElement("span",{title:""},l))};let c=class extends E.EditorTabService{renderEditorTab(l,a){return o.default.createElement("div",{className:(0,s.default)({[u.default["design-editor_tab_block_container"]]:!0,[u.default.active]:a}),style:{height:this.layoutViewSize.editorTabsHeight}},l)}renderTabCloseComponent(l){return o.default.createElement(h,null,l)}};e.DesignEditorTabService=c,n.__decorate([(0,f.Autowired)(g.LayoutViewSizeConfig),n.__metadata("design:type",g.LayoutViewSizeConfig)],c.prototype,"layoutViewSize",void 0),e.DesignEditorTabService=c=n.__decorate([(0,f.Injectable)()],c)},72141:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DesignBrowserCtxMenuService=void 0;const n=t(85608),s=n.__importDefault(t(53373)),o=n.__importStar(t(14041)),f=t(76003),b=t(97267),g=t(41869),_=t(31388),E=t(52416),u=n.__importDefault(t(49107)),h=r=>{const l=(0,g.useInjectable)(E.IIconService),{data:a,disabled:d,hasSubmenu:m}=r,p=(0,o.useMemo)(()=>a.checked?o.default.createElement(b.Icon,{icon:"check"}):a.icon?o.default.createElement(b.Icon,{iconClass:a.icon}):null,[a]);return o.default.createElement("div",{className:(0,s.default)(u.default.menuAction__sub_menu_action_container,{[u.default.disabled]:d,[u.default.checked]:a.checked},a.className)},o.default.createElement("div",{className:u.default.icon},p),o.default.createElement("div",{className:u.default.label},a.label?(0,g.transformLabelWithCodicon)(g.strings.mnemonicButtonLabel(a.label,!0),{margin:"0 3px"},l?.fromString.bind(l)):""),o.default.createElement("div",{className:u.default.tip},a.keybinding?o.default.createElement("div",{className:u.default.shortcut},a.keybinding):null,m?o.default.createElement("div",{className:u.default.submenuIcon},o.default.createElement(b.Icon,{icon:"right-arrow"})):null,!a.keybinding&&!m&&a.extraDesc&&o.default.createElement("div",{className:u.default.extraDesc},a.extraDesc)))};let c=class extends _.BrowserCtxMenuService{renderSubMenuTitle(l,a){return o.default.createElement(h,{data:l,...a})}renderMenuItem(l,a){return o.default.createElement(h,{data:l,...a})}};e.DesignBrowserCtxMenuService=c,e.DesignBrowserCtxMenuService=c=n.__decorate([(0,f.Injectable)()],c)},45365:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DesignSplitPanelService=void 0;const n=t(71707);class s extends n.SplitPanelService{renderSplitPanel(f,b,g){return super.renderSplitPanel(f,b,g)}interceptProps(f){return f}}e.DesignSplitPanelService=s},13925:(x,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default={tokenColors:[{scope:["meta.embedded","source.groovy.embedded"],settings:{foreground:"#D4D4D4"}},{scope:"emphasis",settings:{fontStyle:"italic"}},{scope:"strong",settings:{fontStyle:"bold"}},{scope:"header",settings:{foreground:"#000080"}},{scope:"comment",settings:{foreground:"#6A9955"}},{scope:"constant.language",settings:{foreground:"#569cd6"}},{scope:["constant.numeric","variable.other.enummember","keyword.operator.plus.exponent","keyword.operator.minus.exponent"],settings:{foreground:"#b5cea8"}},{scope:"constant.regexp",settings:{foreground:"#646695"}},{scope:"entity.name.tag",settings:{foreground:"#569cd6"}},{scope:"entity.name.tag.css",settings:{foreground:"#d7ba7d"}},{scope:"entity.other.attribute-name",settings:{foreground:"#9cdcfe"}},{scope:["entity.other.attribute-name.class.css","entity.other.attribute-name.class.mixin.css","entity.other.attribute-name.id.css","entity.other.attribute-name.parent-selector.css","entity.other.attribute-name.pseudo-class.css","entity.other.attribute-name.pseudo-element.css","source.css.less entity.other.attribute-name.id","entity.other.attribute-name.scss"],settings:{foreground:"#d7ba7d"}},{scope:"invalid",settings:{foreground:"#f44747"}},{scope:"markup.underline",settings:{fontStyle:"underline"}},{scope:"markup.bold",settings:{fontStyle:"bold",foreground:"#569cd6"}},{scope:"markup.heading",settings:{fontStyle:"bold",foreground:"#569cd6"}},{scope:"markup.italic",settings:{fontStyle:"italic"}},{scope:"markup.inserted",settings:{foreground:"#b5cea8"}},{scope:"markup.deleted",settings:{foreground:"#ce9178"}},{scope:"markup.changed",settings:{foreground:"#569cd6"}},{scope:"punctuation.definition.quote.begin.markdown",settings:{foreground:"#6A9955"}},{scope:"punctuation.definition.list.begin.markdown",settings:{foreground:"#6796e6"}},{scope:"markup.inline.raw",settings:{foreground:"#ce9178"}},{name:"brackets of XML/HTML tags",scope:"punctuation.definition.tag",settings:{foreground:"#808080"}},{scope:["meta.preprocessor","entity.name.function.preprocessor"],settings:{foreground:"#569cd6"}},{scope:"meta.preprocessor.string",settings:{foreground:"#ce9178"}},{scope:"meta.preprocessor.numeric",settings:{foreground:"#b5cea8"}},{scope:"meta.structure.dictionary.key.python",settings:{foreground:"#9cdcfe"}},{scope:"meta.diff.header",settings:{foreground:"#569cd6"}},{scope:"storage",settings:{foreground:"#569cd6"}},{scope:"storage.type",settings:{foreground:"#569cd6"}},{scope:["storage.modifier","keyword.operator.noexcept"],settings:{foreground:"#569cd6"}},{scope:["string","meta.embedded.assembly"],settings:{foreground:"#ce9178"}},{scope:"string.tag",settings:{foreground:"#ce9178"}},{scope:"string.value",settings:{foreground:"#ce9178"}},{scope:"string.regexp",settings:{foreground:"#d16969"}},{name:"String interpolation",scope:["punctuation.definition.template-expression.begin","punctuation.definition.template-expression.end","punctuation.section.embedded"],settings:{foreground:"#569cd6"}},{name:"Reset JavaScript string interpolation expression",scope:["meta.template.expression"],settings:{foreground:"#d4d4d4"}},{scope:["support.type.vendored.property-name","support.type.property-name","variable.css","variable.scss","variable.other.less","source.coffee.embedded"],settings:{foreground:"#9cdcfe"}},{scope:"keyword",settings:{foreground:"#569cd6"}},{scope:"keyword.control",settings:{foreground:"#569cd6"}},{scope:"keyword.operator",settings:{foreground:"#d4d4d4"}},{scope:["keyword.operator.new","keyword.operator.expression","keyword.operator.cast","keyword.operator.sizeof","keyword.operator.alignof","keyword.operator.typeid","keyword.operator.alignas","keyword.operator.instanceof","keyword.operator.logical.python","keyword.operator.wordlike"],settings:{foreground:"#569cd6"}},{scope:"keyword.other.unit",settings:{foreground:"#b5cea8"}},{scope:["punctuation.section.embedded.begin.php","punctuation.section.embedded.end.php"],settings:{foreground:"#569cd6"}},{scope:"support.function.git-rebase",settings:{foreground:"#9cdcfe"}},{scope:"constant.sha.git-rebase",settings:{foreground:"#b5cea8"}},{name:"coloring of the Java import and package identifiers",scope:["storage.modifier.import.java","variable.language.wildcard.java","storage.modifier.package.java"],settings:{foreground:"#d4d4d4"}},{name:"this.self",scope:"variable.language",settings:{foreground:"#569cd6"}},{name:"Function declarations",scope:["entity.name.function","support.function","support.constant.handlebars","source.powershell variable.other.member","entity.name.operator.custom-literal"],settings:{foreground:"#DCDCAA"}},{name:"Types declaration and references",scope:["meta.return-type","support.class","support.type","entity.name.type","entity.name.namespace","entity.other.attribute","entity.name.scope-resolution","entity.name.class","storage.type.numeric.go","storage.type.byte.go","storage.type.boolean.go","storage.type.string.go","storage.type.uintptr.go","storage.type.error.go","storage.type.rune.go","storage.type.cs","storage.type.generic.cs","storage.type.modifier.cs","storage.type.variable.cs","storage.type.annotation.java","storage.type.generic.java","storage.type.java","storage.type.object.array.java","storage.type.primitive.array.java","storage.type.primitive.java","storage.type.token.java","storage.type.groovy","storage.type.annotation.groovy","storage.type.parameters.groovy","storage.type.generic.groovy","storage.type.object.array.groovy","storage.type.primitive.array.groovy","storage.type.primitive.groovy"],settings:{foreground:"#4EC9B0"}},{name:"Types declaration and references, TS grammar specific",scope:["meta.type.cast.expr","meta.type.new.expr","support.constant.math","support.constant.dom","support.constant.json","entity.other.inherited-class"],settings:{foreground:"#4EC9B0"}},{name:"Control flow / Special keywords",scope:["keyword.control","source.cpp keyword.operator.new","keyword.operator.delete","keyword.other.using","keyword.other.operator","entity.name.operator"],settings:{foreground:"#C586C0"}},{name:"Variable and parameter name",scope:["variable","meta.definition.variable.name","support.variable","entity.nam1e.variable","constant.other.placeholder"],settings:{foreground:"#9CDCFE"}},{name:"Constants and enums",scope:["variable.other.constant","variable.other.enummember"],settings:{foreground:"#4FC1FF"}},{name:"Object keys, TS grammar specific",scope:["meta.object-literal.key"],settings:{foreground:"#9CDCFE"}},{name:"CSS property value",scope:["support.constant.property-value","support.constant.font-name","support.constant.media-type","support.constant.media","constant.other.color.rgb-value","constant.other.rgb-value","support.constant.color"],settings:{foreground:"#CE9178"}},{name:"Regular expression groups",scope:["punctuation.definition.group.regexp","punctuation.definition.group.assertion.regexp","punctuation.definition.character-class.regexp","punctuation.character.set.begin.regexp","punctuation.character.set.end.regexp","keyword.operator.negation.regexp","support.other.parenthesis.regexp"],settings:{foreground:"#CE9178"}},{scope:["constant.character.character-class.regexp","constant.other.character-class.set.regexp","constant.other.character-class.regexp","constant.character.set.regexp"],settings:{foreground:"#d16969"}},{scope:["keyword.operator.or.regexp","keyword.control.anchor.regexp"],settings:{foreground:"#DCDCAA"}},{scope:"keyword.operator.quantifier.regexp",settings:{foreground:"#d7ba7d"}},{scope:"constant.character",settings:{foreground:"#569cd6"}},{scope:"constant.character.escape",settings:{foreground:"#d7ba7d"}},{scope:"entity.name.label",settings:{foreground:"#C8C8C8"}}],colors:{"activityBar.activeBorder":"#ffffff1f","activityBar.activeForeground":"#FFFFFF","activityBar.background":"#00000000","activityBar.border":"#252729","activityBar.disableForeground":"#5F656B","activityBar.dropBackground":"#43484D","activityBar.foreground":"#fff","activityBar.inactiveForeground":"#ffffff73","activityBarBadge.background":"#167CDB","activityBarBadge.foreground":"#FFFFFF","badge.background":"#FFFFFF40","badge.foreground":"#D7DBDE","breadcrumb.background":"#222830","breadcrumb.foreground":"#ffffff73","checkbox.background":"#ffffff14","checkbox.border":"#ffffff1f",descriptionForeground:"#868C91","diffEditor.insertedTextBackground":"#12A7A740","editorGroup.border":"#43484D","editorGroup.dropBackground":"#5F656B40","editorGroup.emptyBackground":"#00000000","editorGroupHeader.tabsBackground":"#222830","editorSuggestWidget.selectedBackground":"#1A66AC",errorForeground:"#D21F28",focusBorder:"#ffffff1f",foreground:"#D7DBDE","editorCommentsWidget.unresolvedBorder":"#ffffff","gitDecoration.addedResourceForeground":"#8FD460","gitDecoration.conflictingResourceForeground":"#7F9EF3","gitDecoration.deletedResourceForeground":"#F3956A","gitDecoration.ignoredResourceForeground":"#BBC0C4","gitDecoration.modifiedResourceForeground":"#F3CC62","gitDecoration.submoduleResourceForeground":"#67ABEB","gitDecoration.untrackedResourceForeground":"#58D1C9","icon.foreground":"#D7DBDE","input.background":"#ffffff14","input.foreground":"#d7dbde","input.placeholderForeground":"#ffffff59","inputDropdown.searchMatchForeground":"#3895EB","inputIcon.foreground":"#5F656B","inputValidation.errorBackground":"#321115","inputValidation.errorBorder":"#D21F28","inputValidation.errorForeground":"#D7DBDE","inputValidation.errorText":"#D21F28","inputValidation.warningBackground":"#332510","inputValidation.warningBorder":"#DBA936","inputValidation.warningText":"#DBA936","inputValidation.warningForeground":"#d7dbde","keybinding.background":"#5F656B33","kt.accentForeground":"#FFFFFF","kt.actionbar.disableForeground":"#5F656B","kt.actionbar.foreground":"#D7DBDE","kt.actionbar.selectionBorder":"#1A66AC","kt.actionbar.separatorBackground":"#5F656B40","kt.activityBar.dropUpBackground":"#1F507D","kt.button.disableBackground":"#5F656B40","kt.button.disableBorder":"#5F656B80","kt.button.disableForeground":"#5F656B","kt.checkbox.disableBackground":"#5F656B40","kt.checkbox.disableForeground":"#5F656B","kt.checkbox.hoverBorder":"#167CDB","kt.checkbox.selectionBackground":"#167CDB","kt.checkbox.selectionForeground":"#FFFFFF","kt.dangerButton.background":"#DB4345","kt.dangerButton.clickBackground":"#D21F28","kt.dangerButton.foreground":"#FFFFFF","kt.dangerButton.hoverBackground":"#F37370","kt.dangerGhostButton.border":"#DB4345","kt.dangerGhostButton.clickBorder":"#D21F28","kt.dangerGhostButton.clickForeground":"#D21F28","kt.dangerGhostButton.foreground":"#DB4345","kt.dangerGhostButton.hoverBorder":"#F37370","kt.dangerGhostButton.hoverForeground":"#F37370","kt.defaultButton.background":"#ffffff14","kt.defaultButton.border":"#00000000","kt.defaultButton.clickBackground":"#ffffff14","kt.defaultButton.clickBorder":"#00000000","kt.defaultButton.disableBackground":"#ffffff14","kt.defaultButton.disableBorder":"#00000000","kt.defaultButton.disableForeground":"#ffffff40","kt.defaultButton.foreground":"#D7DBDE","kt.defaultButton.hoverBackground":"#ffffff29","kt.defaultButton.hoverBorder":"#00000000","kt.defaultButton.selectionBackground":"#ffffff29","kt.defaultButton.selectionForeground":"#fff","kt.dirtyDot.foreground":"#868C91","kt.disableForeground":"#5F656B","kt.editorBreadcrumb.borderDown":"#e9e9e914","kt.errorBackground":"#D21F2840","kt.errorIconForeground":"#DB4345","kt.hintBackground":"#5F656B40","kt.hintIconForeground":"#868C91","kt.icon.clickForeground":"#D7DBDE","kt.icon.disableForeground":"#5F656B","kt.icon.foreground":"#ffffff73","kt.icon.hoverBackground":"#ffffff14","kt.icon.hoverForeground":"#D7DBDE","kt.icon.secondaryForeground":"#868C91","kt.infoBackground":"#167CDB40","kt.infoIconForeground":"#3895EB","kt.input.border":"#00000000","kt.input.disableBackground":"#5F656B40","kt.input.disableForeground":"#ffffff40","kt.input.selectionBackground":"#1A66AC","kt.linkButton.clickForeground":"#167CDB","kt.linkButton.disableForeground":"#5F656B","kt.linkButton.foreground":"#3895EB","kt.linkButton.hoverForeground":"#67ABEB","kt.menu.descriptionForeground":"#868C91","kt.menu.disableForeground":"#5F656B","kt.menubar.background":"#00000000","kt.menubar.border":"#252729","kt.menubar.foreground":"#D7DBDE","kt.menubar.separatorBackground":"#5F656B40","kt.modal.background":"#222830","kt.modal.foreground":"#D7DBDE","kt.modal.separatorBackground":"#2C3033","kt.modalErrorIcon.foreground":"#DB4345","kt.modalInfoIcon.foreground":"#3895EB","kt.modalSuccessIcon.foreground":"#64B436","kt.modalWarningIcon.foreground":"#DBA936","kt.panel.secondaryForeground":"#868C91","kt.panelTab.activeBackground":"#151b21","kt.panelTab.activeForeground":"#FFFFFF","kt.panelTab.border":"#ffffff1f","kt.panelTab.inactiveBackground":"#00000000","kt.panelTab.inactiveForeground":"#D7DBDE","kt.panelTitle.background":"#222830","kt.popover.background":"#2b333d","kt.popover.border":"#363940","kt.popover.foreground":"#fffffff2","kt.popover.prominentBackground":"#2C3033","kt.primaryButton.background":"#3c8dff","kt.primaryButton.clickBackground":"#3c8dffa6","kt.primaryButton.foreground":"#fff","kt.primaryButton.hoverBackground":"#3c8dffa6","kt.primaryButton.border":"#00000000","kt.primaryGhostButton.clickBorder":"#3c8dff","kt.primaryGhostButton.clickForeground":"#167CDB","kt.primaryGhostButton.clickBackground":"#00000000","kt.primaryGhostButton.foreground":"#3895EB","kt.primaryGhostButton.border":"#3c8dff","kt.primaryGhostButton.background":"#00000000","kt.secondaryButton.border":"#5F656B","kt.secondaryButton.clickBorder":"#167CDB","kt.secondaryButton.clickForeground":"#167CDB","kt.secondaryButton.foreground":"#D7DBDE","kt.secondaryButton.hoverBorder":"#3895EB","kt.secondaryButton.hoverForeground":"#3895EB","kt.secondaryButton.background":"#00000000","kt.select.background":"#ffffff14","kt.select.border":"#00000000","kt.select.disableBackground":"#5F656B40","kt.select.disableForeground":"#5F656B","kt.select.foreground":"#D7DBDE","kt.select.placeholderForeground":"#5F656B","kt.selectDropdown.background":"#222830","kt.selectDropdown.foreground":"#D7DBDE","kt.selectDropdown.hoverBackground":"#ffffff14","kt.selectDropdown.selectionBackground":"#ffffff14","kt.selectOption.activeBorder":"#167CDB","kt.statusbar.offline.background":"#DB4345","kt.successBackground":"#48A91840","kt.successIconForeground":"#64B436","kt.tab.activeBorder":"#167CDB","kt.tab.activeForeground":"#FFFFFF","kt.tab.borderDown":"#5F656B40","kt.tab.inactiveForeground":"#D7DBDE","kt.tree.activeSelectionBackground":"#1A66AC","kt.tree.activeSelectionForeground":"#FFFFFF","kt.tree.hoverBackground":"#5F656B40","kt.tree.hoverForeground":"#D7DBDE","kt.tree.inactiveSelectionBackground":"#ffffff1f","kt.tree.inactiveSelectionForeground":"#fff","kt.warningBackground":"#D7951340","kt.warningIconForeground":"#DBA936","kt.whiteGhostButton.border":"#FFFFFF","kt.whiteGhostButton.clickBorder":"#FFFFFFA6","kt.whiteGhostButton.clickForeground":"#FFFFFFA6","kt.whiteGhostButton.disableBackground":"#FFFFFF03","kt.whiteGhostButton.disableBorder":"#FFFFFF40","kt.whiteGhostButton.disableForeground":"#FFFFFF40","kt.whiteGhostButton.foreground":"#FFFFFF","list.activeSelectionBackground":"#1A66AC","list.activeSelectionForeground":"#e1e4e8","list.evenItemBackground":"#5F656B14","list.headerBackground":"#5F656B1F","list.hoverBackground":"#5F656B40","menu.background":"#222830d9","menu.foreground":"#D7DBDE","menu.selectionBackground":"#5F656B40","menu.selectionForeground":"#FFFFFF","menu.separatorBackground":"#43484D","menubar.selectionBackground":"#5f656b40","menubar.selectionForeground":"#FFFFFF","message.background":"#222830","message.foreground":"#D7DBDE","messageErrorIcon.foreground":"#DB4345","messageInfoIcon.foreground":"#3895EB","messageSuccessIcon.foreground":"#64B436","messageWarningIcon.foreground":"#DBA936","notifications.background":"#222830","notifications.foreground":"#D7DBDE","notificationsErrorIcon.foreground":"#DB4345","notificationsInfoIcon.foreground":"#3895EB","notificationsWarningIcon.foreground":"#DBA936","panel.background":"#151b21","panel.border":"#43484D","panel.foreground":"#D7DBDE","panel.selectionBackground":"#5F656B40","panel.separatorBackground":"#2C3033","panelMenuBadge.background":"#00000040","panelMenuBar.background":"#2C3033","panelMenuBarBadge.foreground":"#5F656B40","panelTabBarActionIcon.Background":"#868C91","panelTabBarError.foreground":"#DB4345","panelTitle.activeBorder":"#167CDB","panelTitle.activeForeground":"#FFFFFF","panelTitle.hoverForeground":"#FFFFFF","panelTitle.inactiveForeground":"#ffffff73","selectDropdown.descriptionForeground":"#868C91","selectDropdown.teamForeground":"#868C91","sideBar.background":"#00000000","sideBar.border":"#ffffff1f","sideBar.dropBackground":"#43484D","sideBar.dropUpBackground":"#1F507D","sideBarSectionHeader.background":"#00000000","sideBarSectionHeader.foreground":"#ffffffa6","sideBarTitle.foreground":"#FFFFFF","statusBar.background":"#00000000","statusBar.debuggingBackground":"#D77915","statusBar.foreground":"#ffffff73","statusBar.noFolderBackground":"#43484D","statusBarItem.activeBackground":"#FFFFFF40","statusBarItem.hoverBackground":"#FFFFFF03","statusBarItem.remoteBackground":"#3c8dff","statusBarItem.prominentForeground":"#d2d2d2a6","statusBarItem.prominentBackground":"#2a2a2a80","tab.activeBackground":"#151b21","tab.activeForeground":"#FFFFFF","tab.border":"#e9e9e914","tab.inactiveBackground":"#00000000","tab.inactiveForeground":"#ffffff73","tab.hoverBackground":"#00000000","tab.unfocusedActiveBackground":"#202224","tab.unfocusedActiveForeground":"#868C91","tab.unfocusedInactiveForeground":"#868C91","terminal.background":"#151b21","terminal.border":"#252729","terminal.foreground":"#D7DBDE","terminal.offlineBackground":"#D21F2840","terminal.offlineForeground":"#868C91","terminal.offlineLinkForeground":"#3895EB","terminal.selectionBackground":"#5F656B40","tooltip.background":"#35393D","tooltip.foreground":"#D7DBDE","widget.shadow":"#00000099","list.focusOutline":"#00000000","editorInlayHint.parameterBackground":"#00000000","button.background":"#ffffff14","scrollbarSlider.background":"#ffffff14","editor.background":"#181818","quickInput.background":"#222830","list.focusBackground":"#ffffff1f","textLink.foreground":"#3c8dff","editorStickyScroll.background":"#151b21"},semanticHighlighting:!0,semanticTokenColors:{newOperator:"#d4d4d4",stringLiteral:"#ce9178",customLiteral:"#D4D4D4",numberLiteral:"#b5cea8"},encodedTokensColors:[],rules:[],base:"vs-dark",designThemeType:"design-dark",inherit:!0,hasDefaultTokens:!1,id:"opensumi-design-dark-theme",name:"OpenSumi Design Dark+ (default dark)"}},37517:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DesignThemeFileSystemProvider=void 0;const n=t(85608),s=t(76003),o=t(43718),f=n.__importDefault(t(13925)),b=n.__importDefault(t(63080));let g=class{constructor(){this.capabilities=2048,this.onDidChangeCapabilities=o.Event.None,this.onDidChangeFile=o.Event.None}stat(E){return Promise.resolve({type:o.FileType.File,uri:E.toString(),lastModification:Date.now(),isDirectory:!1})}async readFile(E){const{query:u}=E;return f.default.id===u?this.toBuffer(JSON.stringify(f.default)):this.toBuffer(JSON.stringify(b.default))}toBuffer(E){return o.BinaryBuffer.fromString(E).buffer}readDirectory(){throw new Error("Not allowed")}createDirectory(){throw new Error("Not allowed")}rename(){throw new Error("Not allowed")}delete(){throw new Error("Not allowed")}watch(){throw new Error("Not allowed")}writeFile(){throw new Error("Not allowed")}};e.DesignThemeFileSystemProvider=g,e.DesignThemeFileSystemProvider=g=n.__decorate([(0,s.Injectable)()],g)},63080:(x,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default={tokenColors:[{scope:["meta.embedded","source.groovy.embedded"],settings:{foreground:"#000000ff"}},{scope:"emphasis",settings:{fontStyle:"italic"}},{scope:"strong",settings:{fontStyle:"bold"}},{scope:"meta.diff.header",settings:{foreground:"#000080"}},{scope:"comment",settings:{foreground:"#008000"}},{scope:"constant.language",settings:{foreground:"#0000ff"}},{scope:["constant.numeric","variable.other.enummember","keyword.operator.plus.exponent","keyword.operator.minus.exponent"],settings:{foreground:"#098658"}},{scope:"constant.regexp",settings:{foreground:"#811f3f"}},{name:"css tags in selectors, xml tags",scope:"entity.name.tag",settings:{foreground:"#800000"}},{scope:"entity.name.selector",settings:{foreground:"#800000"}},{scope:"entity.other.attribute-name",settings:{foreground:"#ff0000"}},{scope:["entity.other.attribute-name.class.css","entity.other.attribute-name.class.mixin.css","entity.other.attribute-name.id.css","entity.other.attribute-name.parent-selector.css","entity.other.attribute-name.pseudo-class.css","entity.other.attribute-name.pseudo-element.css","source.css.less entity.other.attribute-name.id","entity.other.attribute-name.scss"],settings:{foreground:"#800000"}},{scope:"invalid",settings:{foreground:"#cd3131"}},{scope:"markup.underline",settings:{fontStyle:"underline"}},{scope:"markup.bold",settings:{fontStyle:"bold",foreground:"#000080"}},{scope:"markup.heading",settings:{fontStyle:"bold",foreground:"#800000"}},{scope:"markup.italic",settings:{fontStyle:"italic"}},{scope:"markup.inserted",settings:{foreground:"#098658"}},{scope:"markup.deleted",settings:{foreground:"#a31515"}},{scope:"markup.changed",settings:{foreground:"#0451a5"}},{scope:["punctuation.definition.quote.begin.markdown","punctuation.definition.list.begin.markdown"],settings:{foreground:"#0451a5"}},{scope:"markup.inline.raw",settings:{foreground:"#800000"}},{name:"brackets of XML/HTML tags",scope:"punctuation.definition.tag",settings:{foreground:"#800000"}},{scope:["meta.preprocessor","entity.name.function.preprocessor"],settings:{foreground:"#0000ff"}},{scope:"meta.preprocessor.string",settings:{foreground:"#a31515"}},{scope:"meta.preprocessor.numeric",settings:{foreground:"#098658"}},{scope:"meta.structure.dictionary.key.python",settings:{foreground:"#0451a5"}},{scope:"storage",settings:{foreground:"#0000ff"}},{scope:"storage.type",settings:{foreground:"#0000ff"}},{scope:["storage.modifier","keyword.operator.noexcept"],settings:{foreground:"#0000ff"}},{scope:["string","meta.embedded.assembly"],settings:{foreground:"#a31515"}},{scope:["string.comment.buffered.block.pug","string.quoted.pug","string.interpolated.pug","string.unquoted.plain.in.yaml","string.unquoted.plain.out.yaml","string.unquoted.block.yaml","string.quoted.single.yaml","string.quoted.double.xml","string.quoted.single.xml","string.unquoted.cdata.xml","string.quoted.double.html","string.quoted.single.html","string.unquoted.html","string.quoted.single.handlebars","string.quoted.double.handlebars"],settings:{foreground:"#0000ff"}},{scope:"string.regexp",settings:{foreground:"#811f3f"}},{name:"String interpolation",scope:["punctuation.definition.template-expression.begin","punctuation.definition.template-expression.end","punctuation.section.embedded"],settings:{foreground:"#0000ff"}},{name:"Reset JavaScript string interpolation expression",scope:["meta.template.expression"],settings:{foreground:"#000000"}},{scope:["support.constant.property-value","support.constant.font-name","support.constant.media-type","support.constant.media","constant.other.color.rgb-value","constant.other.rgb-value","support.constant.color"],settings:{foreground:"#0451a5"}},{scope:["support.type.vendored.property-name","support.type.property-name","variable.css","variable.scss","variable.other.less","source.coffee.embedded"],settings:{foreground:"#ff0000"}},{scope:["support.type.property-name.json"],settings:{foreground:"#0451a5"}},{scope:"keyword",settings:{foreground:"#0000ff"}},{scope:"keyword.control",settings:{foreground:"#0000ff"}},{scope:"keyword.operator",settings:{foreground:"#000000"}},{scope:["keyword.operator.new","keyword.operator.expression","keyword.operator.cast","keyword.operator.sizeof","keyword.operator.alignof","keyword.operator.typeid","keyword.operator.alignas","keyword.operator.instanceof","keyword.operator.logical.python","keyword.operator.wordlike"],settings:{foreground:"#0000ff"}},{scope:"keyword.other.unit",settings:{foreground:"#098658"}},{scope:["punctuation.section.embedded.begin.php","punctuation.section.embedded.end.php"],settings:{foreground:"#800000"}},{scope:"support.function.git-rebase",settings:{foreground:"#0451a5"}},{scope:"constant.sha.git-rebase",settings:{foreground:"#098658"}},{name:"coloring of the Java import and package identifiers",scope:["storage.modifier.import.java","variable.language.wildcard.java","storage.modifier.package.java"],settings:{foreground:"#000000"}},{name:"this.self",scope:"variable.language",settings:{foreground:"#0000ff"}},{name:"Function declarations",scope:["entity.name.function","support.function","support.constant.handlebars","source.powershell variable.other.member","entity.name.operator.custom-literal"],settings:{foreground:"#795E26"}},{name:"Types declaration and references",scope:["meta.return-type","support.class","support.type","entity.name.type","entity.name.namespace","entity.other.attribute","entity.name.scope-resolution","entity.name.class","storage.type.numeric.go","storage.type.byte.go","storage.type.boolean.go","storage.type.string.go","storage.type.uintptr.go","storage.type.error.go","storage.type.rune.go","storage.type.cs","storage.type.generic.cs","storage.type.modifier.cs","storage.type.variable.cs","storage.type.annotation.java","storage.type.generic.java","storage.type.java","storage.type.object.array.java","storage.type.primitive.array.java","storage.type.primitive.java","storage.type.token.java","storage.type.groovy","storage.type.annotation.groovy","storage.type.parameters.groovy","storage.type.generic.groovy","storage.type.object.array.groovy","storage.type.primitive.array.groovy","storage.type.primitive.groovy"],settings:{foreground:"#267f99"}},{name:"Types declaration and references, TS grammar specific",scope:["meta.type.cast.expr","meta.type.new.expr","support.constant.math","support.constant.dom","support.constant.json","entity.other.inherited-class"],settings:{foreground:"#267f99"}},{name:"Control flow / Special keywords",scope:["keyword.control","source.cpp keyword.operator.new","source.cpp keyword.operator.delete","keyword.other.using","keyword.other.operator","entity.name.operator"],settings:{foreground:"#AF00DB"}},{name:"Variable and parameter name",scope:["variable","meta.definition.variable.name","support.variable","entity.name.variable","constant.other.placeholder"],settings:{foreground:"#001080"}},{name:"Constants and enums",scope:["variable.other.constant","variable.other.enummember"],settings:{foreground:"#0070C1"}},{name:"Object keys, TS grammar specific",scope:["meta.object-literal.key"],settings:{foreground:"#001080"}},{name:"CSS property value",scope:["support.constant.property-value","support.constant.font-name","support.constant.media-type","support.constant.media","constant.other.color.rgb-value","constant.other.rgb-value","support.constant.color"],settings:{foreground:"#0451a5"}},{name:"Regular expression groups",scope:["punctuation.definition.group.regexp","punctuation.definition.group.assertion.regexp","punctuation.definition.character-class.regexp","punctuation.character.set.begin.regexp","punctuation.character.set.end.regexp","keyword.operator.negation.regexp","support.other.parenthesis.regexp"],settings:{foreground:"#d16969"}},{scope:["constant.character.character-class.regexp","constant.other.character-class.set.regexp","constant.other.character-class.regexp","constant.character.set.regexp"],settings:{foreground:"#811f3f"}},{scope:"keyword.operator.quantifier.regexp",settings:{foreground:"#000000"}},{scope:["keyword.operator.or.regexp","keyword.control.anchor.regexp"],settings:{foreground:"#EE0000"}},{scope:"constant.character",settings:{foreground:"#0000ff"}},{scope:"constant.character.escape",settings:{foreground:"#EE0000"}},{scope:"entity.name.label",settings:{foreground:"#000000"}}],colors:{"activityBar.activeBorder":"#151b2114","activityBar.activeForeground":"#FFFFFF","activityBar.background":"#00000000","activityBar.border":"#252729","activityBar.disableForeground":"#5F656B","activityBar.dropBackground":"#43484D","activityBar.foreground":"#151b21","activityBar.inactiveForeground":"#151b21a6","activityBarBadge.background":"#3C8DFF","activityBarBadge.foreground":"#FFFFFF","badge.background":"#151b5814","badge.foreground":"#151b21a6","breadcrumb.background":"#fff","breadcrumb.foreground":"#5d646c","checkbox.background":"#fff","checkbox.border":"#151b2129",descriptionForeground:"#151b21a6","diffEditor.insertedTextBackground":"#12A7A740","editorGroup.border":"#151b2133","editorGroup.dropBackground":"#5F656B40","editorGroup.emptyBackground":"#ffffff","editorGroupHeader.tabsBackground":"#DDE8F4","editorSuggestWidget.selectedBackground":"#6eb6fa40",errorForeground:"#D21F28",focusBorder:"#151b2129",foreground:"#151b21d9","editorCommentsWidget.unresolvedBorder":"#4d9ded","gitDecoration.addedResourceForeground":"#52c41a","gitDecoration.modifiedResourceForeground":"#faad14","gitDecoration.deletedResourceForeground":"#fa541c","gitDecoration.untrackedResourceForeground":"#13c2c2","gitDecoration.ignoredResourceForeground":"#666666","gitDecoration.conflictingResourceForeground":"#ff0000","gitDecoration.submoduleResourceForeground":"#1785eb","icon.foreground":"#151b21d9","input.background":"#fff","input.foreground":"#151b21","input.placeholderForeground":"#151b2173","inputDropdown.searchMatchForeground":"#3895EB","inputIcon.foreground":"#5F656B","inputValidation.errorBackground":"#321115","inputValidation.errorBorder":"#D21F28","inputValidation.errorForeground":"#D7DBDE","inputValidation.errorText":"#D21F28","inputValidation.warningBackground":"#fff","inputValidation.warningBorder":"#DBA936","inputValidation.warningText":"#DBA936","inputValidation.warningForeground":"#151b21","keybinding.background":"#5F656B33","kt.accentForeground":"#FFFFFF","kt.actionbar.disableForeground":"#5F656B","kt.actionbar.foreground":"#151b21a6","kt.actionbar.selectionBorder":"#1A66AC","kt.actionbar.separatorBackground":"#5F656B40","kt.activityBar.dropUpBackground":"#1F507D","kt.button.disableBackground":"#151b210a","kt.button.disableBorder":"#151b2114","kt.button.disableForeground":"#151b2159","kt.checkbox.disableBackground":"#5F656B40","kt.checkbox.disableForeground":"#5F656B","kt.checkbox.hoverBorder":"#167CDB","kt.checkbox.selectionBackground":"#167CDB","kt.checkbox.selectionForeground":"#FFFFFF","kt.dangerButton.background":"#DB4345","kt.dangerButton.clickBackground":"#D21F28","kt.dangerButton.foreground":"#FFFFFF","kt.dangerButton.hoverBackground":"#F37370","kt.dangerGhostButton.border":"#DB4345","kt.dangerGhostButton.clickBorder":"#D21F28","kt.dangerGhostButton.clickForeground":"#D21F28","kt.dangerGhostButton.foreground":"#DB4345","kt.dangerGhostButton.hoverBorder":"#F37370","kt.dangerGhostButton.hoverForeground":"#F37370","kt.dirtyDot.foreground":"#868C91","kt.disableForeground":"#5F656B","kt.editorBreadcrumb.borderDown":"#e9e9e914","kt.errorBackground":"#D21F2840","kt.errorIconForeground":"#DB4345","kt.hintBackground":"#5F656B40","kt.hintIconForeground":"#868C91","kt.icon.clickForeground":"#D7DBDE","kt.icon.disableForeground":"#5F656B","kt.icon.foreground":"#151b21a6","kt.icon.hoverBackground":"#151b2114","kt.icon.hoverForeground":"#151b21d9","kt.icon.secondaryForeground":"#868C91","kt.infoBackground":"#167CDB40","kt.infoIconForeground":"#3895EB","kt.input.border":"#151b2129","kt.input.disableBackground":"#151b210a","kt.input.disableForeground":"#151b2159","kt.input.selectionBackground":"#1A66AC","kt.linkButton.clickForeground":"#167CDB","kt.linkButton.disableForeground":"#5F656B","kt.linkButton.foreground":"#3895EB","kt.linkButton.hoverForeground":"#67ABEB","kt.menu.descriptionForeground":"#868C91","kt.menu.disableForeground":"#5F656B","kt.menubar.background":"#00000000","kt.menubar.border":"#252729","kt.menubar.foreground":"#D7DBDE","kt.menubar.separatorBackground":"#5F656B40","kt.modal.background":"#fff","kt.modal.foreground":"#151b21d9","kt.modal.separatorBackground":"#2C3033","kt.modalErrorIcon.foreground":"#DB4345","kt.modalInfoIcon.foreground":"#3895EB","kt.modalSuccessIcon.foreground":"#64B436","kt.modalWarningIcon.foreground":"#DBA936","kt.panel.secondaryForeground":"#151b21a6","kt.panelTab.activeBackground":"#fff","kt.panelTab.activeForeground":"#151b21","kt.panelTab.border":"#151b2114","kt.panelTab.inactiveBackground":"#00000000","kt.panelTab.inactiveForeground":"#151b21d9","kt.panelTitle.background":"#fff","kt.popover.background":"#000000e3","kt.popover.border":"#000000e3","kt.popover.foreground":"#fffffff2","kt.popover.prominentBackground":"#2C3033","kt.defaultButton.background":"#fafafb","kt.defaultButton.border":"#00000000","kt.defaultButton.clickBackground":"#fafafb","kt.defaultButton.clickBorder":"#00000000","kt.defaultButton.disableBackground":"#fff","kt.defaultButton.disableBorder":"#00000000","kt.defaultButton.disableForeground":"#151b2159","kt.defaultButton.foreground":"#000a1aff","kt.defaultButton.hoverBackground":"#F5F5F6","kt.defaultButton.hoverBorder":"#00000000","kt.defaultButton.selectionBackground":"#fff","kt.defaultButton.selectionForeground":"#151b21","kt.primaryButton.background":"#3c8dff","kt.primaryButton.clickBackground":"#3c8dff","kt.primaryButton.foreground":"#fff","kt.primaryButton.hoverBackground":"#5b9fff","kt.primaryButton.border":"#00000000","kt.primaryGhostButton.clickBorder":"#3c8dff","kt.primaryGhostButton.clickForeground":"#167CDB","kt.primaryGhostButton.clickBackground":"#fff","kt.primaryGhostButton.foreground":"#3895EB","kt.primaryGhostButton.border":"#3c8dff","kt.primaryGhostButton.background":"#fff","kt.secondaryButton.border":"#00000026","kt.secondaryButton.clickBorder":"#00000026","kt.secondaryButton.clickForeground":"#151b21","kt.secondaryButton.foreground":"#151b21d9","kt.secondaryButton.background":"#fff","kt.secondaryButton.hoverBorder":"#00000026","kt.secondaryButton.hoverForeground":"#151b21","kt.select.background":"#fff","kt.select.border":"#151b2129","kt.select.disableBackground":"#151b2114","kt.select.disableForeground":"#151b2159","kt.select.foreground":"#151b21","kt.select.placeholderForeground":"#151b2173","kt.selectDropdown.background":"#fff","kt.selectDropdown.foreground":"#151b21","kt.selectDropdown.hoverBackground":"#151b2114","kt.selectDropdown.selectionBackground":"#151b2114","kt.selectDropdown.selectionForeground":"#151b21","kt.selectOption.activeBorder":"#167CDB","kt.statusbar.offline.background":"#DB4345","kt.successBackground":"#48A91840","kt.successIconForeground":"#64B436","kt.tab.activeBorder":"#167CDB","kt.tab.activeForeground":"#151b21","kt.tab.borderDown":"#151b211f","kt.tab.inactiveForeground":"#151b21a6","kt.tree.activeSelectionBackground":"#1A66AC","kt.tree.activeSelectionForeground":"#FFFFFF","kt.tree.hoverBackground":"#151b5814","kt.tree.hoverForeground":"#151b21","kt.tree.inactiveSelectionBackground":"#151b5814","kt.tree.inactiveSelectionForeground":"#151b21","kt.warningBackground":"#D7951340","kt.warningIconForeground":"#DBA936","kt.whiteGhostButton.border":"#FFFFFF","kt.whiteGhostButton.clickBorder":"#FFFFFFA6","kt.whiteGhostButton.clickForeground":"#FFFFFFA6","kt.whiteGhostButton.disableBackground":"#FFFFFF03","kt.whiteGhostButton.disableBorder":"#FFFFFF40","kt.whiteGhostButton.disableForeground":"#FFFFFF40","kt.whiteGhostButton.foreground":"#FFFFFF","list.activeSelectionBackground":"#1A66AC","list.activeSelectionForeground":"#e1e4e8","list.evenItemBackground":"#5F656B14","list.headerBackground":"#5F656B1F","list.hoverBackground":"#151b5814","menu.background":"#FFFFFF","menu.foreground":"#151b21","menu.selectionBackground":"#151b2114","menu.selectionForeground":"#151b21","menu.separatorBackground":"#151b211f","menubar.selectionBackground":"#151b2114","menubar.selectionForeground":"#151b21","message.background":"#151b21d9","message.foreground":"#D7DBDE","messageErrorIcon.foreground":"#DB4345","messageInfoIcon.foreground":"#3895EB","messageSuccessIcon.foreground":"#64B436","messageWarningIcon.foreground":"#DBA936","notifications.background":"#fff","notifications.foreground":"#151b21d9","notificationsErrorIcon.foreground":"#DB4345","notificationsInfoIcon.foreground":"#3895EB","notificationsWarningIcon.foreground":"#DBA936","panel.background":"#fff","panel.border":"#43484D","panel.foreground":"#151b21","panel.selectionBackground":"#5F656B40","panel.separatorBackground":"#2C3033","panelMenuBadge.background":"#00000040","panelMenuBar.background":"#2C3033","panelMenuBarBadge.foreground":"#5F656B40","panelTabBarActionIcon.Background":"#868C91","panelTabBarError.foreground":"#DB4345","panelTitle.activeBorder":"#3c8dff","panelTitle.activeForeground":"#151b21","panelTitle.hoverForeground":"#FFFFFF","panelTitle.inactiveForeground":"#151b21a6","selectDropdown.descriptionForeground":"#868C91","selectDropdown.teamForeground":"#868C91","sideBar.background":"#00000000","sideBar.border":"#151b211f","sideBar.dropBackground":"#43484D","sideBar.dropUpBackground":"#1F507D","sideBarSectionHeader.background":"#00000000","sideBarSectionHeader.foreground":"#151b21d9","sideBarTitle.foreground":"#151b21d9","statusBar.background":"#00000000","statusBar.debuggingBackground":"#D77915","statusBar.foreground":"#151b21a6","statusBar.noFolderBackground":"#43484D","statusBarItem.activeBackground":"#FFFFFF40","statusBarItem.hoverBackground":"#FFFFFF03","statusBarItem.remoteBackground":"#3c8dff","statusBarItem.prominentForeground":"#151b21a6","statusBarItem.prominentBackground":"#f1f1f180","tab.activeBackground":"#ffffff","tab.activeForeground":"#151b21","tab.border":"#e9e9e914","tab.inactiveBackground":"#00000000","tab.inactiveForeground":"#151b21d9","tab.hoverBackground":"#00000000","tab.unfocusedActiveBackground":"#202224","tab.unfocusedActiveForeground":"#868C91","tab.unfocusedInactiveForeground":"#868C91","terminal.background":"#FFFFFF","terminal.border":"#252729","terminal.foreground":"#151b21","terminal.offlineBackground":"#D21F2840","terminal.offlineForeground":"#868C91","terminal.offlineLinkForeground":"#3895EB","terminal.selectionBackground":"#5F656B40","tooltip.background":"#35393D","tooltip.foreground":"#D7DBDE","widget.shadow":"#00000099","list.focusOutline":"#00000000","editorInlayHint.parameterBackground":"#00000000","button.background":"#ffffff14","scrollbarSlider.background":"#151b211f","editor.background":"#F1F2F3","quickInput.background":"#fff","list.focusBackground":"#151b5814","textLink.foreground":"#3c8dff","editorStickyScroll.background":"#fff"},semanticHighlighting:!0,semanticTokenColors:{newOperator:"#d4d4d4",stringLiteral:"#ce9178",customLiteral:"#D4D4D4",numberLiteral:"#b5cea8"},encodedTokensColors:[],rules:[],base:"vs",designThemeType:"design-light",inherit:!0,hasDefaultTokens:!1,id:"opensumi-design-light-theme",name:"OpenSumi Design Light+ (default light)"}},98741:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.overrideMonacoColorToken=e.overrideColorToken=void 0;const n=t(85608),s=t(52416),o=n.__importDefault(t(13925)),f=n.__importDefault(t(63080)),b=()=>{const _=(0,s.getColorRegistry)();_.getColors().forEach(({id:E})=>{if(o.default.colors[E]&&f.default.colors[E]){const u=_.getColor(E);(0,s.registerColor)(E,{dark:o.default.colors[E],light:f.default.colors[E],hcDark:u.defaults.hcDark||null,hcLight:u.defaults.hcLight||null},u.description)}})};e.overrideColorToken=b;const g=()=>{(0,s.registerColor)("vscode.quickInputList.focusBackground",{light:"#151b2114",dark:"#5F656B40",hcDark:null,hcLight:null},"Quick picker background color for the focused item."),(0,s.registerColor)("quickInputList.focusForeground",{dark:"#ffffff",light:"#151b21",hcDark:null,hcLight:null},"Quick picker foreground color for the focused item.")};e.overrideMonacoColorToken=g},66338:(x,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DESIGN_MENU_BAR_LEFT=e.DESIGN_MENU_BAR_RIGHT=e.DESIGN_MENUBAR_CONTAINER_VIEW_ID=void 0,e.DESIGN_MENUBAR_CONTAINER_VIEW_ID="design_menubar",e.DESIGN_MENU_BAR_RIGHT="design_menu_bar_right",e.DESIGN_MENU_BAR_LEFT="design_menu_bar_left"},38879:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),t(85608).__exportStar(t(66338),e)},82353:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),t(85608).__exportStar(t(38879),e)},87802:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DefaultBreadCrumbProvider=void 0,e.findCurrentDocumentSymbol=r;const n=t(85608),s=n.__importDefault(t(12784)),o=t(76003),f=t(41869),b=t(26542),g=t(79929),_=t(97408),E=t(82196),u=t(17459),{Path:h}=f.path;let c=class extends f.WithEventBus{constructor(){super(...arguments),this._onDidUpdateBreadCrumb=new f.Emitter,this.onDidUpdateBreadCrumb=this._onDidUpdateBreadCrumb.event,this.debouncedFireUriEvent=new Map,this.cachedBreadCrumb=new f.LRUMap(200,100)}handlesUri(p){return this.fileServiceClient.handlesScheme(p.scheme)}provideBreadCrumbForUri(p,v){return this.getFileParts(p).concat(this.getDocumentSymbolParts(p,v))}getFileParts(p){const v=this.workspaceService.workspace?new f.URI(this.workspaceService.workspace.uri):void 0;let y,S;v&&v.isEqualOrParent(p)?(y=v,S=v.relative(p)):(y=f.URI.from({scheme:p.scheme,authority:p.authority}),S=p.path);let A=y.path;const T=[];for(const D of S.toString().split(h.separator).filter(w=>!!w)){A=A.join(D);const w=y.withPath(A);T.push(this.createFilePartBreadCrumbUri(w,!w.isEqual(p)))}return T}createFilePartBreadCrumbUri(p,v){const y=p.toString();if(this.cachedBreadCrumb.has(y))return this.cachedBreadCrumb.get(y);const S={name:p.path.base,uri:p,icon:this.labelService.getIcon(p,{isDirectory:v}),getSiblings:async()=>{const A=f.URI.from({scheme:p.scheme}).withPath(p.path.dir),T=await this.fileServiceClient.getFileStat(A.toString()),D=[];let w=-1;return T&&T.children&&T.children.length>0&&l(T.children).forEach((I,R)=>{D.push(this.createFilePartBreadCrumbUri(new f.URI(I.uri),I.isDirectory)),w===-1&&p.toString()===I.uri&&(w=R)}),{parts:D,currentIndex:w}}};return v?S.getChildren=async()=>{const A=await this.fileServiceClient.getFileStat(p.toString()),T=[];return A&&A.children&&A.children.length>0&&l(A.children).forEach((D,w)=>{T.push(this.createFilePartBreadCrumbUri(new f.URI(D.uri),D.isDirectory))}),T}:S.onClick=()=>{this.commandService.executeCommand(f.EDITOR_COMMANDS.OPEN_RESOURCE.id,p)},this.cachedBreadCrumb.set(y,S),S}getDocumentSymbolParts(p,v){if(!v)return[];const y=this.documentSymbolStore.getDocumentSymbol(p);if(y&&y.length>0){const S=r(y,v.monacoEditor.getPosition());return S.length>0?S.map(A=>this.createFromDocumentSymbol(A,v)):[{name:"...",getSiblings:()=>({parts:y.sort((A,T)=>d(A.range,T.range)).map(A=>this.createFromDocumentSymbol(A,v)),currentIndex:-1})}]}else return[]}createFromDocumentSymbol(p,v){const y={name:p.name,icon:(0,f.getSymbolIcon)(p.kind),isSymbol:!0,onClick:()=>{v.setSelection({startColumn:p.range.startColumn,endColumn:p.range.startColumn,startLineNumber:p.range.startLineNumber,endLineNumber:p.range.startLineNumber}),v.monacoEditor.revealRangeInCenter(p.range),v.monacoEditor.focus()}};return p.parent&&(y.getSiblings=()=>({parts:p.parent.children.sort((S,A)=>d(S.range,A.range)).map(S=>this.createFromDocumentSymbol(S,v)),currentIndex:p.parent.children.indexOf(p)})),p.children&&p.children.length>0&&(y.getChildren=()=>p.children.sort((S,A)=>d(S.range,A.range)).map(S=>this.createFromDocumentSymbol(S,v))),y}onDocumentSymbolChangedEvent(p){this.notifyUpdate(p.payload)}onEditorSelectionChangeEvent(p){this.notifyUpdate(p.payload.editorUri)}notifyUpdate(p){this.debouncedFireUriEvent.has(p.toString())||this.debouncedFireUriEvent.set(p.toString(),(0,s.default)(()=>{this._onDidUpdateBreadCrumb.fire(p)},100,{maxWait:1e3})),this.debouncedFireUriEvent.get(p.toString())()}};e.DefaultBreadCrumbProvider=c,n.__decorate([(0,o.Autowired)(g.IFileServiceClient),n.__metadata("design:type",Object)],c.prototype,"fileServiceClient",void 0),n.__decorate([(0,o.Autowired)(_.IWorkspaceService),n.__metadata("design:type",Object)],c.prototype,"workspaceService",void 0),n.__decorate([(0,o.Autowired)(b.LabelService),n.__metadata("design:type",b.LabelService)],c.prototype,"labelService",void 0),n.__decorate([(0,o.Autowired)(f.CommandService),n.__metadata("design:type",Object)],c.prototype,"commandService",void 0),n.__decorate([(0,o.Autowired)(),n.__metadata("design:type",u.DocumentSymbolStore)],c.prototype,"documentSymbolStore",void 0),n.__decorate([(0,f.OnEvent)(u.DocumentSymbolChangedEvent),n.__metadata("design:type",Function),n.__metadata("design:paramtypes",[u.DocumentSymbolChangedEvent]),n.__metadata("design:returntype",void 0)],c.prototype,"onDocumentSymbolChangedEvent",null),n.__decorate([(0,f.OnEvent)(E.EditorSelectionChangeEvent),n.__metadata("design:type",Function),n.__metadata("design:paramtypes",[E.EditorSelectionChangeEvent]),n.__metadata("design:returntype",void 0)],c.prototype,"onEditorSelectionChangeEvent",null),e.DefaultBreadCrumbProvider=c=n.__decorate([(0,o.Injectable)()],c);function r(m,p){const v=[];if(!p)return v;let y=m;for(;y&&y.length>0;){let S=!1;for(const A of y)if(a(p,A.range)){v.push(A),y=A.children,S=!0;break}if(!S)break}return v}function l(m){return m.sort((p,v)=>{if(p.isDirectory&&v.isDirectory||!p.isDirectory&&!v.isDirectory){const y=new f.URI(p.uri).path.name,S=new f.URI(v.uri).path.name;return y.localeCompare(S,"kn",{numeric:!0})}else return p.isDirectory&&!v.isDirectory?-1:!p.isDirectory&&v.isDirectory?1:0})}function a(m,p){return m.lineNumber<p.startLineNumber?!1:m.lineNumber===p.startLineNumber?m.column>=p.startColumn:m.lineNumber<p.endLineNumber?!0:m.lineNumber===p.endLineNumber?m.column<=p.endColumn:!1}function d(m,p){return m.startLineNumber>p.startLineNumber?1:m.startLineNumber<p.startLineNumber?-1:m.startColumn===p.startColumn?0:m.startColumn>p.startColumn?1:-1}},17459:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SymbolTag=e.DocumentSymbolChangedEvent=e.DocumentSymbolStore=void 0;const n=t(85608),s=n.__importDefault(t(12784)),o=t(76003),f=t(41869),b=t(79865),g=t(48069);Object.defineProperty(e,"SymbolTag",{enumerable:!0,get:function(){return g.SymbolTag}});const _=t(23418),E=t(96689);let u=class extends f.WithEventBus{constructor(){super(),this.documentSymbols=new Map,this.pendingUpdate=new Set,this.debounced=new Map,this.symbolDeferred=new Map,this.addDispose(b.languageFeaturesService.documentSymbolProvider.onDidChange(()=>{Array.from(this.documentSymbols.keys()).forEach(a=>{this.markNeedUpdate(new f.URI(a))})}))}getDocumentSymbol(a){return this.documentSymbols.has(a.toString())||(this.documentSymbols.set(a.toString(),void 0),this.createDocumentSymbolCache(a)),this.pendingUpdate.has(a.toString())&&this.updateDocumentSymbolCache(a),this.documentSymbols.get(a.toString())}async getDocumentSymbolAsync(a,d){var m;const p=a.toString();return d&&d.onCancellationRequested(()=>{var v;(v=this.symbolDeferred.get(p))===null||v===void 0||v.resolve(),this.symbolDeferred.delete(p)}),(!this.documentSymbols.has(p)||this.pendingUpdate.has(p))&&!this.symbolDeferred.has(p)&&(this.symbolDeferred.set(p,new f.Deferred),this.updateDocumentSymbolCache(a)),await((m=this.symbolDeferred.get(p))===null||m===void 0?void 0:m.promise),this.documentSymbols.get(p)}async createDocumentSymbolCache(a){this.updateDocumentSymbolCache(a)}async doUpdateDocumentSymbolCache(a){var d,m;this.pendingUpdate.delete(a.toString());const p=await this.editorDocumentModelRegistry.createModelReference(a);if(!p){(d=this.symbolDeferred.get(a.toString()))===null||d===void 0||d.resolve();return}try{const v=b.languageFeaturesService.documentSymbolProvider.all(p.instance.getMonacoModel());let y;for(const S of v)if(y=await S.provideDocumentSymbols(p.instance.getMonacoModel(),new f.CancellationTokenSource().token),y)break;y&&c(y,{children:y},a),this.documentSymbols.set(a.toString(),y),this.eventBus.fire(new h(a))}finally{p.dispose()}(m=this.symbolDeferred.get(a.toString()))===null||m===void 0||m.resolve()}updateDocumentSymbolCache(a){this.debounced.has(a.toString())||this.debounced.set(a.toString(),(0,s.default)(()=>this.doUpdateDocumentSymbolCache(a),100,{maxWait:1e3})),this.debounced.get(a.toString())()}onEditorDocumentModelContentChangedEvent(a){a.payload.changes&&a.payload.changes.length>0&&this.markNeedUpdate(a.payload.uri)}markNeedUpdate(a){this.pendingUpdate.add(a.toString()),this.isWatching(a)&&this.updateDocumentSymbolCache(a)}isWatching(a){for(const d of this.editorService.editorGroups)if(d.currentResource&&d.currentResource.uri.isEqual(a))return!0;return!1}};e.DocumentSymbolStore=u,n.__decorate([(0,o.Autowired)(E.IEditorDocumentModelService),n.__metadata("design:type",Object)],u.prototype,"editorDocumentModelRegistry",void 0),n.__decorate([(0,o.Autowired)(_.WorkbenchEditorService),n.__metadata("design:type",_.WorkbenchEditorService)],u.prototype,"editorService",void 0),n.__decorate([(0,f.OnEvent)(E.EditorDocumentModelContentChangedEvent),n.__metadata("design:type",Function),n.__metadata("design:paramtypes",[E.EditorDocumentModelContentChangedEvent]),n.__metadata("design:returntype",void 0)],u.prototype,"onEditorDocumentModelContentChangedEvent",null),e.DocumentSymbolStore=u=n.__decorate([(0,o.Injectable)(),n.__metadata("design:paramtypes",[])],u);class h extends f.BasicEvent{}e.DocumentSymbolChangedEvent=h;function c(l,a,d){return l.forEach((m,p)=>{const v=m;v.parent=a,v.id=r(d,v,p),m.children&&m.children.length>0&&c(m.children,m,d)}),l}function r(l,a,d){const m=[a.name];for(;a.parent;){const p=a.parent;if(!p.name)break;m.unshift(p.name),a=p}return`${l.toString()}__${m.join("-")}__${d}`}},88895:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BreadCrumbServiceImpl=void 0;const n=t(85608),s=t(76003),o=t(41869),f=t(87802),{addElement:b}=o.arrays;let g=class{constructor(){this.providers=[],this._onDidUpdateBreadCrumbResults=new o.Emitter,this.onDidUpdateBreadCrumbResults=this._onDidUpdateBreadCrumbResults.event,this.crumbResults=new Map,this.registerBreadCrumbProvider(this.defaultBreadCrumbProvider)}registerBreadCrumbProvider(h){const c=b(this.providers,h);return h.onDidUpdateBreadCrumb(r=>{this.crumbResults.forEach((l,a)=>{l.has(r.toString())&&this.getBreadCrumbs(r,a)})}),c}getBreadCrumbs(h,c){const r=this.getEditorCrumbResults(c);for(const l of this.providers)if(l.handlesUri(h)){const a=r.get(h.toString()),d=l.provideBreadCrumbForUri(h,c);_(a,d)||(r.set(h.toString(),d),this._onDidUpdateBreadCrumbResults.fire({editor:c,uri:h}));break}return r.get(h.toString())}getEditorCrumbResults(h){return this.crumbResults.has(h)||(this.crumbResults.set(h,new Map),h&&h.monacoEditor.onDidDispose(()=>{this.crumbResults.delete(h)})),this.crumbResults.get(h)}disposeCrumb(h){}};e.BreadCrumbServiceImpl=g,n.__decorate([(0,s.Autowired)(),n.__metadata("design:type",f.DefaultBreadCrumbProvider)],g.prototype,"defaultBreadCrumbProvider",void 0),e.BreadCrumbServiceImpl=g=n.__decorate([(0,s.Injectable)(),n.__metadata("design:paramtypes",[])],g);function _(u,h){if(!u&&!h)return!0;if(!u||!h)return!1;if(u.length!==h.length)return!1;for(let c=0;c<u.length;c++)if(!E(u[c],h[c]))return!1;return!0}function E(u,h){return u.name===h.name}},11673:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EditorComponentRegistryImpl=void 0;const n=t(85608),s=n.__importDefault(t(46343)),o=n.__importDefault(t(19106)),f=n.__importDefault(t(43144)),b=t(76003),g=t(43718),_=t(82196);let E=class{constructor(){this.components=new Map,this.sideWidgets={bottom:new Set,top:new Set},this.initialPropsMap=new Map,this.resolvers=new Map,this.normalizedResolvers=[],this.perWorkbenchComponents={}}registerEditorComponent(h,c){const r=h.uid;return h.renderMode||(h.renderMode=_.EditorComponentRenderMode.ONE_PER_GROUP),this.components.set(r,h),this.initialPropsMap.set(r,c),this.eventBus.fire(new g.ExtensionActivateEvent({topic:"onRegisterEditorComponent",data:r})),this.eventBus.fire(new _.RegisterEditorComponentEvent(r)),{dispose:()=>{this.components.get(r)===h&&(this.components.delete(r),this.eventBus.fire(new _.EditorComponentDisposeEvent(h)))}}}registerEditorComponentResolver(h,c){let r;return typeof h=="function"?r={handleScheme:h,resolver:c}:r={handleScheme:l=>l===h?10:-1,resolver:c},this.normalizedResolvers.push(r),this.resolvers.clear(),{dispose:()=>{for(const a of this.resolvers.values()){const d=a.indexOf(c);d!==-1&&a.splice(d,1)}const l=this.normalizedResolvers.indexOf(r);l!==-1&&this.normalizedResolvers.splice(l,1)}}}async resolveEditorComponent(h){let c=[];const r=this.getResolvers(h.uri.scheme).slice();let l=!1;const a=d=>{c=d,l=!0};for(const d of r)if(await d(h,c,a),l)break;return c.sort((d,m)=>{const p=d.weight||0;return(m.weight||0)-p}),(0,o.default)(c,s.default)}calculateSchemeResolver(h){const c=this.normalizedResolvers.slice(),r=[];return c.forEach((l,a)=>{const d=l.handleScheme(h);d>=0&&r.push({weight:d,index:a,resolver:l.resolver})}),r.sort((l,a)=>l.weight>a.weight?-1:l.weight<a.weight?1:a.index-l.index).map(l=>l.resolver)}getResolvers(h){return this.resolvers.has(h)||this.resolvers.set(h,this.calculateSchemeResolver(h)),this.resolvers.get(h)}getEditorComponent(h){return this.components.get(h)||null}getEditorInitialProps(h){return this.initialPropsMap.get(h)||null}clearPerWorkbenchComponentCache(h){f.default.unmountComponentAtNode(this.perWorkbenchComponents[h]),delete this.perWorkbenchComponents[h]}getSideWidgets(h,c){const r=[];return this.sideWidgets[h].forEach(l=>{l.displaysOnResource(c)&&r.push(l)}),r.sort((l,a)=>{const d=l.weight===void 0?10:l.weight;return(a.weight===void 0?10:a.weight)-d})}registerEditorSideWidget(h){const c=h.side||"bottom";return this.sideWidgets[c].add(h),this.eventBus.fire(new _.RegisterEditorSideComponentEvent),{dispose:()=>{this.sideWidgets[c].delete(h)}}}};e.EditorComponentRegistryImpl=E,n.__decorate([(0,b.Autowired)(g.IEventBus),n.__metadata("design:type",Object)],E.prototype,"eventBus",void 0),e.EditorComponentRegistryImpl=E=n.__decorate([(0,b.Injectable)()],E)},84677:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MonacoEditorDecorationApplier=void 0;const n=t(85608),s=n.__importDefault(t(53373)),o=t(76003),f=t(43718),b=t(52416),g=t(82196);let _=class extends f.Disposable{constructor(l){super(),this.editor=l,this.decorations=new Map,this.applyDecorationFromProvider(),this.editor.onDidChangeModel(()=>{this.clearDecorations(),this.applyDecorationFromProvider()}),this.editor.onDidDispose(()=>{this.dispose()}),this.addDispose(this.eventBus.on(g.EditorDecorationChangeEvent,a=>{const d=this.getEditorUri();d&&a.payload.uri.isEqual(d)&&this.applyDecorationFromProvider(a.payload.key)})),this.addDispose(this.eventBus.on(g.EditorDecorationTypeRemovedEvent,a=>{this.deltaDecoration(a.payload,[])}))}getEditorUri(){return this.editor.getModel()?new f.URI(this.editor.getModel().uri.toString()):null}async applyDecorationFromProvider(l){if(this.editor.getModel()){const a=new f.URI(this.editor.getModel().uri.toString()),d=await this.decorationService.getDecorationFromProvider(a,l);if(!this.editor.getModel()||this.editor.getModel().uri.toString()!==a.toString())return;for(const m of Object.keys(d))this.deltaDecoration(m,d[m]);this.eventBus.fire(new g.DidApplyEditorDecorationFromProvider({key:l,uri:a}))}}dispose(){super.dispose(),this.clearDecorations()}clearDecorations(){this.decorations.forEach(l=>{l.dispose(),this.editor.deltaDecorations(l.decorations,[])}),this.decorations.clear()}deltaDecoration(l,a){let d=[];if(this.decorations.has(l)&&(d=this.decorations.get(l).decorations,this.decorations.get(l).dispose(),this.decorations.delete(l)),d.length===0&&a.length===0)return;const m=this.editor.deltaDecorations(d,a);this.decorations.set(l,{decorations:m,dispose:()=>null})}applyDecoration(l,a){const d=this.decorations.get(l);d&&d.dispose();const m=d?d.decorations:[],p=[],v=new f.Disposable;if(m.length===0&&a.length===0)return;a.forEach(S=>{const A=this.resolveDecorationRenderer(l,S.renderOptions);p.push({range:S.range,options:{...A.options,hoverMessage:h(S.hoverMessage)}}),v.addDispose(A)});const y=this.editor.deltaDecorations(m,p);this.decorations.set(l,{decorations:y,dispose:()=>v.dispose()})}resolveDecorationRenderer(l,a){const d=this.decorationService.getTextEditorDecorationType(l),m={description:l},p=this.themeService.getCurrentThemeSync().type,v=new f.Disposable;if(d){const y=d.property;E(m,y,p)}if(a){const y=this.decorationService.createTextEditorDecorationType(a);E(m,y.property,p),v.addDispose(y)}return{options:m,dispose:()=>v.dispose()}}};e.MonacoEditorDecorationApplier=_,n.__decorate([(0,o.Autowired)(g.IEditorDecorationCollectionService),n.__metadata("design:type",Object)],_.prototype,"decorationService",void 0),n.__decorate([(0,o.Autowired)(b.IThemeService),n.__metadata("design:type",Object)],_.prototype,"themeService",void 0),n.__decorate([(0,o.Autowired)(f.IEventBus),n.__metadata("design:type",Object)],_.prototype,"eventBus",void 0),e.MonacoEditorDecorationApplier=_=n.__decorate([(0,o.Injectable)({multiple:!0}),n.__metadata("design:paramtypes",[Object])],_);function E(r,l,a){l.overviewRulerLane&&(r.overviewRuler?r.overviewRuler.position=l.overviewRulerLane:r.overviewRuler={color:null,position:l.overviewRulerLane}),l.default&&u(r,l.default),a==="dark"&&l.dark&&u(r,l.dark),a==="light"&&l.light&&u(r,l.light),l.isWholeLine!==void 0&&(r.isWholeLine=l.isWholeLine),l.rangeBehavior&&(r.stickiness=l.rangeBehavior),r.inlineClassNameAffectsLetterSpacing=!0}function u(r,l){l.className&&(r.className=(0,s.default)(r.className,l.className)),l.inlineClassName&&(r.inlineClassName=(0,s.default)(r.inlineClassName,l.inlineClassName)),l.afterContentClassName&&(r.afterContentClassName=(0,s.default)(r.afterContentClassName,l.afterContentClassName)),l.beforeContentClassName&&(r.beforeContentClassName=(0,s.default)(r.beforeContentClassName,l.beforeContentClassName)),l.glyphMarginClassName&&(r.glyphMarginClassName=(0,s.default)(r.glyphMarginClassName,l.glyphMarginClassName)),l.overviewRulerColor&&r.overviewRuler&&(r.overviewRuler.color=l.overviewRulerColor)}function h(r){if(r)return r instanceof Array?r.map(c):c(r)}function c(r){return typeof r=="string"?{value:r,isTrusted:!0}:r}},84158:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CompareEditorContribution=e.CompareService=void 0;const n=t(85608),s=t(76003),o=t(41869),f=t(93899),b=t(82196);let g=class{constructor(){this.comparing=new Map}compare(u,h,c){const r=o.URI.from({scheme:b.DIFF_SCHEME,query:o.URI.stringifyQuery({name:c,original:u,modified:h,comparing:!0})});if(!this.comparing.has(r.toString())){const l=new o.Deferred;this.comparing.set(r.toString(),l),l.promise.then(()=>{this.comparing.delete(r.toString()),this.commandService.executeCommand(o.EDITOR_COMMANDS.CLOSE_ALL.id,r)})}return this.commandService.executeCommand(o.EDITOR_COMMANDS.OPEN_RESOURCE.id,r),this.comparing.get(r.toString()).promise}};e.CompareService=g,n.__decorate([(0,s.Autowired)(o.CommandService),n.__metadata("design:type",Object)],g.prototype,"commandService",void 0),e.CompareService=g=n.__decorate([(0,s.Injectable)()],g);let _=class{registerMenus(u){u.registerMenuItems(f.MenuId.EditorTitle,[{command:{id:o.DIFF_EDITOR_COMMANDS.ACCEPT.id,label:(0,o.localize)("editor.action.accept")},iconClass:(0,o.getIcon)("check"),group:"navigation",when:"isInDiffEditor && diffResource =~ /%26comparing%3Dtrue$/"}]),u.registerMenuItems(f.MenuId.EditorTitle,[{command:{id:o.DIFF_EDITOR_COMMANDS.REVERT.id,label:(0,o.localize)("editor.action.revert")},iconClass:(0,o.getIcon)("rollback"),group:"navigation",when:"isInDiffEditor && diffResource =~ /%26comparing%3Dtrue$/"}]),u.registerMenuItems(f.MenuId.EditorTitle,[{command:{id:o.DIFF_EDITOR_COMMANDS.TOGGLE_COLLAPSE_UNCHANGED_REGIONS.id,label:(0,o.localize)("diffEditor.action.toggleCollapseUnchangedRegions")},toggledWhen:"config.diffEditor.hideUnchangedRegions.enabled",iconClass:"codicon codicon-map",group:"navigation",when:"isInDiffEditor"}])}registerCommands(u){u.registerCommand(o.DIFF_EDITOR_COMMANDS.ACCEPT,{execute:h=>{h&&this.compareService.comparing.has(h.toString())&&this.compareService.comparing.get(h.toString()).resolve(b.CompareResult.accept)}}),u.registerCommand(o.DIFF_EDITOR_COMMANDS.REVERT,{execute:h=>{h&&this.compareService.comparing.has(h.toString())&&this.compareService.comparing.get(h.toString()).resolve(b.CompareResult.revert)}}),u.registerCommand(o.DIFF_EDITOR_COMMANDS.TOGGLE_COLLAPSE_UNCHANGED_REGIONS,{execute:()=>{const h=this.preferenceService.get("diffEditor.hideUnchangedRegions.enabled");this.preferenceService.set("diffEditor.hideUnchangedRegions.enabled",!h)}})}};e.CompareEditorContribution=_,n.__decorate([(0,s.Autowired)(b.ICompareService),n.__metadata("design:type",g)],_.prototype,"compareService",void 0),n.__decorate([(0,s.Autowired)(o.PreferenceService),n.__metadata("design:type",Object)],_.prototype,"preferenceService",void 0),e.CompareEditorContribution=_=n.__decorate([(0,o.Domain)(f.MenuContribution,o.CommandContribution)],_)},57581:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DefaultDiffEditorContribution=e.DiffResourceProvider=void 0;const n=t(85608),s=t(76003),o=t(41869),f=t(26542),b=t(14951),g=t(23418),_=t(82196);let E=class extends o.WithEventBus{constructor(){super(...arguments),this.scheme=g.DIFF_SCHEME,this.modifiedToResource=new Map}onResourceDecorationChangeEvent(c){c.payload.uri&&this.modifiedToResource.has(c.payload.uri.toString())&&this.eventBus.fire(new g.ResourceDecorationNeedChangeEvent({uri:this.modifiedToResource.get(c.payload.uri.toString()),decoration:c.payload.decoration}))}async getCurrentUserHome(){if(!this.userhomePath)try{const c=await this.fileServiceClient.getCurrentUserHome();c&&(this.userhomePath=new o.URI(c.uri))}catch{}return this.userhomePath}async getReadableTooltip(c){const r=c.toString(),l=await this.getCurrentUserHome();if(!l)return decodeURIComponent(c.withScheme("").toString());if(l.isEqualOrParent(c)){const a=l&&l.toString();return decodeURIComponent(r.replace(a,"~"))}return decodeURIComponent(c.withScheme("").toString())}async provideResource(c){const{original:r,modified:l,name:a}=c.getParsedQuery(),d=new o.URI(r),m=new o.URI(l);return this.modifiedToResource.set(m.toString(),c),Promise.all([this.labelService.getIcon(d),this.getReadableTooltip(m)]).then(([p,v])=>{var y;return{name:a,icon:p,uri:c,supportsRevive:(y=this.appConfig.enableDiffRevive)!==null&&y!==void 0?y:!0,metadata:{original:d,modified:m},title:v}})}async shouldCloseResource(c,r){const{modified:l}=c.uri.getParsedQuery(),a=new o.URI(l),d=await this.resourceService.getResource(a);return d?await this.resourceService.shouldCloseResource(d,r):!0}};e.DiffResourceProvider=E,n.__decorate([(0,s.Autowired)(),n.__metadata("design:type",f.LabelService)],E.prototype,"labelService",void 0),n.__decorate([(0,s.Autowired)(g.ResourceService),n.__metadata("design:type",g.ResourceService)],E.prototype,"resourceService",void 0),n.__decorate([(0,s.Autowired)(b.IFileServiceClient),n.__metadata("design:type",Object)],E.prototype,"fileServiceClient",void 0),n.__decorate([(0,s.Autowired)(o.AppConfig),n.__metadata("design:type",Object)],E.prototype,"appConfig",void 0),n.__decorate([(0,o.OnEvent)(g.ResourceDecorationChangeEvent),n.__metadata("design:type",Function),n.__metadata("design:paramtypes",[g.ResourceDecorationChangeEvent]),n.__metadata("design:returntype",void 0)],E.prototype,"onResourceDecorationChangeEvent",null),e.DiffResourceProvider=E=n.__decorate([(0,s.Injectable)()],E);let u=class{registerResource(c){c.registerResourceProvider(this.diffResourceProvider)}registerEditorComponent(c){c.registerEditorComponentResolver(g.DIFF_SCHEME,(r,l)=>{l.push({type:_.EditorOpenType.diff})})}};e.DefaultDiffEditorContribution=u,n.__decorate([(0,s.Autowired)(),n.__metadata("design:type",E)],u.prototype,"diffResourceProvider",void 0),e.DefaultDiffEditorContribution=u=n.__decorate([(0,o.Domain)(_.BrowserEditorContribution)],u)},21690:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EmptyDocCacheImpl=void 0;const n=t(85608),s=t(76003);let o=class{hasCache(b){return!1}isFlushed(){return!0}getCache(b){return null}persistCache(b,g){}};e.EmptyDocCacheImpl=o,e.EmptyDocCacheImpl=o=n.__decorate([(0,s.Injectable)()],o)},80487:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});const n=t(85608);n.__exportStar(t(21690),e),n.__exportStar(t(7220),e)},7220:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LocalStorageDocCacheImpl=void 0;const n=t(85608),s=t(76003),o=t(51500),f=t(93107);let b=class{hasCache(_){return!0}isFlushed(){return!0}async getCache(_){const E=this.parseKeyFrom(_);return await this.storageService.getData(E)||null}persistCache(_,E){const u=this.parseKeyFrom(_),h=this.parseCacheFrom(_,E);this.storageService.setData(u,h)}parseCacheFrom(_,E){if(!(!E.dirty||!E.changeMatrix.length))return{path:_.path.toString(),startMD5:E.startMD5,changeMatrix:E.changeMatrix.map(u=>u.map(h=>(0,f.parseCacheValueFrom)(h)))}}parseKeyFrom(_){return`LocalStorageDocCacheImpl_${_.toString()}`}};e.LocalStorageDocCacheImpl=b,n.__decorate([(0,s.Autowired)(o.IWorkspaceStorageService),n.__metadata("design:type",Object)],b.prototype,"storageService",void 0),e.LocalStorageDocCacheImpl=b=n.__decorate([(0,s.Injectable)()],b)},86942:(x,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EditorDocumentError=void 0;var t;(function(n){n.READ_CACHE_ERROR="EditorDocumentError:READ_CACHE_ERROR",n.APPLY_CACHE_TO_DIRTY_DOCUMENT="EditorDocumentError:APPLY_CACHE_TO_DIRTY_DOCUMENT",n.APPLY_CACHE_TO_DIFFERENT_DOCUMENT="EditorDocumentError:APPLY_CACHE_TO_DIFFERENT_DOCUMENT",n.FORMAT_ERROR="EditorDocumentError:FORMAT_ERROR"})(t||(e.EditorDocumentError=t={}))},9519:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EditorDocumentModelServiceImpl=e.EDITOR_DOC_OPTIONS_PREF_KEY=e.EDITOR_DOCUMENT_MODEL_STORAGE=void 0;const n=t(85608),s=t(76003),o=t(41869),f=t(96405),b=t(14951),g=t(91249),_=t(96689);e.EDITOR_DOCUMENT_MODEL_STORAGE=new o.URI("editor-doc").withScheme(o.STORAGE_SCHEMA.SCOPE),e.EDITOR_DOC_OPTIONS_PREF_KEY="editor_doc_pref";let E=class extends o.WithEventBus{constructor(){super(),this.editorDocModels=new Map,this.creatingEditorModels=new Map,this._modelsToDispose=new Set,this.preferredModelOptions=new Map,this._ready=this.registerDispose(new o.ReadyEvent),this.modelCreationEventDispatcher=this.registerDispose(new o.Dispatcher),this._modelReferenceManager=new o.ReferenceManager(h=>(this._modelsToDispose.has(h)&&this._modelsToDispose.delete(h),this.getOrCreateModel(h))),this._modelReferenceManager.onReferenceAllDisposed(h=>{this._delete(h)}),this._modelReferenceManager.onInstanceCreated(h=>{this.modelCreationEventDispatcher.dispatch(h.uri.toString()),this.eventBus.fire(new _.EditorDocumentModelCreationEvent({uri:h.uri,languageId:h.languageId,eol:h.eol,encoding:h.encoding,content:h.getText(),readonly:h.readonly,versionId:h.getMonacoModel().getVersionId()}))}),this.addDispose(this.preferenceService.onPreferenceChanged(h=>{h.preferenceName==="editor.detectIndentation"&&this.editorDocModels.forEach(c=>{c.updateOptions({})})}))}onDocumentModelCreated(h,c){return this.modelCreationEventDispatcher.on(h)(c)}_delete(h){const c=this.preferenceService.get("editor.modelDisposeTime",3e3);this._modelsToDispose.add(h.toString());let r=null;const l=this.addDispose({dispose:()=>{r&&clearTimeout(r)}});r=window.setTimeout(()=>{l.dispose(),r=null,this._modelsToDispose.has(h.toString())&&this._doDelete(h.toString())},c)}_doDelete(h){const c=this.editorDocModels.get(h);if(c&&(!c.dirty||c.disposeEvenDirty))return c.dispose(),this.editorDocModels.delete(h),c;this._modelsToDispose.delete(h)}async changeModelOptions(h,c){return this.onceReady(()=>{this.preferredModelOptions.has(h.toString())&&(c={...this.preferredModelOptions.get(h.toString()),...c}),this.preferredModelOptions.set(h.toString(),c);const r=this.getModelReference(h);return r&&(c.encoding&&c.encoding!==r.instance.encoding&&r.instance.updateEncoding(c.encoding),c.languageId&&c.languageId!==r.instance.languageId&&(r.instance.languageId=c.languageId),c.eol&&c.eol!==r.instance.eol&&(r.instance.eol=c.eol),r.dispose()),this.persistOptionsPreference()})}persistOptionsPreference(){return this.storage.set(e.EDITOR_DOC_OPTIONS_PREF_KEY,JSON.stringify((0,o.mapToSerializable)(this.preferredModelOptions)))}async initialize(){if(this.storage=await this.getStorage(e.EDITOR_DOCUMENT_MODEL_STORAGE),this.storage.get(e.EDITOR_DOC_OPTIONS_PREF_KEY))try{this.preferredModelOptions=(0,o.serializableToMap)(JSON.parse(this.storage.get(e.EDITOR_DOC_OPTIONS_PREF_KEY)))}catch(h){this.logger.error(h)}this._ready.ready()}async acceptExternalChange(h){this.hashCalculateService.initialized||await this.hashCalculateService.initialize();const c=this.editorDocModels.get(h.payload.toString());if(c&&!c.dirty){const r=await this.contentRegistry.getProvider(c.uri);if(r)if(r.provideEditorDocumentModelContentMd5)await r.provideEditorDocumentModelContentMd5(c.uri,c.encoding)!==c.getBaseContentMd5()&&c.updateContent(await this.contentRegistry.getContentForUri(c.uri,c.encoding),void 0,!0);else{const l=await this.contentRegistry.getContentForUri(c.uri,c.encoding);this.hashCalculateService.calculate(l)!==c.getBaseContentMd5()&&c.updateContent(l,void 0,!0)}}}createModelReference(h,c){return this._modelReferenceManager.getReference(h.toString(),c)}getModelReference(h,c){return this._modelReferenceManager.getReferenceIfHasInstance(h.toString(),c)}getModelDescription(h,c){const r=this.getModelReference(h,c);if(!r)return null;const l=r.instance,a={alwaysDirty:l.alwaysDirty,closeAutoSave:l.closeAutoSave,disposeEvenDirty:l.disposeEvenDirty,eol:l.eol,encoding:l.encoding,dirty:l.dirty,languageId:l.languageId,readonly:l.readonly,uri:l.uri,id:l.id,savable:l.savable};return r.dispose(),a}getAllModels(){return Array.from(this.editorDocModels.values())}hasLanguage(h){return this.getAllModels().findIndex(c=>c.languageId===h)!==-1}async getOrCreateModel(h,c){return this.editorDocModels.has(h)?this.editorDocModels.get(h):this.createModel(h,c)}get onceReady(){return this.initialize(),this._ready.onceReady.bind(this._ready)}createModel(h,c){if(!this.creatingEditorModels.has(h)){const r=this.doCreateModel(h,c).then(l=>(this.creatingEditorModels.delete(h),l),l=>{throw this.creatingEditorModels.delete(h),l});this.creatingEditorModels.set(h,r)}return this.creatingEditorModels.get(h)}async doCreateModel(h,c){const r=new o.URI(h);let l=await this.contentRegistry.getProvider(r);if(l||await this.fileSystem.shouldWaitProvider(r.scheme)&&(l=await this.contentRegistry.getProvider(r)),!l)throw new Error(`No document provider found for ${r.toString()}`);const[a,d,m,p,v,y]=await Promise.all([l.provideEditorDocumentModelContent(r,c),l.isReadonly?l.isReadonly(r):void 0,l.preferLanguageForUri?l.preferLanguageForUri(r):void 0,l.isAlwaysDirty?l.isAlwaysDirty(r):!1,l.closeAutoSave?l.closeAutoSave(r):!1,l.disposeEvenDirty?l.disposeEvenDirty(r):!1]);!c&&l.provideEncoding&&(c=await l.provideEncoding(r));const S=l.provideEOL?await l.provideEOL(r):`
28131
28131
  `,A=!!l.saveDocumentModel,T=this.injector.get(g.EditorDocumentModel,[r,a,{readonly:d,languageId:m,savable:A,eol:S,encoding:c,alwaysDirty:p,closeAutoSave:v,disposeEvenDirty:y}]);return this.onceReady(()=>{if(this.preferredModelOptions.has(r.toString())){const D=this.preferredModelOptions.get(r.toString());D?.encoding&&T.updateEncoding(D.encoding),D?.eol&&(T.eol=D.eol),D?.languageId&&(T.languageId=D.languageId)}}),this.editorDocModels.set(r.toString(),T),T}async saveEditorDocumentModel(h,c,r,l,a,d,m){const p=await this.contentRegistry.getProvider(h);if(!p)throw new Error(`No document provider found for ${h.toString()}`);if(!p.saveDocumentModel)throw new Error(`The document provider of ${h.toString()} does not have a save method`);return await p.saveDocumentModel(h,c,r,l,a,d,m)}dispose(){super.dispose(),this.getAllModels().forEach(h=>{h.getMonacoModel().dispose()})}};e.EditorDocumentModelServiceImpl=E,n.__decorate([(0,s.Autowired)(_.IEditorDocumentModelContentRegistry),n.__metadata("design:type",Object)],E.prototype,"contentRegistry",void 0),n.__decorate([(0,s.Autowired)(s.INJECTOR_TOKEN),n.__metadata("design:type",s.Injector)],E.prototype,"injector",void 0),n.__decorate([(0,s.Autowired)(o.StorageProvider),n.__metadata("design:type",Function)],E.prototype,"getStorage",void 0),n.__decorate([(0,s.Autowired)(o.ILogger),n.__metadata("design:type",Object)],E.prototype,"logger",void 0),n.__decorate([(0,s.Autowired)(o.PreferenceService),n.__metadata("design:type",Object)],E.prototype,"preferenceService",void 0),n.__decorate([(0,s.Autowired)(f.IHashCalculateService),n.__metadata("design:type",Object)],E.prototype,"hashCalculateService",void 0),n.__decorate([(0,s.Autowired)(b.IFileServiceClient),n.__metadata("design:type",Object)],E.prototype,"fileSystem",void 0),n.__decorate([o.memoize,n.__metadata("design:type",Function),n.__metadata("design:paramtypes",[]),n.__metadata("design:returntype",Promise)],E.prototype,"initialize",null),n.__decorate([(0,o.OnEvent)(_.EditorDocumentModelOptionExternalUpdatedEvent),n.__metadata("design:type",Function),n.__metadata("design:paramtypes",[_.EditorDocumentModelOptionExternalUpdatedEvent]),n.__metadata("design:returntype",Promise)],E.prototype,"acceptExternalChange",null),e.EditorDocumentModelServiceImpl=E=n.__decorate([(0,s.Injectable)(),n.__metadata("design:paramtypes",[])],E)},91249:(x,e,t)=>{"use strict";var n;Object.defineProperty(e,"__esModule",{value:!0}),e.EditorDocumentModel=void 0;const s=t(85608),o=s.__importDefault(t(12784)),f=t(76003),b=t(41869),g=t(96405),_=t(52902),E=t(68475),u=t(72665),h=t(2261),c=t(44781),r=t(43255),l=t(88104),a=t(23418),d=t(55113),m=t(90915),p=t(82196),v=t(86942),y=t(98469),S=t(96689);let A=n=class extends b.Disposable{constructor(D,w,I={}){super(),this.uri=D,this.saveQueue=new b.Throttler,this._encoding="utf8",this.readonly=!1,this.savable=!1,this.alwaysDirty=!1,this.closeAutoSave=!1,this.disposeEvenDirty=!1,this._originalEncoding=this._encoding,this._persistVersionId=0,this._baseContent="",this.savingTasks=[],this.dirtyChanges=[],this._isInitOption=!0,this._onDidChangeEncoding=new b.Emitter,this.onDidChangeEncoding=this._onDidChangeEncoding.event,this.onDispose(()=>{this.eventBus.fire(new S.EditorDocumentModelRemovalEvent(this.uri))}),I.encoding&&(this._encoding=I.encoding),this.readonly=!!I.readonly,this.savable=!!I.savable,this.alwaysDirty=!!I.alwaysDirty,this.disposeEvenDirty=!!I.disposeEvenDirty,this.closeAutoSave=!!I.closeAutoSave,this.monacoModel=_.monaco.editor.createModel(w,I.languageId,_.URI.parse(D.toString())),this.editorPreferences=(0,m.createEditorPreferenceProxy)(this.preferences,this.uri.toString(),this.languageId),this.updateOptions({}),I.eol&&(this.eol=I.eol),this._originalEncoding=this._encoding,this._previousVersionId=this.monacoModel.getVersionId(),this._persistVersionId=this.monacoModel.getAlternativeVersionId(),this.baseContent=w,this._isInitOption=!1,this.listenTo(this.monacoModel),this.readCacheToApply(),this.addDispose(this._onDidChangeEncoding),this.addDispose(this.monacoModel.onDidChangeLanguage(R=>{this.eventBus.fire(new S.EditorDocumentModelOptionChangedEvent({uri:this.uri,languageId:R.newLanguage}))}))}updateOptions(D){const w={tabSize:this.editorPreferences["editor.tabSize"]||1,insertSpaces:this.editorPreferences["editor.insertSpaces"],detectIndentation:this.editorPreferences["editor.detectIndentation"],...D};w.detectIndentation?this.monacoModel.detectIndentation(w.insertSpaces,w.tabSize):this.monacoModel.updateOptions(w)}listenTo(D){this.addDispose(D.onDidChangeContent(w=>{w.changes&&w.changes.length>0&&this.dirtyChanges.push({fromVersionId:this._previousVersionId,toVersionId:w.versionId,changes:w.changes}),this._previousVersionId=w.versionId,this.notifyChangeEvent(w.changes,w.isRedoing,w.isUndoing)})),this.addDispose(D)}readCacheToApply(){if(!this.cacheProvider.hasCache(this.uri))return;const D=this.cacheProvider.getCache(this.uri,this.encoding);D&&((0,b.isThenable)(D)?D.then(w=>{w&&this.applyCache(w)}).catch(w=>{this.logger.error(`${v.EditorDocumentError.READ_CACHE_ERROR} ${w&&w.message}`)}):this.applyCache(D))}applyCache(D){if(this.dirty){this.logger.error(v.EditorDocumentError.APPLY_CACHE_TO_DIRTY_DOCUMENT);return}if(this.baseContentMd5!==D.startMD5){this.logger.error(v.EditorDocumentError.APPLY_CACHE_TO_DIFFERENT_DOCUMENT);return}if((0,a.isDocContentCache)(D))this.monacoModel.setValue(D.content);else for(const w of D.changeMatrix){const I=w.map(R=>({range:(0,a.parseRangeFrom)(R),text:R[0]}));this.monacoModel.applyEdits(I)}}cleanAndUpdateContent(D){this.monacoModel.setValue(D),this.monacoModel._commandManager.clear(),this._persistVersionId=this.monacoModel.getAlternativeVersionId(),this.savingTasks=[],this.notifyChangeEvent([],!1,!1),this.baseContent=D}async updateEncoding(D){let w=!1;this._encoding!==D&&(w=!0),this._encoding=D,await this.reload(),w&&(this.eventBus.fire(new S.EditorDocumentModelOptionChangedEvent({uri:this.uri,encoding:this._encoding})),this._onDidChangeEncoding.fire())}get encoding(){return this._encoding}set eol(D){this.monacoModel.setEOL(D===`
28132
- `?E.EndOfLineSequence.LF:E.EndOfLineSequence.CRLF),this._isInitOption||this.eventBus.fire(new S.EditorDocumentModelOptionChangedEvent({uri:this.uri,eol:D}))}get eol(){return this.monacoModel.getEOL()}get dirty(){return this.alwaysDirty?!0:!this.savable||this.monacoModel.isDisposed()||this.readonly?!1:this._persistVersionId!==this.monacoModel.getAlternativeVersionId()}set languageId(D){_.monaco.editor.setModelLanguage(this.monacoModel,D),this.eventBus.fire(new S.EditorDocumentModelOptionChangedEvent({uri:this.uri,languageId:D}))}get languageId(){return this.monacoModel.getLanguageId()}get id(){return this.monacoModel.id}getMonacoModel(){return this.monacoModel}async syncDocumentModelToExtThread(){await this.eventBus.fireAndAwait(new S.EditorDocumentModelOptionChangedEvent({uri:this.uri,languageId:this.languageId,encoding:this.encoding,eol:this.eol,dirty:this.dirty}))}async save(D=!1,w=a.SaveReason.Manual){if(!this.dirty)return await this.syncDocumentModelToExtThread(),!1;const I=await this.contentRegistry.getProvider(this.uri);if(await I?.isReadonly(this.uri))return!1;const M=async(O=!1,P=a.SaveReason.Manual)=>{if(await this.formatOnSave(P),await this.eventBus.fireAndAwait(new S.EditorDocumentModelWillSaveEvent({uri:this.uri,reason:P,language:this.languageId,dirty:this.dirty})),this.editorPreferences["editor.askIfDiff"]||(O=!0),!this.dirty)return!1;const L=this.monacoModel.getVersionId(),N=this.savingTasks[this.savingTasks.length-1];if(N&&N.versionId===L){N.cancel();const F=this.savingTasks.pop();F?.dispose()}const k=new y.SaveTask(this.uri,L,this.monacoModel.getAlternativeVersionId(),this.getText(),O);this.savingTasks.push(k),this.savingTasks.length>0&&this.initSave();const B=await k.finished;if(B.state===b.SaveTaskResponseState.SUCCESS)return this.monacoModel.pushStackElement(),!0;if(B.state===b.SaveTaskResponseState.ERROR)return B.errorMessage!=="cancel"&&(this.logger.error(B.errorMessage),this.messageService.error((0,b.localize)("doc.saveError.failed")+`
28132
+ `?E.EndOfLineSequence.LF:E.EndOfLineSequence.CRLF),this._isInitOption||this.eventBus.fire(new S.EditorDocumentModelOptionChangedEvent({uri:this.uri,eol:D}))}get eol(){return this.monacoModel.getEOL()}get dirty(){return this.alwaysDirty?!0:!this.savable||this.monacoModel.isDisposed()?!1:this._persistVersionId!==this.monacoModel.getAlternativeVersionId()}set languageId(D){_.monaco.editor.setModelLanguage(this.monacoModel,D),this.eventBus.fire(new S.EditorDocumentModelOptionChangedEvent({uri:this.uri,languageId:D}))}get languageId(){return this.monacoModel.getLanguageId()}get id(){return this.monacoModel.id}getMonacoModel(){return this.monacoModel}async syncDocumentModelToExtThread(){await this.eventBus.fireAndAwait(new S.EditorDocumentModelOptionChangedEvent({uri:this.uri,languageId:this.languageId,encoding:this.encoding,eol:this.eol,dirty:this.dirty}))}async save(D=!1,w=a.SaveReason.Manual){if(!this.dirty)return await this.syncDocumentModelToExtThread(),!1;const I=await this.contentRegistry.getProvider(this.uri);if(await I?.isReadonly(this.uri))return!1;const M=async(O=!1,P=a.SaveReason.Manual)=>{if(await this.formatOnSave(P),await this.eventBus.fireAndAwait(new S.EditorDocumentModelWillSaveEvent({uri:this.uri,reason:P,language:this.languageId,dirty:this.dirty})),this.editorPreferences["editor.askIfDiff"]||(O=!0),!this.dirty)return!1;const L=this.monacoModel.getVersionId(),N=this.savingTasks[this.savingTasks.length-1];if(N&&N.versionId===L){N.cancel();const F=this.savingTasks.pop();F?.dispose()}const k=new y.SaveTask(this.uri,L,this.monacoModel.getAlternativeVersionId(),this.getText(),O);this.savingTasks.push(k),this.savingTasks.length>0&&this.initSave();const B=await k.finished;if(B.state===b.SaveTaskResponseState.SUCCESS)return this.monacoModel.pushStackElement(),!0;if(B.state===b.SaveTaskResponseState.ERROR)return B.errorMessage!=="cancel"&&(this.logger.error(B.errorMessage),this.messageService.error((0,b.localize)("doc.saveError.failed")+`
28133
28133
  `+B.errorMessage)),!1;if(B.state===b.SaveTaskResponseState.DIFF){const F=(0,b.localize)("doc.saveError.diffAndSave"),W=(0,b.localize)("doc.saveError.overwrite");return this.messageService.error((0,b.formatLocalize)("doc.saveError.diff",this.uri.toString()),[F,W]).then(V=>{V===F?this.compareAndSave():V===W&&M(!0,P)}),this.logger.error("The file cannot be saved, the version is inconsistent with the disk"),!1}return!1};return this.saveQueue.queue(M.bind(this,D,w))}async compareAndSave(){const D=b.URI.from({scheme:S.ORIGINAL_DOC_SCHEME,query:b.URI.stringifyQuery({target:this.uri.toString()})}),w=this.uri.path.base,I=await this.compareService.compare(D,this.uri,(0,b.formatLocalize)("editor.compareAndSave.title",w,w));I===p.CompareResult.revert?this.revert():I===p.CompareResult.accept&&this.save(!0)}async initSave(){for(;this.savingTasks.length>0;){const D=this.dirtyChanges;this.dirtyChanges=[],(await this.savingTasks[0].run(this.service,this.baseContent,D,this.encoding,this.eol)).state==="success"&&this.savingTasks[0]?(this.baseContent=this.savingTasks[0].content,this.eventBus.fire(new S.EditorDocumentModelSavedEvent(this.uri)),this.setPersist(this.savingTasks[0].alternativeVersionId)):this.dirtyChanges.unshift(...D),this.savingTasks.shift()}}setPersist(D){this._persistVersionId=D,this.notifyChangeEvent([],!1,!1)}async reload(){try{const D=await this.contentRegistry.getContentForUri(this.uri,this._encoding);(0,b.isUndefinedOrNull)(D)||this.cleanAndUpdateContent(D)}catch{this._persistVersionId=this.monacoModel.getAlternativeVersionId()}}async revert(D){D?this._persistVersionId=this.monacoModel.getAlternativeVersionId():await this.updateEncoding(this._originalEncoding)}getText(D){return D?this.monacoModel.getValueInRange(D):this.monacoModel.getValue()}updateContent(D,w,I=!1){w&&(this.eol=w);const R=this.eol===`\r
28134
28134
  `?r.DefaultEndOfLine.CRLF:r.DefaultEndOfLine.LF,{textBuffer:M,disposable:O}=(0,l.createTextBuffer)(D,R),P=n._computeEdits(this.monacoModel,M);this.monacoModel.pushEditOperations([],P,()=>[]),I&&(this.setPersist(this.monacoModel.getAlternativeVersionId()),this.baseContent=D,this.dirtyChanges=[]),O.dispose()}static _computeEdits(D,w){const I=D.getLineCount(),R=w.getLineCount(),M=this._commonPrefix(D,I,1,w,R,1);if(I===R&&M===I)return[];const O=this._commonSuffix(D,I-M,M,w,R-M,M);let P,L;return O>0?(P=new c.Range(M+1,1,I-O+1,1),L=new c.Range(M+1,1,R-O+1,1)):M>0?(P=new c.Range(M,D.getLineMaxColumn(M),I,D.getLineMaxColumn(I)),L=new c.Range(M,1+w.getLineLength(M),R,1+w.getLineLength(R))):(P=new c.Range(1,1,I,D.getLineMaxColumn(I)),L=new c.Range(1,1,R,1+w.getLineLength(R))),[h.EditOperation.replaceMove(P,w.getValueInRange(L,r.EndOfLinePreference.TextDefined))]}static _commonPrefix(D,w,I,R,M,O){const P=Math.min(w,M);let L=0;for(let N=0;N<P&&D.getLineContent(I+N)===R.getLineContent(O+N);N++)L++;return L}static _commonSuffix(D,w,I,R,M,O){const P=Math.min(w,M);let L=0;for(let N=0;N<P&&D.getLineContent(I+w-N)===R.getLineContent(O+M-N);N++)L++;return L}set baseContent(D){this._baseContent=D,this._baseContentMd5=null}get baseContent(){return this._baseContent}get baseContentMd5(){return this._baseContentMd5||(this._baseContentMd5=this.hashCalculateService.calculate(this._baseContent)),this._baseContentMd5}get tryAutoSaveAfterDelay(){return this._tryAutoSaveAfterDelay||(this._tryAutoSaveAfterDelay=(0,o.default)(()=>{this.save(void 0,a.SaveReason.AfterDelay)},this.editorPreferences["editor.autoSaveDelay"]||1e3),this.addDispose(this.editorPreferences.onPreferenceChanged(D=>{D.preferenceName==="editor.autoSaveDelay"&&(this._tryAutoSaveAfterDelay=(0,o.default)(()=>{this.save(void 0,a.SaveReason.AfterDelay)},this.editorPreferences["editor.autoSaveDelay"]||1e3))}))),this._tryAutoSaveAfterDelay}getBaseContentMd5(){return this._baseContentMd5||(this._baseContentMd5=this.hashCalculateService.calculate(this._baseContent)),this._baseContentMd5}notifyChangeEvent(D=[],w,I){!this.closeAutoSave&&this.savable&&this.editorPreferences["editor.autoSave"]===d.AUTO_SAVE_MODE.AFTER_DELAY&&this.tryAutoSaveAfterDelay(),this.eventBus.fire(new S.EditorDocumentModelContentChangedEvent({uri:this.uri,dirty:this.dirty,readonly:this.readonly,changes:D,eol:this.eol,isRedoing:w,isUndoing:I,versionId:this.monacoModel.getVersionId()}));const R=this;this.cacheProvider.persistCache(this.uri,{get dirty(){return R.dirty},get startMD5(){return R.getBaseContentMd5()},get content(){return R.getText()},get changeMatrix(){return R.dirtyChanges.map(({changes:M})=>M)},encoding:this.encoding})}async formatOnSave(D){if(this.editorPreferences["editor.formatOnSave"]&&D!==a.SaveReason.AfterDelay){const I=this.editorPreferences["editor.formatOnSaveTimeout"]||3e3,R=this.reporter.time(b.REPORT_NAME.FORMAT_ON_SAVE);try{await Promise.race([new Promise((M,O)=>{setTimeout(()=>{const P=new Error((0,b.formatLocalize)("preference.editor.formatOnSaveTimeoutError",I));P.name="FormatOnSaveTimeoutError",O(P)},I)}),this.commandService.executeCommand(b.EDITOR_COMMANDS.FORMAT_DOCUMENT.id)])}catch(M){M.name==="FormatOnSaveTimeoutError"&&this.reporter.point(b.REPORT_NAME.FORMAT_ON_SAVE_TIMEOUT_ERROR,this.uri.toString()),this.logger.warn(`${v.EditorDocumentError.FORMAT_ERROR} ${M&&M.message}`)}finally{R.timeEnd(this.uri.path.ext)}}}};e.EditorDocumentModel=A,s.__decorate([(0,f.Autowired)(S.IEditorDocumentModelContentRegistry),s.__metadata("design:type",Object)],A.prototype,"contentRegistry",void 0),s.__decorate([(0,f.Autowired)(S.IEditorDocumentModelService),s.__metadata("design:type",Object)],A.prototype,"service",void 0),s.__decorate([(0,f.Autowired)(p.ICompareService),s.__metadata("design:type",Object)],A.prototype,"compareService",void 0),s.__decorate([(0,f.Autowired)(a.IDocPersistentCacheProvider),s.__metadata("design:type",Object)],A.prototype,"cacheProvider",void 0),s.__decorate([(0,f.Autowired)(u.IMessageService),s.__metadata("design:type",Object)],A.prototype,"messageService",void 0),s.__decorate([(0,f.Autowired)(b.IEventBus),s.__metadata("design:type",Object)],A.prototype,"eventBus",void 0),s.__decorate([(0,f.Autowired)(b.ILogger),s.__metadata("design:type",Object)],A.prototype,"logger",void 0),s.__decorate([(0,f.Autowired)(b.CommandService),s.__metadata("design:type",Object)],A.prototype,"commandService",void 0),s.__decorate([(0,f.Autowired)(b.IReporterService),s.__metadata("design:type",Object)],A.prototype,"reporter",void 0),s.__decorate([(0,f.Autowired)(b.PreferenceService),s.__metadata("design:type",Object)],A.prototype,"preferences",void 0),s.__decorate([(0,f.Autowired)(g.IHashCalculateService),s.__metadata("design:type",Object)],A.prototype,"hashCalculateService",void 0),e.EditorDocumentModel=A=n=s.__decorate([(0,f.Injectable)({multiple:!0}),s.__metadata("design:paramtypes",[b.URI,String,Object])],A)},78157:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EditorDocumentModelContentRegistryImpl=void 0;const n=t(85608),s=t(76003),o=t(41869),f=t(96689);let b=class{constructor(){this.providers=[],this._onOriginalDocChanged=new o.Emitter,this.cachedProviders=new o.LRUMap(1e3,500),this.originalProvider={handlesScheme:_=>_===f.ORIGINAL_DOC_SCHEME,provideEditorDocumentModelContent:async _=>{const{target:E}=_.getParsedQuery(),u=new o.URI(E);return await this.getContentForUri(u)||""},isReadonly:()=>!0,onDidChangeContent:this._onOriginalDocChanged.event},this.registerEditorDocumentModelContentProvider(this.originalProvider)}registerEditorDocumentModelContentProvider(_){this.providers.push(_),this.cachedProviders.clear();const E=_.onDidChangeContent(u=>{this.eventBus.fire(new f.EditorDocumentModelOptionExternalUpdatedEvent(u))});return _!==this.originalProvider&&_.onDidChangeContent&&_.onDidChangeContent(u=>{this._onOriginalDocChanged.fire(o.URI.from({scheme:f.ORIGINAL_DOC_SCHEME,query:o.URI.stringifyQuery({target:u.toString()})}))}),{dispose:()=>{E.dispose();const u=this.providers.indexOf(_);u&&(this.providers.splice(u,1),this.cachedProviders.clear())}}}getProvider(_){const E=_.toString();return this.cachedProviders.has(E)||this.cachedProviders.set(E,this.calculateProvider(_)),this.cachedProviders.get(E)}async calculateProvider(_){let E={provider:void 0,weight:-1,index:1};for(const u of this.providers){let h=-1;const c=this.providers.indexOf(u);u.handlesUri?h=await u.handlesUri(_):u.handlesScheme&&(h=await u.handlesScheme(_.scheme)?10:-1),h>=0&&(h>E.weight||h===E.weight&&c>E.index)&&(E={index:c,weight:h,provider:u})}return E.provider}async getContentForUri(_,E){const u=await this.getProvider(_);if(!u)throw new Error;return u.provideEditorDocumentModelContent(_,E)}};e.EditorDocumentModelContentRegistryImpl=b,n.__decorate([(0,s.Autowired)(o.IEventBus),n.__metadata("design:type",Object)],b.prototype,"eventBus",void 0),e.EditorDocumentModelContentRegistryImpl=b=n.__decorate([(0,s.Injectable)(),n.__metadata("design:paramtypes",[])],b)},37275:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});const n=t(85608);n.__exportStar(t(9519),e),n.__exportStar(t(91249),e),n.__exportStar(t(78157),e),n.__exportStar(t(98469),e)},89618:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MonacoTextModelService=void 0;const n=t(85608),s=t(76003),o=t(41869),f=t(96689);let b=class{canHandleResource(_){return!0}hasTextModelContentProvider(_){throw new Error("Method not implemented.")}async createModelReference(_){const E=await this.documentModelManager.createModelReference(new o.URI(_.toString()),"monaco");if(E){const u=E.instance.getMonacoModel();return Promise.resolve({object:{textEditorModel:u},dispose:()=>{E.dispose()}})}}registerTextModelContentProvider(_,E){return{dispose(){}}}};e.MonacoTextModelService=b,n.__decorate([(0,s.Autowired)(f.IEditorDocumentModelService),n.__metadata("design:type",Object)],b.prototype,"documentModelManager",void 0),e.MonacoTextModelService=b=n.__decorate([(0,s.Injectable)()],b)},98469:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SaveTask=void 0;const n=t(41869);class s extends n.Disposable{constructor(f,b,g,_,E){super(),this.uri=f,this.versionId=b,this.alternativeVersionId=g,this.content=_,this.ignoreDiff=E,this.deferred=new n.Deferred,this.finished=this.deferred.promise,this.started=!1,this.disposables.push(this.cancelToken=new n.CancellationTokenSource)}async run(f,b,g,_,E){this.started=!0;try{const u=await f.saveEditorDocumentModel(this.uri,this.content,b,g,_,this.ignoreDiff,E,this.cancelToken.token);return this.deferred.resolve(u),u}catch(u){const h={errorMessage:u.message,state:n.SaveTaskResponseState.ERROR};return this.deferred.resolve(h),h}}cancel(){this.cancelToken.cancel();const f={errorMessage:"cancel",state:n.SaveTaskResponseState.ERROR};this.deferred.resolve(f)}}e.SaveTask=s},66537:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SaveParticipantsContribution=e.TrimFinalNewLinesParticipant=e.CodeActionOnSaveParticipant=void 0;const n=t(85608),s=t(76003),o=t(41869),f=t(68969),b=n.__importStar(t(20868)),g=t(52902),_=t(79865),E=t(2261),u=t(44781),h=n.__importStar(t(48069)),c=t(84866),r=t(81559),l=t(93152),a=t(82196),d=t(96689);function m(S,A){let T=null;if(S.isAttachedToEditor()){for(const D of A.listCodeEditors())if(D.hasModel()&&D.getModel()===S){if(D.hasTextFocus())return D;T=D}}return T}let p=class extends o.WithEventBus{get bulkEditService(){return this.overrideServiceRegistry.getRegisteredService(o.ServiceNames.BULK_EDIT_SERVICE)}activate(){}async onEditorDocumentModelWillSave(A){if(A.payload.reason!==a.SaveReason.Manual)return;const T=this.preferenceService.get("editor.codeActionsOnSave",void 0,A.payload.uri.toString(),A.payload.language);if(!T)return;const D=this.preferenceService.get("editor.codeActionsOnSaveNotification",!0,A.payload.uri.toString(),A.payload.language),w=I=>{const M=(Array.isArray(T)?T:Object.keys(T)).map(B=>new r.CodeActionKind(B));if(Array.isArray(T)||M.sort((B,F)=>r.CodeActionKind.SourceFixAll.contains(B)?r.CodeActionKind.SourceFixAll.contains(F)?0:-1:r.CodeActionKind.SourceFixAll.contains(F)?1:0),M.length===0)return;const O=this.docService.getModelReference(A.payload.uri,"codeActionOnSave");if(!O)return;const P=O.instance.getMonacoModel(),L=new b.CancellationTokenSource,N=this.preferenceService.get("editor.codeActionsOnSaveTimeout",void 0,A.payload.uri.toString(),A.payload.language),k=Array.isArray(T)?[]:Object.keys(T).filter(B=>T[B]===!1).map(B=>new r.CodeActionKind(B));return Promise.race([new Promise((B,F)=>setTimeout(()=>{L.cancel(),F("codeActionsOnSave timeout")},N)),this.applyOnSaveActions(P,M,k,I,L.token)]).finally(()=>{L.cancel(),O.dispose()})};return D?this.progressService.withProgress({title:(0,o.formatLocalize)("editor.saveCodeActions.saving",A.payload.uri.displayName),location:o.ProgressLocation.Notification,cancellable:!0},async I=>w(I)):w(null)}async applyOnSaveActions(A,T,D,w,I){const R=new class{constructor(){this._names=new Set}_report(){w&&w.report({message:(0,o.formatLocalize)("editor.saveCodeActions.getting",[...this._names].map(M=>`'${M}'`).join(", "))})}report(M){M.displayName&&!this._names.has(M.displayName)&&(this._names.add(M.displayName),this._report())}};for(const M of T)try{const O=await this.getActionsToRun(A,M,D,R,I);await this.applyCodeActions(O.validActions)}catch(O){this.logger.error(O)}}async applyCodeActions(A){var T;for(const D of A)D.action.edit&&await((T=this.bulkEditService)===null||T===void 0?void 0:T.apply(g.ResourceEdit.convert(D.action.edit))),D.action.command&&await this.commandService.executeCommand(D.action.command.id,...D.action.command.arguments||[])}async getActionsToRun(A,T,D,w,I){return(0,c.getCodeActions)(_.languageFeaturesService.codeActionProvider,A,A.getFullModelRange(),{type:h.CodeActionTriggerType.Auto,filter:{include:T,excludes:D,includeSourceActions:!0},triggerAction:r.CodeActionTriggerSource.OnSave},w,I)}};e.CodeActionOnSaveParticipant=p,n.__decorate([(0,s.Autowired)(o.PreferenceService),n.__metadata("design:type",Object)],p.prototype,"preferenceService",void 0),n.__decorate([(0,s.Autowired)(o.MonacoOverrideServiceRegistry),n.__metadata("design:type",o.MonacoOverrideServiceRegistry)],p.prototype,"overrideServiceRegistry",void 0),n.__decorate([(0,s.Autowired)(o.CommandService),n.__metadata("design:type",Object)],p.prototype,"commandService",void 0),n.__decorate([(0,s.Autowired)(d.IEditorDocumentModelService),n.__metadata("design:type",Object)],p.prototype,"docService",void 0),n.__decorate([(0,s.Autowired)(o.ILogger),n.__metadata("design:type",Object)],p.prototype,"logger",void 0),n.__decorate([(0,s.Autowired)(f.IProgressService),n.__metadata("design:type",Object)],p.prototype,"progressService",void 0),n.__decorate([(0,o.OnEvent)(d.EditorDocumentModelWillSaveEvent),n.__metadata("design:type",Function),n.__metadata("design:paramtypes",[d.EditorDocumentModelWillSaveEvent]),n.__metadata("design:returntype",Promise)],p.prototype,"onEditorDocumentModelWillSave",null),e.CodeActionOnSaveParticipant=p=n.__decorate([(0,s.Injectable)()],p);let v=class extends o.WithEventBus{activate(){}async onEditorDocumentModelWillSave(A){if(this.preferenceService.get("files.trimFinalNewlines")){const D=this.docService.getModelReference(A.payload.uri,"trimFinalNewlines");if(!D)return;const w=D.instance.getMonacoModel();this.doTrimFinalNewLines(w,A.payload.reason!==a.SaveReason.Manual),D.dispose()}}findLastNonEmptyLine(A){for(let T=A.getLineCount();T>=1;T--)if(A.getLineContent(T).length>0)return T;return 0}doTrimFinalNewLines(A,T){const D=A.getLineCount();if(D===1)return;let w=[],I=0;const R=this.injector.get(l.MonacoCodeService),M=m(A,R);if(M&&(w=M.getSelections(),T))for(let N=0,k=w.length;N<k;N++){const B=w[N].positionLineNumber;B>I&&(I=B)}const O=this.findLastNonEmptyLine(A),P=Math.max(O+1,I+1),L=A.validateRange(new u.Range(P,1,D,A.getLineMaxColumn(D)));L.isEmpty()||(A.pushEditOperations(w,[E.EditOperation.delete(L)],()=>w),M?.setSelections(w))}};e.TrimFinalNewLinesParticipant=v,n.__decorate([(0,s.Autowired)(o.PreferenceService),n.__metadata("design:type",Object)],v.prototype,"preferenceService",void 0),n.__decorate([(0,s.Autowired)(d.IEditorDocumentModelService),n.__metadata("design:type",Object)],v.prototype,"docService",void 0),n.__decorate([(0,s.Autowired)(o.ILogger),n.__metadata("design:type",Object)],v.prototype,"logger",void 0),n.__decorate([(0,s.Autowired)(s.INJECTOR_TOKEN),n.__metadata("design:type",s.Injector)],v.prototype,"injector",void 0),n.__decorate([(0,o.OnEvent)(d.EditorDocumentModelWillSaveEvent),n.__metadata("design:type",Function),n.__metadata("design:paramtypes",[d.EditorDocumentModelWillSaveEvent]),n.__metadata("design:returntype",Promise)],v.prototype,"onEditorDocumentModelWillSave",null),e.TrimFinalNewLinesParticipant=v=n.__decorate([(0,s.Injectable)()],v);let y=class{onStart(){this.codeActionOnSaveParticipant.activate(),this.trimFinalNewLinesParticipant.activate()}};e.SaveParticipantsContribution=y,n.__decorate([(0,s.Autowired)(),n.__metadata("design:type",p)],y.prototype,"codeActionOnSaveParticipant",void 0),n.__decorate([(0,s.Autowired)(),n.__metadata("design:type",v)],y.prototype,"trimFinalNewLinesParticipant",void 0),e.SaveParticipantsContribution=y=n.__decorate([(0,o.Domain)(o.ClientAppContribution)],y)},96689:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ORIGINAL_DOC_SCHEME=e.EditorDocumentModelWillSaveEvent=e.EditorDocumentModelSavedEvent=e.EditorDocumentModelRemovalEvent=e.EditorDocumentModelCreationEvent=e.EditorDocumentModelOptionExternalUpdatedEvent=e.EditorDocumentModelOptionChangedEvent=e.EditorDocumentModelContentChangedEvent=e.IEditorDocumentModelContentRegistry=e.IEditorDocumentModelService=void 0;const n=t(41869);e.IEditorDocumentModelService=Symbol("IEditorDocumentModelService"),e.IEditorDocumentModelContentRegistry=Symbol("IEditorDocumentModelContentRegistry");class s extends n.BasicEvent{}e.EditorDocumentModelContentChangedEvent=s;class o extends n.BasicEvent{}e.EditorDocumentModelOptionChangedEvent=o;class f extends n.BasicEvent{}e.EditorDocumentModelOptionExternalUpdatedEvent=f;class b extends n.BasicEvent{}e.EditorDocumentModelCreationEvent=b;class g extends n.BasicEvent{}e.EditorDocumentModelRemovalEvent=g;class _ extends n.BasicEvent{}e.EditorDocumentModelSavedEvent=_;class E extends n.BasicEvent{}e.EditorDocumentModelWillSaveEvent=E,e.ORIGINAL_DOC_SCHEME="original_doc"},71624:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DiffEditorPart=e.BrowserDiffEditor=e.BrowserCodeEditor=e.BaseMonacoEditorWrapper=e.EditorCollectionServiceImpl=void 0,e.insertSnippetWithMonacoEditor=v;const n=t(85608),s=t(76003),o=t(41869),f=t(66e3),b=t(22689),g=t(43718),_=n.__importStar(t(20868)),E=t(99721),u=t(23418),h=t(55113),c=t(84677),r=t(96689),l=t(59879),a=t(6043),d=t(82196),{removeUndefined:m}=g.objects;let p=class extends g.WithEventBus{get currentEditor(){return this._currentEditor}constructor(){super(),this._editors=new Set,this._diffEditors=new Set,this._onCodeEditorCreate=new g.Emitter,this._onDiffEditorCreate=new g.Emitter,this.onCodeEditorCreate=this._onCodeEditorCreate.event,this.onDiffEditorCreate=this._onDiffEditorCreate.event,this.addDispose(this.editorFeatureRegistry.onDidRegisterFeature(M=>{this._editors.forEach(O=>{this.editorFeatureRegistry.runOneContribution(O,M)})}))}createCodeEditor(M,O,P){const L={...(0,a.getConvertedMonacoOptions)(this.configurationService).editorOptions,...O},N=this.monacoService.createCodeEditor(M,L,P),k=this.injector.get(A,[N,O]);return this._onCodeEditorCreate.fire(k),k}listEditors(){return Array.from(this._editors.values())}getEditorByUri(M){var O;for(const P of this._editors.values())if(!((O=P.currentUri)===null||O===void 0)&&O.isEqual(M))return P}addEditors(M){const O=this._editors.size;M.forEach(P=>{this._editors.has(P)||(this._editors.add(P),this.editorFeatureRegistry.runContributions(P),P.monacoEditor.onDidFocusEditorWidget(()=>{this._currentEditor=P}),P.monacoEditor.onContextMenu(()=>{this._currentEditor=P}))}),this._editors.size}removeEditors(M){const O=this._editors.size;M.forEach(P=>{this._editors.delete(P),this._currentEditor===P&&(this._currentEditor=void 0)}),this._editors.size}createDiffEditor(M,O,P){const L=(0,a.getConvertedMonacoOptions)(this.configurationService),N={...L.editorOptions,...L.diffOptions,...O},k=this.monacoService.createDiffEditor(M,N,P),B=this.injector.get(T,[k,O]);return this._onDiffEditorCreate.fire(B),B}createMergeEditor(M,O,P){const L=(0,a.getConvertedMonacoOptions)(this.configurationService),N={...L.editorOptions,...L.diffOptions,...O,wordWrap:"off"};return this.monacoService.createMergeEditor(M,N,P)}listDiffEditors(){return Array.from(this._diffEditors.values())}addDiffEditors(M){const O=this._diffEditors.size;M.forEach(P=>{this._diffEditors.has(P)||this._diffEditors.add(P)}),this._diffEditors.size}removeDiffEditors(M){const O=this._diffEditors.size;M.forEach(P=>{this._diffEditors.delete(P)}),this._diffEditors.size}onDocModelContentChangedEvent(M){this.eventBus.fire(new u.ResourceDecorationNeedChangeEvent({uri:M.payload.uri,decoration:{dirty:!!M.payload.dirty,readOnly:!!M.payload.readonly}}))}};e.EditorCollectionServiceImpl=p,n.__decorate([(0,s.Autowired)(),n.__metadata("design:type",b.MonacoService)],p.prototype,"monacoService",void 0),n.__decorate([(0,s.Autowired)(s.INJECTOR_TOKEN),n.__metadata("design:type",s.Injector)],p.prototype,"injector",void 0),n.__decorate([(0,s.Autowired)(E.IConfigurationService),n.__metadata("design:type",Object)],p.prototype,"configurationService",void 0),n.__decorate([(0,s.Autowired)(d.IEditorFeatureRegistry),n.__metadata("design:type",l.EditorFeatureRegistryImpl)],p.prototype,"editorFeatureRegistry",void 0),n.__decorate([(0,s.Autowired)(r.IEditorDocumentModelService),n.__metadata("design:type",Object)],p.prototype,"documentModelService",void 0),n.__decorate([(0,g.OnEvent)(r.EditorDocumentModelContentChangedEvent),n.__metadata("design:type",Function),n.__metadata("design:paramtypes",[r.EditorDocumentModelContentChangedEvent]),n.__metadata("design:returntype",void 0)],p.prototype,"onDocModelContentChangedEvent",null),e.EditorCollectionServiceImpl=p=n.__decorate([(0,s.Injectable)(),n.__metadata("design:paramtypes",[])],p);function v(R,M,O,P){const L=R.getContribution("snippetController2"),N=O.map(k=>new _.Selection(k.startLineNumber,k.startColumn,k.endLineNumber,k.endColumn));R.setSelections(N),R.focus(),L.insert(M,0,0,P.undoStopBefore,P.undoStopAfter)}function y(R,M,O){R.updateOptions(M),R.getModel()&&R.getModel().updateOptions(O)}let S=class extends g.WithEventBus{get currentUri(){return this.currentDocumentModel?this.currentDocumentModel.uri:null}getId(){return this.monacoEditor.getId()}getSelections(){return this.monacoEditor.getSelections()||[]}disableSelectionEmitter(){this._disableSelectionEmitter=!0}enableSelectionEmitter(){this._disableSelectionEmitter=!1}constructor(M,O){super(),this.monacoEditor=M,this.type=O,this.onFocus=this.monacoEditor.onDidFocusEditorWidget,this.onBlur=this.monacoEditor.onDidBlurEditorWidget,this._specialEditorOptions={},this._specialModelOptions={},this._editorOptionsFromContribution={},this._disableSelectionEmitter=!1,this.decorationApplier=this.injector.get(c.MonacoEditorDecorationApplier,[this.monacoEditor]),this.addDispose(this.monacoEditor.onDidChangeModel(this.onDidChangeModel.bind(this))),this.addDispose(this.monacoEditor.onDidChangeModelLanguage(()=>{this._doUpdateOptions()})),this.addDispose(this.configurationService.onDidChangeConfiguration(P=>{Array.from(P.affectedKeys.values()).filter(N=>(0,a.isEditorOption)(N)).length>0&&this._doUpdateOptions()}))}async onDidChangeModel(){this._editorOptionsFromContribution={};const M=this.currentUri;M&&Promise.resolve(this.editorFeatureRegistry.runProvideEditorOptionsForUri(M)).then(O=>{!this.currentUri||!M.isEqual(this.currentUri)||O&&Object.keys(O).length>0&&(this._editorOptionsFromContribution=O,(0,g.isEmptyObject)(this._editorOptionsFromContribution)||this._doUpdateOptions())})}getType(){return this.type}updateOptions(M={},O={}){this._specialEditorOptions=m({...this._specialEditorOptions,...M}),this._specialModelOptions=m({...this._specialModelOptions,...O}),this._doUpdateOptions()}_doUpdateOptions(){const{editorOptions:M,modelOptions:O}=this._calculateFinalOptions();y(this.monacoEditor,M,O)}_calculateFinalOptions(){var M;const O=this.currentUri?this.currentUri.toString():void 0,P=this.currentDocumentModel?this.currentDocumentModel.languageId:void 0,L=(0,a.getConvertedMonacoOptions)(this.configurationService,O,P,void 0);let k={...{readOnly:((M=this.currentDocumentModel)===null||M===void 0?void 0:M.readonly)||!1},...L.editorOptions,...this._editorOptionsFromContribution,...this._specialEditorOptions};return this.type!==u.EditorType.CODE&&(k={...k,...L.diffOptions}),{editorOptions:k,modelOptions:{...L.modelOptions,...this._specialModelOptions}}}insertSnippet(M,O,P){v(this.monacoEditor,M,O,P)}applyDecoration(M,O){this.decorationApplier.applyDecoration(M,O)}onSelectionsChanged(M){return this.monacoEditor.onDidChangeCursorSelection(O=>{this._disableSelectionEmitter||M({selections:this.getSelections(),source:O.source})})}onVisibleRangesChanged(M){const O=new g.Disposable,P=this.monacoEditor;return O.addDispose(P.onDidScrollChange(L=>{M(this.monacoEditor.getVisibleRanges())})),O.addDispose(P.onDidLayoutChange(L=>{M(this.monacoEditor.getVisibleRanges())})),O}setSelections(M){return this.monacoEditor.setSelections(M)}setSelection(M){return this.monacoEditor.setSelection(M)}async save(){this.currentDocumentModel&&await this.currentDocumentModel.save()}onConfigurationChanged(M){return this.monacoEditor.onDidChangeConfiguration(P=>{M()})}};e.BaseMonacoEditorWrapper=S,n.__decorate([(0,s.Autowired)(d.IEditorFeatureRegistry),n.__metadata("design:type",Object)],S.prototype,"editorFeatureRegistry",void 0),n.__decorate([(0,s.Autowired)(E.IConfigurationService),n.__metadata("design:type",Object)],S.prototype,"configurationService",void 0),n.__decorate([(0,s.Autowired)(s.INJECTOR_TOKEN),n.__metadata("design:type",s.Injector)],S.prototype,"injector",void 0),e.BaseMonacoEditorWrapper=S=n.__decorate([(0,s.Injectable)({multiple:!0}),n.__metadata("design:paramtypes",[Object,Object])],S);let A=class extends S{get currentDocumentModel(){return this._currentDocumentModelRef&&!this._currentDocumentModelRef.disposed?this._currentDocumentModelRef.instance:null}getType(){return u.EditorType.CODE}constructor(M,O={}){super(M,u.EditorType.CODE),this.monacoEditor=M,this.editorState=new Map,this._onCursorPositionChanged=new g.Emitter,this.onCursorPositionChanged=this._onCursorPositionChanged.event,this._onRefOpen=new g.Emitter,this.onRefOpen=this._onRefOpen.event,this._specialEditorOptions=O,this.collectionService.addEditors([this]);const P=M.onDidChangeModel(()=>{D(this.monacoEditor.getDomNode()),P.dispose()});this.addDispose(M.onDidChangeCursorPosition(()=>{if(!this.currentDocumentModel)return;const L=M.getSelection();this._onCursorPositionChanged.fire({position:M.getPosition(),selectionLength:L?this.currentDocumentModel.getMonacoModel().getValueInRange(L).length:0})})),this.addDispose(this.monacoEditor)}layout(M,O=!1){this.monacoEditor.layout(M,O)}focus(){this.monacoEditor.focus()}dispose(){super.dispose(),this.saveCurrentState(),this.collectionService.removeEditors([this])}saveCurrentState(){if(this.currentUri){const M=this.monacoEditor.saveViewState();M&&this.editorState.set(this.currentUri.toString(),M)}}restoreState(){if(this.currentUri){const M=this.editorState.get(this.currentUri.toString());(0,h.isTextEditorViewState)(M)&&this.monacoEditor.restoreViewState(M)}}open(M){this.saveCurrentState(),this._currentDocumentModelRef=M;const O=this.currentDocumentModel.getMonacoModel();this.disableSelectionEmitter(),this.monacoEditor.setModel(O),this.enableSelectionEmitter(),this.restoreState(),this._onRefOpen.fire(M),this._onCursorPositionChanged.fire({position:this.monacoEditor.getPosition(),selectionLength:0});const{instance:P}=M;this.updateOptions(),this.eventBus.fire(new u.ResourceDecorationNeedChangeEvent({uri:P.uri,decoration:{readOnly:P.readonly}}))}};e.BrowserCodeEditor=A,n.__decorate([(0,s.Autowired)(u.EditorCollectionService),n.__metadata("design:type",p)],A.prototype,"collectionService",void 0),n.__decorate([(0,s.Autowired)(d.IEditorFeatureRegistry),n.__metadata("design:type",Object)],A.prototype,"editorFeatureRegistry",void 0),e.BrowserCodeEditor=A=n.__decorate([(0,s.Injectable)({multiple:!0}),n.__metadata("design:paramtypes",[Object,Object])],A);class T extends g.WithEventBus{get originalDocModel(){return this.originalDocModelRef&&!this.originalDocModelRef.disposed?this.originalDocModelRef.instance:null}get modifiedDocModel(){return this.modifiedDocModelRef&&!this.modifiedDocModelRef.disposed?this.modifiedDocModelRef.instance:null}saveCurrentState(){if(this.currentUri){const M=this.monacoDiffEditor.saveViewState();M&&this.editorState.set(this.currentUri.toString(),M)}}restoreState(M){if(this.currentUri){const O=this.editorState.get(this.currentUri.toString());(0,h.isTextEditorViewState)(O)&&((M.range||M.originalRange)&&(O.modified.cursorState=[]),this.monacoDiffEditor.restoreViewState(O))}}constructor(M,O={}){super(),this.monacoDiffEditor=M,this.specialOptions=O,this.editorState=new Map,this._onRefOpen=new g.Emitter,this.onRefOpen=this._onRefOpen.event,this.wrapEditors(),this.addDispose(this.configurationService.onDidChangeConfiguration(P=>{Array.from(P.affectedKeys.values()).filter(N=>(0,a.isDiffEditorOption)(N)).length>0&&this.updateDiffOptions()}))}async compare(M,O,P={},L){if(this.saveCurrentState(),this.originalDocModelRef=M,this.modifiedDocModelRef=O,!this.originalDocModel||!this.modifiedDocModel)return;const N=this.originalDocModel.getMonacoModel(),k=this.modifiedDocModel.getMonacoModel(),B=this.monacoDiffEditor.createViewModel({original:N,modified:k});if(this.monacoDiffEditor.setModel(B),L?this.currentUri=L:this.currentUri=g.URI.from({scheme:u.DIFF_SCHEME,query:g.URI.stringifyQuery({name,original:this.originalDocModel.uri.toString(),modified:this.modifiedDocModel.uri.toString()})}),await B?.waitForDiff(),this.restoreState(P),P.range||P.originalRange){const W=P.range||P.originalRange,V=P.range?this.modifiedEditor.monacoEditor:this.originalEditor.monacoEditor;setTimeout(()=>{V.revealRangeInCenter(W),V.setSelection(W)}),g.Event.once(this.monacoDiffEditor.onDidUpdateDiff)(()=>{V.setSelection(W),setTimeout(()=>{V.revealRangeInCenter(W)})})}this._onRefOpen.fire(M),this._onRefOpen.fire(O);const F=this.preferenceService.get("diffEditor.hideUnchangedRegions.enabled");if(P.revealFirstDiff&&!F){const W=this.monacoDiffEditor.getLineChanges();if(W&&W.length>0)this.showFirstDiff(B);else{const V=this.monacoDiffEditor.onDidUpdateDiff(()=>{this.showFirstDiff(B),V.dispose()})}}await this.updateOptionsOnModelChange(),this.diffResourceKeys.forEach(W=>W.set(this.currentUri))}async showFirstDiff(M){await M?.waitForDiff(),this.monacoDiffEditor.revealFirstDiff()}async updateOptionsOnModelChange(){await this.doUpdateDiffOptions()}isReadonly(){var M;return!!(!((M=this.modifiedDocModel)===null||M===void 0)&&M.readonly)}async doUpdateDiffOptions(){const M=this.modifiedEditor.currentUri?this.modifiedEditor.currentUri.toString():void 0,O=this.modifiedEditor.currentDocumentModel?this.modifiedEditor.currentDocumentModel.languageId:void 0,P=(0,a.getConvertedMonacoOptions)(this.configurationService,M,O),L=this.isReadonly();this.monacoDiffEditor.updateOptions({...P.diffOptions,...this.specialOptions,readOnly:L,renderMarginRevertIcon:!L}),this.currentUri&&this.eventBus.fire(new u.ResourceDecorationNeedChangeEvent({uri:this.currentUri,decoration:{readOnly:this.isReadonly()}}))}updateDiffOptions(){this.doUpdateDiffOptions()}getLineChanges(){const M=this.monacoDiffEditor.getLineChanges();return M?M.map(O=>{var P;return[O.originalStartLineNumber,O.originalEndLineNumber,O.modifiedStartLineNumber,O.modifiedEndLineNumber,(P=O.charChanges)===null||P===void 0?void 0:P.map(L=>[L.originalStartLineNumber,L.originalStartColumn,L.originalEndLineNumber,L.originalEndColumn,L.modifiedStartLineNumber,L.modifiedStartColumn,L.modifiedEndLineNumber,L.modifiedEndColumn])]}):null}wrapEditors(){const M=this;this.originalEditor=this.injector.get(I,[M.monacoDiffEditor.getOriginalEditor(),()=>M.originalDocModel,u.EditorType.ORIGINAL_DIFF]),this.modifiedEditor=this.injector.get(I,[M.monacoDiffEditor.getModifiedEditor(),()=>M.modifiedDocModel,u.EditorType.MODIFIED_DIFF]),this.collectionService.addEditors([this.originalEditor,this.modifiedEditor]),this.collectionService.addDiffEditors([this]);const O=this.contextKeyService.createScoped(this.modifiedEditor.monacoEditor._contextKeyService),P=this.contextKeyService.createScoped(this.originalEditor.monacoEditor._contextKeyService);this.diffResourceKeys=[new f.ResourceContextKey(O,void 0,"diffResource"),new f.ResourceContextKey(P,void 0,"diffResource")]}layout(){return this.monacoDiffEditor.layout()}focus(){this.monacoDiffEditor.focus()}dispose(){super.dispose(),this.collectionService.removeEditors([this.originalEditor,this.modifiedEditor]),this.collectionService.removeDiffEditors([this]),this.monacoDiffEditor.dispose(),this._disposed=!0}}e.BrowserDiffEditor=T,n.__decorate([(0,s.Autowired)(u.EditorCollectionService),n.__metadata("design:type",p)],T.prototype,"collectionService",void 0),n.__decorate([(0,s.Autowired)(o.AppConfig),n.__metadata("design:type",Object)],T.prototype,"appConfig",void 0),n.__decorate([(0,s.Autowired)(s.INJECTOR_TOKEN),n.__metadata("design:type",s.Injector)],T.prototype,"injector",void 0),n.__decorate([(0,s.Autowired)(E.IConfigurationService),n.__metadata("design:type",Object)],T.prototype,"configurationService",void 0),n.__decorate([(0,s.Autowired)(o.PreferenceService),n.__metadata("design:type",Object)],T.prototype,"preferenceService",void 0),n.__decorate([(0,s.Autowired)(o.IContextKeyService),n.__metadata("design:type",Object)],T.prototype,"contextKeyService",void 0);function D(R){R.addEventListener("mousewheel",w)}function w(R){R.preventDefault(),R.stopPropagation(),(this.offsetWidth+this.scrollLeft+R.deltaX>this.scrollWidth||this.scrollLeft+R.deltaX<0)&&(R.preventDefault(),R.stopPropagation())}let I=class extends S{get currentDocumentModel(){return this.getDocumentModel()}constructor(M,O,P){super(M,P),this.getDocumentModel=O}};e.DiffEditorPart=I,e.DiffEditorPart=I=n.__decorate([(0,s.Injectable)({multiple:!0}),n.__metadata("design:paramtypes",[Object,Function,Object])],I)},17315:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EditorElectronContribution=void 0;const n=t(85608),s=t(76003),o=t(41869),f=t(43718),b=t(37406),g=t(23418),_=t(96689),E=t(82196),u=t(51553);let h=class extends f.WithEventBus{onResourceDecorationChangeEvent(){const r=this.workbenchEditorService.hasDirty();this.electronMainUIService.setDocumentEdited(o.electronEnv.currentWindowId,!!r)}async onWillStop(){return!!(await this.workbenchEditorService.closeAllOnlyConfirmOnce()||!this.cacheProvider.isFlushed())}registerKeybindings(r){r.registerKeybinding({command:o.EDITOR_COMMANDS.NEXT.id,keybinding:"ctrl+tab"}),r.registerKeybinding({command:o.EDITOR_COMMANDS.PREVIOUS.id,keybinding:"ctrl+shift+tab"}),f.isOSX&&(r.registerKeybinding({command:o.EDITOR_COMMANDS.NEXT.id,keybinding:"ctrlcmd+shift+]"}),r.registerKeybinding({command:o.EDITOR_COMMANDS.PREVIOUS.id,keybinding:"ctrlcmd+shift+["}))}};e.EditorElectronContribution=h,n.__decorate([(0,s.Autowired)(s.INJECTOR_TOKEN),n.__metadata("design:type",s.Injector)],h.prototype,"injector",void 0),n.__decorate([(0,s.Autowired)(g.WorkbenchEditorService),n.__metadata("design:type",u.WorkbenchEditorServiceImpl)],h.prototype,"workbenchEditorService",void 0),n.__decorate([(0,s.Autowired)(g.IDocPersistentCacheProvider),n.__metadata("design:type",Object)],h.prototype,"cacheProvider",void 0),n.__decorate([(0,s.Autowired)(_.IEditorDocumentModelContentRegistry),n.__metadata("design:type",Object)],h.prototype,"contentRegistry",void 0),n.__decorate([(0,s.Autowired)(b.IElectronMainUIService),n.__metadata("design:type",Object)],h.prototype,"electronMainUIService",void 0),n.__decorate([(0,f.OnEvent)(E.ResourceDecorationChangeEvent),n.__metadata("design:type",Function),n.__metadata("design:paramtypes",[]),n.__metadata("design:returntype",void 0)],h.prototype,"onResourceDecorationChangeEvent",null),e.EditorElectronContribution=h=n.__decorate([(0,o.Domain)(o.ClientAppContribution,o.KeybindingContribution)],h)},75522:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EditorOpener=void 0;const n=t(85608),s=t(76003),o=t(23418);let f=class{async open(g){let _;const E=/^L?(\d+)(?:,(\d+))?/.exec(g.fragment);if(E){const u=parseInt(E[1],10),h=E[2]?parseInt(E[2],10):1;_={startLineNumber:u,startColumn:h,endLineNumber:u,endColumn:h},g=g.withFragment("")}return await this.workbenchEditorService.open(g,{range:_}),!0}async handleURI(g){return this.resourceService.handlesUri(g)}handleScheme(){return!1}};e.EditorOpener=f,n.__decorate([(0,s.Autowired)(o.ResourceService),n.__metadata("design:type",o.ResourceService)],f.prototype,"resourceService",void 0),n.__decorate([(0,s.Autowired)(o.WorkbenchEditorService),n.__metadata("design:type",o.WorkbenchEditorService)],f.prototype,"workbenchEditorService",void 0),e.EditorOpener=f=n.__decorate([(0,s.Injectable)()],f)},19352:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Scroll=void 0;const n=t(85608),s=n.__importDefault(t(53373)),o=n.__importDefault(t(14041)),f=n.__importDefault(t(62251));class b extends o.default.Component{constructor(){super(...arguments),this.position={top:0,left:0},this.dragging=!1,this.draggingStart=0,this.draggingStartPos=0,this.shouldHideThumb=!0,this.isAtTop=!0,this.onMouseMoveHorizontal=_=>{if(!this.dragging)return;const E=_.pageX-this.draggingStart;this.ref.scrollLeft=this.draggingStartPos+this.calculateXToLeft(E)},this.onMouseUpHorizontal=_=>{this.dragging=!1,document.removeEventListener("mousemove",this.onMouseMoveHorizontal),document.removeEventListener("mouseup",this.onMouseUpHorizontal),this.shouldHideThumb&&this.hideThumb()},this.onMouseMoveVertical=_=>{if(!this.dragging)return;const E=_.pageY-this.draggingStart;this.ref.scrollTop=this.draggingStartPos+this.calculateYToTop(E)},this.onMouseUpVertical=_=>{this.dragging=!1,document.removeEventListener("mousemove",this.onMouseMoveVertical),document.removeEventListener("mouseup",this.onMouseUpVertical),this.shouldHideThumb&&this.hideThumb()},this.onMousewheel=_=>{this.ref.clientHeight>=this.ref.scrollHeight&&(_.deltaY!==0&&(this.ref.scrollLeft+=_.deltaY),_.deltaX!==0&&(this.ref.scrollLeft+=_.deltaX))},this.onMouseEnter=()=>{this.update()},this.handleWindowResize=()=>{this.update()},this.update=_=>{this.requestFrame&&window.cancelAnimationFrame(this.requestFrame),this.requestFrame=window.requestAnimationFrame(()=>{this._update(),_&&_()})}}onScroll(_){this.position={top:this.ref.scrollTop,left:this.ref.scrollLeft},this.props.onScroll&&this.props.onScroll(this.position),this.update(()=>{const E=this.ref.scrollWidth,u=this.ref.offsetWidth,h=this.ref.scrollHeight,c=this.ref.offsetHeight;this.thumbH.style.left=this.position.left*u/E+"px",this.thumbV.style.top=this.position.top*c/h+"px"}),!this.isAtTop&&this.ref.scrollTop===0?(this.isAtTop=!0,this.setCss()):this.isAtTop&&this.ref.scrollTop!==0&&(this.isAtTop=!1,this.setCss()),this.ref.scrollLeft>0?(this.decorationL.style.opacity=String(1),this.decorationR.style.opacity=String(1)):this.decorationL.style.opacity=String(0),(this.ref.scrollWidth===this.ref.offsetWidth||this.ref.scrollLeft===this.ref.scrollWidth-this.ref.offsetWidth)&&(this.decorationR.style.opacity=String(0))}scrollTo(_){this.ref.scrollLeft=_.left,this.ref.scrollTop=_.top}onMouseDownHorizontal(_){this.dragging=!0,_.target===this.trackH&&this.onMouseDownOnTrack(_),this.draggingStart=_.pageX,this.draggingStartPos=this.ref.scrollLeft,document.addEventListener("mousemove",this.onMouseMoveHorizontal),document.addEventListener("mouseup",this.onMouseUpHorizontal)}onMouseDownOnTrack(_){const E=_.target,u=_.clientX-E.getBoundingClientRect().left,h=this.ref.scrollWidth,c=this.ref.offsetWidth,r=u*h/c-.5*c;this.scrollTo({left:r,top:this.position.top})}calculateXToLeft(_){const E=this.ref.scrollWidth,u=this.ref.offsetWidth;return _*E/u}onMouseDownVertical(_){this.dragging=!0,_.target===this.trackV&&this.onMouseDownOnTrackVertical(_),this.draggingStart=_.pageY,this.draggingStartPos=this.ref.scrollTop,document.addEventListener("mousemove",this.onMouseMoveVertical),document.addEventListener("mouseup",this.onMouseUpVertical)}onMouseDownOnTrackVertical(_){const E=_.target,u=_.clientY-E.getBoundingClientRect().top,h=this.ref.scrollHeight,c=this.ref.offsetHeight,r=u*h/c-.5*c;this.scrollTo({left:this.position.left,top:r})}calculateYToTop(_){const E=this.ref.scrollHeight,u=this.ref.offsetHeight;return _*E/u}componentDidUpdate(){this.update(),this.props.delegate&&this.props.delegate({scrollTo:this.scrollTo.bind(this)})}componentDidMount(){this.update(),window.addEventListener("resize",this.handleWindowResize),this.props.delegate&&this.props.delegate({scrollTo:this.scrollTo.bind(this)}),this.ref&&(this.ref.addEventListener("mouseenter",this.onMouseEnter),this.ref.addEventListener("wheel",this.onMousewheel))}componentWillUnmount(){this.ref&&(this.ref.removeEventListener("mouseenter",this.onMouseEnter),this.ref.removeEventListener("wheel",this.onMousewheel)),window.removeEventListener("resize",this.handleWindowResize),this.requestFrame&&window.cancelAnimationFrame(this.requestFrame)}sizeEqual(_,E){return _&&E&&_.offsetHeight===E.offsetHeight&&_.scrollHeight===E.scrollHeight&&_.offsetWidth===E.offsetWidth&&_.scrollWidth===E.scrollWidth}_update(){this.ref&&(this.sizeEqual(this.size,this.ref)||(this.size={offsetHeight:this.ref.offsetHeight,offsetWidth:this.ref.offsetWidth,scrollWidth:this.ref.scrollWidth,scrollHeight:this.ref.scrollHeight},this.updateScrollBar()))}updateScrollBar(){const _=this.ref.scrollWidth,E=this.ref.offsetWidth;if(E<_){const c=E*E/_;this.thumbH.style.width=c+"px",this.trackH.parentElement.style.display="block"}else this.trackH.parentElement.style.display="none";const u=this.ref.scrollHeight,h=this.ref.offsetHeight;h<u?(this.thumbV.style.height=h*h/u+"px",this.trackV.parentElement.style.display="block"):this.trackV.parentElement.style.display="none"}hideThumb(){this.shouldHideThumb=!0,this.dragging||this.setCss()}showThumb(){this.shouldHideThumb=!1,this.setCss()}setCss(){this.container.className=(0,s.default)({[f.default.scroll]:!0,[f.default["hide-thumb"]]:this.shouldHideThumb&&!this.dragging});const _={};this.props.atTopClassName&&(_[this.props.atTopClassName]=this.isAtTop),this.props.className&&(_[this.props.className]=!0),this.ref.className=(0,s.default)(_)}render(){return o.default.createElement("div",{className:(0,s.default)(f.default.scroll,f.default["hide-thumb"]),ref:_=>{_&&(this.container=_,this.props.forwardedRef(_))},onMouseMove:()=>this.showThumb(),onMouseLeave:()=>this.hideThumb(),style:this.props.containerStyle},o.default.createElement("div",{style:this.props.style,className:(0,s.default)(this.props.className),onScroll:this.onScroll.bind(this),ref:_=>_&&(this.ref=_),onMouseDown:()=>this.update(),onMouseUp:()=>this.update()},this.props.children),o.default.createElement("div",{className:f.default["scrollbar-decoration-vertical-l"],ref:_=>_&&(this.decorationL=_)}),o.default.createElement("div",{className:f.default["scrollbar-decoration-vertical-r"],ref:_=>_&&(this.decorationR=_)}),o.default.createElement("div",{className:f.default["scroll-horizontal"]},o.default.createElement("div",{className:f.default["track-horizontal"],ref:_=>_&&(this.trackH=_),onMouseDown:this.onMouseDownHorizontal.bind(this)}),o.default.createElement("div",{className:"kt-editor-scrollbar-thumb-horizontal",onMouseDown:this.onMouseDownHorizontal.bind(this),ref:_=>_&&(this.thumbH=_)})),o.default.createElement("div",{className:f.default["scroll-vertical"]},o.default.createElement("div",{className:f.default["track-vertical"],ref:_=>_&&(this.trackV=_),onMouseDown:this.onMouseDownVertical.bind(this)}),o.default.createElement("div",{className:"kt-editor-scrollbar-thumb-vertical",onMouseDown:this.onMouseDownVertical.bind(this),ref:_=>_&&(this.thumbV=_)})))}}e.Scroll=b},93669:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EditorContext=e.defaultEditorContext=void 0;const s=t(85608).__importDefault(t(14041));e.defaultEditorContext={minimapWidth:108},e.EditorContext=s.default.createContext(e.defaultEditorContext)},60362:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EditorAutoSaveEditorContribution=e.EditorContribution=void 0;const n=t(85608),s=t(76003),o=t(41869),f=t(68456),b=t(93899),g=t(1237),_=t(77661),E=t(75524),u=t(43718),h=t(96177),c=t(62660),r=n.__importStar(t(84555)),l=t(94170),a=t(87423),d=t(96640),m=t(23418),p=t(55113),v=t(89618),y=t(96689),S=t(75522),A=t(93152),T=t(8287),D=t(14385),w=t(57719),I=t(85857),R=t(95338),M=t(94617),O=t(93532),P=t(53135),L=t(50236),N=t(82196),k=t(6670),B=t(67903),F=t(51553);let W=class extends o.Disposable{registerComponent(G){G.register("@opensumi/ide-editor",{id:"ide-editor",component:D.EditorView}),G.register("breadcrumb-menu",{id:"breadcrumb-menu",component:O.NavigationMenuContainer})}registerOverrideService(G){const K=this.injector.get(A.MonacoCodeService),j=this.injector.get(o.IContextKeyService).createScoped();this.workbenchEditorService.setEditorContextKeyService(j),G.registerOverrideService(o.ServiceNames.CONTEXT_KEY_SERVICE,j.contextKeyService),G.registerOverrideService(o.ServiceNames.CODE_EDITOR_SERVICE,K),G.registerOverrideService(o.ServiceNames.CONTEXT_VIEW_SERVICE,new A.MonacoContextViewService(K)),G.registerOverrideService(o.ServiceNames.TEXT_MODEL_SERVICE,this.injector.get(v.MonacoTextModelService))}registerMonacoDefaultFormattingSelector(G){const K=this.injector.get(I.FormattingSelector);this.addDispose(G(K.selectFormatter.bind(K)))}registerEditorExtensionContribution(G){G(M.EditorContextMenuController.ID,new d.SyncDescriptor(M.EditorContextMenuController,[this.contextMenuService,this.globalContextKeyService,this.contextMenuRenderer]))}getMimeForMode(G){for(const K of this.textmateService.getLanguages())if(K.id===G&&K.mimetypes)return K.mimetypes[0]}registerPlatformLanguageAssociations(G){const K=this.corePreferences["files.associations"];if(!K)return;const z=Object.keys(K).map(j=>({id:K[j],filepattern:j,mime:this.getMimeForMode(K[j])||`text/x-${K.id}`}));G(z)}async interceptOpen(G){try{return await this.openerService.open(G),!0}catch(K){return this.logger.error(K),!1}}onWillStop(G){if(!this.appConfig.isElectronRenderer)return this.workbenchEditorService.hasDirty()||!this.cacheProvider.isFlushed()}extractGroupAndUriFromArgs(G,K){let z,j;if(G instanceof o.URI)z=K||this.workbenchEditorService.currentEditorGroup,j=G||z&&z.currentResource&&z.currentResource.uri;else{const U=G||{};z=U.group||this.workbenchEditorService.currentEditorGroup,j=U.uri||z&&z.currentResource&&z.currentResource.uri}return{group:z,uri:j}}isElectronRenderer(){return this.appConfig.isElectronRenderer}registerKeybindings(G){G.registerKeybinding({command:o.EDITOR_COMMANDS.SAVE_CURRENT.id,keybinding:"ctrlcmd+s"}),G.registerKeybinding({command:o.EDITOR_COMMANDS.FOCUS_IF_NOT_ACTIVATE_ELEMENT.id,keybinding:"ctrlcmd+f",when:"!editorFocus"}),G.registerKeybinding({command:o.EDITOR_COMMANDS.CLOSE.id,keybinding:this.isElectronRenderer()?"ctrlcmd+w":"alt+shift+w"}),G.registerKeybinding({command:o.EDITOR_COMMANDS.PREVIOUS.id,keybinding:this.isElectronRenderer()?"alt+cmd+left":"ctrlcmd+ctrl+left"}),G.registerKeybinding({command:o.EDITOR_COMMANDS.NEXT.id,keybinding:this.isElectronRenderer()?"alt+cmd+right":"ctrlcmd+ctrl+right"}),G.registerKeybinding({command:o.EDITOR_COMMANDS.PREVIOUS.id,keybinding:this.isElectronRenderer()?"ctrlcmd+pageup":"alt+pageup"}),G.registerKeybinding({command:o.EDITOR_COMMANDS.NEXT.id,keybinding:this.isElectronRenderer()?"ctrlcmd+pagedown":"alt+pagedown"}),G.registerKeybinding({command:o.EDITOR_COMMANDS.GO_FORWARD.id,keybinding:u.isWindows?"alt+right":"ctrl+shift+-"}),G.registerKeybinding({command:o.EDITOR_COMMANDS.GO_BACK.id,keybinding:u.isWindows?"alt+left":"ctrl+-"}),G.registerKeybinding({command:o.EDITOR_COMMANDS.CHANGE_LANGUAGE.id,keybinding:"ctrlcmd+k m"}),G.registerKeybinding({command:o.EDITOR_COMMANDS.SPLIT_TO_RIGHT.id,keybinding:"ctrlcmd+\\"}),G.registerKeybinding({command:o.EDITOR_COMMANDS.NAVIGATE_NEXT.id,keybinding:"ctrlcmd+k ctrlcmd+right"}),G.registerKeybinding({command:o.EDITOR_COMMANDS.NAVIGATE_PREVIOUS.id,keybinding:"ctrlcmd+k ctrlcmd+left"}),G.registerKeybinding({command:o.EDITOR_COMMANDS.SAVE_ALL.id,keybinding:"alt+ctrlcmd+s"}),G.registerKeybinding({command:o.EDITOR_COMMANDS.CLOSE_ALL_IN_GROUP.id,keybinding:"ctrlcmd+k w"}),G.registerKeybinding({command:o.EDITOR_COMMANDS.CLOSE_ALL.id,keybinding:"ctrlcmd+k ctrlcmd+w"}),G.registerKeybinding({command:o.EDITOR_COMMANDS.CLOSE_SAVED.id,keybinding:"ctrlcmd+k u"}),G.registerKeybinding({command:o.EDITOR_COMMANDS.PIN_CURRENT.id,keybinding:"ctrlcmd+k enter"}),G.registerKeybinding({command:o.EDITOR_COMMANDS.COPY_CURRENT_PATH.id,keybinding:"ctrlcmd+k p"}),G.registerKeybinding({command:o.EDITOR_COMMANDS.REOPEN_CLOSED.id,keybinding:this.isElectronRenderer()?"ctrlcmd+shift+t":"alt+shift+t"}),G.registerKeybinding({command:o.EDITOR_COMMANDS.NEW_UNTITLED_FILE.id,keybinding:this.isElectronRenderer()?"ctrlcmd+n":"alt+n"}),G.registerKeybinding({command:o.EDITOR_COMMANDS.SEARCH_WORKSPACE_SYMBOL.id,keybinding:this.isElectronRenderer()?"ctrlcmd+t":"ctrlcmd+o"}),G.registerKeybinding({command:o.EDITOR_COMMANDS.SEARCH_WORKSPACE_SYMBOL_CLASS.id,keybinding:this.isElectronRenderer()?"ctrlcmd+alt+t":"ctrlcmd+alt+o"});for(let K=1;K<10;K++)G.registerKeybinding({command:o.EDITOR_COMMANDS.GO_TO_GROUP.id,keybinding:"ctrlcmd+"+K,args:[K]});["left","up","down","right"].forEach(K=>{G.registerKeybinding({command:o.EDITOR_COMMANDS.MOVE_GROUP.id,keybinding:"ctrlcmd+k "+K,args:[K]})}),G.registerKeybinding({command:o.EDITOR_COMMANDS.COMPONENT_UNDO.id,keybinding:"ctrlcmd+z",when:"inEditorComponent && !inputFocus"}),G.registerKeybinding({command:o.EDITOR_COMMANDS.COMPONENT_REDO.id,keybinding:"shift+ctrlcmd+z",when:"inEditorComponent && !inputFocus"}),G.registerKeybinding({command:o.EDITOR_COMMANDS.TOGGLE_WORD_WRAP.id,keybinding:"alt+z",when:"editorFocus"})}initialize(){this.editorStatusBarService.setListener(),this.historyService.init()}registerCommands(G){G.registerCommand(o.EDITOR_COMMANDS.GO_FORWARD,{execute:()=>{this.historyService.forward()}}),G.registerCommand(o.EDITOR_COMMANDS.FOCUS_IF_NOT_ACTIVATE_ELEMENT,{execute:()=>{var K,z;if(!document.activeElement||document.activeElement===document.body){const j=this.workbenchEditorService.currentEditorGroup;j?.focus(),(z=(K=j?.currentCodeEditor)===null||K===void 0?void 0:K.monacoEditor)===null||z===void 0||z.trigger("api","actions.find",null)}}}),G.registerCommand(o.EDITOR_COMMANDS.GO_BACK,{execute:()=>{this.historyService.back()}}),G.registerCommand(o.EDITOR_COMMANDS.OPEN_RESOURCE,{execute:async(K,z)=>{const j=await this.workbenchEditorService.open(K,z);if(j)return{groupId:j?.group.name}}}),G.registerCommand(o.EDITOR_COMMANDS.OPEN_RESOURCES,{execute:({uris:K})=>{this.workbenchEditorService.openUris(K)}}),G.registerCommand(o.EDITOR_COMMANDS.COMPARE,{execute:({original:K,modified:z,name:j},U={})=>(j=j||`${K.displayName} <=> ${z.displayName}`,this.workbenchEditorService.open(o.URI.from({scheme:m.DIFF_SCHEME,query:o.URI.stringifyQuery({name:j,original:K,modified:z})}),U))}),G.registerCommand(o.EDITOR_COMMANDS.OPEN_MERGEEDITOR_DEV,{execute:async()=>{try{const K=await this.quickInputService.open({value:""});if(!K)return;const z=JSON.parse(K);this.commandService.executeCommand(o.EDITOR_COMMANDS.OPEN_MERGEEDITOR.id,z)}catch{}}}),G.registerCommand(o.EDITOR_COMMANDS.OPEN_MERGEEDITOR,{execute:K=>{const z=E.IRelaxedOpenMergeEditorArgs.validate(K);this.workbenchEditorService.open(o.URI.from({scheme:"mergeEditor",query:o.URI.stringifyQuery({name:(0,o.formatLocalize)("mergeEditor.workbench.tab.name",z.output.displayName),openMetadata:E.IRelaxedOpenMergeEditorArgs.toString(z)})}))}}),G.registerCommand(o.EDITOR_COMMANDS.MERGEEDITOR_RESET,{execute:()=>{const K=this.mergeEditorService.getNutrition();if(!K)return;const{output:z}=K,{uri:j}=z;this.mergeEditorService.fireRestoreState(j),this.mergeEditorService.compare()}}),G.registerCommand(o.EDITOR_COMMANDS.SAVE_CURRENT,{execute:async()=>{const K=this.workbenchEditorService.currentEditorGroup;K&&K.currentResource&&(K.pin(K.currentResource.uri),K.saveCurrent())}}),G.registerCommand(o.EDITOR_COMMANDS.SAVE_URI,{execute:async K=>{for(const z of this.workbenchEditorService.editorGroups){const j=z.resources.find(U=>U.uri.isEqual(K));j&&z.saveResource(j)}}}),G.registerCommand(o.EDITOR_COMMANDS.CLOSE_ALL_IN_GROUP,{execute:async(K,z)=>{const{group:j}=this.extractGroupAndUriFromArgs(K,z);j&&await j.closeAll()}}),G.registerCommand(o.EDITOR_COMMANDS.CLOSE_SAVED,{execute:async K=>{K=K||{};const{group:z=this.workbenchEditorService.currentEditorGroup}=K;z&&await z.closeSaved()}}),G.registerCommand(o.EDITOR_COMMANDS.CLOSE_OTHER_IN_GROUP,{execute:async K=>{K=K||{};const{group:z=this.workbenchEditorService.currentEditorGroup,uri:j=z&&z.currentResource&&z.currentResource.uri}=K;z&&j&&await z.closeOthers(j)}}),G.registerCommand(o.EDITOR_COMMANDS.CLOSE,{execute:async K=>{K=K||{};const{group:z=this.workbenchEditorService.currentEditorGroup,uri:j=z&&z.currentResource&&z.currentResource.uri}=K;z&&j&&await z.close(j)}}),G.registerCommand(o.EDITOR_COMMANDS.CLOSE_TO_RIGHT,{execute:async K=>{K=K||{};const{group:z=this.workbenchEditorService.currentEditorGroup,uri:j=z&&z.currentResource&&z.currentResource.uri}=K;z&&j&&await z.closeToRight(j)}}),G.registerCommand(o.EDITOR_COMMANDS.GET_CURRENT,{execute:()=>this.workbenchEditorService.currentEditorGroup}),G.registerCommand(o.EDITOR_COMMANDS.GET_CURRENT_RESOURCE,{execute:()=>this.workbenchEditorService.currentResource}),G.registerCommand(o.EDITOR_COMMANDS.PIN_CURRENT,{execute:()=>{const K=this.workbenchEditorService.currentEditorGroup;K&&K.pinPreviewed()}}),G.registerCommand(o.EDITOR_COMMANDS.COPY_CURRENT_PATH,{execute:()=>{const K=this.workbenchEditorService.currentResource;K&&K.uri.scheme===o.Schemes.file&&this.clipboardService.writeText(K.uri.codeUri.fsPath)}}),G.registerCommand(o.EDITOR_COMMANDS.SPLIT_TO_LEFT,{execute:async K=>{K=K||{};const{group:z=this.workbenchEditorService.currentEditorGroup,uri:j=z&&z.currentResource&&z.currentResource.uri}=K;z&&j&&await z.split(m.EditorGroupSplitAction.Left,j,{focus:!0})}}),G.registerCommand(o.EDITOR_COMMANDS.SPLIT_TO_RIGHT,{execute:async(K,z)=>{const{group:j,uri:U}=this.extractGroupAndUriFromArgs(K,z);j&&U&&await j.split(m.EditorGroupSplitAction.Right,U,{focus:!0})}}),G.registerCommand(o.EDITOR_COMMANDS.GO_TO_GROUP,{execute:async(K=1)=>{var z;const j=this.workbenchEditorService.sortedEditorGroups[K-1];if(j){j.focus();return}const U=this.workbenchEditorService.sortedEditorGroups.length;if(U===K-1){const $=this.workbenchEditorService.sortedEditorGroups[U-1],Y=(z=$?.currentResource)===null||z===void 0?void 0:z.uri;$&&Y&&await $.split(m.EditorGroupSplitAction.Right,Y,{focus:!0})}}}),G.registerCommand(o.EDITOR_COMMANDS.MOVE_GROUP,{execute:async K=>{if(K){const z=this.workbenchEditorService.currentEditorGroup;z&&z.grid.move(K)}}}),G.registerCommand(o.EDITOR_COMMANDS.FOCUS_ACTIVE_EDITOR_GROUP,{execute:async()=>{const K=this.workbenchEditorService.currentEditorGroup;K&&K.focus()}}),G.registerCommand(o.EDITOR_COMMANDS.SPLIT_TO_TOP,{execute:async K=>{K=K||{};const{group:z=this.workbenchEditorService.currentEditorGroup,uri:j=z&&z.currentResource&&z.currentResource.uri}=K;z&&j&&await z.split(m.EditorGroupSplitAction.Top,j,{focus:!0})}}),G.registerCommand(o.EDITOR_COMMANDS.SPLIT_TO_BOTTOM,{execute:async K=>{K=K||{};const{group:z=this.workbenchEditorService.currentEditorGroup,uri:j=z&&z.currentResource&&z.currentResource.uri}=K;z&&j&&await z.split(m.EditorGroupSplitAction.Bottom,j,{focus:!0})}}),G.registerCommand(o.EDITOR_COMMANDS.CHANGE_LANGUAGE,{execute:async K=>{const j=this.languagesService.languages.map($=>({label:$.name,value:$.id,description:`(${$.id})`})),U=await this.quickPickService.show(j,{placeholder:(0,o.localize)("editor.changeLanguageId"),selectIndex:()=>j.findIndex($=>{var Y,Q;return $.value===((Q=(Y=this.workbenchEditorService.currentCodeEditor)===null||Y===void 0?void 0:Y.currentDocumentModel)===null||Q===void 0?void 0:Q.languageId)})});if(U&&K!==U&&this.workbenchEditorService.currentEditor){const $=this.workbenchEditorService.currentEditor.currentDocumentModel;$&&this.editorDocumentModelService.changeModelOptions($.uri,{languageId:U})}}}),G.registerCommand(o.EDITOR_COMMANDS.GET_ENCODING,{execute:K=>{if(!K)return;const z=this.editorDocumentModelService.getModelDescription(K);if(z)return z.encoding}}),G.registerCommand(o.EDITOR_COMMANDS.CHANGE_ENCODING,{execute:async K=>{var z,j,U,$;K=K??((z=this.workbenchEditorService.currentResource)===null||z===void 0?void 0:z.uri);const Y=(j=this.workbenchEditorService.currentEditor)===null||j===void 0?void 0:j.currentDocumentModel;if(!K)return;const Q=this.preferenceService.get("files.encoding","utf8",K.toString(),(0,o.getLanguageIdFromMonaco)(K)),te=await this.contentRegistry.getProvider(K),re=await((U=te?.guessEncoding)===null||U===void 0?void 0:U.call(te,K)),ae=this.editorDocumentModelService.getModelDescription(K),de=($=Y?.encoding)!==null&&$!==void 0?$:ae?.encoding;let q;const _e=Object.keys(o.SUPPORTED_ENCODINGS).sort((le,ie)=>le===Q?-1:ie===Q?1:o.SUPPORTED_ENCODINGS[le].order-o.SUPPORTED_ENCODINGS[ie].order).filter(le=>le===re&&re!==Q?!1:!o.SUPPORTED_ENCODINGS[le].encodeOnly).map((le,ie)=>((le===de||o.SUPPORTED_ENCODINGS[le].alias===de)&&(q=ie),{label:o.SUPPORTED_ENCODINGS[le].labelLong,value:le,description:le}));re&&Q!==re&&o.SUPPORTED_ENCODINGS[re]&&(_e[0]&&(_e[0].showBorder=!0),_e.unshift({label:o.SUPPORTED_ENCODINGS[re].labelLong,value:re,description:(0,o.localize)("editor.guessEncodingFromContent")}),typeof q=="number"&&q++);const pe=await this.quickPickService.show(_e,{placeholder:(0,o.localize)("editor.chooseEncoding"),selectIndex(le){return le?-1:typeof q=="number"?q:-1}});if(!pe)return;const J=[];if(K.scheme===m.DIFF_SCHEME){const le=await this.resourceService.getResource(K);le.metadata&&(J.push(le.metadata.original),J.push(le.metadata.modified))}else J.push(K);J.forEach(le=>{this.editorDocumentModelService.changeModelOptions(le,{encoding:pe})})}}),G.registerCommand(o.EDITOR_COMMANDS.CHANGE_EOL,{execute:async()=>{const K=this.workbenchEditorService.currentResource,z=this.workbenchEditorService.currentCodeEditor;if(z&&z.currentDocumentModel&&K){const j=await this.quickPickService.show([{label:"LF",value:`
28135
28135
  `},{label:"CRLF",value:`\r