@opensumi/cli-engine 3.0.3-next-1716360178.0 → 3.0.3

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.
@@ -27347,7 +27347,7 @@ a {
27347
27347
  color: var(--textLink-foreground);
27348
27348
  }
27349
27349
  `},73136:(x,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getMentionBoxStyle=void 0;const t=20,n=({maxRows:l=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*l}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),l=n.__importDefault(t(53373)),o=n.__importStar(t(14041)),u=t(41869),p=t(53711),h=n.__importDefault(t(65887)),E=({item:_,defaultLeftPadding:f=8,leftPadding:m=8,decorations:d,onClick:s,onTwistierClick:a})=>{const r=(0,u.useDesignStyles)(h.default.expansion_toggle,"expansion_toggle"),c=(0,o.useCallback)(I=>{_.onSelect?_.onSelect(_):s(I,_)},[s]),g=(0,o.useCallback)(I=>{a(I,_)},[a]),v=`${f+(_.depth||0)*(m||0)+(p.CommentContentNode.is(_)?16:p.CommentFileNode.is(_)?0:28)}px`,b={height:e.COMMENT_TREE_NODE_HEIGHT,lineHeight:`${e.COMMENT_TREE_NODE_HEIGHT}px`,paddingLeft:v},S=(0,o.useCallback)(I=>{if(p.CommentContentNode.is(I)||p.CommentFileNode.is(I))return o.default.createElement("div",{className:(0,l.default)(h.default.icon,I.icon),style:{height:e.COMMENT_TREE_NODE_HEIGHT,lineHeight:`${e.COMMENT_TREE_NODE_HEIGHT}px`}})},[]),y=(0,o.useCallback)(I=>p.CommentContentNode.is(I)?o.default.createElement("div",{className:(0,l.default)(h.default.segment,h.default.displayname)},I.renderedLabel?I.renderedLabel:o.default.createElement(o.default.Fragment,null,I.comment,o.default.createElement("span",{className:h.default.separator},"\xB7"),I.author.name)):o.default.createElement("div",{className:(0,l.default)(h.default.segment,h.default.displayname)},I.renderedLabel),[]),A=(0,o.useCallback)(I=>o.default.createElement("div",{className:(0,l.default)(h.default.segment_grow,h.default.description)},I.renderedDescription),[]),T=(0,o.useCallback)(I=>o.default.createElement("div",{onClick:g,className:(0,l.default)(h.default.segment,r,(0,u.getIcon)("arrow-right"),{[`${h.default.mod_collapsed}`]:!I.expanded})}),[g]),D=(0,o.useCallback)(I=>{if(p.CommentFileNode.is(I)||I?.isAllowToggle)return T(I)},[]),w=(0,o.useCallback)(()=>_.tooltip,[_]);return o.default.createElement("div",{key:_.id,onClick:c,title:w(),className:(0,l.default)(h.default.comment_node,d?d.classlist:null),style:b,"data-id":_.id},o.default.createElement("div",{className:h.default.content},D(_),S(_),o.default.createElement("div",{className:h.default.overflow_wrap},y(_),A(_))))};e.CommentNodeRendered=E,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),l=t(76003),o=t(97267),u=t(41869),p=t(23418),h=t(69635),E=t(53711),_=n.__importDefault(t(65887));let f=class extends o.TreeModel{constructor(s){super(),this.init(s)}};f=n.__decorate([(0,l.Injectable)({multiple:!0}),n.__param(0,(0,l.Optional)()),n.__metadata("design:paramtypes",[E.CommentRoot])],f),e.CommentTreeModel=f;let m=class extends u.Disposable{constructor(){super(),this.selectedDecoration=new o.Decoration(_.default.mod_selected),this.focusedDecoration=new o.Decoration(_.default.mod_focused),this._selectedNodes=[],this.onDidUpdateTreeModelEmitter=new u.Emitter,this.disposableCollection=new u.DisposableCollection,this.applyFocusedDecoration=(s,a=!0)=>{var r;if(s){for(const c of this._selectedNodes)this.selectedDecoration.removeTarget(c);this.focusedNode&&this.focusedDecoration.removeTarget(this.focusedNode),this.selectedDecoration.addTarget(s),this.focusedDecoration.addTarget(s),this._focusedNode=s,this._selectedNodes=[s],a&&((r=this.treeModel)===null||r===void 0||r.dispatchChange())}},this.removeFocusedDecoration=()=>{var s;this.focusedNode&&(this.focusedDecoration.removeTarget(this.focusedNode),(s=this.treeModel)===null||s===void 0||s.dispatchChange()),this._focusedNode=null},this.handleTreeBlur=()=>{this.removeFocusedDecoration()},this.handleTwistierClick=async(s,a)=>{(E.CommentFileNode.is(a)||a?.isAllowToggle)&&this.toggleDirectory(a)},this.handleItemClick=async(s,a)=>{this.applyFocusedDecoration(a),(E.CommentFileNode.is(a)||a?.isAllowToggle)&&this.toggleDirectory(a);let r,c;a instanceof E.CommentReplyNode||a instanceof E.CommentContentNode?(r=a.thread.uri,c=a.thread.range):r=a.resource,this.editorService.open(r,{range:c}).then(()=>{a.thread&&a.thread.show()})},this.toggleDirectory=s=>{s.expanded?this.commentTreeHandle.collapseNode(s):this.commentTreeHandle.expandNode(s)},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 s=await this.commentService.resolveChildren();if(!s)return;const a=s[0];a&&(this._treeModel=this.injector.get(f,[a]),await this._treeModel.ensureReady,this.initDecorations(a),this.disposables.push(u.Event.any(this.commentService.onThreadsCommentChange,this.commentService.onThreadsChanged,this.commentService.onThreadsCreated)(()=>{this.refresh()})),this.onDidUpdateTreeModelEmitter.fire(this._treeModel))}initDecorations(s){return this._decorations=new o.DecorationsManager(s),this._decorations.addDecoration(this.selectedDecoration),this._decorations.addDecoration(this.focusedDecoration),this._decorations}handleTreeHandler(s){this._commentTreeHandle=s}async refresh(){await this.whenReady,(0,u.runWhenIdle)(()=>{this.treeModel.root.refresh()})}async collapsedAll(){return await this.whenReady,this.treeModel.root.collapsedAll()}dispose(){this.disposableCollection.dispose()}};n.__decorate([(0,l.Autowired)(h.ICommentsService),n.__metadata("design:type",Object)],m.prototype,"commentService",void 0),n.__decorate([(0,l.Autowired)(l.INJECTOR_TOKEN),n.__metadata("design:type",l.Injector)],m.prototype,"injector",void 0),n.__decorate([(0,l.Autowired)(p.WorkbenchEditorService),n.__metadata("design:type",p.WorkbenchEditorService)],m.prototype,"editorService",void 0),m=n.__decorate([(0,l.Injectable)(),n.__metadata("design:paramtypes",[])],m),e.CommentModelService=m},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 l extends n.CompositeTreeNode{static is(E){return!!E&&!E.parent}constructor(E){super(E,void 0)}get expanded(){return!0}}e.CommentRoot=l;class o extends n.CompositeTreeNode{static is(E){return n.CompositeTreeNode.is(E)&&"threads"in E}constructor(E,_,f="",m,d,s,a){super(E,a),this.threads=_,this.tooltip=m,this.icon=d,this.resource=s,this.isExpanded=!0,this._renderedLabel=this.resource.displayName,this._renderedDescription=f}set label(E){this._renderedLabel=E}set description(E){this._renderedDescription=E}get renderedLabel(){return this._renderedLabel}get renderedDescription(){return this._renderedDescription}set onSelect(E){this._onSelectHandler=E}get onSelect(){return this._onSelectHandler}}e.CommentFileNode=o;class u extends n.CompositeTreeNode{static is(E){return n.CompositeTreeNode.is(E)&&"author"in E}constructor(E,_,f,m="",d,s,a,r){super(E,r),this.thread=_,this.comment=f,this.icon=d,this.author=s,this.resource=a,this._renderedDescription=m,this.isExpanded=!0,this._isAllowToggle=!1}get isAllowToggle(){return this._isAllowToggle}setIsAllowToggle(E){this._isAllowToggle=E}set label(E){this._renderedLabel=E}set description(E){this._renderedDescription=E}get renderedLabel(){return this._renderedLabel}get renderedDescription(){return this._renderedDescription}set onSelect(E){this._onSelectHandler=E}get onSelect(){return this._onSelectHandler}}e.CommentContentNode=u;class p extends n.TreeNode{constructor(E,_,f,m="",d,s,a){super(E,a),this.thread=_,this.icon=d,this.resource=s,this._renderedLabel=f,this._renderedDescription=m}set label(E){this._renderedLabel=E}set description(E){this._renderedDescription=E}get renderedLabel(){return this._renderedLabel}get renderedDescription(){return this._renderedDescription}set onSelect(E){this._onSelectHandler=E}get onSelect(){return this._onSelectHandler}}e.CommentReplyNode=p},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 l;(function(E){E[E.Editor=0]="Editor",E[E.Preview=1]="Preview"})(l=e.CommentMode||(e.CommentMode={}));var o;(function(E){E[E.Collapsed=0]="Collapsed",E[E.Expanded=1]="Expanded"})(o=e.CommentThreadCollapsibleState||(e.CommentThreadCollapsibleState={}));var u;(function(E){E.Thread="thread",E.Empty="empty"})(u=e.CommentGutterType||(e.CommentGutterType={})),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 p extends n.BasicEvent{}e.CommentPanelCollapse=p;class h extends n.BasicEvent{}e.CommentReactionClick=h},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),l=n.__importDefault(t(53373)),o=n.__importDefault(t(14041));t(4418);const u=p=>{var{className:h,children:E}=p,_=n.__rest(p,["className","children"]);return o.default.createElement("span",Object.assign({className:(0,l.default)("kt-badge",h)},_),E)};e.Badge=u},48412:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Button=void 0;const n=t(85608),l=n.__importDefault(t(53373)),o=n.__importDefault(t(14041)),u=t(99613),p=t(54713);t(71682);const h=()=>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(){}e.Button=o.default.memo(_=>{var{children:f,loading:m,className:d,type:s="primary",htmlType:a,size:r,ghost:c=!1,onClick:g,disabled:v,block:b,iconClass:S,icon:y,more:A,moreIconClass:T,menu:D,moreVisible:w,placement:I,title:O,onVisibleChange:M}=_,R=n.__rest(_,["children","loading","className","type","htmlType","size","ghost","onClick","disabled","block","iconClass","icon","more","moreIconClass","menu","moreVisible","placement","title","onVisibleChange"]);const P=(0,l.default)("kt-button",d,{[`kt-${s}-button-loading`]:m,[`ghost-${s}-button`]:c&&!m&&s!=="link",[`${s}-button`]:s,[`${r}-button-size`]:r,"ghost-button":c&&s!=="link","block-button":b}),L=(0,l.default)(d,{"kt-clickable-icon":!!g});if(s==="icon")return o.default.createElement(p.Icon,Object.assign({tooltip:O,disabled:v,icon:y,onClick:m||v?E:g,className:L,iconClass:S},R));const N=S?o.default.createElement(p.Icon,{iconClass:S,disabled:v}):null;return D?o.default.createElement(u.Dropdown,{visible:w,className:"kt-menu",overlay:D,trigger:["click"],onVisibleChange:M,placement:I},o.default.createElement("button",Object.assign({},R,{disabled:v,className:P,type:a,onClick:m||v?E:g}),m&&s!=="link"&&o.default.createElement(h,null),N&&N,f,A&&o.default.createElement(p.Icon,{iconClass:T||(0,p.getIcon)("down"),className:"kt-button-secondary-more"}))):o.default.createElement("button",Object.assign({},R,{disabled:v,className:P,type:a,onClick:m||v?E:g}),m&&s!=="link"&&o.default.createElement(h,null),N&&N,f)})},7273:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CheckBox=void 0;const n=t(85608),l=n.__importDefault(t(53373)),o=n.__importDefault(t(14041)),u=t(65973);t(6099);const p=()=>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"})),h=E=>{var{insertClass:_,className:f,label:m,size:d="default",disabled:s,checked:a,wrapTabIndex:r}=E,c=n.__rest(E,["insertClass","className","label","size","disabled","checked","wrapTabIndex"]);(0,u.warning)(!_,"`insertClass` was deprecated, please use `className` instead");const g=c;return g.checked=a??!1,o.default.createElement("label",{className:(0,l.default)("kt-checkbox",_,f,{"kt-checkbox-large":d==="large","kt-checkbox-disabled":s}),tabIndex:r},o.default.createElement("span",{className:"kt-checkbox-lump"},o.default.createElement("input",Object.assign({type:"checkbox",disabled:s},g)),o.default.createElement("span",{className:"kt-checkbox-icon"},o.default.createElement(p,null))),m||" ")};e.CheckBox=h,e.CheckBox.displayName="OpenSumiCheckBox"},58998:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ClickOutside=void 0;const n=t(85608),l=n.__importDefault(t(14041)),o=u=>{var{mouseEvents:p=["click"],onOutsideClick:h,children:E}=u,_=n.__rest(u,["mouseEvents","onOutsideClick","children"]);const f=l.default.useRef(null),m=l.default.useCallback(d=>{f.current&&d.target&&!f.current.contains(d.target)&&h(d)},[h]);return l.default.useEffect(()=>(p.forEach(d=>{window.addEventListener(d,m,!0)}),()=>{p.forEach(d=>{window.removeEventListener(d,m,!0)})}),[p]),l.default.createElement("div",Object.assign({},_,{ref:f}),E)};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||(e.MessageType={}))},89832:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Dialog=e.DialogContent=void 0;const n=t(85608),l=n.__importDefault(t(53373)),o=n.__importDefault(t(14041)),u=t(43718),p=t(48412),h=t(50570),E=t(54713),_=t(79024);t(65773);const f=({onCancel:s,onOk:a,cancelText:r,okText:c})=>o.default.createElement(o.default.Fragment,null,o.default.createElement(p.Button,{onClick:s,type:"secondary"},r||(0,u.localize)("ButtonCancel")),o.default.createElement(p.Button,{onClick:a},c||(0,u.localize)("ButtonOK"))),m=({onClose:s,closable:a,messageType:r=h.MessageType.Info,icon:c,message:g,buttons:v,type:b="confirm",title:S,onOk:y,onCancel:A,okText:T,cancelText:D})=>{const{getIcon:w}=o.default.useContext(E.IconContext);return o.default.createElement(o.default.Fragment,null,o.default.createElement("div",{className:"kt-dialog-content"},c&&o.default.createElement("div",{style:{color:c.color},className:(0,l.default)("kt-dialog-icon",(0,E.getIcon)(c.className)||w(c.className))}),o.default.createElement("div",{className:"kt-dialog-content_area"},b!=="basic"&&S&&o.default.createElement("p",{className:"kt-dialog-content_title"},S),o.default.createElement("span",{className:"kt-dialog-message"},g)),a&&b!=="basic"&&o.default.createElement("button",{className:(0,l.default)("kt-dialog-closex",(0,E.getIcon)("close")),onClick:s})),r!==h.MessageType.Empty&&b!=="basic"&&o.default.createElement("div",{className:"kt-dialog-buttonWrap"},b==="confirm"?v||o.default.createElement(f,{onCancel:A,onOk:y,okText:T,cancelText:D}):o.default.createElement(p.Button,{onClick:s},"OK")))};e.DialogContent=m;const d=s=>{var{visible:a,onClose:r,closable:c,afterClose:g,messageType:v,icon:b,message:S,buttons:y,type:A="confirm",title:T,onOk:D,onCancel:w,okText:I,cancelText:O,getContainer:M,keyboard:R}=s,P=n.__rest(s,["visible","onClose","closable","afterClose","messageType","icon","message","buttons","type","title","onOk","onCancel","okText","cancelText","getContainer","keyboard"]);return o.default.createElement(_.Overlay,Object.assign({visible:a,onClose:r,title:A==="basic"?T:null,closable:A==="basic",getContainer:M,keyboard:R,footer:A==="basic"?y||o.default.createElement(f,{onCancel:w,onOk:D,okText:I,cancelText:O}):void 0,afterClose:g},P),o.default.createElement(e.DialogContent,Object.assign({message:S,buttons:y,visible:a},P)))};e.Dialog=d},99665:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});const n=t(85608),l=n.__importDefault(t(62596)),o=n.__importDefault(t(53373)),u=n.__importStar(t(14041)),p=t(48412),h=n.__importDefault(t(35060)),E=_=>{var f;const{prefixCls:m,type:d="primary",size:s="default",danger:a,disabled:r,loading:c,onClick:g,htmlType:v,children:b,className:S,overlay:y,trigger:A,align:T,visible:D,onVisibleChange:w,placement:I,getPopupContainer:O,href:M,icon:R=u.createElement(l.default,null),title:P,buttonsRender:L=U=>U,mouseEnterDelay:N,mouseLeaveDelay:B,overlayClassName:k,overlayStyle:F}=_,W=n.__rest(_,["prefixCls","type","size","danger","disabled","loading","onClick","htmlType","children","className","overlay","trigger","align","visible","onVisibleChange","placement","getPopupContainer","href","icon","title","buttonsRender","mouseEnterDelay","mouseLeaveDelay","overlayClassName","overlayStyle"]),j=m||"kt-dropdown-button",H={align:T,overlay:y,disabled:r,trigger:r?[]:A,getPopupContainer:O,mouseEnterDelay:N,mouseLeaveDelay:B,overlayClassName:k,overlayStyle:F};H.placement=(f=_?.placement)!==null&&f!==void 0?f:"bottomRight";const K=u.createElement(p.Button,{size:s,type:d,disabled:r,loading:c,onClick:g,htmlType:v,title:P},b),G=u.createElement(p.Button,{size:s,type:d},R??u.createElement(l.default,null)),[V,z]=L([K,G]);return u.createElement("div",Object.assign({},W,{className:(0,o.default)(j,S)}),V,u.createElement(h.default,Object.assign({},H),z))};e.default=E},35060:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});const n=t(85608),l=n.__importDefault(t(64797)),o=n.__importDefault(t(53373)),u=n.__importDefault(t(97190)),p=n.__importDefault(t(14041)),h=t(43953),E=t(65973),_=(0,h.tuple)("topLeft","topCenter","topRight","bottomLeft","bottomCenter","bottomRight");class f extends p.default.Component{constructor(){super(...arguments),this.renderOverlay=d=>{const{overlay:s}=this.props;let a;typeof s=="function"?a=s():a=s,a=p.default.Children.only(a);const r=a.props;(0,E.warning)(!r.mode||r.mode==="vertical",`[Dropdown] mode="${r.mode}" is not supported for Dropdown's Menu.`);const{selectable:c=!1,focusable:g=!0}=r,v=p.default.createElement("span",{className:`${d}-menu-submenu-arrow`},p.default.createElement(l.default,{className:`${d}-menu-submenu-arrow-icon`}));return typeof a.type=="string"?s:p.default.cloneElement(a,{mode:"vertical",selectable:c,focusable:g,expandIcon:v})},this.renderDropDown=()=>{const{prefixCls:d,children:s,trigger:a,disabled:r,getPopupContainer:c}=this.props,g=d||"kt-dropdown",v=p.default.Children.only(s),b=p.default.cloneElement(v,{className:(0,o.default)(v.props.className,`${g}-trigger`),disabled:r}),S=r?[]:a;let y;return S&&S.indexOf("contextMenu")!==-1&&(y=!0),p.default.createElement(u.default,Object.assign({alignPoint:y},this.props,{prefixCls:g,getPopupContainer:c,transitionName:this.getTransitionName(),trigger:S,overlay:()=>this.renderOverlay(g)}),b)}}getTransitionName(){const{placement:d="",transitionName:s}=this.props;return s!==void 0?s:d.indexOf("top")>=0?"slide-down":"slide-up"}render(){return this.renderDropDown()}}e.default=f,f.defaultProps={mouseEnterDelay:.15,mouseLeaveDelay:.1,placement:"bottomLeft"}},99613:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DropdownButton=e.Dropdown=void 0;const n=t(85608),l=n.__importDefault(t(35060));e.Dropdown=l.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.IconContextProvider=e.IconContext=void 0;const n=t(85608),l=n.__importDefault(t(53373)),o=n.__importDefault(t(14041)),u=t(12122),p=t(76577);t(1914),e.IconContext=o.default.createContext({getIcon:(_,f)=>_});function h(_){return o.default.createElement(e.IconContext.Provider,{value:_.value},o.default.createElement(e.IconContext.Consumer,null,f=>_.value===f?_.children:null))}e.IconContextProvider=h;const E=function(_,f){const{size:m="small",loading:d,icon:s,iconClass:a,className:r,tooltip:c,rotate:g,anim:v,fill:b,disabled:S,onClick:y,children:A,resourceOptions:T,animate:D,style:w={}}=_,I=n.__rest(_,["size","loading","icon","iconClass","className","tooltip","rotate","anim","fill","disabled","onClick","children","resourceOptions","animate","style"]),O={rotate:g,anim:v,fill:b};let M;if(s)if(u.defaultIconMap[s])M=(0,p.getIcon)(s,O);else{const{getIcon:R,getResourceIcon:P}=o.default.useContext(e.IconContext);T&&P?M=P(s,T):M=R(s,O)}else M=a;return D&&D==="spin"&&(w.animation="kt-icon-spin 1.5s steps(30) infinite"),o.default.createElement("span",Object.assign({},I,{title:c,onClick:y,ref:f,className:(0,l.default)("kt-icon",M,r,{"kt-icon-loading":d,"kt-icon-disabled":!!S,[`kt-icon-${m}`]:!!m,"kt-icon-clickable":!!y,"kt-icon-resource":!!T,expanded:!!T&&T.isOpenedDirectory}),style:w}),A)};e._InternalIcon=o.default.memo(o.default.forwardRef(E)),e.Icon=o.default.memo(o.default.forwardRef(E))},10391:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.createFromIconfontCN=void 0;const n=t(85608),l=n.__importDefault(t(53373)),o=n.__importDefault(t(14041)),u=t(80564),p=t(76577),h=new Set;function E(d){return!!(typeof d=="string"&&d.length&&!h.has(d))}function _(d,s=0){const a=d[s];if(E(a)){const r=document.createElement("script");r.setAttribute("src",a),r.setAttribute("data-namespace",a),d.length>s+1&&(r.onload=()=>{_(d,s+1)},r.onerror=()=>{_(d,s+1)}),h.add(a),document.body.appendChild(r)}}const f={width:"1em",height:"1em",fill:"currentColor"};function m(d={}){const{scriptUrl:s,extraCommonProps:a={}}=d;s&&typeof document<"u"&&typeof window<"u"&&typeof document.createElement=="function"&&(Array.isArray(s)?_(s.reverse()):_([s]));const r=o.default.forwardRef((c,g)=>{const{icon:v,children:b,rotate:S,anim:y,fill:A,className:T=""}=c,D=n.__rest(c,["icon","children","rotate","anim","fill","className"]),w={rotate:S,anim:y,fill:A};let I=null;v&&(I=o.default.createElement("svg",Object.assign({},f,{focusable:"false"}),o.default.createElement("use",{xlinkHref:`#${v}`}))),b&&(I=b);const O=(0,p.getIconShapeClxList)(w);return o.default.createElement(u._InternalIcon,Object.assign({},a,D,{className:(0,l.default)(T,O),ref:g}),I)});return r.displayName="Iconfont",r}e.createFromIconfontCN=m},12122:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.iconManager=e.defaultIconMap=e.defaultIconfont=void 0;const l=t(85608).__importDefault(t(65973)),o=t(81139);Object.defineProperty(e,"defaultIconfont",{enumerable:!0,get:function(){return o.defaultIconfont}});const u={"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"},p=Object.assign({},o.defaultIconfont,u);e.defaultIconMap=new Proxy(p,{get(_,f){const m=u[f];return(0,l.default)(!m,`Icon '${f}' was a typo, please use '${m}' instead`),_[f]}});class h{constructor(){this._ktIconPrefixes=[],this._iconMap={}}update(f,m){this._iconMap[f]=m,this._ktIconPrefixes.push(f)}getIconClx(f){if(!f)return(0,l.default)(!1,"not a valid icon key:"+f),[];let m=this._ktIconPrefixes.length;for(;!this._iconMap[this._ktIconPrefixes[--m]][f]&&m!==0;);const d=this._iconMap[this._ktIconPrefixes[m]][f];return d?[`${this._ktIconPrefixes[m]}${d}`]:((0,l.default)(!1,"\u56FE\u6807\u5E93\u7F3A\u5931\u56FE\u6807:"+f),[])}}e.iconManager=new h,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 l=t(10391);Object.defineProperty(e,"createFromIconfontCN",{enumerable:!0,get:function(){return l.createFromIconfontCN}})},76577:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.updateKaitianIconMap=e.getKaitianIcon=e.getIcon=e.getIconShapeClxList=e.updateIconMap=e.ANIM_TYPE=e.ROTATE_TYPE=void 0;const n=t(12122);var l;(function(f){f[f.rotate_90=0]="rotate_90",f[f.rotate_180=1]="rotate_180",f[f.rotate_270=2]="rotate_270",f[f.flip_horizontal=3]="flip_horizontal",f[f.flip_vertical=4]="flip_vertical",f[f.flip_both=5]="flip_both"})(l=e.ROTATE_TYPE||(e.ROTATE_TYPE={}));var o;(function(f){f[f.spin=0]="spin",f[f.pulse=1]="pulse"})(o=e.ANIM_TYPE||(e.ANIM_TYPE={}));const u=["rotate-90","rotate-180","rotate-270","flip-horizontal","flip-vertical","flip-both"],p=["spin","pulse"];function h(f,m){n.iconManager.update(f,m)}e.updateIconMap=h;function E(f){const{rotate:m,anim:d,fill:s}=f||{},a=[];return m!==void 0&&a.push(`iconfont-${u[m]}`),d!==void 0&&a.push(`iconfont-anim-${p[d]}`),s&&a.push("toggled"),a}e.getIconShapeClxList=E;function _(f,m){const d=n.iconManager.getIconClx(f),s=E(m);return d.push(...s),d.join(" ")}e.getIcon=_,e.getKaitianIcon=_,e.updateKaitianIconMap=h},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 l=t(85608).__importDefault(t(14041)),o=t(44198),u=t(63924);class p extends l.default.Component{constructor(){super(...arguments),this.inputRef=l.default.createRef(),this.addToHistory=E=>{this.history&&E&&E!==this.getCurrentValue()&&this.history.add(E)},this.getHistory=()=>this.history&&this.history.getHistory()||[],this.showNextValue=()=>{const E=this.getCurrentValue()||"";this.history&&!this.history.has(E)&&this.addToHistory(E);let _=this.getNextValue();_&&(_=_===E?this.getNextValue():_),_&&this.onValueChange(_)},this.showPreviousValue=()=>{const E=this.getCurrentValue()||"";this.history&&!this.history.has(E)&&this.addToHistory(E);let _=this.getPreviousValue();_&&(_=_===E?this.getPreviousValue():_),_&&this.onValueChange(_)},this.clearHistory=()=>{this.history&&this.history.clear()},this.getCurrentValue=()=>{if(!this.history)return null;let E=this.history.current();return E||(E=this.history.last(),this.history.next()),E},this.getPreviousValue=()=>this.history&&(this.history.previous()||this.history.first())||null,this.getNextValue=()=>this.history&&(this.history.next()||this.history.last())||null,this.onValueChange=E=>{const{onValueChange:_}=this.props;this.setState({inputValue:E}),_&&_(E)},this.onKeyDown=E=>{const{onKeyDown:_}=this.props;_&&_(E)},this.focus=()=>{this.inputRef&&this.inputRef.current&&this.inputRef.current.focus()}}componentDidMount(){var E;const{history:_,onReady:f}=this.props;this.history=new o.HistoryNavigator(_||[],100),this.inputProps=Object.assign({},this.props),delete this.inputProps.onReady,this.setState({inputValue:((E=this.props.value)!==null&&E!==void 0?E:this.props.defaultValue)||""}),typeof f=="function"&&f({addToHistory:this.addToHistory,getHistory:this.getHistory,clearHistory:this.clearHistory,getCurrentValue:this.getCurrentValue,showNextValue:this.showNextValue,showPreviousValue:this.showPreviousValue,focus:this.focus})}render(){const E=this.state&&this.state.inputValue;return l.default.createElement(u.Input,Object.assign({ref:this.inputRef},this.inputProps,{onValueChange:this.onValueChange,onKeyDown:this.onKeyDown,value:E}))}}e.HistoryInputBox=p},63924:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Input=void 0;const n=t(85608),l=n.__importDefault(t(53373)),o=n.__importDefault(t(14041)),u=t(54713),p=n.__importDefault(t(65973));t(41065);function h(_){return typeof _>"u"}function E(_,f,m){if(typeof m=="function"){let d=f;if(f.type==="click"){d=Object.create(f),d.target=_,d.currentTarget=_;const s=_.value;_.value="",m(d),_.value=s;return}m(d)}}e.Input=o.default.forwardRef((_,f)=>{const{defaultValue:m,className:d,wrapperStyle:s,size:a="default",controls:r,onChange:c,selection:g,addonBefore:v,addonAfter:b,persistFocus:S=!0,hasClear:y,afterClear:A,value:T,onValueChange:D,onPressEnter:w,onKeyDown:I,as:O="input"}=_,M=n.__rest(_,["defaultValue","className","wrapperStyle","size","controls","onChange","selection","addonBefore","addonAfter","persistFocus","hasClear","afterClear","value","onValueChange","onPressEnter","onKeyDown","as"]);(0,p.default)(!r,"[@opensumi/ide-components Input]: `controls` was deprecated, please use `addonAfter` instead");const R=o.default.useRef(null),[P,L]=o.default.useState(!1),[N,B]=o.default.useState(()=>(T??m)||""),[k,F]=o.default.useState(()=>(T??m)||"");o.default.useImperativeHandle(f,()=>R.current),o.default.useEffect(()=>{g&&!h(g.start)&&!P&&R.current.setSelectionRange(g.start,g.end)},[g,P]),o.default.useEffect(()=>{T===null||typeof T>"u"||(T!==k&&T!==N&&B(T),T!==k&&F(T))},[T]);const W=$=>{H($.target.value),E(R.current,$,c)},j=$=>{$.preventDefault(),H(""),E(R.current,$,c),typeof A=="function"&&A()},H=$=>{B($),typeof D=="function"&&D($),P||L(!0)},K=$=>{$.keyCode===13&&typeof w=="function"&&w($),typeof I=="function"&&I($)},G=b||r,V=S?{onMouseDown:$=>{$.preventDefault()}}:{},z=($,Q)=>$?o.default.createElement("div",Object.assign({className:(0,l.default)("kt-input-addon",Q)},V),o.default.Children.map($,Y=>o.default.isValidElement(Y)?o.default.cloneElement(Y,V):null)):null,U=(0,l.default)("kt-input",d,{[`kt-input-${a}`]:a,"kt-input-disabled":_.disabled});return o.default.createElement("div",{className:U,style:s},z(v,"kt-input-addon-before"),o.default.createElement("div",{className:"kt-input-box"},o.default.createElement(O,Object.assign({ref:R,type:"text",autoCapitalize:"off",autoCorrect:"off",autoComplete:"off",spellCheck:!1},M,{value:N,onChange:W,onKeyDown:K})),y&&N&&o.default.createElement(u.Icon,Object.assign({className:"kt-input-clear",icon:"close-circle-fill",onClick:j},V))),z(G,"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),l=n.__importDefault(t(53373)),o=n.__importDefault(t(99158)),u=n.__importDefault(t(14041));t(41065),t(17107);const p="kt-input-number",h=E=>{const{value:_,size:f="default",wrapperStyle:m,className:d,disabled:s,min:a,max:r,onChange:c}=E,g=n.__rest(E,["value","size","wrapperStyle","className","disabled","min","max","onChange"]),v=S=>{c&&c(S)},b=(0,l.default)("kt-input","kt-input-number",d,{[`kt-input-${f}`]:f,"kt-input-disabled":s});return u.default.createElement("div",{className:b,style:m},u.default.createElement("div",{className:"kt-input-box"},u.default.createElement(o.default,Object.assign({prefixCls:p,min:a,max:r,value:_,type:"number",onChange:v,controls:!0},g))))};e.InputNumber=h,e.InputNumber.displayName="OpenSumiInputNumber"},10413:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.bindInputElement=void 0;const l=t(85608).__importDefault(t(14041)),o=t(63924);class u extends l.default.Component{constructor(){super(...arguments),this.placeholderInputRef=l.default.createRef()}render(){const _=Object.assign({},this.props);return delete _.inputElement,delete _.innerRef,l.default.createElement(o.Input,Object.assign({},_,{type:"text",id:this.props.id,ref:this.placeholderInputRef}))}componentDidMount(){const{innerRef:_,inputElement:f}=this.props;this.placeholderInputRef.current.parentElement.replaceChild(f,this.placeholderInputRef.current),this.applyAttributes(),f.focus(),typeof _=="function"?_(f):_!==null&&typeof _=="object"&&_.current===null&&(_.current=f)}UNSAFE_componentWillUnmount(){const{innerRef:_,inputElement:f}=this.props;f.parentElement.replaceChild(this.placeholderInputRef.current,f),_!==null&&typeof _=="object"&&_.current&&(_.current=null)}shouldComponentUpdate(_){return this.applyAttributes(_),!1}applyAttributes(_=this.props){const{className:f,id:m,inputElement:d,style:s}=_;if(typeof f=="string"&&(d.className=f),typeof m=="string"&&(d.id=m),s!==null&&typeof s=="object")for(const a in s)typeof s[a]=="string"&&d[a]&&(d[a]=s[a])}}const p=l.default.forwardRef((E,_)=>l.default.createElement(u,Object.assign({},E,{innerRef:_})));function h(E){return _=>l.default.createElement(p,Object.assign({},_,{inputElement:E}))}e.bindInputElement=h},61172:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TextArea=void 0;const l=t(85608).__importDefault(t(14041)),o=t(63924);e.TextArea=l.default.forwardRef((u,p)=>l.default.createElement(o.Input,Object.assign({},u,{as:"textarea",ref:p}))),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),l=n.__importDefault(t(53373)),o=n.__importDefault(t(14041)),u=t(63924);t(13254);var p;(function(h){h[h.INFO=1]="INFO",h[h.ERROR=2]="ERROR",h[h.WARNING=3]="WARNING",h[h.IGNORE=4]="IGNORE"})(p=e.VALIDATE_TYPE||(e.VALIDATE_TYPE={})),e.ValidateInput=o.default.forwardRef((h,E)=>{var{type:_,className:f,validate:m,onChange:d,onValueChange:s,validateMessage:a,popup:r=!0}=h,c=n.__rest(h,["type","className","validate","onChange","onValueChange","validateMessage","popup"]);const[g,v]=o.default.useState();o.default.useEffect(()=>{v(a)},[a]);const b=(0,l.default)({"validate-error":g&&g.type===p.ERROR,"validate-warning":g&&g.type===p.WARNING,"validate-info":g&&g.type===p.INFO}),S=()=>{if(g&&g.message)return o.default.createElement("div",{className:(0,l.default)("validate-message",b,{popup:r})},g.message)},y=A=>{const T=A.target;let D;if(T.type==="number"?D=A.target.valueAsNumber:D=A.target.value,typeof m=="function"){let w;_==="number"?/^[0-9]+$/.test(D)?w=m(Number(D)):w=m(String(D)):w=m(D),v(w)}typeof d=="function"&&d(A),typeof s=="function"&&s(D)};return o.default.createElement("div",{className:(0,l.default)("input-box",{popup:r})},o.default.createElement(u.Input,Object.assign({type:_,ref:E,className:(0,l.default)(f,g,b),onChange:y},c)),S())}),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 l=t(85608).__importDefault(t(14041));t(21221),e.Loading=l.default.memo(()=>l.default.createElement("div",{className:"loading_indicator"})),e.Loading.displayName="Loading"},4981:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ComponentContextProvider=e.LocalizeContextProvider=e.LocalizeContext=void 0;const l=t(85608).__importDefault(t(14041)),o=t(54713),u=t(65973),p=_=>((0,u.warning)(!1,"Using the default localize fn"),"");e.LocalizeContext=l.default.createContext({localize:p}),e.LocalizeContext.displayName="LocalizeContext";function h(_){return l.default.createElement(e.LocalizeContext.Provider,{value:_.value},l.default.createElement(e.LocalizeContext.Consumer,null,f=>_.value===f?_.children:null))}e.LocalizeContextProvider=h;function E(_){return l.default.createElement(o.IconContextProvider,{value:_.value},l.default.createElement(h,{value:{localize:_.value.localize}},_.children))}e.ComponentContextProvider=E},56849:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Markdown=e.DefaultMarkedRenderer=e.linkify=void 0;const n=t(85608),l=t(33714),o=n.__importDefault(t(14041)),u=t(39777),p=(_,f,m)=>`<a rel="noopener" ${u.DATA_SET_COMMAND}="${_}" title="${f??_}">${m}</a>`;e.linkify=p;class h extends l.Renderer{link(f,m,d){return(0,e.linkify)(f,m,d)}}e.DefaultMarkedRenderer=h;function E(_){const f=(s,a)=>l.marked.parse(s,{renderer:a}),[m,d]=o.default.useState(f(_.value||"",_.renderer));return o.default.useEffect(()=>{d(f(_.value||"",_.renderer))},[_.renderer,_.value]),o.default.createElement(u.RenderWrapper,{opener:_.opener,html:m})}e.Markdown=E},39777:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.RenderWrapper=e.DATA_SET_COMMAND=void 0;const l=t(85608).__importStar(t(14041));t(28566),e.DATA_SET_COMMAND="data-command";const o=u=>{const p=(0,l.useRef)(),{html:h,opener:E}=u;(0,l.useEffect)(()=>(p&&p.current&&p.current.addEventListener("click",_),()=>{p&&p.current&&p.current.removeEventListener("click",_)}),[]);const _=f=>{let m=f.target;if(m.className.includes("codicon")&&(m=m.parentNode),m.tagName.toLowerCase()==="a"&&m.hasAttribute(e.DATA_SET_COMMAND)){const d=m.getAttribute(e.DATA_SET_COMMAND);d&&E&&E.open(d)}};return l.default.createElement("div",{className:"kt-md-renderer-wrap",dangerouslySetInnerHTML:{__html:h},ref:p})};e.RenderWrapper=o},98113:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});const l=(0,t(14041).createContext)({inlineCollapsed:!1});e.default=l},64063:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});const n=t(85608),l=t(54715),o=n.__importDefault(t(14041)),u=n.__importDefault(t(98113));class p extends o.default.Component{constructor(){super(...arguments),this.renderItem=()=>{const E=this.props,{title:_}=E,f=n.__rest(E,["title"]);return o.default.createElement(u.default.Consumer,null,({inlineCollapsed:m})=>m?o.default.createElement(l.Item,Object.assign({},f,{title:_})):o.default.createElement(l.Item,Object.assign({},f,{title:_})))}}render(){return this.renderItem()}}e.default=p,p.isMenuItem=!0},91886:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});const n=t(85608),l=n.__importDefault(t(39067)),o=t(54715),u=n.__importDefault(t(14041));class p extends u.default.Component{render(){const{popupClassName:E}=this.props;return u.default.createElement(o.SubMenu,Object.assign({},this.props,{popupClassName:E}))}}p.contextTypes={antdMenuTheme:l.default.string},p.isSubMenu=1,e.default=p},45803:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Menu=void 0;const n=t(85608),l=n.__importDefault(t(53373)),o=n.__importStar(t(54715)),u=n.__importDefault(t(14041)),p=t(90146),h=t(2835),E=t(47768),_=t(65973),f=n.__importDefault(t(98113)),m=n.__importDefault(t(64063)),d=n.__importDefault(t(91886));t(42985);class s extends u.default.Component{static getDerivedStateFromProps(c,g){const{prevProps:v}=g,b={prevProps:c};return v.mode==="inline"&&c.mode!=="inline"&&(b.switchingModeFromInline=!0),"openKeys"in c?b.openKeys=c.openKeys:(c.inlineCollapsed&&!v.inlineCollapsed&&(b.switchingModeFromInline=!0,b.inlineOpenKeys=g.openKeys,b.openKeys=[]),!c.inlineCollapsed&&v.inlineCollapsed&&(b.openKeys=g.inlineOpenKeys,b.inlineOpenKeys=[])),b}constructor(c){super(c),this.handleMouseEnter=v=>{this.restoreModeVerticalFromInline();const{onMouseEnter:b}=this.props;b&&b(v)},this.handleTransitionEnd=v=>{const b=v.propertyName==="width"&&v.target===v.currentTarget,{className:S}=v.target,y=Object.prototype.toString.call(S)==="[object SVGAnimatedString]"?S.animVal:S,A=v.propertyName==="font-size"&&y.indexOf("anticon")>=0;(b||A)&&this.restoreModeVerticalFromInline()},this.handleClick=v=>{this.handleOpenChange([]);const{onClick:b}=this.props;b&&b(v)},this.handleOpenChange=v=>{this.setOpenKeys(v);const{onOpenChange:b}=this.props;b&&b(v)},this.renderMenu=()=>{const{prefixCls:v,className:b}=this.props,S=this.getRealMenuMode(),y=this.getOpenMotionProps(S),A=v||"kt-inner-menu",T=(0,l.default)(b,{[`${A}-inline-collapsed`]:this.getInlineCollapsed()}),D=Object.assign({openKeys:this.state.openKeys,onOpenChange:this.handleOpenChange,className:T,mode:S},y);return S!=="inline"&&(D.onClick=this.handleClick),this.getInlineCollapsed()&&(D.openKeys=[]),u.default.createElement(o.default,Object.assign({},this.props,D,{prefixCls:A,onTransitionEnd:this.handleTransitionEnd,onMouseEnter:this.handleMouseEnter}))},(0,_.warning)(!("onOpen"in c||"onClose"in c),"[Menu] `onOpen` and `onClose` are removed, please use `onOpenChange` instead, see: https://u.ant.design/menu-on-open-change."),(0,_.warning)(!("inlineCollapsed"in c&&c.mode!=="inline"),"[Menu] `inlineCollapsed` should only be used when `mode` is inline.");let g;"openKeys"in c?g=c.openKeys:"defaultOpenKeys"in c&&(g=c.defaultOpenKeys),this.state={openKeys:g||[],switchingModeFromInline:!1,inlineOpenKeys:[],prevProps:c}}componentWillUnmount(){E.wrapperRaf.cancel(this.mountRafId)}setOpenKeys(c){"openKeys"in this.props||this.setState({openKeys:c})}getRealMenuMode(){const c=this.getInlineCollapsed();if(this.state.switchingModeFromInline&&c)return"inline";const{mode:g}=this.props;return c?"vertical":g}getInlineCollapsed(){const{inlineCollapsed:c}=this.props;return c}getOpenMotionProps(c){const{openTransitionName:g,openAnimation:v,motion:b}=this.props;return b?{motion:b}:v?((0,_.warning)(typeof v=="string","[Menu] `openAnimation` do not support object. Please use `motion` instead."),{openAnimation:v}):g?{openTransitionName:g}:c==="horizontal"?{motion:{motionName:"slide-up"}}:c==="inline"?{motion:h.collapseMotion}:{motion:{motionName:""}}}restoreModeVerticalFromInline(){const{switchingModeFromInline:c}=this.state;c&&this.setState({switchingModeFromInline:!1})}render(){return u.default.createElement(f.default.Provider,{value:{inlineCollapsed:this.getInlineCollapsed()||!1}},this.renderMenu())}}s.defaultProps={className:"",focusable:!1},(0,p.polyfill)(s);class a extends u.default.Component{render(){return u.default.createElement(s,Object.assign({},this.props))}}e.Menu=a,a.Divider=o.Divider,a.Item=m.default,a.SubMenu=d.default,a.ItemGroup=o.ItemGroup},31059:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.message=void 0;const l=t(85608).__importDefault(t(71036));t(38663);function o(u){return(p,h)=>new Promise(E=>{l.default[u](p,h,E)})}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),l=n.__importDefault(t(29517)),o=n.__importDefault(t(96041)),u=n.__importDefault(t(63492)),p=n.__importDefault(t(36117)),h=n.__importDefault(t(59303)),E=n.__importDefault(t(75056)),_=n.__importDefault(t(14041));let f=3,m,d,s=1,a="kt-message",r="move-up",c,g;function v(T){if(d){T(d);return}E.default.newInstance({prefixCls:a,transitionName:r,style:{top:m},getContainer:c,maxCount:g},D=>{if(d){T(d);return}d=D,T(D)})}const b={info:p.default,success:l.default,error:o.default,warning:u.default,loading:h.default};function S(T){const D=T.duration!==void 0?T.duration:f,w=T.key||s++,I=new Promise(M=>{const R=()=>(typeof T.onClose=="function"&&T.onClose(),M(!0));v(P=>{const L=b[T.type];P.notice({key:w,duration:D,style:{},content:_.default.createElement("div",{className:`${a}-custom-content${T.type?` ${a}-${T.type}`:""}`},T.icon||L&&_.default.createElement(L,null),_.default.createElement("span",null,T.content)),onClose:R})})}),O=()=>{d&&d.removeNotice(w)};return O.then=(M,R)=>I.then(M,R),O.promise=I,O}function y(T){return Object.prototype.toString.call(T)==="[object Object]"&&!!T.content}const A={open:S,config(T){T.top!==void 0&&(m=T.top,d=null),T.duration!==void 0&&(f=T.duration),T.prefixCls!==void 0&&(a=T.prefixCls),T.getContainer!==void 0&&(c=T.getContainer),T.transitionName!==void 0&&(r=T.transitionName,d=null),T.maxCount!==void 0&&(g=T.maxCount,d=null)},destroy(){d&&(d.destroy(),d=null)}};["success","info","warning","error","loading"].forEach(T=>{A[T]=(D,w,I)=>y(D)?A.open(Object.assign(Object.assign({},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),l=n.__importDefault(t(22143)),o=n.__importDefault(t(53373)),u=n.__importDefault(t(39067)),p=n.__importDefault(t(79773)),h=n.__importDefault(t(25946)),E=n.__importDefault(t(14041)),_=t(48412),f=t(69587);let m;e.destroyFns=[];const d=a=>{m={x:a.pageX,y:a.pageY},setTimeout(()=>m=null,100)};typeof window<"u"&&window.document&&window.document.documentElement&&(0,h.default)(document.documentElement,"click",d);class s extends E.default.Component{constructor(){super(...arguments),this.handleCancel=r=>{const{onCancel:c}=this.props;c&&c(r)},this.handleOk=r=>{const{onOk:c}=this.props;c&&c(r)},this.renderFooter=r=>{const{okText:c,okType:g,cancelText:v,confirmLoading:b}=this.props;return E.default.createElement("div",null,E.default.createElement(_.Button,Object.assign({onClick:this.handleCancel},this.props.cancelButtonProps),v||r.cancelText),E.default.createElement(_.Button,Object.assign({type:g,loading:b,onClick:this.handleOk},this.props.okButtonProps),c||r.okText))},this.renderModal=()=>{const r=this.props,{prefixCls:c,footer:g,visible:v,wrapClassName:b,centered:S,getContainer:y,closeIcon:A,closable:T=!0}=r,D=n.__rest(r,["prefixCls","footer","visible","wrapClassName","centered","getContainer","closeIcon","closable"]),w=c||"kt-modal",I=this.renderFooter((0,f.getConfirmLocale)()),O=E.default.createElement("span",{className:`${w}-close-x`},A||E.default.createElement(l.default,{className:`${w}-close-icon`}));return E.default.createElement(p.default,Object.assign({},D,{animation:this.props.animation,getContainer:y,prefixCls:w,wrapClassName:(0,o.default)({[`${w}-centered`]:!!S},b),footer:g===void 0?I:g,visible:v,mousePosition:m,onClose:this.handleCancel,closeIcon:O}))}}render(){return this.renderModal()}}e.default=s,s.defaultProps={width:520,confirmLoading:!1,visible:!1,okType:"primary"},s.propTypes={prefixCls:u.default.string,onOk:u.default.func,onCancel:u.default.func,okText:u.default.node,cancelText:u.default.node,centered:u.default.bool,width:u.default.oneOfType([u.default.number,u.default.string]),confirmLoading:u.default.bool,visible:u.default.bool,footer:u.default.node,title:u.default.node,closable:u.default.bool,closeIcon:u.default.node}},53017:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Modal=void 0;const l=t(85608).__importDefault(t(6656));e.Modal=l.default,t(61349)},69587:(x,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getConfirmLocale=e.changeConfirmLocale=void 0;const t={okText:"OK",cancelText:"Cancel",justOkText:"OK"};let n=Object.assign({},t);function l(u){u?n=Object.assign(Object.assign({},n),u):n=Object.assign({},t)}e.changeConfirmLocale=l;function o(){return n}e.getConfirmLocale=o},18875:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.update=e.close=e.open=e.notification=void 0;const n=t(85608),l=n.__importDefault(t(53373)),o=n.__importDefault(t(14041)),u=t(70392),p=t(48412),h=t(50570),E=n.__importDefault(t(70748));t(1477);const _={[h.MessageType.Info]:15,[h.MessageType.Warning]:18,[h.MessageType.Error]:20};E.default.config({placement:"bottomRight"}),e.notification=E.default;const f=new Map;function m(r,c,g=!0,v,b,S,y,A){return(0,u.createCancelablePromise)(T=>(T.onCancellationRequested(()=>{d(v)}),new Promise(D=>{const w={key:v,className:(0,l.default)("kt-notification-wrapper",{"kt-notification-info":c===h.MessageType.Info,"kt-notification-error":c===h.MessageType.Error,"kt-notification-warn":c===h.MessageType.Warning}),duration:(0,u.isUndefined)(y)?_[c]:y,onClose:()=>{A&&A(),f.delete(v),D(void 0)},btn:b?b.map((I,O)=>{const M=typeof I=="string",R={className:`${(0,l.default)("kt-notification-button")}${M?"":I.class}`,ghost:M?O===0:!I.primary,key:M?I:I.id,onClick:()=>{D(I),E.default.close(v),M||I.run()}},P=M?I:I.label;return o.default.createElement(p.Button,Object.assign({size:"small"},R),P)}):null,message:r,description:S};f.set(v,[c,w]),g||(w.closeIcon=o.default.createElement("span",null)),a(c,w)})))}e.open=m;function d(r){e.notification.close(r)}e.close=d;function s(r,c){const g=f.get(r);a(g[0],Object.assign(Object.assign({},g[1]),{key:r,message:c}))}e.update=s;function a(r,c){switch(r){case h.MessageType.Info:e.notification.info(c);break;case h.MessageType.Warning:e.notification.warning(c);break;case h.MessageType.Error:e.notification.error(c);break;default:e.notification.open(c);break}}},70748:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});const n=t(85608),l=n.__importDefault(t(55435)),o=n.__importDefault(t(31079)),u=n.__importDefault(t(22143)),p=n.__importDefault(t(5550)),h=n.__importDefault(t(74339)),E=n.__importDefault(t(75056)),_=n.__importDefault(t(14041)),f=t(70392),m={};let d=4.5,s=24,a=24,r="topRight",c,g;function v(D){const{duration:w,placement:I,bottom:O,top:M,getContainer:R,closeIcon:P}=D;w!==void 0&&(d=w),I!==void 0&&(r=I),O!==void 0&&(a=O),M!==void 0&&(s=M),R!==void 0&&(c=R),P!==void 0&&(g=P)}function b(D,w=s,I=a){let O;switch(D){case"topLeft":O={left:0,top:w,bottom:"auto"};break;case"topRight":O={right:0,top:w,bottom:"auto"};break;case"bottomLeft":O={left:0,top:"auto",bottom:I};break;default:O={right:0,top:"auto",bottom:I};break}return O}function S({prefixCls:D,placement:w=r,getContainer:I=c,top:O,bottom:M,closeIcon:R=g},P){const L=`${D}-${w}`;if(m[L]){P(m[L]);return}const N=_.default.createElement("span",{className:`${D}-close-x`},R||_.default.createElement(u.default,{className:`${D}-close-icon`}));E.default.newInstance({prefixCls:D,className:`${D}-${w}`,style:b(w,O,M),getContainer:I,closeIcon:N},B=>{m[L]=B,P(B)})}const y={success:l.default,info:h.default,error:o.default,warning:p.default};function A(D){const w=D.prefixCls||"kt-notification",I=`${w}-notice`,O=(0,f.isUndefined)(D.duration)?d:D.duration;let M=null;D.icon?M=_.default.createElement("span",{className:`${I}-icon`},D.icon):D.type&&(M=_.default.createElement(y[D.type]||null,{className:`${I}-icon ${I}-icon-${D.type}`}));const{placement:R,top:P,bottom:L,getContainer:N,closeIcon:B}=D;S({prefixCls:w,placement:R,top:P,bottom:L,getContainer:N,closeIcon:B},k=>{k.notice({content:_.default.createElement("div",{className:M?`${I}-with-icon`:""},M,_.default.createElement("div",{className:`${I}-message`},D.message),_.default.createElement("div",{className:`${I}-description`},D.description),D.btn?_.default.createElement("span",{className:`${I}-btn`},D.btn):null),duration:O,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(m).forEach(w=>m[w].removeNotice(D))},config:v,destroy(){Object.keys(m).forEach(D=>{m[D].destroy(),delete m[D]})}};["success","info","warning","error"].forEach(D=>{T[D]=w=>T.open(Object.assign(Object.assign({},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),l=n.__importDefault(t(53373)),o=n.__importDefault(t(14041)),u=t(53017);t(45531);const p=h=>{var{maskClosable:E=!1,closable:_=!0,className:f,onClose:m,children:d,footer:s,title:a,getContainer:r,keyboard:c}=h,g=n.__rest(h,["maskClosable","closable","className","onClose","children","footer","title","getContainer","keyboard"]);return o.default.createElement(u.Modal,Object.assign({footer:s||null,maskClosable:E,closable:_,onCancel:m,title:a,getContainer:r,className:(0,l.default)("kt-overlay",f),keyboard:c},g),d)};e.Overlay=p},91397:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Popover=e.PopoverPosition=e.PopoverTriggerType=void 0;const n=t(85608),l=n.__importDefault(t(53373)),o=n.__importDefault(t(6208)),u=n.__importStar(t(14041));t(14856);const p=t(48412);var h;(function(f){f.hover="hover",f.click="click",f.focus="focus"})(h=e.PopoverTriggerType||(e.PopoverTriggerType={}));var E;(function(f){f.top="top",f.bottom="bottom",f.left="left",f.right="right",f.topLeft="topLeft",f.topRight="topRight",f.bottomLeft="bottomLeft",f.bottomRight="bottomRight",f.leftTop="leftTop",f.leftBottom="leftBottom",f.rightTop="rightTop",f.rightBottom="rightBottom"})(E=e.PopoverPosition||(e.PopoverPosition={}));const _=f=>{var{children:m,trigger:d=h.hover,visible:s,content:a,position:r=E.top,showArrow:c=!0,title:g,titleClassName:v,overlay:b,overlayClassName:S,overlayStyle:y,action:A,delay:T,zIndex:D=1e3,onClickAction:w,onVisibleChange:I}=f,O=n.__rest(f,["children","trigger","visible","content","position","showArrow","title","titleClassName","overlay","overlayClassName","overlayStyle","action","delay","zIndex","onClickAction","onVisibleChange"]);const M=(0,u.useCallback)(P=>{w&&w(P)},[w]),R=(0,u.useMemo)(()=>b||(!g&&!a?null:u.default.createElement(u.default.Fragment,null,g&&u.default.createElement("p",{className:(0,l.default)("kt-popover-title",v)},g,A&&u.default.createElement(p.Button,{size:"small",type:"link",onClick:M},A)),a||"")),[b,a,A,M]);return R?u.default.createElement(o.default,Object.assign({},O,{visible:s,placement:r,mouseEnterDelay:T?T/1e3:void 0,trigger:d,showArrow:c,onVisibleChange:I,overlayClassName:S,prefixCls:"kt-popover",overlayStyle:y,overlay:R,zIndex:D}),u.default.createElement("div",{className:"kt-popover-trigger"},m)):m};e.Popover=_},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),l=n.__importDefault(t(53373)),o=n.__importStar(t(14041)),u=n.__importDefault(t(19686)),p=t(58723),h=t(77011);e.RECYCLE_LIST_STABILIZATION_TIME=500,e.RECYCLE_LIST_OVER_SCAN_COUNT=50;const E=({width:_,height:f,maxHeight:m,minHeight:d,className:s,style:a,data:r,onReady:c,onScroll:g,itemHeight:v,header:b,footer:S,template:y,paddingBottomSize:A,getSize:T,hiddenVerticalScrollbar:D,hiddenHorizontalScrollbar:w})=>{const I=(0,o.useRef)(),O=(0,o.useRef)(),M=(0,o.useRef)({}),R=(0,o.useRef)(0),P=(0,o.useRef)();(0,o.useEffect)(()=>{typeof c=="function"&&c({scrollTo:$=>{var Q;(Q=I.current)===null||Q===void 0||Q.scrollTo($)},scrollToIndex:($,Q="start")=>{var Y,re;let se=$;if(b&&se++,typeof v=="number")(Y=I.current)===null||Y===void 0||Y.scrollToItem(se,Q);else{P.current&&clearTimeout(P.current);const fe=(M.current?Object.keys(M.current):[]).slice(0,se).reduce((ee,_e)=>ee+N(_e),0);(re=I.current)===null||re===void 0||re.scrollToItem($,Q),P.current=setTimeout(()=>{var ee;(M.current?Object.keys(M.current):[]).slice(0,se).reduce((q,ae)=>q+N(ae),0)!==fe&&((ee=I.current)===null||ee===void 0||ee.scrollToItem($,Q)),P.current=null},e.RECYCLE_LIST_STABILIZATION_TIME)}}})},[]);const L=(U,$)=>{var Q;M.current[U]!==$&&(M.current=Object.assign(Object.assign({},M.current),{[U]:$}),I.current&&((Q=I.current)===null||Q===void 0||Q.resetAfterIndex(0)))},N=(0,o.useCallback)(U=>T?T(Number(U)):(M?.current||[])[U]||v||100,[v,T]),B=(0,o.useCallback)(()=>{if(m){let U=0;for(let $=0;$<r.length;$++)U+=N($);return U>m?m:U}},[m,r]),k=(0,o.useCallback)(()=>{if(d)return d},[d,r]),F=(0,o.useMemo)(()=>{let U=r.length;return b&&U++,S&&U++,U},[r,S,b]),W=({index:U,style:$})=>{let Q;if(U===0&&b)return o.default.createElement("div",{style:$},o.default.createElement(b,null));if(U+1===F&&S)return o.default.createElement("div",{style:$},o.default.createElement(S,null));if(b?Q=r[U-1]:Q=r[U],!Q)return o.default.createElement("div",{style:$});const Y={"aria-setsize":F,"aria-posinset":U};return o.default.createElement("div",Object.assign({tabIndex:0,style:$,role:"listitem"},Y),o.default.createElement(y,{data:Q,index:U}))},j=({index:U,style:$})=>{const Q=(0,o.useRef)(null),Y=(0,o.useRef)(),re=()=>{if(Q.current){let le=0;for(let fe=0;fe<Q.current.children.length;fe++)le+=Q.current.children[fe].getBoundingClientRect().height;L(U,le)}};(0,o.useEffect)(()=>{if(Q.current&&I.current){Y.current=new MutationObserver(()=>{re()});const le={childList:!0,attributes:!0,characterData:!0,attributeFilter:["class","style"],attributeOldValue:!0,characterDataOldValue:!0};Y.current.observe(Q.current,le),re()}return()=>{Y.current.disconnect()}},[Q.current]);let se;return U===0&&b?o.default.createElement("div",{style:$},o.default.createElement(b,null)):U+1===F&&S?o.default.createElement("div",{style:$},o.default.createElement(S,null)):(b?se=r[U-1]:se=r[U],se?o.default.createElement("div",{style:$,ref:Q},o.default.createElement(y,{data:se,index:U})):o.default.createElement("div",{style:$}))},H=(0,o.useMemo)(()=>r.reduce(($,Q)=>$+N(Q),0)/r.length,[r]),K=(0,o.useCallback)(U=>{R.current=U.scrollOffset,g&&g(U)},[g]),G=(0,o.useMemo)(()=>(0,o.forwardRef)((U,$)=>{const Q=U,{style:Y}=Q,re=n.__rest(Q,["style"]);return o.default.createElement("div",Object.assign({ref:$,style:Object.assign(Object.assign({},Y),{height:`${parseFloat(Y.height)+(A||0)}px`})},re))}),[A]),V=(0,o.useMemo)(()=>(0,o.forwardRef)((U,$)=>o.default.createElement(h.Scrollbars,Object.assign({hiddenVertical:D,hiddenHorizontal:w},U,{thumbSize:10,forwardedRef:$}))),[D,w]);return(()=>{const U=typeof v!="number",$=!_||!f;return(()=>{const Y=({width:re,height:se})=>{O.current&&(O.current.scrollTop=R.current);const le=B(),fe=k();let ee=se;return fe?ee=Math.min(se,fe):le&&(ee=le),U?o.default.createElement(p.VariableSizeList,{onScroll:K,width:re,height:ee,itemData:[],itemSize:N,itemCount:F,overscanCount:e.RECYCLE_LIST_OVER_SCAN_COUNT,ref:I,style:Object.assign({transform:"translate3d(0px, 0px, 0px)"},a),className:(0,l.default)(s,"kt-recycle-list"),innerElementType:G,outerElementType:V,estimatedItemSize:H},j):o.default.createElement(p.FixedSizeList,{onScroll:K,width:re,height:ee,itemData:[],itemSize:v,itemCount:F,overscanCount:e.RECYCLE_LIST_OVER_SCAN_COUNT,ref:I,outerRef:O,style:Object.assign({transform:"translate3d(0px, 0px, 0px)"},a),className:(0,l.default)(s,"recycle-list"),innerElementType:G,outerElementType:V},W)};return $?o.default.createElement(u.default,null,Y):Y({width:_,height:f})})()})()};e.RecycleList=E},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),l=n.__importDefault(t(39050)),o=n.__importStar(t(14041)),u=t(58723),p=t(70392),h=t(77011),E=t(48103),_=t(65601),f=t(43685),m=t(13429),d=t(34054);var s;(function(c){c[c.RENDER_ITEM=0]="RENDER_ITEM",c[c.GET_RENDED_KEY=1]="GET_RENDED_KEY",c[c.RENDER_ERROR=2]="RENDER_ERROR"})(s=e.RenderErrorType||(e.RenderErrorType={}));const a=o.default.forwardRef((c,g)=>{const v=c,{style:b}=v,S=n.__rest(v,["style"]);return o.default.createElement("div",Object.assign({ref:g,style:Object.assign(Object.assign({},b),{height:`${parseFloat(b.height)+r.PADDING_BOTTOM_SIZE}px`})},S))});class r extends o.default.Component{constructor(){super(...arguments),this.idxToRendererPropsCache=new Map,this.dynamicSizeMap=new Map,this.listRef=o.default.createRef(),this.disposables=new p.DisposableCollection,this.onErrorEmitter=new p.Emitter,this.onDidUpdateEmitter=new p.Emitter,this.onDidModelChangeEmitter=new p.Emitter,this.newPromptInsertionIndex=-1,this.idToFilterRendererPropsCache=new Map,this.filterFlattenBranchChildrenCache=new Map,this.filterWatcherDisposeCollection=new p.DisposableCollection,this.queueUpdatePromise=null,this.updateCancelToken=new p.CancellationTokenSource,this.expandNodeCancelToken=new p.CancellationTokenSource,this.willUpdateTasks=0,this.queueUpdateThrottler=new p.Throttler,this.doBatchUpdate=(()=>{const g=(v,b)=>{if(this.disposables.disposed)return;const{root:S}=this.props.model;let y=-1;if(this.promptTargetID>-1&&this.promptHandle instanceof _.NewPromptHandle&&this.promptHandle.parent&&this.promptHandle.parent.expanded&&S.isItemVisibleAtSurface(this.promptHandle.parent)&&!this.promptHandle.destroyed){const A=S.getIndexAtTreeNodeId(this.promptTargetID);if(A>-1||this.promptHandle.parent===S)if(this.promptHandle.type===d.TreeNodeType.TreeNode){const T=this.promptHandle.parent;T?y=this.getNewPromptInsertIndex(A,T):y=A+1}else y=A+1;else this.promptTargetID=-1}if(y===-1&&this.promptHandle&&this.promptHandle.constructor===_.NewPromptHandle&&!this.promptHandle.destroyed&&this.promptHandle.destroy(),this.newPromptInsertionIndex=y,this.idxToRendererPropsCache.clear(),b.isCancellationRequested){v();return}this.forceUpdate(()=>{v(),this.props.filter&&this.props.filterProvider&&this.props.filterProvider.filterAlways&&this.filterItems(this.props.filter)})};return()=>{const v=(y,A)=>{const T=!!this.willUpdateTasks;if(this.willUpdateTasks=0,!T)A.resolve();else{this.updateCancelToken.cancel(),this.updateCancelToken=new p.CancellationTokenSource;const D=this.updateCancelToken.token;requestAnimationFrame(()=>{if(D.isCancellationRequested){A();return}g(A,D)})}return y};let b;const S=new Promise(y=>b=y);return S.then(()=>{this.onDidUpdateEmitter.fire()}),v(S,b),S}})(),this.batchUpdate=()=>(this.willUpdateTasks++,this.queueUpdatePromise=this.queueUpdateThrottler.queue(this.doBatchUpdate),this.queueUpdatePromise),this.promptNewTreeNode=g=>this.promptNew(g),this.promptNewCompositeTreeNode=g=>this.promptNew(g,d.TreeNodeType.CompositeTreeNode),this.promptRename=async(g,v)=>{var b,S;const{root:y}=this.props.model,A=typeof g=="string"?await y.getTreeNodeByPath(g):g;if(!f.TreeNode.is(A)||f.CompositeTreeNode.isRoot(A))throw new TypeError(`Cannot rename object of type ${typeof A}`);const T=new E.RenamePromptHandle(v||A.name,A);return this.promptHandle=T,this.promptTargetID=A.id,y.isItemVisibleAtSurface(A)?await this.batchUpdate():await A.parent.setExpanded(!0),(S=(b=this.listRef)===null||b===void 0?void 0:b.current)===null||S===void 0||S.scrollToItem(y.getIndexAtTreeNodeId(this.promptTargetID)),this.promptHandle},this.expandNode=async g=>{const{root:v}=this.props.model,b=typeof g=="string"?v.getTreeNodeByPath(g):g;if(this.expandNodeCancelToken.token.isCancellationRequested&&(this.expandNodeCancelToken=new p.CancellationTokenSource),b&&f.CompositeTreeNode.is(b)&&!b.disposed)return b.setExpanded(!1,!1,!0,this.expandNodeCancelToken.token)},this.collapseNode=async g=>{const{root:v}=this.props.model,b=typeof g=="string"?v.getTreeNodeByPath(g):g;if(b&&f.CompositeTreeNode.is(b)&&!b.disposed)return this.expandNodeCancelToken.cancel(),b.setCollapsed()},this._isEnsuring=!1,this.ensureVisible=async(g,v="smart",b=!1)=>{if(this._isEnsuring)return;this._isEnsuring=!0;const{root:S}=this.props.model,y=typeof g=="string"?S.getTreeNodeByPath(g)||await S.loadTreeNodeByPath(g):g;if(y&&!S.isItemVisibleAtSurface(y)&&await S.loadTreeNodeByPath(y.path),!f.TreeNode.is(y)||f.CompositeTreeNode.isRoot(y)){this._isEnsuring=!1;return}return b?this.tryScrollIntoViewWhileStable(y,v):this.tryScrollIntoView(y,v),this._isEnsuring=!1,y},this.getItemAtIndex=g=>{const{filter:v}=this.props;if(v&&this.filterFlattenBranch.length>0)return this.idToFilterRendererPropsCache.get(this.filterFlattenBranch[g]);let b=this.idxToRendererPropsCache.get(g);if(!b){const S=this.newPromptInsertionIndex,{root:y}=this.props.model;if(S>-1&&this.promptHandle&&this.promptHandle.constructor===_.NewPromptHandle&&!this.promptHandle.destroyed)if(g===S)b={itemType:d.TreeNodeType.NewPrompt,item:this.promptHandle};else{const A=y.getTreeNodeAtIndex(g-(g>=S?1:0));b={itemType:f.CompositeTreeNode.is(A)?d.TreeNodeType.CompositeTreeNode:d.TreeNodeType.TreeNode,item:A}}else{const A=y.getTreeNodeAtIndex(g);A&&A.id===this.promptTargetID&&this.promptHandle&&this.promptHandle.constructor===E.RenamePromptHandle&&!this.promptHandle.destroyed?b={itemType:d.TreeNodeType.RenamePrompt,item:this.promptHandle}:b={itemType:f.CompositeTreeNode.is(A)?d.TreeNodeType.CompositeTreeNode:d.TreeNodeType.TreeNode,item:A}}this.idxToRendererPropsCache.set(g,b)}return b},this.handleListScroll=({scrollOffset:g})=>{const{model:v,height:b,itemHeight:S}=this.props;if(v.state.saveScrollOffset(g),!this.promptHandle||!S)return;let y;this.promptHandle instanceof _.NewPromptHandle&&this.newPromptInsertionIndex>-1?y=this.newPromptInsertionIndex:y=v.root.getIndexAtTreeNodeId(this.promptHandle.id),(g+b<y*S||y*S<g)&&this.promptHandle.destroy()},this.getItemKey=g=>{const v=this.getItemAtIndex(g),{getItemKey:b}=this.props,S=b?b(v):void 0;return S??g},this.filterItems=g=>{const{model:{root:v},filterProvider:b}=this.props;if(this.filterWatcherDisposeCollection.dispose(),this.idToFilterRendererPropsCache.clear(),!g)return;const S=/\//.test(g),y=new Set,A=new Map,T=[];for(let D=0,w=v.branchSize;D<w;D++){const I=v.getTreeNodeAtIndex(D);T.push(I)}if(S)T.forEach(D=>{if(D&&D.path.indexOf(g)>-1){y.add(D.id);let w=D.parent;for(;w&&!f.CompositeTreeNode.isRoot(w);)y.add(w.id),w=w.parent}});else{let D=[];b?D=l.default.filter(g,T,b.fuzzyOptions()):D=l.default.filter(g,T,r.FILTER_FUZZY_OPTIONS);const w=I=>{const O=I.children||[];if(O.length>0)for(const M of O)y.add(M.id),f.CompositeTreeNode.is(M)&&M.expanded&&w(M)};D.forEach(I=>{const O=I.original;y.add(O.id);let M=O.parent;for(A.set(O.id,()=>o.default.createElement("div",{style:{flex:1,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},dangerouslySetInnerHTML:{__html:I.string||""}})),f.CompositeTreeNode.is(O)&&w(O);M&&!f.CompositeTreeNode.isRoot(M);)y.add(M.id),M=M.parent})}this.filterFlattenBranch=new Array(y.size);for(let D=0,w=0,I=v.branchSize;w<I;w++){const O=v.getTreeNodeAtIndex(w);O&&y.has(O.id)&&(this.filterFlattenBranch[D]=O.id,f.CompositeTreeNode.is(O)?this.idToFilterRendererPropsCache.set(O.id,{item:O,itemType:d.TreeNodeType.CompositeTreeNode,template:A.has(O.id)?A.get(O.id):void 0}):this.idToFilterRendererPropsCache.set(O.id,{item:O,itemType:d.TreeNodeType.TreeNode,template:A.has(O.id)?A.get(O.id):void 0}),D++)}this.filterWatcherDisposeCollection.push(v.watcher.on(d.TreeNodeEvent.DidChangeExpansionState,(D,w)=>{const I=this.filterFlattenBranch.indexOf(D.id);if(w){const O=this.filterFlattenBranchChildrenCache.get(D.id);O&&O.length>0&&(this.filterFlattenBranch=(0,f.spliceArray)(this.filterFlattenBranch,I+1,0,O),this.filterFlattenBranchChildrenCache.delete(D.id))}else{const O=[];for(let M=I+1;M<this.filterFlattenBranch.length;M++){const R=v.getTreeNodeById(this.filterFlattenBranch[M]);if(R&&R.depth>D.depth)O.push(R.id);else break}this.filterFlattenBranchChildrenCache.set(D.id,O),this.filterFlattenBranch=(0,f.spliceArray)(this.filterFlattenBranch,I+1,O.length)}})),this.filterWatcherDisposeCollection.push(p.Disposable.create(()=>{this.filterFlattenBranchChildrenCache.clear()}))},this.renderItem=({index:g,style:v})=>{var b,S,y,A,T,D,w;const{children:I,overflow:O="ellipsis",supportDynamicHeights:M}=this.props,R=this.getItemAtIndex(g),P=(0,o.useRef)(null),L=(0,o.useMemo)(()=>M?()=>{let j=0;if(P.current){const H=P.current;j=Array.from(H.children).reduce((K,G)=>K+G.getBoundingClientRect().height,0)}return j&&(this.dynamicSizeMap.set(g,j),this.layoutItem()),Math.max(j,r.DEFAULT_ITEM_HEIGHT)}:()=>{},[M]);if((0,o.useEffect)(()=>{P.current&&L()},[]),!R)return o.default.createElement(o.default.Fragment,null);const{item:N,itemType:B,template:k}=R;if(!N)return o.default.createElement("div",{style:v});let F;f.CompositeTreeNode.is(N)?F={"aria-label":(b=N.accessibilityInformation)===null||b===void 0?void 0:b.label,"aria-expanded":N.expanded,"aria-level":N.depth,"aria-setsize":(y=(S=N.parent)===null||S===void 0?void 0:S.children)===null||y===void 0?void 0:y.length,"aria-posinset":g}:f.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":g});const W=O==="ellipsis"?v:Object.assign(Object.assign({},v),{width:"auto",minWidth:"100%"});return o.default.createElement("div",Object.assign({ref:P,style:W,role:((w=N.accessibilityInformation)===null||w===void 0?void 0:w.role)||"treeiem"},F),o.default.createElement(m.NodeRendererWrap,{item:N,depth:N.depth,itemType:B,template:k,hasPrompt:!!this.promptHandle&&!this.promptHandle.destroyed,expanded:f.CompositeTreeNode.is(N)?N.expanded:void 0},I))},this.layoutItem=()=>{var g,v,b,S;if(this.props.supportDynamicHeights&&this.listRef&&!((g=this.listRef)===null||g===void 0)&&g.current&&"_getRangeToRender"in((v=this.listRef)===null||v===void 0?void 0:v.current)){const y=(b=this.listRef)===null||b===void 0?void 0:b.current._getRangeToRender();if(y){const A=y[0];((S=this.listRef)===null||S===void 0?void 0:S.current).resetAfterIndex(A)}}}}getNewPromptInsertIndex(g,v){const{root:b}=this.props.model;let S=g+1;for(;S-g<=v.branchSize;S++){const y=b.getTreeNodeAtIndex(S);if(!y)return S;if(!f.CompositeTreeNode.is(y)){if(y?.depth>v.depth+1)continue;return S}}return S}UNSAFE_componentWillUpdate(g){this.props.filter!==g.filter&&this.filterItems(g.filter),this.props.model!==g.model&&(this.idxToRendererPropsCache.clear(),this.idToFilterRendererPropsCache.clear(),this.dynamicSizeMap.clear())}componentDidUpdate(g){var v,b;if(this.props.model!==g.model){this.disposables.dispose();const{model:S}=this.props;(b=(v=this.listRef)===null||v===void 0?void 0:v.current)===null||b===void 0||b.scrollTo(S.state.scrollOffset),this.disposables.push(S.onChange(this.batchUpdate.bind(this))),this.disposables.push(S.state.onDidLoadState(()=>{var y,A;(A=(y=this.listRef)===null||y===void 0?void 0:y.current)===null||A===void 0||A.scrollTo(S.state.scrollOffset)})),this.onDidModelChangeEmitter.fire({preModel:g.model,nextModel:S})}}async promptNew(g,v=d.TreeNodeType.TreeNode){var b,S;const{root:y}=this.props.model;let A=typeof g=="string"?await y.getTreeNodeByPath(g):g;if(v!==d.TreeNodeType.TreeNode&&v!==d.TreeNodeType.CompositeTreeNode)throw new TypeError(`Invalid type supplied. Expected 'TreeNodeType.TreeNode' or 'TreeNodeType.CompositeTreeNode', got ${v}`);if(A&&!f.CompositeTreeNode.is(A)&&(A=A.parent,!f.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 ${g}`);const T=new _.NewPromptHandle(v,A);return this.promptHandle=T,this.promptTargetID=A.id,A!==y&&(!A.expanded||!y.isItemVisibleAtSurface(A))?await A.setExpanded(!0):await this.batchUpdate(),this.newPromptInsertionIndex>=0?(S=(b=this.listRef)===null||b===void 0?void 0:b.current)===null||S===void 0||S.scrollToItem(this.newPromptInsertionIndex):this.tryScrollIntoViewWhileStable(this.promptHandle),this.promptHandle}tryScrollIntoView(g,v="auto"){var b,S,y,A;const{root:T}=this.props.model;g.constructor===_.NewPromptHandle&&!g.destroyed?(S=(b=this.listRef)===null||b===void 0?void 0:b.current)===null||S===void 0||S.scrollToItem(this.newPromptInsertionIndex):T.isItemVisibleAtSurface(g)&&((A=(y=this.listRef)===null||y===void 0?void 0:y.current)===null||A===void 0||A.scrollToItem(T.getIndexAtTreeNode(g),v))}tryScrollIntoViewWhileStable(g,v="smart"){const{root:b}=this.props.model;if(this.tryEnsureVisibleTimes>r.TRY_ENSURE_VISIBLE_MAX_TIMES){this.tryEnsureVisibleTimes=0;return}p.Event.once(this.props.model.onChange)(async()=>{var S,y,A,T;await this.queueUpdatePromise,g.constructor===_.NewPromptHandle&&!g.destroyed?(y=(S=this.listRef)===null||S===void 0?void 0:S.current)===null||y===void 0||y.scrollToItem(this.newPromptInsertionIndex):b.isItemVisibleAtSurface(g)?((T=(A=this.listRef)===null||A===void 0?void 0:A.current)===null||T===void 0||T.scrollToItem(b.getIndexAtTreeNode(g),v),this.tryEnsureVisibleTimes=0):(this.tryEnsureVisibleTimes++,this.tryScrollIntoViewWhileStable(g,v))})}componentDidMount(){var g,v;const{model:b,onReady:S}=this.props;if((v=(g=this.listRef)===null||g===void 0?void 0:g.current)===null||v===void 0||v.scrollTo(b.state.scrollOffset),this.disposables.push(b.onChange(this.batchUpdate.bind(this))),this.disposables.push(b.state.onDidLoadState(()=>{var y,A;(A=(y=this.listRef)===null||y===void 0?void 0:y.current)===null||A===void 0||A.scrollTo(b.state.scrollOffset)})),typeof S=="function"){const y={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:p.Event.once(this.onDidUpdateEmitter.event),onError:this.onErrorEmitter.event};S(y)}}componentWillUnmount(){this.disposables.dispose()}set promptHandle(g){this._promptHandle!==g&&(this._promptHandle instanceof E.PromptHandle&&!this._promptHandle.destroyed&&this._promptHandle.destroy(),g.onDestroy(this.batchUpdate),this._promptHandle=g)}get promptHandle(){return this._promptHandle}get adjustedRowCount(){const{root:g}=this.props.model,{filter:v}=this.props;return v?this.filterFlattenBranch.length:this.newPromptInsertionIndex>-1&&this.promptHandle&&this.promptHandle.constructor===_.NewPromptHandle&&!this.promptHandle.destroyed?g.branchSize+1:g.branchSize}getItemSize(g){return this.dynamicSizeMap.get(g)||this.props.itemHeight}render(){const{children:g,itemHeight:v,width:b="100%",height:S,style:y,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 O={children:g,height:S,width:b,itemData:[],itemCount:this.adjustedRowCount,itemKey:this.getItemKey,overscanCount:D||r.DEFAULT_OVER_SCAN_COUNT,onScroll:this.handleListScroll,style:Object.assign({transform:"translate3d(0px, 0px, 0px)"},y),className:A,outerElementType:h.ScrollbarsVirtualList};return w&&(O.innerElementType=a),I?o.default.createElement(u.VariableSizeList,Object.assign({ref:this.listRef,itemSize:this.getItemSize.bind(this)},O),this.renderItem):o.default.createElement(u.FixedSizeList,Object.assign({ref:this.listRef,itemSize:v},O),this.renderItem)}}e.RecycleTree=r,r.PADDING_BOTTOM_SIZE=22,r.DEFAULT_ITEM_HEIGHT=22,r.TRY_ENSURE_VISIBLE_MAX_TIMES=5,r.FILTER_FUZZY_OPTIONS={pre:"<match>",post:"</match>",extract:c=>c?.name||""},r.DEFAULT_OVER_SCAN_COUNT=50},13429:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NodeRendererWrap=void 0;const l=t(85608).__importDefault(t(14041));class o extends l.default.Component{render(){const{item:p,itemType:h,children:E,template:_,hasPrompt:f}=this.props;return l.default.createElement(E,{item:p,itemType:h,template:_,hasPrompt:f,key:p.id})}shouldComponentUpdate(p){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),l=n.__importStar(t(14041)),o=n.__importDefault(t(26737)),u=t(58998),p=t(57621),h=t(64013),E=t(84225),_=t(17462),f=t(78569),m=t(45203);t(12794),t(34728),n.__exportStar(t(92532),e);const d=({width:s,height:a,itemHeight:r=22,itemClassname:c,indent:g,baseIndent:v,containerClassname:b,onClick:S,onContextMenu:y,onTwistierClick:A,onIconClick:T,onDbClick:D,resolveChildren:w,sortComparator:I,treeData:O,inlineMenus:M,inlineMenuActuator:R,onReady:P,contextMenus:L,contextMenuActuator:N,treeName:B,leaveBottomBlank:k=!0})=>{const[F,W]=(0,l.useState)({show:!1}),[j,H]=(0,l.useState)([]),[K,G]=(0,l.useState)(),V=(0,l.useRef)(!1),z=(0,l.useRef)(),U=(0,l.useRef)(),$=(0,l.useRef)(null),Q=(0,l.useCallback)(X=>{var oe;return l.default.createElement(_.BasicTreeNodeRenderer,{item:X.item,itemType:X.itemType,itemHeight:r,indent:g,baseIndent:v,className:c,inlineMenus:M,inlineMenuActuator:R,onClick:le,onDbClick:ee,onContextMenu:_e,onTwistierClick:q,onIconClick:fe,decorations:(oe=z.current)===null||oe===void 0?void 0:oe.decorations.getDecorations(X.item)})},[K]);(0,l.useEffect)(()=>{var X,oe;z.current=new m.BasicTreeService(O,w,I,{treeName:B});const ne=(X=z.current)===null||X===void 0?void 0:X.onDidUpdateTreeModel(ue=>{Y(ue)}),de=()=>{var ue;(ue=z.current)===null||ue===void 0||ue.enactiveFocusedDecoration()};return(oe=$.current)===null||oe===void 0||oe.addEventListener("blur",de,!0),()=>{var ue,ve;V.current=!0,(ue=$.current)===null||ue===void 0||ue.removeEventListener("blur",de,!0),ne.dispose(),(ve=z.current)===null||ve===void 0||ve.dispose()}},[]),(0,l.useEffect)(()=>{var X;(X=z.current)===null||X===void 0||X.updateTreeData(O)},[O]);const Y=async X=>{X&&await X.ensureReady,V.current||G(X)},re=async X=>{var oe;(oe=z.current)===null||oe===void 0||oe.activeFocusedDecoration(X),f.BasicCompositeTreeNode.is(X)&&pe(X)},se=(0,l.useCallback)(X=>{P&&P(Object.assign(Object.assign({},X),{selectItem:re,focusItem:async oe=>{var ne;const de=`/${B}/${oe}`;await K?.ensureReady;const ue=await X.ensureVisible(de,"auto",!0);ue&&((ne=z.current)===null||ne===void 0||ne.activeFocusedDecoration(ue))}})),U.current=X},[z.current]),le=(0,l.useCallback)((X,oe)=>{re(oe),S&&S(X,oe)},[S]),fe=(0,l.useCallback)((X,oe)=>{T&&T(X,oe)},[T]),ee=(0,l.useCallback)((X,oe)=>{D&&D(X,oe)},[D]),_e=(0,l.useCallback)((X,oe)=>{var ne,de;if(oe?(ne=z.current)===null||ne===void 0||ne.activeContextMenuDecoration(oe):(de=z.current)===null||de===void 0||de.enactiveFocusedDecoration(),y)y(X,oe);else{let ue=[];Array.isArray(L)?ue=L:typeof L=="function"&&(ue=L(oe));const ve=new Set,te={};for(const Ae of ue)ve.add(Ae.group||"-1"),te[Ae.group||"-1"]||(te[Ae.group||"-1"]=[]),te[Ae.group||"-1"].push(Ae);const ge=Array.from(ve).sort((Ae,De)=>Ae.localeCompare(De,"kn",{numeric:!0}));let Ce=[];for(const Ae of ge)Ce=Ce.concat(te[Ae].map(De=>({id:De.id,label:De.title,group:De.group}))),Ce=Ce.concat([{id:`${Ae}_divider`,label:"",type:"divider"}]);Ce.pop(),JSON.stringify(Ce)!==JSON.stringify(j)&&H(Ce);const{x:ye,y:Se}=X.nativeEvent;W({show:!0,point:{pageX:ye,pageY:Se},activeNode:oe})}},[D]),pe=(0,l.useCallback)(X=>{var oe,ne;X.expanded?(oe=U.current)===null||oe===void 0||oe.collapseNode(X):(ne=U.current)===null||ne===void 0||ne.expandNode(X)},[]),q=(0,l.useCallback)((X,oe)=>{f.BasicCompositeTreeNode.is(oe)&&pe(oe),A&&A(X,oe)},[A]),ae=(0,l.useCallback)(()=>{var X;(X=z.current)===null||X===void 0||X.enactiveFocusedDecoration()},[]),ie=(0,l.useCallback)((X,oe)=>{y&&y(X,oe)},[]),he=(0,l.useCallback)(()=>{W(Object.assign(Object.assign({},F),{show:!1}))},[F]),J=(0,l.useCallback)(()=>L?l.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:E.placements,popup:l.default.createElement(u.ClickOutside,{className:"basic_tree_menubars",mouseEvents:["click","contextmenu"],onOutsideClick:he},j.map(({id:X,label:oe,type:ne})=>l.default.createElement(h.BasicMenuItem,{key:X,id:X,label:oe,type:ne,focusMode:F.show,onClick:de=>{N&&N(F.activeNode,de),W({show:!1})}}))),alignPoint:!0}):null,[j,N,F]);return l.default.createElement("div",{className:"basic_tree",tabIndex:-1,ref:$,onClick:ae,onContextMenu:ie},J(),K?l.default.createElement(p.RecycleTree,{height:a,width:s,itemHeight:r,model:K,onReady:se,className:b,leaveBottomBlank:k},Q):null)};e.BasicRecycleTree=d},64013:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BasicMenuItem=void 0;const n=t(85608),l=n.__importDefault(t(53373)),o=n.__importDefault(t(14041)),u=({id:p,label:h,type:E,focusMode:_,onClick:f})=>{const[m,d]=o.default.useState(!1),s=o.default.useCallback(()=>{d(_?!0:r=>!r),f(p)},[p]),a=o.default.useCallback(()=>{},[p,_]);return E==="divider"?o.default.createElement("div",{className:"basic_menu_item_divider"}):o.default.createElement("div",{className:(0,l.default)("basic_menu_item",{"menu-open":m}),onMouseOver:a,onClick:s},h)};e.BasicMenuItem=u},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 l extends n.CompositeTreeNode{constructor(h,E,_,f={}){super(h,E,void 0,{treeName:f.treeName}),this._raw=_}get name(){var h;return(h=this.getMetadata("treeName"))!==null&&h!==void 0?h:`BasicTreeRoot_${this.id}`}get raw(){return this._raw}get expanded(){return!0}}e.BasicTreeRoot=l;class o extends n.CompositeTreeNode{constructor(h,E,_,f){super(h,E,void 0,{name:_.label}),this.isExpanded=_.expanded||!1,this.id=f||this.id,this._displayName=_.label,this._raw=_}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 u extends n.TreeNode{constructor(h,E,_,f){super(h,E,void 0,{name:_.label}),this.id=f||this.id,this._displayName=_.label,this._raw=_}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=u},17462:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BasicTreeNodeRenderer=void 0;const n=t(85608),l=n.__importDefault(t(53373)),o=n.__importStar(t(14041)),u=t(48412),p=t(54713),h=t(3660),E=t(78569),_=t(92532);t(12794);const f=({item:m,className:d,itemHeight:s=22,indent:a=8,baseIndent:r=8,onClick:c,onDbClick:g,onTwistierClick:v,onIconClick:b,onContextMenu:S,decorations:y,inlineMenus:A=[],inlineMenuActuator:T=()=>{}})=>{const D=(0,o.useCallback)(V=>{c&&(V.stopPropagation(),c(V,m))},[c]),w=(0,o.useCallback)(V=>{g&&(V.stopPropagation(),g(V,m))},[g]),I=(0,o.useCallback)(V=>{S&&(V.stopPropagation(),V.preventDefault(),S(V,m))},[S]),O=(0,o.useCallback)(V=>{V.stopPropagation(),v?v(V,m):c&&c(V,m)},[c,v]),M=(0,o.useCallback)(V=>{V.stopPropagation(),b?b(V,m):c&&c(V,m)},[c,b]);let P=(m.depth>0?m.depth-1:0)*a;r&&(P+=r),m.indentOffset&&(P+=m.indentOffset);const L={height:s,lineHeight:`${s}px`,paddingLeft:`${P}px`},N=(0,o.useCallback)(V=>o.default.createElement(p.Icon,{onClick:M,icon:V.icon,className:(0,l.default)("icon",V.iconClassName)}),[]),B=(0,o.useCallback)(V=>V.displayName.replace(/\n/g,"\u21B5"),[]),k=(0,o.useCallback)(V=>V.displayName&&o.default.createElement("div",{className:(0,l.default)("segment","display_name")},B(V)),[]),F=(0,o.useCallback)(V=>V.renderLabel,[]),W=(0,o.useCallback)(V=>V.description?typeof V.description=="string"?o.default.createElement("div",{className:(0,l.default)("segment_grow","description")},V.description):V.description:null,[]),j=(0,o.useCallback)(V=>{if(Array.isArray(A))return A;if(typeof A=="function")return A(V)},[A]),H=()=>{var V;const z=E.BasicCompositeTreeNode.is(m),U=(V=j(m))===null||V===void 0?void 0:V.filter(Q=>z?Q.position===_.IBasicInlineMenuPosition.TREE_CONTAINER:Q.position===_.IBasicInlineMenuPosition.TREE_NODE);if(!U?.length)return null;const $=(0,o.useCallback)((Q,Y)=>{Q.stopPropagation(),T(m,Y)},[]);return o.default.createElement("div",{className:(0,l.default)("segment","tail")},U.map(Q=>o.default.createElement(u.Button,{style:{marginRight:"5px"},type:"icon",key:`${m.id}-${Q.icon}`,icon:Q.icon,title:Q.title,onClick:Y=>$(Y,Q)})))},K=(V,z)=>y&&y?.classlist.indexOf(_.DECORATIONS.LOADING)>-1?o.default.createElement(h.Loading,null):o.default.createElement(p.Icon,{className:(0,l.default)("segment","expansion_toggle",V.twisterClassName,{mod_collapsed:!V.expanded}),onClick:z,icon:"arrow-right"}),G=V=>{if(!V.expandable)return o.default.createElement("div",{className:(0,l.default)("segment","expansion_toggle",V.twisterPlaceholderClassName)});if(E.BasicCompositeTreeNode.is(V))return K(V,O)};return o.default.createElement("div",{key:m.id,onClick:D,onDoubleClick:w,onContextMenu:I,className:(0,l.default)("tree_node",d,y?y.classlist:null,m.className),style:L,"data-id":m.id},o.default.createElement("div",{className:"content"},G(m),N(m),o.default.createElement("div",{className:"overflow_wrap"},F(m)||k(m),W(m)),H()))};e.BasicTreeNodeRenderer=f},45203:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BasicTreeModel=e.BasicTreeService=void 0;const n=t(70392),l=t(43685),o=t(34054),u=t(78569),p=t(92532);class h extends l.Tree{constructor(f,m,d,s={}){super(),this._treeData=f,this._resolveChildren=m,this._sortComparator=d,this.treeOptions=s,this.selectedDecoration=new l.Decoration(p.DECORATIONS.SELECTED),this.focusedDecoration=new l.Decoration(p.DECORATIONS.FOCUSED),this.contextMenuDecoration=new l.Decoration(p.DECORATIONS.ACTIVED),this.loadingDecoration=new l.Decoration(p.DECORATIONS.LOADING),this._selectedNodes=[],this.disposableCollection=new n.DisposableCollection,this.decorationDisposableCollection=new n.DisposableCollection,this.onDidUpdateTreeModelEmitter=new n.Emitter,this.sortComparator=(a,r)=>{if(this._sortComparator){const c=this._sortComparator(a.raw,r.raw);if(typeof c<"u")return c}return super.sortComparator(a,r)},this.activeFocusedDecoration=a=>{var r;this._contextMenuNode&&(this.clearDecoration(this.contextMenuDecoration),this.clearDecoration(this.focusedDecoration),this.clearDecoration(this.selectedDecoration),this._contextMenuNode=void 0),a&&(this.selectedNodes.length>0&&this.clearDecoration(this.selectedDecoration),this.focusedNode&&(this.clearDecoration(this.focusedDecoration),this._focusedNode=void 0),this.selectedDecoration.addTarget(a),this.focusedDecoration.addTarget(a),this._focusedNode=a,this._selectedNodes=[a],(r=this.model)===null||r===void 0||r.dispatchChange())},this.activeContextMenuDecoration=a=>{var r;this._contextMenuNode&&(this.clearDecoration(this.contextMenuDecoration),this._contextMenuNode=void 0),this.focusedNode&&(this.clearDecoration(this.focusedDecoration),this._focusedNode=void 0),this.contextMenuDecoration.addTarget(a),this._contextMenuNode=a,(r=this.model)===null||r===void 0||r.dispatchChange()},this.enactiveFocusedDecoration=()=>{var a;this.focusedNode&&(this.clearDecoration(this.focusedDecoration),this._focusedNode=void 0,(a=this.model)===null||a===void 0||a.dispatchChange())},this.disposableCollection.push(this.onDidUpdateTreeModelEmitter)}setUpTreeModel(){this._root=new u.BasicTreeRoot(this,void 0,{children:this._treeData,label:"",command:"",icon:""},{treeName:this.treeOptions.treeName}),this._model=new E,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(f){this.decorationDisposableCollection.dispose(),this._decorations=new l.DecorationsManager(f),this._decorations.addDecoration(this.selectedDecoration),this._decorations.addDecoration(this.focusedDecoration),this._decorations.addDecoration(this.contextMenuDecoration),this._decorations.addDecoration(this.loadingDecoration),this.decorationDisposableCollection.push(f.watcher.on(o.TreeNodeEvent.WillResolveChildren,m=>{this.loadingDecoration.addTarget(m)})),this.decorationDisposableCollection.push(f.watcher.on(o.TreeNodeEvent.DidResolveChildren,m=>{this.loadingDecoration.removeTarget(m)})),this.decorationDisposableCollection.push(this._decorations)}updateTreeData(f){this._treeData=f,this.resetState(),this.setUpTreeModel()}async resolveChildren(f){return this._resolveChildren?this.transformTreeNode(f,this._resolveChildren(f?.raw)||[]):this.transformTreeNode(f,f?.raw.children||[])}transformTreeNode(f,m){if(!m)return[];const d=[];for(const s of m)s.children?d.push(new u.BasicCompositeTreeNode(this,f,s)):d.push(new u.BasicTreeNode(this,f,s));return d}get selectedNodes(){return this._selectedNodes}get focusedNode(){return this._focusedNode}get contextMenuNode(){return this._contextMenuNode}clearDecoration(f){for(const m of f.appliedTargets.keys())f.removeTarget(m)}dispose(){super.dispose(),this.disposableCollection.dispose(),this.decorationDisposableCollection.dispose()}}e.BasicTreeService=h;class E extends l.TreeModel{}e.BasicTreeModel=E},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||(e.IBasicInlineMenuPosition={})),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 l=t(85608).__importDefault(t(14041)),o=t(34054),u=p=>h=>{const{model:E,itemHeight:_,onReady:f}=h,m=l.default.useRef(),d=l.default.useRef(!1),[s,a]=l.default.useState(0),r=()=>{a(E.root.branchSize*_)},c=g=>{f&&f(Object.assign(Object.assign({},g),{promptNewTreeNode:async v=>{var b;const S=await g.promptNewTreeNode(v);return!((b=m.current)===null||b===void 0)&&b.root.branchSize?a(m.current.root.branchSize*_+_):a(_),d.current=!1,S.onDestroy(()=>{var y;!((y=m.current)===null||y===void 0)&&y.root.branchSize&&a(m.current.root.branchSize*_)}),S.onCancel(()=>{m.current&&a(m.current.root.branchSize*_)}),S.onBlur(()=>d.current),S},promptNewCompositeTreeNode:async v=>{var b;const S=await g.promptNewCompositeTreeNode(v);return!((b=m.current)===null||b===void 0)&&b.root.branchSize?a(m.current.root.branchSize*_+_):a(_),S.onDestroy(()=>{var y;!((y=m.current)===null||y===void 0)&&y.root.branchSize&&a(m.current.root.branchSize*_)}),S.onCancel(()=>{var y;!((y=m.current)===null||y===void 0)&&y.root.branchSize&&a(m.current.root.branchSize*_)}),S.onBlur(()=>d.current),S}}))};return l.default.useEffect(()=>{m.current=E,m.current.root&&(a(m.current.root.branchSize*_),m.current.root.watcher.on(o.TreeNodeEvent.DidChangeExpansionState,r))},[E]),l.default.useEffect(()=>{setTimeout(()=>{d.current=!0},100)},[s]),l.default.createElement(l.default.Fragment,null,l.default.createElement(p,Object.assign(Object.assign({},h),{height:s,onReady:c})))};e.RecycleTreeAdaptiveDecorator=u},326:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.RecycleTreeFilterDecorator=void 0;const n=t(85608),l=n.__importDefault(t(97331)),o=n.__importStar(t(14041)),u=t(54713),p=t(50708),h=t(4981);t(69715);const E=30,_=500,f=d=>{const{localize:s}=o.default.useContext(h.LocalizeContext);return o.default.createElement("div",{className:"kt-recycle-tree-filter-wrapper"},o.default.createElement(p.Input,Object.assign({hasClear:!0,autoFocus:!0,className:"kt-recycle-tree-filter-input",size:"small"},d,{placeholder:d.placeholder||s("tree.filter.placeholder"),addonBefore:o.default.createElement(u.Icon,{className:"kt-recycle-tree-filter-icon",icon:"retrieval"})})))},m=d=>s=>{const[a,r]=o.default.useState(""),[c,g]=o.default.useState(""),{beforeFilterValueChange:v,filterEnabled:b,height:S,filterPlaceholder:y,filterAfterClear:A,onReady:T,onFilterBlur:D,filterAutoFocus:w}=s,I=n.__rest(s,["beforeFilterValueChange","filterEnabled","height","filterPlaceholder","filterAfterClear","onReady","onFilterBlur","filterAutoFocus"]),O=(0,l.default)(async P=>{v&&await v(P),g(P)},_),M=(0,o.useCallback)(P=>{r(P),O(P)},[a]),R=(0,o.useCallback)(P=>{T&&T(Object.assign(Object.assign({},P),{clearFilter:()=>{g(""),r("")}}))},[T]);return o.default.createElement(o.default.Fragment,null,b&&o.default.createElement(f,{afterClear:A,placeholder:y,value:a,autoFocus:w,onBlur:D,onValueChange:M}),o.default.createElement(d,Object.assign(Object.assign({},I),{height:S-(b?E:0),onReady:R,filter:c})))};e.RecycleTreeFilterDecorator=m},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),l=t(65747);class o extends l.PromptHandle{constructor(p,h){super(),this.type=p,this.parent=h,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),l=t(50708),o=t(84605),u=_=>new Promise(f=>setTimeout(f,_));var p;(function(_){_[_.INFO=1]="INFO",_[_.ERROR=2]="ERROR",_[_.WARNING=3]="WARNING"})(p=e.PROMPT_VALIDATE_TYPE||(e.PROMPT_VALIDATE_TYPE={}));var h;(function(_){_.INFO="validate-info",_.ERROR="validate-error",_.WARNING="validate-warning"})(h=e.VALIDATE_CLASS_NAME||(e.VALIDATE_CLASS_NAME={}));class E{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=f=>{f.stopPropagation()},this.handleDBClick=f=>{f.stopPropagation()},this.handleCompositionstart=()=>{this._inComposition=!0},this.handleCompositionend=()=>{this._inComposition=!1},this.handleKeyup=()=>{this._inComposition||this.onChangeEmitter.fire(this.$.value)},this.handleKeydown=async f=>{if(!this._inComposition){if(f.key==="Escape"){if((await this.onCancelEmitter.fireAndAwait(this.$.value)).some(d=>d.result===!1||!!d.err))return;this.destroy()}if(f.key==="Enter"){if(this.isInPendingCommitState=!0,this.$.disabled=!0,(await this.onCommitEmitter.fireAndAwait(this.$.value)).some(d=>d.result===!1||!!d.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 f=>{await u(0),!(!this.$.isConnected&&!this.destroyed||(await this.onBlurEmitter.fireAndAwait(this.$.value)).some(d=>d.result===!1||!!d.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,l.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(f,m){this.$.setSelectionRange(f,m)}addClassName(f){this.$.classList.add(f)}removeClassName(f){this.$.classList.remove(f)}addAddonAfter(f){var m,d;!this._hasAddonAfter&&!this._destroyed&&((d=(m=this.$.parentElement)===null||m===void 0?void 0:m.parentElement)===null||d===void 0||d.appendChild(this.$addonAfter),this._hasAddonAfter=!0);const s=document.createElement("div");s.setAttribute("class",f),this.$addonAfter.appendChild(s)}removeAddonAfter(){var f,m,d;this._hasAddonAfter&&((f=this.$addonAfter.firstChild)===null||f===void 0||f.remove(),(d=(m=this.$.parentElement)===null||m===void 0?void 0:m.parentElement)===null||d===void 0||d.removeChild(this.$addonAfter),this._hasAddonAfter=!1)}addValidateMessage(f){var m,d,s,a,r,c,g;!this._hasValidateElement&&!this._destroyed&&((s=(d=(m=this.$.parentElement)===null||m===void 0?void 0:m.parentElement)===null||d===void 0?void 0:d.parentElement)===null||s===void 0||s.appendChild(this.$validate),this._hasValidateElement=!0);let v="validate-message popup ";f&&f.type===p.ERROR?this._validateClassName=h.ERROR:f&&f.type===p.WARNING?this._validateClassName=h.WARNING:this._validateClassName=h.INFO,v+=this._validateClassName,this.$validate.classList.value=v,this.$validate.innerHTML=(0,o.toMarkdownHtml)(f.message||"",{renderer:this.markdownRenderer}),(r=(a=this.$.parentElement)===null||a===void 0?void 0:a.parentElement)===null||r===void 0||r.classList.remove(h.INFO,h.ERROR,h.WARNING),(g=(c=this.$.parentElement)===null||c===void 0?void 0:c.parentElement)===null||g===void 0||g.classList.add(this._validateClassName)}removeValidateMessage(){var f,m,d,s,a;this._hasValidateElement&&((d=(m=(f=this.$.parentElement)===null||f===void 0?void 0:f.parentElement)===null||m===void 0?void 0:m.parentElement)===null||d===void 0||d.removeChild(this.$validate),this._hasValidateElement=!1,(a=(s=this.$.parentElement)===null||s===void 0?void 0:s.parentElement)===null||a===void 0||a.classList.remove(this._validateClassName))}destroy(){if(this._destroyed)return;const f=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(()=>{f?.focus()})}focusPrevActiveElement(){let f=this.$.parentElement;for(;f&&!(typeof f.attributes.tabindex<"u");)f=f?.parentElement;return f}}e.PromptHandle=E},58357:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.RenamePromptHandle=void 0;const n=t(65747);class l extends n.PromptHandle{constructor(u,p){super(),this.originalFileName=u,this.target=p,this.$.value=u,this.setSelectionRange(0,u.lastIndexOf("."))}get id(){return this.target.id}get depth(){return this.target.depth}}e.RenamePromptHandle=l},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),l=t(26353);class o{constructor(){this.onChangedEmitter=new n.Emitter,this.toDispose=new n.DisposableCollection,this.nodes={}}dispose(){var p;this.toDispose.dispose(),(p=this._root)===null||p===void 0||p.dispose()}get root(){return this._root}set root(p){var h;p!==this._root&&((h=this._root)===null||h===void 0||h.dispose(),this._root=p)}fireChanged(){this.onChangedEmitter.fire(void 0)}sortComparator(p,h){return p.constructor===h.constructor?p.name>h.name?1:p.name<h.name?-1:0:l.CompositeTreeNode.is(p)?-1:l.CompositeTreeNode.is(h)?1:0}}e.Tree=o},26353:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CompositeTreeNode=e.TreeNode=e.BranchOperatorStatus=e.spliceArray=void 0;const n=t(70392),l=t(34054),{Path:o}=n.path;function u(_,f,m=0,d){const s=_.slice(0);return s.splice(f,m,...d||[]),s}e.spliceArray=u;var p;(function(_){_[_.EXPANDED=1]="EXPANDED",_[_.SHRINKED=2]="SHRINKED"})(p=e.BranchOperatorStatus||(e.BranchOperatorStatus={}));class h{static is(f){return!!f&&"depth"in f&&"name"in f&&"path"in f&&"id"in f}static getTreeNodeById(f){return h.idToTreeNode.get(f)}static getTreeNodeByPath(f){return h.pathToTreeNode.get(f)}static setTreeNode(f,m,d){h.idToTreeNode.set(f,d),h.pathToTreeNode.set(m,d)}static removeTreeNode(f,m){h.idToTreeNode.delete(f),h.pathToTreeNode.delete(m)}static getIdByPath(f){return h.pathToId.get(f)}static setIdByPath(f,m){return h.pathToId.set(f,m)}static getGlobalTreeState(f){let m=h.pathToGlobalTreeState.get(f);return m||(m={isExpanding:!1,isLoadingPath:!1,isRefreshing:!1,refreshCancelToken:new n.CancellationTokenSource,loadPathCancelToken:new n.CancellationTokenSource}),m}static setGlobalTreeState(f,m){let d=h.pathToGlobalTreeState.get(f);return d||(d={isExpanding:!1,isLoadingPath:!1,isRefreshing:!1,refreshCancelToken:new n.CancellationTokenSource,loadPathCancelToken:new n.CancellationTokenSource}),d=Object.assign(Object.assign({},d),m),h.pathToGlobalTreeState.set(f,d),d}constructor(f,m,d,s){this._uid=h.nextId(),this._parent=m,this._tree=f,this._disposed=!1,this._visible=!0,this._metadata=Object.assign({},s||{}),this._depth=m?m.depth+1:0,d?this._watcher=d:m&&(this._watcher=m.watcher)}get disposed(){return this._disposed}get depth(){return this._depth}get parent(){return this._parent}set parent(f){this._parent=f,this._path=""}get type(){return l.TreeNodeType.TreeNode}get id(){return this._uid}set id(f){this._uid=f}get displayName(){return this.name}get name(){return this.parent?this.getMetadata("name")||String(this.id):`root_${this.id}`}set name(f){this.addMetadata("name",f),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(f){return f==="name"&&!this._metadata[f]&&(this._metadata[f]=String(h.nextId())),this._metadata[f]}addMetadata(f,m){if(!(f in this._metadata))this._metadata[f]=m,this._watcher.notifyDidChangeMetadata(this,{type:l.MetadataChangeType.Added,key:f,prevValue:void 0,value:m});else{const d=this._metadata[f];this._metadata[f]=m,this._watcher.notifyDidChangeMetadata(this,{type:l.MetadataChangeType.Updated,key:f,prevValue:d,value:m})}}removeMetadata(f){if(f in this._metadata){const m=this._metadata[f];delete this._metadata[f],this._watcher.notifyDidChangeMetadata(this,{type:l.MetadataChangeType.Removed,key:f,prevValue:m,value:void 0})}}mv(f,m=this.name){const d=this._parent;if(f===null||!E.is(f)){this.parent=void 0,this.dispose();return}const s=d!==f,a=this.path;this._depth=f.depth+1,(s||m!==this.name)&&(this.name=m,s&&this._watcher.notifyWillChangeParent(this,d,f),this.parent&&(this.parent.unlinkItem(this,!0),this.parent=f,this.parent.insertItem(this)),s&&this._watcher.notifyDidChangeParent(this,d,f)),this.path!==a&&this._watcher.notifyDidChangePath(this)}get visible(){return this._visible}setVisible(f){return this._visible=f,this}dispose(){this._disposed||(h.removeTreeNode(this.id,this.path),this._disposed=!0,this._watcher.notifyDidDispose(this))}}e.TreeNode=h,h.nextId=(()=>{let _=0;return()=>_++})(),h.idToTreeNode=new Map,h.pathToTreeNode=new Map,h.pathToId=new Map,h.pathToGlobalTreeState=new Map;class E extends h{static defaultSortComparator(f,m){return f.constructor===m.constructor?f.name>m.name?1:f.name<m.name?-1:0:E.is(f)?-1:E.is(m)?1:0}static is(f){return!!f&&"children"in f}static isRoot(f){return E.is(f)&&!f.parent}generatorWatcher(){const f=new n.Emitter,m=f.event,d=new n.DisposableCollection,s=r=>{this.watchEvents.delete(r)};return{notifyWillProcessWatchEvent:(r,c)=>{f.fire({type:l.TreeNodeEvent.WillProcessWatchEvent,args:[r,c]})},notifyWillChangeParent:(r,c,g)=>{f.fire({type:l.TreeNodeEvent.WillChangeParent,args:[r,c,g]})},notifyDidChangeParent:(r,c,g)=>{f.fire({type:l.TreeNodeEvent.DidChangeParent,args:[r,c,g]})},notifyDidDispose:r=>{f.fire({type:l.TreeNodeEvent.DidDispose,args:[r]})},notifyDidProcessWatchEvent:(r,c)=>{f.fire({type:l.TreeNodeEvent.DidProcessWatchEvent,args:[r,c]})},notifyDidChangePath:r=>{f.fire({type:l.TreeNodeEvent.DidChangePath,args:[r]})},notifyWillChangeExpansionState:(r,c)=>{const g=this.isItemVisibleAtSurface(r);f.fire({type:l.TreeNodeEvent.WillChangeExpansionState,args:[r,c,g]})},notifyDidChangeExpansionState:(r,c)=>{const g=this.isItemVisibleAtSurface(r);f.fire({type:l.TreeNodeEvent.DidChangeExpansionState,args:[r,c,g]})},notifyDidChangeMetadata:(r,c)=>{f.fire({type:l.TreeNodeEvent.DidChangeMetadata,args:[r,c]})},notifyDidUpdateBranch:()=>{f.fire({type:l.TreeNodeEvent.BranchDidUpdate,args:[]})},notifyWillResolveChildren:(r,c)=>{f.fire({type:l.TreeNodeEvent.WillResolveChildren,args:[r,c]})},notifyDidResolveChildren:(r,c)=>{f.fire({type:l.TreeNodeEvent.DidResolveChildren,args:[r,c]})},on:(r,c)=>{const g=m(v=>{v.type===r&&c(...v.args)});return d.push(g),g},onWatchEvent:(r,c)=>{const g=s;return this.watchEvents.set(r,{terminator:g,callback:c}),g},dispose:d}}constructor(f,m,d,s){super(f,m,d,s),this._children=null,this._lock=!1,this.refreshThrottler=new n.ThrottledDelayer(E.REFRESH_DELAY),this.toRefreshPathQueue=new Set,this.handleWatchEvent=async a=>{switch(this.watcher.notifyWillProcessWatchEvent(this,a),a.type){case l.WatchEvent.Moved:{const{oldPath:r,newPath:c}=a;if(typeof r!="string")throw new TypeError("Expected oldPath to be a string");if(typeof c!="string")throw new TypeError("Expected newPath to be a string");if(o.isRelative(r))throw new TypeError("oldPath must be absolute");if(o.isRelative(c))throw new TypeError("newPath must be absolute");this.transferItem(r,c);break}case l.WatchEvent.Added:{const{node:r}=a;if(!h.is(r))throw new TypeError("Expected node to be a TreeNode");this.insertItem(r);break}case l.WatchEvent.Removed:{const{path:r}=a,c=new o(r),g=c.dir.toString(),v=c.base.toString();if(g===this.path&&this.children){const b=this.children.find(S=>S.name===v);b&&this.unlinkItem(b)}break}default:this.isItemVisibleAtRootSurface(this)?await this.refresh():(this.isExpanded=!1,this._children=null);break}this.watcher.notifyDidProcessWatchEvent(this,a)},this.isExpanded=!m,this._branchSize=0,m?this._watcher=m.watcher:(this.watchEvents=new Map,this._watcher=this.generatorWatcher(),this._root=this,h.setTreeNode(this.id,this.path,this))}set name(f){const m=this.path;!E.isRoot(this)&&typeof this.watchTerminator=="function"?(this.watchTerminator(m),this.addMetadata("name",f),this.watchTerminator=this.watcher.onWatchEvent(this.path,this.handleWatchEvent)):this.addMetadata("name",f),this._path=""}get name(){return this.parent?this.getMetadata("name"):`root_${this.id}`}get watcher(){return this._watcher}get type(){return l.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 f=this.parent;for(;f&&f.parent;)f=f.parent;return f}async ensureLoaded(f){if(!this._children)return await this.hardReloadChildren(f)}async setExpanded(f=!0,m=!1,d=!0,s){if(!this.disposed&&!E.isRoot(this)&&!this.isExpanded){if(d){const a=h.getGlobalTreeState(this.path);a.loadPathCancelToken.cancel(),a.refreshCancelToken.cancel(),h.setGlobalTreeState(this.path,{isExpanding:!0})}if(this.isExpanded=!0,this._children===null&&(this._watcher.notifyWillResolveChildren(this,this.isExpanded),await this.hardReloadChildren(s),this._watcher.notifyDidResolveChildren(this,this.isExpanded),!this.isExpanded||s?.isCancellationRequested)){d&&h.setGlobalTreeState(this.path,{isExpanding:!1});return}if(f&&this.parent&&E.is(this.parent)&&await this.parent.setExpanded(!0,!m,!1,s),s?.isCancellationRequested){d&&h.setGlobalTreeState(this.path,{isExpanding:!1});return}this.isExpanded&&(this._watcher.notifyWillChangeExpansionState(this,!0),this.expandBranch(this,m),this._watcher.notifyDidChangeExpansionState(this,!0)),d&&(h.setGlobalTreeState(this.path,{isExpanding:!1}),h.setTreeNode(this.id,this.path,this))}}getAllExpandedNodePath(){var f,m;const d=[];let s=0;E.isRoot(this)||(s=((f=this.root)===null||f===void 0?void 0:f.getIndexAtTreeNodeId(this.id))+1);const a=s+this.branchSize;for(let r=s;r<a;r++){const c=(m=this.root)===null||m===void 0?void 0:m.getTreeNodeAtIndex(r);E.is(c)&&c.expanded&&d.push(c.path)}return d}getAllCollapsedNodePath(){let f=[];if(this.children){for(let m=0;m<this.children.length;m++){const d=this.children[m];E.is(d)&&(d.isExpanded?f=f.concat(d.getAllCollapsedNodePath()):f.push(d.path))}return f}else return f}async resolveChildrens(f){var m,d,s;let a=this.children,r=[];try{a=await this._tree.resolveChildren(this)||[]}catch{a=[]}if(f?.isCancellationRequested)return!1;const c=new Array(a.length);this._children=Array(a.length);for(let v=0;v<a.length;v++){const b=a[v];b.id=h.getIdByPath(b.path)||b.id,this._children[v]=b,h.setIdByPath(b.path,b.id)}(m=this._children)===null||m===void 0||m.sort(this._tree.sortComparator||E.defaultSortComparator);for(let v=0;v<a.length;v++)c[v]=this._children[v].id;const g=[];for(let v=0,b=((d=this.children)===null||d===void 0?void 0:d.length)||0;v<b;v++){const S=(s=this.children)===null||s===void 0?void 0:s[v];if(E.is(S)&&S.expanded){const y=await S.resolveChildrens(f);if(y&&(r=r.concat(y)),f?.isCancellationRequested)return;g.push(S)}}this._branchSize=c.length,this.setFlattenedBranch(c);for(let v=0;v<g.length;v++){const b=g[v];b.expandBranch(b,!0)}return r.concat(g.map(v=>v.path.toString()))}updateTreeNodeCache(f){var m;if(h.setTreeNode(f.id,f.path,f),E.is(f)&&f.expanded&&(!((m=f.children)===null||m===void 0)&&m.length))for(let d=0;d<f.children.length;d++){const s=f.children[d];this.updateTreeNodeCache(s)}}async refreshTreeNodeByPaths(f=this.getAllExpandedNodePath(),m,d){if(!E.is(this))return;let s;const a=this.children;let r=this.children||[];if(this.expanded){if(this===d){try{r=await this._tree.resolveChildren(this)||[]}catch{r=[]}if(m?.isCancellationRequested)return;if(!this.expanded){if(this.children&&this.children&&this.parent){for(let c=0;c<this.children.length;c++)this.children[c].dispose();this._children=null}return}}for(;s=f.shift();){if(!(s.indexOf(`${this.path}${o.separator}`)>-1)){s===this.path&&(s=void 0);break}const g=r?.find(v=>v.path===s);if(g){if(E.is(g)&&!g.expanded){g.isExpanded=!0;const v=await g.resolveChildrens(m);if(m?.isCancellationRequested||(v&&(f=f.filter(b=>!v.find(S=>S.includes(b)))),f.length>0&&!m?.isCancellationRequested&&(f=await g.refreshTreeNodeByPaths([...f],m,d)||[],m?.isCancellationRequested)))return}}else{if(!r||r.length===0)break;for(let v=0;v<r.length;v++){const b=r[v];if(s.indexOf(`${b.path}${o.separator}`)===0&&E.is(b)){if(!E.is(b))continue;b.isExpanded=!0;const y=await b.resolveChildrens(m);if(m?.isCancellationRequested||(y&&(f=f.filter(A=>!y.find(T=>T===A))),b.path!==s&&!f.includes(b.path)&&f.unshift(s),f.length>0&&(f=await b.refreshTreeNodeByPaths([...f],m,d)||[],m?.isCancellationRequested)))return;break}}}}if(s){if(f.unshift(s),this===d){if(a){this.shrinkBranch(this,!0);for(let v=0;v<a.length;v++){const b=a[v];b?.dispose()}}const c=[],g=new Array(r.length);this._children=Array(r.length);for(let v=0;v<r.length;v++){const b=r[v];b.id=h.getIdByPath(b.path)||b.id,this._children[v]=b,h.setIdByPath(b.path,b.id),E.is(b)&&b.expanded&&c.push(b)}this._children.sort(this._tree.sortComparator||E.defaultSortComparator);for(let v=0;v<r.length;v++)g[v]=this._children[v].id;this._branchSize=g.length,this.setFlattenedBranch(g,!0),this.watcher.notifyDidUpdateBranch()}return this.parent!==d&&this.expandBranch(this,!0),f}else if(E.isRoot(this)){if(this.children){this.shrinkBranch(this,!0);for(let b=0;b<this.children.length;b++){const S=this.children[b];S?.dispose()}}const c=[],g=[],v=new Array(r.length);this._children=Array(r.length);for(let b=0;b<r.length;b++){const S=r[b];if(S.id=h.getIdByPath(S.path)||S.id,this._children[b]=S,h.setIdByPath(S.path,S.id),E.is(S)&&S.expanded){if(!S.children&&(await S.resolveChildrens(m),m?.isCancellationRequested))return;c.push(S)}else g.push(S)}this._children.sort(this._tree.sortComparator||E.defaultSortComparator);for(let b=0;b<r.length;b++)v[b]=this._children[b].id;this._branchSize=v.length,this.setFlattenedBranch(v,!0);for(let b=0;b<c.length;b++){const S=c[b];S.expandBranch(S,!0),this.updateTreeNodeCache(S)}for(let b=0;b<g.length;b++){const S=g[b];this.updateTreeNodeCache(S)}typeof this.watchTerminator=="function"&&this.watchTerminator(this.path),this.watchTerminator=this.watcher.onWatchEvent(this.path,this.handleWatchEvent),this.watcher.notifyDidUpdateBranch()}else{const c=[];if(this===d){if(this.children&&this.shrinkBranch(this,!0),this.children)for(let v=0,b=this.children.length;v<b;v++)this.children[v].dispose();const g=new Array(r.length);this._children=Array(r.length);for(let v=0,b=r.length;v<b;v++){const S=r[v];S.id=h.getIdByPath(S.path)||S.id,this._children[v]=S,h.setIdByPath(S.path,S.id),E.is(S)&&S.expanded&&c.push(S),this.updateTreeNodeCache(S)}this._children.sort(this._tree.sortComparator||E.defaultSortComparator);for(let v=0;v<r.length;v++)g[v]=this._children[v].id;this._branchSize=g.length,this.setFlattenedBranch(g);for(let v=0;v<c.length;v++){const b=c[v];b.expandBranch(b,!0)}}else for(let g=0;g<r.length;g++){const v=r[g];v.expanded&&c.push(v)}for(let g=0;g<c.length;g++){const v=c[g];v.expandBranch(v,!0)}typeof this.watchTerminator=="function"&&this.watchTerminator(this.path),this.watchTerminator=this.watcher.onWatchEvent(this.path,this.handleWatchEvent),this===d&&this.expandBranch(this)}}else{if(this.children&&this.children&&this.parent){for(let c=0,g=this.children.length;c<g;c++)this.children[c].dispose();this._children=null}return}}async expandedAll(f=this.getAllCollapsedNodePath()){if(!E.isRoot(this))return;f=f.sort((d,s)=>o.pathDepth(d)-o.pathDepth(s));let m;for(;f.length>0;){m=f.pop();const d=h.getTreeNodeByPath(m);E.is(d)&&await d.setExpanded(!1,!0)}this.watcher.notifyDidUpdateBranch()}async collapsedAll(f=this.getAllExpandedNodePath()){if(!E.isRoot(this))return;f=f.sort((d,s)=>o.pathDepth(d)-o.pathDepth(s));let m;for(;f.length>0;){m=f.pop();const d=h.getTreeNodeByPath(m);E.is(d)&&d.setCollapsed(!0)}this.watcher.notifyDidUpdateBranch()}setCollapsed(f=!1){if(E.isRoot(this)||this.disposed||!this.isExpanded)return;const m=h.getGlobalTreeState(this.path);m.isExpanding||(m.loadPathCancelToken.cancel(),m.refreshCancelToken.cancel(),this._watcher.notifyWillChangeExpansionState(this,!1),this._children&&this.parent&&this.shrinkBranch(this,f),this.isExpanded=!1,h.setTreeNode(this.id,this.path,this),this._watcher.notifyDidChangeExpansionState(this,!1))}mv(f,m=this.name){const d=this.path;if(super.mv(f,m),typeof this.watchTerminator=="function"&&(this.watchTerminator(d),this.watchTerminator=this.watcher.onWatchEvent(this.path,this.handleWatchEvent)),this.children)for(let s=0;s<this.children.length;s++){const a=this.children[s];a.mv(a.parent,a.name)}}insertItem(f){if(f.parent!==this){f.mv(this,f.name);return}if(this.children){for(let g=0;g<this.children.length;g++)if(this.children[g].path===f.path){this.children[g]=f;return}}const m=1+(f instanceof E&&f.expanded?f._branchSize:0);this._children&&(this._children.push(f),this._children.sort(this._tree.sortComparator||E.defaultSortComparator)),this._branchSize+=m;let d=this;for(;!d._flattenedBranch;)d.parent&&(d=d.parent,d._branchSize+=m);if(!this._children)return;let s=this._children.indexOf(f),a;const r=this._children[s-1];r?s=d._flattenedBranch.indexOf(r.id)+(r instanceof E&&r.expanded?r._branchSize:0):s=d._flattenedBranch.indexOf(this.id),s===-1&&this._branchSize===1&&(s=0),a=s+1,d._flattenedBranch.length===0&&(a=0);let c=[f.id];return f instanceof E&&f.expanded&&f._flattenedBranch&&(c=c.concat(f._flattenedBranch),f.setFlattenedBranch(null)),d.setFlattenedBranch(u(d._flattenedBranch,a,0,c)),h.setTreeNode(f.id,f.path,f),f}unlinkItem(f,m){var d;if(!this._children)return;const s=this._children.indexOf(f);if(s===-1||!this.isItemVisibleAtRootSurface(this))return;(d=this._children)===null||d===void 0||d.splice(s,1);const a=1+(f instanceof E&&f.expanded?f._branchSize:0);this._branchSize-=a;let r=this;for(;!r._flattenedBranch;)r.parent&&(r=r.parent,r._branchSize-=a);const c=r._flattenedBranch.indexOf(f.id);c!==-1&&(f instanceof E&&f.expanded&&f.setFlattenedBranch(r._flattenedBranch.slice(c+1,c+a)),r.setFlattenedBranch(u(r._flattenedBranch,c,a)),!m&&f.parent===this&&f.mv(null))}transferItem(f,m){var d;const s=new o(f),a=s.dir.toString();if(a!==this.path)return;const r=s.base.toString(),c=(d=this._children)===null||d===void 0?void 0:d.find(S=>S.name===r);if(!c)return;const g=new o(m),v=g.dir.toString(),b=v===a?this:h.getTreeNodeByPath(v);if(!E.is(b)){this.unlinkItem(c);return}return c.mv(b,g.base.toString()),c}dispose(){if(this.watchEvents){const f=this.watchEvents.get(this.path);f&&f.terminator(),this.watchEvents.clear()}this._children&&(this.isExpanded=!1,this._children.forEach(f=>{f.dispose()}),this._children=null,this._flattenedBranch=null),super.dispose()}setFlattenedBranch(f,m){this._flattenedBranch=f,E.isRoot(this)&&!m&&this.watcher.notifyDidUpdateBranch()}expandBranch(f,m){if(this!==f&&f._flattenedBranch&&(this._branchSize+=f._branchSize),this!==f&&this._flattenedBranch){const d=this._flattenedBranch.indexOf(f.id)+1;if(d===0)return;this.setFlattenedBranch(u(this._flattenedBranch,d,0,f._flattenedBranch),m),f.setFlattenedBranch(null,m)}else this.parent&&this.parent.expandBranch(f,m)}shrinkBranch(f,m){if(this!==f&&(this._branchSize-=f._branchSize),this!==f&&this._flattenedBranch){const d=this._flattenedBranch.indexOf(f.id)+1;if(d===0)return;f.setFlattenedBranch(this._flattenedBranch.slice(d,d+f._branchSize),m),this.setFlattenedBranch(u(this._flattenedBranch,d,f._flattenedBranch?f._flattenedBranch.length:0),m)}else this.parent&&this.parent.shrinkBranch(f,m)}async hardReloadChildren(f){let m;const d=this.path;try{m=await this._tree.resolveChildren(this)||[]}catch{m=[]}if(!this.expanded||f?.isCancellationRequested)return!1;this.path!==d&&h.setGlobalTreeState(d,{isExpanding:!1,isLoadingPath:!1,isRefreshing:!1});const s=[],a=new Array(m.length),r=new Array(m.length);for(let c=0;c<m.length;c++){const g=m[c];if(g.id=h.getIdByPath(g.path)||g.id,r[c]=g,h.setIdByPath(g.path,g.id),E.is(g)&&g.expanded){if(g.children||await g.resolveChildrens(f),f?.isCancellationRequested)return!1;s.push(g)}}r.sort(this._tree.sortComparator||E.defaultSortComparator);for(let c=0;c<m.length;c++)a[c]=r[c].id;if(this.children&&this.shrinkBranch(this),this.children)for(let c=0;c<this.children.length;c++){const g=this.children[c];g?.dispose()}for(let c=0;c<r.length;c++)this.updateTreeNodeCache(r[c]);this._children=r,this._branchSize=a.length,this.setFlattenedBranch(a);for(let c=0;c<s.length;c++){const g=s[c];g.expandBranch(g,!0)}return typeof this.watchTerminator=="function"&&this.watchTerminator(this.path),this.watchTerminator=this.watcher.onWatchEvent(this.path,this.handleWatchEvent),!0}moveNode(f,m){if(typeof f!="string")throw new TypeError("Expected oldPath to be a string");if(typeof m!="string")throw new TypeError("Expected newPath to be a string");if(o.isRelative(f))throw new TypeError("oldPath must be absolute");if(o.isRelative(m))throw new TypeError("newPath must be absolute");return this.transferItem(f,m)}addNode(f){if(!h.is(f))throw new TypeError("Expected node to be a TreeNode");return this.insertItem(f)}removeNode(f){const m=new o(f),d=m.dir.toString(),s=m.base.toString();if(d===this.path&&this.children){const a=this.children.find(r=>r.name===s);a&&this.unlinkItem(a)}}async refresh(f,m){if(!E.isRoot(this))return await this.root.refresh(f,this);const d=h.getGlobalTreeState(this.path);if(d.isLoadingPath||d.isExpanding)return;let s;if(f&&!f.token.isCancellationRequested)h.setGlobalTreeState(this.path,{isRefreshing:!0,refreshCancelToken:f}),s=f.token;else if(d.refreshCancelToken.token.isCancellationRequested){const a=new n.CancellationTokenSource;h.setGlobalTreeState(this.path,{isRefreshing:!0,refreshCancelToken:a}),s=a.token}else s=d.refreshCancelToken.token;this.toRefreshPathQueue.add((m||this).path),await this.refreshThrottler.trigger(()=>this.doRefresh(s)),h.setGlobalTreeState(this.path,{isRefreshing:!1})}async doRefresh(f){const m=this.getRefreshNode()||this;if(!E.is(m))return;const d=m.getAllExpandedNodePath();await m.refreshTreeNodeByPaths(d,f,m)}getRefreshNode(){let f=Array.from(this.toRefreshPathQueue);if(this.toRefreshPathQueue.clear(),!f.length)return this.root;if(f=f.sort((s,a)=>{const r=o.pathDepth(s),c=o.pathDepth(a);return r-c}),f.length===1||o.pathDepth(f[0])===1)return h.getTreeNodeByPath(f[0]);const m=f.map(s=>new o(s));let d=m[0];for(let s=1,a=m.length;s<a;s++)if(!d.isEqualOrParent(m[s]))for(;!d.isRoot&&(d=d.dir,!(!d||d.isEqualOrParent(m[s]))););return d?h.getTreeNodeByPath(d.toString()):this.root}isItemVisibleAtRootSurface(f){let m=f;for(;m.parent;)m=m.parent;return m.isItemVisibleAtSurface(f)}isItemVisibleAtSurface(f){return f===this?!0:!!this._flattenedBranch&&this._flattenedBranch.indexOf(f.id)>-1}transformToRelativePath(f){const{splitPath:m}=o,d=m(f);return d.shift(),d}async loadTreeNodeByPath(f,m=!1){if(!E.isRoot(this))return;const d=h.getGlobalTreeState(this.path);if(d.isExpanding)return;d.refreshCancelToken.cancel(),d.loadPathCancelToken.cancel();const s=new n.CancellationTokenSource;h.setGlobalTreeState(this.path,{isLoadingPath:!0,loadPathCancelToken:s});const a=s.token,r=[],{splitPath:c,isRelative:g}=o,v=g(f)?c(f):this.transformToRelativePath(f);if(v.length===0)return h.setGlobalTreeState(this.path,{isLoadingPath:!1}),this;if(this.children||await this.ensureLoaded(a),a.isCancellationRequested){h.setGlobalTreeState(this.path,{isLoadingPath:!1});return}let b=this._children,S,y="",A;for(;b&&(A=v.shift());){let T=b.find(D=>D.name.indexOf(A)===0);if(T){if(E.is(T)){if(T._watcher.notifyWillChangeExpansionState(T,!0),T.isExpanded=!0,!T.children&&(await T.resolveChildrens(a),a.isCancellationRequested)){h.setGlobalTreeState(this.path,{isLoadingPath:!1});return}r.push(T),T._watcher.notifyDidChangeExpansionState(T,!0)}if(v.length===0){S=T;break}}if(!T&&S){const D=c(S.name).slice(1);if(D[0]===A){for(D.shift();D.length>0&&D[0]===v[0];)D.shift(),v.shift();A=v.shift(),T=b.find(w=>w.name.indexOf(A)===0)}}if(!T||!E.is(T)&&v.length>0)break;if(E.is(T)){if(T.name.indexOf(o.separator)>0){const w=c(T.name).slice(1);for(;w.length>0&&w[0]===v[0];)w.shift(),v.shift()}if(!T._children&&(y=T.path,E.is(T))){if(T.isExpanded=!0,!T.children&&(await T.resolveChildrens(a),a.isCancellationRequested)){h.setGlobalTreeState(this.path,{isLoadingPath:!1});return}r.push(T)}if(T&&v.length===0){S=T;break}else{if(y&&y!==T.path){const w=c(y),I=c(T.path);I.length>w.length&&v.splice(0,I.length-w.length)}b=T._children,S=T}}}if(S){let T;if(S.disposed){h.setGlobalTreeState(this.path,{isLoadingPath:!1});return}for(;T=r.pop();)T.expandBranch(T,!0),r.length===0&&this.updateTreeNodeCache(T);return m||this.watcher.notifyDidUpdateBranch(),h.setGlobalTreeState(this.path,{isLoadingPath:!1}),S}h.setGlobalTreeState(this.path,{isLoadingPath:!1})}getIndexAtTreeNodeId(f){return this._flattenedBranch?this._flattenedBranch.indexOf(f):-1}getIndexAtTreeNode(f){return this._flattenedBranch?this._flattenedBranch.indexOf(f.id):-1}getTreeNodeAtIndex(f){var m;const d=(m=this._flattenedBranch)===null||m===void 0?void 0:m[f];if(d)return h.getTreeNodeById(d)}getTreeNodeById(f){return h.getTreeNodeById(f)}getTreeNodeByPath(f){return h.getTreeNodeByPath(f)}}e.CompositeTreeNode=E,E.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),l=t(96336);class o{constructor(_,f){this.addChangeListener=_,this.removeChangeListener=f}}e.ClasslistComposite=o;var u;(function(E){E[E.Applicable=1]="Applicable",E[E.Inheritable=2]="Inheritable"})(u=e.CompositeDecorationType||(e.CompositeDecorationType={}));var p;(function(E){E[E.UnTargetDecoration=1]="UnTargetDecoration",E[E.TargetDecoration=2]="TargetDecoration"})(p=e.ChangeReason||(e.ChangeReason={}));class h{constructor(_,f,m){this.handleDecorationDidAddClassname=d=>{const{classname:s}=d;!this.selfOwned||!s||(this.compositeCssClasslist.classlist.push(s),this.notifyClasslistChange())},this.handleDecorationDidRemoveClassname=d=>{const{classname:s}=d;if(!this.selfOwned||!s)return;const a=this.compositeCssClasslist.classlist.indexOf(s);a>-1&&(this.compositeCssClasslist.classlist.splice(a,1),this.notifyClasslistChange())},this.mergeDecorationClasslist=d=>{const{decoration:s}=d;this.selfOwned&&(this.compositeCssClasslist.classlist.push(...s.cssClassList),this.notifyClasslistChange())},this.handleDecorationDisable=d=>{const{decoration:s}=d;this.removeDecorationClasslist(s)},this.target=_,this.type=f,this.linkedComposites=new Set,this.classlistChangeCallbacks=new Set,this.compositeCssClasslist=new o(this.classlistChangeCallbacks.add.bind(this.classlistChangeCallbacks),this.classlistChangeCallbacks.delete.bind(this.classlistChangeCallbacks)),m?(this.selfOwned=!1,this.parent=m,this.renderedDecorations=m.renderedDecorations,this.compositeCssClasslist.classlist=m.compositeCssClasslist.classlist,m.linkedComposites.add(this)):(this.renderedDecorations=new Map,this.targetedDecorations=new Set,this.negatedDecorations=new Set,this.compositeCssClasslist.classlist=[],this.selfOwned=!0)}changeParent(_){if(_){if(!this.selfOwned)return this.parentOwn(_);for(const[f]of this.renderedDecorations)this.recursiveRefresh(this,!1,p.UnTargetDecoration,f,!1);this.parent!==_&&(this.parent.linkedComposites.delete(this),this.parent=_,_.linkedComposites.add(this));for(const[f]of _.renderedDecorations)this.recursiveRefresh(this,!1,p.TargetDecoration,f,!1)}}add(_){const f=_.appliedTargets.get(this.target),m=f&&(f===l.TargetMatchMode.Self||f===l.TargetMatchMode.SelfAndChildren),d=f&&(f===l.TargetMatchMode.Children||f===l.TargetMatchMode.SelfAndChildren);if(!(this.type===u.Applicable&&!m)&&!(this.type===u.Inheritable&&!d)){if(!this.selfOwned){this.selfOwn(p.TargetDecoration,_),this.targetedDecorations.add(_);return}this.targetedDecorations.has(_)||(this.targetedDecorations.add(_),this.recursiveRefresh(this,!1,p.TargetDecoration,_))}}remove(_){if(this.selfOwned&&this.targetedDecorations.delete(_)){if(this.negatedDecorations.size===0&&this.targetedDecorations.size===0&&this.parent)return this.parentOwn(void 0,p.UnTargetDecoration,_);this.recursiveRefresh(this,!1,p.UnTargetDecoration,_)}}negate(_){const f=_.negatedTargets.get(this.target),m=f&&(f===l.TargetMatchMode.Self||f===l.TargetMatchMode.SelfAndChildren),d=f&&(f===l.TargetMatchMode.Children||f===l.TargetMatchMode.SelfAndChildren);if(!(this.type===u.Applicable&&!m)&&!(this.type===u.Inheritable&&!d)){if(!this.selfOwned){this.selfOwn(p.UnTargetDecoration,_),this.negatedDecorations.add(_);return}this.negatedDecorations.has(_)||(this.negatedDecorations.add(_),this.renderedDecorations.has(_)&&this.removeDecorationClasslist(_))}}unNegate(_){if(this.selfOwned&&this.negatedDecorations.delete(_)){if(this.negatedDecorations.size===0&&this.targetedDecorations.size===0&&this.parent)return this.parentOwn();!this.renderedDecorations.has(_)&&(this.parent.renderedDecorations.has(_)||_.appliedTargets.has(this.target))&&this.recursiveRefresh(this,!1,p.TargetDecoration,_)}}selfOwn(_,f){if(this.selfOwned)throw new Error("CompositeDecoration is already self owned");const m=this.parent;this.selfOwned=!0,this.compositeCssClasslist.classlist=[],this.renderedDecorations=new Map,this.targetedDecorations=new Set,this.negatedDecorations=new Set;for(const[d]of m.renderedDecorations)d!==f&&this.processCompositeAlteration(p.TargetDecoration,d);_===p.UnTargetDecoration&&this.parent.renderedDecorations.has(f)&&!this.renderedDecorations.has(f)&&this.notifyClasslistChange(!1),this.recursiveRefresh(this,!0,_,f)}parentOwn(_,f,m){this.selfOwned=!1,this.targetedDecorations&&this.targetedDecorations.clear(),this.negatedDecorations&&this.negatedDecorations.clear(),_&&this.parent!==_&&(this.parent&&this.parent.linkedComposites.delete(this),_.linkedComposites.add(this),this.parent=_),this.recursiveRefresh(this,!0,f,m)}processCompositeAlteration(_,f){if(!this.selfOwned)throw new Error("CompositeDecoration is not self owned");if(_===p.UnTargetDecoration){const m=this.renderedDecorations.get(f);if(m){const d=f.appliedTargets.get(this.target),s=d&&(d===l.TargetMatchMode.Self||d===l.TargetMatchMode.SelfAndChildren),a=d&&(d===l.TargetMatchMode.Children||d===l.TargetMatchMode.SelfAndChildren);return s&&this.type===u.Applicable||a&&this.type===u.Inheritable?!1:(this.removeDecorationClasslist(f,!1),m&&m.dispose(),this.renderedDecorations.delete(f))}return!1}if(_===p.TargetDecoration){const m=f.negatedTargets.get(this.target),d=m&&(m===l.TargetMatchMode.Self||m===l.TargetMatchMode.SelfAndChildren),s=m&&(m===l.TargetMatchMode.Children||m===l.TargetMatchMode.SelfAndChildren);if(d&&this.type===u.Applicable||s&&this.type===u.Inheritable)return!1;if(!this.renderedDecorations.has(f)){const a=new n.DisposableCollection;return a.push(f.onDidAddCSSClassname(this.handleDecorationDidAddClassname)),a.push(f.onDidRemoveCSSClassname(this.handleDecorationDidRemoveClassname)),a.push(f.onDidDisableDecoration(this.handleDecorationDisable)),a.push(f.onDidEnableDecoration(this.mergeDecorationClasslist)),this.renderedDecorations.set(f,a),f.disabled?!1:(this.compositeCssClasslist.classlist.push(...f.cssClassList),!0)}}return!1}recursiveRefresh(_,f,m,d,s=!0){if(!this.selfOwned&&f&&(this.renderedDecorations=this.parent.renderedDecorations,this.compositeCssClasslist.classlist=this.parent.compositeCssClasslist.classlist),this.selfOwned&&f&&_!==this){for(const[a]of this.renderedDecorations)this.processCompositeAlteration(p.UnTargetDecoration,a);for(const[a]of this.parent.renderedDecorations)this.processCompositeAlteration(p.TargetDecoration,a);s&&this.notifyClasslistChange(!1)}else this.selfOwned&&m===p.UnTargetDecoration&&d&&this.renderedDecorations.has(d)?(this.processCompositeAlteration(m,d),s&&this.notifyClasslistChange(!1)):this.selfOwned&&m===p.TargetDecoration&&d&&this.processCompositeAlteration(m,d)&&s?this.notifyClasslistChange(!1):!this.selfOwned&&s&&this.notifyClasslistChange(!1);for(const a of this.linkedComposites)a.recursiveRefresh(_,f,m,d,s)}removeDecorationClasslist(_,f=!0){if(this.selfOwned){for(const m of _.cssClassList){const d=this.compositeCssClasslist.classlist.indexOf(m);d>-1&&this.compositeCssClasslist.classlist.splice(d,1)}f&&this.notifyClasslistChange()}}notifyClasslistChange(_=!0){for(const f of[...this.classlistChangeCallbacks])f();if(_)for(const f of this.linkedComposites)f.selfOwned||f.notifyClasslistChange()}}e.CompositeDecoration=h},96336:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Decoration=e.TargetMatchMode=void 0;const n=t(70392),l=t(26353);var o;(function(p){p[p.None=1]="None",p[p.Self=2]="Self",p[p.Children=3]="Children",p[p.SelfAndChildren=4]="SelfAndChildren"})(o=e.TargetMatchMode||(e.TargetMatchMode={}));class u{constructor(...h){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(h))if(h.every(E=>typeof E=="string"))this._cssClassList=new Set(h);else throw new TypeError("classlist must be of type `Array<string>`");else this._cssClassList=new Set}get disabled(){return this._disabled}set disabled(h){this._disabled=h,h?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(h){this._cssClassList.has(h)||(this._cssClassList.add(h),this.onDidAddCSSClassnameEmitter.fire({decoration:this,classname:h}))}removeCSSClass(h){this._cssClassList.has(h)&&(this._cssClassList.delete(h),this.onDidRemoveCSSClassnameEmitter.fire({decoration:this,classname:h}))}hasTarget(h){return!!this._appliedTargets.get(h)}addTarget(h,E=o.Self){if(this._appliedTargets.get(h)===E||!l.TreeNode.is(h))return;this._appliedTargets.set(h,E);const f=n.Disposable.create(()=>{this.removeTarget(h)});return this.appliedTargetsDisposables.set(h,f),this.onDidAddTargetEmitter.fire({decoration:this,target:h}),f}removeTarget(h){if(this._appliedTargets.delete(h)){const E=this.appliedTargetsDisposables.get(h);E&&E.dispose(),this.onDidRemoveTargetEmitter.fire({decoration:this,target:h})}}clearAppliedTarget(){const h=Array.from(this._appliedTargets.keys());for(const E of h)this.removeTarget(E)}clearNegateTarget(){const h=Array.from(this._negatedTargets.keys());for(const E of h)this.unNegateTarget(E)}negateTarget(h,E=o.Self){if(this._negatedTargets.get(h)===E||!l.TreeNode.is(h))return;this._negatedTargets.set(h,E);const f=n.Disposable.create(()=>{this.unNegateTarget(h)});return this.negatedTargetsDisposables.set(h,f),this.onDidNegateTargetEmitter.fire({decoration:this,target:h}),f}unNegateTarget(h){if(this._negatedTargets.delete(h)){const E=this.negatedTargetsDisposables.get(h);E&&E.dispose(),this.onDidUnNegateTargetEmitter.fire({decoration:this,target:h})}}}e.Decoration=u},29701:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DecorationsManager=void 0;const n=t(70392),l=t(34054),o=t(26353),u=t(58781);class p{constructor(E){this.root=E,this.decorations=new Map,this.decorationsMeta=new WeakMap,this.disposables=new n.DisposableCollection,this.disposed=!1,this.targetDecoration=_=>{const{decoration:f,target:m}=_,d=this.getDecorationData(m);if(d){const{applicable:s,inheritable:a}=d;s.add(f),a&&a.add(f)}},this.updateTarget=()=>{for(const[_]of this.decorations)for(const[f,m]of Array.from(_.appliedTargets)){_.removeTarget(f);const d=this.root.getTreeNodeByPath(f.path);d&&_.addTarget(d,m)}},this.unTargetDecoration=_=>{const{decoration:f,target:m}=_,d=this.getDecorationData(m);if(d){const{applicable:s,inheritable:a}=d;s.remove(f),a&&a.remove(f)}},this.negateDecoration=_=>{const{decoration:f,target:m}=_,d=this.getDecorationData(m);if(d){const{applicable:s,inheritable:a}=d;s.negate(f),a&&a.negate(f)}},this.unNegateDecoration=_=>{const{decoration:f,target:m}=_,d=this.getDecorationData(m);if(d){const{applicable:s,inheritable:a}=d;s.unNegate(f),a&&a.unNegate(f)}},this.switchParent=(_,f,m)=>{const d=this.decorationsMeta.get(_);if(!d)return;const s=this.getDecorationData(m);s&&(d.applicable.changeParent(s.inheritable),d.inheritable&&d.inheritable.changeParent(s.inheritable))},this.decorationsMeta.set(E,{applicable:new u.CompositeDecoration(E,u.CompositeDecorationType.Applicable),inheritable:new u.CompositeDecoration(E,u.CompositeDecorationType.Inheritable)}),this.disposables.push(E.watcher.on(l.TreeNodeEvent.DidChangeParent,this.switchParent)),this.disposables.push(E.watcher.on(l.TreeNodeEvent.DidDispose,_=>this.decorationsMeta.delete(_))),this.disposables.push(E.watcher.on(l.TreeNodeEvent.BranchDidUpdate,this.updateTarget))}dispose(){for(const[E]of this.decorations)this.removeDecoration(E);this.disposables.dispose(),this.disposed=!0}addDecoration(E){if(this.disposed)throw new Error("DecorationManager disposed");if(this.decorations.has(E))return;const _=new n.DisposableCollection;_.push(E.onDidAddTarget(this.targetDecoration)),_.push(E.onDidRemoveTarget(this.unTargetDecoration)),_.push(E.onDidNegateTarget(this.negateDecoration)),_.push(E.onDidUnNegateTarget(this.unNegateDecoration)),this.decorations.set(E,_);for(const[f]of E.appliedTargets)this.targetDecoration({decoration:E,target:f});for(const[f]of E.negatedTargets)this.negateDecoration({decoration:E,target:f})}removeDecoration(E){const _=this.decorations.get(E);if(_){for(const[f]of E.appliedTargets){const m=this.decorationsMeta.get(f);m&&(m.applicable.remove(E),m.inheritable&&m.inheritable.remove(E))}for(const[f]of E.negatedTargets){const m=this.decorationsMeta.get(f);m&&(m.applicable.unNegate(E),m.inheritable&&m.inheritable.unNegate(E))}_.dispose(),this.decorations.delete(E)}}getDecorations(E){if(!E||!o.TreeNode.is(E))return;const _=this.getDecorationData(E);if(_)return _.applicable.compositeCssClasslist}getDecorationData(E){if(this.disposed)return;const _=this.decorationsMeta.get(E);if(_)return _;if(!E||!E.parent)return;const f=this.getDecorationData(E.parent);if(f){const m={applicable:new u.CompositeDecoration(E,u.CompositeDecorationType.Applicable,f.inheritable),inheritable:o.CompositeTreeNode.is(E)?new u.CompositeDecoration(E,u.CompositeDecorationType.Inheritable,f.inheritable):void 0};return this.decorationsMeta.set(E,m),m}}}e.DecorationsManager=p},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),l=t(34054),o=t(70609);class u{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(h){this._root=h,this.initState(h),this.root&&(this._ensureReady=this.root.ensureLoaded())}get state(){return this._state}set state(h){this._state=h}init(h){this.root=h,this.root.watcher.on(l.TreeNodeEvent.BranchDidUpdate,this.dispatchChange)}initState(h){this.state=new o.TreeStateManager(h)}loadTreeState(h){return typeof h=="string"&&(h=JSON.parse(h)),this.state.loadTreeState(h)}getTreeStateWatcher(h=!1){return new o.TreeStateWatcher(this.state,h)}resolveChildren(h){return Promise.resolve(Array.from(h.children))}}e.TreeModel=u},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),l=t(34054),o=t(26353),{Path:u}=n.path;var p;(function(_){_[_.SetExpanded=1]="SetExpanded",_[_.SetCollapsed=2]="SetCollapsed",_[_.SetActive=3]="SetActive"})(p=e.Operation||(e.Operation={}));var h;(function(_){_[_.Expanded=1]="Expanded",_[_.Collapsed=2]="Collapsed",_[_.Disabled=4]="Disabled"})(h||(h={}));class E{constructor(f){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=(m,d,s)=>{var a;if(this.stashing&&this.stashKeyframes&&this.stashKeyframes.set(m.id,d?h.Expanded:h.Collapsed),this.stashKeyframes&&!this.stashing){if(d){let c=m;for(;c;){if(this.stashKeyframes.has(c.id)){let g=this.stashKeyframes.get(c.id);g=g|h.Disabled,this.stashKeyframes.set(c.id,g)}c=c.parent}this.stashLockingItems.add(m)}if(this.stashLockingItems&&this.stashLockingItems.has(m)&&!d){let c=m;for(;c;){if(this.stashKeyframes.has(c.id)){let g=this.stashKeyframes.get(c.id);g&=~h.Disabled,this.stashKeyframes.set(c.id,g)}c=c.parent}this.stashLockingItems.delete(m)}}let r=this.expandedDirectories.get(m);d&&!r?(r=(a=new u(this.root.path).relative(new u(m.path)))===null||a===void 0?void 0:a.toString(),this.expandedDirectories.set(m,r),this.onDidChangeExpansionStateEmitter.fire({relativePath:r,isExpanded:d,isVisibleAtSurface:s})):!d&&r&&(this.expandedDirectories.delete(m),this.onDidChangeExpansionStateEmitter.fire({relativePath:r,isExpanded:d,isVisibleAtSurface:s}))},this.handleDidChangePath=m=>{var d;if(this.expandedDirectories.has(m)){const s=this.expandedDirectories.get(m),a=(d=new u(this.root.path).relative(new u(m.path)))===null||d===void 0?void 0:d.toString();this.expandedDirectories.set(m,a),this.onDidChangeRelativePathEmitter.fire({prevPath:s,newPath:a})}},this.root=f,this.root.watcher.on(l.TreeNodeEvent.DidChangeExpansionState,this.handleExpansionChange),this.root.watcher.on(l.TreeNodeEvent.DidChangePath,this.handleDidChangePath)}get scrollOffset(){return this._scrollOffset}saveScrollOffset(f){this._scrollOffset=f,this.onChangeScrollOffsetEmitter.fire(f)}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(f){if(f){for(const m of f.expandedDirectories.buried)try{const d=await this.root.loadTreeNodeByPath(m);if(!d)break;d&&o.CompositeTreeNode.is(d)&&d.setCollapsed()}catch{}for(const m of f.expandedDirectories.atSurface)try{if(!await this.root.loadTreeNodeByPath(m,!0))break}catch{}this._scrollOffset=typeof f.scrollPosition=="number"&&f.scrollPosition>-1?f.scrollPosition:this._scrollOffset,this.root.watcher.notifyDidUpdateBranch(),this.onDidLoadStateEmitter.fire()}}excludeFromStash(f){this.stashKeyframes&&!this.stashing&&this.handleExpansionChange(o.CompositeTreeNode.is(f)?f:f.parent,!0,this.root.isItemVisibleAtSurface(f))}beginStashing(){this.stashing=!0,this.stashKeyframes=new Map}endStashing(){this.stashing=!1,this.stashLockingItems.clear()}async reverseStash(){if(!this.stashKeyframes)return;this.endStashing();const f=Array.from(this.stashKeyframes);this.stashKeyframes=null;for(const[m,d]of f){const s=(d&h.Disabled)===h.Disabled,a=o.TreeNode.getTreeNodeById(m);!a||s||((d&h.Expanded)===h.Expanded?a.setCollapsed():(d&h.Collapsed)===h.Collapsed&&await a.setExpanded())}}}e.TreeStateManager=E},72782:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TreeStateWatcher=void 0;const n=t(70392),l=t(13440);class o{constructor(p,h=!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(p.onChangeScrollOffset(E=>{this.currentState.scrollPosition=E,this.onDidTreeStateChangeEmitter.fire(l.TreeStateWatcherChangeType.ScrollOffset)})),this.disposables.push(p.onDidChangeRelativePath(({prevPath:E,newPath:_})=>{let f=!1;const m=new Set(this.currentState.expandedDirectories.atSurface);if(m.has(E)&&(m.delete(E),m.add(_),f=!0),this.currentState.expandedDirectories.atSurface=Array.from(m),h){const d=new Set(this.currentState.expandedDirectories.buried);d.has(E)&&(m.delete(E),m.add(_),f=!0),this.currentState.expandedDirectories.buried=Array.from(d)}f&&this.onDidTreeStateChangeEmitter.fire(l.TreeStateWatcherChangeType.PathsUpdated)})),this.disposables.push(p.onDidChangeExpansionState(({relativePath:E,isExpanded:_,isVisibleAtSurface:f})=>{let m=!1;const d=new Set(this.currentState.expandedDirectories.atSurface),s=new Set(this.currentState.expandedDirectories.buried);if(d.has(E)&&(!_||!f)){d.delete(E);const r=Array.from(d).filter(c=>c.indexOf(E)>=0);for(const c of r)d.delete(c),s.has(c)||s.add(c);m=!0}else _&&f&&(d.add(E),m=!0);this.currentState.expandedDirectories.atSurface=Array.from(d),h||(s.has(E)&&(!_||f)?(s.delete(E),m=!0):_&&!f&&(s.add(E),m=!0),this.currentState.expandedDirectories.buried=Array.from(s)),m&&this.onDidTreeStateChangeEmitter.fire(l.TreeStateWatcherChangeType.DirExpansionState)}))}get onDidChange(){return this.onDidTreeStateChangeEmitter.event}dispose(){this._disposed||(this._disposed=!0,this.disposables.dispose())}snapshot(){return Object.assign(Object.assign({},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 l=t(72782);Object.defineProperty(e,"TreeStateWatcher",{enumerable:!0,get:function(){return l.TreeStateWatcher}})},13440:(x,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TreeStateWatcherChangeType=e.TreeStateEvent=void 0;var t;(function(l){l[l.DidChangeScrollOffset=1]="DidChangeScrollOffset",l[l.DidChangeDirExpansionState=2]="DidChangeDirExpansionState",l[l.DidChangeRelativePath=3]="DidChangeRelativePath",l[l.DidChange=4]="DidChange",l[l.DidLoadState=5]="DidLoadState"})(t=e.TreeStateEvent||(e.TreeStateEvent={}));var n;(function(l){l[l.ScrollOffset=1]="ScrollOffset",l[l.DirExpansionState=2]="DirExpansionState",l[l.PathsUpdated=3]="PathsUpdated"})(n=e.TreeStateWatcherChangeType||(e.TreeStateWatcherChangeType={}))},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||(e.TreeNodeType={}))},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||(e.TreeNodeEvent={}));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||(e.WatchEvent={}));var l;(function(o){o[o.Added=1]="Added",o[o.Updated=2]="Updated",o[o.Removed=3]="Removed"})(l=e.MetadataChangeType||(e.MetadataChangeType={}))},77011:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ScrollbarsVirtualList=e.Scrollbars=void 0;const n=t(85608),l=n.__importDefault(t(53373)),o=n.__importDefault(t(97331)),u=n.__importStar(t(14041)),p=t(65289),h=t(70392);t(93324);const E=({onScroll:_,onUpdate:f,forwardedRef:m,style:d,children:s,className:a,onReachBottom:r,tabBarMode:c,thumbSize:g=5,hiddenVertical:v,hiddenHorizontal:b,universal:S=!1})=>{const y=(0,u.useRef)(new h.DisposableCollection),A=(0,u.useRef)(),T=(0,u.useCallback)(M=>{M?(A.current=M.view,m&&(typeof m=="function"?m(M.view):m.current=M.view)):m&&typeof m=="function"&&m(null)},[]),D=(0,u.useRef)(),w=(0,u.useRef)(),I=(0,u.useCallback)(M=>{if(!M)return;const{scrollTop:R,scrollHeight:P,clientHeight:L}=M;if(P===0&&L===0)return;(R+100)/(P-L)>1&&r&&r()},[r]),O=(0,u.useCallback)((0,o.default)(M=>{if(!M)return;const{scrollTop:R,scrollLeft:P}=M,L=1/20*Math.min(R,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),f&&f(M)},100),[f,I,D.current,w.current]);return(0,u.useEffect)(()=>{const M=R=>{A.current&&(R.preventDefault(),R.stopPropagation(),A.current.clientHeight>=A.current.scrollHeight&&(R.deltaY!==0&&(A.current.scrollLeft+=R.deltaY),R.deltaX!==0&&(A.current.scrollLeft+=R.deltaX)))};return c&&A.current&&A.current.addEventListener("wheel",M),()=>{var R;(R=A.current)===null||R===void 0||R.removeEventListener("wheel",M)}},[A.current,c]),(0,u.useEffect)(()=>()=>y.current.dispose(),[]),u.default.createElement(p.Scrollbars,{ref:T,style:Object.assign(Object.assign({},d),{overflow:"hidden"}),className:(0,l.default)(a,"kt-scrollbar"),onUpdate:O,onScroll:_,universal:S,renderTrackHorizontal:M=>{var{style:R}=M,P=n.__rest(M,["style"]);const L=Object.assign(Object.assign({},R),{height:g,left:0,right:0,bottom:1});return b&&(L.display="none"),u.default.createElement("div",Object.assign({},P,{style:L}))},renderTrackVertical:M=>{var{style:R}=M,P=n.__rest(M,["style"]);const L=Object.assign(Object.assign({},R),{width:g,top:0,right:1,bottom:0});return v&&(L.display="none"),u.default.createElement("div",Object.assign({},P,{style:L}))},renderThumbVertical:M=>{var{style:R,className:P}=M,L=n.__rest(M,["style","className"]);const N=Object.assign(Object.assign({},R),{width:g});return v&&(N.display="none"),u.default.createElement("div",Object.assign({},L,{style:N,className:(0,l.default)(P,"scrollbar-thumb-vertical")}))},renderThumbHorizontal:M=>{var{style:R,className:P}=M,L=n.__rest(M,["style","className"]);const N=Object.assign(Object.assign({},R),{height:g,display:"none"});return b&&(N.display="none"),u.default.createElement("div",Object.assign({},L,{style:N,className:(0,l.default)(P,"scrollbar-thumb-horizontal")}))}},u.default.createElement("div",{ref:M=>{D.current=M},className:"scrollbar-decoration-vertical"}),u.default.createElement("div",{ref:M=>{w.current=M},className:"scrollbar-decoration-horizontal"}),s)};e.Scrollbars=E,e.Scrollbars.displayName="CustomScrollbars",e.ScrollbarsVirtualList=u.default.forwardRef((_,f)=>u.default.createElement(e.Scrollbars,Object.assign({},_,{thumbSize:10,forwardedRef:f}))),e.ScrollbarsVirtualList.displayName="ScrollbarsVirtualList"},14640:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SelectOptionsList=e.Select=e.isDataOptionGroups=e.isDataOptions=e.Option=void 0;const n=t(85608),l=n.__importDefault(t(53373)),o=n.__importStar(t(14041));t(11110);const u=t(54713),p=S=>{var{value:y,children:A,disabled:T,onClick:D,className:w}=S,I=n.__rest(S,["value","children","disabled","onClick","className"]);return o.default.createElement("span",Object.assign({},I,{className:(0,l.default)(w,{"kt-option-disabled":T}),onClick:()=>D&&!T&&D(y)}),A)};e.Option=p;function h(...S){}function E(S,y){return y?S.props[y]:S.props.value}function _(S,y){let A=[];return Array.isArray(S)?A=o.default.Children.toArray(S).map(y):A=[y(S)],A}function f(S,y,A=(T,D)=>T===D){const D=o.default.Children.toArray(y).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,S)?w:null});return D?.props}function m(S){return S?S.length===0?!0:s(S[0]):!1}e.isDataOptions=m;function d(S){return S?S.length===0?!0:a(S[0]):!1}e.isDataOptionGroups=d;function s(S){return S.value!==void 0}function a(S){return S.groupName!==void 0&&m(S.options)}function r(S){return o.default.createElement(o.default.Fragment,null,S.data.iconClass?o.default.createElement("div",{className:(0,l.default)(S.data.iconClass,"kt-select-option-icon")}):void 0,S.data.label)}function c({group:S,index:y}){return o.default.createElement("div",{key:"header_"+y,className:"kt-select-group-header"},S.iconClass?o.default.createElement("div",{className:(0,l.default)(S.iconClass,"kt-select-option-icon")}):void 0,o.default.createElement("div",null,S.groupName))}function g(S,y){let A=y.label;if(A===void 0)try{A=y.value.toString()}catch{A=void 0}return typeof A=="string"?A.indexOf(S)!==-1:!1}function v({disabled:S,options:y,size:A="default",children:T,value:D,onChange:w,onMouseEnter:I,optionLabelProp:O,style:M,optionStyle:R,className:P,maxHeight:L,equals:N=(re,se)=>re===se,optionRenderer:B=r,groupTitleRenderer:k,footerComponent:F,headerComponent:W,showSearch:j=!1,filterOption:H=g,searchPlaceholder:K="",emptyComponent:G,selectedRenderer:V,onBeforeShowOptions:z,allowOptionsOverflow:U,dropdownRenderType:$="fixed",description:Q,notMatchWarning:Y}){const[re,se]=(0,o.useState)(!1),[le,fe]=(0,o.useState)(""),ee=o.default.useRef(null),_e=o.default.useRef(null),pe=(0,o.useCallback)(de=>{de.preventDefault(),de.stopPropagation();const ue=!re;ue&&z&&z()||se(ue)},[re,z,z]),ae=(0,o.useCallback)(()=>{var de,ue,ve,te,ge,Ce,ye,Se,Ae;if(y&&m(y)){for(const De of y)if(N(D,De.value))return{iconClass:De.iconClass,label:De.label,value:De.value};return{iconClass:(de=y[0])===null||de===void 0?void 0:de.iconClass,label:(ue=y[0])===null||ue===void 0?void 0:ue.label,value:(ve=y[0])===null||ve===void 0?void 0:ve.value}}else if(y&&d(y)){for(const De of y)for(const Re of De.options)if(N(D,Re.value))return{iconClass:Re.iconClass,label:Re.label,value:Re.value};return{iconClass:(ge=(te=y[0])===null||te===void 0?void 0:te.options[0])===null||ge===void 0?void 0:ge.iconClass,label:(ye=(Ce=y[0])===null||Ce===void 0?void 0:Ce.options[0])===null||ye===void 0?void 0:ye.label,value:(Ae=(Se=y[0])===null||Se===void 0?void 0:Se.options[0])===null||Ae===void 0?void 0:Ae.value}}else{const De=T&&f(D,T);if(De)return{label:De.label||De.value,value:De.value}}return{label:D,value:D,notMatch:!0}},[y,D,T])(),ie=(0,l.default)("kt-select-options",{"kt-select-options-visible":re,[`kt-select-options-${A}`]:A}),he=Y&&ae.notMatch,J=(0,l.default)("kt-select-value",{"kt-select-warning":he,"kt-select-disabled":S,"kt-select-value-active":re,[`kt-select-value-${A}`]:A});function X(de,ue){var ve;if(!de)return null;(typeof de=="string"||typeof de=="number")&&(de=o.default.createElement(e.Option,{value:de,label:String(de),key:`${de}_${ue}`},de));const te=de,ge=((ve=te.props)===null||ve===void 0?void 0:ve.disabled)||!1;return o.default.createElement("div",{key:`${te.props.value}_${ue}`,className:(0,l.default)({"kt-select-option-select":D===te.props.value}),onMouseEnter:()=>I?.(te.props.value,ue),onClick:ge?h:()=>{se(!1),w&&w(E(de,O))}},de)}if((0,o.useEffect)(()=>{!re&&le&&fe("")},[]),(0,o.useEffect)(()=>{if(ee.current&&_e.current){const de=ee.current.getBoundingClientRect();U?(_e.current.style.minWidth=`${de.width}px`,_e.current.style.maxWidth=`${window.innerWidth-de.left-4}px`):_e.current.style.width=`${de.width}px`;const ue=window.innerHeight-de.bottom-50;ue<_e.current.clientHeight?_e.current.style.bottom=ee.current.clientHeight+4+"px":_e.current.style.maxHeight=`${ue}px`,_e.current.style.position=$==="fixed"?"fixed":"absolute"}if(re){const de=()=>{se(!1)};return document.addEventListener("click",de),()=>{document.removeEventListener("click",de)}}},[re]),le){if(y&&m(y))y=y.filter(de=>H(le,de));else if(y&&d(y)){const de=[];for(const ue of y){const ve={iconClass:ue.iconClass,groupName:ue.groupName,options:ue.options.filter(te=>H(le,te,ue))};ve.options.length>0&&de.push(ve)}y=de}}const oe=()=>{const de=V;return o.default.createElement(o.default.Fragment,null,de?o.default.createElement(de,{data:ae}):o.default.createElement(o.default.Fragment,null,ae.iconClass?o.default.createElement("div",{className:(0,l.default)(ae.iconClass,"kt-select-option-icon")}):void 0,o.default.createElement("span",{className:"kt-select-option"},ae.label)),o.default.createElement(u.Icon,{iconClass:(0,l.default)((0,u.getIcon)("down"),"kt-select-value-default-icon")}))},ne=()=>o.default.createElement("input",{className:(0,l.default)("kt-select-search"),onChange:de=>{fe(de.target.value)},value:le,autoFocus:!0,placeholder:K||""});return o.default.createElement("div",{className:(0,l.default)("kt-select-container",P),ref:ee},o.default.createElement("div",{className:J,onClick:pe,style:M},j&&re?ne():oe()),he&&o.default.createElement("div",{className:"kt-select-warning-text"},Y),re&&(m(y)||d(y)?o.default.createElement(e.SelectOptionsList,{optionRenderer:B,options:y,equals:N,optionStyle:R,currentValue:D,size:A,onSelect:de=>{w&&w(de),se(!1)},groupTitleRenderer:k,className:ie,style:{maxHeight:`${L}px`},ref:_e,footerComponent:F,headerComponent:W,emptyComponent:G}):o.default.createElement("div",{className:ie,style:{maxHeight:`${L}px`},ref:_e},y&&y.map((de,ue)=>X(de,ue)),T&&_(T,X),Q&&o.default.createElement(b,{text:Q}),o.default.createElement("div",{className:"kt-select-overlay",onClick:pe}))))}e.Select=v;function b({text:S}){return o.default.createElement(o.default.Fragment,null,o.default.createElement("div",{className:"kt-option-divider"}),o.default.createElement("div",{className:"kt-option-description"},S))}e.SelectOptionsList=o.default.forwardRef((S,y)=>{const{options:A,optionRenderer:T=r,equals:D=(G,V)=>G===V,onSelect:w,currentValue:I,optionStyle:O,size:M,className:R,style:P,groupTitleRenderer:L=c,renderCheck:N,headerComponent:B,footerComponent:k,emptyComponent:F}=S,W=(0,l.default)("kt-select-options",{[`kt-select-options-${M}`]:!0},R);function j(G){return G.map((V,z)=>{const U=o.default.createElement(L,{group:V,index:z});return o.default.createElement(o.default.Fragment,{key:"group_"+z},U,H(V.options))})}function H(G){return G&&G.map((V,z)=>{const U=D(I,V.value);return o.default.createElement(e.Option,{value:z,key:z,className:(0,l.default)({"kt-select-option-select":U,"kt-select-option-default":!0,"kt-option-with-check":N}),onClick:()=>w(V.value),style:O},N&&D(I,V.value)?o.default.createElement("div",{className:"kt-option-check"},o.default.createElement(u.Icon,{icon:"check"})):void 0,o.default.createElement(T,{data:V,isCurrent:U}))})}let K;return d(A)?K=A.filter(G=>G.options.length>0).length===0:K=A.length===0,o.default.createElement("div",{className:W,style:P,ref:y,onClick:G=>{G.stopPropagation()}},B?o.default.createElement(B,null):null,K&&F?o.default.createElement(F,null):(d(A)?j(A):H(A))||F&&o.default.createElement(F,null),k?o.default.createElement(k,null):null)})},54076:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Tabs=void 0;const n=t(85608),l=n.__importDefault(t(53373)),o=n.__importDefault(t(14041));t(1030);const u=p=>{const{tabs:h,className:E,value:_,onChange:f,mini:m,style:d}=p,s=n.__rest(p,["tabs","className","value","onChange","mini","style"]),a=o.default.useCallback(r=>{typeof f=="function"&&f(r)},[]);return o.default.createElement("div",Object.assign({},s,{style:d,className:(0,l.default)("kt-tabs",E,{"kt-tabs-mini":m})}),h.map((r,c)=>{const g=c===_?"kt-tab-selected":"";return typeof r=="string"?o.default.createElement("div",{key:c,className:(0,l.default)("kt-tab",g,{"kt-mini-tab":m}),onClick:a.bind(null,c)},r):o.default.createElement("div",{key:c,className:(0,l.default)("kt-custom-tab",g,{"kt-mini-tab":m}),onClick:a.bind(null,c)},r)}))};e.Tabs=u},72871:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Tooltip=void 0;const n=t(85608),l=n.__importDefault(t(53373)),o=n.__importStar(t(14041));t(24571);const u=({title:p,children:h,delay:E})=>{const[_,f]=(0,o.useState)(!1),m=(0,o.useRef)(null),d=(0,o.useRef)(null),s=(0,o.useRef)(null),a=(0,o.useRef)(null);(0,o.useEffect)(()=>()=>clearTimeout(a.current),[]);function r(){if(_){a.current&&clearTimeout(a.current);return}a.current=setTimeout(()=>{if(f(!0),d.current&&m.current&&s.current){const{x:g,y:v,width:b,height:S}=m.current.getBoundingClientRect(),y=d.current.getBoundingClientRect();v<y.height*1.5?(s.current.className+=" kt-tooltip-reverse-arrow",d.current.style.top=`${v+S+y.height/2}px`):d.current.style.top=`${v-y.height*1.5}px`,g+y.width/2>=document.body.offsetWidth?(s.current.style.right=`${b/2-7}px`,d.current.style.left=`${g+b-y.width}px`):g-y.width/2<=0?(s.current.style.left=`${b/2-7}px`,d.current.style.left=`${g}px`):(s.current.style.left=`${y.width/2-7}px`,d.current.style.left=`${g+b/2-y.width/2}px`)}clearTimeout(a.current)},E||500)}function c(){a.current&&clearTimeout(a.current),f(!1)}return o.default.createElement("p",{ref:m,className:"kt-tooltip-wrapper",onMouseEnter:r,onMouseLeave:c},h,_&&o.default.createElement("span",{ref:d,className:(0,l.default)("kt-tooltip-content")},p,o.default.createElement("span",{ref:s,className:"kt-tooltip-arrow-placeholder"})))};e.Tooltip=u},40604:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Deprecated=void 0;const n=t(85608),l=n.__importDefault(t(14041)),o=n.__importDefault(t(65973));function u(p,h){return E=>(l.default.useEffect(()=>{(0,o.default)(!1,`${p.displayName||p.name} is deprecated: ${h}`)},[]),l.default.createElement(p,E))}e.Deprecated=u},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 l=()=>new n.Renderer;e.createMarkedRenderer=l;const o=(h,E,_)=>{if(!_)return n.marked.parse(h,E);E?n.marked.parse(h,E,_):n.marked.parse(h,_)};e.parseMarkdown=o;const u=(h,E)=>(0,n.marked)(h,E);e.toMarkdownHtml=u;const p=h=>(h.type==="escape"&&(h.text=h.raw),h);e.parseWithoutEscape=p},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}),l=o=>({height:o.offsetHeight});e.collapseMotion={motionName:"kt-motion-collapse",onAppearStart:t,onEnterStart:t,onAppearActive:n,onEnterActive:n,onLeaveStart:l,onLeaveActive:t}},47768:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.wrapperRaf=void 0;const l=t(85608).__importDefault(t(10719));let o=0;const u={};function p(h,E=1){const _=o++;let f=E;function m(){f-=1,f<=0?(h(),delete u[_]):u[_]=(0,l.default)(m)}return u[_]=(0,l.default)(m),_}e.wrapperRaf=p,p.cancel=function(E){E!==void 0&&(l.default.cancel(u[E]),delete u[E])},p.ids=u},43953:(x,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.tupleNum=e.tuple=void 0;const t=(...l)=>l;e.tuple=t;const n=(...l)=>l;e.tupleNum=n},65973:(x,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.noteOnce=e.warningOnce=e.call=e.resetWarned=e.note=e.warning=void 0;let t={};function n(E,_){}e.warning=n;function l(E,_){}e.note=l;function o(){t={}}e.resetWarned=o;function u(E,_,f){!_&&!t[f]&&(E(!1,f),t[f]=!0)}e.call=u;function p(E,_){u(n,E,_)}e.warningOnce=p;function h(E,_){u(l,E,_)}e.noteOnce=h,e.default=p},91802:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.VirtualList=void 0;const l=t(85608).__importStar(t(14041)),o=t(24241),u=t(77011),p=({data:h,className:E,template:_,refSetter:f,onRangeChanged:m})=>{const d=(0,l.useRef)(null);return(0,l.useEffect)(()=>{f?.(d.current)},[d.current]),l.default.createElement(u.Scrollbars,{thumbSize:0},l.default.createElement(o.Virtuoso,{rangeChanged:s=>{m?.(s)},overscan:20,ref:d,style:{height:"100%"},className:E,data:h,itemContent:(s,a)=>l.default.createElement(_,{index:s,data:a})}))};e.VirtualList=p},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),l=t(43718),o=t(47561);class u{onChannelCreated(h,E){return this._onChannelCreatedEmitter.on(h,E)}constructor(h,E,_){this.connection=h,this._disposables=new l.DisposableStore,this._onChannelCreatedEmitter=this._disposables.add(new n.EventEmitter),this.channelMap=new Map,this.channelCloseEventMap=new l.MultiMap,this.logger=console,this.openingBarrier=new l.Barrier,this.logger=E||this.logger,this.clientId=_,this.LOG_TAG=`[WSChannelHandler] [client-id:${this.clientId}]`}replaceLogger(h){h&&(this.logger=h)}setReporter(h){this.reporterService=h}heartbeatMessage(){this.heartbeatMessageTimer&&clearTimeout(this.heartbeatMessageTimer),this.heartbeatMessageTimer=t.g.setTimeout(()=>{this.connection.send(o.pingMessage),this.heartbeatMessage()},1e4)}async initHandler(){this.connection.onMessage(E=>{this.heartbeatMessage();const _=(0,o.parse)(E);switch(_.kind){case"pong":break;case"error":switch(this.logger.error(this.LOG_TAG,`receive error: id: ${_.id}, code: ${_.code}, error: ${_.message}`),_.code){case o.ErrorMessageCode.ChannelNotFound:if(this.channelMap.has(_.id)){const f=this.channelMap.get(_.id);f.channelPath&&(f.pause(),f.open(f.channelPath,this.clientId))}break}break;default:{const f=this.channelMap.get(_.id);f?f.dispatch(_):this.logger.warn(this.LOG_TAG,`channel ${_.id} not found`)}}});const h=()=>{this.channelMap.size>0&&this.channelMap.forEach(E=>{E.open(E.channelPath,this.clientId)})};this.connection.onClose((E,_)=>{this.channelMap.forEach(f=>{f.close(E,_)})}),this.connection.isOpen()&&(this.heartbeatMessage(),this.openingBarrier.open()),this.connection.onOpen(()=>{this.heartbeatMessage(),this.openingBarrier.isOpen()?h():this.openingBarrier.open()}),await this.openingBarrier.wait()}fillKey(h){return`${this.clientId}:${h}`}getChannel(h){return this.channelMap.get(this.fillKey(h))}async openChannel(h){const E=this.fillKey(h);this.channelMap.has(E)&&(this.channelMap.get(E).dispose(),this.logger.log(this.LOG_TAG,`channel ${E} already exists, dispose it`));const _=new o.WSChannel(this.connection,{id:E,logger:this.logger,ensureServerReady:!0});this.channelMap.set(_.id,_),this._onChannelCreatedEmitter.emit(h,_);let f=0;_.onOpen(()=>{f++,f>1?(_.fireReopen(),this.logger.log(this.LOG_TAG,`channel reconnect ${this.clientId}:${_.channelPath}, count: ${f}`)):this.logger.log(this.LOG_TAG,`channel open ${this.clientId}:${_.channelPath}`);const s=this.channelCloseEventMap.get(_.id);s&&(s.forEach(a=>{this.reporterService&&this.reporterService.point(l.REPORT_NAME.CHANNEL_RECONNECT,l.REPORT_NAME.CHANNEL_RECONNECT,a)}),this.channelCloseEventMap.delete(_.id))}),_.onClose((s,a)=>{this.channelCloseEventMap.set(_.id,{channelPath:h,closeEvent:{code:s,reason:a},connectInfo:navigator.connection}),this.logger.log(this.LOG_TAG,`channel ${h} closed, code: ${s}, reason: ${a}`)});const m=new l.Deferred,d=_.onOpen(()=>{m.resolve(),d.dispose()});return _.open(h,this.clientId),await m.promise,_}dispose(){this.heartbeatMessageTimer&&clearTimeout(this.heartbeatMessageTimer),this._disposables.dispose()}awaitChannelReady(h){const E=this.getChannel(h),_=new l.Deferred;if(E)E.onServerReady(()=>{_.resolve()});else{const f=this.onChannelCreated(h,m=>{m.onServerReady(()=>{_.resolve()}),f.dispose()})}return _.promise}}e.WSChannelHandler=u},98710:(x,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Cursor=e.Buffers=e.copy=e.emptyBuffer=void 0,e.emptyBuffer=new Uint8Array(0);function t(o,u,p,h,E){u.set(o.subarray(h,E),p)}e.copy=t;class n{constructor(){this.buffers=[],this.size=0}get byteLength(){return this.size}push(u){this.buffers.push(u),this.size+=u.length}unshift(u){this.buffers.unshift(u),this.size+=u.length}slice(u,p){const h=this.buffers;if(p===void 0&&(p=this.size),u===void 0&&(u=0),p>this.size&&(p=this.size),u>=p)return e.emptyBuffer;let E=0,_=0;for(;_<h.length&&E+h[_].length<=u;_++)E+=h[_].length;const f=new Uint8Array(p-u);let m=0;for(let d=_;m<p-u&&d<h.length;d++){const s=h[d].length,a=m===0?u-E:0,r=m+s>=p-u?Math.min(a+(p-u)-m,s):s;t(h[d],f,m,a,r),m+=r-a}return f}pos(u){if(u<0||u>=this.size)throw new Error(`out of range, ${u} not in [0, ${this.size})`);let p=u,h=0,E=null;for(;;){if(E=this.buffers[h],p<E.length)return{buf:h,offset:p};p-=E.length,h++}}copy(u,p=0,h=0,E=this.size){return t(this.slice(h,E),u,p,0,E-h)}splice(u,p,...h){const E=this.buffers,_=u>=0?u:this.size-u;p===void 0?p=this.size-_:p>this.size-_&&(p=this.size-_);for(const s of h)this.size+=s.length;const f=new n;let m=0,d=0;for(;d<E.length&&m+E[d].length<_;d++)m+=E[d].length;if(_-m>0){const s=_-m;if(s+p<E[d].length){f.push(E[d].slice(s,s+p));const a=E[d],r=new Uint8Array(s);for(let g=0;g<s;g++)r[g]=a[g];const c=new Uint8Array(a.length-s-p);for(let g=s+p;g<a.length;g++)c[g-p-s]=a[g];if(h.length>0){const g=h.slice();g.unshift(r),g.push(c),E.splice.apply(E,[d,1,...g]),d+=g.length,h=[]}else E.splice(d,1,r,c),d+=2}else f.push(E[d].slice(s)),E[d]=E[d].slice(0,s),d++}for(h.length>0&&(E.splice.apply(E,[d,0,...h]),d+=h.length);f.byteLength<p;){const s=E[d],a=s.length,r=Math.min(a,p-f.byteLength);r===a?(f.push(s),E.splice(d,1)):(f.push(s.slice(0,r)),E[d]=E[d].slice(r))}return this.size-=f.byteLength,f}get(u){const{buf:p,offset:h}=this.pos(u);return this.buffers[p][h]}set(u,p){const{buf:h,offset:E}=this.pos(u);this.buffers[h][E]=p}cursor(u=0){return new l(this,u)}dispose(){this.buffers=[],this.size=0}}e.Buffers=n;class l{constructor(u,p=0){this.buffers=u,this.offset=p,this.chunkIndex=0,this.chunkOffset=0,this.updatePosition()}updatePosition(){if(this.offset===0){this.chunkIndex=0,this.chunkOffset=0;return}const{buf:u,offset:p}=this.buffers.pos(this.offset);this.chunkIndex=u,this.chunkOffset=p}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 u=this.buffers.buffers[this.chunkIndex],p=u.byteLength;for(;this.chunkOffset<p;){const h=u[this.chunkOffset];this.chunkOffset++,this.offset++,yield h}this.chunkOffset=0,this.chunkIndex++}}read(u){const p=this.offset+u,h=this.buffers.slice(this.offset,p);return this.skip(u),h}skip(u){let p=0;for(;this.chunkIndex<this.buffers.buffers.length;){const E=this.buffers.buffers[this.chunkIndex].byteLength;for(;this.chunkOffset<E;)if(this.chunkOffset++,this.offset++,++p===u)return;this.chunkOffset=0,this.chunkIndex++}}moveTo(u){this.offset=u,this.updatePosition()}dispose(){this.buffers=null,this.offset=0}reset(){this.offset=0,this.chunkIndex=0,this.chunkOffset=0}}e.Cursor=l},30613:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Capturer=e.getCapturer=e.ResponseStatus=e.MessageType=void 0;const n=t(43718),l=t(65265);var o;(function(_){_.SendNotification="sendNotification",_.SendRequest="sendRequest",_.RequestResult="requestResult",_.OnNotification="onNotification",_.OnRequest="onRequest",_.OnRequestResult="onRequestResult"})(o=e.MessageType||(e.MessageType={}));var u;(function(_){_.Success="success",_.Fail="fail"})(u=e.ResponseStatus||(e.ResponseStatus={}));const p=(typeof window<"u"?window:t.g)||{__OPENSUMI_DEVTOOLS_GLOBAL_HOOK__:void 0};function h(){const _=p.__OPENSUMI_DEVTOOLS_GLOBAL_HOOK__;if(_)return _.captureRPC}e.getCapturer=h;class E{constructor(f){this.source=f,this._disposables=new n.DisposableStore,this.capturer=null,this.setupListener=m=>{const{command:d}=m.detail;d===l.DevtoolsLantencyCommand.Start?this.capturer=h():d===l.DevtoolsLantencyCommand.Stop&&(this.capturer=null)},this.prefix=(0,n.randomString)(6),this.capturer=h(),typeof p.addEventListener=="function"&&(p.addEventListener(l.EDevtoolsEvent.Latency,this.setupListener),this._disposables.add({dispose:()=>{p.removeEventListener(l.EDevtoolsEvent.Latency,this.setupListener)}}))}capture(f){if(!this.capturer)return;const m=Object.assign(Object.assign({},f),{source:this.source});m.data&&(0,n.isUint8Array)(m.data)&&(m.data="<Uint8Array>"),f.requestId&&(m.requestId=`${this.prefix}-${f.requestId}`),f.error&&(m.error=(0,n.transformErrorForSerialization)(f.error)),this.capturer(m)}captureOnRequest(f,m,d){this.capturer&&this.capture({type:o.OnRequest,requestId:`\u2193${f}`,serviceMethod:m,arguments:d})}captureOnRequestResult(f,m,d){this.capturer&&this.capture({type:o.OnRequestResult,status:u.Success,requestId:`\u2193${f}`,serviceMethod:m,data:d})}captureOnRequestFail(f,m,d){this.capturer&&this.capture({type:o.OnRequestResult,status:u.Fail,requestId:`\u2193${f}`,serviceMethod:m,error:d})}captureSendRequest(f,m,d){this.capturer&&this.capture({type:o.SendRequest,requestId:f,serviceMethod:m,arguments:d})}captureSendRequestResult(f,m,d){this.capturer&&this.capture({type:o.RequestResult,status:u.Success,requestId:f,serviceMethod:m,data:d})}captureSendRequestFail(f,m,d){this.capturer&&this.capture({type:o.RequestResult,status:u.Fail,requestId:f,serviceMethod:m,error:d})}captureSendNotification(f,m,d){this.capturer&&this.capture({type:o.SendNotification,serviceMethod:m,arguments:d,requestId:f})}captureOnNotification(f,m,d){this.capturer&&this.capture({type:o.OnNotification,serviceMethod:m,arguments:d,requestId:`\u2193${f}`})}dispose(){this._disposables.dispose()}}e.Capturer=E},9811:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getRPCService=e.createRPCService=e.initRPCService=void 0;const n=t(85608),l=t(62199),o=t(8140);function u(E){return{createRPCService:(_,f)=>{const m=p(_,E);return f&&m.onRequestService(f),m},getRPCService:_=>h(_,E)}}e.initRPCService=u;function p(E,_){return new l.RPCServiceStub(E,_,o.ServiceType.Service).getProxy()}e.createRPCService=p;function h(E,_){return new l.RPCServiceStub(E,_,o.ServiceType.Stub).getProxy()}e.getRPCService=h,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),l=t(43718),o=t(98710);e.indicator=new Uint8Array([13,10,13,10]);class u{constructor(){this.dataEmitter=new l.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(h){this.buffers.push(h);let E=!1;for(;!E;)E=this.readFrame()}readFrame(){if(this.readLengthField()){const E=this.cursor.offset,_=E+this.contentLength,f=this.buffers.slice(E,_);if(this.dataEmitter.fire(f),this.buffers.byteLength>_)return this.contentLength=-1,this.state=0,this.cursor.moveTo(_),!1;this.buffers.splice(0,_),this.reset()}return!0}readLengthField(){const h=this.buffers.byteLength;if(this.state!==4){if(this.cursor.offset+e.indicator.length>h)return!1;this.readIndicator()}if(this.state!==4)return!1;if(this.contentLength===-1){if(this.cursor.offset+this.lengthFieldLength>h)return!1;const E=this.cursor.read(this.lengthFieldLength);this.contentLength=(0,l.readUInt32LE)(E,0)}return!(this.cursor.offset+this.contentLength>h)}readIndicator(){const h=this.cursor.iterator();let E=h.next();for(;!E.done;){switch(E.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,h.return();break;default:this.state=0;break}break;default:this.state=0;break}E=h.next()}}dispose(){this.dataEmitter.dispose(),this.buffers.dispose()}static construct(h){return u.writer.reset(),u.writer.buffer(e.indicator),u.writer.uint32(h.byteLength),u.writer.buffer(h),u.writer.dump()}}e.LengthFieldBasedFrameDecoder=u,u.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 l extends n.BaseConnection{constructor(u){super(),this.port=u,u.start()}send(u){this.port.postMessage(u)}onMessage(u){const p=h=>{u(h.data)};return this.port.addEventListener("message",p),{dispose:()=>{this.port.removeEventListener("message",p)}}}onceClose(u){return this.port.addEventListener("close",u),{dispose:()=>{this.port.addEventListener("close",u)}}}dispose(){}}e.MessagePortConnection=l},71056:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NodeMessagePortConnection=void 0;const n=t(35821);class l extends n.BaseConnection{constructor(u){super(),this.port=u}send(u){this.port.postMessage(u)}onMessage(u){return this.port.on("message",u),{dispose:()=>{this.port.off("message",u)}}}onceClose(u){return this.port.once("close",u),{dispose:()=>{this.port.off("close",u)}}}dispose(){this.port.removeAllListeners()}}e.NodeMessagePortConnection=l},91493:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ReconnectingWebSocketConnection=void 0;const l=t(85608).__importDefault(t(31133)),o=t(35821);class u extends o.BaseConnection{constructor(h){super(),this.socket=h}send(h){this.socket.send(h)}isOpen(){return this.socket.readyState===this.socket.OPEN}onOpen(h){return this.socket.addEventListener("open",h),{dispose:()=>{this.socket.removeEventListener("open",h)}}}onMessage(h){const E=_=>{var f,m;let d;if(_.data instanceof Blob)d=_.data.arrayBuffer();else if(_.data instanceof ArrayBuffer)d=Promise.resolve(_.data);else if(((m=(f=_.data)===null||f===void 0?void 0:f.constructor)===null||m===void 0?void 0:m.name)==="Buffer")d=Promise.resolve(_.data);else throw new Error("unknown message type, expect Blob or ArrayBuffer, received: "+typeof _.data);d.then(s=>h(new Uint8Array(s,0,s.byteLength)))};return this.socket.addEventListener("message",E),{dispose:()=>{this.socket.removeEventListener("message",E)}}}onceClose(h){const E=this.onClose(_);return{dispose:()=>{E.dispose()}};function _(f,m){h(f,m),E.dispose()}}onClose(h){const E=_=>{h(_.code,_.reason)};return this.socket.addEventListener("close",E),{dispose:()=>{this.socket.removeEventListener("close",E)}}}onError(h){const E=_=>{h(_.error)};return this.socket.addEventListener("error",E),{dispose:()=>{this.socket.removeEventListener("error",E)}}}dispose(){}static forURL(h,E,_){const f=new l.default(h,E,_);return f.binaryType="arraybuffer",new u(f)}}e.ReconnectingWebSocketConnection=u},57625:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NetSocketConnection=void 0;const n=t(36932);class l extends n.StreamConnection{constructor(u){super(u,u),this.socket=u}isOpen(){return this.socket.readyState==="open"}onOpen(u){return this.socket.on("connect",u),{dispose:()=>{this.socket.off("connect",u)}}}destroy(){this.socket.destroy()}}e.NetSocketConnection=l},36932:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.StreamConnection=void 0;const n=t(35821),l=t(57358);class o extends n.BaseConnection{constructor(p,h){super(),this.readable=p,this.writable=h,this.decoder=new l.LengthFieldBasedFrameDecoder;const E=_=>{this.decoder.push(_)};this.readable.on("data",E),this.readable.once("close",()=>{this.decoder.dispose(),this.readable.off("data",E)})}send(p){const h=l.LengthFieldBasedFrameDecoder.construct(p);this.writable.write(h,()=>{})}onMessage(p){return this.decoder.onData(p)}onceClose(p){const h=this.onClose(E);return{dispose:()=>{h.dispose()}};function E(_,f){p(_,f),h.dispose()}}onClose(p){const h=E=>{p(E?1:0,E?"had error":"")};return this.readable.on("close",h),this.writable!==this.readable&&this.writable.on("close",h),{dispose:()=>{this.readable.off("close",h),this.writable!==this.readable&&this.writable.off("close",h)}}}onError(p){return this.readable.on("error",p),this.writable!==this.readable&&this.writable.on("error",p),{dispose:()=>{this.readable.off("error",p),this.writable!==this.readable&&this.writable.off("error",p)}}}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 l extends n.BaseConnection{constructor(u){super(),this.socket=u}send(u){this.socket.send(u)}onMessage(u){return this.socket.on("message",u),{dispose:()=>{this.socket.off("message",u)}}}onceClose(u){return this.socket.once("close",u),{dispose:()=>{this.socket.off("close",u)}}}isOpen(){return this.socket.readyState===this.socket.OPEN}dispose(){this.socket.removeAllListeners()}}e.WSWebSocketConnection=l},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 l;(function(h){h[h.String=0]="String",h[h.Buffer=1]="Buffer",h[h.Number=2]="Number",h[h.JSONObject=3]="JSONObject",h[h.BigInt=4]="BigInt",h[h.Array=5]="Array",h[h.Object=6]="Object",h[h.Undefined=7]="Undefined",h[h.Null=8]="Null",h[h.Boolean=9]="Boolean"})(l=e.ProtocolType||(e.ProtocolType={}));class o{constructor(E,_,f){this.writer=E,this.reader=_,this.objectTransfer=f,this.deserialize=m=>(this.reader.reset(m),this.read()),this.serialize=m=>(this.writer.reset(),this.write(m),this.writer.dump())}write(E){var _;const{writer:f}=this,m=typeof E;switch(f.reserve(1),E){case null:f.uint8(l.Null);return;default:switch(m){case"undefined":f.uint8(l.Undefined);break;case"string":f.uint8(l.String),f.stringOfVarUInt32(E);break;case"boolean":f.reserve(1),f.uint8(l.Boolean),f.uint8(E?1:0);break;case"number":f.reserve(8),f.uint8(l.Number),f.double(E);break;case"bigint":f.reserve(8),f.uint8(l.BigInt),f.int64(E);break;case"object":if(Array.isArray(E)){f.reserve(4),f.uint8(l.Array),f.varUInt32(E.length);for(const d of E)this.write(d)}else(0,n.isUint8Array)(E)?(f.reserve(4),f.uint8(l.Buffer),f.varUInt32(E.byteLength),f.buffer(E)):(f.uint8(l.JSONObject),f.stringOfVarUInt32(JSON.stringify(E,(_=this.objectTransfer)===null||_===void 0?void 0:_.replacer)));break;default:throw new Error(`Unknown type ${m}`)}}}read(){var E;const{reader:_}=this,f=_.uint8();switch(f){case l.Undefined:return;case l.Null:return null;case l.String:return _.stringOfVarUInt32();case l.Buffer:{const m=_.varUInt32();return _.buffer(m)}case l.Number:return _.double();case l.JSONObject:{const m=_.stringOfVarUInt32();return JSON.parse(m,(E=this.objectTransfer)===null||E===void 0?void 0:E.reviver)}case l.BigInt:return _.int64();case l.Array:{const m=_.varUInt32(),d=[];for(let s=0;s<m;s++)d.push(this.read());return d}case l.Boolean:return _.uint8()===1;default:throw new Error(`Unknown type ${f}`)}}}e.AnySerializer=o;var u;(function(h){h.CODE_URI="CodeURI",h.BUFFER="Buffer"})(u||(u={}));class p{static replacer(E,_){if(_){switch(_.$mid){case 1:{const f=n.Uri.revive(_);return{$type:u.CODE_URI,data:f.toString()}}}if(_ instanceof Uint8Array||_ instanceof Uint32Array||_ instanceof Uint16Array)return{$type:"Buffer",data:Array.from(_)};if(_ instanceof ArrayBuffer)return{$type:"Buffer",data:Array.from(new Uint8Array(_))};if(_.type==="Buffer")return{$type:"Buffer",data:_.data}}return _}static reviver(E,_){if(_&&_.$type!==void 0&&_.data!==void 0)switch(_.$type){case u.CODE_URI:return n.Uri.parse(_.data);case u.BUFFER:return Uint8Array.from(_.data)}return _}}e.ExtObjectTransfer=p},94846:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.oneOf=void 0;const n=t(26246),l=t(4405),o=8,u=(p,h)=>{h||(h=(0,l.furyFactory)());const{fury:E,reader:_,writer:f}=h,m=new Array(o),d=new Array(o),s={};return p.forEach((c,g)=>{const v=c.options.tag;m[g]=(0,n.generateSerializer)(E,c),d[g]=v,s[v]=g}),{deserialize:c=>{_.reset(c);const g=_.uint8();let v;switch(g){case 0:v=m[0].read();break;case 1:v=m[1].read();break;case 2:v=m[2].read();break;case 3:v=m[3].read();break;case 4:v=m[4].read();break;case 5:v=m[5].read();break;case 6:v=m[6].read();break;case 7:v=m[7].read();break}return v.kind=d[g],v},serialize:c=>{const g=s[c.kind];switch(f.reset(),f.uint8(g),g){case 0:m[0].write(c);break;case 1:m[1].write(c);break;case 2:m[2].write(c);break;case 3:m[3].write(c);break;case 4:m[4].write(c);break;case 5:m[5].write(c);break;case 6:m[6].write(c);break;case 7:m[7].write(c);break}return f.dump()}}};e.oneOf=u},4405:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.furyFactory=void 0;const l=t(85608).__importDefault(t(97419)),o=u=>{const p=new l.default(u),h=p.binaryReader,E=p.binaryWriter;return{fury:p,reader:h,writer:E}};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(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)},16908:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CommonServerProtocol=void 0;const n=t(26387),l=t(43718);e.CommonServerProtocol={name:l.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),l=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:l.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.getMethodName=e.getRequestName=e.getNotificationName=e.RPCServiceCenter=void 0;const n=t(43718),l=t(96068),o=t(91676),u=t(8140),p=t(66748),h=t(92408);class E{constructor(s,a){this.bench=s,this._disposables=new n.DisposableStore,this.proxies=[],this.serviceRegistry=this._disposables.add(new h.ServiceRegistry),this.protocolRegistry=this._disposables.add(new h.ProtocolRegistry),this.deferred=new n.Deferred,this.uid=(0,n.randomString)(6),this.logger=a||console}registerService(s,a){a===u.ServiceType.Service&&this.bench&&this.bench.registerService(s)}ready(){return this.deferred.promise}loadProtocol(s){this.protocolRegistry.addProtocol(s,{nameConverter:a=>m(s.name,a)})}setSumiConnection(s){this.proxies.length===0&&this.deferred.resolve(),this.protocolRegistry.applyTo(s.io);const a=new p.ProxySumi(this.serviceRegistry,this.logger);a.listen(s);const r=(0,l.addElement)(this.proxies,a);return{dispose:()=>{r.dispose(),a.dispose()}}}setConnection(s){this.proxies.length===0&&this.deferred.resolve();const a=new p.ProxyJson(this.serviceRegistry,this.logger);a.listen(s);const r=(0,l.addElement)(this.proxies,a);return{dispose:()=>{r.dispose(),a.dispose()}}}onRequest(s,a,r){this.serviceRegistry.register(m(s,a),r)}onRequestService(s,a){this.serviceRegistry.registerService(a,{nameConverter:r=>m(s,r)})}async broadcast(s,a,...r){await this.ready();const c=m(s,a),g=await Promise.all(this.proxies.map(S=>S.invoke(c,...r))),v=[],b=[];for(const S of g)S===o.METHOD_NOT_REGISTERED?v.push(S):b.push(S);if(v.length>0&&this.logger.warn(`broadcast rpc \`${c}\` getting doubtful responses: ${v.join(",")}`),b.length===0)throw new Error(`broadcast rpc \`${c}\` error: no remote service can handle this call`);return b.length===1?b[0]:b}dispose(){this._disposables.dispose()}}e.RPCServiceCenter=E;function _(d,s){return`on:${d}:${s}`}e.getNotificationName=_;function f(d,s){return`${d}:${s}`}e.getRequestName=f;function m(d,s){return s.startsWith("on")?_(d,s):f(d,s)}e.getMethodName=m},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);class l{get client(){return this.rpcClient?this.rpcClient[0]:void 0}}e.RPCService=l},59875:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ProxyBase=void 0;const n=t(43718),l=new Set(["then","finally"]);let o=0;class u{constructor(h,E){this.registry=h,this.connectionPromise=new n.Deferred,this._disposables=new n.DisposableStore,this.logger=E||console,this.registry.onServicesUpdate(_=>{this.connection&&this.bindMethods(_)})}nextRequestId(){return String(o++)}listen(h){this.connection=h,this._disposables.add(this.connection),this.bindMethods(this.registry.methods()),h.listen(),this.connectionPromise.resolve()}listenService(h){this.registry.registerService(h)}dispose(){this._disposables.dispose()}getInvokeProxy(){return new Proxy(Object.create(null),{get:(h,E)=>typeof E!="string"?null:l.has(E)?Promise.resolve():(h[E]||(h[E]=(..._)=>this.invoke(E,..._)),h[E])})}}e.ProxyBase=u},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),l=t(91676),o=t(59875);class u extends o.ProxyBase{constructor(){super(...arguments),this.engine="json",this.capturer=this._disposables.add(new n.Capturer(this.engine))}bindMethods(h){for(const E of h)E.startsWith("on")?this.connection.onNotification(E,async(..._)=>{this.capturer.captureOnNotification("_",E,_);try{await this.registry.invoke(E,...this.serializeArguments(_))}catch(f){this.logger.warn(`notification exec ${E} error`,f)}}):this.connection.onRequest(E,async(..._)=>{const f=this.nextRequestId();this.capturer.captureOnRequest(f,E,_);try{const m=await this.registry.invoke(E,...this.serializeArguments(_));return this.capturer.captureOnRequestResult(f,E,m),{error:!1,data:m}}catch(m){return this.capturer.captureOnRequestFail(f,E,m),{error:!0,data:{message:m.message,stack:m.stack}}}})}async invoke(h,...E){await this.connectionPromise.promise;let _=!1;if(E.length===1&&Array.isArray(E[0])&&(_=!0),h.startsWith("on"))this.capturer.captureSendNotification("_",h,E),_?this.connection.sendNotification(h,[...E]):this.connection.sendNotification(h,...E);else{const f=this.nextRequestId();let m;_?m=this.connection.sendRequest(h,[...E]):m=this.connection.sendRequest(h,...E),this.capturer.captureSendRequest(f,h,E);const d=await m;if(d.error){const s=new Error(d.data.message);throw d.data.stack&&(s.stack=d.data.stack),this.capturer.captureSendRequestFail(f,h,d.data),s}else return this.capturer.captureSendRequestResult(f,h,d.data),d.data}}serializeArguments(h){const E=h[h.length-1];return h.length===2&&Array.isArray(h[0])&&Object.prototype.hasOwnProperty.call(E,"_isCancelled")?[...h[0],E]:h}listen(h){super.listen(h),h.onRequest(E=>{if(!this.registry.has(E)){const _=this.nextRequestId();this.capturer.captureOnRequest(_,E,[]);const f={data:l.METHOD_NOT_REGISTERED};return this.capturer.captureOnRequestFail(_,E,f.data),f}})}}e.ProxyJson=u},16420:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ProxySumi=void 0;const n=t(91676),l=t(59875);class o extends l.ProxyBase{constructor(){super(...arguments),this.engine="sumi"}bindMethods(p){for(const h of p)h.startsWith("on")?this.connection.onNotification(h,async(...E)=>{try{await this.registry.invoke(h,...E)}catch(_){this.logger.warn(`notification exec ${h} error`,_)}}):this.connection.onRequest(h,async(...E)=>await this.registry.invoke(h,...E))}async invoke(p,...h){if(await this.connectionPromise.promise,p.startsWith("on"))this.connection.sendNotification(p,...h);else return await this.connection.sendRequest(p,...h)}listen(p){super.listen(p),p.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=e.getServiceMethods=void 0;const n=t(43718),l=new Set(["constructor"]);function o(h){const E=new Set;let _=h;do{const m=Object.getOwnPropertyNames(_);for(const d of m)l.has(d)||typeof h[d]=="function"&&E.add(d)}while(_=Object.getPrototypeOf(_));const f=Array.from(E);return f.sort(),f}e.getServiceMethods=o;class u{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([E])}registerService(E,_){const f=[],{nameConverter:m}=_||{},d=o(E);for(const s of d){let a=s;m&&(a=m(s)),this.serviceMethodMap.set(a,E[s].bind(E)),f.push(a)}this.emitter.fire(f)}has(E){return this.serviceMethodMap.has(E)}invoke(E,..._){return this.serviceMethodMap.get(E)(..._)}methods(){return Array.from(this.serviceMethodMap.keys())}dispose(){this._disposables.dispose()}}e.ServiceRegistry=u;class p{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 f=[],{nameConverter:m}=_||{},{methods:d}=E;for(const s of d){let a=s.method;m&&(a=m(a)),this.protocolMap.set(a,Object.assign(Object.assign({},s),{method:a})),f.push(a)}this.emitter.fire(f)}applyTo(E){for(const _ of this.protocolMap.values())E.loadProtocolMethod(_);this._disposables.add(this.onProtocolUpdate(_=>{for(const f of _){const m=this.protocolMap.get(f);m&&E.loadProtocolMethod(m)}}))}dispose(){this._disposables.dispose()}}e.ProtocolRegistry=p},68855:(x,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.RPCServiceStub=void 0;class t{constructor(l,o,u){this.serviceName=l,this.center=o,this.type=u,this.getProxy=()=>new Proxy(this,{get:(p,h)=>typeof h=="symbol"?Promise.resolve():(p[h]||(p[h]=(...E)=>this.broadcast(h,...E)),p[h])}),this.center.registerService(l,this.type)}on(l,o){this.onRequest(l,o)}onRequestService(l){this.center.onRequestService(this.serviceName,l)}onRequest(l,o){this.center.onRequest(this.serviceName,l,o)}broadcast(l,...o){return this.center.broadcast(this.serviceName,l,...o)}}e.RPCServiceStub=t},97349:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SumiConnection=void 0;const n=t(43718),l=t(70392),o=t(93062),u=t(30613),p=t(90750),h=t(91676),E=t(48218),_=t(76339),f={},m={chunked:!0};class d{constructor(a,r={}){this.socket=a,this.options=r,this.disposable=new l.DisposableStore,this._requestHandlers=new Map,this._notificationHandlers=new Map,this._requestId=0,this._callbacks=new Map,this._timeoutHandles=new Map,this._cancellationTokenSources=new Map,this._knownCanceledRequests=new Set,this.activeRequestPool=new Map,this.io=new _.MessageIO,r.logger?this.logger=r.logger:this.logger=(0,n.getDebugLogger)(),this.capturer=new u.Capturer(r.name||"sumi"),this.disposable.add(this.capturer)}sendNotification(a,...r){const c=this._requestId++;this.capturer.captureSendNotification(c,a,r),this.socket.send(this.io.Notification(c,a,f,r))}sendRequest(a,...r){return new Promise((c,g)=>{const v=this._requestId++;if(this._callbacks.set(v,(S,y,A)=>{if(y){if(this.traceRequestError(v,a,r,y),y===h.METHOD_NOT_REGISTERED){c(y);return}g(y);return}this.capturer.captureSendRequestResult(v,a,A),c(A)}),this.options.timeout&&this.options.timeout!==-1){const S=setTimeout(()=>{this._handleTimeout(a,v)},this.options.timeout);this._timeoutHandles.set(v,S)}const b=r.length&&l.CancellationToken.isCancellationToken(r[r.length-1])?r.pop():void 0;if(b&&b.isCancellationRequested)return Promise.reject((0,l.canceled)());b&&b.onCancellationRequested(()=>this.cancelRequest(v)),this.capturer.captureSendRequest(v,a,r),this.socket.send(this.io.Request(v,a,{cancelable:!!b||void 0},r))})}cancelRequest(a){this.socket.send(this.io.Cancel(a))}_handleTimeout(a,r){if(!this._callbacks.has(r)||!this._timeoutHandles.has(r))return;const c=this._callbacks.get(r);this._callbacks.delete(r),this._timeoutHandles.delete(r),c(f,new E.MethodTimeoutError(a))}onRequest(a,r){return this._requestHandlers.set(a,r),{dispose:()=>{this._requestHandlers.delete(a)}}}onRequestNotFound(a){return this._starRequestHandler=a,{dispose:()=>{this._starRequestHandler=void 0}}}onNotification(a,r){return this._notificationHandlers.set(a,r),{dispose:()=>{this._notificationHandlers.delete(a)}}}onNotificationNotFound(a){return this._starNotificationHandler=a,{dispose:()=>{this._starNotificationHandler=void 0}}}listen(){const{reader:a}=this.io;this.disposable.add(this.socket.onMessage(r=>{a.reset(r),a.skip(1);const c=a.uint8(),g=a.uint32();switch(this._timeoutHandles.has(g)&&(typeof clearTimeout=="function"&&clearTimeout(this._timeoutHandles.get(g)),this._timeoutHandles.delete(g)),c){case _.OperationType.Response:{const v=a.stringOfVarUInt32(),b=a.uint16(),S=(D,w,I)=>{const O=this._callbacks.get(g);if(!O){this.logger.error(`Cannot find callback for request ${g}: ${v}, status: ${b}`);return}this._callbacks.delete(g),O(D,w,I)},y=this.io.responseHeadersSerializer.read();let A,T;if(b===_.Status.Err){const D=a.stringOfVarUInt32();A=(0,l.parseError)(D)}else T=this.io.getProcessor(v).readResponse();if(y&&y.chunked){let D;if(this.activeRequestPool.has(g)?D=this.activeRequestPool.get(g):(D=new o.SumiReadableStream,this.activeRequestPool.set(g,D),S(y,void 0,D)),T===null){D.end(),this.activeRequestPool.delete(g);break}if(A){D.emitError(A);break}D.emitData(T);break}S(y,A,T);break}case _.OperationType.Notification:case _.OperationType.Request:{const v=a.stringOfVarUInt32(),b=this.io.requestHeadersSerializer.read(),S=this.io.getProcessor(v).readRequest();if(b.cancelable){const y=new l.CancellationTokenSource;this._cancellationTokenSources.set(g,y),S.push(y.token),this._knownCanceledRequests.has(g)&&(y.cancel(),this._knownCanceledRequests.delete(g))}switch(c){case _.OperationType.Request:{this.capturer.captureOnRequest(g,v,S);let y;try{let D;const w=this._requestHandlers.get(v);w?D=w(...S):this._starRequestHandler&&(D=this._starRequestHandler(v,S)),y=Promise.resolve(D)}catch(D){y=Promise.reject(D)}const A=D=>{this.capturer.captureOnRequestResult(g,v,D),(0,o.isReadableStream)(D)?(0,o.listenReadable)(D,{onData:w=>{this.socket.send(this.io.Response(g,v,m,w))},onEnd:()=>{this.socket.send(this.io.Response(g,v,m,null))},onError:w=>{this.socket.send(this.io.Error(g,v,m,w))}}):this.socket.send(this.io.Response(g,v,f,D)),this._cancellationTokenSources.delete(g)},T=D=>{this.traceRequestError(g,v,S,D),this.socket.send(this.io.Error(g,v,f,D)),this._cancellationTokenSources.delete(g)};y.then(A).catch(T);break}case _.OperationType.Notification:{this.capturer.captureOnNotification(g,v,S);const y=this._notificationHandlers.get(v);y?y(...S):this._starNotificationHandler&&this._starNotificationHandler(v,S);break}}break}case _.OperationType.Cancel:{const v=this._cancellationTokenSources.get(g);v?v.cancel():this._knownCanceledRequests.add(g);break}default:break}}))}dispose(){this.disposable.dispose()}static forWSWebSocket(a,r={}){return new d(new p.WSWebSocketConnection(a),r)}static forNetSocket(a,r={}){return new d(new p.NetSocketConnection(a),r)}traceRequestError(a,r,c,g){this.capturer.captureSendRequestFail(a,r,g)}}e.SumiConnection=d},48218:(x,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MethodTimeoutError=void 0;class t extends Error{constructor(l){super(`method ${l} timeout`)}}e.MethodTimeoutError=t},76339:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MessageIO=e.AnyProtocolSerializer=e.HeadersProto=e.Status=e.OperationType=void 0;const n=t(26387),l=t(26246),o=t(86560),u=t(89104),p=t(4405),h=1;var E;(function(a){a[a.Request=0]="Request",a[a.Notification=1]="Notification",a[a.Response=2]="Response",a[a.Cancel=3]="Cancel"})(E=e.OperationType||(e.OperationType={}));var _;(function(a){a[a.OK=0]="OK",a[a.Err=1]="Err"})(_=e.Status||(e.Status={})),e.HeadersProto={Request:n.Type.object("req-headers",{cancelable:n.Type.bool()}),Response:n.Type.object("resp-headers",{chunked:n.Type.bool()})};const f={Request:E.Request<<8|h,Notification:E.Notification<<8|h,Response:E.Response<<8|h,Cancel:E.Cancel<<8|h};class m{constructor(r,c){this.fury=c;const g=[];for(const S of r.request)g.push(S.type);const v=n.Type.tuple(g);let b=n.Type.any();r.response&&r.response.type&&(b=r.response.type),this.request=this.fury.registerSerializer(v),this.result=this.fury.registerSerializer(b)}writeRequest(r){return this.request.serializer.write(r)}readRequest(){return this.request.serializer.read()}writeResponse(r){return this.result.serializer.write(r)}readResponse(){return this.result.serializer.read()}}class d{constructor(r,c,g){this.writer=r,this.reader=c,this.anySerializer=new u.AnySerializer(this.writer,this.reader,g)}writeRequest(r){this.anySerializer.write(r)}readRequest(){return this.anySerializer.read()}writeResponse(r){this.anySerializer.write(r)}readResponse(){return this.anySerializer.read()}}e.AnyProtocolSerializer=d;class s{constructor(){this.serializerMap=new Map;const r=(0,p.furyFactory)();this.fury=r.fury,this.reader=r.reader,this.writer=r.writer,this.requestHeadersSerializer=(0,l.generateSerializer)(this.fury,e.HeadersProto.Request),this.responseHeadersSerializer=(0,l.generateSerializer)(this.fury,e.HeadersProto.Response),this.anySerializer=new d(this.writer,this.reader)}setAnySerializer(r){this.anySerializer=r}has(r){return this.serializerMap.has(r)}loadProtocol(r,c){const{methods:g}=r;for(const v of g)this.loadProtocolMethod(v,c)}loadProtocolMethod(r,c){let g=r.method;c?.nameConverter&&(g=c.nameConverter(g)),this.serializerMap.set(g,new m(r,this.fury))}getProcessor(r){const c=this.serializerMap.get(r);return c||this.anySerializer}Notification(r,c,g,v){const{writer:b}=this;return b.reset(),b.uint16(f.Notification),b.uint32(r),b.stringOfVarUInt32(c),this.requestHeadersSerializer.write(g),this.getProcessor(c).writeRequest(v),b.dump()}Request(r,c,g,v){const{writer:b}=this;return b.reset(),b.uint16(f.Request),b.uint32(r),b.stringOfVarUInt32(c),this.requestHeadersSerializer.write(g),this.getProcessor(c).writeRequest(v),b.dump()}Cancel(r){const{writer:c}=this;return c.reset(),c.uint16(f.Cancel),c.uint32(r),c.dump()}Response(r,c,g,v){const{writer:b}=this;return b.reset(),b.uint16(f.Response),b.uint32(r),b.stringOfVarUInt32(c),b.uint16(_.OK),this.responseHeadersSerializer.write(g),this.getProcessor(c).writeResponse(v),b.dump()}Error(r,c,g,v){const{writer:b}=this;return b.reset(),b.uint16(f.Response),b.uint32(r),b.stringOfVarUInt32(c),b.uint16(_.Err),this.responseHeadersSerializer.write(g),b.stringOfVarUInt32((0,o.stringifyError)(v)),b.dump()}}e.MessageIO=s},86058:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SumiConnectionMultiplexer=e.IRPCProtocol=e.ProxyIdentifier=void 0;const n=t(89104),l=t(97349),o=t(76339);class u{constructor(E){this.serviceId=E,this.countId=++u.count}static for(E){return new u(E)}}e.ProxyIdentifier=u,u.count=0,e.IRPCProtocol=Symbol("IRPCProtocol");class p extends l.SumiConnection{static getRPCName(E,_){return`${E}${p.SEP}${_}`}static extractServiceAndMethod(E){const _=E.indexOf(p.SEP);return[E.substring(0,_),E.substring(_+p.SEP_LENGTH)]}static normalizeServiceId(E){return E.replace(/\//g,"_")}constructor(E,_={}){super(E,_),this.socket=E,this.options=_,this._locals=new Map,this._proxies=new Map,this._knownProtocols=_.knownProtocols||{},this.io.setAnySerializer(new o.AnyProtocolSerializer(this.io.writer,this.io.reader,n.ExtObjectTransfer)),this.onRequestNotFound((f,m)=>this.invoke(f,m)),this.listen()}set(E,_){const f=p.normalizeServiceId(E.serviceId);this._locals.set(f,_);const m=this._knownProtocols[E.serviceId];return m&&this.loadProtocol(f,m),_}get(E){return this._locals.get(p.normalizeServiceId(E.serviceId))}loadProtocol(E,_){this.io.loadProtocol(_,{nameConverter:f=>p.getRPCName(E,f)})}getProxy(E){const _=p.normalizeServiceId(E.serviceId);if(!this._proxies.has(_)){const f=this._knownProtocols[E.serviceId];f&&this.loadProtocol(_,f),this._proxies.set(_,this._createProxy(_))}return this._proxies.get(_)}_createProxy(E){const _={get:(f,m)=>{if(typeof m=="symbol")return null;if(!f[m]&&m.charCodeAt(0)===36){const d=p.getRPCName(E,m);f[m]=(...s)=>this.sendRequest(d,...s)}return f[m]}};return new Proxy(Object.create(null),_)}async invoke(E,_){const[f,m]=p.extractServiceAndMethod(E),d=this._locals.get(f);if(!d)throw new Error("Unknown actor "+f);const s=await d[m];if(typeof s!="function")throw new Error("Unknown method "+m+" on actor "+f);return s.apply(d,_)}getSocket(){return this.socket}}e.SumiConnectionMultiplexer=p,p.SEP="/",p.SEP_LENGTH=p.SEP.length},15726:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.RPCProtocol=e.MessageIO=e.ObjectTransfer=e.createMainContextProxyIdentifier=e.createExtHostContextProxyIdentifier=e.ProxyIdentifier=e.IRPCProtocol=e.RPCProtocolEnv=void 0;const n=t(43718),l=t(86058);Object.defineProperty(e,"IRPCProtocol",{enumerable:!0,get:function(){return l.IRPCProtocol}}),Object.defineProperty(e,"ProxyIdentifier",{enumerable:!0,get:function(){return l.ProxyIdentifier}});var o;(function(m){m[m.MAIN=0]="MAIN",m[m.EXT=1]="EXT"})(o=e.RPCProtocolEnv||(e.RPCProtocolEnv={}));function u(m){return new l.ProxyIdentifier(m)}e.createExtHostContextProxyIdentifier=u;function p(m){return new l.ProxyIdentifier(m)}e.createMainContextProxyIdentifier=p;var h;(function(m){function d(a,r){if(r){if(r.$mid===1)return{$type:"VSCODE_URI",data:n.Uri.revive(r).toString()};if(r instanceof Uint8Array||r instanceof Uint32Array||r instanceof Uint16Array)return{$type:"Buffer",data:Array.from(r)};if(r instanceof ArrayBuffer)return{$type:"Buffer",data:Array.from(new Uint8Array(r))};if(r.type==="Buffer")return{$type:"Buffer",data:r.data}}return r}m.replacer=d;function s(a,r){if(r&&r.$type!==void 0&&r.data!==void 0){if(r.$type==="VSCODE_URI")return n.Uri.parse(r.data);if(r.$type==="Buffer")return Uint8Array.from(r.data)}return r}m.reviver=s})(h=e.ObjectTransfer||(e.ObjectTransfer={}));class E{static cancel(d,s){return`{"type":4,"id":"${d}"}`}static serializeRequest(d,s,a,r){return r=r.map(c=>{if(c instanceof Error){const g=Array.prototype.slice.call(arguments);return g[0]=c.stack,g.join(`
27350
- `)}return c}),`{"type": 1, "id": "${d}", "proxyId": "${s}", "method": "${a}", "args": ${JSON.stringify(r,h.replacer)}}`}static serializeReplyOK(d,s,a){if(typeof s>"u")return`{"type": 2, "id": "${d}"}`;try{return`{"type": 2, "id": "${d}", "res": ${JSON.stringify(s,h.replacer)}}`}catch{return a&&a.warn("res",s),`{"type": 2, "id": "${d}", "res": {}}`}}static serializeReplyError(d,s,a){try{return`{"type": 3, "id": "${d}", "res": ${JSON.stringify((0,n.transformErrorForSerialization)(s),h.replacer)}}`}catch{return a&&a.error("error",s),`{"type": 3, "id": "${d}", "res": {}}`}}}e.MessageIO=E;function _(){const m=new Error("Canceled");return m.name=m.message,m}class f{constructor(d,s){this._protocol=d,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=s||console,this.logger.error("You are using the deprecated class: 'RPCProtocol'. Please use the new one: 'SumiConnectionMultiplexer'"),this._protocol.onMessage(a=>this._receiveOneMessage(a))}set(d,s){return this._locals.set(d.serviceId,s),s}get(d){return this._locals.get(d.serviceId)}getProxy(d){return this._proxies.has(d.serviceId)||this._proxies.set(d.serviceId,this._createProxy(d.serviceId)),this._proxies.get(d.serviceId)}_createProxy(d){const s={get:(a,r)=>typeof r=="symbol"?null:(!a[r]&&r.charCodeAt(0)===36&&(a[r]=(...c)=>this._remoteCall(d,r,c)),a[r])};return new Proxy(Object.create(null),s)}_remoteCall(d,s,a){const r=a.length&&n.CancellationToken.isCancellationToken(a[a.length-1])?a.pop():void 0;if(r&&r.isCancellationRequested)return Promise.reject(_());const c=String(++this._lastMessageId),g=new n.Deferred;r&&(a.push("add.cancellation.token"),r.onCancellationRequested(()=>this._protocol.send(E.cancel(c)))),this._pendingRPCReplies.set(c,g);const v=E.serializeRequest(c,d,s,a);if(this._protocol.send(v),this._protocol.timeout&&this._protocol.timeout!==-1){const b=setTimeout(()=>{this._handleTimeout(c)},this._protocol.timeout);this._timeoutHandles.set(c,b)}return g.promise}_receiveOneMessage(d){const s=JSON.parse(d,h.reviver);switch(this._timeoutHandles.has(s.id)&&(typeof clearTimeout=="function"&&clearTimeout(this._timeoutHandles.get(s.id)),this._timeoutHandles.delete(s.id)),s.type){case 1:this._receiveRequest(s);break;case 2:this._receiveReply(s);break;case 4:this._receiveCancel(s);break;case 3:this._receiveError(s);break}}_receiveCancel(d){const s=this._cancellationTokenSources.get(d.id);s&&s.cancel()}_receiveError(d){const s=d.id;if(!this._pendingRPCReplies.has(s))return;const a=this._pendingRPCReplies.get(s);this._pendingRPCReplies.delete(s);let r;d.res&&(d.res.$isError?(r=new Error,r.name=d.res.name,r.message=d.res.message,r.stack=d.res.stack):r=d.res),a.reject(r)}_receiveRequest(d){const s=d.id,a=d.proxyId,r=d.method,c=d.args.map(b=>b===null?void 0:b);if(c.length&&c[c.length-1]==="add.cancellation.token"?c.pop():!1){const b=new n.CancellationTokenSource;this._cancellationTokenSources.set(s,b),c.push(b.token)}this._invokeHandler(a,r,c).then(b=>{this._protocol.send(E.serializeReplyOK(s,b)),this._cancellationTokenSources.delete(s)}).catch(b=>{this._protocol.send(E.serializeReplyError(s,b)),this._cancellationTokenSources.delete(s)})}_invokeHandler(d,s,a){try{return this._doInvokeHandler(d,s,a)}catch(r){return Promise.reject(r)}}async _doInvokeHandler(d,s,a){const r=this._locals.get(d);if(!r)throw new Error("Unknown actor "+d);const c=await r[s];if(typeof c!="function")throw new Error("Unknown method "+s+" on actor "+d);return c.apply(r,a)}_receiveReply(d){const s=d.id;if(!this._pendingRPCReplies.has(s))return;const a=this._pendingRPCReplies.get(s);this._pendingRPCReplies.delete(s),a.resolve(d.res)}_handleTimeout(d){if(!this._pendingRPCReplies.has(d)||!this._timeoutHandles.has(d))return;const s=this._pendingRPCReplies.get(d);this._pendingRPCReplies.delete(d),this._timeoutHandles.delete(d),s.reject(new Error("RPC Timeout: "+d))}}e.RPCProtocol=f},76271:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.RPCServiceChannelPath=e.BaseCommonChannelHandler=e.commonChannelPathHandler=e.CommonChannelPathHandler=void 0;const n=t(47561);class l{constructor(){this.handlerMap=new Map,this.paramsKey=new Map}register(p,h){const E=p.indexOf("/:"),_=E>=0;let f=p;_&&(f=p.slice(0,E),this.paramsKey.set(f,p.slice(E+2))),this.handlerMap.has(f)||this.handlerMap.set(f,[]);const m=this.handlerMap.get(f),d=h.handler.bind(h),s=(a,r,c)=>{h.connection=a,d(a,r,c)};h.handler=s,m.push(h),this.handlerMap.set(f,m)}getParams(p,h){const E={};if(this.paramsKey.has(p)){const _=this.paramsKey.get(p);_&&(E[_]=h)}return E}removeHandler(p,h){const E=p.indexOf(":"),_=E>=0;let f=p;_&&(f=p.slice(0,E));const m=this.handlerMap.get(f)||[],d=m.indexOf(h);d!==-1&&m.splice(d,1),this.handlerMap.set(p,m)}get(p){return this.handlerMap.get(p)}disposeConnectionClientId(p,h){this.handlerMap.forEach(E=>{E.forEach(_=>{_.dispose(p,h)})})}openChannel(p,h,E){let _=this.get(p),f;if(!_){const m=p.indexOf("/");m>=0&&(_=this.get(p.slice(0,m)),f=this.getParams(p.slice(0,m),p.slice(m+1)))}if(_)for(let m=0,d=_.length;m<d;m++)_[m].handler(h,E,f)}getAll(){return Array.from(this.handlerMap.values())}}e.CommonChannelPathHandler=l,e.commonChannelPathHandler=new l;class o{constructor(p,h=console){this.handlerId=p,this.logger=h,this.channelMap=new Map,this.heartbeatTimer=null}heartbeat(p){this.heartbeatTimer&&clearTimeout(this.heartbeatTimer),this.heartbeatTimer=t.g.setTimeout(()=>{this.doHeartbeat(p),this.heartbeat(p)},5e3)}receiveConnection(p){let h;this.heartbeat(p);const E=(_,f)=>{let m=this.channelMap.get(_);return m||(m=new n.WSServerChannel(p,{id:_,clientId:f,logger:this.logger}),this.channelMap.set(_,m)),m};p.onMessage(_=>{let f;try{switch(f=(0,n.parse)(_),f.kind){case"ping":p.send(n.pongMessage);break;case"open":{const{id:m,path:d,connectionToken:s}=f;h=f.clientId,this.logger.log(`open a new connection channel ${h} with path ${d}`);const a=E(m,h);e.commonChannelPathHandler.openChannel(d,a,h),a.serverReady(s);break}default:{const{id:m}=f,d=this.channelMap.get(m);d?d.dispatch(f):(p.send((0,n.stringify)({kind:"error",id:m,code:n.ErrorMessageCode.ChannelNotFound,message:`channel ${m} not found`})),this.logger.warn(`channel ${m} is not found`))}}}catch(m){this.logger.error("handle connection message error",m)}}),p.onceClose(()=>{this.logger.log(`connection ${h} is closed, dispose all channels`),e.commonChannelPathHandler.disposeConnectionClientId(p,h),Array.from(this.channelMap.values()).filter(_=>_.clientId===h).forEach(_=>{_.close(1,"close"),_.dispose(),this.channelMap.delete(_.id),this.logger.log(`Remove connection channel ${_.id}`)})})}dispose(){this.heartbeatTimer&&clearTimeout(this.heartbeatTimer)}}e.BaseCommonChannelHandler=o,e.RPCServiceChannelPath="RPCService"},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||(e.ServiceType={}))},47561:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.pongMessage=e.pingMessage=e.parse=e.stringify=e.CloseProtocol=e.BinaryProtocol=e.DataProtocol=e.ErrorProtocol=e.ErrorMessageCode=e.ServerReadyProtocol=e.OpenProtocol=e.PongProtocol=e.PingProtocol=e.WSServerChannel=e.WSChannel=void 0;const n=t(26387),l=t(40396),o=t(43718),u=t(94846),p=t(97349);class h{static forClient(c,g){const v=new o.DisposableCollection,b=new h(c,g);return v.push(c.onMessage(S=>{b.dispatch(d(S))})),c.onceClose(()=>{v.dispose()}),b}constructor(c,g){this.connection=c,this._disposables=new o.DisposableStore,this.emitter=this._disposables.add(new l.EventEmitter),this.onBinaryQueue=this._disposables.add(new o.EventQueue),this.sendQueue=[],this._isServerReady=!1,this.logger=console,this.stateTracer=this._disposables.add(new o.StateTracer);const{id:v,logger:b,ensureServerReady:S}=g;this.id=v,b&&(this.logger=b),this._ensureServerReady=!!S,this._disposables.add(this.emitter.on("binary",y=>this.onBinaryQueue.push(y)))}inqueue(c){if(this._ensureServerReady&&!this._isServerReady){this.sendQueue||(this.sendQueue=[]),this.sendQueue.push(c);return}this.connection.send(c)}onMessage(c){return this.emitter.on("message",c)}onBinary(c){return this.onBinaryQueue.on(c)}onOpen(c){return this.emitter.on("open",c)}onReopen(c){return this.emitter.on("reopen",c)}pause(){this._isServerReady=!1}onServerReady(c){if(this._isServerReady){c();return}return this.emitter.on("open",c)}resume(){if(this._isServerReady=!0,this.sendQueue){for(const c of this.sendQueue)this.connection.send(c);this.sendQueue=[]}}dispatch(c){switch(c.kind){case"server-ready":this.stateTracer.fulfill(c.token),this.resume(),this.timer&&clearTimeout(this.timer),this.emitter.emit("open",c.id);break;case"data":this.emitter.emit("message",c.content);break;case"binary":this.emitter.emit("binary",c.binary);break}}open(c,g,v=(0,o.randomString)(16)){if(this.channelPath=c,this.stateTracer.has(v)){this.logger.warn(`channel already opened or in progress, path: ${c}, clientId: ${g}, connectionToken: ${v}`);return}return this.stateTracer.record(v),this.connection.send(m({kind:"open",id:this.id,path:c,clientId:g,connectionToken:v})),this._ensureServerReady&&this.ensureOpenSend(c,g,v),v}ensureOpenSend(c,g,v){this.timer&&clearTimeout(this.timer),this.timer=setTimeout(()=>{this._isServerReady||(this.stateTracer.delete(v),this.open(c,g,v))},500)}send(c){this.inqueue(m({kind:"data",id:this.id,content:c}))}sendBinary(c){this.inqueue(m({kind:"binary",id:this.id,binary:c}))}onError(){}close(c,g){this.pause(),this.emitter.emit("close",c,g)}fireReopen(){this.emitter.emit("reopen")}onClose(c){return this.emitter.on("close",c)}onceClose(c){return this.emitter.once("close",c)}createConnection(){return{onceClose:c=>this.onceClose(c),onMessage:c=>this.onBinary(c),send:c=>{this.sendBinary(c)},dispose(){}}}createSumiConnection(c={}){return new p.SumiConnection(this.createConnection(),c)}dispose(){this.timer&&clearTimeout(this.timer),this.sendQueue=[],this._disposables.dispose()}}e.WSChannel=h;class E extends h{constructor(c,g){super(c,g),this.connection=c,this.messageQueue=[],this.clientId=g.clientId}serverReady(c){this.connection.send(m({kind:"server-ready",id:this.id,token:c}))}dispatch(c){switch(c.kind){case"data":this.emitter.emit("message",c.content);break;case"binary":this.emitter.emit("binary",c.binary);break}}}e.WSServerChannel=E,e.PingProtocol=n.Type.object("ping",{clientId:n.Type.string(),id:n.Type.string()}),e.PongProtocol=n.Type.object("pong",{clientId:n.Type.string(),id:n.Type.string()}),e.OpenProtocol=n.Type.object("open",{clientId:n.Type.string(),id:n.Type.string(),path:n.Type.string(),connectionToken:n.Type.string()}),e.ServerReadyProtocol=n.Type.object("server-ready",{id:n.Type.string(),token:n.Type.string()});var _;(function(r){r[r.ChannelNotFound=1]="ChannelNotFound"})(_=e.ErrorMessageCode||(e.ErrorMessageCode={})),e.ErrorProtocol=n.Type.object("error",{id:n.Type.string(),code:n.Type.uint16(),message:n.Type.string()}),e.DataProtocol=n.Type.object("data",{id:n.Type.string(),content:n.Type.string()}),e.BinaryProtocol=n.Type.object("binary",{id:n.Type.string(),binary:n.Type.binary()}),e.CloseProtocol=n.Type.object("close",{id:n.Type.string(),code:n.Type.uint32(),reason:n.Type.string()});const f=(0,u.oneOf)([e.PingProtocol,e.PongProtocol,e.OpenProtocol,e.ServerReadyProtocol,e.DataProtocol,e.BinaryProtocol,e.CloseProtocol,e.ErrorProtocol]);function m(r){return f.serialize(r)}e.stringify=m;function d(r){return f.deserialize(r)}e.parse=d;const s={kind:"ping",id:"",clientId:""},a={kind:"pong",id:"",clientId:""};e.pingMessage=m(s),e.pongMessage=m(a)},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=void 0;const n=t(85608),l=t(76003),o=t(1149),u=t(11050);let p=class{constructor(){this.internalCapabilities={supportsMarkers:!1,supportsChatAssistant:!1,supportsInlineChat:!1,supportsInlineCompletion:!1,supportsConflictResolve:!1,supportsRenameSuggestions:!1,supportsTerminalDetection:!1,supportsTerminalCommandSuggest:!1}}setDefaultCapabilities(E){for(const _ in this.internalCapabilities)Object.prototype.hasOwnProperty.call(this.internalCapabilities,_)&&(this.internalCapabilities[_]=E)}enableCapabilities(){this.setDefaultCapabilities(!0)}disableCapabilities(){this.setDefaultCapabilities(!1)}get capabilities(){const{AINativeConfig:E}=this.appConfig;return E?.capabilities?Object.assign(Object.assign({},this.internalCapabilities),E.capabilities):this.internalCapabilities}};n.__decorate([(0,l.Autowired)(u.AppConfig),n.__metadata("design:type",Object)],p.prototype,"appConfig",void 0),n.__decorate([(0,l.Autowired)(o.LayoutViewSizeConfig),n.__metadata("design:type",o.LayoutViewSizeConfig)],p.prototype,"layoutViewSize",void 0),p=n.__decorate([(0,l.Injectable)()],p),e.AINativeConfigService=p},41480:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AIReporter=void 0;const n=t(85608),l=t(76003),o=t(43718),u=t(52664);let p=class{constructor(){this.reportInfoCache=new Map,this.reporterCancelHandler=new Map}getRelationId(){return(0,o.uuid)()}getCacheReportInfo(E){return this.reportInfoCache.get(E)}getCommonReportInfo(){return{}}start(E,_){const f=this.getRelationId();this.report(f,Object.assign(Object.assign({},_),{msgType:E,isStart:!0}));const m=setTimeout(()=>{this.report(f,Object.assign(Object.assign({},_),{success:!1}))},60*1e3);return this.reporterCancelHandler.set(f,m),f}end(E,_){const f=this.reporterCancelHandler.get(E);f&&clearTimeout(f),this.report(E,Object.assign(Object.assign({success:!0},_),{isStart:!1}))}record(E,_){_||(_=this.getRelationId());const f=this.reportInfoCache.get(_)||{},m=Object.assign(Object.assign(Object.assign(Object.assign({},this.getCommonReportInfo()),f),E),{relationId:_});return this.reportInfoCache.set(_,m),m}report(E,_){const f=this.record(_,E);this.reporter.point(u.AI_REPORTER_NAME,_.msgType||f.msgType,f)}};n.__decorate([(0,l.Autowired)(o.IReporterService),n.__metadata("design:type",Object)],p.prototype,"reporter",void 0),p=n.__decorate([(0,l.Injectable)()],p),e.AIReporter=p},57925:(x,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AI_CHAT_VISIBLE=e.AI_INLINE_COMPLETION_REPORTER=e.AI_INLINE_COMPLETION_VISIBLE=e.AI_INLINE_CHAT_VISIBLE=void 0,e.AI_INLINE_CHAT_VISIBLE={id:"ai.inline.chat.visible"},e.AI_INLINE_COMPLETION_VISIBLE={id:"ai.inline.completion.visible"},e.AI_INLINE_COMPLETION_REPORTER={id:"ai.inline.completion.reporter"},e.AI_CHAT_VISIBLE={id:"ai.chat.visible"}},38070:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MergeConflictReportService=void 0;const n=t(85608),l=t(76003),o=t(43718),u=t(70650);let p=class extends o.Disposable{constructor(){super(...arguments),this.reportInfoMap=new Map,this.unique2RelationMap=new Map}record(E,_){if(!this.aiNativeConfigService.capabilities.supportsConflictResolve)return _;let f="";return this.unique2RelationMap.has(E)?(f=this.unique2RelationMap.get(E),this.aiReporter.record(_,f)):(f=this.aiReporter.record(Object.assign(Object.assign({},_),{msgType:o.AISerivceType.MergeConflict,message:o.AISerivceType.MergeConflict,editorMode:_.editorMode||o.MergeConflictEditorMode.traditional})).relationId,this.unique2RelationMap.set(E,f)),Object.assign(Object.assign({},_),{relationId:f})}report(E,_){if(!this.aiNativeConfigService.capabilities.supportsConflictResolve)return;const f=this.record(E,_);this.aiReporter.end(f.relationId,f)}reportIncrementNum(E,_){if(!this.aiNativeConfigService.capabilities.supportsConflictResolve)return;const f=this.unique2RelationMap.get(E);if(!f)return;const m=this.aiReporter.getCacheReportInfo(f)[_]||0;this.report(E,{[_]:m+1})}dispose(){super.dispose(),this.reportInfoMap.clear()}};n.__decorate([(0,l.Autowired)(u.AINativeConfigService),n.__metadata("design:type",u.AINativeConfigService)],p.prototype,"aiNativeConfigService",void 0),n.__decorate([(0,l.Autowired)(o.IAIReporter),n.__metadata("design:type",Object)],p.prototype,"aiReporter",void 0),p=n.__decorate([(0,l.Injectable)()],p),e.MergeConflictReportService=p},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),l=t(76003),o=t(43718);class u extends o.BasicEvent{}e.ClientAppStateEvent=u;let p=class{constructor(){this._state="init",this.deferred={}}get state(){return this._state}set state(E){E!==this._state&&(this._state=E,this.deferred[E]===void 0&&(this.deferred[E]=new o.Deferred),this.deferred[E].resolve(),this.eventBus.fire(new u(E)))}reachedState(E){return this.deferred[E]===void 0&&(this.deferred[E]=new o.Deferred),this.deferred[E].promise}reachedAnyState(...E){return Promise.race(E.map(_=>this.reachedState(_)))}};n.__decorate([(0,l.Autowired)(o.IEventBus),n.__metadata("design:type",Object)],p.prototype,"eventBus",void 0),p=n.__decorate([(0,l.Injectable)()],p),e.ClientAppStateService=p},59555:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ApplicationService=void 0;const n=t(85608),l=t(76003),o=t(59019),u=t(43718),p=t(11050),h=t(42101);let E=class{constructor(){this._initialized=new u.Deferred}async initializeData(){this._backendOS=await this.commonServer.getBackendOS(),this._initialized.resolve()}get frontendOS(){return u.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?h.electronEnv.currentWindowId:this.injector.get(o.WSChannelHandler).clientId}};n.__decorate([(0,l.Autowired)(u.CommonServerPath),n.__metadata("design:type",Object)],E.prototype,"commonServer",void 0),n.__decorate([(0,l.Autowired)(p.AppConfig),n.__metadata("design:type",Object)],E.prototype,"appConfig",void 0),n.__decorate([(0,l.Autowired)(l.INJECTOR_TOKEN),n.__metadata("design:type",l.Injector)],E.prototype,"injector",void 0),E=n.__decorate([(0,l.Injectable)()],E),e.ApplicationService=E},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)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CONNECTION_HELPER_TOKEN=e.BaseConnectionHelper=void 0;class t{}e.BaseConnectionHelper=t,e.CONNECTION_HELPER_TOKEN=Symbol("CONNECTION_HELPER_TOKEN")},41320:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BrowserRuntime=void 0;const n=t(85608),l=t(76003),o=t(38578),u=t(44142),p=t(6858),h=t(53206);let E=class{constructor(){this.runtimeName=u.ESupportRuntime.Web}registerRuntimeModuleProviders(f,m){m.webProviders&&f.addProviders(...m.webProviders)}registerRuntimeInnerProviders(f){(0,h.injectBrowserInnerProviders)(f)}mergeAppConfig(f){return f}async provideResourceUri(f){switch(f){case p.EKnownResources.OnigWasm:return this.appConfig.onigWasmUri||u.onigWasmCDNUri;case p.EKnownResources.TreeSitterWasmDirectory:return this.appConfig.treeSitterWasmDirectoryUri||u.treeSitterWasmCDNUri;default:throw new Error(`Unknown resource: ${f}`)}}};n.__decorate([(0,l.Autowired)(o.AppConfig),n.__metadata("design:type",Object)],E.prototype,"appConfig",void 0),E=n.__decorate([(0,l.Injectable)()],E),e.BrowserRuntime=E},53206:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.injectBrowserInnerProviders=void 0;const n=t(93899),l=t(97222);function o(u){u.addProviders({token:n.ICtxMenuRenderer,useClass:l.BrowserCtxMenuRenderer})}e.injectBrowserInnerProviders=o},55267:(x,e,t)=>{"use strict";var n;Object.defineProperty(e,"__esModule",{value:!0}),e.WebConnectionHelper=void 0;const l=t(85608),o=t(76003),u=t(91493),p=t(43718),h=t(22914);let E=n=class extends h.BaseConnectionHelper{constructor(f){super(),this.options=f,this.clientId=n.clientIdFactory()}getDefaultClientId(){return this.clientId}createConnection(){return u.ReconnectingWebSocketConnection.forURL(this.options.connectionPath,this.options.connectionProtocols)}static clientIdFactory(){return`CLIENT_ID_${(0,p.uuid)()}`}};E=n=l.__decorate([(0,o.Injectable)({multiple:!0}),l.__metadata("design:paramtypes",[Object])],E),e.WebConnectionHelper=E},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||(e.ESupportRuntime={})),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),l=t(76003),o=t(38578),u=t(42101),p=t(44142),h=t(6858),E=t(38892);let _=class{constructor(){this.runtimeName=p.ESupportRuntime.Electron}registerRuntimeModuleProviders(d,s){s.electronProviders&&d.addProviders(...s.electronProviders)}registerRuntimeInnerProviders(d){(0,E.injectElectronInnerProviders)(d)}mergeAppConfig(d){return f(d)}async provideResourceUri(d){switch(d){case h.EKnownResources.OnigWasm:return u.electronEnv.onigWasmUri||this.appConfig.onigWasmUri||p.onigWasmCDNUri;case h.EKnownResources.TreeSitterWasmDirectory:return u.electronEnv.treeSitterWasmDirectoryUri||this.appConfig.treeSitterWasmDirectoryUri||p.treeSitterWasmCDNUri;default:throw new Error(`Unknown resource: ${d}`)}}};n.__decorate([(0,l.Autowired)(o.AppConfig),n.__metadata("design:type",Object)],_.prototype,"appConfig",void 0),_=n.__decorate([(0,l.Injectable)()],_),e.ElectronRendererRuntime=_;function f(m){var d;const s=(d=u.electronEnv.metadata)!==null&&d!==void 0?d:{},a=Object.assign(Object.assign({},m),{appRoot:m.appRoot||u.electronEnv.appPath,extensionDir:m.extensionDir||s.extensionDir});return s.extensionDevelopmentHost&&(m.extensionDevelopmentHost=s.extensionDevelopmentHost),s.extensionCandidate&&(m.extensionCandidate=(m.extensionCandidate||[]).concat(u.electronEnv.metadata.extensionCandidate||[])),a}},38892:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.injectElectronInnerProviders=void 0;const n=t(43718),l=t(37406),o=t(93899),u=t(27790),p=t(11050),h=t(42101);function E(_){const f=_.get(p.AppConfig);_.addProviders({token:n.IElectronMainMenuService,useValue:(0,h.createElectronMainApi)(n.IElectronMainMenuService,f.devtools)},{token:l.IElectronMainUIService,useValue:(0,h.createElectronMainApi)(l.IElectronMainUIService,f.devtools)},{token:l.IElectronMainLifeCycleService,useValue:(0,h.createElectronMainApi)(l.IElectronMainLifeCycleService,f.devtools)},{token:l.IElectronURLService,useValue:(0,h.createElectronMainApi)(l.IElectronURLService,f.devtools)},{token:u.IElectronMenuFactory,useClass:u.ElectronMenuFactory},{token:u.IElectronMenuBarService,useClass:u.ElectronMenuBarService},{token:o.ICtxMenuRenderer,useClass:u.ElectronCtxMenuRenderer})}e.injectElectronInnerProviders=E},63977:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ElectronConnectionHelper=void 0;const n=t(85608),l=t(76003),o=t(42101),u=t(22914);let p=class extends u.BaseConnectionHelper{getDefaultClientId(){return o.electronEnv.metadata.windowClientId}createConnection(){return(0,o.createNetSocketConnection)()}};p=n.__decorate([(0,l.Injectable)({multiple:!0})],p),e.ElectronConnectionHelper=p},18379:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});const n=t(85608);n.__exportStar(t(55267),e),n.__exportStar(t(63977),e),n.__exportStar(t(44142),e)},6858:(x,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IRendererRuntime=e.EKnownResources=void 0;var t;(function(n){n.OnigWasm="wasm:onig",n.TreeSitterWasmDirectory="wasm:tree-sitter"})(t=e.EKnownResources||(e.EKnownResources={})),e.IRendererRuntime=Symbol("IRendererRuntime")},37638:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AuthenticationContribution=void 0;const n=t(85608),l=t(76003),o=t(43718),u=t(66549);let p=class{onStart(){this.authenticationService.initialize()}registerCommands(E){E.registerCommand({id:o.noAccountsId,label:"%authentication.noAccounts%"},{execute:()=>{}})}};n.__decorate([(0,l.Autowired)(o.IAuthenticationService),n.__metadata("design:type",Object)],p.prototype,"authenticationService",void 0),p=n.__decorate([(0,o.Domain)(u.ClientAppContribution,o.CommandContribution)],p),e.AuthenticationContribution=p},10605:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AuthenticationService=void 0;const n=t(85608),l=t(76003),o=t(43718),u=t(93899);let p=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 E=new Map;this.onDidChangeSessions(async _=>{if(_.event.added.length>0){const f=await this.getSessions(_.providerId);f.forEach(m=>{if(f.find(S=>E.get(S.id)))return;const d=new o.DisposableCollection,s=`account-sign-out-${_.providerId}-${m.id}`,a=this.commands.registerCommand({id:s,label:(0,o.formatLocalize)("authentication.signOut",_.label)},{execute:async()=>{await this.signOutOfAccount(_.providerId,m.account.label)}}),r=`manage-trusted-${_.providerId}-${m.id}`,c=this.commands.registerCommand({id:r,label:"%authentication.manageTrustedExtensions%"},{execute:async()=>{await this.manageTrustedExtensionsForAccount(_.providerId,m.account.label)}}),g=`${_.providerId}${m.account.label}`,v=this.menus.registerMenuItem(u.MenuId.AccountsContext,{submenu:g,label:`${m.account.label} (${_.label})`}),b=this.menus.registerMenuItems(g,[{command:r},{command:s}]);d.push(v),d.push(b),d.push(a),d.push(c),E.set(m.id,d)})}_.event.removed.length>0&&_.event.removed.forEach(f=>{const m=E.get(f.id);m&&(m.dispose(),E.delete(f.id))})})}get storage(){return this._storage}registerAuthenticationProvider(E,_){this._authenticationProviders.set(E,_),this._onDidRegisterAuthenticationProvider.fire({id:E,label:_.label}),this.updateAccountsMenuItem()}async sessionsUpdate(E,_){const f=this._authenticationProviders.get(E);f&&(this._onDidChangeSessions.fire({providerId:E,label:f.label,event:_}),await f.updateSessionItems(_),this.updateAccountsMenuItem(),_.added&&await this.updateNewSessionRequests(f))}async updateNewSessionRequests(E){const _=this._signInRequestItems.get(E.id);if(!_)return;const f=await E.getSessions();Object.keys(_).forEach(m=>{if(f.some(d=>d.scopes.slice().sort().join("")===m)){const d=_[m];d&&d.disposables.forEach(s=>s.dispose()),delete _[m],Object.keys(_).length===0?this._signInRequestItems.delete(E.id):this._signInRequestItems.set(E.id,_)}})}getTrustedKey(E,_){return`trusted-${E}-${_}`}async getAllowedExtensions(E,_){const f=this.getTrustedKey(E,_);let m=[];try{const d=await this.storage.get(f);d&&(m=JSON.parse(d))}catch(d){this.logger.warn("read allow extensions error: "+d)}return m}async setAllowedExtensions(E,_,f){const m=this.getTrustedKey(E,_);await this.storage.set(m,JSON.stringify(f))}async removeAllowedExtensions(E,_){const f=this.getTrustedKey(E,_);await this.storage.delete(f)}async updatedAllowedExtension(E,_,f,m,d){const s=await this.getAllowedExtensions(E,_),a=s.findIndex(r=>r.id===f);a===-1?s.push({id:f,name:m,allowed:d}):s[a].allowed=d,await this.setAllowedExtensions(E,_,s)}async isAccessAllowed(E,_,f){const d=(await this.getAllowedExtensions(E,_)).find(s=>s.id===f);return d?d.allowed!==void 0?d.allowed:!0:!1}async tryActivateProvider(E){await this.eventBus.fireAndAwait(new o.ExtensionActivateEvent({topic:"onView",data:E}));let _=this._authenticationProviders.get(E);if(_)return _;const f=new Promise((d,s)=>{this.onDidRegisterAuthenticationProvider(a=>{if(a.id===E)if(_=this._authenticationProviders.get(E),_)d(_);else throw new Error(`No authentication provider '${E}' is currently registered.`)})}),m=new Promise((d,s)=>{setTimeout(()=>{s(new Error(`didRegister ${E} timeout`))},5e3)});return Promise.race([f,m])}async getSessions(E){try{return await(this._authenticationProviders.get(E)||await this.tryActivateProvider(E)).getSessions()}catch{throw new Error(`No authentication provider '${E}' is currently registered.`)}}isAuthenticationProviderRegistered(E){return this._authenticationProviders.has(E)}getProviderIds(){const E=[];return this._authenticationProviders.forEach(_=>{E.push(_.id)}),E}unregisterAuthenticationProvider(E){const _=this._authenticationProviders.get(E);_&&(_.dispose(),this._authenticationProviders.delete(E),this._onDidUnregisterAuthenticationProvider.fire({id:E,label:_.label}),this.updateAccountsMenuItem())}updateAccountsMenuItem(){let E=!1;this._authenticationProviders.forEach(_=>{E=E||_.hasSessions()}),E&&this._noAccountsMenuItem&&(this._noAccountsMenuItem.dispose(),this._noAccountsMenuItem=void 0),!E&&!this._noAccountsMenuItem&&(this._noAccountsMenuItem=this.menus.registerMenuItem(u.MenuId.AccountsContext,{group:"0_accounts",command:o.noAccountsId}))}async requestNewSession(E,_,f,m){let d=this._authenticationProviders.get(E);if(d||await new Promise((s,a)=>{this.onDidRegisterAuthenticationProvider(r=>{r.id===E&&(d=this._authenticationProviders.get(E),s())})}),d){const s=this._signInRequestItems.get(E),a=_.sort().join("");if(s&&s[a]&&s[a].requestingExtensionIds.includes(f))return;const c=this.commands.registerCommand({id:`${f}signIn`,label:(0,o.formatLocalize)("authentication.signInRequests",m)},{execute:async()=>{const v=await this.login(E,_),b=v.account.label,S=await this.getAllowedExtensions(E,b);S.find(y=>y.id===f)||(S.push({id:f,name:m}),await this.setAllowedExtensions(E,b,S)),await this.setExtensionSessionId(m,E,v.id)}}),g=this.menus.registerMenuItem(u.MenuId.AccountsContext,{group:"2_signInRequests",command:`${f}signIn`});if(s){const v=s[a]||{disposables:[],requestingExtensionIds:[]};s[a]={disposables:[...v.disposables,g,c],requestingExtensionIds:[...v.requestingExtensionIds,f]},this._signInRequestItems.set(E,s)}else this._signInRequestItems.set(E,{[a]:{disposables:[g,c],requestingExtensionIds:[f]}})}}getLabel(E){const _=this._authenticationProviders.get(E);if(_)return _.label;throw new Error(`No authentication provider '${E}' has been declared.`)}supportsMultipleAccounts(E){const _=this._authenticationProviders.get(E);if(_)return _.supportsMultipleAccounts;throw new Error(`No authentication provider '${E}' is currently registered.`)}async login(E,_){try{return await(this._authenticationProviders.get(E)||await this.tryActivateProvider(E)).login(_)}catch(f){throw new Error(`No authentication provider '${E}' is currently registered, error messge: ${f.message}`)}}logout(E,_){const f=this._authenticationProviders.get(E);if(f)return f.logout(_);throw new Error(`No authentication provider '${E}' is currently registered.`)}manageTrustedExtensionsForAccount(E,_){const f=this._authenticationProviders.get(E);if(f)return f.manageTrustedExtensions(_);throw new Error(`No authentication provider '${E}' is currently registered.`)}signOutOfAccount(E,_){const f=this._authenticationProviders.get(E);if(f)return f.signOut(_);throw new Error(`No authentication provider '${E}' is currently registered.`)}getUsagesKey(E,_){return`usages-${E}-${_}`}async getAccountUsages(E,_){const f=this.getUsagesKey(E,_),m=await this.storage.get(f);let d=[];if(m)try{d=JSON.parse(m)}catch(s){this.logger.warn("parse account usages error: "+s)}return d}async addAccountUsage(E,_,f,m){const d=this.getUsagesKey(E,_),s=await this.getAccountUsages(E,_),a=s.findIndex(r=>r.extensionId===f);a>-1?s.splice(a,1,{extensionId:f,extensionName:m,lastUsed:Date.now()}):s.push({extensionId:f,extensionName:m,lastUsed:Date.now()}),await this.storage.set(d,JSON.stringify(s))}async removeAccountUsage(E,_){const f=this.getUsagesKey(E,_);await this.storage.delete(f)}getExtensionSessionIdKey(E,_){return`session-${E}-${_}`}async getExtensionSessionId(E,_){const f=this.getExtensionSessionIdKey(E,_);return await this.storage.get(f)}async setExtensionSessionId(E,_,f){const m=this.getExtensionSessionIdKey(E,_);await this.storage.set(m,f)}async removeExtensionSessionId(E,_){const f=this.getExtensionSessionIdKey(E,_);await this.storage.delete(f)}};n.__decorate([(0,l.Autowired)(o.ILogger),n.__metadata("design:type",Object)],p.prototype,"logger",void 0),n.__decorate([(0,l.Autowired)(o.StorageProvider),n.__metadata("design:type",Function)],p.prototype,"getStorage",void 0),n.__decorate([(0,l.Autowired)(o.IEventBus),n.__metadata("design:type",Object)],p.prototype,"eventBus",void 0),n.__decorate([(0,l.Autowired)(u.IMenuRegistry),n.__metadata("design:type",u.IMenuRegistry)],p.prototype,"menus",void 0),n.__decorate([(0,l.Autowired)(o.CommandRegistry),n.__metadata("design:type",Object)],p.prototype,"commands",void 0),p=n.__decorate([(0,l.Injectable)()],p),e.AuthenticationService=p},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;const l=t(85608);t(29810);const o=t(76003),u=t(18740),p=t(43718),h=t(4588),E=t(37406),_=t(16884),f=t(18379),m=t(22914),d=t(41320),s=t(59574),a=t(6858),r=t(36206),c=t(66963),g=t(18193),v=t(41118),b=t(1149),S=t(11949),y=t(64102),A=t(78132),T=t(11050),D=t(67304),w=t(79951),I=t(79248),O=t(96302),M=t(71843);t(99696);class R{constructor(L){var N,B,k;this.opts=L,this.appInitialized=new p.Deferred,this.browserModules=[],this._disposables=new p.DisposableCollection,this._inComposition=!1,this._handleBeforeUpload=re=>{if(this.config.isElectronRenderer){if(this.stateService.state==="electron_confirmed_close")return;re.returnValue="",re.preventDefault(),this.stateService.state!=="electron_asking_close"&&(this.stateService.state="electron_asking_close",this.preventStopElectron().then(se=>{if(se)this.stateService.state="ready";else return this.stopContributionsElectron().then(()=>{this.stateService.state="electron_confirmed_close";const le=this.injector.get(E.IElectronMainLifeCycleService);setTimeout(()=>{le.closeWindow(w.electronEnv.currentWindowId)},0)})}))}else if(this.preventStop())return(re||window.event).returnValue=!0,!0},this._handleUnload=()=>{this.stateService.state="closing_window",this.config.isElectronRenderer||(this.disposeSideEffect(),this.stopContributions())},this._handleResize=()=>{},this._handleKeydown=re=>{re&&re.target.name!==v.NO_KEYBINDING_NAME&&!this._inComposition&&this.keybindingService.run(re)},this._handleKeyup=re=>{this.keybindingService.resolveModifierKey(re)},this._handleCompositionstart=()=>{this._inComposition=!0},this._handleCompositionend=()=>{this._inComposition=!1},this._handleWheel=()=>{};const{modules:F,connectionPath:W,iconStyleSheets:j,useCdnIcon:H,editorBackgroundImage:K,defaultPreferences:G,allowSetDocumentTitleFollowWorkspaceDir:V=!0}=L,z=l.__rest(L,["modules","connectionPath","iconStyleSheets","useCdnIcon","editorBackgroundImage","defaultPreferences","allowSetDocumentTitleFollowWorkspaceDir"]);this.initEarlyPreference(L.workspaceDir||"");const U=(0,A.getPreferenceLanguageId)(G);(0,p.setLanguageId)(U),this.injector=L.injector||new o.Injector,this.modules=F,this.modules.forEach(re=>this.resolveModuleDeps(re)),this.browserModules=L.modulesInstances||[];const $=(N=L.isElectronRenderer)!==null&&N!==void 0?N:this.detectRuntime()===f.ESupportRuntime.Electron;this.config=Object.assign(Object.assign({appName:h.DEFAULT_APPLICATION_NAME,appHost:$?h.DEFAULT_APPLICATION_DESKTOP_HOST:h.DEFAULT_APPLICATION_WEB_HOST,appRoot:L.appRoot||"",uriScheme:h.DEFAULT_URI_SCHEME},z),{isElectronRenderer:$,workspaceDir:L.workspaceDir||"",extensionDir:L.extensionDir||"",injector:this.injector,wsPath:L.wsPath||`ws://${window.location.hostname}:8000`,layoutConfig:L.layoutConfig,editorBackgroundImage:L.editorBackgroundImage||K,allowSetDocumentTitleFollowWorkspaceDir:V,devtools:(B=L.devtools)!==null&&B!==void 0?B:!1,rpcMessageTimeout:L.rpcMessageTimeout||-1});const Q=this.injector.get(b.LayoutViewSizeConfig);Q.init(L.layoutViewSize),this.config.layoutViewSize=Q,this.injector.get(b.DesignLayoutConfig).setLayout(L.designLayout,(k=L.AINativeConfig)===null||k===void 0?void 0:k.layout),this.injector.addProviders({token:r.IClientApp,useValue:this}),this.injector.addProviders({token:T.AppConfig,useValue:this.config}),this.runtime=$?this.injector.get(s.ElectronRendererRuntime):this.injector.get(d.BrowserRuntime),this.injector.addProviders({token:a.IRendererRuntime,useValue:this.runtime}),this.config.devtools&&(window.__OPENSUMI_DEVTOOLS_GLOBAL_HOOK__={}),L.extensionDevelopmentPath&&(this.config.extensionCandidate=(this.config.extensionCandidate||[]).concat(Array.isArray(L.extensionDevelopmentPath)?L.extensionDevelopmentPath.map(re=>(0,p.asExtensionCandidate)(re,!0)):[(0,p.asExtensionCandidate)(L.extensionDevelopmentPath,!0)]),this.config.extensionDevelopmentHost=!0),this.config=this.runtime.mergeAppConfig(this.config),this.connectionPath=W||`${this.config.wsPath}/service`,this.initBaseProvider(),this.initFields(),this.appendIconStyleSheets(j,H),this.createBrowserModules(G)}resolveModuleDeps(L){const N=Reflect.getMetadata("dependencies",L);N&&N.forEach(B=>{this.modules.indexOf(B)===-1&&this.modules.push(B)})}get lifeCycleService(){return this.injector.get(p.AppLifeCycleServiceToken)}async start(L,N,B){const F=this.injector.get(p.IReporterService).time(p.REPORT_NAME.MEASURE);this.lifeCycleService.phase=1,B?(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,O.bindConnectionServiceDeprecated)(this.injector,this.modules,B)):N&&await this.createConnection(N),F.timeEnd("ClientApp.createConnection"),this.logger=this.getLogger(),this.stateService.state="client_connected",this.registerEventListeners(),await this.injector.get(p.IApplicationService).initializeData(),await this.measure("Contributions.start",()=>this.startContributions(L)),this.stateService.state="started_contributions",this.stateService.state="ready",this.lifeCycleService.phase=4,F.timeEnd("Framework.ready")}async createConnection(L){var N;let B;switch(L){case f.ESupportRuntime.Electron:B=this.injector.get(f.ElectronConnectionHelper);break;case f.ESupportRuntime.Web:B=this.injector.get(f.WebConnectionHelper,[{connectionPath:this.connectionPath,connectionProtocols:this.opts.connectionProtocols}]);break;default:throw new Error(`Unknown backend type: ${L}`)}this.injector.addProviders({token:m.CONNECTION_HELPER_TOKEN,useValue:B});const k=B.createConnection(),F=(N=this.config.clientId)!==null&&N!==void 0?N:B.getDefaultClientId();await(0,O.createConnectionService)(this.injector,this.modules,()=>{this.onReconnectContributions()},k,F),this.logger=this.getLogger(),this.injector.get(u.WSChannelHandler).replaceLogger(this.logger)}getLogger(){return this.logger?this.logger:(this.logger=this.injector.get(p.ILoggerManagerClient).getLogger(p.SupportLogNamespace.Browser),this.logger)}onReconnectContributions(){const L=this.contributions;for(const N of L)N.onReconnect&&N.onReconnect(this)}initBaseProvider(){(0,M.injectInnerProviders)(this.injector),this.runtime.registerRuntimeInnerProviders(this.injector)}initFields(){this.contributionsProvider=this.injector.get(c.ClientAppContribution),this.commandRegistry=this.injector.get(p.CommandRegistry),this.keybindingRegistry=this.injector.get(v.KeybindingRegistry),this.keybindingService=this.injector.get(v.KeybindingService),this.stateService=this.injector.get(_.ClientAppStateService),this.nextMenuRegistry=this.injector.get(y.IMenuRegistry)}createBrowserModules(L){const N=this.injector;for(const B of this.modules){const k=N.get(B);this.browserModules.push(k),k.providers&&this.injector.addProviders(...k.providers),this.runtime.registerRuntimeModuleProviders(this.injector,k),k.preferences&&k.preferences(this.injector)}(0,g.injectCorePreferences)(this.injector),this.injectPreferenceService(this.injector,L),this.injectStorageProvider(this.injector);for(const B of this.browserModules)if(B.contributionProvider)if(Array.isArray(B.contributionProvider))for(const k of B.contributionProvider)(0,p.createContributionProvider)(this.injector,k);else(0,p.createContributionProvider)(this.injector,B.contributionProvider)}get contributions(){return this.contributionsProvider.getContributions()}async startContributions(L){await this.measure("RenderApp.render",()=>this.renderApp(L)),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(L,N){return await Promise.all(L.map(B=>this.contributionPhaseRunner(B,N)))}async contributionPhaseRunner(L,N){const B=L[N];if(typeof B=="function")try{const k=L.constructor.name+"."+N;return await this.measure(k,()=>B.call(L,this))}catch(k){this.logger.error(`Could not run contribution#${N}`,k)}}async renderApp(L){await(0,I.renderClientApp)(this,L),this.injector.get(p.IEventBus).fire(new S.RenderedEvent)}async measure(L,N){const k=this.injector.get(p.IReporterService).time(p.REPORT_NAME.MEASURE),F=await N();return k.timeEnd(L),F}preventStop(){const N=this.injector.get(g.CorePreferences)["application.confirmExit"];if(N==="never")return!1;for(const B of this.contributions)if(B.onWillStop)try{if(B.onWillStop(this))return!0}catch(k){(0,p.getDebugLogger)().error(k)}return N==="always"}async preventStopElectron(){if(this.injector.get(g.CorePreferences)["application.confirmExit"]==="never")return!1;for(const B of this.contributions)if(B.onWillStop)try{if(await B.onWillStop(this))return!0}catch(k){(0,p.getDebugLogger)().error(k)}return!1}stopContributions(){for(const L of this.contributions)if(L.onStop)try{L.onStop(this)}catch(N){this.logger.error("Could not stop contribution",N)}}async stopContributionsElectron(){const L=[];for(const N of this.contributions)N.onStop&&L.push((async()=>{try{await N.onStop(this)}catch(B){this.logger.error("Could not stop contribution",B)}})());await Promise.all(L)}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),p.isOSX&&document.body.addEventListener("wheel",this._handleWheel,{passive:!1})}injectPreferenceService(L,N){const B=()=>k=>{const F=L.get(A.PreferenceProvider,{tag:k});return F.asScope(k),F};if((0,A.injectPreferenceConfigurations)(L),(0,A.injectPreferenceSchemaProvider)(L),L.addProviders({token:A.PreferenceProviderProvider,useFactory:B},{token:A.PreferenceService,useClass:A.PreferenceServiceImpl}),N){const F=L.get(A.PreferenceProviderProvider)(A.PreferenceScope.Default);for(const W of Object.keys(N))F.setPreference(W,N[W])}}injectStorageProvider(L){L.addProviders({token:p.DefaultStorageProvider,useClass:p.DefaultStorageProvider}),L.addProviders({token:p.StorageProvider,useFactory:()=>N=>L.get(p.DefaultStorageProvider).get(N)}),(0,p.createContributionProvider)(L,p.StorageResolverContribution)}fireOnReload(L=!1){window.location.reload(L)}appendIconStyleSheets(L,N){const B=N?[D.DEFAULT_CDN_ICON,D.IDE_OCTICONS_CN_CSS,D.IDE_CODICONS_CN_CSS]:[];L&&L.length&&L.forEach(k=>{this.updateIconMap(k.prefix,k.iconMap),B.push(k.cssPath)});for(const k of B){const F=document.createElement("link");F.setAttribute("rel","stylesheet"),F.setAttribute("href",k),document.getElementsByTagName("head")[0].appendChild(F)}}updateIconMap(L,N){L==="kaitian-icon kticon-"&&this.logger.error(`The icon prefix '${L}' conflicts with the built-in icon, please check the icon configuration.`),(0,D.updateIconMap)(L,N)}initEarlyPreference(L){this._disposables.push((0,A.registerLocalStorageProvider)("general.theme",L)),this._disposables.push((0,A.registerLocalStorageProvider)("general.icon",L)),this._disposables.push((0,A.registerLocalStorageProvider)("general.language",L))}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),p.isOSX&&document.body.removeEventListener("wheel",this._handleWheel),this._disposables.dispose(),this.disposeSideEffect()}disposeSideEffect(){for(const L of this.contributions)if(L.onDisposeSideEffects)try{L.onDisposeSideEffects(this)}catch(N){this.logger.error("Could not dispose contribution",N)}}detectRuntime(){return window.isElectronRenderer||typeof navigator=="object"&&typeof navigator.userAgent=="string"&&navigator.userAgent.indexOf("Electron")>=0?f.ESupportRuntime.Electron:f.ESupportRuntime.Web}}e.j=R},79248:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.renderClientApp=e.App=void 0;const n=t(85608),l=n.__importDefault(t(14041)),o=n.__importDefault(t(25873)),u=t(97267),p=t(43718),h=t(28003),E=t(68456),_=t(11050),f=t(52564),m=t(26542),d=t(67304);function s(c){const g=c.app.injector,v=g.get(p.IEventBus),b=g.get(m.LabelService),S=l.default.useCallback((y,A)=>b.getIcon(p.URI.parse(y),A),[]);return l.default.useEffect(()=>{let y;const A=()=>{y&&window.cancelAnimationFrame(y),y=window.requestAnimationFrame(()=>{y=null,f.allSlot.forEach(T=>{v.fire(new E.ResizeEvent({slotLocation:T.slot}))})})};return window.addEventListener("resize",A),()=>{window.removeEventListener("resize",A)}},[]),l.default.createElement(u.ComponentContextProvider,{value:{getIcon:d.getIcon,localize:p.localize,getResourceIcon:S}},l.default.createElement(_.ConfigProvider,{value:c.app.config},l.default.createElement(c.main,{callback:c.callback}),c.overlays&&c.overlays.map((y,A)=>l.default.createElement(y,{key:A}))))}e.App=s;const a=c=>g=>{o.default.createRoot(c).render(l.default.createElement(g,null))};function r(c,g){const v=c.config.layoutComponent||h.DefaultLayout,b=c.browserModules.filter(A=>A.isOverlay).map(A=>A.component?A.component:((0,p.getDebugLogger)().warn("Overlay module does not have component",A),()=>l.default.createElement(l.default.Fragment,null))),S=A=>l.default.createElement(s,Object.assign({},A,{app:c,main:v,overlays:b}));return(typeof g=="function"?g:a(g))(S)}e.renderClientApp=r},96302:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.bindConnectionServiceDeprecated=e.bindConnectionService=e.createConnectionService=void 0;const n=t(8919),l=t(18740),o=t(76271),u=t(43718),p=t(16884),h=(0,u.getDebugLogger)();async function E(d,s,a,r,c){const g=d.get(u.IReporterService),v=d.get(u.IEventBus),b=d.get(p.ClientAppStateService),S=new l.WSChannelHandler(r,h,c);S.setReporter(g);const y=()=>{b.reachedState("core_module_initialized").then(()=>{v.fire(new u.BrowserConnectionOpenEvent)})};S.connection.isOpen()&&y(),S.connection.onOpen(()=>{y()}),S.connection.onClose(()=>{b.reachedState("core_module_initialized").then(()=>{v.fire(new u.BrowserConnectionCloseEvent)})}),S.connection.onError(T=>{b.reachedState("core_module_initialized").then(()=>{v.fire(new u.BrowserConnectionErrorEvent(T))})}),await S.initHandler(),d.addProviders({token:l.WSChannelHandler,useValue:S});const A=await S.openChannel(o.RPCServiceChannelPath);A.onReopen(()=>a()),_(d,s,A)}e.createConnectionService=E;function _(d,s,a){const r=new n.RPCServiceCenter,c=r.setSumiConnection(a.createSumiConnection());return m(d,s,r),c}e.bindConnectionService=_;function f(d,s,a){const r=new n.RPCServiceCenter,c=r.setConnection(a),g=a.onClose(()=>{c.dispose(),g.dispose()});m(d,s,r)}e.bindConnectionServiceDeprecated=f;function m(d,s,a){const{getRPCService:r}=(0,n.initRPCService)(a),c=[],g=[];for(const v of s){const b=d.get(v);if(b.backServices)for(const S of b.backServices)c.push(S),S.protocol&&a.loadProtocol(S.protocol)}for(const v of c){const{servicePath:b}=v,S=r(b),y={token:b,useValue:S};d.addProviders(y),v.clientToken&&g.push(v)}for(const v of g){const{servicePath:b}=v,S=r(b);if(v.clientToken){const y=d.get(v.clientToken);S.onRequestService(y)}}}},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)},71843:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.injectInnerProviders=void 0;const n=t(43718),l=t(96405),o=t(16872),u=t(41480),p=t(12956),h=t(59555),E=t(10605),_=t(66963),f=t(71707),m=t(80832),d=t(23396),s=t(77273),a=t(41118),r=t(37015),c=t(68456),g=t(75694),v=t(93899),b=t(77666),S=t(90697),y=t(73967),A=t(78132),T=t(68969),D=t(11719),w=t(52564),I=t(26542),O=t(52993),M=t(10845),R=t(40827),P=t(32242),L=t(99e3),N=t(42637),B=t(62652),k=t(27957),F=t(45670),W=t(66894),j=t(63921),H=t(82493);function K(G){(0,n.createContributionProvider)(G,_.ClientAppContribution),(0,n.createContributionProvider)(G,n.CommandContribution),(0,n.createContributionProvider)(G,s.FsProviderContribution),(0,n.createContributionProvider)(G,a.KeybindingContribution),(0,n.createContributionProvider)(G,v.MenuContribution),(0,n.createContributionProvider)(G,c.ComponentContribution),(0,n.createContributionProvider)(G,w.SlotRendererContribution),(0,n.createContributionProvider)(G,A.PreferenceContribution),(0,n.createContributionProvider)(G,F.VariableContribution),(0,n.createContributionProvider)(G,c.TabBarToolbarContribution),(0,n.createContributionProvider)(G,N.ToolBarActionContribution),(0,n.createContributionProvider)(G,P.StaticResourceContribution);const V=[{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:z=>z.get(a.KeybindingRegistry)},{token:o.KeyboardNativeLayoutService,useClass:r.BrowserKeyboardLayoutImpl},{token:o.KeyboardLayoutChangeNotifierService,useFactory:z=>z.get(o.KeyboardNativeLayoutService)},{token:r.KeyValidator,useFactory:z=>z.get(o.KeyboardNativeLayoutService)},p.ClientAppStateService,{token:g.ILogger,useClass:g.Logger},{token:c.ComponentRegistry,useClass:c.ComponentRegistryImpl},{token:F.VariableRegistry,useClass:F.VariableRegistryImpl},{token:v.AbstractMenuService,useClass:v.MenuServiceImpl},{token:v.AbstractContextMenuService,useClass:v.ContextMenuServiceImpl},{token:v.IMenuRegistry,useClass:v.MenuRegistryImpl},{token:b.IToolbarActionService,useClass:b.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:T.IProgressService,useClass:D.ProgressService},{token:N.IToolbarRegistry,useClass:k.NextToolbarRegistryImpl},{token:N.IToolbarPopoverRegistry,useClass:B.ToolbarPopoverRegistry},k.ToolbarClientAppContribution,{token:n.IProblemPatternRegistry,useClass:n.ProblemPatternRegistryImpl},{token:n.IProblemMatcherRegistry,useClass:n.ProblemMatchersRegistryImpl},{token:n.ITaskDefinitionRegistry,useClass:n.TaskDefinitionRegistryImpl},{token:S.IOpenerService,useClass:y.OpenerService},{token:W.IWindowService,useClass:j.WindowService},{token:n.IApplicationService,useClass:h.ApplicationService},{token:O.IClipboardService,useClass:O.BrowserClipboardService},{token:M.IExternalUriService,useClass:M.ExternalUriService},{token:n.IAuthenticationService,useClass:E.AuthenticationService},{token:I.ICryptoService,useClass:I.CryptoService},{token:I.ICredentialsService,useClass:I.CredentialsService},{token:l.IHashCalculateService,useClass:l.HashCalculateServiceImpl},{token:n.IExtensionsSchemaService,useClass:d.ExtensionsPointServiceImpl},{token:n.AppLifeCycleServiceToken,useClass:H.AppLifeCycleService},{token:P.StaticResourceService,useClass:L.StaticResourceServiceImpl},R.StaticResourceClientAppContribution,{token:f.ISplitPanelService,useClass:f.SplitPanelService},{token:n.IAIReporter,useClass:u.AIReporter},{token:m.IDesignStyleService,useClass:m.DesignStyleService}];G.addProviders(...V)}e.injectInnerProviders=K},82493:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AppLifeCycleService=void 0;const n=t(85608),l=t(76003),o=t(43718);let u=class{constructor(){this.onDidChangeLifecyclePhaseEmitter=new o.Emitter,this.onDidLifeCyclePhaseChange=this.onDidChangeLifecyclePhaseEmitter.event}set phase(h){this.lifeCyclePhase=h,this.onDidChangeLifecyclePhaseEmitter.fire(this.lifeCyclePhase)}get phase(){return this.lifeCyclePhase}};u=n.__decorate([(0,l.Injectable)()],u),e.AppLifeCycleService=u},99696:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});const l=t(85608).__importDefault(t(99126));typeof window.ResizeObserver>"u"&&(window.ResizeObserver=l.default)},36206:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BrowserModule=e.IClientApp=void 0;const n=t(85608),l=t(76003),o=t(43718);e.IClientApp=Symbol("CLIENT_APP_TOKEN");class u extends o.BasicModule{}n.__decorate([(0,l.Autowired)(e.IClientApp),n.__metadata("design:type",Object)],u.prototype,"app",void 0),e.BrowserModule=u},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 l;(function(b){const S="file";b.NEW_FILE={id:"file.new",category:S,iconClass:(0,n.getIcon)("new-file")},b.RENAME_FILE={id:"file.rename",category:S},b.DELETE_FILE={id:"file.delete",category:S},b.NEW_FOLDER={id:"file.folder.new",category:S,iconClass:(0,n.getIcon)("new-folder")},b.COMPARE_SELECTED={id:"file.compare",category:S},b.OPEN_FILE={id:"file.open",category:S},b.SAVE_FILE={id:"file.save",category:S},b.COLLAPSE_ALL={id:"filetree.collapse.all",category:S,iconClass:(0,n.getIcon)("collapse-all")},b.REFRESH_ALL={id:"filetree.refresh.all",category:S,iconClass:(0,n.getIcon)("refresh")},b.OPEN_RESOURCES={id:"filetree.open.file",category:S},b.OPEN_TO_THE_SIDE={id:"filetree.open.side",category:S},b.OPEN_TYPE_WITH={id:"filetree.open.with",category:S},b.COPY_PATH={id:"filetree.copy.path",category:S,label:"%file.copy.path%"},b.COPY_RELATIVE_PATH={id:"filetree.copy.relativepath",category:S},b.COPY_FILE={id:"filetree.copy.file",category:S},b.CUT_FILE={id:"filetree.cut.file",category:S},b.PASTE_FILE={id:"filetree.paste.file",category:S},b.SELECT_CURRENT_NODE={id:"filetree.selectCurrentNode",category:S},b.LOCATION={id:"filetree.location",category:S},b.LOCATION_WITH_EDITOR={id:"filetree.location_with_editor",category:S,iconClass:(0,n.getIcon)("focus")},b.OPEN_FOLDER={id:"filetree.open.folder",category:S,label:"%file.open.folder%"},b.VSCODE_OPEN_FOLDER={id:"filetree.open.vscode_open_folder",category:S},b.OPEN_WORKSPACE={id:"filetree.open.workspace",category:S,label:"%file.open.workspace%"},b.SEARCH_ON_FOLDER={id:"filetree.search.folder",category:S},b.FOCUS_FILES={id:"filetree.focus.files",category:S,label:"%file.focus.files%"},b.FILTER_TOGGLE={id:"filetree.files.filter_toggle",category:S,iconClass:(0,n.getIcon)("retrieval")},b.FILTER_OPEN={id:"filetree.files.filter_open",category:S},b.OPEN_TERMINAL_WITH_PATH={id:"filetree.openTerminalWithPath",category:S},b.FILTER_CLOSE={id:"filetree.quitFilterMode",category:S},b.NEXT={id:"filetree.next",category:S},b.PREV={id:"filetree.prev",category:S},b.COLLAPSE={id:"filetree.collapse",category:S},b.EXPAND={id:"filetree.expand",category:S},b.REVEAL_IN_EXPLORER={id:"filetree.revealInExplorer",category:S},b.TOGGLE_OR_OPEN={id:"filetree.toggleOrOpen",category:S}})(l=e.FILE_COMMANDS||(e.FILE_COMMANDS={}));var o;(function(b){const S="openeditors";b.SAVE_ALL={id:"opened.editors.save.all",category:S,iconClass:(0,n.getIcon)("save-all")},b.CLOSE_ALL={id:"opened.editors.close.all",category:S,iconClass:(0,n.getIcon)("close-all")},b.SAVE_BY_GROUP={id:"opened.editors.save.byGroup"},b.CLOSE_BY_GROUP={id:"opened.editors.close.byGroup"},b.OPEN={id:"opened.editors.open",category:S},b.CLOSE={id:"opened.editors.close",category:S},b.OPEN_TO_THE_SIDE={id:"opened.editors.openToTheSide",category:S},b.COMPARE_SELECTED={id:"opened.editors.compare",category:S},b.COPY_RELATIVE_PATH={id:"opened.editors.copyRelativePath",category:S},b.COPY_PATH={id:"opened.editors.copyPath",category:S},b.LOCATION={id:"opened.editors.location",category:S}})(o=e.OPEN_EDITORS_COMMANDS||(e.OPEN_EDITORS_COMMANDS={}));var u;(function(b){b.FIND={id:"core.find",label:"%common.find%"},b.REPLACE={id:"core.replace",label:"%common.replace%"},b.ABOUT_COMMAND={id:"core.about",label:"%common.about%"},b.OPEN_PREFERENCES={id:"core.openpreference",label:"%common.preference.open%"},b.LOCATE_PREFERENCES={id:"workbench.preferences.locate"},b.OPEN_KEYMAPS={id:"core.keymaps.open",label:"%common.keymaps.open%"},b.OPEN_LAUNCH_CONFIGURATION={id:"core.launchConfiguration.open",label:"%debug.action.open.configuration%"},b.ENVIRONMENT_VARIABLE={id:"core.environment.variable"}})(u=e.COMMON_COMMANDS||(e.COMMON_COMMANDS={}));var p;(function(b){const S="editor";b.API_OPEN_EDITOR_COMMAND_ID="_workbench.open",b.API_OPEN_DIFF_EDITOR_COMMAND_ID="_workbench.diff",b.API_OPEN_WITH_EDITOR_COMMAND_ID="_workbench.openWith",b.NEW_UNTITLED_FILE={id:"file.new.untitled",category:S,label:"%file.new%",iconClass:(0,n.getIcon)("new-file")},b.UNDO={id:"editor.undo",category:S,label:"%editor.undo%"},b.REDO={id:"editor.redo",category:S,label:"%editor.redo%"},b.SELECT_ALL={id:"editor.selectAll",category:S,label:"%selection.all%"},b.OPEN_RESOURCE={id:"editor.openUri",category:S},b.OPEN_RESOURCES={id:"editor.openUris",category:S},b.SAVE_URI={id:"editor.saveUri",category:S},b.SAVE_CURRENT={id:"editor.saveCurrent",category:S,label:"%editor.saveCurrent%"},b.FOCUS_IF_NOT_ACTIVATE_ELEMENT={id:"editor.focusIfNotActivateElement",category:S,label:"%editor.saveCurrent%"},b.COMPARE={id:"editor.compare",category:S},b.OPEN_MERGEEDITOR={id:"editor.open.mergeEditor",category:S},b.OPEN_MERGEEDITOR_DEV={id:"editor.open.mergeEditor.dev",category:"Merge Editor (Dev)",label:"Open Merge Editor State from Json"},b.MERGEEDITOR_RESET={id:"editor.mergeEditor.reset",category:S,label:"%mergeEditor.reset%"},b.CLOSE={id:"editor.close",category:S,label:"%editor.closeCurrent%"},b.CLOSE_ALL_IN_GROUP={id:"editor.closeAllInGroup",category:S,label:"%editor.closeAllInGroup%"},b.CLOSE_OTHER_IN_GROUP={id:"editor.closeOtherEditorsInGroup",category:S,label:"%editor.closeOtherEditors%"},b.CLOSE_ALL={id:"editor.closeAll",category:S,label:"%editor.close.all%"},b.CLOSE_SAVED={id:"editor.closeSaved",category:S,label:"%editor.closeSaved%"},b.SAVE_ALL={id:"editor.saveAll",category:S,label:"%editor.saveAll%"},b.CLOSE_TO_RIGHT={id:"editor.closeToRight",category:S,label:"%editor.closeToRight%"},b.GET_CURRENT={id:"editor.getCurrent",category:S},b.GET_CURRENT_RESOURCE={id:"editor.getCurrentResource",category:S},b.SPLIT_TO_LEFT={id:"editor.splitToLeft",category:S,label:"%editor.splitToLeft%"},b.SPLIT_TO_RIGHT={id:"editor.splitToRight",category:S,label:"%editor.splitToRight%",iconClass:(0,n.getIcon)("embed")},b.SPLIT_TO_TOP={id:"editor.splitToTop",category:S,label:"%editor.splitToTop%"},b.SPLIT_TO_BOTTOM={id:"editor.splitToBottom",category:S,label:"%editor.splitToBottom%"},b.CHANGE_LANGUAGE={id:"editor.changeLanguage",category:S},b.CHANGE_ENCODING={id:"editor.changeEncoding",category:S},b.CHANGE_EOL={id:"editor.changeEol",category:S},b.NAVIGATE_LEFT={id:"editor.navigateLeft",category:S},b.NAVIGATE_RIGHT={id:"editor.navigateRight",category:S},b.NAVIGATE_UP={id:"editor.navigateUp",category:S},b.NAVIGATE_DOWN={id:"editor.navigateDown",category:S},b.NAVIGATE_NEXT={id:"editor.navigateNext",category:S},b.NAVIGATE_PREVIOUS={id:"editor.navigatePrevious",category:S},b.PREVIOUS={id:"editor.previous",category:S},b.NEXT={id:"editor.next",category:S},b.PREVIOUS_IN_GROUP={id:"editor.previousInGroup",category:S},b.NEXT_IN_GROUP={id:"editor.nextInGroup",category:S},b.LAST_IN_GROUP={id:"editor.lastInGroup",category:S},b.CLOSE_OTHER_GROUPS={id:"editor.closeOtherGroup",category:S,label:"%editor.closeEditorsInOtherGroups%"},b.OPEN_EDITOR_AT_INDEX={id:"editor.openEditorAtIndex",category:S},b.EVEN_EDITOR_GROUPS={id:"editor.evenEditorGroups",category:S,label:"%editor.resetEditorGroups%"},b.REVERT_DOCUMENT={id:"editor.document.revert",category:S,label:"%editor.revert%"},b.REVERT_AND_CLOSE={id:"editor.revertAndClose",category:S},b.GO_FORWARD={id:"editor.goForward",category:S},b.GO_BACK={id:"editor.goBack",category:S},b.PIN_CURRENT={id:"editor.pinCurrent",category:S},b.COPY_CURRENT_PATH={id:"editor.copyCurrentPath",category:S},b.GO_TO_GROUP={id:"editor.goToGroup",category:S},b.MOVE_GROUP={id:"editor.moveGroup",category:S},b.REOPEN_CLOSED={id:"editor.reopenClosed",category:S},b.FOCUS={id:"editor.focus",category:S},b.TEST_TOKENIZE={id:"editor.tokenize.test",category:S,label:"%editor.tokenize.test%"},b.AUTO_SAVE={id:"editor.autoSave",category:S},b.FOCUS_ACTIVE_EDITOR_GROUP={id:"editor.focusActiveEditorGroup",category:S},b.COMPONENT_UNDO={id:"editor.componentUndo",category:S},b.COMPONENT_REDO={id:"editor.componentRedo"},b.SEARCH_WORKSPACE_SYMBOL={id:"editor.workspaceSymbol.quickopen",label:"%editor.workspaceSymbol.quickopen%",category:S},b.SEARCH_WORKSPACE_SYMBOL_CLASS={id:"editor.workspaceSymbolClass.quickopen",label:"%editor.workspaceSymbolClass.quickopen%",category:S},b.GO_TO_LINE={id:"editor.action.gotoLine",label:"%editor.goToLine%",category:S},b.QUICK_OPEN={id:"workbench.action.quickOpen",category:S,label:"%editor.quickOpen%"},b.TOGGLE_WORD_WRAP={id:"editor.toggleWordWrap",label:"%editor.toggleWordWrap%",category:S},b.FORMAT_DOCUMENT={id:"editor.action.formatDocument",category:S},b.FORMAT_SELECTION={id:"editor.action.formatSelection",category:S},b.FORMAT_DOCUMENT_WITH={id:"editor.action.formatDocument.multiple",category:S,label:"%editor.formatDocument.label.multiple%"},b.FORMAT_SELECTION_WITH={id:"editor.action.formatSelection.multiple",category:S,label:"%editor.formatSelection.label.multiple%"},b.COPY_PATH={id:"editor.action.copyPath",category:S,label:"%editor.copyPath%"},b.COPY_RELATIVE_PATH={id:"editor.action.copyRelativePath",category:S,label:"%editor.copyRelativePath%"}})(p=e.EDITOR_COMMANDS||(e.EDITOR_COMMANDS={}));var h;(function(b){const S="diff-editor";b.REVERT={id:"editor.diff.revert",category:S},b.ACCEPT={id:"editor.diff.accept",category:S},b.TOGGLE_COLLAPSE_UNCHANGED_REGIONS={id:"editor.diff.toggleCollapseUnchangedRegions",category:S}})(h=e.DIFF_EDITOR_COMMANDS||(e.DIFF_EDITOR_COMMANDS={}));var E;(function(b){const S="search";b.OPEN_SEARCH={id:"content-search.openSearch",category:S,label:"Open search sidebar"},b.REFRESH={id:"file-search.refresh",label:"refresh search",iconClass:(0,n.getIcon)("refresh"),category:S},b.CLEAN={id:"file-search.clean",label:"clean search",iconClass:(0,n.getIcon)("clear"),category:S},b.GET_RECENT_SEARCH_WORD={id:"search.getRecentSearchWordCmd",category:S},b.GET_BACK_RECENT_SEARCH_WORD={id:"search.getBackRecentSearchWordCmd",category:S},b.MENU_REPLACE={id:"search.menu.replace",category:S,label:"%search.replace.title%"},b.MENU_REPLACE_ALL={id:"search.menu.replaceAll",category:S,label:"%search.replaceAll.label%"},b.MENU_HIDE={id:"search.menu.hide",category:S,label:"%search.result.hide%"},b.MENU_COPY={id:"search.menu.copy",category:S,label:"%file.copy.file%"},b.MENU_COPY_ALL={id:"search.menu.copyAll",category:S,label:"%search.menu.copyAll%"},b.MENU_COPY_PATH={id:"search.menu.copyPath",category:S,label:"%file.copy.path%"},b.REPLACE={id:"search.replace",category:S},b.CLOSE={id:"search.close",category:S}})(E=e.SEARCH_COMMANDS||(e.SEARCH_COMMANDS={}));var _;(function(b){const S="outline";b.OUTLINE_COLLAPSE_ALL={id:"outline.collapse.all",category:S},b.OUTLINE_FOLLOW_CURSOR={id:"outline.follow.cursor",category:S},b.OUTLINE_SORT_KIND={id:"outline.sort.kind",category:S},b.OUTLINE_SORT_NAME={id:"outline.sort.name",category:S},b.OUTLINE_SORT_POSITION={id:"outline.sort.position",category:S}})(_=e.OUTLINE_COMMANDS||(e.OUTLINE_COMMANDS={}));var f;(function(b){const S="workspace";b.ADD_WORKSPACE_FOLDER={id:"workspace.addFolderToWorkspace",label:"%workspace.addFolderToWorkspace%",category:S},b.REMOVE_WORKSPACE_FOLDER={id:"workspace.removeFolderFromWorkspace",category:S},b.SAVE_WORKSPACE_AS_FILE={id:"workspace.saveWorkspaceAsFile",label:"%workspace.saveWorkspaceAsFile%",category:S}})(f=e.WORKSPACE_COMMANDS||(e.WORKSPACE_COMMANDS={}));var m;(function(b){const S="keyboard";b.CHOOSE_KEYBOARD_LAYOUT={id:"keyboard.chooseKeyboardLayout",label:"%keyboard.chooseKeyboardLayout%",category:S}})(m=e.KEYBOARD_COMMANDS||(e.KEYBOARD_COMMANDS={}));var d;(function(b){const S="dialog";b.ENSURE={id:"dialog.ensure",category:S}})(d=e.DIALOG_COMMANDS||(e.DIALOG_COMMANDS={}));var s;(function(b){b.CATEGORY="%terminal.name%",b.FOCUS_NEXT_TERMINAL={id:"workbench.action.terminal.focusNextPane",label:"%terminal.focusNext.inTerminalGroup%",category:b.CATEGORY},b.FOCUS_PREVIOUS_TERMINAL={id:"workbench.action.terminal.focusPreviousPane",label:"%terminal.focusPrevious.inTerminalGroup%",category:b.CATEGORY},b.SPLIT={id:"terminal.split",label:"%terminal.split%",category:b.CATEGORY},b.ADD={id:"terminal.add",label:"%terminal.new%",category:b.CATEGORY},b.REMOVE={id:"terminal.remove",label:"%terminal.remove%",category:b.CATEGORY},b.CLEAR={id:"terminal.clear",label:"%terminal.clear%",category:b.CATEGORY},b.OPEN_SEARCH={id:"terminal.search",label:"%terminal.search%",category:b.CATEGORY},b.SEARCH_NEXT={id:"terminal.search.next",label:"%terminal.search.next%",category:b.CATEGORY},b.OPEN_WITH_PATH={id:"terminal.openWithPath",category:b.CATEGORY},b.CLEAR_CONTENT={id:"terminal.clearContent",label:"%terminal.menu.clearCurrentContent%",category:b.CATEGORY},b.CLEAR_ALL_CONTENT={id:"terminal.clearAllContent",label:"%terminal.menu.clearAllContents%",category:b.CATEGORY},b.TAB_RENAME={id:"terminal.tabRename",category:b.CATEGORY},b.SELECT_ALL_CONTENT={id:"terminal.selectAllContent",label:"%terminal.menu.selectAllContent%",category:b.CATEGORY},b.MORE_SETTINGS={id:"terminal.moreSettings",label:"%terminal.menu.moreSettings%",category:b.CATEGORY},b.SELECT_TYPE={id:"terminal.selectType",category:b.CATEGORY},b.SELECT_ZSH={id:"terminal.selectTypeZsh",label:"zsh",category:b.CATEGORY},b.SELECT_BASH={id:"terminal.selectTypeBash",label:"bash",category:b.CATEGORY},b.SELECT_SH={id:"terminal.selectTypeSh",label:"sh",category:b.CATEGORY},b.SELECT_CMD={id:"terminal.selectTypeCMD",label:"cmd",category:b.CATEGORY},b.SELECT_POWERSHELL={id:"terminal.selectTypePowerShell",label:"powershell",category:b.CATEGORY},b.COPY={id:"terminal.copy",label:"%edit.copy%",category:b.CATEGORY},b.PASTE={id:"terminal.paste",label:"%edit.paste%",category:b.CATEGORY},b.SELECT_ALL={id:"terminal.selectAll",label:"%terminal.menu.selectCurrentContent%",category:b.CATEGORY},b.RE_LAUNCH={id:"terminal.relaunch",category:b.CATEGORY},b.TOGGLE_TERMINAL={id:"terminal.toggleTerminal",label:"%terminal.toggleTerminal%",category:b.CATEGORY},b.KILL_PROCESS={id:"terminal.killProcess",label:"%terminal.killProcess%",category:b.CATEGORY}})(s=e.TERMINAL_COMMANDS||(e.TERMINAL_COMMANDS={}));var a;(function(b){const S="view";b.QUICK_OPEN_VIEW={id:"layout.action.quickOpenView",category:S},b.OPEN_VIEW={id:"layout.action.openView",label:"%layout.action.openView%",category:S},b.MAXIMIZE_EDITOR={id:"layout.action.Maximizeeditor",category:S},b.TOGGLE_SIDEBAR_VISIBILITY={id:"main-layout.left-panel.toggle",category:S}})(a=e.LAYOUT_COMMANDS||(e.LAYOUT_COMMANDS={}));var r;(function(b){const S="marker";b.SHOW_ERRORS_WARNINGS={id:"marker.action.showErrorsWarnings",category:S},b.TOGGLE_SHOW_ERRORS_WARNINGS={id:"marker.action.toggleShowErrorsWarnings",category:S}})(r=e.MARKER_COMMANDS||(e.MARKER_COMMANDS={}));var c;(function(b){b.OPEN={id:"editor.action.quickCommand"},b.OPEN_OUTLINE={id:"editor.action.quickOutline"},b.OPEN_VIEW={id:"editor.action.quickView"}})(c=e.QUICK_OPEN_COMMANDS||(e.QUICK_OPEN_COMMANDS={}));var g;(function(b){b._GIT_OPEN_MERGE_EDITOR={id:"_git.openMergeEditor"},b.GIT_OPEN_MERGE_EDITOR={id:"git.openMergeEditor"}})(g=e.SCM_COMMANDS||(e.SCM_COMMANDS={}));var v;(function(b){const S="MergeConflict";b.AI_ACCEPT={id:"merge-conflict.ai.accept",category:S},b.ALL_RESET={id:"merge-conflict.ai.all-reset",category:S},b.AI_ALL_ACCEPT={id:"merge-conflict.ai.all-accept",category:S},b.AI_ALL_ACCEPT_STOP={id:"merge-conflict.ai.all-accept-stop",category:S}})(v=e.MERGE_CONFLICT_COMMANDS||(e.MERGE_CONFLICT_COMMANDS={}))},22780:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ClientCommonContribution=e.locationProtocolContextKey=e.inputFocusedContextKey=void 0;const n=t(85608),l=t(76003),o=t(97267),u=t(43718),p=t(53736),h=t(18193),E=t(22366),_=t(41118),f=t(1149),m=t(64102),d=t(39496),s=t(78132),a=t(11050),r=t(14109),c=t(66549);e.inputFocusedContextKey="inputFocus",e.locationProtocolContextKey="locationProtocol";let g=class{constructor(){this.schema=h.corePreferenceSchema;const b={"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},S=Object.keys(this.schema.properties);for(const y of S)this.schema.properties[y].default=b[y]||this.schema.properties[y].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 b=this.activeElementIsInput();if(this.inputFocusedContext.set(b),b){const S=(0,E.trackFocus)(document.activeElement);u.Event.once(S.onDidBlur)(()=>{this.inputFocusedContext.set(this.activeElementIsInput()),S.dispose()})}}registerCommands(b){b.registerCommand(r.EDITOR_COMMANDS.UNDO),b.registerCommand(r.EDITOR_COMMANDS.REDO),b.registerCommand(r.EDITOR_COMMANDS.SELECT_ALL),b.registerCommand(r.COMMON_COMMANDS.ABOUT_COMMAND,{execute:()=>{alert((0,u.replaceLocalizePlaceholder)(this.appConfig.appName))}})}registerMenus(b){b.registerMenubarItem(d.MenuId.MenubarFileMenu,{label:(0,u.localize)("menu-bar.title.file"),order:1,iconClass:(0,o.getIcon)("menubar-file")}),b.registerMenubarItem(d.MenuId.MenubarEditMenu,{label:(0,u.localize)("menu-bar.title.edit"),order:2,iconClass:(0,o.getIcon)("menubar-edit")}),b.registerMenubarItem(d.MenuId.MenubarSelectionMenu,{label:(0,u.localize)("menu-bar.title.selection"),order:3,iconClass:(0,o.getIcon)("menubar-selection")}),b.registerMenubarItem(d.MenuId.MenubarViewMenu,{label:(0,u.localize)("menu-bar.title.view"),order:4,iconClass:(0,o.getIcon)("menubar-view")}),b.registerMenubarItem(d.MenuId.MenubarGoMenu,{label:(0,u.localize)("menu-bar.title.go"),order:5,iconClass:(0,o.getIcon)("menubar-go")}),b.registerMenubarItem(d.MenuId.MenubarTerminalMenu,{label:(0,u.localize)("menu-bar.title.terminal"),order:5,iconClass:(0,o.getIcon)("terminal")}),b.registerMenubarItem(d.MenuId.MenubarHelpMenu,{label:(0,u.localize)("menu-bar.title.help"),order:999,iconClass:(0,o.getIcon)("question-circle")}),b.registerMenuItems(d.MenuId.MenubarFileMenu,[{command:r.FILE_COMMANDS.OPEN_FOLDER.id,group:"1_open",when:"config.application.supportsOpenFolder"},{command:r.FILE_COMMANDS.OPEN_WORKSPACE.id,group:"1_open",when:"config.application.supportsOpenWorkspace"},{command:r.EDITOR_COMMANDS.NEW_UNTITLED_FILE.id,group:"2_new"},{command:{id:r.EDITOR_COMMANDS.SAVE_CURRENT.id,label:(0,u.localize)("file.save")},group:"3_save"},{command:{id:r.EDITOR_COMMANDS.SAVE_ALL.id,label:(0,u.localize)("file.saveAll")},group:"3_save"},{command:{id:r.EDITOR_COMMANDS.AUTO_SAVE.id,label:(0,u.localize)("file.autoSave")},toggledWhen:"config.editor.autoSave != off",group:"4_autosave"}]),b.registerMenuItems(d.MenuId.MenubarGoMenu,[{command:{id:r.EDITOR_COMMANDS.GO_BACK.id,label:(0,u.localize)("editor.goBack")},group:"1_go"},{command:{id:r.EDITOR_COMMANDS.GO_FORWARD.id,label:(0,u.localize)("editor.goForward")},group:"1_go"},{command:{id:r.EDITOR_COMMANDS.QUICK_OPEN.id,label:(0,u.localize)("editor.quickOpen")},group:"2_go_file"},{command:{id:r.EDITOR_COMMANDS.SEARCH_WORKSPACE_SYMBOL.id,label:(0,u.localize)("editor.workspaceSymbol.quickopen")},group:"2_go_file"},{command:{id:r.EDITOR_COMMANDS.GO_TO_LINE.id,label:(0,u.localize)("editor.goToLine")},group:"3_go_infile"},{command:{id:"editor.action.jumpToBracket",label:(0,u.localize)("menu-bar.go.jumpToBracket")},group:"3_go_infile"},{command:{id:"editor.action.marker.nextInFiles",label:(0,u.localize)("menu-bar.go.nextProblemInFiles")},group:"6_go_problem"},{command:{id:"editor.action.marker.prevInFiles",label:(0,u.localize)("menu-bar.go.prevProblemInFiles")},group:"6_go_problem"}]),b.registerMenuItems(d.MenuId.MenubarTerminalMenu,[{command:{id:r.TERMINAL_COMMANDS.ADD.id,label:r.TERMINAL_COMMANDS.ADD.label},group:"1_terminal"},{command:{id:r.TERMINAL_COMMANDS.SPLIT.id,label:r.TERMINAL_COMMANDS.SPLIT.label},group:"1_terminal"}])}registerKeybindings(b){b.registerKeybinding({command:r.EDITOR_COMMANDS.SELECT_ALL.id,keybinding:"ctrlcmd+a",when:"editorFocus"}),b.registerKeybinding({command:r.EDITOR_COMMANDS.UNDO.id,keybinding:"ctrlcmd+z",when:"editorFocus"}),b.registerKeybinding({command:r.EDITOR_COMMANDS.REDO.id,keybinding:"ctrlcmd+shift+z",when:"editorFocus"})}};n.__decorate([(0,l.Autowired)(u.CommandService),n.__metadata("design:type",Object)],g.prototype,"commandService",void 0),n.__decorate([(0,l.Autowired)(p.IContextKeyService),n.__metadata("design:type",Object)],g.prototype,"contextKeyService",void 0),n.__decorate([(0,l.Autowired)(a.AppConfig),n.__metadata("design:type",Object)],g.prototype,"appConfig",void 0),n.__decorate([(0,l.Autowired)(f.LayoutViewSizeConfig),n.__metadata("design:type",f.LayoutViewSizeConfig)],g.prototype,"layoutViewSize",void 0),g=n.__decorate([(0,u.Domain)(u.CommandContribution,c.ClientAppContribution,s.PreferenceContribution,m.MenuContribution,_.KeybindingContribution),n.__metadata("design:paramtypes",[])],g),e.ClientCommonContribution=g},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),l=t(76003),o=t(16908),u=t(43718),p=t(37638),h=t(36206),E=t(136),_=t(90697),f=t(45829),m=t(44867),d=t(22780),s=t(10797),a=t(17821);let r=class extends h.BrowserModule{constructor(){super(...arguments),this.contributionProvider=[_.OpenerContribution],this.providers=[d.ClientCommonContribution,m.DefaultOpenerContribution,m.OpenerContributionClient,p.AuthenticationContribution,E.HashCalculateContribution],this.electronProviders=[s.ClientElectronCommonContribution,f.ElectronOpenerContributionClient],this.webProviders=[a.ClientWebCommonContribution],this.backServices=[{servicePath:u.CommonServerPath,protocol:o.CommonServerProtocol},{servicePath:u.KeytarServicePath},{servicePath:u.CryptoServicePath}]}};r=n.__decorate([(0,l.Injectable)()],r),e.ClientCommonModule=r},98881:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.RecentStorage=void 0;const n=t(85608),l=t(76003),o=t(43718);let u=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}};n.__decorate([(0,l.Autowired)(o.StorageProvider),n.__metadata("design:type",Function)],u.prototype,"getStorage",void 0),u=n.__decorate([(0,l.Injectable)()],u),e.RecentStorage=u},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),l=t(76003),o=t(43718),u=t(64102),p=t(39496),h=t(11050);let E=class{registerMenus(f){f.registerMenubarItem(p.MenuId.MenubarAppMenu,{label:(0,o.localize)("app.name",this.appConfig.appName),order:0}),f.registerMenuItems(p.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"}]),f.registerMenuItems(p.MenuId.MenubarAppMenu,[{command:{id:"electron.quit",label:(0,o.localize)("app.quit")},nativeRole:"quit",group:"4_quit"}])}};n.__decorate([(0,l.Autowired)(h.AppConfig),n.__metadata("design:type",Object)],E.prototype,"appConfig",void 0),E=n.__decorate([(0,o.Domain)(u.MenuContribution)],E),e.ClientElectronCommonContribution=E},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),l=t(43718),o=t(64102),u=t(39496),p=t(14109);let h=class{registerMenus(_){_.registerMenuItems(u.MenuId.MenubarEditMenu,[{command:p.EDITOR_COMMANDS.REDO.id,group:"1_undo"},{command:p.EDITOR_COMMANDS.UNDO.id,group:"1_undo"}]),_.registerMenuItem(u.MenuId.MenubarHelpMenu,{command:{id:p.COMMON_COMMANDS.ABOUT_COMMAND.id,label:p.COMMON_COMMANDS.ABOUT_COMMAND.label},nativeRole:"about",group:"0_about"})}};h=n.__decorate([(0,l.Domain)(o.MenuContribution)],h),e.ClientWebCommonContribution=h},25918:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.InlineMenuBar=e.InlineActionBar=e.TitleActionList=e.MenuActionList=void 0;const n=t(85608),l=n.__importDefault(t(53373)),o=n.__importStar(t(14041)),u=t(97267),p=t(45803),h=t(43718),E=t(27833),_=t(93899),f=t(48560),m=t(79951),d=t(55693),s=n.__importDefault(t(17647)),a=n.__importDefault(t(54859)),r=({data:A,hasSubmenu:T,disabled:D,iconService:w,hasChecked:I})=>o.default.createElement("div",{className:(0,l.default)(a.default.menuAction,{[a.default.disabled]:D,[a.default.checked]:A.checked})},o.default.createElement("div",{className:(0,l.default)({[a.default.icon]:I})},A.checked?o.default.createElement(u.Icon,{icon:"check"}):null),o.default.createElement("div",{className:a.default.label},A.label?(0,m.transformLabelWithCodicon)(h.strings.mnemonicButtonLabel(A.label,!0),{margin:"0 3px"},w?.fromString.bind(w)):""),o.default.createElement("div",{className:a.default.tip},A.keybinding?o.default.createElement("div",{className:a.default.shortcut},A.keybinding):null,T?o.default.createElement("div",{className:a.default.submenuIcon},o.default.createElement(u.Icon,{icon:"right"})):null,!A.keybinding&&!T&&A.extraDesc&&o.default.createElement("div",{className:a.default.extraDesc},A.extraDesc))),c=({data:A=[],context:T=[],afterClick:D,style:w,iconService:I,renderSubMenuTitle:O,renderMenuItem:M})=>{if(!A.length)return null;const R=o.default.useCallback(B=>{const{key:k,item:F}=B;if([_.SeparatorMenuItemNode.ID,_.SubmenuItemNode.ID].includes(k))return;const j=(Array.isArray(F.props.children)?F.props.children[0]:F.props.children).props.data;j&&(typeof j.execute=="function"&&j.execute(T),typeof D=="function"&&D(j))},[A,T]),P=o.default.useCallback((B,k)=>{if(O){const F=O(B,{hasSubmenu:!0,disabled:!1});if(F)return F}return o.default.createElement(r,{hasChecked:k,hasSubmenu:!0,data:B,iconService:I})},[O]),L=o.default.useCallback((B,k)=>{if(M){const F=M(B,{hasSubmenu:!1,disabled:B.disabled});if(F)return F}return o.default.createElement(r,{hasChecked:k,data:B,disabled:B.disabled,iconService:I})},[M]),N=o.default.useCallback(B=>{const k=B.some(F=>F.checked);return B.map((F,W)=>{if(F.id===_.SeparatorMenuItemNode.ID)return null;const j=B[W+1]&&B[W+1].id===_.SeparatorMenuItemNode.ID;return F.id===_.SubmenuItemNode.ID?!Array.isArray(F.children)||!F.children.length?null:o.default.createElement(o.default.Fragment,{key:`${F.id}-${F.submenuId}-${W}`},o.default.createElement(p.Menu.SubMenu,{key:`${F.id}-${F.submenuId}-${W}`,className:a.default.submenuItem,popupClassName:"kt-menu",title:P(F,k)},N(F.children)),j?o.default.createElement(p.Menu.Divider,{key:`divider-${W}`,className:a.default.menuItemDivider}):null):o.default.createElement(o.default.Fragment,{key:`${F.id}-${W}`},o.default.createElement(p.Menu.Item,{id:`${F.id}-${W}`,key:`${F.id}-${W}`,className:a.default.menuItem,disabled:F.disabled},L(F,k)),j?o.default.createElement(p.Menu.Divider,{key:`divider-${W}`,className:a.default.menuItemDivider}):null)})},[]);return o.default.createElement(p.Menu,Object.assign({className:"kt-menu",selectable:!1,motion:{motionLeave:!1,motionEnter:!1}},{builtinPlacements:s.default},{onClick:R,style:w}),N(A))};e.MenuActionList=c;const g=({type:A,icon:T,disabled:D,onClick:w,title:I})=>{const O=(0,d.useDesignStyles)(a.default.btnAction,"btnAction");if(A==="icon")return o.default.createElement(u.Button,{size:"small",type:A,className:O,onClick:w,title:I,icon:T||"ellipsis"});const M={};return(0,h.isBoolean)(D)&&(M.disabled=D),o.default.createElement(u.Button,Object.assign({size:"small",type:"secondary",className:O,onClick:w},M,{title:I}),o.default.createElement(u.Icon,{icon:T||"ellipsis"}))};g.displayName="EllipsisWidget";const v=o.default.memo(A=>{var{iconService:T,type:D="icon",data:w,context:I=[],className:O,afterClick:M}=A,R=n.__rest(A,["iconService","type","data","context","className","afterClick"]);const P=(0,d.useDesignStyles)(a.default.iconAction,"iconAction"),L=(0,d.useDesignStyles)(a.default.btnAction,"btnAction"),N=(0,f.useInjectable)(h.CommandRegistry),[B,k]=(0,o.useState)(!1),F=o.default.useCallback(async(K,...G)=>{if(K&&(K.preventDefault(),K.stopPropagation()),!B){if(k(!0),w.id===_.SubmenuItemNode.ID&&K){const V={x:K.clientX,y:K.clientY};await w.execute([V,...I])}else typeof w.execute=="function"&&await w.execute([...I,...G]);k(!1),typeof M=="function"&&M()}},[w,I]);o.default.useEffect(()=>{let K;switch(w.id){case E.GitCommands.Stage:{const G=I[0];if(!G||!G.sourceUri)break;K=N.registerHandler(`${w.id}-${G.sourceUri.toString()}`,{execute:async()=>{typeof w.execute=="function"&&await w.execute([...I])}})}break;default:break}return()=>{K&&K.dispose()}},[w.id]);const[W,j]=o.default.useMemo(()=>{let K=w.tooltip||w.label;const G=w.label;return w.keybinding&&(K=`${K} (${w.keybinding})`),[K,G]},[w]),H=w.id===_.SubmenuItemNode.ID;return D==="icon"&&!w.type?o.default.createElement(u.Button,Object.assign({type:w.icon?"icon":"link",className:(0,l.default)(P,O,{[a.default.disabled]:w.disabled,[a.default.submenuIconAction]:H}),title:W,iconClass:w.icon,onClick:F},R),!w.icon&&j):w.type==="checkbox"?o.default.createElement(u.CheckBox,Object.assign({className:(0,l.default)(O,L),disabled:w.disabled,label:w.label,title:W,checked:w.checked,onChange:K=>F(void 0,K.target.checked)},R)):o.default.createElement(u.Button,Object.assign({loading:B,className:(0,l.default)(O,L),disabled:w.disabled,onClick:F,size:"small",type:w.type,title:W},R),(0,m.transformLabelWithCodicon)(j,{margin:"0 3px"},T?.fromString.bind(T)),H&&o.default.createElement(u.Icon,{icon:"down",className:"kt-button-secondary-more"}))});v.displayName="InlineAction";const b=({data:A,context:T})=>{const D=o.default.useCallback(()=>A.getExecuteArgs(T),[A,T]);return o.default.createElement(A.component,{getExecuteArgs:D})};b.displayName="CustomAction",e.TitleActionList=o.default.memo(({type:A="icon",nav:T=[],more:D=[],moreIcon:w,moreTitle:I,context:O=[],extraNavActions:M=[],moreAtFirst:R=!1,className:P,afterClick:L,menuId:N,iconService:B,regroup:k=(...F)=>F})=>{const F=(0,f.useInjectable)(_.ICtxMenuRenderer),W=(0,f.useInjectable)(_.AbstractMenuService),j=(0,d.useDesignStyles)(a.default.titleActions,"titleActions"),[H,K]=k(T,D),G=o.default.useCallback(z=>{z.preventDefault(),z.stopPropagation(),K&&F.show({anchor:{x:z.clientX,y:z.clientY},menuNodes:K,args:O,onHide:L})},[K,O]);if(H.length===0&&K.length===0&&M.length===0)return null;const V=K.length>0?o.default.createElement(g,{disabled:K[0].disabled,icon:w,type:A,onClick:G,title:I}):null;return o.default.createElement("div",{className:(0,l.default)([j,P]),"data-menu-id":N},R&&V,H.map(z=>{if(z.id===_.ComponentMenuItemNode.ID)return o.default.createElement(b,{context:O,data:z,key:z.nodeId});if(z.id===_.SubmenuItemNode.ID){const $=W.createMenu(z.submenuId);if(!((0,_.generateMergedCtxMenu)({menus:$}).length>0))return}if(z.id===_.SeparatorMenuItemNode.ID)return o.default.createElement("span",{key:`vertical-divider-${z.id}`,className:a.default.verticalDivider});const U=z.id===_.SubmenuItemNode.ID?z.submenuId:z.id;return o.default.createElement(v,{id:U,key:U,className:(0,l.default)({[a.default.selected]:z.checked}),type:A,data:z,afterClick:L,context:O,iconService:B})}),Array.isArray(M)&&M.length?o.default.createElement(o.default.Fragment,null,H.length&&o.default.createElement("span",{className:a.default.divider}),M):null,!R&&V)}),e.TitleActionList.displayName="TitleActionList";function S(A){const{menus:T,context:D,separator:w="navigation",debounce:I,isFlattenMenu:O=!1}=A,M=n.__rest(A,["menus","context","separator","debounce","isFlattenMenu"]),[R,P]=(0,d.useMenus)(T,w,D,I),L=(0,o.useMemo)(()=>O?[...R,...P]:R,[R,P,O]);return o.default.createElement(e.TitleActionList,Object.assign({menuId:T.menuId,nav:L,more:w==="inline"||O?[]:P},M))}e.InlineActionBar=S;function y(A){const{iconService:T,menus:D,context:w,moreIcon:I,moreTitle:O,separator:M="navigation"}=A,R=n.__rest(A,["iconService","menus","context","moreIcon","moreTitle","separator"]),[P,L]=(0,d.useContextMenus)(D);return o.default.createElement(e.TitleActionList,Object.assign({menuId:D.menuId,nav:P,more:M==="inline"?[]:L,moreIcon:I,moreTitle:O,context:w,iconService:T},R))}e.InlineMenuBar=y,y.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),l=n.__importStar(t(14041)),o=t(43718),u=t(22689),p=t(48560),h=t(57995),E=t(24951),_=t(52141),f=n.__importDefault(t(27410)),m=(0,u.createLayoutEventType)(o.AIInlineChatContentWidgetId),d=new CustomEvent(m,{bubbles:!0}),s=a=>{const{operationList:r,moreOperation:c,showClose:g,onClickItem:v,onClose:b}=a,S=l.default.useRef(null),[y,A]=(0,p.useHover)(),T=(0,l.useCallback)(()=>{b&&b()},[b]);return(0,p.useChange)(A,()=>{S.current&&S.current.dispatchEvent(d)}),l.default.createElement("div",{ref:S,className:f.default.ai_action},l.default.createElement(h.AILogoAvatar,{className:f.default.ai_action_icon}),l.default.createElement(E.LineVertical,{height:"60%",margin:"0px 4px 0 8px"}),l.default.createElement("div",{ref:y,className:f.default.operate_container},r.map(({name:D,title:w,id:I},O)=>w?l.default.createElement(_.EnhancePopover,{id:I,title:w,key:`popover_${O}`},l.default.createElement(h.EnhanceIcon,{wrapperClassName:f.default.operate_item,onClick:()=>v(I)},l.default.createElement("span",{key:O},D))):l.default.createElement(h.EnhanceIcon,{wrapperClassName:f.default.operate_item,onClick:()=>v(I),key:O},l.default.createElement("span",null,D))),c?.length?l.default.createElement(h.EnhanceIconWithCtxMenu,{icon:"more",menuNodes:c,wrapperClassName:f.default.operate_btn,skew:{x:-83,y:5}}):null,g!==!1&&l.default.createElement("div",{className:f.default.close_container,style:{display:A?"flex":"none"}},l.default.createElement(E.LineVertical,{height:"60%",margin:"0px 4px 0 4px"}),l.default.createElement(h.EnhanceIcon,{wrapperClassName:f.default.operate_btn,icon:"window-close",onClick:T}))))};e.AIAction=s},66205:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ContentWidgetContainerPanel=void 0;const n=t(85608),l=n.__importDefault(t(14041)),o=n.__importDefault(t(41771)),u=p=>l.default.createElement("div",{className:o.default.inline_chat_container_panel,style:p.style},p.children);e.ContentWidgetContainerPanel=u},57995:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AILogoAvatar=e.EnhanceIconWithCtxMenu=e.EnhanceIcon=void 0;const n=t(85608),l=n.__importDefault(t(53373)),o=n.__importStar(t(14041)),u=t(81878),p=t(97222),h=t(48560),E=n.__importDefault(t(42798));e.EnhanceIcon=o.default.forwardRef((m,d)=>o.default.createElement("div",{className:(0,l.default)(m.wrapperClassName,E.default.ai_enhance_icon),style:m.wrapperStyle,onClick:m.onClick,ref:d},o.default.createElement(u.Icon,{className:(0,l.default)(m.className,E.default.icon),children:null,onClick:()=>null,style:(m.icon||m.iconClass)&&m.children?{marginRight:5}:{},icon:m.icon,iconClass:m.iconClass}),m.children&&o.default.createElement("span",{className:E.default.children_wrap},m.children)));const _=m=>{const{children:d,menuNodes:s,skew:a}=m,r=n.__rest(m,["children","menuNodes","skew"]),c=(0,h.useInjectable)(p.IBrowserCtxMenu),[g,v]=o.default.useState(void 0),b=o.default.useRef(null);o.default.useEffect(()=>{S()},[b.current,a]);const S=(0,o.useCallback)(A=>{requestAnimationFrame(()=>{if(b.current){const T=b.current.getBoundingClientRect(),{x:D,y:w,width:I,height:O}=T,M={x:D+I,y:w+O};a&&(M.x+=a.x,M.y+=a.y),v(M),A&&A(M)}})},[b.current,a]),y=o.default.useCallback(()=>{g&&S(A=>{c.show({anchor:A,menuNodes:s})})},[b.current,s,g]);return o.default.createElement(e.EnhanceIcon,Object.assign({ref:b,onClick:y},r),d)};e.EnhanceIconWithCtxMenu=_;const f=m=>o.default.createElement("div",{className:(0,l.default)(E.default.ai_logo_avatar_container,m.className)},o.default.createElement(u.Icon,{icon:"magic-wand",className:(0,l.default)(m.iconClassName,E.default.avatar_icon)}));e.AILogoAvatar=f},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)},50610:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AIInlineResult=void 0;const n=t(85608),l=n.__importDefault(t(14041)),o=t(57995),u=t(24951),p=t(75777),h=n.__importDefault(t(5011)),E=_=>{const{iconItems:f,isRenderThumbs:m=!0,isRenderClose:d=!1,closeClick:s}=_;return l.default.createElement("div",{className:h.default.ai_inline_result_panel},l.default.createElement("div",{className:h.default.side},f.map(({icon:a,text:r,onClick:c},g)=>l.default.createElement(o.EnhanceIcon,{wrapperClassName:h.default.operate_btn,icon:a,onClick:c,key:g},l.default.createElement("span",null,r)))),m&&l.default.createElement(l.default.Fragment,null,l.default.createElement(u.LineVertical,{height:"60%",margin:"0px 6px 0 6px"}),l.default.createElement("div",{className:h.default.side},l.default.createElement(p.Thumbs,{wrapperClassName:h.default.operate_icon}))),d&&l.default.createElement(l.default.Fragment,null,l.default.createElement(o.EnhanceIcon,{wrapperClassName:h.default.operate_btn,icon:"close",onClick:s})))};e.AIInlineResult=E},24951:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.HorizontalVertical=e.LineVertical=void 0;const l=t(85608).__importDefault(t(14041)),o={backgroundColor:"var(--editorGroup-border)",height:"100%",width:"1px",minWidth:"1px"},u={backgroundColor:"var(--editorGroup-border)",width:"100%",height:"1px",minHeight:"1px"},p=E=>l.default.createElement("span",{style:Object.assign(Object.assign({},o),E)});e.LineVertical=p;const h=E=>l.default.createElement("span",{style:Object.assign(Object.assign({},u),E)});e.HorizontalVertical=h},52141:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EnhancePopover=void 0;const l=t(85608).__importStar(t(14041)),o=t(97267),u=t(43718),p=h=>{const{children:E,id:_,title:f,onClick:m}=h,[d,s]=l.default.useState(!1),a=(0,l.useMemo)(()=>_+(0,u.uuid)(6),[_]),r=(0,l.useCallback)(g=>{s(!1),m&&m(g)},[m]),c=(0,l.useCallback)(g=>{s(g)},[]);return l.default.createElement(o.Popover,{id:a,title:f,onClick:r,display:d,onDisplayChange:c},E)};e.EnhancePopover=p},75777:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Thumbs=void 0;const l=t(85608).__importStar(t(14041)),o=t(43718),u=t(95040),p=t(81878),h=t(48560),E=t(67304),_=t(57995),f=m=>{const d=(0,h.useInjectable)(u.IAIInlineChatService),{relationId:s,onClick:a,wrapperClassName:r}=m,[c,g]=(0,l.useState)("thumbs"),[v,b]=(0,l.useState)("thumbsdown"),S=(0,l.useCallback)(T=>{a&&a(T),d&&d.fireThumbsEvent(T)},[s,d]),y=(0,l.useCallback)(T=>{T==="up"&&c==="thumbs"&&(g("thumbs-fill"),b(!1),S(!0)),T==="up"&&c==="thumbs-fill"&&(g("thumbs"),b("thumbsdown")),T==="down"&&v==="thumbsdown"&&(b("thumbsdown-fill"),g(!1),S(!1)),T==="down"&&v==="thumbsdown-fill"&&(b("thumbsdown"),g("thumbs"))},[c,v]),A=(0,h.useUUID)();return l.default.createElement(l.default.Fragment,null,typeof c=="string"&&l.default.createElement(p.Popover,{id:`ai-chat-thumbsup-${A}`,title:(0,o.localize)("aiNative.inline.chat.operate.thumbsup.title")},l.default.createElement(_.EnhanceIcon,{wrapperClassName:r,onClick:()=>y("up"),className:(0,E.getExternalIcon)(c,E.KTICON_OWNER)})),typeof v=="string"&&l.default.createElement(p.Popover,{id:`ai-chat-thumbsdown-${A}`,title:(0,o.localize)("aiNative.inline.chat.operate.thumbsdown.title")},l.default.createElement(_.EnhanceIcon,{wrapperClassName:r,onClick:()=>y("down"),className:(0,E.getExternalIcon)(v,E.KTICON_OWNER)})))};e.Thumbs=f},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 l=t(77331);Object.defineProperty(e,"NativeSelect",{enumerable:!0,get:function(){return l.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),l=n.__importDefault(t(53373)),o=n.__importStar(t(14041)),u=t(48560),p=t(38578),h=t(55693),E=t(25719),_=n.__importDefault(t(91290)),f=m=>{var{className:d,children:s=[],direction:a="left-to-right"}=m,r=n.__rest(m,["className","children","direction"]);const c=o.default.Children.toArray(s),g=(0,u.useInjectable)(p.AppConfig),v=(0,h.useDesignStyles)(_.default["box-panel"],"box-panel");(0,o.useEffect)(()=>{g.didRendered&&g.didRendered()},[]);const b=E.Layout.getStyleProperties(a);return o.default.createElement("div",Object.assign({},r,{className:(0,l.default)(v,d),style:{flexDirection:b.direction,zIndex:r.zIndex||r["z-index"]}}),c.map((S,y)=>{const A=S.props||{};return o.default.createElement("div",{key:y,id:A["data-wrapper-id"],className:(0,l.default)(_.default.wrapper,A["data-wrapper-class"]),style:{flex:A.flex,overflow:A.overflow,zIndex:A.zIndex||A["z-index"],[b.minSize]:A.defaultSize,backgroundColor:A.backgroundColor}},S)}))};e.BoxPanel=f},28003:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ToolbarActionBasedLayout=e.DefaultLayout=e.getStorageValue=void 0;const l=t(85608).__importDefault(t(14041)),o=t(52564),u=t(57327),p=t(99333),h=()=>{let _={},f={};try{_=JSON.parse(localStorage.getItem("layout")||"{}"),f=JSON.parse(localStorage.getItem("theme")||"{}")}catch{}return{layout:_,colors:f}};e.getStorageValue=h,e.DefaultLayout=E;function E(_={}){var f,m,d,s,a;const{layout:r}=(0,e.getStorageValue)();return l.default.createElement(u.BoxPanel,{direction:"top-to-bottom"},l.default.createElement(o.SlotRenderer,{id:"top",defaultSize:_.topSlotDefaultSize||0,slot:"top",zIndex:_.topSlotZIndex}),l.default.createElement(p.SplitPanel,{id:"main-horizontal",flex:1},l.default.createElement(o.SlotRenderer,{slot:"left",isTabbar:!0,defaultSize:!((f=r.left)===null||f===void 0)&&f.currentId?((m=r.left)===null||m===void 0?void 0:m.size)||310:49,minResize:280,maxResize:480,minSize:49}),l.default.createElement(p.SplitPanel,{id:"main-vertical",minResize:300,flexGrow:1,direction:"top-to-bottom"},l.default.createElement(o.SlotRenderer,{flex:2,flexGrow:1,minResize:200,slot:"main"}),l.default.createElement(o.SlotRenderer,{flex:1,defaultSize:(d=r.bottom)===null||d===void 0?void 0:d.size,minResize:160,slot:"bottom",isTabbar:!0})),l.default.createElement(o.SlotRenderer,{slot:"right",isTabbar:!0,defaultSize:!((s=r.right)===null||s===void 0)&&s.currentId?((a=r.right)===null||a===void 0?void 0:a.size)||310:0,minResize:280,maxResize:480,minSize:0})),l.default.createElement(o.SlotRenderer,{id:"statusBar",defaultSize:24,slot:"statusBar"}))}e.ToolbarActionBasedLayout=E},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),l={"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(u){function p(a){return l[a]}u.getStyleProperties=p;function h(a){return l[a].direction}u.getFlexDirection=h;function E(a){return l[a].size}u.getSizeProperty=E;function _(a){return l[a].domSize}u.getDomSizeProperty=_;function f(a){return l[a].minSize}u.getMinSizeProperty=f;function m(a){return l[a].maxSize}u.getMaxSizeProperty=m;function d(a){return a==="bottom-to-top"||a==="top-to-bottom"?n.ResizeHandleVertical:n.ResizeHandleHorizontal}u.getResizeHandle=d;function s(a){return a==="bottom-to-top"||a==="top-to-bottom"?"row":"column"}u.getTabbarDirection=s})(o=e.Layout||(e.Layout={}))},99333:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SplitPanel=e.PanelContext=void 0;const n=t(85608),l=n.__importDefault(t(53373)),o=n.__importDefault(t(14041)),u=t(43718),p=t(68456),h=t(48560),E=t(73215),_=t(25719),f=t(71707),m=n.__importDefault(t(91290));e.PanelContext=o.default.createContext({setSize:(r,c)=>{},setRelativeSize:(r,c,g)=>{},getSize:r=>0,getRelativeSize:r=>[0,0],lockSize:(r,c)=>{},setMaxSize:(r,c)=>{},hidePanel:r=>{}});const d=(r,c,g)=>{var v,b;return(b=r&&r.props&&((v=r.props[c])!==null&&v!==void 0?v:r.props[`data-sp-${c}`]))!==null&&b!==void 0?b:g};function s(r,c){return d(r,"savedSize")?d(r,"savedSize")+"px":d(r,"defaultSize")!==void 0?d(r,"defaultSize")+"px":d(r,"flex")?d(r,"flex")/c*100+"%":1/c*100+"%"}const a=r=>{const c=(0,h.useInjectable)(f.SplitPanelManager).getService(r.id),{id:g,className:v,resizeHandleClassName:b,style:S,children:y=[],direction:A="left-to-right",resizeKeep:T=!0,dynamicTarget:D}=o.default.useMemo(()=>c.interceptProps(r),[c,c.interceptProps,r]),w=_.Layout.getResizeHandle(A),I=_.Layout.getStyleProperties(A),O=o.default.useMemo(()=>o.default.Children.toArray(y),[y]),M=o.default.useMemo(()=>O.find(_e=>d(_e,"flexGrow")),[O]),R=o.default.useMemo(()=>O.reduce((_e,pe)=>_e+d(pe,"flex",1),0),[O]),P=o.default.useRef([]),L=(0,h.useInjectable)(u.IEventBus),N=o.default.useRef(),B=o.default.useRef(O.map(()=>!1)),k=o.default.useRef(O.map(()=>!1)),F=o.default.useRef(B.current.slice(0,O.length-1)),[W,j]=o.default.useState(F.current),[H,K]=o.default.useState(k.current),[G,V]=o.default.useState(B.current);c.panels=[];const z=o.default.useCallback(_e=>(pe,q)=>{const ae=q?_e-1:_e,ie=P.current[ae];ie&&ie.setAbsoluteSize(pe!==void 0?pe:d(O[_e],"defaultSize"),q,T)},[P.current]),U=o.default.useCallback(_e=>(pe,q,ae)=>{const ie=ae?_e-1:_e,he=P.current[ie];he&&he.setRelativeSize(pe,q)},[P.current]),$=o.default.useCallback(_e=>pe=>{const q=pe?_e-1:_e,ae=P.current[q];return ae?ae.getAbsoluteSize(pe):0},[P.current]),Q=o.default.useCallback(_e=>pe=>{const q=pe?_e-1:_e,ae=P.current[q];return ae?ae.getRelativeSize():[0,0]},[P.current]),Y=o.default.useCallback(_e=>(pe,q)=>{const ae=q?_e-1:_e,ie=F.current.map((he,J)=>J===ae?pe!==void 0?pe:!he:he);F.current=ie,j(ie)},[P.current]),re=o.default.useCallback(_e=>pe=>{const q=B.current.map((ae,ie)=>ie===_e?pe!==void 0?pe:!ae:ae);B.current=q,V(q)},[P.current]),se=o.default.useCallback(_e=>pe=>{const q=k.current.map((ie,he)=>he===_e?pe!==void 0?!pe:!ie:ie);k.current=q;const ae=d(O[_e],"slot")||d(O[_e],"id");ae&&le(ae),K(q)},[O,k.current]),le=o.default.useCallback(_e=>{_e&&L.fire(new p.ResizeEvent({slotLocation:_e}))},[L]),fe=o.default.useMemo(()=>O.map((_e,pe)=>{const q=[],ae=d(_e,"minSize"),ie=d(_e,"maxSize"),he=d(_e,"flexGrow");if(pe!==0){const J=pe===1?O[pe-1]:O[pe];let X;he?X=E.ResizeFlexMode.Prev:d(O[pe-1],"flexGrow")&&(X=E.ResizeFlexMode.Next),d(J,"noResize")||W[pe-1]||q.push(o.default.createElement(w,{className:b,onResize:()=>{const ne=d(O[pe-1],"slot")||d(O[pe-1],"id"),de=d(O[pe],"slot")||d(O[pe],"id");le(ne),le(de)},noColor:!0,findNextElement:D?ne=>c.getFirstResizablePanel(pe-1,ne):void 0,findPrevElement:D?ne=>c.getFirstResizablePanel(pe-1,ne,!0):void 0,key:`split-handle-${pe}`,delegate:ne=>{P.current.push(ne)},flexMode:X}))}return q.push(o.default.createElement(e.PanelContext.Provider,{key:pe,value:{setSize:z(pe),getSize:$(pe),setRelativeSize:U(pe),getRelativeSize:Q(pe),lockSize:Y(pe),setMaxSize:re(pe),hidePanel:se(pe)}},o.default.createElement("div",{"data-min-resize":d(_e,"minResize"),"data-max-resize":d(_e,"maxResize"),ref:J=>{J&&c.panels.indexOf(J)===-1&&c.panels.push(J)},id:d(_e,"id"),style:Object.assign(Object.assign(Object.assign(Object.assign({},d(_e,"flex")&&!d(_e,"savedSize")&&!M?{flex:d(_e,"flex")}:{[I.size]:s(_e,R)}),{[I.minSize]:ae?ae+"px":"-1px",[I.maxSize]:G[pe]&&ie?ie+"px":"unset"}),he!==void 0?{flexGrow:he}:{}),{display:H[pe]?"none":"block"})},_e))),q}).filter(Boolean),[y,O,b,D,P.current,H,W]);return o.default.useEffect(()=>{N.current&&c.setRootNode(N.current);const _e=L.on(p.ResizeEvent,pe=>{pe.payload.slotLocation===g&&O.forEach(q=>{le(d(q,"slot")||d(q,"id"))})});return()=>{_e.dispose()}},[]),o.default.useMemo(()=>{const{minResize:_e,flexGrow:pe,minSize:q,maxSize:ae,savedSize:ie,defaultSize:he,flex:J,noResize:X,slot:oe}=r,ne=n.__rest(r,["minResize","flexGrow","minSize","maxSize","savedSize","defaultSize","flex","noResize","slot"]);return delete ne.resizeHandleClassName,delete ne.dynamicTarget,delete ne.resizeKeep,delete ne.direction,c.renderSplitPanel(o.default.createElement("div",Object.assign({},ne,{ref:de=>N.current=de,className:(0,l.default)(m.default["split-panel"],v),style:Object.assign({flexDirection:I.direction},S),"data-min-resize":_e,"data-max-resize":ae,"data-min-size":q,"data-max-size":ae,"data-saved-size":ie,"data-default-size":he,"data-flex":J,"data-flex-grow":pe,"data-no-resize":X,"data-slot":oe})),fe,ne)},[c,c.renderSplitPanel,fe,N,S,r])};e.SplitPanel=a},71707:(x,e,t)=>{"use strict";var n;Object.defineProperty(e,"__esModule",{value:!0}),e.SplitPanelManager=e.SplitPanelService=e.ISplitPanelService=void 0;const l=t(85608),o=l.__importDefault(t(14041)),u=t(76003),p=t(43718);e.ISplitPanelService=Symbol("ISplitPanelService");let h=n=class extends p.Disposable{constructor(f){super(),this.panelId=f,this._whenReadyDeferred=new p.Deferred,this.panels=[]}get isVisible(){return this.rootNode&&this.rootNode.clientHeight>0||!1}get whenReady(){return this._whenReadyDeferred.promise}setRootNode(f){this.rootNode=f,this._whenReadyDeferred.resolve()}getFirstResizablePanel(f,m,d){if(d){if(m)return this.panels[f];for(let s=f;s>=0;s--)if(this.panels[s].clientHeight>n.MIN_SIZE)return this.panels[s]}else if(m){for(let s=f+1;s<this.panels.length;s++)if(this.panels[s].clientHeight>n.MIN_SIZE)return this.panels[s]}else return this.panels[f+1]}renderSplitPanel(f,m,d){return o.default.cloneElement(f,Object.assign(Object.assign({},d),f.props),m)}interceptProps(f){return f}};h.MIN_SIZE=120,h=n=l.__decorate([(0,u.Injectable)({multiple:!0}),l.__metadata("design:paramtypes",[String])],h),e.SplitPanelService=h;let E=class{constructor(){this.services=new Map}getService(f){let m=this.services.get(f);return m||(m=this.injector.get(e.ISplitPanelService,[f]),this.services.set(f,m)),m}};l.__decorate([(0,u.Autowired)(u.INJECTOR_TOKEN),l.__metadata("design:type",u.Injector)],E.prototype,"injector",void 0),E=l.__decorate([(0,u.Injectable)()],E),e.SplitPanelManager=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 l=t(85608).__importDefault(t(14041));t(18182);const o=()=>l.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 l=t(85608).__importDefault(t(43144)),o=t(48560),u=({id:p,className:h,children:E})=>{const _=(0,o.usePortal)(p,h);return l.default.createPortal(E,_)};e.default=u},73215:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ResizeHandleVertical=e.ResizeHandleHorizontal=e.allowWebviewCatchMouseEvents=e.preventWebviewCatchMouseEvents=e.ResizeFlexMode=e.RESIZE_LOCK=void 0;const n=t(85608),l=n.__importDefault(t(53373)),o=n.__importDefault(t(14041)),u=n.__importDefault(t(57482));e.RESIZE_LOCK="resize-lock";var p;(function(m){m.Prev="prev",m.Next="next",m.Percentage="Percentage"})(p=e.ResizeFlexMode||(e.ResizeFlexMode={}));function h(){const m=document.getElementsByTagName("iframe"),d=document.getElementsByTagName("webview");for(const a of d)a.classList.add("none-pointer-event");for(const a of m)a.classList.add("none-pointer-event");const s=document.getElementsByClassName("shadow-root-host");for(const a of s)a?.classList.add("none-pointer-event")}e.preventWebviewCatchMouseEvents=h;function E(){const m=document.getElementsByTagName("iframe"),d=document.getElementsByTagName("webview");for(const a of d)a.classList.remove("none-pointer-event");for(const a of m)a.classList.remove("none-pointer-event");const s=document.getElementsByClassName("shadow-root-host");for(const a of s)a?.classList.remove("none-pointer-event")}e.allowWebviewCatchMouseEvents=E;const _=m=>{const d=o.default.useRef(),s=o.default.useRef(!1),a=o.default.useRef(0),r=o.default.useRef(0),c=o.default.useRef(0),g=o.default.useRef(),v=o.default.useRef(),b=o.default.useRef(),S=(N,B)=>{const k=d.current.parentElement.offsetWidth,F=m.findPrevElement?m.findPrevElement():g.current,W=m.findNextElement?m.findNextElement():v.current;if(F&&F.classList.contains(e.RESIZE_LOCK)||W&&W.classList.contains(e.RESIZE_LOCK))return;const j=Number(F?.dataset.minResize||0),H=Number(W?.dataset.minResize||0),K=Number(F?.dataset.maxResize||0),G=Number(W?.dataset.maxResize||0);(j||H)&&(N*k<=j||B*k<=H)||(K||G)&&(N*k>=K||B*k>=G)||(W&&(W.style.width=B*100+"%"),F&&(F.style.width=N*100+"%"),m.onResize&&W&&F&&m.onResize(F,W))},y=(N,B,k,F)=>{var W,j;const H=m.findPrevElement?m.findPrevElement(F):g.current,K=m.findNextElement?m.findNextElement(F):v.current,G=Number((W=H?.dataset.minResize)!==null&&W!==void 0?W:0),V=Number((j=K?.dataset.minResize)!==null&&j!==void 0?j:0),z=H?.dataset.maxResize?Number(H?.dataset.maxResize):null,U=K?.dataset.maxResize?Number(K?.dataset.maxResize):null,$=m.flexMode===p.Prev,Q=$?H:K,Y=$?K:H;let re=$?N:B;k||((G||V)&&($?G>N?re=G:V>B&&(re=N+B-V):V>B?re=V:G>N&&(re=N+B-G)),(z||U)&&($?z&&z<=N?re=z:U&&U>B&&(re=N+B-U):U&&U<=B?re=U:z&&z>B&&(re=N+B-z))),Q.style.width=re+"px",Q.style.flexGrow="0",Q.style.flexShrink="1",Y.style.width="0",Y.style.flexGrow="1",Y.style.flexShrink="0",m.onResize&&K&&H&&m.onResize(H,K)},A=(N,B)=>{const k=g.current,F=v.current;let W;m.flexMode?W=(k.offsetWidth+F.offsetWidth)/k.parentElement.offsetWidth*100:W=+v.current.style.width.replace("%","")+ +g.current.style.width.replace("%",""),F&&(F.style.width=B/(N+B)*W+"%"),k&&(k.style.width=N/(N+B)*W+"%"),T(N,B),m.onResize&&F&&k&&m.onResize(k,F)},T=(N,B)=>{const k=g.current,F=v.current;let W=!1;k&&(N===0?(k.classList.add("kt_display_none"),W=!0):k.classList.remove("kt_display_none")),F&&(B===0?(F.classList.add("kt_display_none"),W=!0):F.classList.remove("kt_display_none")),d.current&&(W?d.current.classList.add("none-pointer-event"):d.current.classList.remove("none-pointer-event"))},D=()=>{const N=g.current.clientWidth,B=v.current.clientWidth,k=N+B,F=[];return F.push(N/k),F.push(B/k),F},w=(N,B)=>{const k=g.current.clientWidth,F=v.current.clientWidth,W=k+F;if(m.flexMode){const j=m.flexMode===p.Prev?N:W-N,H=m.flexMode===p.Next?N:W-N;y(j,H,!0)}else{const j=+v.current.style.width.replace("%","")+ +g.current.style.width.replace("%","");B?(v.current.style.width=j*(N/W)+"%",g.current.style.width=j*(1-N/W)+"%"):(g.current.style.width=j*(N/W)+"%",v.current.style.width=j*(1-N/W)+"%")}B?T(W-N,N):T(N,W-N),m.onResize&&m.onResize(g.current,v.current)},I=N=>N?v.current.clientWidth:g.current.clientWidth,O=N=>{const B=N.classList,k=u.default["resize-overflow-hidden"];B?.contains(k)||B.add(k)},M=N=>{const B=N.classList,k=u.default["resize-overflow-hidden"];B?.contains(k)&&B.remove(k)},R=N=>{if(N.preventDefault(),d.current&&d.current.classList.contains("no-resize"))return;const B=r.current+N.pageX-a.current,k=c.current-(N.pageX-a.current);b.current&&window.cancelAnimationFrame(b.current);const F=d.current.parentElement.offsetWidth;b.current=window.requestAnimationFrame(()=>{m.flexMode?y(B,k):S(B/F,k/F)})},P=N=>{var B;s.current=!1,(B=d.current)===null||B===void 0||B.classList.remove(u.default.active),document.removeEventListener("mousemove",R),document.removeEventListener("mouseup",P),M(g.current),M(v.current),m.onFinished&&m.onFinished(),E()},L=N=>{var B;s.current=!0,(B=d.current)===null||B===void 0||B.classList.add(u.default.active),document.addEventListener("mousemove",R),document.addEventListener("mouseup",P),a.current=N.pageX,r.current=g.current.offsetWidth,c.current=v.current.offsetWidth,O(g.current),O(v.current),h()};return o.default.useEffect(()=>(d.current&&(d.current.addEventListener("mousedown",L),g.current=d.current.previousSibling,v.current=d.current.nextSibling),()=>{d.current&&(d.current.removeEventListener("mousedown",L),d.current.removeEventListener("mousemove",R),d.current.removeEventListener("mouseup",P))}),[]),m.delegate&&m.delegate({setSize:S,setAbsoluteSize:w,getAbsoluteSize:I,setRelativeSize:A,getRelativeSize:D}),o.default.createElement("div",{ref:N=>{d.current=N},className:(0,l.default)({[u.default["resize-handle-horizontal"]]:!0,[u.default["with-color"]]:!m.noColor,[m.className||""]:!0})})};e.ResizeHandleHorizontal=_;const f=m=>{const d=o.default.useRef(),s=o.default.useRef(!1),a=o.default.useRef(0),r=o.default.useRef(0),c=o.default.useRef(0),g=o.default.useRef(),v=o.default.useRef(),b=o.default.useRef(),S=o.default.useRef(),y=o.default.useRef(),A=(B,k,F)=>{const W=m.findPrevElement?m.findPrevElement(F):g.current,j=m.findNextElement?m.findNextElement(F):v.current;!j||!W||W.classList.contains(e.RESIZE_LOCK)||j.classList.contains(e.RESIZE_LOCK)||(j.style.height=k*100+"%",W.style.height=B*100+"%",m.onResize&&m.onResize(W,j))},T=(B,k,F,W)=>{var j,H;const K=m.findPrevElement?m.findPrevElement(W):g.current,G=m.findNextElement?m.findNextElement(W):v.current;let V,z,U=0;const $=Number(((j=K?.dataset)===null||j===void 0?void 0:j.minResize)||0),Q=Number(((H=G?.dataset)===null||H===void 0?void 0:H.minResize)||0);m.flexMode===p.Prev?(V=K,z=G,U=B,F||($>B?U=$:Q>k&&(U=B+k-Q))):(V=G,z=K,U=k,F||(Q>k?U=Q:$>B&&(U=B+k-$))),V.style.height=U+"px",V.style.flexGrow="0",V.style.flexShrink="1",z.style.height="0",z.style.flexGrow="1",z.style.flexShrink="0",m.onResize&&G&&K&&m.onResize(K,G)},D=(B,k)=>{const F=g.current,W=v.current;let j;m.flexMode?j=(F.offsetHeight+W.offsetHeight)/F.parentElement.offsetHeight*100:j=+W.style.height.replace("%","")+ +F.style.height.replace("%",""),W&&(W.style.height=k/(B+k)*j+"%"),F&&(F.style.height=B/(B+k)*j+"%"),w(B,k),m.onResize&&W&&F&&m.onResize(F,W)},w=(B,k)=>{const F=g.current,W=v.current;let j=!1;F&&(B===0?(F.classList.add("kt_display_none"),j=!0):F.classList.remove("kt_display_none")),W&&(k===0?(W.classList.add("kt_display_none"),j=!0):W.classList.remove("kt_display_none")),d.current&&(j?d.current.classList.add("none-pointer-event"):d.current.classList.remove("none-pointer-event"))},I=()=>{const B=g.current.clientHeight,k=v.current.clientHeight,F=B+k,W=[];return W.push(B/F),W.push(k/F),W},O=(B,k,F,W)=>{F.classList.contains(e.RESIZE_LOCK)||W.classList.contains(e.RESIZE_LOCK)||(W.style.height=k+"px",F.style.height=B+"px",W.style.flex="unset",F.style.flex="unset",m.onResize&&W&&F&&m.onResize(F,W))},M=(B,k,F)=>{const W=g.current.clientHeight,j=v.current.clientHeight,H=W+j;if(m.flexMode){const K=m.flexMode===p.Prev?B:H-B,G=m.flexMode===p.Next?B:H-B;T(K,G,!0)}else{const K=+v.current.style.height.replace(/\%|px/,""),G=+g.current.style.height.replace(/\%|px/,""),V=K+G;if(k){F&&(g.current.style.height=V*(1-B/H)+"%");const z=V*(B/H);v.current.style.height=z===0?z+"px":z+"%"}else g.current.style.height=V*(B/H)+"%",F&&(v.current.style.height=V*(1-B/H)+"%")}k?w(H-B,B):w(B,H-B),m.onResize&&m.onResize(g.current,v.current)},R=B=>B?v.current.clientHeight:g.current.clientHeight,P=B=>{var k;s.current=!0,(k=d.current)===null||k===void 0||k.classList.add(u.default.active),document.addEventListener("mousemove",L),document.addEventListener("mouseup",N),a.current=B.pageY,S.current=v.current,b.current=g.current,r.current=g.current.offsetHeight,c.current=v.current.offsetHeight,h()},L=B=>{if(B.preventDefault(),d.current&&d.current.classList.contains("no-resize"))return;const k=B.pageY>a.current,F=m.findNextElement?m.findNextElement(k):null,W=m.findPrevElement?m.findPrevElement(k):null;if(F!==null&&S.current!==F||W!==null&&b.current!==W){if(!F||!W)return;S.current=F,b.current=W,a.current=B.pageY,r.current=b.current.offsetHeight,c.current=S.current.offsetHeight}const j=r.current+B.pageY-a.current,H=c.current-(B.pageY-a.current);y.current&&window.cancelAnimationFrame(y.current),y.current=window.requestAnimationFrame(()=>{const K=Number(b.current.dataset.minResize||0),G=Number(S.current.dataset.minResize||0);if(!((K||G)&&(j<=K||H<=G)))if(m.flexMode===p.Prev||m.flexMode===p.Next)T(j,H);else if(m.flexMode===p.Percentage){const V=d.current.parentElement.offsetHeight;A(j/V,H/V)}else O(j,H,b.current,S.current)})},N=B=>{var k;s.current=!1,(k=d.current)===null||k===void 0||k.classList.remove(u.default.active),document.removeEventListener("mousemove",L),document.removeEventListener("mouseup",N),m.onFinished&&m.onFinished(),E()};return o.default.useEffect(()=>(d.current.addEventListener("mousedown",P),g.current=d.current.previousSibling,v.current=d.current.nextSibling,()=>{d.current.removeEventListener("mousedown",P),document.removeEventListener("mousemove",L),document.removeEventListener("mouseup",N)}),[]),m.delegate&&m.delegate({setSize:A,setAbsoluteSize:M,getAbsoluteSize:R,setRelativeSize:D,getRelativeSize:I}),o.default.createElement("div",{ref:B=>B&&(d.current=B),className:(0,l.default)({[u.default["resize-handle-vertical"]]:!0,[m.className||""]:!0,[u.default["with-color"]]:!m.noColor})})};e.ResizeHandleVertical=f},77331:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Select=void 0;const n=t(85608),l=n.__importDefault(t(53373)),o=n.__importDefault(t(14041));n.__exportStar(t(88706),e);const u=p=>(p=Object.assign(Object.assign({},p),{className:(0,l.default)("kt_select",p.className)}),o.default.createElement("select",Object.assign({},p)));e.Select=u},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 l extends n.BasicEvent{}e.ContextKeyChangeEvent=l},50394:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),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)},20162:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DialogViewVisibleContext=void 0;const n=t(40191);e.DialogViewVisibleContext=new n.RawContextKey("dialogViewVisible",!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),l=t(63214);class o{constructor(p,h=l.getLanguageIdFromMonaco,E="resource"){if(this.contextKeyService=p,this.languageResolver=h,!E)throw new Error("resource key prefix cannot be empty!");this.resourceScheme=this.contextKeyService.createKey(E+"Scheme",""),this.resourceFilename=this.contextKeyService.createKey(E+"Filename",""),this.resourceExtname=this.contextKeyService.createKey(E+"Extname",""),this.resourceLangId=this.contextKeyService.createKey(E+"LangId",""),this.resourceKey=this.contextKeyService.createKey(E,""),this.isFileSystemResource=this.contextKeyService.createKey("isFileSystem"+E.substr(0,1).toUpperCase()+E.substr(1),!1)}set(p){if(!p){this.reset();return}const h=this.resourceKey.get();p.isEqual(new n.URI(h))||(this.resourceScheme.set(p.scheme),this.resourceFilename.set(p.path.name+p.path.ext),this.resourceExtname.set(p.path.ext),this.resourceLangId.set(this.languageResolver(p)),this.resourceKey.set(p.toString()),this.isFileSystemResource.set(p.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.WorkspaceFolderCount=e.WorkbenchState=void 0;const n=t(40191);e.WorkbenchState=new n.RawContextKey("workbenchState","empty"),e.WorkspaceFolderCount=new n.RawContextKey("workspaceFolderCount",0)},18193:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.injectCorePreferences=e.CorePreferences=e.corePreferenceSchema=e.FILE_TREE_DEFAULTS=e.FILES_DEFAULTS=void 0;const n=t(43718),l=t(69734),o=t(78132),u={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:{"general.language":{type:"string",enum:(0,n.getAvailableLanguages)().map(h=>h.languageId),default:l.LOCALE_TYPES.EN_US},"general.theme":{type:"string",default:"vs-dark",enum:[]},"general.askReloadOnLanguageChange":{type:"boolean",default:!0,description:"%preference.description.general.askReloadOnLanguageChange%"},"general.icon":{type:"string",default:"vs-minimal",enum:[]},"general.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:u.confirmDelete,description:"%preference.explorer.confirm.move%"},"explorer.confirmDelete":{type:"boolean",default:u.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:[`
27350
+ `)}return c}),`{"type": 1, "id": "${d}", "proxyId": "${s}", "method": "${a}", "args": ${JSON.stringify(r,h.replacer)}}`}static serializeReplyOK(d,s,a){if(typeof s>"u")return`{"type": 2, "id": "${d}"}`;try{return`{"type": 2, "id": "${d}", "res": ${JSON.stringify(s,h.replacer)}}`}catch{return a&&a.warn("res",s),`{"type": 2, "id": "${d}", "res": {}}`}}static serializeReplyError(d,s,a){try{return`{"type": 3, "id": "${d}", "res": ${JSON.stringify((0,n.transformErrorForSerialization)(s),h.replacer)}}`}catch{return a&&a.error("error",s),`{"type": 3, "id": "${d}", "res": {}}`}}}e.MessageIO=E;function _(){const m=new Error("Canceled");return m.name=m.message,m}class f{constructor(d,s){this._protocol=d,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=s||console,this.logger.error("You are using the deprecated class: 'RPCProtocol'. Please use the new one: 'SumiConnectionMultiplexer'"),this._protocol.onMessage(a=>this._receiveOneMessage(a))}set(d,s){return this._locals.set(d.serviceId,s),s}get(d){return this._locals.get(d.serviceId)}getProxy(d){return this._proxies.has(d.serviceId)||this._proxies.set(d.serviceId,this._createProxy(d.serviceId)),this._proxies.get(d.serviceId)}_createProxy(d){const s={get:(a,r)=>typeof r=="symbol"?null:(!a[r]&&r.charCodeAt(0)===36&&(a[r]=(...c)=>this._remoteCall(d,r,c)),a[r])};return new Proxy(Object.create(null),s)}_remoteCall(d,s,a){const r=a.length&&n.CancellationToken.isCancellationToken(a[a.length-1])?a.pop():void 0;if(r&&r.isCancellationRequested)return Promise.reject(_());const c=String(++this._lastMessageId),g=new n.Deferred;r&&(a.push("add.cancellation.token"),r.onCancellationRequested(()=>this._protocol.send(E.cancel(c)))),this._pendingRPCReplies.set(c,g);const v=E.serializeRequest(c,d,s,a);if(this._protocol.send(v),this._protocol.timeout&&this._protocol.timeout!==-1){const b=setTimeout(()=>{this._handleTimeout(c)},this._protocol.timeout);this._timeoutHandles.set(c,b)}return g.promise}_receiveOneMessage(d){const s=JSON.parse(d,h.reviver);switch(this._timeoutHandles.has(s.id)&&(typeof clearTimeout=="function"&&clearTimeout(this._timeoutHandles.get(s.id)),this._timeoutHandles.delete(s.id)),s.type){case 1:this._receiveRequest(s);break;case 2:this._receiveReply(s);break;case 4:this._receiveCancel(s);break;case 3:this._receiveError(s);break}}_receiveCancel(d){const s=this._cancellationTokenSources.get(d.id);s&&s.cancel()}_receiveError(d){const s=d.id;if(!this._pendingRPCReplies.has(s))return;const a=this._pendingRPCReplies.get(s);this._pendingRPCReplies.delete(s);let r;d.res&&(d.res.$isError?(r=new Error,r.name=d.res.name,r.message=d.res.message,r.stack=d.res.stack):r=d.res),a.reject(r)}_receiveRequest(d){const s=d.id,a=d.proxyId,r=d.method,c=d.args.map(b=>b===null?void 0:b);if(c.length&&c[c.length-1]==="add.cancellation.token"?c.pop():!1){const b=new n.CancellationTokenSource;this._cancellationTokenSources.set(s,b),c.push(b.token)}this._invokeHandler(a,r,c).then(b=>{this._protocol.send(E.serializeReplyOK(s,b)),this._cancellationTokenSources.delete(s)}).catch(b=>{this._protocol.send(E.serializeReplyError(s,b)),this._cancellationTokenSources.delete(s)})}_invokeHandler(d,s,a){try{return this._doInvokeHandler(d,s,a)}catch(r){return Promise.reject(r)}}async _doInvokeHandler(d,s,a){const r=this._locals.get(d);if(!r)throw new Error("Unknown actor "+d);const c=await r[s];if(typeof c!="function")throw new Error("Unknown method "+s+" on actor "+d);return c.apply(r,a)}_receiveReply(d){const s=d.id;if(!this._pendingRPCReplies.has(s))return;const a=this._pendingRPCReplies.get(s);this._pendingRPCReplies.delete(s),a.resolve(d.res)}_handleTimeout(d){if(!this._pendingRPCReplies.has(d)||!this._timeoutHandles.has(d))return;const s=this._pendingRPCReplies.get(d);this._pendingRPCReplies.delete(d),this._timeoutHandles.delete(d),s.reject(new Error("RPC Timeout: "+d))}}e.RPCProtocol=f},76271:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.RPCServiceChannelPath=e.BaseCommonChannelHandler=e.commonChannelPathHandler=e.CommonChannelPathHandler=void 0;const n=t(47561);class l{constructor(){this.handlerMap=new Map,this.paramsKey=new Map}register(p,h){const E=p.indexOf("/:"),_=E>=0;let f=p;_&&(f=p.slice(0,E),this.paramsKey.set(f,p.slice(E+2))),this.handlerMap.has(f)||this.handlerMap.set(f,[]);const m=this.handlerMap.get(f),d=h.handler.bind(h),s=(a,r,c)=>{h.connection=a,d(a,r,c)};h.handler=s,m.push(h),this.handlerMap.set(f,m)}getParams(p,h){const E={};if(this.paramsKey.has(p)){const _=this.paramsKey.get(p);_&&(E[_]=h)}return E}removeHandler(p,h){const E=p.indexOf(":"),_=E>=0;let f=p;_&&(f=p.slice(0,E));const m=this.handlerMap.get(f)||[],d=m.indexOf(h);d!==-1&&m.splice(d,1),this.handlerMap.set(p,m)}get(p){return this.handlerMap.get(p)}disposeConnectionClientId(p,h){this.handlerMap.forEach(E=>{E.forEach(_=>{_.dispose(p,h)})})}openChannel(p,h,E){let _=this.get(p),f;if(!_){const m=p.indexOf("/");m>=0&&(_=this.get(p.slice(0,m)),f=this.getParams(p.slice(0,m),p.slice(m+1)))}if(_)for(let m=0,d=_.length;m<d;m++)_[m].handler(h,E,f)}getAll(){return Array.from(this.handlerMap.values())}}e.CommonChannelPathHandler=l,e.commonChannelPathHandler=new l;class o{constructor(p,h=console){this.handlerId=p,this.logger=h,this.channelMap=new Map,this.heartbeatTimer=null}heartbeat(p){this.heartbeatTimer&&clearTimeout(this.heartbeatTimer),this.heartbeatTimer=t.g.setTimeout(()=>{this.doHeartbeat(p),this.heartbeat(p)},5e3)}receiveConnection(p){let h;this.heartbeat(p);const E=(_,f)=>{let m=this.channelMap.get(_);return m||(m=new n.WSServerChannel(p,{id:_,clientId:f,logger:this.logger}),this.channelMap.set(_,m)),m};p.onMessage(_=>{let f;try{switch(f=(0,n.parse)(_),f.kind){case"ping":p.send(n.pongMessage);break;case"open":{const{id:m,path:d,connectionToken:s}=f;h=f.clientId,this.logger.log(`open a new connection channel ${h} with path ${d}`);const a=E(m,h);e.commonChannelPathHandler.openChannel(d,a,h),a.serverReady(s);break}default:{const{id:m}=f,d=this.channelMap.get(m);d?d.dispatch(f):(p.send((0,n.stringify)({kind:"error",id:m,code:n.ErrorMessageCode.ChannelNotFound,message:`channel ${m} not found`})),this.logger.warn(`channel ${m} is not found`))}}}catch(m){this.logger.error("handle connection message error",m)}}),p.onceClose(()=>{this.logger.log(`connection ${h} is closed, dispose all channels`),e.commonChannelPathHandler.disposeConnectionClientId(p,h),Array.from(this.channelMap.values()).filter(_=>_.clientId===h).forEach(_=>{_.close(1,"close"),_.dispose(),this.channelMap.delete(_.id),this.logger.log(`Remove connection channel ${_.id}`)})})}dispose(){this.heartbeatTimer&&clearTimeout(this.heartbeatTimer)}}e.BaseCommonChannelHandler=o,e.RPCServiceChannelPath="RPCService"},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||(e.ServiceType={}))},47561:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.pongMessage=e.pingMessage=e.parse=e.stringify=e.CloseProtocol=e.BinaryProtocol=e.DataProtocol=e.ErrorProtocol=e.ErrorMessageCode=e.ServerReadyProtocol=e.OpenProtocol=e.PongProtocol=e.PingProtocol=e.WSServerChannel=e.WSChannel=void 0;const n=t(26387),l=t(40396),o=t(43718),u=t(94846),p=t(97349);class h{static forClient(c,g){const v=new o.DisposableCollection,b=new h(c,g);return v.push(c.onMessage(S=>{b.dispatch(d(S))})),c.onceClose(()=>{v.dispose()}),b}constructor(c,g){this.connection=c,this._disposables=new o.DisposableStore,this.emitter=this._disposables.add(new l.EventEmitter),this.onBinaryQueue=this._disposables.add(new o.EventQueue),this.sendQueue=[],this._isServerReady=!1,this.logger=console,this.stateTracer=this._disposables.add(new o.StateTracer);const{id:v,logger:b,ensureServerReady:S}=g;this.id=v,b&&(this.logger=b),this._ensureServerReady=!!S,this._disposables.add(this.emitter.on("binary",y=>this.onBinaryQueue.push(y)))}inqueue(c){if(this._ensureServerReady&&!this._isServerReady){this.sendQueue||(this.sendQueue=[]),this.sendQueue.push(c);return}this.connection.send(c)}onMessage(c){return this.emitter.on("message",c)}onBinary(c){return this.onBinaryQueue.on(c)}onOpen(c){return this.emitter.on("open",c)}onReopen(c){return this.emitter.on("reopen",c)}pause(){this._isServerReady=!1}onServerReady(c){if(this._isServerReady){c();return}return this.emitter.on("open",c)}resume(){if(this._isServerReady=!0,this.sendQueue){for(const c of this.sendQueue)this.connection.send(c);this.sendQueue=[]}}dispatch(c){switch(c.kind){case"server-ready":this.stateTracer.fulfill(c.token),this.resume(),this.timer&&clearTimeout(this.timer),this.emitter.emit("open",c.id);break;case"data":this.emitter.emit("message",c.content);break;case"binary":this.emitter.emit("binary",c.binary);break}}open(c,g,v=(0,o.randomString)(16)){if(this.channelPath=c,this.stateTracer.has(v)){this.logger.warn(`channel already opened or in progress, path: ${c}, clientId: ${g}, connectionToken: ${v}`);return}return this.stateTracer.record(v),this.connection.send(m({kind:"open",id:this.id,path:c,clientId:g,connectionToken:v})),this._ensureServerReady&&this.ensureOpenSend(c,g,v),v}ensureOpenSend(c,g,v){this.timer&&clearTimeout(this.timer),this.timer=setTimeout(()=>{this._isServerReady||(this.stateTracer.delete(v),this.open(c,g,v))},500)}send(c){this.inqueue(m({kind:"data",id:this.id,content:c}))}sendBinary(c){this.inqueue(m({kind:"binary",id:this.id,binary:c}))}onError(){}close(c,g){this.pause(),this.emitter.emit("close",c,g)}fireReopen(){this.emitter.emit("reopen")}onClose(c){return this.emitter.on("close",c)}onceClose(c){return this.emitter.once("close",c)}createConnection(){return{onceClose:c=>this.onceClose(c),onMessage:c=>this.onBinary(c),send:c=>{this.sendBinary(c)},dispose(){}}}createSumiConnection(c={}){return new p.SumiConnection(this.createConnection(),c)}dispose(){this.timer&&clearTimeout(this.timer),this.sendQueue=[],this._disposables.dispose()}}e.WSChannel=h;class E extends h{constructor(c,g){super(c,g),this.connection=c,this.messageQueue=[],this.clientId=g.clientId}serverReady(c){this.connection.send(m({kind:"server-ready",id:this.id,token:c}))}dispatch(c){switch(c.kind){case"data":this.emitter.emit("message",c.content);break;case"binary":this.emitter.emit("binary",c.binary);break}}}e.WSServerChannel=E,e.PingProtocol=n.Type.object("ping",{clientId:n.Type.string(),id:n.Type.string()}),e.PongProtocol=n.Type.object("pong",{clientId:n.Type.string(),id:n.Type.string()}),e.OpenProtocol=n.Type.object("open",{clientId:n.Type.string(),id:n.Type.string(),path:n.Type.string(),connectionToken:n.Type.string()}),e.ServerReadyProtocol=n.Type.object("server-ready",{id:n.Type.string(),token:n.Type.string()});var _;(function(r){r[r.ChannelNotFound=1]="ChannelNotFound"})(_=e.ErrorMessageCode||(e.ErrorMessageCode={})),e.ErrorProtocol=n.Type.object("error",{id:n.Type.string(),code:n.Type.uint16(),message:n.Type.string()}),e.DataProtocol=n.Type.object("data",{id:n.Type.string(),content:n.Type.string()}),e.BinaryProtocol=n.Type.object("binary",{id:n.Type.string(),binary:n.Type.binary()}),e.CloseProtocol=n.Type.object("close",{id:n.Type.string(),code:n.Type.uint32(),reason:n.Type.string()});const f=(0,u.oneOf)([e.PingProtocol,e.PongProtocol,e.OpenProtocol,e.ServerReadyProtocol,e.DataProtocol,e.BinaryProtocol,e.CloseProtocol,e.ErrorProtocol]);function m(r){return f.serialize(r)}e.stringify=m;function d(r){return f.deserialize(r)}e.parse=d;const s={kind:"ping",id:"",clientId:""},a={kind:"pong",id:"",clientId:""};e.pingMessage=m(s),e.pongMessage=m(a)},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=void 0;const n=t(85608),l=t(76003),o=t(1149),u=t(11050);let p=class{constructor(){this.internalCapabilities={supportsMarkers:!1,supportsChatAssistant:!1,supportsInlineChat:!1,supportsInlineCompletion:!1,supportsConflictResolve:!1,supportsRenameSuggestions:!1,supportsTerminalDetection:!1,supportsTerminalCommandSuggest:!1}}setDefaultCapabilities(E){for(const _ in this.internalCapabilities)Object.prototype.hasOwnProperty.call(this.internalCapabilities,_)&&(this.internalCapabilities[_]=E)}enableCapabilities(){this.setDefaultCapabilities(!0)}disableCapabilities(){this.setDefaultCapabilities(!1)}get capabilities(){const{AINativeConfig:E}=this.appConfig;return E?.capabilities?Object.assign(Object.assign({},this.internalCapabilities),E.capabilities):this.internalCapabilities}};n.__decorate([(0,l.Autowired)(u.AppConfig),n.__metadata("design:type",Object)],p.prototype,"appConfig",void 0),n.__decorate([(0,l.Autowired)(o.LayoutViewSizeConfig),n.__metadata("design:type",o.LayoutViewSizeConfig)],p.prototype,"layoutViewSize",void 0),p=n.__decorate([(0,l.Injectable)()],p),e.AINativeConfigService=p},41480:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AIReporter=void 0;const n=t(85608),l=t(76003),o=t(43718),u=t(52664);let p=class{constructor(){this.reportInfoCache=new Map,this.reporterCancelHandler=new Map}getRelationId(){return(0,o.uuid)()}getCacheReportInfo(E){return this.reportInfoCache.get(E)}getCommonReportInfo(){return{}}start(E,_){const f=this.getRelationId();this.report(f,Object.assign(Object.assign({},_),{msgType:E,isStart:!0}));const m=setTimeout(()=>{this.report(f,Object.assign(Object.assign({},_),{success:!1}))},60*1e3);return this.reporterCancelHandler.set(f,m),f}end(E,_){const f=this.reporterCancelHandler.get(E);f&&clearTimeout(f),this.report(E,Object.assign(Object.assign({success:!0},_),{isStart:!1}))}record(E,_){_||(_=this.getRelationId());const f=this.reportInfoCache.get(_)||{},m=Object.assign(Object.assign(Object.assign(Object.assign({},this.getCommonReportInfo()),f),E),{relationId:_});return this.reportInfoCache.set(_,m),m}report(E,_){const f=this.record(_,E);this.reporter.point(u.AI_REPORTER_NAME,_.msgType||f.msgType,f)}};n.__decorate([(0,l.Autowired)(o.IReporterService),n.__metadata("design:type",Object)],p.prototype,"reporter",void 0),p=n.__decorate([(0,l.Injectable)()],p),e.AIReporter=p},57925:(x,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AI_CHAT_VISIBLE=e.AI_INLINE_COMPLETION_REPORTER=e.AI_INLINE_COMPLETION_VISIBLE=e.AI_INLINE_CHAT_VISIBLE=void 0,e.AI_INLINE_CHAT_VISIBLE={id:"ai.inline.chat.visible"},e.AI_INLINE_COMPLETION_VISIBLE={id:"ai.inline.completion.visible"},e.AI_INLINE_COMPLETION_REPORTER={id:"ai.inline.completion.reporter"},e.AI_CHAT_VISIBLE={id:"ai.chat.visible"}},38070:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MergeConflictReportService=void 0;const n=t(85608),l=t(76003),o=t(43718),u=t(70650);let p=class extends o.Disposable{constructor(){super(...arguments),this.reportInfoMap=new Map,this.unique2RelationMap=new Map}record(E,_){if(!this.aiNativeConfigService.capabilities.supportsConflictResolve)return _;let f="";return this.unique2RelationMap.has(E)?(f=this.unique2RelationMap.get(E),this.aiReporter.record(_,f)):(f=this.aiReporter.record(Object.assign(Object.assign({},_),{msgType:o.AISerivceType.MergeConflict,message:o.AISerivceType.MergeConflict,editorMode:_.editorMode||o.MergeConflictEditorMode.traditional})).relationId,this.unique2RelationMap.set(E,f)),Object.assign(Object.assign({},_),{relationId:f})}report(E,_){if(!this.aiNativeConfigService.capabilities.supportsConflictResolve)return;const f=this.record(E,_);this.aiReporter.end(f.relationId,f)}reportIncrementNum(E,_){if(!this.aiNativeConfigService.capabilities.supportsConflictResolve)return;const f=this.unique2RelationMap.get(E);if(!f)return;const m=this.aiReporter.getCacheReportInfo(f)[_]||0;this.report(E,{[_]:m+1})}dispose(){super.dispose(),this.reportInfoMap.clear()}};n.__decorate([(0,l.Autowired)(u.AINativeConfigService),n.__metadata("design:type",u.AINativeConfigService)],p.prototype,"aiNativeConfigService",void 0),n.__decorate([(0,l.Autowired)(o.IAIReporter),n.__metadata("design:type",Object)],p.prototype,"aiReporter",void 0),p=n.__decorate([(0,l.Injectable)()],p),e.MergeConflictReportService=p},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),l=t(76003),o=t(43718);class u extends o.BasicEvent{}e.ClientAppStateEvent=u;let p=class{constructor(){this._state="init",this.deferred={}}get state(){return this._state}set state(E){E!==this._state&&(this._state=E,this.deferred[E]===void 0&&(this.deferred[E]=new o.Deferred),this.deferred[E].resolve(),this.eventBus.fire(new u(E)))}reachedState(E){return this.deferred[E]===void 0&&(this.deferred[E]=new o.Deferred),this.deferred[E].promise}reachedAnyState(...E){return Promise.race(E.map(_=>this.reachedState(_)))}};n.__decorate([(0,l.Autowired)(o.IEventBus),n.__metadata("design:type",Object)],p.prototype,"eventBus",void 0),p=n.__decorate([(0,l.Injectable)()],p),e.ClientAppStateService=p},59555:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ApplicationService=void 0;const n=t(85608),l=t(76003),o=t(59019),u=t(43718),p=t(11050),h=t(42101);let E=class{constructor(){this._initialized=new u.Deferred}async initializeData(){this._backendOS=await this.commonServer.getBackendOS(),this._initialized.resolve()}get frontendOS(){return u.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?h.electronEnv.currentWindowId:this.injector.get(o.WSChannelHandler).clientId}};n.__decorate([(0,l.Autowired)(u.CommonServerPath),n.__metadata("design:type",Object)],E.prototype,"commonServer",void 0),n.__decorate([(0,l.Autowired)(p.AppConfig),n.__metadata("design:type",Object)],E.prototype,"appConfig",void 0),n.__decorate([(0,l.Autowired)(l.INJECTOR_TOKEN),n.__metadata("design:type",l.Injector)],E.prototype,"injector",void 0),E=n.__decorate([(0,l.Injectable)()],E),e.ApplicationService=E},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)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CONNECTION_HELPER_TOKEN=e.BaseConnectionHelper=void 0;class t{}e.BaseConnectionHelper=t,e.CONNECTION_HELPER_TOKEN=Symbol("CONNECTION_HELPER_TOKEN")},41320:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BrowserRuntime=void 0;const n=t(85608),l=t(76003),o=t(38578),u=t(44142),p=t(6858),h=t(53206);let E=class{constructor(){this.runtimeName=u.ESupportRuntime.Web}registerRuntimeModuleProviders(f,m){m.webProviders&&f.addProviders(...m.webProviders)}registerRuntimeInnerProviders(f){(0,h.injectBrowserInnerProviders)(f)}mergeAppConfig(f){return f}async provideResourceUri(f){switch(f){case p.EKnownResources.OnigWasm:return this.appConfig.onigWasmUri||u.onigWasmCDNUri;case p.EKnownResources.TreeSitterWasmDirectory:return this.appConfig.treeSitterWasmDirectoryUri||u.treeSitterWasmCDNUri;default:throw new Error(`Unknown resource: ${f}`)}}};n.__decorate([(0,l.Autowired)(o.AppConfig),n.__metadata("design:type",Object)],E.prototype,"appConfig",void 0),E=n.__decorate([(0,l.Injectable)()],E),e.BrowserRuntime=E},53206:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.injectBrowserInnerProviders=void 0;const n=t(93899),l=t(97222);function o(u){u.addProviders({token:n.ICtxMenuRenderer,useClass:l.BrowserCtxMenuRenderer})}e.injectBrowserInnerProviders=o},55267:(x,e,t)=>{"use strict";var n;Object.defineProperty(e,"__esModule",{value:!0}),e.WebConnectionHelper=void 0;const l=t(85608),o=t(76003),u=t(91493),p=t(43718),h=t(22914);let E=n=class extends h.BaseConnectionHelper{constructor(f){super(),this.options=f,this.clientId=n.clientIdFactory()}getDefaultClientId(){return this.clientId}createConnection(){return u.ReconnectingWebSocketConnection.forURL(this.options.connectionPath,this.options.connectionProtocols)}static clientIdFactory(){return`CLIENT_ID_${(0,p.uuid)()}`}};E=n=l.__decorate([(0,o.Injectable)({multiple:!0}),l.__metadata("design:paramtypes",[Object])],E),e.WebConnectionHelper=E},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||(e.ESupportRuntime={})),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),l=t(76003),o=t(38578),u=t(42101),p=t(44142),h=t(6858),E=t(38892);let _=class{constructor(){this.runtimeName=p.ESupportRuntime.Electron}registerRuntimeModuleProviders(d,s){s.electronProviders&&d.addProviders(...s.electronProviders)}registerRuntimeInnerProviders(d){(0,E.injectElectronInnerProviders)(d)}mergeAppConfig(d){return f(d)}async provideResourceUri(d){switch(d){case h.EKnownResources.OnigWasm:return u.electronEnv.onigWasmUri||this.appConfig.onigWasmUri||p.onigWasmCDNUri;case h.EKnownResources.TreeSitterWasmDirectory:return u.electronEnv.treeSitterWasmDirectoryUri||this.appConfig.treeSitterWasmDirectoryUri||p.treeSitterWasmCDNUri;default:throw new Error(`Unknown resource: ${d}`)}}};n.__decorate([(0,l.Autowired)(o.AppConfig),n.__metadata("design:type",Object)],_.prototype,"appConfig",void 0),_=n.__decorate([(0,l.Injectable)()],_),e.ElectronRendererRuntime=_;function f(m){var d;const s=(d=u.electronEnv.metadata)!==null&&d!==void 0?d:{},a=Object.assign(Object.assign({},m),{appRoot:m.appRoot||u.electronEnv.appPath,extensionDir:m.extensionDir||s.extensionDir});return s.extensionDevelopmentHost&&(m.extensionDevelopmentHost=s.extensionDevelopmentHost),s.extensionCandidate&&(m.extensionCandidate=(m.extensionCandidate||[]).concat(u.electronEnv.metadata.extensionCandidate||[])),a}},38892:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.injectElectronInnerProviders=void 0;const n=t(43718),l=t(37406),o=t(93899),u=t(27790),p=t(11050),h=t(42101);function E(_){const f=_.get(p.AppConfig);_.addProviders({token:n.IElectronMainMenuService,useValue:(0,h.createElectronMainApi)(n.IElectronMainMenuService,f.devtools)},{token:l.IElectronMainUIService,useValue:(0,h.createElectronMainApi)(l.IElectronMainUIService,f.devtools)},{token:l.IElectronMainLifeCycleService,useValue:(0,h.createElectronMainApi)(l.IElectronMainLifeCycleService,f.devtools)},{token:l.IElectronURLService,useValue:(0,h.createElectronMainApi)(l.IElectronURLService,f.devtools)},{token:u.IElectronMenuFactory,useClass:u.ElectronMenuFactory},{token:u.IElectronMenuBarService,useClass:u.ElectronMenuBarService},{token:o.ICtxMenuRenderer,useClass:u.ElectronCtxMenuRenderer})}e.injectElectronInnerProviders=E},63977:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ElectronConnectionHelper=void 0;const n=t(85608),l=t(76003),o=t(42101),u=t(22914);let p=class extends u.BaseConnectionHelper{getDefaultClientId(){return o.electronEnv.metadata.windowClientId}createConnection(){return(0,o.createNetSocketConnection)()}};p=n.__decorate([(0,l.Injectable)({multiple:!0})],p),e.ElectronConnectionHelper=p},18379:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});const n=t(85608);n.__exportStar(t(55267),e),n.__exportStar(t(63977),e),n.__exportStar(t(44142),e)},6858:(x,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IRendererRuntime=e.EKnownResources=void 0;var t;(function(n){n.OnigWasm="wasm:onig",n.TreeSitterWasmDirectory="wasm:tree-sitter"})(t=e.EKnownResources||(e.EKnownResources={})),e.IRendererRuntime=Symbol("IRendererRuntime")},37638:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AuthenticationContribution=void 0;const n=t(85608),l=t(76003),o=t(43718),u=t(66549);let p=class{onStart(){this.authenticationService.initialize()}registerCommands(E){E.registerCommand({id:o.noAccountsId,label:"%authentication.noAccounts%"},{execute:()=>{}})}};n.__decorate([(0,l.Autowired)(o.IAuthenticationService),n.__metadata("design:type",Object)],p.prototype,"authenticationService",void 0),p=n.__decorate([(0,o.Domain)(u.ClientAppContribution,o.CommandContribution)],p),e.AuthenticationContribution=p},10605:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AuthenticationService=void 0;const n=t(85608),l=t(76003),o=t(43718),u=t(93899);let p=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 E=new Map;this.onDidChangeSessions(async _=>{if(_.event.added.length>0){const f=await this.getSessions(_.providerId);f.forEach(m=>{if(f.find(S=>E.get(S.id)))return;const d=new o.DisposableCollection,s=`account-sign-out-${_.providerId}-${m.id}`,a=this.commands.registerCommand({id:s,label:(0,o.formatLocalize)("authentication.signOut",_.label)},{execute:async()=>{await this.signOutOfAccount(_.providerId,m.account.label)}}),r=`manage-trusted-${_.providerId}-${m.id}`,c=this.commands.registerCommand({id:r,label:"%authentication.manageTrustedExtensions%"},{execute:async()=>{await this.manageTrustedExtensionsForAccount(_.providerId,m.account.label)}}),g=`${_.providerId}${m.account.label}`,v=this.menus.registerMenuItem(u.MenuId.AccountsContext,{submenu:g,label:`${m.account.label} (${_.label})`}),b=this.menus.registerMenuItems(g,[{command:r},{command:s}]);d.push(v),d.push(b),d.push(a),d.push(c),E.set(m.id,d)})}_.event.removed.length>0&&_.event.removed.forEach(f=>{const m=E.get(f.id);m&&(m.dispose(),E.delete(f.id))})})}get storage(){return this._storage}registerAuthenticationProvider(E,_){this._authenticationProviders.set(E,_),this._onDidRegisterAuthenticationProvider.fire({id:E,label:_.label}),this.updateAccountsMenuItem()}async sessionsUpdate(E,_){const f=this._authenticationProviders.get(E);f&&(this._onDidChangeSessions.fire({providerId:E,label:f.label,event:_}),await f.updateSessionItems(_),this.updateAccountsMenuItem(),_.added&&await this.updateNewSessionRequests(f))}async updateNewSessionRequests(E){const _=this._signInRequestItems.get(E.id);if(!_)return;const f=await E.getSessions();Object.keys(_).forEach(m=>{if(f.some(d=>d.scopes.slice().sort().join("")===m)){const d=_[m];d&&d.disposables.forEach(s=>s.dispose()),delete _[m],Object.keys(_).length===0?this._signInRequestItems.delete(E.id):this._signInRequestItems.set(E.id,_)}})}getTrustedKey(E,_){return`trusted-${E}-${_}`}async getAllowedExtensions(E,_){const f=this.getTrustedKey(E,_);let m=[];try{const d=await this.storage.get(f);d&&(m=JSON.parse(d))}catch(d){this.logger.warn("read allow extensions error: "+d)}return m}async setAllowedExtensions(E,_,f){const m=this.getTrustedKey(E,_);await this.storage.set(m,JSON.stringify(f))}async removeAllowedExtensions(E,_){const f=this.getTrustedKey(E,_);await this.storage.delete(f)}async updatedAllowedExtension(E,_,f,m,d){const s=await this.getAllowedExtensions(E,_),a=s.findIndex(r=>r.id===f);a===-1?s.push({id:f,name:m,allowed:d}):s[a].allowed=d,await this.setAllowedExtensions(E,_,s)}async isAccessAllowed(E,_,f){const d=(await this.getAllowedExtensions(E,_)).find(s=>s.id===f);return d?d.allowed!==void 0?d.allowed:!0:!1}async tryActivateProvider(E){await this.eventBus.fireAndAwait(new o.ExtensionActivateEvent({topic:"onView",data:E}));let _=this._authenticationProviders.get(E);if(_)return _;const f=new Promise((d,s)=>{this.onDidRegisterAuthenticationProvider(a=>{if(a.id===E)if(_=this._authenticationProviders.get(E),_)d(_);else throw new Error(`No authentication provider '${E}' is currently registered.`)})}),m=new Promise((d,s)=>{setTimeout(()=>{s(new Error(`didRegister ${E} timeout`))},5e3)});return Promise.race([f,m])}async getSessions(E){try{return await(this._authenticationProviders.get(E)||await this.tryActivateProvider(E)).getSessions()}catch{throw new Error(`No authentication provider '${E}' is currently registered.`)}}isAuthenticationProviderRegistered(E){return this._authenticationProviders.has(E)}getProviderIds(){const E=[];return this._authenticationProviders.forEach(_=>{E.push(_.id)}),E}unregisterAuthenticationProvider(E){const _=this._authenticationProviders.get(E);_&&(_.dispose(),this._authenticationProviders.delete(E),this._onDidUnregisterAuthenticationProvider.fire({id:E,label:_.label}),this.updateAccountsMenuItem())}updateAccountsMenuItem(){let E=!1;this._authenticationProviders.forEach(_=>{E=E||_.hasSessions()}),E&&this._noAccountsMenuItem&&(this._noAccountsMenuItem.dispose(),this._noAccountsMenuItem=void 0),!E&&!this._noAccountsMenuItem&&(this._noAccountsMenuItem=this.menus.registerMenuItem(u.MenuId.AccountsContext,{group:"0_accounts",command:o.noAccountsId}))}async requestNewSession(E,_,f,m){let d=this._authenticationProviders.get(E);if(d||await new Promise((s,a)=>{this.onDidRegisterAuthenticationProvider(r=>{r.id===E&&(d=this._authenticationProviders.get(E),s())})}),d){const s=this._signInRequestItems.get(E),a=_.sort().join("");if(s&&s[a]&&s[a].requestingExtensionIds.includes(f))return;const c=this.commands.registerCommand({id:`${f}signIn`,label:(0,o.formatLocalize)("authentication.signInRequests",m)},{execute:async()=>{const v=await this.login(E,_),b=v.account.label,S=await this.getAllowedExtensions(E,b);S.find(y=>y.id===f)||(S.push({id:f,name:m}),await this.setAllowedExtensions(E,b,S)),await this.setExtensionSessionId(m,E,v.id)}}),g=this.menus.registerMenuItem(u.MenuId.AccountsContext,{group:"2_signInRequests",command:`${f}signIn`});if(s){const v=s[a]||{disposables:[],requestingExtensionIds:[]};s[a]={disposables:[...v.disposables,g,c],requestingExtensionIds:[...v.requestingExtensionIds,f]},this._signInRequestItems.set(E,s)}else this._signInRequestItems.set(E,{[a]:{disposables:[g,c],requestingExtensionIds:[f]}})}}getLabel(E){const _=this._authenticationProviders.get(E);if(_)return _.label;throw new Error(`No authentication provider '${E}' has been declared.`)}supportsMultipleAccounts(E){const _=this._authenticationProviders.get(E);if(_)return _.supportsMultipleAccounts;throw new Error(`No authentication provider '${E}' is currently registered.`)}async login(E,_){try{return await(this._authenticationProviders.get(E)||await this.tryActivateProvider(E)).login(_)}catch(f){throw new Error(`No authentication provider '${E}' is currently registered, error messge: ${f.message}`)}}logout(E,_){const f=this._authenticationProviders.get(E);if(f)return f.logout(_);throw new Error(`No authentication provider '${E}' is currently registered.`)}manageTrustedExtensionsForAccount(E,_){const f=this._authenticationProviders.get(E);if(f)return f.manageTrustedExtensions(_);throw new Error(`No authentication provider '${E}' is currently registered.`)}signOutOfAccount(E,_){const f=this._authenticationProviders.get(E);if(f)return f.signOut(_);throw new Error(`No authentication provider '${E}' is currently registered.`)}getUsagesKey(E,_){return`usages-${E}-${_}`}async getAccountUsages(E,_){const f=this.getUsagesKey(E,_),m=await this.storage.get(f);let d=[];if(m)try{d=JSON.parse(m)}catch(s){this.logger.warn("parse account usages error: "+s)}return d}async addAccountUsage(E,_,f,m){const d=this.getUsagesKey(E,_),s=await this.getAccountUsages(E,_),a=s.findIndex(r=>r.extensionId===f);a>-1?s.splice(a,1,{extensionId:f,extensionName:m,lastUsed:Date.now()}):s.push({extensionId:f,extensionName:m,lastUsed:Date.now()}),await this.storage.set(d,JSON.stringify(s))}async removeAccountUsage(E,_){const f=this.getUsagesKey(E,_);await this.storage.delete(f)}getExtensionSessionIdKey(E,_){return`session-${E}-${_}`}async getExtensionSessionId(E,_){const f=this.getExtensionSessionIdKey(E,_);return await this.storage.get(f)}async setExtensionSessionId(E,_,f){const m=this.getExtensionSessionIdKey(E,_);await this.storage.set(m,f)}async removeExtensionSessionId(E,_){const f=this.getExtensionSessionIdKey(E,_);await this.storage.delete(f)}};n.__decorate([(0,l.Autowired)(o.ILogger),n.__metadata("design:type",Object)],p.prototype,"logger",void 0),n.__decorate([(0,l.Autowired)(o.StorageProvider),n.__metadata("design:type",Function)],p.prototype,"getStorage",void 0),n.__decorate([(0,l.Autowired)(o.IEventBus),n.__metadata("design:type",Object)],p.prototype,"eventBus",void 0),n.__decorate([(0,l.Autowired)(u.IMenuRegistry),n.__metadata("design:type",u.IMenuRegistry)],p.prototype,"menus",void 0),n.__decorate([(0,l.Autowired)(o.CommandRegistry),n.__metadata("design:type",Object)],p.prototype,"commands",void 0),p=n.__decorate([(0,l.Injectable)()],p),e.AuthenticationService=p},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;const l=t(85608);t(29810);const o=t(76003),u=t(18740),p=t(43718),h=t(4588),E=t(37406),_=t(16884),f=t(18379),m=t(22914),d=t(41320),s=t(59574),a=t(6858),r=t(36206),c=t(66963),g=t(18193),v=t(41118),b=t(1149),S=t(11949),y=t(64102),A=t(78132),T=t(11050),D=t(67304),w=t(79951),I=t(79248),O=t(96302),M=t(71843);t(99696);class R{constructor(L){var N,B,k;this.opts=L,this.appInitialized=new p.Deferred,this.browserModules=[],this._disposables=new p.DisposableCollection,this._inComposition=!1,this._handleBeforeUpload=re=>{if(this.config.isElectronRenderer){if(this.stateService.state==="electron_confirmed_close")return;re.returnValue="",re.preventDefault(),this.stateService.state!=="electron_asking_close"&&(this.stateService.state="electron_asking_close",this.preventStopElectron().then(se=>{if(se)this.stateService.state="ready";else return this.stopContributionsElectron().then(()=>{this.stateService.state="electron_confirmed_close";const le=this.injector.get(E.IElectronMainLifeCycleService);setTimeout(()=>{le.closeWindow(w.electronEnv.currentWindowId)},0)})}))}else if(this.preventStop())return(re||window.event).returnValue=!0,!0},this._handleUnload=()=>{this.stateService.state="closing_window",this.config.isElectronRenderer||(this.disposeSideEffect(),this.stopContributions())},this._handleResize=()=>{},this._handleKeydown=re=>{re&&re.target.name!==v.NO_KEYBINDING_NAME&&!this._inComposition&&this.keybindingService.run(re)},this._handleKeyup=re=>{this.keybindingService.resolveModifierKey(re)},this._handleCompositionstart=()=>{this._inComposition=!0},this._handleCompositionend=()=>{this._inComposition=!1},this._handleWheel=()=>{};const{modules:F,connectionPath:W,iconStyleSheets:j,useCdnIcon:H,editorBackgroundImage:K,defaultPreferences:G,allowSetDocumentTitleFollowWorkspaceDir:V=!0}=L,z=l.__rest(L,["modules","connectionPath","iconStyleSheets","useCdnIcon","editorBackgroundImage","defaultPreferences","allowSetDocumentTitleFollowWorkspaceDir"]);this.initEarlyPreference(L.workspaceDir||"");const U=(0,A.getPreferenceLanguageId)(G);(0,p.setLanguageId)(U),this.injector=L.injector||new o.Injector,this.modules=F,this.modules.forEach(re=>this.resolveModuleDeps(re)),this.browserModules=L.modulesInstances||[];const $=(N=L.isElectronRenderer)!==null&&N!==void 0?N:this.detectRuntime()===f.ESupportRuntime.Electron;this.config=Object.assign(Object.assign({appName:h.DEFAULT_APPLICATION_NAME,appHost:$?h.DEFAULT_APPLICATION_DESKTOP_HOST:h.DEFAULT_APPLICATION_WEB_HOST,appRoot:L.appRoot||"",uriScheme:h.DEFAULT_URI_SCHEME},z),{isElectronRenderer:$,workspaceDir:L.workspaceDir||"",extensionDir:L.extensionDir||"",injector:this.injector,wsPath:L.wsPath||`ws://${window.location.hostname}:8000`,layoutConfig:L.layoutConfig,editorBackgroundImage:L.editorBackgroundImage||K,allowSetDocumentTitleFollowWorkspaceDir:V,devtools:(B=L.devtools)!==null&&B!==void 0?B:!1,rpcMessageTimeout:L.rpcMessageTimeout||-1});const Q=this.injector.get(b.LayoutViewSizeConfig);Q.init(L.layoutViewSize),this.config.layoutViewSize=Q,this.injector.get(b.DesignLayoutConfig).setLayout(L.designLayout,(k=L.AINativeConfig)===null||k===void 0?void 0:k.layout),this.injector.addProviders({token:r.IClientApp,useValue:this}),this.injector.addProviders({token:T.AppConfig,useValue:this.config}),this.runtime=$?this.injector.get(s.ElectronRendererRuntime):this.injector.get(d.BrowserRuntime),this.injector.addProviders({token:a.IRendererRuntime,useValue:this.runtime}),this.config.devtools&&(window.__OPENSUMI_DEVTOOLS_GLOBAL_HOOK__={}),L.extensionDevelopmentPath&&(this.config.extensionCandidate=(this.config.extensionCandidate||[]).concat(Array.isArray(L.extensionDevelopmentPath)?L.extensionDevelopmentPath.map(re=>(0,p.asExtensionCandidate)(re,!0)):[(0,p.asExtensionCandidate)(L.extensionDevelopmentPath,!0)]),this.config.extensionDevelopmentHost=!0),this.config=this.runtime.mergeAppConfig(this.config),this.connectionPath=W||`${this.config.wsPath}/service`,this.initBaseProvider(),this.initFields(),this.appendIconStyleSheets(j,H),this.createBrowserModules(G)}resolveModuleDeps(L){const N=Reflect.getMetadata("dependencies",L);N&&N.forEach(B=>{this.modules.indexOf(B)===-1&&this.modules.push(B)})}get lifeCycleService(){return this.injector.get(p.AppLifeCycleServiceToken)}async start(L,N,B){const F=this.injector.get(p.IReporterService).time(p.REPORT_NAME.MEASURE);this.lifeCycleService.phase=1,B?(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,O.bindConnectionServiceDeprecated)(this.injector,this.modules,B)):N&&await this.createConnection(N),F.timeEnd("ClientApp.createConnection"),this.logger=this.getLogger(),this.stateService.state="client_connected",this.registerEventListeners(),await this.injector.get(p.IApplicationService).initializeData(),await this.measure("Contributions.start",()=>this.startContributions(L)),this.stateService.state="started_contributions",this.stateService.state="ready",this.lifeCycleService.phase=4,F.timeEnd("Framework.ready")}async createConnection(L){var N;let B;switch(L){case f.ESupportRuntime.Electron:B=this.injector.get(f.ElectronConnectionHelper,[{clientId:this.config.clientId}]);break;case f.ESupportRuntime.Web:B=this.injector.get(f.WebConnectionHelper,[{clientId:this.config.clientId,connectionPath:this.connectionPath,connectionProtocols:this.opts.connectionProtocols}]);break;default:throw new Error(`Unknown backend type: ${L}`)}this.injector.addProviders({token:m.CONNECTION_HELPER_TOKEN,useValue:B});const k=B.createConnection(),F=(N=this.config.clientId)!==null&&N!==void 0?N:B.getDefaultClientId();await(0,O.createConnectionService)(this.injector,this.modules,()=>{this.onReconnectContributions()},k,F),this.logger=this.getLogger(),this.injector.get(u.WSChannelHandler).replaceLogger(this.logger)}getLogger(){return this.logger?this.logger:(this.logger=this.injector.get(p.ILoggerManagerClient).getLogger(p.SupportLogNamespace.Browser),this.logger)}onReconnectContributions(){const L=this.contributions;for(const N of L)N.onReconnect&&N.onReconnect(this)}initBaseProvider(){(0,M.injectInnerProviders)(this.injector),this.runtime.registerRuntimeInnerProviders(this.injector)}initFields(){this.contributionsProvider=this.injector.get(c.ClientAppContribution),this.commandRegistry=this.injector.get(p.CommandRegistry),this.keybindingRegistry=this.injector.get(v.KeybindingRegistry),this.keybindingService=this.injector.get(v.KeybindingService),this.stateService=this.injector.get(_.ClientAppStateService),this.nextMenuRegistry=this.injector.get(y.IMenuRegistry)}createBrowserModules(L){const N=this.injector;for(const B of this.modules){const k=N.get(B);this.browserModules.push(k),k.providers&&this.injector.addProviders(...k.providers),this.runtime.registerRuntimeModuleProviders(this.injector,k),k.preferences&&k.preferences(this.injector)}(0,g.injectCorePreferences)(this.injector),this.injectPreferenceService(this.injector,L),this.injectStorageProvider(this.injector);for(const B of this.browserModules)if(B.contributionProvider)if(Array.isArray(B.contributionProvider))for(const k of B.contributionProvider)(0,p.createContributionProvider)(this.injector,k);else(0,p.createContributionProvider)(this.injector,B.contributionProvider)}get contributions(){return this.contributionsProvider.getContributions()}async startContributions(L){await this.measure("RenderApp.render",()=>this.renderApp(L)),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(L,N){return await Promise.all(L.map(B=>this.contributionPhaseRunner(B,N)))}async contributionPhaseRunner(L,N){const B=L[N];if(typeof B=="function")try{const k=L.constructor.name+"."+N;return await this.measure(k,()=>B.call(L,this))}catch(k){this.logger.error(`Could not run contribution#${N}`,k)}}async renderApp(L){await(0,I.renderClientApp)(this,L),this.injector.get(p.IEventBus).fire(new S.RenderedEvent)}async measure(L,N){const k=this.injector.get(p.IReporterService).time(p.REPORT_NAME.MEASURE),F=await N();return k.timeEnd(L),F}preventStop(){const N=this.injector.get(g.CorePreferences)["application.confirmExit"];if(N==="never")return!1;for(const B of this.contributions)if(B.onWillStop)try{if(B.onWillStop(this))return!0}catch(k){(0,p.getDebugLogger)().error(k)}return N==="always"}async preventStopElectron(){if(this.injector.get(g.CorePreferences)["application.confirmExit"]==="never")return!1;for(const B of this.contributions)if(B.onWillStop)try{if(await B.onWillStop(this))return!0}catch(k){(0,p.getDebugLogger)().error(k)}return!1}stopContributions(){for(const L of this.contributions)if(L.onStop)try{L.onStop(this)}catch(N){this.logger.error("Could not stop contribution",N)}}async stopContributionsElectron(){const L=[];for(const N of this.contributions)N.onStop&&L.push((async()=>{try{await N.onStop(this)}catch(B){this.logger.error("Could not stop contribution",B)}})());await Promise.all(L)}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),p.isOSX&&document.body.addEventListener("wheel",this._handleWheel,{passive:!1})}injectPreferenceService(L,N){const B=()=>k=>{const F=L.get(A.PreferenceProvider,{tag:k});return F.asScope(k),F};if((0,A.injectPreferenceConfigurations)(L),(0,A.injectPreferenceSchemaProvider)(L),L.addProviders({token:A.PreferenceProviderProvider,useFactory:B},{token:A.PreferenceService,useClass:A.PreferenceServiceImpl}),N){const F=L.get(A.PreferenceProviderProvider)(A.PreferenceScope.Default);for(const W of Object.keys(N))F.setPreference(W,N[W])}}injectStorageProvider(L){L.addProviders({token:p.DefaultStorageProvider,useClass:p.DefaultStorageProvider}),L.addProviders({token:p.StorageProvider,useFactory:()=>N=>L.get(p.DefaultStorageProvider).get(N)}),(0,p.createContributionProvider)(L,p.StorageResolverContribution)}fireOnReload(L=!1){window.location.reload(L)}appendIconStyleSheets(L,N){const B=N?[D.DEFAULT_CDN_ICON,D.IDE_OCTICONS_CN_CSS,D.IDE_CODICONS_CN_CSS]:[];L&&L.length&&L.forEach(k=>{this.updateIconMap(k.prefix,k.iconMap),B.push(k.cssPath)});for(const k of B){const F=document.createElement("link");F.setAttribute("rel","stylesheet"),F.setAttribute("href",k),document.getElementsByTagName("head")[0].appendChild(F)}}updateIconMap(L,N){L==="kaitian-icon kticon-"&&this.logger.error(`The icon prefix '${L}' conflicts with the built-in icon, please check the icon configuration.`),(0,D.updateIconMap)(L,N)}initEarlyPreference(L){this._disposables.push((0,A.registerLocalStorageProvider)("general.theme",L)),this._disposables.push((0,A.registerLocalStorageProvider)("general.icon",L)),this._disposables.push((0,A.registerLocalStorageProvider)("general.language",L))}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),p.isOSX&&document.body.removeEventListener("wheel",this._handleWheel),this._disposables.dispose(),this.disposeSideEffect()}disposeSideEffect(){for(const L of this.contributions)if(L.onDisposeSideEffects)try{L.onDisposeSideEffects(this)}catch(N){this.logger.error("Could not dispose contribution",N)}}detectRuntime(){return window.isElectronRenderer||typeof navigator=="object"&&typeof navigator.userAgent=="string"&&navigator.userAgent.indexOf("Electron")>=0?f.ESupportRuntime.Electron:f.ESupportRuntime.Web}}e.j=R},79248:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.renderClientApp=e.App=void 0;const n=t(85608),l=n.__importDefault(t(14041)),o=n.__importDefault(t(25873)),u=t(97267),p=t(43718),h=t(28003),E=t(68456),_=t(11050),f=t(52564),m=t(26542),d=t(67304);function s(c){const g=c.app.injector,v=g.get(p.IEventBus),b=g.get(m.LabelService),S=l.default.useCallback((y,A)=>b.getIcon(p.URI.parse(y),A),[]);return l.default.useEffect(()=>{let y;const A=()=>{y&&window.cancelAnimationFrame(y),y=window.requestAnimationFrame(()=>{y=null,f.allSlot.forEach(T=>{v.fire(new E.ResizeEvent({slotLocation:T.slot}))})})};return window.addEventListener("resize",A),()=>{window.removeEventListener("resize",A)}},[]),l.default.createElement(u.ComponentContextProvider,{value:{getIcon:d.getIcon,localize:p.localize,getResourceIcon:S}},l.default.createElement(_.ConfigProvider,{value:c.app.config},l.default.createElement(c.main,{callback:c.callback}),c.overlays&&c.overlays.map((y,A)=>l.default.createElement(y,{key:A}))))}e.App=s;const a=c=>g=>{o.default.createRoot(c).render(l.default.createElement(g,null))};function r(c,g){const v=c.config.layoutComponent||h.DefaultLayout,b=c.browserModules.filter(A=>A.isOverlay).map(A=>A.component?A.component:((0,p.getDebugLogger)().warn("Overlay module does not have component",A),()=>l.default.createElement(l.default.Fragment,null))),S=A=>l.default.createElement(s,Object.assign({},A,{app:c,main:v,overlays:b}));return(typeof g=="function"?g:a(g))(S)}e.renderClientApp=r},96302:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.bindConnectionServiceDeprecated=e.bindConnectionService=e.createConnectionService=void 0;const n=t(8919),l=t(18740),o=t(76271),u=t(43718),p=t(16884),h=(0,u.getDebugLogger)();async function E(d,s,a,r,c){const g=d.get(u.IReporterService),v=d.get(u.IEventBus),b=d.get(p.ClientAppStateService),S=new l.WSChannelHandler(r,h,c);S.setReporter(g);const y=()=>{b.reachedState("core_module_initialized").then(()=>{v.fire(new u.BrowserConnectionOpenEvent)})};S.connection.isOpen()&&y(),S.connection.onOpen(()=>{y()}),S.connection.onClose(()=>{b.reachedState("core_module_initialized").then(()=>{v.fire(new u.BrowserConnectionCloseEvent)})}),S.connection.onError(T=>{b.reachedState("core_module_initialized").then(()=>{v.fire(new u.BrowserConnectionErrorEvent(T))})}),await S.initHandler(),d.addProviders({token:l.WSChannelHandler,useValue:S});const A=await S.openChannel(o.RPCServiceChannelPath);A.onReopen(()=>a()),_(d,s,A)}e.createConnectionService=E;function _(d,s,a){const r=new n.RPCServiceCenter,c=r.setSumiConnection(a.createSumiConnection());return m(d,s,r),c}e.bindConnectionService=_;function f(d,s,a){const r=new n.RPCServiceCenter,c=r.setConnection(a),g=a.onClose(()=>{c.dispose(),g.dispose()});m(d,s,r)}e.bindConnectionServiceDeprecated=f;function m(d,s,a){const{getRPCService:r}=(0,n.initRPCService)(a),c=[],g=[];for(const v of s){const b=d.get(v);if(b.backServices)for(const S of b.backServices)c.push(S),S.protocol&&a.loadProtocol(S.protocol)}for(const v of c){const{servicePath:b}=v,S=r(b),y={token:b,useValue:S};d.addProviders(y),v.clientToken&&g.push(v)}for(const v of g){const{servicePath:b}=v,S=r(b);if(v.clientToken){const y=d.get(v.clientToken);S.onRequestService(y)}}}},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)},71843:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.injectInnerProviders=void 0;const n=t(43718),l=t(96405),o=t(16872),u=t(41480),p=t(12956),h=t(59555),E=t(10605),_=t(66963),f=t(71707),m=t(80832),d=t(23396),s=t(77273),a=t(41118),r=t(37015),c=t(68456),g=t(75694),v=t(93899),b=t(77666),S=t(90697),y=t(73967),A=t(78132),T=t(68969),D=t(11719),w=t(52564),I=t(26542),O=t(52993),M=t(10845),R=t(40827),P=t(32242),L=t(99e3),N=t(42637),B=t(62652),k=t(27957),F=t(45670),W=t(66894),j=t(63921),H=t(82493);function K(G){(0,n.createContributionProvider)(G,_.ClientAppContribution),(0,n.createContributionProvider)(G,n.CommandContribution),(0,n.createContributionProvider)(G,s.FsProviderContribution),(0,n.createContributionProvider)(G,a.KeybindingContribution),(0,n.createContributionProvider)(G,v.MenuContribution),(0,n.createContributionProvider)(G,c.ComponentContribution),(0,n.createContributionProvider)(G,w.SlotRendererContribution),(0,n.createContributionProvider)(G,A.PreferenceContribution),(0,n.createContributionProvider)(G,F.VariableContribution),(0,n.createContributionProvider)(G,c.TabBarToolbarContribution),(0,n.createContributionProvider)(G,N.ToolBarActionContribution),(0,n.createContributionProvider)(G,P.StaticResourceContribution);const V=[{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:z=>z.get(a.KeybindingRegistry)},{token:o.KeyboardNativeLayoutService,useClass:r.BrowserKeyboardLayoutImpl},{token:o.KeyboardLayoutChangeNotifierService,useFactory:z=>z.get(o.KeyboardNativeLayoutService)},{token:r.KeyValidator,useFactory:z=>z.get(o.KeyboardNativeLayoutService)},p.ClientAppStateService,{token:g.ILogger,useClass:g.Logger},{token:c.ComponentRegistry,useClass:c.ComponentRegistryImpl},{token:F.VariableRegistry,useClass:F.VariableRegistryImpl},{token:v.AbstractMenuService,useClass:v.MenuServiceImpl},{token:v.AbstractContextMenuService,useClass:v.ContextMenuServiceImpl},{token:v.IMenuRegistry,useClass:v.MenuRegistryImpl},{token:b.IToolbarActionService,useClass:b.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:T.IProgressService,useClass:D.ProgressService},{token:N.IToolbarRegistry,useClass:k.NextToolbarRegistryImpl},{token:N.IToolbarPopoverRegistry,useClass:B.ToolbarPopoverRegistry},k.ToolbarClientAppContribution,{token:n.IProblemPatternRegistry,useClass:n.ProblemPatternRegistryImpl},{token:n.IProblemMatcherRegistry,useClass:n.ProblemMatchersRegistryImpl},{token:n.ITaskDefinitionRegistry,useClass:n.TaskDefinitionRegistryImpl},{token:S.IOpenerService,useClass:y.OpenerService},{token:W.IWindowService,useClass:j.WindowService},{token:n.IApplicationService,useClass:h.ApplicationService},{token:O.IClipboardService,useClass:O.BrowserClipboardService},{token:M.IExternalUriService,useClass:M.ExternalUriService},{token:n.IAuthenticationService,useClass:E.AuthenticationService},{token:I.ICryptoService,useClass:I.CryptoService},{token:I.ICredentialsService,useClass:I.CredentialsService},{token:l.IHashCalculateService,useClass:l.HashCalculateServiceImpl},{token:n.IExtensionsSchemaService,useClass:d.ExtensionsPointServiceImpl},{token:n.AppLifeCycleServiceToken,useClass:H.AppLifeCycleService},{token:P.StaticResourceService,useClass:L.StaticResourceServiceImpl},R.StaticResourceClientAppContribution,{token:f.ISplitPanelService,useClass:f.SplitPanelService},{token:n.IAIReporter,useClass:u.AIReporter},{token:m.IDesignStyleService,useClass:m.DesignStyleService}];G.addProviders(...V)}e.injectInnerProviders=K},82493:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AppLifeCycleService=void 0;const n=t(85608),l=t(76003),o=t(43718);let u=class{constructor(){this.onDidChangeLifecyclePhaseEmitter=new o.Emitter,this.onDidLifeCyclePhaseChange=this.onDidChangeLifecyclePhaseEmitter.event}set phase(h){this.lifeCyclePhase=h,this.onDidChangeLifecyclePhaseEmitter.fire(this.lifeCyclePhase)}get phase(){return this.lifeCyclePhase}};u=n.__decorate([(0,l.Injectable)()],u),e.AppLifeCycleService=u},99696:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});const l=t(85608).__importDefault(t(99126));typeof window.ResizeObserver>"u"&&(window.ResizeObserver=l.default)},36206:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BrowserModule=e.IClientApp=void 0;const n=t(85608),l=t(76003),o=t(43718);e.IClientApp=Symbol("CLIENT_APP_TOKEN");class u extends o.BasicModule{}n.__decorate([(0,l.Autowired)(e.IClientApp),n.__metadata("design:type",Object)],u.prototype,"app",void 0),e.BrowserModule=u},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 l;(function(b){const S="file";b.NEW_FILE={id:"file.new",category:S,iconClass:(0,n.getIcon)("new-file")},b.RENAME_FILE={id:"file.rename",category:S},b.DELETE_FILE={id:"file.delete",category:S},b.NEW_FOLDER={id:"file.folder.new",category:S,iconClass:(0,n.getIcon)("new-folder")},b.COMPARE_SELECTED={id:"file.compare",category:S},b.OPEN_FILE={id:"file.open",category:S},b.SAVE_FILE={id:"file.save",category:S},b.COLLAPSE_ALL={id:"filetree.collapse.all",category:S,iconClass:(0,n.getIcon)("collapse-all")},b.REFRESH_ALL={id:"filetree.refresh.all",category:S,iconClass:(0,n.getIcon)("refresh")},b.OPEN_RESOURCES={id:"filetree.open.file",category:S},b.OPEN_TO_THE_SIDE={id:"filetree.open.side",category:S},b.OPEN_TYPE_WITH={id:"filetree.open.with",category:S},b.COPY_PATH={id:"filetree.copy.path",category:S,label:"%file.copy.path%"},b.COPY_RELATIVE_PATH={id:"filetree.copy.relativepath",category:S},b.COPY_FILE={id:"filetree.copy.file",category:S},b.CUT_FILE={id:"filetree.cut.file",category:S},b.PASTE_FILE={id:"filetree.paste.file",category:S},b.SELECT_CURRENT_NODE={id:"filetree.selectCurrentNode",category:S},b.LOCATION={id:"filetree.location",category:S},b.LOCATION_WITH_EDITOR={id:"filetree.location_with_editor",category:S,iconClass:(0,n.getIcon)("focus")},b.OPEN_FOLDER={id:"filetree.open.folder",category:S,label:"%file.open.folder%"},b.VSCODE_OPEN_FOLDER={id:"filetree.open.vscode_open_folder",category:S},b.OPEN_WORKSPACE={id:"filetree.open.workspace",category:S,label:"%file.open.workspace%"},b.SEARCH_ON_FOLDER={id:"filetree.search.folder",category:S},b.FOCUS_FILES={id:"filetree.focus.files",category:S,label:"%file.focus.files%"},b.FILTER_TOGGLE={id:"filetree.files.filter_toggle",category:S,iconClass:(0,n.getIcon)("retrieval")},b.FILTER_OPEN={id:"filetree.files.filter_open",category:S},b.OPEN_TERMINAL_WITH_PATH={id:"filetree.openTerminalWithPath",category:S},b.FILTER_CLOSE={id:"filetree.quitFilterMode",category:S},b.NEXT={id:"filetree.next",category:S},b.PREV={id:"filetree.prev",category:S},b.COLLAPSE={id:"filetree.collapse",category:S},b.EXPAND={id:"filetree.expand",category:S},b.REVEAL_IN_EXPLORER={id:"filetree.revealInExplorer",category:S},b.TOGGLE_OR_OPEN={id:"filetree.toggleOrOpen",category:S}})(l=e.FILE_COMMANDS||(e.FILE_COMMANDS={}));var o;(function(b){const S="openeditors";b.SAVE_ALL={id:"opened.editors.save.all",category:S,iconClass:(0,n.getIcon)("save-all")},b.CLOSE_ALL={id:"opened.editors.close.all",category:S,iconClass:(0,n.getIcon)("close-all")},b.SAVE_BY_GROUP={id:"opened.editors.save.byGroup"},b.CLOSE_BY_GROUP={id:"opened.editors.close.byGroup"},b.OPEN={id:"opened.editors.open",category:S},b.CLOSE={id:"opened.editors.close",category:S},b.OPEN_TO_THE_SIDE={id:"opened.editors.openToTheSide",category:S},b.COMPARE_SELECTED={id:"opened.editors.compare",category:S},b.COPY_RELATIVE_PATH={id:"opened.editors.copyRelativePath",category:S},b.COPY_PATH={id:"opened.editors.copyPath",category:S},b.LOCATION={id:"opened.editors.location",category:S}})(o=e.OPEN_EDITORS_COMMANDS||(e.OPEN_EDITORS_COMMANDS={}));var u;(function(b){b.FIND={id:"core.find",label:"%common.find%"},b.REPLACE={id:"core.replace",label:"%common.replace%"},b.ABOUT_COMMAND={id:"core.about",label:"%common.about%"},b.OPEN_PREFERENCES={id:"core.openpreference",label:"%common.preference.open%"},b.LOCATE_PREFERENCES={id:"workbench.preferences.locate"},b.OPEN_KEYMAPS={id:"core.keymaps.open",label:"%common.keymaps.open%"},b.OPEN_LAUNCH_CONFIGURATION={id:"core.launchConfiguration.open",label:"%debug.action.open.configuration%"},b.ENVIRONMENT_VARIABLE={id:"core.environment.variable"}})(u=e.COMMON_COMMANDS||(e.COMMON_COMMANDS={}));var p;(function(b){const S="editor";b.API_OPEN_EDITOR_COMMAND_ID="_workbench.open",b.API_OPEN_DIFF_EDITOR_COMMAND_ID="_workbench.diff",b.API_OPEN_WITH_EDITOR_COMMAND_ID="_workbench.openWith",b.NEW_UNTITLED_FILE={id:"file.new.untitled",category:S,label:"%file.new%",iconClass:(0,n.getIcon)("new-file")},b.UNDO={id:"editor.undo",category:S,label:"%editor.undo%"},b.REDO={id:"editor.redo",category:S,label:"%editor.redo%"},b.SELECT_ALL={id:"editor.selectAll",category:S,label:"%selection.all%"},b.OPEN_RESOURCE={id:"editor.openUri",category:S},b.OPEN_RESOURCES={id:"editor.openUris",category:S},b.SAVE_URI={id:"editor.saveUri",category:S},b.SAVE_CURRENT={id:"editor.saveCurrent",category:S,label:"%editor.saveCurrent%"},b.FOCUS_IF_NOT_ACTIVATE_ELEMENT={id:"editor.focusIfNotActivateElement",category:S,label:"%editor.saveCurrent%"},b.COMPARE={id:"editor.compare",category:S},b.OPEN_MERGEEDITOR={id:"editor.open.mergeEditor",category:S},b.OPEN_MERGEEDITOR_DEV={id:"editor.open.mergeEditor.dev",category:"Merge Editor (Dev)",label:"Open Merge Editor State from Json"},b.MERGEEDITOR_RESET={id:"editor.mergeEditor.reset",category:S,label:"%mergeEditor.reset%"},b.CLOSE={id:"editor.close",category:S,label:"%editor.closeCurrent%"},b.CLOSE_ALL_IN_GROUP={id:"editor.closeAllInGroup",category:S,label:"%editor.closeAllInGroup%"},b.CLOSE_OTHER_IN_GROUP={id:"editor.closeOtherEditorsInGroup",category:S,label:"%editor.closeOtherEditors%"},b.CLOSE_ALL={id:"editor.closeAll",category:S,label:"%editor.close.all%"},b.CLOSE_SAVED={id:"editor.closeSaved",category:S,label:"%editor.closeSaved%"},b.SAVE_ALL={id:"editor.saveAll",category:S,label:"%editor.saveAll%"},b.CLOSE_TO_RIGHT={id:"editor.closeToRight",category:S,label:"%editor.closeToRight%"},b.GET_CURRENT={id:"editor.getCurrent",category:S},b.GET_CURRENT_RESOURCE={id:"editor.getCurrentResource",category:S},b.SPLIT_TO_LEFT={id:"editor.splitToLeft",category:S,label:"%editor.splitToLeft%"},b.SPLIT_TO_RIGHT={id:"editor.splitToRight",category:S,label:"%editor.splitToRight%",iconClass:(0,n.getIcon)("embed")},b.SPLIT_TO_TOP={id:"editor.splitToTop",category:S,label:"%editor.splitToTop%"},b.SPLIT_TO_BOTTOM={id:"editor.splitToBottom",category:S,label:"%editor.splitToBottom%"},b.CHANGE_LANGUAGE={id:"editor.changeLanguage",category:S},b.CHANGE_ENCODING={id:"editor.changeEncoding",category:S},b.CHANGE_EOL={id:"editor.changeEol",category:S},b.NAVIGATE_LEFT={id:"editor.navigateLeft",category:S},b.NAVIGATE_RIGHT={id:"editor.navigateRight",category:S},b.NAVIGATE_UP={id:"editor.navigateUp",category:S},b.NAVIGATE_DOWN={id:"editor.navigateDown",category:S},b.NAVIGATE_NEXT={id:"editor.navigateNext",category:S},b.NAVIGATE_PREVIOUS={id:"editor.navigatePrevious",category:S},b.PREVIOUS={id:"editor.previous",category:S},b.NEXT={id:"editor.next",category:S},b.PREVIOUS_IN_GROUP={id:"editor.previousInGroup",category:S},b.NEXT_IN_GROUP={id:"editor.nextInGroup",category:S},b.LAST_IN_GROUP={id:"editor.lastInGroup",category:S},b.CLOSE_OTHER_GROUPS={id:"editor.closeOtherGroup",category:S,label:"%editor.closeEditorsInOtherGroups%"},b.OPEN_EDITOR_AT_INDEX={id:"editor.openEditorAtIndex",category:S},b.EVEN_EDITOR_GROUPS={id:"editor.evenEditorGroups",category:S,label:"%editor.resetEditorGroups%"},b.REVERT_DOCUMENT={id:"editor.document.revert",category:S,label:"%editor.revert%"},b.REVERT_AND_CLOSE={id:"editor.revertAndClose",category:S},b.GO_FORWARD={id:"editor.goForward",category:S},b.GO_BACK={id:"editor.goBack",category:S},b.PIN_CURRENT={id:"editor.pinCurrent",category:S},b.COPY_CURRENT_PATH={id:"editor.copyCurrentPath",category:S},b.GO_TO_GROUP={id:"editor.goToGroup",category:S},b.MOVE_GROUP={id:"editor.moveGroup",category:S},b.REOPEN_CLOSED={id:"editor.reopenClosed",category:S},b.FOCUS={id:"editor.focus",category:S},b.TEST_TOKENIZE={id:"editor.tokenize.test",category:S,label:"%editor.tokenize.test%"},b.AUTO_SAVE={id:"editor.autoSave",category:S},b.FOCUS_ACTIVE_EDITOR_GROUP={id:"editor.focusActiveEditorGroup",category:S},b.COMPONENT_UNDO={id:"editor.componentUndo",category:S},b.COMPONENT_REDO={id:"editor.componentRedo"},b.SEARCH_WORKSPACE_SYMBOL={id:"editor.workspaceSymbol.quickopen",label:"%editor.workspaceSymbol.quickopen%",category:S},b.SEARCH_WORKSPACE_SYMBOL_CLASS={id:"editor.workspaceSymbolClass.quickopen",label:"%editor.workspaceSymbolClass.quickopen%",category:S},b.GO_TO_LINE={id:"editor.action.gotoLine",label:"%editor.goToLine%",category:S},b.QUICK_OPEN={id:"workbench.action.quickOpen",category:S,label:"%editor.quickOpen%"},b.TOGGLE_WORD_WRAP={id:"editor.toggleWordWrap",label:"%editor.toggleWordWrap%",category:S},b.FORMAT_DOCUMENT={id:"editor.action.formatDocument",category:S},b.FORMAT_SELECTION={id:"editor.action.formatSelection",category:S},b.FORMAT_DOCUMENT_WITH={id:"editor.action.formatDocument.multiple",category:S,label:"%editor.formatDocument.label.multiple%"},b.FORMAT_SELECTION_WITH={id:"editor.action.formatSelection.multiple",category:S,label:"%editor.formatSelection.label.multiple%"},b.COPY_PATH={id:"editor.action.copyPath",category:S,label:"%editor.copyPath%"},b.COPY_RELATIVE_PATH={id:"editor.action.copyRelativePath",category:S,label:"%editor.copyRelativePath%"}})(p=e.EDITOR_COMMANDS||(e.EDITOR_COMMANDS={}));var h;(function(b){const S="diff-editor";b.REVERT={id:"editor.diff.revert",category:S},b.ACCEPT={id:"editor.diff.accept",category:S},b.TOGGLE_COLLAPSE_UNCHANGED_REGIONS={id:"editor.diff.toggleCollapseUnchangedRegions",category:S}})(h=e.DIFF_EDITOR_COMMANDS||(e.DIFF_EDITOR_COMMANDS={}));var E;(function(b){const S="search";b.OPEN_SEARCH={id:"content-search.openSearch",category:S,label:"Open search sidebar"},b.REFRESH={id:"file-search.refresh",label:"refresh search",iconClass:(0,n.getIcon)("refresh"),category:S},b.CLEAN={id:"file-search.clean",label:"clean search",iconClass:(0,n.getIcon)("clear"),category:S},b.GET_RECENT_SEARCH_WORD={id:"search.getRecentSearchWordCmd",category:S},b.GET_BACK_RECENT_SEARCH_WORD={id:"search.getBackRecentSearchWordCmd",category:S},b.MENU_REPLACE={id:"search.menu.replace",category:S,label:"%search.replace.title%"},b.MENU_REPLACE_ALL={id:"search.menu.replaceAll",category:S,label:"%search.replaceAll.label%"},b.MENU_HIDE={id:"search.menu.hide",category:S,label:"%search.result.hide%"},b.MENU_COPY={id:"search.menu.copy",category:S,label:"%file.copy.file%"},b.MENU_COPY_ALL={id:"search.menu.copyAll",category:S,label:"%search.menu.copyAll%"},b.MENU_COPY_PATH={id:"search.menu.copyPath",category:S,label:"%file.copy.path%"},b.REPLACE={id:"search.replace",category:S},b.CLOSE={id:"search.close",category:S}})(E=e.SEARCH_COMMANDS||(e.SEARCH_COMMANDS={}));var _;(function(b){const S="outline";b.OUTLINE_COLLAPSE_ALL={id:"outline.collapse.all",category:S},b.OUTLINE_FOLLOW_CURSOR={id:"outline.follow.cursor",category:S},b.OUTLINE_SORT_KIND={id:"outline.sort.kind",category:S},b.OUTLINE_SORT_NAME={id:"outline.sort.name",category:S},b.OUTLINE_SORT_POSITION={id:"outline.sort.position",category:S}})(_=e.OUTLINE_COMMANDS||(e.OUTLINE_COMMANDS={}));var f;(function(b){const S="workspace";b.ADD_WORKSPACE_FOLDER={id:"workspace.addFolderToWorkspace",label:"%workspace.addFolderToWorkspace%",category:S},b.REMOVE_WORKSPACE_FOLDER={id:"workspace.removeFolderFromWorkspace",category:S},b.SAVE_WORKSPACE_AS_FILE={id:"workspace.saveWorkspaceAsFile",label:"%workspace.saveWorkspaceAsFile%",category:S}})(f=e.WORKSPACE_COMMANDS||(e.WORKSPACE_COMMANDS={}));var m;(function(b){const S="keyboard";b.CHOOSE_KEYBOARD_LAYOUT={id:"keyboard.chooseKeyboardLayout",label:"%keyboard.chooseKeyboardLayout%",category:S}})(m=e.KEYBOARD_COMMANDS||(e.KEYBOARD_COMMANDS={}));var d;(function(b){const S="dialog";b.ENSURE={id:"dialog.ensure",category:S}})(d=e.DIALOG_COMMANDS||(e.DIALOG_COMMANDS={}));var s;(function(b){b.CATEGORY="%terminal.name%",b.FOCUS_NEXT_TERMINAL={id:"workbench.action.terminal.focusNextPane",label:"%terminal.focusNext.inTerminalGroup%",category:b.CATEGORY},b.FOCUS_PREVIOUS_TERMINAL={id:"workbench.action.terminal.focusPreviousPane",label:"%terminal.focusPrevious.inTerminalGroup%",category:b.CATEGORY},b.SPLIT={id:"terminal.split",label:"%terminal.split%",category:b.CATEGORY},b.ADD={id:"terminal.add",label:"%terminal.new%",category:b.CATEGORY},b.REMOVE={id:"terminal.remove",label:"%terminal.remove%",category:b.CATEGORY},b.CLEAR={id:"terminal.clear",label:"%terminal.clear%",category:b.CATEGORY},b.OPEN_SEARCH={id:"terminal.search",label:"%terminal.search%",category:b.CATEGORY},b.SEARCH_NEXT={id:"terminal.search.next",label:"%terminal.search.next%",category:b.CATEGORY},b.OPEN_WITH_PATH={id:"terminal.openWithPath",category:b.CATEGORY},b.CLEAR_CONTENT={id:"terminal.clearContent",label:"%terminal.menu.clearCurrentContent%",category:b.CATEGORY},b.CLEAR_ALL_CONTENT={id:"terminal.clearAllContent",label:"%terminal.menu.clearAllContents%",category:b.CATEGORY},b.TAB_RENAME={id:"terminal.tabRename",category:b.CATEGORY},b.SELECT_ALL_CONTENT={id:"terminal.selectAllContent",label:"%terminal.menu.selectAllContent%",category:b.CATEGORY},b.MORE_SETTINGS={id:"terminal.moreSettings",label:"%terminal.menu.moreSettings%",category:b.CATEGORY},b.SELECT_TYPE={id:"terminal.selectType",category:b.CATEGORY},b.SELECT_ZSH={id:"terminal.selectTypeZsh",label:"zsh",category:b.CATEGORY},b.SELECT_BASH={id:"terminal.selectTypeBash",label:"bash",category:b.CATEGORY},b.SELECT_SH={id:"terminal.selectTypeSh",label:"sh",category:b.CATEGORY},b.SELECT_CMD={id:"terminal.selectTypeCMD",label:"cmd",category:b.CATEGORY},b.SELECT_POWERSHELL={id:"terminal.selectTypePowerShell",label:"powershell",category:b.CATEGORY},b.COPY={id:"terminal.copy",label:"%edit.copy%",category:b.CATEGORY},b.PASTE={id:"terminal.paste",label:"%edit.paste%",category:b.CATEGORY},b.SELECT_ALL={id:"terminal.selectAll",label:"%terminal.menu.selectCurrentContent%",category:b.CATEGORY},b.RE_LAUNCH={id:"terminal.relaunch",category:b.CATEGORY},b.TOGGLE_TERMINAL={id:"terminal.toggleTerminal",label:"%terminal.toggleTerminal%",category:b.CATEGORY},b.KILL_PROCESS={id:"terminal.killProcess",label:"%terminal.killProcess%",category:b.CATEGORY}})(s=e.TERMINAL_COMMANDS||(e.TERMINAL_COMMANDS={}));var a;(function(b){const S="view";b.QUICK_OPEN_VIEW={id:"layout.action.quickOpenView",category:S},b.OPEN_VIEW={id:"layout.action.openView",label:"%layout.action.openView%",category:S},b.MAXIMIZE_EDITOR={id:"layout.action.Maximizeeditor",category:S},b.TOGGLE_SIDEBAR_VISIBILITY={id:"main-layout.left-panel.toggle",category:S}})(a=e.LAYOUT_COMMANDS||(e.LAYOUT_COMMANDS={}));var r;(function(b){const S="marker";b.SHOW_ERRORS_WARNINGS={id:"marker.action.showErrorsWarnings",category:S},b.TOGGLE_SHOW_ERRORS_WARNINGS={id:"marker.action.toggleShowErrorsWarnings",category:S}})(r=e.MARKER_COMMANDS||(e.MARKER_COMMANDS={}));var c;(function(b){b.OPEN={id:"editor.action.quickCommand"},b.OPEN_OUTLINE={id:"editor.action.quickOutline"},b.OPEN_VIEW={id:"editor.action.quickView"}})(c=e.QUICK_OPEN_COMMANDS||(e.QUICK_OPEN_COMMANDS={}));var g;(function(b){b._GIT_OPEN_MERGE_EDITOR={id:"_git.openMergeEditor"},b.GIT_OPEN_MERGE_EDITOR={id:"git.openMergeEditor"}})(g=e.SCM_COMMANDS||(e.SCM_COMMANDS={}));var v;(function(b){const S="MergeConflict";b.AI_ACCEPT={id:"merge-conflict.ai.accept",category:S},b.ALL_RESET={id:"merge-conflict.ai.all-reset",category:S},b.AI_ALL_ACCEPT={id:"merge-conflict.ai.all-accept",category:S},b.AI_ALL_ACCEPT_STOP={id:"merge-conflict.ai.all-accept-stop",category:S}})(v=e.MERGE_CONFLICT_COMMANDS||(e.MERGE_CONFLICT_COMMANDS={}))},22780:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ClientCommonContribution=e.locationProtocolContextKey=e.inputFocusedContextKey=void 0;const n=t(85608),l=t(76003),o=t(97267),u=t(43718),p=t(53736),h=t(18193),E=t(22366),_=t(41118),f=t(1149),m=t(64102),d=t(39496),s=t(78132),a=t(11050),r=t(14109),c=t(66549);e.inputFocusedContextKey="inputFocus",e.locationProtocolContextKey="locationProtocol";let g=class{constructor(){this.schema=h.corePreferenceSchema;const b={"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},S=Object.keys(this.schema.properties);for(const y of S)this.schema.properties[y].default=b[y]||this.schema.properties[y].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 b=this.activeElementIsInput();if(this.inputFocusedContext.set(b),b){const S=(0,E.trackFocus)(document.activeElement);u.Event.once(S.onDidBlur)(()=>{this.inputFocusedContext.set(this.activeElementIsInput()),S.dispose()})}}registerCommands(b){b.registerCommand(r.EDITOR_COMMANDS.UNDO),b.registerCommand(r.EDITOR_COMMANDS.REDO),b.registerCommand(r.EDITOR_COMMANDS.SELECT_ALL),b.registerCommand(r.COMMON_COMMANDS.ABOUT_COMMAND,{execute:()=>{alert((0,u.replaceLocalizePlaceholder)(this.appConfig.appName))}})}registerMenus(b){b.registerMenubarItem(d.MenuId.MenubarFileMenu,{label:(0,u.localize)("menu-bar.title.file"),order:1,iconClass:(0,o.getIcon)("menubar-file")}),b.registerMenubarItem(d.MenuId.MenubarEditMenu,{label:(0,u.localize)("menu-bar.title.edit"),order:2,iconClass:(0,o.getIcon)("menubar-edit")}),b.registerMenubarItem(d.MenuId.MenubarSelectionMenu,{label:(0,u.localize)("menu-bar.title.selection"),order:3,iconClass:(0,o.getIcon)("menubar-selection")}),b.registerMenubarItem(d.MenuId.MenubarViewMenu,{label:(0,u.localize)("menu-bar.title.view"),order:4,iconClass:(0,o.getIcon)("menubar-view")}),b.registerMenubarItem(d.MenuId.MenubarGoMenu,{label:(0,u.localize)("menu-bar.title.go"),order:5,iconClass:(0,o.getIcon)("menubar-go")}),b.registerMenubarItem(d.MenuId.MenubarTerminalMenu,{label:(0,u.localize)("menu-bar.title.terminal"),order:5,iconClass:(0,o.getIcon)("terminal")}),b.registerMenubarItem(d.MenuId.MenubarHelpMenu,{label:(0,u.localize)("menu-bar.title.help"),order:999,iconClass:(0,o.getIcon)("question-circle")}),b.registerMenuItems(d.MenuId.MenubarFileMenu,[{command:r.FILE_COMMANDS.OPEN_FOLDER.id,group:"1_open",when:"config.application.supportsOpenFolder"},{command:r.FILE_COMMANDS.OPEN_WORKSPACE.id,group:"1_open",when:"config.application.supportsOpenWorkspace"},{command:r.EDITOR_COMMANDS.NEW_UNTITLED_FILE.id,group:"2_new"},{command:{id:r.EDITOR_COMMANDS.SAVE_CURRENT.id,label:(0,u.localize)("file.save")},group:"3_save"},{command:{id:r.EDITOR_COMMANDS.SAVE_ALL.id,label:(0,u.localize)("file.saveAll")},group:"3_save"},{command:{id:r.EDITOR_COMMANDS.AUTO_SAVE.id,label:(0,u.localize)("file.autoSave")},toggledWhen:"config.editor.autoSave != off",group:"4_autosave"}]),b.registerMenuItems(d.MenuId.MenubarGoMenu,[{command:{id:r.EDITOR_COMMANDS.GO_BACK.id,label:(0,u.localize)("editor.goBack")},group:"1_go"},{command:{id:r.EDITOR_COMMANDS.GO_FORWARD.id,label:(0,u.localize)("editor.goForward")},group:"1_go"},{command:{id:r.EDITOR_COMMANDS.QUICK_OPEN.id,label:(0,u.localize)("editor.quickOpen")},group:"2_go_file"},{command:{id:r.EDITOR_COMMANDS.SEARCH_WORKSPACE_SYMBOL.id,label:(0,u.localize)("editor.workspaceSymbol.quickopen")},group:"2_go_file"},{command:{id:r.EDITOR_COMMANDS.GO_TO_LINE.id,label:(0,u.localize)("editor.goToLine")},group:"3_go_infile"},{command:{id:"editor.action.jumpToBracket",label:(0,u.localize)("menu-bar.go.jumpToBracket")},group:"3_go_infile"},{command:{id:"editor.action.marker.nextInFiles",label:(0,u.localize)("menu-bar.go.nextProblemInFiles")},group:"6_go_problem"},{command:{id:"editor.action.marker.prevInFiles",label:(0,u.localize)("menu-bar.go.prevProblemInFiles")},group:"6_go_problem"}]),b.registerMenuItems(d.MenuId.MenubarTerminalMenu,[{command:{id:r.TERMINAL_COMMANDS.ADD.id,label:r.TERMINAL_COMMANDS.ADD.label},group:"1_terminal"},{command:{id:r.TERMINAL_COMMANDS.SPLIT.id,label:r.TERMINAL_COMMANDS.SPLIT.label},group:"1_terminal"}])}registerKeybindings(b){b.registerKeybinding({command:r.EDITOR_COMMANDS.SELECT_ALL.id,keybinding:"ctrlcmd+a",when:"editorFocus"}),b.registerKeybinding({command:r.EDITOR_COMMANDS.UNDO.id,keybinding:"ctrlcmd+z",when:"editorFocus"}),b.registerKeybinding({command:r.EDITOR_COMMANDS.REDO.id,keybinding:"ctrlcmd+shift+z",when:"editorFocus"})}};n.__decorate([(0,l.Autowired)(u.CommandService),n.__metadata("design:type",Object)],g.prototype,"commandService",void 0),n.__decorate([(0,l.Autowired)(p.IContextKeyService),n.__metadata("design:type",Object)],g.prototype,"contextKeyService",void 0),n.__decorate([(0,l.Autowired)(a.AppConfig),n.__metadata("design:type",Object)],g.prototype,"appConfig",void 0),n.__decorate([(0,l.Autowired)(f.LayoutViewSizeConfig),n.__metadata("design:type",f.LayoutViewSizeConfig)],g.prototype,"layoutViewSize",void 0),g=n.__decorate([(0,u.Domain)(u.CommandContribution,c.ClientAppContribution,s.PreferenceContribution,m.MenuContribution,_.KeybindingContribution),n.__metadata("design:paramtypes",[])],g),e.ClientCommonContribution=g},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),l=t(76003),o=t(16908),u=t(43718),p=t(37638),h=t(36206),E=t(136),_=t(90697),f=t(45829),m=t(44867),d=t(22780),s=t(10797),a=t(17821);let r=class extends h.BrowserModule{constructor(){super(...arguments),this.contributionProvider=[_.OpenerContribution],this.providers=[d.ClientCommonContribution,m.DefaultOpenerContribution,m.OpenerContributionClient,p.AuthenticationContribution,E.HashCalculateContribution],this.electronProviders=[s.ClientElectronCommonContribution,f.ElectronOpenerContributionClient],this.webProviders=[a.ClientWebCommonContribution],this.backServices=[{servicePath:u.CommonServerPath,protocol:o.CommonServerProtocol},{servicePath:u.KeytarServicePath},{servicePath:u.CryptoServicePath}]}};r=n.__decorate([(0,l.Injectable)()],r),e.ClientCommonModule=r},98881:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.RecentStorage=void 0;const n=t(85608),l=t(76003),o=t(43718);let u=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}};n.__decorate([(0,l.Autowired)(o.StorageProvider),n.__metadata("design:type",Function)],u.prototype,"getStorage",void 0),u=n.__decorate([(0,l.Injectable)()],u),e.RecentStorage=u},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),l=t(76003),o=t(43718),u=t(64102),p=t(39496),h=t(11050);let E=class{registerMenus(f){f.registerMenubarItem(p.MenuId.MenubarAppMenu,{label:(0,o.localize)("app.name",this.appConfig.appName),order:0}),f.registerMenuItems(p.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"}]),f.registerMenuItems(p.MenuId.MenubarAppMenu,[{command:{id:"electron.quit",label:(0,o.localize)("app.quit")},nativeRole:"quit",group:"4_quit"}])}};n.__decorate([(0,l.Autowired)(h.AppConfig),n.__metadata("design:type",Object)],E.prototype,"appConfig",void 0),E=n.__decorate([(0,o.Domain)(u.MenuContribution)],E),e.ClientElectronCommonContribution=E},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),l=t(43718),o=t(64102),u=t(39496),p=t(14109);let h=class{registerMenus(_){_.registerMenuItems(u.MenuId.MenubarEditMenu,[{command:p.EDITOR_COMMANDS.REDO.id,group:"1_undo"},{command:p.EDITOR_COMMANDS.UNDO.id,group:"1_undo"}]),_.registerMenuItem(u.MenuId.MenubarHelpMenu,{command:{id:p.COMMON_COMMANDS.ABOUT_COMMAND.id,label:p.COMMON_COMMANDS.ABOUT_COMMAND.label},nativeRole:"about",group:"0_about"})}};h=n.__decorate([(0,l.Domain)(o.MenuContribution)],h),e.ClientWebCommonContribution=h},25918:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.InlineMenuBar=e.InlineActionBar=e.TitleActionList=e.MenuActionList=void 0;const n=t(85608),l=n.__importDefault(t(53373)),o=n.__importStar(t(14041)),u=t(97267),p=t(45803),h=t(43718),E=t(27833),_=t(93899),f=t(48560),m=t(79951),d=t(55693),s=n.__importDefault(t(17647)),a=n.__importDefault(t(54859)),r=({data:A,hasSubmenu:T,disabled:D,iconService:w,hasChecked:I})=>o.default.createElement("div",{className:(0,l.default)(a.default.menuAction,{[a.default.disabled]:D,[a.default.checked]:A.checked})},o.default.createElement("div",{className:(0,l.default)({[a.default.icon]:I})},A.checked?o.default.createElement(u.Icon,{icon:"check"}):null),o.default.createElement("div",{className:a.default.label},A.label?(0,m.transformLabelWithCodicon)(h.strings.mnemonicButtonLabel(A.label,!0),{margin:"0 3px"},w?.fromString.bind(w)):""),o.default.createElement("div",{className:a.default.tip},A.keybinding?o.default.createElement("div",{className:a.default.shortcut},A.keybinding):null,T?o.default.createElement("div",{className:a.default.submenuIcon},o.default.createElement(u.Icon,{icon:"right"})):null,!A.keybinding&&!T&&A.extraDesc&&o.default.createElement("div",{className:a.default.extraDesc},A.extraDesc))),c=({data:A=[],context:T=[],afterClick:D,style:w,iconService:I,renderSubMenuTitle:O,renderMenuItem:M})=>{if(!A.length)return null;const R=o.default.useCallback(B=>{const{key:k,item:F}=B;if([_.SeparatorMenuItemNode.ID,_.SubmenuItemNode.ID].includes(k))return;const j=(Array.isArray(F.props.children)?F.props.children[0]:F.props.children).props.data;j&&(typeof j.execute=="function"&&j.execute(T),typeof D=="function"&&D(j))},[A,T]),P=o.default.useCallback((B,k)=>{if(O){const F=O(B,{hasSubmenu:!0,disabled:!1});if(F)return F}return o.default.createElement(r,{hasChecked:k,hasSubmenu:!0,data:B,iconService:I})},[O]),L=o.default.useCallback((B,k)=>{if(M){const F=M(B,{hasSubmenu:!1,disabled:B.disabled});if(F)return F}return o.default.createElement(r,{hasChecked:k,data:B,disabled:B.disabled,iconService:I})},[M]),N=o.default.useCallback(B=>{const k=B.some(F=>F.checked);return B.map((F,W)=>{if(F.id===_.SeparatorMenuItemNode.ID)return null;const j=B[W+1]&&B[W+1].id===_.SeparatorMenuItemNode.ID;return F.id===_.SubmenuItemNode.ID?!Array.isArray(F.children)||!F.children.length?null:o.default.createElement(o.default.Fragment,{key:`${F.id}-${F.submenuId}-${W}`},o.default.createElement(p.Menu.SubMenu,{key:`${F.id}-${F.submenuId}-${W}`,className:a.default.submenuItem,popupClassName:"kt-menu",title:P(F,k)},N(F.children)),j?o.default.createElement(p.Menu.Divider,{key:`divider-${W}`,className:a.default.menuItemDivider}):null):o.default.createElement(o.default.Fragment,{key:`${F.id}-${W}`},o.default.createElement(p.Menu.Item,{id:`${F.id}-${W}`,key:`${F.id}-${W}`,className:a.default.menuItem,disabled:F.disabled},L(F,k)),j?o.default.createElement(p.Menu.Divider,{key:`divider-${W}`,className:a.default.menuItemDivider}):null)})},[]);return o.default.createElement(p.Menu,Object.assign({className:"kt-menu",selectable:!1,motion:{motionLeave:!1,motionEnter:!1}},{builtinPlacements:s.default},{onClick:R,style:w}),N(A))};e.MenuActionList=c;const g=({type:A,icon:T,disabled:D,onClick:w,title:I})=>{const O=(0,d.useDesignStyles)(a.default.btnAction,"btnAction");if(A==="icon")return o.default.createElement(u.Button,{size:"small",type:A,className:O,onClick:w,title:I,icon:T||"ellipsis"});const M={};return(0,h.isBoolean)(D)&&(M.disabled=D),o.default.createElement(u.Button,Object.assign({size:"small",type:"secondary",className:O,onClick:w},M,{title:I}),o.default.createElement(u.Icon,{icon:T||"ellipsis"}))};g.displayName="EllipsisWidget";const v=o.default.memo(A=>{var{iconService:T,type:D="icon",data:w,context:I=[],className:O,afterClick:M}=A,R=n.__rest(A,["iconService","type","data","context","className","afterClick"]);const P=(0,d.useDesignStyles)(a.default.iconAction,"iconAction"),L=(0,d.useDesignStyles)(a.default.btnAction,"btnAction"),N=(0,f.useInjectable)(h.CommandRegistry),[B,k]=(0,o.useState)(!1),F=o.default.useCallback(async(K,...G)=>{if(K&&(K.preventDefault(),K.stopPropagation()),!B){if(k(!0),w.id===_.SubmenuItemNode.ID&&K){const V={x:K.clientX,y:K.clientY};await w.execute([V,...I])}else typeof w.execute=="function"&&await w.execute([...I,...G]);k(!1),typeof M=="function"&&M()}},[w,I]);o.default.useEffect(()=>{let K;switch(w.id){case E.GitCommands.Stage:{const G=I[0];if(!G||!G.sourceUri)break;K=N.registerHandler(`${w.id}-${G.sourceUri.toString()}`,{execute:async()=>{typeof w.execute=="function"&&await w.execute([...I])}})}break;default:break}return()=>{K&&K.dispose()}},[w.id]);const[W,j]=o.default.useMemo(()=>{let K=w.tooltip||w.label;const G=w.label;return w.keybinding&&(K=`${K} (${w.keybinding})`),[K,G]},[w]),H=w.id===_.SubmenuItemNode.ID;return D==="icon"&&!w.type?o.default.createElement(u.Button,Object.assign({type:w.icon?"icon":"link",className:(0,l.default)(P,O,{[a.default.disabled]:w.disabled,[a.default.submenuIconAction]:H}),title:W,iconClass:w.icon,onClick:F},R),!w.icon&&j):w.type==="checkbox"?o.default.createElement(u.CheckBox,Object.assign({className:(0,l.default)(O,L),disabled:w.disabled,label:w.label,title:W,checked:w.checked,onChange:K=>F(void 0,K.target.checked)},R)):o.default.createElement(u.Button,Object.assign({loading:B,className:(0,l.default)(O,L),disabled:w.disabled,onClick:F,size:"small",type:w.type,title:W},R),(0,m.transformLabelWithCodicon)(j,{margin:"0 3px"},T?.fromString.bind(T)),H&&o.default.createElement(u.Icon,{icon:"down",className:"kt-button-secondary-more"}))});v.displayName="InlineAction";const b=({data:A,context:T})=>{const D=o.default.useCallback(()=>A.getExecuteArgs(T),[A,T]);return o.default.createElement(A.component,{getExecuteArgs:D})};b.displayName="CustomAction",e.TitleActionList=o.default.memo(({type:A="icon",nav:T=[],more:D=[],moreIcon:w,moreTitle:I,context:O=[],extraNavActions:M=[],moreAtFirst:R=!1,className:P,afterClick:L,menuId:N,iconService:B,regroup:k=(...F)=>F})=>{const F=(0,f.useInjectable)(_.ICtxMenuRenderer),W=(0,f.useInjectable)(_.AbstractMenuService),j=(0,d.useDesignStyles)(a.default.titleActions,"titleActions"),[H,K]=k(T,D),G=o.default.useCallback(z=>{z.preventDefault(),z.stopPropagation(),K&&F.show({anchor:{x:z.clientX,y:z.clientY},menuNodes:K,args:O,onHide:L})},[K,O]);if(H.length===0&&K.length===0&&M.length===0)return null;const V=K.length>0?o.default.createElement(g,{disabled:K[0].disabled,icon:w,type:A,onClick:G,title:I}):null;return o.default.createElement("div",{className:(0,l.default)([j,P]),"data-menu-id":N},R&&V,H.map(z=>{if(z.id===_.ComponentMenuItemNode.ID)return o.default.createElement(b,{context:O,data:z,key:z.nodeId});if(z.id===_.SubmenuItemNode.ID){const $=W.createMenu(z.submenuId);if(!((0,_.generateMergedCtxMenu)({menus:$}).length>0))return}if(z.id===_.SeparatorMenuItemNode.ID)return o.default.createElement("span",{key:`vertical-divider-${z.id}`,className:a.default.verticalDivider});const U=z.id===_.SubmenuItemNode.ID?z.submenuId:z.id;return o.default.createElement(v,{id:U,key:U,className:(0,l.default)({[a.default.selected]:z.checked}),type:A,data:z,afterClick:L,context:O,iconService:B})}),Array.isArray(M)&&M.length?o.default.createElement(o.default.Fragment,null,H.length&&o.default.createElement("span",{className:a.default.divider}),M):null,!R&&V)}),e.TitleActionList.displayName="TitleActionList";function S(A){const{menus:T,context:D,separator:w="navigation",debounce:I,isFlattenMenu:O=!1}=A,M=n.__rest(A,["menus","context","separator","debounce","isFlattenMenu"]),[R,P]=(0,d.useMenus)(T,w,D,I),L=(0,o.useMemo)(()=>O?[...R,...P]:R,[R,P,O]);return o.default.createElement(e.TitleActionList,Object.assign({menuId:T.menuId,nav:L,more:w==="inline"||O?[]:P},M))}e.InlineActionBar=S;function y(A){const{iconService:T,menus:D,context:w,moreIcon:I,moreTitle:O,separator:M="navigation"}=A,R=n.__rest(A,["iconService","menus","context","moreIcon","moreTitle","separator"]),[P,L]=(0,d.useContextMenus)(D);return o.default.createElement(e.TitleActionList,Object.assign({menuId:D.menuId,nav:P,more:M==="inline"?[]:L,moreIcon:I,moreTitle:O,context:w,iconService:T},R))}e.InlineMenuBar=y,y.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),l=n.__importStar(t(14041)),o=t(43718),u=t(22689),p=t(48560),h=t(57995),E=t(24951),_=t(52141),f=n.__importDefault(t(27410)),m=(0,u.createLayoutEventType)(o.AIInlineChatContentWidgetId),d=new CustomEvent(m,{bubbles:!0}),s=a=>{const{operationList:r,moreOperation:c,showClose:g,onClickItem:v,onClose:b}=a,S=l.default.useRef(null),[y,A]=(0,p.useHover)(),T=(0,l.useCallback)(()=>{b&&b()},[b]);return(0,p.useChange)(A,()=>{S.current&&S.current.dispatchEvent(d)}),l.default.createElement("div",{ref:S,className:f.default.ai_action},l.default.createElement(h.AILogoAvatar,{className:f.default.ai_action_icon}),l.default.createElement(E.LineVertical,{height:"60%",margin:"0px 4px 0 8px"}),l.default.createElement("div",{ref:y,className:f.default.operate_container},r.map(({name:D,title:w,id:I},O)=>w?l.default.createElement(_.EnhancePopover,{id:I,title:w,key:`popover_${O}`},l.default.createElement(h.EnhanceIcon,{wrapperClassName:f.default.operate_item,onClick:()=>v(I)},l.default.createElement("span",{key:O},D))):l.default.createElement(h.EnhanceIcon,{wrapperClassName:f.default.operate_item,onClick:()=>v(I),key:O},l.default.createElement("span",null,D))),c?.length?l.default.createElement(h.EnhanceIconWithCtxMenu,{icon:"more",menuNodes:c,wrapperClassName:f.default.operate_btn,skew:{x:-83,y:5}}):null,g!==!1&&l.default.createElement("div",{className:f.default.close_container,style:{display:A?"flex":"none"}},l.default.createElement(E.LineVertical,{height:"60%",margin:"0px 4px 0 4px"}),l.default.createElement(h.EnhanceIcon,{wrapperClassName:f.default.operate_btn,icon:"window-close",onClick:T}))))};e.AIAction=s},66205:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ContentWidgetContainerPanel=void 0;const n=t(85608),l=n.__importDefault(t(14041)),o=n.__importDefault(t(41771)),u=p=>l.default.createElement("div",{className:o.default.inline_chat_container_panel,style:p.style},p.children);e.ContentWidgetContainerPanel=u},57995:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AILogoAvatar=e.EnhanceIconWithCtxMenu=e.EnhanceIcon=void 0;const n=t(85608),l=n.__importDefault(t(53373)),o=n.__importStar(t(14041)),u=t(81878),p=t(97222),h=t(48560),E=n.__importDefault(t(42798));e.EnhanceIcon=o.default.forwardRef((m,d)=>o.default.createElement("div",{className:(0,l.default)(m.wrapperClassName,E.default.ai_enhance_icon),style:m.wrapperStyle,onClick:m.onClick,ref:d},o.default.createElement(u.Icon,{className:(0,l.default)(m.className,E.default.icon),children:null,onClick:()=>null,style:(m.icon||m.iconClass)&&m.children?{marginRight:5}:{},icon:m.icon,iconClass:m.iconClass}),m.children&&o.default.createElement("span",{className:E.default.children_wrap},m.children)));const _=m=>{const{children:d,menuNodes:s,skew:a}=m,r=n.__rest(m,["children","menuNodes","skew"]),c=(0,h.useInjectable)(p.IBrowserCtxMenu),[g,v]=o.default.useState(void 0),b=o.default.useRef(null);o.default.useEffect(()=>{S()},[b.current,a]);const S=(0,o.useCallback)(A=>{requestAnimationFrame(()=>{if(b.current){const T=b.current.getBoundingClientRect(),{x:D,y:w,width:I,height:O}=T,M={x:D+I,y:w+O};a&&(M.x+=a.x,M.y+=a.y),v(M),A&&A(M)}})},[b.current,a]),y=o.default.useCallback(()=>{g&&S(A=>{c.show({anchor:A,menuNodes:s})})},[b.current,s,g]);return o.default.createElement(e.EnhanceIcon,Object.assign({ref:b,onClick:y},r),d)};e.EnhanceIconWithCtxMenu=_;const f=m=>o.default.createElement("div",{className:(0,l.default)(E.default.ai_logo_avatar_container,m.className)},o.default.createElement(u.Icon,{icon:"magic-wand",className:(0,l.default)(m.iconClassName,E.default.avatar_icon)}));e.AILogoAvatar=f},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)},50610:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AIInlineResult=void 0;const n=t(85608),l=n.__importDefault(t(14041)),o=t(57995),u=t(24951),p=t(75777),h=n.__importDefault(t(5011)),E=_=>{const{iconItems:f,isRenderThumbs:m=!0,isRenderClose:d=!1,closeClick:s}=_;return l.default.createElement("div",{className:h.default.ai_inline_result_panel},l.default.createElement("div",{className:h.default.side},f.map(({icon:a,text:r,onClick:c},g)=>l.default.createElement(o.EnhanceIcon,{wrapperClassName:h.default.operate_btn,icon:a,onClick:c,key:g},l.default.createElement("span",null,r)))),m&&l.default.createElement(l.default.Fragment,null,l.default.createElement(u.LineVertical,{height:"60%",margin:"0px 6px 0 6px"}),l.default.createElement("div",{className:h.default.side},l.default.createElement(p.Thumbs,{wrapperClassName:h.default.operate_icon}))),d&&l.default.createElement(l.default.Fragment,null,l.default.createElement(o.EnhanceIcon,{wrapperClassName:h.default.operate_btn,icon:"close",onClick:s})))};e.AIInlineResult=E},24951:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.HorizontalVertical=e.LineVertical=void 0;const l=t(85608).__importDefault(t(14041)),o={backgroundColor:"var(--editorGroup-border)",height:"100%",width:"1px",minWidth:"1px"},u={backgroundColor:"var(--editorGroup-border)",width:"100%",height:"1px",minHeight:"1px"},p=E=>l.default.createElement("span",{style:Object.assign(Object.assign({},o),E)});e.LineVertical=p;const h=E=>l.default.createElement("span",{style:Object.assign(Object.assign({},u),E)});e.HorizontalVertical=h},52141:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EnhancePopover=void 0;const l=t(85608).__importStar(t(14041)),o=t(97267),u=t(43718),p=h=>{const{children:E,id:_,title:f,onClick:m}=h,[d,s]=l.default.useState(!1),a=(0,l.useMemo)(()=>_+(0,u.uuid)(6),[_]),r=(0,l.useCallback)(g=>{s(!1),m&&m(g)},[m]),c=(0,l.useCallback)(g=>{s(g)},[]);return l.default.createElement(o.Popover,{id:a,title:f,onClick:r,display:d,onDisplayChange:c},E)};e.EnhancePopover=p},75777:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Thumbs=void 0;const l=t(85608).__importStar(t(14041)),o=t(43718),u=t(95040),p=t(81878),h=t(48560),E=t(67304),_=t(57995),f=m=>{const d=(0,h.useInjectable)(u.IAIInlineChatService),{relationId:s,onClick:a,wrapperClassName:r}=m,[c,g]=(0,l.useState)("thumbs"),[v,b]=(0,l.useState)("thumbsdown"),S=(0,l.useCallback)(T=>{a&&a(T),d&&d.fireThumbsEvent(T)},[s,d]),y=(0,l.useCallback)(T=>{T==="up"&&c==="thumbs"&&(g("thumbs-fill"),b(!1),S(!0)),T==="up"&&c==="thumbs-fill"&&(g("thumbs"),b("thumbsdown")),T==="down"&&v==="thumbsdown"&&(b("thumbsdown-fill"),g(!1),S(!1)),T==="down"&&v==="thumbsdown-fill"&&(b("thumbsdown"),g("thumbs"))},[c,v]),A=(0,h.useUUID)();return l.default.createElement(l.default.Fragment,null,typeof c=="string"&&l.default.createElement(p.Popover,{id:`ai-chat-thumbsup-${A}`,title:(0,o.localize)("aiNative.inline.chat.operate.thumbsup.title")},l.default.createElement(_.EnhanceIcon,{wrapperClassName:r,onClick:()=>y("up"),className:(0,E.getExternalIcon)(c,E.KTICON_OWNER)})),typeof v=="string"&&l.default.createElement(p.Popover,{id:`ai-chat-thumbsdown-${A}`,title:(0,o.localize)("aiNative.inline.chat.operate.thumbsdown.title")},l.default.createElement(_.EnhanceIcon,{wrapperClassName:r,onClick:()=>y("down"),className:(0,E.getExternalIcon)(v,E.KTICON_OWNER)})))};e.Thumbs=f},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 l=t(77331);Object.defineProperty(e,"NativeSelect",{enumerable:!0,get:function(){return l.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),l=n.__importDefault(t(53373)),o=n.__importStar(t(14041)),u=t(48560),p=t(38578),h=t(55693),E=t(25719),_=n.__importDefault(t(91290)),f=m=>{var{className:d,children:s=[],direction:a="left-to-right"}=m,r=n.__rest(m,["className","children","direction"]);const c=o.default.Children.toArray(s),g=(0,u.useInjectable)(p.AppConfig),v=(0,h.useDesignStyles)(_.default["box-panel"],"box-panel");(0,o.useEffect)(()=>{g.didRendered&&g.didRendered()},[]);const b=E.Layout.getStyleProperties(a);return o.default.createElement("div",Object.assign({},r,{className:(0,l.default)(v,d),style:{flexDirection:b.direction,zIndex:r.zIndex||r["z-index"]}}),c.map((S,y)=>{const A=S.props||{};return o.default.createElement("div",{key:y,id:A["data-wrapper-id"],className:(0,l.default)(_.default.wrapper,A["data-wrapper-class"]),style:{flex:A.flex,overflow:A.overflow,zIndex:A.zIndex||A["z-index"],[b.minSize]:A.defaultSize,backgroundColor:A.backgroundColor}},S)}))};e.BoxPanel=f},28003:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ToolbarActionBasedLayout=e.DefaultLayout=e.getStorageValue=void 0;const l=t(85608).__importDefault(t(14041)),o=t(52564),u=t(57327),p=t(99333),h=()=>{let _={},f={};try{_=JSON.parse(localStorage.getItem("layout")||"{}"),f=JSON.parse(localStorage.getItem("theme")||"{}")}catch{}return{layout:_,colors:f}};e.getStorageValue=h,e.DefaultLayout=E;function E(_={}){var f,m,d,s,a;const{layout:r}=(0,e.getStorageValue)();return l.default.createElement(u.BoxPanel,{direction:"top-to-bottom"},l.default.createElement(o.SlotRenderer,{id:"top",defaultSize:_.topSlotDefaultSize||0,slot:"top",zIndex:_.topSlotZIndex}),l.default.createElement(p.SplitPanel,{id:"main-horizontal",flex:1},l.default.createElement(o.SlotRenderer,{slot:"left",isTabbar:!0,defaultSize:!((f=r.left)===null||f===void 0)&&f.currentId?((m=r.left)===null||m===void 0?void 0:m.size)||310:49,minResize:280,maxResize:480,minSize:49}),l.default.createElement(p.SplitPanel,{id:"main-vertical",minResize:300,flexGrow:1,direction:"top-to-bottom"},l.default.createElement(o.SlotRenderer,{flex:2,flexGrow:1,minResize:200,slot:"main"}),l.default.createElement(o.SlotRenderer,{flex:1,defaultSize:(d=r.bottom)===null||d===void 0?void 0:d.size,minResize:160,slot:"bottom",isTabbar:!0})),l.default.createElement(o.SlotRenderer,{slot:"right",isTabbar:!0,defaultSize:!((s=r.right)===null||s===void 0)&&s.currentId?((a=r.right)===null||a===void 0?void 0:a.size)||310:0,minResize:280,maxResize:480,minSize:0})),l.default.createElement(o.SlotRenderer,{id:"statusBar",defaultSize:24,slot:"statusBar"}))}e.ToolbarActionBasedLayout=E},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),l={"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(u){function p(a){return l[a]}u.getStyleProperties=p;function h(a){return l[a].direction}u.getFlexDirection=h;function E(a){return l[a].size}u.getSizeProperty=E;function _(a){return l[a].domSize}u.getDomSizeProperty=_;function f(a){return l[a].minSize}u.getMinSizeProperty=f;function m(a){return l[a].maxSize}u.getMaxSizeProperty=m;function d(a){return a==="bottom-to-top"||a==="top-to-bottom"?n.ResizeHandleVertical:n.ResizeHandleHorizontal}u.getResizeHandle=d;function s(a){return a==="bottom-to-top"||a==="top-to-bottom"?"row":"column"}u.getTabbarDirection=s})(o=e.Layout||(e.Layout={}))},99333:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SplitPanel=e.PanelContext=void 0;const n=t(85608),l=n.__importDefault(t(53373)),o=n.__importDefault(t(14041)),u=t(43718),p=t(68456),h=t(48560),E=t(73215),_=t(25719),f=t(71707),m=n.__importDefault(t(91290));e.PanelContext=o.default.createContext({setSize:(r,c)=>{},setRelativeSize:(r,c,g)=>{},getSize:r=>0,getRelativeSize:r=>[0,0],lockSize:(r,c)=>{},setMaxSize:(r,c)=>{},hidePanel:r=>{}});const d=(r,c,g)=>{var v,b;return(b=r&&r.props&&((v=r.props[c])!==null&&v!==void 0?v:r.props[`data-sp-${c}`]))!==null&&b!==void 0?b:g};function s(r,c){return d(r,"savedSize")?d(r,"savedSize")+"px":d(r,"defaultSize")!==void 0?d(r,"defaultSize")+"px":d(r,"flex")?d(r,"flex")/c*100+"%":1/c*100+"%"}const a=r=>{const c=(0,h.useInjectable)(f.SplitPanelManager).getService(r.id),{id:g,className:v,resizeHandleClassName:b,style:S,children:y=[],direction:A="left-to-right",resizeKeep:T=!0,dynamicTarget:D}=o.default.useMemo(()=>c.interceptProps(r),[c,c.interceptProps,r]),w=_.Layout.getResizeHandle(A),I=_.Layout.getStyleProperties(A),O=o.default.useMemo(()=>o.default.Children.toArray(y),[y]),M=o.default.useMemo(()=>O.find(_e=>d(_e,"flexGrow")),[O]),R=o.default.useMemo(()=>O.reduce((_e,pe)=>_e+d(pe,"flex",1),0),[O]),P=o.default.useRef([]),L=(0,h.useInjectable)(u.IEventBus),N=o.default.useRef(),B=o.default.useRef(O.map(()=>!1)),k=o.default.useRef(O.map(()=>!1)),F=o.default.useRef(B.current.slice(0,O.length-1)),[W,j]=o.default.useState(F.current),[H,K]=o.default.useState(k.current),[G,V]=o.default.useState(B.current);c.panels=[];const z=o.default.useCallback(_e=>(pe,q)=>{const ae=q?_e-1:_e,ie=P.current[ae];ie&&ie.setAbsoluteSize(pe!==void 0?pe:d(O[_e],"defaultSize"),q,T)},[P.current]),U=o.default.useCallback(_e=>(pe,q,ae)=>{const ie=ae?_e-1:_e,he=P.current[ie];he&&he.setRelativeSize(pe,q)},[P.current]),$=o.default.useCallback(_e=>pe=>{const q=pe?_e-1:_e,ae=P.current[q];return ae?ae.getAbsoluteSize(pe):0},[P.current]),Q=o.default.useCallback(_e=>pe=>{const q=pe?_e-1:_e,ae=P.current[q];return ae?ae.getRelativeSize():[0,0]},[P.current]),Y=o.default.useCallback(_e=>(pe,q)=>{const ae=q?_e-1:_e,ie=F.current.map((he,J)=>J===ae?pe!==void 0?pe:!he:he);F.current=ie,j(ie)},[P.current]),re=o.default.useCallback(_e=>pe=>{const q=B.current.map((ae,ie)=>ie===_e?pe!==void 0?pe:!ae:ae);B.current=q,V(q)},[P.current]),se=o.default.useCallback(_e=>pe=>{const q=k.current.map((ie,he)=>he===_e?pe!==void 0?!pe:!ie:ie);k.current=q;const ae=d(O[_e],"slot")||d(O[_e],"id");ae&&le(ae),K(q)},[O,k.current]),le=o.default.useCallback(_e=>{_e&&L.fire(new p.ResizeEvent({slotLocation:_e}))},[L]),fe=o.default.useMemo(()=>O.map((_e,pe)=>{const q=[],ae=d(_e,"minSize"),ie=d(_e,"maxSize"),he=d(_e,"flexGrow");if(pe!==0){const J=pe===1?O[pe-1]:O[pe];let X;he?X=E.ResizeFlexMode.Prev:d(O[pe-1],"flexGrow")&&(X=E.ResizeFlexMode.Next),d(J,"noResize")||W[pe-1]||q.push(o.default.createElement(w,{className:b,onResize:()=>{const ne=d(O[pe-1],"slot")||d(O[pe-1],"id"),de=d(O[pe],"slot")||d(O[pe],"id");le(ne),le(de)},noColor:!0,findNextElement:D?ne=>c.getFirstResizablePanel(pe-1,ne):void 0,findPrevElement:D?ne=>c.getFirstResizablePanel(pe-1,ne,!0):void 0,key:`split-handle-${pe}`,delegate:ne=>{P.current.push(ne)},flexMode:X}))}return q.push(o.default.createElement(e.PanelContext.Provider,{key:pe,value:{setSize:z(pe),getSize:$(pe),setRelativeSize:U(pe),getRelativeSize:Q(pe),lockSize:Y(pe),setMaxSize:re(pe),hidePanel:se(pe)}},o.default.createElement("div",{"data-min-resize":d(_e,"minResize"),"data-max-resize":d(_e,"maxResize"),ref:J=>{J&&c.panels.indexOf(J)===-1&&c.panels.push(J)},id:d(_e,"id"),style:Object.assign(Object.assign(Object.assign(Object.assign({},d(_e,"flex")&&!d(_e,"savedSize")&&!M?{flex:d(_e,"flex")}:{[I.size]:s(_e,R)}),{[I.minSize]:ae?ae+"px":"-1px",[I.maxSize]:G[pe]&&ie?ie+"px":"unset"}),he!==void 0?{flexGrow:he}:{}),{display:H[pe]?"none":"block"})},_e))),q}).filter(Boolean),[y,O,b,D,P.current,H,W]);return o.default.useEffect(()=>{N.current&&c.setRootNode(N.current);const _e=L.on(p.ResizeEvent,pe=>{pe.payload.slotLocation===g&&O.forEach(q=>{le(d(q,"slot")||d(q,"id"))})});return()=>{_e.dispose()}},[]),o.default.useMemo(()=>{const{minResize:_e,flexGrow:pe,minSize:q,maxSize:ae,savedSize:ie,defaultSize:he,flex:J,noResize:X,slot:oe}=r,ne=n.__rest(r,["minResize","flexGrow","minSize","maxSize","savedSize","defaultSize","flex","noResize","slot"]);return delete ne.resizeHandleClassName,delete ne.dynamicTarget,delete ne.resizeKeep,delete ne.direction,c.renderSplitPanel(o.default.createElement("div",Object.assign({},ne,{ref:de=>N.current=de,className:(0,l.default)(m.default["split-panel"],v),style:Object.assign({flexDirection:I.direction},S),"data-min-resize":_e,"data-max-resize":ae,"data-min-size":q,"data-max-size":ae,"data-saved-size":ie,"data-default-size":he,"data-flex":J,"data-flex-grow":pe,"data-no-resize":X,"data-slot":oe})),fe,ne)},[c,c.renderSplitPanel,fe,N,S,r])};e.SplitPanel=a},71707:(x,e,t)=>{"use strict";var n;Object.defineProperty(e,"__esModule",{value:!0}),e.SplitPanelManager=e.SplitPanelService=e.ISplitPanelService=void 0;const l=t(85608),o=l.__importDefault(t(14041)),u=t(76003),p=t(43718);e.ISplitPanelService=Symbol("ISplitPanelService");let h=n=class extends p.Disposable{constructor(f){super(),this.panelId=f,this._whenReadyDeferred=new p.Deferred,this.panels=[]}get isVisible(){return this.rootNode&&this.rootNode.clientHeight>0||!1}get whenReady(){return this._whenReadyDeferred.promise}setRootNode(f){this.rootNode=f,this._whenReadyDeferred.resolve()}getFirstResizablePanel(f,m,d){if(d){if(m)return this.panels[f];for(let s=f;s>=0;s--)if(this.panels[s].clientHeight>n.MIN_SIZE)return this.panels[s]}else if(m){for(let s=f+1;s<this.panels.length;s++)if(this.panels[s].clientHeight>n.MIN_SIZE)return this.panels[s]}else return this.panels[f+1]}renderSplitPanel(f,m,d){return o.default.cloneElement(f,Object.assign(Object.assign({},d),f.props),m)}interceptProps(f){return f}};h.MIN_SIZE=120,h=n=l.__decorate([(0,u.Injectable)({multiple:!0}),l.__metadata("design:paramtypes",[String])],h),e.SplitPanelService=h;let E=class{constructor(){this.services=new Map}getService(f){let m=this.services.get(f);return m||(m=this.injector.get(e.ISplitPanelService,[f]),this.services.set(f,m)),m}};l.__decorate([(0,u.Autowired)(u.INJECTOR_TOKEN),l.__metadata("design:type",u.Injector)],E.prototype,"injector",void 0),E=l.__decorate([(0,u.Injectable)()],E),e.SplitPanelManager=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 l=t(85608).__importDefault(t(14041));t(18182);const o=()=>l.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 l=t(85608).__importDefault(t(43144)),o=t(48560),u=({id:p,className:h,children:E})=>{const _=(0,o.usePortal)(p,h);return l.default.createPortal(E,_)};e.default=u},73215:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ResizeHandleVertical=e.ResizeHandleHorizontal=e.allowWebviewCatchMouseEvents=e.preventWebviewCatchMouseEvents=e.ResizeFlexMode=e.RESIZE_LOCK=void 0;const n=t(85608),l=n.__importDefault(t(53373)),o=n.__importDefault(t(14041)),u=n.__importDefault(t(57482));e.RESIZE_LOCK="resize-lock";var p;(function(m){m.Prev="prev",m.Next="next",m.Percentage="Percentage"})(p=e.ResizeFlexMode||(e.ResizeFlexMode={}));function h(){const m=document.getElementsByTagName("iframe"),d=document.getElementsByTagName("webview");for(const a of d)a.classList.add("none-pointer-event");for(const a of m)a.classList.add("none-pointer-event");const s=document.getElementsByClassName("shadow-root-host");for(const a of s)a?.classList.add("none-pointer-event")}e.preventWebviewCatchMouseEvents=h;function E(){const m=document.getElementsByTagName("iframe"),d=document.getElementsByTagName("webview");for(const a of d)a.classList.remove("none-pointer-event");for(const a of m)a.classList.remove("none-pointer-event");const s=document.getElementsByClassName("shadow-root-host");for(const a of s)a?.classList.remove("none-pointer-event")}e.allowWebviewCatchMouseEvents=E;const _=m=>{const d=o.default.useRef(),s=o.default.useRef(!1),a=o.default.useRef(0),r=o.default.useRef(0),c=o.default.useRef(0),g=o.default.useRef(),v=o.default.useRef(),b=o.default.useRef(),S=(N,B)=>{const k=d.current.parentElement.offsetWidth,F=m.findPrevElement?m.findPrevElement():g.current,W=m.findNextElement?m.findNextElement():v.current;if(F&&F.classList.contains(e.RESIZE_LOCK)||W&&W.classList.contains(e.RESIZE_LOCK))return;const j=Number(F?.dataset.minResize||0),H=Number(W?.dataset.minResize||0),K=Number(F?.dataset.maxResize||0),G=Number(W?.dataset.maxResize||0);(j||H)&&(N*k<=j||B*k<=H)||(K||G)&&(N*k>=K||B*k>=G)||(W&&(W.style.width=B*100+"%"),F&&(F.style.width=N*100+"%"),m.onResize&&W&&F&&m.onResize(F,W))},y=(N,B,k,F)=>{var W,j;const H=m.findPrevElement?m.findPrevElement(F):g.current,K=m.findNextElement?m.findNextElement(F):v.current,G=Number((W=H?.dataset.minResize)!==null&&W!==void 0?W:0),V=Number((j=K?.dataset.minResize)!==null&&j!==void 0?j:0),z=H?.dataset.maxResize?Number(H?.dataset.maxResize):null,U=K?.dataset.maxResize?Number(K?.dataset.maxResize):null,$=m.flexMode===p.Prev,Q=$?H:K,Y=$?K:H;let re=$?N:B;k||((G||V)&&($?G>N?re=G:V>B&&(re=N+B-V):V>B?re=V:G>N&&(re=N+B-G)),(z||U)&&($?z&&z<=N?re=z:U&&U>B&&(re=N+B-U):U&&U<=B?re=U:z&&z>B&&(re=N+B-z))),Q.style.width=re+"px",Q.style.flexGrow="0",Q.style.flexShrink="1",Y.style.width="0",Y.style.flexGrow="1",Y.style.flexShrink="0",m.onResize&&K&&H&&m.onResize(H,K)},A=(N,B)=>{const k=g.current,F=v.current;let W;m.flexMode?W=(k.offsetWidth+F.offsetWidth)/k.parentElement.offsetWidth*100:W=+v.current.style.width.replace("%","")+ +g.current.style.width.replace("%",""),F&&(F.style.width=B/(N+B)*W+"%"),k&&(k.style.width=N/(N+B)*W+"%"),T(N,B),m.onResize&&F&&k&&m.onResize(k,F)},T=(N,B)=>{const k=g.current,F=v.current;let W=!1;k&&(N===0?(k.classList.add("kt_display_none"),W=!0):k.classList.remove("kt_display_none")),F&&(B===0?(F.classList.add("kt_display_none"),W=!0):F.classList.remove("kt_display_none")),d.current&&(W?d.current.classList.add("none-pointer-event"):d.current.classList.remove("none-pointer-event"))},D=()=>{const N=g.current.clientWidth,B=v.current.clientWidth,k=N+B,F=[];return F.push(N/k),F.push(B/k),F},w=(N,B)=>{const k=g.current.clientWidth,F=v.current.clientWidth,W=k+F;if(m.flexMode){const j=m.flexMode===p.Prev?N:W-N,H=m.flexMode===p.Next?N:W-N;y(j,H,!0)}else{const j=+v.current.style.width.replace("%","")+ +g.current.style.width.replace("%","");B?(v.current.style.width=j*(N/W)+"%",g.current.style.width=j*(1-N/W)+"%"):(g.current.style.width=j*(N/W)+"%",v.current.style.width=j*(1-N/W)+"%")}B?T(W-N,N):T(N,W-N),m.onResize&&m.onResize(g.current,v.current)},I=N=>N?v.current.clientWidth:g.current.clientWidth,O=N=>{const B=N.classList,k=u.default["resize-overflow-hidden"];B?.contains(k)||B.add(k)},M=N=>{const B=N.classList,k=u.default["resize-overflow-hidden"];B?.contains(k)&&B.remove(k)},R=N=>{if(N.preventDefault(),d.current&&d.current.classList.contains("no-resize"))return;const B=r.current+N.pageX-a.current,k=c.current-(N.pageX-a.current);b.current&&window.cancelAnimationFrame(b.current);const F=d.current.parentElement.offsetWidth;b.current=window.requestAnimationFrame(()=>{m.flexMode?y(B,k):S(B/F,k/F)})},P=N=>{var B;s.current=!1,(B=d.current)===null||B===void 0||B.classList.remove(u.default.active),document.removeEventListener("mousemove",R),document.removeEventListener("mouseup",P),M(g.current),M(v.current),m.onFinished&&m.onFinished(),E()},L=N=>{var B;s.current=!0,(B=d.current)===null||B===void 0||B.classList.add(u.default.active),document.addEventListener("mousemove",R),document.addEventListener("mouseup",P),a.current=N.pageX,r.current=g.current.offsetWidth,c.current=v.current.offsetWidth,O(g.current),O(v.current),h()};return o.default.useEffect(()=>(d.current&&(d.current.addEventListener("mousedown",L),g.current=d.current.previousSibling,v.current=d.current.nextSibling),()=>{d.current&&(d.current.removeEventListener("mousedown",L),d.current.removeEventListener("mousemove",R),d.current.removeEventListener("mouseup",P))}),[]),m.delegate&&m.delegate({setSize:S,setAbsoluteSize:w,getAbsoluteSize:I,setRelativeSize:A,getRelativeSize:D}),o.default.createElement("div",{ref:N=>{d.current=N},className:(0,l.default)({[u.default["resize-handle-horizontal"]]:!0,[u.default["with-color"]]:!m.noColor,[m.className||""]:!0})})};e.ResizeHandleHorizontal=_;const f=m=>{const d=o.default.useRef(),s=o.default.useRef(!1),a=o.default.useRef(0),r=o.default.useRef(0),c=o.default.useRef(0),g=o.default.useRef(),v=o.default.useRef(),b=o.default.useRef(),S=o.default.useRef(),y=o.default.useRef(),A=(B,k,F)=>{const W=m.findPrevElement?m.findPrevElement(F):g.current,j=m.findNextElement?m.findNextElement(F):v.current;!j||!W||W.classList.contains(e.RESIZE_LOCK)||j.classList.contains(e.RESIZE_LOCK)||(j.style.height=k*100+"%",W.style.height=B*100+"%",m.onResize&&m.onResize(W,j))},T=(B,k,F,W)=>{var j,H;const K=m.findPrevElement?m.findPrevElement(W):g.current,G=m.findNextElement?m.findNextElement(W):v.current;let V,z,U=0;const $=Number(((j=K?.dataset)===null||j===void 0?void 0:j.minResize)||0),Q=Number(((H=G?.dataset)===null||H===void 0?void 0:H.minResize)||0);m.flexMode===p.Prev?(V=K,z=G,U=B,F||($>B?U=$:Q>k&&(U=B+k-Q))):(V=G,z=K,U=k,F||(Q>k?U=Q:$>B&&(U=B+k-$))),V.style.height=U+"px",V.style.flexGrow="0",V.style.flexShrink="1",z.style.height="0",z.style.flexGrow="1",z.style.flexShrink="0",m.onResize&&G&&K&&m.onResize(K,G)},D=(B,k)=>{const F=g.current,W=v.current;let j;m.flexMode?j=(F.offsetHeight+W.offsetHeight)/F.parentElement.offsetHeight*100:j=+W.style.height.replace("%","")+ +F.style.height.replace("%",""),W&&(W.style.height=k/(B+k)*j+"%"),F&&(F.style.height=B/(B+k)*j+"%"),w(B,k),m.onResize&&W&&F&&m.onResize(F,W)},w=(B,k)=>{const F=g.current,W=v.current;let j=!1;F&&(B===0?(F.classList.add("kt_display_none"),j=!0):F.classList.remove("kt_display_none")),W&&(k===0?(W.classList.add("kt_display_none"),j=!0):W.classList.remove("kt_display_none")),d.current&&(j?d.current.classList.add("none-pointer-event"):d.current.classList.remove("none-pointer-event"))},I=()=>{const B=g.current.clientHeight,k=v.current.clientHeight,F=B+k,W=[];return W.push(B/F),W.push(k/F),W},O=(B,k,F,W)=>{F.classList.contains(e.RESIZE_LOCK)||W.classList.contains(e.RESIZE_LOCK)||(W.style.height=k+"px",F.style.height=B+"px",W.style.flex="unset",F.style.flex="unset",m.onResize&&W&&F&&m.onResize(F,W))},M=(B,k,F)=>{const W=g.current.clientHeight,j=v.current.clientHeight,H=W+j;if(m.flexMode){const K=m.flexMode===p.Prev?B:H-B,G=m.flexMode===p.Next?B:H-B;T(K,G,!0)}else{const K=+v.current.style.height.replace(/\%|px/,""),G=+g.current.style.height.replace(/\%|px/,""),V=K+G;if(k){F&&(g.current.style.height=V*(1-B/H)+"%");const z=V*(B/H);v.current.style.height=z===0?z+"px":z+"%"}else g.current.style.height=V*(B/H)+"%",F&&(v.current.style.height=V*(1-B/H)+"%")}k?w(H-B,B):w(B,H-B),m.onResize&&m.onResize(g.current,v.current)},R=B=>B?v.current.clientHeight:g.current.clientHeight,P=B=>{var k;s.current=!0,(k=d.current)===null||k===void 0||k.classList.add(u.default.active),document.addEventListener("mousemove",L),document.addEventListener("mouseup",N),a.current=B.pageY,S.current=v.current,b.current=g.current,r.current=g.current.offsetHeight,c.current=v.current.offsetHeight,h()},L=B=>{if(B.preventDefault(),d.current&&d.current.classList.contains("no-resize"))return;const k=B.pageY>a.current,F=m.findNextElement?m.findNextElement(k):null,W=m.findPrevElement?m.findPrevElement(k):null;if(F!==null&&S.current!==F||W!==null&&b.current!==W){if(!F||!W)return;S.current=F,b.current=W,a.current=B.pageY,r.current=b.current.offsetHeight,c.current=S.current.offsetHeight}const j=r.current+B.pageY-a.current,H=c.current-(B.pageY-a.current);y.current&&window.cancelAnimationFrame(y.current),y.current=window.requestAnimationFrame(()=>{const K=Number(b.current.dataset.minResize||0),G=Number(S.current.dataset.minResize||0);if(!((K||G)&&(j<=K||H<=G)))if(m.flexMode===p.Prev||m.flexMode===p.Next)T(j,H);else if(m.flexMode===p.Percentage){const V=d.current.parentElement.offsetHeight;A(j/V,H/V)}else O(j,H,b.current,S.current)})},N=B=>{var k;s.current=!1,(k=d.current)===null||k===void 0||k.classList.remove(u.default.active),document.removeEventListener("mousemove",L),document.removeEventListener("mouseup",N),m.onFinished&&m.onFinished(),E()};return o.default.useEffect(()=>(d.current.addEventListener("mousedown",P),g.current=d.current.previousSibling,v.current=d.current.nextSibling,()=>{d.current.removeEventListener("mousedown",P),document.removeEventListener("mousemove",L),document.removeEventListener("mouseup",N)}),[]),m.delegate&&m.delegate({setSize:A,setAbsoluteSize:M,getAbsoluteSize:R,setRelativeSize:D,getRelativeSize:I}),o.default.createElement("div",{ref:B=>B&&(d.current=B),className:(0,l.default)({[u.default["resize-handle-vertical"]]:!0,[m.className||""]:!0,[u.default["with-color"]]:!m.noColor})})};e.ResizeHandleVertical=f},77331:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Select=void 0;const n=t(85608),l=n.__importDefault(t(53373)),o=n.__importDefault(t(14041));n.__exportStar(t(88706),e);const u=p=>(p=Object.assign(Object.assign({},p),{className:(0,l.default)("kt_select",p.className)}),o.default.createElement("select",Object.assign({},p)));e.Select=u},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 l extends n.BasicEvent{}e.ContextKeyChangeEvent=l},50394:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),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)},20162:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DialogViewVisibleContext=void 0;const n=t(40191);e.DialogViewVisibleContext=new n.RawContextKey("dialogViewVisible",!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),l=t(63214);class o{constructor(p,h=l.getLanguageIdFromMonaco,E="resource"){if(this.contextKeyService=p,this.languageResolver=h,!E)throw new Error("resource key prefix cannot be empty!");this.resourceScheme=this.contextKeyService.createKey(E+"Scheme",""),this.resourceFilename=this.contextKeyService.createKey(E+"Filename",""),this.resourceExtname=this.contextKeyService.createKey(E+"Extname",""),this.resourceLangId=this.contextKeyService.createKey(E+"LangId",""),this.resourceKey=this.contextKeyService.createKey(E,""),this.isFileSystemResource=this.contextKeyService.createKey("isFileSystem"+E.substr(0,1).toUpperCase()+E.substr(1),!1)}set(p){if(!p){this.reset();return}const h=this.resourceKey.get();p.isEqual(new n.URI(h))||(this.resourceScheme.set(p.scheme),this.resourceFilename.set(p.path.name+p.path.ext),this.resourceExtname.set(p.path.ext),this.resourceLangId.set(this.languageResolver(p)),this.resourceKey.set(p.toString()),this.isFileSystemResource.set(p.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.WorkspaceFolderCount=e.WorkbenchState=void 0;const n=t(40191);e.WorkbenchState=new n.RawContextKey("workbenchState","empty"),e.WorkspaceFolderCount=new n.RawContextKey("workspaceFolderCount",0)},18193:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.injectCorePreferences=e.CorePreferences=e.corePreferenceSchema=e.FILE_TREE_DEFAULTS=e.FILES_DEFAULTS=void 0;const n=t(43718),l=t(69734),o=t(78132),u={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:{"general.language":{type:"string",enum:(0,n.getAvailableLanguages)().map(h=>h.languageId),default:l.LOCALE_TYPES.EN_US},"general.theme":{type:"string",default:"vs-dark",enum:[]},"general.askReloadOnLanguageChange":{type:"boolean",default:!0,description:"%preference.description.general.askReloadOnLanguageChange%"},"general.icon":{type:"string",default:"vs-minimal",enum:[]},"general.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:u.confirmDelete,description:"%preference.explorer.confirm.move%"},"explorer.confirmDelete":{type:"boolean",default:u.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:[`
27351
27351
  `,`\r
27352
27352
  `,"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},[n.AINativeSettingSectionsId.INLINE_CHAT_AUTO_VISIBLE]:{type:"boolean",default:!0},[n.AINativeSettingSectionsId.INLINE_CHAT_CODE_ACTION_ENABLED]:{type:"boolean",default:!0},[n.AINativeSettingSectionsId.INTERFACE_QUICK_NAVIGATION_ENABLED]:{type:"boolean",default:!0},[n.AINativeSettingSectionsId.CHAT_VISIBLE_TYPE]:{type:"string",enum:["never","always","default"],default:"default"},"editor.codeActionWidget.showHeaders":{type:"boolean",default:!0}}},e.CorePreferences=Symbol("CorePreferences");function p(h){h.addProviders({token:e.CorePreferences,useFactory:E=>{const _=E.get(o.PreferenceService);return(0,o.createPreferenceProxy)(_,e.corePreferenceSchema)}})}e.injectCorePreferences=p},2758:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DesignStyleService=void 0;const n=t(85608),l=n.__importDefault(t(53373)),o=t(76003),u="design-";let p=class{get styles(){return this._styles}setStyles(E){this._styles=E}wrapStyles(E,_){return this._styles?E?(0,l.default)(E,this._styles[u+_]):"":E||""}};p=n.__decorate([(0,o.Injectable)()],p),e.DesignStyleService=p},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={Base:0,Background:0,Workbench:1,WorkbenchEditor:1,Toolbar:2,XtermDecoration:8,ToolbarDropdown:10,ResizeHandle:12,EditorFloatingContainer:20,Popup:100,PopoverComponent:1e3,PopoverComponentArrow:1001,Overlay:800,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=void 0;function t(n){return l=>{l.preventDefault(),l.stopPropagation(),n&&n(l)}}e.withPrevented=t},22366:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.trackFocus=e.FocusTracker=e.addDisposableListener=e.DomListener=e.isAncestor=e.EventType=void 0;const n=t(85608),l=t(43718);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:l.isWebKit?"webkitAnimationStart":"animationstart",ANIMATION_END:l.isWebKit?"webkitAnimationEnd":"animationend",ANIMATION_ITERATION:l.isWebKit?"webkitAnimationIteration":"animationiteration"};function o(_,f){for(;_;){if(_===f)return!0;_=_.parentNode}return!1}e.isAncestor=o;class u{constructor(f,m,d,s){this._node=f,this._type=m,this._handler=d,this._useCapture=s||!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=u;function p(_,f,m,d){return new u(_,f,m,d)}e.addDisposableListener=p;class h extends l.Disposable{constructor(f){super(),this.didFocus=new l.Emitter,this.onDidFocus=this.didFocus.event,this.didBlur=new l.Emitter,this.onDidBlur=this.didBlur.event;let m=o(document.activeElement,f),d=!1;const s=()=>{d=!1,m||(m=!0,this.didFocus.fire())},a=()=>{m&&(d=!0,window.setTimeout(()=>{d&&(d=!1,m=!1,this.didBlur.fire())},0))};this.addDispose(this.didBlur),this.addDispose(this.didFocus),this.addDispose(new u(f,e.EventType.FOCUS,s,!0)),this.addDispose(new u(f,e.EventType.BLUR,a,!0))}}e.FocusTracker=h;function E(_){return new h(_)}e.trackFocus=E},5910:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EncodingRegistry=void 0;const n=t(85608),l=t(76003),o=t(43718),u=t(78132),p=t(63214);let h=class{constructor(){this.encodingOverrides=[]}registerOverride(_){return this.encodingOverrides.push(_),o.Disposable.create(()=>{const f=this.encodingOverrides.indexOf(_);f!==-1&&this.encodingOverrides.splice(f,1)})}getEncodingForResource(_,f){let m;const d=this.getEncodingOverride(_);return d?m=d:f?m=f:m=this.preferenceService.get("files.encoding",void 0,_.toString(),(0,p.getLanguageIdFromMonaco)(_)||void 0)||"",!m||!(0,o.encodingExists)(m)?o.UTF8:m}getEncodingOverride(_){if(this.encodingOverrides&&this.encodingOverrides.length){for(const f of this.encodingOverrides)if(f.parent&&_.isEqualOrParent(f.parent)||f.extension&&_.path.ext===`.${f.extension}`||f.scheme&&f.scheme===_.scheme)return f.encoding}}};n.__decorate([(0,l.Autowired)(u.PreferenceService),n.__metadata("design:type",Object)],h.prototype,"preferenceService",void 0),h=n.__decorate([(0,l.Injectable)()],h),e.EncodingRegistry=h},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),l=n.__importDefault(t(56757)),o=n.__importDefault(t(46123)),u=n.__importDefault(t(52103)),p=n.__importDefault(t(41263)),h=t(76003),E=t(22689),_=t(14790),f=t(96702);e.EXTENSION_JSON_URI="vscode://schemas/vscode-extensions",e.OPENSUMI_EXTENSION_JSON_URI="vscode://schemas/opensumi-extensions";let m=class{registerSchema(){this.schemaRegistry.registerSchema(e.OPENSUMI_EXTENSION_JSON_URI,_.OpenSumiExtensionPackageSchema,["package.json"]),this.schemaRegistry.registerSchema(e.EXTENSION_JSON_URI,f.VSCodeExtensionPackageSchema,["package.json"])}appendPropertiesFactory(s){const a=s==="opensumi"?_.OpenSumiExtensionPackageSchema.properties.sumiContributes.properties:f.VSCodeExtensionPackageSchema.properties.contributes.properties;return(r,c)=>{const{extensionPoint:g,jsonSchema:v}=c,b=r.concat(g).filter(Boolean);if((0,u.default)(a,b)){const S=(0,o.default)(a,b.concat("properties"));(0,l.default)(v.properties,S)}(0,p.default)(a,b,v)}}appendOpenSumiProperties(s,a){this.appendPropertiesFactory("opensumi")(s,a)}appendVScodeProperties(s,a){this.appendPropertiesFactory("vscode")(s,a)}appendExtensionPoint(s,a){if(!a)return;const{frameworkKind:r=["vscode"]}=a;r.includes("opensumi")&&this.appendOpenSumiProperties(s,a),r.includes("vscode")&&this.appendVScodeProperties(s,a),this.registerSchema()}registerExtensionPoint(s){s&&this.appendExtensionPoint([],s)}};n.__decorate([(0,h.Autowired)(E.IJSONSchemaRegistry),n.__metadata("design:type",Object)],m.prototype,"schemaRegistry",void 0),m=n.__decorate([(0,h.Injectable)()],m),e.ExtensionsPointServiceImpl=m},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 l;(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:Object.assign(Object.assign({},o.properties),{description:(0,n.localize)("sumiContributes.browserViews.left")}),right:Object.assign(Object.assign({},o.properties),{description:(0,n.localize)("sumiContributes.browserViews.right")}),bottom:Object.assign(Object.assign({},o.properties),{description:(0,n.localize)("sumiContributes.browserViews.bottom")})}}})(l=e.browserViews||(e.browserViews={}))},57559:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.menus=void 0;const n=t(43718),l=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"}}},u={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"}}}]}}},p=[{id:l.MenuId.CommandPalette,description:(0,n.localize)("sumiContributes.menu.api.CommandPalette")},{id:l.MenuId.ActivityBarExtra,description:(0,n.localize)("sumiContributes.menu.api.ActivityBarExtra")},{id:l.MenuId.ActivityBarTopExtra,description:(0,n.localize)("sumiContributes.menu.api.ActivityBarTopExtra")},{id:l.MenuId.DebugBreakpointsContext,description:(0,n.localize)("sumiContributes.menu.api.DebugBreakpointsContext")},{id:l.MenuId.DebugCallStackContext,description:(0,n.localize)("sumiContributes.menu.api.DebugCallStackContext")},{id:l.MenuId.DebugConsoleContext,description:(0,n.localize)("sumiContributes.menu.api.DebugConsoleContext")},{id:l.MenuId.DebugVariablesContext,description:(0,n.localize)("sumiContributes.menu.api.DebugVariablesContext")},{id:l.MenuId.DebugWatchContext,description:(0,n.localize)("sumiContributes.menu.api.DebugWatchContext")},{id:l.MenuId.DebugToolBar,description:(0,n.localize)("sumiContributes.menu.api.DebugToolBar")},{id:l.MenuId.EditorContext,description:(0,n.localize)("sumiContributes.menu.api.EditorContext")},{id:l.MenuId.EditorTitle,description:(0,n.localize)("sumiContributes.menu.api.EditorTitle")},{id:l.MenuId.EditorTitleContext,description:(0,n.localize)("sumiContributes.menu.api.EditorTitleContext")},{id:l.MenuId.ExplorerContext,description:(0,n.localize)("sumiContributes.menu.api.ExplorerContext")},{id:l.MenuId.MenubarAppMenu,description:(0,n.localize)("sumiContributes.menu.api.MenubarAppMenu")},{id:l.MenuId.MenubarEditMenu,description:(0,n.localize)("sumiContributes.menu.api.MenubarEditMenu")},{id:l.MenuId.MenubarFileMenu,description:(0,n.localize)("sumiContributes.menu.api.MenubarFileMenu")},{id:l.MenuId.MenubarGoMenu,description:(0,n.localize)("sumiContributes.menu.api.MenubarGoMenu")},{id:l.MenuId.MenubarHelpMenu,description:(0,n.localize)("sumiContributes.menu.api.MenubarHelpMenu")},{id:l.MenuId.MenubarViewMenu,description:(0,n.localize)("sumiContributes.menu.api.MenubarViewMenu")},{id:l.MenuId.MenubarSelectionMenu,description:(0,n.localize)("sumiContributes.menu.api.MenubarSelectionMenu")},{id:l.MenuId.MenubarTerminalMenu,description:(0,n.localize)("sumiContributes.menu.api.MenubarTerminalMenu")},{id:l.MenuId.TerminalInstanceContext,description:(0,n.localize)("sumiContributes.menu.api.TerminalInstanceContext")},{id:l.MenuId.TerminalNewDropdownContext,description:(0,n.localize)("sumiContributes.menu.api.TerminalNewDropdownContext")},{id:l.MenuId.TerminalTabContext,description:(0,n.localize)("sumiContributes.menu.api.TerminalTabContext")},{id:l.MenuId.OpenEditorsContext,description:(0,n.localize)("sumiContributes.menu.api.OpenEditorsContext")},{id:l.MenuId.SCMResourceContext,description:(0,n.localize)("sumiContributes.menu.api.SCMResourceContext")},{id:l.MenuId.SCMResourceGroupContext,description:(0,n.localize)("sumiContributes.menu.api.SCMResourceGroupContext")},{id:l.MenuId.SCMResourceFolderContext,description:(0,n.localize)("sumiContributes.menu.api.SCMResourceFolderContext")},{id:l.MenuId.SCMTitle,description:(0,n.localize)("sumiContributes.menu.api.SCMTitle")},{id:l.MenuId.SCMInput,description:(0,n.localize)("sumiContributes.menu.api.SCMInput")},{id:l.MenuId.SearchContext,description:(0,n.localize)("sumiContributes.menu.api.SearchContext")},{id:l.MenuId.StatusBarContext,description:(0,n.localize)("sumiContributes.menu.api.StatusBarContext")},{id:l.MenuId.ViewItemContext,description:(0,n.localize)("sumiContributes.menu.api.ViewItemContext")},{id:l.MenuId.ViewTitle,description:(0,n.localize)("sumiContributes.menu.api.ViewTitle")},{id:l.MenuId.SettingsIconMenu,description:(0,n.localize)("sumiContributes.menu.api.SettingsIconMenu")}],h=(_,f,m)=>_.reduce((d,s)=>(d[f(s)]=m?m(s):s,d),Object.create(null));var E;(function(_){_.schema={description:(0,n.localize)("sumiContributes.menu"),type:"object",properties:h(p,f=>f.id,f=>({type:"array",description:f.description,items:o}))},_.subMenusSchema={description:(0,n.localize)("sumiContributes.submenus"),type:"object",additionalProperties:u}})(E=e.menus||(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),l=(h,E)=>`${JSON.stringify(h)}: ${E}`,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")]}}},u={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 p;(function(h){h.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:l({type:"button"},(0,n.localize)("sumiContributes.toolbar.actions.type.button")),body:{id:"${2}",type:"button",description:"${3}",title:"${4}",iconPath:"${5}"}},{label:l({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:l({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:u}}}]}}}}})(p=e.toolbar||(e.toolbar={}))},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 l extends n.BasicEvent{}e.FilesChangeEvent=l,e.FsProviderContribution=Symbol("FsProviderContribution")},136:(x,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.HashCalculateContribution=void 0;const n=t(85608),l=t(76003),o=t(98295),u=t(96405),p=t(66549);let h=class{async initialize(){try{await this.hashCalculateService.initialize()}catch(_){throw new Error(`hashCalculateService init fail:
27353
27353
  ${_.message}`)}}};n.__decorate([(0,l.Autowired)(u.IHashCalculateService),n.__metadata("design:type",Object)],h.prototype,"hashCalculateService",void 0),h=n.__decorate([(0,o.Domain)(p.ClientAppContribution)],h),e.HashCalculateContribution=h},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(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)},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 l=t(85608),o=t(76003),u=t(43718),p=t(53736),h=t(81331),E=t(7967),_=t(26542);var f;(function(r){r[r.DEFAULT=0]="DEFAULT",r[r.USER=1]="USER",r[r.WORKSPACE=2]="WORKSPACE",r[r.END=3]="END"})(f=e.KeybindingScope||(e.KeybindingScope={}));var m;(function(r){r[r.Default=0]="Default",r[r.EditorCore=1]="EditorCore",r[r.EditorContrib=100]="EditorContrib",r[r.WorkbenchContrib=200]="WorkbenchContrib",r[r.BuiltinExtension=300]="BuiltinExtension",r[r.ExternalExtension=400]="ExternalExtension"})(m=e.KeybindingWeight||(e.KeybindingWeight={})),function(r){r.length=r.END-r.DEFAULT}(f=e.KeybindingScope||(e.KeybindingScope={}));var d;(function(r){function c(v){const b={command:v.command,keybinding:v.keybinding};return JSON.stringify(b)}r.stringify=c;function g(v){return!!v&&v===Object(v)&&"command"in v&&"keybinding"in v}r.is=g})(d=e.Keybinding||(e.Keybinding={}));var s;(function(r){class c{constructor(){this.full=[],this.partial=[],this.shadow=[]}merge(v){return this.full.push(...v.full),this.partial.push(...v.partial),this.shadow.push(...v.shadow),this}filter(v){const b=new c;return b.full=this.full.filter(v),b.partial=this.partial.filter(v),b.shadow=this.shadow.filter(v),b}}r.KeybindingsResult=c})(s=e.KeybindingsResultCollection||(e.KeybindingsResultCollection={})),e.KeybindingContribution=Symbol("KeybindingContribution"),e.KeybindingRegistry=Symbol("KeybindingRegistry"),e.keybindingServicePath="/services/keybindings",e.KeybindingService=Symbol("KeybindingService");let a=n=class{constructor(){this.keymaps=[...Array(f.length)].map(()=>[]),this.keySequence=[],this.convertKeySequence=[],this.modifierKeySequence=[],this.keybindingsChanged=new u.Emitter}async initialize(){await this.keyboardLayoutService.initialize(),this.keyboardLayoutService.onKeyboardLayoutChanged(()=>{this.clearResolvedKeybindings()});for(const c of this.keybindingContributionProvider.getContributions())c.registerKeybindings(this)}get onKeybindingsChanged(){return this.keybindingsChanged.event}registerKeybinding(c,g=f.DEFAULT){return this.doRegisterKeybinding(c,g)}registerKeybindings(c,g=f.DEFAULT){return this.doRegisterKeybindings(c,g)}convertMonacoWhen(c){return c?typeof c=="string"?c:c.serialize():""}unregisterKeybinding(c,g=f.DEFAULT){const v=d.is(c)?c.keybinding:c,b=this.keymaps[g];let S;d.is(c)&&c.when?S=b.filter(y=>this.isKeybindingEqual(y.keybinding,c.keybinding)&&this.isKeybindingWhenEqual(y.when,c.when)):S=b.filter(y=>this.isKeybindingEqual(y.keybinding,v)),S.forEach(y=>{const A=b.indexOf(y);A>=0&&b.splice(A,1)})}isKeybindingWhenEqual(c,g){return this.convertMonacoWhen(c)===this.convertMonacoWhen(g)}isKeybindingEqual(c,g){return this.acceleratorForSequenceKeyString(c)===this.acceleratorForSequenceKeyString(g)}acceleratorForSequenceKeyString(c){const v=c.split(" ").map(b=>E.KeyCode.parse(b));return this.acceleratorForSequence(v,"+").join(" ")}doRegisterKeybindings(c,g=f.DEFAULT){const v=new u.Disposable;for(const b of c)v.addDispose(this.doRegisterKeybinding(b,g));return v}doRegisterKeybinding(c,g=f.DEFAULT){try{this.resolveKeybinding(c,!0),this.keymaps[g].unshift(c)}catch(v){this.logger.warn(`Could not register keybinding: