custom-electron-titlebar 3.2.9 → 4.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (76) hide show
  1. package/README.md +10 -203
  2. package/{build → dist}/browser/browser.d.ts +0 -0
  3. package/{build → dist}/browser/event.d.ts +0 -0
  4. package/{build → dist}/browser/iframe.d.ts +0 -0
  5. package/{build → dist}/browser/keyboardEvent.d.ts +0 -0
  6. package/{build → dist}/browser/mouseEvent.d.ts +0 -0
  7. package/{build → dist}/common/arrays.d.ts +0 -0
  8. package/{build → dist}/common/async.d.ts +0 -0
  9. package/{build → dist}/common/charCode.d.ts +0 -0
  10. package/{build → dist}/common/color.d.ts +0 -0
  11. package/{build → dist}/common/dom.d.ts +0 -0
  12. package/{build → dist}/common/event.d.ts +0 -0
  13. package/{build → dist}/common/iterator.d.ts +0 -0
  14. package/{build → dist}/common/keyCodes.d.ts +0 -0
  15. package/{build → dist}/common/lifecycle.d.ts +0 -0
  16. package/{build → dist}/common/linkedList.d.ts +0 -0
  17. package/{build → dist}/common/platform.d.ts +0 -0
  18. package/dist/index.d.ts +7 -0
  19. package/dist/index.js +1 -0
  20. package/dist/interfaces.d.ts +95 -0
  21. package/{build → dist}/menu/menu.d.ts +3 -1
  22. package/{build → dist}/menu/menuitem.d.ts +3 -4
  23. package/{build → dist}/menubar.d.ts +1 -24
  24. package/dist/titlebar.d.ts +77 -0
  25. package/package.json +23 -16
  26. package/webpack.config.js +37 -0
  27. package/.github/ISSUE_TEMPLATE/issue-report.md +0 -29
  28. package/.vscode/launch.json +0 -49
  29. package/.vscode/tasks.json +0 -34
  30. package/build/browser/browser.js +0 -157
  31. package/build/browser/browser.js.map +0 -1
  32. package/build/browser/event.js +0 -30
  33. package/build/browser/event.js.map +0 -1
  34. package/build/browser/iframe.js +0 -110
  35. package/build/browser/iframe.js.map +0 -1
  36. package/build/browser/keyboardEvent.js +0 -226
  37. package/build/browser/keyboardEvent.js.map +0 -1
  38. package/build/browser/mouseEvent.js +0 -110
  39. package/build/browser/mouseEvent.js.map +0 -1
  40. package/build/common/arrays.js +0 -18
  41. package/build/common/arrays.js.map +0 -1
  42. package/build/common/async.js +0 -95
  43. package/build/common/async.js.map +0 -1
  44. package/build/common/charCode.js +0 -7
  45. package/build/common/charCode.js.map +0 -1
  46. package/build/common/color.js +0 -494
  47. package/build/common/color.js.map +0 -1
  48. package/build/common/dom.js +0 -984
  49. package/build/common/dom.js.map +0 -1
  50. package/build/common/event.js +0 -611
  51. package/build/common/event.js.map +0 -1
  52. package/build/common/iterator.js +0 -164
  53. package/build/common/iterator.js.map +0 -1
  54. package/build/common/keyCodes.js +0 -268
  55. package/build/common/keyCodes.js.map +0 -1
  56. package/build/common/lifecycle.js +0 -63
  57. package/build/common/lifecycle.js.map +0 -1
  58. package/build/common/linkedList.js +0 -139
  59. package/build/common/linkedList.js.map +0 -1
  60. package/build/common/platform.js +0 -115
  61. package/build/common/platform.js.map +0 -1
  62. package/build/index.d.ts +0 -3
  63. package/build/index.js +0 -20
  64. package/build/index.js.map +0 -1
  65. package/build/menu/menu.js +0 -538
  66. package/build/menu/menu.js.map +0 -1
  67. package/build/menu/menuitem.js +0 -339
  68. package/build/menu/menuitem.js.map +0 -1
  69. package/build/menubar.js +0 -608
  70. package/build/menubar.js.map +0 -1
  71. package/build/themebar.d.ts +0 -20
  72. package/build/themebar.js +0 -568
  73. package/build/themebar.js.map +0 -1
  74. package/build/titlebar.d.ts +0 -135
  75. package/build/titlebar.js +0 -453
  76. package/build/titlebar.js.map +0 -1
package/README.md CHANGED
@@ -5,213 +5,20 @@ This project is a typescript library for electron that allows you to configure a
5
5
  [![LICENSE](https://img.shields.io/github/license/AlexTorresSk/custom-electron-titlebar.svg)](https://github.com/AlexTorresSk/custom-electron-titlebar/blob/master/LICENSE)
6
6
  [![NPM Version](https://img.shields.io/npm/v/custom-electron-titlebar.svg)](https://npmjs.org/package/custom-electron-titlebar)
7
7
 
8
- ![Preview 1](screenshots/window_1.png)
8
+ ![Screenshot 1](screenshots/cet-001.jpg)
9
9
 
10
- ![Preview 2](screenshots/window_2.png)
10
+ ![Screenshot 2](screenshots/cet-002.jpg)
11
11
 
12
- ![Preview 3](screenshots/window_3.png)
13
-
14
- ## Install
15
-
16
- ```
17
- npm i custom-electron-titlebar
18
- ```
19
-
20
- or use example folder to init basic electron project with this titlebar.
21
-
22
- ## Usage
23
-
24
- #### Step 1
25
- In your **renderer** file or in an **HTML script tag** add:
26
-
27
- ```js
28
- const customTitlebar = require('custom-electron-titlebar');
29
-
30
- new customTitlebar.Titlebar({
31
- backgroundColor: customTitlebar.Color.fromHex('#444')
32
- });
33
- ```
34
-
35
- > if you are using _typescript_
36
- ```ts
37
- import { Titlebar, Color } from 'custom-electron-titlebar'
38
-
39
- new Titlebar({
40
- backgroundColor: Color.fromHex('#ECECEC')
41
- });
12
+ ## 🟢 Install
42
13
  ```
43
-
44
- The parameter `backgroundColor: Color` is required, this should be `Color` type.
45
- (View [Update Background](#update-background) for more details).
46
-
47
- #### Step 2
48
- Update the code that launches browser window
49
- ```js
50
- var mainWindow = new BrowserWindow({
51
- width: 1000,
52
- height: 600,
53
- titleBarStyle: "hidden", // add this line
54
- });
14
+ npm install custom-electron-titlebar
55
15
  ```
56
16
 
57
- ## Options
58
-
59
- The interface [`TitleBarOptions`] is managed, which has the following configurable options for the title bar. Some parameters are optional.
60
-
61
- | Parameter | Type | Description | Default |
62
- | ------------------------------ | ---------------- | ------------------------------------------------------------------------------------------------------------------------------- | ------------------------- |
63
- | backgroundColor **(required)** | Color | The background color of the titlebar. | #444444 |
64
- | icon | string | The icon shown on the left side of the title bar. | null |
65
- | iconsTheme | Theme | Style of the icons. | Themebar.win |
66
- | shadow | boolean | The shadow of the titlebar. | false |
67
- | drag | boolean | Define whether or not you can drag the window by holding the click on the title bar. | true |
68
- | minimizable | boolean | Enables or disables the option to minimize the window by clicking on the corresponding button in the title bar. | true |
69
- | maximizable | boolean | Enables or disables the option to maximize and un-maximize the window by clicking on the corresponding button in the title bar. | true |
70
- | closeable | boolean | Enables or disables the option of the close window by clicking on the corresponding button in the title bar. | true |
71
- | order | string | Set the order of the elements on the title bar. (`inverted`, `first-buttons`) | null |
72
- | titleHorizontalAlignment | string | Set horizontal alignment of the window title. (`left`, `center`, `right`) | center |
73
- | menu | Electron.Menu | The menu to show in the title bar. | Menu.getApplicationMenu() |
74
- | menuPosition | string | The position of menubar on titlebar. | left |
75
- | enableMnemonics | boolean | Enable the mnemonics on menubar and menu items. | true |
76
- | itemBackgroundColor | Color | The background color when the mouse is over the item. | rgba(0, 0, 0, .14) |
77
- | hideWhenClickingClose | boolean | When the close button is clicked, the window is hidden instead of closed. | false |
78
- | overflow | string | The overflow of the container (`auto`, `visible`, `hidden`) | auto |
79
- | unfocusEffect | boolean | Enables or disables the blur option in the title bar. | false |
80
-
81
- ## Methods
82
-
83
- ### Update Background
84
-
85
- This change the color of titlebar and it's checked whether the color is light or dark, so that the color of the icons adapts to the background of the title bar.
86
-
87
- ```js
88
- titlebar.updateBackground(new Color(new RGBA(0, 0, 0, .7)));
89
- ```
90
-
91
- To assign colors you can use the following options: `Color.fromHex()`, `new Color(new RGBA(r, g, b, a))`, `new Color(new HSLA(h, s, l, a))`, `new Color(new HSVA(h, s, v, a))` or `Color.BLUE`, `Color.RED`, etc.
92
-
93
- ### Update Items Background Color
94
-
95
- This method change background color on hover of items of menubar.
96
-
97
- ```js
98
- titlebar.updateItemBGColor(new Color(new RGBA(0, 0, 0, .7)));
99
- ```
100
-
101
- To assign colors you can use the following options: `Color.fromHex()`, `new Color(new RGBA(r, g, b, a))`, `new Color(new HSLA(h, s, l, a))`, `new Color(new HSVA(h, s, v, a))` or `Color.BLUE`, `Color.RED`, etc.
102
-
103
- ### Update Title
104
-
105
- This method updated the title of the title bar, If you change the content of the `title` tag, you should call this method for update the title.
106
-
107
- ```js
108
- document.title = 'My new title';
109
- titlebar.updateTitle();
110
-
111
- // Or you can do as follows and avoid writing document.title
112
- titlebar.updateTitle('New Title');
113
- ```
114
-
115
- if this method is called and the title parameter is added, the title of the document is changed to that of the parameter.
116
-
117
- ### Update Icon
118
-
119
- With this method you can update the icon. This method receives the url of the image _(it is advisable to use transparent image formats)_
120
-
121
- ```js
122
- titlebar.updateIcon('./images/my-icon.svg');
123
- ```
124
-
125
- ### Update Menu
126
-
127
- This method updates or creates the menu, to create the menu use remote.Menu and remote.MenuItem.
128
-
129
- ```js
130
- const menu = new Menu();
131
- menu.append(new MenuItem({
132
- label: 'Item 1',
133
- submenu: [
134
- {
135
- label: 'Subitem 1',
136
- click: () => console.log('Click on subitem 1')
137
- },
138
- {
139
- type: 'separator'
140
- }
141
- ]
142
- }));
143
-
144
- menu.append(new MenuItem({
145
- label: 'Item 2',
146
- submenu: [
147
- {
148
- label: 'Subitem checkbox',
149
- type: 'checkbox',
150
- checked: true
151
- },
152
- {
153
- type: 'separator'
154
- },
155
- {
156
- label: 'Subitem with submenu',
157
- submenu: [
158
- {
159
- label: 'Submenu &item 1',
160
- accelerator: 'Ctrl+T'
161
- }
162
- ]
163
- }
164
- ]
165
- }));
166
-
167
- titlebar.updateMenu(menu);
168
- ```
169
-
170
- ### Update Menu Position
171
-
172
- You can change the position of the menu bar. `left` and `bottom` are allowed.
173
-
174
- ```js
175
- titlebar.updateMenuPosition('bottom');
176
- ```
177
-
178
- ### Set Horizontal Alignment
179
-
180
- > setHorizontalAlignment method was contributed by [@MairwunNx](https://github.com/MairwunNx) :punch:
181
-
182
- `left`, `center` and `right` are allowed
183
-
184
- ```js
185
- titlebar.setHorizontalAlignment('right');
186
- ```
187
-
188
- ### Dispose
189
-
190
- This method removes the title bar completely and all recorded events.
191
-
192
- ```js
193
- titlebar.dispose();
194
- ```
195
-
196
- ## CSS Classes
197
- The following CSS classes exist and can be used to customize the titlebar
198
-
199
- | Class name | Description |
200
- | --------------------------- | -----------------------------------------------------------------|
201
- | .titlebar | Styles the titlebar. |
202
- | .window-appicon | Styles the app icon on the titlebar. |
203
- | .window-title | Styles the window title. (Example: font-size) |
204
- | .window-controls-container | Styles the window controls section. |
205
- | .resizer top | Styles the resizer invisible top bar |
206
- | .resizer left | Styles the resizer invisible left bar |
207
- | .menubar | Styles the top menus |
208
- | .menubar-menu-button | Styles the main menu elements. (Example: color) |
209
- | .menubar-menu-button open | Styles the main menu elements when open menu. (Example: color) |
210
- | .menubar-menu-title | Description missing |
211
- | .action-item | Description missing |
212
- | .action-menu-item | Styles action menu elements. (Example: color) |
213
-
214
-
215
- ## License
17
+ ## 🚀 Usage
18
+ To see the documentation on how to use the title bar, visit the [Wiki](https://github.com/AlexTorresSk/custom-electron-titlebar/wiki)
216
19
 
20
+ ## ✅ License
217
21
  This project is under the [MIT](https://github.com/AlexTorresSk/custom-electron-titlebar/blob/master/LICENSE) license.
22
+
23
+ ## 💰 Support
24
+ If you want to support my development, you can do so by donating through [Buy me a coffee](https://www.buymeacoffee.com/AlexTorresSk), [Paypal](https://www.paypal.com/paypalme/hapovedat) or [Patreon](https://www.patreon.com/AlexTorresSk)
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
@@ -0,0 +1,7 @@
1
+ import Titlebar from './titlebar';
2
+ import { Color } from './common/color';
3
+ declare const _default: {
4
+ Titlebar: typeof Titlebar;
5
+ Color: typeof Color;
6
+ };
7
+ export default _default;
package/dist/index.js ADDED
@@ -0,0 +1 @@
1
+ !function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var i=t();for(var n in i)("object"==typeof exports?exports:e)[n]=i[n]}}(this,(function(){return(()=>{"use strict";var e={357:(e,t,i)=>{i.d(t,{Z:()=>a});var n=i(81),s=i.n(n),o=i(645),r=i.n(o)()(s());r.push([e.id,".cet-menubar{display:flex;flex-shrink:1;box-sizing:border-box;height:30px;overflow:hidden;flex-wrap:wrap}.cet-menubar.bottom{order:1;width:100%;padding:0 5px}.cet-menubar .cet-menubar-menu-button{align-items:center;box-sizing:border-box;padding:0px 8px;cursor:default;-webkit-app-region:no-drag;zoom:1;white-space:nowrap;outline:0}.cet-menubar .cet-menubar-menu-button.disabled{opacity:.4}.cet-menubar .cet-menubar-menu-button:not(.disabled):focus,.cet-menubar .cet-menubar-menu-button:not(.disabled).open,.cet-menubar .cet-menubar-menu-button:not(.disabled):hover{background-color:rgba(255,255,255,.1)}.cet-menubar .cet-menubar-menu-button:focus,.cet-menubar .cet-menubar-menu-button.open,.cet-menubar .cet-menubar-menu-button:hover{background-color:rgba(0,0,0,.1)}.cet-menubar .cet-menubar-menu-container{position:absolute;display:block;left:0px;opacity:1;outline:0;border:none;text-align:left;margin:0 auto;padding:4px 0;margin-left:0;overflow-x:visible;overflow-y:visible;-webkit-overflow-scrolling:touch;justify-content:flex-end;white-space:nowrap;border-radius:6px;backdrop-filter:blur(5px);box-shadow:0 5px 5px -3px rgba(0,0,0,.2),0 8px 10px 1px rgba(0,0,0,.14),0 3px 14px 2px rgba(0,0,0,.12);z-index:99999}.cet-menubar .cet-menubar-menu-container::-webkit-scrollbar{width:8px;height:4px;cursor:pointer;background-color:rbga(0, 0, 0, 0)}.cet-menubar .cet-menubar-menu-container::-webkit-scrollbar-track{border:none;background-color:rbga(0, 0, 0, 0)}.cet-menubar .cet-menubar-menu-container::-webkit-scrollbar-thumb{border-radius:10px;background-color:rgba(110,110,110,.2)}.cet-menubar .cet-menubar-menu-container:focus{outline:0}.cet-menubar .cet-menubar-menu-container .cet-action-item{padding:0;transform:none;display:-ms-flexbox;display:flex;outline:none}.cet-menubar .cet-menubar-menu-container .cet-action-item.active{transform:none}.cet-menubar .cet-menubar-menu-container .cet-action-item.disabled .cet-action-menu-item{opacity:.4}.cet-menubar .cet-menubar-menu-container .cet-action-item .cet-submenu{position:absolute}.cet-menubar .cet-menubar-menu-container .cet-action-menu-item{-ms-flex:1 1 auto;flex:1 1 auto;display:-ms-flexbox;display:flex;height:2.5em;margin:2px 5px;align-items:center;position:relative;border-radius:6px}.cet-menubar .cet-menubar-menu-container .cet-action-menu-item:hover{background-color:rgba(0,0,0,.12)}.cet-menubar .cet-menubar-menu-container .cet-action-label{-ms-flex:1 1 auto;flex:1 1 auto;text-decoration:none;padding:0 1em;background:none;font-size:12px;line-height:1}.cet-menubar .cet-menubar-menu-container .cet-action-label:not(.separator){display:inline-block;-webkit-box-sizing:border-box;-o-box-sizing:border-box;-moz-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box;margin:0;padding:0 2em 0 1em}.cet-menubar .cet-menubar-menu-container .cet-action-label.separator{opacity:.1;font-size:inherit;margin:1px 0;width:100%;border-bottom:1px solid transparent}.cet-menubar .cet-menubar-menu-container .cet-action-label.separator.text{padding:.7em 1em .1em 1em;font-weight:bold;opacity:1}.cet-menubar .cet-menubar-menu-container .cet-action-label:hover{color:inherit}.cet-menubar .cet-menubar-menu-container .keybinding{padding:0 2em 0 1em}.cet-menubar .cet-menubar-menu-container .keybinding,.cet-menubar .cet-menubar-menu-container .cet-submenu-indicator{display:inline-block;-ms-flex:2 1 auto;flex:2 1 auto;padding:0 3.1em 0 1em;text-align:right;font-size:12px;line-height:1}.cet-menubar .cet-menubar-menu-container .cet-submenu-indicator{position:absolute;right:8px;height:14px;width:14px;padding:0}.cet-menubar .cet-menubar-menu-container .cet-submenu-indicator img,.cet-menubar .cet-menubar-menu-container .cet-submenu-indicator svg,.cet-menubar .cet-menubar-menu-container .cet-menu-item-icon img,.cet-menubar .cet-menubar-menu-container .cet-menu-item-icon svg{display:inherit;width:100%;height:100%}.cet-menubar .cet-menubar-menu-container .cet-menu-item-icon{width:18px;height:18px;margin:0 0 0 .8em}.cet-menubar .cet-menubar-menu-container .cet-menu-item-icon.checkbox{visibility:hidden}.cet-menubar .cet-menubar-menu-container .cet-menu-item-icon.checkbox.checked{visibility:visible}",""]);const a=r},717:(e,t,i)=>{i.d(t,{Z:()=>a});var n=i(81),s=i.n(n),o=i(645),r=i.n(o)()(s());r.push([e.id,".cet-titlebar{position:absolute;top:0;left:0;right:0;box-sizing:border-box;width:100%;font-size:13px;padding:0 16px;overflow:hidden;flex-shrink:0;align-items:center;justify-content:center;-webkit-user-select:none;-ms-user-select:none;user-select:none;zoom:1;line-height:22px;height:22px;display:flex;z-index:99999}.cet-titlebar.cet-windows,.cet-titlebar.cet-linux{padding:0;height:30px;line-height:30px;justify-content:left;overflow:visible}.cet-titlebar.cet-windows .resizer,.cet-titlebar.cet-linux .resizer{-webkit-app-region:no-drag;position:absolute}.cet-titlebar.cet-windows .resizer.top,.cet-titlebar.cet-linux .resizer.top{top:0;width:100%;height:6px}.cet-titlebar.cet-windows .resizer.left,.cet-titlebar.cet-linux .resizer.left{top:0;left:0;width:6px;height:100%}.cet-titlebar.cet-inverted .cet-menubar,.cet-titlebar.cet-inverted .cet-controls-container{flex-direction:row-reverse}.cet-titlebar.cet-inverted .cet-controls-container{margin:0 5px 0 0}.cet-titlebar.cet-shadow{box-shadow:0 2px 1px -1px rgba(0,0,0,.2),0 1px 1px 0 rgba(0,0,0,.14),0 1px 3px 0 rgba(0,0,0,.12)}.cet-titlebar.cet-first-buttons .cet-controls-container{order:-1;margin:0 5px 0 0}.cet-titlebar .cet-drag-region{top:0;left:0;display:block;position:absolute;width:100%;height:100%;z-index:-1;-webkit-app-region:drag}.cet-titlebar .cet-window-icon{display:flex;align-items:center;justify-content:center;width:34px;height:30px;z-index:99;overflow:hidden}.cet-titlebar .cet-window-icon img{height:17px}.cet-titlebar .cet-window-title{flex:0 1 auto;font-size:13px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;zoom:1}.cet-titlebar .cet-window-title.cet-center{position:absolute;left:50%;transform:translate(-50%, 0)}.cet-titlebar .cet-window-title.cet-bigsur{font-size:13px;font-weight:600}.cet-titlebar .cet-controls-container{display:flex;flex-grow:0;flex-shrink:0;text-align:center;position:relative;z-index:99;-webkit-app-region:no-drag;height:30px}.cet-titlebar .cet-controls-container .cet-icon{width:46px}.cet-titlebar .cet-controls-container .cet-icon:not(.inactive):hover{background-color:rgba(255,255,255,.3)}.cet-titlebar .cet-controls-container .cet-icon:not(.inactive):active{background-color:rgba(255,255,255,.2)}.cet-titlebar .cet-controls-container .cet-icon.inactive svg{opacity:.4}.cet-titlebar .cet-controls-container .cet-icon.cet-window-close:not(.inactive):hover{background-color:rgba(232,17,35,.9) !important}.cet-titlebar .cet-controls-container .cet-icon.cet-window-close:not(.inactive):active{background-color:rgba(232,17,35,.5) !important}.cet-titlebar .cet-controls-container .cet-icon svg{width:10px;height:10px;fill:#eee}.cet-titlebar.light .cet-controls-container .cet-icon:not(.inactive):hover{background-color:rgba(0,0,0,.2)}.cet-titlebar.light .cet-controls-container .cet-icon:not(.inactive):active{background-color:rgba(0,0,0,.1)}.cet-titlebar.light .cet-controls-container .cet-icon svg{fill:#333}.cet-titlebar.inactive .cet-window-title,.cet-titlebar.inactive .cet-controls-container .cet-icon svg,.cet-titlebar.inactive .cet-menubar .cet-menubar-menu-button{opacity:.85}.cet-container{position:absolute;left:0;right:0;bottom:0}",""]);const a=r},645:e=>{e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var i="",n=void 0!==t[5];return t[4]&&(i+="@supports (".concat(t[4],") {")),t[2]&&(i+="@media ".concat(t[2]," {")),n&&(i+="@layer".concat(t[5].length>0?" ".concat(t[5]):""," {")),i+=e(t),n&&(i+="}"),t[2]&&(i+="}"),t[4]&&(i+="}"),i})).join("")},t.i=function(e,i,n,s,o){"string"==typeof e&&(e=[[null,e,void 0]]);var r={};if(n)for(var a=0;a<this.length;a++){var l=this[a][0];null!=l&&(r[l]=!0)}for(var u=0;u<e.length;u++){var c=[].concat(e[u]);n&&r[c[0]]||(void 0!==o&&(void 0===c[5]||(c[1]="@layer".concat(c[5].length>0?" ".concat(c[5]):""," {").concat(c[1],"}")),c[5]=o),i&&(c[2]?(c[1]="@media ".concat(c[2]," {").concat(c[1],"}"),c[2]=i):c[2]=i),s&&(c[4]?(c[1]="@supports (".concat(c[4],") {").concat(c[1],"}"),c[4]=s):c[4]="".concat(s)),t.push(c))}},t}},81:e=>{e.exports=function(e){return e[1]}},218:(e,t,i)=>{i.r(t),i.d(t,{default:()=>C});var n=i(379),s=i.n(n),o=i(795),r=i.n(o),a=i(569),l=i.n(a),u=i(565),c=i.n(u),h=i(216),d=i.n(h),m=i(589),p=i.n(m),f=i(357),b={};f.Z&&f.Z.locals&&(b.locals=f.Z.locals);var g,y=0,v={};v.styleTagTransform=p(),v.setAttributes=c(),v.insert=l().bind(null,"head"),v.domAPI=r(),v.insertStyleElement=d(),b.use=function(e){return v.options=e||{},y++||(g=s()(f.Z,v)),b},b.unuse=function(){y>0&&!--y&&(g(),g=null)};const C=b},476:(e,t,i)=>{i.r(t),i.d(t,{default:()=>C});var n=i(379),s=i.n(n),o=i(795),r=i.n(o),a=i(569),l=i.n(a),u=i(565),c=i.n(u),h=i(216),d=i.n(h),m=i(589),p=i.n(m),f=i(717),b={};f.Z&&f.Z.locals&&(b.locals=f.Z.locals);var g,y=0,v={};v.styleTagTransform=p(),v.setAttributes=c(),v.insert=l().bind(null,"head"),v.domAPI=r(),v.insertStyleElement=d(),b.use=function(e){return v.options=e||{},y++||(g=s()(f.Z,v)),b},b.unuse=function(){y>0&&!--y&&(g(),g=null)};const C=b},379:e=>{var t=[];function i(e){for(var i=-1,n=0;n<t.length;n++)if(t[n].identifier===e){i=n;break}return i}function n(e,n){for(var o={},r=[],a=0;a<e.length;a++){var l=e[a],u=n.base?l[0]+n.base:l[0],c=o[u]||0,h="".concat(u," ").concat(c);o[u]=c+1;var d=i(h),m={css:l[1],media:l[2],sourceMap:l[3],supports:l[4],layer:l[5]};if(-1!==d)t[d].references++,t[d].updater(m);else{var p=s(m,n);n.byIndex=a,t.splice(a,0,{identifier:h,updater:p,references:1})}r.push(h)}return r}function s(e,t){var i=t.domAPI(t);return i.update(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap&&t.supports===e.supports&&t.layer===e.layer)return;i.update(e=t)}else i.remove()}}e.exports=function(e,s){var o=n(e=e||[],s=s||{});return function(e){e=e||[];for(var r=0;r<o.length;r++){var a=i(o[r]);t[a].references--}for(var l=n(e,s),u=0;u<o.length;u++){var c=i(o[u]);0===t[c].references&&(t[c].updater(),t.splice(c,1))}o=l}}},569:e=>{var t={};e.exports=function(e,i){var n=function(e){if(void 0===t[e]){var i=document.querySelector(e);if(window.HTMLIFrameElement&&i instanceof window.HTMLIFrameElement)try{i=i.contentDocument.head}catch(e){i=null}t[e]=i}return t[e]}(e);if(!n)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");n.appendChild(i)}},216:e=>{e.exports=function(e){var t=document.createElement("style");return e.setAttributes(t,e.attributes),e.insert(t,e.options),t}},565:(e,t,i)=>{e.exports=function(e){var t=i.nc;t&&e.setAttribute("nonce",t)}},795:e=>{e.exports=function(e){var t=e.insertStyleElement(e);return{update:function(i){!function(e,t,i){var n="";i.supports&&(n+="@supports (".concat(i.supports,") {")),i.media&&(n+="@media ".concat(i.media," {"));var s=void 0!==i.layer;s&&(n+="@layer".concat(i.layer.length>0?" ".concat(i.layer):""," {")),n+=i.css,s&&(n+="}"),i.media&&(n+="}"),i.supports&&(n+="}");var o=i.sourceMap;o&&"undefined"!=typeof btoa&&(n+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(o))))," */")),t.styleTagTransform(n,e,t.options)}(t,e,i)},remove:function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(t)}}}},589:e=>{e.exports=function(e,t){if(t.styleSheet)t.styleSheet.cssText=e;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(e))}}},71:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.hasClipboardSupport=t.isEdgeWebView=t.isIPad=t.isWebkitWebView=t.isSafari=t.isChrome=t.isWebKit=t.isFirefox=t.isOpera=t.isEdgeOrIE=t.isEdge=t.isIE=t.onDidChangeAccessibilitySupport=t.getAccessibilitySupport=t.setAccessibilitySupport=t.onDidChangeFullscreen=t.isFullscreen=t.setFullscreen=t.getPixelRatio=t.setZoomFactor=t.getZoomFactor=t.onDidChangeZoomLevel=t.getTimeSinceLastZoomLevelChanged=t.getZoomLevel=t.setZoomLevel=void 0;const n=i(110);class s{constructor(){this._zoomLevel=0,this._lastZoomLevelChangeTime=0,this._onDidChangeZoomLevel=new n.Emitter,this.onDidChangeZoomLevel=this._onDidChangeZoomLevel.event,this._zoomFactor=0,this._onDidChangeFullscreen=new n.Emitter,this.onDidChangeFullscreen=this._onDidChangeFullscreen.event,this._accessibilitySupport=0,this._onDidChangeAccessibilitySupport=new n.Emitter,this.onDidChangeAccessibilitySupport=this._onDidChangeAccessibilitySupport.event}getZoomLevel(){return this._zoomLevel}getTimeSinceLastZoomLevelChanged(){return Date.now()-this._lastZoomLevelChangeTime}setZoomLevel(e,t){this._zoomLevel!==e&&(this._zoomLevel=e,this._lastZoomLevelChangeTime=t?0:Date.now(),this._onDidChangeZoomLevel.fire(this._zoomLevel))}getZoomFactor(){return this._zoomFactor}setZoomFactor(e){this._zoomFactor=e}getPixelRatio(){let e=document.createElement("canvas").getContext("2d");return(window.devicePixelRatio||1)/(e.webkitBackingStorePixelRatio||e.mozBackingStorePixelRatio||e.msBackingStorePixelRatio||e.oBackingStorePixelRatio||e.backingStorePixelRatio||1)}setFullscreen(e){this._fullscreen!==e&&(this._fullscreen=e,this._onDidChangeFullscreen.fire())}isFullscreen(){return this._fullscreen}setAccessibilitySupport(e){this._accessibilitySupport!==e&&(this._accessibilitySupport=e,this._onDidChangeAccessibilitySupport.fire())}getAccessibilitySupport(){return this._accessibilitySupport}}s.INSTANCE=new s,t.setZoomLevel=function(e,t){s.INSTANCE.setZoomLevel(e,t)},t.getZoomLevel=function(){return s.INSTANCE.getZoomLevel()},t.getTimeSinceLastZoomLevelChanged=function(){return s.INSTANCE.getTimeSinceLastZoomLevelChanged()},t.onDidChangeZoomLevel=function(e){return s.INSTANCE.onDidChangeZoomLevel(e)},t.getZoomFactor=function(){return s.INSTANCE.getZoomFactor()},t.setZoomFactor=function(e){s.INSTANCE.setZoomFactor(e)},t.getPixelRatio=function(){return s.INSTANCE.getPixelRatio()},t.setFullscreen=function(e){s.INSTANCE.setFullscreen(e)},t.isFullscreen=function(){return s.INSTANCE.isFullscreen()},t.onDidChangeFullscreen=s.INSTANCE.onDidChangeFullscreen,t.setAccessibilitySupport=function(e){s.INSTANCE.setAccessibilitySupport(e)},t.getAccessibilitySupport=function(){return s.INSTANCE.getAccessibilitySupport()},t.onDidChangeAccessibilitySupport=function(e){return s.INSTANCE.onDidChangeAccessibilitySupport(e)};const o=navigator.userAgent;t.isIE=o.indexOf("Trident")>=0,t.isEdge=o.indexOf("Edge/")>=0,t.isEdgeOrIE=t.isIE||t.isEdge,t.isOpera=o.indexOf("Opera")>=0,t.isFirefox=o.indexOf("Firefox")>=0,t.isWebKit=o.indexOf("AppleWebKit")>=0,t.isChrome=o.indexOf("Chrome")>=0,t.isSafari=!t.isChrome&&o.indexOf("Safari")>=0,t.isWebkitWebView=!t.isChrome&&!t.isSafari&&t.isWebKit,t.isIPad=o.indexOf("iPad")>=0,t.isEdgeWebView=t.isEdge&&o.indexOf("WebView/")>=0,t.hasClipboardSupport=function(){if(t.isIE)return!1;if(t.isEdge){let e=o.indexOf("Edge/"),t=parseInt(o.substring(e+5,o.indexOf(".",e)),10);if(!t||t>=12&&t<=16)return!1}return!0}},348:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.stop=t.domEvent=void 0;const n=i(110);t.domEvent=(e,t,i)=>{const s=e=>o.fire(e),o=new n.Emitter({onFirstListenerAdd:()=>{e.addEventListener(t,s,i)},onLastListenerRemove:()=>{e.removeEventListener(t,s,i)}});return o.event},t.stop=function(e){return n.Event.map(e,(e=>(e.preventDefault(),e.stopPropagation(),e)))}},183:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.IframeUtils=void 0;let i=!1,n=null;function s(e){if(!e.parent||e.parent===e)return null;try{let t=e.location,n=e.parent.location;if(t.protocol!==n.protocol||t.hostname!==n.hostname||t.port!==n.port)return i=!0,null}catch(e){return i=!0,null}return e.parent}function o(e,t){let i,n=e.document.getElementsByTagName("iframe");for(let e=0,s=n.length;e<s;e++)if(i=n[e],i.contentWindow===t)return i;return null}t.IframeUtils=class{static getSameOriginWindowChain(){if(!n){n=[];let e,t=window;do{e=s(t),e?n.push({window:t,iframeElement:o(e,t)}):n.push({window:t,iframeElement:null}),t=e}while(t)}return n.slice(0)}static hasDifferentOriginAncestor(){return n||this.getSameOriginWindowChain(),i}static getPositionOfChildWindowRelativeToAncestorWindow(e,t){if(!t||e===t)return{top:0,left:0};let i=0,n=0,s=this.getSameOriginWindowChain();for(const e of s){if(e.window===t)break;if(!e.iframeElement)break;let s=e.iframeElement.getBoundingClientRect();i+=s.top,n+=s.left}return{top:i,left:n}}}},592:function(e,t,i){var n=this&&this.__createBinding||(Object.create?function(e,t,i,n){void 0===n&&(n=i),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[i]}})}:function(e,t,i,n){void 0===n&&(n=i),e[n]=t[i]}),s=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var i in e)"default"!==i&&Object.prototype.hasOwnProperty.call(e,i)&&n(t,e,i);return s(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.StandardKeyboardEvent=t.getCodeForKeyCode=void 0;const r=i(979),a=o(i(400));let l=new Array(230),u=new Array(112);!function(){for(let e=0;e<u.length;e++)u[e]=-1;function e(e,t){l[e]=t,u[t]=e}e(3,7),e(8,1),e(9,2),e(13,3),e(16,4),e(17,5),e(18,6),e(19,7),e(20,8),e(27,9),e(32,10),e(33,11),e(34,12),e(35,13),e(36,14),e(37,15),e(38,16),e(39,17),e(40,18),e(45,19),e(46,20),e(48,21),e(49,22),e(50,23),e(51,24),e(52,25),e(53,26),e(54,27),e(55,28),e(56,29),e(57,30),e(65,31),e(66,32),e(67,33),e(68,34),e(69,35),e(70,36),e(71,37),e(72,38),e(73,39),e(74,40),e(75,41),e(76,42),e(77,43),e(78,44),e(79,45),e(80,46),e(81,47),e(82,48),e(83,49),e(84,50),e(85,51),e(86,52),e(87,53),e(88,54),e(89,55),e(90,56),e(93,58),e(96,93),e(97,94),e(98,95),e(99,96),e(100,97),e(101,98),e(102,99),e(103,100),e(104,101),e(105,102),e(106,103),e(107,104),e(108,105),e(109,106),e(110,107),e(111,108),e(112,59),e(113,60),e(114,61),e(115,62),e(116,63),e(117,64),e(118,65),e(119,66),e(120,67),e(121,68),e(122,69),e(123,70),e(124,71),e(125,72),e(126,73),e(127,74),e(128,75),e(129,76),e(130,77),e(144,78),e(145,79),e(186,80),e(187,81),e(188,82),e(189,83),e(190,84),e(191,85),e(192,86),e(193,110),e(194,111),e(219,87),e(220,88),e(221,89),e(222,90),e(223,91),e(226,92),e(229,109),e(91,57),a.isMacintosh?e(93,57):e(92,57)}(),t.getCodeForKeyCode=function(e){return u[e]};const c=a.isMacintosh?256:2048,h=a.isMacintosh?2048:256;t.StandardKeyboardEvent=class{constructor(e){let t=e;this.browserEvent=t,this.target=t.target,this.ctrlKey=t.ctrlKey,this.shiftKey=t.shiftKey,this.altKey=t.altKey,this.metaKey=t.metaKey,this.keyCode=function(e){if(e.charCode){let t=String.fromCharCode(e.charCode).toUpperCase();return r.KeyCodeUtils.fromString(t)}return l[e.keyCode]||0}(t),this.code=t.code,this.ctrlKey=this.ctrlKey||5===this.keyCode,this.altKey=this.altKey||6===this.keyCode,this.shiftKey=this.shiftKey||4===this.keyCode,this.metaKey=this.metaKey||57===this.keyCode,this._asKeybinding=this._computeKeybinding(),this._asRuntimeKeybinding=this._computeRuntimeKeybinding()}preventDefault(){this.browserEvent&&this.browserEvent.preventDefault&&this.browserEvent.preventDefault()}stopPropagation(){this.browserEvent&&this.browserEvent.stopPropagation&&this.browserEvent.stopPropagation()}toKeybinding(){return this._asRuntimeKeybinding}equals(e){return this._asKeybinding===e}_computeKeybinding(){let e=0;5!==this.keyCode&&4!==this.keyCode&&6!==this.keyCode&&57!==this.keyCode&&(e=this.keyCode);let t=0;return this.ctrlKey&&(t|=c),this.altKey&&(t|=512),this.shiftKey&&(t|=1024),this.metaKey&&(t|=h),t|=e,t}_computeRuntimeKeybinding(){let e=0;return 5!==this.keyCode&&4!==this.keyCode&&6!==this.keyCode&&57!==this.keyCode&&(e=this.keyCode),new r.SimpleKeybinding(this.ctrlKey,this.shiftKey,this.altKey,this.metaKey,e)}}},22:function(e,t,i){var n=this&&this.__createBinding||(Object.create?function(e,t,i,n){void 0===n&&(n=i),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[i]}})}:function(e,t,i,n){void 0===n&&(n=i),e[n]=t[i]}),s=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var i in e)"default"!==i&&Object.prototype.hasOwnProperty.call(e,i)&&n(t,e,i);return s(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.StandardWheelEvent=t.DragMouseEvent=t.StandardMouseEvent=void 0;const r=o(i(71)),a=i(183),l=o(i(400));class u{constructor(e){this.timestamp=Date.now(),this.browserEvent=e,this.leftButton=0===e.button,this.middleButton=1===e.button,this.rightButton=2===e.button,this.target=e.target,this.detail=e.detail||1,"dblclick"===e.type&&(this.detail=2),this.ctrlKey=e.ctrlKey,this.shiftKey=e.shiftKey,this.altKey=e.altKey,this.metaKey=e.metaKey,"number"==typeof e.pageX?(this.posx=e.pageX,this.posy=e.pageY):(this.posx=e.clientX+document.body.scrollLeft+document.documentElement.scrollLeft,this.posy=e.clientY+document.body.scrollTop+document.documentElement.scrollTop);let t=a.IframeUtils.getPositionOfChildWindowRelativeToAncestorWindow(self,e.view);this.posx-=t.left,this.posy-=t.top}preventDefault(){this.browserEvent.preventDefault&&this.browserEvent.preventDefault()}stopPropagation(){this.browserEvent.stopPropagation&&this.browserEvent.stopPropagation()}}t.StandardMouseEvent=u,t.DragMouseEvent=class extends u{constructor(e){super(e),this.dataTransfer=e.dataTransfer}},t.StandardWheelEvent=class{constructor(e,t=0,i=0){if(this.browserEvent=e||null,this.target=e?e.target||e.targetNode||e.srcElement:null,this.deltaY=i,this.deltaX=t,e){let t=e,i=e;void 0!==t.wheelDeltaY?this.deltaY=t.wheelDeltaY/120:void 0!==i.VERTICAL_AXIS&&i.axis===i.VERTICAL_AXIS&&(this.deltaY=-i.detail/3),void 0!==t.wheelDeltaX?r.isSafari&&l.isWindows?this.deltaX=-t.wheelDeltaX/120:this.deltaX=t.wheelDeltaX/120:void 0!==i.HORIZONTAL_AXIS&&i.axis===i.HORIZONTAL_AXIS&&(this.deltaX=-e.detail/3),0===this.deltaY&&0===this.deltaX&&e.wheelDelta&&(this.deltaY=e.wheelDelta/120)}}preventDefault(){this.browserEvent&&this.browserEvent.preventDefault&&this.browserEvent.preventDefault()}stopPropagation(){this.browserEvent&&this.browserEvent.stopPropagation&&this.browserEvent.stopPropagation()}}},910:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.coalesce=void 0,t.coalesce=function(e){return e?e.filter((e=>!!e)):e}},888:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.RunOnceScheduler=t.TimeoutTimer=void 0;const n=i(136);class s extends n.Disposable{constructor(e,t){super(),this._token=-1,"function"==typeof e&&"number"==typeof t&&this.setIfNotSet(e,t)}dispose(){this.cancel(),super.dispose()}cancel(){-1!==this._token&&(clearTimeout(this._token),this._token=-1)}cancelAndSet(e,t){this.cancel(),this._token=setTimeout((()=>{this._token=-1,e()}),t)}setIfNotSet(e,t){-1===this._token&&(this._token=setTimeout((()=>{this._token=-1,e()}),t))}}t.TimeoutTimer=s,t.RunOnceScheduler=class{constructor(e,t){this.timeoutToken=-1,this.runner=e,this.timeout=t,this.timeoutHandler=this.onTimeout.bind(this)}dispose(){this.cancel(),this.runner=null}cancel(){this.isScheduled()&&(clearTimeout(this.timeoutToken),this.timeoutToken=-1)}schedule(e=this.timeout){this.cancel(),this.timeoutToken=setTimeout(this.timeoutHandler,e)}isScheduled(){return-1!==this.timeoutToken}onTimeout(){this.timeoutToken=-1,this.runner&&this.doRun()}doRun(){this.runner&&this.runner()}}},469:(e,t)=>{function i(e,t){const i=Math.pow(10,t);return Math.round(e*i)/i}Object.defineProperty(t,"__esModule",{value:!0}),t.Color=t.HSVA=t.HSLA=t.RGBA=void 0;class n{constructor(e,t,n,s=1){this.r=0|Math.min(255,Math.max(0,e)),this.g=0|Math.min(255,Math.max(0,t)),this.b=0|Math.min(255,Math.max(0,n)),this.a=i(Math.max(Math.min(1,s),0),3)}static equals(e,t){return e.r===t.r&&e.g===t.g&&e.b===t.b&&e.a===t.a}}t.RGBA=n;class s{constructor(e,t,n,s){this.h=0|Math.max(Math.min(360,e),0),this.s=i(Math.max(Math.min(1,t),0),3),this.l=i(Math.max(Math.min(1,n),0),3),this.a=i(Math.max(Math.min(1,s),0),3)}static equals(e,t){return e.h===t.h&&e.s===t.s&&e.l===t.l&&e.a===t.a}static fromRGBA(e){const t=e.r/255,i=e.g/255,n=e.b/255,o=e.a,r=Math.max(t,i,n),a=Math.min(t,i,n);let l=0,u=0;const c=(a+r)/2,h=r-a;if(h>0){switch(u=Math.min(c<=.5?h/(2*c):h/(2-2*c),1),r){case t:l=(i-n)/h+(i<n?6:0);break;case i:l=(n-t)/h+2;break;case n:l=(t-i)/h+4}l*=60,l=Math.round(l)}return new s(l,u,c,o)}static _hue2rgb(e,t,i){return i<0&&(i+=1),i>1&&(i-=1),i<1/6?e+6*(t-e)*i:i<.5?t:i<2/3?e+(t-e)*(2/3-i)*6:e}static toRGBA(e){const t=e.h/360,{s:i,l:o,a:r}=e;let a,l,u;if(0===i)a=l=u=o;else{const e=o<.5?o*(1+i):o+i-o*i,n=2*o-e;a=s._hue2rgb(n,e,t+1/3),l=s._hue2rgb(n,e,t),u=s._hue2rgb(n,e,t-1/3)}return new n(Math.round(255*a),Math.round(255*l),Math.round(255*u),r)}}t.HSLA=s;class o{constructor(e,t,n,s){this.h=0|Math.max(Math.min(360,e),0),this.s=i(Math.max(Math.min(1,t),0),3),this.v=i(Math.max(Math.min(1,n),0),3),this.a=i(Math.max(Math.min(1,s),0),3)}static equals(e,t){return e.h===t.h&&e.s===t.s&&e.v===t.v&&e.a===t.a}static fromRGBA(e){const t=e.r/255,i=e.g/255,n=e.b/255,s=Math.max(t,i,n),r=s-Math.min(t,i,n),a=0===s?0:r/s;let l;return l=0===r?0:s===t?((i-n)/r%6+6)%6:s===i?(n-t)/r+2:(t-i)/r+4,new o(Math.round(60*l),a,s,e.a)}static toRGBA(e){const{h:t,s:i,v:s,a:o}=e,r=s*i,a=r*(1-Math.abs(t/60%2-1)),l=s-r;let[u,c,h]=[0,0,0];return t<60?(u=r,c=a):t<120?(u=a,c=r):t<180?(c=r,h=a):t<240?(c=a,h=r):t<300?(u=a,h=r):t<360&&(u=r,h=a),u=Math.round(255*(u+l)),c=Math.round(255*(c+l)),h=Math.round(255*(h+l)),new n(u,c,h,o)}}t.HSVA=o;class r{constructor(e){if(!e)throw new Error("Color needs a value");if(e instanceof n)this.rgba=e;else if(e instanceof s)this._hsla=e,this.rgba=s.toRGBA(e);else{if(!(e instanceof o))throw new Error("Invalid color ctor argument");this._hsva=e,this.rgba=o.toRGBA(e)}}static fromHex(e){return r.Format.CSS.parseHex(e)||r.RED}get hsla(){return this._hsla?this._hsla:s.fromRGBA(this.rgba)}get hsva(){return this._hsva?this._hsva:o.fromRGBA(this.rgba)}equals(e){return!!e&&n.equals(this.rgba,e.rgba)&&s.equals(this.hsla,e.hsla)&&o.equals(this.hsva,e.hsva)}getRelativeLuminance(){return i(.2126*r._relativeLuminanceForComponent(this.rgba.r)+.7152*r._relativeLuminanceForComponent(this.rgba.g)+.0722*r._relativeLuminanceForComponent(this.rgba.b),4)}static _relativeLuminanceForComponent(e){const t=e/255;return t<=.03928?t/12.92:Math.pow((t+.055)/1.055,2.4)}getContrastRatio(e){const t=this.getRelativeLuminance(),i=e.getRelativeLuminance();return t>i?(t+.05)/(i+.05):(i+.05)/(t+.05)}isDarker(){return(299*this.rgba.r+587*this.rgba.g+114*this.rgba.b)/1e3<128}isLighter(){return(299*this.rgba.r+587*this.rgba.g+114*this.rgba.b)/1e3>=128}isLighterThan(e){return this.getRelativeLuminance()>e.getRelativeLuminance()}isDarkerThan(e){return this.getRelativeLuminance()<e.getRelativeLuminance()}lighten(e){return new r(new s(this.hsla.h,this.hsla.s,this.hsla.l+this.hsla.l*e,this.hsla.a))}darken(e){return new r(new s(this.hsla.h,this.hsla.s,this.hsla.l-this.hsla.l*e,this.hsla.a))}transparent(e){const{r:t,g:i,b:s,a:o}=this.rgba;return new r(new n(t,i,s,o*e))}isTransparent(){return 0===this.rgba.a}isOpaque(){return 1===this.rgba.a}opposite(){return new r(new n(255-this.rgba.r,255-this.rgba.g,255-this.rgba.b,this.rgba.a))}blend(e){const t=e.rgba,i=this.rgba.a,s=t.a;let o=i+s*(1-i);if(o<1e-6)return r.TRANSPARENT;const a=this.rgba.r*i/o+t.r*s*(1-i)/o,l=this.rgba.g*i/o+t.g*s*(1-i)/o,u=this.rgba.b*i/o+t.b*s*(1-i)/o;return new r(new n(a,l,u,o))}flatten(...e){const t=e.reduceRight(((e,t)=>r._flatten(t,e)));return r._flatten(this,t)}static _flatten(e,t){const i=1-e.rgba.a;return new r(new n(i*t.rgba.r+e.rgba.a*e.rgba.r,i*t.rgba.g+e.rgba.a*e.rgba.g,i*t.rgba.b+e.rgba.a*e.rgba.b))}toString(){return""+r.Format.CSS.format(this)}static getLighterColor(e,t,i){if(e.isLighterThan(t))return e;i=i||.5;const n=e.getRelativeLuminance(),s=t.getRelativeLuminance();return i=i*(s-n)/s,e.lighten(i)}static getDarkerColor(e,t,i){if(e.isDarkerThan(t))return e;i=i||.5;const n=e.getRelativeLuminance();return i=i*(n-t.getRelativeLuminance())/n,e.darken(i)}}t.Color=r,r.WHITE=new r(new n(255,255,255,1)),r.BLACK=new r(new n(0,0,0,1)),r.RED=new r(new n(255,0,0,1)),r.BLUE=new r(new n(0,0,255,1)),r.GREEN=new r(new n(0,255,0,1)),r.CYAN=new r(new n(0,255,255,1)),r.LIGHTGREY=new r(new n(211,211,211,1)),r.TRANSPARENT=new r(new n(0,0,0,0)),function(e){let t;!function(t){let i;!function(t){function i(e){const t=e.toString(16);return 2!==t.length?"0"+t:t}function s(e){switch(e){case 48:return 0;case 49:return 1;case 50:return 2;case 51:return 3;case 52:return 4;case 53:return 5;case 54:return 6;case 55:return 7;case 56:return 8;case 57:return 9;case 97:case 65:return 10;case 98:case 66:return 11;case 99:case 67:return 12;case 100:case 68:return 13;case 101:case 69:return 14;case 102:case 70:return 15}return 0}t.formatRGB=function(t){return 1===t.rgba.a?`rgb(${t.rgba.r}, ${t.rgba.g}, ${t.rgba.b})`:e.Format.CSS.formatRGBA(t)},t.formatRGBA=function(e){return`rgba(${e.rgba.r}, ${e.rgba.g}, ${e.rgba.b}, ${+e.rgba.a.toFixed(2)})`},t.formatHSL=function(t){return 1===t.hsla.a?`hsl(${t.hsla.h}, ${(100*t.hsla.s).toFixed(2)}%, ${(100*t.hsla.l).toFixed(2)}%)`:e.Format.CSS.formatHSLA(t)},t.formatHSLA=function(e){return`hsla(${e.hsla.h}, ${(100*e.hsla.s).toFixed(2)}%, ${(100*e.hsla.l).toFixed(2)}%, ${e.hsla.a.toFixed(2)})`},t.formatHex=function(e){return`#${i(e.rgba.r)}${i(e.rgba.g)}${i(e.rgba.b)}`},t.formatHexA=function(t,n=!1){return n&&1===t.rgba.a?e.Format.CSS.formatHex(t):`#${i(t.rgba.r)}${i(t.rgba.g)}${i(t.rgba.b)}${i(Math.round(255*t.rgba.a))}`},t.format=function(t){return t?t.isOpaque()?e.Format.CSS.formatHex(t):e.Format.CSS.formatRGBA(t):null},t.parseHex=function(t){if(!t)return null;const i=t.length;if(0===i)return null;if(35!==t.charCodeAt(0))return null;if(7===i){const i=16*s(t.charCodeAt(1))+s(t.charCodeAt(2)),o=16*s(t.charCodeAt(3))+s(t.charCodeAt(4)),r=16*s(t.charCodeAt(5))+s(t.charCodeAt(6));return new e(new n(i,o,r,1))}if(9===i){const i=16*s(t.charCodeAt(1))+s(t.charCodeAt(2)),o=16*s(t.charCodeAt(3))+s(t.charCodeAt(4)),r=16*s(t.charCodeAt(5))+s(t.charCodeAt(6)),a=16*s(t.charCodeAt(7))+s(t.charCodeAt(8));return new e(new n(i,o,r,a/255))}if(4===i){const i=s(t.charCodeAt(1)),o=s(t.charCodeAt(2)),r=s(t.charCodeAt(3));return new e(new n(16*i+i,16*o+o,16*r+r))}if(5===i){const i=s(t.charCodeAt(1)),o=s(t.charCodeAt(2)),r=s(t.charCodeAt(3)),a=s(t.charCodeAt(4));return new e(new n(16*i+i,16*o+o,16*r+r,(16*a+a)/255))}return null}}(i=t.CSS||(t.CSS={}))}(t=e.Format||(e.Format={}))}(r=t.Color||(t.Color={}))},680:function(e,t,i){var n=this&&this.__createBinding||(Object.create?function(e,t,i,n){void 0===n&&(n=i),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[i]}})}:function(e,t,i,n){void 0===n&&(n=i),e[n]=t[i]}),s=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var i in e)"default"!==i&&Object.prototype.hasOwnProperty.call(e,i)&&n(t,e,i);return s(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.getElementsByTagName=t.removeTabIndexAndUpdateFocus=t.hide=t.show=t.join=t.$=t.prepend=t.append=t.trackFocus=t.restoreParentsScrollTop=t.saveParentsScrollTop=t.EventHelper=t.EventType=t.isHTMLElement=t.removeCSSRulesContainingSelector=t.createCSSRule=t.createStyleSheet=t.findParentWithClass=t.isAncestor=t.getLargestChildWidth=t.getTotalHeight=t.getContentHeight=t.getTotalScrollWidth=t.getContentWidth=t.getTotalWidth=t.StandardWindow=t.getDomNodePagePosition=t.position=t.size=t.getTopLeftOffset=t.Dimension=t.getClientArea=t.getComputedStyle=t.addDisposableThrottledListener=t.modify=t.measure=t.scheduleAtNextAnimationFrame=t.runAtThisOrScheduleAtNextAnimationFrame=t.addDisposableNonBubblingMouseOutListener=t.addStandardDisposableListener=t.addDisposableListener=t.toggleClass=t.removeClasses=t.removeClass=t.addClasses=t.addClass=t.hasClass=t.isInDOM=t.removeNode=t.clearNode=void 0,t.animate=t.windowOpenNoOpener=t.computeScreenAwareSize=t.domContentLoaded=t.finalHandler=void 0;const r=o(i(71)),a=i(348),l=i(592),u=i(22),c=i(888),h=i(110),d=i(136),m=o(i(400)),p=i(910);t.clearNode=function(e){for(;e.firstChild;)e.removeChild(e.firstChild)},t.removeNode=function(e){e.parentNode&&e.parentNode.removeChild(e)},t.isInDOM=function(e){for(;e;){if(e===document.body)return!0;e=e.parentNode}return!1};const f=new class{_findClassName(e,t){let i=e.className;if(!i)return void(this._lastStart=-1);t=t.trim();let n=i.length,s=t.length;if(0===s)return void(this._lastStart=-1);if(n<s)return void(this._lastStart=-1);if(i===t)return this._lastStart=0,void(this._lastEnd=n);let o,r=-1;for(;(r=i.indexOf(t,r+1))>=0;){if(o=r+s,(0===r||32===i.charCodeAt(r-1))&&32===i.charCodeAt(o))return this._lastStart=r,void(this._lastEnd=o+1);if(r>0&&32===i.charCodeAt(r-1)&&o===n)return this._lastStart=r-1,void(this._lastEnd=o);if(0===r&&o===n)return this._lastStart=0,void(this._lastEnd=o)}this._lastStart=-1}hasClass(e,t){return this._findClassName(e,t),-1!==this._lastStart}addClasses(e,...t){t.forEach((t=>t.split(" ").forEach((t=>this.addClass(e,t)))))}addClass(e,t){e.className?(this._findClassName(e,t),-1===this._lastStart&&(e.className=e.className+" "+t)):e.className=t}removeClass(e,t){this._findClassName(e,t),-1!==this._lastStart&&(e.className=e.className.substring(0,this._lastStart)+e.className.substring(this._lastEnd))}removeClasses(e,...t){t.forEach((t=>t.split(" ").forEach((t=>this.removeClass(e,t)))))}toggleClass(e,t,i){this._findClassName(e,t),-1===this._lastStart||void 0!==i&&i||this.removeClass(e,t),-1!==this._lastStart||void 0!==i&&!i||this.addClass(e,t)}},b=new class{hasClass(e,t){return Boolean(t)&&e.classList&&e.classList.contains(t)}addClasses(e,...t){t.forEach((t=>t.split(" ").forEach((t=>this.addClass(e,t)))))}addClass(e,t){t&&e.classList&&e.classList.add(t)}removeClass(e,t){t&&e.classList&&e.classList.remove(t)}removeClasses(e,...t){t.forEach((t=>t.split(" ").forEach((t=>this.removeClass(e,t)))))}toggleClass(e,t,i){e.classList&&e.classList.toggle(t,i)}},g=r.isIE?f:b;t.hasClass=g.hasClass.bind(g),t.addClass=g.addClass.bind(g),t.addClasses=g.addClasses.bind(g),t.removeClass=g.removeClass.bind(g),t.removeClasses=g.removeClasses.bind(g),t.toggleClass=g.toggleClass.bind(g);class y{constructor(e,t,i,n){this._node=e,this._type=t,this._handler=i,this._useCapture=n||!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)}}function v(e,t,i,n){return new y(e,t,i,n)}t.addDisposableListener=v,t.addStandardDisposableListener=function(e,t,i,n){let s=i;return"click"===t||"mousedown"===t?s=function(e){return function(t){return e(new u.StandardMouseEvent(t))}}(i):"keydown"!==t&&"keypress"!==t&&"keyup"!==t||(s=function(e){return function(t){return e(new l.StandardKeyboardEvent(t))}}(i)),v(e,t,s,n)},t.addDisposableNonBubblingMouseOutListener=function(e,t){return v(e,"mouseout",(i=>{let n=i.relatedTarget||i.target;for(;n&&n!==e;)n=n.parentNode;n!==e&&t(i)}))};let C=null;class E{constructor(e,t=0){this._runner=e,this.priority=t,this._canceled=!1}dispose(){this._canceled=!0}execute(){if(!this._canceled)try{this._runner()}catch(e){console.error(e)}}static sort(e,t){return t.priority-e.priority}}!function(){let e=[],i=null,n=!1,s=!1,o=()=>{for(n=!1,i=e,e=[],s=!0;i.length>0;)i.sort(E.sort),i.shift().execute();s=!1};t.scheduleAtNextAnimationFrame=(t,i=0)=>{let s=new E(t,i);return e.push(s),n||(n=!0,function(e){if(!C){const e=e=>setTimeout((()=>e((new Date).getTime())),0);C=self.requestAnimationFrame||self.msRequestAnimationFrame||self.webkitRequestAnimationFrame||self.mozRequestAnimationFrame||self.oRequestAnimationFrame||e}C.call(self,e)}(o)),s},t.runAtThisOrScheduleAtNextAnimationFrame=(e,n)=>{if(s){let t=new E(e,n);return i.push(t),t}return(0,t.scheduleAtNextAnimationFrame)(e,n)}}(),t.measure=function(e){return(0,t.scheduleAtNextAnimationFrame)(e,1e4)},t.modify=function(e){return(0,t.scheduleAtNextAnimationFrame)(e,-1e4)};const _=function(e,t){return t};class w extends d.Disposable{constructor(e,t,i,n=_,s=16){super();let o=null,r=0,a=this._register(new c.TimeoutTimer),l=()=>{r=(new Date).getTime(),i(o),o=null};this._register(v(e,t,(e=>{o=n(o,e);let t=(new Date).getTime()-r;t>=s?(a.cancel(),l()):a.setIfNotSet(l,s-t)})))}}function S(e){return document.defaultView.getComputedStyle(e,null)}t.addDisposableThrottledListener=function(e,t,i,n,s){return new w(e,t,i,n,s)},t.getComputedStyle=S;function M(e,t,i){let n=S(e),s="0";return n&&(s=n.getPropertyValue?n.getPropertyValue(t):n.getAttribute(i)),function(e,t){return parseFloat(t)||0}(0,s)}t.getClientArea=function(e){if(e!==document.body)return new k(e.clientWidth,e.clientHeight);if(window.innerWidth&&window.innerHeight)return new k(window.innerWidth,window.innerHeight);if(document.body&&document.body.clientWidth&&document.body.clientHeight)return new k(document.body.clientWidth,document.body.clientHeight);if(document.documentElement&&document.documentElement.clientWidth&&document.documentElement.clientHeight)return new k(document.documentElement.clientWidth,document.documentElement.clientHeight);throw new Error("Unable to figure out browser width and height")};const x=function(e){return M(e,"border-left-width","borderLeftWidth")},T=function(e){return M(e,"border-top-width","borderTopWidth")},L=function(e){return M(e,"margin-left","marginLeft")},A=function(e){return M(e,"margin-right","marginRight")};class k{constructor(e,t){this.width=e,this.height=t}static equals(e,t){return e===t||!(!e||!t)&&e.width===t.width&&e.height===t.height}}function D(e){let t=e.offsetParent,i=e.offsetTop,n=e.offsetLeft;for(;null!==(e=e.parentNode)&&e!==document.body&&e!==document.documentElement;){i-=e.scrollTop;let s=S(e);s&&(n-="rtl"!==s.direction?e.scrollLeft:-e.scrollLeft),e===t&&(n+=x(e),i+=T(e),i+=e.offsetTop,n+=e.offsetLeft,t=e.offsetParent)}return{left:n,top:i}}function I(e){let t=L(e)+A(e);return e.offsetWidth+t}function N(e){let t=L(e)+A(e);return e.scrollWidth+t}function O(e,t){for(;e;){if(e===t)return!0;e=e.parentNode}return!1}function K(e=document.getElementsByTagName("head")[0]){let t=document.createElement("style");return t.type="text/css",t.media="screen",e.appendChild(t),t}t.Dimension=k,t.getTopLeftOffset=D,t.size=function(e,t,i){"number"==typeof t&&(e.style.width=`${t}px`),"number"==typeof i&&(e.style.height=`${i}px`)},t.position=function(e,t,i,n,s,o="absolute"){"number"==typeof t&&(e.style.top=`${t}px`),"number"==typeof i&&(e.style.right=`${i}px`),"number"==typeof n&&(e.style.bottom=`${n}px`),"number"==typeof s&&(e.style.left=`${s}px`),e.style.position=o},t.getDomNodePagePosition=function(e){let i=e.getBoundingClientRect();return{left:i.left+t.StandardWindow.scrollX,top:i.top+t.StandardWindow.scrollY,width:i.width,height:i.height}},t.StandardWindow=new class{get scrollX(){return"number"==typeof window.scrollX?window.scrollX:document.body.scrollLeft+document.documentElement.scrollLeft}get scrollY(){return"number"==typeof window.scrollY?window.scrollY:document.body.scrollTop+document.documentElement.scrollTop}},t.getTotalWidth=I,t.getContentWidth=function(e){let t=x(e)+function(e){return M(e,"border-right-width","borderRightWidth")}(e),i=function(e){return M(e,"padding-left","paddingLeft")}(e)+function(e){return M(e,"padding-right","paddingRight")}(e);return e.offsetWidth-t-i},t.getTotalScrollWidth=N,t.getContentHeight=function(e){let t=T(e)+function(e){return M(e,"border-bottom-width","borderBottomWidth")}(e),i=function(e){return M(e,"padding-top","paddingTop")}(e)+function(e){return M(e,"padding-bottom","paddingBottom")}(e);return e.offsetHeight-t-i},t.getTotalHeight=function(e){let t=function(e){return M(e,"margin-top","marginTop")}(e)+function(e){return M(e,"margin-bottom","marginBottom")}(e);return e.offsetHeight+t},t.getLargestChildWidth=function(e,t){let i=t.map((t=>Math.max(N(t),I(t))+function(e,t){if(null===e)return 0;let i=D(e),n=D(t);return i.left-n.left}(t,e)||0));return Math.max(...i)},t.isAncestor=O,t.findParentWithClass=function(e,i,n){for(;e;){if((0,t.hasClass)(e,i))return e;if(n)if("string"==typeof n){if((0,t.hasClass)(e,n))return null}else if(e===n)return null;e=e.parentNode}return null},t.createStyleSheet=K;let R=null;function F(){return R||(R=K()),R}t.createCSSRule=function(e,t,i=F()){i&&t&&i.sheet.insertRule(e+"{"+t+"}",0)},t.removeCSSRulesContainingSelector=function(e,t=F()){if(!t)return;let i=function(e){return e&&e.sheet&&e.sheet.rules?e.sheet.rules:e&&e.sheet&&e.sheet.cssRules?e.sheet.cssRules:[]}(t),n=[];for(let t=0;t<i.length;t++)-1!==i[t].selectorText.indexOf(e)&&n.push(t);for(let e=n.length-1;e>=0;e--)t.sheet.deleteRule(n[e])},t.isHTMLElement=function(e){return"object"==typeof HTMLElement?e instanceof HTMLElement:e&&"object"==typeof e&&1===e.nodeType&&"string"==typeof e.nodeName},t.EventType={MINIMIZE:"minimize",MAXIMIZE:"maximize",UNMAXIMIZE:"unmaximize",ENTER_FULLSCREEN:"enter-full-screen",LEAVE_FULLSCREEN:"leave-full-screen",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",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:r.isWebKit?"webkitAnimationStart":"animationstart",ANIMATION_END:r.isWebKit?"webkitAnimationEnd":"animationend",ANIMATION_ITERATION:r.isWebKit?"webkitAnimationIteration":"animationiteration"},t.EventHelper={stop:function(e,t){e.preventDefault?e.preventDefault():e.returnValue=!1,t&&(e.stopPropagation?e.stopPropagation():e.cancelBubble=!0)}},t.saveParentsScrollTop=function(e){let t=[];for(let i=0;e&&e.nodeType===e.ELEMENT_NODE;i++)t[i]=e.scrollTop,e=e.parentNode;return t},t.restoreParentsScrollTop=function(e,t){for(let i=0;e&&e.nodeType===e.ELEMENT_NODE;i++)e.scrollTop!==t[i]&&(e.scrollTop=t[i]),e=e.parentNode};class P{constructor(e){this._onDidFocus=new h.Emitter,this.onDidFocus=this._onDidFocus.event,this._onDidBlur=new h.Emitter,this.onDidBlur=this._onDidBlur.event,this.disposables=[];let i=O(document.activeElement,e),n=!1;(0,a.domEvent)(e,t.EventType.FOCUS,!0)((()=>{n=!1,i||(i=!0,this._onDidFocus.fire())}),null,this.disposables),(0,a.domEvent)(e,t.EventType.BLUR,!0)((()=>{i&&(n=!0,window.setTimeout((()=>{n&&(n=!1,i=!1,this._onDidBlur.fire())}),0))}),null,this.disposables)}dispose(){this.disposables=(0,d.dispose)(this.disposables),this._onDidFocus.dispose(),this._onDidBlur.dispose()}}t.trackFocus=function(e){return new P(e)},t.append=function(e,...t){return t.forEach((t=>e.appendChild(t))),t[t.length-1]},t.prepend=function(e,t){return e.insertBefore(t,e.firstChild),t};const U=/([\w\-]+)?(#([\w\-]+))?((.([\w\-]+))*)/;t.$=function(e,t,...i){let n=U.exec(e);if(!n)throw new Error("Bad use of emmet");let s=document.createElement(n[1]||"div");return n[3]&&(s.id=n[3]),n[4]&&(s.className=n[4].replace(/\./g," ").trim()),t=t||{},Object.keys(t).forEach((e=>{const i=t[e];/^on\w+$/.test(e)?s[e]=i:"selected"===e?i&&s.setAttribute(e,"true"):s.setAttribute(e,i)})),(0,p.coalesce)(i).forEach((e=>{e instanceof Node?s.appendChild(e):s.appendChild(document.createTextNode(e))})),s},t.join=function(e,t){const i=[];return e.forEach(((e,n)=>{n>0&&(t instanceof Node?i.push(t.cloneNode()):i.push(document.createTextNode(t))),i.push(e)})),i},t.show=function(...e){for(let t of e)t&&(t.style.display="",t.removeAttribute("aria-hidden"))},t.hide=function(...e){for(let t of e)t&&(t.style.display="none",t.setAttribute("aria-hidden","true"))},t.removeTabIndexAndUpdateFocus=function(e){if(e&&e.hasAttribute("tabIndex")){if(document.activeElement===e){let t=function(e,t){for(;e;){if(e instanceof HTMLElement&&e.hasAttribute("tabIndex"))return e;e=e.parentNode}return null}(e.parentElement);t&&t.focus()}e.removeAttribute("tabindex")}},t.getElementsByTagName=function(e){return Array.prototype.slice.call(document.getElementsByTagName(e),0)},t.finalHandler=function(e){return t=>{t.preventDefault(),t.stopPropagation(),e(t)}},t.domContentLoaded=function(){return new Promise((e=>{"complete"===document.readyState||document&&null!==document.body?m.setImmediate(e):window.addEventListener("DOMContentLoaded",e,!1)}))},t.computeScreenAwareSize=function(e){const t=window.devicePixelRatio*e;return Math.max(1,Math.floor(t))/window.devicePixelRatio},t.windowOpenNoOpener=function(e){if(m.isNative||r.isEdgeWebView)window.open(e);else{let t=window.open();t&&(t.opener=null,t.location.href=e)}},t.animate=function(e){const i=()=>{e(),n=(0,t.scheduleAtNextAnimationFrame)(i)};let n=(0,t.scheduleAtNextAnimationFrame)(i);return(0,d.toDisposable)((()=>n.dispose()))}},110:function(e,t,i){var n=this&&this.__awaiter||function(e,t,i,n){return new(i||(i=Promise))((function(s,o){function r(e){try{l(n.next(e))}catch(e){o(e)}}function a(e){try{l(n.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.Relay=t.EventBufferer=t.AsyncEmitter=t.Emitter=t.setGlobalLeakWarningThreshold=t.Event=void 0;const s=i(136),o=i(511);var r;!function(e){const t={dispose(){}};function i(e){return(t,i=null,n)=>{let s=!1;const o=e((e=>{if(!s)return o?o.dispose():s=!0,t.call(i,e)}),null,n);return s&&o.dispose(),o}}function n(e,t){return(i,n=null,s)=>e((e=>i.call(n,t(e))),null,s)}function o(e,t){return(i,n=null,s)=>e((e=>{t(e),i.call(n,e)}),null,s)}function r(e,t){return(i,n=null,s)=>e((e=>t(e)&&i.call(n,e)),null,s)}function a(e,t,i){let s=i;return n(e,(e=>(s=t(s,e),s)))}function l(e){let t,i=!0;return r(e,(e=>{let n=i||e!==t;return i=!1,t=e,n}))}e.None=function(){return t},e.once=i,e.map=n,e.forEach=o,e.filter=r,e.signal=function(e){return e},e.any=function(...e){return(t,i=null,n)=>(0,s.combinedDisposable)(e.map((e=>e((e=>t.call(i,e)),null,n))))},e.reduce=a,e.debounce=function(e,t,i=100,n=!1,s){let o,r,a,l=0;const c=new u({leakWarningThreshold:s,onFirstListenerAdd(){o=e((e=>{l++,r=t(r,e),n&&!a&&c.fire(r),clearTimeout(a),a=setTimeout((()=>{let e=r;r=void 0,a=void 0,(!n||l>1)&&c.fire(e),l=0}),i)}))},onLastListenerRemove(){o.dispose()}});return c.event},e.stopwatch=function(e){const t=(new Date).getTime();return n(i(e),(e=>(new Date).getTime()-t))},e.latch=l,e.buffer=function(e,t=!1,i=[]){let n=i.slice(),s=e((e=>{n?n.push(e):r.fire(e)}));const o=()=>{n&&n.forEach((e=>r.fire(e))),n=null},r=new u({onFirstListenerAdd(){s||(s=e((e=>r.fire(e))))},onFirstListenerDidAdd(){n&&(t?setTimeout(o):o())},onLastListenerRemove(){s&&s.dispose(),s=null}});return r.event},e.echo=function(e,t=!1,i=[]){i=i.slice(),e((e=>{i.push(e),s.fire(e)}));const n=(e,t)=>i.forEach((i=>e.call(t,i))),s=new u({onListenerDidAdd(e,i,s){t?setTimeout((()=>n(i,s))):n(i,s)}});return s.event};class c{constructor(e){this._event=e}get event(){return this._event}map(e){return new c(n(this._event,e))}forEach(e){return new c(o(this._event,e))}filter(e){return new c(r(this._event,e))}reduce(e,t){return new c(a(this._event,e,t))}latch(){return new c(l(this._event))}on(e,t,i){return this._event(e,t,i)}once(e,t,n){return i(this._event)(e,t,n)}}e.chain=function(e){return new c(e)},e.fromNodeEventEmitter=function(e,t,i=(e=>e)){const n=(...e)=>s.fire(i(...e)),s=new u({onFirstListenerAdd:()=>e.on(t,n),onLastListenerRemove:()=>e.removeListener(t,n)});return s.event},e.fromPromise=function(e){const t=new u;let i=!1;return e.then(void 0,(()=>null)).then((()=>{i?t.fire(void 0):setTimeout((()=>t.fire(void 0)),0)})),i=!0,t.event},e.toPromise=function(e){return new Promise((t=>i(e)(t)))}}(r=t.Event||(t.Event={}));let a=-1;t.setGlobalLeakWarningThreshold=function(e){let t=a;return a=e,{dispose(){a=t}}};class l{constructor(e,t=Math.random().toString(18).slice(2,5)){this.customThreshold=e,this.name=t,this._warnCountdown=0}dispose(){this._stacks&&this._stacks.clear()}check(e){let t=a;if("number"==typeof this.customThreshold&&(t=this.customThreshold),t<=0||e<t)return;this._stacks||(this._stacks=new Map);let i=(new Error).stack.split("\n").slice(3).join("\n"),n=this._stacks.get(i)||0;if(this._stacks.set(i,n+1),this._warnCountdown-=1,this._warnCountdown<=0){let i;this._warnCountdown=.5*t;let n=0;this._stacks.forEach(((e,t)=>{(!i||n<e)&&(i=t,n=e)})),console.warn(`[${this.name}] potential listener LEAK detected, having ${e} listeners already. MOST frequent listener (${n}):`),console.warn(i)}return()=>{let e=this._stacks.get(i)||0;this._stacks.set(i,e-1)}}}class u{constructor(e){this._disposed=!1,this._options=e,this._leakageMon=a>0?new l(this._options&&this._options.leakWarningThreshold):void 0}get event(){return this._event||(this._event=(e,t,i)=>{this._listeners||(this._listeners=new o.LinkedList);const n=this._listeners.isEmpty();n&&this._options&&this._options.onFirstListenerAdd&&this._options.onFirstListenerAdd(this);const s=this._listeners.push(t?[e,t]:e);let r,a;return n&&this._options&&this._options.onFirstListenerDidAdd&&this._options.onFirstListenerDidAdd(this),this._options&&this._options.onListenerDidAdd&&this._options.onListenerDidAdd(this,e,t),this._leakageMon&&(r=this._leakageMon.check(this._listeners.size)),a={dispose:()=>{r&&r(),a.dispose=u._noop,!this._disposed&&(s(),this._options&&this._options.onLastListenerRemove)&&(this._listeners&&!this._listeners.isEmpty()||this._options.onLastListenerRemove(this))}},Array.isArray(i)&&i.push(a),a}),this._event}fire(e){if(this._listeners){this._deliveryQueue||(this._deliveryQueue=[]);for(let t=this._listeners.iterator(),i=t.next();!i.done;i=t.next())this._deliveryQueue.push([i.value,e]);for(;this._deliveryQueue.length>0;){const[e,t]=this._deliveryQueue.shift();try{"function"==typeof e?e.call(void 0,t):e[0].call(e[1],t)}catch(e){console.error(e)}}}}dispose(){this._listeners&&(this._listeners=void 0),this._deliveryQueue&&(this._deliveryQueue.length=0),this._leakageMon&&this._leakageMon.dispose(),this._disposed=!0}}t.Emitter=u,u._noop=function(){},t.AsyncEmitter=class extends u{fireAsync(e){return n(this,void 0,void 0,(function*(){if(this._listeners){this._asyncDeliveryQueue||(this._asyncDeliveryQueue=[]);for(let t=this._listeners.iterator(),i=t.next();!i.done;i=t.next()){let t=[];this._asyncDeliveryQueue.push([i.value,e(t,"function"==typeof i.value?i.value:i.value[0]),t])}for(;this._asyncDeliveryQueue.length>0;){const[e,t,i]=this._asyncDeliveryQueue.shift();try{"function"==typeof e?e.call(void 0,t):e[0].call(e[1],t)}catch(e){console.error(e);continue}Object.freeze(i),yield Promise.all(i)}}}))}},t.EventBufferer=class{constructor(){this.buffers=[]}wrapEvent(e){return(t,i,n)=>e((e=>{const n=this.buffers[this.buffers.length-1];n?n.push((()=>t.call(i,e))):t.call(i,e)}),void 0,n)}bufferEvents(e){const t=[];this.buffers.push(t);const i=e();return this.buffers.pop(),t.forEach((e=>e())),i}},t.Relay=class{constructor(){this.listening=!1,this.inputEvent=r.None,this.inputEventListener=s.Disposable.None,this.emitter=new u({onFirstListenerDidAdd:()=>{this.listening=!0,this.inputEventListener=this.inputEvent(this.emitter.fire,this.emitter)},onLastListenerRemove:()=>{this.listening=!1,this.inputEventListener.dispose()}}),this.event=this.emitter.event}set input(e){this.inputEvent=e,this.listening&&(this.inputEventListener.dispose(),this.inputEventListener=e(this.emitter.fire,this.emitter))}dispose(){this.inputEventListener.dispose(),this.emitter.dispose()}}},663:(e,t)=>{var i;Object.defineProperty(t,"__esModule",{value:!0}),t.MappedNavigator=t.MappedIterator=t.ArrayNavigator=t.ArrayIterator=t.getSequenceIterator=t.Iterator=t.FIN=void 0,t.FIN={done:!0,value:void 0},function(e){const i={next:()=>t.FIN};function n(e,t){for(let i=e.next();!i.done;i=e.next())t(i.value)}e.empty=function(){return i},e.fromArray=function(e,i=0,n=e.length){return{next:()=>i>=n?t.FIN:{done:!1,value:e[i++]}}},e.from=function(t){return t?Array.isArray(t)?e.fromArray(t):t:e.empty()},e.map=function(e,i){return{next(){const n=e.next();return n.done?t.FIN:{done:!1,value:i(n.value)}}}},e.filter=function(e,i){return{next(){for(;;){const n=e.next();if(n.done)return t.FIN;if(i(n.value))return{done:!1,value:n.value}}}}},e.forEach=n,e.collect=function(e){const t=[];return n(e,(e=>t.push(e))),t}}(i=t.Iterator||(t.Iterator={})),t.getSequenceIterator=function(e){return Array.isArray(e)?i.fromArray(e):e};class n{constructor(e,t=0,i=e.length,n=t-1){this.items=e,this.start=t,this.end=i,this.index=n}first(){return this.index=this.start,this.current()}next(){return this.index=Math.min(this.index+1,this.end),this.current()}current(){return this.index===this.start-1||this.index===this.end?null:this.items[this.index]}}t.ArrayIterator=n,t.ArrayNavigator=class extends n{constructor(e,t=0,i=e.length,n=t-1){super(e,t,i,n)}current(){return super.current()}previous(){return this.index=Math.max(this.index-1,this.start-1),this.current()}first(){return this.index=this.start,this.current()}last(){return this.index=this.end-1,this.current()}parent(){return null}};class s{constructor(e,t){this.iterator=e,this.fn=t}next(){return this.fn(this.iterator.next())}}t.MappedIterator=s,t.MappedNavigator=class extends s{constructor(e,t){super(e,t),this.navigator=e}current(){return this.fn(this.navigator.current())}previous(){return this.fn(this.navigator.previous())}parent(){return this.fn(this.navigator.parent())}first(){return this.fn(this.navigator.first())}last(){return this.fn(this.navigator.last())}next(){return this.fn(this.navigator.next())}}},979:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ResolvedKeybinding=t.ResolvedKeybindingPart=t.ChordKeybinding=t.SimpleKeybinding=t.createSimpleKeybinding=t.createKeybinding=t.KeyChord=t.KeyCodeUtils=void 0;class i{constructor(){this._keyCodeToStr=[],this._strToKeyCode=Object.create(null)}define(e,t){this._keyCodeToStr[e]=t,this._strToKeyCode[t.toLowerCase()]=e}keyCodeToStr(e){return this._keyCodeToStr[e]}strToKeyCode(e){return this._strToKeyCode[e.toLowerCase()]||0}}const n=new i,s=new i,o=new i;function r(e,t){const i=!!(2048&e),n=!!(256&e);return new l(2===t?n:i,!!(1024&e),!!(512&e),2===t?i:n,255&e)}var a;!function(){function e(e,t,i=t,r=i){n.define(e,t),s.define(e,i),o.define(e,r)}e(0,"unknown"),e(1,"Backspace"),e(2,"Tab"),e(3,"Enter"),e(4,"Shift"),e(5,"Ctrl"),e(6,"Alt"),e(7,"PauseBreak"),e(8,"CapsLock"),e(9,"Escape"),e(10,"Space"),e(11,"PageUp"),e(12,"PageDown"),e(13,"End"),e(14,"Home"),e(15,"LeftArrow","Left"),e(16,"UpArrow","Up"),e(17,"RightArrow","Right"),e(18,"DownArrow","Down"),e(19,"Insert"),e(20,"Delete"),e(21,"0"),e(22,"1"),e(23,"2"),e(24,"3"),e(25,"4"),e(26,"5"),e(27,"6"),e(28,"7"),e(29,"8"),e(30,"9"),e(31,"A"),e(32,"B"),e(33,"C"),e(34,"D"),e(35,"E"),e(36,"F"),e(37,"G"),e(38,"H"),e(39,"I"),e(40,"J"),e(41,"K"),e(42,"L"),e(43,"M"),e(44,"N"),e(45,"O"),e(46,"P"),e(47,"Q"),e(48,"R"),e(49,"S"),e(50,"T"),e(51,"U"),e(52,"V"),e(53,"W"),e(54,"X"),e(55,"Y"),e(56,"Z"),e(57,"Meta"),e(58,"ContextMenu"),e(59,"F1"),e(60,"F2"),e(61,"F3"),e(62,"F4"),e(63,"F5"),e(64,"F6"),e(65,"F7"),e(66,"F8"),e(67,"F9"),e(68,"F10"),e(69,"F11"),e(70,"F12"),e(71,"F13"),e(72,"F14"),e(73,"F15"),e(74,"F16"),e(75,"F17"),e(76,"F18"),e(77,"F19"),e(78,"NumLock"),e(79,"ScrollLock"),e(80,";",";","OEM_1"),e(81,"=","=","OEM_PLUS"),e(82,",",",","OEM_COMMA"),e(83,"-","-","OEM_MINUS"),e(84,".",".","OEM_PERIOD"),e(85,"/","/","OEM_2"),e(86,"`","`","OEM_3"),e(110,"ABNT_C1"),e(111,"ABNT_C2"),e(87,"[","[","OEM_4"),e(88,"\\","\\","OEM_5"),e(89,"]","]","OEM_6"),e(90,"'","'","OEM_7"),e(91,"OEM_8"),e(92,"OEM_102"),e(93,"NumPad0"),e(94,"NumPad1"),e(95,"NumPad2"),e(96,"NumPad3"),e(97,"NumPad4"),e(98,"NumPad5"),e(99,"NumPad6"),e(100,"NumPad7"),e(101,"NumPad8"),e(102,"NumPad9"),e(103,"NumPad_Multiply"),e(104,"NumPad_Add"),e(105,"NumPad_Separator"),e(106,"NumPad_Subtract"),e(107,"NumPad_Decimal"),e(108,"NumPad_Divide")}(),(a=t.KeyCodeUtils||(t.KeyCodeUtils={})).toString=function(e){return n.keyCodeToStr(e)},a.fromString=function(e){return n.strToKeyCode(e)},a.toUserSettingsUS=function(e){return s.keyCodeToStr(e)},a.toUserSettingsGeneral=function(e){return o.keyCodeToStr(e)},a.fromUserSettings=function(e){return s.strToKeyCode(e)||o.strToKeyCode(e)},t.KeyChord=function(e,t){return(e|(65535&t)<<16>>>0)>>>0},t.createKeybinding=function(e,t){if(0===e)return null;const i=(65535&e)>>>0,n=(4294901760&e)>>>16;return 0!==n?new u(r(i,t),r(n,t)):r(i,t)},t.createSimpleKeybinding=r;class l{constructor(e,t,i,n,s){this.type=1,this.ctrlKey=e,this.shiftKey=t,this.altKey=i,this.metaKey=n,this.keyCode=s}equals(e){return 1===e.type&&this.ctrlKey===e.ctrlKey&&this.shiftKey===e.shiftKey&&this.altKey===e.altKey&&this.metaKey===e.metaKey&&this.keyCode===e.keyCode}getHashCode(){return`${this.ctrlKey?"1":"0"}${this.shiftKey?"1":"0"}${this.altKey?"1":"0"}${this.metaKey?"1":"0"}${this.keyCode}`}isModifierKey(){return 0===this.keyCode||5===this.keyCode||57===this.keyCode||6===this.keyCode||4===this.keyCode}isDuplicateModifierCase(){return this.ctrlKey&&5===this.keyCode||this.shiftKey&&4===this.keyCode||this.altKey&&6===this.keyCode||this.metaKey&&57===this.keyCode}}t.SimpleKeybinding=l;class u{constructor(e,t){this.type=2,this.firstPart=e,this.chordPart=t}getHashCode(){return`${this.firstPart.getHashCode()};${this.chordPart.getHashCode()}`}}t.ChordKeybinding=u,t.ResolvedKeybindingPart=class{constructor(e,t,i,n,s,o){this.ctrlKey=e,this.shiftKey=t,this.altKey=i,this.metaKey=n,this.keyLabel=s,this.keyAriaLabel=o}},t.ResolvedKeybinding=class{}},136:(e,t)=>{function i(e,...t){return Array.isArray(e)?(e.forEach((e=>e&&e.dispose())),[]):0===t.length?e?(e.dispose(),e):void 0:(i(e),i(t),[])}Object.defineProperty(t,"__esModule",{value:!0}),t.Disposable=t.toDisposable=t.combinedDisposable=t.dispose=t.isDisposable=void 0,t.isDisposable=function(e){return"function"==typeof e.dispose&&0===e.dispose.length},t.dispose=i,t.combinedDisposable=function(e){return{dispose:()=>i(e)}},t.toDisposable=function(e){return{dispose(){e()}}};class n{constructor(){this._toDispose=[],this._lifecycle_disposable_isDisposed=!1}get toDispose(){return this._toDispose}dispose(){this._lifecycle_disposable_isDisposed=!0,this._toDispose=i(this._toDispose)}_register(e){return this._lifecycle_disposable_isDisposed?(console.warn("Registering disposable on object that has already been disposed."),e.dispose()):this._toDispose.push(e),e}}t.Disposable=n,n.None=Object.freeze({dispose(){}})},511:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.LinkedList=void 0;const n=i(663);class s{constructor(e){this.element=e}}t.LinkedList=class{constructor(){this._size=0}get size(){return this._size}isEmpty(){return!this._first}clear(){this._first=void 0,this._last=void 0,this._size=0}unshift(e){return this._insert(e,!1)}push(e){return this._insert(e,!0)}_insert(e,t){const i=new s(e);if(this._first)if(t){const e=this._last;this._last=i,i.prev=e,e.next=i}else{const e=this._first;this._first=i,i.next=e,e.prev=i}else this._first=i,this._last=i;return this._size+=1,this._remove.bind(this,i)}shift(){if(this._first){const e=this._first.element;return this._remove(this._first),e}}pop(){if(this._last){const e=this._last.element;return this._remove(this._last),e}}_remove(e){let t=this._first;for(;t instanceof s;){if(t===e){if(t.prev&&t.next){let e=t.prev;e.next=t.next,t.next.prev=e}else t.prev||t.next?t.next?t.prev||(this._first=this._first.next,this._first.prev=void 0):(this._last=this._last.prev,this._last.next=void 0):(this._first=void 0,this._last=void 0);this._size-=1;break}t=t.next}}iterator(){let e,t=this._first;return{next:()=>t?(e?e.value=t.element:e={done:!1,value:t.element},t=t.next,e):n.FIN}}toArray(){let e=[];for(let t=this._first;t instanceof s;t=t.next)e.push(t.element);return e}}},400:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.OS=t.setImmediate=t.globals=t.translationsConfigFile=t.locale=t.language=t.isRootUser=t.platform=t.isWeb=t.isNative=t.isLinux=t.isMacintosh=t.isWindows=t.PlatformToString=t.LANGUAGE_DEFAULT=void 0;let n,s,o,r=!1,a=!1,l=!1,u=!1,c=!1;t.LANGUAGE_DEFAULT="en";const h="undefined"!=typeof process&&void 0!==process.versions&&void 0!==process.versions.electron&&"renderer"===process.type;if("object"!=typeof navigator||h){if("object"==typeof process){r="win32"===process.platform,a="darwin"===process.platform,l="linux"===process.platform,n=t.LANGUAGE_DEFAULT,s=t.LANGUAGE_DEFAULT;const e=process.env.VSCODE_NLS_CONFIG;if(e)try{const i=JSON.parse(e),r=i.availableLanguages["*"];n=i.locale,s=r||t.LANGUAGE_DEFAULT,o=i._translationsConfigFile}catch(e){}u=!0}}else{const e=navigator.userAgent;r=e.indexOf("Windows")>=0,a=e.indexOf("Macintosh")>=0,l=e.indexOf("Linux")>=0,c=!0,n=navigator.language,s=n}t.PlatformToString=function(e){switch(e){case 0:return"Web";case 1:return"Mac";case 2:return"Linux";case 3:return"Windows"}};let d=0;u&&(a?d=1:r?d=3:l&&(d=2)),t.isWindows=r,t.isMacintosh=a,t.isLinux=l,t.isNative=u,t.isWeb=c,t.platform=d,t.isRootUser=function(){return u&&!r&&0===process.getuid()},t.language=s,t.locale=n,t.translationsConfigFile=o;const m="object"==typeof self?self:"object"==typeof i.g?i.g:{};t.globals=m;let p=null;t.setImmediate=function(e){return null===p&&(p=t.globals.setImmediate?t.globals.setImmediate.bind(t.globals):"undefined"!=typeof process&&"function"==typeof process.nextTick?process.nextTick.bind(process):t.globals.setTimeout.bind(t.globals)),p(e)},t.OS=a?2:r?1:3},607:function(e,t,i){var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const s=n(i(155)),o=i(469);t.default={Titlebar:s.default,Color:o.Color}},679:(e,t)=>{var i;Object.defineProperty(t,"__esModule",{value:!0}),t.MenubarState=void 0,(i=t.MenubarState||(t.MenubarState={}))[i.HIDDEN=0]="HIDDEN",i[i.VISIBLE=1]="VISIBLE",i[i.FOCUSED=2]="FOCUSED",i[i.OPEN=3]="OPEN"},991:function(e,t,i){var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.cleanMnemonic=t.CETMenu=t.MENU_ESCAPED_MNEMONIC_REGEX=t.MENU_MNEMONIC_REGEX=void 0;const s=i(469),o=i(680),r=i(979),a=i(400),l=i(592),u=i(774),c=i(136),h=i(110),d=i(888),m=n(i(242));t.MENU_MNEMONIC_REGEX=/\(&([^\s&])\)|(^|[^&])&([^\s&])/,t.MENU_ESCAPED_MNEMONIC_REGEX=/(&amp;)?(&amp;)([^\s&])/g;class p extends c.Disposable{constructor(e,t,i={},n=(()=>{})){super(),this.triggerKeys={keys:[3,10],keyDown:!0},this.parentData={parent:this},this._onDidCancel=this._register(new h.Emitter),this.menuContainer=e,this.menubarOptions=t,this.options=i,this.closeSubMenu=n,this.items=[],this.focusedItem=void 0,this.mnemonics=new Map,this._register((0,o.addDisposableListener)(this.menuContainer,o.EventType.KEY_DOWN,(e=>{const t=new l.StandardKeyboardEvent(e);let i=!0;t.equals(16)?this.focusPrevious():t.equals(18)?this.focusNext():t.equals(9)?this.cancel():this.isTriggerKeyEvent(t)?this.triggerKeys&&this.triggerKeys.keyDown&&this.doTrigger(t):i=!1,i&&(t.preventDefault(),t.stopPropagation())}))),this._register((0,o.addDisposableListener)(this.menuContainer,o.EventType.KEY_UP,(e=>{const t=new l.StandardKeyboardEvent(e);this.isTriggerKeyEvent(t)?(this.triggerKeys&&!this.triggerKeys.keyDown&&this.doTrigger(t),t.preventDefault(),t.stopPropagation()):(t.equals(2)||t.equals(1026))&&this.updateFocusedItem()}))),i.enableMnemonics&&this._register((0,o.addDisposableListener)(this.menuContainer,o.EventType.KEY_DOWN,(e=>{const t=r.KeyCodeUtils.fromString(e.key);if(this.mnemonics.has(t)){const i=this.mnemonics.get(t);if(1===i.length&&(i[0]instanceof f&&this.focusItemByElement(i[0].getContainer()),i[0].onClick(e)),i.length>1){const e=i.shift();e&&(this.focusItemByElement(e.getContainer()),i.push(e)),this.mnemonics.set(t,i)}}}))),a.isLinux&&this._register((0,o.addDisposableListener)(this.menuContainer,o.EventType.KEY_DOWN,(e=>{const t=new l.StandardKeyboardEvent(e);t.equals(14)||t.equals(11)?(this.focusedItem=this.items.length-1,this.focusNext(),o.EventHelper.stop(e,!0)):(t.equals(13)||t.equals(12))&&(this.focusedItem=0,this.focusPrevious(),o.EventHelper.stop(e,!0))}))),this._register((0,o.addDisposableListener)(this.menuContainer,o.EventType.MOUSE_OUT,(e=>{let t=e.relatedTarget;(0,o.isAncestor)(t,this.menuContainer)||(this.focusedItem=void 0,this.updateFocus(),e.stopPropagation())}))),this._register((0,o.addDisposableListener)(this.menuContainer,o.EventType.MOUSE_UP,(e=>{o.EventHelper.stop(e,!0)}))),this._register((0,o.addDisposableListener)(this.menuContainer,o.EventType.MOUSE_OVER,(e=>{let t=e.target;if(t&&(0,o.isAncestor)(t,this.menuContainer)&&t!==this.menuContainer){for(;t.parentElement!==this.menuContainer&&null!==t.parentElement;)t=t.parentElement;if((0,o.hasClass)(t,"cet-action-item")){const e=this.focusedItem;this.setFocusedItem(t),e!==this.focusedItem&&this.updateFocus()}}}))),this.options.ariaLabel&&this.menuContainer.setAttribute("aria-label",this.options.ariaLabel)}get onDidCancel(){return this._onDidCancel.event}setAriaLabel(e){e?this.menuContainer.setAttribute("aria-label",e):this.menuContainer.removeAttribute("aria-label")}isTriggerKeyEvent(e){let t=!1;return this.triggerKeys&&this.triggerKeys.keys.forEach((i=>{t=t||e.equals(i)})),t}updateFocusedItem(){for(let e=0;e<this.menuContainer.children.length;e++){const t=this.menuContainer.children[e];if((0,o.isAncestor)(document.activeElement,t)){this.focusedItem=e;break}}}getContainer(){return this.menuContainer}createMenu(e){e.forEach((e=>{const t=document.createElement("li");t.className="cet-action-item",t.setAttribute("role","presentation"),this._register((0,o.addDisposableListener)(t,o.EventType.CONTEXT_MENU,(e=>{e.preventDefault(),e.stopPropagation()})));let i=null;if("separator"===e.type)i=new b(e,this.options);else if("submenu"===e.type||e.submenu){const t=e.submenu.items;if(i=new f(e,t,this.parentData,this.menubarOptions,this.options,this.closeSubMenu),this.options.enableMnemonics){const e=i.getMnemonic();if(e&&i.isEnabled()){let t=[];this.mnemonics.has(e)&&(t=this.mnemonics.get(e)),t.push(i),this.mnemonics.set(e,t)}}}else{const t={enableMnemonics:this.options.enableMnemonics};if(i=new u.CETMenuItem(e,this.menubarOptions,t,this.closeSubMenu,this.items),this.options.enableMnemonics){const e=i.getMnemonic();if(e&&i.isEnabled()){let t=[];this.mnemonics.has(e)&&(t=this.mnemonics.get(e)),t.push(i),this.mnemonics.set(e,t)}}}i.render(t),this.menuContainer.appendChild(t),this.items.push(i)}))}focus(e){let t,i=!1;void 0===e?i=!0:"number"==typeof e?t=e:"boolean"==typeof e&&(i=e),i&&void 0===this.focusedItem?(this.focusedItem=this.items.length-1,this.focusNext()):(void 0!==t&&(this.focusedItem=t),this.updateFocus())}focusNext(){void 0===this.focusedItem&&(this.focusedItem=this.items.length-1);const e=this.focusedItem;let t;do{this.focusedItem=(this.focusedItem+1)%this.items.length,t=this.items[this.focusedItem]}while(this.focusedItem!==e&&!t.isEnabled()||t.isSeparator());(this.focusedItem===e&&!t.isEnabled()||t.isSeparator())&&(this.focusedItem=void 0),this.updateFocus()}focusPrevious(){void 0===this.focusedItem&&(this.focusedItem=0);const e=this.focusedItem;let t;do{this.focusedItem=this.focusedItem-1,this.focusedItem<0&&(this.focusedItem=this.items.length-1),t=this.items[this.focusedItem]}while(this.focusedItem!==e&&!t.isEnabled()||t.isSeparator());(this.focusedItem===e&&!t.isEnabled()||t.isSeparator())&&(this.focusedItem=void 0),this.updateFocus()}updateFocus(){void 0===this.focusedItem&&this.menuContainer.focus();for(let e=0;e<this.items.length;e++){const t=this.items[e];e===this.focusedItem?t.isEnabled()?t.focus():this.menuContainer.focus():t.blur()}}doTrigger(e){if(void 0===this.focusedItem)return;const t=this.items[this.focusedItem];t instanceof u.CETMenuItem&&t.onClick(e)}cancel(){document.activeElement instanceof HTMLElement&&document.activeElement.blur(),this._onDidCancel.fire()}dispose(){(0,c.dispose)(this.items),this.items=[],(0,o.removeNode)(this.getContainer()),super.dispose()}style(e){const t=this.getContainer(),i=e.backgroundColor.rgba,n=new s.Color(new s.RGBA(i.r,i.g,i.b,.8));t.style.backgroundColor=e.backgroundColor?n.toString():null,this.items&&this.items.forEach((t=>{(t instanceof u.CETMenuItem||t instanceof b)&&t.style(e)}))}focusItemByElement(e){const t=this.focusedItem;this.setFocusedItem(e),t!==this.focusedItem&&this.updateFocus()}setFocusedItem(e){for(let t=0;t<this.menuContainer.children.length;t++)if(e===this.menuContainer.children[t]){this.focusedItem=t;break}}}t.CETMenu=p;class f extends u.CETMenuItem{constructor(e,t,i,n,s,r=(()=>{})){super(e,n,s,r),this.submenuItems=t,this.parentData=i,this.submenuOptions=s,this.submenuDisposables=[],this.showScheduler=new d.RunOnceScheduler((()=>{this.mouseOver&&(this.cleanupExistingSubmenu(!1),this.createSubmenu(!1))}),250),this.hideScheduler=new d.RunOnceScheduler((()=>{this.container&&!(0,o.isAncestor)(document.activeElement,this.container)&&this.parentData.submenu===this.mysubmenu&&(this.parentData.parent.focus(!1),this.cleanupExistingSubmenu(!0))}),750)}render(e){super.render(e),this.itemElement&&((0,o.addClass)(this.itemElement,"cet-submenu-item"),this.itemElement.setAttribute("aria-haspopup","true"),this.submenuIndicator=(0,o.append)(this.itemElement,(0,o.$)("span.cet-submenu-indicator")),this.submenuIndicator.innerHTML=m.default.arrow,this.submenuIndicator.setAttribute("aria-hidden","true"),this._register((0,o.addDisposableListener)(this.container,o.EventType.KEY_UP,(e=>{let t=new l.StandardKeyboardEvent(e);(t.equals(17)||t.equals(3))&&(o.EventHelper.stop(e,!0),this.createSubmenu(!0))}))),this._register((0,o.addDisposableListener)(this.container,o.EventType.KEY_DOWN,(e=>{let t=new l.StandardKeyboardEvent(e);(t.equals(17)||t.equals(3))&&o.EventHelper.stop(e,!0)}))),this._register((0,o.addDisposableListener)(this.container,o.EventType.MOUSE_OVER,(e=>{this.mouseOver||(this.mouseOver=!0,this.showScheduler.schedule())}))),this._register((0,o.addDisposableListener)(this.container,o.EventType.MOUSE_LEAVE,(e=>{this.mouseOver=!1}))),this._register((0,o.addDisposableListener)(this.container,o.EventType.FOCUS_OUT,(e=>{this.container&&!(0,o.isAncestor)(document.activeElement,this.container)&&this.hideScheduler.schedule()}))))}onClick(e){o.EventHelper.stop(e,!0),this.cleanupExistingSubmenu(!1),this.createSubmenu(!1)}cleanupExistingSubmenu(e){this.parentData.submenu&&(e||this.parentData.submenu!==this.mysubmenu)&&(this.parentData.submenu.dispose(),this.parentData.submenu=void 0,this.submenuContainer&&(this.submenuContainer=void 0))}createSubmenu(e=!0){if(this.itemElement)if(this.parentData.submenu)this.parentData.submenu.focus(!1);else{this.submenuContainer=(0,o.append)(this.container,(0,o.$)("ul.cet-submenu")),(0,o.addClasses)(this.submenuContainer,"cet-menubar-menu-container"),this.parentData.submenu=new p(this.submenuContainer,this.menubarOptions,this.submenuOptions,this.closeSubMenu),this.parentData.submenu.createMenu(this.submenuItems),this.menuStyle&&this.parentData.submenu.style(this.menuStyle);const t=this.container.getBoundingClientRect(),i=this.submenuContainer.getBoundingClientRect(),n=getComputedStyle(this.parentData.parent.getContainer()),s=parseFloat(n.paddingTop||"0")||0;window.innerWidth<=t.right+i.width?(this.submenuContainer.style.left="10px",this.submenuContainer.style.top=`${this.container.offsetTop+t.height}px`):(this.submenuContainer.style.left=`${this.container.offsetWidth}px`,this.submenuContainer.style.top=this.container.offsetTop-s+"px"),this.submenuDisposables.push((0,o.addDisposableListener)(this.submenuContainer,o.EventType.KEY_UP,(e=>{new l.StandardKeyboardEvent(e).equals(15)&&(o.EventHelper.stop(e,!0),this.parentData.parent.focus(),this.parentData.submenu&&(this.parentData.submenu.dispose(),this.parentData.submenu=void 0),this.submenuDisposables=(0,c.dispose)(this.submenuDisposables),this.submenuContainer=void 0)}))),this.submenuDisposables.push((0,o.addDisposableListener)(this.submenuContainer,o.EventType.KEY_DOWN,(e=>{new l.StandardKeyboardEvent(e).equals(15)&&o.EventHelper.stop(e,!0)}))),this.submenuDisposables.push(this.parentData.submenu.onDidCancel((()=>{this.parentData.parent.focus(),this.parentData.submenu&&(this.parentData.submenu.dispose(),this.parentData.submenu=void 0),this.submenuDisposables=(0,c.dispose)(this.submenuDisposables),this.submenuContainer=void 0}))),this.parentData.submenu.focus(e),this.mysubmenu=this.parentData.submenu}}applyStyle(){if(super.applyStyle(),!this.menuStyle)return;const e=this.container&&(0,o.hasClass)(this.container,"focused")&&this.menuStyle.selectionForegroundColor?this.menuStyle.selectionForegroundColor:this.menuStyle.foregroundColor;this.submenuIndicator.style.backgroundColor=e?e.toString():null,this.parentData.submenu&&this.parentData.submenu.style(this.menuStyle)}dispose(){super.dispose(),this.hideScheduler.dispose(),this.mysubmenu&&(this.mysubmenu.dispose(),this.mysubmenu=null),this.submenuContainer&&(this.submenuDisposables=(0,c.dispose)(this.submenuDisposables),this.submenuContainer=void 0)}}class b extends u.CETMenuItem{constructor(e,t){super(e,t)}render(e){e&&(this.separatorElement=(0,o.append)(e,(0,o.$)("a.cet-action-label")),this.separatorElement.setAttribute("role","presentation"),(0,o.addClass)(this.separatorElement,"separator"))}style(e){this.separatorElement.style.borderBottomColor=e.separatorColor?`${e.separatorColor}`:null}}t.cleanMnemonic=function(e){const i=t.MENU_MNEMONIC_REGEX,n=i.exec(e);if(!n)return e;const s=!n[1];return e.replace(i,s?"$2$3":"").trim()}},774:function(e,t,i){var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.CETMenuItem=void 0;const s=i(680),o=i(991),r=i(979),a=i(136),l=i(400),u=n(i(242));class c extends a.Disposable{constructor(e,t,i={},n=(()=>{}),s){if(super(),this.item=e,this.menubarOptions=t,this.options=i,this.closeSubMenu=n,this.menuContainer=s,this.item.label&&i.enableMnemonics){let e=this.item.label;if(e){let t=o.MENU_MNEMONIC_REGEX.exec(e);t&&(this.mnemonic=r.KeyCodeUtils.fromString((t[1]?t[1]:t[2]).toLocaleUpperCase()))}}}getContainer(){return this.container}getItem(){return this.item}isEnabled(){return this.item.enabled}isSeparator(){return"separator"===this.item.type}render(e){this.container=e,this._register((0,s.addDisposableListener)(this.container,s.EventType.MOUSE_DOWN,(e=>{this.item.enabled&&0===e.button&&this.container&&(0,s.addClass)(this.container,"active")}))),this._register((0,s.addDisposableListener)(this.container,s.EventType.CLICK,(e=>{this.item.enabled&&this.onClick(e)}))),this._register((0,s.addDisposableListener)(this.container,s.EventType.DBLCLICK,(e=>{s.EventHelper.stop(e,!0)}))),[s.EventType.MOUSE_UP,s.EventType.MOUSE_OUT].forEach((e=>{this._register((0,s.addDisposableListener)(this.container,e,(e=>{s.EventHelper.stop(e),(0,s.removeClass)(this.container,"active")})))})),this.itemElement=(0,s.append)(this.container,(0,s.$)("a.cet-action-menu-item")),this.itemElement.setAttribute("role","menuitem"),this.mnemonic&&this.itemElement.setAttribute("aria-keyshortcuts",`${this.mnemonic}`),this.iconElement=(0,s.append)(this.itemElement,(0,s.$)("span.cet-menu-item-icon")),this.iconElement.setAttribute("role","none"),this.labelElement=(0,s.append)(this.itemElement,(0,s.$)("span.cet-action-label")),this.setAccelerator(),this.updateLabel(),this.updateIcon(),this.updateTooltip(),this.updateEnabled(),this.updateChecked(),this.updateVisibility()}onClick(e){s.EventHelper.stop(e,!0),this.menubarOptions.onMenuItemClick(this.item.commandId),"checkbox"===this.item.type?this.updateChecked():"radio"===this.item.type?this.updateRadioGroup():this.closeSubMenu()}focus(){this.container&&(this.container.focus(),(0,s.addClass)(this.container,"focused")),this.applyStyle()}blur(){this.container&&(this.container.blur(),(0,s.removeClass)(this.container,"focused")),this.applyStyle()}setAccelerator(){var e=null;if(this.item.role)switch(this.item.role.toLocaleLowerCase()){case"undo":e="CtrlOrCmd+Z";break;case"redo":e="CtrlOrCmd+Y";break;case"cut":e="CtrlOrCmd+X";break;case"copy":e="CtrlOrCmd+C";break;case"paste":e="CtrlOrCmd+V";break;case"selectall":e="CtrlOrCmd+A";break;case"minimize":e="CtrlOrCmd+M";break;case"close":e="CtrlOrCmd+W";break;case"reload":e="CtrlOrCmd+R";break;case"forcereload":e="CtrlOrCmd+Shift+R";break;case"toggledevtools":e="CtrlOrCmd+Shift+I";break;case"togglefullscreen":e="F11";break;case"resetzoom":e="CtrlOrCmd+0";break;case"zoomin":e="CtrlOrCmd+Shift+=";break;case"zoomout":e="CtrlOrCmd+-"}this.item.label&&this.item.accelerator&&(e=this.item.accelerator),null!==e&&((0,s.append)(this.itemElement,(0,s.$)("span.keybinding")).textContent=h(e))}updateLabel(){if(this.item.label){let e=this.item.label;if(e){const t=(0,o.cleanMnemonic)(e);this.options.enableMnemonics||(e=t),this.labelElement&&this.labelElement.setAttribute("aria-label",t.replace(/&&/g,"&"));const i=o.MENU_MNEMONIC_REGEX.exec(e);if(i){e=escape(e),o.MENU_ESCAPED_MNEMONIC_REGEX.lastIndex=0;let t=o.MENU_ESCAPED_MNEMONIC_REGEX.exec(e);for(;t&&t[1];)t=o.MENU_ESCAPED_MNEMONIC_REGEX.exec(e);t&&(e=`${e.substr(0,t.index)}<u aria-hidden="true">${t[3]}</u>${e.substr(t.index+t[0].length)}`),e=e.replace(/&amp;&amp;/g,"&amp;"),this.itemElement&&this.itemElement.setAttribute("aria-keyshortcuts",(i[1]?i[1]:i[3]).toLocaleLowerCase())}else e=e.replace(/&&/g,"&")}this.labelElement&&(this.labelElement.innerHTML=e.trim())}}updateIcon(){if(this.item.icon){const e=this.item.icon;e&&(0,s.append)(this.iconElement,(0,s.$)("img")).setAttribute("src",e.toString())}else"checkbox"===this.item.type&&((0,s.addClass)(this.iconElement,"checkbox"),this.iconElement.innerHTML=u.default.check)}updateTooltip(){let e=null;this.item.sublabel?e=this.item.sublabel:!this.item.label&&this.item.label&&this.item.icon&&(e=this.item.label,this.item.accelerator&&(e=h(this.item.accelerator))),e&&(this.itemElement.title=e)}updateEnabled(){this.item.enabled&&"separator"!==this.item.type?((0,s.removeClass)(this.container,"disabled"),this.container.tabIndex=0):(0,s.addClass)(this.container,"disabled")}updateVisibility(){!1===this.item.visible&&this.itemElement&&this.itemElement.remove()}updateChecked(){this.item.checked?((0,s.addClass)(this.itemElement,"checked"),this.itemElement.setAttribute("role","menuitemcheckbox"),this.itemElement.setAttribute("aria-checked","true")):((0,s.removeClass)(this.itemElement,"checked"),this.itemElement.setAttribute("role","menuitem"),this.itemElement.setAttribute("aria-checked","false"))}updateRadioGroup(){void 0===this.radioGroup&&(this.radioGroup=this.getRadioGroup());for(let e=this.radioGroup.start;e<this.radioGroup.end;e++){const t=this.menuContainer[e];t instanceof c&&"radio"===t.item.type&&(t.updateChecked(),t!==this&&(t.radioGroup=this.radioGroup))}}getRadioGroup(){let e=0,t=this.menuContainer.length,i=!1;for(const n in this.menuContainer){const s=this.menuContainer[n];if(s===this)i=!0;else if(s instanceof c&&s.isSeparator()){if(i){t=Number.parseInt(n);break}e=Number.parseInt(n)+1}}return{start:e,end:t}}dispose(){this.itemElement&&((0,s.removeNode)(this.itemElement),this.itemElement=void 0),super.dispose()}getMnemonic(){return this.mnemonic}applyStyle(){if(!this.menuStyle)return;const e=this.container&&(0,s.hasClass)(this.container,"focused"),t=e&&this.menuStyle.selectionForegroundColor?this.menuStyle.selectionForegroundColor:this.menuStyle.foregroundColor,i=e&&this.menuStyle.selectionBackgroundColor?this.menuStyle.selectionBackgroundColor:null;this.itemElement.style.color=t?t.toString():null,this.itemElement.style.backgroundColor=i?i.toString():null}style(e){this.menuStyle=e,this.applyStyle()}}function h(e){var t=e.toString();return(t=l.isMacintosh?t.replace(/(Ctrl)|(Control)/gi,""):t.replace(/(Cmd)|(Command)/gi,"")).replace(/(Or)/gi,"")}t.CETMenuItem=c},797:function(e,t,i){var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.escape=t.Menubar=void 0;const s=i(680),o=i(991),r=i(592),a=i(979),l=i(136),u=i(110),c=i(348),h=i(400),d=i(679),m=n(i(218));class p extends l.Disposable{constructor(e,t,i=(()=>{})){super(),this.container=e,this.options=t,m.default.use(),this.menuItems=[],this.mnemonics=new Map,this.closeSubMenu=i,this._focusState=d.MenubarState.VISIBLE,this._onVisibilityChange=this._register(new u.Emitter),this._onFocusStateChange=this._register(new u.Emitter),this._register(f.getInstance().event(this.onModifierKeyToggled,this)),this._register((0,s.addDisposableListener)(this.container,s.EventType.KEY_DOWN,(e=>{let t=new r.StandardKeyboardEvent(e),i=!0;const n=e.key?a.KeyCodeUtils.fromString(e.key):0;if(t.equals(15))this.focusPrevious();else if(t.equals(17))this.focusNext();else if(t.equals(9)&&this.isFocused&&!this.isOpen)this.setUnfocusedState();else if(!this.isOpen&&!t.ctrlKey&&this.options.enableMnemonics&&this.mnemonicsInUse&&this.mnemonics.has(n)){const e=this.mnemonics.get(n);this.onMenuTriggered(e,!1)}else i=!1;i&&(t.preventDefault(),t.stopPropagation())}))),this._register((0,s.addDisposableListener)(window,s.EventType.MOUSE_DOWN,(()=>{this.isFocused&&this.setUnfocusedState()}))),this._register((0,s.addDisposableListener)(this.container,s.EventType.FOCUS_IN,(e=>{let t=e;t.relatedTarget&&(this.container.contains(t.relatedTarget)||(this.focusToReturn=t.relatedTarget))}))),this._register((0,s.addDisposableListener)(this.container,s.EventType.FOCUS_OUT,(e=>{let t=e;t.relatedTarget&&(this.container.contains(t.relatedTarget)||(this.focusToReturn=void 0,this.setUnfocusedState()))}))),this._register((0,s.addDisposableListener)(window,s.EventType.KEY_DOWN,(e=>{if(!this.options.enableMnemonics||!e.altKey||e.ctrlKey||e.defaultPrevented)return;const t=a.KeyCodeUtils.fromString(e.key);if(!this.mnemonics.has(t))return;this.mnemonicsInUse=!0,this.updateMnemonicVisibility(!0);const i=this.mnemonics.get(t);this.onMenuTriggered(i,!1)}))),this.setUnfocusedState(),this.registerListeners()}registerListeners(){h.isMacintosh||this._register((0,s.addDisposableListener)(window,s.EventType.RESIZE,(()=>{this.blur()})))}setupMenubar(){const e=this.options.menu.items;this._register(this.onFocusStateChange((e=>this._onFocusStateChange.fire(e)))),this._register(this.onVisibilityChange((e=>this._onVisibilityChange.fire(e)))),e.forEach((e=>{const t=this.menuItems.length,i=(0,o.cleanMnemonic)(e.label),n=(0,s.$)("div.cet-menubar-menu-button",{role:"menuitem",tabindex:-1,"aria-label":i,"aria-haspopup":!0});e.enabled||(0,s.addClass)(n,"disabled");const a=(0,s.$)("div.cet-menubar-menu-title",{role:"none","aria-hidden":!0});n.appendChild(a),(0,s.append)(this.container,n);let l=o.MENU_MNEMONIC_REGEX.exec(e.label);if(l){let e=l[1]?l[1]:l[2];this.registerMnemonic(this.menuItems.length,e)}this.updateLabels(a,n,e.label),e.enabled&&(this._register((0,s.addDisposableListener)(n,s.EventType.KEY_UP,(e=>{let i=new r.StandardKeyboardEvent(e),n=!0;!i.equals(18)&&!i.equals(3)||this.isOpen?n=!1:(this.focusedMenu={index:t},this.openedViaKeyboard=!0,this.focusState=d.MenubarState.OPEN),n&&(i.preventDefault(),i.stopPropagation())}))),this._register((0,s.addDisposableListener)(n,s.EventType.MOUSE_DOWN,(e=>{this.isOpen?this.ignoreNextMouseUp=!1:(this.ignoreNextMouseUp=!0,this.onMenuTriggered(t,!0)),e.preventDefault(),e.stopPropagation()}))),this._register((0,s.addDisposableListener)(n,s.EventType.MOUSE_UP,(()=>{this.ignoreNextMouseUp?this.ignoreNextMouseUp=!1:this.isFocused&&this.onMenuTriggered(t,!0)}))),this._register((0,s.addDisposableListener)(n,s.EventType.MOUSE_ENTER,(()=>{this.isOpen&&!this.isCurrentMenu(t)?(this.menuItems[t].buttonElement.focus(),this.cleanupMenu(),this.menuItems[t].submenu&&this.showMenu(t,!1)):this.isFocused&&!this.isOpen&&(this.focusedMenu={index:t},n.focus())}))),this.menuItems.push({menuItem:e,submenu:e.submenu,buttonElement:n,titleElement:a}))}))}onClick(e){const t=this.menuItems[e].menuItem;this.options.onMenuItemClick(t.commandId)}get onVisibilityChange(){return this._onVisibilityChange.event}get onFocusStateChange(){return this._onFocusStateChange.event}dispose(){super.dispose(),this.menuItems.forEach((e=>{(0,s.removeNode)(e.titleElement),(0,s.removeNode)(e.buttonElement)}))}blur(){this.setUnfocusedState()}setStyles(e){this.menuStyle=e}updateLabels(e,t,i){const n=(0,o.cleanMnemonic)(i);if(this.options.enableMnemonics){let t=b(i);o.MENU_ESCAPED_MNEMONIC_REGEX.lastIndex=0;let n=o.MENU_ESCAPED_MNEMONIC_REGEX.exec(t);for(;n&&n[1];)n=o.MENU_ESCAPED_MNEMONIC_REGEX.exec(t);n&&(t=`${t.substr(0,n.index)}<mnemonic aria-hidden="true">${n[3]}</mnemonic>${t.substr(n.index+n[0].length)}`),t=t.replace(/&amp;&amp;/g,"&amp;"),e.innerHTML=t}else e.innerHTML=n.replace(/&&/g,"&");let s=o.MENU_MNEMONIC_REGEX.exec(i);if(s){let e=s[1]?s[1]:s[3];this.options.enableMnemonics?t.setAttribute("aria-keyshortcuts","Alt+"+e.toLocaleLowerCase()):t.removeAttribute("aria-keyshortcuts")}}registerMnemonic(e,t){this.mnemonics.set(a.KeyCodeUtils.fromString(t),e)}hideMenubar(){"none"!==this.container.style.display&&(this.container.style.display="none")}showMenubar(){"flex"!==this.container.style.display&&(this.container.style.display="flex")}get focusState(){return this._focusState}set focusState(e){if(e===this._focusState)return;const t=this.isVisible,i=this.isOpen,n=this.isFocused;switch(this._focusState=e,e){case d.MenubarState.HIDDEN:t&&this.hideMenubar(),i&&this.cleanupMenu(),n&&(this.focusedMenu=void 0,this.focusToReturn&&(this.focusToReturn.focus(),this.focusToReturn=void 0));break;case d.MenubarState.VISIBLE:t||this.showMenubar(),i&&this.cleanupMenu(),n&&(this.focusedMenu&&this.menuItems[this.focusedMenu.index].buttonElement.blur(),this.focusedMenu=void 0,this.focusToReturn&&(this.focusToReturn.focus(),this.focusToReturn=void 0));break;case d.MenubarState.FOCUSED:t||this.showMenubar(),i&&this.cleanupMenu(),this.focusedMenu&&this.menuItems[this.focusedMenu.index].buttonElement.focus();break;case d.MenubarState.OPEN:t||this.showMenubar(),this.focusedMenu&&this.menuItems[this.focusedMenu.index].submenu&&this.showMenu(this.focusedMenu.index,this.openedViaKeyboard)}this._focusState=e}get isVisible(){return this.focusState>=d.MenubarState.VISIBLE}get isFocused(){return this.focusState>=d.MenubarState.FOCUSED}get isOpen(){return this.focusState>=d.MenubarState.OPEN}setUnfocusedState(){this.focusState=d.MenubarState.VISIBLE,this.ignoreNextMouseUp=!1,this.mnemonicsInUse=!1,this.updateMnemonicVisibility(!1)}focusPrevious(){if(!this.focusedMenu)return;let e=(this.focusedMenu.index-1+this.menuItems.length)%this.menuItems.length;e!==this.focusedMenu.index&&(this.isOpen?(this.cleanupMenu(),this.menuItems[e].submenu&&this.showMenu(e)):this.isFocused&&(this.focusedMenu.index=e,this.menuItems[e].buttonElement.focus()))}focusNext(){if(!this.focusedMenu)return;let e=(this.focusedMenu.index+1)%this.menuItems.length;e!==this.focusedMenu.index&&(this.isOpen?(this.cleanupMenu(),this.menuItems[e].submenu&&this.showMenu(e)):this.isFocused&&(this.focusedMenu.index=e,this.menuItems[e].buttonElement.focus()))}updateMnemonicVisibility(e){this.menuItems&&this.menuItems.forEach((t=>{if(t.titleElement.children.length){let i=t.titleElement.children.item(0);i&&(i.style.textDecoration=e?"underline":null)}}))}get mnemonicsInUse(){return this._mnemonicsInUse}set mnemonicsInUse(e){this._mnemonicsInUse=e}onMenuTriggered(e,t){this.isOpen?this.isCurrentMenu(e)?this.setUnfocusedState():(this.cleanupMenu(),this.menuItems[e].submenu?this.showMenu(e,this.openedViaKeyboard):this.menuItems[e].menuItem.enabled&&this.onClick(e)):(this.focusedMenu={index:e},this.openedViaKeyboard=!t,this.menuItems[e].submenu?this.focusState=d.MenubarState.OPEN:this.menuItems[e].menuItem.enabled&&this.onClick(e))}onModifierKeyToggled(e){const t=!e.altKey&&!e.ctrlKey&&!e.shiftKey;this.isFocused&&"alt"===e.lastKeyPressed&&e.altKey&&(this.setUnfocusedState(),this.mnemonicsInUse=!1,this.awaitingAltRelease=!0),t&&"alt"===e.lastKeyPressed&&"alt"===e.lastKeyReleased&&(this.awaitingAltRelease||(this.isFocused?this.isOpen||this.setUnfocusedState():(this.mnemonicsInUse=!0,this.focusedMenu={index:0},this.focusState=d.MenubarState.FOCUSED))),e.altKey||"alt"!==e.lastKeyReleased||(this.awaitingAltRelease=!1),this.options.enableMnemonics&&this.menuItems&&!this.isOpen&&this.updateMnemonicVisibility(!this.awaitingAltRelease&&e.altKey||this.mnemonicsInUse)}isCurrentMenu(e){return!!this.focusedMenu&&this.focusedMenu.index===e}cleanupMenu(){this.focusedMenu&&(this.menuItems[this.focusedMenu.index].buttonElement.focus(),this.focusedMenu.holder&&(this.focusedMenu.holder.parentElement&&(0,s.removeClass)(this.focusedMenu.holder.parentElement,"open"),this.focusedMenu.holder.remove()),this.focusedMenu.widget&&this.focusedMenu.widget.dispose(),this.focusedMenu={index:this.focusedMenu.index})}showMenu(e,t=!0){const i=this.menuItems[e],n=i.buttonElement,r=n.getBoundingClientRect(),a=(0,s.$)("ul.cet-menubar-menu-container");(0,s.addClass)(n,"open"),a.setAttribute("role","menu"),a.tabIndex=0,a.style.top=r.bottom-5+"px",a.style.left=`${r.left}px`,n.appendChild(a),a.style.maxHeight=`${Math.max(10,window.innerHeight-r.top-50)}px`;let l={enableMnemonics:this.mnemonicsInUse&&this.options.enableMnemonics,ariaLabel:n.attributes["aria-label"].value},u=new o.CETMenu(a,this.options,l,this.closeSubMenu);u.createMenu(i.submenu.items),u.style(this.menuStyle),this._register(u.onDidCancel((()=>{this.focusState=d.MenubarState.FOCUSED}))),u.focus(t),this.focusedMenu={index:e,holder:a,widget:u}}}t.Menubar=p;class f extends u.Emitter{constructor(){super(),this._subscriptions=[],this._keyStatus={altKey:!1,shiftKey:!1,ctrlKey:!1},this._subscriptions.push((0,c.domEvent)(document.body,"keydown",!0)((e=>{const t=new r.StandardKeyboardEvent(e);if(e.altKey&&!this._keyStatus.altKey)this._keyStatus.lastKeyPressed="alt";else if(e.ctrlKey&&!this._keyStatus.ctrlKey)this._keyStatus.lastKeyPressed="ctrl";else if(e.shiftKey&&!this._keyStatus.shiftKey)this._keyStatus.lastKeyPressed="shift";else{if(6===t.keyCode)return;this._keyStatus.lastKeyPressed=void 0}this._keyStatus.altKey=e.altKey,this._keyStatus.ctrlKey=e.ctrlKey,this._keyStatus.shiftKey=e.shiftKey,this._keyStatus.lastKeyPressed&&this.fire(this._keyStatus)}))),this._subscriptions.push((0,c.domEvent)(document.body,"keyup",!0)((e=>{!e.altKey&&this._keyStatus.altKey?this._keyStatus.lastKeyReleased="alt":!e.ctrlKey&&this._keyStatus.ctrlKey?this._keyStatus.lastKeyReleased="ctrl":!e.shiftKey&&this._keyStatus.shiftKey?this._keyStatus.lastKeyReleased="shift":this._keyStatus.lastKeyReleased=void 0,this._keyStatus.lastKeyPressed!==this._keyStatus.lastKeyReleased&&(this._keyStatus.lastKeyPressed=void 0),this._keyStatus.altKey=e.altKey,this._keyStatus.ctrlKey=e.ctrlKey,this._keyStatus.shiftKey=e.shiftKey,this._keyStatus.lastKeyReleased&&this.fire(this._keyStatus)}))),this._subscriptions.push((0,c.domEvent)(document.body,"mousedown",!0)((e=>{this._keyStatus.lastKeyPressed=void 0}))),this._subscriptions.push((0,c.domEvent)(window,"blur")((e=>{this._keyStatus.lastKeyPressed=void 0,this._keyStatus.lastKeyReleased=void 0,this._keyStatus.altKey=!1,this._keyStatus.shiftKey=!1,this._keyStatus.shiftKey=!1,this.fire(this._keyStatus)})))}static getInstance(){return f.instance||(f.instance=new f),f.instance}dispose(){super.dispose(),this._subscriptions=(0,l.dispose)(this._subscriptions)}}function b(e){return e.replace(/[<>&]/g,(function(e){switch(e){case"<":return"&lt;";case">":return"&gt;";case"&":return"&amp;";default:return e}}))}t.escape=b},155:function(e,t,i){var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const s=i(400),o=i(469),r=i(680),a=i(797),l=n(i(476)),u=n(i(242)),c=o.Color.fromHex("#222222"),h=o.Color.fromHex("#333333"),d=o.Color.fromHex("#EEEEEE"),m=o.Color.fromHex("#FFFFFF"),p=s.isMacintosh&&parseInt(process.getSystemVersion().split(".")[0])>=11,f="60px",b=p?"28px":"22px",g="30px";t.default=class{constructor(e){if(this.defaultOptions={shadow:!1,minimizable:!0,maximizable:!0,closeable:!0,enableMnemonics:!0,titleHorizontalAlignment:"center",menuPosition:"left"},this.closeMenu=()=>{this.menubar&&this.menubar.blur()},this.options=Object.assign(Object.assign({},this.defaultOptions),e),this.platformIcons=u.default[s.isWindows?"win":s.isLinux?"linux":"mac"],!this.options.isMaximized)throw new Error("isMaximized has not been added. Check: https://github.com/AlexTorresSk/custom-electron-titlebar/wiki/How-to-use for more information.");if(!this.options.onMenuItemClick)throw new Error("onMenuItemClick has not been added. Check: https://github.com/AlexTorresSk/custom-electron-titlebar/wiki/Menu for more information.");l.default.use(),this.createTitlebar(),this.updateStyles()}createTitlebar(){var e;for(document.body.style.margin="0",document.body.style.overflow="hidden",this.container=(0,r.$)("div.cet-container"),this.container.style.overflow=null!==(e=this.options.containerOverflow)&&void 0!==e?e:"auto";document.body.firstChild;)(0,r.append)(this.container,document.body.firstChild);if((0,r.append)(document.body,this.container),this.titlebar=(0,r.$)("div.cet-titlebar"),(0,r.addClass)(this.titlebar,s.isWindows?"cet-windows":s.isLinux?"cet-linux":"cet-mac"),this.options.order&&(0,r.addClass)(this.titlebar,`cet-${this.options.order}`),this.options.shadow&&(0,r.addClass)(this.titlebar,"cet-shadow"),this.dragRegion=(0,r.append)(this.titlebar,(0,r.$)("div.cet-drag-region")),!s.isMacintosh&&this.options.icon){const e=(0,r.append)(this.titlebar,(0,r.$)("div.cet-window-icon"));this.windowIcon=(0,r.append)(e,(0,r.$)("img")),this.updateIcon(this.options.icon)}if(this.menubarContainer=(0,r.append)(this.titlebar,(0,r.$)("div.cet-menubar")),this.menubarContainer.setAttribute("role","menubar"),this.title=(0,r.append)(this.titlebar,(0,r.$)("div.cet-window-title")),s.isMacintosh||(this.title.style.cursor="default"),p&&((0,r.addClass)(this.title,"cet-bigsur"),this.titlebar.style.height=b),s.isMacintosh&&(0,r.addDisposableListener)(this.titlebar,r.EventType.DBLCLICK,(()=>{let e=this.options.isMaximized();this.onDidChangeMaximized(e)})),!s.isMacintosh){if(this.windowControls=(0,r.append)(this.titlebar,(0,r.$)("div.cet-controls-container")),this.options.onMinimize){const e=(0,r.append)(this.windowControls,(0,r.$)("div.cet-icon"));e.title="Minimize",e.innerHTML=this.platformIcons.minimize,this.options.minimizable?(0,r.addDisposableListener)(e,r.EventType.CLICK,(()=>this.options.onMinimize())):(0,r.addClass)(e,"inactive")}if(this.options.onMaximize&&(this.maxRestoreControl=(0,r.append)(this.windowControls,(0,r.$)("div.cet-icon")),this.maxRestoreControl.innerHTML=this.platformIcons.maximize,(0,r.addClass)(this.maxRestoreControl,"cet-max-restore"),this.options.maximizable?(0,r.addDisposableListener)(this.maxRestoreControl,r.EventType.CLICK,(()=>{this.options.onMaximize(),this.onDidChangeMaximized(this.options.isMaximized())})):(0,r.addClass)(this.maxRestoreControl,"inactive")),this.options.onClose){const e=(0,r.append)(this.windowControls,(0,r.$)("div.cet-icon"));e.title="Close",e.innerHTML=this.platformIcons.close,(0,r.addClass)(e,"cet-window-close"),this.options.closeable?(0,r.addDisposableListener)(e,r.EventType.CLICK,(()=>this.options.onClose())):(0,r.addClass)(e,"inactive")}this.resizer={top:(0,r.append)(this.titlebar,(0,r.$)("div.resizer.top")),left:(0,r.append)(this.titlebar,(0,r.$)("div.resizer.left"))},this.onDidChangeMaximized(this.options.isMaximized())}(0,r.prepend)(document.body,this.titlebar),this.options.menu&&this.updateMenu(this.options.menu),this.options.menuPosition&&this.updateMenuPosition(this.options.menuPosition),this.updateTitle(),this.updateTitleAlignment(this.options.titleHorizontalAlignment)}onBlur(){this.isInactive=!0,this.updateStyles()}onFocus(){this.isInactive=!1,this.updateStyles()}onMenubarVisibilityChanged(e){(s.isWindows||s.isLinux)&&e&&((0,r.hide)(this.dragRegion),setTimeout((()=>(0,r.show)(this.dragRegion)),50))}onMenubarFocusChanged(e){(s.isWindows||s.isLinux)&&(e?(0,r.hide)(this.dragRegion):(0,r.show)(this.dragRegion))}onDidChangeMaximized(e){this.maxRestoreControl&&(this.maxRestoreControl.title=e?"Restore Down":"Maximize",this.maxRestoreControl.innerHTML=e?this.platformIcons.restore:this.platformIcons.maximize),this.resizer&&(e?(0,r.hide)(this.resizer.top,this.resizer.left):(0,r.show)(this.resizer.top,this.resizer.left))}updateStyles(){if(this.titlebar){this.isInactive?(0,r.addClass)(this.titlebar,"inactive"):(0,r.removeClass)(this.titlebar,"inactive");const e=this.isInactive?this.options.backgroundColor.lighten(.15):this.options.backgroundColor;let t;this.titlebar.style.backgroundColor=e.toString(),e.isLighter()?((0,r.addClass)(this.titlebar,"light"),t=this.isInactive?c:h):((0,r.removeClass)(this.titlebar,"light"),t=this.isInactive?d:m),this.titlebar.style.color=t.toString();const i=this.options.backgroundColor.darken(.16),n=i.isLighter()?c:d,s=!this.options.itemBackgroundColor||this.options.itemBackgroundColor.equals(i)?new o.Color(new o.RGBA(0,0,0,.14)):this.options.itemBackgroundColor,a=s.isLighter()?h:m;this.menubar&&this.menubar.setStyles({backgroundColor:i,foregroundColor:n,selectionBackgroundColor:s,selectionForegroundColor:a,separatorColor:n})}}onWindowFocus(e){this.titlebar&&(e?((0,r.removeClass)(this.titlebar,"inactive"),this.onFocus()):((0,r.addClass)(this.titlebar,"inactive"),this.closeMenu(),this.onBlur()))}onWindowFullScreen(e){s.isMacintosh||(e?((0,r.hide)(this.titlebar),this.container.style.top="0px"):((0,r.show)(this.titlebar),"bottom"===this.options.menuPosition?this.container.style.top=f:this.container.style.top=s.isMacintosh?b:g))}updateBackground(e){this.options.backgroundColor=e,this.updateStyles()}updateItemBGColor(e){this.options.itemBackgroundColor=e,this.updateStyles()}updateTitle(e){this.title&&(e?document.title=e:e=document.title,this.title.innerText=e)}updateIcon(e){if(null!==e&&""!==e&&this.windowIcon){this.windowIcon.src=e;let t=this.options.iconSize;t<=16&&(t=16),t>=24&&(t=24),this.windowIcon.style.height=`${t}px`}}updateMenu(e){if(!s.isMacintosh){if(!e)return;this.menubar&&this.menubar.dispose(),this.options.menu=e,this.menubar=new a.Menubar(this.menubarContainer,this.options,this.closeMenu),this.menubar.setupMenubar(),this.menubar.onVisibilityChange((e=>this.onMenubarVisibilityChanged(e))),this.menubar.onFocusStateChange((e=>this.onMenubarFocusChanged(e))),this.updateStyles()}}updateMenuPosition(e){s.isMacintosh?(this.titlebar.style.height=e&&"bottom"===e?f:b,this.container.style.top=e&&"bottom"===e?f:b):(this.titlebar.style.height=e&&"bottom"===e?f:g,this.container.style.top=e&&"bottom"===e?f:g),this.titlebar.style.flexWrap=e&&"bottom"===e?"wrap":null,"bottom"===e?(0,r.addClass)(this.menubarContainer,"bottom"):(0,r.removeClass)(this.menubarContainer,"bottom"),this.options.menuPosition=e}updateTitleAlignment(e){this.title&&(("left"===e||"right"===e&&"inverted"===this.options.order)&&(this.title.style.marginLeft="8px",this.title.style.marginRight="auto"),("right"===e||"left"===e&&"inverted"===this.options.order)&&(this.title.style.marginRight="8px",this.title.style.marginLeft="auto"),"center"!==e&&void 0!==e||("bottom"!==this.options.menuPosition&&(0,r.addClass)(this.title,"cet-center"),"first-buttons"!==this.options.order&&(this.windowControls.style.marginLeft="auto"),this.title.style.maxWidth="calc(100vw - 296px)"))}dispose(){for(this.menubar&&this.menubar.dispose(),(0,r.removeNode)(this.titlebar);this.container.firstChild;)(0,r.append)(document.body,this.container.firstChild);(0,r.removeNode)(this.container)}}},242:e=>{e.exports=JSON.parse("{\"check\":\"<svg viewBox='0 0 11 11'><path d='M3.8,9.3c-0.1,0-0.2,0-0.3-0.1L0.2,5.8C0,5.6,0,5.4,0.2,5.2C0.4,5,0.7,5,0.9,5.2l3,3l6.3-6.3c0.2-0.2,0.5-0.2,0.7,0C11,2,11,2.3,10.8,2.5L4.2,9.1C4.1,9.2,4,9.3,3.8,9.3z'/></svg>\",\"arrow\":\"<svg viewBox='0 0 11 11'><path d='M3.1,10.7c-0.1,0-0.2,0-0.3-0.1c-0.2-0.2-0.2-0.5,0-0.7l4.4-4.4L2.8,1.1c-0.2-0.2-0.2-0.5,0-0.7c0.2-0.2,0.5-0.2,0.7,0l4.8,4.8c0.2,0.2,0.2,0.5,0,0.7l-4.8,4.8C3.4,10.7,3.2,10.7,3.1,10.7z'/></svg>\",\"win\":{\"minimize\":\"<svg viewBox='0 0 11 11'><path d='M11,4.9v1.1H0V4.399h11z'/></svg>\",\"maximize\":\"<svg viewBox='0 0 11 11'><path d='M0,1.7v7.6C0,10.2,0.8,11,1.7,11h7.6c0.9,0,1.7-0.8,1.7-1.7V1.7C11,0.8,10.2,0,9.3,0H1.7C0.8,0,0,0.8,0,1.7z M8.8,9.9H2.2c-0.6,0-1.1-0.5-1.1-1.1V2.2c0-0.6,0.5-1.1,1.1-1.1h6.7c0.6,0,1.1,0.5,1.1,1.1v6.7C9.9,9.4,9.4,9.9,8.8,9.9z'/></svg>\",\"restore\":\"<svg viewBox='0 0 11 11'><path d='M7.9,2.2h-7C0.4,2.2,0,2.6,0,3.1v7C0,10.6,0.4,11,0.9,11h7c0.5,0,0.9-0.4,0.9-0.9v-7C8.8,2.6,8.4,2.2,7.9,2.2z M7.7,9.6 c0,0.2-0.1,0.3-0.3,0.3h-6c-0.2,0-0.3-0.1-0.3-0.3v-6c0-0.2,0.1-0.3,0.3-0.3h6c0.2,0,0.3,0.1,0.3,0.3V9.6z'/><path d='M10,0H3.5v1.1h6.1c0.2,0,0.3,0.1,0.3,0.3v6.1H11V1C11,0.4,10.6,0,10,0z'/></svg>\",\"close\":\"<svg viewBox='0 0 11 11'><path d='M6.279 5.5L11 10.221l-.779.779L5.5 6.279.779 11 0 10.221 4.721 5.5 0 .779.779 0 5.5 4.721 10.221 0 11 .779 6.279 5.5z'/></svg>\"}}")}},t={};function i(n){var s=t[n];if(void 0!==s)return s.exports;var o=t[n]={id:n,exports:{}};return e[n].call(o.exports,o,o.exports,i),o.exports}i.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return i.d(t,{a:t}),t},i.d=(e,t)=>{for(var n in t)i.o(t,n)&&!i.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},i.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),i.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var n=i(607);return n.default})()}));
@@ -0,0 +1,95 @@
1
+ import { Menu, MenuItem } from "electron";
2
+ import { Color } from "./common/color";
3
+ export interface TitlebarOptions extends MenubarOptions {
4
+ /**
5
+ * The background color of titlebar.
6
+ */
7
+ backgroundColor?: Color;
8
+ /**
9
+ * The icon shown on the left side of titlebar.
10
+ */
11
+ icon?: string;
12
+ /**
13
+ * The icon size of titlebar. Value between 16 and 24.
14
+ * **The default is 17**
15
+ */
16
+ iconSize?: number;
17
+ /**
18
+ * The shadow color of titlebar.
19
+ */
20
+ shadow?: boolean;
21
+ /**
22
+ * Define if the minimize button is enabled.
23
+ * **The default is true**
24
+ */
25
+ minimizable?: boolean;
26
+ /**
27
+ * Define if the maximize and restore buttons are enabled.
28
+ * **The default is true**
29
+ */
30
+ maximizable?: boolean;
31
+ /**
32
+ * Define if the close button is enabled.
33
+ * **The default is true**
34
+ */
35
+ closeable?: boolean;
36
+ /**
37
+ * When the close button is clicked, the window is hidden instead of closed.
38
+ * **The default is false**
39
+ */
40
+ /**
41
+ * Set the order of the elements on the title bar. You can use `inverted`, `first-buttons` or don't add for.
42
+ * **The default is undefined**
43
+ */
44
+ order?: "inverted" | "first-buttons";
45
+ /**
46
+ * Set horizontal alignment of the window title.
47
+ * **The default value is center**
48
+ */
49
+ titleHorizontalAlignment?: "left" | "center" | "right";
50
+ /**
51
+ * Sets the value for the overflow of the container after title bar.
52
+ * **The default value is auto**
53
+ */
54
+ containerOverflow?: "auto" | "hidden" | "visible";
55
+ onMinimize?: () => void;
56
+ onMaximize?: () => void;
57
+ onClose?: () => void;
58
+ isMaximized?: () => boolean;
59
+ }
60
+ export interface MenubarOptions {
61
+ /**
62
+ * The menu to show in the title bar.
63
+ * You can use `Menu` or not add this option and the menu created in the main process will be taken.
64
+ * **The default menu is undefined**
65
+ */
66
+ menu?: Menu;
67
+ /**
68
+ * The position of menubar on titlebar.
69
+ * **The default is left**
70
+ */
71
+ menuPosition?: "left" | "bottom";
72
+ /**
73
+ * Enable the mnemonics on menubar and menu items
74
+ * **The default is true**
75
+ */
76
+ enableMnemonics?: boolean;
77
+ /**
78
+ * The background color when the mouse is over the item.
79
+ * **The default is undefined**
80
+ */
81
+ itemBackgroundColor?: Color;
82
+ onMenuItemClick?: (commandId: number) => void;
83
+ }
84
+ export interface CustomItem {
85
+ menuItem: MenuItem;
86
+ buttonElement: HTMLElement;
87
+ titleElement: HTMLElement;
88
+ submenu: Menu;
89
+ }
90
+ export declare enum MenubarState {
91
+ HIDDEN = 0,
92
+ VISIBLE = 1,
93
+ FOCUSED = 2,
94
+ OPEN = 3
95
+ }