无关风月
2025-05-08 9486766c806fe1d9e082b2fd02ea1cc558f1b443
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
/*!-----------------------------------------------------------
 * Copyright (c) Microsoft Corporation. All rights reserved.
 * Version: 0.30.1(829382514cb1065f5ebb90f436e1c6103e153953)
 * Released under the MIT license
 * https://github.com/microsoft/vscode/blob/main/LICENSE.txt
 *-----------------------------------------------------------*/(function(){var J=["require","exports","vs/base/common/lifecycle","vs/editor/common/core/range","vs/base/common/event","vs/nls","vs/nls!vs/editor/editor.main","vs/base/browser/dom","vs/base/common/strings","vs/platform/instantiation/common/instantiation","vs/platform/theme/common/themeService","vs/base/common/errors","vs/css!vs/editor/editor.main","vs/editor/common/core/position","vs/base/common/async","vs/platform/contextkey/common/contextkey","vs/editor/browser/editorExtensions","vs/base/common/platform","vs/editor/common/modes","vs/base/common/arrays","vs/base/common/types","vs/platform/theme/common/colorRegistry","vs/editor/common/core/selection","vs/base/common/cancellation","vs/base/common/uri","vs/editor/common/editorContextKeys","vs/platform/commands/common/commands","vs/base/common/codicons","vs/editor/browser/services/codeEditorService","vs/base/common/color","vs/base/browser/fastDomNode","vs/editor/common/config/editorOptions","vs/editor/common/model/textModel","vs/platform/registry/common/platform","vs/base/browser/browser","vs/platform/actions/common/actions","vs/platform/notification/common/notification","vs/editor/common/modes/languageConfigurationRegistry","vs/base/common/objects","vs/editor/common/services/modeService","vs/platform/keybinding/common/keybinding","vs/platform/configuration/common/configuration","vs/editor/common/services/modelService","vs/editor/common/controller/cursorCommon","vs/base/common/resources","vs/base/browser/ui/aria/aria","vs/editor/common/view/editorColorRegistry","vs/base/common/map","vs/base/common/network","vs/editor/common/model","vs/editor/browser/view/viewPart","vs/base/common/actions","vs/base/browser/keyboardEvent","vs/base/browser/ui/widget","vs/base/common/iterator","vs/base/common/keyCodes","vs/base/browser/mouseEvent","vs/platform/opener/common/opener","vs/base/browser/touch","vs/editor/common/core/editOperation","vs/editor/common/viewModel/viewModel","vs/platform/accessibility/common/accessibility","vs/platform/progress/common/progress","vs/editor/browser/config/configuration","vs/base/browser/ui/scrollbar/scrollableElement","vs/editor/common/standaloneStrings","vs/editor/common/services/resolverService","vs/editor/browser/core/editorState","vs/base/common/filters","vs/base/common/htmlContent","vs/platform/instantiation/common/extensions","vs/platform/contextview/browser/contextView","vs/platform/log/common/log","vs/platform/storage/common/storage","vs/base/common/linkedList","vs/base/common/path","vs/base/common/severity","vs/editor/common/modes/nullMode","vs/editor/common/services/editorWorkerService","vs/platform/quickinput/common/quickInput","vs/platform/keybinding/common/keybindingsRegistry","vs/platform/theme/common/iconRegistry","vs/base/common/functional","vs/base/common/stopwatch","vs/editor/common/core/stringBuilder","vs/editor/common/model/bracketPairs/impl/length","vs/base/browser/ui/actionbar/actionbar","vs/editor/common/core/lineTokens","vs/platform/clipboard/common/clipboardService","vs/platform/markers/common/markers","vs/platform/telemetry/common/telemetry","vs/editor/contrib/suggest/suggest","vs/base/common/decorators","vs/base/common/keybindings","vs/base/browser/event","vs/base/common/hash","vs/base/browser/globalMouseMoveMonitor","vs/editor/common/core/characterClassifier","vs/editor/common/commands/replaceCommand","vs/editor/common/model/textModelEvents","vs/editor/browser/view/dynamicViewOverlay","vs/platform/configuration/common/configurationRegistry","vs/platform/quickinput/common/quickAccess","vs/platform/theme/common/theme","vs/base/browser/ui/tree/tree","vs/base/common/buffer","vs/base/common/numbers","vs/base/common/iconLabels","vs/base/browser/ui/iconLabel/iconLabels","vs/base/common/mime","vs/base/browser/ui/sash/sash","vs/base/browser/ui/list/listWidget","vs/editor/common/controller/wordCharacterClassifier","vs/editor/common/editorCommon","vs/editor/browser/editorBrowser","vs/editor/common/model/bracketPairs/impl/smallImmutableSet","vs/editor/common/modes/languageConfiguration","vs/editor/common/view/renderingContext","vs/editor/common/viewLayout/viewLineRenderer","vs/editor/common/viewModel/viewEventHandler","vs/editor/contrib/snippet/snippetParser","vs/base/browser/ui/actionbar/actionViewItems","vs/editor/contrib/gotoSymbol/referencesModel","vs/editor/standalone/common/standaloneThemeService","vs/platform/dialogs/common/dialogs","vs/platform/label/common/label","vs/editor/browser/core/markdownRenderer","vs/editor/common/modes/modesRegistry","vs/platform/theme/common/styler","vs/platform/undoRedo/common/undoRedo","vs/editor/contrib/peekView/peekView","vs/base/common/idGenerator","vs/base/common/range","vs/base/common/scrollable","vs/base/common/diff/diff","vs/base/common/uint","vs/base/browser/ui/codicons/codiconStyles","vs/base/browser/ui/mouseCursor/mouseCursor","vs/css!vs/base/parts/quickinput/browser/media/quickInput","vs/editor/common/config/editorZoom","vs/editor/common/controller/cursorColumns","vs/editor/common/core/token","vs/editor/common/model/bracketPairs/impl/ast","vs/editor/common/model/wordHelper","vs/editor/common/viewLayout/lineDecorations","vs/editor/contrib/codeAction/types","vs/editor/browser/services/bulkEditService","vs/editor/common/modes/languageFeatureRegistry","vs/editor/common/model/tokensStore","vs/editor/common/services/textResourceConfigurationService","vs/platform/instantiation/common/serviceCollection","vs/platform/layout/browser/layoutService","vs/editor/contrib/codeAction/codeAction","vs/editor/contrib/message/messageController","vs/platform/list/browser/listService","vs/editor/common/controller/cursorWordOperations","vs/editor/browser/controller/coreCommands","vs/editor/browser/widget/codeEditorWidget","vs/editor/browser/widget/embeddedCodeEditorWidget","vs/editor/contrib/find/findModel","vs/base/common/lazy","vs/base/browser/canIUse","vs/base/common/extpath","vs/base/browser/ui/tree/indexTreeModel","vs/base/browser/ui/tree/objectTreeModel","vs/base/browser/formattedTextRenderer","vs/base/browser/ui/highlightedlabel/highlightedLabel","vs/base/browser/ui/scrollbar/scrollbarArrow","vs/base/common/labels","vs/base/browser/dnd","vs/base/browser/ui/checkbox/checkbox","vs/base/browser/ui/list/listView","vs/editor/browser/editorDom","vs/editor/common/config/fontInfo","vs/editor/browser/controller/textAreaInput","vs/editor/browser/view/viewLayer","vs/editor/common/model/textModelSearch","vs/editor/common/modes/supports","vs/editor/common/modes/supports/richEditBrackets","vs/editor/common/standalone/standaloneEnums","vs/editor/common/view/viewEvents","vs/editor/browser/viewParts/glyphMargin/glyphMargin","vs/editor/common/viewModel/viewModelEventDispatcher","vs/editor/contrib/folding/foldingRanges","vs/editor/contrib/inlineCompletions/ghostText","vs/editor/contrib/inlineCompletions/inlineCompletionToGhostText","vs/base/browser/ui/iconLabel/iconLabel","vs/base/browser/ui/tree/abstractTree","vs/base/browser/ui/inputbox/inputBox","vs/base/common/keybindingLabels","vs/editor/common/services/markersDecorationService","vs/editor/contrib/parameterHints/provideSignatureHelp","vs/platform/jsonschemas/common/jsonContributionRegistry","vs/editor/common/config/commonEditorConfig","vs/platform/actions/browser/menuEntryActionViewItem","vs/editor/common/commands/shiftCommand","vs/editor/browser/controller/mouseTarget","vs/editor/common/controller/cursorMoveOperations","vs/editor/common/controller/cursorDeleteOperations","vs/editor/common/controller/cursorTypeOperations","vs/editor/contrib/inlineCompletions/inlineCompletionsModel","vs/platform/workspace/common/workspace","vs/editor/standalone/browser/simpleServices","vs/editor/contrib/snippet/snippetController2","vs/base/browser/iframe","vs/base/browser/ui/scrollbar/scrollbarState","vs/base/common/assert","vs/base/common/collections","vs/base/browser/ui/tree/treeIcons","vs/base/common/glob","vs/base/common/marshalling","vs/base/browser/ui/scrollbar/abstractScrollbar","vs/base/common/worker/simpleWorker","vs/base/parts/quickinput/common/quickInput","vs/css!vs/base/browser/ui/actionbar/actionbar","vs/base/browser/ui/contextview/contextview","vs/base/browser/ui/countBadge/countBadge","vs/css!vs/base/browser/ui/dropdown/dropdown","vs/css!vs/base/browser/ui/findinput/findInput","vs/css!vs/base/browser/ui/list/list","vs/base/browser/ui/hover/hoverWidget","vs/base/browser/ui/splitview/splitview","vs/base/parts/quickinput/browser/quickInputUtils","vs/editor/browser/config/elementSizeObserver","vs/editor/browser/viewParts/minimap/minimapCharSheet","vs/editor/browser/controller/textAreaState","vs/editor/browser/widget/diffNavigator","vs/editor/common/core/rgba","vs/editor/common/editorAction","vs/editor/common/model/bracketPairs/impl/beforeEditPositionMapper","vs/editor/common/model/textChange","vs/editor/common/model/pieceTreeTextBuffer/pieceTreeBase","vs/editor/common/standalone/standaloneBase","vs/editor/common/view/overviewZoneManager","vs/editor/common/viewModel/prefixSumComputer","vs/editor/browser/viewParts/margin/margin","vs/editor/contrib/folding/syntaxRangeProvider","vs/editor/contrib/format/formattingEdit","vs/editor/contrib/gotoSymbol/link/clickLinkGesture","vs/editor/contrib/hover/hoverOperation","vs/editor/contrib/hover/hoverTypes","vs/editor/contrib/indentation/indentUtils","vs/editor/contrib/inlineCompletions/consts","vs/editor/contrib/inlineCompletions/utils","vs/editor/contrib/smartSelect/bracketSelections","vs/editor/contrib/suggest/resizable","vs/editor/standalone/common/monarch/monarchCommon","vs/base/browser/ui/findinput/findInputCheckboxes","vs/base/browser/ui/tree/objectTree","vs/editor/common/model/editStack","vs/platform/files/common/files","vs/platform/instantiation/common/descriptors","vs/editor/common/model/bracketPairs/impl/tokenizer","vs/editor/common/model/pieceTreeTextBuffer/pieceTreeTextBuffer","vs/editor/common/modes/textToHtmlTokenizer","vs/editor/common/viewModel/minimapTokensColorTracker","vs/editor/contrib/documentSymbols/outlineModel","vs/editor/standalone/common/monarch/monarchLexer","vs/editor/common/services/getSemanticTokens","vs/editor/contrib/codelens/codelens","vs/editor/contrib/colorPicker/color","vs/platform/contextkey/common/contextkeys","vs/platform/keybinding/common/keybindingResolver","vs/platform/keybinding/common/resolvedKeybindingItem","vs/editor/contrib/suggest/suggestWidgetDetails","vs/editor/common/services/editorWorkerServiceImpl","vs/editor/contrib/comment/blockCommentCommand","vs/editor/browser/viewParts/lines/viewLine","vs/editor/common/services/semanticTokensProviderStyling","vs/editor/browser/viewParts/lineNumbers/lineNumbers","vs/editor/contrib/quickAccess/editorNavigationQuickAccess","vs/editor/contrib/symbolIcons/symbolIcons","vs/editor/standalone/browser/standaloneCodeServiceImpl","vs/editor/contrib/format/format","vs/editor/contrib/gotoSymbol/goToSymbol","vs/editor/contrib/toggleTabFocusMode/toggleTabFocusMode","vs/editor/common/controller/cursorAtomicMoveOperations","vs/editor/browser/view/viewUserInputEvents","vs/editor/common/controller/cursorMoveCommands","vs/editor/common/controller/cursor","vs/editor/common/services/modelServiceImpl","vs/editor/browser/widget/diffEditorWidget","vs/editor/contrib/codeAction/codeActionCommands","vs/editor/contrib/colorPicker/colorDetector","vs/editor/contrib/find/findController","vs/editor/contrib/wordOperations/wordOperations","vs/editor/contrib/gotoError/gotoError","vs/editor/contrib/gotoSymbol/peek/referencesController","vs/editor/contrib/gotoSymbol/goToCommands","vs/editor/contrib/gotoSymbol/link/goToDefinitionAtPosition","vs/editor/standalone/browser/standaloneServices","vs/editor/contrib/snippet/snippetSession","vs/editor/contrib/suggest/suggestController","vs/editor/contrib/inlineCompletions/ghostTextController","vs/editor/contrib/hover/hover","vs/base/browser/ui/list/list","vs/base/browser/ui/list/splice","vs/base/common/diff/diffChange","vs/base/common/navigator","vs/base/common/history","vs/base/common/process","vs/base/browser/ui/list/rangeMap","vs/base/browser/ui/scrollbar/scrollbarVisibilityController","vs/base/common/comparers","vs/base/browser/ui/tree/compressedObjectTreeModel","vs/base/common/fuzzyScorer","vs/base/common/search","vs/base/browser/ui/list/rowCache","vs/base/browser/ui/scrollbar/horizontalScrollbar","vs/base/browser/ui/scrollbar/verticalScrollbar","vs/base/browser/markdownRenderer","vs/base/common/uuid","vs/base/parts/storage/common/storage","vs/base/worker/defaultWorkerFactory","vs/css!vs/base/browser/ui/aria/aria","vs/css!vs/base/browser/ui/button/button","vs/base/browser/ui/button/button","vs/css!vs/base/browser/ui/checkbox/checkbox","vs/css!vs/base/browser/ui/codicons/codicon/codicon","vs/css!vs/base/browser/ui/codicons/codicon/codicon-modifiers","vs/css!vs/base/browser/ui/contextview/contextview","vs/css!vs/base/browser/ui/countBadge/countBadge","vs/css!vs/base/browser/ui/hover/hover","vs/css!vs/base/browser/ui/iconLabel/iconlabel","vs/css!vs/base/browser/ui/inputbox/inputBox","vs/css!vs/base/browser/ui/keybindingLabel/keybindingLabel","vs/css!vs/base/browser/ui/mouseCursor/mouseCursor","vs/css!vs/base/browser/ui/progressbar/progressbar","vs/base/browser/ui/progressbar/progressbar","vs/css!vs/base/browser/ui/sash/sash","vs/css!vs/base/browser/ui/scrollbar/media/scrollbars","vs/base/browser/ui/list/listPaging","vs/css!vs/base/browser/ui/splitview/splitview","vs/css!vs/base/browser/ui/table/table","vs/base/browser/ui/table/tableWidget","vs/css!vs/base/browser/ui/tree/media/tree","vs/css!vs/editor/browser/controller/textAreaHandler","vs/css!vs/editor/browser/viewParts/currentLineHighlight/currentLineHighlight","vs/css!vs/editor/browser/viewParts/decorations/decorations","vs/css!vs/editor/browser/viewParts/glyphMargin/glyphMargin","vs/css!vs/editor/browser/viewParts/indentGuides/indentGuides","vs/css!vs/editor/browser/viewParts/lineNumbers/lineNumbers","vs/css!vs/editor/browser/viewParts/lines/viewLines","vs/css!vs/editor/browser/viewParts/linesDecorations/linesDecorations","vs/css!vs/editor/browser/viewParts/marginDecorations/marginDecorations","vs/css!vs/editor/browser/viewParts/minimap/minimap","vs/css!vs/editor/browser/viewParts/overlayWidgets/overlayWidgets","vs/css!vs/editor/browser/viewParts/rulers/rulers","vs/css!vs/editor/browser/viewParts/scrollDecoration/scrollDecoration","vs/css!vs/editor/browser/viewParts/selections/selections","vs/css!vs/editor/browser/viewParts/viewCursors/viewCursors","vs/css!vs/editor/browser/widget/media/diffEditor","vs/css!vs/editor/browser/widget/media/diffReview","vs/css!vs/editor/browser/widget/media/editor","vs/css!vs/editor/contrib/anchorSelect/anchorSelect","vs/css!vs/editor/contrib/bracketMatching/bracketMatching","vs/css!vs/editor/contrib/codeAction/lightBulbWidget","vs/css!vs/editor/contrib/codelens/codelensWidget","vs/css!vs/editor/contrib/colorPicker/colorPicker","vs/css!vs/editor/contrib/dnd/dnd","vs/css!vs/editor/contrib/find/findWidget","vs/css!vs/editor/contrib/folding/folding","vs/css!vs/editor/contrib/gotoError/media/gotoErrorWidget","vs/css!vs/editor/contrib/gotoSymbol/link/goToDefinitionAtPosition","vs/css!vs/editor/contrib/gotoSymbol/peek/referencesWidget","vs/css!vs/editor/contrib/inlineCompletions/ghostText","vs/css!vs/editor/contrib/links/links","vs/css!vs/editor/contrib/message/messageController","vs/css!vs/editor/contrib/parameterHints/parameterHints","vs/css!vs/editor/contrib/peekView/media/peekViewWidget","vs/css!vs/editor/contrib/rename/renameInputField","vs/css!vs/editor/contrib/snippet/snippetSession","vs/css!vs/editor/contrib/suggest/media/suggest","vs/css!vs/editor/contrib/zoneWidget/zoneWidget","vs/css!vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp","vs/css!vs/editor/standalone/browser/iPadShowKeyboard/iPadShowKeyboard","vs/css!vs/editor/standalone/browser/inspectTokens/inspectTokens","vs/css!vs/editor/standalone/browser/quickInput/standaloneQuickInput","vs/css!vs/editor/standalone/browser/standalone-tokens","vs/css!vs/platform/actions/browser/menuEntryActionViewItem","vs/css!vs/platform/contextview/browser/contextMenuHandler","vs/editor/browser/services/abstractCodeEditorService","vs/editor/browser/viewParts/minimap/minimapCharRenderer","vs/editor/browser/viewParts/minimap/minimapPreBaked","vs/editor/browser/viewParts/minimap/minimapCharRendererFactory","vs/editor/common/commands/trimTrailingWhitespaceCommand","vs/editor/common/commands/surroundSelectionCommand","vs/editor/common/diff/diffComputer","vs/editor/common/model/bracketPairs/bracketPairs","vs/editor/common/model/bracketPairs/impl/nodeReader","vs/editor/common/model/bracketPairs/impl/concat23Trees","vs/editor/common/model/bracketPairs/impl/parser","vs/editor/common/model/indentationGuesser","vs/editor/common/model/intervalTree","vs/editor/common/model/pieceTreeTextBuffer/rbTreeBase","vs/editor/common/modes/languageSelector","vs/editor/common/modes/linkComputer","vs/editor/common/modes/supports/characterPair","vs/editor/common/modes/supports/indentRules","vs/editor/common/modes/supports/inplaceReplaceSupport","vs/editor/common/modes/supports/onEnter","vs/editor/common/modes/supports/electricCharacter","vs/editor/common/modes/supports/tokenization","vs/editor/common/modes/tokenizationRegistry","vs/editor/common/services/semanticTokensDto","vs/editor/browser/viewParts/lines/rangeUtil","vs/editor/common/view/viewContext","vs/editor/common/viewLayout/linesLayout","vs/editor/common/viewLayout/viewLinesViewportData","vs/editor/common/model/mirrorTextModel","vs/editor/common/services/editorSimpleWorker","vs/editor/browser/viewParts/contentWidgets/contentWidgets","vs/editor/browser/viewParts/decorations/decorations","vs/editor/browser/viewParts/linesDecorations/linesDecorations","vs/editor/browser/viewParts/marginDecorations/marginDecorations","vs/editor/browser/viewParts/overlayWidgets/overlayWidgets","vs/editor/browser/viewParts/overviewRuler/overviewRuler","vs/editor/browser/viewParts/viewZones/viewZones","vs/editor/common/viewModel/monospaceLineBreaksComputer","vs/editor/common/viewLayout/viewLayout","vs/editor/contrib/caretOperations/moveCaretCommand","vs/editor/contrib/colorPicker/colorPickerModel","vs/editor/contrib/dnd/dragAndDropCommand","vs/editor/contrib/find/replaceAllCommand","vs/editor/contrib/find/replacePattern","vs/editor/contrib/folding/foldingModel","vs/editor/contrib/folding/hiddenRangeModel","vs/editor/contrib/folding/intializingRangeProvider","vs/editor/contrib/inPlaceReplace/inPlaceReplaceCommand","vs/editor/contrib/linesOperations/copyLinesCommand","vs/editor/contrib/linesOperations/sortLinesCommand","vs/editor/contrib/smartSelect/wordSelections","vs/editor/contrib/suggest/completionModel","vs/editor/contrib/suggest/suggestCommitCharacters","vs/editor/contrib/suggest/suggestOvertypingCapturer","vs/editor/contrib/suggest/wordDistance","vs/editor/standalone/common/monarch/monarchCompile","vs/nls!vs/base/browser/ui/actionbar/actionViewItems","vs/nls!vs/base/browser/ui/findinput/findInput","vs/nls!vs/base/browser/ui/findinput/findInputCheckboxes","vs/nls!vs/base/browser/ui/findinput/replaceInput","vs/nls!vs/base/browser/ui/iconLabel/iconLabelHover","vs/base/browser/ui/iconLabel/iconLabelHover","vs/nls!vs/base/browser/ui/inputbox/inputBox","vs/nls!vs/base/browser/ui/keybindingLabel/keybindingLabel","vs/nls!vs/base/browser/ui/menu/menu","vs/nls!vs/base/browser/ui/tree/abstractTree","vs/base/browser/ui/tree/dataTree","vs/base/browser/ui/tree/asyncDataTree","vs/nls!vs/base/common/actions","vs/base/browser/ui/dropdown/dropdown","vs/base/browser/ui/dropdown/dropdownActionViewItem","vs/base/browser/ui/findinput/findInput","vs/base/browser/ui/findinput/replaceInput","vs/base/browser/ui/menu/menu","vs/base/parts/quickinput/browser/quickInputBox","vs/nls!vs/base/common/errorMessage","vs/base/common/errorMessage","vs/nls!vs/base/common/keybindingLabels","vs/base/browser/ui/keybindingLabel/keybindingLabel","vs/nls!vs/base/parts/quickinput/browser/quickInput","vs/nls!vs/base/parts/quickinput/browser/quickInputList","vs/base/parts/quickinput/browser/quickInputList","vs/base/parts/quickinput/browser/quickInput","vs/nls!vs/editor/browser/controller/coreCommands","vs/nls!vs/editor/browser/controller/textAreaHandler","vs/nls!vs/editor/browser/core/keybindingCancellation","vs/nls!vs/editor/browser/editorExtensions","vs/nls!vs/editor/browser/widget/codeEditorWidget","vs/nls!vs/editor/browser/widget/diffEditorWidget","vs/nls!vs/editor/browser/widget/diffReview","vs/nls!vs/editor/browser/widget/inlineDiffMargin","vs/editor/browser/widget/inlineDiffMargin","vs/nls!vs/editor/common/config/commonEditorConfig","vs/nls!vs/editor/common/config/editorOptions","vs/editor/browser/config/charWidthReader","vs/editor/common/viewModel/viewModelDecorations","vs/nls!vs/editor/common/editorContextKeys","vs/nls!vs/editor/common/model/editStack","vs/nls!vs/editor/common/modes/modesRegistry","vs/nls!vs/editor/common/standaloneStrings","vs/nls!vs/editor/common/view/editorColorRegistry","vs/nls!vs/editor/contrib/anchorSelect/anchorSelect","vs/nls!vs/editor/contrib/bracketMatching/bracketMatching","vs/nls!vs/editor/contrib/caretOperations/caretOperations","vs/nls!vs/editor/contrib/caretOperations/transpose","vs/nls!vs/editor/contrib/clipboard/clipboard","vs/nls!vs/editor/contrib/codeAction/codeActionCommands","vs/nls!vs/editor/contrib/codeAction/lightBulbWidget","vs/nls!vs/editor/contrib/codelens/codelensController","vs/nls!vs/editor/contrib/colorPicker/colorPickerWidget","vs/nls!vs/editor/contrib/comment/comment","vs/nls!vs/editor/contrib/contextmenu/contextmenu","vs/nls!vs/editor/contrib/cursorUndo/cursorUndo","vs/nls!vs/editor/contrib/find/findController","vs/nls!vs/editor/contrib/find/findWidget","vs/nls!vs/editor/contrib/folding/folding","vs/nls!vs/editor/contrib/folding/foldingDecorations","vs/nls!vs/editor/contrib/fontZoom/fontZoom","vs/nls!vs/editor/contrib/format/format","vs/nls!vs/editor/contrib/format/formatActions","vs/nls!vs/editor/contrib/gotoError/gotoError","vs/nls!vs/editor/contrib/gotoError/gotoErrorWidget","vs/nls!vs/editor/contrib/gotoSymbol/goToCommands","vs/nls!vs/editor/contrib/gotoSymbol/link/goToDefinitionAtPosition","vs/nls!vs/editor/contrib/gotoSymbol/peek/referencesController","vs/nls!vs/editor/contrib/gotoSymbol/peek/referencesTree","vs/nls!vs/editor/contrib/gotoSymbol/peek/referencesWidget","vs/nls!vs/editor/contrib/gotoSymbol/referencesModel","vs/nls!vs/editor/contrib/gotoSymbol/symbolNavigation","vs/nls!vs/editor/contrib/hover/hover","vs/nls!vs/editor/contrib/hover/markdownHoverParticipant","vs/nls!vs/editor/contrib/hover/markerHoverParticipant","vs/nls!vs/editor/contrib/inPlaceReplace/inPlaceReplace","vs/nls!vs/editor/contrib/indentation/indentation","vs/nls!vs/editor/contrib/inlineCompletions/ghostTextController","vs/nls!vs/editor/contrib/inlineCompletions/inlineCompletionsHoverParticipant","vs/nls!vs/editor/contrib/linesOperations/linesOperations","vs/nls!vs/editor/contrib/linkedEditing/linkedEditing","vs/nls!vs/editor/contrib/links/links","vs/nls!vs/editor/contrib/message/messageController","vs/nls!vs/editor/contrib/multicursor/multicursor","vs/nls!vs/editor/contrib/parameterHints/parameterHints","vs/nls!vs/editor/contrib/parameterHints/parameterHintsWidget","vs/nls!vs/editor/contrib/peekView/peekView","vs/nls!vs/editor/contrib/quickAccess/gotoLineQuickAccess","vs/nls!vs/editor/contrib/quickAccess/gotoSymbolQuickAccess","vs/nls!vs/editor/contrib/rename/rename","vs/nls!vs/editor/contrib/rename/renameInputField","vs/nls!vs/editor/contrib/smartSelect/smartSelect","vs/nls!vs/editor/contrib/snippet/snippetController2","vs/nls!vs/editor/contrib/snippet/snippetVariables","vs/nls!vs/editor/contrib/suggest/suggest","vs/nls!vs/editor/contrib/suggest/suggestController","vs/nls!vs/editor/contrib/suggest/suggestWidget","vs/nls!vs/editor/contrib/suggest/suggestWidgetDetails","vs/nls!vs/editor/contrib/suggest/suggestWidgetRenderer","vs/nls!vs/editor/contrib/suggest/suggestWidgetStatus","vs/nls!vs/editor/contrib/symbolIcons/symbolIcons","vs/nls!vs/editor/contrib/toggleTabFocusMode/toggleTabFocusMode","vs/nls!vs/editor/contrib/tokenization/tokenization","vs/nls!vs/editor/contrib/unusualLineTerminators/unusualLineTerminators","vs/nls!vs/editor/contrib/wordHighlighter/wordHighlighter","vs/nls!vs/editor/contrib/wordOperations/wordOperations","vs/nls!vs/platform/actions/browser/menuEntryActionViewItem","vs/nls!vs/platform/configuration/common/configurationRegistry","vs/nls!vs/platform/contextkey/browser/contextKeyService","vs/nls!vs/platform/contextkey/common/contextkeys","vs/nls!vs/platform/keybinding/common/abstractKeybindingService","vs/nls!vs/platform/list/browser/listService","vs/nls!vs/platform/markers/common/markers","vs/nls!vs/platform/quickinput/browser/commandsQuickAccess","vs/nls!vs/platform/quickinput/browser/helpQuickAccess","vs/nls!vs/platform/theme/common/colorRegistry","vs/nls!vs/platform/theme/common/iconRegistry","vs/nls!vs/platform/undoRedo/common/undoRedoService","vs/platform/browser/historyWidgetKeybindingHint","vs/platform/clipboard/browser/clipboardService","vs/platform/editor/common/editor","vs/platform/extensions/common/extensions","vs/platform/instantiation/common/graph","vs/editor/common/model/bracketPairs/impl/brackets","vs/editor/common/model/bracketPairs/bracketPairsImpl","vs/editor/common/model/pieceTreeTextBuffer/pieceTreeTextBufferBuilder","vs/editor/common/model/textModelTokens","vs/editor/standalone/browser/colorizer","vs/editor/contrib/documentSymbols/documentSymbols","vs/editor/contrib/links/getLinks","vs/editor/contrib/parameterHints/parameterHintsModel","vs/editor/contrib/suggest/suggestAlternatives","vs/editor/contrib/suggest/wordContextKey","vs/platform/instantiation/common/instantiationService","vs/platform/keybinding/common/abstractKeybindingService","vs/platform/keybinding/common/baseResolvedKeybinding","vs/platform/keybinding/common/usLayoutResolvedKeybinding","vs/platform/contextview/browser/contextViewService","vs/editor/contrib/gotoError/markerNavigationService","vs/platform/markers/common/markerService","vs/editor/browser/services/openerService","vs/platform/quickinput/browser/pickerQuickAccess","vs/editor/browser/view/domLineBreaksComputer","vs/editor/browser/view/viewOverlays","vs/editor/browser/viewParts/viewCursors/viewCursor","vs/editor/contrib/hover/modesGlyphHover","vs/editor/common/services/getIconClasses","vs/editor/common/services/languagesRegistry","vs/editor/common/services/modeServiceImpl","vs/editor/common/services/webWorker","vs/editor/contrib/comment/lineCommentCommand","vs/platform/accessibility/browser/accessibilityService","vs/platform/configuration/common/configurationModels","vs/platform/contextkey/browser/contextKeyService","vs/platform/quickinput/browser/helpQuickAccess","vs/editor/standalone/browser/quickAccess/standaloneHelpQuickAccess","vs/platform/quickinput/browser/quickAccess","vs/editor/contrib/codelens/codeLensCache","vs/editor/contrib/suggest/suggestMemory","vs/platform/quickinput/browser/commandsQuickAccess","vs/editor/contrib/quickAccess/commandsQuickAccess","vs/platform/contextview/browser/contextMenuHandler","vs/editor/browser/viewParts/lines/viewLines","vs/editor/browser/services/codeEditorServiceImpl","vs/editor/browser/viewParts/editorScrollbar/editorScrollbar","vs/editor/browser/viewParts/minimap/minimap","vs/editor/browser/viewParts/scrollDecoration/scrollDecoration","vs/editor/browser/viewParts/selections/selections","vs/editor/browser/viewParts/currentLineHighlight/currentLineHighlight","vs/editor/browser/controller/textAreaHandler","vs/editor/browser/viewParts/overviewRuler/decorationsOverviewRuler","vs/editor/browser/viewParts/rulers/rulers","vs/editor/browser/viewParts/viewCursors/viewCursors","vs/editor/common/model/bracketPairs/colorizedBracketPairsDecorationProvider","vs/editor/common/services/markerDecorationsServiceImpl","vs/editor/contrib/colorPicker/colorPickerWidget","vs/editor/contrib/gotoSymbol/peek/referencesTree","vs/editor/contrib/quickAccess/gotoLineQuickAccess","vs/editor/contrib/quickAccess/gotoSymbolQuickAccess","vs/editor/contrib/rename/renameInputField","vs/editor/standalone/common/themes","vs/editor/browser/core/keybindingCancellation","vs/editor/browser/services/markerDecorations","vs/editor/contrib/anchorSelect/anchorSelect","vs/editor/contrib/caretOperations/caretOperations","vs/editor/contrib/clipboard/clipboard","vs/editor/contrib/codeAction/codeActionMenu","vs/editor/contrib/codeAction/codeActionModel","vs/editor/contrib/comment/comment","vs/editor/contrib/contextmenu/contextmenu","vs/editor/contrib/cursorUndo/cursorUndo","vs/editor/contrib/fontZoom/fontZoom","vs/editor/contrib/format/formatActions","vs/editor/contrib/gotoSymbol/symbolNavigation","vs/editor/contrib/hover/getHover","vs/editor/contrib/hover/markdownHoverParticipant","vs/editor/contrib/inlayHints/inlayHintsController","vs/editor/contrib/rename/rename","vs/editor/contrib/smartSelect/smartSelect","vs/editor/contrib/tokenization/tokenization","vs/editor/contrib/unusualLineTerminators/unusualLineTerminators","vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp","vs/editor/standalone/browser/iPadShowKeyboard/iPadShowKeyboard","vs/editor/standalone/browser/inspectTokens/inspectTokens","vs/editor/standalone/browser/quickAccess/standaloneCommandsQuickAccess","vs/editor/standalone/browser/quickAccess/standaloneGotoLineQuickAccess","vs/editor/standalone/browser/quickAccess/standaloneGotoSymbolQuickAccess","vs/editor/standalone/browser/toggleHighContrast/toggleHighContrast","vs/editor/contrib/suggest/suggestWidgetStatus","vs/platform/actions/common/menuService","vs/platform/browser/contextScopedHistoryWidget","vs/platform/contextview/browser/contextMenuService","vs/platform/quickinput/browser/quickInput","vs/editor/standalone/browser/quickInput/standaloneQuickInputServiceImpl","vs/platform/severityIcon/common/severityIcon","vs/editor/browser/widget/diffReview","vs/editor/contrib/parameterHints/parameterHintsWidget","vs/editor/contrib/parameterHints/parameterHints","vs/editor/contrib/suggest/suggestWidgetRenderer","vs/platform/theme/browser/iconsStyleSheet","vs/editor/standalone/browser/standaloneThemeServiceImpl","vs/editor/browser/viewParts/indentGuides/indentGuides","vs/editor/browser/controller/mouseHandler","vs/editor/browser/controller/pointerHandler","vs/editor/common/controller/cursorColumnSelection","vs/editor/browser/view/viewController","vs/editor/browser/view/viewImpl","vs/editor/common/controller/oneCursor","vs/editor/common/controller/cursorCollection","vs/editor/common/viewModel/splitLinesCollection","vs/editor/common/viewModel/viewModelImpl","vs/editor/contrib/bracketMatching/bracketMatching","vs/editor/contrib/caretOperations/transpose","vs/editor/contrib/codeAction/lightBulbWidget","vs/editor/contrib/codeAction/codeActionUi","vs/editor/contrib/codeAction/codeActionContributions","vs/editor/contrib/codelens/codelensWidget","vs/editor/contrib/codelens/codelensController","vs/editor/contrib/dnd/dnd","vs/editor/contrib/find/findDecorations","vs/editor/contrib/find/findOptionsWidget","vs/editor/contrib/find/findState","vs/editor/contrib/find/findWidget","vs/editor/contrib/folding/foldingDecorations","vs/editor/contrib/folding/indentRangeProvider","vs/editor/contrib/folding/folding","vs/editor/contrib/hover/colorHoverParticipant","vs/editor/contrib/inPlaceReplace/inPlaceReplace","vs/editor/contrib/indentation/indentation","vs/editor/contrib/inlineCompletions/ghostTextWidget","vs/editor/contrib/linesOperations/moveLinesCommand","vs/editor/contrib/linesOperations/linesOperations","vs/editor/contrib/linkedEditing/linkedEditing","vs/editor/contrib/links/links","vs/editor/contrib/multicursor/multicursor","vs/editor/contrib/suggest/suggestWidget","vs/editor/contrib/viewportSemanticTokens/viewportSemanticTokens","vs/editor/contrib/wordHighlighter/wordHighlighter","vs/editor/contrib/wordPartOperations/wordPartOperations","vs/editor/contrib/zoneWidget/zoneWidget","vs/editor/contrib/gotoError/gotoErrorWidget","vs/editor/contrib/gotoSymbol/peek/referencesWidget","vs/editor/contrib/hover/markerHoverParticipant","vs/editor/standalone/browser/referenceSearch/standaloneReferenceSearch","vs/platform/undoRedo/common/undoRedoService","vs/editor/standalone/browser/standaloneCodeEditor","vs/editor/standalone/browser/standaloneEditor","vs/editor/standalone/browser/standaloneLanguages","vs/editor/editor.api","vs/platform/workspaces/common/workspaces","vs/editor/contrib/snippet/snippetVariables","vs/editor/contrib/suggest/suggestModel","vs/editor/contrib/inlineCompletions/suggestWidgetInlineCompletionProvider","vs/editor/contrib/inlineCompletions/suggestWidgetPreviewModel","vs/editor/contrib/inlineCompletions/ghostTextModel","vs/editor/contrib/inlineCompletions/inlineCompletionsHoverParticipant","vs/editor/contrib/hover/modesContentHover","vs/editor/contrib/colorPicker/colorContributions","vs/editor/editor.all","vs/base/browser/dompurify/dompurify","vs/base/common/marked/marked","vs/editor/edcore.main"],ee=function(j){for(var e=[],w=0,N=j.length;w<N;w++)e[w]=J[j[w]];return e},ei;(function(j){var e=function(){function N(){this._pendingLoads=0}return N.prototype.attachListeners=function(T,D,S,p){var C=function(){D.removeEventListener("load",n),D.removeEventListener("error",g)},n=function(t){C(),S()},g=function(t){C(),p(t)};D.addEventListener("load",n),D.addEventListener("error",g)},N.prototype._onLoad=function(T,D){this._pendingLoads--,D()},N.prototype._onLoadError=function(T,D,S){this._pendingLoads--,D(S)},N.prototype._insertLinkNode=function(T){this._pendingLoads++;var D=document.head||document.getElementsByTagName("head")[0];D.appendChild(T)},N.prototype.createLinkTag=function(T,D,S,p){var C=this,n=document.createElement("link");n.setAttribute("rel","stylesheet"),n.setAttribute("type","text/css"),n.setAttribute("data-name",T);var g=function(){return C._onLoad(T,S)},t=function(s){return C._onLoadError(T,p,s)};return this.attachListeners(T,n,g,t),n.setAttribute("href",D),n},N.prototype._linkTagExists=function(T,D){var S,p,C,n,g=document.getElementsByTagName("link");for(S=0,p=g.length;S<p;S++)if(C=g[S].getAttribute("data-name"),n=g[S].getAttribute("href"),C===T||n===D)return!0;return!1},N.prototype.load=function(T,D,S,p){if(this._linkTagExists(T,D)){S();return}var C=this.createLinkTag(T,D,S,p);this._insertLinkNode(C)},N}(),w=function(){function N(){this._cssLoader=new e}return N.prototype.load=function(T,D,S,p){p=p||{};var C=p["vs/css"]||{};if(C.disabled){S({});return}var n=D.toUrl(T+".css");this._cssLoader.load(T,n,function(g){S({})},function(g){typeof S.error=="function"&&S.error("Could not find "+n+" or it was empty")})},N}();j.CSSPlugin=w,define("vs/css",new w)})(ei||(ei={}));var Ui=this&&this.__spreadArrays||function(){for(var j=0,e=0,w=arguments.length;e<w;e++)j+=arguments[e].length;for(var N=Array(j),T=0,e=0;e<w;e++)for(var D=arguments[e],S=0,p=D.length;S<p;S++,T++)N[T]=D[S];return N},ti;(function(j){var e=function(){function p(){this._detected=!1,this._isPseudo=!1}return Object.defineProperty(p.prototype,"isPseudo",{get:function(){return this._detect(),this._isPseudo},enumerable:!1,configurable:!0}),p.prototype._detect=function(){this._detected||(this._detected=!0,this._isPseudo=typeof document!="undefined"&&document.location&&document.location.hash.indexOf("pseudo=true")>=0)},p}();function w(p,C,n){var g;return C.length===0?g=p:g=p.replace(/\{(\d+)\}/g,function(t,s){var c=s[0],u=C[c],d=t;return typeof u=="string"?d=u:(typeof u=="number"||typeof u=="boolean"||u===void 0||u===null)&&(d=String(u)),d}),n.isPseudo&&(g="\uFF3B"+g.replace(/[aouei]/g,"$&$&")+"\uFF3D"),g}function N(p,C){var n=p[C];return n||(n=p["*"],n)?n:null}function T(p,C,n){for(var g=[],t=3;t<arguments.length;t++)g[t-3]=arguments[t];return w(n,g,p)}function D(p,C){return function(n,g){var t=Array.prototype.slice.call(arguments,2);return w(p[n],t,C)}}var S=function(){function p(C){var n=this;this._env=C,this.localize=function(g,t){for(var s=[],c=2;c<arguments.length;c++)s[c-2]=arguments[c];return T.apply(void 0,Ui([n._env,g,t],s))}}return p.prototype.setPseudoTranslation=function(C){this._env._isPseudo=C},p.prototype.create=function(C,n){return{localize:D(n[C],this._env)}},p.prototype.load=function(C,n,g,t){var s=this;if(t=t||{},!C||C.length===0)g({localize:this.localize});else{var c=t["vs/nls"]||{},u=c.availableLanguages?N(c.availableLanguages,C):null,d=".nls";u!==null&&u!==p.DEFAULT_TAG&&(d=d+"."+u);var a=function(r){Array.isArray(r)?r.localize=D(r,s._env):r.localize=D(r[C],s._env),g(r)};typeof c.loadBundle=="function"?c.loadBundle(C,u,function(r,o){r?n([C+".nls"],a):a(o)}):n([C+d],a)}},p.DEFAULT_TAG="i-default",p}();j.NLSPlugin=S,define("vs/nls",new S(new e))})(ti||(ti={}));/*! @license DOMPurify 2.3.1 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/2.3.1/LICENSE */function Ki(j){if(Array.isArray(j)){for(var e=0,w=Array(j.length);e<j.length;e++)w[e]=j[e];return w}else return Array.from(j)}var qi=Object.hasOwnProperty,ii=Object.setPrototypeOf,$i=Object.isFrozen,ji=Object.getPrototypeOf,Gi=Object.getOwnPropertyDescriptor,st=Object.freeze,dt=Object.seal,Zi=Object.create,ni=typeof Reflect!="undefined"&&Reflect,Et=ni.apply,Ft=ni.construct;Et||(Et=function(e,w,N){return e.apply(w,N)}),st||(st=function(e){return e}),dt||(dt=function(e){return e}),Ft||(Ft=function(e,w){return new(Function.prototype.bind.apply(e,[null].concat(Ki(w))))});var Yi=ot(Array.prototype.forEach),si=ot(Array.prototype.pop),bt=ot(Array.prototype.push),gt=ot(String.prototype.toLowerCase),ri=ot(String.prototype.match),ct=ot(String.prototype.replace),Xi=ot(String.prototype.indexOf),Qi=ot(String.prototype.trim),ut=ot(RegExp.prototype.test),oi=Ji(TypeError);function ot(j){return function(e){for(var w=arguments.length,N=Array(w>1?w-1:0),T=1;T<w;T++)N[T-1]=arguments[T];return Et(j,e,N)}}function Ji(j){return function(){for(var e=arguments.length,w=Array(e),N=0;N<e;N++)w[N]=arguments[N];return Ft(j,w)}}function Xe(j,e){ii&&ii(j,null);for(var w=e.length;w--;){var N=e[w];if(typeof N=="string"){var T=gt(N);T!==N&&($i(e)||(e[w]=T),N=T)}j[N]=!0}return j}function ft(j){var e=Zi(null),w=void 0;for(w in j)Et(qi,j,[w])&&(e[w]=j[w]);return e}function Dt(j,e){for(;j!==null;){var w=Gi(j,e);if(w){if(w.get)return ot(w.get);if(typeof w.value=="function")return ot(w.value)}j=ji(j)}function N(T){return console.warn("fallback value for",T),null}return N}var ai=st(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),Bt=st(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),xt=st(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),en=st(["animate","color-profile","cursor","discard","fedropshadow","feimage","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),Wt=st(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover"]),tn=st(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),li=st(["#text"]),di=st(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","xmlns","slot"]),Vt=st(["accent-height","accumulate","additive","alignment-baseline","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","targetx","targety","transform","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),ui=st(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),It=st(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),nn=dt(/\{\{[\s\S]*|[\s\S]*\}\}/gm),sn=dt(/<%[\s\S]*|[\s\S]*%>/gm),rn=dt(/^data-[\-\w.\u00B7-\uFFFF]/),on=dt(/^aria-[\-\w]+$/),an=dt(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),ln=dt(/^(?:\w+script|data):/i),dn=dt(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),_t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(j){return typeof j}:function(j){return j&&typeof Symbol=="function"&&j.constructor===Symbol&&j!==Symbol.prototype?"symbol":typeof j};function at(j){if(Array.isArray(j)){for(var e=0,w=Array(j.length);e<j.length;e++)w[e]=j[e];return w}else return Array.from(j)}var un=function(){return typeof window=="undefined"?null:window},cn=function(e,w){if((typeof e=="undefined"?"undefined":_t(e))!=="object"||typeof e.createPolicy!="function")return null;var N=null,T="data-tt-policy-suffix";w.currentScript&&w.currentScript.hasAttribute(T)&&(N=w.currentScript.getAttribute(T));var D="dompurify"+(N?"#"+N:"");try{return e.createPolicy(D,{createHTML:function(p){return p}})}catch(S){return console.warn("TrustedTypes policy "+D+" could not be created."),null}};function ci(){var j=arguments.length>0&&arguments[0]!==void 0?arguments[0]:un(),e=function(_e){return ci(_e)};if(e.version="2.3.1",e.removed=[],!j||!j.document||j.document.nodeType!==9)return e.isSupported=!1,e;var w=j.document,N=j.document,T=j.DocumentFragment,D=j.HTMLTemplateElement,S=j.Node,p=j.Element,C=j.NodeFilter,n=j.NamedNodeMap,g=n===void 0?j.NamedNodeMap||j.MozNamedAttrMap:n,t=j.Text,s=j.Comment,c=j.DOMParser,u=j.trustedTypes,d=p.prototype,a=Dt(d,"cloneNode"),r=Dt(d,"nextSibling"),o=Dt(d,"childNodes"),i=Dt(d,"parentNode");if(typeof D=="function"){var l=N.createElement("template");l.content&&l.content.ownerDocument&&(N=l.content.ownerDocument)}var h=cn(u,w),f=h&&pe?h.createHTML(""):"",y=N,_=y.implementation,b=y.createNodeIterator,v=y.createDocumentFragment,m=y.getElementsByTagName,E=w.importNode,I={};try{I=ft(N).documentMode?N.documentMode:{}}catch(we){}var k={};e.isSupported=typeof i=="function"&&_&&typeof _.createHTMLDocument!="undefined"&&I!==9;var M=nn,P=sn,F=rn,R=on,A=ln,O=dn,L=an,B=null,W=Xe({},[].concat(at(ai),at(Bt),at(xt),at(Wt),at(li))),K=null,H=Xe({},[].concat(at(di),at(Vt),at(ui),at(It))),Y=null,X=null,Z=!0,se=!0,oe=!1,G=!1,x=!1,U=!1,$=!1,V=!1,Q=!1,ue=!0,pe=!1,fe=!0,re=!0,ie=!1,ae={},q=null,ne=Xe({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]),ce=null,le=Xe({},["audio","video","img","source","image","track"]),de=null,z=Xe({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),te="http://www.w3.org/1998/Math/MathML",he="http://www.w3.org/2000/svg",ge="http://www.w3.org/1999/xhtml",ve=ge,Se=!1,Ee=null,Ae=N.createElement("form"),Ne=function(_e){Ee&&Ee===_e||((!_e||(typeof _e=="undefined"?"undefined":_t(_e))!=="object")&&(_e={}),_e=ft(_e),B="ALLOWED_TAGS"in _e?Xe({},_e.ALLOWED_TAGS):W,K="ALLOWED_ATTR"in _e?Xe({},_e.ALLOWED_ATTR):H,de="ADD_URI_SAFE_ATTR"in _e?Xe(ft(z),_e.ADD_URI_SAFE_ATTR):z,ce="ADD_DATA_URI_TAGS"in _e?Xe(ft(le),_e.ADD_DATA_URI_TAGS):le,q="FORBID_CONTENTS"in _e?Xe({},_e.FORBID_CONTENTS):ne,Y="FORBID_TAGS"in _e?Xe({},_e.FORBID_TAGS):{},X="FORBID_ATTR"in _e?Xe({},_e.FORBID_ATTR):{},ae="USE_PROFILES"in _e?_e.USE_PROFILES:!1,Z=_e.ALLOW_ARIA_ATTR!==!1,se=_e.ALLOW_DATA_ATTR!==!1,oe=_e.ALLOW_UNKNOWN_PROTOCOLS||!1,G=_e.SAFE_FOR_TEMPLATES||!1,x=_e.WHOLE_DOCUMENT||!1,V=_e.RETURN_DOM||!1,Q=_e.RETURN_DOM_FRAGMENT||!1,ue=_e.RETURN_DOM_IMPORT!==!1,pe=_e.RETURN_TRUSTED_TYPE||!1,$=_e.FORCE_BODY||!1,fe=_e.SANITIZE_DOM!==!1,re=_e.KEEP_CONTENT!==!1,ie=_e.IN_PLACE||!1,L=_e.ALLOWED_URI_REGEXP||L,ve=_e.NAMESPACE||ge,G&&(se=!1),Q&&(V=!0),ae&&(B=Xe({},[].concat(at(li))),K=[],ae.html===!0&&(Xe(B,ai),Xe(K,di)),ae.svg===!0&&(Xe(B,Bt),Xe(K,Vt),Xe(K,It)),ae.svgFilters===!0&&(Xe(B,xt),Xe(K,Vt),Xe(K,It)),ae.mathMl===!0&&(Xe(B,Wt),Xe(K,ui),Xe(K,It))),_e.ADD_TAGS&&(B===W&&(B=ft(B)),Xe(B,_e.ADD_TAGS)),_e.ADD_ATTR&&(K===H&&(K=ft(K)),Xe(K,_e.ADD_ATTR)),_e.ADD_URI_SAFE_ATTR&&Xe(de,_e.ADD_URI_SAFE_ATTR),_e.FORBID_CONTENTS&&(q===ne&&(q=ft(q)),Xe(q,_e.FORBID_CONTENTS)),re&&(B["#text"]=!0),x&&Xe(B,["html","head","body"]),B.table&&(Xe(B,["tbody"]),delete Y.tbody),st&&st(_e),Ee=_e)},ze=Xe({},["mi","mo","mn","ms","mtext"]),xe=Xe({},["foreignobject","desc","title","annotation-xml"]),We=Xe({},Bt);Xe(We,xt),Xe(We,en);var Ue=Xe({},Wt);Xe(Ue,tn);var Le=function(_e){var Pe=i(_e);(!Pe||!Pe.tagName)&&(Pe={namespaceURI:ge,tagName:"template"});var Te=gt(_e.tagName),Ve=gt(Pe.tagName);if(_e.namespaceURI===he)return Pe.namespaceURI===ge?Te==="svg":Pe.namespaceURI===te?Te==="svg"&&(Ve==="annotation-xml"||ze[Ve]):Boolean(We[Te]);if(_e.namespaceURI===te)return Pe.namespaceURI===ge?Te==="math":Pe.namespaceURI===he?Te==="math"&&xe[Ve]:Boolean(Ue[Te]);if(_e.namespaceURI===ge){if(Pe.namespaceURI===he&&!xe[Ve]||Pe.namespaceURI===te&&!ze[Ve])return!1;var je=Xe({},["title","style","font","a","script"]);return!Ue[Te]&&(je[Te]||!We[Te])}return!1},ye=function(_e){bt(e.removed,{element:_e});try{_e.parentNode.removeChild(_e)}catch(Pe){try{_e.outerHTML=f}catch(Te){_e.remove()}}},Oe=function(_e,Pe){try{bt(e.removed,{attribute:Pe.getAttributeNode(_e),from:Pe})}catch(Te){bt(e.removed,{attribute:null,from:Pe})}if(Pe.removeAttribute(_e),_e==="is"&&!K[_e])if(V||Q)try{ye(Pe)}catch(Te){}else try{Pe.setAttribute(_e,"")}catch(Te){}},He=function(_e){var Pe=void 0,Te=void 0;if($)_e="<remove></remove>"+_e;else{var Ve=ri(_e,/^[\r\n\t ]+/);Te=Ve&&Ve[0]}var je=h?h.createHTML(_e):_e;if(ve===ge)try{Pe=new c().parseFromString(je,"text/html")}catch(Ge){}if(!Pe||!Pe.documentElement){Pe=_.createDocument(ve,"template",null);try{Pe.documentElement.innerHTML=Se?"":je}catch(Ge){}}var qe=Pe.body||Pe.documentElement;return _e&&Te&&qe.insertBefore(N.createTextNode(Te),qe.childNodes[0]||null),ve===ge?m.call(Pe,x?"html":"body")[0]:x?Pe.documentElement:qe},Be=function(_e){return b.call(_e.ownerDocument||_e,_e,C.SHOW_ELEMENT|C.SHOW_COMMENT|C.SHOW_TEXT,null,!1)},Ke=function(_e){return _e instanceof t||_e instanceof s?!1:typeof _e.nodeName!="string"||typeof _e.textContent!="string"||typeof _e.removeChild!="function"||!(_e.attributes instanceof g)||typeof _e.removeAttribute!="function"||typeof _e.setAttribute!="function"||typeof _e.namespaceURI!="string"||typeof _e.insertBefore!="function"},ke=function(_e){return(typeof S=="undefined"?"undefined":_t(S))==="object"?_e instanceof S:_e&&(typeof _e=="undefined"?"undefined":_t(_e))==="object"&&typeof _e.nodeType=="number"&&typeof _e.nodeName=="string"},Ie=function(_e,Pe,Te){!k[_e]||Yi(k[_e],function(Ve){Ve.call(e,Pe,Te,Ee)})},Me=function(_e){var Pe=void 0;if(Ie("beforeSanitizeElements",_e,null),Ke(_e)||ri(_e.nodeName,/[\u0080-\uFFFF]/))return ye(_e),!0;var Te=gt(_e.nodeName);if(Ie("uponSanitizeElement",_e,{tagName:Te,allowedTags:B}),!ke(_e.firstElementChild)&&(!ke(_e.content)||!ke(_e.content.firstElementChild))&&ut(/<[/\w]/g,_e.innerHTML)&&ut(/<[/\w]/g,_e.textContent)||Te==="select"&&ut(/<template/i,_e.innerHTML))return ye(_e),!0;if(!B[Te]||Y[Te]){if(re&&!q[Te]){var Ve=i(_e)||_e.parentNode,je=o(_e)||_e.childNodes;if(je&&Ve)for(var qe=je.length,Ge=qe-1;Ge>=0;--Ge)Ve.insertBefore(a(je[Ge],!0),r(_e))}return ye(_e),!0}return _e instanceof p&&!Le(_e)||(Te==="noscript"||Te==="noembed")&&ut(/<\/no(script|embed)/i,_e.innerHTML)?(ye(_e),!0):(G&&_e.nodeType===3&&(Pe=_e.textContent,Pe=ct(Pe,M," "),Pe=ct(Pe,P," "),_e.textContent!==Pe&&(bt(e.removed,{element:_e.cloneNode()}),_e.textContent=Pe)),Ie("afterSanitizeElements",_e,null),!1)},me=function(_e,Pe,Te){if(fe&&(Pe==="id"||Pe==="name")&&(Te in N||Te in Ae))return!1;if(!(se&&!X[Pe]&&ut(F,Pe))){if(!(Z&&ut(R,Pe))){if(!K[Pe]||X[Pe])return!1;if(!de[Pe]){if(!ut(L,ct(Te,O,""))){if(!((Pe==="src"||Pe==="xlink:href"||Pe==="href")&&_e!=="script"&&Xi(Te,"data:")===0&&ce[_e])){if(!(oe&&!ut(A,ct(Te,O,"")))){if(Te)return!1}}}}}}return!0},be=function(_e){var Pe=void 0,Te=void 0,Ve=void 0,je=void 0;Ie("beforeSanitizeAttributes",_e,null);var qe=_e.attributes;if(!!qe){var Ge={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:K};for(je=qe.length;je--;){Pe=qe[je];var Ze=Pe,$e=Ze.name,Je=Ze.namespaceURI;if(Te=Qi(Pe.value),Ve=gt($e),Ge.attrName=Ve,Ge.attrValue=Te,Ge.keepAttr=!0,Ge.forceKeepAttr=void 0,Ie("uponSanitizeAttribute",_e,Ge),Te=Ge.attrValue,!Ge.forceKeepAttr&&(Oe($e,_e),!!Ge.keepAttr)){if(ut(/\/>/i,Te)){Oe($e,_e);continue}G&&(Te=ct(Te,M," "),Te=ct(Te,P," "));var Ye=_e.nodeName.toLowerCase();if(!!me(Ye,Ve,Te))try{Je?_e.setAttributeNS(Je,$e,Te):_e.setAttribute($e,Te),si(e.removed)}catch(et){}}}Ie("afterSanitizeAttributes",_e,null)}},De=function we(_e){var Pe=void 0,Te=Be(_e);for(Ie("beforeSanitizeShadowDOM",_e,null);Pe=Te.nextNode();)Ie("uponSanitizeShadowNode",Pe,null),!Me(Pe)&&(Pe.content instanceof T&&we(Pe.content),be(Pe));Ie("afterSanitizeShadowDOM",_e,null)};return e.sanitize=function(we,_e){var Pe=void 0,Te=void 0,Ve=void 0,je=void 0,qe=void 0;if(Se=!we,Se&&(we="<!-->"),typeof we!="string"&&!ke(we)){if(typeof we.toString!="function")throw oi("toString is not a function");if(we=we.toString(),typeof we!="string")throw oi("dirty is not a string, aborting")}if(!e.isSupported){if(_t(j.toStaticHTML)==="object"||typeof j.toStaticHTML=="function"){if(typeof we=="string")return j.toStaticHTML(we);if(ke(we))return j.toStaticHTML(we.outerHTML)}return we}if(U||Ne(_e),e.removed=[],typeof we=="string"&&(ie=!1),!ie)if(we instanceof S)Pe=He("<!---->"),Te=Pe.ownerDocument.importNode(we,!0),Te.nodeType===1&&Te.nodeName==="BODY"||Te.nodeName==="HTML"?Pe=Te:Pe.appendChild(Te);else{if(!V&&!G&&!x&&we.indexOf("<")===-1)return h&&pe?h.createHTML(we):we;if(Pe=He(we),!Pe)return V?null:f}Pe&&$&&ye(Pe.firstChild);for(var Ge=Be(ie?we:Pe);Ve=Ge.nextNode();)Ve.nodeType===3&&Ve===je||Me(Ve)||(Ve.content instanceof T&&De(Ve.content),be(Ve),je=Ve);if(je=null,ie)return we;if(V){if(Q)for(qe=v.call(Pe.ownerDocument);Pe.firstChild;)qe.appendChild(Pe.firstChild);else qe=Pe;return ue&&(qe=E.call(w,qe,!0)),qe}var Ze=x?Pe.outerHTML:Pe.innerHTML;return G&&(Ze=ct(Ze,M," "),Ze=ct(Ze,P," ")),h&&pe?h.createHTML(Ze):Ze},e.setConfig=function(we){Ne(we),U=!0},e.clearConfig=function(){Ee=null,U=!1},e.isValidAttribute=function(we,_e,Pe){Ee||Ne({});var Te=gt(we),Ve=gt(_e);return me(Te,Ve,Pe)},e.addHook=function(we,_e){typeof _e=="function"&&(k[we]=k[we]||[],bt(k[we],_e))},e.removeHook=function(we){k[we]&&si(k[we])},e.removeHooks=function(we){k[we]&&(k[we]=[])},e.removeAllHooks=function(){k={}},e}var hn=ci();define("vs/base/browser/dompurify/dompurify",function(){return hn}),define(J[30],ee([0,1]),function(j,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.createFastDomNode=e.FastDomNode=void 0;class w{constructor(D){this.domNode=D,this._maxWidth=-1,this._width=-1,this._height=-1,this._top=-1,this._left=-1,this._bottom=-1,this._right=-1,this._fontFamily="",this._fontWeight="",this._fontSize=-1,this._fontFeatureSettings="",this._lineHeight=-1,this._letterSpacing=-100,this._className="",this._display="",this._position="",this._visibility="",this._backgroundColor="",this._layerHint=!1,this._contain="none",this._boxShadow=""}setMaxWidth(D){this._maxWidth!==D&&(this._maxWidth=D,this.domNode.style.maxWidth=this._maxWidth+"px")}setWidth(D){this._width!==D&&(this._width=D,this.domNode.style.width=this._width+"px")}setHeight(D){this._height!==D&&(this._height=D,this.domNode.style.height=this._height+"px")}setTop(D){this._top!==D&&(this._top=D,this.domNode.style.top=this._top+"px")}unsetTop(){this._top!==-1&&(this._top=-1,this.domNode.style.top="")}setLeft(D){this._left!==D&&(this._left=D,this.domNode.style.left=this._left+"px")}setBottom(D){this._bottom!==D&&(this._bottom=D,this.domNode.style.bottom=this._bottom+"px")}setRight(D){this._right!==D&&(this._right=D,this.domNode.style.right=this._right+"px")}setFontFamily(D){this._fontFamily!==D&&(this._fontFamily=D,this.domNode.style.fontFamily=this._fontFamily)}setFontWeight(D){this._fontWeight!==D&&(this._fontWeight=D,this.domNode.style.fontWeight=this._fontWeight)}setFontSize(D){this._fontSize!==D&&(this._fontSize=D,this.domNode.style.fontSize=this._fontSize+"px")}setFontFeatureSettings(D){this._fontFeatureSettings!==D&&(this._fontFeatureSettings=D,this.domNode.style.fontFeatureSettings=this._fontFeatureSettings)}setLineHeight(D){this._lineHeight!==D&&(this._lineHeight=D,this.domNode.style.lineHeight=this._lineHeight+"px")}setLetterSpacing(D){this._letterSpacing!==D&&(this._letterSpacing=D,this.domNode.style.letterSpacing=this._letterSpacing+"px")}setClassName(D){this._className!==D&&(this._className=D,this.domNode.className=this._className)}toggleClassName(D,S){this.domNode.classList.toggle(D,S),this._className=this.domNode.className}setDisplay(D){this._display!==D&&(this._display=D,this.domNode.style.display=this._display)}setPosition(D){this._position!==D&&(this._position=D,this.domNode.style.position=this._position)}setVisibility(D){this._visibility!==D&&(this._visibility=D,this.domNode.style.visibility=this._visibility)}setBackgroundColor(D){this._backgroundColor!==D&&(this._backgroundColor=D,this.domNode.style.backgroundColor=this._backgroundColor)}setLayerHinting(D){this._layerHint!==D&&(this._layerHint=D,this.domNode.style.transform=this._layerHint?"translate3d(0px, 0px, 0px)":"")}setBoxShadow(D){this._boxShadow!==D&&(this._boxShadow=D,this.domNode.style.boxShadow=D)}setContain(D){this._contain!==D&&(this._contain=D,this.domNode.style.contain=this._contain)}setAttribute(D,S){this.domNode.setAttribute(D,S)}removeAttribute(D){this.domNode.removeAttribute(D)}appendChild(D){this.domNode.appendChild(D.domNode)}removeChild(D){this.domNode.removeChild(D.domNode)}}e.FastDomNode=w;function N(T){return new w(T)}e.createFastDomNode=N}),define(J[204],ee([0,1]),function(j,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IframeUtils=void 0;let w=!1,N=null;function T(S){if(!S.parent||S.parent===S)return null;try{let p=S.location,C=S.parent.location;if(p.origin!=="null"&&C.origin!=="null"&&p.origin!==C.origin)return w=!0,null}catch(p){return w=!0,null}return S.parent}class D{static getSameOriginWindowChain(){if(!N){N=[];let p=window,C;do C=T(p),C?N.push({window:p,iframeElement:p.frameElement||null}):N.push({window:p,iframeElement:null}),p=C;while(p)}return N.slice(0)}static hasDifferentOriginAncestor(){return N||this.getSameOriginWindowChain(),w}static getPositionOfChildWindowRelativeToAncestorWindow(p,C){if(!C||p===C)return{top:0,left:0};let n=0,g=0,t=this.getSameOriginWindowChain();for(const s of t){if(n+=s.window.scrollY,g+=s.window.scrollX,s.window===C||!s.iframeElement)break;let c=s.iframeElement.getBoundingClientRect();n+=c.top,g+=c.left}return{top:n,left:g}}}e.IframeUtils=D}),define(J[295],ee([0,1]),function(j,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ListError=void 0;class w extends Error{constructor(T,D){super(`ListError [${T}] ${D}`)}}e.ListError=w}),define(J[296],ee([0,1]),function(j,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CombinedSpliceable=void 0;class w{constructor(T){this.spliceables=T}splice(T,D,S){this.spliceables.forEach(p=>p.splice(T,D,S))}}e.CombinedSpliceable=w}),define(J[205],ee([0,1]),function(j,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ScrollbarState=void 0;const w=20;class N{constructor(D,S,p,C,n,g){this._scrollbarSize=Math.round(S),this._oppositeScrollbarSize=Math.round(p),this._arrowSize=Math.round(D),this._visibleSize=C,this._scrollSize=n,this._scrollPosition=g,this._computedAvailableSize=0,this._computedIsNeeded=!1,this._computedSliderSize=0,this._computedSliderRatio=0,this._computedSliderPosition=0,this._refreshComputedValues()}clone(){return new N(this._arrowSize,this._scrollbarSize,this._oppositeScrollbarSize,this._visibleSize,this._scrollSize,this._scrollPosition)}setVisibleSize(D){const S=Math.round(D);return this._visibleSize!==S?(this._visibleSize=S,this._refreshComputedValues(),!0):!1}setScrollSize(D){const S=Math.round(D);return this._scrollSize!==S?(this._scrollSize=S,this._refreshComputedValues(),!0):!1}setScrollPosition(D){const S=Math.round(D);return this._scrollPosition!==S?(this._scrollPosition=S,this._refreshComputedValues(),!0):!1}setScrollbarSize(D){this._scrollbarSize=Math.round(D)}setOppositeScrollbarSize(D){this._oppositeScrollbarSize=Math.round(D)}static _computeValues(D,S,p,C,n){const g=Math.max(0,p-D),t=Math.max(0,g-2*S),s=C>0&&C>p;if(!s)return{computedAvailableSize:Math.round(g),computedIsNeeded:s,computedSliderSize:Math.round(t),computedSliderRatio:0,computedSliderPosition:0};const c=Math.round(Math.max(w,Math.floor(p*t/C))),u=(t-c)/(C-p),d=n*u;return{computedAvailableSize:Math.round(g),computedIsNeeded:s,computedSliderSize:Math.round(c),computedSliderRatio:u,computedSliderPosition:Math.round(d)}}_refreshComputedValues(){const D=N._computeValues(this._oppositeScrollbarSize,this._arrowSize,this._visibleSize,this._scrollSize,this._scrollPosition);this._computedAvailableSize=D.computedAvailableSize,this._computedIsNeeded=D.computedIsNeeded,this._computedSliderSize=D.computedSliderSize,this._computedSliderRatio=D.computedSliderRatio,this._computedSliderPosition=D.computedSliderPosition}getArrowSize(){return this._arrowSize}getScrollPosition(){return this._scrollPosition}getRectangleLargeSize(){return this._computedAvailableSize}getRectangleSmallSize(){return this._scrollbarSize}isNeeded(){return this._computedIsNeeded}getSliderSize(){return this._computedSliderSize}getSliderPosition(){return this._computedSliderPosition}getDesiredScrollPositionFromOffset(D){if(!this._computedIsNeeded)return 0;const S=D-this._arrowSize-this._computedSliderSize/2;return Math.round(S/this._computedSliderRatio)}getDesiredScrollPositionFromOffsetPaged(D){if(!this._computedIsNeeded)return 0;const S=D-this._arrowSize;let p=this._scrollPosition;return S<this._computedSliderPosition?p-=this._visibleSize:p+=this._visibleSize,p}getDesiredScrollPositionFromDelta(D){if(!this._computedIsNeeded)return 0;const S=this._computedSliderPosition+D;return Math.round(S/this._computedSliderRatio)}}e.ScrollbarState=N}),define(J[104],ee([0,1]),function(j,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.WeakMapper=e.TreeError=e.TreeMouseEventTarget=void 0;var w;(function(D){D[D.Unknown=0]="Unknown",D[D.Twistie=1]="Twistie",D[D.Element=2]="Element"})(w=e.TreeMouseEventTarget||(e.TreeMouseEventTarget={}));class N extends Error{constructor(S,p){super(`TreeError [${S}] ${p}`)}}e.TreeError=N;class T{constructor(S){this.fn=S,this._map=new WeakMap}map(S){let p=this._map.get(S);return p||(p=this.fn(S),this._map.set(S,p)),p}}e.WeakMapper=T}),define(J[19],ee([0,1]),function(j,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ArrayQueue=e.splice=e.insertInto=e.asArray=e.pushToEnd=e.pushToStart=e.arrayInsert=e.range=e.flatten=e.firstOrDefault=e.lastIndex=e.findLast=e.distinct=e.isNonEmptyArray=e.isFalsyOrEmpty=e.coalesce=e.groupBy=e.quickSelect=e.findFirstInSorted=e.binarySearch=e.equals=e.tail2=e.tail=void 0;function w(v,m=0){return v[v.length-(1+m)]}e.tail=w;function N(v){if(v.length===0)throw new Error("Invalid tail call");return[v.slice(0,v.length-1),v[v.length-1]]}e.tail2=N;function T(v,m,E=(I,k)=>I===k){if(v===m)return!0;if(!v||!m||v.length!==m.length)return!1;for(let I=0,k=v.length;I<k;I++)if(!E(v[I],m[I]))return!1;return!0}e.equals=T;function D(v,m,E){let I=0,k=v.length-1;for(;I<=k;){const M=(I+k)/2|0,P=E(v[M],m);if(P<0)I=M+1;else if(P>0)k=M-1;else return M}return-(I+1)}e.binarySearch=D;function S(v,m){let E=0,I=v.length;if(I===0)return 0;for(;E<I;){const k=Math.floor((E+I)/2);m(v[k])?I=k:E=k+1}return E}e.findFirstInSorted=S;function p(v,m,E){if(v=v|0,v>=m.length)throw new TypeError("invalid index");let I=m[Math.floor(m.length*Math.random())],k=[],M=[],P=[];for(let F of m){const R=E(F,I);R<0?k.push(F):R>0?M.push(F):P.push(F)}return v<k.length?p(v,k,E):v<k.length+P.length?P[0]:p(v-(k.length+P.length),M,E)}e.quickSelect=p;function C(v,m){const E=[];let I;for(const k of v.slice(0).sort(m))!I||m(I[0],k)!==0?(I=[k],E.push(I)):I.push(k);return E}e.groupBy=C;function n(v){return v.filter(m=>!!m)}e.coalesce=n;function g(v){return!Array.isArray(v)||v.length===0}e.isFalsyOrEmpty=g;function t(v){return Array.isArray(v)&&v.length>0}e.isNonEmptyArray=t;function s(v,m=E=>E){const E=new Set;return v.filter(I=>{const k=m(I);return E.has(k)?!1:(E.add(k),!0)})}e.distinct=s;function c(v,m){const E=u(v,m);if(E!==-1)return v[E]}e.findLast=c;function u(v,m){for(let E=v.length-1;E>=0;E--){const I=v[E];if(m(I))return E}return-1}e.lastIndex=u;function d(v,m){return v.length>0?v[0]:m}e.firstOrDefault=d;function a(v){return[].concat(...v)}e.flatten=a;function r(v,m){let E=typeof m=="number"?v:0;typeof m=="number"?E=v:(E=0,m=v);const I=[];if(E<=m)for(let k=E;k<m;k++)I.push(k);else for(let k=E;k>m;k--)I.push(k);return I}e.range=r;function o(v,m,E){const I=v.slice(0,m),k=v.slice(m);return I.concat(E,k)}e.arrayInsert=o;function i(v,m){const E=v.indexOf(m);E>-1&&(v.splice(E,1),v.unshift(m))}e.pushToStart=i;function l(v,m){const E=v.indexOf(m);E>-1&&(v.splice(E,1),v.push(m))}e.pushToEnd=l;function h(v){return Array.isArray(v)?v:[v]}e.asArray=h;function f(v,m,E){const I=_(v,m),k=v.length,M=E.length;v.length=k+M;for(let P=k-1;P>=I;P--)v[P+M]=v[P];for(let P=0;P<M;P++)v[P+I]=E[P]}e.insertInto=f;function y(v,m,E,I){const k=_(v,m),M=v.splice(k,E);return f(v,k,I),M}e.splice=y;function _(v,m){return m<0?Math.max(m+v.length,0):Math.min(m,v.length)}class b{constructor(m){this.items=m,this.firstIdx=0,this.lastIdx=this.items.length-1}takeWhile(m){let E=this.firstIdx;for(;E<this.items.length&&m(this.items[E]);)E++;const I=E===this.firstIdx?null:this.items.slice(this.firstIdx,E);return this.firstIdx=E,I}takeFromEndWhile(m){let E=this.lastIdx;for(;E>=0&&m(this.items[E]);)E--;const I=E===this.lastIdx?null:this.items.slice(E+1,this.lastIdx+1);return this.lastIdx=E,I}peek(){return this.items[this.firstIdx]}}e.ArrayQueue=b}),define(J[206],ee([0,1]),function(j,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ok=void 0;function w(N,T){if(!N)throw new Error(T?`Assertion failed (${T})`:"Assertion Failed")}e.ok=w}),define(J[105],ee([0,1]),function(j,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.writeUInt8=e.readUInt8=e.writeUInt32BE=e.readUInt32BE=e.writeUInt16LE=e.readUInt16LE=e.VSBuffer=void 0;const w=typeof Buffer!="undefined";let N;class T{constructor(s){this.buffer=s,this.byteLength=this.buffer.byteLength}static wrap(s){return w&&!Buffer.isBuffer(s)&&(s=Buffer.from(s.buffer,s.byteOffset,s.byteLength)),new T(s)}toString(){return w?this.buffer.toString():(N||(N=new TextDecoder),N.decode(this.buffer))}}e.VSBuffer=T;function D(t,s){return t[s+0]<<0>>>0|t[s+1]<<8>>>0}e.readUInt16LE=D;function S(t,s,c){t[c+0]=s&255,s=s>>>8,t[c+1]=s&255}e.writeUInt16LE=S;function p(t,s){return t[s]*Math.pow(2,24)+t[s+1]*Math.pow(2,16)+t[s+2]*Math.pow(2,8)+t[s+3]}e.readUInt32BE=p;function C(t,s,c){t[c+3]=s,s=s>>>8,t[c+2]=s,s=s>>>8,t[c+1]=s,s=s>>>8,t[c]=s}e.writeUInt32BE=C;function n(t,s){return t[s]}e.readUInt8=n;function g(t,s,c){t[c]=s}e.writeUInt8=g}),define(J[207],ee([0,1]),function(j,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SetMap=e.forEach=void 0;const w=Object.prototype.hasOwnProperty;function N(D,S){for(let p in D)if(w.call(D,p)&&S({key:p,value:D[p]},function(){delete D[p]})===!1)return}e.forEach=N;class T{constructor(){this.map=new Map}add(S,p){let C=this.map.get(S);C||(C=new Set,this.map.set(S,C)),C.add(p)}delete(S,p){const C=this.map.get(S);!C||(C.delete(p),C.size===0&&this.map.delete(S))}forEach(S,p){const C=this.map.get(S);!C||C.forEach(p)}}e.SetMap=T}),define(J[29],ee([0,1]),function(j,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Color=e.HSVA=e.HSLA=e.RGBA=void 0;function w(p,C){const n=Math.pow(10,C);return Math.round(p*n)/n}class N{constructor(C,n,g,t=1){this._rgbaBrand=void 0,this.r=Math.min(255,Math.max(0,C))|0,this.g=Math.min(255,Math.max(0,n))|0,this.b=Math.min(255,Math.max(0,g))|0,this.a=w(Math.max(Math.min(1,t),0),3)}static equals(C,n){return C.r===n.r&&C.g===n.g&&C.b===n.b&&C.a===n.a}}e.RGBA=N;class T{constructor(C,n,g,t){this._hslaBrand=void 0,this.h=Math.max(Math.min(360,C),0)|0,this.s=w(Math.max(Math.min(1,n),0),3),this.l=w(Math.max(Math.min(1,g),0),3),this.a=w(Math.max(Math.min(1,t),0),3)}static equals(C,n){return C.h===n.h&&C.s===n.s&&C.l===n.l&&C.a===n.a}static fromRGBA(C){const n=C.r/255,g=C.g/255,t=C.b/255,s=C.a,c=Math.max(n,g,t),u=Math.min(n,g,t);let d=0,a=0;const r=(u+c)/2,o=c-u;if(o>0){switch(a=Math.min(r<=.5?o/(2*r):o/(2-2*r),1),c){case n:d=(g-t)/o+(g<t?6:0);break;case g:d=(t-n)/o+2;break;case t:d=(n-g)/o+4;break}d*=60,d=Math.round(d)}return new T(d,a,r,s)}static _hue2rgb(C,n,g){return g<0&&(g+=1),g>1&&(g-=1),g<1/6?C+(n-C)*6*g:g<1/2?n:g<2/3?C+(n-C)*(2/3-g)*6:C}static toRGBA(C){const n=C.h/360,{s:g,l:t,a:s}=C;let c,u,d;if(g===0)c=u=d=t;else{const a=t<.5?t*(1+g):t+g-t*g,r=2*t-a;c=T._hue2rgb(r,a,n+1/3),u=T._hue2rgb(r,a,n),d=T._hue2rgb(r,a,n-1/3)}return new N(Math.round(c*255),Math.round(u*255),Math.round(d*255),s)}}e.HSLA=T;class D{constructor(C,n,g,t){this._hsvaBrand=void 0,this.h=Math.max(Math.min(360,C),0)|0,this.s=w(Math.max(Math.min(1,n),0),3),this.v=w(Math.max(Math.min(1,g),0),3),this.a=w(Math.max(Math.min(1,t),0),3)}static equals(C,n){return C.h===n.h&&C.s===n.s&&C.v===n.v&&C.a===n.a}static fromRGBA(C){const n=C.r/255,g=C.g/255,t=C.b/255,s=Math.max(n,g,t),c=Math.min(n,g,t),u=s-c,d=s===0?0:u/s;let a;return u===0?a=0:s===n?a=((g-t)/u%6+6)%6:s===g?a=(t-n)/u+2:a=(n-g)/u+4,new D(Math.round(a*60),d,s,C.a)}static toRGBA(C){const{h:n,s:g,v:t,a:s}=C,c=t*g,u=c*(1-Math.abs(n/60%2-1)),d=t-c;let[a,r,o]=[0,0,0];return n<60?(a=c,r=u):n<120?(a=u,r=c):n<180?(r=c,o=u):n<240?(r=u,o=c):n<300?(a=u,o=c):n<=360&&(a=c,o=u),a=Math.round((a+d)*255),r=Math.round((r+d)*255),o=Math.round((o+d)*255),new N(a,r,o,s)}}e.HSVA=D;class S{constructor(C){if(C)if(C instanceof N)this.rgba=C;else if(C instanceof T)this._hsla=C,this.rgba=T.toRGBA(C);else if(C instanceof D)this._hsva=C,this.rgba=D.toRGBA(C);else throw new Error("Invalid color ctor argument");else throw new Error("Color needs a value")}static fromHex(C){return S.Format.CSS.parseHex(C)||S.red}get hsla(){return this._hsla?this._hsla:T.fromRGBA(this.rgba)}get hsva(){return this._hsva?this._hsva:D.fromRGBA(this.rgba)}equals(C){return!!C&&N.equals(this.rgba,C.rgba)&&T.equals(this.hsla,C.hsla)&&D.equals(this.hsva,C.hsva)}getRelativeLuminance(){const C=S._relativeLuminanceForComponent(this.rgba.r),n=S._relativeLuminanceForComponent(this.rgba.g),g=S._relativeLuminanceForComponent(this.rgba.b),t=.2126*C+.7152*n+.0722*g;return w(t,4)}static _relativeLuminanceForComponent(C){const n=C/255;return n<=.03928?n/12.92:Math.pow((n+.055)/1.055,2.4)}isLighter(){return(this.rgba.r*299+this.rgba.g*587+this.rgba.b*114)/1e3>=128}isLighterThan(C){const n=this.getRelativeLuminance(),g=C.getRelativeLuminance();return n>g}isDarkerThan(C){const n=this.getRelativeLuminance(),g=C.getRelativeLuminance();return n<g}lighten(C){return new S(new T(this.hsla.h,this.hsla.s,this.hsla.l+this.hsla.l*C,this.hsla.a))}darken(C){return new S(new T(this.hsla.h,this.hsla.s,this.hsla.l-this.hsla.l*C,this.hsla.a))}transparent(C){const{r:n,g,b:t,a:s}=this.rgba;return new S(new N(n,g,t,s*C))}isTransparent(){return this.rgba.a===0}isOpaque(){return this.rgba.a===1}opposite(){return new S(new N(255-this.rgba.r,255-this.rgba.g,255-this.rgba.b,this.rgba.a))}toString(){return this._toString||(this._toString=S.Format.CSS.format(this)),this._toString}static getLighterColor(C,n,g){if(C.isLighterThan(n))return C;g=g||.5;const t=C.getRelativeLuminance(),s=n.getRelativeLuminance();return g=g*(s-t)/s,C.lighten(g)}static getDarkerColor(C,n,g){if(C.isDarkerThan(n))return C;g=g||.5;const t=C.getRelativeLuminance(),s=n.getRelativeLuminance();return g=g*(t-s)/t,C.darken(g)}}e.Color=S,S.white=new S(new N(255,255,255,1)),S.black=new S(new N(0,0,0,1)),S.red=new S(new N(255,0,0,1)),S.blue=new S(new N(0,0,255,1)),S.cyan=new S(new N(0,255,255,1)),S.lightgrey=new S(new N(211,211,211,1)),S.transparent=new S(new N(0,0,0,0)),function(p){let C;(function(n){let g;(function(t){function s(f){return f.rgba.a===1?`rgb(${f.rgba.r}, ${f.rgba.g}, ${f.rgba.b})`:p.Format.CSS.formatRGBA(f)}t.formatRGB=s;function c(f){return`rgba(${f.rgba.r}, ${f.rgba.g}, ${f.rgba.b}, ${+f.rgba.a.toFixed(2)})`}t.formatRGBA=c;function u(f){return f.hsla.a===1?`hsl(${f.hsla.h}, ${(f.hsla.s*100).toFixed(2)}%, ${(f.hsla.l*100).toFixed(2)}%)`:p.Format.CSS.formatHSLA(f)}t.formatHSL=u;function d(f){return`hsla(${f.hsla.h}, ${(f.hsla.s*100).toFixed(2)}%, ${(f.hsla.l*100).toFixed(2)}%, ${f.hsla.a.toFixed(2)})`}t.formatHSLA=d;function a(f){const y=f.toString(16);return y.length!==2?"0"+y:y}function r(f){return`#${a(f.rgba.r)}${a(f.rgba.g)}${a(f.rgba.b)}`}t.formatHex=r;function o(f,y=!1){return y&&f.rgba.a===1?p.Format.CSS.formatHex(f):`#${a(f.rgba.r)}${a(f.rgba.g)}${a(f.rgba.b)}${a(Math.round(f.rgba.a*255))}`}t.formatHexA=o;function i(f){return f.isOpaque()?p.Format.CSS.formatHex(f):p.Format.CSS.formatRGBA(f)}t.format=i;function l(f){const y=f.length;if(y===0||f.charCodeAt(0)!==35)return null;if(y===7){const _=16*h(f.charCodeAt(1))+h(f.charCodeAt(2)),b=16*h(f.charCodeAt(3))+h(f.charCodeAt(4)),v=16*h(f.charCodeAt(5))+h(f.charCodeAt(6));return new p(new N(_,b,v,1))}if(y===9){const _=16*h(f.charCodeAt(1))+h(f.charCodeAt(2)),b=16*h(f.charCodeAt(3))+h(f.charCodeAt(4)),v=16*h(f.charCodeAt(5))+h(f.charCodeAt(6)),m=16*h(f.charCodeAt(7))+h(f.charCodeAt(8));return new p(new N(_,b,v,m/255))}if(y===4){const _=h(f.charCodeAt(1)),b=h(f.charCodeAt(2)),v=h(f.charCodeAt(3));return new p(new N(16*_+_,16*b+b,16*v+v))}if(y===5){const _=h(f.charCodeAt(1)),b=h(f.charCodeAt(2)),v=h(f.charCodeAt(3)),m=h(f.charCodeAt(4));return new p(new N(16*_+_,16*b+b,16*v+v,(16*m+m)/255))}return null}t.parseHex=l;function h(f){switch(f){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:return 10;case 65:return 10;case 98:return 11;case 66:return 11;case 99:return 12;case 67:return 12;case 100:return 13;case 68:return 13;case 101:return 14;case 69:return 14;case 102:return 15;case 70:return 15}return 0}})(g=n.CSS||(n.CSS={}))})(C=p.Format||(p.Format={}))}(S=e.Color||(e.Color={}))}),define(J[92],ee([0,1]),function(j,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.memoize=void 0;function w(N,T,D){let S=null,p=null;if(typeof D.value=="function"?(S="value",p=D.value,p.length!==0&&console.warn("Memoize should only be used in functions with zero parameters")):typeof D.get=="function"&&(S="get",p=D.get),!p)throw new Error("not supported");const C=`$memoize$${T}`;D[S]=function(...n){return this.hasOwnProperty(C)||Object.defineProperty(this,C,{configurable:!1,enumerable:!1,writable:!1,value:p.apply(this,n)}),this[C]}}e.memoize=w}),define(J[297],ee([0,1]),function(j,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DiffChange=void 0;class w{constructor(T,D,S,p){this.originalStart=T,this.originalLength=D,this.modifiedStart=S,this.modifiedLength=p}getOriginalEnd(){return this.originalStart+this.originalLength}getModifiedEnd(){return this.modifiedStart+this.modifiedLength}}e.DiffChange=w}),define(J[11],ee([0,1]),function(j,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NotSupportedError=e.illegalState=e.illegalArgument=e.canceled=e.isPromiseCanceledError=e.transformErrorForSerialization=e.onUnexpectedExternalError=e.onUnexpectedError=e.errorHandler=e.ErrorHandler=void 0;class w{constructor(){this.listeners=[],this.unexpectedErrorHandler=function(c){setTimeout(()=>{throw c.stack?new Error(c.message+`
 
`+c.stack):c},0)}}emit(c){this.listeners.forEach(u=>{u(c)})}onUnexpectedError(c){this.unexpectedErrorHandler(c),this.emit(c)}onUnexpectedExternalError(c){this.unexpectedErrorHandler(c)}}e.ErrorHandler=w,e.errorHandler=new w;function N(s){p(s)||e.errorHandler.onUnexpectedError(s)}e.onUnexpectedError=N;function T(s){p(s)||e.errorHandler.onUnexpectedExternalError(s)}e.onUnexpectedExternalError=T;function D(s){if(s instanceof Error){let{name:c,message:u}=s;const d=s.stacktrace||s.stack;return{$isError:!0,name:c,message:u,stack:d}}return s}e.transformErrorForSerialization=D;const S="Canceled";function p(s){return s instanceof Error&&s.name===S&&s.message===S}e.isPromiseCanceledError=p;function C(){const s=new Error(S);return s.name=s.message,s}e.canceled=C;function n(s){return s?new Error(`Illegal argument: ${s}`):new Error("Illegal argument")}e.illegalArgument=n;function g(s){return s?new Error(`Illegal state: ${s}`):new Error("Illegal state")}e.illegalState=g;class t extends Error{constructor(c){super("NotSupported");c&&(this.message=c)}}e.NotSupportedError=t}),define(J[82],ee([0,1]),function(j,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.once=void 0;function w(N){const T=this;let D=!1,S;return function(){return D||(D=!0,S=N.apply(T,arguments)),S}}e.once=w}),define(J[131],ee([0,1]),function(j,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.defaultGenerator=e.IdGenerator=void 0;class w{constructor(T){this._prefix=T,this._lastId=0}nextId(){return this._prefix+ ++this._lastId}}e.IdGenerator=w,e.defaultGenerator=new w("id#")}),define(J[54],ee([0,1]),function(j,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Iterable=void 0;var w;(function(N){function T(h){return h&&typeof h=="object"&&typeof h[Symbol.iterator]=="function"}N.is=T;const D=Object.freeze([]);function S(){return D}N.empty=S;function*p(h){yield h}N.single=p;function C(h){return h||D}N.from=C;function n(h){return!h||h[Symbol.iterator]().next().done===!0}N.isEmpty=n;function g(h){return h[Symbol.iterator]().next().value}N.first=g;function t(h,f){for(const y of h)if(f(y))return!0;return!1}N.some=t;function s(h,f){for(const y of h)if(f(y))return y}N.find=s;function*c(h,f){for(const y of h)f(y)&&(yield y)}N.filter=c;function*u(h,f){let y=0;for(const _ of h)yield f(_,y++)}N.map=u;function*d(...h){for(const f of h)for(const y of f)yield y}N.concat=d;function*a(h){for(const f of h)for(const y of f)yield y}N.concatNested=a;function r(h,f,y){let _=y;for(const b of h)_=f(_,b);return _}N.reduce=r;function*o(h,f,y=h.length){for(f<0&&(f+=h.length),y<0?y+=h.length:y>h.length&&(y=h.length);f<y;f++)yield h[f]}N.slice=o;function i(h,f=Number.POSITIVE_INFINITY){const y=[];if(f===0)return[y,h];const _=h[Symbol.iterator]();for(let b=0;b<f;b++){const v=_.next();if(v.done)return[y,N.empty()];y.push(v.value)}return[y,{[Symbol.iterator](){return _}}]}N.consume=i;function l(h,f,y=(_,b)=>_===b){const _=h[Symbol.iterator](),b=f[Symbol.iterator]();for(;;){const v=_.next(),m=b.next();if(v.done!==m.done)return!1;if(v.done)return!0;if(!y(v.value,m.value))return!1}}N.equals=l})(w=e.Iterable||(e.Iterable={}))}),define(J[55],ee([0,1]),function(j,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.KeyChord=e.KeyCodeUtils=e.IMMUTABLE_KEY_CODE_TO_CODE=e.IMMUTABLE_CODE_TO_KEY_CODE=e.NATIVE_WINDOWS_KEY_CODE_TO_KEY_CODE=e.EVENT_KEY_CODE_MAP=void 0;class w{constructor(){this._keyCodeToStr=[],this._strToKeyCode=Object.create(null)}define(s,c){this._keyCodeToStr[s]=c,this._strToKeyCode[c.toLowerCase()]=s}keyCodeToStr(s){return this._keyCodeToStr[s]}strToKeyCode(s){return this._strToKeyCode[s.toLowerCase()]||0}}const N=new w,T=new w,D=new w;e.EVENT_KEY_CODE_MAP=new Array(230),e.NATIVE_WINDOWS_KEY_CODE_TO_KEY_CODE={};const S=[],p=Object.create(null),C=Object.create(null);e.IMMUTABLE_CODE_TO_KEY_CODE=[],e.IMMUTABLE_KEY_CODE_TO_CODE=[];for(let t=0;t<=193;t++)e.IMMUTABLE_CODE_TO_KEY_CODE[t]=-1;for(let t=0;t<=126;t++)e.IMMUTABLE_KEY_CODE_TO_CODE[t]=-1;(function(){const t="",s=[[0,1,0,"None",0,"unknown",0,"VK_UNKNOWN",t,t],[0,1,1,"Hyper",0,t,0,t,t,t],[0,1,2,"Super",0,t,0,t,t,t],[0,1,3,"Fn",0,t,0,t,t,t],[0,1,4,"FnLock",0,t,0,t,t,t],[0,1,5,"Suspend",0,t,0,t,t,t],[0,1,6,"Resume",0,t,0,t,t,t],[0,1,7,"Turbo",0,t,0,t,t,t],[0,1,8,"Sleep",0,t,0,"VK_SLEEP",t,t],[0,1,9,"WakeUp",0,t,0,t,t,t],[31,0,10,"KeyA",31,"A",65,"VK_A",t,t],[32,0,11,"KeyB",32,"B",66,"VK_B",t,t],[33,0,12,"KeyC",33,"C",67,"VK_C",t,t],[34,0,13,"KeyD",34,"D",68,"VK_D",t,t],[35,0,14,"KeyE",35,"E",69,"VK_E",t,t],[36,0,15,"KeyF",36,"F",70,"VK_F",t,t],[37,0,16,"KeyG",37,"G",71,"VK_G",t,t],[38,0,17,"KeyH",38,"H",72,"VK_H",t,t],[39,0,18,"KeyI",39,"I",73,"VK_I",t,t],[40,0,19,"KeyJ",40,"J",74,"VK_J",t,t],[41,0,20,"KeyK",41,"K",75,"VK_K",t,t],[42,0,21,"KeyL",42,"L",76,"VK_L",t,t],[43,0,22,"KeyM",43,"M",77,"VK_M",t,t],[44,0,23,"KeyN",44,"N",78,"VK_N",t,t],[45,0,24,"KeyO",45,"O",79,"VK_O",t,t],[46,0,25,"KeyP",46,"P",80,"VK_P",t,t],[47,0,26,"KeyQ",47,"Q",81,"VK_Q",t,t],[48,0,27,"KeyR",48,"R",82,"VK_R",t,t],[49,0,28,"KeyS",49,"S",83,"VK_S",t,t],[50,0,29,"KeyT",50,"T",84,"VK_T",t,t],[51,0,30,"KeyU",51,"U",85,"VK_U",t,t],[52,0,31,"KeyV",52,"V",86,"VK_V",t,t],[53,0,32,"KeyW",53,"W",87,"VK_W",t,t],[54,0,33,"KeyX",54,"X",88,"VK_X",t,t],[55,0,34,"KeyY",55,"Y",89,"VK_Y",t,t],[56,0,35,"KeyZ",56,"Z",90,"VK_Z",t,t],[22,0,36,"Digit1",22,"1",49,"VK_1",t,t],[23,0,37,"Digit2",23,"2",50,"VK_2",t,t],[24,0,38,"Digit3",24,"3",51,"VK_3",t,t],[25,0,39,"Digit4",25,"4",52,"VK_4",t,t],[26,0,40,"Digit5",26,"5",53,"VK_5",t,t],[27,0,41,"Digit6",27,"6",54,"VK_6",t,t],[28,0,42,"Digit7",28,"7",55,"VK_7",t,t],[29,0,43,"Digit8",29,"8",56,"VK_8",t,t],[30,0,44,"Digit9",30,"9",57,"VK_9",t,t],[21,0,45,"Digit0",21,"0",48,"VK_0",t,t],[3,1,46,"Enter",3,"Enter",13,"VK_RETURN",t,t],[9,1,47,"Escape",9,"Escape",27,"VK_ESCAPE",t,t],[1,1,48,"Backspace",1,"Backspace",8,"VK_BACK",t,t],[2,1,49,"Tab",2,"Tab",9,"VK_TAB",t,t],[10,1,50,"Space",10,"Space",32,"VK_SPACE",t,t],[83,0,51,"Minus",83,"-",189,"VK_OEM_MINUS","-","OEM_MINUS"],[81,0,52,"Equal",81,"=",187,"VK_OEM_PLUS","=","OEM_PLUS"],[87,0,53,"BracketLeft",87,"[",219,"VK_OEM_4","[","OEM_4"],[89,0,54,"BracketRight",89,"]",221,"VK_OEM_6","]","OEM_6"],[88,0,55,"Backslash",88,"\\",220,"VK_OEM_5","\\","OEM_5"],[0,0,56,"IntlHash",0,t,0,t,t,t],[80,0,57,"Semicolon",80,";",186,"VK_OEM_1",";","OEM_1"],[90,0,58,"Quote",90,"'",222,"VK_OEM_7","'","OEM_7"],[86,0,59,"Backquote",86,"`",192,"VK_OEM_3","`","OEM_3"],[82,0,60,"Comma",82,",",188,"VK_OEM_COMMA",",","OEM_COMMA"],[84,0,61,"Period",84,".",190,"VK_OEM_PERIOD",".","OEM_PERIOD"],[85,0,62,"Slash",85,"/",191,"VK_OEM_2","/","OEM_2"],[8,1,63,"CapsLock",8,"CapsLock",20,"VK_CAPITAL",t,t],[59,1,64,"F1",59,"F1",112,"VK_F1",t,t],[60,1,65,"F2",60,"F2",113,"VK_F2",t,t],[61,1,66,"F3",61,"F3",114,"VK_F3",t,t],[62,1,67,"F4",62,"F4",115,"VK_F4",t,t],[63,1,68,"F5",63,"F5",116,"VK_F5",t,t],[64,1,69,"F6",64,"F6",117,"VK_F6",t,t],[65,1,70,"F7",65,"F7",118,"VK_F7",t,t],[66,1,71,"F8",66,"F8",119,"VK_F8",t,t],[67,1,72,"F9",67,"F9",120,"VK_F9",t,t],[68,1,73,"F10",68,"F10",121,"VK_F10",t,t],[69,1,74,"F11",69,"F11",122,"VK_F11",t,t],[70,1,75,"F12",70,"F12",123,"VK_F12",t,t],[0,1,76,"PrintScreen",0,t,0,t,t,t],[79,1,77,"ScrollLock",79,"ScrollLock",145,"VK_SCROLL",t,t],[7,1,78,"Pause",7,"PauseBreak",19,"VK_PAUSE",t,t],[19,1,79,"Insert",19,"Insert",45,"VK_INSERT",t,t],[14,1,80,"Home",14,"Home",36,"VK_HOME",t,t],[11,1,81,"PageUp",11,"PageUp",33,"VK_PRIOR",t,t],[20,1,82,"Delete",20,"Delete",46,"VK_DELETE",t,t],[13,1,83,"End",13,"End",35,"VK_END",t,t],[12,1,84,"PageDown",12,"PageDown",34,"VK_NEXT",t,t],[17,1,85,"ArrowRight",17,"RightArrow",39,"VK_RIGHT","Right",t],[15,1,86,"ArrowLeft",15,"LeftArrow",37,"VK_LEFT","Left",t],[18,1,87,"ArrowDown",18,"DownArrow",40,"VK_DOWN","Down",t],[16,1,88,"ArrowUp",16,"UpArrow",38,"VK_UP","Up",t],[78,1,89,"NumLock",78,"NumLock",144,"VK_NUMLOCK",t,t],[108,1,90,"NumpadDivide",108,"NumPad_Divide",111,"VK_DIVIDE",t,t],[103,1,91,"NumpadMultiply",103,"NumPad_Multiply",106,"VK_MULTIPLY",t,t],[106,1,92,"NumpadSubtract",106,"NumPad_Subtract",109,"VK_SUBTRACT",t,t],[104,1,93,"NumpadAdd",104,"NumPad_Add",107,"VK_ADD",t,t],[3,1,94,"NumpadEnter",3,t,0,t,t,t],[94,1,95,"Numpad1",94,"NumPad1",97,"VK_NUMPAD1",t,t],[95,1,96,"Numpad2",95,"NumPad2",98,"VK_NUMPAD2",t,t],[96,1,97,"Numpad3",96,"NumPad3",99,"VK_NUMPAD3",t,t],[97,1,98,"Numpad4",97,"NumPad4",100,"VK_NUMPAD4",t,t],[98,1,99,"Numpad5",98,"NumPad5",101,"VK_NUMPAD5",t,t],[99,1,100,"Numpad6",99,"NumPad6",102,"VK_NUMPAD6",t,t],[100,1,101,"Numpad7",100,"NumPad7",103,"VK_NUMPAD7",t,t],[101,1,102,"Numpad8",101,"NumPad8",104,"VK_NUMPAD8",t,t],[102,1,103,"Numpad9",102,"NumPad9",105,"VK_NUMPAD9",t,t],[93,1,104,"Numpad0",93,"NumPad0",96,"VK_NUMPAD0",t,t],[107,1,105,"NumpadDecimal",107,"NumPad_Decimal",110,"VK_DECIMAL",t,t],[92,0,106,"IntlBackslash",92,"OEM_102",226,"VK_OEM_102",t,t],[58,1,107,"ContextMenu",58,"ContextMenu",93,t,t,t],[0,1,108,"Power",0,t,0,t,t,t],[0,1,109,"NumpadEqual",0,t,0,t,t,t],[71,1,110,"F13",71,"F13",124,"VK_F13",t,t],[72,1,111,"F14",72,"F14",125,"VK_F14",t,t],[73,1,112,"F15",73,"F15",126,"VK_F15",t,t],[74,1,113,"F16",74,"F16",127,"VK_F16",t,t],[75,1,114,"F17",75,"F17",128,"VK_F17",t,t],[76,1,115,"F18",76,"F18",129,"VK_F18",t,t],[77,1,116,"F19",77,"F19",130,"VK_F19",t,t],[0,1,117,"F20",0,t,0,"VK_F20",t,t],[0,1,118,"F21",0,t,0,"VK_F21",t,t],[0,1,119,"F22",0,t,0,"VK_F22",t,t],[0,1,120,"F23",0,t,0,"VK_F23",t,t],[0,1,121,"F24",0,t,0,"VK_F24",t,t],[0,1,122,"Open",0,t,0,t,t,t],[0,1,123,"Help",0,t,0,t,t,t],[0,1,124,"Select",0,t,0,t,t,t],[0,1,125,"Again",0,t,0,t,t,t],[0,1,126,"Undo",0,t,0,t,t,t],[0,1,127,"Cut",0,t,0,t,t,t],[0,1,128,"Copy",0,t,0,t,t,t],[0,1,129,"Paste",0,t,0,t,t,t],[0,1,130,"Find",0,t,0,t,t,t],[0,1,131,"AudioVolumeMute",112,"AudioVolumeMute",173,"VK_VOLUME_MUTE",t,t],[0,1,132,"AudioVolumeUp",113,"AudioVolumeUp",175,"VK_VOLUME_UP",t,t],[0,1,133,"AudioVolumeDown",114,"AudioVolumeDown",174,"VK_VOLUME_DOWN",t,t],[105,1,134,"NumpadComma",105,"NumPad_Separator",108,"VK_SEPARATOR",t,t],[110,0,135,"IntlRo",110,"ABNT_C1",193,"VK_ABNT_C1",t,t],[0,1,136,"KanaMode",0,t,0,t,t,t],[0,0,137,"IntlYen",0,t,0,t,t,t],[0,1,138,"Convert",0,t,0,t,t,t],[0,1,139,"NonConvert",0,t,0,t,t,t],[0,1,140,"Lang1",0,t,0,t,t,t],[0,1,141,"Lang2",0,t,0,t,t,t],[0,1,142,"Lang3",0,t,0,t,t,t],[0,1,143,"Lang4",0,t,0,t,t,t],[0,1,144,"Lang5",0,t,0,t,t,t],[0,1,145,"Abort",0,t,0,t,t,t],[0,1,146,"Props",0,t,0,t,t,t],[0,1,147,"NumpadParenLeft",0,t,0,t,t,t],[0,1,148,"NumpadParenRight",0,t,0,t,t,t],[0,1,149,"NumpadBackspace",0,t,0,t,t,t],[0,1,150,"NumpadMemoryStore",0,t,0,t,t,t],[0,1,151,"NumpadMemoryRecall",0,t,0,t,t,t],[0,1,152,"NumpadMemoryClear",0,t,0,t,t,t],[0,1,153,"NumpadMemoryAdd",0,t,0,t,t,t],[0,1,154,"NumpadMemorySubtract",0,t,0,t,t,t],[0,1,155,"NumpadClear",0,t,0,t,t,t],[0,1,156,"NumpadClearEntry",0,t,0,t,t,t],[5,1,0,t,5,"Ctrl",17,"VK_CONTROL",t,t],[4,1,0,t,4,"Shift",16,"VK_SHIFT",t,t],[6,1,0,t,6,"Alt",18,"VK_MENU",t,t],[57,1,0,t,57,"Meta",0,"VK_COMMAND",t,t],[5,1,157,"ControlLeft",5,t,0,"VK_LCONTROL",t,t],[4,1,158,"ShiftLeft",4,t,0,"VK_LSHIFT",t,t],[6,1,159,"AltLeft",6,t,0,"VK_LMENU",t,t],[57,1,160,"MetaLeft",57,t,0,"VK_LWIN",t,t],[5,1,161,"ControlRight",5,t,0,"VK_RCONTROL",t,t],[4,1,162,"ShiftRight",4,t,0,"VK_RSHIFT",t,t],[6,1,163,"AltRight",6,t,0,"VK_RMENU",t,t],[57,1,164,"MetaRight",57,t,0,"VK_RWIN",t,t],[0,1,165,"BrightnessUp",0,t,0,t,t,t],[0,1,166,"BrightnessDown",0,t,0,t,t,t],[0,1,167,"MediaPlay",0,t,0,t,t,t],[0,1,168,"MediaRecord",0,t,0,t,t,t],[0,1,169,"MediaFastForward",0,t,0,t,t,t],[0,1,170,"MediaRewind",0,t,0,t,t,t],[114,1,171,"MediaTrackNext",119,"MediaTrackNext",176,"VK_MEDIA_NEXT_TRACK",t,t],[115,1,172,"MediaTrackPrevious",120,"MediaTrackPrevious",177,"VK_MEDIA_PREV_TRACK",t,t],[116,1,173,"MediaStop",121,"MediaStop",178,"VK_MEDIA_STOP",t,t],[0,1,174,"Eject",0,t,0,t,t,t],[117,1,175,"MediaPlayPause",122,"MediaPlayPause",179,"VK_MEDIA_PLAY_PAUSE",t,t],[0,1,176,"MediaSelect",123,"LaunchMediaPlayer",181,"VK_MEDIA_LAUNCH_MEDIA_SELECT",t,t],[0,1,177,"LaunchMail",124,"LaunchMail",180,"VK_MEDIA_LAUNCH_MAIL",t,t],[0,1,178,"LaunchApp2",125,"LaunchApp2",183,"VK_MEDIA_LAUNCH_APP2",t,t],[0,1,179,"LaunchApp1",0,t,0,"VK_MEDIA_LAUNCH_APP1",t,t],[0,1,180,"SelectTask",0,t,0,t,t,t],[0,1,181,"LaunchScreenSaver",0,t,0,t,t,t],[0,1,182,"BrowserSearch",115,"BrowserSearch",170,"VK_BROWSER_SEARCH",t,t],[0,1,183,"BrowserHome",116,"BrowserHome",172,"VK_BROWSER_HOME",t,t],[112,1,184,"BrowserBack",117,"BrowserBack",166,"VK_BROWSER_BACK",t,t],[113,1,185,"BrowserForward",118,"BrowserForward",167,"VK_BROWSER_FORWARD",t,t],[0,1,186,"BrowserStop",0,t,0,"VK_BROWSER_STOP",t,t],[0,1,187,"BrowserRefresh",0,t,0,"VK_BROWSER_REFRESH",t,t],[0,1,188,"BrowserFavorites",0,t,0,"VK_BROWSER_FAVORITES",t,t],[0,1,189,"ZoomToggle",0,t,0,t,t,t],[0,1,190,"MailReply",0,t,0,t,t,t],[0,1,191,"MailForward",0,t,0,t,t,t],[0,1,192,"MailSend",0,t,0,t,t,t],[109,1,0,t,109,"KeyInComposition",229,t,t,t],[111,1,0,t,111,"ABNT_C2",194,"VK_ABNT_C2",t,t],[91,1,0,t,91,"OEM_8",223,"VK_OEM_8",t,t],[0,1,0,t,0,t,0,"VK_CLEAR",t,t],[0,1,0,t,0,t,0,"VK_KANA",t,t],[0,1,0,t,0,t,0,"VK_HANGUL",t,t],[0,1,0,t,0,t,0,"VK_JUNJA",t,t],[0,1,0,t,0,t,0,"VK_FINAL",t,t],[0,1,0,t,0,t,0,"VK_HANJA",t,t],[0,1,0,t,0,t,0,"VK_KANJI",t,t],[0,1,0,t,0,t,0,"VK_CONVERT",t,t],[0,1,0,t,0,t,0,"VK_NONCONVERT",t,t],[0,1,0,t,0,t,0,"VK_ACCEPT",t,t],[0,1,0,t,0,t,0,"VK_MODECHANGE",t,t],[0,1,0,t,0,t,0,"VK_SELECT",t,t],[0,1,0,t,0,t,0,"VK_PRINT",t,t],[0,1,0,t,0,t,0,"VK_EXECUTE",t,t],[0,1,0,t,0,t,0,"VK_SNAPSHOT",t,t],[0,1,0,t,0,t,0,"VK_HELP",t,t],[0,1,0,t,0,t,0,"VK_APPS",t,t],[0,1,0,t,0,t,0,"VK_PROCESSKEY",t,t],[0,1,0,t,0,t,0,"VK_PACKET",t,t],[0,1,0,t,0,t,0,"VK_DBE_SBCSCHAR",t,t],[0,1,0,t,0,t,0,"VK_DBE_DBCSCHAR",t,t],[0,1,0,t,0,t,0,"VK_ATTN",t,t],[0,1,0,t,0,t,0,"VK_CRSEL",t,t],[0,1,0,t,0,t,0,"VK_EXSEL",t,t],[0,1,0,t,0,t,0,"VK_EREOF",t,t],[0,1,0,t,0,t,0,"VK_PLAY",t,t],[0,1,0,t,0,t,0,"VK_ZOOM",t,t],[0,1,0,t,0,t,0,"VK_NONAME",t,t],[0,1,0,t,0,t,0,"VK_PA1",t,t],[0,1,0,t,0,t,0,"VK_OEM_CLEAR",t,t]];let c=[],u=[];for(const d of s){const[a,r,o,i,l,h,f,y,_,b]=d;if(u[o]||(u[o]=!0,S[o]=i,p[i]=o,C[i.toLowerCase()]=o,r&&(e.IMMUTABLE_CODE_TO_KEY_CODE[o]=l,l!==0&&l!==3&&l!==5&&l!==4&&l!==6&&l!==57&&(e.IMMUTABLE_KEY_CODE_TO_CODE[l]=o))),!c[l]){if(c[l]=!0,!h)throw new Error(`String representation missing for key code ${l} around scan code ${i}`);N.define(l,h),T.define(l,_||h),D.define(l,b||_||h)}f&&(e.EVENT_KEY_CODE_MAP[f]=l),y&&(e.NATIVE_WINDOWS_KEY_CODE_TO_KEY_CODE[y]=l)}e.IMMUTABLE_KEY_CODE_TO_CODE[3]=46})();var n;(function(t){function s(o){return N.keyCodeToStr(o)}t.toString=s;function c(o){return N.strToKeyCode(o)}t.fromString=c;function u(o){return T.keyCodeToStr(o)}t.toUserSettingsUS=u;function d(o){return D.keyCodeToStr(o)}t.toUserSettingsGeneral=d;function a(o){return T.strToKeyCode(o)||D.strToKeyCode(o)}t.fromUserSettings=a;function r(o){if(o>=93&&o<=108)return null;switch(o){case 16:return"Up";case 18:return"Down";case 15:return"Left";case 17:return"Right"}return N.keyCodeToStr(o)}t.toElectronAccelerator=r})(n=e.KeyCodeUtils||(e.KeyCodeUtils={}));function g(t,s){const c=(s&65535)<<16>>>0;return(t|c)>>>0}e.KeyChord=g}),define(J[93],ee([0,1,11]),function(j,e,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ResolvedKeybinding=e.ResolvedKeybindingPart=e.ScanCodeBinding=e.ChordKeybinding=e.SimpleKeybinding=e.createSimpleKeybinding=e.createKeybinding=void 0;function N(g,t){if(g===0)return null;const s=(g&65535)>>>0,c=(g&4294901760)>>>16;return c!==0?new S([T(s,t),T(c,t)]):new S([T(s,t)])}e.createKeybinding=N;function T(g,t){const s=!!(g&2048),c=!!(g&256),u=t===2?c:s,d=!!(g&1024),a=!!(g&512),r=t===2?s:c,o=g&255;return new D(u,d,a,r,o)}e.createSimpleKeybinding=T;class D{constructor(t,s,c,u,d){this.ctrlKey=t,this.shiftKey=s,this.altKey=c,this.metaKey=u,this.keyCode=d}equals(t){return this.ctrlKey===t.ctrlKey&&this.shiftKey===t.shiftKey&&this.altKey===t.altKey&&this.metaKey===t.metaKey&&this.keyCode===t.keyCode}isModifierKey(){return this.keyCode===0||this.keyCode===5||this.keyCode===57||this.keyCode===6||this.keyCode===4}toChord(){return new S([this])}isDuplicateModifierCase(){return this.ctrlKey&&this.keyCode===5||this.shiftKey&&this.keyCode===4||this.altKey&&this.keyCode===6||this.metaKey&&this.keyCode===57}}e.SimpleKeybinding=D;class S{constructor(t){if(t.length===0)throw(0,w.illegalArgument)("parts");this.parts=t}}e.ChordKeybinding=S;class p{constructor(t,s,c,u,d){this.ctrlKey=t,this.shiftKey=s,this.altKey=c,this.metaKey=u,this.scanCode=d}isDuplicateModifierCase(){return this.ctrlKey&&(this.scanCode===157||this.scanCode===161)||this.shiftKey&&(this.scanCode===158||this.scanCode===162)||this.altKey&&(this.scanCode===159||this.scanCode===163)||this.metaKey&&(this.scanCode===160||this.scanCode===164)}}e.ScanCodeBinding=p;class C{constructor(t,s,c,u,d,a){this.ctrlKey=t,this.shiftKey=s,this.altKey=c,this.metaKey=u,this.keyLabel=d,this.keyAriaLabel=a}}e.ResolvedKeybindingPart=C;class n{}e.ResolvedKeybinding=n}),define(J[160],ee([0,1]),function(j,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Lazy=void 0;class w{constructor(T){this.executor=T,this._didRun=!1}getValue(){if(!this._didRun)try{this._value=this.executor()}catch(T){this._error=T}finally{this._didRun=!0}if(this._error)throw this._error;return this._value}get rawValue(){return this._value}}e.Lazy=w}),define(J[2],ee([0,1,82,54]),function(j,e,w,N){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ImmortalReference=e.MutableDisposable=e.Disposable=e.DisposableStore=e.toDisposable=e.combinedDisposable=e.dispose=e.isDisposable=e.MultiDisposeError=e.markAsSingleton=e.setDisposableTracker=void 0;const T=!1;let D=null;function S(h){D=h}if(e.setDisposableTracker=S,T){const h="__is_disposable_tracked__";S(new class{trackDisposable(f){const y=new Error("Potentially leaked disposable").stack;setTimeout(()=>{f[h]||console.log(y)},3e3)}setParent(f,y){if(f&&f!==o.None)try{f[h]=!0}catch(_){}}markAsDisposed(f){if(f&&f!==o.None)try{f[h]=!0}catch(y){}}markAsSingleton(f){}})}function p(h){return D==null||D.trackDisposable(h),h}function C(h){D==null||D.markAsDisposed(h)}function n(h,f){D==null||D.setParent(h,f)}function g(h,f){if(!!D)for(const y of h)D.setParent(y,f)}function t(h){return D==null||D.markAsSingleton(h),h}e.markAsSingleton=t;class s extends Error{constructor(f){super(`Encountered errors while disposing of store. Errors: [${f.join(", ")}]`);this.errors=f}}e.MultiDisposeError=s;function c(h){return typeof h.dispose=="function"&&h.dispose.length===0}e.isDisposable=c;function u(h){if(N.Iterable.is(h)){let f=[];for(const y of h)if(y)try{y.dispose()}catch(_){f.push(_)}if(f.length===1)throw f[0];if(f.length>1)throw new s(f);return Array.isArray(h)?[]:h}else if(h)return h.dispose(),h}e.dispose=u;function d(...h){const f=a(()=>u(h));return g(h,f),f}e.combinedDisposable=d;function a(h){const f=p({dispose:(0,w.once)(()=>{C(f),h()})});return f}e.toDisposable=a;class r{constructor(){this._toDispose=new Set,this._isDisposed=!1,p(this)}dispose(){this._isDisposed||(C(this),this._isDisposed=!0,this.clear())}clear(){try{u(this._toDispose.values())}finally{this._toDispose.clear()}}add(f){if(!f)return f;if(f===this)throw new Error("Cannot register a disposable on itself!");return n(f,this),this._isDisposed?r.DISABLE_DISPOSED_WARNING||console.warn(new Error("Trying to add a disposable to a DisposableStore that has already been disposed of. The added object will be leaked!").stack):this._toDispose.add(f),f}}e.DisposableStore=r,r.DISABLE_DISPOSED_WARNING=!1;class o{constructor(){this._store=new r,p(this),n(this._store,this)}dispose(){C(this),this._store.dispose()}_register(f){if(f===this)throw new Error("Cannot register a disposable on itself!");return this._store.add(f)}}e.Disposable=o,o.None=Object.freeze({dispose(){}});class i{constructor(){this._isDisposed=!1,p(this)}get value(){return this._isDisposed?void 0:this._value}set value(f){var y;this._isDisposed||f===this._value||((y=this._value)===null||y===void 0||y.dispose(),f&&n(f,this),this._value=f)}clear(){this.value=void 0}dispose(){var f;this._isDisposed=!0,C(this),(f=this._value)===null||f===void 0||f.dispose(),this._value=void 0}clearAndLeak(){const f=this._value;return this._value=void 0,f&&n(f,null),f}}e.MutableDisposable=i;class l{constructor(f){this.object=f}dispose(){}}e.ImmortalReference=l}),define(J[74],ee([0,1]),function(j,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LinkedList=void 0;class w{constructor(D){this.element=D,this.next=w.Undefined,this.prev=w.Undefined}}w.Undefined=new w(void 0);class N{constructor(){this._first=w.Undefined,this._last=w.Undefined,this._size=0}get size(){return this._size}isEmpty(){return this._first===w.Undefined}clear(){let D=this._first;for(;D!==w.Undefined;){const S=D.next;D.prev=w.Undefined,D.next=w.Undefined,D=S}this._first=w.Undefined,this._last=w.Undefined,this._size=0}unshift(D){return this._insert(D,!1)}push(D){return this._insert(D,!0)}_insert(D,S){const p=new w(D);if(this._first===w.Undefined)this._first=p,this._last=p;else if(S){const n=this._last;this._last=p,p.prev=n,n.next=p}else{const n=this._first;this._first=p,p.next=n,n.prev=p}this._size+=1;let C=!1;return()=>{C||(C=!0,this._remove(p))}}shift(){if(this._first!==w.Undefined){const D=this._first.element;return this._remove(this._first),D}}pop(){if(this._last!==w.Undefined){const D=this._last.element;return this._remove(this._last),D}}_remove(D){if(D.prev!==w.Undefined&&D.next!==w.Undefined){const S=D.prev;S.next=D.next,D.next.prev=S}else D.prev===w.Undefined&&D.next===w.Undefined?(this._first=w.Undefined,this._last=w.Undefined):D.next===w.Undefined?(this._last=this._last.prev,this._last.next=w.Undefined):D.prev===w.Undefined&&(this._first=this._first.next,this._first.prev=w.Undefined);this._size-=1}*[Symbol.iterator](){let D=this._first;for(;D!==w.Undefined;)yield D.element,D=D.next}}e.LinkedList=N}),function(j,e){typeof exports=="object"&&typeof module!="undefined"?module.exports=e():typeof define=="function"&&define.amd?define("vs/base/common/marked/marked",e):(j=typeof globalThis!="undefined"?globalThis:j||self,j.marked=e())}(this,function(){"use strict";function j(ke,Ie){for(var Me=0;Me<Ie.length;Me++){var me=Ie[Me];me.enumerable=me.enumerable||!1,me.configurable=!0,"value"in me&&(me.writable=!0),Object.defineProperty(ke,me.key,me)}}function e(ke,Ie,Me){return Ie&&j(ke.prototype,Ie),Me&&j(ke,Me),ke}function w(ke,Ie){if(!!ke){if(typeof ke=="string")return N(ke,Ie);var Me=Object.prototype.toString.call(ke).slice(8,-1);if(Me==="Object"&&ke.constructor&&(Me=ke.constructor.name),Me==="Map"||Me==="Set")return Array.from(ke);if(Me==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(Me))return N(ke,Ie)}}function N(ke,Ie){(Ie==null||Ie>ke.length)&&(Ie=ke.length);for(var Me=0,me=new Array(Ie);Me<Ie;Me++)me[Me]=ke[Me];return me}function T(ke,Ie){var Me=typeof Symbol!="undefined"&&ke[Symbol.iterator]||ke["@@iterator"];if(Me)return(Me=Me.call(ke)).next.bind(Me);if(Array.isArray(ke)||(Me=w(ke))||Ie&&ke&&typeof ke.length=="number"){Me&&(ke=Me);var me=0;return function(){return me>=ke.length?{done:!0}:{done:!1,value:ke[me++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var D={exports:{}};function S(){return{baseUrl:null,breaks:!1,extensions:null,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:null,sanitize:!1,sanitizer:null,silent:!1,smartLists:!1,smartypants:!1,tokenizer:null,walkTokens:null,xhtml:!1}}function p(ke){D.exports.defaults=ke}D.exports={defaults:S(),getDefaults:S,changeDefaults:p};var C=/[&<>"']/,n=/[&<>"']/g,g=/[<>"']|&(?!#?\w+;)/,t=/[<>"']|&(?!#?\w+;)/g,s={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},c=function(Ie){return s[Ie]};function u(ke,Ie){if(Ie){if(C.test(ke))return ke.replace(n,c)}else if(g.test(ke))return ke.replace(t,c);return ke}var d=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function a(ke){return ke.replace(d,function(Ie,Me){return Me=Me.toLowerCase(),Me==="colon"?":":Me.charAt(0)==="#"?Me.charAt(1)==="x"?String.fromCharCode(parseInt(Me.substring(2),16)):String.fromCharCode(+Me.substring(1)):""})}var r=/(^|[^\[])\^/g;function o(ke,Ie){ke=ke.source||ke,Ie=Ie||"";var Me={replace:function(be,De){return De=De.source||De,De=De.replace(r,"$1"),ke=ke.replace(be,De),Me},getRegex:function(){return new RegExp(ke,Ie)}};return Me}var i=/[^\w:]/g,l=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function h(ke,Ie,Me){if(ke){var me;try{me=decodeURIComponent(a(Me)).replace(i,"").toLowerCase()}catch(be){return null}if(me.indexOf("javascript:")===0||me.indexOf("vbscript:")===0||me.indexOf("data:")===0)return null}Ie&&!l.test(Me)&&(Me=v(Ie,Me));try{Me=encodeURI(Me).replace(/%25/g,"%")}catch(be){return null}return Me}var f={},y=/^[^:]+:\/*[^/]*$/,_=/^([^:]+:)[\s\S]*$/,b=/^([^:]+:\/*[^/]*)[\s\S]*$/;function v(ke,Ie){f[" "+ke]||(y.test(ke)?f[" "+ke]=ke+"/":f[" "+ke]=k(ke,"/",!0)),ke=f[" "+ke];var Me=ke.indexOf(":")===-1;return Ie.substring(0,2)==="//"?Me?Ie:ke.replace(_,"$1")+Ie:Ie.charAt(0)==="/"?Me?Ie:ke.replace(b,"$1")+Ie:ke+Ie}var m={exec:function(){}};function E(ke){for(var Ie=1,Me,me;Ie<arguments.length;Ie++){Me=arguments[Ie];for(me in Me)Object.prototype.hasOwnProperty.call(Me,me)&&(ke[me]=Me[me])}return ke}function I(ke,Ie){var Me=ke.replace(/\|/g,function(De,we,_e){for(var Pe=!1,Te=we;--Te>=0&&_e[Te]==="\\";)Pe=!Pe;return Pe?"|":" |"}),me=Me.split(/ \|/),be=0;if(me[0].trim()||me.shift(),me[me.length-1].trim()||me.pop(),me.length>Ie)me.splice(Ie);else for(;me.length<Ie;)me.push("");for(;be<me.length;be++)me[be]=me[be].trim().replace(/\\\|/g,"|");return me}function k(ke,Ie,Me){var me=ke.length;if(me===0)return"";for(var be=0;be<me;){var De=ke.charAt(me-be-1);if(De===Ie&&!Me)be++;else if(De!==Ie&&Me)be++;else break}return ke.substr(0,me-be)}function M(ke,Ie){if(ke.indexOf(Ie[1])===-1)return-1;for(var Me=ke.length,me=0,be=0;be<Me;be++)if(ke[be]==="\\")be++;else if(ke[be]===Ie[0])me++;else if(ke[be]===Ie[1]&&(me--,me<0))return be;return-1}function P(ke){ke&&ke.sanitize&&!ke.silent&&console.warn("marked(): sanitize and sanitizer parameters are deprecated since version 0.7.0, should not be used and will be removed in the future. Read more here: https://marked.js.org/#/USING_ADVANCED.md#options")}function F(ke,Ie){if(Ie<1)return"";for(var Me="";Ie>1;)Ie&1&&(Me+=ke),Ie>>=1,ke+=ke;return Me+ke}var R={escape:u,unescape:a,edit:o,cleanUrl:h,resolveUrl:v,noopTest:m,merge:E,splitCells:I,rtrim:k,findClosingBracket:M,checkSanitizeDeprecation:P,repeatString:F},A=D.exports.defaults,O=R.rtrim,L=R.splitCells,B=R.escape,W=R.findClosingBracket;function K(ke,Ie,Me,me){var be=Ie.href,De=Ie.title?B(Ie.title):null,we=ke[1].replace(/\\([\[\]])/g,"$1");if(ke[0].charAt(0)!=="!"){me.state.inLink=!0;var _e={type:"link",raw:Me,href:be,title:De,text:we,tokens:me.inlineTokens(we,[])};return me.state.inLink=!1,_e}else return{type:"image",raw:Me,href:be,title:De,text:B(we)}}function H(ke,Ie){var Me=ke.match(/^(\s+)(?:```)/);if(Me===null)return Ie;var me=Me[1];return Ie.split(`
`).map(function(be){var De=be.match(/^\s+/);if(De===null)return be;var we=De[0];return we.length>=me.length?be.slice(me.length):be}).join(`
`)}var Y=function(){function ke(Me){this.options=Me||A}var Ie=ke.prototype;return Ie.space=function(me){var be=this.rules.block.newline.exec(me);if(be)return be[0].length>1?{type:"space",raw:be[0]}:{raw:`
`}},Ie.code=function(me){var be=this.rules.block.code.exec(me);if(be){var De=be[0].replace(/^ {1,4}/gm,"");return{type:"code",raw:be[0],codeBlockStyle:"indented",text:this.options.pedantic?De:O(De,`
`)}}},Ie.fences=function(me){var be=this.rules.block.fences.exec(me);if(be){var De=be[0],we=H(De,be[3]||"");return{type:"code",raw:De,lang:be[2]?be[2].trim():be[2],text:we}}},Ie.heading=function(me){var be=this.rules.block.heading.exec(me);if(be){var De=be[2].trim();if(/#$/.test(De)){var we=O(De,"#");(this.options.pedantic||!we||/ $/.test(we))&&(De=we.trim())}var _e={type:"heading",raw:be[0],depth:be[1].length,text:De,tokens:[]};return this.lexer.inline(_e.text,_e.tokens),_e}},Ie.hr=function(me){var be=this.rules.block.hr.exec(me);if(be)return{type:"hr",raw:be[0]}},Ie.blockquote=function(me){var be=this.rules.block.blockquote.exec(me);if(be){var De=be[0].replace(/^ *> ?/gm,"");return{type:"blockquote",raw:be[0],tokens:this.lexer.blockTokens(De,[]),text:De}}},Ie.list=function(me){var be=this.rules.block.list.exec(me);if(be){var De,we,_e,Pe,Te,Ve,je,qe,Ge,Ze,$e=be[1].trim(),Je=$e.length>1,Ye={type:"list",raw:"",ordered:Je,start:Je?+$e.slice(0,-1):"",loose:!1,items:[]};$e=Je?"\\d{1,9}\\"+$e.slice(-1):"\\"+$e,this.options.pedantic&&($e=Je?$e:"[*+-]");for(var et=new RegExp("^( {0,3}"+$e+")((?: [^\\n]*| *)(?:\\n[^\\n]*)*(?:\\n|$))");me&&!(this.rules.block.hr.test(me)||!(be=et.exec(me)));){Ge=be[2].split(`
`),this.options.pedantic?(Pe=2,Ze=Ge[0].trimLeft()):(Pe=be[2].search(/[^ ]/),Pe=be[1].length+(Pe>4?1:Pe),Ze=Ge[0].slice(Pe-be[1].length)),Ve=!1,De=be[0],!Ge[0]&&/^ *$/.test(Ge[1])&&(De=be[1]+Ge.slice(0,2).join(`
`)+`
`,Ye.loose=!0,Ge=[]);var it=new RegExp("^ {0,"+Math.min(3,Pe-1)+"}(?:[*+-]|\\d{1,9}[.)])");for(Te=1;Te<Ge.length;Te++){if(qe=Ge[Te],this.options.pedantic&&(qe=qe.replace(/^ {1,4}(?=( {4})*[^ ])/g,"  ")),it.test(qe)){De=be[1]+Ge.slice(0,Te).join(`
`)+`
`;break}if(!Ve){qe.trim()||(Ve=!0),qe.search(/[^ ]/)>=Pe?Ze+=`
`+qe.slice(Pe):Ze+=`
`+qe;continue}if(qe.search(/[^ ]/)>=Pe||!qe.trim()){Ze+=`
`+qe.slice(Pe);continue}else{De=be[1]+Ge.slice(0,Te).join(`
`)+`
`;break}}Ye.loose||(je?Ye.loose=!0:/\n *\n *$/.test(De)&&(je=!0)),this.options.gfm&&(we=/^\[[ xX]\] /.exec(Ze),we&&(_e=we[0]!=="[ ] ",Ze=Ze.replace(/^\[[ xX]\] +/,""))),Ye.items.push({type:"list_item",raw:De,task:!!we,checked:_e,loose:!1,text:Ze}),Ye.raw+=De,me=me.slice(De.length)}Ye.items[Ye.items.length-1].raw=De.trimRight(),Ye.items[Ye.items.length-1].text=Ze.trimRight(),Ye.raw=Ye.raw.trimRight();var Qe=Ye.items.length;for(Te=0;Te<Qe;Te++)this.lexer.state.top=!1,Ye.items[Te].tokens=this.lexer.blockTokens(Ye.items[Te].text,[]),Ye.items[Te].tokens.some(function(rt){return rt.type==="space"})&&(Ye.loose=!0,Ye.items[Te].loose=!0);return Ye}},Ie.html=function(me){var be=this.rules.block.html.exec(me);if(be){var De={type:"html",raw:be[0],pre:!this.options.sanitizer&&(be[1]==="pre"||be[1]==="script"||be[1]==="style"),text:be[0]};return this.options.sanitize&&(De.type="paragraph",De.text=this.options.sanitizer?this.options.sanitizer(be[0]):B(be[0]),De.tokens=[],this.lexer.inline(De.text,De.tokens)),De}},Ie.def=function(me){var be=this.rules.block.def.exec(me);if(be){be[3]&&(be[3]=be[3].substring(1,be[3].length-1));var De=be[1].toLowerCase().replace(/\s+/g," ");return{type:"def",tag:De,raw:be[0],href:be[2],title:be[3]}}},Ie.table=function(me){var be=this.rules.block.table.exec(me);if(be){var De={type:"table",header:L(be[1]).map(function(je){return{text:je}}),align:be[2].replace(/^ *|\| *$/g,"").split(/ *\| */),rows:be[3]?be[3].replace(/\n$/,"").split(`
`):[]};if(De.header.length===De.align.length){De.raw=be[0];var we=De.align.length,_e,Pe,Te,Ve;for(_e=0;_e<we;_e++)/^ *-+: *$/.test(De.align[_e])?De.align[_e]="right":/^ *:-+: *$/.test(De.align[_e])?De.align[_e]="center":/^ *:-+ *$/.test(De.align[_e])?De.align[_e]="left":De.align[_e]=null;for(we=De.rows.length,_e=0;_e<we;_e++)De.rows[_e]=L(De.rows[_e],De.header.length).map(function(je){return{text:je}});for(we=De.header.length,Pe=0;Pe<we;Pe++)De.header[Pe].tokens=[],this.lexer.inlineTokens(De.header[Pe].text,De.header[Pe].tokens);for(we=De.rows.length,Pe=0;Pe<we;Pe++)for(Ve=De.rows[Pe],Te=0;Te<Ve.length;Te++)Ve[Te].tokens=[],this.lexer.inlineTokens(Ve[Te].text,Ve[Te].tokens);return De}}},Ie.lheading=function(me){var be=this.rules.block.lheading.exec(me);if(be){var De={type:"heading",raw:be[0],depth:be[2].charAt(0)==="="?1:2,text:be[1],tokens:[]};return this.lexer.inline(De.text,De.tokens),De}},Ie.paragraph=function(me){var be=this.rules.block.paragraph.exec(me);if(be){var De={type:"paragraph",raw:be[0],text:be[1].charAt(be[1].length-1)===`
`?be[1].slice(0,-1):be[1],tokens:[]};return this.lexer.inline(De.text,De.tokens),De}},Ie.text=function(me){var be=this.rules.block.text.exec(me);if(be){var De={type:"text",raw:be[0],text:be[0],tokens:[]};return this.lexer.inline(De.text,De.tokens),De}},Ie.escape=function(me){var be=this.rules.inline.escape.exec(me);if(be)return{type:"escape",raw:be[0],text:B(be[1])}},Ie.tag=function(me){var be=this.rules.inline.tag.exec(me);if(be)return!this.lexer.state.inLink&&/^<a /i.test(be[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&/^<\/a>/i.test(be[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&/^<(pre|code|kbd|script)(\s|>)/i.test(be[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(be[0])&&(this.lexer.state.inRawBlock=!1),{type:this.options.sanitize?"text":"html",raw:be[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(be[0]):B(be[0]):be[0]}},Ie.link=function(me){var be=this.rules.inline.link.exec(me);if(be){var De=be[2].trim();if(!this.options.pedantic&&/^</.test(De)){if(!/>$/.test(De))return;var we=O(De.slice(0,-1),"\\");if((De.length-we.length)%2==0)return}else{var _e=W(be[2],"()");if(_e>-1){var Pe=be[0].indexOf("!")===0?5:4,Te=Pe+be[1].length+_e;be[2]=be[2].substring(0,_e),be[0]=be[0].substring(0,Te).trim(),be[3]=""}}var Ve=be[2],je="";if(this.options.pedantic){var qe=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(Ve);qe&&(Ve=qe[1],je=qe[3])}else je=be[3]?be[3].slice(1,-1):"";return Ve=Ve.trim(),/^</.test(Ve)&&(this.options.pedantic&&!/>$/.test(De)?Ve=Ve.slice(1):Ve=Ve.slice(1,-1)),K(be,{href:Ve&&Ve.replace(this.rules.inline._escapes,"$1"),title:je&&je.replace(this.rules.inline._escapes,"$1")},be[0],this.lexer)}},Ie.reflink=function(me,be){var De;if((De=this.rules.inline.reflink.exec(me))||(De=this.rules.inline.nolink.exec(me))){var we=(De[2]||De[1]).replace(/\s+/g," ");if(we=be[we.toLowerCase()],!we||!we.href){var _e=De[0].charAt(0);return{type:"text",raw:_e,text:_e}}return K(De,we,De[0],this.lexer)}},Ie.emStrong=function(me,be,De){De===void 0&&(De="");var we=this.rules.inline.emStrong.lDelim.exec(me);if(!!we&&!(we[3]&&De.match(/(?:[0-9A-Za-z\xAA\xB2\xB3\xB5\xB9\xBA\xBC-\xBE\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u0660-\u0669\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07C0-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u08A0-\u08B4\u08B6-\u08C7\u0904-\u0939\u093D\u0950\u0958-\u0961\u0966-\u096F\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09E6-\u09F1\u09F4-\u09F9\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A66-\u0A6F\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AE6-\u0AEF\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B66-\u0B6F\u0B71-\u0B77\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0BE6-\u0BF2\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C66-\u0C6F\u0C78-\u0C7E\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CE6-\u0CEF\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D58-\u0D61\u0D66-\u0D78\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DE6-\u0DEF\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F20-\u0F33\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F-\u1049\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u1090-\u1099\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1369-\u137C\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u17E0-\u17E9\u17F0-\u17F9\u1810-\u1819\u1820-\u1878\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19DA\u1A00-\u1A16\u1A20-\u1A54\u1A80-\u1A89\u1A90-\u1A99\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B50-\u1B59\u1B83-\u1BA0\u1BAE-\u1BE5\u1C00-\u1C23\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2070\u2071\u2074-\u2079\u207F-\u2089\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2150-\u2189\u2460-\u249B\u24EA-\u24FF\u2776-\u2793\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2CFD\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u3192-\u3195\u31A0-\u31BF\u31F0-\u31FF\u3220-\u3229\u3248-\u324F\u3251-\u325F\u3280-\u3289\u32B1-\u32BF\u3400-\u4DBF\u4E00-\u9FFC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7BF\uA7C2-\uA7CA\uA7F5-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA830-\uA835\uA840-\uA873\uA882-\uA8B3\uA8D0-\uA8D9\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA900-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF-\uA9D9\uA9E0-\uA9E4\uA9E6-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA50-\uAA59\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD07-\uDD33\uDD40-\uDD78\uDD8A\uDD8B\uDE80-\uDE9C\uDEA0-\uDED0\uDEE1-\uDEFB\uDF00-\uDF23\uDF2D-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC58-\uDC76\uDC79-\uDC9E\uDCA7-\uDCAF\uDCE0-\uDCF2\uDCF4\uDCF5\uDCFB-\uDD1B\uDD20-\uDD39\uDD80-\uDDB7\uDDBC-\uDDCF\uDDD2-\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE35\uDE40-\uDE48\uDE60-\uDE7E\uDE80-\uDE9F\uDEC0-\uDEC7\uDEC9-\uDEE4\uDEEB-\uDEEF\uDF00-\uDF35\uDF40-\uDF55\uDF58-\uDF72\uDF78-\uDF91\uDFA9-\uDFAF]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2\uDCFA-\uDD23\uDD30-\uDD39\uDE60-\uDE7E\uDE80-\uDEA9\uDEB0\uDEB1\uDF00-\uDF27\uDF30-\uDF45\uDF51-\uDF54\uDFB0-\uDFCB\uDFE0-\uDFF6]|\uD804[\uDC03-\uDC37\uDC52-\uDC6F\uDC83-\uDCAF\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD03-\uDD26\uDD36-\uDD3F\uDD44\uDD47\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDD0-\uDDDA\uDDDC\uDDE1-\uDDF4\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDEF0-\uDEF9\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC50-\uDC59\uDC5F-\uDC61\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE50-\uDE59\uDE80-\uDEAA\uDEB8\uDEC0-\uDEC9\uDF00-\uDF1A\uDF30-\uDF3B]|\uD806[\uDC00-\uDC2B\uDCA0-\uDCF2\uDCFF-\uDD06\uDD09\uDD0C-\uDD13\uDD15\uDD16\uDD18-\uDD2F\uDD3F\uDD41\uDD50-\uDD59\uDDA0-\uDDA7\uDDAA-\uDDD0\uDDE1\uDDE3\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE89\uDE9D\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC50-\uDC6C\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46\uDD50-\uDD59\uDD60-\uDD65\uDD67\uDD68\uDD6A-\uDD89\uDD98\uDDA0-\uDDA9\uDEE0-\uDEF2\uDFB0\uDFC0-\uDFD4]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD822\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879\uD880-\uD883][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF50-\uDF59\uDF5B-\uDF61\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDE40-\uDE96\uDF00-\uDF4A\uDF50\uDF93-\uDF9F\uDFE0\uDFE1\uDFE3]|\uD821[\uDC00-\uDFF7]|\uD823[\uDC00-\uDCD5\uDD00-\uDD08]|\uD82C[\uDC00-\uDD1E\uDD50-\uDD52\uDD64-\uDD67\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD834[\uDEE0-\uDEF3\uDF60-\uDF78]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD838[\uDD00-\uDD2C\uDD37-\uDD3D\uDD40-\uDD49\uDD4E\uDEC0-\uDEEB\uDEF0-\uDEF9]|\uD83A[\uDC00-\uDCC4\uDCC7-\uDCCF\uDD00-\uDD43\uDD4B\uDD50-\uDD59]|\uD83B[\uDC71-\uDCAB\uDCAD-\uDCAF\uDCB1-\uDCB4\uDD01-\uDD2D\uDD2F-\uDD3D\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD83C[\uDD00-\uDD0C]|\uD83E[\uDFF0-\uDFF9]|\uD869[\uDC00-\uDEDD\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uD884[\uDC00-\uDF4A])/))){var _e=we[1]||we[2]||"";if(!_e||_e&&(De===""||this.rules.inline.punctuation.exec(De))){var Pe=we[0].length-1,Te,Ve,je=Pe,qe=0,Ge=we[0][0]==="*"?this.rules.inline.emStrong.rDelimAst:this.rules.inline.emStrong.rDelimUnd;for(Ge.lastIndex=0,be=be.slice(-1*me.length+Pe);(we=Ge.exec(be))!=null;)if(Te=we[1]||we[2]||we[3]||we[4]||we[5]||we[6],!!Te){if(Ve=Te.length,we[3]||we[4]){je+=Ve;continue}else if((we[5]||we[6])&&Pe%3&&!((Pe+Ve)%3)){qe+=Ve;continue}if(je-=Ve,!(je>0)){if(Ve=Math.min(Ve,Ve+je+qe),Math.min(Pe,Ve)%2){var Ze=me.slice(1,Pe+we.index+Ve);return{type:"em",raw:me.slice(0,Pe+we.index+Ve+1),text:Ze,tokens:this.lexer.inlineTokens(Ze,[])}}var $e=me.slice(2,Pe+we.index+Ve-1);return{type:"strong",raw:me.slice(0,Pe+we.index+Ve+1),text:$e,tokens:this.lexer.inlineTokens($e,[])}}}}}},Ie.codespan=function(me){var be=this.rules.inline.code.exec(me);if(be){var De=be[2].replace(/\n/g," "),we=/[^ ]/.test(De),_e=/^ /.test(De)&&/ $/.test(De);return we&&_e&&(De=De.substring(1,De.length-1)),De=B(De,!0),{type:"codespan",raw:be[0],text:De}}},Ie.br=function(me){var be=this.rules.inline.br.exec(me);if(be)return{type:"br",raw:be[0]}},Ie.del=function(me){var be=this.rules.inline.del.exec(me);if(be)return{type:"del",raw:be[0],text:be[2],tokens:this.lexer.inlineTokens(be[2],[])}},Ie.autolink=function(me,be){var De=this.rules.inline.autolink.exec(me);if(De){var we,_e;return De[2]==="@"?(we=B(this.options.mangle?be(De[1]):De[1]),_e="mailto:"+we):(we=B(De[1]),_e=we),{type:"link",raw:De[0],text:we,href:_e,tokens:[{type:"text",raw:we,text:we}]}}},Ie.url=function(me,be){var De;if(De=this.rules.inline.url.exec(me)){var we,_e;if(De[2]==="@")we=B(this.options.mangle?be(De[0]):De[0]),_e="mailto:"+we;else{var Pe;do Pe=De[0],De[0]=this.rules.inline._backpedal.exec(De[0])[0];while(Pe!==De[0]);we=B(De[0]),De[1]==="www."?_e="http://"+we:_e=we}return{type:"link",raw:De[0],text:we,href:_e,tokens:[{type:"text",raw:we,text:we}]}}},Ie.inlineText=function(me,be){var De=this.rules.inline.text.exec(me);if(De){var we;return this.lexer.state.inRawBlock?we=this.options.sanitize?this.options.sanitizer?this.options.sanitizer(De[0]):B(De[0]):De[0]:we=B(this.options.smartypants?be(De[0]):De[0]),{type:"text",raw:De[0],text:we}}},ke}(),X=R.noopTest,Z=R.edit,se=R.merge,oe={newline:/^(?: *(?:\n|$))+/,code:/^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/,fences:/^ {0,3}(`{3,}(?=[^`\n]*\n)|~{3,})([^\n]*)\n(?:|([\s\S]*?)\n)(?: {0,3}\1[~`]* *(?=\n|$)|$)/,hr:/^ {0,3}((?:- *){3,}|(?:_ *){3,}|(?:\* *){3,})(?:\n+|$)/,heading:/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,blockquote:/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/,list:/^( {0,3}bull)( [^\n]+?)?(?:\n|$)/,html:"^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n *)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$))",def:/^ {0,3}\[(label)\]: *\n? *<?([^\s>]+)>?(?:(?: +\n? *| *\n *)(title))? *(?:\n+|$)/,table:X,lheading:/^([^\n]+)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html| +\n)[^\n]+)*)/,text:/^[^\n]+/};oe._label=/(?!\s*\])(?:\\[\[\]]|[^\[\]])+/,oe._title=/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/,oe.def=Z(oe.def).replace("label",oe._label).replace("title",oe._title).getRegex(),oe.bullet=/(?:[*+-]|\d{1,9}[.)])/,oe.listItemStart=Z(/^( *)(bull) */).replace("bull",oe.bullet).getRegex(),oe.list=Z(oe.list).replace(/bull/g,oe.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+oe.def.source+")").getRegex(),oe._tag="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",oe._comment=/<!--(?!-?>)[\s\S]*?(?:-->|$)/,oe.html=Z(oe.html,"i").replace("comment",oe._comment).replace("tag",oe._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),oe.paragraph=Z(oe._paragraph).replace("hr",oe.hr).replace("heading"," {0,3}#{1,6} ").replace("|lheading","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",oe._tag).getRegex(),oe.blockquote=Z(oe.blockquote).replace("paragraph",oe.paragraph).getRegex(),oe.normal=se({},oe),oe.gfm=se({},oe.normal,{table:"^ *([^\\n ].*\\|.*)\\n {0,3}(?:\\| *)?(:?-+:? *(?:\\| *:?-+:? *)*)\\|?(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)"}),oe.gfm.table=Z(oe.gfm.table).replace("hr",oe.hr).replace("heading"," {0,3}#{1,6} ").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",oe._tag).getRegex(),oe.pedantic=se({},oe.normal,{html:Z(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",oe._comment).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:X,paragraph:Z(oe.normal._paragraph).replace("hr",oe.hr).replace("heading",` *#{1,6} *[^
]`).replace("lheading",oe.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()});var G={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:X,tag:"^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>",link:/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/,reflink:/^!?\[(label)\]\[(?!\s*\])((?:\\[\[\]]?|[^\[\]\\])+)\]/,nolink:/^!?\[(?!\s*\])((?:\[[^\[\]]*\]|\\[\[\]]|[^\[\]])*)\](?:\[\])?/,reflinkSearch:"reflink|nolink(?!\\()",emStrong:{lDelim:/^(?:\*+(?:([punct_])|[^\s*]))|^_+(?:([punct*])|([^\s_]))/,rDelimAst:/\_\_[^_*]*?\*[^_*]*?\_\_|[punct_](\*+)(?=[\s]|$)|[^punct*_\s](\*+)(?=[punct_\s]|$)|[punct_\s](\*+)(?=[^punct*_\s])|[\s](\*+)(?=[punct_])|[punct_](\*+)(?=[punct_])|[^punct*_\s](\*+)(?=[^punct*_\s])/,rDelimUnd:/\*\*[^_*]*?\_[^_*]*?\*\*|[punct*](\_+)(?=[\s]|$)|[^punct*_\s](\_+)(?=[punct*\s]|$)|[punct*\s](\_+)(?=[^punct*_\s])|[\s](\_+)(?=[punct*])|[punct*](\_+)(?=[punct*])/},code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,br:/^( {2,}|\\)\n(?!\s*$)/,del:X,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,punctuation:/^([\spunctuation])/};G._punctuation="!\"#$%&'()+\\-.,/:;<=>?@\\[\\]`^{|}~",G.punctuation=Z(G.punctuation).replace(/punctuation/g,G._punctuation).getRegex(),G.blockSkip=/\[[^\]]*?\]\([^\)]*?\)|`[^`]*?`|<[^>]*?>/g,G.escapedEmSt=/\\\*|\\_/g,G._comment=Z(oe._comment).replace("(?:-->|$)","-->").getRegex(),G.emStrong.lDelim=Z(G.emStrong.lDelim).replace(/punct/g,G._punctuation).getRegex(),G.emStrong.rDelimAst=Z(G.emStrong.rDelimAst,"g").replace(/punct/g,G._punctuation).getRegex(),G.emStrong.rDelimUnd=Z(G.emStrong.rDelimUnd,"g").replace(/punct/g,G._punctuation).getRegex(),G._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,G._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,G._email=/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/,G.autolink=Z(G.autolink).replace("scheme",G._scheme).replace("email",G._email).getRegex(),G._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,G.tag=Z(G.tag).replace("comment",G._comment).replace("attribute",G._attribute).getRegex(),G._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,G._href=/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/,G._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,G.link=Z(G.link).replace("label",G._label).replace("href",G._href).replace("title",G._title).getRegex(),G.reflink=Z(G.reflink).replace("label",G._label).getRegex(),G.reflinkSearch=Z(G.reflinkSearch,"g").replace("reflink",G.reflink).replace("nolink",G.nolink).getRegex(),G.normal=se({},G),G.pedantic=se({},G.normal,{strong:{start:/^__|\*\*/,middle:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,endAst:/\*\*(?!\*)/g,endUnd:/__(?!_)/g},em:{start:/^_|\*/,middle:/^()\*(?=\S)([\s\S]*?\S)\*(?!\*)|^_(?=\S)([\s\S]*?\S)_(?!_)/,endAst:/\*(?!\*)/g,endUnd:/_(?!_)/g},link:Z(/^!?\[(label)\]\((.*?)\)/).replace("label",G._label).getRegex(),reflink:Z(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",G._label).getRegex()}),G.gfm=se({},G.normal,{escape:Z(G.escape).replace("])","~|])").getRegex(),_extended_email:/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/,url:/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,_backpedal:/(?:[^?!.,:;*_~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])([\s\S]*?[^\s~])\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/}),G.gfm.url=Z(G.gfm.url,"i").replace("email",G.gfm._extended_email).getRegex(),G.breaks=se({},G.gfm,{br:Z(G.br).replace("{2,}","*").getRegex(),text:Z(G.gfm.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()});var x={block:oe,inline:G},U=Y,$=D.exports.defaults,V=x.block,Q=x.inline,ue=R.repeatString;function pe(ke){return ke.replace(/---/g,"\u2014").replace(/--/g,"\u2013").replace(/(^|[-\u2014/(\[{"\s])'/g,"$1\u2018").replace(/'/g,"\u2019").replace(/(^|[-\u2014/(\[{\u2018\s])"/g,"$1\u201C").replace(/"/g,"\u201D").replace(/\.{3}/g,"\u2026")}function fe(ke){var Ie="",Me,me,be=ke.length;for(Me=0;Me<be;Me++)me=ke.charCodeAt(Me),Math.random()>.5&&(me="x"+me.toString(16)),Ie+="&#"+me+";";return Ie}var re=function(){function ke(Me){this.tokens=[],this.tokens.links=Object.create(null),this.options=Me||$,this.options.tokenizer=this.options.tokenizer||new U,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};var me={block:V.normal,inline:Q.normal};this.options.pedantic?(me.block=V.pedantic,me.inline=Q.pedantic):this.options.gfm&&(me.block=V.gfm,this.options.breaks?me.inline=Q.breaks:me.inline=Q.gfm),this.tokenizer.rules=me}ke.lex=function(me,be){var De=new ke(be);return De.lex(me)},ke.lexInline=function(me,be){var De=new ke(be);return De.inlineTokens(me)};var Ie=ke.prototype;return Ie.lex=function(me){me=me.replace(/\r\n|\r/g,`
`).replace(/\t/g,"    "),this.blockTokens(me,this.tokens);for(var be;be=this.inlineQueue.shift();)this.inlineTokens(be.src,be.tokens);return this.tokens},Ie.blockTokens=function(me,be){var De=this;be===void 0&&(be=[]),this.options.pedantic&&(me=me.replace(/^ +$/gm,""));for(var we,_e,Pe,Te;me;)if(!(this.options.extensions&&this.options.extensions.block&&this.options.extensions.block.some(function(je){return(we=je.call({lexer:De},me,be))?(me=me.substring(we.raw.length),be.push(we),!0):!1}))){if(we=this.tokenizer.space(me)){me=me.substring(we.raw.length),we.type&&be.push(we);continue}if(we=this.tokenizer.code(me)){me=me.substring(we.raw.length),_e=be[be.length-1],_e&&(_e.type==="paragraph"||_e.type==="text")?(_e.raw+=`
`+we.raw,_e.text+=`
`+we.text,this.inlineQueue[this.inlineQueue.length-1].src=_e.text):be.push(we);continue}if(we=this.tokenizer.fences(me)){me=me.substring(we.raw.length),be.push(we);continue}if(we=this.tokenizer.heading(me)){me=me.substring(we.raw.length),be.push(we);continue}if(we=this.tokenizer.hr(me)){me=me.substring(we.raw.length),be.push(we);continue}if(we=this.tokenizer.blockquote(me)){me=me.substring(we.raw.length),be.push(we);continue}if(we=this.tokenizer.list(me)){me=me.substring(we.raw.length),be.push(we);continue}if(we=this.tokenizer.html(me)){me=me.substring(we.raw.length),be.push(we);continue}if(we=this.tokenizer.def(me)){me=me.substring(we.raw.length),_e=be[be.length-1],_e&&(_e.type==="paragraph"||_e.type==="text")?(_e.raw+=`
`+we.raw,_e.text+=`
`+we.raw,this.inlineQueue[this.inlineQueue.length-1].src=_e.text):this.tokens.links[we.tag]||(this.tokens.links[we.tag]={href:we.href,title:we.title});continue}if(we=this.tokenizer.table(me)){me=me.substring(we.raw.length),be.push(we);continue}if(we=this.tokenizer.lheading(me)){me=me.substring(we.raw.length),be.push(we);continue}if(Pe=me,this.options.extensions&&this.options.extensions.startBlock&&function(){var je=Infinity,qe=me.slice(1),Ge=void 0;De.options.extensions.startBlock.forEach(function(Ze){Ge=Ze.call({lexer:this},qe),typeof Ge=="number"&&Ge>=0&&(je=Math.min(je,Ge))}),je<Infinity&&je>=0&&(Pe=me.substring(0,je+1))}(),this.state.top&&(we=this.tokenizer.paragraph(Pe))){_e=be[be.length-1],Te&&_e.type==="paragraph"?(_e.raw+=`
`+we.raw,_e.text+=`
`+we.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=_e.text):be.push(we),Te=Pe.length!==me.length,me=me.substring(we.raw.length);continue}if(we=this.tokenizer.text(me)){me=me.substring(we.raw.length),_e=be[be.length-1],_e&&_e.type==="text"?(_e.raw+=`
`+we.raw,_e.text+=`
`+we.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=_e.text):be.push(we);continue}if(me){var Ve="Infinite loop on byte: "+me.charCodeAt(0);if(this.options.silent){console.error(Ve);break}else throw new Error(Ve)}}return this.state.top=!0,be},Ie.inline=function(me,be){this.inlineQueue.push({src:me,tokens:be})},Ie.inlineTokens=function(me,be){var De=this;be===void 0&&(be=[]);var we,_e,Pe,Te=me,Ve,je,qe;if(this.tokens.links){var Ge=Object.keys(this.tokens.links);if(Ge.length>0)for(;(Ve=this.tokenizer.rules.inline.reflinkSearch.exec(Te))!=null;)Ge.includes(Ve[0].slice(Ve[0].lastIndexOf("[")+1,-1))&&(Te=Te.slice(0,Ve.index)+"["+ue("a",Ve[0].length-2)+"]"+Te.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(Ve=this.tokenizer.rules.inline.blockSkip.exec(Te))!=null;)Te=Te.slice(0,Ve.index)+"["+ue("a",Ve[0].length-2)+"]"+Te.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;(Ve=this.tokenizer.rules.inline.escapedEmSt.exec(Te))!=null;)Te=Te.slice(0,Ve.index)+"++"+Te.slice(this.tokenizer.rules.inline.escapedEmSt.lastIndex);for(;me;)if(je||(qe=""),je=!1,!(this.options.extensions&&this.options.extensions.inline&&this.options.extensions.inline.some(function($e){return(we=$e.call({lexer:De},me,be))?(me=me.substring(we.raw.length),be.push(we),!0):!1}))){if(we=this.tokenizer.escape(me)){me=me.substring(we.raw.length),be.push(we);continue}if(we=this.tokenizer.tag(me)){me=me.substring(we.raw.length),_e=be[be.length-1],_e&&we.type==="text"&&_e.type==="text"?(_e.raw+=we.raw,_e.text+=we.text):be.push(we);continue}if(we=this.tokenizer.link(me)){me=me.substring(we.raw.length),be.push(we);continue}if(we=this.tokenizer.reflink(me,this.tokens.links)){me=me.substring(we.raw.length),_e=be[be.length-1],_e&&we.type==="text"&&_e.type==="text"?(_e.raw+=we.raw,_e.text+=we.text):be.push(we);continue}if(we=this.tokenizer.emStrong(me,Te,qe)){me=me.substring(we.raw.length),be.push(we);continue}if(we=this.tokenizer.codespan(me)){me=me.substring(we.raw.length),be.push(we);continue}if(we=this.tokenizer.br(me)){me=me.substring(we.raw.length),be.push(we);continue}if(we=this.tokenizer.del(me)){me=me.substring(we.raw.length),be.push(we);continue}if(we=this.tokenizer.autolink(me,fe)){me=me.substring(we.raw.length),be.push(we);continue}if(!this.state.inLink&&(we=this.tokenizer.url(me,fe))){me=me.substring(we.raw.length),be.push(we);continue}if(Pe=me,this.options.extensions&&this.options.extensions.startInline&&function(){var $e=Infinity,Je=me.slice(1),Ye=void 0;De.options.extensions.startInline.forEach(function(et){Ye=et.call({lexer:this},Je),typeof Ye=="number"&&Ye>=0&&($e=Math.min($e,Ye))}),$e<Infinity&&$e>=0&&(Pe=me.substring(0,$e+1))}(),we=this.tokenizer.inlineText(Pe,pe)){me=me.substring(we.raw.length),we.raw.slice(-1)!=="_"&&(qe=we.raw.slice(-1)),je=!0,_e=be[be.length-1],_e&&_e.type==="text"?(_e.raw+=we.raw,_e.text+=we.text):be.push(we);continue}if(me){var Ze="Infinite loop on byte: "+me.charCodeAt(0);if(this.options.silent){console.error(Ze);break}else throw new Error(Ze)}}return be},e(ke,null,[{key:"rules",get:function(){return{block:V,inline:Q}}}]),ke}(),ie=D.exports.defaults,ae=R.cleanUrl,q=R.escape,ne=function(){function ke(Me){this.options=Me||ie}var Ie=ke.prototype;return Ie.code=function(me,be,De){var we=(be||"").match(/\S*/)[0];if(this.options.highlight){var _e=this.options.highlight(me,we);_e!=null&&_e!==me&&(De=!0,me=_e)}return me=me.replace(/\n$/,"")+`
`,we?'<pre><code class="'+this.options.langPrefix+q(we,!0)+'">'+(De?me:q(me,!0))+`</code></pre>
`:"<pre><code>"+(De?me:q(me,!0))+`</code></pre>
`},Ie.blockquote=function(me){return`<blockquote>
`+me+`</blockquote>
`},Ie.html=function(me){return me},Ie.heading=function(me,be,De,we){return this.options.headerIds?"<h"+be+' id="'+this.options.headerPrefix+we.slug(De)+'">'+me+"</h"+be+`>
`:"<h"+be+">"+me+"</h"+be+`>
`},Ie.hr=function(){return this.options.xhtml?`<hr/>
`:`<hr>
`},Ie.list=function(me,be,De){var we=be?"ol":"ul",_e=be&&De!==1?' start="'+De+'"':"";return"<"+we+_e+`>
`+me+"</"+we+`>
`},Ie.listitem=function(me){return"<li>"+me+`</li>
`},Ie.checkbox=function(me){return"<input "+(me?'checked="" ':"")+'disabled="" type="checkbox"'+(this.options.xhtml?" /":"")+"> "},Ie.paragraph=function(me){return"<p>"+me+`</p>
`},Ie.table=function(me,be){return be&&(be="<tbody>"+be+"</tbody>"),`<table>
<thead>
`+me+`</thead>
`+be+`</table>
`},Ie.tablerow=function(me){return`<tr>
`+me+`</tr>
`},Ie.tablecell=function(me,be){var De=be.header?"th":"td",we=be.align?"<"+De+' align="'+be.align+'">':"<"+De+">";return we+me+"</"+De+`>
`},Ie.strong=function(me){return"<strong>"+me+"</strong>"},Ie.em=function(me){return"<em>"+me+"</em>"},Ie.codespan=function(me){return"<code>"+me+"</code>"},Ie.br=function(){return this.options.xhtml?"<br/>":"<br>"},Ie.del=function(me){return"<del>"+me+"</del>"},Ie.link=function(me,be,De){if(me=ae(this.options.sanitize,this.options.baseUrl,me),me===null)return De;var we='<a href="'+q(me)+'"';return be&&(we+=' title="'+be+'"'),we+=">"+De+"</a>",we},Ie.image=function(me,be,De){if(me=ae(this.options.sanitize,this.options.baseUrl,me),me===null)return De;var we='<img src="'+me+'" alt="'+De+'"';return be&&(we+=' title="'+be+'"'),we+=this.options.xhtml?"/>":">",we},Ie.text=function(me){return me},ke}(),ce=function(){function ke(){}var Ie=ke.prototype;return Ie.strong=function(me){return me},Ie.em=function(me){return me},Ie.codespan=function(me){return me},Ie.del=function(me){return me},Ie.html=function(me){return me},Ie.text=function(me){return me},Ie.link=function(me,be,De){return""+De},Ie.image=function(me,be,De){return""+De},Ie.br=function(){return""},ke}(),le=function(){function ke(){this.seen={}}var Ie=ke.prototype;return Ie.serialize=function(me){return me.toLowerCase().trim().replace(/<[!\/a-z].*?>/ig,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-")},Ie.getNextSafeSlug=function(me,be){var De=me,we=0;if(this.seen.hasOwnProperty(De)){we=this.seen[me];do we++,De=me+"-"+we;while(this.seen.hasOwnProperty(De))}return be||(this.seen[me]=we,this.seen[De]=0),De},Ie.slug=function(me,be){be===void 0&&(be={});var De=this.serialize(me);return this.getNextSafeSlug(De,be.dryrun)},ke}(),de=ne,z=ce,te=le,he=D.exports.defaults,ge=R.unescape,ve=function(){function ke(Me){this.options=Me||he,this.options.renderer=this.options.renderer||new de,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new z,this.slugger=new te}ke.parse=function(me,be){var De=new ke(be);return De.parse(me)},ke.parseInline=function(me,be){var De=new ke(be);return De.parseInline(me)};var Ie=ke.prototype;return Ie.parse=function(me,be){be===void 0&&(be=!0);var De="",we,_e,Pe,Te,Ve,je,qe,Ge,Ze,$e,Je,Ye,et,it,Qe,rt,mt,ht,pt,hi=me.length;for(we=0;we<hi;we++){if($e=me[we],this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[$e.type]&&(pt=this.options.extensions.renderers[$e.type].call({parser:this},$e),pt!==!1||!["space","hr","heading","code","table","blockquote","list","html","paragraph","text"].includes($e.type))){De+=pt||"";continue}switch($e.type){case"space":continue;case"hr":{De+=this.renderer.hr();continue}case"heading":{De+=this.renderer.heading(this.parseInline($e.tokens),$e.depth,ge(this.parseInline($e.tokens,this.textRenderer)),this.slugger);continue}case"code":{De+=this.renderer.code($e.text,$e.lang,$e.escaped);continue}case"table":{for(Ge="",qe="",Te=$e.header.length,_e=0;_e<Te;_e++)qe+=this.renderer.tablecell(this.parseInline($e.header[_e].tokens),{header:!0,align:$e.align[_e]});for(Ge+=this.renderer.tablerow(qe),Ze="",Te=$e.rows.length,_e=0;_e<Te;_e++){for(je=$e.rows[_e],qe="",Ve=je.length,Pe=0;Pe<Ve;Pe++)qe+=this.renderer.tablecell(this.parseInline(je[Pe].tokens),{header:!1,align:$e.align[Pe]});Ze+=this.renderer.tablerow(qe)}De+=this.renderer.table(Ge,Ze);continue}case"blockquote":{Ze=this.parse($e.tokens),De+=this.renderer.blockquote(Ze);continue}case"list":{for(Je=$e.ordered,Ye=$e.start,et=$e.loose,Te=$e.items.length,Ze="",_e=0;_e<Te;_e++)Qe=$e.items[_e],rt=Qe.checked,mt=Qe.task,it="",Qe.task&&(ht=this.renderer.checkbox(rt),et?Qe.tokens.length>0&&Qe.tokens[0].type==="paragraph"?(Qe.tokens[0].text=ht+" "+Qe.tokens[0].text,Qe.tokens[0].tokens&&Qe.tokens[0].tokens.length>0&&Qe.tokens[0].tokens[0].type==="text"&&(Qe.tokens[0].tokens[0].text=ht+" "+Qe.tokens[0].tokens[0].text)):Qe.tokens.unshift({type:"text",text:ht}):it+=ht),it+=this.parse(Qe.tokens,et),Ze+=this.renderer.listitem(it,mt,rt);De+=this.renderer.list(Ze,Je,Ye);continue}case"html":{De+=this.renderer.html($e.text);continue}case"paragraph":{De+=this.renderer.paragraph(this.parseInline($e.tokens));continue}case"text":{for(Ze=$e.tokens?this.parseInline($e.tokens):$e.text;we+1<hi&&me[we+1].type==="text";)$e=me[++we],Ze+=`
`+($e.tokens?this.parseInline($e.tokens):$e.text);De+=be?this.renderer.paragraph(Ze):Ze;continue}default:{var gi='Token with "'+$e.type+'" type was not found.';if(this.options.silent){console.error(gi);return}else throw new Error(gi)}}}return De},Ie.parseInline=function(me,be){be=be||this.renderer;var De="",we,_e,Pe,Te=me.length;for(we=0;we<Te;we++){if(_e=me[we],this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[_e.type]&&(Pe=this.options.extensions.renderers[_e.type].call({parser:this},_e),Pe!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(_e.type))){De+=Pe||"";continue}switch(_e.type){case"escape":{De+=be.text(_e.text);break}case"html":{De+=be.html(_e.text);break}case"link":{De+=be.link(_e.href,_e.title,this.parseInline(_e.tokens,be));break}case"image":{De+=be.image(_e.href,_e.title,_e.text);break}case"strong":{De+=be.strong(this.parseInline(_e.tokens,be));break}case"em":{De+=be.em(this.parseInline(_e.tokens,be));break}case"codespan":{De+=be.codespan(_e.text);break}case"br":{De+=be.br();break}case"del":{De+=be.del(this.parseInline(_e.tokens,be));break}case"text":{De+=be.text(_e.text);break}default:{var Ve='Token with "'+_e.type+'" type was not found.';if(this.options.silent){console.error(Ve);return}else throw new Error(Ve)}}}return De},ke}(),Se=re,Ee=ve,Ae=Y,Ne=ne,ze=ce,xe=le,We=R.merge,Ue=R.checkSanitizeDeprecation,Le=R.escape,ye=D.exports.getDefaults,Oe=D.exports.changeDefaults,He=D.exports.defaults;function Be(ke,Ie,Me){if(typeof ke=="undefined"||ke===null)throw new Error("marked(): input parameter is undefined or null");if(typeof ke!="string")throw new Error("marked(): input parameter is of type "+Object.prototype.toString.call(ke)+", string expected");if(typeof Ie=="function"&&(Me=Ie,Ie=null),Ie=We({},Be.defaults,Ie||{}),Ue(Ie),Me){var me=Ie.highlight,be;try{be=Se.lex(ke,Ie)}catch(Pe){return Me(Pe)}var De=function(Te){var Ve;if(!Te)try{Ie.walkTokens&&Be.walkTokens(be,Ie.walkTokens),Ve=Ee.parse(be,Ie)}catch(je){Te=je}return Ie.highlight=me,Te?Me(Te):Me(null,Ve)};if(!me||me.length<3||(delete Ie.highlight,!be.length))return De();var we=0;Be.walkTokens(be,function(Pe){Pe.type==="code"&&(we++,setTimeout(function(){me(Pe.text,Pe.lang,function(Te,Ve){if(Te)return De(Te);Ve!=null&&Ve!==Pe.text&&(Pe.text=Ve,Pe.escaped=!0),we--,we===0&&De()})},0))}),we===0&&De();return}try{var _e=Se.lex(ke,Ie);return Ie.walkTokens&&Be.walkTokens(_e,Ie.walkTokens),Ee.parse(_e,Ie)}catch(Pe){if(Pe.message+=`
Please report this to https://github.com/markedjs/marked.`,Ie.silent)return"<p>An error occurred:</p><pre>"+Le(Pe.message+"",!0)+"</pre>";throw Pe}}Be.options=Be.setOptions=function(ke){return We(Be.defaults,ke),Oe(Be.defaults),Be},Be.getDefaults=ye,Be.defaults=He,Be.use=function(){for(var ke=this,Ie=arguments.length,Me=new Array(Ie),me=0;me<Ie;me++)Me[me]=arguments[me];var be=We.apply(void 0,[{}].concat(Me)),De=Be.defaults.extensions||{renderers:{},childTokens:{}},we;Me.forEach(function(_e){if(_e.extensions&&(we=!0,_e.extensions.forEach(function(Te){if(!Te.name)throw new Error("extension name required");if(Te.renderer){var Ve=De.renderers?De.renderers[Te.name]:null;Ve?De.renderers[Te.name]=function(){for(var je=arguments.length,qe=new Array(je),Ge=0;Ge<je;Ge++)qe[Ge]=arguments[Ge];var Ze=Te.renderer.apply(this,qe);return Ze===!1&&(Ze=Ve.apply(this,qe)),Ze}:De.renderers[Te.name]=Te.renderer}if(Te.tokenizer){if(!Te.level||Te.level!=="block"&&Te.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");De[Te.level]?De[Te.level].unshift(Te.tokenizer):De[Te.level]=[Te.tokenizer],Te.start&&(Te.level==="block"?De.startBlock?De.startBlock.push(Te.start):De.startBlock=[Te.start]:Te.level==="inline"&&(De.startInline?De.startInline.push(Te.start):De.startInline=[Te.start]))}Te.childTokens&&(De.childTokens[Te.name]=Te.childTokens)})),_e.renderer&&function(){var Te=Be.defaults.renderer||new Ne,Ve=function(Ge){var Ze=Te[Ge];Te[Ge]=function(){for(var $e=arguments.length,Je=new Array($e),Ye=0;Ye<$e;Ye++)Je[Ye]=arguments[Ye];var et=_e.renderer[Ge].apply(Te,Je);return et===!1&&(et=Ze.apply(Te,Je)),et}};for(var je in _e.renderer)Ve(je);be.renderer=Te}(),_e.tokenizer&&function(){var Te=Be.defaults.tokenizer||new Ae,Ve=function(Ge){var Ze=Te[Ge];Te[Ge]=function(){for(var $e=arguments.length,Je=new Array($e),Ye=0;Ye<$e;Ye++)Je[Ye]=arguments[Ye];var et=_e.tokenizer[Ge].apply(Te,Je);return et===!1&&(et=Ze.apply(Te,Je)),et}};for(var je in _e.tokenizer)Ve(je);be.tokenizer=Te}(),_e.walkTokens){var Pe=Be.defaults.walkTokens;be.walkTokens=function(Te){_e.walkTokens.call(ke,Te),Pe&&Pe(Te)}}we&&(be.extensions=De),Be.setOptions(be)})},Be.walkTokens=function(ke,Ie){for(var Me=function(){var we=be.value;switch(Ie(we),we.type){case"table":{for(var _e=T(we.header),Pe;!(Pe=_e()).done;){var Te=Pe.value;Be.walkTokens(Te.tokens,Ie)}for(var Ve=T(we.rows),je;!(je=Ve()).done;)for(var qe=je.value,Ge=T(qe),Ze;!(Ze=Ge()).done;){var $e=Ze.value;Be.walkTokens($e.tokens,Ie)}break}case"list":{Be.walkTokens(we.items,Ie);break}default:Be.defaults.extensions&&Be.defaults.extensions.childTokens&&Be.defaults.extensions.childTokens[we.type]?Be.defaults.extensions.childTokens[we.type].forEach(function(Je){Be.walkTokens(we[Je],Ie)}):we.tokens&&Be.walkTokens(we.tokens,Ie)}},me=T(ke),be;!(be=me()).done;)Me()},Be.parseInline=function(ke,Ie){if(typeof ke=="undefined"||ke===null)throw new Error("marked.parseInline(): input parameter is undefined or null");if(typeof ke!="string")throw new Error("marked.parseInline(): input parameter is of type "+Object.prototype.toString.call(ke)+", string expected");Ie=We({},Be.defaults,Ie||{}),Ue(Ie);try{var Me=Se.lexInline(ke,Ie);return Ie.walkTokens&&Be.walkTokens(Me,Ie.walkTokens),Ee.parseInline(Me,Ie)}catch(me){if(me.message+=`
Please report this to https://github.com/markedjs/marked.`,Ie.silent)return"<p>An error occurred:</p><pre>"+Le(me.message+"",!0)+"</pre>";throw me}},Be.Parser=Ee,Be.parser=Ee.parse,Be.Renderer=Ne,Be.TextRenderer=ze,Be.Lexer=Se,Be.lexer=Se.lex,Be.Tokenizer=Ae,Be.Slugger=xe,Be.parse=Be;var Ke=Be;return Ke}),define(J[298],ee([0,1]),function(j,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ArrayNavigator=void 0;class w{constructor(T,D=0,S=T.length,p=D-1){this.items=T,this.start=D,this.end=S,this.index=p}current(){return this.index===this.start-1||this.index===this.end?null:this.items[this.index]}next(){return this.index=Math.min(this.index+1,this.end),this.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()}}e.ArrayNavigator=w}),define(J[299],ee([0,1,298]),function(j,e,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.HistoryNavigator=void 0;class N{constructor(D=[],S=10){this._initialize(D),this._limit=S,this._onChange()}getHistory(){return this._elements}add(D){this._history.delete(D),this._history.add(D),this._onChange()}next(){return this._currentPosition()!==this._elements.length-1?this._navigator.next():null}previous(){return this._currentPosition()!==0?this._navigator.previous():null}current(){return this._navigator.current()}first(){return this._navigator.first()}last(){return this._navigator.last()}has(D){return this._history.has(D)}_onChange(){this._reduceToLimit();const D=this._elements;this._navigator=new w.ArrayNavigator(D,0,D.length,D.length)}_reduceToLimit(){const D=this._elements;D.length>this._limit&&this._initialize(D.slice(D.length-this._limit))}_currentPosition(){const D=this._navigator.current();return D?this._elements.indexOf(D):-1}_initialize(D){this._history=new Set;for(const S of D)this._history.add(S)}get _elements(){const D=[];return this._history.forEach(S=>D.push(S)),D}}e.HistoryNavigator=N}),define(J[106],ee([0,1]),function(j,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MovingAverage=e.clamp=void 0;function w(T,D,S){return Math.min(Math.max(T,D),S)}e.clamp=w;class N{constructor(){this._n=1,this._val=0}update(D){return this._val=this._val+(D-this._val)/this._n,this._n+=1,this}get value(){return this._val}}e.MovingAverage=N}),define(J[17],ee([0,1]),function(j,e){"use strict";var w;Object.defineProperty(e,"__esModule",{value:!0}),e.isLittleEndian=e.OS=e.setImmediate=e.userAgent=e.isIOS=e.isWeb=e.isNative=e.isLinux=e.isMacintosh=e.isWindows=e.globals=void 0;const N="en";let T=!1,D=!1,S=!1,p=!1,C=!1,n=!1,g=!1,t,s=N,c,u;e.globals=typeof self=="object"?self:typeof global=="object"?global:{};let d;typeof e.globals.vscode!="undefined"&&typeof e.globals.vscode.process!="undefined"?d=e.globals.vscode.process:typeof process!="undefined"&&(d=process);const a=typeof((w=d==null?void 0:d.versions)===null||w===void 0?void 0:w.electron)=="string"&&d.type==="renderer";if(typeof navigator=="object"&&!a)u=navigator.userAgent,T=u.indexOf("Windows")>=0,D=u.indexOf("Macintosh")>=0,g=(u.indexOf("Macintosh")>=0||u.indexOf("iPad")>=0||u.indexOf("iPhone")>=0)&&!!navigator.maxTouchPoints&&navigator.maxTouchPoints>0,S=u.indexOf("Linux")>=0,n=!0,t=navigator.language,s=t;else if(typeof d=="object"){T=d.platform==="win32",D=d.platform==="darwin",S=d.platform==="linux",p=S&&!!d.env.SNAP&&!!d.env.SNAP_REVISION,t=N,s=N;const h=d.env.VSCODE_NLS_CONFIG;if(h)try{const f=JSON.parse(h),y=f.availableLanguages["*"];t=f.locale,s=y||N,c=f._translationsConfigFile}catch(f){}C=!0}else console.error("Unable to resolve platform.");let r=0;D?r=1:T?r=3:S&&(r=2),e.isWindows=T,e.isMacintosh=D,e.isLinux=S,e.isNative=C,e.isWeb=n,e.isIOS=g,e.userAgent=u,e.setImmediate=function(){if(e.globals.setImmediate)return e.globals.setImmediate.bind(e.globals);if(typeof e.globals.postMessage=="function"&&!e.globals.importScripts){let y=[];e.globals.addEventListener("message",b=>{if(b.data&&b.data.vscodeSetImmediateId)for(let v=0,m=y.length;v<m;v++){const E=y[v];if(E.id===b.data.vscodeSetImmediateId){y.splice(v,1),E.callback();return}}});let _=0;return b=>{const v=++_;y.push({id:v,callback:b}),e.globals.postMessage({vscodeSetImmediateId:v},"*")}}if(typeof(d==null?void 0:d.nextTick)=="function")return d.nextTick.bind(d);const f=Promise.resolve();return y=>f.then(y)}(),e.OS=D||g?2:T?1:3;let o=!0,i=!1;function l(){if(!i){i=!0;const h=new Uint8Array(2);h[0]=1,h[1]=2,o=new Uint16Array(h.buffer)[0]===(2<<8)+1}return o}e.isLittleEndian=l}),define(J[300],ee([0,1,17]),function(j,e,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.platform=e.env=e.cwd=void 0;let N;if(typeof w.globals.vscode!="undefined"&&typeof w.globals.vscode.process!="undefined"){const T=w.globals.vscode.process;N={get platform(){return T.platform},get arch(){return T.arch},get env(){return T.env},cwd(){return T.cwd()},nextTick(D){return(0,w.setImmediate)(D)}}}else typeof process!="undefined"?N={get platform(){return process.platform},get arch(){return process.arch},get env(){return process.env},cwd(){return process.env.VSCODE_CWD||process.cwd()},nextTick(T){return process.nextTick(T)}}:N={get platform(){return w.isWindows?"win32":w.isMacintosh?"darwin":"linux"},get arch(){},nextTick(T){return(0,w.setImmediate)(T)},get env(){return{}},cwd(){return"/"}};e.cwd=N.cwd,e.env=N.env,e.platform=N.platform}),define(J[75],ee([0,1,300]),function(j,e,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.sep=e.extname=e.basename=e.dirname=e.relative=e.resolve=e.normalize=e.posix=e.win32=void 0;const N=65,T=97,D=90,S=122,p=46,C=47,n=92,g=58,t=63;class s extends Error{constructor(l,h,f){let y;typeof h=="string"&&h.indexOf("not ")===0?(y="must not be",h=h.replace(/^not /,"")):y="must be";const _=l.indexOf(".")!==-1?"property":"argument";let b=`The "${l}" ${_} ${y} of type ${h}`;b+=`. Received type ${typeof f}`,super(b),this.code="ERR_INVALID_ARG_TYPE"}}function c(i,l){if(typeof i!="string")throw new s(l,"string",i)}function u(i){return i===C||i===n}function d(i){return i===C}function a(i){return i>=N&&i<=D||i>=T&&i<=S}function r(i,l,h,f){let y="",_=0,b=-1,v=0,m=0;for(let E=0;E<=i.length;++E){if(E<i.length)m=i.charCodeAt(E);else{if(f(m))break;m=C}if(f(m)){if(!(b===E-1||v===1))if(v===2){if(y.length<2||_!==2||y.charCodeAt(y.length-1)!==p||y.charCodeAt(y.length-2)!==p){if(y.length>2){const I=y.lastIndexOf(h);I===-1?(y="",_=0):(y=y.slice(0,I),_=y.length-1-y.lastIndexOf(h)),b=E,v=0;continue}else if(y.length!==0){y="",_=0,b=E,v=0;continue}}l&&(y+=y.length>0?`${h}..`:"..",_=2)}else y.length>0?y+=`${h}${i.slice(b+1,E)}`:y=i.slice(b+1,E),_=E-b-1;b=E,v=0}else m===p&&v!==-1?++v:v=-1}return y}function o(i,l){if(l===null||typeof l!="object")throw new s("pathObject","Object",l);const h=l.dir||l.root,f=l.base||`${l.name||""}${l.ext||""}`;return h?h===l.root?`${h}${f}`:`${h}${i}${f}`:f}e.win32={resolve(...i){let l="",h="",f=!1;for(let y=i.length-1;y>=-1;y--){let _;if(y>=0){if(_=i[y],c(_,"path"),_.length===0)continue}else l.length===0?_=w.cwd():(_=w.env[`=${l}`]||w.cwd(),(_===void 0||_.slice(0,2).toLowerCase()!==l.toLowerCase()&&_.charCodeAt(2)===n)&&(_=`${l}\\`));const b=_.length;let v=0,m="",E=!1;const I=_.charCodeAt(0);if(b===1)u(I)&&(v=1,E=!0);else if(u(I))if(E=!0,u(_.charCodeAt(1))){let k=2,M=k;for(;k<b&&!u(_.charCodeAt(k));)k++;if(k<b&&k!==M){const P=_.slice(M,k);for(M=k;k<b&&u(_.charCodeAt(k));)k++;if(k<b&&k!==M){for(M=k;k<b&&!u(_.charCodeAt(k));)k++;(k===b||k!==M)&&(m=`\\\\${P}\\${_.slice(M,k)}`,v=k)}}}else v=1;else a(I)&&_.charCodeAt(1)===g&&(m=_.slice(0,2),v=2,b>2&&u(_.charCodeAt(2))&&(E=!0,v=3));if(m.length>0)if(l.length>0){if(m.toLowerCase()!==l.toLowerCase())continue}else l=m;if(f){if(l.length>0)break}else if(h=`${_.slice(v)}\\${h}`,f=E,E&&l.length>0)break}return h=r(h,!f,"\\",u),f?`${l}\\${h}`:`${l}${h}`||"."},normalize(i){c(i,"path");const l=i.length;if(l===0)return".";let h=0,f,y=!1;const _=i.charCodeAt(0);if(l===1)return d(_)?"\\":i;if(u(_))if(y=!0,u(i.charCodeAt(1))){let v=2,m=v;for(;v<l&&!u(i.charCodeAt(v));)v++;if(v<l&&v!==m){const E=i.slice(m,v);for(m=v;v<l&&u(i.charCodeAt(v));)v++;if(v<l&&v!==m){for(m=v;v<l&&!u(i.charCodeAt(v));)v++;if(v===l)return`\\\\${E}\\${i.slice(m)}\\`;v!==m&&(f=`\\\\${E}\\${i.slice(m,v)}`,h=v)}}}else h=1;else a(_)&&i.charCodeAt(1)===g&&(f=i.slice(0,2),h=2,l>2&&u(i.charCodeAt(2))&&(y=!0,h=3));let b=h<l?r(i.slice(h),!y,"\\",u):"";return b.length===0&&!y&&(b="."),b.length>0&&u(i.charCodeAt(l-1))&&(b+="\\"),f===void 0?y?`\\${b}`:b:y?`${f}\\${b}`:`${f}${b}`},isAbsolute(i){c(i,"path");const l=i.length;if(l===0)return!1;const h=i.charCodeAt(0);return u(h)||l>2&&a(h)&&i.charCodeAt(1)===g&&u(i.charCodeAt(2))},join(...i){if(i.length===0)return".";let l,h;for(let _=0;_<i.length;++_){const b=i[_];c(b,"path"),b.length>0&&(l===void 0?l=h=b:l+=`\\${b}`)}if(l===void 0)return".";let f=!0,y=0;if(typeof h=="string"&&u(h.charCodeAt(0))){++y;const _=h.length;_>1&&u(h.charCodeAt(1))&&(++y,_>2&&(u(h.charCodeAt(2))?++y:f=!1))}if(f){for(;y<l.length&&u(l.charCodeAt(y));)y++;y>=2&&(l=`\\${l.slice(y)}`)}return e.win32.normalize(l)},relative(i,l){if(c(i,"from"),c(l,"to"),i===l)return"";const h=e.win32.resolve(i),f=e.win32.resolve(l);if(h===f||(i=h.toLowerCase(),l=f.toLowerCase(),i===l))return"";let y=0;for(;y<i.length&&i.charCodeAt(y)===n;)y++;let _=i.length;for(;_-1>y&&i.charCodeAt(_-1)===n;)_--;const b=_-y;let v=0;for(;v<l.length&&l.charCodeAt(v)===n;)v++;let m=l.length;for(;m-1>v&&l.charCodeAt(m-1)===n;)m--;const E=m-v,I=b<E?b:E;let k=-1,M=0;for(;M<I;M++){const F=i.charCodeAt(y+M);if(F!==l.charCodeAt(v+M))break;F===n&&(k=M)}if(M!==I){if(k===-1)return f}else{if(E>I){if(l.charCodeAt(v+M)===n)return f.slice(v+M+1);if(M===2)return f.slice(v+M)}b>I&&(i.charCodeAt(y+M)===n?k=M:M===2&&(k=3)),k===-1&&(k=0)}let P="";for(M=y+k+1;M<=_;++M)(M===_||i.charCodeAt(M)===n)&&(P+=P.length===0?"..":"\\..");return v+=k,P.length>0?`${P}${f.slice(v,m)}`:(f.charCodeAt(v)===n&&++v,f.slice(v,m))},toNamespacedPath(i){if(typeof i!="string")return i;if(i.length===0)return"";const l=e.win32.resolve(i);if(l.length<=2)return i;if(l.charCodeAt(0)===n){if(l.charCodeAt(1)===n){const h=l.charCodeAt(2);if(h!==t&&h!==p)return`\\\\?\\UNC\\${l.slice(2)}`}}else if(a(l.charCodeAt(0))&&l.charCodeAt(1)===g&&l.charCodeAt(2)===n)return`\\\\?\\${l}`;return i},dirname(i){c(i,"path");const l=i.length;if(l===0)return".";let h=-1,f=0;const y=i.charCodeAt(0);if(l===1)return u(y)?i:".";if(u(y)){if(h=f=1,u(i.charCodeAt(1))){let v=2,m=v;for(;v<l&&!u(i.charCodeAt(v));)v++;if(v<l&&v!==m){for(m=v;v<l&&u(i.charCodeAt(v));)v++;if(v<l&&v!==m){for(m=v;v<l&&!u(i.charCodeAt(v));)v++;if(v===l)return i;v!==m&&(h=f=v+1)}}}}else a(y)&&i.charCodeAt(1)===g&&(h=l>2&&u(i.charCodeAt(2))?3:2,f=h);let _=-1,b=!0;for(let v=l-1;v>=f;--v)if(u(i.charCodeAt(v))){if(!b){_=v;break}}else b=!1;if(_===-1){if(h===-1)return".";_=h}return i.slice(0,_)},basename(i,l){l!==void 0&&c(l,"ext"),c(i,"path");let h=0,f=-1,y=!0,_;if(i.length>=2&&a(i.charCodeAt(0))&&i.charCodeAt(1)===g&&(h=2),l!==void 0&&l.length>0&&l.length<=i.length){if(l===i)return"";let b=l.length-1,v=-1;for(_=i.length-1;_>=h;--_){const m=i.charCodeAt(_);if(u(m)){if(!y){h=_+1;break}}else v===-1&&(y=!1,v=_+1),b>=0&&(m===l.charCodeAt(b)?--b==-1&&(f=_):(b=-1,f=v))}return h===f?f=v:f===-1&&(f=i.length),i.slice(h,f)}for(_=i.length-1;_>=h;--_)if(u(i.charCodeAt(_))){if(!y){h=_+1;break}}else f===-1&&(y=!1,f=_+1);return f===-1?"":i.slice(h,f)},extname(i){c(i,"path");let l=0,h=-1,f=0,y=-1,_=!0,b=0;i.length>=2&&i.charCodeAt(1)===g&&a(i.charCodeAt(0))&&(l=f=2);for(let v=i.length-1;v>=l;--v){const m=i.charCodeAt(v);if(u(m)){if(!_){f=v+1;break}continue}y===-1&&(_=!1,y=v+1),m===p?h===-1?h=v:b!==1&&(b=1):h!==-1&&(b=-1)}return h===-1||y===-1||b===0||b===1&&h===y-1&&h===f+1?"":i.slice(h,y)},format:o.bind(null,"\\"),parse(i){c(i,"path");const l={root:"",dir:"",base:"",ext:"",name:""};if(i.length===0)return l;const h=i.length;let f=0,y=i.charCodeAt(0);if(h===1)return u(y)?(l.root=l.dir=i,l):(l.base=l.name=i,l);if(u(y)){if(f=1,u(i.charCodeAt(1))){let k=2,M=k;for(;k<h&&!u(i.charCodeAt(k));)k++;if(k<h&&k!==M){for(M=k;k<h&&u(i.charCodeAt(k));)k++;if(k<h&&k!==M){for(M=k;k<h&&!u(i.charCodeAt(k));)k++;k===h?f=k:k!==M&&(f=k+1)}}}}else if(a(y)&&i.charCodeAt(1)===g){if(h<=2)return l.root=l.dir=i,l;if(f=2,u(i.charCodeAt(2))){if(h===3)return l.root=l.dir=i,l;f=3}}f>0&&(l.root=i.slice(0,f));let _=-1,b=f,v=-1,m=!0,E=i.length-1,I=0;for(;E>=f;--E){if(y=i.charCodeAt(E),u(y)){if(!m){b=E+1;break}continue}v===-1&&(m=!1,v=E+1),y===p?_===-1?_=E:I!==1&&(I=1):_!==-1&&(I=-1)}return v!==-1&&(_===-1||I===0||I===1&&_===v-1&&_===b+1?l.base=l.name=i.slice(b,v):(l.name=i.slice(b,_),l.base=i.slice(b,v),l.ext=i.slice(_,v))),b>0&&b!==f?l.dir=i.slice(0,b-1):l.dir=l.root,l},sep:"\\",delimiter:";",win32:null,posix:null},e.posix={resolve(...i){let l="",h=!1;for(let f=i.length-1;f>=-1&&!h;f--){const y=f>=0?i[f]:w.cwd();c(y,"path"),y.length!==0&&(l=`${y}/${l}`,h=y.charCodeAt(0)===C)}return l=r(l,!h,"/",d),h?`/${l}`:l.length>0?l:"."},normalize(i){if(c(i,"path"),i.length===0)return".";const l=i.charCodeAt(0)===C,h=i.charCodeAt(i.length-1)===C;return i=r(i,!l,"/",d),i.length===0?l?"/":h?"./":".":(h&&(i+="/"),l?`/${i}`:i)},isAbsolute(i){return c(i,"path"),i.length>0&&i.charCodeAt(0)===C},join(...i){if(i.length===0)return".";let l;for(let h=0;h<i.length;++h){const f=i[h];c(f,"path"),f.length>0&&(l===void 0?l=f:l+=`/${f}`)}return l===void 0?".":e.posix.normalize(l)},relative(i,l){if(c(i,"from"),c(l,"to"),i===l||(i=e.posix.resolve(i),l=e.posix.resolve(l),i===l))return"";const h=1,f=i.length,y=f-h,_=1,b=l.length-_,v=y<b?y:b;let m=-1,E=0;for(;E<v;E++){const k=i.charCodeAt(h+E);if(k!==l.charCodeAt(_+E))break;k===C&&(m=E)}if(E===v)if(b>v){if(l.charCodeAt(_+E)===C)return l.slice(_+E+1);if(E===0)return l.slice(_+E)}else y>v&&(i.charCodeAt(h+E)===C?m=E:E===0&&(m=0));let I="";for(E=h+m+1;E<=f;++E)(E===f||i.charCodeAt(E)===C)&&(I+=I.length===0?"..":"/..");return`${I}${l.slice(_+m)}`},toNamespacedPath(i){return i},dirname(i){if(c(i,"path"),i.length===0)return".";const l=i.charCodeAt(0)===C;let h=-1,f=!0;for(let y=i.length-1;y>=1;--y)if(i.charCodeAt(y)===C){if(!f){h=y;break}}else f=!1;return h===-1?l?"/":".":l&&h===1?"//":i.slice(0,h)},basename(i,l){l!==void 0&&c(l,"ext"),c(i,"path");let h=0,f=-1,y=!0,_;if(l!==void 0&&l.length>0&&l.length<=i.length){if(l===i)return"";let b=l.length-1,v=-1;for(_=i.length-1;_>=0;--_){const m=i.charCodeAt(_);if(m===C){if(!y){h=_+1;break}}else v===-1&&(y=!1,v=_+1),b>=0&&(m===l.charCodeAt(b)?--b==-1&&(f=_):(b=-1,f=v))}return h===f?f=v:f===-1&&(f=i.length),i.slice(h,f)}for(_=i.length-1;_>=0;--_)if(i.charCodeAt(_)===C){if(!y){h=_+1;break}}else f===-1&&(y=!1,f=_+1);return f===-1?"":i.slice(h,f)},extname(i){c(i,"path");let l=-1,h=0,f=-1,y=!0,_=0;for(let b=i.length-1;b>=0;--b){const v=i.charCodeAt(b);if(v===C){if(!y){h=b+1;break}continue}f===-1&&(y=!1,f=b+1),v===p?l===-1?l=b:_!==1&&(_=1):l!==-1&&(_=-1)}return l===-1||f===-1||_===0||_===1&&l===f-1&&l===h+1?"":i.slice(l,f)},format:o.bind(null,"/"),parse(i){c(i,"path");const l={root:"",dir:"",base:"",ext:"",name:""};if(i.length===0)return l;const h=i.charCodeAt(0)===C;let f;h?(l.root="/",f=1):f=0;let y=-1,_=0,b=-1,v=!0,m=i.length-1,E=0;for(;m>=f;--m){const I=i.charCodeAt(m);if(I===C){if(!v){_=m+1;break}continue}b===-1&&(v=!1,b=m+1),I===p?y===-1?y=m:E!==1&&(E=1):y!==-1&&(E=-1)}if(b!==-1){const I=_===0&&h?1:_;y===-1||E===0||E===1&&y===b-1&&y===_+1?l.base=l.name=i.slice(I,b):(l.name=i.slice(I,y),l.base=i.slice(I,b),l.ext=i.slice(y,b))}return _>0?l.dir=i.slice(0,_-1):h&&(l.dir="/"),l},sep:"/",delimiter:":",win32:null,posix:null},e.posix.win32=e.win32.win32=e.win32,e.posix.posix=e.win32.posix=e.posix,e.normalize=w.platform==="win32"?e.win32.normalize:e.posix.normalize,e.resolve=w.platform==="win32"?e.win32.resolve:e.posix.resolve,e.relative=w.platform==="win32"?e.win32.relative:e.posix.relative,e.dirname=w.platform==="win32"?e.win32.dirname:e.posix.dirname,e.basename=w.platform==="win32"?e.win32.basename:e.posix.basename,e.extname=w.platform==="win32"?e.win32.extname:e.posix.extname,e.sep=w.platform==="win32"?e.win32.sep:e.posix.sep}),define(J[132],ee([0,1]),function(j,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Range=void 0;var w;(function(N){function T(C,n){if(C.start>=n.end||n.start>=C.end)return{start:0,end:0};const g=Math.max(C.start,n.start),t=Math.min(C.end,n.end);return t-g<=0?{start:0,end:0}:{start:g,end:t}}N.intersect=T;function D(C){return C.end-C.start<=0}N.isEmpty=D;function S(C,n){return!D(T(C,n))}N.intersects=S;function p(C,n){const g=[],t={start:C.start,end:Math.min(n.start,C.end)},s={start:Math.max(n.end,C.start),end:C.end};return D(t)||g.push(t),D(s)||g.push(s),g}N.relativeComplement=p})(w=e.Range||(e.Range={}))}),define(J[301],ee([0,1,132]),function(j,e,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.RangeMap=e.consolidate=e.shift=e.groupIntersect=void 0;function N(C,n){const g=[];for(let t of n){if(C.start>=t.range.end)continue;if(C.end<t.range.start)break;const s=w.Range.intersect(C,t.range);w.Range.isEmpty(s)||g.push({range:s,size:t.size})}return g}e.groupIntersect=N;function T({start:C,end:n},g){return{start:C+g,end:n+g}}e.shift=T;function D(C){const n=[];let g=null;for(let t of C){const s=t.range.start,c=t.range.end,u=t.size;if(g&&u===g.size){g.range.end=c;continue}g={range:{start:s,end:c},size:u},n.push(g)}return n}e.consolidate=D;function S(...C){return D(C.reduce((n,g)=>n.concat(g),[]))}class p{constructor(){this.groups=[],this._size=0}splice(n,g,t=[]){const s=t.length-g,c=N({start:0,end:n},this.groups),u=N({start:n+g,end:Number.POSITIVE_INFINITY},this.groups).map(a=>({range:T(a.range,s),size:a.size})),d=t.map((a,r)=>({range:{start:n+r,end:n+r+1},size:a.size}));this.groups=S(c,d,u),this._size=this.groups.reduce((a,r)=>a+r.size*(r.range.end-r.range.start),0)}get count(){const n=this.groups.length;return n?this.groups[n-1].range.end:0}get size(){return this._size}indexAt(n){if(n<0)return-1;let g=0,t=0;for(let s of this.groups){const c=s.range.end-s.range.start,u=t+c*s.size;if(n<u)return g+Math.floor((n-t)/s.size);g+=c,t=u}return g}indexAfter(n){return Math.min(this.indexAt(n)+1,this.count)}positionAt(n){if(n<0)return-1;let g=0,t=0;for(let s of this.groups){const c=s.range.end-s.range.start,u=t+c;if(n<u)return g+(n-t)*s.size;g+=c*s.size,t=u}return-1}}e.RangeMap=p}),define(J[83],ee([0,1,17]),function(j,e,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.StopWatch=void 0;const N=w.globals.performance&&typeof w.globals.performance.now=="function";class T{constructor(S){this._highResolution=N&&S,this._startTime=this._now(),this._stopTime=-1}static create(S=!0){return new T(S)}stop(){this._stopTime=this._now()}elapsed(){return this._stopTime!==-1?this._stopTime-this._startTime:this._now()-this._startTime}_now(){return this._highResolution?w.globals.performance.now():Date.now()}}e.StopWatch=T}),define(J[4],ee([0,1,11,2,74,83]),function(j,e,w,N,T,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Relay=e.EventBufferer=e.DebounceEmitter=e.PauseableEmitter=e.Emitter=e.Event=void 0;var S;(function(d){d.None=()=>N.Disposable.None;function a(F){return(R,A=null,O)=>{let L=!1,B;return B=F(W=>{if(!L)return B?B.dispose():L=!0,R.call(A,W)},null,O),L&&B.dispose(),B}}d.once=a;function r(F,R){return y((A,O=null,L)=>F(B=>A.call(O,R(B)),null,L))}d.map=r;function o(F,R){return y((A,O=null,L)=>F(B=>{R(B),A.call(O,B)},null,L))}d.forEach=o;function i(F,R){return y((A,O=null,L)=>F(B=>R(B)&&A.call(O,B),null,L))}d.filter=i;function l(F){return F}d.signal=l;function h(...F){return(R,A=null,O)=>(0,N.combinedDisposable)(...F.map(L=>L(B=>R.call(A,B),null,O)))}d.any=h;function f(F,R,A){let O=A;return r(F,L=>(O=R(O,L),O))}d.reduce=f;function y(F){let R;const A=new g({onFirstListenerAdd(){R=F(A.fire,A)},onLastListenerRemove(){R.dispose()}});return A.event}function _(F,R,A=100,O=!1,L){let B,W,K,H=0;const Y=new g({leakWarningThreshold:L,onFirstListenerAdd(){B=F(X=>{H++,W=R(W,X),O&&!K&&(Y.fire(W),W=void 0),clearTimeout(K),K=setTimeout(()=>{const Z=W;W=void 0,K=void 0,(!O||H>1)&&Y.fire(Z),H=0},A)})},onLastListenerRemove(){B.dispose()}});return Y.event}d.debounce=_;function b(F,R=(A,O)=>A===O){let A=!0,O;return i(F,L=>{const B=A||!R(L,O);return A=!1,O=L,B})}d.latch=b;function v(F,R){return[d.filter(F,R),d.filter(F,A=>!R(A))]}d.split=v;function m(F,R=!1,A=[]){let O=A.slice(),L=F(K=>{O?O.push(K):W.fire(K)});const B=()=>{O&&O.forEach(K=>W.fire(K)),O=null},W=new g({onFirstListenerAdd(){L||(L=F(K=>W.fire(K)))},onFirstListenerDidAdd(){O&&(R?setTimeout(B):B())},onLastListenerRemove(){L&&L.dispose(),L=null}});return W.event}d.buffer=m;class E{constructor(R){this.event=R}map(R){return new E(r(this.event,R))}forEach(R){return new E(o(this.event,R))}filter(R){return new E(i(this.event,R))}reduce(R,A){return new E(f(this.event,R,A))}latch(){return new E(b(this.event))}debounce(R,A=100,O=!1,L){return new E(_(this.event,R,A,O,L))}on(R,A,O){return this.event(R,A,O)}once(R,A,O){return a(this.event)(R,A,O)}}function I(F){return new E(F)}d.chain=I;function k(F,R,A=O=>O){const O=(...K)=>W.fire(A(...K)),L=()=>F.on(R,O),B=()=>F.removeListener(R,O),W=new g({onFirstListenerAdd:L,onLastListenerRemove:B});return W.event}d.fromNodeEventEmitter=k;function M(F,R,A=O=>O){const O=(...K)=>W.fire(A(...K)),L=()=>F.addEventListener(R,O),B=()=>F.removeEventListener(R,O),W=new g({onFirstListenerAdd:L,onLastListenerRemove:B});return W.event}d.fromDOMEventEmitter=M;function P(F){return new Promise(R=>a(F)(R))}d.toPromise=P})(S=e.Event||(e.Event={}));class p{constructor(a){this._listenerCount=0,this._invocationCount=0,this._elapsedOverall=0,this._name=`${a}_${p._idPool++}`}start(a){this._stopWatch=new D.StopWatch(!0),this._listenerCount=a}stop(){if(this._stopWatch){const a=this._stopWatch.elapsed();this._elapsedOverall+=a,this._invocationCount+=1,console.info(`did FIRE ${this._name}: elapsed_ms: ${a.toFixed(5)}, listener: ${this._listenerCount} (elapsed_overall: ${this._elapsedOverall.toFixed(2)}, invocations: ${this._invocationCount})`),this._stopWatch=void 0}}}p._idPool=0;let C=-1;class n{constructor(a,r=Math.random().toString(18).slice(2,5)){this.customThreshold=a,this.name=r,this._warnCountdown=0}dispose(){this._stacks&&this._stacks.clear()}check(a){let r=C;if(typeof this.customThreshold=="number"&&(r=this.customThreshold),r<=0||a<r)return;this._stacks||(this._stacks=new Map);const o=new Error().stack.split(`
`).slice(3).join(`
`),i=this._stacks.get(o)||0;if(this._stacks.set(o,i+1),this._warnCountdown-=1,this._warnCountdown<=0){this._warnCountdown=r*.5;let l,h=0;for(const[f,y]of this._stacks)(!l||h<y)&&(l=f,h=y);console.warn(`[${this.name}] potential listener LEAK detected, having ${a} listeners already. MOST frequent listener (${h}):`),console.warn(l)}return()=>{const l=this._stacks.get(o)||0;this._stacks.set(o,l-1)}}}class g{constructor(a){var r;this._disposed=!1,this._options=a,this._leakageMon=C>0?new n(this._options&&this._options.leakWarningThreshold):void 0,this._perfMon=((r=this._options)===null||r===void 0?void 0:r._profName)?new p(this._options._profName):void 0}get event(){return this._event||(this._event=(a,r,o)=>{var i;this._listeners||(this._listeners=new T.LinkedList);const l=this._listeners.isEmpty();l&&this._options&&this._options.onFirstListenerAdd&&this._options.onFirstListenerAdd(this);const h=this._listeners.push(r?[a,r]:a);l&&this._options&&this._options.onFirstListenerDidAdd&&this._options.onFirstListenerDidAdd(this),this._options&&this._options.onListenerDidAdd&&this._options.onListenerDidAdd(this,a,r);const f=(i=this._leakageMon)===null||i===void 0?void 0:i.check(this._listeners.size),y=(0,N.toDisposable)(()=>{f&&f(),this._disposed||(h(),this._options&&this._options.onLastListenerRemove&&(this._listeners&&!this._listeners.isEmpty()||this._options.onLastListenerRemove(this)))});return o instanceof N.DisposableStore?o.add(y):Array.isArray(o)&&o.push(y),y}),this._event}fire(a){var r,o;if(this._listeners){this._deliveryQueue||(this._deliveryQueue=new T.LinkedList);for(let i of this._listeners)this._deliveryQueue.push([i,a]);for((r=this._perfMon)===null||r===void 0||r.start(this._deliveryQueue.size);this._deliveryQueue.size>0;){const[i,l]=this._deliveryQueue.shift();try{typeof i=="function"?i.call(void 0,l):i[0].call(i[1],l)}catch(h){(0,w.onUnexpectedError)(h)}}(o=this._perfMon)===null||o===void 0||o.stop()}}dispose(){var a,r,o,i,l;this._disposed||(this._disposed=!0,(a=this._listeners)===null||a===void 0||a.clear(),(r=this._deliveryQueue)===null||r===void 0||r.clear(),(i=(o=this._options)===null||o===void 0?void 0:o.onLastListenerRemove)===null||i===void 0||i.call(o),(l=this._leakageMon)===null||l===void 0||l.dispose())}}e.Emitter=g;class t extends g{constructor(a){super(a);this._isPaused=0,this._eventQueue=new T.LinkedList,this._mergeFn=a==null?void 0:a.merge}pause(){this._isPaused++}resume(){if(this._isPaused!==0&&--this._isPaused==0)if(this._mergeFn){const a=Array.from(this._eventQueue);this._eventQueue.clear(),super.fire(this._mergeFn(a))}else for(;!this._isPaused&&this._eventQueue.size!==0;)super.fire(this._eventQueue.shift())}fire(a){this._listeners&&(this._isPaused!==0?this._eventQueue.push(a):super.fire(a))}}e.PauseableEmitter=t;class s extends t{constructor(a){var r;super(a);this._delay=(r=a.delay)!==null&&r!==void 0?r:100}fire(a){this._handle||(this.pause(),this._handle=setTimeout(()=>{this._handle=void 0,this.resume()},this._delay)),super.fire(a)}}e.DebounceEmitter=s;class c{constructor(){this.buffers=[]}wrapEvent(a){return(r,o,i)=>a(l=>{const h=this.buffers[this.buffers.length-1];h?h.push(()=>r.call(o,l)):r.call(o,l)},void 0,i)}bufferEvents(a){const r=[];this.buffers.push(r);const o=a();return this.buffers.pop(),r.forEach(i=>i()),o}}e.EventBufferer=c;class u{constructor(){this.listening=!1,this.inputEvent=S.None,this.inputEventListener=N.Disposable.None,this.emitter=new g({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(a){this.inputEvent=a,this.listening&&(this.inputEventListener.dispose(),this.inputEventListener=a(this.emitter.fire,this.emitter))}dispose(){this.inputEventListener.dispose(),this.emitter.dispose()}}e.Relay=u}),define(J[34],ee([0,1,4]),function(j,e,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.isStandalone=e.isAndroid=e.isWebkitWebView=e.isSafari=e.isChrome=e.isWebKit=e.isFirefox=e.getPixelRatio=e.getZoomFactor=e.onDidChangeZoomLevel=e.getTimeSinceLastZoomLevelChanged=e.getZoomLevel=void 0;class N{constructor(){this._zoomLevel=0,this._lastZoomLevelChangeTime=0,this._onDidChangeZoomLevel=new w.Emitter,this.onDidChangeZoomLevel=this._onDidChangeZoomLevel.event,this._zoomFactor=1}getZoomLevel(){return this._zoomLevel}getTimeSinceLastZoomLevelChanged(){return Date.now()-this._lastZoomLevelChangeTime}getZoomFactor(){return this._zoomFactor}getPixelRatio(){let t=document.createElement("canvas").getContext("2d"),s=window.devicePixelRatio||1,c=t.webkitBackingStorePixelRatio||t.mozBackingStorePixelRatio||t.msBackingStorePixelRatio||t.oBackingStorePixelRatio||t.backingStorePixelRatio||1;return s/c}}N.INSTANCE=new N;function T(){return N.INSTANCE.getZoomLevel()}e.getZoomLevel=T;function D(){return N.INSTANCE.getTimeSinceLastZoomLevelChanged()}e.getTimeSinceLastZoomLevelChanged=D;function S(g){return N.INSTANCE.onDidChangeZoomLevel(g)}e.onDidChangeZoomLevel=S;function p(){return N.INSTANCE.getZoomFactor()}e.getZoomFactor=p;function C(){return N.INSTANCE.getPixelRatio()}e.getPixelRatio=C;const n=navigator.userAgent;e.isFirefox=n.indexOf("Firefox")>=0,e.isWebKit=n.indexOf("AppleWebKit")>=0,e.isChrome=n.indexOf("Chrome")>=0,e.isSafari=!e.isChrome&&n.indexOf("Safari")>=0,e.isWebkitWebView=!e.isChrome&&!e.isSafari&&e.isWebKit,e.isAndroid=n.indexOf("Android")>=0,e.isStandalone=window.matchMedia&&window.matchMedia("(display-mode: standalone)").matches}),define(J[161],ee([0,1,34,17]),function(j,e,w,N){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BrowserFeatures=void 0,e.BrowserFeatures={clipboard:{writeText:N.isNative||document.queryCommandSupported&&document.queryCommandSupported("copy")||!!(navigator&&navigator.clipboard&&navigator.clipboard.writeText),readText:N.isNative||!!(navigator&&navigator.clipboard&&navigator.clipboard.readText)},keyboard:(()=>N.isNative||w.isStandalone?0:navigator.keyboard||w.isSafari?1:2)(),touch:"ontouchstart"in window||navigator.maxTouchPoints>0,pointerEvents:window.PointerEvent&&("ontouchstart"in window||window.navigator.maxTouchPoints>0||navigator.maxTouchPoints>0)}}),define(J[94],ee([0,1,4]),function(j,e,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.stopEvent=e.DomEmitter=void 0;class N{constructor(S,p,C){const n=g=>this.emitter.fire(g);this.emitter=new w.Emitter({onFirstListenerAdd:()=>S.addEventListener(p,n,C),onLastListenerRemove:()=>S.removeEventListener(p,n,C)})}get event(){return this.emitter.event}dispose(){this.emitter.dispose()}}e.DomEmitter=N;function T(D){return D.preventDefault(),D.stopPropagation(),D}e.stopEvent=T}),define(J[52],ee([0,1,34,55,93,17]),function(j,e,w,N,T,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.StandardKeyboardEvent=void 0;function S(s){if(s.charCode){let u=String.fromCharCode(s.charCode).toUpperCase();return N.KeyCodeUtils.fromString(u)}const c=s.keyCode;if(c===3)return 7;if(w.isFirefox){if(c===59)return 80;if(c===107)return 81;if(c===109)return 83;if(D.isMacintosh&&c===224)return 57}else if(w.isWebKit){if(c===91)return 57;if(D.isMacintosh&&c===93)return 57;if(!D.isMacintosh&&c===92)return 57}return N.EVENT_KEY_CODE_MAP[c]||0}const p=D.isMacintosh?256:2048,C=512,n=1024,g=D.isMacintosh?2048:256;class t{constructor(c){this._standardKeyboardEventBrand=!0;let u=c;this.browserEvent=u,this.target=u.target,this.ctrlKey=u.ctrlKey,this.shiftKey=u.shiftKey,this.altKey=u.altKey,this.metaKey=u.metaKey,this.keyCode=S(u),this.code=u.code,this.ctrlKey=this.ctrlKey||this.keyCode===5,this.altKey=this.altKey||this.keyCode===6,this.shiftKey=this.shiftKey||this.keyCode===4,this.metaKey=this.metaKey||this.keyCode===57,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(c){return this._asKeybinding===c}_computeKeybinding(){let c=0;this.keyCode!==5&&this.keyCode!==4&&this.keyCode!==6&&this.keyCode!==57&&(c=this.keyCode);let u=0;return this.ctrlKey&&(u|=p),this.altKey&&(u|=C),this.shiftKey&&(u|=n),this.metaKey&&(u|=g),u|=c,u}_computeRuntimeKeybinding(){let c=0;return this.keyCode!==5&&this.keyCode!==4&&this.keyCode!==6&&this.keyCode!==57&&(c=this.keyCode),new T.SimpleKeybinding(this.ctrlKey,this.shiftKey,this.altKey,this.metaKey,c)}}e.StandardKeyboardEvent=t}),define(J[56],ee([0,1,34,204,17]),function(j,e,w,N,T){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.StandardWheelEvent=e.StandardMouseEvent=void 0;class D{constructor(C){this.timestamp=Date.now(),this.browserEvent=C,this.leftButton=C.button===0,this.middleButton=C.button===1,this.rightButton=C.button===2,this.buttons=C.buttons,this.target=C.target,this.detail=C.detail||1,C.type==="dblclick"&&(this.detail=2),this.ctrlKey=C.ctrlKey,this.shiftKey=C.shiftKey,this.altKey=C.altKey,this.metaKey=C.metaKey,typeof C.pageX=="number"?(this.posx=C.pageX,this.posy=C.pageY):(this.posx=C.clientX+document.body.scrollLeft+document.documentElement.scrollLeft,this.posy=C.clientY+document.body.scrollTop+document.documentElement.scrollTop);let n=N.IframeUtils.getPositionOfChildWindowRelativeToAncestorWindow(self,C.view);this.posx-=n.left,this.posy-=n.top}preventDefault(){this.browserEvent.preventDefault()}stopPropagation(){this.browserEvent.stopPropagation()}}e.StandardMouseEvent=D;class S{constructor(C,n=0,g=0){if(this.browserEvent=C||null,this.target=C?C.target||C.targetNode||C.srcElement:null,this.deltaY=g,this.deltaX=n,C){let t=C,s=C;if(typeof t.wheelDeltaY!="undefined")this.deltaY=t.wheelDeltaY/120;else if(typeof s.VERTICAL_AXIS!="undefined"&&s.axis===s.VERTICAL_AXIS)this.deltaY=-s.detail/3;else if(C.type==="wheel"){const c=C;c.deltaMode===c.DOM_DELTA_LINE?w.isFirefox&&!T.isMacintosh?this.deltaY=-C.deltaY/3:this.deltaY=-C.deltaY:this.deltaY=-C.deltaY/40}if(typeof t.wheelDeltaX!="undefined")w.isSafari&&T.isWindows?this.deltaX=-(t.wheelDeltaX/120):this.deltaX=t.wheelDeltaX/120;else if(typeof s.HORIZONTAL_AXIS!="undefined"&&s.axis===s.HORIZONTAL_AXIS)this.deltaX=-C.detail/3;else if(C.type==="wheel"){const c=C;c.deltaMode===c.DOM_DELTA_LINE?w.isFirefox&&!T.isMacintosh?this.deltaX=-C.deltaX/3:this.deltaX=-C.deltaX:this.deltaX=-C.deltaX/40}this.deltaY===0&&this.deltaX===0&&C.wheelDelta&&(this.deltaY=C.wheelDelta/120)}}preventDefault(){this.browserEvent&&this.browserEvent.preventDefault()}stopPropagation(){this.browserEvent&&this.browserEvent.stopPropagation()}}e.StandardWheelEvent=S}),define(J[23],ee([0,1,4]),function(j,e,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CancellationTokenSource=e.CancellationToken=void 0;const N=Object.freeze(function(p,C){const n=setTimeout(p.bind(C),0);return{dispose(){clearTimeout(n)}}});var T;(function(p){function C(n){return n===p.None||n===p.Cancelled||n instanceof D?!0:!n||typeof n!="object"?!1:typeof n.isCancellationRequested=="boolean"&&typeof n.onCancellationRequested=="function"}p.isCancellationToken=C,p.None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:w.Event.None}),p.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:N})})(T=e.CancellationToken||(e.CancellationToken={}));class D{constructor(){this._isCancelled=!1,this._emitter=null}cancel(){this._isCancelled||(this._isCancelled=!0,this._emitter&&(this._emitter.fire(void 0),this.dispose()))}get isCancellationRequested(){return this._isCancelled}get onCancellationRequested(){return this._isCancelled?N:(this._emitter||(this._emitter=new w.Emitter),this._emitter.event)}dispose(){this._emitter&&(this._emitter.dispose(),this._emitter=null)}}class S{constructor(C){this._token=void 0,this._parentListener=void 0,this._parentListener=C&&C.onCancellationRequested(this.cancel,this)}get token(){return this._token||(this._token=new D),this._token}cancel(){this._token?this._token instanceof D&&this._token.cancel():this._token=T.Cancelled}dispose(C=!1){C&&this.cancel(),this._parentListener&&this._parentListener.dispose(),this._token?this._token instanceof D&&this._token.dispose():this._token=T.None}}e.CancellationTokenSource=S});var Re=this&&this.__awaiter||function(j,e,w,N){function T(D){return D instanceof w?D:new w(function(S){S(D)})}return new(w||(w=Promise))(function(D,S){function p(g){try{n(N.next(g))}catch(t){S(t)}}function C(g){try{n(N.throw(g))}catch(t){S(t)}}function n(g){g.done?D(g.value):T(g.value).then(p,C)}n((N=N.apply(j,e||[])).next())})};define(J[14],ee([0,1,23,11,2]),function(j,e,w,N,T){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Promises=e.IdleValue=e.runWhenIdle=e.RunOnceScheduler=e.IntervalTimer=e.TimeoutTimer=e.first=e.disposableTimeout=e.timeout=e.ThrottledDelayer=e.Delayer=e.Throttler=e.raceCancellation=e.createCancelablePromise=e.isThenable=void 0;function D(i){return!!i&&typeof i.then=="function"}e.isThenable=D;function S(i){const l=new w.CancellationTokenSource,h=i(l.token),f=new Promise((y,_)=>{const b=l.token.onCancellationRequested(()=>{b.dispose(),l.dispose(),_((0,N.canceled)())});Promise.resolve(h).then(v=>{b.dispose(),l.dispose(),y(v)},v=>{b.dispose(),l.dispose(),_(v)})});return new class{cancel(){l.cancel()}then(y,_){return f.then(y,_)}catch(y){return this.then(void 0,y)}finally(y){return f.finally(y)}}}e.createCancelablePromise=S;function p(i,l,h){return Promise.race([i,new Promise(f=>l.onCancellationRequested(()=>f(h)))])}e.raceCancellation=p;class C{constructor(){this.activePromise=null,this.queuedPromise=null,this.queuedPromiseFactory=null}queue(l){if(this.activePromise){if(this.queuedPromiseFactory=l,!this.queuedPromise){const h=()=>{this.queuedPromise=null;const f=this.queue(this.queuedPromiseFactory);return this.queuedPromiseFactory=null,f};this.queuedPromise=new Promise(f=>{this.activePromise.then(h,h).then(f)})}return new Promise((h,f)=>{this.queuedPromise.then(h,f)})}return this.activePromise=l(),new Promise((h,f)=>{this.activePromise.then(y=>{this.activePromise=null,h(y)},y=>{this.activePromise=null,f(y)})})}}e.Throttler=C;class n{constructor(l){this.defaultDelay=l,this.timeout=null,this.completionPromise=null,this.doResolve=null,this.doReject=null,this.task=null}trigger(l,h=this.defaultDelay){return this.task=l,this.cancelTimeout(),this.completionPromise||(this.completionPromise=new Promise((f,y)=>{this.doResolve=f,this.doReject=y}).then(()=>{if(this.completionPromise=null,this.doResolve=null,this.task){const f=this.task;return this.task=null,f()}})),this.timeout=setTimeout(()=>{this.timeout=null,this.doResolve&&this.doResolve(null)},h),this.completionPromise}isTriggered(){return this.timeout!==null}cancel(){this.cancelTimeout(),this.completionPromise&&(this.doReject&&this.doReject((0,N.canceled)()),this.completionPromise=null)}cancelTimeout(){this.timeout!==null&&(clearTimeout(this.timeout),this.timeout=null)}dispose(){this.cancel()}}e.Delayer=n;class g{constructor(l){this.delayer=new n(l),this.throttler=new C}trigger(l,h){return this.delayer.trigger(()=>this.throttler.queue(l),h)}dispose(){this.delayer.dispose()}}e.ThrottledDelayer=g;function t(i,l){return l?new Promise((h,f)=>{const y=setTimeout(()=>{_.dispose(),h()},i),_=l.onCancellationRequested(()=>{clearTimeout(y),_.dispose(),f((0,N.canceled)())})}):S(h=>t(i,h))}e.timeout=t;function s(i,l=0){const h=setTimeout(i,l);return(0,T.toDisposable)(()=>clearTimeout(h))}e.disposableTimeout=s;function c(i,l=f=>!!f,h=null){let f=0;const y=i.length,_=()=>{if(f>=y)return Promise.resolve(h);const b=i[f++];return Promise.resolve(b()).then(m=>l(m)?Promise.resolve(m):_())};return _()}e.first=c;class u{constructor(l,h){this._token=-1,typeof l=="function"&&typeof h=="number"&&this.setIfNotSet(l,h)}dispose(){this.cancel()}cancel(){this._token!==-1&&(clearTimeout(this._token),this._token=-1)}cancelAndSet(l,h){this.cancel(),this._token=setTimeout(()=>{this._token=-1,l()},h)}setIfNotSet(l,h){this._token===-1&&(this._token=setTimeout(()=>{this._token=-1,l()},h))}}e.TimeoutTimer=u;class d{constructor(){this._token=-1}dispose(){this.cancel()}cancel(){this._token!==-1&&(clearInterval(this._token),this._token=-1)}cancelAndSet(l,h){this.cancel(),this._token=setInterval(()=>{l()},h)}}e.IntervalTimer=d;class a{constructor(l,h){this.timeoutToken=-1,this.runner=l,this.timeout=h,this.timeoutHandler=this.onTimeout.bind(this)}dispose(){this.cancel(),this.runner=null}cancel(){this.isScheduled()&&(clearTimeout(this.timeoutToken),this.timeoutToken=-1)}schedule(l=this.timeout){this.cancel(),this.timeoutToken=setTimeout(this.timeoutHandler,l)}get delay(){return this.timeout}set delay(l){this.timeout=l}isScheduled(){return this.timeoutToken!==-1}onTimeout(){this.timeoutToken=-1,this.runner&&this.doRun()}doRun(){this.runner&&this.runner()}}e.RunOnceScheduler=a,function(){typeof requestIdleCallback!="function"||typeof cancelIdleCallback!="function"?e.runWhenIdle=i=>{const l=setTimeout(()=>{const f=Date.now()+15;i(Object.freeze({didTimeout:!0,timeRemaining(){return Math.max(0,f-Date.now())}}))});let h=!1;return{dispose(){h||(h=!0,clearTimeout(l))}}}:e.runWhenIdle=(i,l)=>{const h=requestIdleCallback(i,typeof l=="number"?{timeout:l}:void 0);let f=!1;return{dispose(){f||(f=!0,cancelIdleCallback(h))}}}}();class r{constructor(l){this._didRun=!1,this._executor=()=>{try{this._value=l()}catch(h){this._error=h}finally{this._didRun=!0}},this._handle=(0,e.runWhenIdle)(()=>this._executor())}dispose(){this._handle.dispose()}get value(){if(this._didRun||(this._handle.dispose(),this._executor()),this._error)throw this._error;return this._value}get isInitialized(){return this._didRun}}e.IdleValue=r;var o;(function(i){function l(f){return Re(this,void 0,void 0,function*(){let y;const _=yield Promise.all(f.map(b=>b.then(v=>v,v=>{y||(y=v)})));if(typeof y!="undefined")throw y;return _})}i.settled=l;function h(f){return new Promise((y,_)=>Re(this,void 0,void 0,function*(){try{yield f(y,_)}catch(b){_(b)}}))}i.withAsyncBody=h})(o=e.Promises||(e.Promises={}))}),define(J[302],ee([0,1,14,2]),function(j,e,w,N){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ScrollbarVisibilityController=void 0;class T extends N.Disposable{constructor(S,p,C){super();this._visibility=S,this._visibleClassName=p,this._invisibleClassName=C,this._domNode=null,this._isVisible=!1,this._isNeeded=!1,this._rawShouldBeVisible=!1,this._shouldBeVisible=!1,this._revealTimer=this._register(new w.TimeoutTimer)}setVisibility(S){this._visibility!==S&&(this._visibility=S,this._updateShouldBeVisible())}setShouldBeVisible(S){this._rawShouldBeVisible=S,this._updateShouldBeVisible()}_applyVisibilitySetting(){return this._visibility===2?!1:this._visibility===3?!0:this._rawShouldBeVisible}_updateShouldBeVisible(){const S=this._applyVisibilitySetting();this._shouldBeVisible!==S&&(this._shouldBeVisible=S,this.ensureVisibility())}setIsNeeded(S){this._isNeeded!==S&&(this._isNeeded=S,this.ensureVisibility())}setDomNode(S){this._domNode=S,this._domNode.setClassName(this._invisibleClassName),this.setShouldBeVisible(!1)}ensureVisibility(){if(!this._isNeeded){this._hide(!1);return}this._shouldBeVisible?this._reveal():this._hide(!0)}_reveal(){this._isVisible||(this._isVisible=!0,this._revealTimer.setIfNotSet(()=>{this._domNode&&this._domNode.setClassName(this._visibleClassName)},0))}_hide(S){this._revealTimer.cancel(),!!this._isVisible&&(this._isVisible=!1,this._domNode&&this._domNode.setClassName(this._invisibleClassName+(S?" fade":"")))}}e.ScrollbarVisibilityController=T}),define(J[27],ee([0,1,4]),function(j,e,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CSSIcon=e.Codicon=e.getCodiconAriaLabel=e.registerCodicon=e.iconRegistry=void 0;class N{constructor(){this._icons=new Map,this._onDidRegister=new w.Emitter}add(g){const t=this._icons.get(g.id);t?g.description?t.description=g.description:console.error(`Duplicate registration of codicon ${g.id}`):(this._icons.set(g.id,g),this._onDidRegister.fire(g))}get(g){return this._icons.get(g)}get all(){return this._icons.values()}get onDidRegister(){return this._onDidRegister.event}}const T=new N;e.iconRegistry=T;function D(n,g){return new p(n,g)}e.registerCodicon=D;function S(n){return n?n.replace(/\$\((.*?)\)/g,(g,t)=>` ${t} `).trim():""}e.getCodiconAriaLabel=S;class p{constructor(g,t,s){this.id=g,this.definition=t,this.description=s,T.add(this)}get classNames(){return"codicon codicon-"+this.id}get classNamesArray(){return["codicon","codicon-"+this.id]}get cssSelector(){return".codicon.codicon-"+this.id}}e.Codicon=p;var C;(function(n){n.iconNameSegment="[A-Za-z0-9]+",n.iconNameExpression="[A-Za-z0-9\\-]+",n.iconModifierExpression="~[A-Za-z]+";const g=new RegExp(`^(${n.iconNameExpression})(${n.iconModifierExpression})?$`);function t(u){if(u instanceof p)return["codicon","codicon-"+u.id];const d=g.exec(u.id);if(!d)return t(p.error);let[,a,r]=d;const o=["codicon","codicon-"+a];return r&&o.push("codicon-modifier-"+r.substr(1)),o}n.asClassNameArray=t;function s(u){return t(u).join(" ")}n.asClassName=s;function c(u){return"."+t(u).join(".")}n.asCSSSelector=c})(C=e.CSSIcon||(e.CSSIcon={})),function(n){n.add=new n("add",{fontCharacter:"\\ea60"}),n.plus=new n("plus",n.add.definition),n.gistNew=new n("gist-new",n.add.definition),n.repoCreate=new n("repo-create",n.add.definition),n.lightbulb=new n("lightbulb",{fontCharacter:"\\ea61"}),n.lightBulb=new n("light-bulb",{fontCharacter:"\\ea61"}),n.repo=new n("repo",{fontCharacter:"\\ea62"}),n.repoDelete=new n("repo-delete",{fontCharacter:"\\ea62"}),n.gistFork=new n("gist-fork",{fontCharacter:"\\ea63"}),n.repoForked=new n("repo-forked",{fontCharacter:"\\ea63"}),n.gitPullRequest=new n("git-pull-request",{fontCharacter:"\\ea64"}),n.gitPullRequestAbandoned=new n("git-pull-request-abandoned",{fontCharacter:"\\ea64"}),n.recordKeys=new n("record-keys",{fontCharacter:"\\ea65"}),n.keyboard=new n("keyboard",{fontCharacter:"\\ea65"}),n.tag=new n("tag",{fontCharacter:"\\ea66"}),n.tagAdd=new n("tag-add",{fontCharacter:"\\ea66"}),n.tagRemove=new n("tag-remove",{fontCharacter:"\\ea66"}),n.person=new n("person",{fontCharacter:"\\ea67"}),n.personFollow=new n("person-follow",{fontCharacter:"\\ea67"}),n.personOutline=new n("person-outline",{fontCharacter:"\\ea67"}),n.personFilled=new n("person-filled",{fontCharacter:"\\ea67"}),n.gitBranch=new n("git-branch",{fontCharacter:"\\ea68"}),n.gitBranchCreate=new n("git-branch-create",{fontCharacter:"\\ea68"}),n.gitBranchDelete=new n("git-branch-delete",{fontCharacter:"\\ea68"}),n.sourceControl=new n("source-control",{fontCharacter:"\\ea68"}),n.mirror=new n("mirror",{fontCharacter:"\\ea69"}),n.mirrorPublic=new n("mirror-public",{fontCharacter:"\\ea69"}),n.star=new n("star",{fontCharacter:"\\ea6a"}),n.starAdd=new n("star-add",{fontCharacter:"\\ea6a"}),n.starDelete=new n("star-delete",{fontCharacter:"\\ea6a"}),n.starEmpty=new n("star-empty",{fontCharacter:"\\ea6a"}),n.comment=new n("comment",{fontCharacter:"\\ea6b"}),n.commentAdd=new n("comment-add",{fontCharacter:"\\ea6b"}),n.alert=new n("alert",{fontCharacter:"\\ea6c"}),n.warning=new n("warning",{fontCharacter:"\\ea6c"}),n.search=new n("search",{fontCharacter:"\\ea6d"}),n.searchSave=new n("search-save",{fontCharacter:"\\ea6d"}),n.logOut=new n("log-out",{fontCharacter:"\\ea6e"}),n.signOut=new n("sign-out",{fontCharacter:"\\ea6e"}),n.logIn=new n("log-in",{fontCharacter:"\\ea6f"}),n.signIn=new n("sign-in",{fontCharacter:"\\ea6f"}),n.eye=new n("eye",{fontCharacter:"\\ea70"}),n.eyeUnwatch=new n("eye-unwatch",{fontCharacter:"\\ea70"}),n.eyeWatch=new n("eye-watch",{fontCharacter:"\\ea70"}),n.circleFilled=new n("circle-filled",{fontCharacter:"\\ea71"}),n.primitiveDot=new n("primitive-dot",{fontCharacter:"\\ea71"}),n.closeDirty=new n("close-dirty",{fontCharacter:"\\ea71"}),n.debugBreakpoint=new n("debug-breakpoint",{fontCharacter:"\\ea71"}),n.debugBreakpointDisabled=new n("debug-breakpoint-disabled",{fontCharacter:"\\ea71"}),n.debugHint=new n("debug-hint",{fontCharacter:"\\ea71"}),n.primitiveSquare=new n("primitive-square",{fontCharacter:"\\ea72"}),n.edit=new n("edit",{fontCharacter:"\\ea73"}),n.pencil=new n("pencil",{fontCharacter:"\\ea73"}),n.info=new n("info",{fontCharacter:"\\ea74"}),n.issueOpened=new n("issue-opened",{fontCharacter:"\\ea74"}),n.gistPrivate=new n("gist-private",{fontCharacter:"\\ea75"}),n.gitForkPrivate=new n("git-fork-private",{fontCharacter:"\\ea75"}),n.lock=new n("lock",{fontCharacter:"\\ea75"}),n.mirrorPrivate=new n("mirror-private",{fontCharacter:"\\ea75"}),n.close=new n("close",{fontCharacter:"\\ea76"}),n.removeClose=new n("remove-close",{fontCharacter:"\\ea76"}),n.x=new n("x",{fontCharacter:"\\ea76"}),n.repoSync=new n("repo-sync",{fontCharacter:"\\ea77"}),n.sync=new n("sync",{fontCharacter:"\\ea77"}),n.clone=new n("clone",{fontCharacter:"\\ea78"}),n.desktopDownload=new n("desktop-download",{fontCharacter:"\\ea78"}),n.beaker=new n("beaker",{fontCharacter:"\\ea79"}),n.microscope=new n("microscope",{fontCharacter:"\\ea79"}),n.vm=new n("vm",{fontCharacter:"\\ea7a"}),n.deviceDesktop=new n("device-desktop",{fontCharacter:"\\ea7a"}),n.file=new n("file",{fontCharacter:"\\ea7b"}),n.fileText=new n("file-text",{fontCharacter:"\\ea7b"}),n.more=new n("more",{fontCharacter:"\\ea7c"}),n.ellipsis=new n("ellipsis",{fontCharacter:"\\ea7c"}),n.kebabHorizontal=new n("kebab-horizontal",{fontCharacter:"\\ea7c"}),n.mailReply=new n("mail-reply",{fontCharacter:"\\ea7d"}),n.reply=new n("reply",{fontCharacter:"\\ea7d"}),n.organization=new n("organization",{fontCharacter:"\\ea7e"}),n.organizationFilled=new n("organization-filled",{fontCharacter:"\\ea7e"}),n.organizationOutline=new n("organization-outline",{fontCharacter:"\\ea7e"}),n.newFile=new n("new-file",{fontCharacter:"\\ea7f"}),n.fileAdd=new n("file-add",{fontCharacter:"\\ea7f"}),n.newFolder=new n("new-folder",{fontCharacter:"\\ea80"}),n.fileDirectoryCreate=new n("file-directory-create",{fontCharacter:"\\ea80"}),n.trash=new n("trash",{fontCharacter:"\\ea81"}),n.trashcan=new n("trashcan",{fontCharacter:"\\ea81"}),n.history=new n("history",{fontCharacter:"\\ea82"}),n.clock=new n("clock",{fontCharacter:"\\ea82"}),n.folder=new n("folder",{fontCharacter:"\\ea83"}),n.fileDirectory=new n("file-directory",{fontCharacter:"\\ea83"}),n.symbolFolder=new n("symbol-folder",{fontCharacter:"\\ea83"}),n.logoGithub=new n("logo-github",{fontCharacter:"\\ea84"}),n.markGithub=new n("mark-github",{fontCharacter:"\\ea84"}),n.github=new n("github",{fontCharacter:"\\ea84"}),n.terminal=new n("terminal",{fontCharacter:"\\ea85"}),n.console=new n("console",{fontCharacter:"\\ea85"}),n.repl=new n("repl",{fontCharacter:"\\ea85"}),n.zap=new n("zap",{fontCharacter:"\\ea86"}),n.symbolEvent=new n("symbol-event",{fontCharacter:"\\ea86"}),n.error=new n("error",{fontCharacter:"\\ea87"}),n.stop=new n("stop",{fontCharacter:"\\ea87"}),n.variable=new n("variable",{fontCharacter:"\\ea88"}),n.symbolVariable=new n("symbol-variable",{fontCharacter:"\\ea88"}),n.array=new n("array",{fontCharacter:"\\ea8a"}),n.symbolArray=new n("symbol-array",{fontCharacter:"\\ea8a"}),n.symbolModule=new n("symbol-module",{fontCharacter:"\\ea8b"}),n.symbolPackage=new n("symbol-package",{fontCharacter:"\\ea8b"}),n.symbolNamespace=new n("symbol-namespace",{fontCharacter:"\\ea8b"}),n.symbolObject=new n("symbol-object",{fontCharacter:"\\ea8b"}),n.symbolMethod=new n("symbol-method",{fontCharacter:"\\ea8c"}),n.symbolFunction=new n("symbol-function",{fontCharacter:"\\ea8c"}),n.symbolConstructor=new n("symbol-constructor",{fontCharacter:"\\ea8c"}),n.symbolBoolean=new n("symbol-boolean",{fontCharacter:"\\ea8f"}),n.symbolNull=new n("symbol-null",{fontCharacter:"\\ea8f"}),n.symbolNumeric=new n("symbol-numeric",{fontCharacter:"\\ea90"}),n.symbolNumber=new n("symbol-number",{fontCharacter:"\\ea90"}),n.symbolStructure=new n("symbol-structure",{fontCharacter:"\\ea91"}),n.symbolStruct=new n("symbol-struct",{fontCharacter:"\\ea91"}),n.symbolParameter=new n("symbol-parameter",{fontCharacter:"\\ea92"}),n.symbolTypeParameter=new n("symbol-type-parameter",{fontCharacter:"\\ea92"}),n.symbolKey=new n("symbol-key",{fontCharacter:"\\ea93"}),n.symbolText=new n("symbol-text",{fontCharacter:"\\ea93"}),n.symbolReference=new n("symbol-reference",{fontCharacter:"\\ea94"}),n.goToFile=new n("go-to-file",{fontCharacter:"\\ea94"}),n.symbolEnum=new n("symbol-enum",{fontCharacter:"\\ea95"}),n.symbolValue=new n("symbol-value",{fontCharacter:"\\ea95"}),n.symbolRuler=new n("symbol-ruler",{fontCharacter:"\\ea96"}),n.symbolUnit=new n("symbol-unit",{fontCharacter:"\\ea96"}),n.activateBreakpoints=new n("activate-breakpoints",{fontCharacter:"\\ea97"}),n.archive=new n("archive",{fontCharacter:"\\ea98"}),n.arrowBoth=new n("arrow-both",{fontCharacter:"\\ea99"}),n.arrowDown=new n("arrow-down",{fontCharacter:"\\ea9a"}),n.arrowLeft=new n("arrow-left",{fontCharacter:"\\ea9b"}),n.arrowRight=new n("arrow-right",{fontCharacter:"\\ea9c"}),n.arrowSmallDown=new n("arrow-small-down",{fontCharacter:"\\ea9d"}),n.arrowSmallLeft=new n("arrow-small-left",{fontCharacter:"\\ea9e"}),n.arrowSmallRight=new n("arrow-small-right",{fontCharacter:"\\ea9f"}),n.arrowSmallUp=new n("arrow-small-up",{fontCharacter:"\\eaa0"}),n.arrowUp=new n("arrow-up",{fontCharacter:"\\eaa1"}),n.bell=new n("bell",{fontCharacter:"\\eaa2"}),n.bold=new n("bold",{fontCharacter:"\\eaa3"}),n.book=new n("book",{fontCharacter:"\\eaa4"}),n.bookmark=new n("bookmark",{fontCharacter:"\\eaa5"}),n.debugBreakpointConditionalUnverified=new n("debug-breakpoint-conditional-unverified",{fontCharacter:"\\eaa6"}),n.debugBreakpointConditional=new n("debug-breakpoint-conditional",{fontCharacter:"\\eaa7"}),n.debugBreakpointConditionalDisabled=new n("debug-breakpoint-conditional-disabled",{fontCharacter:"\\eaa7"}),n.debugBreakpointDataUnverified=new n("debug-breakpoint-data-unverified",{fontCharacter:"\\eaa8"}),n.debugBreakpointData=new n("debug-breakpoint-data",{fontCharacter:"\\eaa9"}),n.debugBreakpointDataDisabled=new n("debug-breakpoint-data-disabled",{fontCharacter:"\\eaa9"}),n.debugBreakpointLogUnverified=new n("debug-breakpoint-log-unverified",{fontCharacter:"\\eaaa"}),n.debugBreakpointLog=new n("debug-breakpoint-log",{fontCharacter:"\\eaab"}),n.debugBreakpointLogDisabled=new n("debug-breakpoint-log-disabled",{fontCharacter:"\\eaab"}),n.briefcase=new n("briefcase",{fontCharacter:"\\eaac"}),n.broadcast=new n("broadcast",{fontCharacter:"\\eaad"}),n.browser=new n("browser",{fontCharacter:"\\eaae"}),n.bug=new n("bug",{fontCharacter:"\\eaaf"}),n.calendar=new n("calendar",{fontCharacter:"\\eab0"}),n.caseSensitive=new n("case-sensitive",{fontCharacter:"\\eab1"}),n.check=new n("check",{fontCharacter:"\\eab2"}),n.checklist=new n("checklist",{fontCharacter:"\\eab3"}),n.chevronDown=new n("chevron-down",{fontCharacter:"\\eab4"}),n.dropDownButton=new n("drop-down-button",n.chevronDown.definition),n.chevronLeft=new n("chevron-left",{fontCharacter:"\\eab5"}),n.chevronRight=new n("chevron-right",{fontCharacter:"\\eab6"}),n.chevronUp=new n("chevron-up",{fontCharacter:"\\eab7"}),n.chromeClose=new n("chrome-close",{fontCharacter:"\\eab8"}),n.chromeMaximize=new n("chrome-maximize",{fontCharacter:"\\eab9"}),n.chromeMinimize=new n("chrome-minimize",{fontCharacter:"\\eaba"}),n.chromeRestore=new n("chrome-restore",{fontCharacter:"\\eabb"}),n.circleOutline=new n("circle-outline",{fontCharacter:"\\eabc"}),n.debugBreakpointUnverified=new n("debug-breakpoint-unverified",{fontCharacter:"\\eabc"}),n.circleSlash=new n("circle-slash",{fontCharacter:"\\eabd"}),n.circuitBoard=new n("circuit-board",{fontCharacter:"\\eabe"}),n.clearAll=new n("clear-all",{fontCharacter:"\\eabf"}),n.clippy=new n("clippy",{fontCharacter:"\\eac0"}),n.closeAll=new n("close-all",{fontCharacter:"\\eac1"}),n.cloudDownload=new n("cloud-download",{fontCharacter:"\\eac2"}),n.cloudUpload=new n("cloud-upload",{fontCharacter:"\\eac3"}),n.code=new n("code",{fontCharacter:"\\eac4"}),n.collapseAll=new n("collapse-all",{fontCharacter:"\\eac5"}),n.colorMode=new n("color-mode",{fontCharacter:"\\eac6"}),n.commentDiscussion=new n("comment-discussion",{fontCharacter:"\\eac7"}),n.compareChanges=new n("compare-changes",{fontCharacter:"\\eafd"}),n.creditCard=new n("credit-card",{fontCharacter:"\\eac9"}),n.dash=new n("dash",{fontCharacter:"\\eacc"}),n.dashboard=new n("dashboard",{fontCharacter:"\\eacd"}),n.database=new n("database",{fontCharacter:"\\eace"}),n.debugContinue=new n("debug-continue",{fontCharacter:"\\eacf"}),n.debugDisconnect=new n("debug-disconnect",{fontCharacter:"\\ead0"}),n.debugPause=new n("debug-pause",{fontCharacter:"\\ead1"}),n.debugRestart=new n("debug-restart",{fontCharacter:"\\ead2"}),n.debugStart=new n("debug-start",{fontCharacter:"\\ead3"}),n.debugStepInto=new n("debug-step-into",{fontCharacter:"\\ead4"}),n.debugStepOut=new n("debug-step-out",{fontCharacter:"\\ead5"}),n.debugStepOver=new n("debug-step-over",{fontCharacter:"\\ead6"}),n.debugStop=new n("debug-stop",{fontCharacter:"\\ead7"}),n.debug=new n("debug",{fontCharacter:"\\ead8"}),n.deviceCameraVideo=new n("device-camera-video",{fontCharacter:"\\ead9"}),n.deviceCamera=new n("device-camera",{fontCharacter:"\\eada"}),n.deviceMobile=new n("device-mobile",{fontCharacter:"\\eadb"}),n.diffAdded=new n("diff-added",{fontCharacter:"\\eadc"}),n.diffIgnored=new n("diff-ignored",{fontCharacter:"\\eadd"}),n.diffModified=new n("diff-modified",{fontCharacter:"\\eade"}),n.diffRemoved=new n("diff-removed",{fontCharacter:"\\eadf"}),n.diffRenamed=new n("diff-renamed",{fontCharacter:"\\eae0"}),n.diff=new n("diff",{fontCharacter:"\\eae1"}),n.discard=new n("discard",{fontCharacter:"\\eae2"}),n.editorLayout=new n("editor-layout",{fontCharacter:"\\eae3"}),n.emptyWindow=new n("empty-window",{fontCharacter:"\\eae4"}),n.exclude=new n("exclude",{fontCharacter:"\\eae5"}),n.extensions=new n("extensions",{fontCharacter:"\\eae6"}),n.eyeClosed=new n("eye-closed",{fontCharacter:"\\eae7"}),n.fileBinary=new n("file-binary",{fontCharacter:"\\eae8"}),n.fileCode=new n("file-code",{fontCharacter:"\\eae9"}),n.fileMedia=new n("file-media",{fontCharacter:"\\eaea"}),n.filePdf=new n("file-pdf",{fontCharacter:"\\eaeb"}),n.fileSubmodule=new n("file-submodule",{fontCharacter:"\\eaec"}),n.fileSymlinkDirectory=new n("file-symlink-directory",{fontCharacter:"\\eaed"}),n.fileSymlinkFile=new n("file-symlink-file",{fontCharacter:"\\eaee"}),n.fileZip=new n("file-zip",{fontCharacter:"\\eaef"}),n.files=new n("files",{fontCharacter:"\\eaf0"}),n.filter=new n("filter",{fontCharacter:"\\eaf1"}),n.flame=new n("flame",{fontCharacter:"\\eaf2"}),n.foldDown=new n("fold-down",{fontCharacter:"\\eaf3"}),n.foldUp=new n("fold-up",{fontCharacter:"\\eaf4"}),n.fold=new n("fold",{fontCharacter:"\\eaf5"}),n.folderActive=new n("folder-active",{fontCharacter:"\\eaf6"}),n.folderOpened=new n("folder-opened",{fontCharacter:"\\eaf7"}),n.gear=new n("gear",{fontCharacter:"\\eaf8"}),n.gift=new n("gift",{fontCharacter:"\\eaf9"}),n.gistSecret=new n("gist-secret",{fontCharacter:"\\eafa"}),n.gist=new n("gist",{fontCharacter:"\\eafb"}),n.gitCommit=new n("git-commit",{fontCharacter:"\\eafc"}),n.gitCompare=new n("git-compare",{fontCharacter:"\\eafd"}),n.gitMerge=new n("git-merge",{fontCharacter:"\\eafe"}),n.githubAction=new n("github-action",{fontCharacter:"\\eaff"}),n.githubAlt=new n("github-alt",{fontCharacter:"\\eb00"}),n.globe=new n("globe",{fontCharacter:"\\eb01"}),n.grabber=new n("grabber",{fontCharacter:"\\eb02"}),n.graph=new n("graph",{fontCharacter:"\\eb03"}),n.gripper=new n("gripper",{fontCharacter:"\\eb04"}),n.heart=new n("heart",{fontCharacter:"\\eb05"}),n.home=new n("home",{fontCharacter:"\\eb06"}),n.horizontalRule=new n("horizontal-rule",{fontCharacter:"\\eb07"}),n.hubot=new n("hubot",{fontCharacter:"\\eb08"}),n.inbox=new n("inbox",{fontCharacter:"\\eb09"}),n.issueClosed=new n("issue-closed",{fontCharacter:"\\eba4"}),n.issueReopened=new n("issue-reopened",{fontCharacter:"\\eb0b"}),n.issues=new n("issues",{fontCharacter:"\\eb0c"}),n.italic=new n("italic",{fontCharacter:"\\eb0d"}),n.jersey=new n("jersey",{fontCharacter:"\\eb0e"}),n.json=new n("json",{fontCharacter:"\\eb0f"}),n.kebabVertical=new n("kebab-vertical",{fontCharacter:"\\eb10"}),n.key=new n("key",{fontCharacter:"\\eb11"}),n.law=new n("law",{fontCharacter:"\\eb12"}),n.lightbulbAutofix=new n("lightbulb-autofix",{fontCharacter:"\\eb13"}),n.linkExternal=new n("link-external",{fontCharacter:"\\eb14"}),n.link=new n("link",{fontCharacter:"\\eb15"}),n.listOrdered=new n("list-ordered",{fontCharacter:"\\eb16"}),n.listUnordered=new n("list-unordered",{fontCharacter:"\\eb17"}),n.liveShare=new n("live-share",{fontCharacter:"\\eb18"}),n.loading=new n("loading",{fontCharacter:"\\eb19"}),n.location=new n("location",{fontCharacter:"\\eb1a"}),n.mailRead=new n("mail-read",{fontCharacter:"\\eb1b"}),n.mail=new n("mail",{fontCharacter:"\\eb1c"}),n.markdown=new n("markdown",{fontCharacter:"\\eb1d"}),n.megaphone=new n("megaphone",{fontCharacter:"\\eb1e"}),n.mention=new n("mention",{fontCharacter:"\\eb1f"}),n.milestone=new n("milestone",{fontCharacter:"\\eb20"}),n.mortarBoard=new n("mortar-board",{fontCharacter:"\\eb21"}),n.move=new n("move",{fontCharacter:"\\eb22"}),n.multipleWindows=new n("multiple-windows",{fontCharacter:"\\eb23"}),n.mute=new n("mute",{fontCharacter:"\\eb24"}),n.noNewline=new n("no-newline",{fontCharacter:"\\eb25"}),n.note=new n("note",{fontCharacter:"\\eb26"}),n.octoface=new n("octoface",{fontCharacter:"\\eb27"}),n.openPreview=new n("open-preview",{fontCharacter:"\\eb28"}),n.package_=new n("package",{fontCharacter:"\\eb29"}),n.paintcan=new n("paintcan",{fontCharacter:"\\eb2a"}),n.pin=new n("pin",{fontCharacter:"\\eb2b"}),n.play=new n("play",{fontCharacter:"\\eb2c"}),n.run=new n("run",{fontCharacter:"\\eb2c"}),n.plug=new n("plug",{fontCharacter:"\\eb2d"}),n.preserveCase=new n("preserve-case",{fontCharacter:"\\eb2e"}),n.preview=new n("preview",{fontCharacter:"\\eb2f"}),n.project=new n("project",{fontCharacter:"\\eb30"}),n.pulse=new n("pulse",{fontCharacter:"\\eb31"}),n.question=new n("question",{fontCharacter:"\\eb32"}),n.quote=new n("quote",{fontCharacter:"\\eb33"}),n.radioTower=new n("radio-tower",{fontCharacter:"\\eb34"}),n.reactions=new n("reactions",{fontCharacter:"\\eb35"}),n.references=new n("references",{fontCharacter:"\\eb36"}),n.refresh=new n("refresh",{fontCharacter:"\\eb37"}),n.regex=new n("regex",{fontCharacter:"\\eb38"}),n.remoteExplorer=new n("remote-explorer",{fontCharacter:"\\eb39"}),n.remote=new n("remote",{fontCharacter:"\\eb3a"}),n.remove=new n("remove",{fontCharacter:"\\eb3b"}),n.replaceAll=new n("replace-all",{fontCharacter:"\\eb3c"}),n.replace=new n("replace",{fontCharacter:"\\eb3d"}),n.repoClone=new n("repo-clone",{fontCharacter:"\\eb3e"}),n.repoForcePush=new n("repo-force-push",{fontCharacter:"\\eb3f"}),n.repoPull=new n("repo-pull",{fontCharacter:"\\eb40"}),n.repoPush=new n("repo-push",{fontCharacter:"\\eb41"}),n.report=new n("report",{fontCharacter:"\\eb42"}),n.requestChanges=new n("request-changes",{fontCharacter:"\\eb43"}),n.rocket=new n("rocket",{fontCharacter:"\\eb44"}),n.rootFolderOpened=new n("root-folder-opened",{fontCharacter:"\\eb45"}),n.rootFolder=new n("root-folder",{fontCharacter:"\\eb46"}),n.rss=new n("rss",{fontCharacter:"\\eb47"}),n.ruby=new n("ruby",{fontCharacter:"\\eb48"}),n.saveAll=new n("save-all",{fontCharacter:"\\eb49"}),n.saveAs=new n("save-as",{fontCharacter:"\\eb4a"}),n.save=new n("save",{fontCharacter:"\\eb4b"}),n.screenFull=new n("screen-full",{fontCharacter:"\\eb4c"}),n.screenNormal=new n("screen-normal",{fontCharacter:"\\eb4d"}),n.searchStop=new n("search-stop",{fontCharacter:"\\eb4e"}),n.server=new n("server",{fontCharacter:"\\eb50"}),n.settingsGear=new n("settings-gear",{fontCharacter:"\\eb51"}),n.settings=new n("settings",{fontCharacter:"\\eb52"}),n.shield=new n("shield",{fontCharacter:"\\eb53"}),n.smiley=new n("smiley",{fontCharacter:"\\eb54"}),n.sortPrecedence=new n("sort-precedence",{fontCharacter:"\\eb55"}),n.splitHorizontal=new n("split-horizontal",{fontCharacter:"\\eb56"}),n.splitVertical=new n("split-vertical",{fontCharacter:"\\eb57"}),n.squirrel=new n("squirrel",{fontCharacter:"\\eb58"}),n.starFull=new n("star-full",{fontCharacter:"\\eb59"}),n.starHalf=new n("star-half",{fontCharacter:"\\eb5a"}),n.symbolClass=new n("symbol-class",{fontCharacter:"\\eb5b"}),n.symbolColor=new n("symbol-color",{fontCharacter:"\\eb5c"}),n.symbolConstant=new n("symbol-constant",{fontCharacter:"\\eb5d"}),n.symbolEnumMember=new n("symbol-enum-member",{fontCharacter:"\\eb5e"}),n.symbolField=new n("symbol-field",{fontCharacter:"\\eb5f"}),n.symbolFile=new n("symbol-file",{fontCharacter:"\\eb60"}),n.symbolInterface=new n("symbol-interface",{fontCharacter:"\\eb61"}),n.symbolKeyword=new n("symbol-keyword",{fontCharacter:"\\eb62"}),n.symbolMisc=new n("symbol-misc",{fontCharacter:"\\eb63"}),n.symbolOperator=new n("symbol-operator",{fontCharacter:"\\eb64"}),n.symbolProperty=new n("symbol-property",{fontCharacter:"\\eb65"}),n.wrench=new n("wrench",{fontCharacter:"\\eb65"}),n.wrenchSubaction=new n("wrench-subaction",{fontCharacter:"\\eb65"}),n.symbolSnippet=new n("symbol-snippet",{fontCharacter:"\\eb66"}),n.tasklist=new n("tasklist",{fontCharacter:"\\eb67"}),n.telescope=new n("telescope",{fontCharacter:"\\eb68"}),n.textSize=new n("text-size",{fontCharacter:"\\eb69"}),n.threeBars=new n("three-bars",{fontCharacter:"\\eb6a"}),n.thumbsdown=new n("thumbsdown",{fontCharacter:"\\eb6b"}),n.thumbsup=new n("thumbsup",{fontCharacter:"\\eb6c"}),n.tools=new n("tools",{fontCharacter:"\\eb6d"}),n.triangleDown=new n("triangle-down",{fontCharacter:"\\eb6e"}),n.triangleLeft=new n("triangle-left",{fontCharacter:"\\eb6f"}),n.triangleRight=new n("triangle-right",{fontCharacter:"\\eb70"}),n.triangleUp=new n("triangle-up",{fontCharacter:"\\eb71"}),n.twitter=new n("twitter",{fontCharacter:"\\eb72"}),n.unfold=new n("unfold",{fontCharacter:"\\eb73"}),n.unlock=new n("unlock",{fontCharacter:"\\eb74"}),n.unmute=new n("unmute",{fontCharacter:"\\eb75"}),n.unverified=new n("unverified",{fontCharacter:"\\eb76"}),n.verified=new n("verified",{fontCharacter:"\\eb77"}),n.versions=new n("versions",{fontCharacter:"\\eb78"}),n.vmActive=new n("vm-active",{fontCharacter:"\\eb79"}),n.vmOutline=new n("vm-outline",{fontCharacter:"\\eb7a"}),n.vmRunning=new n("vm-running",{fontCharacter:"\\eb7b"}),n.watch=new n("watch",{fontCharacter:"\\eb7c"}),n.whitespace=new n("whitespace",{fontCharacter:"\\eb7d"}),n.wholeWord=new n("whole-word",{fontCharacter:"\\eb7e"}),n.window=new n("window",{fontCharacter:"\\eb7f"}),n.wordWrap=new n("word-wrap",{fontCharacter:"\\eb80"}),n.zoomIn=new n("zoom-in",{fontCharacter:"\\eb81"}),n.zoomOut=new n("zoom-out",{fontCharacter:"\\eb82"}),n.listFilter=new n("list-filter",{fontCharacter:"\\eb83"}),n.listFlat=new n("list-flat",{fontCharacter:"\\eb84"}),n.listSelection=new n("list-selection",{fontCharacter:"\\eb85"}),n.selection=new n("selection",{fontCharacter:"\\eb85"}),n.listTree=new n("list-tree",{fontCharacter:"\\eb86"}),n.debugBreakpointFunctionUnverified=new n("debug-breakpoint-function-unverified",{fontCharacter:"\\eb87"}),n.debugBreakpointFunction=new n("debug-breakpoint-function",{fontCharacter:"\\eb88"}),n.debugBreakpointFunctionDisabled=new n("debug-breakpoint-function-disabled",{fontCharacter:"\\eb88"}),n.debugStackframeActive=new n("debug-stackframe-active",{fontCharacter:"\\eb89"}),n.debugStackframeDot=new n("debug-stackframe-dot",{fontCharacter:"\\eb8a"}),n.debugStackframe=new n("debug-stackframe",{fontCharacter:"\\eb8b"}),n.debugStackframeFocused=new n("debug-stackframe-focused",{fontCharacter:"\\eb8b"}),n.debugBreakpointUnsupported=new n("debug-breakpoint-unsupported",{fontCharacter:"\\eb8c"}),n.symbolString=new n("symbol-string",{fontCharacter:"\\eb8d"}),n.debugReverseContinue=new n("debug-reverse-continue",{fontCharacter:"\\eb8e"}),n.debugStepBack=new n("debug-step-back",{fontCharacter:"\\eb8f"}),n.debugRestartFrame=new n("debug-restart-frame",{fontCharacter:"\\eb90"}),n.callIncoming=new n("call-incoming",{fontCharacter:"\\eb92"}),n.callOutgoing=new n("call-outgoing",{fontCharacter:"\\eb93"}),n.menu=new n("menu",{fontCharacter:"\\eb94"}),n.expandAll=new n("expand-all",{fontCharacter:"\\eb95"}),n.feedback=new n("feedback",{fontCharacter:"\\eb96"}),n.groupByRefType=new n("group-by-ref-type",{fontCharacter:"\\eb97"}),n.ungroupByRefType=new n("ungroup-by-ref-type",{fontCharacter:"\\eb98"}),n.account=new n("account",{fontCharacter:"\\eb99"}),n.bellDot=new n("bell-dot",{fontCharacter:"\\eb9a"}),n.debugConsole=new n("debug-console",{fontCharacter:"\\eb9b"}),n.library=new n("library",{fontCharacter:"\\eb9c"}),n.output=new n("output",{fontCharacter:"\\eb9d"}),n.runAll=new n("run-all",{fontCharacter:"\\eb9e"}),n.syncIgnored=new n("sync-ignored",{fontCharacter:"\\eb9f"}),n.pinned=new n("pinned",{fontCharacter:"\\eba0"}),n.githubInverted=new n("github-inverted",{fontCharacter:"\\eba1"}),n.debugAlt=new n("debug-alt",{fontCharacter:"\\eb91"}),n.serverProcess=new n("server-process",{fontCharacter:"\\eba2"}),n.serverEnvironment=new n("server-environment",{fontCharacter:"\\eba3"}),n.pass=new n("pass",{fontCharacter:"\\eba4"}),n.stopCircle=new n("stop-circle",{fontCharacter:"\\eba5"}),n.playCircle=new n("play-circle",{fontCharacter:"\\eba6"}),n.record=new n("record",{fontCharacter:"\\eba7"}),n.debugAltSmall=new n("debug-alt-small",{fontCharacter:"\\eba8"}),n.vmConnect=new n("vm-connect",{fontCharacter:"\\eba9"}),n.cloud=new n("cloud",{fontCharacter:"\\ebaa"}),n.merge=new n("merge",{fontCharacter:"\\ebab"}),n.exportIcon=new n("export",{fontCharacter:"\\ebac"}),n.graphLeft=new n("graph-left",{fontCharacter:"\\ebad"}),n.magnet=new n("magnet",{fontCharacter:"\\ebae"}),n.notebook=new n("notebook",{fontCharacter:"\\ebaf"}),n.redo=new n("redo",{fontCharacter:"\\ebb0"}),n.checkAll=new n("check-all",{fontCharacter:"\\ebb1"}),n.pinnedDirty=new n("pinned-dirty",{fontCharacter:"\\ebb2"}),n.passFilled=new n("pass-filled",{fontCharacter:"\\ebb3"}),n.circleLargeFilled=new n("circle-large-filled",{fontCharacter:"\\ebb4"}),n.circleLargeOutline=new n("circle-large-outline",{fontCharacter:"\\ebb5"}),n.combine=new n("combine",{fontCharacter:"\\ebb6"}),n.gather=new n("gather",{fontCharacter:"\\ebb6"}),n.table=new n("table",{fontCharacter:"\\ebb7"}),n.variableGroup=new n("variable-group",{fontCharacter:"\\ebb8"}),n.typeHierarchy=new n("type-hierarchy",{fontCharacter:"\\ebb9"}),n.typeHierarchySub=new n("type-hierarchy-sub",{fontCharacter:"\\ebba"}),n.typeHierarchySuper=new n("type-hierarchy-super",{fontCharacter:"\\ebbb"}),n.gitPullRequestCreate=new n("git-pull-request-create",{fontCharacter:"\\ebbc"}),n.runAbove=new n("run-above",{fontCharacter:"\\ebbd"}),n.runBelow=new n("run-below",{fontCharacter:"\\ebbe"}),n.notebookTemplate=new n("notebook-template",{fontCharacter:"\\ebbf"}),n.debugRerun=new n("debug-rerun",{fontCharacter:"\\ebc0"}),n.workspaceTrusted=new n("workspace-trusted",{fontCharacter:"\\ebc1"}),n.workspaceUntrusted=new n("workspace-untrusted",{fontCharacter:"\\ebc2"}),n.workspaceUnspecified=new n("workspace-unspecified",{fontCharacter:"\\ebc3"}),n.terminalCmd=new n("terminal-cmd",{fontCharacter:"\\ebc4"}),n.terminalDebian=new n("terminal-debian",{fontCharacter:"\\ebc5"}),n.terminalLinux=new n("terminal-linux",{fontCharacter:"\\ebc6"}),n.terminalPowershell=new n("terminal-powershell",{fontCharacter:"\\ebc7"}),n.terminalTmux=new n("terminal-tmux",{fontCharacter:"\\ebc8"}),n.terminalUbuntu=new n("terminal-ubuntu",{fontCharacter:"\\ebc9"}),n.terminalBash=new n("terminal-bash",{fontCharacter:"\\ebca"}),n.arrowSwap=new n("arrow-swap",{fontCharacter:"\\ebcb"}),n.copy=new n("copy",{fontCharacter:"\\ebcc"}),n.personAdd=new n("person-add",{fontCharacter:"\\ebcd"}),n.filterFilled=new n("filter-filled",{fontCharacter:"\\ebce"}),n.wand=new n("wand",{fontCharacter:"\\ebcf"}),n.debugLineByLine=new n("debug-line-by-line",{fontCharacter:"\\ebd0"}),n.inspect=new n("inspect",{fontCharacter:"\\ebd1"}),n.layers=new n("layers",{fontCharacter:"\\ebd2"}),n.layersDot=new n("layers-dot",{fontCharacter:"\\ebd3"}),n.layersActive=new n("layers-active",{fontCharacter:"\\ebd4"}),n.compass=new n("compass",{fontCharacter:"\\ebd5"}),n.compassDot=new n("compass-dot",{fontCharacter:"\\ebd6"}),n.compassActive=new n("compass-active",{fontCharacter:"\\ebd7"}),n.azure=new n("azure",{fontCharacter:"\\ebd8"}),n.issueDraft=new n("issue-draft",{fontCharacter:"\\ebd9"}),n.gitPullRequestClosed=new n("git-pull-request-closed",{fontCharacter:"\\ebda"}),n.gitPullRequestDraft=new n("git-pull-request-draft",{fontCharacter:"\\ebdb"}),n.debugAll=new n("debug-all",{fontCharacter:"\\ebdc"}),n.debugCoverage=new n("debug-coverage",{fontCharacter:"\\ebdd"}),n.runErrors=new n("run-errors",{fontCharacter:"\\ebde"}),n.folderLibrary=new n("folder-library",{fontCharacter:"\\ebdf"}),n.debugContinueSmall=new n("debug-continue-small",{fontCharacter:"\\ebe0"}),n.beakerStop=new n("beaker-stop",{fontCharacter:"\\ebe1"}),n.graphLine=new n("graph-line",{fontCharacter:"\\ebe2"}),n.graphScatter=new n("graph-scatter",{fontCharacter:"\\ebe3"}),n.pieChart=new n("pie-chart",{fontCharacter:"\\ebe4"}),n.bracket=new n("bracket",n.json.definition),n.bracketDot=new n("bracket-dot",{fontCharacter:"\\ebe5"}),n.bracketError=new n("bracket-error",{fontCharacter:"\\ebe6"}),n.lockSmall=new n("lock-small",{fontCharacter:"\\ebe7"}),n.azureDevops=new n("azure-devops",{fontCharacter:"\\ebe8"}),n.verifiedFilled=new n("verified-filled",{fontCharacter:"\\ebe9"})}(p=e.Codicon||(e.Codicon={}))}),define(J[208],ee([0,1,27]),function(j,e,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.treeItemLoadingIcon=e.treeFilterClearIcon=e.treeFilterOnTypeOffIcon=e.treeFilterOnTypeOnIcon=e.treeItemExpandedIcon=void 0,e.treeItemExpandedIcon=(0,w.registerCodicon)("tree-item-expanded",w.Codicon.chevronDown),e.treeFilterOnTypeOnIcon=(0,w.registerCodicon)("tree-filter-on-type-on",w.Codicon.listFilter),e.treeFilterOnTypeOffIcon=(0,w.registerCodicon)("tree-filter-on-type-off",w.Codicon.listSelection),e.treeFilterClearIcon=(0,w.registerCodicon)("tree-filter-clear",w.Codicon.close),e.treeItemLoadingIcon=(0,w.registerCodicon)("tree-item-loading",w.Codicon.loading)}),define(J[303],ee([0,1,14]),function(j,e,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.compareByPrefix=e.compareAnything=e.compareFileNames=void 0;const N=new w.IdleValue(()=>{const p=new Intl.Collator(void 0,{numeric:!0,sensitivity:"base"});return{collator:p,collatorIsNumeric:p.resolvedOptions().numeric}});function T(p,C,n=!1){const g=p||"",t=C||"",s=N.value.collator.compare(g,t);return N.value.collatorIsNumeric&&s===0&&g!==t?g<t?-1:1:s}e.compareFileNames=T;function D(p,C,n){const g=p.toLowerCase(),t=C.toLowerCase(),s=S(p,C,n);if(s)return s;const c=g.endsWith(n),u=t.endsWith(n);if(c!==u)return c?-1:1;const d=T(g,t);return d!==0?d:g.localeCompare(t)}e.compareAnything=D;function S(p,C,n){const g=p.toLowerCase(),t=C.toLowerCase(),s=g.startsWith(n),c=t.startsWith(n);if(s!==c)return s?-1:1;if(s&&c){if(g.length<t.length)return-1;if(g.length>t.length)return 1}return 0}e.compareByPrefix=S}),define(J[133],ee([0,1,4,2]),function(j,e,w,N){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SmoothScrollingOperation=e.SmoothScrollingUpdate=e.Scrollable=e.ScrollState=void 0;class T{constructor(c,u,d,a,r,o){this._scrollStateBrand=void 0,c=c|0,u=u|0,d=d|0,a=a|0,r=r|0,o=o|0,this.rawScrollLeft=d,this.rawScrollTop=o,c<0&&(c=0),d+c>u&&(d=u-c),d<0&&(d=0),a<0&&(a=0),o+a>r&&(o=r-a),o<0&&(o=0),this.width=c,this.scrollWidth=u,this.scrollLeft=d,this.height=a,this.scrollHeight=r,this.scrollTop=o}equals(c){return this.rawScrollLeft===c.rawScrollLeft&&this.rawScrollTop===c.rawScrollTop&&this.width===c.width&&this.scrollWidth===c.scrollWidth&&this.scrollLeft===c.scrollLeft&&this.height===c.height&&this.scrollHeight===c.scrollHeight&&this.scrollTop===c.scrollTop}withScrollDimensions(c,u){return new T(typeof c.width!="undefined"?c.width:this.width,typeof c.scrollWidth!="undefined"?c.scrollWidth:this.scrollWidth,u?this.rawScrollLeft:this.scrollLeft,typeof c.height!="undefined"?c.height:this.height,typeof c.scrollHeight!="undefined"?c.scrollHeight:this.scrollHeight,u?this.rawScrollTop:this.scrollTop)}withScrollPosition(c){return new T(this.width,this.scrollWidth,typeof c.scrollLeft!="undefined"?c.scrollLeft:this.rawScrollLeft,this.height,this.scrollHeight,typeof c.scrollTop!="undefined"?c.scrollTop:this.rawScrollTop)}createScrollEvent(c,u){const d=this.width!==c.width,a=this.scrollWidth!==c.scrollWidth,r=this.scrollLeft!==c.scrollLeft,o=this.height!==c.height,i=this.scrollHeight!==c.scrollHeight,l=this.scrollTop!==c.scrollTop;return{inSmoothScrolling:u,oldWidth:c.width,oldScrollWidth:c.scrollWidth,oldScrollLeft:c.scrollLeft,width:this.width,scrollWidth:this.scrollWidth,scrollLeft:this.scrollLeft,oldHeight:c.height,oldScrollHeight:c.scrollHeight,oldScrollTop:c.scrollTop,height:this.height,scrollHeight:this.scrollHeight,scrollTop:this.scrollTop,widthChanged:d,scrollWidthChanged:a,scrollLeftChanged:r,heightChanged:o,scrollHeightChanged:i,scrollTopChanged:l}}}e.ScrollState=T;class D extends N.Disposable{constructor(c,u){super();this._scrollableBrand=void 0,this._onScroll=this._register(new w.Emitter),this.onScroll=this._onScroll.event,this._smoothScrollDuration=c,this._scheduleAtNextAnimationFrame=u,this._state=new T(0,0,0,0,0,0),this._smoothScrolling=null}dispose(){this._smoothScrolling&&(this._smoothScrolling.dispose(),this._smoothScrolling=null),super.dispose()}setSmoothScrollDuration(c){this._smoothScrollDuration=c}validateScrollPosition(c){return this._state.withScrollPosition(c)}getScrollDimensions(){return this._state}setScrollDimensions(c,u){const d=this._state.withScrollDimensions(c,u);this._setState(d,Boolean(this._smoothScrolling)),this._smoothScrolling&&this._smoothScrolling.acceptScrollDimensions(this._state)}getFutureScrollPosition(){return this._smoothScrolling?this._smoothScrolling.to:this._state}getCurrentScrollPosition(){return this._state}setScrollPositionNow(c){const u=this._state.withScrollPosition(c);this._smoothScrolling&&(this._smoothScrolling.dispose(),this._smoothScrolling=null),this._setState(u,!1)}setScrollPositionSmooth(c,u){if(this._smoothScrollDuration===0)return this.setScrollPositionNow(c);if(this._smoothScrolling){c={scrollLeft:typeof c.scrollLeft=="undefined"?this._smoothScrolling.to.scrollLeft:c.scrollLeft,scrollTop:typeof c.scrollTop=="undefined"?this._smoothScrolling.to.scrollTop:c.scrollTop};const d=this._state.withScrollPosition(c);if(this._smoothScrolling.to.scrollLeft===d.scrollLeft&&this._smoothScrolling.to.scrollTop===d.scrollTop)return;let a;u?a=new n(this._smoothScrolling.from,d,this._smoothScrolling.startTime,this._smoothScrolling.duration):a=this._smoothScrolling.combine(this._state,d,this._smoothScrollDuration),this._smoothScrolling.dispose(),this._smoothScrolling=a}else{const d=this._state.withScrollPosition(c);this._smoothScrolling=n.start(this._state,d,this._smoothScrollDuration)}this._smoothScrolling.animationFrameDisposable=this._scheduleAtNextAnimationFrame(()=>{!this._smoothScrolling||(this._smoothScrolling.animationFrameDisposable=null,this._performSmoothScrolling())})}_performSmoothScrolling(){if(!this._smoothScrolling)return;const c=this._smoothScrolling.tick(),u=this._state.withScrollPosition(c);if(this._setState(u,!0),!!this._smoothScrolling){if(c.isDone){this._smoothScrolling.dispose(),this._smoothScrolling=null;return}this._smoothScrolling.animationFrameDisposable=this._scheduleAtNextAnimationFrame(()=>{!this._smoothScrolling||(this._smoothScrolling.animationFrameDisposable=null,this._performSmoothScrolling())})}}_setState(c,u){const d=this._state;d.equals(c)||(this._state=c,this._onScroll.fire(this._state.createScrollEvent(d,u)))}}e.Scrollable=D;class S{constructor(c,u,d){this.scrollLeft=c,this.scrollTop=u,this.isDone=d}}e.SmoothScrollingUpdate=S;function p(s,c){const u=c-s;return function(d){return s+u*t(d)}}function C(s,c,u){return function(d){return d<u?s(d/u):c((d-u)/(1-u))}}class n{constructor(c,u,d,a){this.from=c,this.to=u,this.duration=a,this.startTime=d,this.animationFrameDisposable=null,this._initAnimations()}_initAnimations(){this.scrollLeft=this._initAnimation(this.from.scrollLeft,this.to.scrollLeft,this.to.width),this.scrollTop=this._initAnimation(this.from.scrollTop,this.to.scrollTop,this.to.height)}_initAnimation(c,u,d){if(Math.abs(c-u)>2.5*d){let r,o;return c<u?(r=c+.75*d,o=u-.75*d):(r=c-.75*d,o=u+.75*d),C(p(c,r),p(o,u),.33)}return p(c,u)}dispose(){this.animationFrameDisposable!==null&&(this.animationFrameDisposable.dispose(),this.animationFrameDisposable=null)}acceptScrollDimensions(c){this.to=c.withScrollPosition(this.to),this._initAnimations()}tick(){return this._tick(Date.now())}_tick(c){const u=(c-this.startTime)/this.duration;if(u<1){const d=this.scrollLeft(u),a=this.scrollTop(u);return new S(d,a,!1)}return new S(this.to.scrollLeft,this.to.scrollTop,!0)}combine(c,u,d){return n.start(c,u,d)}static start(c,u,d){d=d+10;const a=Date.now()-10;return new n(c,u,a,d)}}e.SmoothScrollingOperation=n;function g(s){return Math.pow(s,3)}function t(s){return 1-g(1-s)}}),define(J[8],ee([0,1]),function(j,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getLeftDeleteOffset=e.breakBetweenGraphemeBreakType=e.getGraphemeBreakType=e.singleLetterHash=e.containsUppercaseCharacter=e.startsWithUTF8BOM=e.UTF8_BOM_CHARACTER=e.isEmojiImprecise=e.isFullWidthCharacter=e.containsFullWidthCharacter=e.containsUnusualLineTerminators=e.UNUSUAL_LINE_TERMINATORS=e.isBasicASCII=e.containsEmoji=e.containsRTL=e.prevCharLength=e.nextCharLength=e.getNextCodePoint=e.computeCodePoint=e.isLowSurrogate=e.isHighSurrogate=e.commonSuffixLength=e.commonPrefixLength=e.startsWithIgnoreCase=e.equalsIgnoreCase=e.isUpperAsciiLetter=e.isLowerAsciiLetter=e.compareSubstringIgnoreCase=e.compareIgnoreCase=e.compareSubstring=e.compare=e.lastNonWhitespaceIndex=e.getLeadingWhitespace=e.firstNonWhitespaceIndex=e.splitLines=e.regExpFlags=e.regExpLeadsToEndlessLoop=e.createRegExp=e.stripWildcards=e.convertSimple2RegExpPattern=e.rtrim=e.ltrim=e.trim=e.escapeRegExpCharacters=e.escape=e.format=e.isFalsyOrWhitespace=void 0;function w(ie){return!ie||typeof ie!="string"?!0:ie.trim().length===0}e.isFalsyOrWhitespace=w;const N=/{(\d+)}/g;function T(ie,...ae){return ae.length===0?ie:ie.replace(N,function(q,ne){const ce=parseInt(ne,10);return isNaN(ce)||ce<0||ce>=ae.length?q:ae[ce]})}e.format=T;function D(ie){return ie.replace(/[<>&]/g,function(ae){switch(ae){case"<":return"&lt;";case">":return"&gt;";case"&":return"&amp;";default:return ae}})}e.escape=D;function S(ie){return ie.replace(/[\\\{\}\*\+\?\|\^\$\.\[\]\(\)]/g,"\\$&")}e.escapeRegExpCharacters=S;function p(ie,ae=" "){const q=C(ie,ae);return n(q,ae)}e.trim=p;function C(ie,ae){if(!ie||!ae)return ie;const q=ae.length;if(q===0||ie.length===0)return ie;let ne=0;for(;ie.indexOf(ae,ne)===ne;)ne=ne+q;return ie.substring(ne)}e.ltrim=C;function n(ie,ae){if(!ie||!ae)return ie;const q=ae.length,ne=ie.length;if(q===0||ne===0)return ie;let ce=ne,le=-1;for(;le=ie.lastIndexOf(ae,ce-1),!(le===-1||le+q!==ce);){if(le===0)return"";ce=le}return ie.substring(0,ce)}e.rtrim=n;function g(ie){return ie.replace(/[\-\\\{\}\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&").replace(/[\*]/g,".*")}e.convertSimple2RegExpPattern=g;function t(ie){return ie.replace(/\*/g,"")}e.stripWildcards=t;function s(ie,ae,q={}){if(!ie)throw new Error("Cannot create regex from empty string");ae||(ie=S(ie)),q.wholeWord&&(/\B/.test(ie.charAt(0))||(ie="\\b"+ie),/\B/.test(ie.charAt(ie.length-1))||(ie=ie+"\\b"));let ne="";return q.global&&(ne+="g"),q.matchCase||(ne+="i"),q.multiline&&(ne+="m"),q.unicode&&(ne+="u"),new RegExp(ie,ne)}e.createRegExp=s;function c(ie){return ie.source==="^"||ie.source==="^$"||ie.source==="$"||ie.source==="^\\s*$"?!1:!!(ie.exec("")&&ie.lastIndex===0)}e.regExpLeadsToEndlessLoop=c;function u(ie){return(ie.global?"g":"")+(ie.ignoreCase?"i":"")+(ie.multiline?"m":"")+(ie.unicode?"u":"")}e.regExpFlags=u;function d(ie){return ie.split(/\r\n|\r|\n/)}e.splitLines=d;function a(ie){for(let ae=0,q=ie.length;ae<q;ae++){const ne=ie.charCodeAt(ae);if(ne!==32&&ne!==9)return ae}return-1}e.firstNonWhitespaceIndex=a;function r(ie,ae=0,q=ie.length){for(let ne=ae;ne<q;ne++){const ce=ie.charCodeAt(ne);if(ce!==32&&ce!==9)return ie.substring(ae,ne)}return ie.substring(ae,q)}e.getLeadingWhitespace=r;function o(ie,ae=ie.length-1){for(let q=ae;q>=0;q--){const ne=ie.charCodeAt(q);if(ne!==32&&ne!==9)return q}return-1}e.lastNonWhitespaceIndex=o;function i(ie,ae){return ie<ae?-1:ie>ae?1:0}e.compare=i;function l(ie,ae,q=0,ne=ie.length,ce=0,le=ae.length){for(;q<ne&&ce<le;q++,ce++){let te=ie.charCodeAt(q),he=ae.charCodeAt(ce);if(te<he)return-1;if(te>he)return 1}const de=ne-q,z=le-ce;return de<z?-1:de>z?1:0}e.compareSubstring=l;function h(ie,ae){return f(ie,ae,0,ie.length,0,ae.length)}e.compareIgnoreCase=h;function f(ie,ae,q=0,ne=ie.length,ce=0,le=ae.length){for(;q<ne&&ce<le;q++,ce++){let te=ie.charCodeAt(q),he=ae.charCodeAt(ce);if(te===he)continue;if(te>=128||he>=128)return l(ie.toLowerCase(),ae.toLowerCase(),q,ne,ce,le);y(te)&&(te-=32),y(he)&&(he-=32);const ge=te-he;if(ge!==0)return ge}const de=ne-q,z=le-ce;return de<z?-1:de>z?1:0}e.compareSubstringIgnoreCase=f;function y(ie){return ie>=97&&ie<=122}e.isLowerAsciiLetter=y;function _(ie){return ie>=65&&ie<=90}e.isUpperAsciiLetter=_;function b(ie,ae){return ie.length===ae.length&&f(ie,ae)===0}e.equalsIgnoreCase=b;function v(ie,ae){const q=ae.length;return ae.length>ie.length?!1:f(ie,ae,0,q)===0}e.startsWithIgnoreCase=v;function m(ie,ae){let q,ne=Math.min(ie.length,ae.length);for(q=0;q<ne;q++)if(ie.charCodeAt(q)!==ae.charCodeAt(q))return q;return ne}e.commonPrefixLength=m;function E(ie,ae){let q,ne=Math.min(ie.length,ae.length);const ce=ie.length-1,le=ae.length-1;for(q=0;q<ne;q++)if(ie.charCodeAt(ce-q)!==ae.charCodeAt(le-q))return q;return ne}e.commonSuffixLength=E;function I(ie){return 55296<=ie&&ie<=56319}e.isHighSurrogate=I;function k(ie){return 56320<=ie&&ie<=57343}e.isLowSurrogate=k;function M(ie,ae){return(ie-55296<<10)+(ae-56320)+65536}e.computeCodePoint=M;function P(ie,ae,q){const ne=ie.charCodeAt(q);if(I(ne)&&q+1<ae){const ce=ie.charCodeAt(q+1);if(k(ce))return M(ne,ce)}return ne}e.getNextCodePoint=P;function F(ie,ae){const q=ie.charCodeAt(ae-1);if(k(q)&&ae>1){const ne=ie.charCodeAt(ae-2);if(I(ne))return M(ne,q)}return q}function R(ie,ae){const q=V.getInstance(),ne=ae,ce=ie.length,le=P(ie,ce,ae);ae+=le>=65536?2:1;let de=q.getGraphemeBreakType(le);for(;ae<ce;){const z=P(ie,ce,ae),te=q.getGraphemeBreakType(z);if($(de,te))break;ae+=z>=65536?2:1,de=te}return ae-ne}e.nextCharLength=R;function A(ie,ae){const q=V.getInstance(),ne=ae,ce=F(ie,ae);ae-=ce>=65536?2:1;let le=q.getGraphemeBreakType(ce);for(;ae>0;){const de=F(ie,ae),z=q.getGraphemeBreakType(de);if($(z,le))break;ae-=de>=65536?2:1,le=z}return ne-ae}e.prevCharLength=A;const O=/(?:[\u05BE\u05C0\u05C3\u05C6\u05D0-\u05F4\u0608\u060B\u060D\u061B-\u064A\u066D-\u066F\u0671-\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u0710\u0712-\u072F\u074D-\u07A5\u07B1-\u07EA\u07F4\u07F5\u07FA-\u0815\u081A\u0824\u0828\u0830-\u0858\u085E-\u08BD\u200F\uFB1D\uFB1F-\uFB28\uFB2A-\uFD3D\uFD50-\uFDFC\uFE70-\uFEFC]|\uD802[\uDC00-\uDD1B\uDD20-\uDE00\uDE10-\uDE33\uDE40-\uDEE4\uDEEB-\uDF35\uDF40-\uDFFF]|\uD803[\uDC00-\uDCFF]|\uD83A[\uDC00-\uDCCF\uDD00-\uDD43\uDD50-\uDFFF]|\uD83B[\uDC00-\uDEBB])/;function L(ie){return O.test(ie)}e.containsRTL=L;const B=/(?:[\u231A\u231B\u23F0\u23F3\u2600-\u27BF\u2B50\u2B55]|\uD83C[\uDDE6-\uDDFF\uDF00-\uDFFF]|\uD83D[\uDC00-\uDE4F\uDE80-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD00-\uDDFF\uDE70-\uDED6])/;function W(ie){return B.test(ie)}e.containsEmoji=W;const K=/^[\t\n\r\x20-\x7E]*$/;function H(ie){return K.test(ie)}e.isBasicASCII=H,e.UNUSUAL_LINE_TERMINATORS=/[\u2028\u2029]/;function Y(ie){return e.UNUSUAL_LINE_TERMINATORS.test(ie)}e.containsUnusualLineTerminators=Y;function X(ie){for(let ae=0,q=ie.length;ae<q;ae++)if(Z(ie.charCodeAt(ae)))return!0;return!1}e.containsFullWidthCharacter=X;function Z(ie){return ie=+ie,ie>=11904&&ie<=55215||ie>=63744&&ie<=64255||ie>=65281&&ie<=65374}e.isFullWidthCharacter=Z;function se(ie){return ie>=127462&&ie<=127487||ie===8986||ie===8987||ie===9200||ie===9203||ie>=9728&&ie<=10175||ie===11088||ie===11093||ie>=127744&&ie<=128591||ie>=128640&&ie<=128764||ie>=128992&&ie<=129003||ie>=129280&&ie<=129535||ie>=129648&&ie<=129750}e.isEmojiImprecise=se,e.UTF8_BOM_CHARACTER=String.fromCharCode(65279);function oe(ie){return!!(ie&&ie.length>0&&ie.charCodeAt(0)===65279)}e.startsWithUTF8BOM=oe;function G(ie,ae=!1){return ie?(ae&&(ie=ie.replace(/\\./g,"")),ie.toLowerCase()!==ie):!1}e.containsUppercaseCharacter=G;function x(ie){const ae=90-65+1;return ie=ie%(2*ae),ie<ae?String.fromCharCode(97+ie):String.fromCharCode(65+ie-ae)}e.singleLetterHash=x;function U(ie){return V.getInstance().getGraphemeBreakType(ie)}e.getGraphemeBreakType=U;function $(ie,ae){return ie===0?ae!==5&&ae!==7:ie===2&&ae===3?!1:ie===4||ie===2||ie===3||ae===4||ae===2||ae===3?!0:!(ie===8&&(ae===8||ae===9||ae===11||ae===12)||(ie===11||ie===9)&&(ae===9||ae===10)||(ie===12||ie===10)&&ae===10||ae===5||ae===13||ae===7||ie===1||ie===13&&ae===14||ie===6&&ae===6)}e.breakBetweenGraphemeBreakType=$;class V{constructor(){this._data=Q()}static getInstance(){return V._INSTANCE||(V._INSTANCE=new V),V._INSTANCE}getGraphemeBreakType(ae){if(ae<32)return ae===10?3:ae===13?2:4;if(ae<127)return 0;const q=this._data,ne=q.length/3;let ce=1;for(;ce<=ne;)if(ae<q[3*ce])ce=2*ce;else if(ae>q[3*ce+1])ce=2*ce+1;else return q[3*ce+2];return 0}}V._INSTANCE=null;function Q(){return JSON.parse("[0,0,0,51592,51592,11,44424,44424,11,72251,72254,5,7150,7150,7,48008,48008,11,55176,55176,11,128420,128420,14,3276,3277,5,9979,9980,14,46216,46216,11,49800,49800,11,53384,53384,11,70726,70726,5,122915,122916,5,129320,129327,14,2558,2558,5,5906,5908,5,9762,9763,14,43360,43388,8,45320,45320,11,47112,47112,11,48904,48904,11,50696,50696,11,52488,52488,11,54280,54280,11,70082,70083,1,71350,71350,7,73111,73111,5,127892,127893,14,128726,128727,14,129473,129474,14,2027,2035,5,2901,2902,5,3784,3789,5,6754,6754,5,8418,8420,5,9877,9877,14,11088,11088,14,44008,44008,5,44872,44872,11,45768,45768,11,46664,46664,11,47560,47560,11,48456,48456,11,49352,49352,11,50248,50248,11,51144,51144,11,52040,52040,11,52936,52936,11,53832,53832,11,54728,54728,11,69811,69814,5,70459,70460,5,71096,71099,7,71998,71998,5,72874,72880,5,119149,119149,7,127374,127374,14,128335,128335,14,128482,128482,14,128765,128767,14,129399,129400,14,129680,129685,14,1476,1477,5,2377,2380,7,2759,2760,5,3137,3140,7,3458,3459,7,4153,4154,5,6432,6434,5,6978,6978,5,7675,7679,5,9723,9726,14,9823,9823,14,9919,9923,14,10035,10036,14,42736,42737,5,43596,43596,5,44200,44200,11,44648,44648,11,45096,45096,11,45544,45544,11,45992,45992,11,46440,46440,11,46888,46888,11,47336,47336,11,47784,47784,11,48232,48232,11,48680,48680,11,49128,49128,11,49576,49576,11,50024,50024,11,50472,50472,11,50920,50920,11,51368,51368,11,51816,51816,11,52264,52264,11,52712,52712,11,53160,53160,11,53608,53608,11,54056,54056,11,54504,54504,11,54952,54952,11,68108,68111,5,69933,69940,5,70197,70197,7,70498,70499,7,70845,70845,5,71229,71229,5,71727,71735,5,72154,72155,5,72344,72345,5,73023,73029,5,94095,94098,5,121403,121452,5,126981,127182,14,127538,127546,14,127990,127990,14,128391,128391,14,128445,128449,14,128500,128505,14,128752,128752,14,129160,129167,14,129356,129356,14,129432,129442,14,129648,129651,14,129751,131069,14,173,173,4,1757,1757,1,2274,2274,1,2494,2494,5,2641,2641,5,2876,2876,5,3014,3016,7,3262,3262,7,3393,3396,5,3570,3571,7,3968,3972,5,4228,4228,7,6086,6086,5,6679,6680,5,6912,6915,5,7080,7081,5,7380,7392,5,8252,8252,14,9096,9096,14,9748,9749,14,9784,9786,14,9833,9850,14,9890,9894,14,9938,9938,14,9999,9999,14,10085,10087,14,12349,12349,14,43136,43137,7,43454,43456,7,43755,43755,7,44088,44088,11,44312,44312,11,44536,44536,11,44760,44760,11,44984,44984,11,45208,45208,11,45432,45432,11,45656,45656,11,45880,45880,11,46104,46104,11,46328,46328,11,46552,46552,11,46776,46776,11,47000,47000,11,47224,47224,11,47448,47448,11,47672,47672,11,47896,47896,11,48120,48120,11,48344,48344,11,48568,48568,11,48792,48792,11,49016,49016,11,49240,49240,11,49464,49464,11,49688,49688,11,49912,49912,11,50136,50136,11,50360,50360,11,50584,50584,11,50808,50808,11,51032,51032,11,51256,51256,11,51480,51480,11,51704,51704,11,51928,51928,11,52152,52152,11,52376,52376,11,52600,52600,11,52824,52824,11,53048,53048,11,53272,53272,11,53496,53496,11,53720,53720,11,53944,53944,11,54168,54168,11,54392,54392,11,54616,54616,11,54840,54840,11,55064,55064,11,65438,65439,5,69633,69633,5,69837,69837,1,70018,70018,7,70188,70190,7,70368,70370,7,70465,70468,7,70712,70719,5,70835,70840,5,70850,70851,5,71132,71133,5,71340,71340,7,71458,71461,5,71985,71989,7,72002,72002,7,72193,72202,5,72281,72283,5,72766,72766,7,72885,72886,5,73104,73105,5,92912,92916,5,113824,113827,4,119173,119179,5,121505,121519,5,125136,125142,5,127279,127279,14,127489,127490,14,127570,127743,14,127900,127901,14,128254,128254,14,128369,128370,14,128400,128400,14,128425,128432,14,128468,128475,14,128489,128494,14,128715,128720,14,128745,128745,14,128759,128760,14,129004,129023,14,129296,129304,14,129340,129342,14,129388,129392,14,129404,129407,14,129454,129455,14,129485,129487,14,129659,129663,14,129719,129727,14,917536,917631,5,13,13,2,1160,1161,5,1564,1564,4,1807,1807,1,2085,2087,5,2363,2363,7,2402,2403,5,2507,2508,7,2622,2624,7,2691,2691,7,2786,2787,5,2881,2884,5,3006,3006,5,3072,3072,5,3170,3171,5,3267,3268,7,3330,3331,7,3406,3406,1,3538,3540,5,3655,3662,5,3897,3897,5,4038,4038,5,4184,4185,5,4352,4447,8,6068,6069,5,6155,6157,5,6448,6449,7,6742,6742,5,6783,6783,5,6966,6970,5,7042,7042,7,7143,7143,7,7212,7219,5,7412,7412,5,8206,8207,4,8294,8303,4,8596,8601,14,9410,9410,14,9742,9742,14,9757,9757,14,9770,9770,14,9794,9794,14,9828,9828,14,9855,9855,14,9882,9882,14,9900,9903,14,9929,9933,14,9963,9967,14,9987,9988,14,10006,10006,14,10062,10062,14,10175,10175,14,11744,11775,5,42607,42607,5,43043,43044,7,43263,43263,5,43444,43445,7,43569,43570,5,43698,43700,5,43766,43766,5,44032,44032,11,44144,44144,11,44256,44256,11,44368,44368,11,44480,44480,11,44592,44592,11,44704,44704,11,44816,44816,11,44928,44928,11,45040,45040,11,45152,45152,11,45264,45264,11,45376,45376,11,45488,45488,11,45600,45600,11,45712,45712,11,45824,45824,11,45936,45936,11,46048,46048,11,46160,46160,11,46272,46272,11,46384,46384,11,46496,46496,11,46608,46608,11,46720,46720,11,46832,46832,11,46944,46944,11,47056,47056,11,47168,47168,11,47280,47280,11,47392,47392,11,47504,47504,11,47616,47616,11,47728,47728,11,47840,47840,11,47952,47952,11,48064,48064,11,48176,48176,11,48288,48288,11,48400,48400,11,48512,48512,11,48624,48624,11,48736,48736,11,48848,48848,11,48960,48960,11,49072,49072,11,49184,49184,11,49296,49296,11,49408,49408,11,49520,49520,11,49632,49632,11,49744,49744,11,49856,49856,11,49968,49968,11,50080,50080,11,50192,50192,11,50304,50304,11,50416,50416,11,50528,50528,11,50640,50640,11,50752,50752,11,50864,50864,11,50976,50976,11,51088,51088,11,51200,51200,11,51312,51312,11,51424,51424,11,51536,51536,11,51648,51648,11,51760,51760,11,51872,51872,11,51984,51984,11,52096,52096,11,52208,52208,11,52320,52320,11,52432,52432,11,52544,52544,11,52656,52656,11,52768,52768,11,52880,52880,11,52992,52992,11,53104,53104,11,53216,53216,11,53328,53328,11,53440,53440,11,53552,53552,11,53664,53664,11,53776,53776,11,53888,53888,11,54000,54000,11,54112,54112,11,54224,54224,11,54336,54336,11,54448,54448,11,54560,54560,11,54672,54672,11,54784,54784,11,54896,54896,11,55008,55008,11,55120,55120,11,64286,64286,5,66272,66272,5,68900,68903,5,69762,69762,7,69817,69818,5,69927,69931,5,70003,70003,5,70070,70078,5,70094,70094,7,70194,70195,7,70206,70206,5,70400,70401,5,70463,70463,7,70475,70477,7,70512,70516,5,70722,70724,5,70832,70832,5,70842,70842,5,70847,70848,5,71088,71089,7,71102,71102,7,71219,71226,5,71231,71232,5,71342,71343,7,71453,71455,5,71463,71467,5,71737,71738,5,71995,71996,5,72000,72000,7,72145,72147,7,72160,72160,5,72249,72249,7,72273,72278,5,72330,72342,5,72752,72758,5,72850,72871,5,72882,72883,5,73018,73018,5,73031,73031,5,73109,73109,5,73461,73462,7,94031,94031,5,94192,94193,7,119142,119142,7,119155,119162,4,119362,119364,5,121476,121476,5,122888,122904,5,123184,123190,5,126976,126979,14,127184,127231,14,127344,127345,14,127405,127461,14,127514,127514,14,127561,127567,14,127778,127779,14,127896,127896,14,127985,127986,14,127995,127999,5,128326,128328,14,128360,128366,14,128378,128378,14,128394,128397,14,128405,128406,14,128422,128423,14,128435,128443,14,128453,128464,14,128479,128480,14,128484,128487,14,128496,128498,14,128640,128709,14,128723,128724,14,128736,128741,14,128747,128748,14,128755,128755,14,128762,128762,14,128981,128991,14,129096,129103,14,129292,129292,14,129311,129311,14,129329,129330,14,129344,129349,14,129360,129374,14,129394,129394,14,129402,129402,14,129413,129425,14,129445,129450,14,129466,129471,14,129483,129483,14,129511,129535,14,129653,129655,14,129667,129670,14,129705,129711,14,129731,129743,14,917505,917505,4,917760,917999,5,10,10,3,127,159,4,768,879,5,1471,1471,5,1536,1541,1,1648,1648,5,1767,1768,5,1840,1866,5,2070,2073,5,2137,2139,5,2307,2307,7,2366,2368,7,2382,2383,7,2434,2435,7,2497,2500,5,2519,2519,5,2563,2563,7,2631,2632,5,2677,2677,5,2750,2752,7,2763,2764,7,2817,2817,5,2879,2879,5,2891,2892,7,2914,2915,5,3008,3008,5,3021,3021,5,3076,3076,5,3146,3149,5,3202,3203,7,3264,3265,7,3271,3272,7,3298,3299,5,3390,3390,5,3402,3404,7,3426,3427,5,3535,3535,5,3544,3550,7,3635,3635,7,3763,3763,7,3893,3893,5,3953,3966,5,3981,3991,5,4145,4145,7,4157,4158,5,4209,4212,5,4237,4237,5,4520,4607,10,5970,5971,5,6071,6077,5,6089,6099,5,6277,6278,5,6439,6440,5,6451,6456,7,6683,6683,5,6744,6750,5,6765,6770,7,6846,6846,5,6964,6964,5,6972,6972,5,7019,7027,5,7074,7077,5,7083,7085,5,7146,7148,7,7154,7155,7,7222,7223,5,7394,7400,5,7416,7417,5,8204,8204,5,8233,8233,4,8288,8292,4,8413,8416,5,8482,8482,14,8986,8987,14,9193,9203,14,9654,9654,14,9733,9733,14,9745,9745,14,9752,9752,14,9760,9760,14,9766,9766,14,9774,9775,14,9792,9792,14,9800,9811,14,9825,9826,14,9831,9831,14,9852,9853,14,9872,9873,14,9880,9880,14,9885,9887,14,9896,9897,14,9906,9916,14,9926,9927,14,9936,9936,14,9941,9960,14,9974,9974,14,9982,9985,14,9992,9997,14,10002,10002,14,10017,10017,14,10055,10055,14,10071,10071,14,10145,10145,14,11013,11015,14,11503,11505,5,12334,12335,5,12951,12951,14,42612,42621,5,43014,43014,5,43047,43047,7,43204,43205,5,43335,43345,5,43395,43395,7,43450,43451,7,43561,43566,5,43573,43574,5,43644,43644,5,43710,43711,5,43758,43759,7,44005,44005,5,44012,44012,7,44060,44060,11,44116,44116,11,44172,44172,11,44228,44228,11,44284,44284,11,44340,44340,11,44396,44396,11,44452,44452,11,44508,44508,11,44564,44564,11,44620,44620,11,44676,44676,11,44732,44732,11,44788,44788,11,44844,44844,11,44900,44900,11,44956,44956,11,45012,45012,11,45068,45068,11,45124,45124,11,45180,45180,11,45236,45236,11,45292,45292,11,45348,45348,11,45404,45404,11,45460,45460,11,45516,45516,11,45572,45572,11,45628,45628,11,45684,45684,11,45740,45740,11,45796,45796,11,45852,45852,11,45908,45908,11,45964,45964,11,46020,46020,11,46076,46076,11,46132,46132,11,46188,46188,11,46244,46244,11,46300,46300,11,46356,46356,11,46412,46412,11,46468,46468,11,46524,46524,11,46580,46580,11,46636,46636,11,46692,46692,11,46748,46748,11,46804,46804,11,46860,46860,11,46916,46916,11,46972,46972,11,47028,47028,11,47084,47084,11,47140,47140,11,47196,47196,11,47252,47252,11,47308,47308,11,47364,47364,11,47420,47420,11,47476,47476,11,47532,47532,11,47588,47588,11,47644,47644,11,47700,47700,11,47756,47756,11,47812,47812,11,47868,47868,11,47924,47924,11,47980,47980,11,48036,48036,11,48092,48092,11,48148,48148,11,48204,48204,11,48260,48260,11,48316,48316,11,48372,48372,11,48428,48428,11,48484,48484,11,48540,48540,11,48596,48596,11,48652,48652,11,48708,48708,11,48764,48764,11,48820,48820,11,48876,48876,11,48932,48932,11,48988,48988,11,49044,49044,11,49100,49100,11,49156,49156,11,49212,49212,11,49268,49268,11,49324,49324,11,49380,49380,11,49436,49436,11,49492,49492,11,49548,49548,11,49604,49604,11,49660,49660,11,49716,49716,11,49772,49772,11,49828,49828,11,49884,49884,11,49940,49940,11,49996,49996,11,50052,50052,11,50108,50108,11,50164,50164,11,50220,50220,11,50276,50276,11,50332,50332,11,50388,50388,11,50444,50444,11,50500,50500,11,50556,50556,11,50612,50612,11,50668,50668,11,50724,50724,11,50780,50780,11,50836,50836,11,50892,50892,11,50948,50948,11,51004,51004,11,51060,51060,11,51116,51116,11,51172,51172,11,51228,51228,11,51284,51284,11,51340,51340,11,51396,51396,11,51452,51452,11,51508,51508,11,51564,51564,11,51620,51620,11,51676,51676,11,51732,51732,11,51788,51788,11,51844,51844,11,51900,51900,11,51956,51956,11,52012,52012,11,52068,52068,11,52124,52124,11,52180,52180,11,52236,52236,11,52292,52292,11,52348,52348,11,52404,52404,11,52460,52460,11,52516,52516,11,52572,52572,11,52628,52628,11,52684,52684,11,52740,52740,11,52796,52796,11,52852,52852,11,52908,52908,11,52964,52964,11,53020,53020,11,53076,53076,11,53132,53132,11,53188,53188,11,53244,53244,11,53300,53300,11,53356,53356,11,53412,53412,11,53468,53468,11,53524,53524,11,53580,53580,11,53636,53636,11,53692,53692,11,53748,53748,11,53804,53804,11,53860,53860,11,53916,53916,11,53972,53972,11,54028,54028,11,54084,54084,11,54140,54140,11,54196,54196,11,54252,54252,11,54308,54308,11,54364,54364,11,54420,54420,11,54476,54476,11,54532,54532,11,54588,54588,11,54644,54644,11,54700,54700,11,54756,54756,11,54812,54812,11,54868,54868,11,54924,54924,11,54980,54980,11,55036,55036,11,55092,55092,11,55148,55148,11,55216,55238,9,65056,65071,5,65529,65531,4,68097,68099,5,68159,68159,5,69446,69456,5,69688,69702,5,69808,69810,7,69815,69816,7,69821,69821,1,69888,69890,5,69932,69932,7,69957,69958,7,70016,70017,5,70067,70069,7,70079,70080,7,70089,70092,5,70095,70095,5,70191,70193,5,70196,70196,5,70198,70199,5,70367,70367,5,70371,70378,5,70402,70403,7,70462,70462,5,70464,70464,5,70471,70472,7,70487,70487,5,70502,70508,5,70709,70711,7,70720,70721,7,70725,70725,7,70750,70750,5,70833,70834,7,70841,70841,7,70843,70844,7,70846,70846,7,70849,70849,7,71087,71087,5,71090,71093,5,71100,71101,5,71103,71104,5,71216,71218,7,71227,71228,7,71230,71230,7,71339,71339,5,71341,71341,5,71344,71349,5,71351,71351,5,71456,71457,7,71462,71462,7,71724,71726,7,71736,71736,7,71984,71984,5,71991,71992,7,71997,71997,7,71999,71999,1,72001,72001,1,72003,72003,5,72148,72151,5,72156,72159,7,72164,72164,7,72243,72248,5,72250,72250,1,72263,72263,5,72279,72280,7,72324,72329,1,72343,72343,7,72751,72751,7,72760,72765,5,72767,72767,5,72873,72873,7,72881,72881,7,72884,72884,7,73009,73014,5,73020,73021,5,73030,73030,1,73098,73102,7,73107,73108,7,73110,73110,7,73459,73460,5,78896,78904,4,92976,92982,5,94033,94087,7,94180,94180,5,113821,113822,5,119141,119141,5,119143,119145,5,119150,119154,5,119163,119170,5,119210,119213,5,121344,121398,5,121461,121461,5,121499,121503,5,122880,122886,5,122907,122913,5,122918,122922,5,123628,123631,5,125252,125258,5,126980,126980,14,127183,127183,14,127245,127247,14,127340,127343,14,127358,127359,14,127377,127386,14,127462,127487,6,127491,127503,14,127535,127535,14,127548,127551,14,127568,127569,14,127744,127777,14,127780,127891,14,127894,127895,14,127897,127899,14,127902,127984,14,127987,127989,14,127991,127994,14,128000,128253,14,128255,128317,14,128329,128334,14,128336,128359,14,128367,128368,14,128371,128377,14,128379,128390,14,128392,128393,14,128398,128399,14,128401,128404,14,128407,128419,14,128421,128421,14,128424,128424,14,128433,128434,14,128444,128444,14,128450,128452,14,128465,128467,14,128476,128478,14,128481,128481,14,128483,128483,14,128488,128488,14,128495,128495,14,128499,128499,14,128506,128591,14,128710,128714,14,128721,128722,14,128725,128725,14,128728,128735,14,128742,128744,14,128746,128746,14,128749,128751,14,128753,128754,14,128756,128758,14,128761,128761,14,128763,128764,14,128884,128895,14,128992,129003,14,129036,129039,14,129114,129119,14,129198,129279,14,129293,129295,14,129305,129310,14,129312,129319,14,129328,129328,14,129331,129338,14,129343,129343,14,129351,129355,14,129357,129359,14,129375,129387,14,129393,129393,14,129395,129398,14,129401,129401,14,129403,129403,14,129408,129412,14,129426,129431,14,129443,129444,14,129451,129453,14,129456,129465,14,129472,129472,14,129475,129482,14,129484,129484,14,129488,129510,14,129536,129647,14,129652,129652,14,129656,129658,14,129664,129666,14,129671,129679,14,129686,129704,14,129712,129718,14,129728,129730,14,129744,129750,14,917504,917504,4,917506,917535,4,917632,917759,4,918000,921599,4,0,9,4,11,12,4,14,31,4,169,169,14,174,174,14,1155,1159,5,1425,1469,5,1473,1474,5,1479,1479,5,1552,1562,5,1611,1631,5,1750,1756,5,1759,1764,5,1770,1773,5,1809,1809,5,1958,1968,5,2045,2045,5,2075,2083,5,2089,2093,5,2259,2273,5,2275,2306,5,2362,2362,5,2364,2364,5,2369,2376,5,2381,2381,5,2385,2391,5,2433,2433,5,2492,2492,5,2495,2496,7,2503,2504,7,2509,2509,5,2530,2531,5,2561,2562,5,2620,2620,5,2625,2626,5,2635,2637,5,2672,2673,5,2689,2690,5,2748,2748,5,2753,2757,5,2761,2761,7,2765,2765,5,2810,2815,5,2818,2819,7,2878,2878,5,2880,2880,7,2887,2888,7,2893,2893,5,2903,2903,5,2946,2946,5,3007,3007,7,3009,3010,7,3018,3020,7,3031,3031,5,3073,3075,7,3134,3136,5,3142,3144,5,3157,3158,5,3201,3201,5,3260,3260,5,3263,3263,5,3266,3266,5,3270,3270,5,3274,3275,7,3285,3286,5,3328,3329,5,3387,3388,5,3391,3392,7,3398,3400,7,3405,3405,5,3415,3415,5,3457,3457,5,3530,3530,5,3536,3537,7,3542,3542,5,3551,3551,5,3633,3633,5,3636,3642,5,3761,3761,5,3764,3772,5,3864,3865,5,3895,3895,5,3902,3903,7,3967,3967,7,3974,3975,5,3993,4028,5,4141,4144,5,4146,4151,5,4155,4156,7,4182,4183,7,4190,4192,5,4226,4226,5,4229,4230,5,4253,4253,5,4448,4519,9,4957,4959,5,5938,5940,5,6002,6003,5,6070,6070,7,6078,6085,7,6087,6088,7,6109,6109,5,6158,6158,4,6313,6313,5,6435,6438,7,6441,6443,7,6450,6450,5,6457,6459,5,6681,6682,7,6741,6741,7,6743,6743,7,6752,6752,5,6757,6764,5,6771,6780,5,6832,6845,5,6847,6848,5,6916,6916,7,6965,6965,5,6971,6971,7,6973,6977,7,6979,6980,7,7040,7041,5,7073,7073,7,7078,7079,7,7082,7082,7,7142,7142,5,7144,7145,5,7149,7149,5,7151,7153,5,7204,7211,7,7220,7221,7,7376,7378,5,7393,7393,7,7405,7405,5,7415,7415,7,7616,7673,5,8203,8203,4,8205,8205,13,8232,8232,4,8234,8238,4,8265,8265,14,8293,8293,4,8400,8412,5,8417,8417,5,8421,8432,5,8505,8505,14,8617,8618,14,9000,9000,14,9167,9167,14,9208,9210,14,9642,9643,14,9664,9664,14,9728,9732,14,9735,9741,14,9743,9744,14,9746,9746,14,9750,9751,14,9753,9756,14,9758,9759,14,9761,9761,14,9764,9765,14,9767,9769,14,9771,9773,14,9776,9783,14,9787,9791,14,9793,9793,14,9795,9799,14,9812,9822,14,9824,9824,14,9827,9827,14,9829,9830,14,9832,9832,14,9851,9851,14,9854,9854,14,9856,9861,14,9874,9876,14,9878,9879,14,9881,9881,14,9883,9884,14,9888,9889,14,9895,9895,14,9898,9899,14,9904,9905,14,9917,9918,14,9924,9925,14,9928,9928,14,9934,9935,14,9937,9937,14,9939,9940,14,9961,9962,14,9968,9973,14,9975,9978,14,9981,9981,14,9986,9986,14,9989,9989,14,9998,9998,14,10000,10001,14,10004,10004,14,10013,10013,14,10024,10024,14,10052,10052,14,10060,10060,14,10067,10069,14,10083,10084,14,10133,10135,14,10160,10160,14,10548,10549,14,11035,11036,14,11093,11093,14,11647,11647,5,12330,12333,5,12336,12336,14,12441,12442,5,12953,12953,14,42608,42610,5,42654,42655,5,43010,43010,5,43019,43019,5,43045,43046,5,43052,43052,5,43188,43203,7,43232,43249,5,43302,43309,5,43346,43347,7,43392,43394,5,43443,43443,5,43446,43449,5,43452,43453,5,43493,43493,5,43567,43568,7,43571,43572,7,43587,43587,5,43597,43597,7,43696,43696,5,43703,43704,5,43713,43713,5,43756,43757,5,43765,43765,7,44003,44004,7,44006,44007,7,44009,44010,7,44013,44013,5,44033,44059,12,44061,44087,12,44089,44115,12,44117,44143,12,44145,44171,12,44173,44199,12,44201,44227,12,44229,44255,12,44257,44283,12,44285,44311,12,44313,44339,12,44341,44367,12,44369,44395,12,44397,44423,12,44425,44451,12,44453,44479,12,44481,44507,12,44509,44535,12,44537,44563,12,44565,44591,12,44593,44619,12,44621,44647,12,44649,44675,12,44677,44703,12,44705,44731,12,44733,44759,12,44761,44787,12,44789,44815,12,44817,44843,12,44845,44871,12,44873,44899,12,44901,44927,12,44929,44955,12,44957,44983,12,44985,45011,12,45013,45039,12,45041,45067,12,45069,45095,12,45097,45123,12,45125,45151,12,45153,45179,12,45181,45207,12,45209,45235,12,45237,45263,12,45265,45291,12,45293,45319,12,45321,45347,12,45349,45375,12,45377,45403,12,45405,45431,12,45433,45459,12,45461,45487,12,45489,45515,12,45517,45543,12,45545,45571,12,45573,45599,12,45601,45627,12,45629,45655,12,45657,45683,12,45685,45711,12,45713,45739,12,45741,45767,12,45769,45795,12,45797,45823,12,45825,45851,12,45853,45879,12,45881,45907,12,45909,45935,12,45937,45963,12,45965,45991,12,45993,46019,12,46021,46047,12,46049,46075,12,46077,46103,12,46105,46131,12,46133,46159,12,46161,46187,12,46189,46215,12,46217,46243,12,46245,46271,12,46273,46299,12,46301,46327,12,46329,46355,12,46357,46383,12,46385,46411,12,46413,46439,12,46441,46467,12,46469,46495,12,46497,46523,12,46525,46551,12,46553,46579,12,46581,46607,12,46609,46635,12,46637,46663,12,46665,46691,12,46693,46719,12,46721,46747,12,46749,46775,12,46777,46803,12,46805,46831,12,46833,46859,12,46861,46887,12,46889,46915,12,46917,46943,12,46945,46971,12,46973,46999,12,47001,47027,12,47029,47055,12,47057,47083,12,47085,47111,12,47113,47139,12,47141,47167,12,47169,47195,12,47197,47223,12,47225,47251,12,47253,47279,12,47281,47307,12,47309,47335,12,47337,47363,12,47365,47391,12,47393,47419,12,47421,47447,12,47449,47475,12,47477,47503,12,47505,47531,12,47533,47559,12,47561,47587,12,47589,47615,12,47617,47643,12,47645,47671,12,47673,47699,12,47701,47727,12,47729,47755,12,47757,47783,12,47785,47811,12,47813,47839,12,47841,47867,12,47869,47895,12,47897,47923,12,47925,47951,12,47953,47979,12,47981,48007,12,48009,48035,12,48037,48063,12,48065,48091,12,48093,48119,12,48121,48147,12,48149,48175,12,48177,48203,12,48205,48231,12,48233,48259,12,48261,48287,12,48289,48315,12,48317,48343,12,48345,48371,12,48373,48399,12,48401,48427,12,48429,48455,12,48457,48483,12,48485,48511,12,48513,48539,12,48541,48567,12,48569,48595,12,48597,48623,12,48625,48651,12,48653,48679,12,48681,48707,12,48709,48735,12,48737,48763,12,48765,48791,12,48793,48819,12,48821,48847,12,48849,48875,12,48877,48903,12,48905,48931,12,48933,48959,12,48961,48987,12,48989,49015,12,49017,49043,12,49045,49071,12,49073,49099,12,49101,49127,12,49129,49155,12,49157,49183,12,49185,49211,12,49213,49239,12,49241,49267,12,49269,49295,12,49297,49323,12,49325,49351,12,49353,49379,12,49381,49407,12,49409,49435,12,49437,49463,12,49465,49491,12,49493,49519,12,49521,49547,12,49549,49575,12,49577,49603,12,49605,49631,12,49633,49659,12,49661,49687,12,49689,49715,12,49717,49743,12,49745,49771,12,49773,49799,12,49801,49827,12,49829,49855,12,49857,49883,12,49885,49911,12,49913,49939,12,49941,49967,12,49969,49995,12,49997,50023,12,50025,50051,12,50053,50079,12,50081,50107,12,50109,50135,12,50137,50163,12,50165,50191,12,50193,50219,12,50221,50247,12,50249,50275,12,50277,50303,12,50305,50331,12,50333,50359,12,50361,50387,12,50389,50415,12,50417,50443,12,50445,50471,12,50473,50499,12,50501,50527,12,50529,50555,12,50557,50583,12,50585,50611,12,50613,50639,12,50641,50667,12,50669,50695,12,50697,50723,12,50725,50751,12,50753,50779,12,50781,50807,12,50809,50835,12,50837,50863,12,50865,50891,12,50893,50919,12,50921,50947,12,50949,50975,12,50977,51003,12,51005,51031,12,51033,51059,12,51061,51087,12,51089,51115,12,51117,51143,12,51145,51171,12,51173,51199,12,51201,51227,12,51229,51255,12,51257,51283,12,51285,51311,12,51313,51339,12,51341,51367,12,51369,51395,12,51397,51423,12,51425,51451,12,51453,51479,12,51481,51507,12,51509,51535,12,51537,51563,12,51565,51591,12,51593,51619,12,51621,51647,12,51649,51675,12,51677,51703,12,51705,51731,12,51733,51759,12,51761,51787,12,51789,51815,12,51817,51843,12,51845,51871,12,51873,51899,12,51901,51927,12,51929,51955,12,51957,51983,12,51985,52011,12,52013,52039,12,52041,52067,12,52069,52095,12,52097,52123,12,52125,52151,12,52153,52179,12,52181,52207,12,52209,52235,12,52237,52263,12,52265,52291,12,52293,52319,12,52321,52347,12,52349,52375,12,52377,52403,12,52405,52431,12,52433,52459,12,52461,52487,12,52489,52515,12,52517,52543,12,52545,52571,12,52573,52599,12,52601,52627,12,52629,52655,12,52657,52683,12,52685,52711,12,52713,52739,12,52741,52767,12,52769,52795,12,52797,52823,12,52825,52851,12,52853,52879,12,52881,52907,12,52909,52935,12,52937,52963,12,52965,52991,12,52993,53019,12,53021,53047,12,53049,53075,12,53077,53103,12,53105,53131,12,53133,53159,12,53161,53187,12,53189,53215,12,53217,53243,12,53245,53271,12,53273,53299,12,53301,53327,12,53329,53355,12,53357,53383,12,53385,53411,12,53413,53439,12,53441,53467,12,53469,53495,12,53497,53523,12,53525,53551,12,53553,53579,12,53581,53607,12,53609,53635,12,53637,53663,12,53665,53691,12,53693,53719,12,53721,53747,12,53749,53775,12,53777,53803,12,53805,53831,12,53833,53859,12,53861,53887,12,53889,53915,12,53917,53943,12,53945,53971,12,53973,53999,12,54001,54027,12,54029,54055,12,54057,54083,12,54085,54111,12,54113,54139,12,54141,54167,12,54169,54195,12,54197,54223,12,54225,54251,12,54253,54279,12,54281,54307,12,54309,54335,12,54337,54363,12,54365,54391,12,54393,54419,12,54421,54447,12,54449,54475,12,54477,54503,12,54505,54531,12,54533,54559,12,54561,54587,12,54589,54615,12,54617,54643,12,54645,54671,12,54673,54699,12,54701,54727,12,54729,54755,12,54757,54783,12,54785,54811,12,54813,54839,12,54841,54867,12,54869,54895,12,54897,54923,12,54925,54951,12,54953,54979,12,54981,55007,12,55009,55035,12,55037,55063,12,55065,55091,12,55093,55119,12,55121,55147,12,55149,55175,12,55177,55203,12,55243,55291,10,65024,65039,5,65279,65279,4,65520,65528,4,66045,66045,5,66422,66426,5,68101,68102,5,68152,68154,5,68325,68326,5,69291,69292,5,69632,69632,7,69634,69634,7,69759,69761,5]")}function ue(ie,ae){if(ie===0)return 0;const q=pe(ie,ae);if(q!==void 0)return q;const ne=F(ae,ie);return ie-=fe(ne),ie}e.getLeftDeleteOffset=ue;function pe(ie,ae){let q=F(ae,ie);for(ie-=fe(q);re(q)||q===65039||q===8419;){if(ie===0)return;q=F(ae,ie),ie-=fe(q)}if(!!se(q)){if(ie>=0){const ne=F(ae,ie);ne===8205&&(ie-=fe(ne))}return ie}}function fe(ie){return ie>=65536?2:1}function re(ie){return 127995<=ie&&ie<=127999}}),define(J[162],ee([0,1,75,17,8]),function(j,e,w,N,T){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.hasDriveLetter=e.isRootOrDriveLetter=e.isWindowsDriveLetter=e.isEqualOrParent=e.toPosixPath=e.toSlashes=void 0;function D(t){return t.replace(/[\\/]/g,w.posix.sep)}e.toSlashes=D;function S(t){return t.indexOf("/")===-1&&(t=D(t)),/^[a-zA-Z]:(\/|$)/.test(t)&&(t="/"+t),t}e.toPosixPath=S;function p(t,s,c,u=w.sep){if(t===s)return!0;if(!t||!s||s.length>t.length)return!1;if(c){if(!(0,T.startsWithIgnoreCase)(t,s))return!1;if(s.length===t.length)return!0;let a=s.length;return s.charAt(s.length-1)===u&&a--,t.charAt(a)===u}return s.charAt(s.length-1)!==u&&(s+=u),t.indexOf(s)===0}e.isEqualOrParent=p;function C(t){return t>=65&&t<=90||t>=97&&t<=122}e.isWindowsDriveLetter=C;function n(t){const s=(0,w.normalize)(t);return N.isWindows?t.length>3?!1:g(s)&&(t.length===2||s.charCodeAt(2)===92):s===w.posix.sep}e.isRootOrDriveLetter=n;function g(t){return N.isWindows?C(t.charCodeAt(0))&&t.charCodeAt(1)===58:!1}e.hasDriveLetter=g}),define(J[95],ee([0,1,8]),function(j,e,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.StringSHA1=e.toHexString=e.stringHash=e.numberHash=e.doHash=e.hash=void 0;function N(d){return T(d,0)}e.hash=N;function T(d,a){switch(typeof d){case"object":return d===null?D(349,a):Array.isArray(d)?C(d,a):n(d,a);case"string":return p(d,a);case"boolean":return S(d,a);case"number":return D(d,a);case"undefined":return D(937,a);default:return D(617,a)}}e.doHash=T;function D(d,a){return(a<<5)-a+d|0}e.numberHash=D;function S(d,a){return D(d?433:863,a)}function p(d,a){a=D(149417,a);for(let r=0,o=d.length;r<o;r++)a=D(d.charCodeAt(r),a);return a}e.stringHash=p;function C(d,a){return a=D(104579,a),d.reduce((r,o)=>T(o,r),a)}function n(d,a){return a=D(181387,a),Object.keys(d).sort().reduce((r,o)=>(r=p(o,r),T(d[o],r)),a)}function g(d,a,r=32){const o=r-a,i=~((1<<o)-1);return(d<<a|(i&d)>>>o)>>>0}function t(d,a=0,r=d.byteLength,o=0){for(let i=0;i<r;i++)d[a+i]=o}function s(d,a,r="0"){for(;d.length<a;)d=r+d;return d}function c(d,a=32){return d instanceof ArrayBuffer?Array.from(new Uint8Array(d)).map(r=>r.toString(16).padStart(2,"0")).join(""):s((d>>>0).toString(16),a/4)}e.toHexString=c;class u{constructor(){this._h0=1732584193,this._h1=4023233417,this._h2=2562383102,this._h3=271733878,this._h4=3285377520,this._buff=new Uint8Array(64+3),this._buffDV=new DataView(this._buff.buffer),this._buffLen=0,this._totalLen=0,this._leftoverHighSurrogate=0,this._finished=!1}update(a){const r=a.length;if(r===0)return;const o=this._buff;let i=this._buffLen,l=this._leftoverHighSurrogate,h,f;for(l!==0?(h=l,f=-1,l=0):(h=a.charCodeAt(0),f=0);;){let y=h;if(w.isHighSurrogate(h))if(f+1<r){const _=a.charCodeAt(f+1);w.isLowSurrogate(_)?(f++,y=w.computeCodePoint(h,_)):y=65533}else{l=h;break}else w.isLowSurrogate(h)&&(y=65533);if(i=this._push(o,i,y),f++,f<r)h=a.charCodeAt(f);else break}this._buffLen=i,this._leftoverHighSurrogate=l}_push(a,r,o){return o<128?a[r++]=o:o<2048?(a[r++]=192|(o&1984)>>>6,a[r++]=128|(o&63)>>>0):o<65536?(a[r++]=224|(o&61440)>>>12,a[r++]=128|(o&4032)>>>6,a[r++]=128|(o&63)>>>0):(a[r++]=240|(o&1835008)>>>18,a[r++]=128|(o&258048)>>>12,a[r++]=128|(o&4032)>>>6,a[r++]=128|(o&63)>>>0),r>=64&&(this._step(),r-=64,this._totalLen+=64,a[0]=a[64+0],a[1]=a[64+1],a[2]=a[64+2]),r}digest(){return this._finished||(this._finished=!0,this._leftoverHighSurrogate&&(this._leftoverHighSurrogate=0,this._buffLen=this._push(this._buff,this._buffLen,65533)),this._totalLen+=this._buffLen,this._wrapUp()),c(this._h0)+c(this._h1)+c(this._h2)+c(this._h3)+c(this._h4)}_wrapUp(){this._buff[this._buffLen++]=128,t(this._buff,this._buffLen),this._buffLen>56&&(this._step(),t(this._buff));const a=8*this._totalLen;this._buffDV.setUint32(56,Math.floor(a/4294967296),!1),this._buffDV.setUint32(60,a%4294967296,!1),this._step()}_step(){const a=u._bigBlock32,r=this._buffDV;for(let v=0;v<64;v+=4)a.setUint32(v,r.getUint32(v,!1),!1);for(let v=64;v<320;v+=4)a.setUint32(v,g(a.getUint32(v-12,!1)^a.getUint32(v-32,!1)^a.getUint32(v-56,!1)^a.getUint32(v-64,!1),1),!1);let o=this._h0,i=this._h1,l=this._h2,h=this._h3,f=this._h4,y,_,b;for(let v=0;v<80;v++)v<20?(y=i&l|~i&h,_=1518500249):v<40?(y=i^l^h,_=1859775393):v<60?(y=i&l|i&h|l&h,_=2400959708):(y=i^l^h,_=3395469782),b=g(o,5)+y+f+_+a.getUint32(v*4,!1)&4294967295,f=h,h=l,l=g(i,30),i=o,o=b;this._h0=this._h0+o&4294967295,this._h1=this._h1+i&4294967295,this._h2=this._h2+l&4294967295,this._h3=this._h3+h&4294967295,this._h4=this._h4+f&4294967295}}e.StringSHA1=u,u._bigBlock32=new DataView(new ArrayBuffer(320))}),define(J[134],ee([0,1,297,95]),function(j,e,w,N){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LcsDiff=e.MyArray=e.Debug=e.stringDiff=e.StringDiffSequence=void 0;class T{constructor(t){this.source=t}getElements(){const t=this.source,s=new Int32Array(t.length);for(let c=0,u=t.length;c<u;c++)s[c]=t.charCodeAt(c);return s}}e.StringDiffSequence=T;function D(g,t,s){return new n(new T(g),new T(t)).ComputeDiff(s).changes}e.stringDiff=D;class S{static Assert(t,s){if(!t)throw new Error(s)}}e.Debug=S;class p{static Copy(t,s,c,u,d){for(let a=0;a<d;a++)c[u+a]=t[s+a]}static Copy2(t,s,c,u,d){for(let a=0;a<d;a++)c[u+a]=t[s+a]}}e.MyArray=p;class C{constructor(){this.m_changes=[],this.m_originalStart=1073741824,this.m_modifiedStart=1073741824,this.m_originalCount=0,this.m_modifiedCount=0}MarkNextChange(){(this.m_originalCount>0||this.m_modifiedCount>0)&&this.m_changes.push(new w.DiffChange(this.m_originalStart,this.m_originalCount,this.m_modifiedStart,this.m_modifiedCount)),this.m_originalCount=0,this.m_modifiedCount=0,this.m_originalStart=1073741824,this.m_modifiedStart=1073741824}AddOriginalElement(t,s){this.m_originalStart=Math.min(this.m_originalStart,t),this.m_modifiedStart=Math.min(this.m_modifiedStart,s),this.m_originalCount++}AddModifiedElement(t,s){this.m_originalStart=Math.min(this.m_originalStart,t),this.m_modifiedStart=Math.min(this.m_modifiedStart,s),this.m_modifiedCount++}getChanges(){return(this.m_originalCount>0||this.m_modifiedCount>0)&&this.MarkNextChange(),this.m_changes}getReverseChanges(){return(this.m_originalCount>0||this.m_modifiedCount>0)&&this.MarkNextChange(),this.m_changes.reverse(),this.m_changes}}class n{constructor(t,s,c=null){this.ContinueProcessingPredicate=c,this._originalSequence=t,this._modifiedSequence=s;const[u,d,a]=n._getElements(t),[r,o,i]=n._getElements(s);this._hasStrings=a&&i,this._originalStringElements=u,this._originalElementsOrHash=d,this._modifiedStringElements=r,this._modifiedElementsOrHash=o,this.m_forwardHistory=[],this.m_reverseHistory=[]}static _isStringArray(t){return t.length>0&&typeof t[0]=="string"}static _getElements(t){const s=t.getElements();if(n._isStringArray(s)){const c=new Int32Array(s.length);for(let u=0,d=s.length;u<d;u++)c[u]=(0,N.stringHash)(s[u],0);return[s,c,!0]}return s instanceof Int32Array?[[],s,!1]:[[],new Int32Array(s),!1]}ElementsAreEqual(t,s){return this._originalElementsOrHash[t]!==this._modifiedElementsOrHash[s]?!1:this._hasStrings?this._originalStringElements[t]===this._modifiedStringElements[s]:!0}ElementsAreStrictEqual(t,s){if(!this.ElementsAreEqual(t,s))return!1;const c=n._getStrictElement(this._originalSequence,t),u=n._getStrictElement(this._modifiedSequence,s);return c===u}static _getStrictElement(t,s){return typeof t.getStrictElement=="function"?t.getStrictElement(s):null}OriginalElementsAreEqual(t,s){return this._originalElementsOrHash[t]!==this._originalElementsOrHash[s]?!1:this._hasStrings?this._originalStringElements[t]===this._originalStringElements[s]:!0}ModifiedElementsAreEqual(t,s){return this._modifiedElementsOrHash[t]!==this._modifiedElementsOrHash[s]?!1:this._hasStrings?this._modifiedStringElements[t]===this._modifiedStringElements[s]:!0}ComputeDiff(t){return this._ComputeDiff(0,this._originalElementsOrHash.length-1,0,this._modifiedElementsOrHash.length-1,t)}_ComputeDiff(t,s,c,u,d){const a=[!1];let r=this.ComputeDiffRecursive(t,s,c,u,a);return d&&(r=this.PrettifyChanges(r)),{quitEarly:a[0],changes:r}}ComputeDiffRecursive(t,s,c,u,d){for(d[0]=!1;t<=s&&c<=u&&this.ElementsAreEqual(t,c);)t++,c++;for(;s>=t&&u>=c&&this.ElementsAreEqual(s,u);)s--,u--;if(t>s||c>u){let h;return c<=u?(S.Assert(t===s+1,"originalStart should only be one more than originalEnd"),h=[new w.DiffChange(t,0,c,u-c+1)]):t<=s?(S.Assert(c===u+1,"modifiedStart should only be one more than modifiedEnd"),h=[new w.DiffChange(t,s-t+1,c,0)]):(S.Assert(t===s+1,"originalStart should only be one more than originalEnd"),S.Assert(c===u+1,"modifiedStart should only be one more than modifiedEnd"),h=[]),h}const a=[0],r=[0],o=this.ComputeRecursionPoint(t,s,c,u,a,r,d),i=a[0],l=r[0];if(o!==null)return o;if(!d[0]){const h=this.ComputeDiffRecursive(t,i,c,l,d);let f=[];return d[0]?f=[new w.DiffChange(i+1,s-(i+1)+1,l+1,u-(l+1)+1)]:f=this.ComputeDiffRecursive(i+1,s,l+1,u,d),this.ConcatenateChanges(h,f)}return[new w.DiffChange(t,s-t+1,c,u-c+1)]}WALKTRACE(t,s,c,u,d,a,r,o,i,l,h,f,y,_,b,v,m,E){let I=null,k=null,M=new C,P=s,F=c,R=y[0]-v[0]-u,A=-1073741824,O=this.m_forwardHistory.length-1;do{const L=R+t;L===P||L<F&&i[L-1]<i[L+1]?(h=i[L+1],_=h-R-u,h<A&&M.MarkNextChange(),A=h,M.AddModifiedElement(h+1,_),R=L+1-t):(h=i[L-1]+1,_=h-R-u,h<A&&M.MarkNextChange(),A=h-1,M.AddOriginalElement(h,_+1),R=L-1-t),O>=0&&(i=this.m_forwardHistory[O],t=i[0],P=1,F=i.length-1)}while(--O>=-1);if(I=M.getReverseChanges(),E[0]){let L=y[0]+1,B=v[0]+1;if(I!==null&&I.length>0){const W=I[I.length-1];L=Math.max(L,W.getOriginalEnd()),B=Math.max(B,W.getModifiedEnd())}k=[new w.DiffChange(L,f-L+1,B,b-B+1)]}else{M=new C,P=a,F=r,R=y[0]-v[0]-o,A=1073741824,O=m?this.m_reverseHistory.length-1:this.m_reverseHistory.length-2;do{const L=R+d;L===P||L<F&&l[L-1]>=l[L+1]?(h=l[L+1]-1,_=h-R-o,h>A&&M.MarkNextChange(),A=h+1,M.AddOriginalElement(h+1,_+1),R=L+1-d):(h=l[L-1],_=h-R-o,h>A&&M.MarkNextChange(),A=h,M.AddModifiedElement(h+1,_+1),R=L-1-d),O>=0&&(l=this.m_reverseHistory[O],d=l[0],P=1,F=l.length-1)}while(--O>=-1);k=M.getChanges()}return this.ConcatenateChanges(I,k)}ComputeRecursionPoint(t,s,c,u,d,a,r){let o=0,i=0,l=0,h=0,f=0,y=0;t--,c--,d[0]=0,a[0]=0,this.m_forwardHistory=[],this.m_reverseHistory=[];const _=s-t+(u-c),b=_+1,v=new Int32Array(b),m=new Int32Array(b),E=u-c,I=s-t,k=t-c,M=s-u,F=(I-E)%2==0;v[E]=t,m[I]=s,r[0]=!1;for(let R=1;R<=_/2+1;R++){let A=0,O=0;l=this.ClipDiagonalBound(E-R,R,E,b),h=this.ClipDiagonalBound(E+R,R,E,b);for(let B=l;B<=h;B+=2){B===l||B<h&&v[B-1]<v[B+1]?o=v[B+1]:o=v[B-1]+1,i=o-(B-E)-k;const W=o;for(;o<s&&i<u&&this.ElementsAreEqual(o+1,i+1);)o++,i++;if(v[B]=o,o+i>A+O&&(A=o,O=i),!F&&Math.abs(B-I)<=R-1&&o>=m[B])return d[0]=o,a[0]=i,W<=m[B]&&1447>0&&R<=1447+1?this.WALKTRACE(E,l,h,k,I,f,y,M,v,m,o,s,d,i,u,a,F,r):null}const L=(A-t+(O-c)-R)/2;if(this.ContinueProcessingPredicate!==null&&!this.ContinueProcessingPredicate(A,L))return r[0]=!0,d[0]=A,a[0]=O,L>0&&1447>0&&R<=1447+1?this.WALKTRACE(E,l,h,k,I,f,y,M,v,m,o,s,d,i,u,a,F,r):(t++,c++,[new w.DiffChange(t,s-t+1,c,u-c+1)]);f=this.ClipDiagonalBound(I-R,R,I,b),y=this.ClipDiagonalBound(I+R,R,I,b);for(let B=f;B<=y;B+=2){B===f||B<y&&m[B-1]>=m[B+1]?o=m[B+1]-1:o=m[B-1],i=o-(B-I)-M;const W=o;for(;o>t&&i>c&&this.ElementsAreEqual(o,i);)o--,i--;if(m[B]=o,F&&Math.abs(B-E)<=R&&o<=v[B])return d[0]=o,a[0]=i,W>=v[B]&&1447>0&&R<=1447+1?this.WALKTRACE(E,l,h,k,I,f,y,M,v,m,o,s,d,i,u,a,F,r):null}if(R<=1447){let B=new Int32Array(h-l+2);B[0]=E-l+1,p.Copy2(v,l,B,1,h-l+1),this.m_forwardHistory.push(B),B=new Int32Array(y-f+2),B[0]=I-f+1,p.Copy2(m,f,B,1,y-f+1),this.m_reverseHistory.push(B)}}return this.WALKTRACE(E,l,h,k,I,f,y,M,v,m,o,s,d,i,u,a,F,r)}PrettifyChanges(t){for(let s=0;s<t.length;s++){const c=t[s],u=s<t.length-1?t[s+1].originalStart:this._originalElementsOrHash.length,d=s<t.length-1?t[s+1].modifiedStart:this._modifiedElementsOrHash.length,a=c.originalLength>0,r=c.modifiedLength>0;for(;c.originalStart+c.originalLength<u&&c.modifiedStart+c.modifiedLength<d&&(!a||this.OriginalElementsAreEqual(c.originalStart,c.originalStart+c.originalLength))&&(!r||this.ModifiedElementsAreEqual(c.modifiedStart,c.modifiedStart+c.modifiedLength));){const i=this.ElementsAreStrictEqual(c.originalStart,c.modifiedStart);if(this.ElementsAreStrictEqual(c.originalStart+c.originalLength,c.modifiedStart+c.modifiedLength)&&!i)break;c.originalStart++,c.modifiedStart++}let o=[null];if(s<t.length-1&&this.ChangesOverlap(t[s],t[s+1],o)){t[s]=o[0],t.splice(s+1,1),s--;continue}}for(let s=t.length-1;s>=0;s--){const c=t[s];let u=0,d=0;if(s>0){const h=t[s-1];u=h.originalStart+h.originalLength,d=h.modifiedStart+h.modifiedLength}const a=c.originalLength>0,r=c.modifiedLength>0;let o=0,i=this._boundaryScore(c.originalStart,c.originalLength,c.modifiedStart,c.modifiedLength);for(let h=1;;h++){const f=c.originalStart-h,y=c.modifiedStart-h;if(f<u||y<d||a&&!this.OriginalElementsAreEqual(f,f+c.originalLength)||r&&!this.ModifiedElementsAreEqual(y,y+c.modifiedLength))break;const b=(f===u&&y===d?5:0)+this._boundaryScore(f,c.originalLength,y,c.modifiedLength);b>i&&(i=b,o=h)}c.originalStart-=o,c.modifiedStart-=o;const l=[null];if(s>0&&this.ChangesOverlap(t[s-1],t[s],l)){t[s-1]=l[0],t.splice(s,1),s++;continue}}if(this._hasStrings)for(let s=1,c=t.length;s<c;s++){const u=t[s-1],d=t[s],a=d.originalStart-u.originalStart-u.originalLength,r=u.originalStart,o=d.originalStart+d.originalLength,i=o-r,l=u.modifiedStart,h=d.modifiedStart+d.modifiedLength,f=h-l;if(a<5&&i<20&&f<20){const y=this._findBetterContiguousSequence(r,i,l,f,a);if(y){const[_,b]=y;(_!==u.originalStart+u.originalLength||b!==u.modifiedStart+u.modifiedLength)&&(u.originalLength=_-u.originalStart,u.modifiedLength=b-u.modifiedStart,d.originalStart=_+a,d.modifiedStart=b+a,d.originalLength=o-d.originalStart,d.modifiedLength=h-d.modifiedStart)}}}return t}_findBetterContiguousSequence(t,s,c,u,d){if(s<d||u<d)return null;const a=t+s-d+1,r=c+u-d+1;let o=0,i=0,l=0;for(let h=t;h<a;h++)for(let f=c;f<r;f++){const y=this._contiguousSequenceScore(h,f,d);y>0&&y>o&&(o=y,i=h,l=f)}return o>0?[i,l]:null}_contiguousSequenceScore(t,s,c){let u=0;for(let d=0;d<c;d++){if(!this.ElementsAreEqual(t+d,s+d))return 0;u+=this._originalStringElements[t+d].length}return u}_OriginalIsBoundary(t){return t<=0||t>=this._originalElementsOrHash.length-1?!0:this._hasStrings&&/^\s*$/.test(this._originalStringElements[t])}_OriginalRegionIsBoundary(t,s){if(this._OriginalIsBoundary(t)||this._OriginalIsBoundary(t-1))return!0;if(s>0){const c=t+s;if(this._OriginalIsBoundary(c-1)||this._OriginalIsBoundary(c))return!0}return!1}_ModifiedIsBoundary(t){return t<=0||t>=this._modifiedElementsOrHash.length-1?!0:this._hasStrings&&/^\s*$/.test(this._modifiedStringElements[t])}_ModifiedRegionIsBoundary(t,s){if(this._ModifiedIsBoundary(t)||this._ModifiedIsBoundary(t-1))return!0;if(s>0){const c=t+s;if(this._ModifiedIsBoundary(c-1)||this._ModifiedIsBoundary(c))return!0}return!1}_boundaryScore(t,s,c,u){const d=this._OriginalRegionIsBoundary(t,s)?1:0,a=this._ModifiedRegionIsBoundary(c,u)?1:0;return d+a}ConcatenateChanges(t,s){let c=[];if(t.length===0||s.length===0)return s.length>0?s:t;if(this.ChangesOverlap(t[t.length-1],s[0],c)){const u=new Array(t.length+s.length-1);return p.Copy(t,0,u,0,t.length-1),u[t.length-1]=c[0],p.Copy(s,1,u,t.length,s.length-1),u}else{const u=new Array(t.length+s.length);return p.Copy(t,0,u,0,t.length),p.Copy(s,0,u,t.length,s.length),u}}ChangesOverlap(t,s,c){if(S.Assert(t.originalStart<=s.originalStart,"Left change is not less than or equal to right change"),S.Assert(t.modifiedStart<=s.modifiedStart,"Left change is not less than or equal to right change"),t.originalStart+t.originalLength>=s.originalStart||t.modifiedStart+t.modifiedLength>=s.modifiedStart){const u=t.originalStart;let d=t.originalLength;const a=t.modifiedStart;let r=t.modifiedLength;return t.originalStart+t.originalLength>=s.originalStart&&(d=s.originalStart+s.originalLength-t.originalStart),t.modifiedStart+t.modifiedLength>=s.modifiedStart&&(r=s.modifiedStart+s.modifiedLength-t.modifiedStart),c[0]=new w.DiffChange(u,d,a,r),!0}else return c[0]=null,!1}ClipDiagonalBound(t,s,c,u){if(t>=0&&t<u)return t;const d=c,a=u-c-1,r=s%2==0;if(t<0){const o=d%2==0;return r===o?0:1}else{const o=a%2==0;return r===o?u-1:u-2}}}e.LcsDiff=n}),define(J[163],ee([0,1,104,19,134,4,54]),function(j,e,w,N,T,D,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IndexTreeModel=e.getVisibleState=e.isFilterResult=void 0;function p(t){return typeof t=="object"&&"visibility"in t&&"data"in t}e.isFilterResult=p;function C(t){switch(t){case!0:return 1;case!1:return 0;default:return t}}e.getVisibleState=C;function n(t){return typeof t.collapsible=="boolean"}class g{constructor(s,c,u,d={}){this.user=s,this.list=c,this.rootRef=[],this.eventBufferer=new D.EventBufferer,this._onDidChangeCollapseState=new D.Emitter,this.onDidChangeCollapseState=this.eventBufferer.wrapEvent(this._onDidChangeCollapseState.event),this._onDidChangeRenderNodeCount=new D.Emitter,this.onDidChangeRenderNodeCount=this.eventBufferer.wrapEvent(this._onDidChangeRenderNodeCount.event),this._onDidSplice=new D.Emitter,this.onDidSplice=this._onDidSplice.event,this.collapseByDefault=typeof d.collapseByDefault=="undefined"?!1:d.collapseByDefault,this.filter=d.filter,this.autoExpandSingleChildren=typeof d.autoExpandSingleChildren=="undefined"?!1:d.autoExpandSingleChildren,this.root={parent:void 0,element:u,children:[],depth:0,visibleChildrenCount:0,visibleChildIndex:-1,collapsible:!1,collapsed:!1,renderNodeCount:0,visibility:1,visible:!0,filterData:void 0}}splice(s,c,u=S.Iterable.empty(),d={}){if(s.length===0)throw new w.TreeError(this.user,"Invalid tree location");d.diffIdentityProvider?this.spliceSmart(d.diffIdentityProvider,s,c,u,d):this.spliceSimple(s,c,u,d)}spliceSmart(s,c,u,d,a,r){var o;d===void 0&&(d=S.Iterable.empty()),r===void 0&&(r=(o=a.diffDepth)!==null&&o!==void 0?o:0);const{parentNode:i}=this.getParentNodeWithListIndex(c);if(!i.lastDiffIds)return this.spliceSimple(c,u,d,a);const l=[...d],h=c[c.length-1],f=new T.LcsDiff({getElements:()=>i.lastDiffIds},{getElements:()=>[...i.children.slice(0,h),...l,...i.children.slice(h+u)].map(m=>s.getId(m.element).toString())}).ComputeDiff(!1);if(f.quitEarly)return i.lastDiffIds=void 0,this.spliceSimple(c,u,l,a);const y=c.slice(0,-1),_=(m,E,I)=>{if(r>0)for(let k=0;k<I;k++)m--,E--,this.spliceSmart(s,[...y,m,0],Number.MAX_SAFE_INTEGER,l[E].children,a,r-1)};let b=Math.min(i.children.length,h+u),v=l.length;for(const m of f.changes.sort((E,I)=>I.originalStart-E.originalStart))_(b,v,b-(m.originalStart+m.originalLength)),b=m.originalStart,v=m.modifiedStart-h,this.spliceSimple([...y,b],m.originalLength,S.Iterable.slice(l,v,v+m.modifiedLength),a);_(b,v,b)}spliceSimple(s,c,u=S.Iterable.empty(),{onDidCreateNode:d,onDidDeleteNode:a,diffIdentityProvider:r}){const{parentNode:o,listIndex:i,revealed:l,visible:h}=this.getParentNodeWithListIndex(s),f=[],y=S.Iterable.map(u,R=>this.createTreeNode(R,o,o.visible?1:0,l,f,d)),_=s[s.length-1],b=o.children.length>0;let v=0;for(let R=_;R>=0&&R<o.children.length;R--){const A=o.children[R];if(A.visible){v=A.visibleChildIndex;break}}const m=[];let E=0,I=0;for(const R of y)m.push(R),I+=R.renderNodeCount,R.visible&&(R.visibleChildIndex=v+E++);const k=(0,N.splice)(o.children,_,c,m);r?o.lastDiffIds?(0,N.splice)(o.lastDiffIds,_,c,m.map(R=>r.getId(R.element).toString())):o.lastDiffIds=o.children.map(R=>r.getId(R.element).toString()):o.lastDiffIds=void 0;let M=0;for(const R of k)R.visible&&M++;if(M!==0)for(let R=_+m.length;R<o.children.length;R++){const A=o.children[R];A.visible&&(A.visibleChildIndex-=M)}if(o.visibleChildrenCount+=E-M,l&&h){const R=k.reduce((A,O)=>A+(O.visible?O.renderNodeCount:0),0);this._updateAncestorsRenderNodeCount(o,I-R),this.list.splice(i,R,f)}if(k.length>0&&a){const R=A=>{a(A),A.children.forEach(R)};k.forEach(R)}const P=o.children.length>0;b!==P&&this.setCollapsible(s.slice(0,-1),P),this._onDidSplice.fire({insertedNodes:m,deletedNodes:k});let F=o;for(;F;){if(F.visibility===2){this.refilter();break}F=F.parent}}rerender(s){if(s.length===0)throw new w.TreeError(this.user,"Invalid tree location");const{node:c,listIndex:u,revealed:d}=this.getTreeNodeWithListIndex(s);c.visible&&d&&this.list.splice(u,1,[c])}has(s){return this.hasTreeNode(s)}getListIndex(s){const{listIndex:c,visible:u,revealed:d}=this.getTreeNodeWithListIndex(s);return u&&d?c:-1}getListRenderCount(s){return this.getTreeNode(s).renderNodeCount}isCollapsible(s){return this.getTreeNode(s).collapsible}setCollapsible(s,c){const u=this.getTreeNode(s);typeof c=="undefined"&&(c=!u.collapsible);const d={collapsible:c};return this.eventBufferer.bufferEvents(()=>this._setCollapseState(s,d))}isCollapsed(s){return this.getTreeNode(s).collapsed}setCollapsed(s,c,u){const d=this.getTreeNode(s);typeof c=="undefined"&&(c=!d.collapsed);const a={collapsed:c,recursive:u||!1};return this.eventBufferer.bufferEvents(()=>this._setCollapseState(s,a))}_setCollapseState(s,c){const{node:u,listIndex:d,revealed:a}=this.getTreeNodeWithListIndex(s),r=this._setListNodeCollapseState(u,d,a,c);if(u!==this.root&&this.autoExpandSingleChildren&&r&&!n(c)&&u.collapsible&&!u.collapsed&&!c.recursive){let o=-1;for(let i=0;i<u.children.length;i++)if(u.children[i].visible)if(o>-1){o=-1;break}else o=i;o>-1&&this._setCollapseState([...s,o],c)}return r}_setListNodeCollapseState(s,c,u,d){const a=this._setNodeCollapseState(s,d,!1);if(!u||!s.visible||!a)return a;const r=s.renderNodeCount,o=this.updateNodeAfterCollapseChange(s),i=r-(c===-1?0:1);return this.list.splice(c+1,i,o.slice(1)),a}_setNodeCollapseState(s,c,u){let d;if(s===this.root?d=!1:(n(c)?(d=s.collapsible!==c.collapsible,s.collapsible=c.collapsible):s.collapsible?(d=s.collapsed!==c.collapsed,s.collapsed=c.collapsed):d=!1,d&&this._onDidChangeCollapseState.fire({node:s,deep:u})),!n(c)&&c.recursive)for(const a of s.children)d=this._setNodeCollapseState(a,c,!0)||d;return d}expandTo(s){this.eventBufferer.bufferEvents(()=>{let c=this.getTreeNode(s);for(;c.parent;)c=c.parent,s=s.slice(0,s.length-1),c.collapsed&&this._setCollapseState(s,{collapsed:!1,recursive:!1})})}refilter(){const s=this.root.renderNodeCount,c=this.updateNodeAfterFilterChange(this.root);this.list.splice(0,s,c)}createTreeNode(s,c,u,d,a,r){const o={parent:c,element:s.element,children:[],depth:c.depth+1,visibleChildrenCount:0,visibleChildIndex:-1,collapsible:typeof s.collapsible=="boolean"?s.collapsible:typeof s.collapsed!="undefined",collapsed:typeof s.collapsed=="undefined"?this.collapseByDefault:s.collapsed,renderNodeCount:1,visibility:1,visible:!0,filterData:void 0},i=this._filterNode(o,u);o.visibility=i,d&&a.push(o);const l=s.children||S.Iterable.empty(),h=d&&i!==0&&!o.collapsed,f=S.Iterable.map(l,b=>this.createTreeNode(b,o,i,h,a,r));let y=0,_=1;for(const b of f)o.children.push(b),_+=b.renderNodeCount,b.visible&&(b.visibleChildIndex=y++);return o.collapsible=o.collapsible||o.children.length>0,o.visibleChildrenCount=y,o.visible=i===2?y>0:i===1,o.visible?o.collapsed||(o.renderNodeCount=_):(o.renderNodeCount=0,d&&a.pop()),r&&r(o),o}updateNodeAfterCollapseChange(s){const c=s.renderNodeCount,u=[];return this._updateNodeAfterCollapseChange(s,u),this._updateAncestorsRenderNodeCount(s.parent,u.length-c),u}_updateNodeAfterCollapseChange(s,c){if(s.visible===!1)return 0;if(c.push(s),s.renderNodeCount=1,!s.collapsed)for(const u of s.children)s.renderNodeCount+=this._updateNodeAfterCollapseChange(u,c);return this._onDidChangeRenderNodeCount.fire(s),s.renderNodeCount}updateNodeAfterFilterChange(s){const c=s.renderNodeCount,u=[];return this._updateNodeAfterFilterChange(s,s.visible?1:0,u),this._updateAncestorsRenderNodeCount(s.parent,u.length-c),u}_updateNodeAfterFilterChange(s,c,u,d=!0){let a;if(s!==this.root){if(a=this._filterNode(s,c),a===0)return s.visible=!1,s.renderNodeCount=0,!1;d&&u.push(s)}const r=u.length;s.renderNodeCount=s===this.root?0:1;let o=!1;if(!s.collapsed||a!==0){let i=0;for(const l of s.children)o=this._updateNodeAfterFilterChange(l,a,u,d&&!s.collapsed)||o,l.visible&&(l.visibleChildIndex=i++);s.visibleChildrenCount=i}else s.visibleChildrenCount=0;return s!==this.root&&(s.visible=a===2?o:a===1,s.visibility=a),s.visible?s.collapsed||(s.renderNodeCount+=u.length-r):(s.renderNodeCount=0,d&&u.pop()),this._onDidChangeRenderNodeCount.fire(s),s.visible}_updateAncestorsRenderNodeCount(s,c){if(c!==0)for(;s;)s.renderNodeCount+=c,this._onDidChangeRenderNodeCount.fire(s),s=s.parent}_filterNode(s,c){const u=this.filter?this.filter.filter(s.element,c):1;return typeof u=="boolean"?(s.filterData=void 0,u?1:0):p(u)?(s.filterData=u.data,C(u.visibility)):(s.filterData=void 0,C(u))}hasTreeNode(s,c=this.root){if(!s||s.length===0)return!0;const[u,...d]=s;return u<0||u>c.children.length?!1:this.hasTreeNode(d,c.children[u])}getTreeNode(s,c=this.root){if(!s||s.length===0)return c;const[u,...d]=s;if(u<0||u>c.children.length)throw new w.TreeError(this.user,"Invalid tree location");return this.getTreeNode(d,c.children[u])}getTreeNodeWithListIndex(s){if(s.length===0)return{node:this.root,listIndex:-1,revealed:!0,visible:!1};const{parentNode:c,listIndex:u,revealed:d,visible:a}=this.getParentNodeWithListIndex(s),r=s[s.length-1];if(r<0||r>c.children.length)throw new w.TreeError(this.user,"Invalid tree location");const o=c.children[r];return{node:o,listIndex:u,revealed:d,visible:a&&o.visible}}getParentNodeWithListIndex(s,c=this.root,u=0,d=!0,a=!0){const[r,...o]=s;if(r<0||r>c.children.length)throw new w.TreeError(this.user,"Invalid tree location");for(let i=0;i<r;i++)u+=c.children[i].renderNodeCount;return d=d&&!c.collapsed,a=a&&c.visible,o.length===0?{parentNode:c,listIndex:u,revealed:d,visible:a}:this.getParentNodeWithListIndex(o,c.children[r],u+1,d,a)}getNode(s=[]){return this.getTreeNode(s)}getNodeLocation(s){const c=[];let u=s;for(;u.parent;)c.push(u.parent.children.indexOf(u)),u=u.parent;return c.reverse()}getParentNodeLocation(s){if(s.length!==0)return s.length===1?[]:(0,N.tail2)(s)[0]}}e.IndexTreeModel=g}),define(J[164],ee([0,1,163,104,54]),function(j,e,w,N,T){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ObjectTreeModel=void 0;class D{constructor(p,C,n={}){this.user=p,this.rootRef=null,this.nodes=new Map,this.nodesByIdentity=new Map,this.model=new w.IndexTreeModel(p,C,null,n),this.onDidSplice=this.model.onDidSplice,this.onDidChangeCollapseState=this.model.onDidChangeCollapseState,this.onDidChangeRenderNodeCount=this.model.onDidChangeRenderNodeCount,n.sorter&&(this.sorter={compare(g,t){return n.sorter.compare(g.element,t.element)}}),this.identityProvider=n.identityProvider}setChildren(p,C=T.Iterable.empty(),n={}){const g=this.getElementLocation(p);this._setChildren(g,this.preserveCollapseState(C),n)}_setChildren(p,C=T.Iterable.empty(),n){const g=new Set,t=new Set,s=u=>{var d;if(u.element===null)return;const a=u;if(g.add(a.element),this.nodes.set(a.element,a),this.identityProvider){const r=this.identityProvider.getId(a.element).toString();t.add(r),this.nodesByIdentity.set(r,a)}(d=n.onDidCreateNode)===null||d===void 0||d.call(n,a)},c=u=>{var d;if(u.element===null)return;const a=u;if(g.has(a.element)||this.nodes.delete(a.element),this.identityProvider){const r=this.identityProvider.getId(a.element).toString();t.has(r)||this.nodesByIdentity.delete(r)}(d=n.onDidDeleteNode)===null||d===void 0||d.call(n,a)};this.model.splice([...p,0],Number.MAX_VALUE,C,Object.assign(Object.assign({},n),{onDidCreateNode:s,onDidDeleteNode:c}))}preserveCollapseState(p=T.Iterable.empty()){return this.sorter&&(p=[...p].sort(this.sorter.compare.bind(this.sorter))),T.Iterable.map(p,C=>{let n=this.nodes.get(C.element);if(!n&&this.identityProvider){const s=this.identityProvider.getId(C.element).toString();n=this.nodesByIdentity.get(s)}if(!n)return Object.assign(Object.assign({},C),{children:this.preserveCollapseState(C.children)});const g=typeof C.collapsible=="boolean"?C.collapsible:n.collapsible,t=typeof C.collapsed!="undefined"?C.collapsed:n.collapsed;return Object.assign(Object.assign({},C),{collapsible:g,collapsed:t,children:this.preserveCollapseState(C.children)})})}rerender(p){const C=this.getElementLocation(p);this.model.rerender(C)}has(p){return this.nodes.has(p)}getListIndex(p){const C=this.getElementLocation(p);return this.model.getListIndex(C)}getListRenderCount(p){const C=this.getElementLocation(p);return this.model.getListRenderCount(C)}isCollapsible(p){const C=this.getElementLocation(p);return this.model.isCollapsible(C)}setCollapsible(p,C){const n=this.getElementLocation(p);return this.model.setCollapsible(n,C)}isCollapsed(p){const C=this.getElementLocation(p);return this.model.isCollapsed(C)}setCollapsed(p,C,n){const g=this.getElementLocation(p);return this.model.setCollapsed(g,C,n)}expandTo(p){const C=this.getElementLocation(p);this.model.expandTo(C)}refilter(){this.model.refilter()}getNode(p=null){if(p===null)return this.model.getNode(this.model.rootRef);const C=this.nodes.get(p);if(!C)throw new N.TreeError(this.user,`Tree element not found: ${p}`);return C}getNodeLocation(p){return p.element}getParentNodeLocation(p){if(p===null)throw new N.TreeError(this.user,"Invalid getParentNodeLocation call");const C=this.nodes.get(p);if(!C)throw new N.TreeError(this.user,`Tree element not found: ${p}`);const n=this.model.getNodeLocation(C),g=this.model.getParentNodeLocation(n);return this.model.getNode(g).element}getElementLocation(p){if(p===null)return[];const C=this.nodes.get(p);if(!C)throw new N.TreeError(this.user,`Tree element not found: ${p}`);return this.model.getNodeLocation(C)}}e.ObjectTreeModel=D}),define(J[304],ee([0,1,164,104,4,54]),function(j,e,w,N,T,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CompressibleObjectTreeModel=e.DefaultElementMapper=e.CompressedObjectTreeModel=e.decompress=e.compress=void 0;function S(o){const i=[o.element],l=o.incompressible||!1;return{element:{elements:i,incompressible:l},children:D.Iterable.map(D.Iterable.from(o.children),S),collapsible:o.collapsible,collapsed:o.collapsed}}function p(o){const i=[o.element],l=o.incompressible||!1;let h,f;for(;[f,h]=D.Iterable.consume(D.Iterable.from(o.children),2),!(f.length!==1||f[0].incompressible);)o=f[0],i.push(o.element);return{element:{elements:i,incompressible:l},children:D.Iterable.map(D.Iterable.concat(f,h),p),collapsible:o.collapsible,collapsed:o.collapsed}}e.compress=p;function C(o,i=0){let l;return i<o.element.elements.length-1?l=[C(o,i+1)]:l=D.Iterable.map(D.Iterable.from(o.children),h=>C(h,0)),i===0&&o.element.incompressible?{element:o.element.elements[i],children:l,incompressible:!0,collapsible:o.collapsible,collapsed:o.collapsed}:{element:o.element.elements[i],children:l,collapsible:o.collapsible,collapsed:o.collapsed}}function n(o){return C(o,0)}e.decompress=n;function g(o,i,l){return o.element===i?Object.assign(Object.assign({},o),{children:l}):Object.assign(Object.assign({},o),{children:D.Iterable.map(D.Iterable.from(o.children),h=>g(h,i,l))})}const t=o=>({getId(i){return i.elements.map(l=>o.getId(l).toString()).join("\0")}});class s{constructor(i,l,h={}){this.user=i,this.rootRef=null,this.nodes=new Map,this.model=new w.ObjectTreeModel(i,l,h),this.enabled=typeof h.compressionEnabled=="undefined"?!0:h.compressionEnabled,this.identityProvider=h.identityProvider}get onDidSplice(){return this.model.onDidSplice}get onDidChangeCollapseState(){return this.model.onDidChangeCollapseState}get onDidChangeRenderNodeCount(){return this.model.onDidChangeRenderNodeCount}setChildren(i,l=D.Iterable.empty(),h){const f=h.diffIdentityProvider&&t(h.diffIdentityProvider);if(i===null){const M=D.Iterable.map(l,this.enabled?p:S);this._setChildren(null,M,{diffIdentityProvider:f,diffDepth:Infinity});return}const y=this.nodes.get(i);if(!y)throw new Error("Unknown compressed tree node");const _=this.model.getNode(y),b=this.model.getParentNodeLocation(y),v=this.model.getNode(b),m=n(_),E=g(m,i,l),I=(this.enabled?p:S)(E),k=v.children.map(M=>M===_?I:M);this._setChildren(v.element,k,{diffIdentityProvider:f,diffDepth:_.depth-v.depth})}setCompressionEnabled(i){if(i===this.enabled)return;this.enabled=i;const h=this.model.getNode().children,f=D.Iterable.map(h,n),y=D.Iterable.map(f,i?p:S);this._setChildren(null,y,{diffIdentityProvider:this.identityProvider,diffDepth:Infinity})}_setChildren(i,l,h){const f=new Set,y=b=>{for(const v of b.element.elements)f.add(v),this.nodes.set(v,b.element)},_=b=>{for(const v of b.element.elements)f.has(v)||this.nodes.delete(v)};this.model.setChildren(i,l,Object.assign(Object.assign({},h),{onDidCreateNode:y,onDidDeleteNode:_}))}has(i){return this.nodes.has(i)}getListIndex(i){const l=this.getCompressedNode(i);return this.model.getListIndex(l)}getListRenderCount(i){const l=this.getCompressedNode(i);return this.model.getListRenderCount(l)}getNode(i){if(typeof i=="undefined")return this.model.getNode();const l=this.getCompressedNode(i);return this.model.getNode(l)}getNodeLocation(i){const l=this.model.getNodeLocation(i);return l===null?null:l.elements[l.elements.length-1]}getParentNodeLocation(i){const l=this.getCompressedNode(i),h=this.model.getParentNodeLocation(l);return h===null?null:h.elements[h.elements.length-1]}isCollapsible(i){const l=this.getCompressedNode(i);return this.model.isCollapsible(l)}setCollapsible(i,l){const h=this.getCompressedNode(i);return this.model.setCollapsible(h,l)}isCollapsed(i){const l=this.getCompressedNode(i);return this.model.isCollapsed(l)}setCollapsed(i,l,h){const f=this.getCompressedNode(i);return this.model.setCollapsed(f,l,h)}expandTo(i){const l=this.getCompressedNode(i);this.model.expandTo(l)}rerender(i){const l=this.getCompressedNode(i);this.model.rerender(l)}refilter(){this.model.refilter()}getCompressedNode(i){if(i===null)return null;const l=this.nodes.get(i);if(!l)throw new N.TreeError(this.user,`Tree element not found: ${i}`);return l}}e.CompressedObjectTreeModel=s;const c=o=>o[o.length-1];e.DefaultElementMapper=c;class u{constructor(i,l){this.unwrapper=i,this.node=l}get element(){return this.node.element===null?null:this.unwrapper(this.node.element)}get children(){return this.node.children.map(i=>new u(this.unwrapper,i))}get depth(){return this.node.depth}get visibleChildrenCount(){return this.node.visibleChildrenCount}get visibleChildIndex(){return this.node.visibleChildIndex}get collapsible(){return this.node.collapsible}get collapsed(){return this.node.collapsed}get visible(){return this.node.visible}get filterData(){return this.node.filterData}}function d(o,i){return{splice(l,h,f){i.splice(l,h,f.map(y=>o.map(y)))},updateElementHeight(l,h){i.updateElementHeight(l,h)}}}function a(o,i){return Object.assign(Object.assign({},i),{identityProvider:i.identityProvider&&{getId(l){return i.identityProvider.getId(o(l))}},sorter:i.sorter&&{compare(l,h){return i.sorter.compare(l.elements[0],h.elements[0])}},filter:i.filter&&{filter(l,h){return i.filter.filter(o(l),h)}}})}class r{constructor(i,l,h={}){this.rootRef=null,this.elementMapper=h.elementMapper||e.DefaultElementMapper;const f=y=>this.elementMapper(y.elements);this.nodeMapper=new N.WeakMapper(y=>new u(f,y)),this.model=new s(i,d(this.nodeMapper,l),a(f,h))}get onDidSplice(){return T.Event.map(this.model.onDidSplice,({insertedNodes:i,deletedNodes:l})=>({insertedNodes:i.map(h=>this.nodeMapper.map(h)),deletedNodes:l.map(h=>this.nodeMapper.map(h))}))}get onDidChangeCollapseState(){return T.Event.map(this.model.onDidChangeCollapseState,({node:i,deep:l})=>({node:this.nodeMapper.map(i),deep:l}))}get onDidChangeRenderNodeCount(){return T.Event.map(this.model.onDidChangeRenderNodeCount,i=>this.nodeMapper.map(i))}setChildren(i,l=D.Iterable.empty(),h={}){this.model.setChildren(i,l,h)}setCompressionEnabled(i){this.model.setCompressionEnabled(i)}has(i){return this.model.has(i)}getListIndex(i){return this.model.getListIndex(i)}getListRenderCount(i){return this.model.getListRenderCount(i)}getNode(i){return this.nodeMapper.map(this.model.getNode(i))}getNodeLocation(i){return i.element}getParentNodeLocation(i){return this.model.getParentNodeLocation(i)}isCollapsible(i){return this.model.isCollapsible(i)}setCollapsible(i,l){return this.model.setCollapsible(i,l)}isCollapsed(i){return this.model.isCollapsed(i)}setCollapsed(i,l,h){return this.model.setCollapsed(i,l,h)}expandTo(i){return this.model.expandTo(i)}rerender(i){return this.model.rerender(i)}refilter(){return this.model.refilter()}getCompressedTreeNode(i=null){return this.model.getNode(i)}}e.CompressibleObjectTreeModel=r}),define(J[47],ee([0,1,8]),function(j,e,w){"use strict";var N,T;Object.defineProperty(e,"__esModule",{value:!0}),e.LRUCache=e.LinkedMap=e.ResourceMap=e.TernarySearchTree=e.UriIterator=e.PathIterator=e.ConfigKeysIterator=e.StringIterator=void 0;class D{constructor(){this._value="",this._pos=0}reset(a){return this._value=a,this._pos=0,this}next(){return this._pos+=1,this}hasNext(){return this._pos<this._value.length-1}cmp(a){const r=a.charCodeAt(0),o=this._value.charCodeAt(this._pos);return r-o}value(){return this._value[this._pos]}}e.StringIterator=D;class S{constructor(a=!0){this._caseSensitive=a}reset(a){return this._value=a,this._from=0,this._to=0,this.next()}hasNext(){return this._to<this._value.length}next(){this._from=this._to;let a=!0;for(;this._to<this._value.length;this._to++)if(this._value.charCodeAt(this._to)===46)if(a)this._from++;else break;else a=!1;return this}cmp(a){return this._caseSensitive?(0,w.compareSubstring)(a,this._value,0,a.length,this._from,this._to):(0,w.compareSubstringIgnoreCase)(a,this._value,0,a.length,this._from,this._to)}value(){return this._value.substring(this._from,this._to)}}e.ConfigKeysIterator=S;class p{constructor(a=!0,r=!0){this._splitOnBackslash=a,this._caseSensitive=r}reset(a){return this._value=a.replace(/\\$|\/$/,""),this._from=0,this._to=0,this.next()}hasNext(){return this._to<this._value.length}next(){this._from=this._to;let a=!0;for(;this._to<this._value.length;this._to++){const r=this._value.charCodeAt(this._to);if(r===47||this._splitOnBackslash&&r===92)if(a)this._from++;else break;else a=!1}return this}cmp(a){return this._caseSensitive?(0,w.compareSubstring)(a,this._value,0,a.length,this._from,this._to):(0,w.compareSubstringIgnoreCase)(a,this._value,0,a.length,this._from,this._to)}value(){return this._value.substring(this._from,this._to)}}e.PathIterator=p;class C{constructor(a){this._ignorePathCasing=a,this._states=[],this._stateIdx=0}reset(a){return this._value=a,this._states=[],this._value.scheme&&this._states.push(1),this._value.authority&&this._states.push(2),this._value.path&&(this._pathIterator=new p(!1,!this._ignorePathCasing(a)),this._pathIterator.reset(a.path),this._pathIterator.value()&&this._states.push(3)),this._value.query&&this._states.push(4),this._value.fragment&&this._states.push(5),this._stateIdx=0,this}next(){return this._states[this._stateIdx]===3&&this._pathIterator.hasNext()?this._pathIterator.next():this._stateIdx+=1,this}hasNext(){return this._states[this._stateIdx]===3&&this._pathIterator.hasNext()||this._stateIdx<this._states.length-1}cmp(a){if(this._states[this._stateIdx]===1)return(0,w.compareIgnoreCase)(a,this._value.scheme);if(this._states[this._stateIdx]===2)return(0,w.compareIgnoreCase)(a,this._value.authority);if(this._states[this._stateIdx]===3)return this._pathIterator.cmp(a);if(this._states[this._stateIdx]===4)return(0,w.compare)(a,this._value.query);if(this._states[this._stateIdx]===5)return(0,w.compare)(a,this._value.fragment);throw new Error}value(){if(this._states[this._stateIdx]===1)return this._value.scheme;if(this._states[this._stateIdx]===2)return this._value.authority;if(this._states[this._stateIdx]===3)return this._pathIterator.value();if(this._states[this._stateIdx]===4)return this._value.query;if(this._states[this._stateIdx]===5)return this._value.fragment;throw new Error}}e.UriIterator=C;class n{constructor(){this.height=1}rotateLeft(){const a=this.right;return this.right=a.left,a.left=this,this.updateHeight(),a.updateHeight(),a}rotateRight(){const a=this.left;return this.left=a.right,a.right=this,this.updateHeight(),a.updateHeight(),a}updateHeight(){this.height=1+Math.max(this.heightLeft,this.heightRight)}balanceFactor(){return this.heightRight-this.heightLeft}get heightLeft(){var a,r;return(r=(a=this.left)===null||a===void 0?void 0:a.height)!==null&&r!==void 0?r:0}get heightRight(){var a,r;return(r=(a=this.right)===null||a===void 0?void 0:a.height)!==null&&r!==void 0?r:0}}class g{constructor(a){this._iter=a}static forUris(a=()=>!1){return new g(new C(a))}static forStrings(){return new g(new D)}static forConfigKeys(){return new g(new S)}clear(){this._root=void 0}set(a,r){const o=this._iter.reset(a);let i;this._root||(this._root=new n,this._root.segment=o.value());const l=[];for(i=this._root;;){const f=o.cmp(i.segment);if(f>0)i.left||(i.left=new n,i.left.segment=o.value()),l.push([-1,i]),i=i.left;else if(f<0)i.right||(i.right=new n,i.right.segment=o.value()),l.push([1,i]),i=i.right;else if(o.hasNext())o.next(),i.mid||(i.mid=new n,i.mid.segment=o.value()),l.push([0,i]),i=i.mid;else break}const h=i.value;i.value=r,i.key=a;for(let f=l.length-1;f>=0;f--){const y=l[f][1];y.updateHeight();const _=y.balanceFactor();if(_<-1||_>1){const b=l[f][0],v=l[f+1][0];if(b===1&&v===1)l[f][1]=y.rotateLeft();else if(b===-1&&v===-1)l[f][1]=y.rotateRight();else if(b===1&&v===-1)y.right=l[f+1][1]=l[f+1][1].rotateRight(),l[f][1]=y.rotateLeft();else if(b===-1&&v===1)y.left=l[f+1][1]=l[f+1][1].rotateLeft(),l[f][1]=y.rotateRight();else throw new Error;if(f>0)switch(l[f-1][0]){case-1:l[f-1][1].left=l[f][1];break;case 1:l[f-1][1].right=l[f][1];break;case 0:l[f-1][1].mid=l[f][1];break}else this._root=l[0][1]}}return h}get(a){var r;return(r=this._getNode(a))===null||r===void 0?void 0:r.value}_getNode(a){const r=this._iter.reset(a);let o=this._root;for(;o;){const i=r.cmp(o.segment);if(i>0)o=o.left;else if(i<0)o=o.right;else if(r.hasNext())r.next(),o=o.mid;else break}return o}has(a){const r=this._getNode(a);return!((r==null?void 0:r.value)===void 0&&(r==null?void 0:r.mid)===void 0)}delete(a){return this._delete(a,!1)}deleteSuperstr(a){return this._delete(a,!0)}_delete(a,r){var o;const i=this._iter.reset(a),l=[];let h=this._root;for(;h;){const f=i.cmp(h.segment);if(f>0)l.push([-1,h]),h=h.left;else if(f<0)l.push([1,h]),h=h.right;else if(i.hasNext())i.next(),l.push([0,h]),h=h.mid;else break}if(!!h){if(r?(h.left=void 0,h.mid=void 0,h.right=void 0,h.height=1):(h.key=void 0,h.value=void 0),!h.mid&&!h.value)if(h.left&&h.right){const f=this._min(h.right),{key:y,value:_,segment:b}=f;this._delete(f.key,!1),h.key=y,h.value=_,h.segment=b}else{const f=(o=h.left)!==null&&o!==void 0?o:h.right;if(l.length>0){const[y,_]=l[l.length-1];switch(y){case-1:_.left=f;break;case 0:_.mid=f;break;case 1:_.right=f;break}}else this._root=f}for(let f=l.length-1;f>=0;f--){const y=l[f][1];y.updateHeight();const _=y.balanceFactor();if(_>1?(y.right.balanceFactor()>=0||(y.right=l[f+1][1]=l[f+1][1].rotateRight()),l[f][1]=y.rotateLeft()):_<-1&&(y.left.balanceFactor()<=0||(y.left=l[f+1][1]=l[f+1][1].rotateLeft()),l[f][1]=y.rotateRight()),f>0)switch(l[f-1][0]){case-1:l[f-1][1].left=l[f][1];break;case 1:l[f-1][1].right=l[f][1];break;case 0:l[f-1][1].mid=l[f][1];break}else this._root=l[0][1]}}}_min(a){for(;a.left;)a=a.left;return a}findSubstr(a){const r=this._iter.reset(a);let o=this._root,i;for(;o;){const l=r.cmp(o.segment);if(l>0)o=o.left;else if(l<0)o=o.right;else if(r.hasNext())r.next(),i=o.value||i,o=o.mid;else break}return o&&o.value||i}findSuperstr(a){const r=this._iter.reset(a);let o=this._root;for(;o;){const i=r.cmp(o.segment);if(i>0)o=o.left;else if(i<0)o=o.right;else if(r.hasNext())r.next(),o=o.mid;else return o.mid?this._entries(o.mid):void 0}}forEach(a){for(const[r,o]of this)a(o,r)}*[Symbol.iterator](){yield*this._entries(this._root)}*_entries(a){!a||(a.left&&(yield*this._entries(a.left)),a.value&&(yield[a.key,a.value]),a.mid&&(yield*this._entries(a.mid)),a.right&&(yield*this._entries(a.right)))}}e.TernarySearchTree=g;class t{constructor(a,r){this.uri=a,this.value=r}}class s{constructor(a,r){this[N]="ResourceMap",a instanceof s?(this.map=new Map(a.map),this.toKey=r??s.defaultToKey):(this.map=new Map,this.toKey=a??s.defaultToKey)}set(a,r){return this.map.set(this.toKey(a),new t(a,r)),this}get(a){var r;return(r=this.map.get(this.toKey(a)))===null||r===void 0?void 0:r.value}has(a){return this.map.has(this.toKey(a))}get size(){return this.map.size}clear(){this.map.clear()}delete(a){return this.map.delete(this.toKey(a))}forEach(a,r){typeof r!="undefined"&&(a=a.bind(r));for(let[o,i]of this.map)a(i.value,i.uri,this)}*values(){for(let a of this.map.values())yield a.value}*keys(){for(let a of this.map.values())yield a.uri}*entries(){for(let a of this.map.values())yield[a.uri,a.value]}*[(N=Symbol.toStringTag,Symbol.iterator)](){for(let[,a]of this.map)yield[a.uri,a.value]}}e.ResourceMap=s,s.defaultToKey=d=>d.toString();class c{constructor(){this[T]="LinkedMap",this._map=new Map,this._head=void 0,this._tail=void 0,this._size=0,this._state=0}clear(){this._map.clear(),this._head=void 0,this._tail=void 0,this._size=0,this._state++}isEmpty(){return!this._head&&!this._tail}get size(){return this._size}get first(){var a;return(a=this._head)===null||a===void 0?void 0:a.value}get last(){var a;return(a=this._tail)===null||a===void 0?void 0:a.value}has(a){return this._map.has(a)}get(a,r=0){const o=this._map.get(a);if(!!o)return r!==0&&this.touch(o,r),o.value}set(a,r,o=0){let i=this._map.get(a);if(i)i.value=r,o!==0&&this.touch(i,o);else{switch(i={key:a,value:r,next:void 0,previous:void 0},o){case 0:this.addItemLast(i);break;case 1:this.addItemFirst(i);break;case 2:this.addItemLast(i);break;default:this.addItemLast(i);break}this._map.set(a,i),this._size++}return this}delete(a){return!!this.remove(a)}remove(a){const r=this._map.get(a);if(!!r)return this._map.delete(a),this.removeItem(r),this._size--,r.value}shift(){if(!this._head&&!this._tail)return;if(!this._head||!this._tail)throw new Error("Invalid list");const a=this._head;return this._map.delete(a.key),this.removeItem(a),this._size--,a.value}forEach(a,r){const o=this._state;let i=this._head;for(;i;){if(r?a.bind(r)(i.value,i.key,this):a(i.value,i.key,this),this._state!==o)throw new Error("LinkedMap got modified during iteration.");i=i.next}}keys(){const a=this,r=this._state;let o=this._head;const i={[Symbol.iterator](){return i},next(){if(a._state!==r)throw new Error("LinkedMap got modified during iteration.");if(o){const l={value:o.key,done:!1};return o=o.next,l}else return{value:void 0,done:!0}}};return i}values(){const a=this,r=this._state;let o=this._head;const i={[Symbol.iterator](){return i},next(){if(a._state!==r)throw new Error("LinkedMap got modified during iteration.");if(o){const l={value:o.value,done:!1};return o=o.next,l}else return{value:void 0,done:!0}}};return i}entries(){const a=this,r=this._state;let o=this._head;const i={[Symbol.iterator](){return i},next(){if(a._state!==r)throw new Error("LinkedMap got modified during iteration.");if(o){const l={value:[o.key,o.value],done:!1};return o=o.next,l}else return{value:void 0,done:!0}}};return i}[(T=Symbol.toStringTag,Symbol.iterator)](){return this.entries()}trimOld(a){if(a>=this.size)return;if(a===0){this.clear();return}let r=this._head,o=this.size;for(;r&&o>a;)this._map.delete(r.key),r=r.next,o--;this._head=r,this._size=o,r&&(r.previous=void 0),this._state++}addItemFirst(a){if(!this._head&&!this._tail)this._tail=a;else if(this._head)a.next=this._head,this._head.previous=a;else throw new Error("Invalid list");this._head=a,this._state++}addItemLast(a){if(!this._head&&!this._tail)this._head=a;else if(this._tail)a.previous=this._tail,this._tail.next=a;else throw new Error("Invalid list");this._tail=a,this._state++}removeItem(a){if(a===this._head&&a===this._tail)this._head=void 0,this._tail=void 0;else if(a===this._head){if(!a.next)throw new Error("Invalid list");a.next.previous=void 0,this._head=a.next}else if(a===this._tail){if(!a.previous)throw new Error("Invalid list");a.previous.next=void 0,this._tail=a.previous}else{const r=a.next,o=a.previous;if(!r||!o)throw new Error("Invalid list");r.previous=o,o.next=r}a.next=void 0,a.previous=void 0,this._state++}touch(a,r){if(!this._head||!this._tail)throw new Error("Invalid list");if(!(r!==1&&r!==2)){if(r===1){if(a===this._head)return;const o=a.next,i=a.previous;a===this._tail?(i.next=void 0,this._tail=i):(o.previous=i,i.next=o),a.previous=void 0,a.next=this._head,this._head.previous=a,this._head=a,this._state++}else if(r===2){if(a===this._tail)return;const o=a.next,i=a.previous;a===this._head?(o.previous=void 0,this._head=o):(o.previous=i,i.next=o),a.next=void 0,a.previous=this._tail,this._tail.next=a,this._tail=a,this._state++}}}toJSON(){const a=[];return this.forEach((r,o)=>{a.push([o,r])}),a}fromJSON(a){this.clear();for(const[r,o]of a)this.set(r,o)}}e.LinkedMap=c;class u extends c{constructor(a,r=1){super();this._limit=a,this._ratio=Math.min(Math.max(0,r),1)}get limit(){return this._limit}set limit(a){this._limit=a,this.checkTrim()}get(a,r=2){return super.get(a,r)}peek(a){return super.get(a,0)}set(a,r){return super.set(a,r,2),this.checkTrim(),this}checkTrim(){this.size>this._limit&&this.trimOld(Math.round(this._limit*this._ratio))}}e.LRUCache=u}),define(J[68],ee([0,1,47,8]),function(j,e,w,N){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.fuzzyScoreGracefulAggressive=e.fuzzyScore=e.FuzzyScore=e.isPatternInWord=e.createMatches=e.anyScore=e.matchesFuzzy=e.matchesWords=e.matchesCamelCase=e.isUpper=e.matchesSubString=e.matchesContiguousSubString=e.matchesPrefix=e.or=void 0;function T(...re){return function(ie,ae){for(let q=0,ne=re.length;q<ne;q++){const ce=re[q](ie,ae);if(ce)return ce}return null}}e.or=T,e.matchesPrefix=D.bind(void 0,!0);function D(re,ie,ae){if(!ae||ae.length<ie.length)return null;let q;return re?q=N.startsWithIgnoreCase(ae,ie):q=ae.indexOf(ie)===0,q?ie.length>0?[{start:0,end:ie.length}]:[]:null}function S(re,ie){const ae=ie.toLowerCase().indexOf(re.toLowerCase());return ae===-1?null:[{start:ae,end:ae+re.length}]}e.matchesContiguousSubString=S;function p(re,ie){return C(re.toLowerCase(),ie.toLowerCase(),0,0)}e.matchesSubString=p;function C(re,ie,ae,q){if(ae===re.length)return[];if(q===ie.length)return null;if(re[ae]===ie[q]){let ne=null;return(ne=C(re,ie,ae+1,q+1))?r({start:q,end:q+1},ne):null}return C(re,ie,ae,q+1)}function n(re){return 97<=re&&re<=122}function g(re){return 65<=re&&re<=90}e.isUpper=g;function t(re){return 48<=re&&re<=57}function s(re){return re===32||re===9||re===10||re===13}const c=new Set;"`~!@#$%^&*()-=+[{]}\\|;:'\",.<>/?".split("").forEach(re=>c.add(re.charCodeAt(0)));function u(re){return s(re)||c.has(re)}function d(re,ie){return re===ie||u(re)&&u(ie)}function a(re){return n(re)||g(re)||t(re)}function r(re,ie){return ie.length===0?ie=[re]:re.end===ie[0].start?ie[0].start=re.start:ie.unshift(re),ie}function o(re,ie){for(let ae=ie;ae<re.length;ae++){const q=re.charCodeAt(ae);if(g(q)||t(q)||ae>0&&!a(re.charCodeAt(ae-1)))return ae}return re.length}function i(re,ie,ae,q){if(ae===re.length)return[];if(q===ie.length)return null;if(re[ae]!==ie[q].toLowerCase())return null;{let ne=null,ce=q+1;for(ne=i(re,ie,ae+1,q+1);!ne&&(ce=o(ie,ce))<ie.length;)ne=i(re,ie,ae+1,ce),ce++;return ne===null?null:r({start:q,end:q+1},ne)}}function l(re){let ie=0,ae=0,q=0,ne=0,ce=0;for(let he=0;he<re.length;he++)ce=re.charCodeAt(he),g(ce)&&ie++,n(ce)&&ae++,a(ce)&&q++,t(ce)&&ne++;const le=ie/re.length,de=ae/re.length,z=q/re.length,te=ne/re.length;return{upperPercent:le,lowerPercent:de,alphaPercent:z,numericPercent:te}}function h(re){const{upperPercent:ie,lowerPercent:ae}=re;return ae===0&&ie>.6}function f(re){const{upperPercent:ie,lowerPercent:ae,alphaPercent:q,numericPercent:ne}=re;return ae>.2&&ie<.8&&q>.6&&ne<.2}function y(re){let ie=0,ae=0,q=0,ne=0;for(let ce=0;ce<re.length;ce++)q=re.charCodeAt(ce),g(q)&&ie++,n(q)&&ae++,s(q)&&ne++;return(ie===0||ae===0)&&ne===0?re.length<=30:ie<=5}function _(re,ie){if(!ie||(ie=ie.trim(),ie.length===0)||!y(re)||ie.length>60)return null;const ae=l(ie);if(!f(ae)){if(!h(ae))return null;ie=ie.toLowerCase()}let q=null,ne=0;for(re=re.toLowerCase();ne<ie.length&&(q=i(re,ie,0,ne))===null;)ne=o(ie,ne+1);return q}e.matchesCamelCase=_;function b(re,ie,ae=!1){if(!ie||ie.length===0)return null;let q=null,ne=0;for(re=re.toLowerCase(),ie=ie.toLowerCase();ne<ie.length&&(q=v(re,ie,0,ne,ae))===null;)ne=m(ie,ne+1);return q}e.matchesWords=b;function v(re,ie,ae,q,ne){if(ae===re.length)return[];if(q===ie.length)return null;if(d(re.charCodeAt(ae),ie.charCodeAt(q))){let ce=null,le=q+1;if(ce=v(re,ie,ae+1,q+1,ne),!ne)for(;!ce&&(le=m(ie,le))<ie.length;)ce=v(re,ie,ae+1,le,ne),le++;return ce===null?null:r({start:q,end:q+1},ce)}else return null}function m(re,ie){for(let ae=ie;ae<re.length;ae++)if(u(re.charCodeAt(ae))||ae>0&&u(re.charCodeAt(ae-1)))return ae;return re.length}const E=T(e.matchesPrefix,_,S),I=T(e.matchesPrefix,_,p),k=new w.LRUCache(1e4);function M(re,ie,ae=!1){if(typeof re!="string"||typeof ie!="string")return null;let q=k.get(re);q||(q=new RegExp(N.convertSimple2RegExpPattern(re),"i"),k.set(re,q));const ne=q.exec(ie);return ne?[{start:ne.index,end:ne.index+ne[0].length}]:ae?I(re,ie):E(re,ie)}e.matchesFuzzy=M;function P(re,ie,ae,q,ne,ce){const le=Math.min(13,re.length);for(;ae<le;ae++){const de=$(re,ie,ae,q,ne,ce,!1);if(de)return de}return[0,ce]}e.anyScore=P;function F(re){if(typeof re=="undefined")return[];const ie=[],ae=re[1];for(let q=re.length-1;q>1;q--){const ne=re[q]+ae,ce=ie[ie.length-1];ce&&ce.end===ne?ce.end=ne+1:ie.push({start:ne,end:ne+1})}return ie}e.createMatches=F;const R=128;function A(){const re=[],ie=[];for(let ae=0;ae<=R;ae++)ie[ae]=0;for(let ae=0;ae<=R;ae++)re.push(ie.slice(0));return re}function O(re){const ie=[];for(let ae=0;ae<=re;ae++)ie[ae]=0;return ie}const L=O(2*R),B=O(2*R),W=A(),K=A(),H=A(),Y=!1;function X(re,ie,ae,q,ne){function ce(de,z,te=" "){for(;de.length<z;)de=te+de;return de}let le=` |   |${q.split("").map(de=>ce(de,3)).join("|")}
`;for(let de=0;de<=ae;de++)de===0?le+=" |":le+=`${ie[de-1]}|`,le+=re[de].slice(0,ne+1).map(z=>ce(z.toString(),3)).join("|")+`
`;return le}function Z(re,ie,ae,q){re=re.substr(ie),ae=ae.substr(q),console.log(X(K,re,re.length,ae,ae.length)),console.log(X(H,re,re.length,ae,ae.length)),console.log(X(W,re,re.length,ae,ae.length))}function se(re,ie){if(ie<0||ie>=re.length)return!1;const ae=re.codePointAt(ie);switch(ae){case 95:case 45:case 46:case 32:case 47:case 92:case 39:case 34:case 58:case 36:case 60:case 40:case 91:return!0;case void 0:return!1;default:return!!N.isEmojiImprecise(ae)}}function oe(re,ie){if(ie<0||ie>=re.length)return!1;switch(re.charCodeAt(ie)){case 32:case 9:return!0;default:return!1}}function G(re,ie,ae){return ie[re]!==ae[re]}function x(re,ie,ae,q,ne,ce,le=!1){for(;ie<ae&&ne<ce;)re[ie]===q[ne]&&(le&&(L[ie]=ne),ie+=1),ne+=1;return ie===ae}e.isPatternInWord=x;var U;(function(re){re.Default=[-100,0];function ie(ae){return!ae||ae.length===2&&ae[0]===-100&&ae[1]===0}re.isDefault=ie})(U=e.FuzzyScore||(e.FuzzyScore={}));function $(re,ie,ae,q,ne,ce,le){const de=re.length>R?R:re.length,z=q.length>R?R:q.length;if(ae>=de||ce>=z||de-ae>z-ce||!x(ie,ae,de,ne,ce,z,!0))return;V(de,z,ae,ce,ie,ne);let te=1,he=1,ge=ae,ve=ce;const Se=[!1];for(te=1,ge=ae;ge<de;te++,ge++){const xe=L[ge],We=B[ge],Ue=ge+1<de?B[ge+1]:z;for(he=xe-ce+1,ve=xe;ve<Ue;he++,ve++){let Le=Number.MIN_SAFE_INTEGER,ye=!1;ve<=We&&(Le=Q(re,ie,ge,ae,q,ne,ve,z,ce,W[te-1][he-1]===0,Se));let Oe=0;Le!==Number.MAX_SAFE_INTEGER&&(ye=!0,Oe=Le+K[te-1][he-1]);const He=ve>xe,Be=He?K[te][he-1]+(W[te][he-1]>0?-5:0):0,Ke=ve>xe+1&&W[te][he-1]>0,ke=Ke?K[te][he-2]+(W[te][he-2]>0?-5:0):0;if(Ke&&(!He||ke>=Be)&&(!ye||ke>=Oe))K[te][he]=ke,H[te][he]=3,W[te][he]=0;else if(He&&(!ye||Be>=Oe))K[te][he]=Be,H[te][he]=2,W[te][he]=0;else if(ye)K[te][he]=Oe,H[te][he]=1,W[te][he]=W[te-1][he-1]+1;else throw new Error("not possible")}}if(Y&&Z(re,ae,q,ce),!Se[0]&&!le)return;te--,he--;const Ee=[K[te][he],ce];let Ae=0,Ne=0;for(;te>=1;){let xe=he;do{const We=H[te][xe];if(We===3)xe=xe-2;else if(We===2)xe=xe-1;else break}while(xe>=1);Ae>1&&ie[ae+te-1]===ne[ce+he-1]&&!G(xe+ce-1,q,ne)&&Ae+1>W[te][xe]&&(xe=he),xe===he?Ae++:Ae=1,Ne||(Ne=xe),te--,he=xe-1,Ee.push(he)}z===de&&(Ee[0]+=2);const ze=Ne-de;return Ee[0]-=ze,Ee}e.fuzzyScore=$;function V(re,ie,ae,q,ne,ce){let le=re-1,de=ie-1;for(;le>=ae&&de>=q;)ne[le]===ce[de]&&(B[le]=de,le--),de--}function Q(re,ie,ae,q,ne,ce,le,de,z,te,he){if(ie[ae]!==ce[le])return Number.MIN_SAFE_INTEGER;let ge=1,ve=!1;return le===ae-q?ge=re[ae]===ne[le]?7:5:G(le,ne,ce)&&(le===0||!G(le-1,ne,ce))?(ge=re[ae]===ne[le]?7:5,ve=!0):se(ce,le)&&(le===0||!se(ce,le-1))?ge=5:(se(ce,le-1)||oe(ce,le-1))&&(ge=5,ve=!0),ge>1&&ae===q&&(he[0]=!0),ve||(ve=G(le,ne,ce)||se(ce,le-1)||oe(ce,le-1)),ae===q?le>z&&(ge-=ve?3:5):te?ge+=ve?2:0:ge+=ve?0:1,le+1===de&&(ge-=ve?3:5),ge}function ue(re,ie,ae,q,ne,ce,le){return pe(re,ie,ae,q,ne,ce,!0,le)}e.fuzzyScoreGracefulAggressive=ue;function pe(re,ie,ae,q,ne,ce,le,de){let z=$(re,ie,ae,q,ne,ce,de);if(z&&!le)return z;if(re.length>=3){const te=Math.min(7,re.length-1);for(let he=ae+1;he<te;he++){const ge=fe(re,he);if(ge){const ve=$(ge,ge.toLowerCase(),ae,q,ne,ce,de);ve&&(ve[0]-=3,(!z||ve[0]>z[0])&&(z=ve))}}}return z}function fe(re,ie){if(ie+1>=re.length)return;const ae=re[ie],q=re[ie+1];if(ae!==q)return re.slice(0,ie)+q+ae+re.slice(ie+2)}}),define(J[305],ee([0,1,68,75,17,8]),function(j,e,w,N,T,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.pieceToQuery=e.prepareQuery=e.scoreFuzzy2=void 0;const S=[void 0,[]];function p(r,o,i=0,l=0){const h=o;return h.values&&h.values.length>1?C(r,h.values,i,l):n(r,o,i,l)}e.scoreFuzzy2=p;function C(r,o,i,l){let h=0;const f=[];for(const y of o){const[_,b]=n(r,y,i,l);if(typeof _!="number")return S;h+=_,f.push(...b)}return[h,g(f)]}function n(r,o,i,l){const h=(0,w.fuzzyScore)(o.original,o.originalLowercase,i,r,r.toLowerCase(),l,!0);return h?[h[0],(0,w.createMatches)(h)]:S}function g(r){const o=r.sort((h,f)=>h.start-f.start),i=[];let l;for(const h of o)!l||!t(l,h)?(l=h,i.push(h)):(l.start=Math.min(l.start,h.start),l.end=Math.max(l.end,h.end));return i}function t(r,o){return!(r.end<o.start||o.end<r.start)}function s(r){return r.startsWith('"')&&r.endsWith('"')}const c=" ";function u(r){typeof r!="string"&&(r="");const o=r.toLowerCase(),{pathNormalized:i,normalized:l,normalizedLowercase:h}=d(r),f=i.indexOf(N.sep)>=0,y=s(r);let _;const b=r.split(c);if(b.length>1)for(const v of b){const m=s(v),{pathNormalized:E,normalized:I,normalizedLowercase:k}=d(v);I&&(_||(_=[]),_.push({original:v,originalLowercase:v.toLowerCase(),pathNormalized:E,normalized:I,normalizedLowercase:k,expectContiguousMatch:m}))}return{original:r,originalLowercase:o,pathNormalized:i,normalized:l,normalizedLowercase:h,values:_,containsPathSeparator:f,expectContiguousMatch:y}}e.prepareQuery=u;function d(r){let o;T.isWindows?o=r.replace(/\//g,N.sep):o=r.replace(/\\/g,N.sep);const i=(0,D.stripWildcards)(o).replace(/\s|"/g,"");return{pathNormalized:o,normalized:i,normalizedLowercase:i.toLowerCase()}}function a(r){return Array.isArray(r)?u(r.map(o=>o.original).join(c)):u(r.original)}e.pieceToQuery=a}),define(J[209],ee([0,1,14,162,47,75,8]),function(j,e,w,N,T,D,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.isRelativePattern=e.parse=e.match=e.splitGlobAware=void 0;const p="**",C="/",n="[/\\\\]",g="[^/\\\\]",t=/\//g;function s(L){switch(L){case 0:return"";case 1:return`${g}*?`;default:return`(?:${n}|${g}+${n}|${n}${g}+)*?`}}function c(L,B){if(!L)return[];const W=[];let K=!1,H=!1,Y="";for(const X of L){switch(X){case B:if(!K&&!H){W.push(Y),Y="";continue}break;case"{":K=!0;break;case"}":K=!1;break;case"[":H=!0;break;case"]":H=!1;break}Y+=X}return Y&&W.push(Y),W}e.splitGlobAware=c;function u(L){if(!L)return"";let B="";const W=c(L,C);if(W.every(K=>K===p))B=".*";else{let K=!1;W.forEach((H,Y)=>{if(H===p){K||(B+=s(2),K=!0);return}let X=!1,Z="",se=!1,oe="";for(const G of H){if(G!=="}"&&X){Z+=G;continue}if(se&&(G!=="]"||!oe)){let x;G==="-"?x=G:(G==="^"||G==="!")&&!oe?x="^":G===C?x="":x=S.escapeRegExpCharacters(G),oe+=x;continue}switch(G){case"{":X=!0;continue;case"[":se=!0;continue;case"}":B+=`(?:${c(Z,",").map($=>u($)).join("|")})`,X=!1,Z="";break;case"]":B+="["+oe+"]",se=!1,oe="";break;case"?":B+=g;continue;case"*":B+=s(1);continue;default:B+=S.escapeRegExpCharacters(G)}}Y<W.length-1&&(W[Y+1]!==p||Y+2<W.length)&&(B+=n),K=!1})}return B}const d=/^\*\*\/\*\.[\w\.-]+$/,a=/^\*\*\/([\w\.-]+)\/?$/,r=/^{\*\*\/[\*\.]?[\w\.-]+\/?(,\*\*\/[\*\.]?[\w\.-]+\/?)*}$/,o=/^{\*\*\/[\*\.]?[\w\.-]+(\/(\*\*)?)?(,\*\*\/[\*\.]?[\w\.-]+(\/(\*\*)?)?)*}$/,i=/^\*\*((\/[\w\.-]+)+)\/?$/,l=/^([\w\.-]+(\/[\w\.-]+)*)\/?$/,h=new T.LRUCache(1e4),f=function(){return!1},y=function(){return null};function _(L,B){if(!L)return y;let W;typeof L!="string"?W=L.pattern:W=L,W=W.trim();const K=`${W}_${!!B.trimForExclusions}`;let H=h.get(K);if(H)return b(H,L);let Y;if(d.test(W)){const X=W.substr(4);H=function(Z,se){return typeof Z=="string"&&Z.endsWith(X)?W:null}}else(Y=a.exec(v(W,B)))?H=m(Y[1],W):(B.trimForExclusions?o:r).test(W)?H=E(W,B):(Y=i.exec(v(W,B)))?H=I(Y[1].substr(1),W,!0):(Y=l.exec(v(W,B)))?H=I(Y[1],W,!1):H=k(W);return h.set(K,H),b(H,L)}function b(L,B){return typeof B=="string"?L:function(W,K){return N.isEqualOrParent(W,B.base)?L(D.relative(B.base,W),K):null}}function v(L,B){return B.trimForExclusions&&L.endsWith("/**")?L.substr(0,L.length-2):L}function m(L,B){const W=`/${L}`,K=`\\${L}`,H=function(X,Z){return typeof X!="string"?null:Z?Z===L?B:null:X===L||X.endsWith(W)||X.endsWith(K)?B:null},Y=[L];return H.basenames=Y,H.patterns=[B],H.allBasenames=Y,H}function E(L,B){const W=O(L.slice(1,-1).split(",").map(Z=>_(Z,B)).filter(Z=>Z!==y),L),K=W.length;if(!K)return y;if(K===1)return W[0];const H=function(Z,se){for(let oe=0,G=W.length;oe<G;oe++)if(W[oe](Z,se))return L;return null},Y=W.find(Z=>!!Z.allBasenames);Y&&(H.allBasenames=Y.allBasenames);const X=W.reduce((Z,se)=>se.allPaths?Z.concat(se.allPaths):Z,[]);return X.length&&(H.allPaths=X),H}function I(L,B,W){const K=D.sep===D.posix.sep,H=K?L:L.replace(t,D.sep),Y=D.sep+H,X=D.posix.sep+L,Z=W?function(se,oe){return typeof se=="string"&&(se===H||se.endsWith(Y)||!K&&(se===L||se.endsWith(X)))?B:null}:function(se,oe){return typeof se=="string"&&(se===H||!K&&se===L)?B:null};return Z.allPaths=[(W?"*/":"./")+L],Z}function k(L){try{const B=new RegExp(`^${u(L)}$`);return function(W){return B.lastIndex=0,typeof W=="string"&&B.test(W)?L:null}}catch(B){return y}}function M(L,B,W){return!L||typeof B!="string"?!1:P(L)(B,void 0,W)}e.match=M;function P(L,B={}){if(!L)return f;if(typeof L=="string"||F(L)){const W=_(L,B);if(W===y)return f;const K=function(H,Y){return!!W(H,Y)};return W.allBasenames&&(K.allBasenames=W.allBasenames),W.allPaths&&(K.allPaths=W.allPaths),K}return R(L,B)}e.parse=P;function F(L){const B=L;return B&&typeof B.base=="string"&&typeof B.pattern=="string"}e.isRelativePattern=F;function R(L,B){const W=O(Object.getOwnPropertyNames(L).map(Z=>A(Z,L[Z],B)).filter(Z=>Z!==y)),K=W.length;if(!K)return y;if(!W.some(Z=>!!Z.requiresSiblings)){if(K===1)return W[0];const Z=function(G,x){for(let U=0,$=W.length;U<$;U++){const V=W[U](G,x);if(V)return V}return null},se=W.find(G=>!!G.allBasenames);se&&(Z.allBasenames=se.allBasenames);const oe=W.reduce((G,x)=>x.allPaths?G.concat(x.allPaths):G,[]);return oe.length&&(Z.allPaths=oe),Z}const H=function(Z,se,oe){let G;for(let x=0,U=W.length;x<U;x++){const $=W[x];$.requiresSiblings&&oe&&(se||(se=D.basename(Z)),G||(G=se.substr(0,se.length-D.extname(Z).length)));const V=$(Z,se,G,oe);if(V)return V}return null},Y=W.find(Z=>!!Z.allBasenames);Y&&(H.allBasenames=Y.allBasenames);const X=W.reduce((Z,se)=>se.allPaths?Z.concat(se.allPaths):Z,[]);return X.length&&(H.allPaths=X),H}function A(L,B,W){if(B===!1)return y;const K=_(L,W);if(K===y)return y;if(typeof B=="boolean")return K;if(B){const H=B.when;if(typeof H=="string"){const Y=(X,Z,se,oe)=>{if(!oe||!K(X,Z))return null;const G=H.replace("$(basename)",se),x=oe(G);return(0,w.isThenable)(x)?x.then(U=>U?L:null):x?L:null};return Y.requiresSiblings=!0,Y}}return K}function O(L,B){const W=L.filter(Z=>!!Z.basenames);if(W.length<2)return L;const K=W.reduce((Z,se)=>{const oe=se.basenames;return oe?Z.concat(oe):Z},[]);let H;if(B){H=[];for(let Z=0,se=K.length;Z<se;Z++)H.push(B)}else H=W.reduce((Z,se)=>{const oe=se.patterns;return oe?Z.concat(oe):Z},[]);const Y=function(Z,se){if(typeof Z!="string")return null;if(!se){let G;for(G=Z.length;G>0;G--){const x=Z.charCodeAt(G-1);if(x===47||x===92)break}se=Z.substr(G)}const oe=K.indexOf(se);return oe!==-1?H[oe]:null};Y.basenames=K,Y.patterns=H,Y.allBasenames=K;const X=L.filter(Z=>!Z.basenames);return X.push(Y),X}}),define(J[107],ee([0,1,27,68,8]),function(j,e,w,N,T){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.matchesFuzzyIconAware=e.parseLabelWithIcons=e.stripIcons=e.markdownEscapeEscapedIcons=e.escapeIcons=e.iconStartMarker=void 0,e.iconStartMarker="$(";const D=new RegExp(`\\$\\(${w.CSSIcon.iconNameExpression}(?:${w.CSSIcon.iconModifierExpression})?\\)`,"g"),S=new RegExp(`(\\\\)?${D.source}`,"g");function p(d){return d.replace(S,(a,r)=>r?a:`\\${a}`)}e.escapeIcons=p;const C=new RegExp(`\\\\${D.source}`,"g");function n(d){return d.replace(C,a=>`\\${a}`)}e.markdownEscapeEscapedIcons=n;const g=new RegExp(`(\\s)?(\\\\)?${D.source}(\\s)?`,"g");function t(d){return d.indexOf(e.iconStartMarker)===-1?d:d.replace(g,(a,r,o,i)=>o?a:r||i||"")}e.stripIcons=t;function s(d){const a=d.indexOf(e.iconStartMarker);return a===-1?{text:d}:c(d,a)}e.parseLabelWithIcons=s;function c(d,a){const r=[];let o="";function i(m){if(m){o+=m;for(const E of m)r.push(f)}}let l=-1,h="",f=0,y,_,b=a;const v=d.length;for(i(d.substr(0,a));b<v;)y=d[b],_=d[b+1],y===e.iconStartMarker[0]&&_===e.iconStartMarker[1]?(l=b,i(h),h=e.iconStartMarker,b++):y===")"&&l!==-1?(f+=b-l+1,l=-1,h=""):l!==-1?/^[a-z0-9\-]$/i.test(y)?h+=y:(i(h),l=-1,h=""):i(y),b++;return i(h),{text:o,iconOffsets:r}}function u(d,a,r=!1){const{text:o,iconOffsets:i}=a;if(!i||i.length===0)return(0,N.matchesFuzzy)(d,o,r);const l=(0,T.ltrim)(o," "),h=o.length-l.length,f=(0,N.matchesFuzzy)(d,l,r);if(f)for(const y of f){const _=i[y.start+h]+h;y.start+=_,y.end+=_}return f}e.matchesFuzzyIconAware=u}),define(J[69],ee([0,1,11,107]),function(j,e,w,N){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.parseHrefAndDimensions=e.removeMarkdownEscapes=e.escapeMarkdownSyntaxTokens=e.isMarkdownString=e.isEmptyMarkdownString=e.MarkdownString=void 0;class T{constructor(t="",s=!1){var c,u,d;if(this.value=t,typeof this.value!="string")throw(0,w.illegalArgument)("value");typeof s=="boolean"?(this.isTrusted=s,this.supportThemeIcons=!1,this.supportHtml=!1):(this.isTrusted=(c=s.isTrusted)!==null&&c!==void 0?c:void 0,this.supportThemeIcons=(u=s.supportThemeIcons)!==null&&u!==void 0?u:!1,this.supportHtml=(d=s.supportHtml)!==null&&d!==void 0?d:!1)}appendText(t,s=0){return this.value+=p(this.supportThemeIcons?(0,N.escapeIcons)(t):t).replace(/([ \t]+)/g,(c,u)=>"&nbsp;".repeat(u.length)).replace(/\>/gm,"\\>").replace(/\n/g,s===1?`\\
`:`
 
`),this}appendMarkdown(t){return this.value+=t,this}appendCodeblock(t,s){return this.value+="\n```",this.value+=t,this.value+=`
`,this.value+=s,this.value+="\n```\n",this}}e.MarkdownString=T;function D(g){return S(g)?!g.value:Array.isArray(g)?g.every(D):!0}e.isEmptyMarkdownString=D;function S(g){return g instanceof T?!0:g&&typeof g=="object"?typeof g.value=="string"&&(typeof g.isTrusted=="boolean"||g.isTrusted===void 0)&&(typeof g.supportThemeIcons=="boolean"||g.supportThemeIcons===void 0):!1}e.isMarkdownString=S;function p(g){return g.replace(/[\\`*_{}[\]()#+\-!]/g,"\\$&")}e.escapeMarkdownSyntaxTokens=p;function C(g){return g&&g.replace(/\\([\\`*_{}[\]()#+\-.!])/g,"$1")}e.removeMarkdownEscapes=C;function n(g){const t=[],s=g.split("|").map(u=>u.trim());g=s[0];const c=s[1];if(c){const u=/height=(\d+)/.exec(c),d=/width=(\d+)/.exec(c),a=u?u[1]:"",r=d?d[1]:"",o=isFinite(parseInt(r)),i=isFinite(parseInt(a));o&&t.push(`width="${r}"`),i&&t.push(`height="${a}"`)}return{href:g,dimensions:t}}e.parseHrefAndDimensions=n}),define(J[306],ee([0,1,8]),function(j,e,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.buildReplaceStringWithCasePreserved=void 0;function N(S,p){if(S&&S[0]!==""){const C=T(S,p,"-"),n=T(S,p,"_");return C&&!n?D(S,p,"-"):!C&&n?D(S,p,"_"):S[0].toUpperCase()===S[0]?p.toUpperCase():S[0].toLowerCase()===S[0]?p.toLowerCase():w.containsUppercaseCharacter(S[0][0])&&p.length>0?p[0].toUpperCase()+p.substr(1):S[0][0].toUpperCase()!==S[0][0]&&p.length>0?p[0].toLowerCase()+p.substr(1):p}else return p}e.buildReplaceStringWithCasePreserved=N;function T(S,p,C){return S[0].indexOf(C)!==-1&&p.indexOf(C)!==-1&&S[0].split(C).length===p.split(C).length}function D(S,p,C){const n=p.split(C),g=S[0].split(C);let t="";return n.forEach((s,c)=>{t+=N([g[c]],s)+C}),t.slice(0,-1)}}),define(J[76],ee([0,1,8]),function(j,e,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var N;(function(T){T[T.Ignore=0]="Ignore",T[T.Info=1]="Info",T[T.Warning=2]="Warning",T[T.Error=3]="Error"})(N||(N={})),function(T){const D="error",S="warning",p="warn",C="info",n="ignore";function g(s){return s?w.equalsIgnoreCase(D,s)?T.Error:w.equalsIgnoreCase(S,s)||w.equalsIgnoreCase(p,s)?T.Warning:w.equalsIgnoreCase(C,s)?T.Info:T.Ignore:T.Ignore}T.fromValue=g;function t(s){switch(s){case T.Error:return D;case T.Warning:return S;case T.Info:return C;default:return n}}T.toString=t}(N||(N={})),e.default=N}),define(J[20],ee([0,1]),function(j,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.assertNever=e.withNullAsUndefined=e.createProxyObject=e.getAllMethodNames=e.getAllPropertyNames=e.validateConstraint=e.validateConstraints=e.isFunction=e.assertIsDefined=e.assertType=e.isUndefinedOrNull=e.isDefined=e.isUndefined=e.isBoolean=e.isNumber=e.isObject=e.isString=e.isArray=void 0;function w(l){return Array.isArray(l)}e.isArray=w;function N(l){return typeof l=="string"}e.isString=N;function T(l){return typeof l=="object"&&l!==null&&!Array.isArray(l)&&!(l instanceof RegExp)&&!(l instanceof Date)}e.isObject=T;function D(l){return typeof l=="number"&&!isNaN(l)}e.isNumber=D;function S(l){return l===!0||l===!1}e.isBoolean=S;function p(l){return typeof l=="undefined"}e.isUndefined=p;function C(l){return!n(l)}e.isDefined=C;function n(l){return p(l)||l===null}e.isUndefinedOrNull=n;function g(l,h){if(!l)throw new Error(h?`Unexpected type, expected '${h}'`:"Unexpected type")}e.assertType=g;function t(l){if(n(l))throw new Error("Assertion Failed: argument is undefined or null");return l}e.assertIsDefined=t;function s(l){return typeof l=="function"}e.isFunction=s;function c(l,h){const f=Math.min(l.length,h.length);for(let y=0;y<f;y++)u(l[y],h[y])}e.validateConstraints=c;function u(l,h){if(N(h)){if(typeof l!==h)throw new Error(`argument does not match constraint: typeof ${h}`)}else if(s(h)){try{if(l instanceof h)return}catch(f){}if(!n(l)&&l.constructor===h||h.length===1&&h.call(void 0,l)===!0)return;throw new Error("argument does not match one of these constraints: arg instanceof constraint, arg.constructor === constraint, nor constraint(arg) === true")}}e.validateConstraint=u;function d(l){let h=[],f=Object.getPrototypeOf(l);for(;Object.prototype!==f;)h=h.concat(Object.getOwnPropertyNames(f)),f=Object.getPrototypeOf(f);return h}e.getAllPropertyNames=d;function a(l){const h=[];for(const f of d(l))typeof l[f]=="function"&&h.push(f);return h}e.getAllMethodNames=a;function r(l,h){const f=_=>function(){const b=Array.prototype.slice.call(arguments,0);return h(_,b)};let y={};for(const _ of l)y[_]=f(_);return y}e.createProxyObject=r;function o(l){return l===null?void 0:l}e.withNullAsUndefined=o;function i(l,h="Unreachable"){throw new Error(h)}e.assertNever=i}),define(J[38],ee([0,1,20]),function(j,e,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getOrDefault=e.equals=e.mixin=e.cloneAndChange=e.deepFreeze=e.deepClone=void 0;function N(t){if(!t||typeof t!="object"||t instanceof RegExp)return t;const s=Array.isArray(t)?[]:{};return Object.keys(t).forEach(c=>{t[c]&&typeof t[c]=="object"?s[c]=N(t[c]):s[c]=t[c]}),s}e.deepClone=N;function T(t){if(!t||typeof t!="object")return t;const s=[t];for(;s.length>0;){const c=s.shift();Object.freeze(c);for(const u in c)if(D.call(c,u)){const d=c[u];typeof d=="object"&&!Object.isFrozen(d)&&s.push(d)}}return t}e.deepFreeze=T;const D=Object.prototype.hasOwnProperty;function S(t,s){return p(t,s,new Set)}e.cloneAndChange=S;function p(t,s,c){if((0,w.isUndefinedOrNull)(t))return t;const u=s(t);if(typeof u!="undefined")return u;if((0,w.isArray)(t)){const d=[];for(const a of t)d.push(p(a,s,c));return d}if((0,w.isObject)(t)){if(c.has(t))throw new Error("Cannot clone recursive data-structure");c.add(t);const d={};for(let a in t)D.call(t,a)&&(d[a]=p(t[a],s,c));return c.delete(t),d}return t}function C(t,s,c=!0){return(0,w.isObject)(t)?((0,w.isObject)(s)&&Object.keys(s).forEach(u=>{u in t?c&&((0,w.isObject)(t[u])&&(0,w.isObject)(s[u])?C(t[u],s[u],c):t[u]=s[u]):t[u]=s[u]}),t):s}e.mixin=C;function n(t,s){if(t===s)return!0;if(t==null||s===null||s===void 0||typeof t!=typeof s||typeof t!="object"||Array.isArray(t)!==Array.isArray(s))return!1;let c,u;if(Array.isArray(t)){if(t.length!==s.length)return!1;for(c=0;c<t.length;c++)if(!n(t[c],s[c]))return!1}else{const d=[];for(u in t)d.push(u);d.sort();const a=[];for(u in s)a.push(u);if(a.sort(),!n(d,a))return!1;for(c=0;c<d.length;c++)if(!n(t[d[c]],s[d[c]]))return!1}return!0}e.equals=n;function g(t,s,c){const u=s(t);return typeof u=="undefined"?c:u}e.getOrDefault=g}),define(J[135],ee([0,1]),function(j,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.toUint32=e.toUint8=void 0;function w(T){return T<0?0:T>255?255:T|0}e.toUint8=w;function N(T){return T<0?0:T>4294967295?4294967295:T|0}e.toUint32=N}),define(J[24],ee([0,1,75,17]),function(j,e,w,N){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.uriToFsPath=e.URI=void 0;const T=/^\w[\w\d+.-]*$/,D=/^\//,S=/^\/\//;function p(_,b){if(!_.scheme&&b)throw new Error(`[UriError]: Scheme is missing: {scheme: "", authority: "${_.authority}", path: "${_.path}", query: "${_.query}", fragment: "${_.fragment}"}`);if(_.scheme&&!T.test(_.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(_.path){if(_.authority){if(!D.test(_.path))throw new Error('[UriError]: If a URI contains an authority component, then the path component must either be empty or begin with a slash ("/") character')}else if(S.test(_.path))throw new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")')}}function C(_,b){return!_&&!b?"file":_}function n(_,b){switch(_){case"https":case"http":case"file":b?b[0]!==t&&(b=t+b):b=t;break}return b}const g="",t="/",s=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/;class c{constructor(b,v,m,E,I,k=!1){typeof b=="object"?(this.scheme=b.scheme||g,this.authority=b.authority||g,this.path=b.path||g,this.query=b.query||g,this.fragment=b.fragment||g):(this.scheme=C(b,k),this.authority=v||g,this.path=n(this.scheme,m||g),this.query=E||g,this.fragment=I||g,p(this,k))}static isUri(b){return b instanceof c?!0:b?typeof b.authority=="string"&&typeof b.fragment=="string"&&typeof b.path=="string"&&typeof b.query=="string"&&typeof b.scheme=="string"&&typeof b.fsPath=="string"&&typeof b.with=="function"&&typeof b.toString=="function":!1}get fsPath(){return i(this,!1)}with(b){if(!b)return this;let{scheme:v,authority:m,path:E,query:I,fragment:k}=b;return v===void 0?v=this.scheme:v===null&&(v=g),m===void 0?m=this.authority:m===null&&(m=g),E===void 0?E=this.path:E===null&&(E=g),I===void 0?I=this.query:I===null&&(I=g),k===void 0?k=this.fragment:k===null&&(k=g),v===this.scheme&&m===this.authority&&E===this.path&&I===this.query&&k===this.fragment?this:new d(v,m,E,I,k)}static parse(b,v=!1){const m=s.exec(b);return m?new d(m[2]||g,y(m[4]||g),y(m[5]||g),y(m[7]||g),y(m[9]||g),v):new d(g,g,g,g,g)}static file(b){let v=g;if(N.isWindows&&(b=b.replace(/\\/g,t)),b[0]===t&&b[1]===t){const m=b.indexOf(t,2);m===-1?(v=b.substring(2),b=t):(v=b.substring(2,m),b=b.substring(m)||t)}return new d("file",v,b,g,g)}static from(b){const v=new d(b.scheme,b.authority,b.path,b.query,b.fragment);return p(v,!0),v}static joinPath(b,...v){if(!b.path)throw new Error("[UriError]: cannot call joinPath on URI without path");let m;return N.isWindows&&b.scheme==="file"?m=c.file(w.win32.join(i(b,!0),...v)).path:m=w.posix.join(b.path,...v),b.with({path:m})}toString(b=!1){return l(this,b)}toJSON(){return this}static revive(b){if(b){if(b instanceof c)return b;{const v=new d(b);return v._formatted=b.external,v._fsPath=b._sep===u?b.fsPath:null,v}}else return b}}e.URI=c;const u=N.isWindows?1:void 0;class d extends c{constructor(){super(...arguments);this._formatted=null,this._fsPath=null}get fsPath(){return this._fsPath||(this._fsPath=i(this,!1)),this._fsPath}toString(b=!1){return b?l(this,!0):(this._formatted||(this._formatted=l(this,!1)),this._formatted)}toJSON(){const b={$mid:1};return this._fsPath&&(b.fsPath=this._fsPath,b._sep=u),this._formatted&&(b.external=this._formatted),this.path&&(b.path=this.path),this.scheme&&(b.scheme=this.scheme),this.authority&&(b.authority=this.authority),this.query&&(b.query=this.query),this.fragment&&(b.fragment=this.fragment),b}}const a={[58]:"%3A",[47]:"%2F",[63]:"%3F",[35]:"%23",[91]:"%5B",[93]:"%5D",[64]:"%40",[33]:"%21",[36]:"%24",[38]:"%26",[39]:"%27",[40]:"%28",[41]:"%29",[42]:"%2A",[43]:"%2B",[44]:"%2C",[59]:"%3B",[61]:"%3D",[32]:"%20"};function r(_,b){let v,m=-1;for(let E=0;E<_.length;E++){const I=_.charCodeAt(E);if(I>=97&&I<=122||I>=65&&I<=90||I>=48&&I<=57||I===45||I===46||I===95||I===126||b&&I===47)m!==-1&&(v+=encodeURIComponent(_.substring(m,E)),m=-1),v!==void 0&&(v+=_.charAt(E));else{v===void 0&&(v=_.substr(0,E));const k=a[I];k!==void 0?(m!==-1&&(v+=encodeURIComponent(_.substring(m,E)),m=-1),v+=k):m===-1&&(m=E)}}return m!==-1&&(v+=encodeURIComponent(_.substring(m))),v!==void 0?v:_}function o(_){let b;for(let v=0;v<_.length;v++){const m=_.charCodeAt(v);m===35||m===63?(b===void 0&&(b=_.substr(0,v)),b+=a[m]):b!==void 0&&(b+=_[v])}return b!==void 0?b:_}function i(_,b){let v;return _.authority&&_.path.length>1&&_.scheme==="file"?v=`//${_.authority}${_.path}`:_.path.charCodeAt(0)===47&&(_.path.charCodeAt(1)>=65&&_.path.charCodeAt(1)<=90||_.path.charCodeAt(1)>=97&&_.path.charCodeAt(1)<=122)&&_.path.charCodeAt(2)===58?b?v=_.path.substr(1):v=_.path[1].toLowerCase()+_.path.substr(2):v=_.path,N.isWindows&&(v=v.replace(/\//g,"\\")),v}e.uriToFsPath=i;function l(_,b){const v=b?o:r;let m="",{scheme:E,authority:I,path:k,query:M,fragment:P}=_;if(E&&(m+=E,m+=":"),(I||E==="file")&&(m+=t,m+=t),I){let F=I.indexOf("@");if(F!==-1){const R=I.substr(0,F);I=I.substr(F+1),F=R.indexOf(":"),F===-1?m+=v(R,!1):(m+=v(R.substr(0,F),!1),m+=":",m+=v(R.substr(F+1),!1)),m+="@"}I=I.toLowerCase(),F=I.indexOf(":"),F===-1?m+=v(I,!1):(m+=v(I.substr(0,F),!1),m+=I.substr(F))}if(k){if(k.length>=3&&k.charCodeAt(0)===47&&k.charCodeAt(2)===58){const F=k.charCodeAt(1);F>=65&&F<=90&&(k=`/${String.fromCharCode(F+32)}:${k.substr(3)}`)}else if(k.length>=2&&k.charCodeAt(1)===58){const F=k.charCodeAt(0);F>=65&&F<=90&&(k=`${String.fromCharCode(F+32)}:${k.substr(2)}`)}m+=v(k,!0)}return M&&(m+="?",m+=v(M,!1)),P&&(m+="#",m+=b?P:r(P,!1)),m}function h(_){try{return decodeURIComponent(_)}catch(b){return _.length>3?_.substr(0,3)+h(_.substr(3)):_}}const f=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function y(_){return _.match(f)?_.replace(f,b=>h(b)):_}}),define(J[210],ee([0,1,105,24]),function(j,e,w,N){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.revive=e.parse=void 0;function T(S){let p=JSON.parse(S);return p=D(p),p}e.parse=T;function D(S,p=0){if(!S||p>200)return S;if(typeof S=="object"){switch(S.$mid){case 1:return N.URI.revive(S);case 2:return new RegExp(S.source,S.flags)}if(S instanceof w.VSBuffer||S instanceof Uint8Array)return S;if(Array.isArray(S))for(let C=0;C<S.length;++C)S[C]=D(S[C],p+1);else for(const C in S)Object.hasOwnProperty.call(S,C)&&(S[C]=D(S[C],p+1))}return S}e.revive=D}),define(J[48],ee([0,1,17,24]),function(j,e,w,N){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.FileAccess=e.RemoteAuthorities=e.Schemas=void 0;var T;(function(p){p.inMemory="inmemory",p.vscode="vscode",p.internal="private",p.walkThrough="walkThrough",p.walkThroughSnippet="walkThroughSnippet",p.http="http",p.https="https",p.file="file",p.mailto="mailto",p.untitled="untitled",p.data="data",p.command="command",p.vscodeRemote="vscode-remote",p.vscodeRemoteResource="vscode-remote-resource",p.userData="vscode-userdata",p.vscodeCustomEditor="vscode-custom-editor",p.vscodeNotebook="vscode-notebook",p.vscodeNotebookCell="vscode-notebook-cell",p.vscodeNotebookCellMetadata="vscode-notebook-cell-metadata",p.vscodeNotebookCellOutput="vscode-notebook-cell-output",p.vscodeInteractive="vscode-interactive",p.vscodeInteractiveInput="vscode-interactive-input",p.vscodeSettings="vscode-settings",p.vscodeWorkspaceTrust="vscode-workspace-trust",p.vscodeTerminal="vscode-terminal",p.webviewPanel="webview-panel",p.vscodeWebview="vscode-webview",p.extension="extension",p.vscodeFileResource="vscode-file",p.tmp="tmp"})(T=e.Schemas||(e.Schemas={}));class D{constructor(){this._hosts=Object.create(null),this._ports=Object.create(null),this._connectionTokens=Object.create(null),this._preferredWebSchema="http",this._delegate=null}setPreferredWebSchema(C){this._preferredWebSchema=C}rewrite(C){if(this._delegate)return this._delegate(C);const n=C.authority;let g=this._hosts[n];g&&g.indexOf(":")!==-1&&(g=`[${g}]`);const t=this._ports[n],s=this._connectionTokens[n];let c=`path=${encodeURIComponent(C.path)}`;return typeof s=="string"&&(c+=`&tkn=${encodeURIComponent(s)}`),N.URI.from({scheme:w.isWeb?this._preferredWebSchema:T.vscodeRemoteResource,authority:`${g}:${t}`,path:"/vscode-remote-resource",query:c})}}e.RemoteAuthorities=new D;class S{asBrowserUri(C,n){const g=this.toUri(C,n);return g.scheme===T.vscodeRemote?e.RemoteAuthorities.rewrite(g):g.scheme===T.file&&(w.isNative||typeof w.globals.importScripts=="function"&&w.globals.origin===`${T.vscodeFileResource}://${S.FALLBACK_AUTHORITY}`)?g.with({scheme:T.vscodeFileResource,authority:g.authority||S.FALLBACK_AUTHORITY,query:null,fragment:null}):g}toUri(C,n){return N.URI.isUri(C)?C:N.URI.parse(n.toUrl(C))}}S.FALLBACK_AUTHORITY="vscode-app",e.FileAccess=new S}),define(J[7],ee([0,1,34,161,52,56,14,11,4,2,48,17]),function(j,e,w,N,T,D,S,p,C,n,g,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.addMatchMediaChangeListener=e.ModifierKeyEmitter=e.asCSSPropertyValue=e.asCSSUrl=e.animate=e.windowOpenNoOpener=e.computeScreenAwareSize=e.getElementsByTagName=e.hide=e.show=e.$=e.Namespace=e.reset=e.prepend=e.append=e.trackFocus=e.restoreParentsScrollTop=e.saveParentsScrollTop=e.EventHelper=e.EventType=e.isHTMLElement=e.removeCSSRulesContainingSelector=e.createCSSRule=e.createStyleSheet=e.getActiveElement=e.getShadowRoot=e.isInShadowDOM=e.isShadowRoot=e.hasParentWithClass=e.findParentWithClass=e.isAncestor=e.getTotalHeight=e.getContentHeight=e.getContentWidth=e.getTotalWidth=e.StandardWindow=e.getDomNodePagePosition=e.size=e.getTopLeftOffset=e.Dimension=e.getClientArea=e.getComputedStyle=e.addDisposableThrottledListener=e.scheduleAtNextAnimationFrame=e.runAtThisOrScheduleAtNextAnimationFrame=e.addDisposableNonBubblingPointerOutListener=e.addDisposableNonBubblingMouseOutListener=e.addDisposableGenericMouseUpListner=e.addDisposableGenericMouseDownListner=e.addStandardDisposableGenericMouseDownListner=e.addStandardDisposableListener=e.addDisposableListener=e.isInDOM=e.clearNode=void 0;function s(Le){for(;Le.firstChild;)Le.firstChild.remove()}e.clearNode=s;function c(Le){var ye;return(ye=Le==null?void 0:Le.isConnected)!==null&&ye!==void 0?ye:!1}e.isInDOM=c;class u{constructor(ye,Oe,He,Be){this._node=ye,this._type=Oe,this._handler=He,this._options=Be||!1,this._node.addEventListener(this._type,this._handler,this._options)}dispose(){!this._handler||(this._node.removeEventListener(this._type,this._handler,this._options),this._node=null,this._handler=null)}}function d(Le,ye,Oe,He){return new u(Le,ye,Oe,He)}e.addDisposableListener=d;function a(Le){return function(ye){return Le(new D.StandardMouseEvent(ye))}}function r(Le){return function(ye){return Le(new T.StandardKeyboardEvent(ye))}}let o=function(ye,Oe,He,Be){let Ke=He;return Oe==="click"||Oe==="mousedown"?Ke=a(He):(Oe==="keydown"||Oe==="keypress"||Oe==="keyup")&&(Ke=r(He)),d(ye,Oe,Ke,Be)};e.addStandardDisposableListener=o;let i=function(ye,Oe,He){let Be=a(Oe);return l(ye,Be,He)};e.addStandardDisposableGenericMouseDownListner=i;function l(Le,ye,Oe){return d(Le,t.isIOS&&N.BrowserFeatures.pointerEvents?e.EventType.POINTER_DOWN:e.EventType.MOUSE_DOWN,ye,Oe)}e.addDisposableGenericMouseDownListner=l;function h(Le,ye,Oe){return d(Le,t.isIOS&&N.BrowserFeatures.pointerEvents?e.EventType.POINTER_UP:e.EventType.MOUSE_UP,ye,Oe)}e.addDisposableGenericMouseUpListner=h;function f(Le,ye){return d(Le,"mouseout",Oe=>{let He=Oe.relatedTarget;for(;He&&He!==Le;)He=He.parentNode;He!==Le&&ye(Oe)})}e.addDisposableNonBubblingMouseOutListener=f;function y(Le,ye){return d(Le,"pointerout",Oe=>{let He=Oe.relatedTarget;for(;He&&He!==Le;)He=He.parentNode;He!==Le&&ye(Oe)})}e.addDisposableNonBubblingPointerOutListener=y;let _=null;function b(Le){if(!_){const ye=Oe=>setTimeout(()=>Oe(new Date().getTime()),0);_=self.requestAnimationFrame||self.msRequestAnimationFrame||self.webkitRequestAnimationFrame||self.mozRequestAnimationFrame||self.oRequestAnimationFrame||ye}return _.call(self,Le)}class v{constructor(ye,Oe=0){this._runner=ye,this.priority=Oe,this._canceled=!1}dispose(){this._canceled=!0}execute(){if(!this._canceled)try{this._runner()}catch(ye){(0,p.onUnexpectedError)(ye)}}static sort(ye,Oe){return Oe.priority-ye.priority}}(function(){let Le=[],ye=null,Oe=!1,He=!1,Be=()=>{for(Oe=!1,ye=Le,Le=[],He=!0;ye.length>0;)ye.sort(v.sort),ye.shift().execute();He=!1};e.scheduleAtNextAnimationFrame=(Ke,ke=0)=>{let Ie=new v(Ke,ke);return Le.push(Ie),Oe||(Oe=!0,b(Be)),Ie},e.runAtThisOrScheduleAtNextAnimationFrame=(Ke,ke)=>{if(He){let Ie=new v(Ke,ke);return ye.push(Ie),Ie}else return(0,e.scheduleAtNextAnimationFrame)(Ke,ke)}})();const m=8,E=function(Le,ye){return ye};class I extends n.Disposable{constructor(ye,Oe,He,Be=E,Ke=m){super();let ke=null,Ie=0,Me=this._register(new S.TimeoutTimer),me=()=>{Ie=new Date().getTime(),He(ke),ke=null};this._register(d(ye,Oe,be=>{ke=Be(ke,be);let De=new Date().getTime()-Ie;De>=Ke?(Me.cancel(),me()):Me.setIfNotSet(me,Ke-De)}))}}function k(Le,ye,Oe,He,Be){return new I(Le,ye,Oe,He,Be)}e.addDisposableThrottledListener=k;function M(Le){return document.defaultView.getComputedStyle(Le,null)}e.getComputedStyle=M;function P(Le){if(Le!==document.body)return new R(Le.clientWidth,Le.clientHeight);if(t.isIOS&&window.visualViewport)return new R(window.visualViewport.width,window.visualViewport.height);if(window.innerWidth&&window.innerHeight)return new R(window.innerWidth,window.innerHeight);if(document.body&&document.body.clientWidth&&document.body.clientHeight)return new R(document.body.clientWidth,document.body.clientHeight);if(document.documentElement&&document.documentElement.clientWidth&&document.documentElement.clientHeight)return new R(document.documentElement.clientWidth,document.documentElement.clientHeight);throw new Error("Unable to figure out browser width and height")}e.getClientArea=P;class F{static convertToPixels(ye,Oe){return parseFloat(Oe)||0}static getDimension(ye,Oe,He){let Be=M(ye),Ke="0";return Be&&(Be.getPropertyValue?Ke=Be.getPropertyValue(Oe):Ke=Be.getAttribute(He)),F.convertToPixels(ye,Ke)}static getBorderLeftWidth(ye){return F.getDimension(ye,"border-left-width","borderLeftWidth")}static getBorderRightWidth(ye){return F.getDimension(ye,"border-right-width","borderRightWidth")}static getBorderTopWidth(ye){return F.getDimension(ye,"border-top-width","borderTopWidth")}static getBorderBottomWidth(ye){return F.getDimension(ye,"border-bottom-width","borderBottomWidth")}static getPaddingLeft(ye){return F.getDimension(ye,"padding-left","paddingLeft")}static getPaddingRight(ye){return F.getDimension(ye,"padding-right","paddingRight")}static getPaddingTop(ye){return F.getDimension(ye,"padding-top","paddingTop")}static getPaddingBottom(ye){return F.getDimension(ye,"padding-bottom","paddingBottom")}static getMarginLeft(ye){return F.getDimension(ye,"margin-left","marginLeft")}static getMarginTop(ye){return F.getDimension(ye,"margin-top","marginTop")}static getMarginRight(ye){return F.getDimension(ye,"margin-right","marginRight")}static getMarginBottom(ye){return F.getDimension(ye,"margin-bottom","marginBottom")}}class R{constructor(ye,Oe){this.width=ye,this.height=Oe}with(ye=this.width,Oe=this.height){return ye!==this.width||Oe!==this.height?new R(ye,Oe):this}static is(ye){return typeof ye=="object"&&typeof ye.height=="number"&&typeof ye.width=="number"}static lift(ye){return ye instanceof R?ye:new R(ye.width,ye.height)}static equals(ye,Oe){return ye===Oe?!0:!ye||!Oe?!1:ye.width===Oe.width&&ye.height===Oe.height}}e.Dimension=R;function A(Le){let ye=Le.offsetParent,Oe=Le.offsetTop,He=Le.offsetLeft;for(;(Le=Le.parentNode)!==null&&Le!==document.body&&Le!==document.documentElement;){Oe-=Le.scrollTop;const Be=se(Le)?null:M(Le);Be&&(He-=Be.direction!=="rtl"?Le.scrollLeft:-Le.scrollLeft),Le===ye&&(He+=F.getBorderLeftWidth(Le),Oe+=F.getBorderTopWidth(Le),Oe+=Le.offsetTop,He+=Le.offsetLeft,ye=Le.offsetParent)}return{left:He,top:Oe}}e.getTopLeftOffset=A;function O(Le,ye,Oe){typeof ye=="number"&&(Le.style.width=`${ye}px`),typeof Oe=="number"&&(Le.style.height=`${Oe}px`)}e.size=O;function L(Le){let ye=Le.getBoundingClientRect();return{left:ye.left+e.StandardWindow.scrollX,top:ye.top+e.StandardWindow.scrollY,width:ye.width,height:ye.height}}e.getDomNodePagePosition=L,e.StandardWindow=new class{get scrollX(){return typeof window.scrollX=="number"?window.scrollX:document.body.scrollLeft+document.documentElement.scrollLeft}get scrollY(){return typeof window.scrollY=="number"?window.scrollY:document.body.scrollTop+document.documentElement.scrollTop}};function B(Le){let ye=F.getMarginLeft(Le)+F.getMarginRight(Le);return Le.offsetWidth+ye}e.getTotalWidth=B;function W(Le){let ye=F.getBorderLeftWidth(Le)+F.getBorderRightWidth(Le),Oe=F.getPaddingLeft(Le)+F.getPaddingRight(Le);return Le.offsetWidth-ye-Oe}e.getContentWidth=W;function K(Le){let ye=F.getBorderTopWidth(Le)+F.getBorderBottomWidth(Le),Oe=F.getPaddingTop(Le)+F.getPaddingBottom(Le);return Le.offsetHeight-ye-Oe}e.getContentHeight=K;function H(Le){let ye=F.getMarginTop(Le)+F.getMarginBottom(Le);return Le.offsetHeight+ye}e.getTotalHeight=H;function Y(Le,ye){for(;Le;){if(Le===ye)return!0;Le=Le.parentNode}return!1}e.isAncestor=Y;function X(Le,ye,Oe){for(;Le&&Le.nodeType===Le.ELEMENT_NODE;){if(Le.classList.contains(ye))return Le;if(Oe){if(typeof Oe=="string"){if(Le.classList.contains(Oe))return null}else if(Le===Oe)return null}Le=Le.parentNode}return null}e.findParentWithClass=X;function Z(Le,ye,Oe){return!!X(Le,ye,Oe)}e.hasParentWithClass=Z;function se(Le){return Le&&!!Le.host&&!!Le.mode}e.isShadowRoot=se;function oe(Le){return!!G(Le)}e.isInShadowDOM=oe;function G(Le){for(;Le.parentNode;){if(Le===document.body)return null;Le=Le.parentNode}return se(Le)?Le:null}e.getShadowRoot=G;function x(){let Le=document.activeElement;for(;Le==null?void 0:Le.shadowRoot;)Le=Le.shadowRoot.activeElement;return Le}e.getActiveElement=x;function U(Le=document.getElementsByTagName("head")[0]){let ye=document.createElement("style");return ye.type="text/css",ye.media="screen",Le.appendChild(ye),ye}e.createStyleSheet=U;let $=null;function V(){return $||($=U()),$}function Q(Le){var ye,Oe;return((ye=Le==null?void 0:Le.sheet)===null||ye===void 0?void 0:ye.rules)?Le.sheet.rules:((Oe=Le==null?void 0:Le.sheet)===null||Oe===void 0?void 0:Oe.cssRules)?Le.sheet.cssRules:[]}function ue(Le,ye,Oe=V()){!Oe||!ye||Oe.sheet.insertRule(Le+"{"+ye+"}",0)}e.createCSSRule=ue;function pe(Le,ye=V()){if(!ye)return;let Oe=Q(ye),He=[];for(let Be=0;Be<Oe.length;Be++)Oe[Be].selectorText.indexOf(Le)!==-1&&He.push(Be);for(let Be=He.length-1;Be>=0;Be--)ye.sheet.deleteRule(He[Be])}e.removeCSSRulesContainingSelector=pe;function fe(Le){return typeof HTMLElement=="object"?Le instanceof HTMLElement:Le&&typeof Le=="object"&&Le.nodeType===1&&typeof Le.nodeName=="string"}e.isHTMLElement=fe,e.EventType={CLICK:"click",AUXCLICK:"auxclick",DBLCLICK:"dblclick",MOUSE_UP:"mouseup",MOUSE_DOWN:"mousedown",MOUSE_OVER:"mouseover",MOUSE_MOVE:"mousemove",MOUSE_OUT:"mouseout",MOUSE_ENTER:"mouseenter",MOUSE_LEAVE:"mouseleave",MOUSE_WHEEL:"wheel",POINTER_UP:"pointerup",POINTER_DOWN:"pointerdown",POINTER_MOVE:"pointermove",CONTEXT_MENU:"contextmenu",WHEEL:"wheel",KEY_DOWN:"keydown",KEY_PRESS:"keypress",KEY_UP:"keyup",LOAD:"load",BEFORE_UNLOAD:"beforeunload",UNLOAD:"unload",ABORT:"abort",ERROR:"error",RESIZE:"resize",SCROLL:"scroll",FULLSCREEN_CHANGE:"fullscreenchange",WK_FULLSCREEN_CHANGE:"webkitfullscreenchange",SELECT:"select",CHANGE:"change",SUBMIT:"submit",RESET:"reset",FOCUS:"focus",FOCUS_IN:"focusin",FOCUS_OUT:"focusout",BLUR:"blur",INPUT:"input",STORAGE:"storage",DRAG_START:"dragstart",DRAG:"drag",DRAG_ENTER:"dragenter",DRAG_LEAVE:"dragleave",DRAG_OVER:"dragover",DROP:"drop",DRAG_END:"dragend",ANIMATION_START:w.isWebKit?"webkitAnimationStart":"animationstart",ANIMATION_END:w.isWebKit?"webkitAnimationEnd":"animationend",ANIMATION_ITERATION:w.isWebKit?"webkitAnimationIteration":"animationiteration"},e.EventHelper={stop:function(Le,ye){Le.preventDefault?Le.preventDefault():Le.returnValue=!1,ye&&(Le.stopPropagation?Le.stopPropagation():Le.cancelBubble=!0)}};function re(Le){let ye=[];for(let Oe=0;Le&&Le.nodeType===Le.ELEMENT_NODE;Oe++)ye[Oe]=Le.scrollTop,Le=Le.parentNode;return ye}e.saveParentsScrollTop=re;function ie(Le,ye){for(let Oe=0;Le&&Le.nodeType===Le.ELEMENT_NODE;Oe++)Le.scrollTop!==ye[Oe]&&(Le.scrollTop=ye[Oe]),Le=Le.parentNode}e.restoreParentsScrollTop=ie;class ae extends n.Disposable{constructor(ye){super();this._onDidFocus=this._register(new C.Emitter),this.onDidFocus=this._onDidFocus.event,this._onDidBlur=this._register(new C.Emitter),this.onDidBlur=this._onDidBlur.event;let Oe=Y(document.activeElement,ye),He=!1;const Be=()=>{He=!1,Oe||(Oe=!0,this._onDidFocus.fire())},Ke=()=>{Oe&&(He=!0,window.setTimeout(()=>{He&&(He=!1,Oe=!1,this._onDidBlur.fire())},0))};this._refreshStateHandler=()=>{Y(document.activeElement,ye)!==Oe&&(Oe?Ke():Be())},this._register(d(ye,e.EventType.FOCUS,Be,!0)),this._register(d(ye,e.EventType.BLUR,Ke,!0))}}function q(Le){return new ae(Le)}e.trackFocus=q;function ne(Le,...ye){if(Le.append(...ye),ye.length===1&&typeof ye[0]!="string")return ye[0]}e.append=ne;function ce(Le,ye){return Le.insertBefore(ye,Le.firstChild),ye}e.prepend=ce;function le(Le,...ye){Le.innerText="",ne(Le,...ye)}e.reset=le;const de=/([\w\-]+)?(#([\w\-]+))?((\.([\w\-]+))*)/;var z;(function(Le){Le.HTML="http://www.w3.org/1999/xhtml",Le.SVG="http://www.w3.org/2000/svg"})(z=e.Namespace||(e.Namespace={}));function te(Le,ye,Oe,...He){let Be=de.exec(ye);if(!Be)throw new Error("Bad use of emmet");Oe=Object.assign({},Oe||{});let Ke=Be[1]||"div",ke;return Le!==z.HTML?ke=document.createElementNS(Le,Ke):ke=document.createElement(Ke),Be[3]&&(ke.id=Be[3]),Be[4]&&(ke.className=Be[4].replace(/\./g," ").trim()),Object.keys(Oe).forEach(Ie=>{const Me=Oe[Ie];typeof Me!="undefined"&&(/^on\w+$/.test(Ie)?ke[Ie]=Me:Ie==="selected"?Me&&ke.setAttribute(Ie,"true"):ke.setAttribute(Ie,Me))}),ke.append(...He),ke}function he(Le,ye,...Oe){return te(z.HTML,Le,ye,...Oe)}e.$=he,he.SVG=function(Le,ye,...Oe){return te(z.SVG,Le,ye,...Oe)};function ge(...Le){for(let ye of Le)ye.style.display="",ye.removeAttribute("aria-hidden")}e.show=ge;function ve(...Le){for(let ye of Le)ye.style.display="none",ye.setAttribute("aria-hidden","true")}e.hide=ve;function Se(Le){return Array.prototype.slice.call(document.getElementsByTagName(Le),0)}e.getElementsByTagName=Se;function Ee(Le){const ye=window.devicePixelRatio*Le;return Math.max(1,Math.floor(ye))/window.devicePixelRatio}e.computeScreenAwareSize=Ee;function Ae(Le){window.open(Le,"_blank","noopener")}e.windowOpenNoOpener=Ae;function Ne(Le){const ye=()=>{Le(),Oe=(0,e.scheduleAtNextAnimationFrame)(ye)};let Oe=(0,e.scheduleAtNextAnimationFrame)(ye);return(0,n.toDisposable)(()=>Oe.dispose())}e.animate=Ne,g.RemoteAuthorities.setPreferredWebSchema(/^https:/.test(window.location.href)?"https":"http");function ze(Le){return Le?`url('${g.FileAccess.asBrowserUri(Le).toString(!0).replace(/'/g,"%27")}')`:"url('')"}e.asCSSUrl=ze;function xe(Le){return`'${Le.replace(/'/g,"%27")}'`}e.asCSSPropertyValue=xe;class We extends C.Emitter{constructor(){super();this._subscriptions=new n.DisposableStore,this._keyStatus={altKey:!1,shiftKey:!1,ctrlKey:!1,metaKey:!1},this._subscriptions.add(d(window,"keydown",ye=>{if(ye.defaultPrevented)return;const Oe=new T.StandardKeyboardEvent(ye);if(!(Oe.keyCode===6&&ye.repeat)){if(ye.altKey&&!this._keyStatus.altKey)this._keyStatus.lastKeyPressed="alt";else if(ye.ctrlKey&&!this._keyStatus.ctrlKey)this._keyStatus.lastKeyPressed="ctrl";else if(ye.metaKey&&!this._keyStatus.metaKey)this._keyStatus.lastKeyPressed="meta";else if(ye.shiftKey&&!this._keyStatus.shiftKey)this._keyStatus.lastKeyPressed="shift";else if(Oe.keyCode!==6)this._keyStatus.lastKeyPressed=void 0;else return;this._keyStatus.altKey=ye.altKey,this._keyStatus.ctrlKey=ye.ctrlKey,this._keyStatus.metaKey=ye.metaKey,this._keyStatus.shiftKey=ye.shiftKey,this._keyStatus.lastKeyPressed&&(this._keyStatus.event=ye,this.fire(this._keyStatus))}},!0)),this._subscriptions.add(d(window,"keyup",ye=>{ye.defaultPrevented||(!ye.altKey&&this._keyStatus.altKey?this._keyStatus.lastKeyReleased="alt":!ye.ctrlKey&&this._keyStatus.ctrlKey?this._keyStatus.lastKeyReleased="ctrl":!ye.metaKey&&this._keyStatus.metaKey?this._keyStatus.lastKeyReleased="meta":!ye.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=ye.altKey,this._keyStatus.ctrlKey=ye.ctrlKey,this._keyStatus.metaKey=ye.metaKey,this._keyStatus.shiftKey=ye.shiftKey,this._keyStatus.lastKeyReleased&&(this._keyStatus.event=ye,this.fire(this._keyStatus)))},!0)),this._subscriptions.add(d(document.body,"mousedown",()=>{this._keyStatus.lastKeyPressed=void 0},!0)),this._subscriptions.add(d(document.body,"mouseup",()=>{this._keyStatus.lastKeyPressed=void 0},!0)),this._subscriptions.add(d(document.body,"mousemove",ye=>{ye.buttons&&(this._keyStatus.lastKeyPressed=void 0)},!0)),this._subscriptions.add(d(window,"blur",()=>{this.resetKeyStatus()}))}get keyStatus(){return this._keyStatus}resetKeyStatus(){this.doResetKeyStatus(),this.fire(this._keyStatus)}doResetKeyStatus(){this._keyStatus={altKey:!1,shiftKey:!1,ctrlKey:!1,metaKey:!1}}static getInstance(){return We.instance||(We.instance=new We),We.instance}dispose(){super.dispose(),this._subscriptions.dispose()}}e.ModifierKeyEmitter=We;function Ue(Le,ye){const Oe=window.matchMedia(Le);typeof Oe.addEventListener=="function"?Oe.addEventListener("change",ye):Oe.addListener(ye)}e.addMatchMediaChangeListener=Ue}),define(J[165],ee([0,1,7]),function(j,e,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.createElement=e.renderFormattedText=e.renderText=void 0;function N(t,s={}){const c=D(s);return c.textContent=t,c}e.renderText=N;function T(t,s={}){const c=D(s);return p(c,C(t,!!s.renderCodeSegments),s.actionHandler,s.renderCodeSegments),c}e.renderFormattedText=T;function D(t){const s=t.inline?"span":"div",c=document.createElement(s);return t.className&&(c.className=t.className),c}e.createElement=D;class S{constructor(s){this.source=s,this.index=0}eos(){return this.index>=this.source.length}next(){const s=this.peek();return this.advance(),s}peek(){return this.source[this.index]}advance(){this.index++}}function p(t,s,c,u){let d;if(s.type===2)d=document.createTextNode(s.content||"");else if(s.type===3)d=document.createElement("b");else if(s.type===4)d=document.createElement("i");else if(s.type===7&&u)d=document.createElement("code");else if(s.type===5&&c){const a=document.createElement("a");a.href="#",c.disposables.add(w.addStandardDisposableListener(a,"click",r=>{c.callback(String(s.index),r)})),d=a}else s.type===8?d=document.createElement("br"):s.type===1&&(d=t);d&&t!==d&&t.appendChild(d),d&&Array.isArray(s.children)&&s.children.forEach(a=>{p(d,a,c,u)})}function C(t,s){const c={type:1,children:[]};let u=0,d=c;const a=[],r=new S(t);for(;!r.eos();){let o=r.next();const i=o==="\\"&&g(r.peek(),s)!==0;if(i&&(o=r.next()),!i&&n(o,s)&&o===r.peek()){r.advance(),d.type===2&&(d=a.pop());const l=g(o,s);if(d.type===l||d.type===5&&l===6)d=a.pop();else{const h={type:l,children:[]};l===5&&(h.index=u,u++),d.children.push(h),a.push(d),d=h}}else if(o===`
`)d.type===2&&(d=a.pop()),d.children.push({type:8});else if(d.type!==2){const l={type:2,content:o};d.children.push(l),a.push(d),d=l}else d.content+=o}return d.type===2&&(d=a.pop()),a.length,c}function n(t,s){return g(t,s)!==0}function g(t,s){switch(t){case"*":return 3;case"_":return 4;case"[":return 5;case"]":return 6;case"`":return s?7:0;default:return 0}}}),define(J[96],ee([0,1,7,204,56,2,17]),function(j,e,w,N,T,D,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.GlobalMouseMoveMonitor=e.standardMouseMoveMerger=void 0;function p(n,g){let t=new T.StandardMouseEvent(g);return t.preventDefault(),{leftButton:t.leftButton,buttons:t.buttons,posx:t.posx,posy:t.posy}}e.standardMouseMoveMerger=p;class C{constructor(){this._hooks=new D.DisposableStore,this._mouseMoveEventMerger=null,this._mouseMoveCallback=null,this._onStopCallback=null}dispose(){this.stopMonitoring(!1),this._hooks.dispose()}stopMonitoring(g,t){if(!this.isMonitoring())return;this._hooks.clear(),this._mouseMoveEventMerger=null,this._mouseMoveCallback=null;const s=this._onStopCallback;this._onStopCallback=null,g&&s&&s(t)}isMonitoring(){return!!this._mouseMoveEventMerger}startMonitoring(g,t,s,c,u){if(this.isMonitoring())return;this._mouseMoveEventMerger=s,this._mouseMoveCallback=c,this._onStopCallback=u;const d=N.IframeUtils.getSameOriginWindowChain(),a=S.isIOS?"pointermove":"mousemove",r="mouseup",o=d.map(l=>l.window.document),i=w.getShadowRoot(g);i&&o.unshift(i);for(const l of o)this._hooks.add(w.addDisposableThrottledListener(l,a,h=>{if(h.buttons!==t){this.stopMonitoring(!0);return}this._mouseMoveCallback(h)},(h,f)=>this._mouseMoveEventMerger(h,f))),this._hooks.add(w.addDisposableListener(l,r,h=>this.stopMonitoring(!0)));if(N.IframeUtils.hasDifferentOriginAncestor()){let l=d[d.length-1];this._hooks.add(w.addDisposableListener(l.window.document,"mouseout",h=>{new T.StandardMouseEvent(h).target.tagName.toLowerCase()==="html"&&this.stopMonitoring(!0)})),this._hooks.add(w.addDisposableListener(l.window.document,"mouseover",h=>{new T.StandardMouseEvent(h).target.tagName.toLowerCase()==="html"&&this.stopMonitoring(!0)})),this._hooks.add(w.addDisposableListener(l.window.document.body,"mouseleave",h=>{this.stopMonitoring(!0)}))}}}e.GlobalMouseMoveMonitor=C});var Fe=this&&this.__decorate||function(j,e,w,N){var T=arguments.length,D=T<3?e:N===null?N=Object.getOwnPropertyDescriptor(e,w):N,S;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")D=Reflect.decorate(j,e,w,N);else for(var p=j.length-1;p>=0;p--)(S=j[p])&&(D=(T<3?S(D):T>3?S(e,w,D):S(e,w))||D);return T>3&&D&&Object.defineProperty(e,w,D),D};define(J[58],ee([0,1,7,19,92,2]),function(j,e,w,N,T,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Gesture=e.EventType=void 0;var S;(function(C){C.Tap="-monaco-gesturetap",C.Change="-monaco-gesturechange",C.Start="-monaco-gesturestart",C.End="-monaco-gesturesend",C.Contextmenu="-monaco-gesturecontextmenu"})(S=e.EventType||(e.EventType={}));class p extends D.Disposable{constructor(){super();this.dispatched=!1,this.activeTouches={},this.handle=null,this.targets=[],this.ignoreTargets=[],this._lastSetTapCountTime=0,this._register(w.addDisposableListener(document,"touchstart",n=>this.onTouchStart(n),{passive:!1})),this._register(w.addDisposableListener(document,"touchend",n=>this.onTouchEnd(n))),this._register(w.addDisposableListener(document,"touchmove",n=>this.onTouchMove(n),{passive:!1}))}static addTarget(n){return p.isTouchDevice()?(p.INSTANCE||(p.INSTANCE=new p),p.INSTANCE.targets.push(n),{dispose:()=>{p.INSTANCE.targets=p.INSTANCE.targets.filter(g=>g!==n)}}):D.Disposable.None}static ignoreTarget(n){return p.isTouchDevice()?(p.INSTANCE||(p.INSTANCE=new p),p.INSTANCE.ignoreTargets.push(n),{dispose:()=>{p.INSTANCE.ignoreTargets=p.INSTANCE.ignoreTargets.filter(g=>g!==n)}}):D.Disposable.None}static isTouchDevice(){return"ontouchstart"in window||navigator.maxTouchPoints>0}dispose(){this.handle&&(this.handle.dispose(),this.handle=null),super.dispose()}onTouchStart(n){let g=Date.now();this.handle&&(this.handle.dispose(),this.handle=null);for(let t=0,s=n.targetTouches.length;t<s;t++){let c=n.targetTouches.item(t);this.activeTouches[c.identifier]={id:c.identifier,initialTarget:c.target,initialTimeStamp:g,initialPageX:c.pageX,initialPageY:c.pageY,rollingTimestamps:[g],rollingPageX:[c.pageX],rollingPageY:[c.pageY]};let u=this.newGestureEvent(S.Start,c.target);u.pageX=c.pageX,u.pageY=c.pageY,this.dispatchEvent(u)}this.dispatched&&(n.preventDefault(),n.stopPropagation(),this.dispatched=!1)}onTouchEnd(n){let g=Date.now(),t=Object.keys(this.activeTouches).length;for(let s=0,c=n.changedTouches.length;s<c;s++){let u=n.changedTouches.item(s);if(!this.activeTouches.hasOwnProperty(String(u.identifier))){console.warn("move of an UNKNOWN touch",u);continue}let d=this.activeTouches[u.identifier],a=Date.now()-d.initialTimeStamp;if(a<p.HOLD_DELAY&&Math.abs(d.initialPageX-N.tail(d.rollingPageX))<30&&Math.abs(d.initialPageY-N.tail(d.rollingPageY))<30){let r=this.newGestureEvent(S.Tap,d.initialTarget);r.pageX=N.tail(d.rollingPageX),r.pageY=N.tail(d.rollingPageY),this.dispatchEvent(r)}else if(a>=p.HOLD_DELAY&&Math.abs(d.initialPageX-N.tail(d.rollingPageX))<30&&Math.abs(d.initialPageY-N.tail(d.rollingPageY))<30){let r=this.newGestureEvent(S.Contextmenu,d.initialTarget);r.pageX=N.tail(d.rollingPageX),r.pageY=N.tail(d.rollingPageY),this.dispatchEvent(r)}else if(t===1){let r=N.tail(d.rollingPageX),o=N.tail(d.rollingPageY),i=N.tail(d.rollingTimestamps)-d.rollingTimestamps[0],l=r-d.rollingPageX[0],h=o-d.rollingPageY[0];const f=this.targets.filter(y=>d.initialTarget instanceof Node&&y.contains(d.initialTarget));this.inertia(f,g,Math.abs(l)/i,l>0?1:-1,r,Math.abs(h)/i,h>0?1:-1,o)}this.dispatchEvent(this.newGestureEvent(S.End,d.initialTarget)),delete this.activeTouches[u.identifier]}this.dispatched&&(n.preventDefault(),n.stopPropagation(),this.dispatched=!1)}newGestureEvent(n,g){let t=document.createEvent("CustomEvent");return t.initEvent(n,!1,!0),t.initialTarget=g,t.tapCount=0,t}dispatchEvent(n){if(n.type===S.Tap){const g=new Date().getTime();let t=0;g-this._lastSetTapCountTime>p.CLEAR_TAP_COUNT_TIME?t=1:t=2,this._lastSetTapCountTime=g,n.tapCount=t}else(n.type===S.Change||n.type===S.Contextmenu)&&(this._lastSetTapCountTime=0);for(let g=0;g<this.ignoreTargets.length;g++)if(n.initialTarget instanceof Node&&this.ignoreTargets[g].contains(n.initialTarget))return;this.targets.forEach(g=>{n.initialTarget instanceof Node&&g.contains(n.initialTarget)&&(g.dispatchEvent(n),this.dispatched=!0)})}inertia(n,g,t,s,c,u,d,a){this.handle=w.scheduleAtNextAnimationFrame(()=>{let r=Date.now(),o=r-g,i=0,l=0,h=!0;t+=p.SCROLL_FRICTION*o,u+=p.SCROLL_FRICTION*o,t>0&&(h=!1,i=s*t*o),u>0&&(h=!1,l=d*u*o);let f=this.newGestureEvent(S.Change);f.translationX=i,f.translationY=l,n.forEach(y=>y.dispatchEvent(f)),h||this.inertia(n,r,t,s,c+i,u,d,a+l)})}onTouchMove(n){let g=Date.now();for(let t=0,s=n.changedTouches.length;t<s;t++){let c=n.changedTouches.item(t);if(!this.activeTouches.hasOwnProperty(String(c.identifier))){console.warn("end of an UNKNOWN touch",c);continue}let u=this.activeTouches[c.identifier],d=this.newGestureEvent(S.Change,u.initialTarget);d.translationX=c.pageX-N.tail(u.rollingPageX),d.translationY=c.pageY-N.tail(u.rollingPageY),d.pageX=c.pageX,d.pageY=c.pageY,this.dispatchEvent(d),u.rollingPageX.length>3&&(u.rollingPageX.shift(),u.rollingPageY.shift(),u.rollingTimestamps.shift()),u.rollingPageX.push(c.pageX),u.rollingPageY.push(c.pageY),u.rollingTimestamps.push(g)}this.dispatched&&(n.preventDefault(),n.stopPropagation(),this.dispatched=!1)}}p.SCROLL_FRICTION=-.005,p.HOLD_DELAY=700,p.CLEAR_TAP_COUNT_TIME=400,Fe([T.memoize],p,"isTouchDevice",null),e.Gesture=p}),define(J[108],ee([0,1,7,27]),function(j,e,w,N){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.renderIcon=e.renderLabelWithIcons=void 0;const T=new RegExp(`(\\\\)?\\$\\((${N.CSSIcon.iconNameExpression}(?:${N.CSSIcon.iconModifierExpression})?)\\)`,"g");function D(p){const C=new Array;let n,g=0,t=0;for(;(n=T.exec(p))!==null;){t=n.index||0,C.push(p.substring(g,t)),g=(n.index||0)+n[0].length;const[,s,c]=n;C.push(s?`$(${c})`:S({id:c}))}return g<p.length&&C.push(p.substring(g)),C}e.renderLabelWithIcons=D;function S(p){const C=w.$("span");return C.classList.add(...N.CSSIcon.asClassNameArray(p)),C}e.renderIcon=S}),define(J[166],ee([0,1,7,108,38]),function(j,e,w,N,T){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.HighlightedLabel=void 0;class D{constructor(p,C){this.supportIcons=C,this.text="",this.title="",this.highlights=[],this.didEverRender=!1,this.domNode=document.createElement("span"),this.domNode.className="monaco-highlighted-label",p.appendChild(this.domNode)}get element(){return this.domNode}set(p,C=[],n="",g){p||(p=""),g&&(p=D.escapeNewLines(p,C)),!(this.didEverRender&&this.text===p&&this.title===n&&T.equals(this.highlights,C))&&(this.text=p,this.title=n,this.highlights=C,this.render())}render(){const p=[];let C=0;for(const n of this.highlights){if(n.end===n.start)continue;if(C<n.start){const s=this.text.substring(C,n.start);p.push(w.$("span",void 0,...this.supportIcons?(0,N.renderLabelWithIcons)(s):[s])),C=n.end}const g=this.text.substring(n.start,n.end),t=w.$("span.highlight",void 0,...this.supportIcons?(0,N.renderLabelWithIcons)(g):[g]);n.extraClasses&&t.classList.add(n.extraClasses),p.push(t),C=n.end}if(C<this.text.length){const n=this.text.substring(C);p.push(w.$("span",void 0,...this.supportIcons?(0,N.renderLabelWithIcons)(n):[n]))}w.reset(this.domNode,...p),this.title?this.domNode.title=this.title:this.domNode.removeAttribute("title"),this.didEverRender=!0}static escapeNewLines(p,C){let n=0,g=0;return p.replace(/\r\n|\r|\n/g,(t,s)=>{g=t===`\r
`?-1:0,s+=n;for(const c of C)c.end<=s||(c.start>=s&&(c.start+=g),c.end>=s&&(c.end+=g));return n+=g,"\u23CE"})}}e.HighlightedLabel=D}),define(J[307],ee([0,1,7]),function(j,e,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.RowCache=void 0;function N(D){try{D.parentElement&&D.parentElement.removeChild(D)}catch(S){}}class T{constructor(S){this.renderers=S,this.cache=new Map}alloc(S){let p=this.getTemplateCache(S).pop();if(!p){const C=(0,w.$)(".monaco-list-row"),g=this.getRenderer(S).renderTemplate(C);p={domNode:C,templateId:S,templateData:g}}return p}release(S){!S||this.releaseRow(S)}releaseRow(S){const{domNode:p,templateId:C}=S;p&&(p.classList.remove("scrolling"),N(p)),this.getTemplateCache(C).push(S)}getTemplateCache(S){let p=this.cache.get(S);return p||(p=[],this.cache.set(S,p)),p}dispose(){this.cache.forEach((S,p)=>{for(const C of S)this.getRenderer(p).disposeTemplate(C.templateData),C.templateData=null}),this.cache.clear()}getRenderer(S){const p=this.renderers.get(S);if(!p)throw new Error(`No renderer found for ${S}`);return p}}e.RowCache=T}),define(J[53],ee([0,1,7,52,56,58,2]),function(j,e,w,N,T,D,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Widget=void 0;class p extends S.Disposable{onclick(n,g){this._register(w.addDisposableListener(n,w.EventType.CLICK,t=>g(new T.StandardMouseEvent(t))))}onmousedown(n,g){this._register(w.addDisposableListener(n,w.EventType.MOUSE_DOWN,t=>g(new T.StandardMouseEvent(t))))}onmouseover(n,g){this._register(w.addDisposableListener(n,w.EventType.MOUSE_OVER,t=>g(new T.StandardMouseEvent(t))))}onnonbubblingmouseout(n,g){this._register(w.addDisposableNonBubblingMouseOutListener(n,t=>g(new T.StandardMouseEvent(t))))}onkeydown(n,g){this._register(w.addDisposableListener(n,w.EventType.KEY_DOWN,t=>g(new N.StandardKeyboardEvent(t))))}onkeyup(n,g){this._register(w.addDisposableListener(n,w.EventType.KEY_UP,t=>g(new N.StandardKeyboardEvent(t))))}oninput(n,g){this._register(w.addDisposableListener(n,w.EventType.INPUT,g))}onblur(n,g){this._register(w.addDisposableListener(n,w.EventType.BLUR,g))}onfocus(n,g){this._register(w.addDisposableListener(n,w.EventType.FOCUS,g))}ignoreGesture(n){D.Gesture.ignoreTarget(n)}}e.Widget=p}),define(J[167],ee([0,1,96,53,14]),function(j,e,w,N,T){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ScrollbarArrow=e.ARROW_IMG_SIZE=void 0,e.ARROW_IMG_SIZE=11;class D extends N.Widget{constructor(p){super();this._onActivate=p.onActivate,this.bgDomNode=document.createElement("div"),this.bgDomNode.className="arrow-background",this.bgDomNode.style.position="absolute",this.bgDomNode.style.width=p.bgWidth+"px",this.bgDomNode.style.height=p.bgHeight+"px",typeof p.top!="undefined"&&(this.bgDomNode.style.top="0px"),typeof p.left!="undefined"&&(this.bgDomNode.style.left="0px"),typeof p.bottom!="undefined"&&(this.bgDomNode.style.bottom="0px"),typeof p.right!="undefined"&&(this.bgDomNode.style.right="0px"),this.domNode=document.createElement("div"),this.domNode.className=p.className,this.domNode.classList.add(...p.icon.classNamesArray),this.domNode.style.position="absolute",this.domNode.style.width=e.ARROW_IMG_SIZE+"px",this.domNode.style.height=e.ARROW_IMG_SIZE+"px",typeof p.top!="undefined"&&(this.domNode.style.top=p.top+"px"),typeof p.left!="undefined"&&(this.domNode.style.left=p.left+"px"),typeof p.bottom!="undefined"&&(this.domNode.style.bottom=p.bottom+"px"),typeof p.right!="undefined"&&(this.domNode.style.right=p.right+"px"),this._mouseMoveMonitor=this._register(new w.GlobalMouseMoveMonitor),this.onmousedown(this.bgDomNode,C=>this._arrowMouseDown(C)),this.onmousedown(this.domNode,C=>this._arrowMouseDown(C)),this._mousedownRepeatTimer=this._register(new T.IntervalTimer),this._mousedownScheduleRepeatTimer=this._register(new T.TimeoutTimer)}_arrowMouseDown(p){const C=()=>{this._mousedownRepeatTimer.cancelAndSet(()=>this._onActivate(),1e3/24)};this._onActivate(),this._mousedownRepeatTimer.cancel(),this._mousedownScheduleRepeatTimer.cancelAndSet(C,200),this._mouseMoveMonitor.startMonitoring(p.target,p.buttons,w.standardMouseMoveMerger,n=>{},()=>{this._mousedownRepeatTimer.cancel(),this._mousedownScheduleRepeatTimer.cancel()}),p.preventDefault()}}e.ScrollbarArrow=D}),define(J[211],ee([0,1,7,30,96,167,302,53,17]),function(j,e,w,N,T,D,S,p,C){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AbstractScrollbar=void 0;const n=140;class g extends p.Widget{constructor(s){super();this._lazyRender=s.lazyRender,this._host=s.host,this._scrollable=s.scrollable,this._scrollByPage=s.scrollByPage,this._scrollbarState=s.scrollbarState,this._visibilityController=this._register(new S.ScrollbarVisibilityController(s.visibility,"visible scrollbar "+s.extraScrollbarClassName,"invisible scrollbar "+s.extraScrollbarClassName)),this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded()),this._mouseMoveMonitor=this._register(new T.GlobalMouseMoveMonitor),this._shouldRender=!0,this.domNode=(0,N.createFastDomNode)(document.createElement("div")),this.domNode.setAttribute("role","presentation"),this.domNode.setAttribute("aria-hidden","true"),this._visibilityController.setDomNode(this.domNode),this.domNode.setPosition("absolute"),this.onmousedown(this.domNode.domNode,c=>this._domNodeMouseDown(c))}_createArrow(s){const c=this._register(new D.ScrollbarArrow(s));this.domNode.domNode.appendChild(c.bgDomNode),this.domNode.domNode.appendChild(c.domNode)}_createSlider(s,c,u,d){this.slider=(0,N.createFastDomNode)(document.createElement("div")),this.slider.setClassName("slider"),this.slider.setPosition("absolute"),this.slider.setTop(s),this.slider.setLeft(c),typeof u=="number"&&this.slider.setWidth(u),typeof d=="number"&&this.slider.setHeight(d),this.slider.setLayerHinting(!0),this.slider.setContain("strict"),this.domNode.domNode.appendChild(this.slider.domNode),this.onmousedown(this.slider.domNode,a=>{a.leftButton&&(a.preventDefault(),this._sliderMouseDown(a,()=>{}))}),this.onclick(this.slider.domNode,a=>{a.leftButton&&a.stopPropagation()})}_onElementSize(s){return this._scrollbarState.setVisibleSize(s)&&(this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded()),this._shouldRender=!0,this._lazyRender||this.render()),this._shouldRender}_onElementScrollSize(s){return this._scrollbarState.setScrollSize(s)&&(this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded()),this._shouldRender=!0,this._lazyRender||this.render()),this._shouldRender}_onElementScrollPosition(s){return this._scrollbarState.setScrollPosition(s)&&(this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded()),this._shouldRender=!0,this._lazyRender||this.render()),this._shouldRender}beginReveal(){this._visibilityController.setShouldBeVisible(!0)}beginHide(){this._visibilityController.setShouldBeVisible(!1)}render(){!this._shouldRender||(this._shouldRender=!1,this._renderDomNode(this._scrollbarState.getRectangleLargeSize(),this._scrollbarState.getRectangleSmallSize()),this._updateSlider(this._scrollbarState.getSliderSize(),this._scrollbarState.getArrowSize()+this._scrollbarState.getSliderPosition()))}_domNodeMouseDown(s){s.target===this.domNode.domNode&&this._onMouseDown(s)}delegateMouseDown(s){const c=this.domNode.domNode.getClientRects()[0].top,u=c+this._scrollbarState.getSliderPosition(),d=c+this._scrollbarState.getSliderPosition()+this._scrollbarState.getSliderSize(),a=this._sliderMousePosition(s);u<=a&&a<=d?s.leftButton&&(s.preventDefault(),this._sliderMouseDown(s,()=>{})):this._onMouseDown(s)}_onMouseDown(s){let c,u;if(s.target===this.domNode.domNode&&typeof s.browserEvent.offsetX=="number"&&typeof s.browserEvent.offsetY=="number")c=s.browserEvent.offsetX,u=s.browserEvent.offsetY;else{const a=w.getDomNodePagePosition(this.domNode.domNode);c=s.posx-a.left,u=s.posy-a.top}const d=this._mouseDownRelativePosition(c,u);this._setDesiredScrollPositionNow(this._scrollByPage?this._scrollbarState.getDesiredScrollPositionFromOffsetPaged(d):this._scrollbarState.getDesiredScrollPositionFromOffset(d)),s.leftButton&&(s.preventDefault(),this._sliderMouseDown(s,()=>{}))}_sliderMouseDown(s,c){const u=this._sliderMousePosition(s),d=this._sliderOrthogonalMousePosition(s),a=this._scrollbarState.clone();this.slider.toggleClassName("active",!0),this._mouseMoveMonitor.startMonitoring(s.target,s.buttons,T.standardMouseMoveMerger,r=>{const o=this._sliderOrthogonalMousePosition(r),i=Math.abs(o-d);if(C.isWindows&&i>n){this._setDesiredScrollPositionNow(a.getScrollPosition());return}const h=this._sliderMousePosition(r)-u;this._setDesiredScrollPositionNow(a.getDesiredScrollPositionFromDelta(h))},()=>{this.slider.toggleClassName("active",!1),this._host.onDragEnd(),c()}),this._host.onDragStart()}_setDesiredScrollPositionNow(s){const c={};this.writeScrollPosition(c,s),this._scrollable.setScrollPositionNow(c)}updateScrollbarSize(s){this._updateScrollbarSize(s),this._scrollbarState.setScrollbarSize(s),this._shouldRender=!0,this._lazyRender||this.render()}isNeeded(){return this._scrollbarState.isNeeded()}}e.AbstractScrollbar=g}),define(J[308],ee([0,1,56,211,167,205,27]),function(j,e,w,N,T,D,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.HorizontalScrollbar=void 0;const p=(0,S.registerCodicon)("scrollbar-button-left",S.Codicon.triangleLeft),C=(0,S.registerCodicon)("scrollbar-button-right",S.Codicon.triangleRight);class n extends N.AbstractScrollbar{constructor(t,s,c){const u=t.getScrollDimensions(),d=t.getCurrentScrollPosition();super({lazyRender:s.lazyRender,host:c,scrollbarState:new D.ScrollbarState(s.horizontalHasArrows?s.arrowSize:0,s.horizontal===2?0:s.horizontalScrollbarSize,s.vertical===2?0:s.verticalScrollbarSize,u.width,u.scrollWidth,d.scrollLeft),visibility:s.horizontal,extraScrollbarClassName:"horizontal",scrollable:t,scrollByPage:s.scrollByPage});if(s.horizontalHasArrows){const a=(s.arrowSize-T.ARROW_IMG_SIZE)/2,r=(s.horizontalScrollbarSize-T.ARROW_IMG_SIZE)/2;this._createArrow({className:"scra",icon:p,top:r,left:a,bottom:void 0,right:void 0,bgWidth:s.arrowSize,bgHeight:s.horizontalScrollbarSize,onActivate:()=>this._host.onMouseWheel(new w.StandardWheelEvent(null,1,0))}),this._createArrow({className:"scra",icon:C,top:r,left:void 0,bottom:void 0,right:a,bgWidth:s.arrowSize,bgHeight:s.horizontalScrollbarSize,onActivate:()=>this._host.onMouseWheel(new w.StandardWheelEvent(null,-1,0))})}this._createSlider(Math.floor((s.horizontalScrollbarSize-s.horizontalSliderSize)/2),0,void 0,s.horizontalSliderSize)}_updateSlider(t,s){this.slider.setWidth(t),this.slider.setLeft(s)}_renderDomNode(t,s){this.domNode.setWidth(t),this.domNode.setHeight(s),this.domNode.setLeft(0),this.domNode.setBottom(0)}onDidScroll(t){return this._shouldRender=this._onElementScrollSize(t.scrollWidth)||this._shouldRender,this._shouldRender=this._onElementScrollPosition(t.scrollLeft)||this._shouldRender,this._shouldRender=this._onElementSize(t.width)||this._shouldRender,this._shouldRender}_mouseDownRelativePosition(t,s){return t}_sliderMousePosition(t){return t.posx}_sliderOrthogonalMousePosition(t){return t.posy}_updateScrollbarSize(t){this.slider.setHeight(t)}writeScrollPosition(t,s){t.scrollLeft=s}updateOptions(t){this.updateScrollbarSize(t.horizontal===2?0:t.horizontalScrollbarSize),this._scrollbarState.setOppositeScrollbarSize(t.vertical===2?0:t.verticalScrollbarSize),this._visibilityController.setVisibility(t.horizontal),this._scrollByPage=t.scrollByPage}}e.HorizontalScrollbar=n}),define(J[309],ee([0,1,56,211,167,205,27]),function(j,e,w,N,T,D,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.VerticalScrollbar=void 0;const p=(0,S.registerCodicon)("scrollbar-button-up",S.Codicon.triangleUp),C=(0,S.registerCodicon)("scrollbar-button-down",S.Codicon.triangleDown);class n extends N.AbstractScrollbar{constructor(t,s,c){const u=t.getScrollDimensions(),d=t.getCurrentScrollPosition();super({lazyRender:s.lazyRender,host:c,scrollbarState:new D.ScrollbarState(s.verticalHasArrows?s.arrowSize:0,s.vertical===2?0:s.verticalScrollbarSize,0,u.height,u.scrollHeight,d.scrollTop),visibility:s.vertical,extraScrollbarClassName:"vertical",scrollable:t,scrollByPage:s.scrollByPage});if(s.verticalHasArrows){const a=(s.arrowSize-T.ARROW_IMG_SIZE)/2,r=(s.verticalScrollbarSize-T.ARROW_IMG_SIZE)/2;this._createArrow({className:"scra",icon:p,top:a,left:r,bottom:void 0,right:void 0,bgWidth:s.verticalScrollbarSize,bgHeight:s.arrowSize,onActivate:()=>this._host.onMouseWheel(new w.StandardWheelEvent(null,0,1))}),this._createArrow({className:"scra",icon:C,top:void 0,left:r,bottom:a,right:void 0,bgWidth:s.verticalScrollbarSize,bgHeight:s.arrowSize,onActivate:()=>this._host.onMouseWheel(new w.StandardWheelEvent(null,0,-1))})}this._createSlider(0,Math.floor((s.verticalScrollbarSize-s.verticalSliderSize)/2),s.verticalSliderSize,void 0)}_updateSlider(t,s){this.slider.setHeight(t),this.slider.setTop(s)}_renderDomNode(t,s){this.domNode.setWidth(s),this.domNode.setHeight(t),this.domNode.setRight(0),this.domNode.setTop(0)}onDidScroll(t){return this._shouldRender=this._onElementScrollSize(t.scrollHeight)||this._shouldRender,this._shouldRender=this._onElementScrollPosition(t.scrollTop)||this._shouldRender,this._shouldRender=this._onElementSize(t.height)||this._shouldRender,this._shouldRender}_mouseDownRelativePosition(t,s){return s}_sliderMousePosition(t){return t.posy}_sliderOrthogonalMousePosition(t){return t.posx}_updateScrollbarSize(t){this.slider.setWidth(t)}writeScrollPosition(t,s){t.scrollTop=s}updateOptions(t){this.updateScrollbarSize(t.vertical===2?0:t.verticalScrollbarSize),this._scrollbarState.setOppositeScrollbarSize(0),this._visibilityController.setVisibility(t.vertical),this._scrollByPage=t.scrollByPage}}e.VerticalScrollbar=n}),define(J[44],ee([0,1,162,48,75,8,24]),function(j,e,w,N,T,D,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DataUri=e.resolvePath=e.normalizePath=e.joinPath=e.dirname=e.basename=e.basenameOrAuthority=e.isEqual=e.extUri=e.ExtUri=e.originalFSPath=void 0;function p(g){return(0,S.uriToFsPath)(g,!0)}e.originalFSPath=p;class C{constructor(t){this._ignorePathCasing=t}compare(t,s,c=!1){return t===s?0:(0,D.compare)(this.getComparisonKey(t,c),this.getComparisonKey(s,c))}isEqual(t,s,c=!1){return t===s?!0:!t||!s?!1:this.getComparisonKey(t,c)===this.getComparisonKey(s,c)}getComparisonKey(t,s=!1){return t.with({path:this._ignorePathCasing(t)?t.path.toLowerCase():void 0,fragment:s?null:void 0}).toString()}joinPath(t,...s){return S.URI.joinPath(t,...s)}basenameOrAuthority(t){return(0,e.basename)(t)||t.authority}basename(t){return T.posix.basename(t.path)}dirname(t){if(t.path.length===0)return t;let s;return t.scheme===N.Schemas.file?s=S.URI.file(T.dirname(p(t))).path:(s=T.posix.dirname(t.path),t.authority&&s.length&&s.charCodeAt(0)!==47&&(console.error(`dirname("${t.toString})) resulted in a relative path`),s="/")),t.with({path:s})}normalizePath(t){if(!t.path.length)return t;let s;return t.scheme===N.Schemas.file?s=S.URI.file(T.normalize(p(t))).path:s=T.posix.normalize(t.path),t.with({path:s})}resolvePath(t,s){if(t.scheme===N.Schemas.file){const c=S.URI.file(T.resolve(p(t),s));return t.with({authority:c.authority,path:c.path})}return s=w.toPosixPath(s),t.with({path:T.posix.resolve(t.path,s)})}}e.ExtUri=C,e.extUri=new C(()=>!1),e.isEqual=e.extUri.isEqual.bind(e.extUri),e.basenameOrAuthority=e.extUri.basenameOrAuthority.bind(e.extUri),e.basename=e.extUri.basename.bind(e.extUri),e.dirname=e.extUri.dirname.bind(e.extUri),e.joinPath=e.extUri.joinPath.bind(e.extUri),e.normalizePath=e.extUri.normalizePath.bind(e.extUri),e.resolvePath=e.extUri.resolvePath.bind(e.extUri);var n;(function(g){g.META_DATA_LABEL="label",g.META_DATA_DESCRIPTION="description",g.META_DATA_SIZE="size",g.META_DATA_MIME="mime";function t(s){const c=new Map;s.path.substring(s.path.indexOf(";")+1,s.path.lastIndexOf(";")).split(";").forEach(a=>{const[r,o]=a.split(":");r&&o&&c.set(r,o)});const d=s.path.substring(0,s.path.indexOf(";"));return d&&c.set(g.META_DATA_MIME,d),c}g.parseMetaData=t})(n=e.DataUri||(e.DataUri={}))}),define(J[310],ee([0,1,7,717,94,165,56,108,14,23,11,4,69,107,131,2,718,210,48,38,44,8,24]),function(j,e,w,N,T,D,S,p,C,n,g,t,s,c,u,d,a,r,o,i,l,h,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.renderMarkdown=void 0;function y(v,m={},E={}){var I;const k=new d.DisposableStore;let M=!1;const P=k.add(new n.CancellationTokenSource),F=(0,D.createElement)(m),R=function(H){let Y;try{Y=(0,r.parse)(decodeURIComponent(H))}catch(X){}return Y?(Y=(0,i.cloneAndChange)(Y,X=>{if(v.uris&&v.uris[X])return f.URI.revive(v.uris[X])}),encodeURIComponent(JSON.stringify(Y))):H},A=function(H,Y){const X=v.uris&&v.uris[H];if(!X)return H;let Z=f.URI.revive(X);return Y?H.startsWith(o.Schemas.data+":")?H:o.FileAccess.asBrowserUri(Z).toString(!0):f.URI.parse(H).toString()===Z.toString()?H:(Z.query&&(Z=Z.with({query:R(Z.query)})),Z.toString())};let O;const L=new Promise(H=>O=H),B=new a.Renderer;if(B.image=(H,Y,X)=>{let Z=[],se=[];if(H){({href:H,dimensions:Z}=(0,s.parseHrefAndDimensions)(H)),H=A(H,!0);try{const oe=f.URI.parse(H);m.baseUrl&&oe.scheme===o.Schemas.file&&(H=(0,l.resolvePath)(m.baseUrl,H).toString())}catch(oe){}se.push(`src="${H}"`)}return X&&se.push(`alt="${X}"`),Y&&se.push(`title="${Y}"`),Z.length&&(se=se.concat(Z)),"<img "+se.join(" ")+">"},B.link=(H,Y,X)=>(H===X&&(X=(0,s.removeMarkdownEscapes)(X)),H=A(H,!1),m.baseUrl&&(/^\w[\w\d+.-]*:/.test(H)||(H=(0,l.resolvePath)(m.baseUrl,H).toString())),Y=(0,s.removeMarkdownEscapes)(Y),H=(0,s.removeMarkdownEscapes)(H),!H||H.match(/^data:|javascript:/i)||H.match(/^command:/i)&&!v.isTrusted||H.match(/^command:(\/\/\/)?_workbench\.downloadResource/i)?X:(H=H.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#39;"),`<a href="#" data-href="${H}" title="${Y||H}">${X}</a>`)),B.paragraph=H=>`<p>${H}</p>`,m.codeBlockRenderer&&(B.code=(H,Y)=>{const X=m.codeBlockRenderer(Y,H),Z=u.defaultGenerator.nextId();return(0,C.raceCancellation)(Promise.all([X,L]),P.token).then(se=>{var oe;if(!M&&se){const G=F.querySelector(`div[data-code="${Z}"]`);G&&w.reset(G,se[0]),(oe=m.asyncRenderCallback)===null||oe===void 0||oe.call(m)}}).catch(()=>{}),`<div class="code" data-code="${Z}">${(0,h.escape)(H)}</div>`}),m.actionHandler){const H=m.actionHandler.disposables.add(new T.DomEmitter(F,"click")),Y=m.actionHandler.disposables.add(new T.DomEmitter(F,"auxclick"));m.actionHandler.disposables.add(t.Event.any(H.event,Y.event)(X=>{const Z=new S.StandardMouseEvent(X);if(!Z.leftButton&&!Z.middleButton)return;let se=Z.target;if(!(se.tagName!=="A"&&(se=se.parentElement,!se||se.tagName!=="A")))try{const oe=se.dataset.href;oe&&m.actionHandler.callback(oe,Z)}catch(oe){(0,g.onUnexpectedError)(oe)}finally{Z.preventDefault()}}))}v.supportHtml||(E.sanitizer=H=>(v.isTrusted?H.match(/^(<span[^>]+>)|(<\/\s*span>)$/):void 0)?H:"",E.sanitize=!0,E.silent=!0),E.renderer=B;let W=(I=v.value)!==null&&I!==void 0?I:"";W.length>1e5&&(W=`${W.substr(0,1e5)}\u2026`),v.supportThemeIcons&&(W=(0,c.markdownEscapeEscapedIcons)(W));let K=a.parse(W,E);if(v.supportThemeIcons&&(K=(0,p.renderLabelWithIcons)(K).map(Y=>typeof Y=="string"?Y:Y.outerHTML).join("")),F.innerHTML=_(v,K),O(),m.asyncRenderCallback)for(const H of F.getElementsByTagName("img")){const Y=k.add(w.addDisposableListener(H,"load",()=>{Y.dispose(),m.asyncRenderCallback()}))}return{element:F,dispose:()=>{M=!0,P.cancel(),k.dispose()}}}e.renderMarkdown=y;function _(v,m){const{config:E,allowedSchemes:I}=b(v);N.addHook("uponSanitizeAttribute",(M,P)=>{if(P.attrName==="style"||P.attrName==="class"){if(M.tagName==="SPAN"){if(P.attrName==="style"){P.keepAttr=/^(color\:#[0-9a-fA-F]+;)?(background-color\:#[0-9a-fA-F]+;)?$/.test(P.attrValue);return}else if(P.attrName==="class"){P.keepAttr=/^codicon codicon-[a-z\-]+( codicon-modifier-[a-z\-]+)?$/.test(P.attrValue);return}}P.keepAttr=!1;return}});const k=document.createElement("a");N.addHook("afterSanitizeAttributes",M=>{for(const P of["href","src"])M.hasAttribute(P)&&(k.href=M.getAttribute(P),I.includes(k.protocol.replace(/:$/,""))||M.removeAttribute(P))});try{return N.sanitize(m,Object.assign(Object.assign({},E),{RETURN_TRUSTED_TYPE:!0}))}finally{N.removeHook("uponSanitizeAttribute"),N.removeHook("afterSanitizeAttributes")}}function b(v){const m=[o.Schemas.http,o.Schemas.https,o.Schemas.mailto,o.Schemas.data,o.Schemas.file,o.Schemas.vscodeFileResource,o.Schemas.vscodeRemote,o.Schemas.vscodeRemoteResource];return v.isTrusted&&m.push(o.Schemas.command),{config:{ALLOWED_TAGS:["ul","li","p","b","i","code","blockquote","ol","h1","h2","h3","h4","h5","h6","hr","em","pre","table","thead","tbody","tr","th","td","div","del","a","strong","br","img","span"],ALLOWED_ATTR:["href","data-href","target","title","src","alt","class","style","data-code","width","height","align"],ALLOW_UNKNOWN_PROTOCOLS:!0},allowedSchemes:m}}}),define(J[168],ee([0,1,162,48,17,44,24]),function(j,e,w,N,T,D,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.normalizeDriveLetter=e.getBaseLabel=void 0;function p(n){if(!n)return;typeof n=="string"&&(n=S.URI.file(n));const g=(0,D.basename)(n)||(n.scheme===N.Schemas.file?n.fsPath:n.path);return T.isWindows&&(0,w.isRootOrDriveLetter)(g)?C(g):g}e.getBaseLabel=p;function C(n){return(0,w.hasDriveLetter)(n)?n.charAt(0).toUpperCase()+n.slice(1):n}e.normalizeDriveLetter=C}),define(J[109],ee([0,1,209,48,75,44,8]),function(j,e,w,N,T,D,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.guessMimeTypes=e.clearTextMimes=e.registerTextMime=e.Mimes=void 0;var p;(function(r){r.text="text/plain",r.binary="application/octet-stream",r.unknown="application/unknown",r.markdown="text/markdown",r.latex="text/latex"})(p=e.Mimes||(e.Mimes={}));let C=[],n=[],g=[];function t(r,o=!1){const i=s(r);C.push(i),i.userConfigured?g.push(i):n.push(i),o&&!i.userConfigured&&C.forEach(l=>{l.mime===i.mime||l.userConfigured||(i.extension&&l.extension===i.extension&&console.warn(`Overwriting extension <<${i.extension}>> to now point to mime <<${i.mime}>>`),i.filename&&l.filename===i.filename&&console.warn(`Overwriting filename <<${i.filename}>> to now point to mime <<${i.mime}>>`),i.filepattern&&l.filepattern===i.filepattern&&console.warn(`Overwriting filepattern <<${i.filepattern}>> to now point to mime <<${i.mime}>>`),i.firstline&&l.firstline===i.firstline&&console.warn(`Overwriting firstline <<${i.firstline}>> to now point to mime <<${i.mime}>>`))})}e.registerTextMime=t;function s(r){return{id:r.id,mime:r.mime,filename:r.filename,extension:r.extension,filepattern:r.filepattern,firstline:r.firstline,userConfigured:r.userConfigured,filenameLowercase:r.filename?r.filename.toLowerCase():void 0,extensionLowercase:r.extension?r.extension.toLowerCase():void 0,filepatternLowercase:r.filepattern?(0,w.parse)(r.filepattern.toLowerCase()):void 0,filepatternOnPath:r.filepattern?r.filepattern.indexOf(T.posix.sep)>=0:!1}}function c(r){r?(C=C.filter(o=>!o.userConfigured),g=[]):(C=[],n=[],g=[])}e.clearTextMimes=c;function u(r,o){let i;if(r)switch(r.scheme){case N.Schemas.file:i=r.fsPath;break;case N.Schemas.data:i=D.DataUri.parseMetaData(r).get(D.DataUri.META_DATA_LABEL);break;default:i=r.path}if(!i)return[p.unknown];i=i.toLowerCase();const l=(0,T.basename)(i),h=d(i,l,g);if(h)return[h,p.text];const f=d(i,l,n);if(f)return[f,p.text];if(o){const y=a(o);if(y)return[y,p.text]}return[p.unknown]}e.guessMimeTypes=u;function d(r,o,i){var l;let h=null,f=null,y=null;for(let _=i.length-1;_>=0;_--){const b=i[_];if(o===b.filenameLowercase){h=b;break}if(b.filepattern&&(!f||b.filepattern.length>f.filepattern.length)){const v=b.filepatternOnPath?r:o;((l=b.filepatternLowercase)===null||l===void 0?void 0:l.call(b,v))&&(f=b)}b.extension&&(!y||b.extension.length>y.extension.length)&&o.endsWith(b.extensionLowercase)&&(y=b)}return h?h.mime:f?f.mime:y?y.mime:null}function a(r){if((0,S.startsWithUTF8BOM)(r)&&(r=r.substr(1)),r.length>0)for(let o=C.length-1;o>=0;o--){const i=C[o];if(!i.firstline)continue;const l=r.match(i.firstline);if(l&&l.length>0)return i.mime}return null}}),define(J[169],ee([0,1,109]),function(j,e,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.StaticDND=e.DragAndDropData=e.DataTransfers=void 0,e.DataTransfers={RESOURCES:"ResourceURLs",DOWNLOAD_URL:"DownloadURL",FILES:"Files",TEXT:w.Mimes.text,TERMINALS:"Terminals"};class N{constructor(D){this.data=D}update(){}getData(){return this.data}}e.DragAndDropData=N,e.StaticDND={CurrentDragAndDropData:void 0}}),define(J[311],ee([0,1]),function(j,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.generateUuid=void 0;const w=new Uint8Array(16),N=[];for(let S=0;S<256;S++)N.push(S.toString(16).padStart(2,"0"));let T;typeof crypto=="object"&&typeof crypto.getRandomValues=="function"?T=crypto.getRandomValues.bind(crypto):T=function(S){for(let p=0;p<S.length;p++)S[p]=Math.floor(Math.random()*256);return S};function D(){T(w),w[6]=w[6]&15|64,w[8]=w[8]&63|128;let S=0,p="";return p+=N[w[S++]],p+=N[w[S++]],p+=N[w[S++]],p+=N[w[S++]],p+="-",p+=N[w[S++]],p+=N[w[S++]],p+="-",p+=N[w[S++]],p+=N[w[S++]],p+="-",p+=N[w[S++]],p+=N[w[S++]],p+="-",p+=N[w[S++]],p+=N[w[S++]],p+=N[w[S++]],p+=N[w[S++]],p+=N[w[S++]],p+=N[w[S++]],p}e.generateUuid=D}),define(J[212],ee([0,1,11,4,2,17,20,8]),function(j,e,w,N,T,D,S,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.create=e.SimpleWorkerServer=e.SimpleWorkerClient=e.logOnceWebWorkerWarning=void 0;const C="$initialize";let n=!1;function g(y){!D.isWeb||(n||(n=!0,console.warn("Could not create web worker(s). Falling back to loading web worker code in main thread, which might cause UI freezes. Please see https://github.com/microsoft/monaco-editor#faq")),console.warn(y.message))}e.logOnceWebWorkerWarning=g;class t{constructor(_,b,v,m){this.vsWorker=_,this.req=b,this.method=v,this.args=m,this.type=0}}class s{constructor(_,b,v,m){this.vsWorker=_,this.seq=b,this.res=v,this.err=m,this.type=1}}class c{constructor(_,b,v,m){this.vsWorker=_,this.req=b,this.eventName=v,this.arg=m,this.type=2}}class u{constructor(_,b,v){this.vsWorker=_,this.req=b,this.event=v,this.type=3}}class d{constructor(_,b){this.vsWorker=_,this.req=b,this.type=4}}class a{constructor(_){this._workerId=-1,this._handler=_,this._lastSentReq=0,this._pendingReplies=Object.create(null),this._pendingEmitters=new Map,this._pendingEvents=new Map}setWorkerId(_){this._workerId=_}sendMessage(_,b){const v=String(++this._lastSentReq);return new Promise((m,E)=>{this._pendingReplies[v]={resolve:m,reject:E},this._send(new t(this._workerId,v,_,b))})}listen(_,b){let v=null;const m=new N.Emitter({onFirstListenerAdd:()=>{v=String(++this._lastSentReq),this._pendingEmitters.set(v,m),this._send(new c(this._workerId,v,_,b))},onLastListenerRemove:()=>{this._pendingEmitters.delete(v),this._send(new d(this._workerId,v)),v=null}});return m.event}handleMessage(_){!_||!_.vsWorker||this._workerId!==-1&&_.vsWorker!==this._workerId||this._handleMessage(_)}_handleMessage(_){switch(_.type){case 1:return this._handleReplyMessage(_);case 0:return this._handleRequestMessage(_);case 2:return this._handleSubscribeEventMessage(_);case 3:return this._handleEventMessage(_);case 4:return this._handleUnsubscribeEventMessage(_)}}_handleReplyMessage(_){if(!this._pendingReplies[_.seq]){console.warn("Got reply to unknown seq");return}let b=this._pendingReplies[_.seq];if(delete this._pendingReplies[_.seq],_.err){let v=_.err;_.err.$isError&&(v=new Error,v.name=_.err.name,v.message=_.err.message,v.stack=_.err.stack),b.reject(v);return}b.resolve(_.res)}_handleRequestMessage(_){let b=_.req;this._handler.handleMessage(_.method,_.args).then(m=>{this._send(new s(this._workerId,b,m,void 0))},m=>{m.detail instanceof Error&&(m.detail=(0,w.transformErrorForSerialization)(m.detail)),this._send(new s(this._workerId,b,void 0,(0,w.transformErrorForSerialization)(m)))})}_handleSubscribeEventMessage(_){const b=_.req,v=this._handler.handleEvent(_.eventName,_.arg)(m=>{this._send(new u(this._workerId,b,m))});this._pendingEvents.set(b,v)}_handleEventMessage(_){if(!this._pendingEmitters.has(_.req)){console.warn("Got event for unknown req");return}this._pendingEmitters.get(_.req).fire(_.event)}_handleUnsubscribeEventMessage(_){if(!this._pendingEvents.has(_.req)){console.warn("Got unsubscribe for unknown req");return}this._pendingEvents.get(_.req).dispose(),this._pendingEvents.delete(_.req)}_send(_){let b=[];if(_.type===0)for(let v=0;v<_.args.length;v++)_.args[v]instanceof ArrayBuffer&&b.push(_.args[v]);else _.type===1&&_.res instanceof ArrayBuffer&&b.push(_.res);this._handler.sendMessage(_,b)}}class r extends T.Disposable{constructor(_,b,v){super();let m=null;this._worker=this._register(_.create("vs/base/common/worker/simpleWorker",P=>{this._protocol.handleMessage(P)},P=>{m&&m(P)})),this._protocol=new a({sendMessage:(P,F)=>{this._worker.postMessage(P,F)},handleMessage:(P,F)=>{if(typeof v[P]!="function")return Promise.reject(new Error("Missing method "+P+" on main thread host."));try{return Promise.resolve(v[P].apply(v,F))}catch(R){return Promise.reject(R)}},handleEvent:(P,F)=>{if(i(P)){const R=v[P].call(v,F);if(typeof R!="function")throw new Error(`Missing dynamic event ${P} on main thread host.`);return R}if(o(P)){const R=v[P];if(typeof R!="function")throw new Error(`Missing event ${P} on main thread host.`);return R}throw new Error(`Malformed event name ${P}`)}}),this._protocol.setWorkerId(this._worker.getId());let E=null;typeof D.globals.require!="undefined"&&typeof D.globals.require.getConfig=="function"?E=D.globals.require.getConfig():typeof D.globals.requirejs!="undefined"&&(E=D.globals.requirejs.s.contexts._.config);const I=S.getAllMethodNames(v);this._onModuleLoaded=this._protocol.sendMessage(C,[this._worker.getId(),JSON.parse(JSON.stringify(E)),b,I]);const k=(P,F)=>this._request(P,F),M=(P,F)=>this._protocol.listen(P,F);this._lazyProxy=new Promise((P,F)=>{m=F,this._onModuleLoaded.then(R=>{P(l(R,k,M))},R=>{F(R),this._onError("Worker failed to load "+b,R)})})}getProxyObject(){return this._lazyProxy}_request(_,b){return new Promise((v,m)=>{this._onModuleLoaded.then(()=>{this._protocol.sendMessage(_,b).then(v,m)},m)})}_onError(_,b){console.error(_),console.info(b)}}e.SimpleWorkerClient=r;function o(y){return y[0]==="o"&&y[1]==="n"&&p.isUpperAsciiLetter(y.charCodeAt(2))}function i(y){return/^onDynamic/.test(y)&&p.isUpperAsciiLetter(y.charCodeAt(9))}function l(y,_,b){const v=I=>function(){const k=Array.prototype.slice.call(arguments,0);return _(I,k)},m=I=>function(k){return b(I,k)};let E={};for(const I of y){if(i(I)){E[I]=m(I);continue}if(o(I)){E[I]=b(I,void 0);continue}E[I]=v(I)}return E}class h{constructor(_,b){this._requestHandlerFactory=b,this._requestHandler=null,this._protocol=new a({sendMessage:(v,m)=>{_(v,m)},handleMessage:(v,m)=>this._handleMessage(v,m),handleEvent:(v,m)=>this._handleEvent(v,m)})}onmessage(_){this._protocol.handleMessage(_)}_handleMessage(_,b){if(_===C)return this.initialize(b[0],b[1],b[2],b[3]);if(!this._requestHandler||typeof this._requestHandler[_]!="function")return Promise.reject(new Error("Missing requestHandler or method: "+_));try{return Promise.resolve(this._requestHandler[_].apply(this._requestHandler,b))}catch(v){return Promise.reject(v)}}_handleEvent(_,b){if(!this._requestHandler)throw new Error("Missing requestHandler");if(i(_)){const v=this._requestHandler[_].call(this._requestHandler,b);if(typeof v!="function")throw new Error(`Missing dynamic event ${_} on request handler.`);return v}if(o(_)){const v=this._requestHandler[_];if(typeof v!="function")throw new Error(`Missing event ${_} on request handler.`);return v}throw new Error(`Malformed event name ${_}`)}initialize(_,b,v,m){this._protocol.setWorkerId(_);const k=l(m,(M,P)=>this._protocol.sendMessage(M,P),(M,P)=>this._protocol.listen(M,P));return this._requestHandlerFactory?(this._requestHandler=this._requestHandlerFactory(k),Promise.resolve(S.getAllMethodNames(this._requestHandler))):(b&&(typeof b.baseUrl!="undefined"&&delete b.baseUrl,typeof b.paths!="undefined"&&typeof b.paths.vs!="undefined"&&delete b.paths.vs,typeof b.trustedTypesPolicy!==void 0&&delete b.trustedTypesPolicy,b.catchError=!0,D.globals.require.config(b)),new Promise((M,P)=>{(D.globals.require||j)([v],R=>{if(this._requestHandler=R.create(k),!this._requestHandler){P(new Error("No RequestHandler!"));return}M(S.getAllMethodNames(this._requestHandler))},P)}))}}e.SimpleWorkerServer=h;function f(y){return new h(y,null)}e.create=f}),define(J[213],ee([0,1]),function(j,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ItemActivation=e.QuickInputHideReason=e.NO_KEY_MODS=void 0,e.NO_KEY_MODS={ctrlCmd:!1,alt:!1};var w;(function(T){T[T.Blur=1]="Blur",T[T.Gesture=2]="Gesture",T[T.Other=3]="Other"})(w=e.QuickInputHideReason||(e.QuickInputHideReason={}));var N;(function(T){T[T.NONE=0]="NONE",T[T.FIRST=1]="FIRST",T[T.SECOND=2]="SECOND",T[T.LAST=3]="LAST"})(N=e.ItemActivation||(e.ItemActivation={}))}),define(J[312],ee([0,1,14,4,2,20]),function(j,e,w,N,T,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.InMemoryStorageDatabase=e.Storage=void 0;var S;(function(n){n[n.None=0]="None",n[n.Initialized=1]="Initialized",n[n.Closed=2]="Closed"})(S||(S={}));class p extends T.Disposable{constructor(g,t=Object.create(null)){super();this.database=g,this.options=t,this._onDidChangeStorage=this._register(new N.Emitter),this.onDidChangeStorage=this._onDidChangeStorage.event,this.state=S.None,this.cache=new Map,this.flushDelayer=new w.ThrottledDelayer(p.DEFAULT_FLUSH_DELAY),this.pendingDeletes=new Set,this.pendingInserts=new Map,this.whenFlushedCallbacks=[],this.registerListeners()}registerListeners(){this._register(this.database.onDidChangeItemsExternal(g=>this.onDidChangeItemsExternal(g)))}onDidChangeItemsExternal(g){var t,s;(t=g.changed)===null||t===void 0||t.forEach((c,u)=>this.accept(u,c)),(s=g.deleted)===null||s===void 0||s.forEach(c=>this.accept(c,void 0))}accept(g,t){if(this.state===S.Closed)return;let s=!1;(0,D.isUndefinedOrNull)(t)?s=this.cache.delete(g):this.cache.get(g)!==t&&(this.cache.set(g,t),s=!0),s&&this._onDidChangeStorage.fire(g)}get(g,t){const s=this.cache.get(g);return(0,D.isUndefinedOrNull)(s)?t:s}getBoolean(g,t){const s=this.get(g);return(0,D.isUndefinedOrNull)(s)?t:s==="true"}getNumber(g,t){const s=this.get(g);return(0,D.isUndefinedOrNull)(s)?t:parseInt(s,10)}set(g,t){return Re(this,void 0,void 0,function*(){if(this.state===S.Closed)return;if((0,D.isUndefinedOrNull)(t))return this.delete(g);const s=String(t);if(this.cache.get(g)!==s)return this.cache.set(g,s),this.pendingInserts.set(g,s),this.pendingDeletes.delete(g),this._onDidChangeStorage.fire(g),this.flushDelayer.trigger(()=>this.flushPending())})}delete(g){return Re(this,void 0,void 0,function*(){if(!(this.state===S.Closed||!this.cache.delete(g)))return this.pendingDeletes.has(g)||this.pendingDeletes.add(g),this.pendingInserts.delete(g),this._onDidChangeStorage.fire(g),this.flushDelayer.trigger(()=>this.flushPending())})}get hasPending(){return this.pendingInserts.size>0||this.pendingDeletes.size>0}flushPending(){return Re(this,void 0,void 0,function*(){if(!this.hasPending)return;const g={insert:this.pendingInserts,delete:this.pendingDeletes};return this.pendingDeletes=new Set,this.pendingInserts=new Map,this.database.updateItems(g).finally(()=>{var t;if(!this.hasPending)for(;this.whenFlushedCallbacks.length;)(t=this.whenFlushedCallbacks.pop())===null||t===void 0||t()})})}dispose(){this.flushDelayer.dispose(),super.dispose()}}e.Storage=p,p.DEFAULT_FLUSH_DELAY=100;class C{constructor(){this.onDidChangeItemsExternal=N.Event.None,this.items=new Map}updateItems(g){return Re(this,void 0,void 0,function*(){g.insert&&g.insert.forEach((t,s)=>this.items.set(s,t)),g.delete&&g.delete.forEach(t=>this.items.delete(t))})}}e.InMemoryStorageDatabase=C}),define(J[313],ee([0,1,17,212]),function(j,e,w,N){"use strict";var T;Object.defineProperty(e,"__esModule",{value:!0}),e.DefaultWorkerFactory=e.getWorkerBootstrapUrl=void 0;const D=(T=window.trustedTypes)===null||T===void 0?void 0:T.createPolicy("defaultWorkerFactory",{createScriptURL:t=>t});function S(t,s){if(w.globals.MonacoEnvironment){if(typeof w.globals.MonacoEnvironment.getWorker=="function")return w.globals.MonacoEnvironment.getWorker(t,s);if(typeof w.globals.MonacoEnvironment.getWorkerUrl=="function"){const c=w.globals.MonacoEnvironment.getWorkerUrl(t,s);return new Worker(D?D.createScriptURL(c):c,{name:s})}}if(typeof j=="function"){const c=j.toUrl("./"+t),u=p(c,s);return new Worker(D?D.createScriptURL(u):u,{name:s})}throw new Error("You must define a function MonacoEnvironment.getWorkerUrl or MonacoEnvironment.getWorker")}function p(t,s){if(/^((http:)|(https:)|(file:))/.test(t)&&t.substring(0,self.origin.length)!==self.origin){const c="vs/base/worker/defaultWorkerFactory.js",u=j.toUrl(c).slice(0,-c.length),d=`/*${s}*/self.MonacoEnvironment={baseUrl: '${u}'};const ttPolicy = self.trustedTypes?.createPolicy('defaultWorkerFactory', { createScriptURL: value => value });importScripts(ttPolicy?.createScriptURL('${t}') ?? '${t}');/*${s}*/`,a=new Blob([d],{type:"application/javascript"});return URL.createObjectURL(a)}return t+"#"+s}e.getWorkerBootstrapUrl=p;function C(t){return typeof t.then=="function"}class n{constructor(s,c,u,d,a){this.id=c;const r=S("workerMain.js",u);C(r)?this.worker=r:this.worker=Promise.resolve(r),this.postMessage(s,[]),this.worker.then(o=>{o.onmessage=function(i){d(i.data)},o.onmessageerror=a,typeof o.addEventListener=="function"&&o.addEventListener("error",a)})}getId(){return this.id}postMessage(s,c){this.worker&&this.worker.then(u=>u.postMessage(s,c))}dispose(){this.worker&&this.worker.then(s=>s.terminate()),this.worker=null}}class g{constructor(s){this._label=s,this._webWorkerFailedBeforeError=!1}create(s,c,u){let d=++g.LAST_WORKER_ID;if(this._webWorkerFailedBeforeError)throw this._webWorkerFailedBeforeError;return new n(s,d,this._label||"anonymous"+d,c,a=>{(0,N.logOnceWebWorkerWarning)(a),this._webWorkerFailedBeforeError=a,u(a)})}}e.DefaultWorkerFactory=g,g.LAST_WORKER_ID=0}),define(J[214],ee([12]),{}),define(J[314],ee([12]),{}),define(J[45],ee([0,1,7,17,314]),function(j,e,w,N){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.status=e.alert=e.setARIAContainer=void 0;const T=2e4;let D,S,p,C,n;function g(u){D=document.createElement("div"),D.className="monaco-aria-container";const d=()=>{const r=document.createElement("div");return r.className="monaco-alert",r.setAttribute("role","alert"),r.setAttribute("aria-atomic","true"),D.appendChild(r),r};S=d(),p=d();const a=()=>{const r=document.createElement("div");return r.className="monaco-status",r.setAttribute("role","complementary"),r.setAttribute("aria-live","polite"),r.setAttribute("aria-atomic","true"),D.appendChild(r),r};C=a(),n=a(),u.appendChild(D)}e.setARIAContainer=g;function t(u){!D||(S.textContent!==u?(w.clearNode(p),c(S,u)):(w.clearNode(S),c(p,u)))}e.alert=t;function s(u){!D||(N.isMacintosh?t(u):C.textContent!==u?(w.clearNode(n),c(C,u)):(w.clearNode(C),c(n,u)))}e.status=s;function c(u,d){w.clearNode(u),d.length>T&&(d=d.substr(0,T)),u.textContent=d,u.style.visibility="hidden",u.style.visibility="visible"}}),define(J[315],ee([12]),{}),define(J[316],ee([0,1,7,52,58,108,29,4,2,38,315]),function(j,e,w,N,T,D,S,p,C,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Button=void 0;const g={buttonBackground:S.Color.fromHex("#0E639C"),buttonHoverBackground:S.Color.fromHex("#006BB3"),buttonForeground:S.Color.white};class t extends C.Disposable{constructor(c,u){super();this._onDidClick=this._register(new p.Emitter),this.options=u||Object.create(null),(0,n.mixin)(this.options,g,!1),this.buttonForeground=this.options.buttonForeground,this.buttonBackground=this.options.buttonBackground,this.buttonHoverBackground=this.options.buttonHoverBackground,this.buttonSecondaryForeground=this.options.buttonSecondaryForeground,this.buttonSecondaryBackground=this.options.buttonSecondaryBackground,this.buttonSecondaryHoverBackground=this.options.buttonSecondaryHoverBackground,this.buttonBorder=this.options.buttonBorder,this._element=document.createElement("a"),this._element.classList.add("monaco-button"),this._element.tabIndex=0,this._element.setAttribute("role","button"),c.appendChild(this._element),this._register(T.Gesture.addTarget(this._element)),[w.EventType.CLICK,T.EventType.Tap].forEach(d=>{this._register((0,w.addDisposableListener)(this._element,d,a=>{if(!this.enabled){w.EventHelper.stop(a);return}this._onDidClick.fire(a)}))}),this._register((0,w.addDisposableListener)(this._element,w.EventType.KEY_DOWN,d=>{const a=new N.StandardKeyboardEvent(d);let r=!1;this.enabled&&(a.equals(3)||a.equals(10))?(this._onDidClick.fire(d),r=!0):a.equals(9)&&(this._element.blur(),r=!0),r&&w.EventHelper.stop(a,!0)})),this._register((0,w.addDisposableListener)(this._element,w.EventType.MOUSE_OVER,d=>{this._element.classList.contains("disabled")||this.setHoverBackground()})),this._register((0,w.addDisposableListener)(this._element,w.EventType.MOUSE_OUT,d=>{this.applyStyles()})),this.focusTracker=this._register((0,w.trackFocus)(this._element)),this._register(this.focusTracker.onDidFocus(()=>this.setHoverBackground())),this._register(this.focusTracker.onDidBlur(()=>this.applyStyles())),this.applyStyles()}get onDidClick(){return this._onDidClick.event}setHoverBackground(){let c;this.options.secondary?c=this.buttonSecondaryHoverBackground?this.buttonSecondaryHoverBackground.toString():null:c=this.buttonHoverBackground?this.buttonHoverBackground.toString():null,c&&(this._element.style.backgroundColor=c)}style(c){this.buttonForeground=c.buttonForeground,this.buttonBackground=c.buttonBackground,this.buttonHoverBackground=c.buttonHoverBackground,this.buttonSecondaryForeground=c.buttonSecondaryForeground,this.buttonSecondaryBackground=c.buttonSecondaryBackground,this.buttonSecondaryHoverBackground=c.buttonSecondaryHoverBackground,this.buttonBorder=c.buttonBorder,this.applyStyles()}applyStyles(){if(this._element){let c,u;this.options.secondary?(u=this.buttonSecondaryForeground?this.buttonSecondaryForeground.toString():"",c=this.buttonSecondaryBackground?this.buttonSecondaryBackground.toString():""):(u=this.buttonForeground?this.buttonForeground.toString():"",c=this.buttonBackground?this.buttonBackground.toString():"");const d=this.buttonBorder?this.buttonBorder.toString():"";this._element.style.color=u,this._element.style.backgroundColor=c,this._element.style.borderWidth=d?"1px":"",this._element.style.borderStyle=d?"solid":"",this._element.style.borderColor=d}}get element(){return this._element}set label(c){this._element.classList.add("monaco-text-button"),this.options.supportIcons?(0,w.reset)(this._element,...(0,D.renderLabelWithIcons)(c)):this._element.textContent=c,typeof this.options.title=="string"?this._element.title=this.options.title:this.options.title&&(this._element.title=c)}set enabled(c){c?(this._element.classList.remove("disabled"),this._element.setAttribute("aria-disabled",String(!1)),this._element.tabIndex=0):(this._element.classList.add("disabled"),this._element.setAttribute("aria-disabled",String(!0)))}get enabled(){return!this._element.classList.contains("disabled")}}e.Button=t}),define(J[317],ee([12]),{}),define(J[170],ee([0,1,53,27,29,4,317]),function(j,e,w,N,T,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Checkbox=void 0;const S={inputActiveOptionBorder:T.Color.fromHex("#007ACC00"),inputActiveOptionForeground:T.Color.fromHex("#FFFFFF"),inputActiveOptionBackground:T.Color.fromHex("#0E639C50")};class p extends w.Widget{constructor(n){super();this._onChange=this._register(new D.Emitter),this.onChange=this._onChange.event,this._onKeyDown=this._register(new D.Emitter),this.onKeyDown=this._onKeyDown.event,this._opts=Object.assign(Object.assign({},S),n),this._checked=this._opts.isChecked;const g=["monaco-custom-checkbox"];this._opts.icon&&g.push(...N.CSSIcon.asClassNameArray(this._opts.icon)),this._opts.actionClassName&&g.push(...this._opts.actionClassName.split(" ")),this._checked&&g.push("checked"),this.domNode=document.createElement("div"),this.domNode.title=this._opts.title,this.domNode.classList.add(...g),this._opts.notFocusable||(this.domNode.tabIndex=0),this.domNode.setAttribute("role","checkbox"),this.domNode.setAttribute("aria-checked",String(this._checked)),this.domNode.setAttribute("aria-label",this._opts.title),this.applyStyles(),this.onclick(this.domNode,t=>{this.checked=!this._checked,this._onChange.fire(!1),t.preventDefault()}),this.ignoreGesture(this.domNode),this.onkeydown(this.domNode,t=>{if(t.keyCode===10||t.keyCode===3){this.checked=!this._checked,this._onChange.fire(!0),t.preventDefault();return}this._onKeyDown.fire(t)})}get enabled(){return this.domNode.getAttribute("aria-disabled")!=="true"}focus(){this.domNode.focus()}get checked(){return this._checked}set checked(n){this._checked=n,this.domNode.setAttribute("aria-checked",String(this._checked)),this.domNode.classList.toggle("checked",this._checked),this.applyStyles()}width(){return 2+2+2+16}style(n){n.inputActiveOptionBorder&&(this._opts.inputActiveOptionBorder=n.inputActiveOptionBorder),n.inputActiveOptionForeground&&(this._opts.inputActiveOptionForeground=n.inputActiveOptionForeground),n.inputActiveOptionBackground&&(this._opts.inputActiveOptionBackground=n.inputActiveOptionBackground),this.applyStyles()}applyStyles(){this.domNode&&(this.domNode.style.borderColor=this._checked&&this._opts.inputActiveOptionBorder?this._opts.inputActiveOptionBorder.toString():"transparent",this.domNode.style.color=this._checked&&this._opts.inputActiveOptionForeground?this._opts.inputActiveOptionForeground.toString():"inherit",this.domNode.style.backgroundColor=this._checked&&this._opts.inputActiveOptionBackground?this._opts.inputActiveOptionBackground.toString():"transparent")}enable(){this.domNode.setAttribute("aria-disabled",String(!1))}disable(){this.domNode.setAttribute("aria-disabled",String(!0))}}e.Checkbox=p}),define(J[318],ee([12]),{}),define(J[319],ee([12]),{}),define(J[136],ee([0,1,27,318,319]),function(j,e,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.formatRule=void 0;function N(T){let D=T.definition;for(;D instanceof w.Codicon;)D=D.definition;return`.codicon-${T.id}:before { content: '${D.fontCharacter}'; }`}e.formatRule=N}),define(J[320],ee([12]),{}),define(J[215],ee([0,1,161,7,2,17,132,320]),function(j,e,w,N,T,D,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ContextView=e.layout=e.LayoutAnchorMode=void 0;var p;(function(t){t[t.AVOID=0]="AVOID",t[t.ALIGN=1]="ALIGN"})(p=e.LayoutAnchorMode||(e.LayoutAnchorMode={}));function C(t,s,c){const u=c.mode===p.ALIGN?c.offset:c.offset+c.size,d=c.mode===p.ALIGN?c.offset+c.size:c.offset;return c.position===0?s<=t-u?u:s<=d?d-s:Math.max(t-s,0):s<=d?d-s:s<=t-u?u:0}e.layout=C;class n extends T.Disposable{constructor(s,c){super();this.container=null,this.delegate=null,this.toDisposeOnClean=T.Disposable.None,this.toDisposeOnSetContainer=T.Disposable.None,this.shadowRoot=null,this.shadowRootHostElement=null,this.view=N.$(".context-view"),this.useFixedPosition=!1,this.useShadowDOM=!1,N.hide(this.view),this.setContainer(s,c),this._register((0,T.toDisposable)(()=>this.setContainer(null,1)))}setContainer(s,c){var u;if(this.container&&(this.toDisposeOnSetContainer.dispose(),this.shadowRoot?(this.shadowRoot.removeChild(this.view),this.shadowRoot=null,(u=this.shadowRootHostElement)===null||u===void 0||u.remove(),this.shadowRootHostElement=null):this.container.removeChild(this.view),this.container=null),s){if(this.container=s,this.useFixedPosition=c!==1,this.useShadowDOM=c===3,this.useShadowDOM){this.shadowRootHostElement=N.$(".shadow-root-host"),this.container.appendChild(this.shadowRootHostElement),this.shadowRoot=this.shadowRootHostElement.attachShadow({mode:"open"});const a=document.createElement("style");a.textContent=g,this.shadowRoot.appendChild(a),this.shadowRoot.appendChild(this.view),this.shadowRoot.appendChild(N.$("slot"))}else this.container.appendChild(this.view);const d=new T.DisposableStore;n.BUBBLE_UP_EVENTS.forEach(a=>{d.add(N.addStandardDisposableListener(this.container,a,r=>{this.onDOMEvent(r,!1)}))}),n.BUBBLE_DOWN_EVENTS.forEach(a=>{d.add(N.addStandardDisposableListener(this.container,a,r=>{this.onDOMEvent(r,!0)},!0))}),this.toDisposeOnSetContainer=d}}show(s){this.isVisible()&&this.hide(),N.clearNode(this.view),this.view.className="context-view",this.view.style.top="0px",this.view.style.left="0px",this.view.style.zIndex="2500",this.view.style.position=this.useFixedPosition?"fixed":"absolute",N.show(this.view),this.toDisposeOnClean=s.render(this.view)||T.Disposable.None,this.delegate=s,this.doLayout(),this.delegate.focus&&this.delegate.focus()}getViewElement(){return this.view}layout(){if(!!this.isVisible()){if(this.delegate.canRelayout===!1&&!(D.isIOS&&w.BrowserFeatures.pointerEvents)){this.hide();return}this.delegate.layout&&this.delegate.layout(),this.doLayout()}}doLayout(){if(!this.isVisible())return;let s=this.delegate.getAnchor(),c;if(N.isHTMLElement(s)){let f=N.getDomNodePagePosition(s);c={top:f.top,left:f.left,width:f.width,height:f.height}}else c={top:s.y,left:s.x,width:s.width||1,height:s.height||2};const u=N.getTotalWidth(this.view),d=N.getTotalHeight(this.view),a=this.delegate.anchorPosition||0,r=this.delegate.anchorAlignment||0,o=this.delegate.anchorAxisAlignment||0;let i,l;if(o===0){const f={offset:c.top-window.pageYOffset,size:c.height,position:a===0?0:1},y={offset:c.left,size:c.width,position:r===0?0:1,mode:p.ALIGN};i=C(window.innerHeight,d,f)+window.pageYOffset,S.Range.intersects({start:i,end:i+d},{start:f.offset,end:f.offset+f.size})&&(y.mode=p.AVOID),l=C(window.innerWidth,u,y)}else{const f={offset:c.left,size:c.width,position:r===0?0:1},y={offset:c.top,size:c.height,position:a===0?0:1,mode:p.ALIGN};l=C(window.innerWidth,u,f),S.Range.intersects({start:l,end:l+u},{start:f.offset,end:f.offset+f.size})&&(y.mode=p.AVOID),i=C(window.innerHeight,d,y)+window.pageYOffset}this.view.classList.remove("top","bottom","left","right"),this.view.classList.add(a===0?"bottom":"top"),this.view.classList.add(r===0?"left":"right"),this.view.classList.toggle("fixed",this.useFixedPosition);const h=N.getDomNodePagePosition(this.container);this.view.style.top=`${i-(this.useFixedPosition?N.getDomNodePagePosition(this.view).top:h.top)}px`,this.view.style.left=`${l-(this.useFixedPosition?N.getDomNodePagePosition(this.view).left:h.left)}px`,this.view.style.width="initial"}hide(s){const c=this.delegate;this.delegate=null,(c==null?void 0:c.onHide)&&c.onHide(s),this.toDisposeOnClean.dispose(),N.hide(this.view)}isVisible(){return!!this.delegate}onDOMEvent(s,c){this.delegate&&(this.delegate.onDOMEvent?this.delegate.onDOMEvent(s,document.activeElement):c&&!N.isAncestor(s.target,this.container)&&this.hide())}dispose(){this.hide(),super.dispose()}}e.ContextView=n,n.BUBBLE_UP_EVENTS=["click","keydown","focus","blur"],n.BUBBLE_DOWN_EVENTS=["click"];let g=`
    :host {
        all: initial; /* 1st rule so subsequent properties are reset. */
    }
 
    @font-face {
        font-family: "codicon";
        font-display: block;
        src: url("./codicon.ttf?5d4d76ab2ce5108968ad644d591a16a6") format("truetype");
    }
 
    .codicon[class*='codicon-'] {
        font: normal normal normal 16px/1 codicon;
        display: inline-block;
        text-decoration: none;
        text-rendering: auto;
        text-align: center;
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
        user-select: none;
        -webkit-user-select: none;
        -ms-user-select: none;
    }
 
    :host {
        font-family: -apple-system, BlinkMacSystemFont, "Segoe WPC", "Segoe UI", "HelveticaNeue-Light", system-ui, "Ubuntu", "Droid Sans", sans-serif;
    }
 
    :host-context(.mac) { font-family: -apple-system, BlinkMacSystemFont, sans-serif; }
    :host-context(.mac:lang(zh-Hans)) { font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", sans-serif; }
    :host-context(.mac:lang(zh-Hant)) { font-family: -apple-system, BlinkMacSystemFont, "PingFang TC", sans-serif; }
    :host-context(.mac:lang(ja)) { font-family: -apple-system, BlinkMacSystemFont, "Hiragino Kaku Gothic Pro", sans-serif; }
    :host-context(.mac:lang(ko)) { font-family: -apple-system, BlinkMacSystemFont, "Nanum Gothic", "Apple SD Gothic Neo", "AppleGothic", sans-serif; }
 
    :host-context(.windows) { font-family: "Segoe WPC", "Segoe UI", sans-serif; }
    :host-context(.windows:lang(zh-Hans)) { font-family: "Segoe WPC", "Segoe UI", "Microsoft YaHei", sans-serif; }
    :host-context(.windows:lang(zh-Hant)) { font-family: "Segoe WPC", "Segoe UI", "Microsoft Jhenghei", sans-serif; }
    :host-context(.windows:lang(ja)) { font-family: "Segoe WPC", "Segoe UI", "Yu Gothic UI", "Meiryo UI", sans-serif; }
    :host-context(.windows:lang(ko)) { font-family: "Segoe WPC", "Segoe UI", "Malgun Gothic", "Dotom", sans-serif; }
 
    :host-context(.linux) { font-family: system-ui, "Ubuntu", "Droid Sans", sans-serif; }
    :host-context(.linux:lang(zh-Hans)) { font-family: system-ui, "Ubuntu", "Droid Sans", "Source Han Sans SC", "Source Han Sans CN", "Source Han Sans", sans-serif; }
    :host-context(.linux:lang(zh-Hant)) { font-family: system-ui, "Ubuntu", "Droid Sans", "Source Han Sans TC", "Source Han Sans TW", "Source Han Sans", sans-serif; }
    :host-context(.linux:lang(ja)) { font-family: system-ui, "Ubuntu", "Droid Sans", "Source Han Sans J", "Source Han Sans JP", "Source Han Sans", sans-serif; }
    :host-context(.linux:lang(ko)) { font-family: system-ui, "Ubuntu", "Droid Sans", "Source Han Sans K", "Source Han Sans JR", "Source Han Sans", "UnDotum", "FBaekmuk Gulim", sans-serif; }
`}),define(J[321],ee([12]),{}),define(J[216],ee([0,1,7,29,38,8,321]),function(j,e,w,N,T,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CountBadge=void 0;const S={badgeBackground:N.Color.fromHex("#4D4D4D"),badgeForeground:N.Color.fromHex("#FFFFFF")};class p{constructor(n,g){this.count=0,this.options=g||Object.create(null),(0,T.mixin)(this.options,S,!1),this.badgeBackground=this.options.badgeBackground,this.badgeForeground=this.options.badgeForeground,this.badgeBorder=this.options.badgeBorder,this.element=(0,w.append)(n,(0,w.$)(".monaco-count-badge")),this.countFormat=this.options.countFormat||"{0}",this.titleFormat=this.options.titleFormat||"",this.setCount(this.options.count||0)}setCount(n){this.count=n,this.render()}setTitleFormat(n){this.titleFormat=n,this.render()}render(){this.element.textContent=(0,D.format)(this.countFormat,this.count),this.element.title=(0,D.format)(this.titleFormat,this.count),this.applyStyles()}style(n){this.badgeBackground=n.badgeBackground,this.badgeForeground=n.badgeForeground,this.badgeBorder=n.badgeBorder,this.applyStyles()}applyStyles(){if(this.element){const n=this.badgeBackground?this.badgeBackground.toString():"",g=this.badgeForeground?this.badgeForeground.toString():"",t=this.badgeBorder?this.badgeBorder.toString():"";this.element.style.backgroundColor=n,this.element.style.color=g,this.element.style.borderWidth=t?"1px":"",this.element.style.borderStyle=t?"solid":"",this.element.style.borderColor=t}}}e.CountBadge=p}),define(J[217],ee([12]),{}),define(J[218],ee([12]),{}),define(J[322],ee([12]),{}),define(J[323],ee([12]),{}),define(J[324],ee([12]),{}),define(J[325],ee([12]),{}),define(J[219],ee([12]),{}),define(J[326],ee([12]),{}),define(J[137],ee([0,1,326]),function(j,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MOUSE_CURSOR_TEXT_CSS_CLASS_NAME=void 0,e.MOUSE_CURSOR_TEXT_CSS_CLASS_NAME="monaco-mouse-cursor-text"}),define(J[327],ee([12]),{}),define(J[328],ee([0,1,7,14,29,2,38,327]),function(j,e,w,N,T,D,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ProgressBar=void 0;const p="done",C="active",n="infinite",g="discrete",t={progressBarBackground:T.Color.fromHex("#0E70C0")};class s extends D.Disposable{constructor(u,d){super();this.options=d||Object.create(null),(0,S.mixin)(this.options,t,!1),this.workedVal=0,this.progressBarBackground=this.options.progressBarBackground,this._register(this.showDelayedScheduler=new N.RunOnceScheduler(()=>(0,w.show)(this.element),0)),this.create(u)}create(u){this.element=document.createElement("div"),this.element.classList.add("monaco-progress-container"),this.element.setAttribute("role","progressbar"),this.element.setAttribute("aria-valuemin","0"),u.appendChild(this.element),this.bit=document.createElement("div"),this.bit.classList.add("progress-bit"),this.element.appendChild(this.bit),this.applyStyles()}off(){this.bit.style.width="inherit",this.bit.style.opacity="1",this.element.classList.remove(C,n,g),this.workedVal=0,this.totalWork=void 0}stop(){return this.doDone(!1)}doDone(u){return this.element.classList.add(p),this.element.classList.contains(n)?(this.bit.style.opacity="0",u?setTimeout(()=>this.off(),200):this.off()):(this.bit.style.width="inherit",u?setTimeout(()=>this.off(),200):this.off()),this}infinite(){return this.bit.style.width="2%",this.bit.style.opacity="1",this.element.classList.remove(g,p),this.element.classList.add(C,n),this}getContainer(){return this.element}style(u){this.progressBarBackground=u.progressBarBackground,this.applyStyles()}applyStyles(){if(this.bit){const u=this.progressBarBackground?this.progressBarBackground.toString():"";this.bit.style.backgroundColor=u}}}e.ProgressBar=s}),define(J[329],ee([12]),{}),define(J[110],ee([0,1,7,94,58,14,92,4,2,17,329]),function(j,e,w,N,T,D,S,p,C,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Sash=e.OrthogonalEdge=void 0;let g=!1;var t;(function(l){l.North="north",l.South="south",l.East="east",l.West="west"})(t=e.OrthogonalEdge||(e.OrthogonalEdge={}));let s=4;const c=new p.Emitter;let u=300;const d=new p.Emitter;class a{constructor(){this.disposables=new C.DisposableStore}get onPointerMove(){return this.disposables.add(new N.DomEmitter(window,"mousemove")).event}get onPointerUp(){return this.disposables.add(new N.DomEmitter(window,"mouseup")).event}dispose(){this.disposables.dispose()}}Fe([S.memoize],a.prototype,"onPointerMove",null),Fe([S.memoize],a.prototype,"onPointerUp",null);class r{constructor(h){this.el=h,this.disposables=new C.DisposableStore}get onPointerMove(){return this.disposables.add(new N.DomEmitter(this.el,T.EventType.Change)).event}get onPointerUp(){return this.disposables.add(new N.DomEmitter(this.el,T.EventType.End)).event}dispose(){this.disposables.dispose()}}Fe([S.memoize],r.prototype,"onPointerMove",null),Fe([S.memoize],r.prototype,"onPointerUp",null);class o{constructor(h){this.factory=h}get onPointerMove(){return this.factory.onPointerMove}get onPointerUp(){return this.factory.onPointerUp}dispose(){}}Fe([S.memoize],o.prototype,"onPointerMove",null),Fe([S.memoize],o.prototype,"onPointerUp",null);class i extends C.Disposable{constructor(h,f,y){super();this.hoverDelay=u,this.hoverDelayer=this._register(new D.Delayer(this.hoverDelay)),this._state=3,this._onDidEnablementChange=this._register(new p.Emitter),this.onDidEnablementChange=this._onDidEnablementChange.event,this._onDidStart=this._register(new p.Emitter),this.onDidStart=this._onDidStart.event,this._onDidChange=this._register(new p.Emitter),this.onDidChange=this._onDidChange.event,this._onDidReset=this._register(new p.Emitter),this.onDidReset=this._onDidReset.event,this._onDidEnd=this._register(new p.Emitter),this.onDidEnd=this._onDidEnd.event,this.linkedSash=void 0,this.orthogonalStartSashDisposables=this._register(new C.DisposableStore),this.orthogonalStartDragHandleDisposables=this._register(new C.DisposableStore),this.orthogonalEndSashDisposables=this._register(new C.DisposableStore),this.orthogonalEndDragHandleDisposables=this._register(new C.DisposableStore),this.el=(0,w.append)(h,(0,w.$)(".monaco-sash")),y.orthogonalEdge&&this.el.classList.add(`orthogonal-edge-${y.orthogonalEdge}`),n.isMacintosh&&this.el.classList.add("mac");const _=this._register(new N.DomEmitter(this.el,"mousedown")).event;this._register(_(M=>this.onPointerStart(M,new a),this));const b=this._register(new N.DomEmitter(this.el,"dblclick")).event;this._register(b(this.onPointerDoublePress,this));const v=this._register(new N.DomEmitter(this.el,"mouseenter")).event;this._register(v(()=>i.onMouseEnter(this)));const m=this._register(new N.DomEmitter(this.el,"mouseleave")).event;this._register(m(()=>i.onMouseLeave(this))),this._register(T.Gesture.addTarget(this.el));const E=p.Event.map(this._register(new N.DomEmitter(this.el,T.EventType.Start)).event,M=>{var P;return Object.assign(Object.assign({},M),{target:(P=M.initialTarget)!==null&&P!==void 0?P:null})});this._register(E(M=>this.onPointerStart(M,new r(this.el)),this));const I=this._register(new N.DomEmitter(this.el,T.EventType.Tap)).event,k=p.Event.map(p.Event.filter(p.Event.debounce(I,(M,P)=>{var F;return{event:P,count:((F=M==null?void 0:M.count)!==null&&F!==void 0?F:0)+1}},250),({count:M})=>M===2),({event:M})=>{var P;return Object.assign(Object.assign({},M),{target:(P=M.initialTarget)!==null&&P!==void 0?P:null})});this._register(k(this.onPointerDoublePress,this)),typeof y.size=="number"?(this.size=y.size,y.orientation===0?this.el.style.width=`${this.size}px`:this.el.style.height=`${this.size}px`):(this.size=s,this._register(c.event(M=>{this.size=M,this.layout()}))),this._register(d.event(M=>this.hoverDelay=M)),this.hidden=!1,this.layoutProvider=f,this.orthogonalStartSash=y.orthogonalStartSash,this.orthogonalEndSash=y.orthogonalEndSash,this.orientation=y.orientation||0,this.orientation===1?(this.el.classList.add("horizontal"),this.el.classList.remove("vertical")):(this.el.classList.remove("horizontal"),this.el.classList.add("vertical")),this.el.classList.toggle("debug",g),this.layout()}get state(){return this._state}set state(h){this._state!==h&&(this.el.classList.toggle("disabled",h===0),this.el.classList.toggle("minimum",h===1),this.el.classList.toggle("maximum",h===2),this._state=h,this._onDidEnablementChange.fire(h))}get orthogonalStartSash(){return this._orthogonalStartSash}set orthogonalStartSash(h){if(this.orthogonalStartDragHandleDisposables.clear(),this.orthogonalStartSashDisposables.clear(),h){const f=y=>{this.orthogonalStartDragHandleDisposables.clear(),y!==0&&(this._orthogonalStartDragHandle=(0,w.append)(this.el,(0,w.$)(".orthogonal-drag-handle.start")),this.orthogonalStartDragHandleDisposables.add((0,C.toDisposable)(()=>this._orthogonalStartDragHandle.remove())),this.orthogonalStartDragHandleDisposables.add(new N.DomEmitter(this._orthogonalStartDragHandle,"mouseenter")).event(()=>i.onMouseEnter(h),void 0,this.orthogonalStartDragHandleDisposables),this.orthogonalStartDragHandleDisposables.add(new N.DomEmitter(this._orthogonalStartDragHandle,"mouseleave")).event(()=>i.onMouseLeave(h),void 0,this.orthogonalStartDragHandleDisposables))};this.orthogonalStartSashDisposables.add(h.onDidEnablementChange(f,this)),f(h.state)}this._orthogonalStartSash=h}get orthogonalEndSash(){return this._orthogonalEndSash}set orthogonalEndSash(h){if(this.orthogonalEndDragHandleDisposables.clear(),this.orthogonalEndSashDisposables.clear(),h){const f=y=>{this.orthogonalEndDragHandleDisposables.clear(),y!==0&&(this._orthogonalEndDragHandle=(0,w.append)(this.el,(0,w.$)(".orthogonal-drag-handle.end")),this.orthogonalEndDragHandleDisposables.add((0,C.toDisposable)(()=>this._orthogonalEndDragHandle.remove())),this.orthogonalEndDragHandleDisposables.add(new N.DomEmitter(this._orthogonalEndDragHandle,"mouseenter")).event(()=>i.onMouseEnter(h),void 0,this.orthogonalEndDragHandleDisposables),this.orthogonalEndDragHandleDisposables.add(new N.DomEmitter(this._orthogonalEndDragHandle,"mouseleave")).event(()=>i.onMouseLeave(h),void 0,this.orthogonalEndDragHandleDisposables))};this.orthogonalEndSashDisposables.add(h.onDidEnablementChange(f,this)),f(h.state)}this._orthogonalEndSash=h}onPointerStart(h,f){w.EventHelper.stop(h);let y=!1;if(!h.__orthogonalSashEvent){const R=this.getOrthogonalSash(h);R&&(y=!0,h.__orthogonalSashEvent=!0,R.onPointerStart(h,new o(f)))}if(this.linkedSash&&!h.__linkedSashEvent&&(h.__linkedSashEvent=!0,this.linkedSash.onPointerStart(h,new o(f))),!this.state)return;const _=(0,w.getElementsByTagName)("iframe");for(const R of _)R.style.pointerEvents="none";const b=h.pageX,v=h.pageY,m=h.altKey,E={startX:b,currentX:b,startY:v,currentY:v,altKey:m};this.el.classList.add("active"),this._onDidStart.fire(E);const I=(0,w.createStyleSheet)(this.el),k=()=>{let R="";y?R="all-scroll":this.orientation===1?this.state===1?R="s-resize":this.state===2?R="n-resize":R=n.isMacintosh?"row-resize":"ns-resize":this.state===1?R="e-resize":this.state===2?R="w-resize":R=n.isMacintosh?"col-resize":"ew-resize",I.textContent=`* { cursor: ${R} !important; }`},M=new C.DisposableStore;k(),y||this.onDidEnablementChange(k,null,M);const P=R=>{w.EventHelper.stop(R,!1);const A={startX:b,currentX:R.pageX,startY:v,currentY:R.pageY,altKey:m};this._onDidChange.fire(A)},F=R=>{w.EventHelper.stop(R,!1),this.el.removeChild(I),this.el.classList.remove("active"),this._onDidEnd.fire(),M.dispose();for(const A of _)A.style.pointerEvents="auto"};f.onPointerMove(P,null,M),f.onPointerUp(F,null,M),M.add(f)}onPointerDoublePress(h){const f=this.getOrthogonalSash(h);f&&f._onDidReset.fire(),this.linkedSash&&this.linkedSash._onDidReset.fire(),this._onDidReset.fire()}static onMouseEnter(h,f=!1){h.el.classList.contains("active")?(h.hoverDelayer.cancel(),h.el.classList.add("hover")):h.hoverDelayer.trigger(()=>h.el.classList.add("hover"),h.hoverDelay).then(void 0,()=>{}),!f&&h.linkedSash&&i.onMouseEnter(h.linkedSash,!0)}static onMouseLeave(h,f=!1){h.hoverDelayer.cancel(),h.el.classList.remove("hover"),!f&&h.linkedSash&&i.onMouseLeave(h.linkedSash,!0)}clearSashHoverState(){i.onMouseLeave(this)}layout(){if(this.orientation===0){const h=this.layoutProvider;this.el.style.left=h.getVerticalSashLeft(this)-this.size/2+"px",h.getVerticalSashTop&&(this.el.style.top=h.getVerticalSashTop(this)+"px"),h.getVerticalSashHeight&&(this.el.style.height=h.getVerticalSashHeight(this)+"px")}else{const h=this.layoutProvider;this.el.style.top=h.getHorizontalSashTop(this)-this.size/2+"px",h.getHorizontalSashLeft&&(this.el.style.left=h.getHorizontalSashLeft(this)+"px"),h.getHorizontalSashWidth&&(this.el.style.width=h.getHorizontalSashWidth(this)+"px")}}hide(){this.hidden=!0,this.el.style.display="none",this.el.setAttribute("aria-hidden","true")}getOrthogonalSash(h){if(!(!h.target||!(h.target instanceof HTMLElement))&&h.target.classList.contains("orthogonal-drag-handle"))return h.target.classList.contains("start")?this.orthogonalStartSash:this.orthogonalEndSash}dispose(){super.dispose(),this.el.remove()}}e.Sash=i}),define(J[330],ee([12]),{}),define(J[64],ee([0,1,34,7,30,56,308,309,53,14,4,2,17,133,330]),function(j,e,w,N,T,D,S,p,C,n,g,t,s,c){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DomScrollableElement=e.SmoothScrollableElement=e.ScrollableElement=e.AbstractScrollableElement=e.MouseWheelClassifier=void 0;const u=500,d=50,a=!0;class r{constructor(b,v,m){this.timestamp=b,this.deltaX=v,this.deltaY=m,this.score=0}}class o{constructor(){this._capacity=5,this._memory=[],this._front=-1,this._rear=-1}isPhysicalMouseWheel(){if(this._front===-1&&this._rear===-1)return!1;let b=1,v=0,m=1,E=this._rear;do{const I=E===this._front?b:Math.pow(2,-m);if(b-=I,v+=this._memory[E].score*I,E===this._front)break;E=(this._capacity+E-1)%this._capacity,m++}while(!0);return v<=.5}accept(b,v,m){const E=new r(b,v,m);E.score=this._computeScore(E),this._front===-1&&this._rear===-1?(this._memory[0]=E,this._front=0,this._rear=0):(this._rear=(this._rear+1)%this._capacity,this._rear===this._front&&(this._front=(this._front+1)%this._capacity),this._memory[this._rear]=E)}_computeScore(b){if(Math.abs(b.deltaX)>0&&Math.abs(b.deltaY)>0)return 1;let v=.5;const m=this._front===-1&&this._rear===-1?null:this._memory[this._rear];return(!this._isAlmostInt(b.deltaX)||!this._isAlmostInt(b.deltaY))&&(v+=.25),Math.min(Math.max(v,0),1)}_isAlmostInt(b){return Math.abs(Math.round(b)-b)<.01}}e.MouseWheelClassifier=o,o.INSTANCE=new o;class i extends C.Widget{constructor(b,v,m){super();this._onScroll=this._register(new g.Emitter),this.onScroll=this._onScroll.event,this._onWillScroll=this._register(new g.Emitter),b.style.overflow="hidden",this._options=y(v),this._scrollable=m,this._register(this._scrollable.onScroll(I=>{this._onWillScroll.fire(I),this._onDidScroll(I),this._onScroll.fire(I)}));const E={onMouseWheel:I=>this._onMouseWheel(I),onDragStart:()=>this._onDragStart(),onDragEnd:()=>this._onDragEnd()};this._verticalScrollbar=this._register(new p.VerticalScrollbar(this._scrollable,this._options,E)),this._horizontalScrollbar=this._register(new S.HorizontalScrollbar(this._scrollable,this._options,E)),this._domNode=document.createElement("div"),this._domNode.className="monaco-scrollable-element "+this._options.className,this._domNode.setAttribute("role","presentation"),this._domNode.style.position="relative",this._domNode.style.overflow="hidden",this._domNode.appendChild(b),this._domNode.appendChild(this._horizontalScrollbar.domNode.domNode),this._domNode.appendChild(this._verticalScrollbar.domNode.domNode),this._options.useShadows?(this._leftShadowDomNode=(0,T.createFastDomNode)(document.createElement("div")),this._leftShadowDomNode.setClassName("shadow"),this._domNode.appendChild(this._leftShadowDomNode.domNode),this._topShadowDomNode=(0,T.createFastDomNode)(document.createElement("div")),this._topShadowDomNode.setClassName("shadow"),this._domNode.appendChild(this._topShadowDomNode.domNode),this._topLeftShadowDomNode=(0,T.createFastDomNode)(document.createElement("div")),this._topLeftShadowDomNode.setClassName("shadow"),this._domNode.appendChild(this._topLeftShadowDomNode.domNode)):(this._leftShadowDomNode=null,this._topShadowDomNode=null,this._topLeftShadowDomNode=null),this._listenOnDomNode=this._options.listenOnDomNode||this._domNode,this._mouseWheelToDispose=[],this._setListeningToMouseWheel(this._options.handleMouseWheel),this.onmouseover(this._listenOnDomNode,I=>this._onMouseOver(I)),this.onnonbubblingmouseout(this._listenOnDomNode,I=>this._onMouseOut(I)),this._hideTimeout=this._register(new n.TimeoutTimer),this._isDragging=!1,this._mouseIsOver=!1,this._shouldRender=!0,this._revealOnScroll=!0}dispose(){this._mouseWheelToDispose=(0,t.dispose)(this._mouseWheelToDispose),super.dispose()}getDomNode(){return this._domNode}getOverviewRulerLayoutInfo(){return{parent:this._domNode,insertBefore:this._verticalScrollbar.domNode.domNode}}delegateVerticalScrollbarMouseDown(b){this._verticalScrollbar.delegateMouseDown(b)}getScrollDimensions(){return this._scrollable.getScrollDimensions()}setScrollDimensions(b){this._scrollable.setScrollDimensions(b,!1)}updateClassName(b){this._options.className=b,s.isMacintosh&&(this._options.className+=" mac"),this._domNode.className="monaco-scrollable-element "+this._options.className}updateOptions(b){typeof b.handleMouseWheel!="undefined"&&(this._options.handleMouseWheel=b.handleMouseWheel,this._setListeningToMouseWheel(this._options.handleMouseWheel)),typeof b.mouseWheelScrollSensitivity!="undefined"&&(this._options.mouseWheelScrollSensitivity=b.mouseWheelScrollSensitivity),typeof b.fastScrollSensitivity!="undefined"&&(this._options.fastScrollSensitivity=b.fastScrollSensitivity),typeof b.scrollPredominantAxis!="undefined"&&(this._options.scrollPredominantAxis=b.scrollPredominantAxis),typeof b.horizontal!="undefined"&&(this._options.horizontal=b.horizontal),typeof b.vertical!="undefined"&&(this._options.vertical=b.vertical),typeof b.horizontalScrollbarSize!="undefined"&&(this._options.horizontalScrollbarSize=b.horizontalScrollbarSize),typeof b.verticalScrollbarSize!="undefined"&&(this._options.verticalScrollbarSize=b.verticalScrollbarSize),typeof b.scrollByPage!="undefined"&&(this._options.scrollByPage=b.scrollByPage),this._horizontalScrollbar.updateOptions(this._options),this._verticalScrollbar.updateOptions(this._options),this._options.lazyRender||this._render()}_setListeningToMouseWheel(b){if(this._mouseWheelToDispose.length>0!==b&&(this._mouseWheelToDispose=(0,t.dispose)(this._mouseWheelToDispose),b)){const m=E=>{this._onMouseWheel(new D.StandardWheelEvent(E))};this._mouseWheelToDispose.push(N.addDisposableListener(this._listenOnDomNode,N.EventType.MOUSE_WHEEL,m,{passive:!1}))}}_onMouseWheel(b){const v=o.INSTANCE;if(a){const I=window.devicePixelRatio/(0,w.getZoomFactor)();s.isWindows||s.isLinux?v.accept(Date.now(),b.deltaX/I,b.deltaY/I):v.accept(Date.now(),b.deltaX,b.deltaY)}let m=!1;if(b.deltaY||b.deltaX){let I=b.deltaY*this._options.mouseWheelScrollSensitivity,k=b.deltaX*this._options.mouseWheelScrollSensitivity;this._options.scrollPredominantAxis&&(Math.abs(I)>=Math.abs(k)?k=0:I=0),this._options.flipAxes&&([I,k]=[k,I]);const M=!s.isMacintosh&&b.browserEvent&&b.browserEvent.shiftKey;(this._options.scrollYToX||M)&&!k&&(k=I,I=0),b.browserEvent&&b.browserEvent.altKey&&(k=k*this._options.fastScrollSensitivity,I=I*this._options.fastScrollSensitivity);const P=this._scrollable.getFutureScrollPosition();let F={};if(I){const R=d*I,A=P.scrollTop-(R<0?Math.floor(R):Math.ceil(R));this._verticalScrollbar.writeScrollPosition(F,A)}if(k){const R=d*k,A=P.scrollLeft-(R<0?Math.floor(R):Math.ceil(R));this._horizontalScrollbar.writeScrollPosition(F,A)}F=this._scrollable.validateScrollPosition(F),(P.scrollLeft!==F.scrollLeft||P.scrollTop!==F.scrollTop)&&(a&&this._options.mouseWheelSmoothScroll&&v.isPhysicalMouseWheel()?this._scrollable.setScrollPositionSmooth(F):this._scrollable.setScrollPositionNow(F),m=!0)}let E=m;!E&&this._options.alwaysConsumeMouseWheel&&(E=!0),!E&&this._options.consumeMouseWheelIfScrollbarIsNeeded&&(this._verticalScrollbar.isNeeded()||this._horizontalScrollbar.isNeeded())&&(E=!0),E&&(b.preventDefault(),b.stopPropagation())}_onDidScroll(b){this._shouldRender=this._horizontalScrollbar.onDidScroll(b)||this._shouldRender,this._shouldRender=this._verticalScrollbar.onDidScroll(b)||this._shouldRender,this._options.useShadows&&(this._shouldRender=!0),this._revealOnScroll&&this._reveal(),this._options.lazyRender||this._render()}renderNow(){if(!this._options.lazyRender)throw new Error("Please use `lazyRender` together with `renderNow`!");this._render()}_render(){if(!!this._shouldRender&&(this._shouldRender=!1,this._horizontalScrollbar.render(),this._verticalScrollbar.render(),this._options.useShadows)){const b=this._scrollable.getCurrentScrollPosition(),v=b.scrollTop>0,m=b.scrollLeft>0,E=m?" left":"",I=v?" top":"",k=m||v?" top-left-corner":"";this._leftShadowDomNode.setClassName(`shadow${E}`),this._topShadowDomNode.setClassName(`shadow${I}`),this._topLeftShadowDomNode.setClassName(`shadow${k}${I}${E}`)}}_onDragStart(){this._isDragging=!0,this._reveal()}_onDragEnd(){this._isDragging=!1,this._hide()}_onMouseOut(b){this._mouseIsOver=!1,this._hide()}_onMouseOver(b){this._mouseIsOver=!0,this._reveal()}_reveal(){this._verticalScrollbar.beginReveal(),this._horizontalScrollbar.beginReveal(),this._scheduleHide()}_hide(){!this._mouseIsOver&&!this._isDragging&&(this._verticalScrollbar.beginHide(),this._horizontalScrollbar.beginHide())}_scheduleHide(){!this._mouseIsOver&&!this._isDragging&&this._hideTimeout.cancelAndSet(()=>this._hide(),u)}}e.AbstractScrollableElement=i;class l extends i{constructor(b,v){v=v||{},v.mouseWheelSmoothScroll=!1;const m=new c.Scrollable(0,E=>N.scheduleAtNextAnimationFrame(E));super(b,v,m);this._register(m)}setScrollPosition(b){this._scrollable.setScrollPositionNow(b)}getScrollPosition(){return this._scrollable.getCurrentScrollPosition()}}e.ScrollableElement=l;class h extends i{constructor(b,v,m){super(b,v,m)}setScrollPosition(b){b.reuseAnimation?this._scrollable.setScrollPositionSmooth(b,b.reuseAnimation):this._scrollable.setScrollPositionNow(b)}getScrollPosition(){return this._scrollable.getCurrentScrollPosition()}}e.SmoothScrollableElement=h;class f extends l{constructor(b,v){super(b,v);this._element=b,this.onScroll(m=>{m.scrollTopChanged&&(this._element.scrollTop=m.scrollTop),m.scrollLeftChanged&&(this._element.scrollLeft=m.scrollLeft)}),this.scanDomNode()}scanDomNode(){this.setScrollDimensions({width:this._element.clientWidth,scrollWidth:this._element.scrollWidth,height:this._element.clientHeight,scrollHeight:this._element.scrollHeight}),this.setScrollPosition({scrollLeft:this._element.scrollLeft,scrollTop:this._element.scrollTop})}}e.DomScrollableElement=f;function y(_){const b={lazyRender:typeof _.lazyRender!="undefined"?_.lazyRender:!1,className:typeof _.className!="undefined"?_.className:"",useShadows:typeof _.useShadows!="undefined"?_.useShadows:!0,handleMouseWheel:typeof _.handleMouseWheel!="undefined"?_.handleMouseWheel:!0,flipAxes:typeof _.flipAxes!="undefined"?_.flipAxes:!1,consumeMouseWheelIfScrollbarIsNeeded:typeof _.consumeMouseWheelIfScrollbarIsNeeded!="undefined"?_.consumeMouseWheelIfScrollbarIsNeeded:!1,alwaysConsumeMouseWheel:typeof _.alwaysConsumeMouseWheel!="undefined"?_.alwaysConsumeMouseWheel:!1,scrollYToX:typeof _.scrollYToX!="undefined"?_.scrollYToX:!1,mouseWheelScrollSensitivity:typeof _.mouseWheelScrollSensitivity!="undefined"?_.mouseWheelScrollSensitivity:1,fastScrollSensitivity:typeof _.fastScrollSensitivity!="undefined"?_.fastScrollSensitivity:5,scrollPredominantAxis:typeof _.scrollPredominantAxis!="undefined"?_.scrollPredominantAxis:!0,mouseWheelSmoothScroll:typeof _.mouseWheelSmoothScroll!="undefined"?_.mouseWheelSmoothScroll:!0,arrowSize:typeof _.arrowSize!="undefined"?_.arrowSize:11,listenOnDomNode:typeof _.listenOnDomNode!="undefined"?_.listenOnDomNode:null,horizontal:typeof _.horizontal!="undefined"?_.horizontal:1,horizontalScrollbarSize:typeof _.horizontalScrollbarSize!="undefined"?_.horizontalScrollbarSize:10,horizontalSliderSize:typeof _.horizontalSliderSize!="undefined"?_.horizontalSliderSize:0,horizontalHasArrows:typeof _.horizontalHasArrows!="undefined"?_.horizontalHasArrows:!1,vertical:typeof _.vertical!="undefined"?_.vertical:1,verticalScrollbarSize:typeof _.verticalScrollbarSize!="undefined"?_.verticalScrollbarSize:10,verticalHasArrows:typeof _.verticalHasArrows!="undefined"?_.verticalHasArrows:!1,verticalSliderSize:typeof _.verticalSliderSize!="undefined"?_.verticalSliderSize:0,scrollByPage:typeof _.scrollByPage!="undefined"?_.scrollByPage:!1};return b.horizontalSliderSize=typeof _.horizontalSliderSize!="undefined"?_.horizontalSliderSize:b.horizontalScrollbarSize,b.verticalSliderSize=typeof _.verticalSliderSize!="undefined"?_.verticalSliderSize:b.verticalScrollbarSize,s.isMacintosh&&(b.className+=" mac"),b}}),define(J[220],ee([0,1,7,64,2,322]),function(j,e,w,N,T){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.HoverAction=e.HoverWidget=void 0;const D=w.$;class S extends T.Disposable{constructor(){super();this.containerDomNode=document.createElement("div"),this.containerDomNode.className="monaco-hover",this.containerDomNode.tabIndex=0,this.containerDomNode.setAttribute("role","tooltip"),this.contentsDomNode=document.createElement("div"),this.contentsDomNode.className="monaco-hover-content",this._scrollbar=this._register(new N.DomScrollableElement(this.contentsDomNode,{consumeMouseWheelIfScrollbarIsNeeded:!0})),this.containerDomNode.appendChild(this._scrollbar.getDomNode())}onContentsChanged(){this._scrollbar.scanDomNode()}}e.HoverWidget=S;class p extends T.Disposable{constructor(n,g,t){super();this.actionContainer=w.append(n,D("div.action-container")),this.action=w.append(this.actionContainer,D("a.action")),this.action.setAttribute("href","#"),this.action.setAttribute("role","button"),g.iconClass&&w.append(this.action,D(`span.icon.${g.iconClass}`));const s=w.append(this.action,D("span"));s.textContent=t?`${g.label} (${t})`:g.label,this._register(w.addDisposableListener(this.actionContainer,w.EventType.MOUSE_DOWN,c=>{c.stopPropagation(),c.preventDefault(),g.run(this.actionContainer)})),this.setEnabled(!0)}static render(n,g,t){return new p(n,g,t)}setEnabled(n){n?(this.actionContainer.classList.remove("disabled"),this.actionContainer.removeAttribute("aria-disabled")):(this.actionContainer.classList.add("disabled"),this.actionContainer.setAttribute("aria-disabled","true"))}}e.HoverAction=p}),define(J[171],ee([0,1,34,169,7,94,58,64,19,14,92,4,2,38,132,133,301,307]),function(j,e,w,N,T,D,S,p,C,n,g,t,s,c,u,d,a,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ListView=e.NativeDragAndDropData=e.ExternalElementsDragAndDropData=e.ElementsDragAndDropData=void 0;const o={useShadows:!0,verticalScrollMode:1,setRowLineHeight:!0,setRowHeight:!0,supportDynamicHeights:!1,dnd:{getDragElements(b){return[b]},getDragURI(){return null},onDragStart(){},onDragOver(){return!1},drop(){}},horizontalScrolling:!1,transformOptimization:!0,alwaysConsumeMouseWheel:!0};class i{constructor(v){this.elements=v}update(){}getData(){return this.elements}}e.ElementsDragAndDropData=i;class l{constructor(v){this.elements=v}update(){}getData(){return this.elements}}e.ExternalElementsDragAndDropData=l;class h{constructor(){this.types=[],this.files=[]}update(v){if(v.types&&this.types.splice(0,this.types.length,...v.types),v.files){this.files.splice(0,this.files.length);for(let m=0;m<v.files.length;m++){const E=v.files.item(m);E&&(E.size||E.type)&&this.files.push(E)}}}getData(){return{types:this.types,files:this.files}}}e.NativeDragAndDropData=h;function f(b,v){return Array.isArray(b)&&Array.isArray(v)?(0,C.equals)(b,v):b===v}class y{constructor(v){(v==null?void 0:v.getSetSize)?this.getSetSize=v.getSetSize.bind(v):this.getSetSize=(m,E,I)=>I,(v==null?void 0:v.getPosInSet)?this.getPosInSet=v.getPosInSet.bind(v):this.getPosInSet=(m,E)=>E+1,(v==null?void 0:v.getRole)?this.getRole=v.getRole.bind(v):this.getRole=m=>"listitem",(v==null?void 0:v.isChecked)?this.isChecked=v.isChecked.bind(v):this.isChecked=m=>{}}}class _{constructor(v,m,E,I=o){if(this.virtualDelegate=m,this.domId=`list_id_${++_.InstanceCount}`,this.renderers=new Map,this.renderWidth=0,this._scrollHeight=0,this.scrollableElementUpdateDisposable=null,this.scrollableElementWidthDelayer=new n.Delayer(50),this.splicing=!1,this.dragOverAnimationStopDisposable=s.Disposable.None,this.dragOverMouseY=0,this.canDrop=!1,this.currentDragFeedbackDisposable=s.Disposable.None,this.onDragLeaveTimeout=s.Disposable.None,this.disposables=new s.DisposableStore,this._onDidChangeContentHeight=new t.Emitter,this._horizontalScrolling=!1,I.horizontalScrolling&&I.supportDynamicHeights)throw new Error("Horizontal scrolling and dynamic heights not supported simultaneously");this.items=[],this.itemId=0,this.rangeMap=new a.RangeMap;for(const M of E)this.renderers.set(M.templateId,M);this.cache=this.disposables.add(new r.RowCache(this.renderers)),this.lastRenderTop=0,this.lastRenderHeight=0,this.domNode=document.createElement("div"),this.domNode.className="monaco-list",this.domNode.classList.add(this.domId),this.domNode.tabIndex=0,this.domNode.classList.toggle("mouse-support",typeof I.mouseSupport=="boolean"?I.mouseSupport:!0),this._horizontalScrolling=(0,c.getOrDefault)(I,M=>M.horizontalScrolling,o.horizontalScrolling),this.domNode.classList.toggle("horizontal-scrolling",this._horizontalScrolling),this.additionalScrollHeight=typeof I.additionalScrollHeight=="undefined"?0:I.additionalScrollHeight,this.accessibilityProvider=new y(I.accessibilityProvider),this.rowsContainer=document.createElement("div"),this.rowsContainer.className="monaco-list-rows",(0,c.getOrDefault)(I,M=>M.transformOptimization,o.transformOptimization)&&(this.rowsContainer.style.transform="translate3d(0px, 0px, 0px)"),this.disposables.add(S.Gesture.addTarget(this.rowsContainer)),this.scrollable=new d.Scrollable((0,c.getOrDefault)(I,M=>M.smoothScrolling,!1)?125:0,M=>(0,T.scheduleAtNextAnimationFrame)(M)),this.scrollableElement=this.disposables.add(new p.SmoothScrollableElement(this.rowsContainer,{alwaysConsumeMouseWheel:(0,c.getOrDefault)(I,M=>M.alwaysConsumeMouseWheel,o.alwaysConsumeMouseWheel),horizontal:1,vertical:(0,c.getOrDefault)(I,M=>M.verticalScrollMode,o.verticalScrollMode),useShadows:(0,c.getOrDefault)(I,M=>M.useShadows,o.useShadows),mouseWheelScrollSensitivity:I.mouseWheelScrollSensitivity,fastScrollSensitivity:I.fastScrollSensitivity},this.scrollable)),this.domNode.appendChild(this.scrollableElement.getDomNode()),v.appendChild(this.domNode),this.scrollableElement.onScroll(this.onScroll,this,this.disposables),this.disposables.add((0,T.addDisposableListener)(this.rowsContainer,S.EventType.Change,M=>this.onTouchChange(M))),this.disposables.add((0,T.addDisposableListener)(this.scrollableElement.getDomNode(),"scroll",M=>M.target.scrollTop=0)),this.disposables.add((0,T.addDisposableListener)(this.domNode,"dragover",M=>this.onDragOver(this.toDragEvent(M)))),this.disposables.add((0,T.addDisposableListener)(this.domNode,"drop",M=>this.onDrop(this.toDragEvent(M)))),this.disposables.add((0,T.addDisposableListener)(this.domNode,"dragleave",M=>this.onDragLeave(this.toDragEvent(M)))),this.disposables.add((0,T.addDisposableListener)(this.domNode,"dragend",M=>this.onDragEnd(M))),this.setRowLineHeight=(0,c.getOrDefault)(I,M=>M.setRowLineHeight,o.setRowLineHeight),this.setRowHeight=(0,c.getOrDefault)(I,M=>M.setRowHeight,o.setRowHeight),this.supportDynamicHeights=(0,c.getOrDefault)(I,M=>M.supportDynamicHeights,o.supportDynamicHeights),this.dnd=(0,c.getOrDefault)(I,M=>M.dnd,o.dnd),this.layout()}get contentHeight(){return this.rangeMap.size}get horizontalScrolling(){return this._horizontalScrolling}set horizontalScrolling(v){if(v!==this._horizontalScrolling){if(v&&this.supportDynamicHeights)throw new Error("Horizontal scrolling and dynamic heights not supported simultaneously");if(this._horizontalScrolling=v,this.domNode.classList.toggle("horizontal-scrolling",this._horizontalScrolling),this._horizontalScrolling){for(const m of this.items)this.measureItemWidth(m);this.updateScrollWidth(),this.scrollableElement.setScrollDimensions({width:(0,T.getContentWidth)(this.domNode)}),this.rowsContainer.style.width=`${Math.max(this.scrollWidth||0,this.renderWidth)}px`}else this.scrollableElementWidthDelayer.cancel(),this.scrollableElement.setScrollDimensions({width:this.renderWidth,scrollWidth:this.renderWidth}),this.rowsContainer.style.width=""}}updateOptions(v){v.additionalScrollHeight!==void 0&&(this.additionalScrollHeight=v.additionalScrollHeight,this.scrollableElement.setScrollDimensions({scrollHeight:this.scrollHeight})),v.smoothScrolling!==void 0&&this.scrollable.setSmoothScrollDuration(v.smoothScrolling?125:0),v.horizontalScrolling!==void 0&&(this.horizontalScrolling=v.horizontalScrolling),v.mouseWheelScrollSensitivity!==void 0&&this.scrollableElement.updateOptions({mouseWheelScrollSensitivity:v.mouseWheelScrollSensitivity}),v.fastScrollSensitivity!==void 0&&this.scrollableElement.updateOptions({fastScrollSensitivity:v.fastScrollSensitivity})}splice(v,m,E=[]){if(this.splicing)throw new Error("Can't run recursive splices.");this.splicing=!0;try{return this._splice(v,m,E)}finally{this.splicing=!1,this._onDidChangeContentHeight.fire(this.contentHeight)}}_splice(v,m,E=[]){const I=this.getRenderRange(this.lastRenderTop,this.lastRenderHeight),k={start:v,end:v+m},M=u.Range.intersect(I,k),P=new Map;for(let G=M.start;G<M.end;G++){const x=this.items[G];if(x.dragStartDisposable.dispose(),x.row){let U=P.get(x.templateId);U||(U=[],P.set(x.templateId,U));const $=this.renderers.get(x.templateId);$&&$.disposeElement&&$.disposeElement(x.element,G,x.row.templateData,x.size),U.push(x.row)}x.row=null}const F={start:v+m,end:this.items.length},R=u.Range.intersect(F,I),A=u.Range.relativeComplement(F,I),O=E.map(G=>({id:String(this.itemId++),element:G,templateId:this.virtualDelegate.getTemplateId(G),size:this.virtualDelegate.getHeight(G),width:void 0,hasDynamicHeight:!!this.virtualDelegate.hasDynamicHeight&&this.virtualDelegate.hasDynamicHeight(G),lastDynamicHeightWidth:void 0,row:null,uri:void 0,dropTarget:!1,dragStartDisposable:s.Disposable.None}));let L;v===0&&m>=this.items.length?(this.rangeMap=new a.RangeMap,this.rangeMap.splice(0,0,O),L=this.items,this.items=O):(this.rangeMap.splice(v,m,O),L=this.items.splice(v,m,...O));const B=E.length-m,W=this.getRenderRange(this.lastRenderTop,this.lastRenderHeight),K=(0,a.shift)(R,B),H=u.Range.intersect(W,K);for(let G=H.start;G<H.end;G++)this.updateItemInDOM(this.items[G],G);const Y=u.Range.relativeComplement(K,W);for(const G of Y)for(let x=G.start;x<G.end;x++)this.removeItemFromDOM(x);const X=A.map(G=>(0,a.shift)(G,B)),se=[{start:v,end:v+E.length},...X].map(G=>u.Range.intersect(W,G)),oe=this.getNextToLastElement(se);for(const G of se)for(let x=G.start;x<G.end;x++){const U=this.items[x],$=P.get(U.templateId),V=$==null?void 0:$.pop();this.insertItemInDOM(x,oe,V)}for(const G of P.values())for(const x of G)this.cache.release(x);return this.eventuallyUpdateScrollDimensions(),this.supportDynamicHeights&&this._rerender(this.scrollTop,this.renderHeight),L.map(G=>G.element)}eventuallyUpdateScrollDimensions(){this._scrollHeight=this.contentHeight,this.rowsContainer.style.height=`${this._scrollHeight}px`,this.scrollableElementUpdateDisposable||(this.scrollableElementUpdateDisposable=(0,T.scheduleAtNextAnimationFrame)(()=>{this.scrollableElement.setScrollDimensions({scrollHeight:this.scrollHeight}),this.updateScrollWidth(),this.scrollableElementUpdateDisposable=null}))}eventuallyUpdateScrollWidth(){if(!this.horizontalScrolling){this.scrollableElementWidthDelayer.cancel();return}this.scrollableElementWidthDelayer.trigger(()=>this.updateScrollWidth())}updateScrollWidth(){if(!this.horizontalScrolling)return;let v=0;for(const m of this.items)typeof m.width!="undefined"&&(v=Math.max(v,m.width));this.scrollWidth=v,this.scrollableElement.setScrollDimensions({scrollWidth:v===0?0:v+10})}rerender(){if(!!this.supportDynamicHeights){for(const v of this.items)v.lastDynamicHeightWidth=void 0;this._rerender(this.lastRenderTop,this.lastRenderHeight)}}get length(){return this.items.length}get renderHeight(){return this.scrollableElement.getScrollDimensions().height}element(v){return this.items[v].element}domElement(v){const m=this.items[v].row;return m&&m.domNode}elementHeight(v){return this.items[v].size}elementTop(v){return this.rangeMap.positionAt(v)}indexAt(v){return this.rangeMap.indexAt(v)}indexAfter(v){return this.rangeMap.indexAfter(v)}layout(v,m){let E={height:typeof v=="number"?v:(0,T.getContentHeight)(this.domNode)};this.scrollableElementUpdateDisposable&&(this.scrollableElementUpdateDisposable.dispose(),this.scrollableElementUpdateDisposable=null,E.scrollHeight=this.scrollHeight),this.scrollableElement.setScrollDimensions(E),typeof m!="undefined"&&(this.renderWidth=m,this.supportDynamicHeights&&this._rerender(this.scrollTop,this.renderHeight)),this.horizontalScrolling&&this.scrollableElement.setScrollDimensions({width:typeof m=="number"?m:(0,T.getContentWidth)(this.domNode)})}render(v,m,E,I,k,M=!1){const P=this.getRenderRange(m,E),F=u.Range.relativeComplement(P,v),R=u.Range.relativeComplement(v,P),A=this.getNextToLastElement(F);if(M){const O=u.Range.intersect(v,P);for(let L=O.start;L<O.end;L++)this.updateItemInDOM(this.items[L],L)}for(const O of F)for(let L=O.start;L<O.end;L++)this.insertItemInDOM(L,A);for(const O of R)for(let L=O.start;L<O.end;L++)this.removeItemFromDOM(L);I!==void 0&&(this.rowsContainer.style.left=`-${I}px`),this.rowsContainer.style.top=`-${m}px`,this.horizontalScrolling&&k!==void 0&&(this.rowsContainer.style.width=`${Math.max(k,this.renderWidth)}px`),this.lastRenderTop=m,this.lastRenderHeight=E}insertItemInDOM(v,m,E){const I=this.items[v];I.row||(I.row=E??this.cache.alloc(I.templateId));const k=this.accessibilityProvider.getRole(I.element)||"listitem";I.row.domNode.setAttribute("role",k);const M=this.accessibilityProvider.isChecked(I.element);typeof M!="undefined"&&I.row.domNode.setAttribute("aria-checked",String(!!M)),I.row.domNode.parentElement||(m?this.rowsContainer.insertBefore(I.row.domNode,m):this.rowsContainer.appendChild(I.row.domNode)),this.updateItemInDOM(I,v);const P=this.renderers.get(I.templateId);if(!P)throw new Error(`No renderer found for template id ${I.templateId}`);P&&P.renderElement(I.element,v,I.row.templateData,I.size);const F=this.dnd.getDragURI(I.element);I.dragStartDisposable.dispose(),I.row.domNode.draggable=!!F,F&&(I.dragStartDisposable=(0,T.addDisposableListener)(I.row.domNode,"dragstart",R=>this.onDragStart(I.element,F,R))),this.horizontalScrolling&&(this.measureItemWidth(I),this.eventuallyUpdateScrollWidth())}measureItemWidth(v){if(!v.row||!v.row.domNode)return;v.row.domNode.style.width=w.isFirefox?"-moz-fit-content":"fit-content",v.width=(0,T.getContentWidth)(v.row.domNode);const m=window.getComputedStyle(v.row.domNode);m.paddingLeft&&(v.width+=parseFloat(m.paddingLeft)),m.paddingRight&&(v.width+=parseFloat(m.paddingRight)),v.row.domNode.style.width=""}updateItemInDOM(v,m){v.row.domNode.style.top=`${this.elementTop(m)}px`,this.setRowHeight&&(v.row.domNode.style.height=`${v.size}px`),this.setRowLineHeight&&(v.row.domNode.style.lineHeight=`${v.size}px`),v.row.domNode.setAttribute("data-index",`${m}`),v.row.domNode.setAttribute("data-last-element",m===this.length-1?"true":"false"),v.row.domNode.setAttribute("data-parity",m%2==0?"even":"odd"),v.row.domNode.setAttribute("aria-setsize",String(this.accessibilityProvider.getSetSize(v.element,m,this.length))),v.row.domNode.setAttribute("aria-posinset",String(this.accessibilityProvider.getPosInSet(v.element,m))),v.row.domNode.setAttribute("id",this.getElementDomId(m)),v.row.domNode.classList.toggle("drop-target",v.dropTarget)}removeItemFromDOM(v){const m=this.items[v];if(m.dragStartDisposable.dispose(),m.row){const E=this.renderers.get(m.templateId);E&&E.disposeElement&&E.disposeElement(m.element,v,m.row.templateData,m.size),this.cache.release(m.row),m.row=null}this.horizontalScrolling&&this.eventuallyUpdateScrollWidth()}getScrollTop(){return this.scrollableElement.getScrollPosition().scrollTop}setScrollTop(v,m){this.scrollableElementUpdateDisposable&&(this.scrollableElementUpdateDisposable.dispose(),this.scrollableElementUpdateDisposable=null,this.scrollableElement.setScrollDimensions({scrollHeight:this.scrollHeight})),this.scrollableElement.setScrollPosition({scrollTop:v,reuseAnimation:m})}get scrollTop(){return this.getScrollTop()}set scrollTop(v){this.setScrollTop(v)}get scrollHeight(){return this._scrollHeight+(this.horizontalScrolling?10:0)+this.additionalScrollHeight}get onMouseClick(){return t.Event.map(this.disposables.add(new D.DomEmitter(this.domNode,"click")).event,v=>this.toMouseEvent(v))}get onMouseDblClick(){return t.Event.map(this.disposables.add(new D.DomEmitter(this.domNode,"dblclick")).event,v=>this.toMouseEvent(v))}get onMouseMiddleClick(){return t.Event.filter(t.Event.map(this.disposables.add(new D.DomEmitter(this.domNode,"auxclick")).event,v=>this.toMouseEvent(v)),v=>v.browserEvent.button===1)}get onMouseDown(){return t.Event.map(this.disposables.add(new D.DomEmitter(this.domNode,"mousedown")).event,v=>this.toMouseEvent(v))}get onContextMenu(){return t.Event.any(t.Event.map(this.disposables.add(new D.DomEmitter(this.domNode,"contextmenu")).event,v=>this.toMouseEvent(v)),t.Event.map(this.disposables.add(new D.DomEmitter(this.domNode,S.EventType.Contextmenu)).event,v=>this.toGestureEvent(v)))}get onTouchStart(){return t.Event.map(this.disposables.add(new D.DomEmitter(this.domNode,"touchstart")).event,v=>this.toTouchEvent(v))}get onTap(){return t.Event.map(this.disposables.add(new D.DomEmitter(this.rowsContainer,S.EventType.Tap)).event,v=>this.toGestureEvent(v))}toMouseEvent(v){const m=this.getItemIndexFromEventTarget(v.target||null),E=typeof m=="undefined"?void 0:this.items[m],I=E&&E.element;return{browserEvent:v,index:m,element:I}}toTouchEvent(v){const m=this.getItemIndexFromEventTarget(v.target||null),E=typeof m=="undefined"?void 0:this.items[m],I=E&&E.element;return{browserEvent:v,index:m,element:I}}toGestureEvent(v){const m=this.getItemIndexFromEventTarget(v.initialTarget||null),E=typeof m=="undefined"?void 0:this.items[m],I=E&&E.element;return{browserEvent:v,index:m,element:I}}toDragEvent(v){const m=this.getItemIndexFromEventTarget(v.target||null),E=typeof m=="undefined"?void 0:this.items[m],I=E&&E.element;return{browserEvent:v,index:m,element:I}}onScroll(v){try{const m=this.getRenderRange(this.lastRenderTop,this.lastRenderHeight);this.render(m,v.scrollTop,v.height,v.scrollLeft,v.scrollWidth),this.supportDynamicHeights&&this._rerender(v.scrollTop,v.height,v.inSmoothScrolling)}catch(m){throw console.error("Got bad scroll event:",v),m}}onTouchChange(v){v.preventDefault(),v.stopPropagation(),this.scrollTop-=v.translationY}onDragStart(v,m,E){if(!E.dataTransfer)return;const I=this.dnd.getDragElements(v);if(E.dataTransfer.effectAllowed="copyMove",E.dataTransfer.setData(N.DataTransfers.TEXT,m),E.dataTransfer.setDragImage){let k;this.dnd.getDragLabel&&(k=this.dnd.getDragLabel(I,E)),typeof k=="undefined"&&(k=String(I.length));const M=(0,T.$)(".monaco-drag-image");M.textContent=k,document.body.appendChild(M),E.dataTransfer.setDragImage(M,-10,-10),setTimeout(()=>document.body.removeChild(M),0)}this.currentDragData=new i(I),N.StaticDND.CurrentDragAndDropData=new l(I),this.dnd.onDragStart&&this.dnd.onDragStart(this.currentDragData,E)}onDragOver(v){if(v.browserEvent.preventDefault(),this.onDragLeaveTimeout.dispose(),N.StaticDND.CurrentDragAndDropData&&N.StaticDND.CurrentDragAndDropData.getData()==="vscode-ui"||(this.setupDragAndDropScrollTopAnimation(v.browserEvent),!v.browserEvent.dataTransfer))return!1;if(!this.currentDragData)if(N.StaticDND.CurrentDragAndDropData)this.currentDragData=N.StaticDND.CurrentDragAndDropData;else{if(!v.browserEvent.dataTransfer.types)return!1;this.currentDragData=new h}const m=this.dnd.onDragOver(this.currentDragData,v.element,v.index,v.browserEvent);if(this.canDrop=typeof m=="boolean"?m:m.accept,!this.canDrop)return this.currentDragFeedback=void 0,this.currentDragFeedbackDisposable.dispose(),!1;v.browserEvent.dataTransfer.dropEffect=typeof m!="boolean"&&m.effect===0?"copy":"move";let E;if(typeof m!="boolean"&&m.feedback?E=m.feedback:typeof v.index=="undefined"?E=[-1]:E=[v.index],E=(0,C.distinct)(E).filter(I=>I>=-1&&I<this.length).sort((I,k)=>I-k),E=E[0]===-1?[-1]:E,f(this.currentDragFeedback,E))return!0;if(this.currentDragFeedback=E,this.currentDragFeedbackDisposable.dispose(),E[0]===-1)this.domNode.classList.add("drop-target"),this.rowsContainer.classList.add("drop-target"),this.currentDragFeedbackDisposable=(0,s.toDisposable)(()=>{this.domNode.classList.remove("drop-target"),this.rowsContainer.classList.remove("drop-target")});else{for(const I of E){const k=this.items[I];k.dropTarget=!0,k.row&&k.row.domNode.classList.add("drop-target")}this.currentDragFeedbackDisposable=(0,s.toDisposable)(()=>{for(const I of E){const k=this.items[I];k.dropTarget=!1,k.row&&k.row.domNode.classList.remove("drop-target")}})}return!0}onDragLeave(v){var m,E;this.onDragLeaveTimeout.dispose(),this.onDragLeaveTimeout=(0,n.disposableTimeout)(()=>this.clearDragOverFeedback(),100),this.currentDragData&&((E=(m=this.dnd).onDragLeave)===null||E===void 0||E.call(m,this.currentDragData,v.element,v.index,v.browserEvent))}onDrop(v){if(!this.canDrop)return;const m=this.currentDragData;this.teardownDragAndDropScrollTopAnimation(),this.clearDragOverFeedback(),this.currentDragData=void 0,N.StaticDND.CurrentDragAndDropData=void 0,!(!m||!v.browserEvent.dataTransfer)&&(v.browserEvent.preventDefault(),m.update(v.browserEvent.dataTransfer),this.dnd.drop(m,v.element,v.index,v.browserEvent))}onDragEnd(v){this.canDrop=!1,this.teardownDragAndDropScrollTopAnimation(),this.clearDragOverFeedback(),this.currentDragData=void 0,N.StaticDND.CurrentDragAndDropData=void 0,this.dnd.onDragEnd&&this.dnd.onDragEnd(v)}clearDragOverFeedback(){this.currentDragFeedback=void 0,this.currentDragFeedbackDisposable.dispose(),this.currentDragFeedbackDisposable=s.Disposable.None}setupDragAndDropScrollTopAnimation(v){if(!this.dragOverAnimationDisposable){const m=(0,T.getTopLeftOffset)(this.domNode).top;this.dragOverAnimationDisposable=(0,T.animate)(this.animateDragAndDropScrollTop.bind(this,m))}this.dragOverAnimationStopDisposable.dispose(),this.dragOverAnimationStopDisposable=(0,n.disposableTimeout)(()=>{this.dragOverAnimationDisposable&&(this.dragOverAnimationDisposable.dispose(),this.dragOverAnimationDisposable=void 0)},1e3),this.dragOverMouseY=v.pageY}animateDragAndDropScrollTop(v){if(this.dragOverMouseY===void 0)return;const m=this.dragOverMouseY-v,E=this.renderHeight-35;m<35?this.scrollTop+=Math.max(-14,Math.floor(.3*(m-35))):m>E&&(this.scrollTop+=Math.min(14,Math.floor(.3*(m-E))))}teardownDragAndDropScrollTopAnimation(){this.dragOverAnimationStopDisposable.dispose(),this.dragOverAnimationDisposable&&(this.dragOverAnimationDisposable.dispose(),this.dragOverAnimationDisposable=void 0)}getItemIndexFromEventTarget(v){const m=this.scrollableElement.getDomNode();let E=v;for(;E instanceof HTMLElement&&E!==this.rowsContainer&&m.contains(E);){const I=E.getAttribute("data-index");if(I){const k=Number(I);if(!isNaN(k))return k}E=E.parentElement}}getRenderRange(v,m){return{start:this.rangeMap.indexAt(v),end:this.rangeMap.indexAfter(v+m-1)}}_rerender(v,m,E){const I=this.getRenderRange(v,m);let k,M;v===this.elementTop(I.start)?(k=I.start,M=0):I.end-I.start>1&&(k=I.start+1,M=this.elementTop(k)-v);let P=0;for(;;){const F=this.getRenderRange(v,m);let R=!1;for(let A=F.start;A<F.end;A++){const O=this.probeDynamicHeight(A);O!==0&&this.rangeMap.splice(A,1,[this.items[A]]),P+=O,R=R||O!==0}if(!R){P!==0&&this.eventuallyUpdateScrollDimensions();const A=u.Range.relativeComplement(I,F);for(const L of A)for(let B=L.start;B<L.end;B++)this.items[B].row&&this.removeItemFromDOM(B);const O=u.Range.relativeComplement(F,I);for(const L of O)for(let B=L.start;B<L.end;B++){const W=B+1,K=W<this.items.length?this.items[W].row:null,H=K?K.domNode:null;this.insertItemInDOM(B,H)}for(let L=F.start;L<F.end;L++)this.items[L].row&&this.updateItemInDOM(this.items[L],L);if(typeof k=="number"){const L=this.scrollable.getFutureScrollPosition().scrollTop-v,B=this.elementTop(k)-M+L;this.setScrollTop(B,E)}this._onDidChangeContentHeight.fire(this.contentHeight);return}}}probeDynamicHeight(v){const m=this.items[v];if(this.virtualDelegate.getDynamicHeight){const M=this.virtualDelegate.getDynamicHeight(m.element);if(M!==null){const P=m.size;return m.size=M,m.lastDynamicHeightWidth=this.renderWidth,M-P}}if(!m.hasDynamicHeight||m.lastDynamicHeightWidth===this.renderWidth||!!this.virtualDelegate.hasDynamicHeight&&!this.virtualDelegate.hasDynamicHeight(m.element))return 0;const E=m.size;if(!this.setRowHeight&&m.row){let M=m.row.domNode.offsetHeight;return m.size=M,m.lastDynamicHeightWidth=this.renderWidth,M-E}const I=this.cache.alloc(m.templateId);I.domNode.style.height="",this.rowsContainer.appendChild(I.domNode);const k=this.renderers.get(m.templateId);return k&&(k.renderElement(m.element,v,I.templateData,void 0),k.disposeElement&&k.disposeElement(m.element,v,I.templateData,void 0)),m.size=I.domNode.offsetHeight,this.virtualDelegate.setDynamicHeight&&this.virtualDelegate.setDynamicHeight(m.element,m.size),m.lastDynamicHeightWidth=this.renderWidth,this.rowsContainer.removeChild(I.domNode),this.cache.release(I),m.size-E}getNextToLastElement(v){const m=v[v.length-1];if(!m)return null;const E=this.items[m.end];return!E||!E.row?null:E.row.domNode}getElementDomId(v){return`${this.domId}_${v}`}dispose(){if(this.items){for(const v of this.items)if(v.row){const m=this.renderers.get(v.row.templateId);m&&(m.disposeElement&&m.disposeElement(v.element,-1,v.row.templateData,void 0),m.disposeTemplate(v.row.templateData))}this.items=[]}this.domNode&&this.domNode.parentNode&&this.domNode.parentNode.removeChild(this.domNode),(0,s.dispose)(this.disposables)}}_.InstanceCount=0,Fe([g.memoize],_.prototype,"onMouseClick",null),Fe([g.memoize],_.prototype,"onMouseDblClick",null),Fe([g.memoize],_.prototype,"onMouseMiddleClick",null),Fe([g.memoize],_.prototype,"onMouseDown",null),Fe([g.memoize],_.prototype,"onContextMenu",null),Fe([g.memoize],_.prototype,"onTouchStart",null),Fe([g.memoize],_.prototype,"onTap",null),e.ListView=_}),define(J[111],ee([0,1,7,94,52,58,45,296,19,14,29,92,4,68,2,106,38,17,20,295,171,219]),function(j,e,w,N,T,D,S,p,C,n,g,t,s,c,u,d,a,r,o,i,l){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.List=e.DefaultStyleController=e.MouseController=e.isSelectionRangeChangeEvent=e.isSelectionSingleChangeEvent=e.DefaultKeyboardNavigationDelegate=e.isMonacoEditor=e.isInputElement=void 0;class h{constructor(x){this.trait=x,this.renderedElements=[]}get templateId(){return`template:${this.trait.trait}`}renderTemplate(x){return x}renderElement(x,U,$){const V=this.renderedElements.findIndex(Q=>Q.templateData===$);if(V>=0){const Q=this.renderedElements[V];this.trait.unrender($),Q.index=U}else{const Q={index:U,templateData:$};this.renderedElements.push(Q)}this.trait.renderIndex(U,$)}splice(x,U,$){const V=[];for(const Q of this.renderedElements)Q.index<x?V.push(Q):Q.index>=x+U&&V.push({index:Q.index+$-U,templateData:Q.templateData});this.renderedElements=V}renderIndexes(x){for(const{index:U,templateData:$}of this.renderedElements)x.indexOf(U)>-1&&this.trait.renderIndex(U,$)}disposeTemplate(x){const U=this.renderedElements.findIndex($=>$.templateData===x);U<0||this.renderedElements.splice(U,1)}}class f{constructor(x){this._trait=x,this.length=0,this.indexes=[],this.sortedIndexes=[],this._onChange=new s.Emitter,this.onChange=this._onChange.event}get trait(){return this._trait}get renderer(){return new h(this)}splice(x,U,$){var V;U=Math.max(0,Math.min(U,this.length-x));const Q=$.length-U,ue=x+U,pe=[...this.sortedIndexes.filter(re=>re<x),...$.map((re,ie)=>re?ie+x:-1).filter(re=>re!==-1),...this.sortedIndexes.filter(re=>re>=ue).map(re=>re+Q)],fe=this.length+Q;if(this.sortedIndexes.length>0&&pe.length===0&&fe>0){const re=(V=this.sortedIndexes.find(ie=>ie>=x))!==null&&V!==void 0?V:fe-1;pe.push(Math.min(re,fe-1))}this.renderer.splice(x,U,$.length),this._set(pe,pe),this.length=fe}renderIndex(x,U){U.classList.toggle(this._trait,this.contains(x))}unrender(x){x.classList.remove(this._trait)}set(x,U){return this._set(x,[...x].sort(Y),U)}_set(x,U,$){const V=this.indexes,Q=this.sortedIndexes;this.indexes=x,this.sortedIndexes=U;const ue=K(Q,x);return this.renderer.renderIndexes(ue),this._onChange.fire({indexes:x,browserEvent:$}),V}get(){return this.indexes}contains(x){return(0,C.binarySearch)(this.sortedIndexes,x,Y)>=0}dispose(){(0,u.dispose)(this._onChange)}}Fe([t.memoize],f.prototype,"renderer",null);class y extends f{constructor(x){super("selected");this.setAriaSelected=x}renderIndex(x,U){super.renderIndex(x,U),this.setAriaSelected&&(this.contains(x)?U.setAttribute("aria-selected","true"):U.setAttribute("aria-selected","false"))}}class _{constructor(x,U,$){this.trait=x,this.view=U,this.identityProvider=$}splice(x,U,$){if(!this.identityProvider)return this.trait.splice(x,U,$.map(()=>!1));const V=this.trait.get().map(ue=>this.identityProvider.getId(this.view.element(ue)).toString()),Q=$.map(ue=>V.indexOf(this.identityProvider.getId(ue).toString())>-1);this.trait.splice(x,U,Q)}}function b(G){return G.tagName==="INPUT"||G.tagName==="TEXTAREA"}e.isInputElement=b;function v(G){return G.classList.contains("monaco-editor")?!0:G.classList.contains("monaco-list")||!G.parentElement?!1:v(G.parentElement)}e.isMonacoEditor=v;class m{constructor(x,U,$){this.list=x,this.view=U,this.disposables=new u.DisposableStore,this.multipleSelectionDisposables=new u.DisposableStore,this.onKeyDown.filter(V=>V.keyCode===3).on(this.onEnter,this,this.disposables),this.onKeyDown.filter(V=>V.keyCode===16).on(this.onUpArrow,this,this.disposables),this.onKeyDown.filter(V=>V.keyCode===18).on(this.onDownArrow,this,this.disposables),this.onKeyDown.filter(V=>V.keyCode===11).on(this.onPageUpArrow,this,this.disposables),this.onKeyDown.filter(V=>V.keyCode===12).on(this.onPageDownArrow,this,this.disposables),this.onKeyDown.filter(V=>V.keyCode===9).on(this.onEscape,this,this.disposables),$.multipleSelectionSupport!==!1&&this.onKeyDown.filter(V=>(r.isMacintosh?V.metaKey:V.ctrlKey)&&V.keyCode===31).on(this.onCtrlA,this,this.multipleSelectionDisposables)}get onKeyDown(){return s.Event.chain(this.disposables.add(new N.DomEmitter(this.view.domNode,"keydown")).event).filter(x=>!b(x.target)).map(x=>new T.StandardKeyboardEvent(x))}updateOptions(x){x.multipleSelectionSupport!==void 0&&(this.multipleSelectionDisposables.clear(),x.multipleSelectionSupport&&this.onKeyDown.filter(U=>(r.isMacintosh?U.metaKey:U.ctrlKey)&&U.keyCode===31).on(this.onCtrlA,this,this.multipleSelectionDisposables))}onEnter(x){x.preventDefault(),x.stopPropagation(),this.list.setSelection(this.list.getFocus(),x.browserEvent)}onUpArrow(x){x.preventDefault(),x.stopPropagation(),this.list.focusPrevious(1,!1,x.browserEvent);const U=this.list.getFocus()[0];this.list.setAnchor(U),this.list.reveal(U),this.view.domNode.focus()}onDownArrow(x){x.preventDefault(),x.stopPropagation(),this.list.focusNext(1,!1,x.browserEvent);const U=this.list.getFocus()[0];this.list.setAnchor(U),this.list.reveal(U),this.view.domNode.focus()}onPageUpArrow(x){x.preventDefault(),x.stopPropagation(),this.list.focusPreviousPage(x.browserEvent);const U=this.list.getFocus()[0];this.list.setAnchor(U),this.list.reveal(U),this.view.domNode.focus()}onPageDownArrow(x){x.preventDefault(),x.stopPropagation(),this.list.focusNextPage(x.browserEvent);const U=this.list.getFocus()[0];this.list.setAnchor(U),this.list.reveal(U),this.view.domNode.focus()}onCtrlA(x){x.preventDefault(),x.stopPropagation(),this.list.setSelection((0,C.range)(this.list.length),x.browserEvent),this.list.setAnchor(void 0),this.view.domNode.focus()}onEscape(x){this.list.getSelection().length&&(x.preventDefault(),x.stopPropagation(),this.list.setSelection([],x.browserEvent),this.list.setAnchor(void 0),this.view.domNode.focus())}dispose(){this.disposables.dispose(),this.multipleSelectionDisposables.dispose()}}Fe([t.memoize],m.prototype,"onKeyDown",null);var E;(function(G){G[G.Idle=0]="Idle",G[G.Typing=1]="Typing"})(E||(E={})),e.DefaultKeyboardNavigationDelegate=new class{mightProducePrintableCharacter(G){return G.ctrlKey||G.metaKey||G.altKey?!1:G.keyCode>=31&&G.keyCode<=56||G.keyCode>=21&&G.keyCode<=30||G.keyCode>=93&&G.keyCode<=102||G.keyCode>=80&&G.keyCode<=90}};class I{constructor(x,U,$,V){this.list=x,this.view=U,this.keyboardNavigationLabelProvider=$,this.delegate=V,this.enabled=!1,this.state=E.Idle,this.automaticKeyboardNavigation=!0,this.triggered=!1,this.previouslyFocused=-1,this.enabledDisposables=new u.DisposableStore,this.disposables=new u.DisposableStore,this.updateOptions(x.options)}updateOptions(x){(typeof x.enableKeyboardNavigation=="undefined"?!0:!!x.enableKeyboardNavigation)?this.enable():this.disable(),typeof x.automaticKeyboardNavigation!="undefined"&&(this.automaticKeyboardNavigation=x.automaticKeyboardNavigation)}enable(){if(this.enabled)return;const x=s.Event.chain(this.enabledDisposables.add(new N.DomEmitter(this.view.domNode,"keydown")).event).filter(V=>!b(V.target)).filter(()=>this.automaticKeyboardNavigation||this.triggered).map(V=>new T.StandardKeyboardEvent(V)).filter(V=>this.delegate.mightProducePrintableCharacter(V)).forEach(V=>{V.stopPropagation(),V.preventDefault()}).map(V=>V.browserEvent.key).event,U=s.Event.debounce(x,()=>null,800);s.Event.reduce(s.Event.any(x,U),(V,Q)=>Q===null?null:(V||"")+Q)(this.onInput,this,this.enabledDisposables),U(this.onClear,this,this.enabledDisposables),this.enabled=!0,this.triggered=!1}disable(){!this.enabled||(this.enabledDisposables.clear(),this.enabled=!1,this.triggered=!1)}onClear(){var x;const U=this.list.getFocus();if(U.length>0&&U[0]===this.previouslyFocused){const $=(x=this.list.options.accessibilityProvider)===null||x===void 0?void 0:x.getAriaLabel(this.list.element(U[0]));$&&(0,S.alert)($)}this.previouslyFocused=-1}onInput(x){if(!x){this.state=E.Idle,this.triggered=!1;return}const U=this.list.getFocus(),$=U.length>0?U[0]:0,V=this.state===E.Idle?1:0;this.state=E.Typing;for(let Q=0;Q<this.list.length;Q++){const ue=($+Q+V)%this.list.length,pe=this.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(this.view.element(ue)),fe=pe&&pe.toString();if(typeof fe=="undefined"||(0,c.matchesPrefix)(x,fe)){this.previouslyFocused=$,this.list.setFocus([ue]),this.list.reveal(ue);return}}}dispose(){this.disable(),this.enabledDisposables.dispose(),this.disposables.dispose()}}class k{constructor(x,U){this.list=x,this.view=U,this.disposables=new u.DisposableStore,s.Event.chain(this.disposables.add(new N.DomEmitter(U.domNode,"keydown")).event).filter(V=>!b(V.target)).map(V=>new T.StandardKeyboardEvent(V)).filter(V=>V.keyCode===2&&!V.ctrlKey&&!V.metaKey&&!V.shiftKey&&!V.altKey).on(this.onTab,this,this.disposables)}onTab(x){if(x.target!==this.view.domNode)return;const U=this.list.getFocus();if(U.length===0)return;const $=this.view.domElement(U[0]);if(!$)return;const V=$.querySelector("[tabIndex]");if(!V||!(V instanceof HTMLElement)||V.tabIndex===-1)return;const Q=window.getComputedStyle(V);Q.visibility==="hidden"||Q.display==="none"||(x.preventDefault(),x.stopPropagation(),V.focus())}dispose(){this.disposables.dispose()}}function M(G){return r.isMacintosh?G.browserEvent.metaKey:G.browserEvent.ctrlKey}e.isSelectionSingleChangeEvent=M;function P(G){return G.browserEvent.shiftKey}e.isSelectionRangeChangeEvent=P;function F(G){return G instanceof MouseEvent&&G.button===2}const R={isSelectionSingleChangeEvent:M,isSelectionRangeChangeEvent:P};class A{constructor(x){this.list=x,this.disposables=new u.DisposableStore,this._onPointer=new s.Emitter,this.onPointer=this._onPointer.event,x.options.multipleSelectionSupport!==!1&&(this.multipleSelectionController=this.list.options.multipleSelectionController||R),this.mouseSupport=typeof x.options.mouseSupport=="undefined"||!!x.options.mouseSupport,this.mouseSupport&&(x.onMouseDown(this.onMouseDown,this,this.disposables),x.onContextMenu(this.onContextMenu,this,this.disposables),x.onMouseDblClick(this.onDoubleClick,this,this.disposables),x.onTouchStart(this.onMouseDown,this,this.disposables),this.disposables.add(D.Gesture.addTarget(x.getHTMLElement()))),s.Event.any(x.onMouseClick,x.onMouseMiddleClick,x.onTap)(this.onViewPointer,this,this.disposables)}updateOptions(x){x.multipleSelectionSupport!==void 0&&(this.multipleSelectionController=void 0,x.multipleSelectionSupport&&(this.multipleSelectionController=this.list.options.multipleSelectionController||R))}isSelectionSingleChangeEvent(x){return this.multipleSelectionController?this.multipleSelectionController.isSelectionSingleChangeEvent(x):!1}isSelectionRangeChangeEvent(x){return this.multipleSelectionController?this.multipleSelectionController.isSelectionRangeChangeEvent(x):!1}isSelectionChangeEvent(x){return this.isSelectionSingleChangeEvent(x)||this.isSelectionRangeChangeEvent(x)}onMouseDown(x){v(x.browserEvent.target)||document.activeElement!==x.browserEvent.target&&this.list.domFocus()}onContextMenu(x){if(v(x.browserEvent.target))return;const U=typeof x.index=="undefined"?[]:[x.index];this.list.setFocus(U,x.browserEvent)}onViewPointer(x){if(!this.mouseSupport||b(x.browserEvent.target)||v(x.browserEvent.target))return;const U=x.index;if(typeof U=="undefined"){this.list.setFocus([],x.browserEvent),this.list.setSelection([],x.browserEvent),this.list.setAnchor(void 0);return}if(this.isSelectionRangeChangeEvent(x))return this.changeSelection(x);if(this.isSelectionChangeEvent(x))return this.changeSelection(x);this.list.setFocus([U],x.browserEvent),this.list.setAnchor(U),F(x.browserEvent)||this.list.setSelection([U],x.browserEvent),this._onPointer.fire(x)}onDoubleClick(x){if(b(x.browserEvent.target)||v(x.browserEvent.target)||this.isSelectionChangeEvent(x))return;const U=this.list.getFocus();this.list.setSelection(U,x.browserEvent)}changeSelection(x){const U=x.index;let $=this.list.getAnchor();if(this.isSelectionRangeChangeEvent(x)){if(typeof $=="undefined"){const ie=this.list.getFocus()[0];$=ie??U,this.list.setAnchor($)}const V=Math.min($,U),Q=Math.max($,U),ue=(0,C.range)(V,Q+1),pe=this.list.getSelection(),fe=W(K(pe,[$]),$);if(fe.length===0)return;const re=K(ue,H(pe,fe));this.list.setSelection(re,x.browserEvent),this.list.setFocus([U],x.browserEvent)}else if(this.isSelectionSingleChangeEvent(x)){const V=this.list.getSelection(),Q=V.filter(ue=>ue!==U);this.list.setFocus([U]),this.list.setAnchor(U),V.length===Q.length?this.list.setSelection([...Q,U],x.browserEvent):this.list.setSelection(Q,x.browserEvent)}}dispose(){this.disposables.dispose()}}e.MouseController=A;class O{constructor(x,U){this.styleElement=x,this.selectorSuffix=U}style(x){const U=this.selectorSuffix&&`.${this.selectorSuffix}`,$=[];x.listBackground&&(x.listBackground.isOpaque()?$.push(`.monaco-list${U} .monaco-list-rows { background: ${x.listBackground}; }`):r.isMacintosh||console.warn(`List with id '${this.selectorSuffix}' was styled with a non-opaque background color. This will break sub-pixel antialiasing.`)),x.listFocusBackground&&($.push(`.monaco-list${U}:focus .monaco-list-row.focused { background-color: ${x.listFocusBackground}; }`),$.push(`.monaco-list${U}:focus .monaco-list-row.focused:hover { background-color: ${x.listFocusBackground}; }`)),x.listFocusForeground&&$.push(`.monaco-list${U}:focus .monaco-list-row.focused { color: ${x.listFocusForeground}; }`),x.listActiveSelectionBackground&&($.push(`.monaco-list${U}:focus .monaco-list-row.selected { background-color: ${x.listActiveSelectionBackground}; }`),$.push(`.monaco-list${U}:focus .monaco-list-row.selected:hover { background-color: ${x.listActiveSelectionBackground}; }`)),x.listActiveSelectionForeground&&$.push(`.monaco-list${U}:focus .monaco-list-row.selected { color: ${x.listActiveSelectionForeground}; }`),x.listActiveSelectionIconForeground&&$.push(`.monaco-list${U}:focus .monaco-list-row.selected .codicon { color: ${x.listActiveSelectionIconForeground}; }`),x.listFocusAndSelectionBackground&&$.push(`
                .monaco-drag-image,
                .monaco-list${U}:focus .monaco-list-row.selected.focused { background-color: ${x.listFocusAndSelectionBackground}; }
            `),x.listFocusAndSelectionForeground&&$.push(`
                .monaco-drag-image,
                .monaco-list${U}:focus .monaco-list-row.selected.focused { color: ${x.listFocusAndSelectionForeground}; }
            `),x.listInactiveFocusForeground&&($.push(`.monaco-list${U} .monaco-list-row.focused { color:  ${x.listInactiveFocusForeground}; }`),$.push(`.monaco-list${U} .monaco-list-row.focused:hover { color:  ${x.listInactiveFocusForeground}; }`)),x.listInactiveSelectionIconForeground&&$.push(`.monaco-list${U} .monaco-list-row.focused .codicon { color:  ${x.listInactiveSelectionIconForeground}; }`),x.listInactiveFocusBackground&&($.push(`.monaco-list${U} .monaco-list-row.focused { background-color:  ${x.listInactiveFocusBackground}; }`),$.push(`.monaco-list${U} .monaco-list-row.focused:hover { background-color:  ${x.listInactiveFocusBackground}; }`)),x.listInactiveSelectionBackground&&($.push(`.monaco-list${U} .monaco-list-row.selected { background-color:  ${x.listInactiveSelectionBackground}; }`),$.push(`.monaco-list${U} .monaco-list-row.selected:hover { background-color:  ${x.listInactiveSelectionBackground}; }`)),x.listInactiveSelectionForeground&&$.push(`.monaco-list${U} .monaco-list-row.selected { color: ${x.listInactiveSelectionForeground}; }`),x.listHoverBackground&&$.push(`.monaco-list${U}:not(.drop-target) .monaco-list-row:hover:not(.selected):not(.focused) { background-color: ${x.listHoverBackground}; }`),x.listHoverForeground&&$.push(`.monaco-list${U} .monaco-list-row:hover:not(.selected):not(.focused) { color:  ${x.listHoverForeground}; }`),x.listSelectionOutline&&$.push(`.monaco-list${U} .monaco-list-row.selected { outline: 1px dotted ${x.listSelectionOutline}; outline-offset: -1px; }`),x.listFocusOutline&&$.push(`
                .monaco-drag-image,
                .monaco-list${U}:focus .monaco-list-row.focused { outline: 1px solid ${x.listFocusOutline}; outline-offset: -1px; }
            `),x.listInactiveFocusOutline&&$.push(`.monaco-list${U} .monaco-list-row.focused { outline: 1px dotted ${x.listInactiveFocusOutline}; outline-offset: -1px; }`),x.listHoverOutline&&$.push(`.monaco-list${U} .monaco-list-row:hover { outline: 1px dashed ${x.listHoverOutline}; outline-offset: -1px; }`),x.listDropBackground&&$.push(`
                .monaco-list${U}.drop-target,
                .monaco-list${U} .monaco-list-rows.drop-target,
                .monaco-list${U} .monaco-list-row.drop-target { background-color: ${x.listDropBackground} !important; color: inherit !important; }
            `),x.listFilterWidgetBackground&&$.push(`.monaco-list-type-filter { background-color: ${x.listFilterWidgetBackground} }`),x.listFilterWidgetOutline&&$.push(`.monaco-list-type-filter { border: 1px solid ${x.listFilterWidgetOutline}; }`),x.listFilterWidgetNoMatchesOutline&&$.push(`.monaco-list-type-filter.no-matches { border: 1px solid ${x.listFilterWidgetNoMatchesOutline}; }`),x.listMatchesShadow&&$.push(`.monaco-list-type-filter { box-shadow: 1px 1px 1px ${x.listMatchesShadow}; }`),x.tableColumnsBorder&&$.push(`
                .monaco-table:hover > .monaco-split-view2,
                .monaco-table:hover > .monaco-split-view2 .monaco-sash.vertical::before {
                    border-color: ${x.tableColumnsBorder};
            }`),this.styleElement.textContent=$.join(`
`)}}e.DefaultStyleController=O;const L={listFocusBackground:g.Color.fromHex("#7FB0D0"),listActiveSelectionBackground:g.Color.fromHex("#0E639C"),listActiveSelectionForeground:g.Color.fromHex("#FFFFFF"),listActiveSelectionIconForeground:g.Color.fromHex("#FFFFFF"),listFocusAndSelectionBackground:g.Color.fromHex("#094771"),listFocusAndSelectionForeground:g.Color.fromHex("#FFFFFF"),listInactiveSelectionBackground:g.Color.fromHex("#3F3F46"),listInactiveSelectionIconForeground:g.Color.fromHex("#FFFFFF"),listHoverBackground:g.Color.fromHex("#2A2D2E"),listDropBackground:g.Color.fromHex("#383B3D"),treeIndentGuidesStroke:g.Color.fromHex("#a9a9a9"),tableColumnsBorder:g.Color.fromHex("#cccccc").transparent(.2)},B={keyboardSupport:!0,mouseSupport:!0,multipleSelectionSupport:!0,dnd:{getDragURI(){return null},onDragStart(){},onDragOver(){return!1},drop(){}}};function W(G,x){const U=G.indexOf(x);if(U===-1)return[];const $=[];let V=U-1;for(;V>=0&&G[V]===x-(U-V);)$.push(G[V--]);for($.reverse(),V=U;V<G.length&&G[V]===x+(V-U);)$.push(G[V++]);return $}function K(G,x){const U=[];let $=0,V=0;for(;$<G.length||V<x.length;)if($>=G.length)U.push(x[V++]);else if(V>=x.length)U.push(G[$++]);else if(G[$]===x[V]){U.push(G[$]),$++,V++;continue}else G[$]<x[V]?U.push(G[$++]):U.push(x[V++]);return U}function H(G,x){const U=[];let $=0,V=0;for(;$<G.length||V<x.length;)if($>=G.length)U.push(x[V++]);else if(V>=x.length)U.push(G[$++]);else if(G[$]===x[V]){$++,V++;continue}else G[$]<x[V]?U.push(G[$++]):V++;return U}const Y=(G,x)=>G-x;class X{constructor(x,U){this._templateId=x,this.renderers=U}get templateId(){return this._templateId}renderTemplate(x){return this.renderers.map(U=>U.renderTemplate(x))}renderElement(x,U,$,V){let Q=0;for(const ue of this.renderers)ue.renderElement(x,U,$[Q++],V)}disposeElement(x,U,$,V){let Q=0;for(const ue of this.renderers)ue.disposeElement&&ue.disposeElement(x,U,$[Q],V),Q+=1}disposeTemplate(x){let U=0;for(const $ of this.renderers)$.disposeTemplate(x[U++])}}class Z{constructor(x){this.accessibilityProvider=x,this.templateId="a18n"}renderTemplate(x){return x}renderElement(x,U,$){const V=this.accessibilityProvider.getAriaLabel(x);V?$.setAttribute("aria-label",V):$.removeAttribute("aria-label");const Q=this.accessibilityProvider.getAriaLevel&&this.accessibilityProvider.getAriaLevel(x);typeof Q=="number"?$.setAttribute("aria-level",`${Q}`):$.removeAttribute("aria-level")}disposeTemplate(x){}}class se{constructor(x,U){this.list=x,this.dnd=U}getDragElements(x){const U=this.list.getSelectedElements();return U.indexOf(x)>-1?U:[x]}getDragURI(x){return this.dnd.getDragURI(x)}getDragLabel(x,U){if(this.dnd.getDragLabel)return this.dnd.getDragLabel(x,U)}onDragStart(x,U){this.dnd.onDragStart&&this.dnd.onDragStart(x,U)}onDragOver(x,U,$,V){return this.dnd.onDragOver(x,U,$,V)}onDragLeave(x,U,$,V){var Q,ue;(ue=(Q=this.dnd).onDragLeave)===null||ue===void 0||ue.call(Q,x,U,$,V)}onDragEnd(x){this.dnd.onDragEnd&&this.dnd.onDragEnd(x)}drop(x,U,$,V){this.dnd.drop(x,U,$,V)}}class oe{constructor(x,U,$,V,Q=B){var ue;this.user=x,this._options=Q,this.focus=new f("focused"),this.anchor=new f("anchor"),this.eventBufferer=new s.EventBufferer,this._ariaLabel="",this.disposables=new u.DisposableStore,this._onDidDispose=new s.Emitter,this.onDidDispose=this._onDidDispose.event;const pe=this._options.accessibilityProvider&&this._options.accessibilityProvider.getWidgetRole?(ue=this._options.accessibilityProvider)===null||ue===void 0?void 0:ue.getWidgetRole():"list";this.selection=new y(pe!=="listbox"),(0,a.mixin)(Q,L,!1);const fe=[this.focus.renderer,this.selection.renderer];this.accessibilityProvider=Q.accessibilityProvider,this.accessibilityProvider&&(fe.push(new Z(this.accessibilityProvider)),this.accessibilityProvider.onDidChangeActiveDescendant&&this.accessibilityProvider.onDidChangeActiveDescendant(this.onDidChangeActiveDescendant,this,this.disposables)),V=V.map(ie=>new X(ie.templateId,[...fe,ie]));const re=Object.assign(Object.assign({},Q),{dnd:Q.dnd&&new se(this,Q.dnd)});if(this.view=new l.ListView(U,$,V,re),this.view.domNode.setAttribute("role",pe),Q.styleController)this.styleController=Q.styleController(this.view.domId);else{const ie=(0,w.createStyleSheet)(this.view.domNode);this.styleController=new O(ie,this.view.domId)}if(this.spliceable=new p.CombinedSpliceable([new _(this.focus,this.view,Q.identityProvider),new _(this.selection,this.view,Q.identityProvider),new _(this.anchor,this.view,Q.identityProvider),this.view]),this.disposables.add(this.focus),this.disposables.add(this.selection),this.disposables.add(this.anchor),this.disposables.add(this.view),this.disposables.add(this._onDidDispose),this.disposables.add(new k(this,this.view)),(typeof Q.keyboardSupport!="boolean"||Q.keyboardSupport)&&(this.keyboardController=new m(this,this.view,Q),this.disposables.add(this.keyboardController)),Q.keyboardNavigationLabelProvider){const ie=Q.keyboardNavigationDelegate||e.DefaultKeyboardNavigationDelegate;this.typeLabelController=new I(this,this.view,Q.keyboardNavigationLabelProvider,ie),this.disposables.add(this.typeLabelController)}this.mouseController=this.createMouseController(Q),this.disposables.add(this.mouseController),this.onDidChangeFocus(this._onFocusChange,this,this.disposables),this.onDidChangeSelection(this._onSelectionChange,this,this.disposables),this.accessibilityProvider&&(this.ariaLabel=this.accessibilityProvider.getWidgetAriaLabel()),this._options.multipleSelectionSupport!==!1&&this.view.domNode.setAttribute("aria-multiselectable","true")}get onDidChangeFocus(){return s.Event.map(this.eventBufferer.wrapEvent(this.focus.onChange),x=>this.toListEvent(x))}get onDidChangeSelection(){return s.Event.map(this.eventBufferer.wrapEvent(this.selection.onChange),x=>this.toListEvent(x))}get domId(){return this.view.domId}get onMouseClick(){return this.view.onMouseClick}get onMouseDblClick(){return this.view.onMouseDblClick}get onMouseMiddleClick(){return this.view.onMouseMiddleClick}get onPointer(){return this.mouseController.onPointer}get onMouseDown(){return this.view.onMouseDown}get onTouchStart(){return this.view.onTouchStart}get onTap(){return this.view.onTap}get onContextMenu(){let x=!1;const U=s.Event.chain(this.disposables.add(new N.DomEmitter(this.view.domNode,"keydown")).event).map(Q=>new T.StandardKeyboardEvent(Q)).filter(Q=>x=Q.keyCode===58||Q.shiftKey&&Q.keyCode===68).map(N.stopEvent).filter(()=>!1).event,$=s.Event.chain(this.disposables.add(new N.DomEmitter(this.view.domNode,"keyup")).event).forEach(()=>x=!1).map(Q=>new T.StandardKeyboardEvent(Q)).filter(Q=>Q.keyCode===58||Q.shiftKey&&Q.keyCode===68).map(N.stopEvent).map(({browserEvent:Q})=>{const ue=this.getFocus(),pe=ue.length?ue[0]:void 0,fe=typeof pe!="undefined"?this.view.element(pe):void 0,re=typeof pe!="undefined"?this.view.domElement(pe):this.view.domNode;return{index:pe,element:fe,anchor:re,browserEvent:Q}}).event,V=s.Event.chain(this.view.onContextMenu).filter(Q=>!x).map(({element:Q,index:ue,browserEvent:pe})=>({element:Q,index:ue,anchor:{x:pe.pageX+1,y:pe.pageY},browserEvent:pe})).event;return s.Event.any(U,$,V)}get onKeyDown(){return this.disposables.add(new N.DomEmitter(this.view.domNode,"keydown")).event}get onDidFocus(){return s.Event.signal(this.disposables.add(new N.DomEmitter(this.view.domNode,"focus",!0)).event)}createMouseController(x){return new A(this)}updateOptions(x={}){var U;this._options=Object.assign(Object.assign({},this._options),x),this.typeLabelController&&this.typeLabelController.updateOptions(this._options),this._options.multipleSelectionController!==void 0&&(this._options.multipleSelectionSupport?this.view.domNode.setAttribute("aria-multiselectable","true"):this.view.domNode.removeAttribute("aria-multiselectable")),this.mouseController.updateOptions(x),(U=this.keyboardController)===null||U===void 0||U.updateOptions(x),this.view.updateOptions(x)}get options(){return this._options}splice(x,U,$=[]){if(x<0||x>this.view.length)throw new i.ListError(this.user,`Invalid start index: ${x}`);if(U<0)throw new i.ListError(this.user,`Invalid delete count: ${U}`);U===0&&$.length===0||this.eventBufferer.bufferEvents(()=>this.spliceable.splice(x,U,$))}rerender(){this.view.rerender()}element(x){return this.view.element(x)}get length(){return this.view.length}get contentHeight(){return this.view.contentHeight}get scrollTop(){return this.view.getScrollTop()}set scrollTop(x){this.view.setScrollTop(x)}get ariaLabel(){return this._ariaLabel}set ariaLabel(x){this._ariaLabel=x,this.view.domNode.setAttribute("aria-label",x)}domFocus(){this.view.domNode.focus({preventScroll:!0})}layout(x,U){this.view.layout(x,U)}setSelection(x,U){for(const $ of x)if($<0||$>=this.length)throw new i.ListError(this.user,`Invalid index ${$}`);this.selection.set(x,U)}getSelection(){return this.selection.get()}getSelectedElements(){return this.getSelection().map(x=>this.view.element(x))}setAnchor(x){if(typeof x=="undefined"){this.anchor.set([]);return}if(x<0||x>=this.length)throw new i.ListError(this.user,`Invalid index ${x}`);this.anchor.set([x])}getAnchor(){return(0,C.firstOrDefault)(this.anchor.get(),void 0)}getAnchorElement(){const x=this.getAnchor();return typeof x=="undefined"?void 0:this.element(x)}setFocus(x,U){for(const $ of x)if($<0||$>=this.length)throw new i.ListError(this.user,`Invalid index ${$}`);this.focus.set(x,U)}focusNext(x=1,U=!1,$,V){if(this.length===0)return;const Q=this.focus.get(),ue=this.findNextIndex(Q.length>0?Q[0]+x:0,U,V);ue>-1&&this.setFocus([ue],$)}focusPrevious(x=1,U=!1,$,V){if(this.length===0)return;const Q=this.focus.get(),ue=this.findPreviousIndex(Q.length>0?Q[0]-x:0,U,V);ue>-1&&this.setFocus([ue],$)}focusNextPage(x,U){return Re(this,void 0,void 0,function*(){let $=this.view.indexAt(this.view.getScrollTop()+this.view.renderHeight);$=$===0?0:$-1;const V=this.view.element($),Q=this.getFocusedElements()[0];if(Q!==V){const ue=this.findPreviousIndex($,!1,U);ue>-1&&Q!==this.view.element(ue)?this.setFocus([ue],x):this.setFocus([$],x)}else{const ue=this.view.getScrollTop();this.view.setScrollTop(ue+this.view.renderHeight-this.view.elementHeight($)),this.view.getScrollTop()!==ue&&(this.setFocus([]),yield(0,n.timeout)(0),yield this.focusNextPage(x,U))}})}focusPreviousPage(x,U){return Re(this,void 0,void 0,function*(){let $;const V=this.view.getScrollTop();V===0?$=this.view.indexAt(V):$=this.view.indexAfter(V-1);const Q=this.view.element($),ue=this.getFocusedElements()[0];if(ue!==Q){const pe=this.findNextIndex($,!1,U);pe>-1&&ue!==this.view.element(pe)?this.setFocus([pe],x):this.setFocus([$],x)}else{const pe=V;this.view.setScrollTop(V-this.view.renderHeight),this.view.getScrollTop()!==pe&&(this.setFocus([]),yield(0,n.timeout)(0),yield this.focusPreviousPage(x,U))}})}focusLast(x,U){if(this.length===0)return;const $=this.findPreviousIndex(this.length-1,!1,U);$>-1&&this.setFocus([$],x)}focusFirst(x,U){this.focusNth(0,x,U)}focusNth(x,U,$){if(this.length===0)return;const V=this.findNextIndex(x,!1,$);V>-1&&this.setFocus([V],U)}findNextIndex(x,U=!1,$){for(let V=0;V<this.length;V++){if(x>=this.length&&!U)return-1;if(x=x%this.length,!$||$(this.element(x)))return x;x++}return-1}findPreviousIndex(x,U=!1,$){for(let V=0;V<this.length;V++){if(x<0&&!U)return-1;if(x=(this.length+x%this.length)%this.length,!$||$(this.element(x)))return x;x--}return-1}getFocus(){return this.focus.get()}getFocusedElements(){return this.getFocus().map(x=>this.view.element(x))}reveal(x,U){if(x<0||x>=this.length)throw new i.ListError(this.user,`Invalid index ${x}`);const $=this.view.getScrollTop(),V=this.view.elementTop(x),Q=this.view.elementHeight(x);if((0,o.isNumber)(U)){const ue=Q-this.view.renderHeight;this.view.setScrollTop(ue*(0,d.clamp)(U,0,1)+V)}else{const ue=V+Q,pe=$+this.view.renderHeight;V<$&&ue>=pe||(V<$||ue>=pe&&Q>=this.view.renderHeight?this.view.setScrollTop(V):ue>=pe&&this.view.setScrollTop(ue-this.view.renderHeight))}}getRelativeTop(x){if(x<0||x>=this.length)throw new i.ListError(this.user,`Invalid index ${x}`);const U=this.view.getScrollTop(),$=this.view.elementTop(x),V=this.view.elementHeight(x);if($<U||$+V>U+this.view.renderHeight)return null;const Q=V-this.view.renderHeight;return Math.abs((U-$)/Q)}getHTMLElement(){return this.view.domNode}style(x){this.styleController.style(x)}toListEvent({indexes:x,browserEvent:U}){return{indexes:x,elements:x.map($=>this.view.element($)),browserEvent:U}}_onFocusChange(){const x=this.focus.get();this.view.domNode.classList.toggle("element-focused",x.length>0),this.onDidChangeActiveDescendant()}onDidChangeActiveDescendant(){var x;const U=this.focus.get();if(U.length>0){let $;((x=this.accessibilityProvider)===null||x===void 0?void 0:x.getActiveDescendantId)&&($=this.accessibilityProvider.getActiveDescendantId(this.view.element(U[0]))),this.view.domNode.setAttribute("aria-activedescendant",$||this.view.getElementDomId(U[0]))}else this.view.domNode.removeAttribute("aria-activedescendant")}_onSelectionChange(){const x=this.selection.get();this.view.domNode.classList.toggle("selection-none",x.length===0),this.view.domNode.classList.toggle("selection-single",x.length===1),this.view.domNode.classList.toggle("selection-multiple",x.length>1)}dispose(){this._onDidDispose.fire(),this.disposables.dispose(),this._onDidDispose.dispose()}}Fe([t.memoize],oe.prototype,"onDidChangeFocus",null),Fe([t.memoize],oe.prototype,"onDidChangeSelection",null),Fe([t.memoize],oe.prototype,"onContextMenu",null),Fe([t.memoize],oe.prototype,"onKeyDown",null),Fe([t.memoize],oe.prototype,"onDidFocus",null),e.List=oe}),define(J[331],ee([0,1,19,23,4,2,111,219]),function(j,e,w,N,T,D,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.PagedList=void 0;class p{constructor(s,c){this.renderer=s,this.modelProvider=c}get templateId(){return this.renderer.templateId}renderTemplate(s){return{data:this.renderer.renderTemplate(s),disposable:D.Disposable.None}}renderElement(s,c,u,d){if(u.disposable&&u.disposable.dispose(),!u.data)return;const a=this.modelProvider();if(a.isResolved(s))return this.renderer.renderElement(a.get(s),s,u.data,d);const r=new N.CancellationTokenSource,o=a.resolve(s,r.token);u.disposable={dispose:()=>r.cancel()},this.renderer.renderPlaceholder(s,u.data),o.then(i=>this.renderer.renderElement(i,s,u.data,d))}disposeTemplate(s){s.disposable&&(s.disposable.dispose(),s.disposable=void 0),s.data&&(this.renderer.disposeTemplate(s.data),s.data=void 0)}}class C{constructor(s,c){this.modelProvider=s,this.accessibilityProvider=c}getWidgetAriaLabel(){return this.accessibilityProvider.getWidgetAriaLabel()}getAriaLabel(s){const c=this.modelProvider();return c.isResolved(s)?this.accessibilityProvider.getAriaLabel(c.get(s)):null}}function n(t,s){return Object.assign(Object.assign({},s),{accessibilityProvider:s.accessibilityProvider&&new C(t,s.accessibilityProvider)})}class g{constructor(s,c,u,d,a={}){const r=()=>this.model,o=d.map(i=>new p(i,r));this.list=new S.List(s,c,u,o,n(r,a))}updateOptions(s){this.list.updateOptions(s)}getHTMLElement(){return this.list.getHTMLElement()}get onDidFocus(){return this.list.onDidFocus}get onDidDispose(){return this.list.onDidDispose}get onMouseDblClick(){return T.Event.map(this.list.onMouseDblClick,({element:s,index:c,browserEvent:u})=>({element:s===void 0?void 0:this._model.get(s),index:c,browserEvent:u}))}get onPointer(){return T.Event.map(this.list.onPointer,({element:s,index:c,browserEvent:u})=>({element:s===void 0?void 0:this._model.get(s),index:c,browserEvent:u}))}get onDidChangeSelection(){return T.Event.map(this.list.onDidChangeSelection,({elements:s,indexes:c,browserEvent:u})=>({elements:s.map(d=>this._model.get(d)),indexes:c,browserEvent:u}))}get model(){return this._model}set model(s){this._model=s,this.list.splice(0,this.list.length,(0,w.range)(s.length))}getFocus(){return this.list.getFocus()}getSelection(){return this.list.getSelection()}getSelectedElements(){return this.getSelection().map(s=>this.model.get(s))}style(s){this.list.style(s)}dispose(){this.list.dispose()}}e.PagedList=g}),define(J[332],ee([12]),{}),define(J[221],ee([0,1,7,110,64,19,29,4,2,106,133,20,332]),function(j,e,w,N,T,D,S,p,C,n,g,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SplitView=e.Sizing=void 0;const s={separatorBorder:S.Color.transparent};class c{constructor(l,h,f,y){this.container=l,this.view=h,this.disposable=y,this._cachedVisibleSize=void 0,typeof f=="number"?(this._size=f,this._cachedVisibleSize=void 0,l.classList.add("visible")):(this._size=0,this._cachedVisibleSize=f.cachedVisibleSize)}set size(l){this._size=l}get size(){return this._size}get visible(){return typeof this._cachedVisibleSize=="undefined"}setVisible(l,h){l!==this.visible&&(l?(this.size=(0,n.clamp)(this._cachedVisibleSize,this.viewMinimumSize,this.viewMaximumSize),this._cachedVisibleSize=void 0):(this._cachedVisibleSize=typeof h=="number"?h:this.size,this.size=0),this.container.classList.toggle("visible",l),this.view.setVisible&&this.view.setVisible(l))}get minimumSize(){return this.visible?this.view.minimumSize:0}get viewMinimumSize(){return this.view.minimumSize}get maximumSize(){return this.visible?this.view.maximumSize:0}get viewMaximumSize(){return this.view.maximumSize}get priority(){return this.view.priority}get snap(){return!!this.view.snap}set enabled(l){this.container.style.pointerEvents=l?"":"none"}layout(l,h){this.layoutContainer(l),this.view.layout(this.size,l,h)}dispose(){return this.disposable.dispose(),this.view}}class u extends c{layoutContainer(l){this.container.style.top=`${l}px`,this.container.style.height=`${this.size}px`}}class d extends c{layoutContainer(l){this.container.style.left=`${l}px`,this.container.style.width=`${this.size}px`}}var a;(function(i){i[i.Idle=0]="Idle",i[i.Busy=1]="Busy"})(a||(a={}));var r;(function(i){i.Distribute={type:"distribute"};function l(f){return{type:"split",index:f}}i.Split=l;function h(f){return{type:"invisible",cachedVisibleSize:f}}i.Invisible=h})(r=e.Sizing||(e.Sizing={}));class o extends C.Disposable{constructor(l,h={}){var f,y;super();this.size=0,this.contentSize=0,this.proportions=void 0,this.viewItems=[],this.sashItems=[],this.state=a.Idle,this._onDidSashChange=this._register(new p.Emitter),this.onDidSashChange=this._onDidSashChange.event,this._onDidSashReset=this._register(new p.Emitter),this._startSnappingEnabled=!0,this._endSnappingEnabled=!0,this.orientation=t.isUndefined(h.orientation)?0:h.orientation,this.inverseAltBehavior=!!h.inverseAltBehavior,this.proportionalLayout=t.isUndefined(h.proportionalLayout)?!0:!!h.proportionalLayout,this.getSashOrthogonalSize=h.getSashOrthogonalSize,this.el=document.createElement("div"),this.el.classList.add("monaco-split-view2"),this.el.classList.add(this.orientation===0?"vertical":"horizontal"),l.appendChild(this.el),this.sashContainer=(0,w.append)(this.el,(0,w.$)(".sash-container")),this.viewContainer=(0,w.$)(".split-view-container"),this.scrollable=new g.Scrollable(125,w.scheduleAtNextAnimationFrame),this.scrollableElement=this._register(new T.SmoothScrollableElement(this.viewContainer,{vertical:this.orientation===0?(f=h.scrollbarVisibility)!==null&&f!==void 0?f:1:2,horizontal:this.orientation===1?(y=h.scrollbarVisibility)!==null&&y!==void 0?y:1:2},this.scrollable)),this.onDidScroll=this.scrollableElement.onScroll,this._register(this.onDidScroll(_=>{this.viewContainer.scrollTop=_.scrollTop,this.viewContainer.scrollLeft=_.scrollLeft})),(0,w.append)(this.el,this.scrollableElement.getDomNode()),this.style(h.styles||s),h.descriptor&&(this.size=h.descriptor.size,h.descriptor.views.forEach((_,b)=>{const v=t.isUndefined(_.visible)||_.visible?_.size:{type:"invisible",cachedVisibleSize:_.size},m=_.view;this.doAddView(m,v,b,!0)}),this.contentSize=this.viewItems.reduce((_,b)=>_+b.size,0),this.saveProportions())}get orthogonalStartSash(){return this._orthogonalStartSash}set orthogonalStartSash(l){for(const h of this.sashItems)h.sash.orthogonalStartSash=l;this._orthogonalStartSash=l}get orthogonalEndSash(){return this._orthogonalEndSash}set orthogonalEndSash(l){for(const h of this.sashItems)h.sash.orthogonalEndSash=l;this._orthogonalEndSash=l}get startSnappingEnabled(){return this._startSnappingEnabled}set startSnappingEnabled(l){this._startSnappingEnabled!==l&&(this._startSnappingEnabled=l,this.updateSashEnablement())}get endSnappingEnabled(){return this._endSnappingEnabled}set endSnappingEnabled(l){this._endSnappingEnabled!==l&&(this._endSnappingEnabled=l,this.updateSashEnablement())}style(l){l.separatorBorder.isTransparent()?(this.el.classList.remove("separator-border"),this.el.style.removeProperty("--separator-border")):(this.el.classList.add("separator-border"),this.el.style.setProperty("--separator-border",l.separatorBorder.toString()))}addView(l,h,f=this.viewItems.length,y){this.doAddView(l,h,f,y)}layout(l,h){const f=Math.max(this.size,this.contentSize);if(this.size=l,this.layoutContext=h,this.proportions)for(let y=0;y<this.viewItems.length;y++){const _=this.viewItems[y];_.size=(0,n.clamp)(Math.round(this.proportions[y]*l),_.minimumSize,_.maximumSize)}else{const y=(0,D.range)(this.viewItems.length),_=y.filter(v=>this.viewItems[v].priority===1),b=y.filter(v=>this.viewItems[v].priority===2);this.resize(this.viewItems.length-1,l-f,void 0,_,b)}this.distributeEmptySpace(),this.layoutViews()}saveProportions(){this.proportionalLayout&&this.contentSize>0&&(this.proportions=this.viewItems.map(l=>l.size/this.contentSize))}onSashStart({sash:l,start:h,alt:f}){for(const v of this.viewItems)v.enabled=!1;const y=this.sashItems.findIndex(v=>v.sash===l),_=(0,C.combinedDisposable)((0,w.addDisposableListener)(document.body,"keydown",v=>b(this.sashDragState.current,v.altKey)),(0,w.addDisposableListener)(document.body,"keyup",()=>b(this.sashDragState.current,!1))),b=(v,m)=>{const E=this.viewItems.map(F=>F.size);let I=Number.NEGATIVE_INFINITY,k=Number.POSITIVE_INFINITY;if(this.inverseAltBehavior&&(m=!m),m)if(y===this.sashItems.length-1){const R=this.viewItems[y];I=(R.minimumSize-R.size)/2,k=(R.maximumSize-R.size)/2}else{const R=this.viewItems[y+1];I=(R.size-R.maximumSize)/2,k=(R.size-R.minimumSize)/2}let M,P;if(!m){const F=(0,D.range)(y,-1),R=(0,D.range)(y+1,this.viewItems.length),A=F.reduce((X,Z)=>X+(this.viewItems[Z].minimumSize-E[Z]),0),O=F.reduce((X,Z)=>X+(this.viewItems[Z].viewMaximumSize-E[Z]),0),L=R.length===0?Number.POSITIVE_INFINITY:R.reduce((X,Z)=>X+(E[Z]-this.viewItems[Z].minimumSize),0),B=R.length===0?Number.NEGATIVE_INFINITY:R.reduce((X,Z)=>X+(E[Z]-this.viewItems[Z].viewMaximumSize),0),W=Math.max(A,B),K=Math.min(L,O),H=this.findFirstSnapIndex(F),Y=this.findFirstSnapIndex(R);if(typeof H=="number"){const X=this.viewItems[H],Z=Math.floor(X.viewMinimumSize/2);M={index:H,limitDelta:X.visible?W-Z:W+Z,size:X.size}}if(typeof Y=="number"){const X=this.viewItems[Y],Z=Math.floor(X.viewMinimumSize/2);P={index:Y,limitDelta:X.visible?K+Z:K-Z,size:X.size}}}this.sashDragState={start:v,current:v,index:y,sizes:E,minDelta:I,maxDelta:k,alt:m,snapBefore:M,snapAfter:P,disposable:_}};b(h,f)}onSashChange({current:l}){const{index:h,start:f,sizes:y,alt:_,minDelta:b,maxDelta:v,snapBefore:m,snapAfter:E}=this.sashDragState;this.sashDragState.current=l;const I=l-f,k=this.resize(h,I,y,void 0,void 0,b,v,m,E);if(_){const M=h===this.sashItems.length-1,P=this.viewItems.map(B=>B.size),F=M?h:h+1,R=this.viewItems[F],A=R.size-R.maximumSize,O=R.size-R.minimumSize,L=M?h-1:h+1;this.resize(L,-k,P,void 0,void 0,A,O)}this.distributeEmptySpace(),this.layoutViews()}onSashEnd(l){this._onDidSashChange.fire(l),this.sashDragState.disposable.dispose(),this.saveProportions();for(const h of this.viewItems)h.enabled=!0}onViewChange(l,h){const f=this.viewItems.indexOf(l);f<0||f>=this.viewItems.length||(h=typeof h=="number"?h:l.size,h=(0,n.clamp)(h,l.minimumSize,l.maximumSize),this.inverseAltBehavior&&f>0?(this.resize(f-1,Math.floor((l.size-h)/2)),this.distributeEmptySpace(),this.layoutViews()):(l.size=h,this.relayout([f],void 0)))}resizeView(l,h){if(this.state!==a.Idle)throw new Error("Cant modify splitview");if(this.state=a.Busy,l<0||l>=this.viewItems.length)return;const f=(0,D.range)(this.viewItems.length).filter(v=>v!==l),y=[...f.filter(v=>this.viewItems[v].priority===1),l],_=f.filter(v=>this.viewItems[v].priority===2),b=this.viewItems[l];h=Math.round(h),h=(0,n.clamp)(h,b.minimumSize,Math.min(b.maximumSize,this.size)),b.size=h,this.relayout(y,_),this.state=a.Idle}distributeViewSizes(){const l=[];let h=0;for(const v of this.viewItems)v.maximumSize-v.minimumSize>0&&(l.push(v),h+=v.size);const f=Math.floor(h/l.length);for(const v of l)v.size=(0,n.clamp)(f,v.minimumSize,v.maximumSize);const y=(0,D.range)(this.viewItems.length),_=y.filter(v=>this.viewItems[v].priority===1),b=y.filter(v=>this.viewItems[v].priority===2);this.relayout(_,b)}getViewSize(l){return l<0||l>=this.viewItems.length?-1:this.viewItems[l].size}doAddView(l,h,f=this.viewItems.length,y){if(this.state!==a.Idle)throw new Error("Cant modify splitview");this.state=a.Busy;const _=(0,w.$)(".split-view-view");f===this.viewItems.length?this.viewContainer.appendChild(_):this.viewContainer.insertBefore(_,this.viewContainer.children.item(f));const b=l.onDidChange(M=>this.onViewChange(I,M)),v=(0,C.toDisposable)(()=>this.viewContainer.removeChild(_)),m=(0,C.combinedDisposable)(b,v);let E;typeof h=="number"?E=h:h.type==="split"?E=this.getViewSize(h.index)/2:h.type==="invisible"?E={cachedVisibleSize:h.cachedVisibleSize}:E=l.minimumSize;const I=this.orientation===0?new u(_,l,E,m):new d(_,l,E,m);if(this.viewItems.splice(f,0,I),this.viewItems.length>1){let M={orthogonalStartSash:this.orthogonalStartSash,orthogonalEndSash:this.orthogonalEndSash};const P=this.orientation===0?new N.Sash(this.sashContainer,{getHorizontalSashTop:X=>this.getSashPosition(X),getHorizontalSashWidth:this.getSashOrthogonalSize},Object.assign(Object.assign({},M),{orientation:1})):new N.Sash(this.sashContainer,{getVerticalSashLeft:X=>this.getSashPosition(X),getVerticalSashHeight:this.getSashOrthogonalSize},Object.assign(Object.assign({},M),{orientation:0})),F=this.orientation===0?X=>({sash:P,start:X.startY,current:X.currentY,alt:X.altKey}):X=>({sash:P,start:X.startX,current:X.currentX,alt:X.altKey}),A=p.Event.map(P.onDidStart,F)(this.onSashStart,this),L=p.Event.map(P.onDidChange,F)(this.onSashChange,this),W=p.Event.map(P.onDidEnd,()=>this.sashItems.findIndex(X=>X.sash===P))(this.onSashEnd,this),K=P.onDidReset(()=>{const X=this.sashItems.findIndex(x=>x.sash===P),Z=(0,D.range)(X,-1),se=(0,D.range)(X+1,this.viewItems.length),oe=this.findFirstSnapIndex(Z),G=this.findFirstSnapIndex(se);typeof oe=="number"&&!this.viewItems[oe].visible||typeof G=="number"&&!this.viewItems[G].visible||this._onDidSashReset.fire(X)}),H=(0,C.combinedDisposable)(A,L,W,K,P),Y={sash:P,disposable:H};this.sashItems.splice(f-1,0,Y)}_.appendChild(l.element);let k;typeof h!="number"&&h.type==="split"&&(k=[h.index]),y||this.relayout([f],k),this.state=a.Idle,!y&&typeof h!="number"&&h.type==="distribute"&&this.distributeViewSizes()}relayout(l,h){const f=this.viewItems.reduce((y,_)=>y+_.size,0);this.resize(this.viewItems.length-1,this.size-f,void 0,l,h),this.distributeEmptySpace(),this.layoutViews(),this.saveProportions()}resize(l,h,f=this.viewItems.map(I=>I.size),y,_,b=Number.NEGATIVE_INFINITY,v=Number.POSITIVE_INFINITY,m,E){if(l<0||l>=this.viewItems.length)return 0;const I=(0,D.range)(l,-1),k=(0,D.range)(l+1,this.viewItems.length);if(_)for(const Y of _)(0,D.pushToStart)(I,Y),(0,D.pushToStart)(k,Y);if(y)for(const Y of y)(0,D.pushToEnd)(I,Y),(0,D.pushToEnd)(k,Y);const M=I.map(Y=>this.viewItems[Y]),P=I.map(Y=>f[Y]),F=k.map(Y=>this.viewItems[Y]),R=k.map(Y=>f[Y]),A=I.reduce((Y,X)=>Y+(this.viewItems[X].minimumSize-f[X]),0),O=I.reduce((Y,X)=>Y+(this.viewItems[X].maximumSize-f[X]),0),L=k.length===0?Number.POSITIVE_INFINITY:k.reduce((Y,X)=>Y+(f[X]-this.viewItems[X].minimumSize),0),B=k.length===0?Number.NEGATIVE_INFINITY:k.reduce((Y,X)=>Y+(f[X]-this.viewItems[X].maximumSize),0),W=Math.max(A,B,b),K=Math.min(L,O,v);let H=!1;if(m){const Y=this.viewItems[m.index],X=h>=m.limitDelta;H=X!==Y.visible,Y.setVisible(X,m.size)}if(!H&&E){const Y=this.viewItems[E.index],X=h<E.limitDelta;H=X!==Y.visible,Y.setVisible(X,E.size)}if(H)return this.resize(l,h,f,y,_,b,v);h=(0,n.clamp)(h,W,K);for(let Y=0,X=h;Y<M.length;Y++){const Z=M[Y],se=(0,n.clamp)(P[Y]+X,Z.minimumSize,Z.maximumSize);X-=se-P[Y],Z.size=se}for(let Y=0,X=h;Y<F.length;Y++){const Z=F[Y],se=(0,n.clamp)(R[Y]-X,Z.minimumSize,Z.maximumSize);X+=se-R[Y],Z.size=se}return h}distributeEmptySpace(l){const h=this.viewItems.reduce((v,m)=>v+m.size,0);let f=this.size-h;const y=(0,D.range)(this.viewItems.length-1,-1),_=y.filter(v=>this.viewItems[v].priority===1),b=y.filter(v=>this.viewItems[v].priority===2);for(const v of b)(0,D.pushToStart)(y,v);for(const v of _)(0,D.pushToEnd)(y,v);typeof l=="number"&&(0,D.pushToEnd)(y,l);for(let v=0;f!==0&&v<y.length;v++){const m=this.viewItems[y[v]],E=(0,n.clamp)(m.size+f,m.minimumSize,m.maximumSize);f-=E-m.size,m.size=E}}layoutViews(){this.contentSize=this.viewItems.reduce((h,f)=>h+f.size,0);let l=0;for(const h of this.viewItems)h.layout(l,this.layoutContext),l+=h.size;this.sashItems.forEach(h=>h.sash.layout()),this.updateSashEnablement(),this.updateScrollableElement()}updateScrollableElement(){this.orientation===0?this.scrollableElement.setScrollDimensions({height:this.size,scrollHeight:this.contentSize}):this.scrollableElement.setScrollDimensions({width:this.size,scrollWidth:this.contentSize})}updateSashEnablement(){let l=!1;const h=this.viewItems.map(m=>l=m.size-m.minimumSize>0||l);l=!1;const f=this.viewItems.map(m=>l=m.maximumSize-m.size>0||l),y=[...this.viewItems].reverse();l=!1;const _=y.map(m=>l=m.size-m.minimumSize>0||l).reverse();l=!1;const b=y.map(m=>l=m.maximumSize-m.size>0||l).reverse();let v=0;for(let m=0;m<this.sashItems.length;m++){const{sash:E}=this.sashItems[m];v+=this.viewItems[m].size;const k=!(h[m]&&b[m+1]),M=!(f[m]&&_[m+1]);if(k&&M){const P=(0,D.range)(m,-1),F=(0,D.range)(m+1,this.viewItems.length),R=this.findFirstSnapIndex(P),A=this.findFirstSnapIndex(F),O=typeof R=="number"&&!this.viewItems[R].visible,L=typeof A=="number"&&!this.viewItems[A].visible;O&&_[m]&&(v>0||this.startSnappingEnabled)?E.state=1:L&&h[m]&&(v<this.contentSize||this.endSnappingEnabled)?E.state=2:E.state=0}else k&&!M?E.state=1:!k&&M?E.state=2:E.state=3}}getSashPosition(l){let h=0;for(let f=0;f<this.sashItems.length;f++)if(h+=this.viewItems[f].size,this.sashItems[f].sash===l)return h;return 0}findFirstSnapIndex(l){for(const h of l){const f=this.viewItems[h];if(!!f.visible&&f.snap)return h}for(const h of l){const f=this.viewItems[h];if(f.visible&&f.maximumSize-f.minimumSize>0)return;if(!f.visible&&f.snap)return h}}dispose(){super.dispose(),this.viewItems.forEach(l=>l.dispose()),this.viewItems=[],this.sashItems.forEach(l=>l.disposable.dispose()),this.sashItems=[]}}e.SplitView=o}),define(J[333],ee([12]),{}),define(J[334],ee([0,1,7,111,221,4,333]),function(j,e,w,N,T,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Table=void 0;class S{constructor(t,s,c){this.columns=t,this.getColumnSize=c,this.templateId=S.TemplateId,this.renderedTemplates=new Set;const u=new Map(s.map(d=>[d.templateId,d]));this.renderers=[];for(const d of t){const a=u.get(d.templateId);if(!a)throw new Error(`Table cell renderer for template id ${d.templateId} not found.`);this.renderers.push(a)}}renderTemplate(t){const s=(0,w.append)(t,(0,w.$)(".monaco-table-tr")),c=[],u=[];for(let a=0;a<this.columns.length;a++){const r=this.renderers[a],o=(0,w.append)(s,(0,w.$)(".monaco-table-td",{"data-col-index":a}));o.style.width=`${this.getColumnSize(a)}px`,c.push(o),u.push(r.renderTemplate(o))}const d={container:t,cellContainers:c,cellTemplateData:u};return this.renderedTemplates.add(d),d}renderElement(t,s,c,u){for(let d=0;d<this.columns.length;d++){const r=this.columns[d].project(t);this.renderers[d].renderElement(r,s,c.cellTemplateData[d],u)}}disposeElement(t,s,c,u){for(let d=0;d<this.columns.length;d++){const a=this.renderers[d];if(a.disposeElement){const o=this.columns[d].project(t);a.disposeElement(o,s,c.cellTemplateData[d],u)}}}disposeTemplate(t){for(let s=0;s<this.columns.length;s++)this.renderers[s].disposeTemplate(t.cellTemplateData[s]);(0,w.clearNode)(t.container),this.renderedTemplates.delete(t)}layoutColumn(t,s){for(const{cellContainers:c}of this.renderedTemplates)c[t].style.width=`${s}px`}}S.TemplateId="row";function p(g){return{getHeight(t){return g.getHeight(t)},getTemplateId(){return S.TemplateId}}}class C{constructor(t,s){this.column=t,this.index=s,this._onDidLayout=new D.Emitter,this.onDidLayout=this._onDidLayout.event,this.element=(0,w.$)(".monaco-table-th",{"data-col-index":s,title:t.tooltip},t.label)}get minimumSize(){var t;return(t=this.column.minimumWidth)!==null&&t!==void 0?t:120}get maximumSize(){var t;return(t=this.column.maximumWidth)!==null&&t!==void 0?t:Number.POSITIVE_INFINITY}get onDidChange(){var t;return(t=this.column.onDidChangeWidthConstraints)!==null&&t!==void 0?t:D.Event.None}layout(t){this._onDidLayout.fire([this.index,t])}}class n{constructor(t,s,c,u,d,a){this.virtualDelegate=c,this.domId=`table_id_${++n.InstanceCount}`,this.cachedHeight=0,this.domNode=(0,w.append)(s,(0,w.$)(`.monaco-table.${this.domId}`));const r=u.map((l,h)=>new C(l,h)),o={size:r.reduce((l,h)=>l+h.column.weight,0),views:r.map(l=>({size:l.column.weight,view:l}))};this.splitview=new T.SplitView(this.domNode,{orientation:1,scrollbarVisibility:2,getSashOrthogonalSize:()=>this.cachedHeight,descriptor:o}),this.splitview.el.style.height=`${c.headerRowHeight}px`,this.splitview.el.style.lineHeight=`${c.headerRowHeight}px`;const i=new S(u,d,l=>this.splitview.getViewSize(l));this.list=new N.List(t,this.domNode,p(c),[i],a),this.columnLayoutDisposable=D.Event.any(...r.map(l=>l.onDidLayout))(([l,h])=>i.layoutColumn(l,h)),this.styleElement=(0,w.createStyleSheet)(this.domNode),this.style({})}get onDidChangeFocus(){return this.list.onDidChangeFocus}get onDidChangeSelection(){return this.list.onDidChangeSelection}get onMouseDblClick(){return this.list.onMouseDblClick}get onPointer(){return this.list.onPointer}get onDidFocus(){return this.list.onDidFocus}get onDidDispose(){return this.list.onDidDispose}updateOptions(t){this.list.updateOptions(t)}splice(t,s,c=[]){this.list.splice(t,s,c)}getHTMLElement(){return this.domNode}style(t){const s=[];s.push(`.monaco-table.${this.domId} > .monaco-split-view2 .monaco-sash.vertical::before {
            top: ${this.virtualDelegate.headerRowHeight+1}px;
            height: calc(100% - ${this.virtualDelegate.headerRowHeight}px);
        }`),this.styleElement.textContent=s.join(`
`),this.list.style(t)}getSelectedElements(){return this.list.getSelectedElements()}getSelection(){return this.list.getSelection()}getFocus(){return this.list.getFocus()}dispose(){this.splitview.dispose(),this.list.dispose(),this.columnLayoutDisposable.dispose()}}e.Table=n,n.InstanceCount=0}),define(J[335],ee([12]),{}),define(J[138],ee([12]),{}),define(J[222],ee([0,1,7,131,138]),function(j,e,w,N){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getIconClass=void 0;const T={},D=new N.IdGenerator("quick-input-button-icon-");function S(p){if(!p)return;let C;const n=p.dark.toString();return T[n]?C=T[n]:(C=D.nextId(),w.createCSSRule(`.${C}`,`background-image: ${w.asCSSUrl(p.light||p.dark)}`),w.createCSSRule(`.vs-dark .${C}, .hc-black .${C}`,`background-image: ${w.asCSSUrl(p.dark)}`),T[n]=C),C}e.getIconClass=S}),define(J[336],ee([12]),{}),define(J[337],ee([12]),{}),define(J[338],ee([12]),{}),define(J[339],ee([12]),{}),define(J[340],ee([12]),{}),define(J[341],ee([12]),{}),define(J[342],ee([12]),{}),define(J[343],ee([12]),{}),define(J[344],ee([12]),{}),define(J[345],ee([12]),{}),define(J[346],ee([12]),{}),define(J[347],ee([12]),{}),define(J[348],ee([12]),{}),define(J[349],ee([12]),{}),define(J[350],ee([12]),{}),define(J[351],ee([12]),{}),define(J[352],ee([12]),{}),define(J[353],ee([12]),{}),define(J[354],ee([12]),{}),define(J[355],ee([12]),{}),define(J[356],ee([12]),{}),define(J[357],ee([12]),{}),define(J[358],ee([12]),{}),define(J[359],ee([12]),{}),define(J[360],ee([12]),{}),define(J[361],ee([12]),{}),define(J[362],ee([12]),{}),define(J[363],ee([12]),{}),define(J[364],ee([12]),{}),define(J[365],ee([12]),{}),define(J[366],ee([12]),{}),define(J[367],ee([12]),{}),define(J[368],ee([12]),{}),define(J[369],ee([12]),{}),define(J[370],ee([12]),{}),define(J[371],ee([12]),{}),define(J[372],ee([12]),{}),define(J[373],ee([12]),{}),define(J[374],ee([12]),{}),define(J[375],ee([12]),{}),define(J[376],ee([12]),{}),define(J[377],ee([12]),{}),define(J[378],ee([12]),{}),define(J[379],ee([12]),{}),define(J[380],ee([12]),{}),define(J[223],ee([0,1,2]),function(j,e,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ElementSizeObserver=void 0;class N extends w.Disposable{constructor(D,S,p){super();this.referenceDomElement=D,this.changeCallback=p,this.width=-1,this.height=-1,this.resizeObserver=null,this.measureReferenceDomElementToken=-1,this.measureReferenceDomElement(!1,S)}dispose(){this.stopObserving(),super.dispose()}getWidth(){return this.width}getHeight(){return this.height}startObserving(){typeof ResizeObserver!="undefined"?!this.resizeObserver&&this.referenceDomElement&&(this.resizeObserver=new ResizeObserver(D=>{D&&D[0]&&D[0].contentRect?this.observe({width:D[0].contentRect.width,height:D[0].contentRect.height}):this.observe()}),this.resizeObserver.observe(this.referenceDomElement)):this.measureReferenceDomElementToken===-1&&(this.measureReferenceDomElementToken=setInterval(()=>this.observe(),100))}stopObserving(){this.resizeObserver&&(this.resizeObserver.disconnect(),this.resizeObserver=null),this.measureReferenceDomElementToken!==-1&&(clearInterval(this.measureReferenceDomElementToken),this.measureReferenceDomElementToken=-1)}observe(D){this.measureReferenceDomElement(!0,D)}measureReferenceDomElement(D,S){let p=0,C=0;S?(p=S.width,C=S.height):this.referenceDomElement&&(p=this.referenceDomElement.clientWidth,C=this.referenceDomElement.clientHeight),p=Math.max(5,p),C=Math.max(5,C),(this.width!==p||this.height!==C)&&(this.width=p,this.height=C,D&&this.changeCallback())}}e.ElementSizeObserver=N}),define(J[172],ee([0,1,7,96,56,2]),function(j,e,w,N,T,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.GlobalEditorMouseMoveMonitor=e.EditorPointerEventFactory=e.EditorMouseEventFactory=e.EditorMouseEvent=e.createEditorPagePosition=e.EditorPagePosition=e.ClientCoordinates=e.PageCoordinates=void 0;class S{constructor(d,a){this.x=d,this.y=a,this._pageCoordinatesBrand=void 0}toClientCoordinates(){return new p(this.x-w.StandardWindow.scrollX,this.y-w.StandardWindow.scrollY)}}e.PageCoordinates=S;class p{constructor(d,a){this.clientX=d,this.clientY=a,this._clientCoordinatesBrand=void 0}toPageCoordinates(){return new S(this.clientX+w.StandardWindow.scrollX,this.clientY+w.StandardWindow.scrollY)}}e.ClientCoordinates=p;class C{constructor(d,a,r,o){this.x=d,this.y=a,this.width=r,this.height=o,this._editorPagePositionBrand=void 0}}e.EditorPagePosition=C;function n(u){const d=w.getDomNodePagePosition(u);return new C(d.left,d.top,d.width,d.height)}e.createEditorPagePosition=n;class g extends T.StandardMouseEvent{constructor(d,a){super(d);this._editorMouseEventBrand=void 0,this.pos=new S(this.posx,this.posy),this.editorPos=n(a)}}e.EditorMouseEvent=g;class t{constructor(d){this._editorViewDomNode=d}_create(d){return new g(d,this._editorViewDomNode)}onContextMenu(d,a){return w.addDisposableListener(d,"contextmenu",r=>{a(this._create(r))})}onMouseUp(d,a){return w.addDisposableListener(d,"mouseup",r=>{a(this._create(r))})}onMouseDown(d,a){return w.addDisposableListener(d,"mousedown",r=>{a(this._create(r))})}onMouseLeave(d,a){return w.addDisposableNonBubblingMouseOutListener(d,r=>{a(this._create(r))})}onMouseMoveThrottled(d,a,r,o){const i=(l,h)=>r(l,this._create(h));return w.addDisposableThrottledListener(d,"mousemove",a,i,o)}}e.EditorMouseEventFactory=t;class s{constructor(d){this._editorViewDomNode=d}_create(d){return new g(d,this._editorViewDomNode)}onPointerUp(d,a){return w.addDisposableListener(d,"pointerup",r=>{a(this._create(r))})}onPointerDown(d,a){return w.addDisposableListener(d,"pointerdown",r=>{a(this._create(r))})}onPointerLeave(d,a){return w.addDisposableNonBubblingPointerOutListener(d,r=>{a(this._create(r))})}onPointerMoveThrottled(d,a,r,o){const i=(l,h)=>r(l,this._create(h));return w.addDisposableThrottledListener(d,"pointermove",a,i,o)}}e.EditorPointerEventFactory=s;class c extends D.Disposable{constructor(d){super();this._editorViewDomNode=d,this._globalMouseMoveMonitor=this._register(new N.GlobalMouseMoveMonitor),this._keydownListener=null}startMonitoring(d,a,r,o,i){this._keydownListener=w.addStandardDisposableListener(document,"keydown",h=>{h.toKeybinding().isModifierKey()||this._globalMouseMoveMonitor.stopMonitoring(!0,h.browserEvent)},!0);const l=(h,f)=>r(h,new g(f,this._editorViewDomNode));this._globalMouseMoveMonitor.startMonitoring(d,a,l,o,h=>{this._keydownListener.dispose(),i(h)})}stopMonitoring(){this._globalMouseMoveMonitor.stopMonitoring(!0)}}e.GlobalEditorMouseMoveMonitor=c}),define(J[381],ee([0,1,4,2]),function(j,e,w,N){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AbstractCodeEditorService=void 0;class T extends N.Disposable{constructor(){super();this._onCodeEditorAdd=this._register(new w.Emitter),this.onCodeEditorAdd=this._onCodeEditorAdd.event,this._onCodeEditorRemove=this._register(new w.Emitter),this.onCodeEditorRemove=this._onCodeEditorRemove.event,this._onDiffEditorAdd=this._register(new w.Emitter),this._onDiffEditorRemove=this._register(new w.Emitter),this._onDecorationTypeRegistered=this._register(new w.Emitter),this._modelProperties=new Map,this._codeEditors=Object.create(null),this._diffEditors=Object.create(null)}addCodeEditor(S){this._codeEditors[S.getId()]=S,this._onCodeEditorAdd.fire(S)}removeCodeEditor(S){delete this._codeEditors[S.getId()]&&this._onCodeEditorRemove.fire(S)}listCodeEditors(){return Object.keys(this._codeEditors).map(S=>this._codeEditors[S])}addDiffEditor(S){this._diffEditors[S.getId()]=S,this._onDiffEditorAdd.fire(S)}removeDiffEditor(S){delete this._diffEditors[S.getId()]&&this._onDiffEditorRemove.fire(S)}listDiffEditors(){return Object.keys(this._diffEditors).map(S=>this._diffEditors[S])}getFocusedCodeEditor(){let S=null;const p=this.listCodeEditors();for(const C of p){if(C.hasTextFocus())return C;C.hasWidgetFocus()&&(S=C)}return S}setModelProperty(S,p,C){const n=S.toString();let g;this._modelProperties.has(n)?g=this._modelProperties.get(n):(g=new Map,this._modelProperties.set(n,g)),g.set(p,C)}getModelProperty(S,p){const C=S.toString();if(this._modelProperties.has(C))return this._modelProperties.get(C).get(p)}}e.AbstractCodeEditorService=T}),define(J[224],ee([0,1]),function(j,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getCharIndex=e.allCharCodes=void 0,e.allCharCodes=(()=>{const N=[];for(let T=32;T<=126;T++)N.push(T);return N.push(65533),N})();const w=(N,T)=>(N-=32,N<0||N>96?T<=2?(N+96)%96:96-1:N);e.getCharIndex=w}),define(J[382],ee([0,1,224,135]),function(j,e,w,N){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MinimapCharRenderer=void 0;class T{constructor(S,p){this.scale=p,this._minimapCharRendererBrand=void 0,this.charDataNormal=T.soften(S,12/15),this.charDataLight=T.soften(S,50/60)}static soften(S,p){let C=new Uint8ClampedArray(S.length);for(let n=0,g=S.length;n<g;n++)C[n]=(0,N.toUint8)(S[n]*p);return C}renderChar(S,p,C,n,g,t,s,c,u,d,a){const r=1*this.scale,o=2*this.scale,i=a?1:o;if(p+r>S.width||C+i>S.height){console.warn("bad render request outside image data");return}const l=d?this.charDataLight:this.charDataNormal,h=(0,w.getCharIndex)(n,u),f=S.width*4,y=s.r,_=s.g,b=s.b,v=g.r-y,m=g.g-_,E=g.b-b,I=Math.max(t,c),k=S.data;let M=h*r*o,P=C*f+p*4;for(let F=0;F<i;F++){let R=P;for(let A=0;A<r;A++){const O=l[M++]/255*(t/255);k[R++]=y+v*O,k[R++]=_+m*O,k[R++]=b+E*O,k[R++]=I}P+=f}}blockRenderChar(S,p,C,n,g,t,s,c){const u=1*this.scale,d=2*this.scale,a=c?1:d;if(p+u>S.width||C+a>S.height){console.warn("bad render request outside image data");return}const r=S.width*4,o=.5*(g/255),i=t.r,l=t.g,h=t.b,f=n.r-i,y=n.g-l,_=n.b-h,b=i+f*o,v=l+y*o,m=h+_*o,E=Math.max(g,s),I=S.data;let k=C*r+p*4;for(let M=0;M<a;M++){let P=k;for(let F=0;F<u;F++)I[P++]=b,I[P++]=v,I[P++]=m,I[P++]=E;k+=r}}}e.MinimapCharRenderer=T}),define(J[383],ee([0,1,82]),function(j,e,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.prebakedMiniMaps=void 0;const N={"0":0,"1":1,"2":2,"3":3,"4":4,"5":5,"6":6,"7":7,"8":8,"9":9,A:10,B:11,C:12,D:13,E:14,F:15},T=D=>{const S=new Uint8ClampedArray(D.length/2);for(let p=0;p<D.length;p+=2)S[p>>1]=N[D[p]]<<4|N[D[p+1]]&15;return S};e.prebakedMiniMaps={1:(0,w.once)(()=>T("0000511D6300CF609C709645A78432005642574171487021003C451900274D35D762755E8B629C5BA856AF57BA649530C167D1512A272A3F6038604460398526BCA2A968DB6F8957C768BE5FBE2FB467CF5D8D5B795DC7625B5DFF50DE64C466DB2FC47CD860A65E9A2EB96CB54CE06DA763AB2EA26860524D3763536601005116008177A8705E53AB738E6A982F88BAA35B5F5B626D9C636B449B737E5B7B678598869A662F6B5B8542706C704C80736A607578685B70594A49715A4522E792")),2:(0,w.once)(()=>T("000000000000000055394F383D2800008B8B1F210002000081B1CBCBCC820000847AAF6B9AAF2119BE08B8881AD60000A44FD07DCCF107015338130C00000000385972265F390B406E2437634B4B48031B12B8A0847000001E15B29A402F0000000000004B33460B00007A752C2A0000000000004D3900000084394B82013400ABA5CFC7AD9C0302A45A3E5A98AB000089A43382D97900008BA54AA087A70A0248A6A7AE6DBE0000BF6F94987EA40A01A06DCFA7A7A9030496C32F77891D0000A99FB1A0AFA80603B29AB9CA75930D010C0948354D3900000C0948354F37460D0028BE673D8400000000AF9D7B6E00002B007AA8933400007AA642675C2700007984CFB9C3985B768772A8A6B7B20000CAAECAAFC4B700009F94A6009F840009D09F9BA4CA9C0000CC8FC76DC87F0000C991C472A2000000A894A48CA7B501079BA2C9C69BA20000B19A5D3FA89000005CA6009DA2960901B0A7F0669FB200009D009E00B7890000DAD0F5D092820000D294D4C48BD10000B5A7A4A3B1A50402CAB6CBA6A2000000B5A7A4A3B1A8044FCDADD19D9CB00000B7778F7B8AAE0803C9AB5D3F5D3F00009EA09EA0BAB006039EA0989A8C7900009B9EF4D6B7C00000A9A7816CACA80000ABAC84705D3F000096DA635CDC8C00006F486F266F263D4784006124097B00374F6D2D6D2D6D4A3A95872322000000030000000000008D8939130000000000002E22A5C9CBC70600AB25C0B5C9B400061A2DB04CA67001082AA6BEBEBFC606002321DACBC19E03087AA08B6768380000282FBAC0B8CA7A88AD25BBA5A29900004C396C5894A6000040485A6E356E9442A32CD17EADA70000B4237923628600003E2DE9C1D7B500002F25BBA5A2990000231DB6AFB4A804023025C0B5CAB588062B2CBDBEC0C706882435A75CA20000002326BD6A82A908048B4B9A5A668000002423A09CB4BB060025259C9D8A7900001C1FCAB2C7C700002A2A9387ABA200002626A4A47D6E9D14333163A0C87500004B6F9C2D643A257049364936493647358A34438355497F1A0000A24C1D590000D38DFFBDD4CD3126"))}}),define(J[384],ee([0,1,382,224,383,135]),function(j,e,w,N,T,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MinimapCharRendererFactory=void 0;class S{static create(C,n){if(this.lastCreated&&C===this.lastCreated.scale&&n===this.lastFontFamily)return this.lastCreated;let g;return T.prebakedMiniMaps[C]?g=new w.MinimapCharRenderer(T.prebakedMiniMaps[C](),C):g=S.createFromSampleData(S.createSampleData(n).data,C),this.lastFontFamily=n,this.lastCreated=g,g}static createSampleData(C){const n=document.createElement("canvas"),g=n.getContext("2d");n.style.height=`${16}px`,n.height=16,n.width=96*10,n.style.width=96*10+"px",g.fillStyle="#ffffff",g.font=`bold ${16}px ${C}`,g.textBaseline="middle";let t=0;for(const s of N.allCharCodes)g.fillText(String.fromCharCode(s),t,16/2),t+=10;return g.getImageData(0,0,96*10,16)}static createFromSampleData(C,n){const g=16*10*4*96;if(C.length!==g)throw new Error("Unexpected source in MinimapCharRenderer");let t=S._downsample(C,n);return new w.MinimapCharRenderer(t,n)}static _downsampleChar(C,n,g,t,s){const c=1*s,u=2*s;let d=t,a=0;for(let r=0;r<u;r++){const o=r/u*16,i=(r+1)/u*16;for(let l=0;l<c;l++){const h=l/c*10,f=(l+1)/c*10;let y=0,_=0;for(let v=o;v<i;v++){const m=n+Math.floor(v)*3840,E=1-(v-Math.floor(v));for(let I=h;I<f;I++){const k=1-(I-Math.floor(I)),M=m+Math.floor(I)*4,P=k*E;_+=P,y+=C[M]*C[M+3]/255*P}}const b=y/_;a=Math.max(a,b),g[d++]=(0,D.toUint8)(b)}}return a}static _downsample(C,n){const g=2*n*1*n,t=g*96,s=new Uint8ClampedArray(t);let c=0,u=0,d=0;for(let a=0;a<96;a++)d=Math.max(d,this._downsampleChar(C,u,s,c,n)),c+=g,u+=10*4;if(d>0){const a=255/d;for(let r=0;r<t;r++)s[r]*=a}return s}}e.MinimapCharRendererFactory=S}),define(J[139],ee([0,1,4]),function(j,e,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EditorZoom=void 0,e.EditorZoom=new class{constructor(){this._zoomLevel=0,this._onDidChangeZoomLevel=new w.Emitter,this.onDidChangeZoomLevel=this._onDidChangeZoomLevel.event}getZoomLevel(){return this._zoomLevel}setZoomLevel(N){N=Math.min(Math.max(-5,N),20),this._zoomLevel!==N&&(this._zoomLevel=N,this._onDidChangeZoomLevel.fire(this._zoomLevel))}}}),define(J[173],ee([0,1,17,139]),function(j,e,w,N){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.FontInfo=e.SERIALIZED_FONT_INFO_VERSION=e.BareFontInfo=void 0;const T=w.isMacintosh?1.5:1.35,D=8;class S{constructor(n){this._bareFontInfoBrand=void 0,this.zoomLevel=n.zoomLevel,this.pixelRatio=n.pixelRatio,this.fontFamily=String(n.fontFamily),this.fontWeight=String(n.fontWeight),this.fontSize=n.fontSize,this.fontFeatureSettings=n.fontFeatureSettings,this.lineHeight=n.lineHeight|0,this.letterSpacing=n.letterSpacing}static createFromValidatedSettings(n,g,t,s){const c=n.get(42),u=n.get(46),d=n.get(45),a=n.get(44),r=n.get(58),o=n.get(55);return S._create(c,u,d,a,r,o,g,t,s)}static _create(n,g,t,s,c,u,d,a,r){c===0?c=T*t:c<D&&(c=c*t),c=Math.round(c),c<D&&(c=D);const o=1+(r?0:N.EditorZoom.getZoomLevel()*.1);return t*=o,c*=o,new S({zoomLevel:d,pixelRatio:a,fontFamily:n,fontWeight:g,fontSize:t,fontFeatureSettings:s,lineHeight:c,letterSpacing:u})}getId(){return this.zoomLevel+"-"+this.pixelRatio+"-"+this.fontFamily+"-"+this.fontWeight+"-"+this.fontSize+"-"+this.fontFeatureSettings+"-"+this.lineHeight+"-"+this.letterSpacing}getMassagedFontFamily(n){const g=S._wrapInQuotes(this.fontFamily);return n&&this.fontFamily!==n?`${g}, ${n}`:g}static _wrapInQuotes(n){return/[,"']/.test(n)?n:/[+ ]/.test(n)?`"${n}"`:n}}e.BareFontInfo=S,e.SERIALIZED_FONT_INFO_VERSION=1;class p extends S{constructor(n,g){super(n);this._editorStylingBrand=void 0,this.version=e.SERIALIZED_FONT_INFO_VERSION,this.isTrusted=g,this.isMonospace=n.isMonospace,this.typicalHalfwidthCharacterWidth=n.typicalHalfwidthCharacterWidth,this.typicalFullwidthCharacterWidth=n.typicalFullwidthCharacterWidth,this.canUseHalfwidthRightwardsArrow=n.canUseHalfwidthRightwardsArrow,this.spaceWidth=n.spaceWidth,this.middotWidth=n.middotWidth,this.wsmiddotWidth=n.wsmiddotWidth,this.maxDigitWidth=n.maxDigitWidth}equals(n){return this.fontFamily===n.fontFamily&&this.fontWeight===n.fontWeight&&this.fontSize===n.fontSize&&this.fontFeatureSettings===n.fontFeatureSettings&&this.lineHeight===n.lineHeight&&this.letterSpacing===n.letterSpacing&&this.typicalHalfwidthCharacterWidth===n.typicalHalfwidthCharacterWidth&&this.typicalFullwidthCharacterWidth===n.typicalFullwidthCharacterWidth&&this.canUseHalfwidthRightwardsArrow===n.canUseHalfwidthRightwardsArrow&&this.spaceWidth===n.spaceWidth&&this.middotWidth===n.middotWidth&&this.wsmiddotWidth===n.wsmiddotWidth&&this.maxDigitWidth===n.maxDigitWidth}}e.FontInfo=p}),define(J[140],ee([0,1,8]),function(j,e,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CursorColumns=void 0;class N{static visibleColumnFromColumn(D,S,p){const C=D.length,n=S-1<C?S-1:C;let g=0,t=0;for(;t<n;){const s=w.getNextCodePoint(D,n,t);if(t+=s>=65536?2:1,s===9)g=N.nextRenderTabStop(g,p);else{let c=w.getGraphemeBreakType(s);for(;t<n;){const u=w.getNextCodePoint(D,n,t),d=w.getGraphemeBreakType(u);if(w.breakBetweenGraphemeBreakType(c,d))break;t+=u>=65536?2:1,c=d}w.isFullWidthCharacter(s)||w.isEmojiImprecise(s)?g=g+2:g=g+1}}return g}static visibleColumnsByColumns(D,S){const p=D.length;let C=new Array;C.push(-1);let n=0,g=0;for(;g<p;){const t=w.getNextCodePoint(D,p,g);if(g+=t>=65536?2:1,C.push(n),t>=65536&&C.push(n),t===9)n=N.nextRenderTabStop(n,S);else{let s=w.getGraphemeBreakType(t);for(;g<p;){const c=w.getNextCodePoint(D,p,g),u=w.getGraphemeBreakType(c);if(w.breakBetweenGraphemeBreakType(s,u))break;g+=c>=65536?2:1,C.push(n),t>=65536&&C.push(n),s=u}w.isFullWidthCharacter(t)||w.isEmojiImprecise(t)?n=n+2:n=n+1}}return C.push(n),C}static visibleColumnFromColumn2(D,S,p){return this.visibleColumnFromColumn(S.getLineContent(p.lineNumber),p.column,D.tabSize)}static columnFromVisibleColumn(D,S,p){if(S<=0)return 1;const C=D.length;let n=0,g=1,t=0;for(;t<C;){const s=w.getNextCodePoint(D,C,t);t+=s>=65536?2:1;let c;if(s===9)c=N.nextRenderTabStop(n,p);else{let d=w.getGraphemeBreakType(s);for(;t<C;){const a=w.getNextCodePoint(D,C,t),r=w.getGraphemeBreakType(a);if(w.breakBetweenGraphemeBreakType(d,r))break;t+=a>=65536?2:1,d=r}w.isFullWidthCharacter(s)||w.isEmojiImprecise(s)?c=n+2:c=n+1}const u=t+1;if(c>=S){const d=S-n;return c-S<d?u:g}n=c,g=u}return C+1}static columnFromVisibleColumn2(D,S,p,C){let n=this.columnFromVisibleColumn(S.getLineContent(p),C,D.tabSize),g=S.getLineMinColumn(p);if(n<g)return g;let t=S.getLineMaxColumn(p);return n>t?t:n}static nextRenderTabStop(D,S){return D+S-D%S}static nextIndentTabStop(D,S){return D+S-D%S}static prevRenderTabStop(D,S){return Math.max(0,D-1-(D-1)%S)}static prevIndentTabStop(D,S){return Math.max(0,D-1-(D-1)%S)}}e.CursorColumns=N}),define(J[97],ee([0,1,135]),function(j,e,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CharacterSet=e.CharacterClassifier=void 0;class N{constructor(S){let p=(0,w.toUint8)(S);this._defaultValue=p,this._asciiMap=N._createAsciiMap(p),this._map=new Map}static _createAsciiMap(S){let p=new Uint8Array(256);for(let C=0;C<256;C++)p[C]=S;return p}set(S,p){let C=(0,w.toUint8)(p);S>=0&&S<256?this._asciiMap[S]=C:this._map.set(S,C)}get(S){return S>=0&&S<256?this._asciiMap[S]:this._map.get(S)||this._defaultValue}}e.CharacterClassifier=N;class T{constructor(){this._actual=new N(0)}add(S){this._actual.set(S,1)}has(S){return this._actual.get(S)===1}}e.CharacterSet=T}),define(J[112],ee([0,1,97]),function(j,e,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getMapForWordSeparators=e.WordCharacterClassifier=void 0;class N extends w.CharacterClassifier{constructor(S){super(0);for(let p=0,C=S.length;p<C;p++)this.set(S.charCodeAt(p),2);this.set(32,1),this.set(9,1)}}e.WordCharacterClassifier=N;function T(D){let S={};return p=>(S.hasOwnProperty(p)||(S[p]=D(p)),S[p])}e.getMapForWordSeparators=T(D=>new N(D))}),define(J[13],ee([0,1]),function(j,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Position=void 0;class w{constructor(T,D){this.lineNumber=T,this.column=D}with(T=this.lineNumber,D=this.column){return T===this.lineNumber&&D===this.column?this:new w(T,D)}delta(T=0,D=0){return this.with(this.lineNumber+T,this.column+D)}equals(T){return w.equals(this,T)}static equals(T,D){return!T&&!D?!0:!!T&&!!D&&T.lineNumber===D.lineNumber&&T.column===D.column}isBefore(T){return w.isBefore(this,T)}static isBefore(T,D){return T.lineNumber<D.lineNumber?!0:D.lineNumber<T.lineNumber?!1:T.column<D.column}isBeforeOrEqual(T){return w.isBeforeOrEqual(this,T)}static isBeforeOrEqual(T,D){return T.lineNumber<D.lineNumber?!0:D.lineNumber<T.lineNumber?!1:T.column<=D.column}static compare(T,D){let S=T.lineNumber|0,p=D.lineNumber|0;if(S===p){let C=T.column|0,n=D.column|0;return C-n}return S-p}clone(){return new w(this.lineNumber,this.column)}toString(){return"("+this.lineNumber+","+this.column+")"}static lift(T){return new w(T.lineNumber,T.column)}static isIPosition(T){return T&&typeof T.lineNumber=="number"&&typeof T.column=="number"}}e.Position=w}),define(J[3],ee([0,1,13]),function(j,e,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Range=void 0;class N{constructor(D,S,p,C){D>p||D===p&&S>C?(this.startLineNumber=p,this.startColumn=C,this.endLineNumber=D,this.endColumn=S):(this.startLineNumber=D,this.startColumn=S,this.endLineNumber=p,this.endColumn=C)}isEmpty(){return N.isEmpty(this)}static isEmpty(D){return D.startLineNumber===D.endLineNumber&&D.startColumn===D.endColumn}containsPosition(D){return N.containsPosition(this,D)}static containsPosition(D,S){return!(S.lineNumber<D.startLineNumber||S.lineNumber>D.endLineNumber||S.lineNumber===D.startLineNumber&&S.column<D.startColumn||S.lineNumber===D.endLineNumber&&S.column>D.endColumn)}containsRange(D){return N.containsRange(this,D)}static containsRange(D,S){return!(S.startLineNumber<D.startLineNumber||S.endLineNumber<D.startLineNumber||S.startLineNumber>D.endLineNumber||S.endLineNumber>D.endLineNumber||S.startLineNumber===D.startLineNumber&&S.startColumn<D.startColumn||S.endLineNumber===D.endLineNumber&&S.endColumn>D.endColumn)}strictContainsRange(D){return N.strictContainsRange(this,D)}static strictContainsRange(D,S){return!(S.startLineNumber<D.startLineNumber||S.endLineNumber<D.startLineNumber||S.startLineNumber>D.endLineNumber||S.endLineNumber>D.endLineNumber||S.startLineNumber===D.startLineNumber&&S.startColumn<=D.startColumn||S.endLineNumber===D.endLineNumber&&S.endColumn>=D.endColumn)}plusRange(D){return N.plusRange(this,D)}static plusRange(D,S){let p,C,n,g;return S.startLineNumber<D.startLineNumber?(p=S.startLineNumber,C=S.startColumn):S.startLineNumber===D.startLineNumber?(p=S.startLineNumber,C=Math.min(S.startColumn,D.startColumn)):(p=D.startLineNumber,C=D.startColumn),S.endLineNumber>D.endLineNumber?(n=S.endLineNumber,g=S.endColumn):S.endLineNumber===D.endLineNumber?(n=S.endLineNumber,g=Math.max(S.endColumn,D.endColumn)):(n=D.endLineNumber,g=D.endColumn),new N(p,C,n,g)}intersectRanges(D){return N.intersectRanges(this,D)}static intersectRanges(D,S){let p=D.startLineNumber,C=D.startColumn,n=D.endLineNumber,g=D.endColumn,t=S.startLineNumber,s=S.startColumn,c=S.endLineNumber,u=S.endColumn;return p<t?(p=t,C=s):p===t&&(C=Math.max(C,s)),n>c?(n=c,g=u):n===c&&(g=Math.min(g,u)),p>n||p===n&&C>g?null:new N(p,C,n,g)}equalsRange(D){return N.equalsRange(this,D)}static equalsRange(D,S){return!!D&&!!S&&D.startLineNumber===S.startLineNumber&&D.startColumn===S.startColumn&&D.endLineNumber===S.endLineNumber&&D.endColumn===S.endColumn}getEndPosition(){return N.getEndPosition(this)}static getEndPosition(D){return new w.Position(D.endLineNumber,D.endColumn)}getStartPosition(){return N.getStartPosition(this)}static getStartPosition(D){return new w.Position(D.startLineNumber,D.startColumn)}toString(){return"["+this.startLineNumber+","+this.startColumn+" -> "+this.endLineNumber+","+this.endColumn+"]"}setEndPosition(D,S){return new N(this.startLineNumber,this.startColumn,D,S)}setStartPosition(D,S){return new N(D,S,this.endLineNumber,this.endColumn)}collapseToStart(){return N.collapseToStart(this)}static collapseToStart(D){return new N(D.startLineNumber,D.startColumn,D.startLineNumber,D.startColumn)}static fromPositions(D,S=D){return new N(D.lineNumber,D.column,S.lineNumber,S.column)}static lift(D){return D?new N(D.startLineNumber,D.startColumn,D.endLineNumber,D.endColumn):null}static isIRange(D){return D&&typeof D.startLineNumber=="number"&&typeof D.startColumn=="number"&&typeof D.endLineNumber=="number"&&typeof D.endColumn=="number"}static areIntersectingOrTouching(D,S){return!(D.endLineNumber<S.startLineNumber||D.endLineNumber===S.startLineNumber&&D.endColumn<S.startColumn||S.endLineNumber<D.startLineNumber||S.endLineNumber===D.startLineNumber&&S.endColumn<D.startColumn)}static areIntersecting(D,S){return!(D.endLineNumber<S.startLineNumber||D.endLineNumber===S.startLineNumber&&D.endColumn<=S.startColumn||S.endLineNumber<D.startLineNumber||S.endLineNumber===D.startLineNumber&&S.endColumn<=D.startColumn)}static compareRangesUsingStarts(D,S){if(D&&S){const n=D.startLineNumber|0,g=S.startLineNumber|0;if(n===g){const t=D.startColumn|0,s=S.startColumn|0;if(t===s){const c=D.endLineNumber|0,u=S.endLineNumber|0;if(c===u){const d=D.endColumn|0,a=S.endColumn|0;return d-a}return c-u}return t-s}return n-g}return(D?1:0)-(S?1:0)}static compareRangesUsingEnds(D,S){return D.endLineNumber===S.endLineNumber?D.endColumn===S.endColumn?D.startLineNumber===S.startLineNumber?D.startColumn-S.startColumn:D.startLineNumber-S.startLineNumber:D.endColumn-S.endColumn:D.endLineNumber-S.endLineNumber}static spansMultipleLines(D){return D.endLineNumber>D.startLineNumber}}e.Range=N}),define(J[225],ee([0,1,8,13,3]),function(j,e,w,N,T){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.PagedScreenReaderStrategy=e.TextAreaState=e._debugComposition=void 0,e._debugComposition=!1;class D{constructor(C,n,g,t,s){this.value=C,this.selectionStart=n,this.selectionEnd=g,this.selectionStartPosition=t,this.selectionEndPosition=s}toString(){return"[ <"+this.value+">, selectionStart: "+this.selectionStart+", selectionEnd: "+this.selectionEnd+"]"}static readFromTextArea(C){return new D(C.getValue(),C.getSelectionStart(),C.getSelectionEnd(),null,null)}collapseSelection(){return new D(this.value,this.value.length,this.value.length,null,null)}writeToTextArea(C,n,g){e._debugComposition&&console.log("writeToTextArea "+C+": "+this.toString()),n.setValue(C,this.value),g&&n.setSelectionRange(C,this.selectionStart,this.selectionEnd)}deduceEditorPosition(C){if(C<=this.selectionStart){const t=this.value.substring(C,this.selectionStart);return this._finishDeduceEditorPosition(this.selectionStartPosition,t,-1)}if(C>=this.selectionEnd){const t=this.value.substring(this.selectionEnd,C);return this._finishDeduceEditorPosition(this.selectionEndPosition,t,1)}const n=this.value.substring(this.selectionStart,C);if(n.indexOf(String.fromCharCode(8230))===-1)return this._finishDeduceEditorPosition(this.selectionStartPosition,n,1);const g=this.value.substring(C,this.selectionEnd);return this._finishDeduceEditorPosition(this.selectionEndPosition,g,-1)}_finishDeduceEditorPosition(C,n,g){let t=0,s=-1;for(;(s=n.indexOf(`
`,s+1))!==-1;)t++;return[C,g*n.length,t]}static selectedText(C){return new D(C,0,C.length,null,null)}static deduceInput(C,n,g){if(!C)return{text:"",replacePrevCharCnt:0,replaceNextCharCnt:0,positionDelta:0};e._debugComposition&&(console.log("------------------------deduceInput"),console.log("PREVIOUS STATE: "+C.toString()),console.log("CURRENT STATE: "+n.toString()));let t=C.value,s=C.selectionStart,c=C.selectionEnd,u=n.value,d=n.selectionStart,a=n.selectionEnd;const r=t.substring(c),o=u.substring(a),i=w.commonSuffixLength(r,o);u=u.substring(0,u.length-i),t=t.substring(0,t.length-i);const l=t.substring(0,s),h=u.substring(0,d),f=w.commonPrefixLength(l,h);if(u=u.substring(f),t=t.substring(f),d-=f,s-=f,a-=f,c-=f,e._debugComposition&&(console.log("AFTER DIFFING PREVIOUS STATE: <"+t+">, selectionStart: "+s+", selectionEnd: "+c),console.log("AFTER DIFFING CURRENT STATE: <"+u+">, selectionStart: "+d+", selectionEnd: "+a)),g&&d===a&&t.length>0){let _=null;if(d===u.length?u.startsWith(t)&&(_=u.substring(t.length)):u.endsWith(t)&&(_=u.substring(0,u.length-t.length)),_!==null&&_.length>0&&(/\uFE0F/.test(_)||w.containsEmoji(_)))return{text:_,replacePrevCharCnt:0,replaceNextCharCnt:0,positionDelta:0}}if(d===a){if(t===u&&s===0&&c===t.length&&d===u.length&&u.indexOf(`
`)===-1&&w.containsFullWidthCharacter(u))return{text:"",replacePrevCharCnt:0,replaceNextCharCnt:0,positionDelta:0};const _=l.length-f;return e._debugComposition&&console.log("REMOVE PREVIOUS: "+(l.length-f)+" chars"),{text:u,replacePrevCharCnt:_,replaceNextCharCnt:0,positionDelta:0}}const y=c-s;return{text:u,replacePrevCharCnt:y,replaceNextCharCnt:0,positionDelta:0}}static deduceAndroidCompositionInput(C,n){if(!C)return{text:"",replacePrevCharCnt:0,replaceNextCharCnt:0,positionDelta:0};if(e._debugComposition&&(console.log("------------------------deduceAndroidCompositionInput"),console.log("PREVIOUS STATE: "+C.toString()),console.log("CURRENT STATE: "+n.toString())),C.value===n.value)return{text:"",replacePrevCharCnt:0,replaceNextCharCnt:0,positionDelta:n.selectionEnd-C.selectionEnd};const g=Math.min(w.commonPrefixLength(C.value,n.value),C.selectionEnd),t=Math.min(w.commonSuffixLength(C.value,n.value),C.value.length-C.selectionEnd),s=C.value.substring(g,C.value.length-t),c=n.value.substring(g,n.value.length-t),u=C.selectionStart-g,d=C.selectionEnd-g,a=n.selectionStart-g,r=n.selectionEnd-g;return e._debugComposition&&(console.log("AFTER DIFFING PREVIOUS STATE: <"+s+">, selectionStart: "+u+", selectionEnd: "+d),console.log("AFTER DIFFING CURRENT STATE: <"+c+">, selectionStart: "+a+", selectionEnd: "+r)),{text:c,replacePrevCharCnt:d,replaceNextCharCnt:s.length-d,positionDelta:r-c.length}}}e.TextAreaState=D,D.EMPTY=new D("",0,0,null,null);class S{static _getPageOfLine(C,n){return Math.floor((C-1)/n)}static _getRangeForPage(C,n){const g=C*n,t=g+1,s=g+n;return new T.Range(t,1,s+1,1)}static fromEditorSelection(C,n,g,t,s){const c=S._getPageOfLine(g.startLineNumber,t),u=S._getRangeForPage(c,t),d=S._getPageOfLine(g.endLineNumber,t),a=S._getRangeForPage(d,t),r=u.intersectRanges(new T.Range(1,1,g.startLineNumber,g.startColumn));let o=n.getValueInRange(r,1);const i=n.getLineCount(),l=n.getLineMaxColumn(i),h=a.intersectRanges(new T.Range(g.endLineNumber,g.endColumn,i,l));let f=n.getValueInRange(h,1),y;if(c===d||c+1===d)y=n.getValueInRange(g,1);else{const _=u.intersectRanges(g),b=a.intersectRanges(g);y=n.getValueInRange(_,1)+String.fromCharCode(8230)+n.getValueInRange(b,1)}if(s){const _=500;o.length>_&&(o=o.substring(o.length-_,o.length)),f.length>_&&(f=f.substring(0,_)),y.length>2*_&&(y=y.substring(0,_)+String.fromCharCode(8230)+y.substring(y.length-_,y.length))}return new D(o+y+f,o.length,o.length+y.length,new N.Position(g.startLineNumber,g.startColumn),new N.Position(g.endLineNumber,g.endColumn))}}e.PagedScreenReaderStrategy=S}),define(J[226],ee([0,1,206,4,2,38,3]),function(j,e,w,N,T,D,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DiffNavigator=void 0;const p={followsCaret:!0,ignoreCharChanges:!0,alwaysRevealFirst:!0};class C extends T.Disposable{constructor(g,t={}){super();this._onDidUpdate=this._register(new N.Emitter),this._editor=g,this._options=D.mixin(t,p,!1),this.disposed=!1,this.nextIdx=-1,this.ranges=[],this.ignoreSelectionChange=!1,this.revealFirst=Boolean(this._options.alwaysRevealFirst),this._register(this._editor.onDidDispose(()=>this.dispose())),this._register(this._editor.onDidUpdateDiff(()=>this._onDiffUpdated())),this._options.followsCaret&&this._register(this._editor.getModifiedEditor().onDidChangeCursorPosition(s=>{this.ignoreSelectionChange||(this.nextIdx=-1)})),this._options.alwaysRevealFirst&&this._register(this._editor.getModifiedEditor().onDidChangeModel(s=>{this.revealFirst=!0})),this._init()}_init(){!!this._editor.getLineChanges()}_onDiffUpdated(){this._init(),this._compute(this._editor.getLineChanges()),this.revealFirst&&this._editor.getLineChanges()!==null&&(this.revealFirst=!1,this.nextIdx=-1,this.next(1))}_compute(g){this.ranges=[],g&&g.forEach(t=>{!this._options.ignoreCharChanges&&t.charChanges?t.charChanges.forEach(s=>{this.ranges.push({rhs:!0,range:new S.Range(s.modifiedStartLineNumber,s.modifiedStartColumn,s.modifiedEndLineNumber,s.modifiedEndColumn)})}):t.modifiedEndLineNumber===0?this.ranges.push({rhs:!0,range:new S.Range(t.modifiedStartLineNumber,1,t.modifiedStartLineNumber+1,1)}):this.ranges.push({rhs:!0,range:new S.Range(t.modifiedStartLineNumber,1,t.modifiedEndLineNumber+1,1)})}),this.ranges.sort((t,s)=>S.Range.compareRangesUsingStarts(t.range,s.range)),this._onDidUpdate.fire(this)}_initIdx(g){let t=!1,s=this._editor.getPosition();if(!s){this.nextIdx=0;return}for(let c=0,u=this.ranges.length;c<u&&!t;c++){let d=this.ranges[c].range;s.isBeforeOrEqual(d.getStartPosition())&&(this.nextIdx=c+(g?0:-1),t=!0)}t||(this.nextIdx=g?0:this.ranges.length-1),this.nextIdx<0&&(this.nextIdx=this.ranges.length-1)}_move(g,t){if(w.ok(!this.disposed,"Illegal State - diff navigator has been disposed"),!this.canNavigate())return;this.nextIdx===-1?this._initIdx(g):g?(this.nextIdx+=1,this.nextIdx>=this.ranges.length&&(this.nextIdx=0)):(this.nextIdx-=1,this.nextIdx<0&&(this.nextIdx=this.ranges.length-1));let s=this.ranges[this.nextIdx];this.ignoreSelectionChange=!0;try{let c=s.range.getStartPosition();this._editor.setPosition(c),this._editor.revealRangeInCenter(s.range,t)}finally{this.ignoreSelectionChange=!1}}canNavigate(){return this.ranges&&this.ranges.length>0}next(g=0){this._move(!0,g)}previous(g=0){this._move(!1,g)}dispose(){super.dispose(),this.ranges=[],this.disposed=!0}}e.DiffNavigator=C}),define(J[59],ee([0,1,3]),function(j,e,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EditOperation=void 0;class N{static insert(D,S){return{range:new w.Range(D.lineNumber,D.column,D.lineNumber,D.column),text:S,forceMoveMarkers:!0}}static delete(D){return{range:D,text:null}}static replace(D,S){return{range:D,text:S}}static replaceMove(D,S){return{range:D,text:S,forceMoveMarkers:!0}}}e.EditOperation=N}),define(J[385],ee([0,1,8,59,3]),function(j,e,w,N,T){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.trimTrailingWhitespace=e.TrimTrailingWhitespaceCommand=void 0;class D{constructor(C,n){this._selection=C,this._cursors=n,this._selectionId=null}getEditOperations(C,n){let g=S(C,this._cursors);for(let t=0,s=g.length;t<s;t++){let c=g[t];n.addEditOperation(c.range,c.text)}this._selectionId=n.trackSelection(this._selection)}computeCursorState(C,n){return n.getTrackedSelection(this._selectionId)}}e.TrimTrailingWhitespaceCommand=D;function S(p,C){C.sort((c,u)=>c.lineNumber===u.lineNumber?c.column-u.column:c.lineNumber-u.lineNumber);for(let c=C.length-2;c>=0;c--)C[c].lineNumber===C[c+1].lineNumber&&C.splice(c,1);let n=[],g=0,t=0,s=C.length;for(let c=1,u=p.getLineCount();c<=u;c++){let d=p.getLineContent(c),a=d.length+1,r=0;if(t<s&&C[t].lineNumber===c&&(r=C[t].column,t++,r===a)||d.length===0)continue;let o=w.lastNonWhitespaceIndex(d),i=0;if(o===-1)i=1;else if(o!==d.length-1)i=o+2;else continue;i=Math.max(r,i),n[g++]=N.EditOperation.delete(new T.Range(c,i,c,a))}return n}e.trimTrailingWhitespace=S}),define(J[227],ee([0,1]),function(j,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.RGBA8=void 0;class w{constructor(T,D,S,p){this._rgba8Brand=void 0,this.r=w._clamp(T),this.g=w._clamp(D),this.b=w._clamp(S),this.a=w._clamp(p)}equals(T){return this.r===T.r&&this.g===T.g&&this.b===T.b&&this.a===T.a}static _clamp(T){return T<0?0:T>255?255:T|0}}e.RGBA8=w,w.Empty=new w(0,0,0,0)}),define(J[22],ee([0,1,13,3]),function(j,e,w,N){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Selection=void 0;class T extends N.Range{constructor(S,p,C,n){super(S,p,C,n);this.selectionStartLineNumber=S,this.selectionStartColumn=p,this.positionLineNumber=C,this.positionColumn=n}toString(){return"["+this.selectionStartLineNumber+","+this.selectionStartColumn+" -> "+this.positionLineNumber+","+this.positionColumn+"]"}equalsSelection(S){return T.selectionsEqual(this,S)}static selectionsEqual(S,p){return S.selectionStartLineNumber===p.selectionStartLineNumber&&S.selectionStartColumn===p.selectionStartColumn&&S.positionLineNumber===p.positionLineNumber&&S.positionColumn===p.positionColumn}getDirection(){return this.selectionStartLineNumber===this.startLineNumber&&this.selectionStartColumn===this.startColumn?0:1}setEndPosition(S,p){return this.getDirection()===0?new T(this.startLineNumber,this.startColumn,S,p):new T(S,p,this.startLineNumber,this.startColumn)}getPosition(){return new w.Position(this.positionLineNumber,this.positionColumn)}setStartPosition(S,p){return this.getDirection()===0?new T(S,p,this.endLineNumber,this.endColumn):new T(this.endLineNumber,this.endColumn,S,p)}static fromPositions(S,p=S){return new T(S.lineNumber,S.column,p.lineNumber,p.column)}static liftSelection(S){return new T(S.selectionStartLineNumber,S.selectionStartColumn,S.positionLineNumber,S.positionColumn)}static selectionsArrEqual(S,p){if(S&&!p||!S&&p)return!1;if(!S&&!p)return!0;if(S.length!==p.length)return!1;for(let C=0,n=S.length;C<n;C++)if(!this.selectionsEqual(S[C],p[C]))return!1;return!0}static isISelection(S){return S&&typeof S.selectionStartLineNumber=="number"&&typeof S.selectionStartColumn=="number"&&typeof S.positionLineNumber=="number"&&typeof S.positionColumn=="number"}static createWithDirection(S,p,C,n,g){return g===0?new T(S,p,C,n):new T(C,n,S,p)}}e.Selection=T}),define(J[174],ee([0,1,34,7,14,4,2,109,17,8,225,13,22]),function(j,e,w,N,T,D,S,p,C,n,g,t,s){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TextAreaInput=e.InMemoryClipboardMetadataManager=e.CopyOptions=e.TextAreaSyntethicEvents=void 0;var c;(function(o){o.Tap="-monaco-textarea-synthetic-tap"})(c=e.TextAreaSyntethicEvents||(e.TextAreaSyntethicEvents={})),e.CopyOptions={forceCopyWithSyntaxHighlighting:!1};class u{constructor(){this._lastState=null}set(i,l){this._lastState={lastCopiedValue:i,data:l}}get(i){return this._lastState&&this._lastState.lastCopiedValue===i?this._lastState.data:(this._lastState=null,null)}}e.InMemoryClipboardMetadataManager=u,u.INSTANCE=new u;class d extends S.Disposable{constructor(i,l){super();this.textArea=l,this._onFocus=this._register(new D.Emitter),this.onFocus=this._onFocus.event,this._onBlur=this._register(new D.Emitter),this.onBlur=this._onBlur.event,this._onKeyDown=this._register(new D.Emitter),this.onKeyDown=this._onKeyDown.event,this._onKeyUp=this._register(new D.Emitter),this.onKeyUp=this._onKeyUp.event,this._onCut=this._register(new D.Emitter),this.onCut=this._onCut.event,this._onPaste=this._register(new D.Emitter),this.onPaste=this._onPaste.event,this._onType=this._register(new D.Emitter),this.onType=this._onType.event,this._onCompositionStart=this._register(new D.Emitter),this.onCompositionStart=this._onCompositionStart.event,this._onCompositionUpdate=this._register(new D.Emitter),this.onCompositionUpdate=this._onCompositionUpdate.event,this._onCompositionEnd=this._register(new D.Emitter),this.onCompositionEnd=this._onCompositionEnd.event,this._onSelectionChangeRequest=this._register(new D.Emitter),this.onSelectionChangeRequest=this._onSelectionChangeRequest.event,this._host=i,this._textArea=this._register(new r(l)),this._asyncTriggerCut=this._register(new T.RunOnceScheduler(()=>this._onCut.fire(),0)),this._asyncFocusGainWriteScreenReaderContent=this._register(new T.RunOnceScheduler(()=>this.writeScreenReaderContent("asyncFocusGain"),0)),this._textAreaState=g.TextAreaState.EMPTY,this._selectionChangeListener=null,this.writeScreenReaderContent("ctor"),this._hasFocus=!1,this._isDoingComposition=!1,this._nextCommand=0;let h=null;this._register(N.addStandardDisposableListener(l.domNode,"keydown",b=>{(b.keyCode===109||this._isDoingComposition&&b.keyCode===1)&&b.stopPropagation(),b.equals(9)&&b.preventDefault(),h=b,this._onKeyDown.fire(b)})),this._register(N.addStandardDisposableListener(l.domNode,"keyup",b=>{this._onKeyUp.fire(b)})),this._register(N.addDisposableListener(l.domNode,"compositionstart",b=>{if(g._debugComposition&&console.log("[compositionstart]",b),!this._isDoingComposition){if(this._isDoingComposition=!0,C.isMacintosh&&this._textAreaState.selectionStart===this._textAreaState.selectionEnd&&this._textAreaState.selectionStart>0&&this._textAreaState.value.substr(this._textAreaState.selectionStart-1,1)===b.data&&(h&&h.equals(109)&&(h.code==="ArrowRight"||h.code==="ArrowLeft")||w.isFirefox)){g._debugComposition&&console.log("[compositionstart] Handling long press case on macOS + arrow key or Firefox",b),this._textAreaState=new g.TextAreaState(this._textAreaState.value,this._textAreaState.selectionStart-1,this._textAreaState.selectionEnd,this._textAreaState.selectionStartPosition?new t.Position(this._textAreaState.selectionStartPosition.lineNumber,this._textAreaState.selectionStartPosition.column-1):null,this._textAreaState.selectionEndPosition),this._onCompositionStart.fire({revealDeltaColumns:-1});return}if(w.isAndroid){this._onCompositionStart.fire({revealDeltaColumns:-this._textAreaState.selectionStart});return}this._setAndWriteTextAreaState("compositionstart",g.TextAreaState.EMPTY),this._onCompositionStart.fire({revealDeltaColumns:0})}}));const f=b=>{const v=this._textAreaState,m=g.TextAreaState.readFromTextArea(this._textArea);return[m,g.TextAreaState.deduceInput(v,m,b)]},y=()=>{const b=this._textAreaState,v=g.TextAreaState.readFromTextArea(this._textArea);return[v,g.TextAreaState.deduceAndroidCompositionInput(b,v)]},_=b=>{const v=this._textAreaState,m=g.TextAreaState.selectedText(b),E={text:m.value,replacePrevCharCnt:v.selectionEnd-v.selectionStart,replaceNextCharCnt:0,positionDelta:0};return[m,E]};this._register(N.addDisposableListener(l.domNode,"compositionupdate",b=>{if(g._debugComposition&&console.log("[compositionupdate]",b),w.isAndroid){const[E,I]=y();this._textAreaState=E,this._onType.fire(I),this._onCompositionUpdate.fire(b);return}const[v,m]=_(b.data||"");this._textAreaState=v,this._onType.fire(m),this._onCompositionUpdate.fire(b)})),this._register(N.addDisposableListener(l.domNode,"compositionend",b=>{if(g._debugComposition&&console.log("[compositionend]",b),!this._isDoingComposition)return;if(this._isDoingComposition=!1,w.isAndroid){const[E,I]=y();this._textAreaState=E,this._onType.fire(I),this._onCompositionEnd.fire();return}const[v,m]=_(b.data||"");this._textAreaState=v,this._onType.fire(m),(w.isChrome||w.isFirefox)&&(this._textAreaState=g.TextAreaState.readFromTextArea(this._textArea)),this._onCompositionEnd.fire()})),this._register(N.addDisposableListener(l.domNode,"input",()=>{if(this._textArea.setIgnoreSelectionChangeTime("received input event"),this._isDoingComposition)return;const[b,v]=f(C.isMacintosh);v.replacePrevCharCnt===0&&v.text.length===1&&n.isHighSurrogate(v.text.charCodeAt(0))||(this._textAreaState=b,this._nextCommand===0?(v.text!==""||v.replacePrevCharCnt!==0)&&this._onType.fire(v):((v.text!==""||v.replacePrevCharCnt!==0)&&this._firePaste(v.text,null),this._nextCommand=0))})),this._register(N.addDisposableListener(l.domNode,"cut",b=>{this._textArea.setIgnoreSelectionChangeTime("received cut event"),this._ensureClipboardGetsEditorSelection(b),this._asyncTriggerCut.schedule()})),this._register(N.addDisposableListener(l.domNode,"copy",b=>{this._ensureClipboardGetsEditorSelection(b)})),this._register(N.addDisposableListener(l.domNode,"paste",b=>{if(this._textArea.setIgnoreSelectionChangeTime("received paste event"),a.canUseTextData(b)){const[v,m]=a.getTextData(b);v!==""&&this._firePaste(v,m)}else this._textArea.getSelectionStart()!==this._textArea.getSelectionEnd()&&this._setAndWriteTextAreaState("paste",g.TextAreaState.EMPTY),this._nextCommand=1})),this._register(N.addDisposableListener(l.domNode,"focus",()=>{const b=this._hasFocus;this._setHasFocus(!0),w.isSafari&&!b&&this._hasFocus&&this._asyncFocusGainWriteScreenReaderContent.schedule()})),this._register(N.addDisposableListener(l.domNode,"blur",()=>{this._isDoingComposition&&(this._isDoingComposition=!1,this.writeScreenReaderContent("blurWithoutCompositionEnd"),this._onCompositionEnd.fire()),this._setHasFocus(!1)})),this._register(N.addDisposableListener(l.domNode,c.Tap,()=>{w.isAndroid&&this._isDoingComposition&&(this._isDoingComposition=!1,this.writeScreenReaderContent("tapWithoutCompositionEnd"),this._onCompositionEnd.fire())}))}_installSelectionChangeListener(){let i=0;return N.addDisposableListener(document,"selectionchange",l=>{if(!this._hasFocus||this._isDoingComposition||!w.isChrome)return;const h=Date.now(),f=h-i;if(i=h,f<5)return;const y=h-this._textArea.getIgnoreSelectionChangeTime();if(this._textArea.resetSelectionChangeTime(),y<100||!this._textAreaState.selectionStartPosition||!this._textAreaState.selectionEndPosition)return;const _=this._textArea.getValue();if(this._textAreaState.value!==_)return;const b=this._textArea.getSelectionStart(),v=this._textArea.getSelectionEnd();if(this._textAreaState.selectionStart===b&&this._textAreaState.selectionEnd===v)return;const m=this._textAreaState.deduceEditorPosition(b),E=this._host.deduceModelPosition(m[0],m[1],m[2]),I=this._textAreaState.deduceEditorPosition(v),k=this._host.deduceModelPosition(I[0],I[1],I[2]),M=new s.Selection(E.lineNumber,E.column,k.lineNumber,k.column);this._onSelectionChangeRequest.fire(M)})}dispose(){super.dispose(),this._selectionChangeListener&&(this._selectionChangeListener.dispose(),this._selectionChangeListener=null)}focusTextArea(){this._setHasFocus(!0),this.refreshFocusState()}isFocused(){return this._hasFocus}refreshFocusState(){const i=N.getShadowRoot(this.textArea.domNode);i?this._setHasFocus(i.activeElement===this.textArea.domNode):N.isInDOM(this.textArea.domNode)?this._setHasFocus(document.activeElement===this.textArea.domNode):this._setHasFocus(!1)}_setHasFocus(i){this._hasFocus!==i&&(this._hasFocus=i,this._selectionChangeListener&&(this._selectionChangeListener.dispose(),this._selectionChangeListener=null),this._hasFocus&&(this._selectionChangeListener=this._installSelectionChangeListener()),this._hasFocus&&this.writeScreenReaderContent("focusgain"),this._hasFocus?this._onFocus.fire():this._onBlur.fire())}_setAndWriteTextAreaState(i,l){this._hasFocus||(l=l.collapseSelection()),l.writeToTextArea(i,this._textArea,this._hasFocus),this._textAreaState=l}writeScreenReaderContent(i){this._isDoingComposition||this._setAndWriteTextAreaState(i,this._host.getScreenReaderContent(this._textAreaState))}_ensureClipboardGetsEditorSelection(i){const l=this._host.getDataToCopy(a.canUseTextData(i)),h={version:1,isFromEmptySelection:l.isFromEmptySelection,multicursorText:l.multicursorText,mode:l.mode};if(u.INSTANCE.set(w.isFirefox?l.text.replace(/\r\n/g,`
`):l.text,h),!a.canUseTextData(i)){this._setAndWriteTextAreaState("copy or cut",g.TextAreaState.selectedText(l.text));return}a.setTextData(i,l.text,l.html,h)}_firePaste(i,l){l||(l=u.INSTANCE.get(i)),this._onPaste.fire({text:i,metadata:l})}}e.TextAreaInput=d;class a{static canUseTextData(i){return!!i.clipboardData}static getTextData(i){if(i.clipboardData){i.preventDefault();const l=i.clipboardData.getData(p.Mimes.text);let h=null;const f=i.clipboardData.getData("vscode-editor-data");if(typeof f=="string")try{h=JSON.parse(f),h.version!==1&&(h=null)}catch(y){}return[l,h]}throw new Error("ClipboardEventUtils.getTextData: Cannot use text data!")}static setTextData(i,l,h,f){if(i.clipboardData){i.clipboardData.setData(p.Mimes.text,l),typeof h=="string"&&i.clipboardData.setData("text/html",h),i.clipboardData.setData("vscode-editor-data",JSON.stringify(f)),i.preventDefault();return}throw new Error("ClipboardEventUtils.setTextData: Cannot use text data!")}}class r extends S.Disposable{constructor(i){super();this._actual=i,this._ignoreSelectionChangeTime=0}setIgnoreSelectionChangeTime(i){this._ignoreSelectionChangeTime=Date.now()}getIgnoreSelectionChangeTime(){return this._ignoreSelectionChangeTime}resetSelectionChangeTime(){this._ignoreSelectionChangeTime=0}getValue(){return this._actual.domNode.value}setValue(i,l){const h=this._actual.domNode;h.value!==l&&(this.setIgnoreSelectionChangeTime("setValue"),h.value=l)}getSelectionStart(){return this._actual.domNode.selectionDirection==="backward"?this._actual.domNode.selectionEnd:this._actual.domNode.selectionStart}getSelectionEnd(){return this._actual.domNode.selectionDirection==="backward"?this._actual.domNode.selectionStart:this._actual.domNode.selectionEnd}setSelectionRange(i,l,h){const f=this._actual.domNode;let y=null;const _=N.getShadowRoot(f);_?y=_.activeElement:y=document.activeElement;const b=y===f,v=f.selectionStart,m=f.selectionEnd;if(b&&v===l&&m===h){w.isFirefox&&window.parent!==window&&f.focus();return}if(b){this.setIgnoreSelectionChangeTime("setSelectionRange"),f.setSelectionRange(l,h),w.isFirefox&&window.parent!==window&&f.focus();return}try{const E=N.saveParentsScrollTop(f);this.setIgnoreSelectionChangeTime("setSelectionRange"),f.focus(),f.setSelectionRange(l,h),N.restoreParentsScrollTop(f,E)}catch(E){}}}}),define(J[98],ee([0,1,22]),function(j,e,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ReplaceCommandThatPreservesSelection=e.ReplaceCommandWithOffsetCursorState=e.ReplaceCommandWithoutChangingPosition=e.ReplaceCommandThatSelectsText=e.ReplaceCommand=void 0;class N{constructor(n,g,t=!1){this._range=n,this._text=g,this.insertsAutoWhitespace=t}getEditOperations(n,g){g.addTrackedEditOperation(this._range,this._text)}computeCursorState(n,g){let s=g.getInverseEditOperations()[0].range;return new w.Selection(s.endLineNumber,s.endColumn,s.endLineNumber,s.endColumn)}}e.ReplaceCommand=N;class T{constructor(n,g){this._range=n,this._text=g}getEditOperations(n,g){g.addTrackedEditOperation(this._range,this._text)}computeCursorState(n,g){const s=g.getInverseEditOperations()[0].range;return new w.Selection(s.startLineNumber,s.startColumn,s.endLineNumber,s.endColumn)}}e.ReplaceCommandThatSelectsText=T;class D{constructor(n,g,t=!1){this._range=n,this._text=g,this.insertsAutoWhitespace=t}getEditOperations(n,g){g.addTrackedEditOperation(this._range,this._text)}computeCursorState(n,g){let s=g.getInverseEditOperations()[0].range;return new w.Selection(s.startLineNumber,s.startColumn,s.startLineNumber,s.startColumn)}}e.ReplaceCommandWithoutChangingPosition=D;class S{constructor(n,g,t,s,c=!1){this._range=n,this._text=g,this._columnDeltaOffset=s,this._lineNumberDeltaOffset=t,this.insertsAutoWhitespace=c}getEditOperations(n,g){g.addTrackedEditOperation(this._range,this._text)}computeCursorState(n,g){let s=g.getInverseEditOperations()[0].range;return new w.Selection(s.endLineNumber+this._lineNumberDeltaOffset,s.endColumn+this._columnDeltaOffset,s.endLineNumber+this._lineNumberDeltaOffset,s.endColumn+this._columnDeltaOffset)}}e.ReplaceCommandWithOffsetCursorState=S;class p{constructor(n,g,t,s=!1){this._range=n,this._text=g,this._initialSelection=t,this._forceMoveMarkers=s,this._selectionId=null}getEditOperations(n,g){g.addTrackedEditOperation(this._range,this._text,this._forceMoveMarkers),this._selectionId=g.trackSelection(this._initialSelection)}computeCursorState(n,g){return g.getTrackedSelection(this._selectionId)}}e.ReplaceCommandThatPreservesSelection=p}),define(J[386],ee([0,1,3,22]),function(j,e,w,N){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SurroundSelectionCommand=void 0;class T{constructor(S,p,C){this._range=S,this._charBeforeSelection=p,this._charAfterSelection=C}getEditOperations(S,p){p.addTrackedEditOperation(new w.Range(this._range.startLineNumber,this._range.startColumn,this._range.startLineNumber,this._range.startColumn),this._charBeforeSelection),p.addTrackedEditOperation(new w.Range(this._range.endLineNumber,this._range.endColumn,this._range.endLineNumber,this._range.endColumn),this._charAfterSelection)}computeCursorState(S,p){let C=p.getInverseEditOperations(),n=C[0].range,g=C[1].range;return new N.Selection(n.endLineNumber,n.endColumn,g.endLineNumber,g.endColumn-this._charAfterSelection.length)}}e.SurroundSelectionCommand=T}),define(J[84],ee([0,1,8,17,105]),function(j,e,w,N,T){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.decodeUTF16LE=e.createStringBuilder=e.hasTextDecoder=e.getPlatformTextDecoder=void 0;let D;function S(){return D||(D=new TextDecoder("UTF-16LE")),D}let p;function C(){return p||(p=new TextDecoder("UTF-16BE")),p}let n;function g(){return n||(n=N.isLittleEndian()?S():C()),n}e.getPlatformTextDecoder=g,e.hasTextDecoder=typeof TextDecoder!="undefined",e.hasTextDecoder?(e.createStringBuilder=d=>new c(d),e.decodeUTF16LE=t):(e.createStringBuilder=d=>new u,e.decodeUTF16LE=s);function t(d,a,r){const o=new Uint16Array(d.buffer,a,r);return r>0&&(o[0]===65279||o[0]===65534)?s(d,a,r):S().decode(o)}function s(d,a,r){let o=[],i=0;for(let l=0;l<r;l++){const h=T.readUInt16LE(d,a);a+=2,o[i++]=String.fromCharCode(h)}return o.join("")}class c{constructor(a){this._capacity=a|0,this._buffer=new Uint16Array(this._capacity),this._completedStrings=null,this._bufferLength=0}reset(){this._completedStrings=null,this._bufferLength=0}build(){return this._completedStrings!==null?(this._flushBuffer(),this._completedStrings.join("")):this._buildBuffer()}_buildBuffer(){if(this._bufferLength===0)return"";const a=new Uint16Array(this._buffer.buffer,0,this._bufferLength);return g().decode(a)}_flushBuffer(){const a=this._buildBuffer();this._bufferLength=0,this._completedStrings===null?this._completedStrings=[a]:this._completedStrings[this._completedStrings.length]=a}write1(a){const r=this._capacity-this._bufferLength;r<=1&&(r===0||w.isHighSurrogate(a))&&this._flushBuffer(),this._buffer[this._bufferLength++]=a}appendASCII(a){this._bufferLength===this._capacity&&this._flushBuffer(),this._buffer[this._bufferLength++]=a}appendASCIIString(a){const r=a.length;if(this._bufferLength+r>=this._capacity){this._flushBuffer(),this._completedStrings[this._completedStrings.length]=a;return}for(let o=0;o<r;o++)this._buffer[this._bufferLength++]=a.charCodeAt(o)}}class u{constructor(){this._pieces=[],this._piecesLen=0}reset(){this._pieces=[],this._piecesLen=0}build(){return this._pieces.join("")}write1(a){this._pieces[this._piecesLen++]=String.fromCharCode(a)}appendASCII(a){this._pieces[this._piecesLen++]=String.fromCharCode(a)}appendASCIIString(a){this._pieces[this._piecesLen++]=a}}}),define(J[175],ee([0,1,30,84]),function(j,e,w,N){"use strict";var T;Object.defineProperty(e,"__esModule",{value:!0}),e.VisibleLinesCollection=e.RenderedLinesCollection=void 0;class D{constructor(n){this._createLine=n,this._set(1,[])}flush(){this._set(1,[])}_set(n,g){this._lines=g,this._rendLineNumberStart=n}_get(){return{rendLineNumberStart:this._rendLineNumberStart,lines:this._lines}}getStartLineNumber(){return this._rendLineNumberStart}getEndLineNumber(){return this._rendLineNumberStart+this._lines.length-1}getCount(){return this._lines.length}getLine(n){const g=n-this._rendLineNumberStart;if(g<0||g>=this._lines.length)throw new Error("Illegal value for lineNumber");return this._lines[g]}onLinesDeleted(n,g){if(this.getCount()===0)return null;const t=this.getStartLineNumber(),s=this.getEndLineNumber();if(g<t){const a=g-n+1;return this._rendLineNumberStart-=a,null}if(n>s)return null;let c=0,u=0;for(let a=t;a<=s;a++){const r=a-this._rendLineNumberStart;n<=a&&a<=g&&(u===0?(c=r,u=1):u++)}if(n<t){let a=0;g<t?a=g-n+1:a=t-n,this._rendLineNumberStart-=a}return this._lines.splice(c,u)}onLinesChanged(n,g){if(this.getCount()===0)return!1;const t=this.getStartLineNumber(),s=this.getEndLineNumber();let c=!1;for(let u=n;u<=g;u++)u>=t&&u<=s&&(this._lines[u-this._rendLineNumberStart].onContentChanged(),c=!0);return c}onLinesInserted(n,g){if(this.getCount()===0)return null;const t=g-n+1,s=this.getStartLineNumber(),c=this.getEndLineNumber();if(n<=s)return this._rendLineNumberStart+=t,null;if(n>c)return null;if(t+n>c)return this._lines.splice(n-this._rendLineNumberStart,c-n+1);const u=[];for(let i=0;i<t;i++)u[i]=this._createLine();const d=n-this._rendLineNumberStart,a=this._lines.slice(0,d),r=this._lines.slice(d,this._lines.length-t),o=this._lines.slice(this._lines.length-t,this._lines.length);return this._lines=a.concat(u).concat(r),o}onTokensChanged(n){if(this.getCount()===0)return!1;const g=this.getStartLineNumber(),t=this.getEndLineNumber();let s=!1;for(let c=0,u=n.length;c<u;c++){const d=n[c];if(d.toLineNumber<g||d.fromLineNumber>t)continue;const a=Math.max(g,d.fromLineNumber),r=Math.min(t,d.toLineNumber);for(let o=a;o<=r;o++){const i=o-this._rendLineNumberStart;this._lines[i].onTokensChanged(),s=!0}}return s}}e.RenderedLinesCollection=D;class S{constructor(n){this._host=n,this.domNode=this._createDomNode(),this._linesCollection=new D(()=>this._host.createVisibleLine())}_createDomNode(){const n=(0,w.createFastDomNode)(document.createElement("div"));return n.setClassName("view-layer"),n.setPosition("absolute"),n.domNode.setAttribute("role","presentation"),n.domNode.setAttribute("aria-hidden","true"),n}onConfigurationChanged(n){return!!n.hasChanged(129)}onFlushed(n){return this._linesCollection.flush(),!0}onLinesChanged(n){return this._linesCollection.onLinesChanged(n.fromLineNumber,n.toLineNumber)}onLinesDeleted(n){const g=this._linesCollection.onLinesDeleted(n.fromLineNumber,n.toLineNumber);if(g)for(let t=0,s=g.length;t<s;t++){const c=g[t].getDomNode();c&&this.domNode.domNode.removeChild(c)}return!0}onLinesInserted(n){const g=this._linesCollection.onLinesInserted(n.fromLineNumber,n.toLineNumber);if(g)for(let t=0,s=g.length;t<s;t++){const c=g[t].getDomNode();c&&this.domNode.domNode.removeChild(c)}return!0}onScrollChanged(n){return n.scrollTopChanged}onTokensChanged(n){return this._linesCollection.onTokensChanged(n.ranges)}onZonesChanged(n){return!0}getStartLineNumber(){return this._linesCollection.getStartLineNumber()}getEndLineNumber(){return this._linesCollection.getEndLineNumber()}getVisibleLine(n){return this._linesCollection.getLine(n)}renderLines(n){const g=this._linesCollection._get(),t=new p(this.domNode.domNode,this._host,n),s={rendLineNumberStart:g.rendLineNumberStart,lines:g.lines,linesLength:g.lines.length},c=t.render(s,n.startLineNumber,n.endLineNumber,n.relativeVerticalOffset);this._linesCollection._set(c.rendLineNumberStart,c.lines)}}e.VisibleLinesCollection=S;class p{constructor(n,g,t){this.domNode=n,this.host=g,this.viewportData=t}render(n,g,t,s){const c={rendLineNumberStart:n.rendLineNumberStart,lines:n.lines.slice(0),linesLength:n.linesLength};if(c.rendLineNumberStart+c.linesLength-1<g||t<c.rendLineNumberStart){c.rendLineNumberStart=g,c.linesLength=t-g+1,c.lines=[];for(let u=g;u<=t;u++)c.lines[u-g]=this.host.createVisibleLine();return this._finishRendering(c,!0,s),c}if(this._renderUntouchedLines(c,Math.max(g-c.rendLineNumberStart,0),Math.min(t-c.rendLineNumberStart,c.linesLength-1),s,g),c.rendLineNumberStart>g){const u=g,d=Math.min(t,c.rendLineNumberStart-1);u<=d&&(this._insertLinesBefore(c,u,d,s,g),c.linesLength+=d-u+1)}else if(c.rendLineNumberStart<g){const u=Math.min(c.linesLength,g-c.rendLineNumberStart);u>0&&(this._removeLinesBefore(c,u),c.linesLength-=u)}if(c.rendLineNumberStart=g,c.rendLineNumberStart+c.linesLength-1<t){const u=c.rendLineNumberStart+c.linesLength,d=t;u<=d&&(this._insertLinesAfter(c,u,d,s,g),c.linesLength+=d-u+1)}else if(c.rendLineNumberStart+c.linesLength-1>t){const u=Math.max(0,t-c.rendLineNumberStart+1),a=c.linesLength-1-u+1;a>0&&(this._removeLinesAfter(c,a),c.linesLength-=a)}return this._finishRendering(c,!1,s),c}_renderUntouchedLines(n,g,t,s,c){const u=n.rendLineNumberStart,d=n.lines;for(let a=g;a<=t;a++){const r=u+a;d[a].layoutLine(r,s[r-c])}}_insertLinesBefore(n,g,t,s,c){const u=[];let d=0;for(let a=g;a<=t;a++)u[d++]=this.host.createVisibleLine();n.lines=u.concat(n.lines)}_removeLinesBefore(n,g){for(let t=0;t<g;t++){const s=n.lines[t].getDomNode();s&&this.domNode.removeChild(s)}n.lines.splice(0,g)}_insertLinesAfter(n,g,t,s,c){const u=[];let d=0;for(let a=g;a<=t;a++)u[d++]=this.host.createVisibleLine();n.lines=n.lines.concat(u)}_removeLinesAfter(n,g){const t=n.linesLength-g;for(let s=0;s<g;s++){const c=n.lines[t+s].getDomNode();c&&this.domNode.removeChild(c)}n.lines.splice(t,g)}_finishRenderingNewLines(n,g,t,s){p._ttPolicy&&(t=p._ttPolicy.createHTML(t));const c=this.domNode.lastChild;g||!c?this.domNode.innerHTML=t:c.insertAdjacentHTML("afterend",t);let u=this.domNode.lastChild;for(let d=n.linesLength-1;d>=0;d--){const a=n.lines[d];s[d]&&(a.setDomNode(u),u=u.previousSibling)}}_finishRenderingInvalidLines(n,g,t){const s=document.createElement("div");p._ttPolicy&&(g=p._ttPolicy.createHTML(g)),s.innerHTML=g;for(let c=0;c<n.linesLength;c++){const u=n.lines[c];if(t[c]){const d=s.firstChild,a=u.getDomNode();a.parentNode.replaceChild(d,a),u.setDomNode(d)}}}_finishRendering(n,g,t){const s=p._sb,c=n.linesLength,u=n.lines,d=n.rendLineNumberStart,a=[];{s.reset();let r=!1;for(let o=0;o<c;o++){const i=u[o];a[o]=!1,!(i.getDomNode()||!i.renderLine(o+d,t[o],this.viewportData,s))&&(a[o]=!0,r=!0)}r&&this._finishRenderingNewLines(n,g,s.build(),a)}{s.reset();let r=!1;const o=[];for(let i=0;i<c;i++){const l=u[i];o[i]=!1,!(a[i]||!l.renderLine(i+d,t[i],this.viewportData,s))&&(o[i]=!0,r=!0)}r&&this._finishRenderingInvalidLines(n,s.build(),o)}}}p._ttPolicy=(T=window.trustedTypes)===null||T===void 0?void 0:T.createPolicy("editorViewLayer",{createHTML:C=>C}),p._sb=(0,N.createStringBuilder)(1e5)}),define(J[141],ee([0,1]),function(j,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TokenizationResult2=e.TokenizationResult=e.Token=void 0;class w{constructor(S,p,C){this._tokenBrand=void 0,this.offset=S|0,this.type=p,this.language=C}toString(){return"("+this.offset+", "+this.type+")"}}e.Token=w;class N{constructor(S,p){this._tokenizationResultBrand=void 0,this.tokens=S,this.endState=p}}e.TokenizationResult=N;class T{constructor(S,p){this._tokenizationResult2Brand=void 0,this.tokens=S,this.endState=p}}e.TokenizationResult2=T}),define(J[387],ee([0,1,134,8]),function(j,e,w,N){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DiffComputer=void 0;const T=3;function D(d,a,r,o){return new w.LcsDiff(d,a,r).ComputeDiff(o)}class S{constructor(a){const r=[],o=[];for(let i=0,l=a.length;i<l;i++)r[i]=s(a[i],1),o[i]=c(a[i],1);this.lines=a,this._startColumns=r,this._endColumns=o}getElements(){const a=[];for(let r=0,o=this.lines.length;r<o;r++)a[r]=this.lines[r].substring(this._startColumns[r]-1,this._endColumns[r]-1);return a}getStrictElement(a){return this.lines[a]}getStartLineNumber(a){return a+1}getEndLineNumber(a){return a+1}createCharSequence(a,r,o){const i=[],l=[],h=[];let f=0;for(let y=r;y<=o;y++){const _=this.lines[y],b=a?this._startColumns[y]:1,v=a?this._endColumns[y]:_.length+1;for(let m=b;m<v;m++)i[f]=_.charCodeAt(m-1),l[f]=y+1,h[f]=m,f++}return new p(i,l,h)}}class p{constructor(a,r,o){this._charCodes=a,this._lineNumbers=r,this._columns=o}getElements(){return this._charCodes}getStartLineNumber(a){return this._lineNumbers[a]}getStartColumn(a){return this._columns[a]}getEndLineNumber(a){return this._lineNumbers[a]}getEndColumn(a){return this._columns[a]+1}}class C{constructor(a,r,o,i,l,h,f,y){this.originalStartLineNumber=a,this.originalStartColumn=r,this.originalEndLineNumber=o,this.originalEndColumn=i,this.modifiedStartLineNumber=l,this.modifiedStartColumn=h,this.modifiedEndLineNumber=f,this.modifiedEndColumn=y}static createFromDiffChange(a,r,o){let i,l,h,f,y,_,b,v;return a.originalLength===0?(i=0,l=0,h=0,f=0):(i=r.getStartLineNumber(a.originalStart),l=r.getStartColumn(a.originalStart),h=r.getEndLineNumber(a.originalStart+a.originalLength-1),f=r.getEndColumn(a.originalStart+a.originalLength-1)),a.modifiedLength===0?(y=0,_=0,b=0,v=0):(y=o.getStartLineNumber(a.modifiedStart),_=o.getStartColumn(a.modifiedStart),b=o.getEndLineNumber(a.modifiedStart+a.modifiedLength-1),v=o.getEndColumn(a.modifiedStart+a.modifiedLength-1)),new C(i,l,h,f,y,_,b,v)}}function n(d){if(d.length<=1)return d;const a=[d[0]];let r=a[0];for(let o=1,i=d.length;o<i;o++){const l=d[o],h=l.originalStart-(r.originalStart+r.originalLength),f=l.modifiedStart-(r.modifiedStart+r.modifiedLength);Math.min(h,f)<T?(r.originalLength=l.originalStart+l.originalLength-r.originalStart,r.modifiedLength=l.modifiedStart+l.modifiedLength-r.modifiedStart):(a.push(l),r=l)}return a}class g{constructor(a,r,o,i,l){this.originalStartLineNumber=a,this.originalEndLineNumber=r,this.modifiedStartLineNumber=o,this.modifiedEndLineNumber=i,this.charChanges=l}static createFromDiffResult(a,r,o,i,l,h,f){let y,_,b,v,m;if(r.originalLength===0?(y=o.getStartLineNumber(r.originalStart)-1,_=0):(y=o.getStartLineNumber(r.originalStart),_=o.getEndLineNumber(r.originalStart+r.originalLength-1)),r.modifiedLength===0?(b=i.getStartLineNumber(r.modifiedStart)-1,v=0):(b=i.getStartLineNumber(r.modifiedStart),v=i.getEndLineNumber(r.modifiedStart+r.modifiedLength-1)),h&&r.originalLength>0&&r.originalLength<20&&r.modifiedLength>0&&r.modifiedLength<20&&l()){const E=o.createCharSequence(a,r.originalStart,r.originalStart+r.originalLength-1),I=i.createCharSequence(a,r.modifiedStart,r.modifiedStart+r.modifiedLength-1);let k=D(E,I,l,!0).changes;f&&(k=n(k)),m=[];for(let M=0,P=k.length;M<P;M++)m.push(C.createFromDiffChange(k[M],E,I))}return new g(y,_,b,v,m)}}class t{constructor(a,r,o){this.shouldComputeCharChanges=o.shouldComputeCharChanges,this.shouldPostProcessCharChanges=o.shouldPostProcessCharChanges,this.shouldIgnoreTrimWhitespace=o.shouldIgnoreTrimWhitespace,this.shouldMakePrettyDiff=o.shouldMakePrettyDiff,this.originalLines=a,this.modifiedLines=r,this.original=new S(a),this.modified=new S(r),this.continueLineDiff=u(o.maxComputationTime),this.continueCharDiff=u(o.maxComputationTime===0?0:Math.min(o.maxComputationTime,5e3))}computeDiff(){if(this.original.lines.length===1&&this.original.lines[0].length===0)return this.modified.lines.length===1&&this.modified.lines[0].length===0?{quitEarly:!1,changes:[]}:{quitEarly:!1,changes:[{originalStartLineNumber:1,originalEndLineNumber:1,modifiedStartLineNumber:1,modifiedEndLineNumber:this.modified.lines.length,charChanges:[{modifiedEndColumn:0,modifiedEndLineNumber:0,modifiedStartColumn:0,modifiedStartLineNumber:0,originalEndColumn:0,originalEndLineNumber:0,originalStartColumn:0,originalStartLineNumber:0}]}]};if(this.modified.lines.length===1&&this.modified.lines[0].length===0)return{quitEarly:!1,changes:[{originalStartLineNumber:1,originalEndLineNumber:this.original.lines.length,modifiedStartLineNumber:1,modifiedEndLineNumber:1,charChanges:[{modifiedEndColumn:0,modifiedEndLineNumber:0,modifiedStartColumn:0,modifiedStartLineNumber:0,originalEndColumn:0,originalEndLineNumber:0,originalStartColumn:0,originalStartLineNumber:0}]}]};const a=D(this.original,this.modified,this.continueLineDiff,this.shouldMakePrettyDiff),r=a.changes,o=a.quitEarly;if(this.shouldIgnoreTrimWhitespace){const f=[];for(let y=0,_=r.length;y<_;y++)f.push(g.createFromDiffResult(this.shouldIgnoreTrimWhitespace,r[y],this.original,this.modified,this.continueCharDiff,this.shouldComputeCharChanges,this.shouldPostProcessCharChanges));return{quitEarly:o,changes:f}}const i=[];let l=0,h=0;for(let f=-1,y=r.length;f<y;f++){const _=f+1<y?r[f+1]:null,b=_?_.originalStart:this.originalLines.length,v=_?_.modifiedStart:this.modifiedLines.length;for(;l<b&&h<v;){const m=this.originalLines[l],E=this.modifiedLines[h];if(m!==E){{let I=s(m,1),k=s(E,1);for(;I>1&&k>1;){const M=m.charCodeAt(I-2),P=E.charCodeAt(k-2);if(M!==P)break;I--,k--}(I>1||k>1)&&this._pushTrimWhitespaceCharChange(i,l+1,1,I,h+1,1,k)}{let I=c(m,1),k=c(E,1);const M=m.length+1,P=E.length+1;for(;I<M&&k<P;){const F=m.charCodeAt(I-1),R=m.charCodeAt(k-1);if(F!==R)break;I++,k++}(I<M||k<P)&&this._pushTrimWhitespaceCharChange(i,l+1,I,M,h+1,k,P)}}l++,h++}_&&(i.push(g.createFromDiffResult(this.shouldIgnoreTrimWhitespace,_,this.original,this.modified,this.continueCharDiff,this.shouldComputeCharChanges,this.shouldPostProcessCharChanges)),l+=_.originalLength,h+=_.modifiedLength)}return{quitEarly:o,changes:i}}_pushTrimWhitespaceCharChange(a,r,o,i,l,h,f){if(this._mergeTrimWhitespaceCharChange(a,r,o,i,l,h,f))return;let y;this.shouldComputeCharChanges&&(y=[new C(r,o,r,i,l,h,l,f)]),a.push(new g(r,r,l,l,y))}_mergeTrimWhitespaceCharChange(a,r,o,i,l,h,f){const y=a.length;if(y===0)return!1;const _=a[y-1];return _.originalEndLineNumber===0||_.modifiedEndLineNumber===0?!1:_.originalEndLineNumber+1===r&&_.modifiedEndLineNumber+1===l?(_.originalEndLineNumber=r,_.modifiedEndLineNumber=l,this.shouldComputeCharChanges&&_.charChanges&&_.charChanges.push(new C(r,o,r,i,l,h,l,f)),!0):!1}}e.DiffComputer=t;function s(d,a){const r=N.firstNonWhitespaceIndex(d);return r===-1?a:r+1}function c(d,a){const r=N.lastNonWhitespaceIndex(d);return r===-1?a:r+2}function u(d){if(d===0)return()=>!0;const a=Date.now();return()=>Date.now()-a<d}}),define(J[228],ee([0,1]),function(j,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.InternalEditorAction=void 0;class w{constructor(T,D,S,p,C,n){this.id=T,this.label=D,this.alias=S,this._precondition=p,this._run=C,this._contextKeyService=n}isSupported(){return this._contextKeyService.contextMatchesRules(this._precondition)}run(){return this.isSupported()?this._run():Promise.resolve(void 0)}}e.InternalEditorAction=w}),define(J[113],ee([0,1]),function(j,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EditorType=e.isThemeColor=void 0;function w(N){return N&&typeof N.id=="string"}e.isThemeColor=w,e.EditorType={ICodeEditor:"vs.editor.ICodeEditor",IDiffEditor:"vs.editor.IDiffEditor"}}),define(J[114],ee([0,1,113]),function(j,e,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getCodeEditor=e.isDiffEditor=e.isCodeEditor=void 0;function N(S){return S&&typeof S.getEditorType=="function"?S.getEditorType()===w.EditorType.ICodeEditor:!1}e.isCodeEditor=N;function T(S){return S&&typeof S.getEditorType=="function"?S.getEditorType()===w.EditorType.IDiffEditor:!1}e.isDiffEditor=T;function D(S){return N(S)?S:T(S)?S.getModifiedEditor():null}e.getCodeEditor=D}),define(J[49],ee([0,1,38]),function(j,e,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ApplyEditsResult=e.ValidAnnotatedEditOperation=e.IndentGuideHorizontalLine=e.IndentGuide=e.HorizontalGuidesState=e.FindMatch=e.TextModelResolvedOptions=e.MinimapPosition=e.OverviewRulerLane=void 0;var N;(function(s){s[s.Left=1]="Left",s[s.Center=2]="Center",s[s.Right=4]="Right",s[s.Full=7]="Full"})(N=e.OverviewRulerLane||(e.OverviewRulerLane={}));var T;(function(s){s[s.Inline=1]="Inline",s[s.Gutter=2]="Gutter"})(T=e.MinimapPosition||(e.MinimapPosition={}));class D{constructor(c){this._textModelResolvedOptionsBrand=void 0,this.tabSize=Math.max(1,c.tabSize|0),this.indentSize=c.tabSize|0,this.insertSpaces=Boolean(c.insertSpaces),this.defaultEOL=c.defaultEOL|0,this.trimAutoWhitespace=Boolean(c.trimAutoWhitespace),this.bracketPairColorizationOptions=c.bracketPairColorizationOptions}equals(c){return this.tabSize===c.tabSize&&this.indentSize===c.indentSize&&this.insertSpaces===c.insertSpaces&&this.defaultEOL===c.defaultEOL&&this.trimAutoWhitespace===c.trimAutoWhitespace&&(0,w.equals)(this.bracketPairColorizationOptions,c.bracketPairColorizationOptions)}createChangeEvent(c){return{tabSize:this.tabSize!==c.tabSize,indentSize:this.indentSize!==c.indentSize,insertSpaces:this.insertSpaces!==c.insertSpaces,trimAutoWhitespace:this.trimAutoWhitespace!==c.trimAutoWhitespace}}}e.TextModelResolvedOptions=D;class S{constructor(c,u){this._findMatchBrand=void 0,this.range=c,this.matches=u}}e.FindMatch=S;var p;(function(s){s[s.Disabled=0]="Disabled",s[s.EnabledForActive=1]="EnabledForActive",s[s.Enabled=2]="Enabled"})(p=e.HorizontalGuidesState||(e.HorizontalGuidesState={}));class C{constructor(c,u,d){this.visibleColumn=c,this.className=u,this.horizontalLine=d}}e.IndentGuide=C;class n{constructor(c,u){this.top=c,this.endColumn=u}}e.IndentGuideHorizontalLine=n;class g{constructor(c,u,d,a,r,o){this.identifier=c,this.range=u,this.text=d,this.forceMoveMarkers=a,this.isAutoWhitespaceEdit=r,this._isTracked=o}}e.ValidAnnotatedEditOperation=g;class t{constructor(c,u,d){this.reverseEdits=c,this.changes=u,this.trimAutoWhitespaceLineNumbers=d}}e.ApplyEditsResult=t}),define(J[388],ee([0,1]),function(j,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BracketPairWithMinIndentationInfo=e.BracketPairInfo=e.BracketInfo=void 0;class w{constructor(S,p,C){this.range=S,this.nestingLevel=p,this.isInvalid=C}}e.BracketInfo=w;class N{constructor(S,p,C,n){this.range=S,this.openingBracketRange=p,this.closingBracketRange=C,this.nestingLevel=n}}e.BracketPairInfo=N;class T extends N{constructor(S,p,C,n,g){super(S,p,C,n);this.minVisibleColumnIndentation=g}}e.BracketPairWithMinIndentationInfo=T}),define(J[85],ee([0,1,8,3]),function(j,e,w,N){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.lengthHash=e.lengthOfString=e.lengthsToRange=e.positionToLength=e.lengthGreaterThanEqual=e.lengthLessThanEqual=e.lengthLessThan=e.lengthDiffNonNegative=e.lengthAdd=e.lengthGetColumnCountIfZeroLineCount=e.lengthGetLineCount=e.lengthToObj=e.toLength=e.lengthIsZero=e.lengthZero=e.lengthDiff=e.LengthObj=void 0;class T{constructor(f,y){this.lineCount=f,this.columnCount=y}toString(){return`${this.lineCount},${this.columnCount}`}}e.LengthObj=T;function D(h,f,y,_){return h!==y?C(y-h,_):C(0,_-f)}e.lengthDiff=D,e.lengthZero=0;function S(h){return h===0}e.lengthIsZero=S;const p=Math.pow(2,26);function C(h,f){return h*p+f}e.toLength=C;function n(h){const f=h,y=Math.floor(f/p),_=f-y*p;return new T(y,_)}e.lengthToObj=n;function g(h){return Math.floor(h/p)}e.lengthGetLineCount=g;function t(h){return h}e.lengthGetColumnCountIfZeroLineCount=t;function s(h,f){return f<p?h+f:h-h%p+f}e.lengthAdd=s;function c(h,f){const y=h,_=f;if(_-y<=0)return e.lengthZero;const v=Math.floor(y/p),m=Math.floor(_/p),E=_-m*p;if(v===m){const I=y-v*p;return C(0,E-I)}else return C(m-v,E)}e.lengthDiffNonNegative=c;function u(h,f){return h<f}e.lengthLessThan=u;function d(h,f){return h<=f}e.lengthLessThanEqual=d;function a(h,f){return h>=f}e.lengthGreaterThanEqual=a;function r(h){return C(h.lineNumber-1,h.column-1)}e.positionToLength=r;function o(h,f){const y=h,_=Math.floor(y/p),b=y-_*p,v=f,m=Math.floor(v/p),E=v-m*p;return new N.Range(_+1,b+1,m+1,E+1)}e.lengthsToRange=o;function i(h){const f=(0,w.splitLines)(h);return C(f.length-1,f[f.length-1].length)}e.lengthOfString=i;function l(h){return h}e.lengthHash=l}),define(J[229],ee([0,1,85]),function(j,e,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BeforeEditPositionMapper=e.TextEditInfo=void 0;class N{constructor(p,C,n){this.startOffset=p,this.endOffset=C,this.newLength=n}}e.TextEditInfo=N;class T{constructor(p,C){this.documentLength=C,this.nextEditIdx=0,this.deltaOldToNewLineCount=0,this.deltaOldToNewColumnCount=0,this.deltaLineIdxInOld=-1,this.edits=p.map(n=>D.from(n))}getOffsetBeforeChange(p){return this.adjustNextEdit(p),this.translateCurToOld(p)}getDistanceToNextChange(p){this.adjustNextEdit(p);const C=this.edits[this.nextEditIdx],n=C?this.translateOldToCur(C.offsetObj):this.documentLength;return(0,w.lengthDiffNonNegative)(p,n)}translateOldToCur(p){return p.lineCount===this.deltaLineIdxInOld?(0,w.toLength)(p.lineCount+this.deltaOldToNewLineCount,p.columnCount+this.deltaOldToNewColumnCount):(0,w.toLength)(p.lineCount+this.deltaOldToNewLineCount,p.columnCount)}translateCurToOld(p){const C=(0,w.lengthToObj)(p);return C.lineCount-this.deltaOldToNewLineCount===this.deltaLineIdxInOld?(0,w.toLength)(C.lineCount-this.deltaOldToNewLineCount,C.columnCount-this.deltaOldToNewColumnCount):(0,w.toLength)(C.lineCount-this.deltaOldToNewLineCount,C.columnCount)}adjustNextEdit(p){for(;this.nextEditIdx<this.edits.length;){const C=this.edits[this.nextEditIdx],n=this.translateOldToCur(C.endOffsetAfterObj);if((0,w.lengthLessThanEqual)(n,p)){this.nextEditIdx++;const g=(0,w.lengthToObj)(n),t=(0,w.lengthToObj)(this.translateOldToCur(C.endOffsetBeforeObj)),s=g.lineCount-t.lineCount;this.deltaOldToNewLineCount+=s;const c=this.deltaLineIdxInOld===C.endOffsetBeforeObj.lineCount?this.deltaOldToNewColumnCount:0,u=g.columnCount-t.columnCount;this.deltaOldToNewColumnCount=c+u,this.deltaLineIdxInOld=C.endOffsetBeforeObj.lineCount}else break}}}e.BeforeEditPositionMapper=T;class D{constructor(p,C,n){this.endOffsetBeforeObj=(0,w.lengthToObj)(C),this.endOffsetAfterObj=(0,w.lengthToObj)((0,w.lengthAdd)(p,n)),this.offsetObj=(0,w.lengthToObj)(p)}static from(p){return new D(p.startOffset,p.endOffset,p.newLength)}}}),define(J[389],ee([0,1,85]),function(j,e,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NodeReader=void 0;class N{constructor(p){this.lastOffset=w.lengthZero,this.nextNodes=[p],this.offsets=[w.lengthZero],this.idxs=[]}readLongestNodeAt(p,C){if((0,w.lengthLessThan)(p,this.lastOffset))throw new Error("Invalid offset");for(this.lastOffset=p;;){const n=D(this.nextNodes);if(!n)return;const g=D(this.offsets);if((0,w.lengthLessThan)(p,g))return;if((0,w.lengthLessThan)(g,p))if((0,w.lengthAdd)(g,n.length)<=p)this.nextNodeAfterCurrent();else{const t=T(n);t!==-1?(this.nextNodes.push(n.getChild(t)),this.offsets.push(g),this.idxs.push(t)):this.nextNodeAfterCurrent()}else{if(C(n))return this.nextNodeAfterCurrent(),n;{const t=T(n);if(t===-1){this.nextNodeAfterCurrent();return}else this.nextNodes.push(n.getChild(t)),this.offsets.push(g),this.idxs.push(t)}}}}nextNodeAfterCurrent(){for(;;){const p=D(this.offsets),C=D(this.nextNodes);if(this.nextNodes.pop(),this.offsets.pop(),this.idxs.length===0)break;const n=D(this.nextNodes),g=T(n,this.idxs[this.idxs.length-1]);if(g!==-1){this.nextNodes.push(n.getChild(g)),this.offsets.push((0,w.lengthAdd)(p,C.length)),this.idxs[this.idxs.length-1]=g;break}else this.idxs.pop()}}}e.NodeReader=N;function T(S,p=-1){for(;;){if(p++,p>=S.childrenLength)return-1;if(S.getChild(p))return p}}function D(S){return S.length>0?S[S.length-1]:void 0}}),define(J[115],ee([0,1]),function(j,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DenseKeyProvider=e.identityKeyProvider=e.SmallImmutableSet=void 0;const w=new Array;class N{constructor(S,p){this.items=S,this.additionalItems=p}static create(S,p){if(S<=128&&p.length===0){let C=N.cache[S];return C||(C=new N(S,p),N.cache[S]=C),C}return new N(S,p)}static getEmpty(){return this.empty}add(S,p){const C=p.getKey(S);let n=C>>5;if(n===0){const t=1<<C|this.items;return t===this.items?this:N.create(t,this.additionalItems)}n--;const g=this.additionalItems.slice(0);for(;g.length<n;)g.push(0);return g[n]|=1<<(C&31),N.create(this.items,g)}merge(S){const p=this.items|S.items;if(this.additionalItems===w&&S.additionalItems===w)return p===this.items?this:p===S.items?S:N.create(p,w);const C=new Array;for(let n=0;n<Math.max(this.additionalItems.length,S.additionalItems.length);n++){const g=this.additionalItems[n]||0,t=S.additionalItems[n]||0;C.push(g|t)}return N.create(p,C)}intersects(S){if((this.items&S.items)!=0)return!0;for(let p=0;p<Math.min(this.additionalItems.length,S.additionalItems.length);p++)if((this.additionalItems[p]&S.additionalItems[p])!=0)return!0;return!1}}e.SmallImmutableSet=N,N.cache=new Array(129),N.empty=N.create(0,w),e.identityKeyProvider={getKey(D){return D}};class T{constructor(){this.items=new Map}getKey(S){let p=this.items.get(S);return p===void 0&&(p=this.items.size,this.items.set(S,p)),p}}e.DenseKeyProvider=T}),define(J[142],ee([0,1,140,85,115]),function(j,e,w,N,T){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.InvalidBracketAstNode=e.BracketAstNode=e.TextAstNode=e.ListAstNode=e.PairAstNode=void 0;class D{constructor(o){this._length=o}get length(){return this._length}}class S extends D{constructor(o,i,l,h,f){super(o);this.openingBracket=i,this.child=l,this.closingBracket=h,this.missingOpeningBracketIds=f}static create(o,i,l){let h=o.length;return i&&(h=(0,N.lengthAdd)(h,i.length)),l&&(h=(0,N.lengthAdd)(h,l.length)),new S(h,o,i,l,i?i.missingOpeningBracketIds:T.SmallImmutableSet.getEmpty())}get kind(){return 2}get listHeight(){return 0}get childrenLength(){return 3}getChild(o){switch(o){case 0:return this.openingBracket;case 1:return this.child;case 2:return this.closingBracket}throw new Error("Invalid child index")}get children(){const o=new Array;return o.push(this.openingBracket),this.child&&o.push(this.child),this.closingBracket&&o.push(this.closingBracket),o}canBeReused(o){return!(this.closingBracket===null||o.intersects(this.missingOpeningBracketIds))}deepClone(){return new S(this.length,this.openingBracket.deepClone(),this.child&&this.child.deepClone(),this.closingBracket&&this.closingBracket.deepClone(),this.missingOpeningBracketIds)}computeMinIndentation(o,i){return this.child?this.child.computeMinIndentation((0,N.lengthAdd)(o,this.openingBracket.length),i):Number.MAX_SAFE_INTEGER}}e.PairAstNode=S;class p extends D{constructor(o,i,l){super(o);this.listHeight=i,this._missingOpeningBracketIds=l,this.cachedMinIndentation=-1}static create23(o,i,l,h=!1){let f=o.length,y=o.missingOpeningBracketIds;if(o.listHeight!==i.listHeight)throw new Error("Invalid list heights");if(f=(0,N.lengthAdd)(f,i.length),y=y.merge(i.missingOpeningBracketIds),l){if(o.listHeight!==l.listHeight)throw new Error("Invalid list heights");f=(0,N.lengthAdd)(f,l.length),y=y.merge(l.missingOpeningBracketIds)}return h?new n(f,o.listHeight+1,o,i,l,y):new C(f,o.listHeight+1,o,i,l,y)}static getEmpty(){return new t(N.lengthZero,0,[],T.SmallImmutableSet.getEmpty())}get kind(){return 4}get missingOpeningBracketIds(){return this._missingOpeningBracketIds}throwIfImmutable(){}makeLastElementMutable(){this.throwIfImmutable();const o=this.childrenLength;if(o===0)return;const i=this.getChild(o-1),l=i.kind===4?i.toMutable():i;return i!==l&&this.setChild(o-1,l),l}makeFirstElementMutable(){if(this.throwIfImmutable(),this.childrenLength===0)return;const i=this.getChild(0),l=i.kind===4?i.toMutable():i;return i!==l&&this.setChild(0,l),l}canBeReused(o){if(o.intersects(this.missingOpeningBracketIds))return!1;let i=this,l;for(;i.kind===4&&(l=i.childrenLength)>0;)i=i.getChild(l-1);return i.canBeReused(o)}handleChildrenChanged(){this.throwIfImmutable();const o=this.childrenLength;let i=this.getChild(0).length,l=this.getChild(0).missingOpeningBracketIds;for(let h=1;h<o;h++){const f=this.getChild(h);i=(0,N.lengthAdd)(i,f.length),l=l.merge(f.missingOpeningBracketIds)}this._length=i,this._missingOpeningBracketIds=l,this.cachedMinIndentation=-1}computeMinIndentation(o,i){if(this.cachedMinIndentation!==-1)return this.cachedMinIndentation;let l=Number.MAX_SAFE_INTEGER,h=o;for(let f=0;f<this.childrenLength;f++){const y=this.getChild(f);y&&(l=Math.min(l,y.computeMinIndentation(h,i)),h=(0,N.lengthAdd)(h,y.length))}return this.cachedMinIndentation=l,l}}e.ListAstNode=p;class C extends p{constructor(o,i,l,h,f,y){super(o,i,y);this._item1=l,this._item2=h,this._item3=f}get childrenLength(){return this._item3!==null?3:2}getChild(o){switch(o){case 0:return this._item1;case 1:return this._item2;case 2:return this._item3}throw new Error("Invalid child index")}setChild(o,i){switch(o){case 0:this._item1=i;return;case 1:this._item2=i;return;case 2:this._item3=i;return}throw new Error("Invalid child index")}get children(){return this._item3?[this._item1,this._item2,this._item3]:[this._item1,this._item2]}get item1(){return this._item1}get item2(){return this._item2}get item3(){return this._item3}deepClone(){return new C(this.length,this.listHeight,this._item1.deepClone(),this._item2.deepClone(),this._item3?this._item3.deepClone():null,this.missingOpeningBracketIds)}appendChildOfSameHeight(o){if(this._item3)throw new Error("Cannot append to a full (2,3) tree node");this.throwIfImmutable(),this._item3=o,this.handleChildrenChanged()}unappendChild(){if(!this._item3)throw new Error("Cannot remove from a non-full (2,3) tree node");this.throwIfImmutable();const o=this._item3;return this._item3=null,this.handleChildrenChanged(),o}prependChildOfSameHeight(o){if(this._item3)throw new Error("Cannot prepend to a full (2,3) tree node");this.throwIfImmutable(),this._item3=this._item2,this._item2=this._item1,this._item1=o,this.handleChildrenChanged()}unprependChild(){if(!this._item3)throw new Error("Cannot remove from a non-full (2,3) tree node");this.throwIfImmutable();const o=this._item1;return this._item1=this._item2,this._item2=this._item3,this._item3=null,this.handleChildrenChanged(),o}toMutable(){return this}}class n extends C{toMutable(){return new C(this.length,this.listHeight,this.item1,this.item2,this.item3,this.missingOpeningBracketIds)}throwIfImmutable(){throw new Error("this instance is immutable")}}class g extends p{constructor(o,i,l,h){super(o,i,h);this._children=l}get childrenLength(){return this._children.length}getChild(o){return this._children[o]}setChild(o,i){this._children[o]=i}get children(){return this._children}deepClone(){const o=new Array(this._children.length);for(let i=0;i<this._children.length;i++)o[i]=this._children[i].deepClone();return new g(this.length,this.listHeight,o,this.missingOpeningBracketIds)}appendChildOfSameHeight(o){this.throwIfImmutable(),this._children.push(o),this.handleChildrenChanged()}unappendChild(){this.throwIfImmutable();const o=this._children.pop();return this.handleChildrenChanged(),o}prependChildOfSameHeight(o){this.throwIfImmutable(),this._children.unshift(o),this.handleChildrenChanged()}unprependChild(){this.throwIfImmutable();const o=this._children.shift();return this.handleChildrenChanged(),o}toMutable(){return this}}class t extends g{toMutable(){return new g(this.length,this.listHeight,[...this.children],this.missingOpeningBracketIds)}throwIfImmutable(){throw new Error("this instance is immutable")}}const s=[];class c extends D{get listHeight(){return 0}get childrenLength(){return 0}getChild(o){return null}get children(){return s}deepClone(){return this}}class u extends c{get kind(){return 0}get missingOpeningBracketIds(){return T.SmallImmutableSet.getEmpty()}canBeReused(o){return!0}computeMinIndentation(o,i){const l=(0,N.lengthToObj)(o),h=(l.columnCount===0?l.lineCount:l.lineCount+1)+1,f=(0,N.lengthGetLineCount)((0,N.lengthAdd)(o,this.length))+1;let y=Number.MAX_SAFE_INTEGER;for(let _=h;_<=f;_++){const b=i.getLineFirstNonWhitespaceColumn(_),v=i.getLineContent(_);if(b===0)continue;const m=w.CursorColumns.visibleColumnFromColumn(v,b,i.getOptions().tabSize);y=Math.min(y,m)}return y}}e.TextAstNode=u;class d extends c{constructor(o){super(o)}static create(o){const i=(0,N.lengthHash)(o),l=d.cacheByLength.get(i);if(l)return l;const h=new d(o);return d.cacheByLength.set(i,h),h}get kind(){return 1}get missingOpeningBracketIds(){return T.SmallImmutableSet.getEmpty()}canBeReused(o){return!1}computeMinIndentation(o,i){return Number.MAX_SAFE_INTEGER}}e.BracketAstNode=d,d.cacheByLength=new Map;class a extends c{constructor(o,i){super(i);this.missingOpeningBracketIds=o}get kind(){return 3}canBeReused(o){return!o.intersects(this.missingOpeningBracketIds)}computeMinIndentation(o,i){return Number.MAX_SAFE_INTEGER}}e.InvalidBracketAstNode=a}),define(J[390],ee([0,1,142]),function(j,e,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.concat23TreesOfSameHeight=e.concat23Trees=void 0;function N(n){if(n.length===0)return null;if(n.length===1)return n[0];let g=0;function t(){if(g>=n.length)return null;const d=g,a=n[d].listHeight;for(g++;g<n.length&&n[g].listHeight===a;)g++;return g-d>=2?T(d===0&&g===n.length?n:n.slice(d,g),!1):n[d]}let s=t(),c=t();if(!c)return s;for(let d=t();d;d=t())D(s,c)<=D(c,d)?(s=S(s,c),c=d):c=S(c,d);return S(s,c)}e.concat23Trees=N;function T(n,g=!1){if(n.length===0)return null;if(n.length===1)return n[0];let t=n.length;for(;t>3;){const s=t>>1;for(let c=0;c<s;c++){const u=c<<1;n[c]=w.ListAstNode.create23(n[u],n[u+1],u+3===t?n[u+2]:null,g)}t=s}return w.ListAstNode.create23(n[0],n[1],t>=3?n[2]:null,g)}e.concat23TreesOfSameHeight=T;function D(n,g){return Math.abs(n.listHeight-g.listHeight)}function S(n,g){return n.listHeight===g.listHeight?w.ListAstNode.create23(n,g,null,!1):n.listHeight>g.listHeight?p(n,g):C(g,n)}function p(n,g){n=n.toMutable();let t=n;const s=new Array;let c;for(;;){if(g.listHeight===t.listHeight){c=g;break}if(t.kind!==4)throw new Error("unexpected");s.push(t),t=t.makeLastElementMutable()}for(let u=s.length-1;u>=0;u--){const d=s[u];c?d.childrenLength>=3?c=w.ListAstNode.create23(d.unappendChild(),c,null,!1):(d.appendChildOfSameHeight(c),c=void 0):d.handleChildrenChanged()}return c?w.ListAstNode.create23(n,c,null,!1):n}function C(n,g){n=n.toMutable();let t=n;const s=new Array;for(;g.listHeight!==t.listHeight;){if(t.kind!==4)throw new Error("unexpected");s.push(t),t=t.makeFirstElementMutable()}let c=g;for(let u=s.length-1;u>=0;u--){const d=s[u];c?d.childrenLength>=3?c=w.ListAstNode.create23(c,d.unprependChild(),null,!1):(d.prependChildOfSameHeight(c),c=void 0):d.handleChildrenChanged()}return c?w.ListAstNode.create23(c,n,null,!1):n}}),define(J[391],ee([0,1,142,229,115,85,390,389]),function(j,e,w,N,T,D,S,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.parseDocument=void 0;function C(g,t,s,c){return new n(g,t,s,c).parseDocument()}e.parseDocument=C;class n{constructor(t,s,c,u){if(this.tokenizer=t,this.createImmutableLists=u,this._itemsConstructed=0,this._itemsFromCache=0,c&&u)throw new Error("Not supported");this.oldNodeReader=c?new p.NodeReader(c):void 0,this.positionMapper=new N.BeforeEditPositionMapper(s,t.length)}parseDocument(){this._itemsConstructed=0,this._itemsFromCache=0;let t=this.parseList(T.SmallImmutableSet.getEmpty());return t||(t=w.ListAstNode.getEmpty()),t}parseList(t){const s=new Array;for(;;){const u=this.tokenizer.peek();if(!u||u.kind===2&&u.bracketIds.intersects(t))break;const d=this.parseChild(t);d.kind===4&&d.childrenLength===0||s.push(d)}return this.oldNodeReader?(0,S.concat23Trees)(s):(0,S.concat23TreesOfSameHeight)(s,this.createImmutableLists)}parseChild(t){if(this.oldNodeReader){const c=this.positionMapper.getDistanceToNextChange(this.tokenizer.offset);if(!(0,D.lengthIsZero)(c)){const u=this.oldNodeReader.readLongestNodeAt(this.positionMapper.getOffsetBeforeChange(this.tokenizer.offset),d=>(0,D.lengthLessThan)(d.length,c)?d.canBeReused(t):!1);if(u)return this._itemsFromCache++,this.tokenizer.skip(u.length),u}}this._itemsConstructed++;const s=this.tokenizer.read();switch(s.kind){case 2:return new w.InvalidBracketAstNode(s.bracketIds,s.length);case 0:return s.astNode;case 1:const c=t.merge(s.bracketIds),u=this.parseList(c),d=this.tokenizer.peek();return d&&d.kind===2&&(d.bracketId===s.bracketId||d.bracketIds.intersects(s.bracketIds))?(this.tokenizer.read(),w.PairAstNode.create(s.astNode,u,d.astNode)):w.PairAstNode.create(s.astNode,u,null);default:throw new Error("unexpected")}}}}),define(J[392],ee([0,1]),function(j,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.guessIndentation=void 0;class w{constructor(){this.spacesDiff=0,this.looksLikeAlignment=!1}}function N(D,S,p,C,n){n.spacesDiff=0,n.looksLikeAlignment=!1;let g;for(g=0;g<S&&g<C;g++){let r=D.charCodeAt(g),o=p.charCodeAt(g);if(r!==o)break}let t=0,s=0;for(let r=g;r<S;r++)D.charCodeAt(r)===32?t++:s++;let c=0,u=0;for(let r=g;r<C;r++)p.charCodeAt(r)===32?c++:u++;if(t>0&&s>0||c>0&&u>0)return;let d=Math.abs(s-u),a=Math.abs(t-c);if(d===0){n.spacesDiff=a,a>0&&0<=c-1&&c-1<D.length&&c<p.length&&p.charCodeAt(c)!==32&&D.charCodeAt(c-1)===32&&D.charCodeAt(D.length-1)===44&&(n.looksLikeAlignment=!0);return}if(a%d==0){n.spacesDiff=a/d;return}}function T(D,S,p){const C=Math.min(D.getLineCount(),1e4);let n=0,g=0,t="",s=0;const c=[2,4,6,8,3,5,7],u=8;let d=[0,0,0,0,0,0,0,0,0],a=new w;for(let i=1;i<=C;i++){let l=D.getLineLength(i),h=D.getLineContent(i);const f=l<=65536;let y=!1,_=0,b=0,v=0;for(let E=0,I=l;E<I;E++){let k=f?h.charCodeAt(E):D.getLineCharCode(i,E);if(k===9)v++;else if(k===32)b++;else{y=!0,_=E;break}}if(!y||(v>0?n++:b>1&&g++,N(t,s,h,_,a),a.looksLikeAlignment&&!(p&&S===a.spacesDiff)))continue;let m=a.spacesDiff;m<=u&&d[m]++,t=h,s=_}let r=p;n!==g&&(r=n<g);let o=S;if(r){let i=r?0:.1*C;c.forEach(l=>{let h=d[l];h>i&&(i=h,o=l)}),o===4&&d[4]>0&&d[2]>0&&d[2]>=d[4]/2&&(o=2)}return{insertSpaces:r,tabSize:o}}e.guessIndentation=T}),define(J[393],ee([0,1]),function(j,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.intervalCompare=e.recomputeMaxEnd=e.nodeAcceptEdit=e.IntervalTree=e.SENTINEL=e.IntervalNode=e.getNodeColor=void 0;function w(R){return(R.metadata&1)>>>0}e.getNodeColor=w;function N(R,A){R.metadata=R.metadata&254|A<<0}function T(R){return(R.metadata&2)>>>1==1}function D(R,A){R.metadata=R.metadata&253|(A?1:0)<<1}function S(R){return(R.metadata&4)>>>2==1}function p(R,A){R.metadata=R.metadata&251|(A?1:0)<<2}function C(R){return(R.metadata&24)>>>3}function n(R,A){R.metadata=R.metadata&231|A<<3}function g(R){return(R.metadata&32)>>>5==1}function t(R,A){R.metadata=R.metadata&223|(A?1:0)<<5}class s{constructor(A,O,L){this.metadata=0,this.parent=this,this.left=this,this.right=this,N(this,1),this.start=O,this.end=L,this.delta=0,this.maxEnd=L,this.id=A,this.ownerId=0,this.options=null,p(this,!1),n(this,1),t(this,!1),this.cachedVersionId=0,this.cachedAbsoluteStart=O,this.cachedAbsoluteEnd=L,this.range=null,D(this,!1)}reset(A,O,L,B){this.start=O,this.end=L,this.maxEnd=L,this.cachedVersionId=A,this.cachedAbsoluteStart=O,this.cachedAbsoluteEnd=L,this.range=B}setOptions(A){this.options=A;let O=this.options.className;p(this,O==="squiggly-error"||O==="squiggly-warning"||O==="squiggly-info"),n(this,this.options.stickiness),t(this,this.options.collapseOnReplaceEdit)}setCachedOffsets(A,O,L){this.cachedVersionId!==L&&(this.range=null),this.cachedVersionId=L,this.cachedAbsoluteStart=A,this.cachedAbsoluteEnd=O}detach(){this.parent=null,this.left=null,this.right=null}}e.IntervalNode=s,e.SENTINEL=new s(null,0,0),e.SENTINEL.parent=e.SENTINEL,e.SENTINEL.left=e.SENTINEL,e.SENTINEL.right=e.SENTINEL,N(e.SENTINEL,0);class c{constructor(){this.root=e.SENTINEL,this.requestNormalizeDelta=!1}intervalSearch(A,O,L,B,W){return this.root===e.SENTINEL?[]:f(this,A,O,L,B,W)}search(A,O,L){return this.root===e.SENTINEL?[]:h(this,A,O,L)}collectNodesFromOwner(A){return i(this,A)}collectNodesPostOrder(){return l(this)}insert(A){y(this,A),this._normalizeDeltaIfNecessary()}delete(A){b(this,A),this._normalizeDeltaIfNecessary()}resolveNode(A,O){const L=A;let B=0;for(;A!==this.root;)A===A.parent.right&&(B+=A.parent.delta),A=A.parent;const W=L.start+B,K=L.end+B;L.setCachedOffsets(W,K,O)}acceptReplace(A,O,L,B){const W=r(this,A,A+O);for(let K=0,H=W.length;K<H;K++){const Y=W[K];b(this,Y)}this._normalizeDeltaIfNecessary(),o(this,A,A+O,L),this._normalizeDeltaIfNecessary();for(let K=0,H=W.length;K<H;K++){const Y=W[K];Y.start=Y.cachedAbsoluteStart,Y.end=Y.cachedAbsoluteEnd,a(Y,A,A+O,L,B),Y.maxEnd=Y.end,y(this,Y)}this._normalizeDeltaIfNecessary()}_normalizeDeltaIfNecessary(){!this.requestNormalizeDelta||(this.requestNormalizeDelta=!1,u(this))}}e.IntervalTree=c;function u(R){let A=R.root,O=0;for(;A!==e.SENTINEL;){if(A.left!==e.SENTINEL&&!T(A.left)){A=A.left;continue}if(A.right!==e.SENTINEL&&!T(A.right)){O+=A.delta,A=A.right;continue}A.start=O+A.start,A.end=O+A.end,A.delta=0,M(A),D(A,!0),D(A.left,!1),D(A.right,!1),A===A.parent.right&&(O-=A.parent.delta),A=A.parent}D(R.root,!1)}function d(R,A,O,L){return R<O?!0:R>O||L===1?!1:L===2?!0:A}function a(R,A,O,L,B){const W=C(R),K=W===0||W===2,H=W===1||W===2,Y=O-A,X=L,Z=Math.min(Y,X),se=R.start;let oe=!1;const G=R.end;let x=!1;A<=se&&G<=O&&g(R)&&(R.start=A,oe=!0,R.end=A,x=!0);{const $=B?1:Y>0?2:0;!oe&&d(se,K,A,$)&&(oe=!0),!x&&d(G,H,A,$)&&(x=!0)}if(Z>0&&!B){const $=Y>X?2:0;!oe&&d(se,K,A+Z,$)&&(oe=!0),!x&&d(G,H,A+Z,$)&&(x=!0)}{const $=B?1:0;!oe&&d(se,K,O,$)&&(R.start=A+X,oe=!0),!x&&d(G,H,O,$)&&(R.end=A+X,x=!0)}const U=X-Y;oe||(R.start=Math.max(0,se+U)),x||(R.end=Math.max(0,G+U)),R.start>R.end&&(R.end=R.start)}e.nodeAcceptEdit=a;function r(R,A,O){let L=R.root,B=0,W=0,K=0,H=0,Y=[],X=0;for(;L!==e.SENTINEL;){if(T(L)){D(L.left,!1),D(L.right,!1),L===L.parent.right&&(B-=L.parent.delta),L=L.parent;continue}if(!T(L.left)){if(W=B+L.maxEnd,W<A){D(L,!0);continue}if(L.left!==e.SENTINEL){L=L.left;continue}}if(K=B+L.start,K>O){D(L,!0);continue}if(H=B+L.end,H>=A&&(L.setCachedOffsets(K,H,0),Y[X++]=L),D(L,!0),L.right!==e.SENTINEL&&!T(L.right)){B+=L.delta,L=L.right;continue}}return D(R.root,!1),Y}function o(R,A,O,L){let B=R.root,W=0,K=0,H=0;const Y=L-(O-A);for(;B!==e.SENTINEL;){if(T(B)){D(B.left,!1),D(B.right,!1),B===B.parent.right&&(W-=B.parent.delta),M(B),B=B.parent;continue}if(!T(B.left)){if(K=W+B.maxEnd,K<A){D(B,!0);continue}if(B.left!==e.SENTINEL){B=B.left;continue}}if(H=W+B.start,H>O){B.start+=Y,B.end+=Y,B.delta+=Y,(B.delta<-1073741824||B.delta>1073741824)&&(R.requestNormalizeDelta=!0),D(B,!0);continue}if(D(B,!0),B.right!==e.SENTINEL&&!T(B.right)){W+=B.delta,B=B.right;continue}}D(R.root,!1)}function i(R,A){let O=R.root,L=[],B=0;for(;O!==e.SENTINEL;){if(T(O)){D(O.left,!1),D(O.right,!1),O=O.parent;continue}if(O.left!==e.SENTINEL&&!T(O.left)){O=O.left;continue}if(O.ownerId===A&&(L[B++]=O),D(O,!0),O.right!==e.SENTINEL&&!T(O.right)){O=O.right;continue}}return D(R.root,!1),L}function l(R){let A=R.root,O=[],L=0;for(;A!==e.SENTINEL;){if(T(A)){D(A.left,!1),D(A.right,!1),A=A.parent;continue}if(A.left!==e.SENTINEL&&!T(A.left)){A=A.left;continue}if(A.right!==e.SENTINEL&&!T(A.right)){A=A.right;continue}O[L++]=A,D(A,!0)}return D(R.root,!1),O}function h(R,A,O,L){let B=R.root,W=0,K=0,H=0,Y=[],X=0;for(;B!==e.SENTINEL;){if(T(B)){D(B.left,!1),D(B.right,!1),B===B.parent.right&&(W-=B.parent.delta),B=B.parent;continue}if(B.left!==e.SENTINEL&&!T(B.left)){B=B.left;continue}K=W+B.start,H=W+B.end,B.setCachedOffsets(K,H,L);let Z=!0;if(A&&B.ownerId&&B.ownerId!==A&&(Z=!1),O&&S(B)&&(Z=!1),Z&&(Y[X++]=B),D(B,!0),B.right!==e.SENTINEL&&!T(B.right)){W+=B.delta,B=B.right;continue}}return D(R.root,!1),Y}function f(R,A,O,L,B,W){let K=R.root,H=0,Y=0,X=0,Z=0,se=[],oe=0;for(;K!==e.SENTINEL;){if(T(K)){D(K.left,!1),D(K.right,!1),K===K.parent.right&&(H-=K.parent.delta),K=K.parent;continue}if(!T(K.left)){if(Y=H+K.maxEnd,Y<A){D(K,!0);continue}if(K.left!==e.SENTINEL){K=K.left;continue}}if(X=H+K.start,X>O){D(K,!0);continue}if(Z=H+K.end,Z>=A){K.setCachedOffsets(X,Z,W);let G=!0;L&&K.ownerId&&K.ownerId!==L&&(G=!1),B&&S(K)&&(G=!1),G&&(se[oe++]=K)}if(D(K,!0),K.right!==e.SENTINEL&&!T(K.right)){H+=K.delta,K=K.right;continue}}return D(R.root,!1),se}function y(R,A){if(R.root===e.SENTINEL)return A.parent=e.SENTINEL,A.left=e.SENTINEL,A.right=e.SENTINEL,N(A,0),R.root=A,R.root;_(R,A),P(A.parent);let O=A;for(;O!==R.root&&w(O.parent)===1;)if(O.parent===O.parent.parent.left){const L=O.parent.parent.right;w(L)===1?(N(O.parent,0),N(L,0),N(O.parent.parent,1),O=O.parent.parent):(O===O.parent.right&&(O=O.parent,E(R,O)),N(O.parent,0),N(O.parent.parent,1),I(R,O.parent.parent))}else{const L=O.parent.parent.left;w(L)===1?(N(O.parent,0),N(L,0),N(O.parent.parent,1),O=O.parent.parent):(O===O.parent.left&&(O=O.parent,I(R,O)),N(O.parent,0),N(O.parent.parent,1),E(R,O.parent.parent))}return N(R.root,0),A}function _(R,A){let O=0,L=R.root;const B=A.start,W=A.end;for(;;)if(F(B,W,L.start+O,L.end+O)<0)if(L.left===e.SENTINEL){A.start-=O,A.end-=O,A.maxEnd-=O,L.left=A;break}else L=L.left;else if(L.right===e.SENTINEL){A.start-=O+L.delta,A.end-=O+L.delta,A.maxEnd-=O+L.delta,L.right=A;break}else O+=L.delta,L=L.right;A.parent=L,A.left=e.SENTINEL,A.right=e.SENTINEL,N(A,1)}function b(R,A){let O,L;if(A.left===e.SENTINEL?(O=A.right,L=A,O.delta+=A.delta,(O.delta<-1073741824||O.delta>1073741824)&&(R.requestNormalizeDelta=!0),O.start+=A.delta,O.end+=A.delta):A.right===e.SENTINEL?(O=A.left,L=A):(L=v(A.right),O=L.right,O.start+=L.delta,O.end+=L.delta,O.delta+=L.delta,(O.delta<-1073741824||O.delta>1073741824)&&(R.requestNormalizeDelta=!0),L.start+=A.delta,L.end+=A.delta,L.delta=A.delta,(L.delta<-1073741824||L.delta>1073741824)&&(R.requestNormalizeDelta=!0)),L===R.root){R.root=O,N(O,0),A.detach(),m(),M(O),R.root.parent=e.SENTINEL;return}let B=w(L)===1;if(L===L.parent.left?L.parent.left=O:L.parent.right=O,L===A?O.parent=L.parent:(L.parent===A?O.parent=L:O.parent=L.parent,L.left=A.left,L.right=A.right,L.parent=A.parent,N(L,w(A)),A===R.root?R.root=L:A===A.parent.left?A.parent.left=L:A.parent.right=L,L.left!==e.SENTINEL&&(L.left.parent=L),L.right!==e.SENTINEL&&(L.right.parent=L)),A.detach(),B){P(O.parent),L!==A&&(P(L),P(L.parent)),m();return}P(O),P(O.parent),L!==A&&(P(L),P(L.parent));let W;for(;O!==R.root&&w(O)===0;)O===O.parent.left?(W=O.parent.right,w(W)===1&&(N(W,0),N(O.parent,1),E(R,O.parent),W=O.parent.right),w(W.left)===0&&w(W.right)===0?(N(W,1),O=O.parent):(w(W.right)===0&&(N(W.left,0),N(W,1),I(R,W),W=O.parent.right),N(W,w(O.parent)),N(O.parent,0),N(W.right,0),E(R,O.parent),O=R.root)):(W=O.parent.left,w(W)===1&&(N(W,0),N(O.parent,1),I(R,O.parent),W=O.parent.left),w(W.left)===0&&w(W.right)===0?(N(W,1),O=O.parent):(w(W.left)===0&&(N(W.right,0),N(W,1),E(R,W),W=O.parent.left),N(W,w(O.parent)),N(O.parent,0),N(W.left,0),I(R,O.parent),O=R.root));N(O,0),m()}function v(R){for(;R.left!==e.SENTINEL;)R=R.left;return R}function m(){e.SENTINEL.parent=e.SENTINEL,e.SENTINEL.delta=0,e.SENTINEL.start=0,e.SENTINEL.end=0}function E(R,A){const O=A.right;O.delta+=A.delta,(O.delta<-1073741824||O.delta>1073741824)&&(R.requestNormalizeDelta=!0),O.start+=A.delta,O.end+=A.delta,A.right=O.left,O.left!==e.SENTINEL&&(O.left.parent=A),O.parent=A.parent,A.parent===e.SENTINEL?R.root=O:A===A.parent.left?A.parent.left=O:A.parent.right=O,O.left=A,A.parent=O,M(A),M(O)}function I(R,A){const O=A.left;A.delta-=O.delta,(A.delta<-1073741824||A.delta>1073741824)&&(R.requestNormalizeDelta=!0),A.start-=O.delta,A.end-=O.delta,A.left=O.right,O.right!==e.SENTINEL&&(O.right.parent=A),O.parent=A.parent,A.parent===e.SENTINEL?R.root=O:A===A.parent.right?A.parent.right=O:A.parent.left=O,O.right=A,A.parent=O,M(A),M(O)}function k(R){let A=R.end;if(R.left!==e.SENTINEL){const O=R.left.maxEnd;O>A&&(A=O)}if(R.right!==e.SENTINEL){const O=R.right.maxEnd+R.delta;O>A&&(A=O)}return A}function M(R){R.maxEnd=k(R)}e.recomputeMaxEnd=M;function P(R){for(;R!==e.SENTINEL;){const A=k(R);if(R.maxEnd===A)return;R.maxEnd=A,R=R.parent}}function F(R,A,O,L){return R===O?A-L:R-O}e.intervalCompare=F}),define(J[394],ee([0,1]),function(j,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.recomputeTreeMetadata=e.updateTreeMetadata=e.fixInsert=e.rbDelete=e.rightRotate=e.leftRotate=e.resetSentinel=e.calculateLF=e.calculateSize=e.righttest=e.leftest=e.SENTINEL=e.TreeNode=void 0;class w{constructor(d,a){this.piece=d,this.color=a,this.size_left=0,this.lf_left=0,this.parent=this,this.left=this,this.right=this}next(){if(this.right!==e.SENTINEL)return N(this.right);let d=this;for(;d.parent!==e.SENTINEL&&d.parent.left!==d;)d=d.parent;return d.parent===e.SENTINEL?e.SENTINEL:d.parent}prev(){if(this.left!==e.SENTINEL)return T(this.left);let d=this;for(;d.parent!==e.SENTINEL&&d.parent.right!==d;)d=d.parent;return d.parent===e.SENTINEL?e.SENTINEL:d.parent}detach(){this.parent=null,this.left=null,this.right=null}}e.TreeNode=w,e.SENTINEL=new w(null,0),e.SENTINEL.parent=e.SENTINEL,e.SENTINEL.left=e.SENTINEL,e.SENTINEL.right=e.SENTINEL,e.SENTINEL.color=0;function N(u){for(;u.left!==e.SENTINEL;)u=u.left;return u}e.leftest=N;function T(u){for(;u.right!==e.SENTINEL;)u=u.right;return u}e.righttest=T;function D(u){return u===e.SENTINEL?0:u.size_left+u.piece.length+D(u.right)}e.calculateSize=D;function S(u){return u===e.SENTINEL?0:u.lf_left+u.piece.lineFeedCnt+S(u.right)}e.calculateLF=S;function p(){e.SENTINEL.parent=e.SENTINEL}e.resetSentinel=p;function C(u,d){let a=d.right;a.size_left+=d.size_left+(d.piece?d.piece.length:0),a.lf_left+=d.lf_left+(d.piece?d.piece.lineFeedCnt:0),d.right=a.left,a.left!==e.SENTINEL&&(a.left.parent=d),a.parent=d.parent,d.parent===e.SENTINEL?u.root=a:d.parent.left===d?d.parent.left=a:d.parent.right=a,a.left=d,d.parent=a}e.leftRotate=C;function n(u,d){let a=d.left;d.left=a.right,a.right!==e.SENTINEL&&(a.right.parent=d),a.parent=d.parent,d.size_left-=a.size_left+(a.piece?a.piece.length:0),d.lf_left-=a.lf_left+(a.piece?a.piece.lineFeedCnt:0),d.parent===e.SENTINEL?u.root=a:d===d.parent.right?d.parent.right=a:d.parent.left=a,a.right=d,d.parent=a}e.rightRotate=n;function g(u,d){let a,r;if(d.left===e.SENTINEL?(r=d,a=r.right):d.right===e.SENTINEL?(r=d,a=r.left):(r=N(d.right),a=r.right),r===u.root){u.root=a,a.color=0,d.detach(),p(),u.root.parent=e.SENTINEL;return}let o=r.color===1;if(r===r.parent.left?r.parent.left=a:r.parent.right=a,r===d?(a.parent=r.parent,c(u,a)):(r.parent===d?a.parent=r:a.parent=r.parent,c(u,a),r.left=d.left,r.right=d.right,r.parent=d.parent,r.color=d.color,d===u.root?u.root=r:d===d.parent.left?d.parent.left=r:d.parent.right=r,r.left!==e.SENTINEL&&(r.left.parent=r),r.right!==e.SENTINEL&&(r.right.parent=r),r.size_left=d.size_left,r.lf_left=d.lf_left,c(u,r)),d.detach(),a.parent.left===a){let l=D(a),h=S(a);if(l!==a.parent.size_left||h!==a.parent.lf_left){let f=l-a.parent.size_left,y=h-a.parent.lf_left;a.parent.size_left=l,a.parent.lf_left=h,s(u,a.parent,f,y)}}if(c(u,a.parent),o){p();return}let i;for(;a!==u.root&&a.color===0;)a===a.parent.left?(i=a.parent.right,i.color===1&&(i.color=0,a.parent.color=1,C(u,a.parent),i=a.parent.right),i.left.color===0&&i.right.color===0?(i.color=1,a=a.parent):(i.right.color===0&&(i.left.color=0,i.color=1,n(u,i),i=a.parent.right),i.color=a.parent.color,a.parent.color=0,i.right.color=0,C(u,a.parent),a=u.root)):(i=a.parent.left,i.color===1&&(i.color=0,a.parent.color=1,n(u,a.parent),i=a.parent.left),i.left.color===0&&i.right.color===0?(i.color=1,a=a.parent):(i.left.color===0&&(i.right.color=0,i.color=1,C(u,i),i=a.parent.left),i.color=a.parent.color,a.parent.color=0,i.left.color=0,n(u,a.parent),a=u.root));a.color=0,p()}e.rbDelete=g;function t(u,d){for(c(u,d);d!==u.root&&d.parent.color===1;)if(d.parent===d.parent.parent.left){const a=d.parent.parent.right;a.color===1?(d.parent.color=0,a.color=0,d.parent.parent.color=1,d=d.parent.parent):(d===d.parent.right&&(d=d.parent,C(u,d)),d.parent.color=0,d.parent.parent.color=1,n(u,d.parent.parent))}else{const a=d.parent.parent.left;a.color===1?(d.parent.color=0,a.color=0,d.parent.parent.color=1,d=d.parent.parent):(d===d.parent.left&&(d=d.parent,n(u,d)),d.parent.color=0,d.parent.parent.color=1,C(u,d.parent.parent))}u.root.color=0}e.fixInsert=t;function s(u,d,a,r){for(;d!==u.root&&d!==e.SENTINEL;)d.parent.left===d&&(d.parent.size_left+=a,d.parent.lf_left+=r),d=d.parent}e.updateTreeMetadata=s;function c(u,d){let a=0,r=0;if(d!==u.root){for(;d!==u.root&&d===d.parent.right;)d=d.parent;if(d!==u.root)for(d=d.parent,a=D(d.left)-d.size_left,r=S(d.left)-d.lf_left,d.size_left+=a,d.lf_left+=r;d!==u.root&&(a!==0||r!==0);)d.parent.left===d&&(d.parent.size_left+=a,d.parent.lf_left+=r),d=d.parent}}e.recomputeTreeMetadata=c}),define(J[230],ee([0,1,105,84]),function(j,e,w,N){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.compressConsecutiveTextChanges=e.TextChange=void 0;function T(C){return C.replace(/\n/g,"\\n").replace(/\r/g,"\\r")}class D{constructor(n,g,t,s){this.oldPosition=n,this.oldText=g,this.newPosition=t,this.newText=s}get oldLength(){return this.oldText.length}get oldEnd(){return this.oldPosition+this.oldText.length}get newLength(){return this.newText.length}get newEnd(){return this.newPosition+this.newText.length}toString(){return this.oldText.length===0?`(insert@${this.oldPosition} "${T(this.newText)}")`:this.newText.length===0?`(delete@${this.oldPosition} "${T(this.oldText)}")`:`(replace@${this.oldPosition} "${T(this.oldText)}" with "${T(this.newText)}")`}static _writeStringSize(n){return 4+2*n.length}static _writeString(n,g,t){const s=g.length;w.writeUInt32BE(n,s,t),t+=4;for(let c=0;c<s;c++)w.writeUInt16LE(n,g.charCodeAt(c),t),t+=2;return t}static _readString(n,g){const t=w.readUInt32BE(n,g);return g+=4,(0,N.decodeUTF16LE)(n,g,t)}writeSize(){return 4+4+D._writeStringSize(this.oldText)+D._writeStringSize(this.newText)}write(n,g){return w.writeUInt32BE(n,this.oldPosition,g),g+=4,w.writeUInt32BE(n,this.newPosition,g),g+=4,g=D._writeString(n,this.oldText,g),g=D._writeString(n,this.newText,g),g}static read(n,g,t){const s=w.readUInt32BE(n,g);g+=4;const c=w.readUInt32BE(n,g);g+=4;const u=D._readString(n,g);g+=D._writeStringSize(u);const d=D._readString(n,g);return g+=D._writeStringSize(d),t.push(new D(s,u,c,d)),g}}e.TextChange=D;function S(C,n){return C===null||C.length===0?n:new p(C,n).compress()}e.compressConsecutiveTextChanges=S;class p{constructor(n,g){this._prevEdits=n,this._currEdits=g,this._result=[],this._resultLen=0,this._prevLen=this._prevEdits.length,this._prevDeltaOffset=0,this._currLen=this._currEdits.length,this._currDeltaOffset=0}compress(){let n=0,g=0,t=this._getPrev(n),s=this._getCurr(g);for(;n<this._prevLen||g<this._currLen;){if(t===null){this._acceptCurr(s),s=this._getCurr(++g);continue}if(s===null){this._acceptPrev(t),t=this._getPrev(++n);continue}if(s.oldEnd<=t.newPosition){this._acceptCurr(s),s=this._getCurr(++g);continue}if(t.newEnd<=s.oldPosition){this._acceptPrev(t),t=this._getPrev(++n);continue}if(s.oldPosition<t.newPosition){const[r,o]=p._splitCurr(s,t.newPosition-s.oldPosition);this._acceptCurr(r),s=o;continue}if(t.newPosition<s.oldPosition){const[r,o]=p._splitPrev(t,s.oldPosition-t.newPosition);this._acceptPrev(r),t=o;continue}let d,a;if(s.oldEnd===t.newEnd)d=t,a=s,t=this._getPrev(++n),s=this._getCurr(++g);else if(s.oldEnd<t.newEnd){const[r,o]=p._splitPrev(t,s.oldLength);d=r,a=s,t=o,s=this._getCurr(++g)}else{const[r,o]=p._splitCurr(s,t.newLength);d=t,a=r,t=this._getPrev(++n),s=o}this._result[this._resultLen++]=new D(d.oldPosition,d.oldText,a.newPosition,a.newText),this._prevDeltaOffset+=d.newLength-d.oldLength,this._currDeltaOffset+=a.newLength-a.oldLength}const c=p._merge(this._result);return p._removeNoOps(c)}_acceptCurr(n){this._result[this._resultLen++]=p._rebaseCurr(this._prevDeltaOffset,n),this._currDeltaOffset+=n.newLength-n.oldLength}_getCurr(n){return n<this._currLen?this._currEdits[n]:null}_acceptPrev(n){this._result[this._resultLen++]=p._rebasePrev(this._currDeltaOffset,n),this._prevDeltaOffset+=n.newLength-n.oldLength}_getPrev(n){return n<this._prevLen?this._prevEdits[n]:null}static _rebaseCurr(n,g){return new D(g.oldPosition-n,g.oldText,g.newPosition,g.newText)}static _rebasePrev(n,g){return new D(g.oldPosition,g.oldText,g.newPosition+n,g.newText)}static _splitPrev(n,g){const t=n.newText.substr(0,g),s=n.newText.substr(g);return[new D(n.oldPosition,n.oldText,n.newPosition,t),new D(n.oldEnd,"",n.newPosition+g,s)]}static _splitCurr(n,g){const t=n.oldText.substr(0,g),s=n.oldText.substr(g);return[new D(n.oldPosition,t,n.newPosition,n.newText),new D(n.oldPosition+g,s,n.newEnd,"")]}static _merge(n){if(n.length===0)return n;let g=[],t=0,s=n[0];for(let c=1;c<n.length;c++){const u=n[c];s.oldEnd===u.oldPosition?s=new D(s.oldPosition,s.oldText+u.oldText,s.newPosition,s.newText+u.newText):(g[t++]=s,s=u)}return g[t++]=s,g}static _removeNoOps(n){if(n.length===0)return n;let g=[],t=0;for(let s=0;s<n.length;s++){const c=n[s];c.oldText!==c.newText&&(g[t++]=c)}return g}}}),define(J[99],ee([0,1]),function(j,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.InternalModelContentChangeEvent=e.ModelInjectedTextChangedEvent=e.ModelRawContentChangedEvent=e.ModelRawEOLChanged=e.ModelRawLinesInserted=e.ModelRawLinesDeleted=e.ModelRawLineChanged=e.LineInjectedText=e.ModelRawFlush=void 0;class w{constructor(){this.changeType=1}}e.ModelRawFlush=w;class N{constructor(s,c,u,d,a){this.ownerId=s,this.lineNumber=c,this.column=u,this.options=d,this.order=a}static applyInjectedText(s,c){if(!c||c.length===0)return s;let u="",d=0;for(const a of c)u+=s.substring(d,a.column-1),d=a.column-1,u+=a.options.content;return u+=s.substring(d),u}static fromDecorations(s){const c=[];for(const u of s)u.options.before&&u.options.before.content.length>0&&c.push(new N(u.ownerId,u.range.startLineNumber,u.range.startColumn,u.options.before,0)),u.options.after&&u.options.after.content.length>0&&c.push(new N(u.ownerId,u.range.endLineNumber,u.range.endColumn,u.options.after,1));return c.sort((u,d)=>u.lineNumber===d.lineNumber?u.column===d.column?u.order-d.order:u.column-d.column:u.lineNumber-d.lineNumber),c}}e.LineInjectedText=N;class T{constructor(s,c,u){this.changeType=2,this.lineNumber=s,this.detail=c,this.injectedText=u}}e.ModelRawLineChanged=T;class D{constructor(s,c){this.changeType=3,this.fromLineNumber=s,this.toLineNumber=c}}e.ModelRawLinesDeleted=D;class S{constructor(s,c,u,d){this.changeType=4,this.injectedTexts=d,this.fromLineNumber=s,this.toLineNumber=c,this.detail=u}}e.ModelRawLinesInserted=S;class p{constructor(){this.changeType=5}}e.ModelRawEOLChanged=p;class C{constructor(s,c,u,d){this.changes=s,this.versionId=c,this.isUndoing=u,this.isRedoing=d,this.resultingSelection=null}containsEvent(s){for(let c=0,u=this.changes.length;c<u;c++)if(this.changes[c].changeType===s)return!0;return!1}static merge(s,c){const u=[].concat(s.changes).concat(c.changes),d=c.versionId,a=s.isUndoing||c.isUndoing,r=s.isRedoing||c.isRedoing;return new C(u,d,a,r)}}e.ModelRawContentChangedEvent=C;class n{constructor(s){this.changes=s}}e.ModelInjectedTextChangedEvent=n;class g{constructor(s,c){this.rawContentChangedEvent=s,this.contentChangedEvent=c}merge(s){const c=C.merge(this.rawContentChangedEvent,s.rawContentChangedEvent),u=g._mergeChangeEvents(this.contentChangedEvent,s.contentChangedEvent);return new g(c,u)}static _mergeChangeEvents(s,c){const u=[].concat(s.changes).concat(c.changes),d=c.eol,a=c.versionId,r=s.isUndoing||c.isUndoing,o=s.isRedoing||c.isRedoing,i=s.isFlush||c.isFlush;return{changes:u,eol:d,versionId:a,isUndoing:r,isRedoing:o,isFlush:i}}}e.InternalModelContentChangeEvent=g}),define(J[176],ee([0,1,8,112,13,3,49]),function(j,e,w,N,T,D,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Searcher=e.isValidMatch=e.TextModelSearch=e.createFindMatch=e.SearchData=e.isMultilineRegexSource=e.SearchParams=void 0;const p=999;class C{constructor(i,l,h,f){this.searchString=i,this.isRegex=l,this.matchCase=h,this.wordSeparators=f}parseSearchRequest(){if(this.searchString==="")return null;let i;this.isRegex?i=n(this.searchString):i=this.searchString.indexOf(`
`)>=0;let l=null;try{l=w.createRegExp(this.searchString,this.isRegex,{matchCase:this.matchCase,wholeWord:!1,multiline:i,global:!0,unicode:!0})}catch(f){return null}if(!l)return null;let h=!this.isRegex&&!i;return h&&this.searchString.toLowerCase()!==this.searchString.toUpperCase()&&(h=this.matchCase),new g(l,this.wordSeparators?(0,N.getMapForWordSeparators)(this.wordSeparators):null,h?this.searchString:null)}}e.SearchParams=C;function n(o){if(!o||o.length===0)return!1;for(let i=0,l=o.length;i<l;i++)if(o.charCodeAt(i)===92){if(i++,i>=l)break;const f=o.charCodeAt(i);if(f===110||f===114||f===87)return!0}return!1}e.isMultilineRegexSource=n;class g{constructor(i,l,h){this.regex=i,this.wordSeparators=l,this.simpleSearch=h}}e.SearchData=g;function t(o,i,l){if(!l)return new S.FindMatch(o,null);let h=[];for(let f=0,y=i.length;f<y;f++)h[f]=i[f];return new S.FindMatch(o,h)}e.createFindMatch=t;class s{constructor(i){let l=[],h=0;for(let f=0,y=i.length;f<y;f++)i.charCodeAt(f)===10&&(l[h++]=f);this._lineFeedsOffsets=l}findLineFeedCountBeforeOffset(i){const l=this._lineFeedsOffsets;let h=0,f=l.length-1;if(f===-1||i<=l[0])return 0;for(;h<f;){const y=h+((f-h)/2>>0);l[y]>=i?f=y-1:l[y+1]>=i?(h=y,f=y):h=y+1}return h+1}}class c{static findMatches(i,l,h,f,y){const _=l.parseSearchRequest();return _?_.regex.multiline?this._doFindMatchesMultiline(i,h,new r(_.wordSeparators,_.regex),f,y):this._doFindMatchesLineByLine(i,h,_,f,y):[]}static _getMultilineMatchRange(i,l,h,f,y,_){let b,v=0;f?(v=f.findLineFeedCountBeforeOffset(y),b=l+y+v):b=l+y;let m;if(f){let M=f.findLineFeedCountBeforeOffset(y+_.length)-v;m=b+_.length+M}else m=b+_.length;const E=i.getPositionAt(b),I=i.getPositionAt(m);return new D.Range(E.lineNumber,E.column,I.lineNumber,I.column)}static _doFindMatchesMultiline(i,l,h,f,y){const _=i.getOffsetAt(l.getStartPosition()),b=i.getValueInRange(l,1),v=i.getEOL()===`\r
`?new s(b):null,m=[];let E=0,I;for(h.reset(0);I=h.next(b);)if(m[E++]=t(this._getMultilineMatchRange(i,_,b,v,I.index,I[0]),I,f),E>=y)return m;return m}static _doFindMatchesLineByLine(i,l,h,f,y){const _=[];let b=0;if(l.startLineNumber===l.endLineNumber){const m=i.getLineContent(l.startLineNumber).substring(l.startColumn-1,l.endColumn-1);return b=this._findMatchesInLine(h,m,l.startLineNumber,l.startColumn-1,b,_,f,y),_}const v=i.getLineContent(l.startLineNumber).substring(l.startColumn-1);b=this._findMatchesInLine(h,v,l.startLineNumber,l.startColumn-1,b,_,f,y);for(let m=l.startLineNumber+1;m<l.endLineNumber&&b<y;m++)b=this._findMatchesInLine(h,i.getLineContent(m),m,0,b,_,f,y);if(b<y){const m=i.getLineContent(l.endLineNumber).substring(0,l.endColumn-1);b=this._findMatchesInLine(h,m,l.endLineNumber,0,b,_,f,y)}return _}static _findMatchesInLine(i,l,h,f,y,_,b,v){const m=i.wordSeparators;if(!b&&i.simpleSearch){const k=i.simpleSearch,M=k.length,P=l.length;let F=-M;for(;(F=l.indexOf(k,F+M))!==-1;)if((!m||a(m,l,P,F,M))&&(_[y++]=new S.FindMatch(new D.Range(h,F+1+f,h,F+1+M+f),null),y>=v))return y;return y}const E=new r(i.wordSeparators,i.regex);let I;E.reset(0);do if(I=E.next(l),I&&(_[y++]=t(new D.Range(h,I.index+1+f,h,I.index+1+I[0].length+f),I,b),y>=v))return y;while(I);return y}static findNextMatch(i,l,h,f){const y=l.parseSearchRequest();if(!y)return null;const _=new r(y.wordSeparators,y.regex);return y.regex.multiline?this._doFindNextMatchMultiline(i,h,_,f):this._doFindNextMatchLineByLine(i,h,_,f)}static _doFindNextMatchMultiline(i,l,h,f){const y=new T.Position(l.lineNumber,1),_=i.getOffsetAt(y),b=i.getLineCount(),v=i.getValueInRange(new D.Range(y.lineNumber,y.column,b,i.getLineMaxColumn(b)),1),m=i.getEOL()===`\r
`?new s(v):null;h.reset(l.column-1);let E=h.next(v);return E?t(this._getMultilineMatchRange(i,_,v,m,E.index,E[0]),E,f):l.lineNumber!==1||l.column!==1?this._doFindNextMatchMultiline(i,new T.Position(1,1),h,f):null}static _doFindNextMatchLineByLine(i,l,h,f){const y=i.getLineCount(),_=l.lineNumber,b=i.getLineContent(_),v=this._findFirstMatchInLine(h,b,_,l.column,f);if(v)return v;for(let m=1;m<=y;m++){const E=(_+m-1)%y,I=i.getLineContent(E+1),k=this._findFirstMatchInLine(h,I,E+1,1,f);if(k)return k}return null}static _findFirstMatchInLine(i,l,h,f,y){i.reset(f-1);const _=i.next(l);return _?t(new D.Range(h,_.index+1,h,_.index+1+_[0].length),_,y):null}static findPreviousMatch(i,l,h,f){const y=l.parseSearchRequest();if(!y)return null;const _=new r(y.wordSeparators,y.regex);return y.regex.multiline?this._doFindPreviousMatchMultiline(i,h,_,f):this._doFindPreviousMatchLineByLine(i,h,_,f)}static _doFindPreviousMatchMultiline(i,l,h,f){const y=this._doFindMatchesMultiline(i,new D.Range(1,1,l.lineNumber,l.column),h,f,10*p);if(y.length>0)return y[y.length-1];const _=i.getLineCount();return l.lineNumber!==_||l.column!==i.getLineMaxColumn(_)?this._doFindPreviousMatchMultiline(i,new T.Position(_,i.getLineMaxColumn(_)),h,f):null}static _doFindPreviousMatchLineByLine(i,l,h,f){const y=i.getLineCount(),_=l.lineNumber,b=i.getLineContent(_).substring(0,l.column-1),v=this._findLastMatchInLine(h,b,_,f);if(v)return v;for(let m=1;m<=y;m++){const E=(y+_-m-1)%y,I=i.getLineContent(E+1),k=this._findLastMatchInLine(h,I,E+1,f);if(k)return k}return null}static _findLastMatchInLine(i,l,h,f){let y=null,_;for(i.reset(0);_=i.next(l);)y=t(new D.Range(h,_.index+1,h,_.index+1+_[0].length),_,f);return y}}e.TextModelSearch=c;function u(o,i,l,h,f){if(h===0)return!0;const y=i.charCodeAt(h-1);if(o.get(y)!==0||y===13||y===10)return!0;if(f>0){const _=i.charCodeAt(h);if(o.get(_)!==0)return!0}return!1}function d(o,i,l,h,f){if(h+f===l)return!0;const y=i.charCodeAt(h+f);if(o.get(y)!==0||y===13||y===10)return!0;if(f>0){const _=i.charCodeAt(h+f-1);if(o.get(_)!==0)return!0}return!1}function a(o,i,l,h,f){return u(o,i,l,h,f)&&d(o,i,l,h,f)}e.isValidMatch=a;class r{constructor(i,l){this._wordSeparators=i,this._searchRegex=l,this._prevMatchStartIndex=-1,this._prevMatchLength=0}reset(i){this._searchRegex.lastIndex=i,this._prevMatchStartIndex=-1,this._prevMatchLength=0}next(i){const l=i.length;let h;do{if(this._prevMatchStartIndex+this._prevMatchLength===l||(h=this._searchRegex.exec(i),!h))return null;const f=h.index,y=h[0].length;if(f===this._prevMatchStartIndex&&y===this._prevMatchLength){if(y===0){w.getNextCodePoint(i,l,this._searchRegex.lastIndex)>65535?this._searchRegex.lastIndex+=2:this._searchRegex.lastIndex+=1;continue}return null}if(this._prevMatchStartIndex=f,this._prevMatchLength=y,!this._wordSeparators||a(this._wordSeparators,i,l,f,y))return h}while(h);return null}}e.Searcher=r}),define(J[231],ee([0,1,13,3,49,394,176]),function(j,e,w,N,T,D,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.PieceTreeBase=e.StringBuffer=e.Piece=e.createLineStarts=e.createLineStartsFast=e.LineStarts=e.createUintArray=e.AverageBufferSize=void 0,e.AverageBufferSize=65535;function p(a){let r;return a[a.length-1]<65536?r=new Uint16Array(a.length):r=new Uint32Array(a.length),r.set(a,0),r}e.createUintArray=p;class C{constructor(r,o,i,l,h){this.lineStarts=r,this.cr=o,this.lf=i,this.crlf=l,this.isBasicASCII=h}}e.LineStarts=C;function n(a,r=!0){let o=[0],i=1;for(let l=0,h=a.length;l<h;l++){const f=a.charCodeAt(l);f===13?l+1<h&&a.charCodeAt(l+1)===10?(o[i++]=l+2,l++):o[i++]=l+1:f===10&&(o[i++]=l+1)}return r?p(o):o}e.createLineStartsFast=n;function g(a,r){a.length=0,a[0]=0;let o=1,i=0,l=0,h=0,f=!0;for(let _=0,b=r.length;_<b;_++){const v=r.charCodeAt(_);v===13?_+1<b&&r.charCodeAt(_+1)===10?(h++,a[o++]=_+2,_++):(i++,a[o++]=_+1):v===10?(l++,a[o++]=_+1):f&&v!==9&&(v<32||v>126)&&(f=!1)}const y=new C(p(a),i,l,h,f);return a.length=0,y}e.createLineStarts=g;class t{constructor(r,o,i,l,h){this.bufferIndex=r,this.start=o,this.end=i,this.lineFeedCnt=l,this.length=h}}e.Piece=t;class s{constructor(r,o){this.buffer=r,this.lineStarts=o}}e.StringBuffer=s;class c{constructor(r,o){this._pieces=[],this._tree=r,this._BOM=o,this._index=0,r.root!==D.SENTINEL&&r.iterate(r.root,i=>(i!==D.SENTINEL&&this._pieces.push(i.piece),!0))}read(){return this._pieces.length===0?this._index===0?(this._index++,this._BOM):null:this._index>this._pieces.length-1?null:this._index===0?this._BOM+this._tree.getPieceContent(this._pieces[this._index++]):this._tree.getPieceContent(this._pieces[this._index++])}}class u{constructor(r){this._limit=r,this._cache=[]}get(r){for(let o=this._cache.length-1;o>=0;o--){let i=this._cache[o];if(i.nodeStartOffset<=r&&i.nodeStartOffset+i.node.piece.length>=r)return i}return null}get2(r){for(let o=this._cache.length-1;o>=0;o--){let i=this._cache[o];if(i.nodeStartLineNumber&&i.nodeStartLineNumber<r&&i.nodeStartLineNumber+i.node.piece.lineFeedCnt>=r)return i}return null}set(r){this._cache.length>=this._limit&&this._cache.shift(),this._cache.push(r)}validate(r){let o=!1,i=this._cache;for(let l=0;l<i.length;l++){let h=i[l];if(h.node.parent===null||h.nodeStartOffset>=r){i[l]=null,o=!0;continue}}if(o){let l=[];for(const h of i)h!==null&&l.push(h);this._cache=l}}}class d{constructor(r,o,i){this.create(r,o,i)}create(r,o,i){this._buffers=[new s("",[0])],this._lastChangeBufferPos={line:0,column:0},this.root=D.SENTINEL,this._lineCnt=1,this._length=0,this._EOL=o,this._EOLLength=o.length,this._EOLNormalized=i;let l=null;for(let h=0,f=r.length;h<f;h++)if(r[h].buffer.length>0){r[h].lineStarts||(r[h].lineStarts=n(r[h].buffer));let y=new t(h+1,{line:0,column:0},{line:r[h].lineStarts.length-1,column:r[h].buffer.length-r[h].lineStarts[r[h].lineStarts.length-1]},r[h].lineStarts.length-1,r[h].buffer.length);this._buffers.push(r[h]),l=this.rbInsertRight(l,y)}this._searchCache=new u(1),this._lastVisitedLine={lineNumber:0,value:""},this.computeBufferMetadata()}normalizeEOL(r){let o=e.AverageBufferSize,i=o-Math.floor(o/3),l=i*2,h="",f=0,y=[];if(this.iterate(this.root,_=>{let b=this.getNodeContent(_),v=b.length;if(f<=i||f+v<l)return h+=b,f+=v,!0;let m=h.replace(/\r\n|\r|\n/g,r);return y.push(new s(m,n(m))),h=b,f=v,!0}),f>0){let _=h.replace(/\r\n|\r|\n/g,r);y.push(new s(_,n(_)))}this.create(y,r,!0)}getEOL(){return this._EOL}setEOL(r){this._EOL=r,this._EOLLength=this._EOL.length,this.normalizeEOL(r)}createSnapshot(r){return new c(this,r)}getOffsetAt(r,o){let i=0,l=this.root;for(;l!==D.SENTINEL;)if(l.left!==D.SENTINEL&&l.lf_left+1>=r)l=l.left;else{if(l.lf_left+l.piece.lineFeedCnt+1>=r)return i+=l.size_left,i+=this.getAccumulatedValue(l,r-l.lf_left-2)+o-1;r-=l.lf_left+l.piece.lineFeedCnt,i+=l.size_left+l.piece.length,l=l.right}return i}getPositionAt(r){r=Math.floor(r),r=Math.max(0,r);let o=this.root,i=0,l=r;for(;o!==D.SENTINEL;)if(o.size_left!==0&&o.size_left>=r)o=o.left;else if(o.size_left+o.piece.length>=r){let h=this.getIndexOf(o,r-o.size_left);if(i+=o.lf_left+h.index,h.index===0){let f=this.getOffsetAt(i+1,1),y=l-f;return new w.Position(i+1,y+1)}return new w.Position(i+1,h.remainder+1)}else if(r-=o.size_left+o.piece.length,i+=o.lf_left+o.piece.lineFeedCnt,o.right===D.SENTINEL){let h=this.getOffsetAt(i+1,1),f=l-r-h;return new w.Position(i+1,f+1)}else o=o.right;return new w.Position(1,1)}getValueInRange(r,o){if(r.startLineNumber===r.endLineNumber&&r.startColumn===r.endColumn)return"";let i=this.nodeAt2(r.startLineNumber,r.startColumn),l=this.nodeAt2(r.endLineNumber,r.endColumn),h=this.getValueInRange2(i,l);return o?o!==this._EOL||!this._EOLNormalized?h.replace(/\r\n|\r|\n/g,o):o===this.getEOL()&&this._EOLNormalized?h:h.replace(/\r\n|\r|\n/g,o):h}getValueInRange2(r,o){if(r.node===o.node){let y=r.node,_=this._buffers[y.piece.bufferIndex].buffer,b=this.offsetInBuffer(y.piece.bufferIndex,y.piece.start);return _.substring(b+r.remainder,b+o.remainder)}let i=r.node,l=this._buffers[i.piece.bufferIndex].buffer,h=this.offsetInBuffer(i.piece.bufferIndex,i.piece.start),f=l.substring(h+r.remainder,h+i.piece.length);for(i=i.next();i!==D.SENTINEL;){let y=this._buffers[i.piece.bufferIndex].buffer,_=this.offsetInBuffer(i.piece.bufferIndex,i.piece.start);if(i===o.node){f+=y.substring(_,_+o.remainder);break}else f+=y.substr(_,i.piece.length);i=i.next()}return f}getLinesContent(){let r=[],o=0,i="",l=!1;return this.iterate(this.root,h=>{if(h===D.SENTINEL)return!0;const f=h.piece;let y=f.length;if(y===0)return!0;const _=this._buffers[f.bufferIndex].buffer,b=this._buffers[f.bufferIndex].lineStarts,v=f.start.line,m=f.end.line;let E=b[v]+f.start.column;if(l&&(_.charCodeAt(E)===10&&(E++,y--),r[o++]=i,i="",l=!1,y===0))return!0;if(v===m)return!this._EOLNormalized&&_.charCodeAt(E+y-1)===13?(l=!0,i+=_.substr(E,y-1)):i+=_.substr(E,y),!0;i+=this._EOLNormalized?_.substring(E,Math.max(E,b[v+1]-this._EOLLength)):_.substring(E,b[v+1]).replace(/(\r\n|\r|\n)$/,""),r[o++]=i;for(let I=v+1;I<m;I++)i=this._EOLNormalized?_.substring(b[I],b[I+1]-this._EOLLength):_.substring(b[I],b[I+1]).replace(/(\r\n|\r|\n)$/,""),r[o++]=i;return!this._EOLNormalized&&_.charCodeAt(b[m]+f.end.column-1)===13?(l=!0,f.end.column===0?o--:i=_.substr(b[m],f.end.column-1)):i=_.substr(b[m],f.end.column),!0}),l&&(r[o++]=i,i=""),r[o++]=i,r}getLength(){return this._length}getLineCount(){return this._lineCnt}getLineContent(r){return this._lastVisitedLine.lineNumber===r?this._lastVisitedLine.value:(this._lastVisitedLine.lineNumber=r,r===this._lineCnt?this._lastVisitedLine.value=this.getLineRawContent(r):this._EOLNormalized?this._lastVisitedLine.value=this.getLineRawContent(r,this._EOLLength):this._lastVisitedLine.value=this.getLineRawContent(r).replace(/(\r\n|\r|\n)$/,""),this._lastVisitedLine.value)}_getCharCode(r){if(r.remainder===r.node.piece.length){let o=r.node.next();if(!o)return 0;let i=this._buffers[o.piece.bufferIndex],l=this.offsetInBuffer(o.piece.bufferIndex,o.piece.start);return i.buffer.charCodeAt(l)}else{let o=this._buffers[r.node.piece.bufferIndex],l=this.offsetInBuffer(r.node.piece.bufferIndex,r.node.piece.start)+r.remainder;return o.buffer.charCodeAt(l)}}getLineCharCode(r,o){let i=this.nodeAt2(r,o+1);return this._getCharCode(i)}getLineLength(r){if(r===this.getLineCount()){let o=this.getOffsetAt(r,1);return this.getLength()-o}return this.getOffsetAt(r+1,1)-this.getOffsetAt(r,1)-this._EOLLength}findMatchesInNode(r,o,i,l,h,f,y,_,b,v,m){let E=this._buffers[r.piece.bufferIndex],I=this.offsetInBuffer(r.piece.bufferIndex,r.piece.start),k=this.offsetInBuffer(r.piece.bufferIndex,h),M=this.offsetInBuffer(r.piece.bufferIndex,f),P,F={line:0,column:0},R,A;o._wordSeparators?(R=E.buffer.substring(k,M),A=O=>O+k,o.reset(0)):(R=E.buffer,A=O=>O,o.reset(k));do if(P=o.next(R),P){if(A(P.index)>=M)return v;this.positionInBuffer(r,A(P.index)-I,F);let O=this.getLineFeedCnt(r.piece.bufferIndex,h,F),L=F.line===h.line?F.column-h.column+l:F.column+1,B=L+P[0].length;if(m[v++]=(0,S.createFindMatch)(new N.Range(i+O,L,i+O,B),P,_),A(P.index)+P[0].length>=M||v>=b)return v}while(P);return v}findMatchesLineByLine(r,o,i,l){const h=[];let f=0;const y=new S.Searcher(o.wordSeparators,o.regex);let _=this.nodeAt2(r.startLineNumber,r.startColumn);if(_===null)return[];let b=this.nodeAt2(r.endLineNumber,r.endColumn);if(b===null)return[];let v=this.positionInBuffer(_.node,_.remainder),m=this.positionInBuffer(b.node,b.remainder);if(_.node===b.node)return this.findMatchesInNode(_.node,y,r.startLineNumber,r.startColumn,v,m,o,i,l,f,h),h;let E=r.startLineNumber,I=_.node;for(;I!==b.node;){let M=this.getLineFeedCnt(I.piece.bufferIndex,v,I.piece.end);if(M>=1){let F=this._buffers[I.piece.bufferIndex].lineStarts,R=this.offsetInBuffer(I.piece.bufferIndex,I.piece.start),A=F[v.line+M],O=E===r.startLineNumber?r.startColumn:1;if(f=this.findMatchesInNode(I,y,E,O,v,this.positionInBuffer(I,A-R),o,i,l,f,h),f>=l)return h;E+=M}let P=E===r.startLineNumber?r.startColumn-1:0;if(E===r.endLineNumber){const F=this.getLineContent(E).substring(P,r.endColumn-1);return f=this._findMatchesInLine(o,y,F,r.endLineNumber,P,f,h,i,l),h}if(f=this._findMatchesInLine(o,y,this.getLineContent(E).substr(P),E,P,f,h,i,l),f>=l)return h;E++,_=this.nodeAt2(E,1),I=_.node,v=this.positionInBuffer(_.node,_.remainder)}if(E===r.endLineNumber){let M=E===r.startLineNumber?r.startColumn-1:0;const P=this.getLineContent(E).substring(M,r.endColumn-1);return f=this._findMatchesInLine(o,y,P,r.endLineNumber,M,f,h,i,l),h}let k=E===r.startLineNumber?r.startColumn:1;return f=this.findMatchesInNode(b.node,y,E,k,v,m,o,i,l,f,h),h}_findMatchesInLine(r,o,i,l,h,f,y,_,b){const v=r.wordSeparators;if(!_&&r.simpleSearch){const E=r.simpleSearch,I=E.length,k=i.length;let M=-I;for(;(M=i.indexOf(E,M+I))!==-1;)if((!v||(0,S.isValidMatch)(v,i,k,M,I))&&(y[f++]=new T.FindMatch(new N.Range(l,M+1+h,l,M+1+I+h),null),f>=b))return f;return f}let m;o.reset(0);do if(m=o.next(i),m&&(y[f++]=(0,S.createFindMatch)(new N.Range(l,m.index+1+h,l,m.index+1+m[0].length+h),m,_),f>=b))return f;while(m);return f}insert(r,o,i=!1){if(this._EOLNormalized=this._EOLNormalized&&i,this._lastVisitedLine.lineNumber=0,this._lastVisitedLine.value="",this.root!==D.SENTINEL){let{node:l,remainder:h,nodeStartOffset:f}=this.nodeAt(r),y=l.piece,_=y.bufferIndex,b=this.positionInBuffer(l,h);if(l.piece.bufferIndex===0&&y.end.line===this._lastChangeBufferPos.line&&y.end.column===this._lastChangeBufferPos.column&&f+y.length===r&&o.length<e.AverageBufferSize){this.appendToNode(l,o),this.computeBufferMetadata();return}if(f===r)this.insertContentToNodeLeft(o,l),this._searchCache.validate(r);else if(f+l.piece.length>r){let v=[],m=new t(y.bufferIndex,b,y.end,this.getLineFeedCnt(y.bufferIndex,b,y.end),this.offsetInBuffer(_,y.end)-this.offsetInBuffer(_,b));if(this.shouldCheckCRLF()&&this.endWithCR(o)&&this.nodeCharCodeAt(l,h)===10){let M={line:m.start.line+1,column:0};m=new t(m.bufferIndex,M,m.end,this.getLineFeedCnt(m.bufferIndex,M,m.end),m.length-1),o+=`
`}if(this.shouldCheckCRLF()&&this.startWithLF(o))if(this.nodeCharCodeAt(l,h-1)===13){let M=this.positionInBuffer(l,h-1);this.deleteNodeTail(l,M),o="\r"+o,l.piece.length===0&&v.push(l)}else this.deleteNodeTail(l,b);else this.deleteNodeTail(l,b);let E=this.createNewPieces(o);m.length>0&&this.rbInsertRight(l,m);let I=l;for(let k=0;k<E.length;k++)I=this.rbInsertRight(I,E[k]);this.deleteNodes(v)}else this.insertContentToNodeRight(o,l)}else{let l=this.createNewPieces(o),h=this.rbInsertLeft(null,l[0]);for(let f=1;f<l.length;f++)h=this.rbInsertRight(h,l[f])}this.computeBufferMetadata()}delete(r,o){if(this._lastVisitedLine.lineNumber=0,this._lastVisitedLine.value="",o<=0||this.root===D.SENTINEL)return;let i=this.nodeAt(r),l=this.nodeAt(r+o),h=i.node,f=l.node;if(h===f){let E=this.positionInBuffer(h,i.remainder),I=this.positionInBuffer(h,l.remainder);if(i.nodeStartOffset===r){if(o===h.piece.length){let k=h.next();(0,D.rbDelete)(this,h),this.validateCRLFWithPrevNode(k),this.computeBufferMetadata();return}this.deleteNodeHead(h,I),this._searchCache.validate(r),this.validateCRLFWithPrevNode(h),this.computeBufferMetadata();return}if(i.nodeStartOffset+h.piece.length===r+o){this.deleteNodeTail(h,E),this.validateCRLFWithNextNode(h),this.computeBufferMetadata();return}this.shrinkNode(h,E,I),this.computeBufferMetadata();return}let y=[],_=this.positionInBuffer(h,i.remainder);this.deleteNodeTail(h,_),this._searchCache.validate(r),h.piece.length===0&&y.push(h);let b=this.positionInBuffer(f,l.remainder);this.deleteNodeHead(f,b),f.piece.length===0&&y.push(f);let v=h.next();for(let E=v;E!==D.SENTINEL&&E!==f;E=E.next())y.push(E);let m=h.piece.length===0?h.prev():h;this.deleteNodes(y),this.validateCRLFWithNextNode(m),this.computeBufferMetadata()}insertContentToNodeLeft(r,o){let i=[];if(this.shouldCheckCRLF()&&this.endWithCR(r)&&this.startWithLF(o)){let f=o.piece,y={line:f.start.line+1,column:0},_=new t(f.bufferIndex,y,f.end,this.getLineFeedCnt(f.bufferIndex,y,f.end),f.length-1);o.piece=_,r+=`
`,(0,D.updateTreeMetadata)(this,o,-1,-1),o.piece.length===0&&i.push(o)}let l=this.createNewPieces(r),h=this.rbInsertLeft(o,l[l.length-1]);for(let f=l.length-2;f>=0;f--)h=this.rbInsertLeft(h,l[f]);this.validateCRLFWithPrevNode(h),this.deleteNodes(i)}insertContentToNodeRight(r,o){this.adjustCarriageReturnFromNext(r,o)&&(r+=`
`);let i=this.createNewPieces(r),l=this.rbInsertRight(o,i[0]),h=l;for(let f=1;f<i.length;f++)h=this.rbInsertRight(h,i[f]);this.validateCRLFWithPrevNode(l)}positionInBuffer(r,o,i){let l=r.piece,h=r.piece.bufferIndex,f=this._buffers[h].lineStarts,_=f[l.start.line]+l.start.column+o,b=l.start.line,v=l.end.line,m=0,E=0,I=0;for(;b<=v&&(m=b+(v-b)/2|0,I=f[m],m!==v);)if(E=f[m+1],_<I)v=m-1;else if(_>=E)b=m+1;else break;return i?(i.line=m,i.column=_-I,null):{line:m,column:_-I}}getLineFeedCnt(r,o,i){if(i.column===0)return i.line-o.line;let l=this._buffers[r].lineStarts;if(i.line===l.length-1)return i.line-o.line;let h=l[i.line+1],f=l[i.line]+i.column;if(h>f+1)return i.line-o.line;let y=f-1;return this._buffers[r].buffer.charCodeAt(y)===13?i.line-o.line+1:i.line-o.line}offsetInBuffer(r,o){return this._buffers[r].lineStarts[o.line]+o.column}deleteNodes(r){for(let o=0;o<r.length;o++)(0,D.rbDelete)(this,r[o])}createNewPieces(r){if(r.length>e.AverageBufferSize){let v=[];for(;r.length>e.AverageBufferSize;){const E=r.charCodeAt(e.AverageBufferSize-1);let I;E===13||E>=55296&&E<=56319?(I=r.substring(0,e.AverageBufferSize-1),r=r.substring(e.AverageBufferSize-1)):(I=r.substring(0,e.AverageBufferSize),r=r.substring(e.AverageBufferSize));let k=n(I);v.push(new t(this._buffers.length,{line:0,column:0},{line:k.length-1,column:I.length-k[k.length-1]},k.length-1,I.length)),this._buffers.push(new s(I,k))}let m=n(r);return v.push(new t(this._buffers.length,{line:0,column:0},{line:m.length-1,column:r.length-m[m.length-1]},m.length-1,r.length)),this._buffers.push(new s(r,m)),v}let o=this._buffers[0].buffer.length;const i=n(r,!1);let l=this._lastChangeBufferPos;if(this._buffers[0].lineStarts[this._buffers[0].lineStarts.length-1]===o&&o!==0&&this.startWithLF(r)&&this.endWithCR(this._buffers[0].buffer)){this._lastChangeBufferPos={line:this._lastChangeBufferPos.line,column:this._lastChangeBufferPos.column+1},l=this._lastChangeBufferPos;for(let v=0;v<i.length;v++)i[v]+=o+1;this._buffers[0].lineStarts=this._buffers[0].lineStarts.concat(i.slice(1)),this._buffers[0].buffer+="_"+r,o+=1}else{if(o!==0)for(let v=0;v<i.length;v++)i[v]+=o;this._buffers[0].lineStarts=this._buffers[0].lineStarts.concat(i.slice(1)),this._buffers[0].buffer+=r}const h=this._buffers[0].buffer.length;let f=this._buffers[0].lineStarts.length-1,y=h-this._buffers[0].lineStarts[f],_={line:f,column:y},b=new t(0,l,_,this.getLineFeedCnt(0,l,_),h-o);return this._lastChangeBufferPos=_,[b]}getLineRawContent(r,o=0){let i=this.root,l="",h=this._searchCache.get2(r);if(h){i=h.node;let f=this.getAccumulatedValue(i,r-h.nodeStartLineNumber-1),y=this._buffers[i.piece.bufferIndex].buffer,_=this.offsetInBuffer(i.piece.bufferIndex,i.piece.start);if(h.nodeStartLineNumber+i.piece.lineFeedCnt===r)l=y.substring(_+f,_+i.piece.length);else{let b=this.getAccumulatedValue(i,r-h.nodeStartLineNumber);return y.substring(_+f,_+b-o)}}else{let f=0;const y=r;for(;i!==D.SENTINEL;)if(i.left!==D.SENTINEL&&i.lf_left>=r-1)i=i.left;else if(i.lf_left+i.piece.lineFeedCnt>r-1){let _=this.getAccumulatedValue(i,r-i.lf_left-2),b=this.getAccumulatedValue(i,r-i.lf_left-1),v=this._buffers[i.piece.bufferIndex].buffer,m=this.offsetInBuffer(i.piece.bufferIndex,i.piece.start);return f+=i.size_left,this._searchCache.set({node:i,nodeStartOffset:f,nodeStartLineNumber:y-(r-1-i.lf_left)}),v.substring(m+_,m+b-o)}else if(i.lf_left+i.piece.lineFeedCnt===r-1){let _=this.getAccumulatedValue(i,r-i.lf_left-2),b=this._buffers[i.piece.bufferIndex].buffer,v=this.offsetInBuffer(i.piece.bufferIndex,i.piece.start);l=b.substring(v+_,v+i.piece.length);break}else r-=i.lf_left+i.piece.lineFeedCnt,f+=i.size_left+i.piece.length,i=i.right}for(i=i.next();i!==D.SENTINEL;){let f=this._buffers[i.piece.bufferIndex].buffer;if(i.piece.lineFeedCnt>0){let y=this.getAccumulatedValue(i,0),_=this.offsetInBuffer(i.piece.bufferIndex,i.piece.start);return l+=f.substring(_,_+y-o),l}else{let y=this.offsetInBuffer(i.piece.bufferIndex,i.piece.start);l+=f.substr(y,i.piece.length)}i=i.next()}return l}computeBufferMetadata(){let r=this.root,o=1,i=0;for(;r!==D.SENTINEL;)o+=r.lf_left+r.piece.lineFeedCnt,i+=r.size_left+r.piece.length,r=r.right;this._lineCnt=o,this._length=i,this._searchCache.validate(this._length)}getIndexOf(r,o){let i=r.piece,l=this.positionInBuffer(r,o),h=l.line-i.start.line;if(this.offsetInBuffer(i.bufferIndex,i.end)-this.offsetInBuffer(i.bufferIndex,i.start)===o){let f=this.getLineFeedCnt(r.piece.bufferIndex,i.start,l);if(f!==h)return{index:f,remainder:0}}return{index:h,remainder:l.column}}getAccumulatedValue(r,o){if(o<0)return 0;let i=r.piece,l=this._buffers[i.bufferIndex].lineStarts,h=i.start.line+o+1;return h>i.end.line?l[i.end.line]+i.end.column-l[i.start.line]-i.start.column:l[h]-l[i.start.line]-i.start.column}deleteNodeTail(r,o){const i=r.piece,l=i.lineFeedCnt,h=this.offsetInBuffer(i.bufferIndex,i.end),f=o,y=this.offsetInBuffer(i.bufferIndex,f),_=this.getLineFeedCnt(i.bufferIndex,i.start,f),b=_-l,v=y-h,m=i.length+v;r.piece=new t(i.bufferIndex,i.start,f,_,m),(0,D.updateTreeMetadata)(this,r,v,b)}deleteNodeHead(r,o){const i=r.piece,l=i.lineFeedCnt,h=this.offsetInBuffer(i.bufferIndex,i.start),f=o,y=this.getLineFeedCnt(i.bufferIndex,f,i.end),_=this.offsetInBuffer(i.bufferIndex,f),b=y-l,v=h-_,m=i.length+v;r.piece=new t(i.bufferIndex,f,i.end,y,m),(0,D.updateTreeMetadata)(this,r,v,b)}shrinkNode(r,o,i){const l=r.piece,h=l.start,f=l.end,y=l.length,_=l.lineFeedCnt,b=o,v=this.getLineFeedCnt(l.bufferIndex,l.start,b),m=this.offsetInBuffer(l.bufferIndex,o)-this.offsetInBuffer(l.bufferIndex,h);r.piece=new t(l.bufferIndex,l.start,b,v,m),(0,D.updateTreeMetadata)(this,r,m-y,v-_);let E=new t(l.bufferIndex,i,f,this.getLineFeedCnt(l.bufferIndex,i,f),this.offsetInBuffer(l.bufferIndex,f)-this.offsetInBuffer(l.bufferIndex,i)),I=this.rbInsertRight(r,E);this.validateCRLFWithPrevNode(I)}appendToNode(r,o){this.adjustCarriageReturnFromNext(o,r)&&(o+=`
`);const i=this.shouldCheckCRLF()&&this.startWithLF(o)&&this.endWithCR(r),l=this._buffers[0].buffer.length;this._buffers[0].buffer+=o;const h=n(o,!1);for(let I=0;I<h.length;I++)h[I]+=l;if(i){let I=this._buffers[0].lineStarts[this._buffers[0].lineStarts.length-2];this._buffers[0].lineStarts.pop(),this._lastChangeBufferPos={line:this._lastChangeBufferPos.line-1,column:l-I}}this._buffers[0].lineStarts=this._buffers[0].lineStarts.concat(h.slice(1));const f=this._buffers[0].lineStarts.length-1,y=this._buffers[0].buffer.length-this._buffers[0].lineStarts[f],_={line:f,column:y},b=r.piece.length+o.length,v=r.piece.lineFeedCnt,m=this.getLineFeedCnt(0,r.piece.start,_),E=m-v;r.piece=new t(r.piece.bufferIndex,r.piece.start,_,m,b),this._lastChangeBufferPos=_,(0,D.updateTreeMetadata)(this,r,o.length,E)}nodeAt(r){let o=this.root,i=this._searchCache.get(r);if(i)return{node:i.node,nodeStartOffset:i.nodeStartOffset,remainder:r-i.nodeStartOffset};let l=0;for(;o!==D.SENTINEL;)if(o.size_left>r)o=o.left;else if(o.size_left+o.piece.length>=r){l+=o.size_left;let h={node:o,remainder:r-o.size_left,nodeStartOffset:l};return this._searchCache.set(h),h}else r-=o.size_left+o.piece.length,l+=o.size_left+o.piece.length,o=o.right;return null}nodeAt2(r,o){let i=this.root,l=0;for(;i!==D.SENTINEL;)if(i.left!==D.SENTINEL&&i.lf_left>=r-1)i=i.left;else if(i.lf_left+i.piece.lineFeedCnt>r-1){let h=this.getAccumulatedValue(i,r-i.lf_left-2),f=this.getAccumulatedValue(i,r-i.lf_left-1);return l+=i.size_left,{node:i,remainder:Math.min(h+o-1,f),nodeStartOffset:l}}else if(i.lf_left+i.piece.lineFeedCnt===r-1){let h=this.getAccumulatedValue(i,r-i.lf_left-2);if(h+o-1<=i.piece.length)return{node:i,remainder:h+o-1,nodeStartOffset:l};o-=i.piece.length-h;break}else r-=i.lf_left+i.piece.lineFeedCnt,l+=i.size_left+i.piece.length,i=i.right;for(i=i.next();i!==D.SENTINEL;){if(i.piece.lineFeedCnt>0){let h=this.getAccumulatedValue(i,0),f=this.offsetOfNode(i);return{node:i,remainder:Math.min(o-1,h),nodeStartOffset:f}}else if(i.piece.length>=o-1){let h=this.offsetOfNode(i);return{node:i,remainder:o-1,nodeStartOffset:h}}else o-=i.piece.length;i=i.next()}return null}nodeCharCodeAt(r,o){if(r.piece.lineFeedCnt<1)return-1;let i=this._buffers[r.piece.bufferIndex],l=this.offsetInBuffer(r.piece.bufferIndex,r.piece.start)+o;return i.buffer.charCodeAt(l)}offsetOfNode(r){if(!r)return 0;let o=r.size_left;for(;r!==this.root;)r.parent.right===r&&(o+=r.parent.size_left+r.parent.piece.length),r=r.parent;return o}shouldCheckCRLF(){return!(this._EOLNormalized&&this._EOL===`
`)}startWithLF(r){if(typeof r=="string")return r.charCodeAt(0)===10;if(r===D.SENTINEL||r.piece.lineFeedCnt===0)return!1;let o=r.piece,i=this._buffers[o.bufferIndex].lineStarts,l=o.start.line,h=i[l]+o.start.column;return l===i.length-1||i[l+1]>h+1?!1:this._buffers[o.bufferIndex].buffer.charCodeAt(h)===10}endWithCR(r){return typeof r=="string"?r.charCodeAt(r.length-1)===13:r===D.SENTINEL||r.piece.lineFeedCnt===0?!1:this.nodeCharCodeAt(r,r.piece.length-1)===13}validateCRLFWithPrevNode(r){if(this.shouldCheckCRLF()&&this.startWithLF(r)){let o=r.prev();this.endWithCR(o)&&this.fixCRLF(o,r)}}validateCRLFWithNextNode(r){if(this.shouldCheckCRLF()&&this.endWithCR(r)){let o=r.next();this.startWithLF(o)&&this.fixCRLF(r,o)}}fixCRLF(r,o){let i=[],l=this._buffers[r.piece.bufferIndex].lineStarts,h;r.piece.end.column===0?h={line:r.piece.end.line-1,column:l[r.piece.end.line]-l[r.piece.end.line-1]-1}:h={line:r.piece.end.line,column:r.piece.end.column-1};const f=r.piece.length-1,y=r.piece.lineFeedCnt-1;r.piece=new t(r.piece.bufferIndex,r.piece.start,h,y,f),(0,D.updateTreeMetadata)(this,r,-1,-1),r.piece.length===0&&i.push(r);let _={line:o.piece.start.line+1,column:0};const b=o.piece.length-1,v=this.getLineFeedCnt(o.piece.bufferIndex,_,o.piece.end);o.piece=new t(o.piece.bufferIndex,_,o.piece.end,v,b),(0,D.updateTreeMetadata)(this,o,-1,-1),o.piece.length===0&&i.push(o);let m=this.createNewPieces(`\r
`);this.rbInsertRight(r,m[0]);for(let E=0;E<i.length;E++)(0,D.rbDelete)(this,i[E])}adjustCarriageReturnFromNext(r,o){if(this.shouldCheckCRLF()&&this.endWithCR(r)){let i=o.next();if(this.startWithLF(i)){if(r+=`
`,i.piece.length===1)(0,D.rbDelete)(this,i);else{const l=i.piece,h={line:l.start.line+1,column:0},f=l.length-1,y=this.getLineFeedCnt(l.bufferIndex,h,l.end);i.piece=new t(l.bufferIndex,h,l.end,y,f),(0,D.updateTreeMetadata)(this,i,-1,-1)}return!0}}return!1}iterate(r,o){if(r===D.SENTINEL)return o(D.SENTINEL);let i=this.iterate(r.left,o);return i&&o(r)&&this.iterate(r.right,o)}getNodeContent(r){if(r===D.SENTINEL)return"";let o=this._buffers[r.piece.bufferIndex],i,l=r.piece,h=this.offsetInBuffer(l.bufferIndex,l.start),f=this.offsetInBuffer(l.bufferIndex,l.end);return i=o.buffer.substring(h,f),i}getPieceContent(r){let o=this._buffers[r.bufferIndex],i=this.offsetInBuffer(r.bufferIndex,r.start),l=this.offsetInBuffer(r.bufferIndex,r.end);return o.buffer.substring(i,l)}rbInsertRight(r,o){let i=new D.TreeNode(o,1);if(i.left=D.SENTINEL,i.right=D.SENTINEL,i.parent=D.SENTINEL,i.size_left=0,i.lf_left=0,this.root===D.SENTINEL)this.root=i,i.color=0;else if(r.right===D.SENTINEL)r.right=i,i.parent=r;else{let h=(0,D.leftest)(r.right);h.left=i,i.parent=h}return(0,D.fixInsert)(this,i),i}rbInsertLeft(r,o){let i=new D.TreeNode(o,1);if(i.left=D.SENTINEL,i.right=D.SENTINEL,i.parent=D.SENTINEL,i.size_left=0,i.lf_left=0,this.root===D.SENTINEL)this.root=i,i.color=0;else if(r.left===D.SENTINEL)r.left=i,i.parent=r;else{let l=(0,D.righttest)(r.left);l.right=i,i.parent=l}return(0,D.fixInsert)(this,i),i}}e.PieceTreeBase=d}),define(J[143],ee([0,1]),function(j,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getWordAtText=e.ensureValidWordDefinition=e.DEFAULT_WORD_REGEXP=e.USUAL_WORD_SEPARATORS=void 0,e.USUAL_WORD_SEPARATORS="`~!@#$%^&*()-=+[{]}\\|;:'\",.<>/?";function w(p=""){let C="(-?\\d*\\.\\d\\w*)|([^";for(const n of e.USUAL_WORD_SEPARATORS)p.indexOf(n)>=0||(C+="\\"+n);return C+="\\s]+)",new RegExp(C,"g")}e.DEFAULT_WORD_REGEXP=w();function N(p){let C=e.DEFAULT_WORD_REGEXP;if(p&&p instanceof RegExp)if(p.global)C=p;else{let n="g";p.ignoreCase&&(n+="i"),p.multiline&&(n+="m"),p.unicode&&(n+="u"),C=new RegExp(p.source,n)}return C.lastIndex=0,C}e.ensureValidWordDefinition=N;const T={maxLen:1e3,windowSize:15,timeBudget:150};function D(p,C,n,g,t=T){if(n.length>t.maxLen){let a=p-t.maxLen/2;return a<0?a=0:g+=a,n=n.substring(a,p+t.maxLen/2),D(p,C,n,g,t)}const s=Date.now(),c=p-1-g;let u=-1,d=null;for(let a=1;!(Date.now()-s>=t.timeBudget);a++){const r=c-t.windowSize*a;C.lastIndex=Math.max(0,r);const o=S(C,n,c,u);if(!o&&d||(d=o,r<=0))break;u=r}if(d){let a={word:d[0],startColumn:g+1+d.index,endColumn:g+1+d.index+d[0].length};return C.lastIndex=0,a}return null}e.getWordAtText=D;function S(p,C,n,g){let t;for(;t=p.exec(C);){const s=t.index||0;if(s<=n&&p.lastIndex>=n)return t;if(g>0&&s>g)return null}return null}}),define(J[116],ee([0,1]),function(j,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AutoClosingPairs=e.StandardAutoClosingPairConditional=e.IndentAction=void 0;var w;(function(S){S[S.None=0]="None",S[S.Indent=1]="Indent",S[S.IndentOutdent=2]="IndentOutdent",S[S.Outdent=3]="Outdent"})(w=e.IndentAction||(e.IndentAction={}));class N{constructor(p){if(this._standardAutoClosingPairConditionalBrand=void 0,this.open=p.open,this.close=p.close,this._standardTokenMask=0,Array.isArray(p.notIn))for(let C=0,n=p.notIn.length;C<n;C++)switch(p.notIn[C]){case"string":this._standardTokenMask|=2;break;case"comment":this._standardTokenMask|=1;break;case"regex":this._standardTokenMask|=4;break}}isOK(p){return(this._standardTokenMask&p)==0}}e.StandardAutoClosingPairConditional=N;class T{constructor(p){this.autoClosingPairsOpenByStart=new Map,this.autoClosingPairsOpenByEnd=new Map,this.autoClosingPairsCloseByStart=new Map,this.autoClosingPairsCloseByEnd=new Map,this.autoClosingPairsCloseSingleChar=new Map;for(const C of p)D(this.autoClosingPairsOpenByStart,C.open.charAt(0),C),D(this.autoClosingPairsOpenByEnd,C.open.charAt(C.open.length-1),C),D(this.autoClosingPairsCloseByStart,C.close.charAt(0),C),D(this.autoClosingPairsCloseByEnd,C.close.charAt(C.close.length-1),C),C.close.length===1&&C.open.length===1&&D(this.autoClosingPairsCloseSingleChar,C.close,C)}}e.AutoClosingPairs=T;function D(S,p,C){S.has(p)?S.get(p).push(C):S.set(p,[C])}}),define(J[395],ee([0,1,209,75]),function(j,e,w,N){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.score=void 0;function T(D,S,p,C){if(Array.isArray(D)){let n=0;for(const g of D){const t=T(g,S,p,C);if(t===10)return t;t>n&&(n=t)}return n}else{if(typeof D=="string")return C?D==="*"?5:D===p?10:0:0;if(D){const{language:n,pattern:g,scheme:t,hasAccessToAllModels:s}=D;if(!C&&!s)return 0;let c=0;if(t)if(t===S.scheme)c=10;else if(t==="*")c=5;else return 0;if(n)if(n===p)c=10;else if(n==="*")c=Math.max(c,5);else return 0;if(g){let u;if(typeof g=="string"?u=g:u=Object.assign(Object.assign({},g),{base:(0,N.normalize)(g.base)}),u===S.fsPath||(0,w.match)(u,S.fsPath))c=10;else return 0}return c}else return 0}}e.score=T}),define(J[396],ee([0,1,97]),function(j,e,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.computeLinks=e.LinkComputer=e.StateMachine=e.Uint8Matrix=void 0;class N{constructor(s,c,u){const d=new Uint8Array(s*c);for(let a=0,r=s*c;a<r;a++)d[a]=u;this._data=d,this.rows=s,this.cols=c}get(s,c){return this._data[s*this.cols+c]}set(s,c,u){this._data[s*this.cols+c]=u}}e.Uint8Matrix=N;class T{constructor(s){let c=0,u=0;for(let a=0,r=s.length;a<r;a++){let[o,i,l]=s[a];i>c&&(c=i),o>u&&(u=o),l>u&&(u=l)}c++,u++;let d=new N(u,c,0);for(let a=0,r=s.length;a<r;a++){let[o,i,l]=s[a];d.set(o,i,l)}this._states=d,this._maxCharCode=c}nextState(s,c){return c<0||c>=this._maxCharCode?0:this._states.get(s,c)}}e.StateMachine=T;let D=null;function S(){return D===null&&(D=new T([[1,104,2],[1,72,2],[1,102,6],[1,70,6],[2,116,3],[2,84,3],[3,116,4],[3,84,4],[4,112,5],[4,80,5],[5,115,9],[5,83,9],[5,58,10],[6,105,7],[6,73,7],[7,108,8],[7,76,8],[8,101,9],[8,69,9],[9,58,10],[10,47,11],[11,47,12]])),D}let p=null;function C(){if(p===null){p=new w.CharacterClassifier(0);const t=`     <>'"\u3001\u3002\uFF61\uFF64\uFF0C\uFF0E\uFF1A\uFF1B\u2018\u3008\u300C\u300E\u3014\uFF08\uFF3B\uFF5B\uFF62\uFF63\uFF5D\uFF3D\uFF09\u3015\u300F\u300D\u3009\u2019\uFF40\uFF5E\u2026`;for(let c=0;c<t.length;c++)p.set(t.charCodeAt(c),1);const s=".,;";for(let c=0;c<s.length;c++)p.set(s.charCodeAt(c),2)}return p}class n{static _createLink(s,c,u,d,a){let r=a-1;do{const o=c.charCodeAt(r);if(s.get(o)!==2)break;r--}while(r>d);if(d>0){const o=c.charCodeAt(d-1),i=c.charCodeAt(r);(o===40&&i===41||o===91&&i===93||o===123&&i===125)&&r--}return{range:{startLineNumber:u,startColumn:d+1,endLineNumber:u,endColumn:r+2},url:c.substring(d,r+1)}}static computeLinks(s,c=S()){const u=C();let d=[];for(let a=1,r=s.getLineCount();a<=r;a++){const o=s.getLineContent(a),i=o.length;let l=0,h=0,f=0,y=1,_=!1,b=!1,v=!1,m=!1;for(;l<i;){let E=!1;const I=o.charCodeAt(l);if(y===13){let k;switch(I){case 40:_=!0,k=0;break;case 41:k=_?0:1;break;case 91:v=!0,b=!0,k=0;break;case 93:v=!1,k=b?0:1;break;case 123:m=!0,k=0;break;case 125:k=m?0:1;break;case 39:k=f===34||f===96?0:1;break;case 34:k=f===39||f===96?0:1;break;case 96:k=f===39||f===34?0:1;break;case 42:k=f===42?1:0;break;case 124:k=f===124?1:0;break;case 32:k=v?0:1;break;default:k=u.get(I)}k===1&&(d.push(n._createLink(u,o,a,h,l)),E=!0)}else if(y===12){let k;I===91?(b=!0,k=0):k=u.get(I),k===1?E=!0:y=13}else y=c.nextState(y,I),y===0&&(E=!0);E&&(y=1,_=!1,b=!1,m=!1,h=l+1,f=I),l++}y===13&&d.push(n._createLink(u,o,a,h,i))}return d}}e.LinkComputer=n;function g(t){return!t||typeof t.getLineCount!="function"||typeof t.getLineContent!="function"?[]:n.computeLinks(t)}e.computeLinks=g}),define(J[77],ee([0,1,141]),function(j,e,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.nullTokenize2=e.nullTokenize=e.NULL_MODE_ID=e.NULL_STATE=void 0;class N{clone(){return this}equals(p){return this===p}}e.NULL_STATE=new N,e.NULL_MODE_ID="vs.editor.nullMode";function T(S,p,C,n){return new w.TokenizationResult([new w.Token(n,"",S)],C)}e.nullTokenize=T;function D(S,p,C,n){let g=new Uint32Array(2);return g[0]=n,g[1]=(S<<0|0<<8|0<<11|1<<14|2<<23)>>>0,new w.TokenizationResult2(g,C===null?e.NULL_STATE:C)}e.nullTokenize2=D}),define(J[177],ee([0,1]),function(j,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ignoreBracketsInToken=e.ScopedLineTokens=e.createScopedLineTokens=void 0;function w(D,S){let p=D.getCount(),C=D.findTokenIndexAtOffset(S),n=D.getLanguageId(C),g=C;for(;g+1<p&&D.getLanguageId(g+1)===n;)g++;let t=C;for(;t>0&&D.getLanguageId(t-1)===n;)t--;return new N(D,n,t,g+1,D.getStartOffset(t),D.getEndOffset(g))}e.createScopedLineTokens=w;class N{constructor(S,p,C,n,g,t){this._scopedLineTokensBrand=void 0,this._actual=S,this.languageId=p,this._firstTokenIndex=C,this._lastTokenIndex=n,this.firstCharOffset=g,this._lastCharOffset=t}getLineContent(){return this._actual.getLineContent().substring(this.firstCharOffset,this._lastCharOffset)}getActualLineContentBefore(S){return this._actual.getLineContent().substring(0,this.firstCharOffset+S)}getTokenCount(){return this._lastTokenIndex-this._firstTokenIndex}findTokenIndexAtOffset(S){return this._actual.findTokenIndexAtOffset(S+this.firstCharOffset)-this._firstTokenIndex}getStandardTokenType(S){return this._actual.getStandardTokenType(S+this._firstTokenIndex)}}e.ScopedLineTokens=N;function T(D){return(D&7)!=0}e.ignoreBracketsInToken=T}),define(J[397],ee([0,1,116]),function(j,e,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CharacterPairSupport=void 0;class N{constructor(S){if(S.autoClosingPairs?this._autoClosingPairs=S.autoClosingPairs.map(p=>new w.StandardAutoClosingPairConditional(p)):S.brackets?this._autoClosingPairs=S.brackets.map(p=>new w.StandardAutoClosingPairConditional({open:p[0],close:p[1]})):this._autoClosingPairs=[],S.colorizedBracketPairs?this._colorizedBracketPairs=T(S.colorizedBracketPairs.map(p=>[p[0],p[1]])):S.brackets?this._colorizedBracketPairs=T(S.brackets.map(p=>[p[0],p[1]]).filter(p=>!(p[0]==="<"&&p[1]===">"))):this._colorizedBracketPairs=[],S.__electricCharacterSupport&&S.__electricCharacterSupport.docComment){const p=S.__electricCharacterSupport.docComment;this._autoClosingPairs.push(new w.StandardAutoClosingPairConditional({open:p.open,close:p.close||""}))}this._autoCloseBefore=typeof S.autoCloseBefore=="string"?S.autoCloseBefore:N.DEFAULT_AUTOCLOSE_BEFORE_LANGUAGE_DEFINED,this._surroundingPairs=S.surroundingPairs||this._autoClosingPairs}getAutoClosingPairs(){return this._autoClosingPairs}getAutoCloseBeforeSet(){return this._autoCloseBefore}static shouldAutoClosePair(S,p,C){if(p.getTokenCount()===0)return!0;const n=p.findTokenIndexAtOffset(C-2),g=p.getStandardTokenType(n);return S.isOK(g)}getSurroundingPairs(){return this._surroundingPairs}getColorizedBrackets(){return this._colorizedBracketPairs}}e.CharacterPairSupport=N,N.DEFAULT_AUTOCLOSE_BEFORE_LANGUAGE_DEFINED=`;:.,=}])> 
    `;function T(D){return D.filter(([S,p])=>S!==""&&p!=="")}}),define(J[398],ee([0,1]),function(j,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IndentRulesSupport=void 0;function w(T){return T.global&&(T.lastIndex=0),!0}class N{constructor(D){this._indentationRules=D}shouldIncrease(D){return!!(this._indentationRules&&this._indentationRules.increaseIndentPattern&&w(this._indentationRules.increaseIndentPattern)&&this._indentationRules.increaseIndentPattern.test(D))}shouldDecrease(D){return!!(this._indentationRules&&this._indentationRules.decreaseIndentPattern&&w(this._indentationRules.decreaseIndentPattern)&&this._indentationRules.decreaseIndentPattern.test(D))}shouldIndentNextLine(D){return!!(this._indentationRules&&this._indentationRules.indentNextLinePattern&&w(this._indentationRules.indentNextLinePattern)&&this._indentationRules.indentNextLinePattern.test(D))}shouldIgnore(D){return!!(this._indentationRules&&this._indentationRules.unIndentedLinePattern&&w(this._indentationRules.unIndentedLinePattern)&&this._indentationRules.unIndentedLinePattern.test(D))}getIndentMetadata(D){let S=0;return this.shouldIncrease(D)&&(S+=1),this.shouldDecrease(D)&&(S+=2),this.shouldIndentNextLine(D)&&(S+=4),this.shouldIgnore(D)&&(S+=8),S}}e.IndentRulesSupport=N}),define(J[399],ee([0,1]),function(j,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BasicInplaceReplace=void 0;class w{constructor(){this._defaultValueSet=[["true","false"],["True","False"],["Private","Public","Friend","ReadOnly","Partial","Protected","WriteOnly"],["public","protected","private"]]}navigateValueSet(T,D,S,p,C){if(T&&D){let n=this.doNavigateValueSet(D,C);if(n)return{range:T,value:n}}if(S&&p){let n=this.doNavigateValueSet(p,C);if(n)return{range:S,value:n}}return null}doNavigateValueSet(T,D){let S=this.numberReplace(T,D);return S!==null?S:this.textReplace(T,D)}numberReplace(T,D){let S=Math.pow(10,T.length-(T.lastIndexOf(".")+1)),p=Number(T),C=parseFloat(T);return!isNaN(p)&&!isNaN(C)&&p===C?p===0&&!D?null:(p=Math.floor(p*S),p+=D?S:-S,String(p/S)):null}textReplace(T,D){return this.valueSetsReplace(this._defaultValueSet,T,D)}valueSetsReplace(T,D,S){let p=null;for(let C=0,n=T.length;p===null&&C<n;C++)p=this.valueSetReplace(T[C],D,S);return p}valueSetReplace(T,D,S){let p=T.indexOf(D);return p>=0?(p+=S?1:-1,p<0?p=T.length-1:p%=T.length,T[p]):null}}e.BasicInplaceReplace=w,w.INSTANCE=new w}),define(J[400],ee([0,1,11,8,116]),function(j,e,w,N,T){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.OnEnterSupport=void 0;class D{constructor(p){p=p||{},p.brackets=p.brackets||[["(",")"],["{","}"],["[","]"]],this._brackets=[],p.brackets.forEach(C=>{const n=D._createOpenBracketRegExp(C[0]),g=D._createCloseBracketRegExp(C[1]);n&&g&&this._brackets.push({open:C[0],openRegExp:n,close:C[1],closeRegExp:g})}),this._regExpRules=p.onEnterRules||[]}onEnter(p,C,n,g){if(p>=3)for(let t=0,s=this._regExpRules.length;t<s;t++){let c=this._regExpRules[t];if([{reg:c.beforeText,text:n},{reg:c.afterText,text:g},{reg:c.previousLineText,text:C}].every(d=>d.reg?(d.reg.lastIndex=0,d.reg.test(d.text)):!0))return c.action}if(p>=2&&n.length>0&&g.length>0)for(let t=0,s=this._brackets.length;t<s;t++){let c=this._brackets[t];if(c.openRegExp.test(n)&&c.closeRegExp.test(g))return{indentAction:T.IndentAction.IndentOutdent}}if(p>=2&&n.length>0){for(let t=0,s=this._brackets.length;t<s;t++)if(this._brackets[t].openRegExp.test(n))return{indentAction:T.IndentAction.Indent}}return null}static _createOpenBracketRegExp(p){let C=N.escapeRegExpCharacters(p);return/\B/.test(C.charAt(0))||(C="\\b"+C),C+="\\s*$",D._safeRegExp(C)}static _createCloseBracketRegExp(p){let C=N.escapeRegExpCharacters(p);return/\B/.test(C.charAt(C.length-1))||(C=C+"\\b"),C="^\\s*"+C,D._safeRegExp(C)}static _safeRegExp(p){try{return new RegExp(p)}catch(C){return(0,w.onUnexpectedError)(C),null}}}e.OnEnterSupport=D}),define(J[178],ee([0,1,8,84,3]),function(j,e,w,N,T){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BracketsUtils=e.RichEditBrackets=e.RichEditBracket=void 0;class D{constructor(l,h,f,y,_,b){this._richEditBracketBrand=void 0,this.languageId=l,this.index=h,this.open=f,this.close=y,this.forwardRegex=_,this.reversedRegex=b,this._openSet=D._toSet(this.open),this._closeSet=D._toSet(this.close)}isOpen(l){return this._openSet.has(l)}isClose(l){return this._closeSet.has(l)}static _toSet(l){const h=new Set;for(const f of l)h.add(f);return h}}e.RichEditBracket=D;function S(i){const l=i.length;i=i.map(b=>[b[0].toLowerCase(),b[1].toLowerCase()]);const h=[];for(let b=0;b<l;b++)h[b]=b;const f=(b,v)=>{const[m,E]=b,[I,k]=v;return m===I||m===k||E===I||E===k},y=(b,v)=>{const m=Math.min(b,v),E=Math.max(b,v);for(let I=0;I<l;I++)h[I]===E&&(h[I]=m)};for(let b=0;b<l;b++){const v=i[b];for(let m=b+1;m<l;m++){const E=i[m];f(v,E)&&y(h[b],h[m])}}const _=[];for(let b=0;b<l;b++){let v=[],m=[];for(let E=0;E<l;E++)if(h[E]===b){const[I,k]=i[E];v.push(I),m.push(k)}v.length>0&&_.push({open:v,close:m})}return _}class p{constructor(l,h){this._richEditBracketsBrand=void 0;const f=S(h);this.brackets=f.map((y,_)=>new D(l,_,y.open,y.close,t(y.open,y.close,f,_),s(y.open,y.close,f,_))),this.forwardRegex=c(this.brackets),this.reversedRegex=u(this.brackets),this.textIsBracket={},this.textIsOpenBracket={},this.maxBracketLength=0;for(const y of this.brackets){for(const _ of y.open)this.textIsBracket[_]=y,this.textIsOpenBracket[_]=!0,this.maxBracketLength=Math.max(this.maxBracketLength,_.length);for(const _ of y.close)this.textIsBracket[_]=y,this.textIsOpenBracket[_]=!1,this.maxBracketLength=Math.max(this.maxBracketLength,_.length)}}}e.RichEditBrackets=p;function C(i,l,h,f){for(let y=0,_=l.length;y<_;y++){if(y===h)continue;const b=l[y];for(const v of b.open)v.indexOf(i)>=0&&f.push(v);for(const v of b.close)v.indexOf(i)>=0&&f.push(v)}}function n(i,l){return i.length-l.length}function g(i){if(i.length<=1)return i;const l=[],h=new Set;for(const f of i)h.has(f)||(l.push(f),h.add(f));return l}function t(i,l,h,f){let y=[];y=y.concat(i),y=y.concat(l);for(let _=0,b=y.length;_<b;_++)C(y[_],h,f,y);return y=g(y),y.sort(n),y.reverse(),a(y)}function s(i,l,h,f){let y=[];y=y.concat(i),y=y.concat(l);for(let _=0,b=y.length;_<b;_++)C(y[_],h,f,y);return y=g(y),y.sort(n),y.reverse(),a(y.map(r))}function c(i){let l=[];for(const h of i){for(const f of h.open)l.push(f);for(const f of h.close)l.push(f)}return l=g(l),a(l)}function u(i){let l=[];for(const h of i){for(const f of h.open)l.push(f);for(const f of h.close)l.push(f)}return l=g(l),a(l.map(r))}function d(i){const l=/^[\w ]+$/.test(i);return i=w.escapeRegExpCharacters(i),l?`\\b${i}\\b`:i}function a(i){let l=`(${i.map(d).join(")|(")})`;return w.createRegExp(l,!0)}const r=function(){function i(f){if(N.hasTextDecoder){const y=new Uint16Array(f.length);let _=0;for(let b=f.length-1;b>=0;b--)y[_++]=f.charCodeAt(b);return N.getPlatformTextDecoder().decode(y)}else{let y=[],_=0;for(let b=f.length-1;b>=0;b--)y[_++]=f.charAt(b);return y.join("")}}let l=null,h=null;return function(y){return l!==y&&(l=y,h=i(l)),h}}();class o{static _findPrevBracketInText(l,h,f,y){let _=f.match(l);if(!_)return null;let b=f.length-(_.index||0),v=_[0].length,m=y+b;return new T.Range(h,m-v+1,h,m+1)}static findPrevBracketInRange(l,h,f,y,_){const v=r(f).substring(f.length-_,f.length-y);return this._findPrevBracketInText(l,h,v,y)}static findNextBracketInText(l,h,f,y){let _=f.match(l);if(!_)return null;let b=_.index||0,v=_[0].length;if(v===0)return null;let m=y+b;return new T.Range(h,m+1,h,m+1+v)}static findNextBracketInRange(l,h,f,y,_){const b=f.substring(y,_);return this.findNextBracketInText(l,h,b,y)}}e.BracketsUtils=o}),define(J[401],ee([0,1,177,178]),function(j,e,w,N){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BracketElectricCharacterSupport=void 0;class T{constructor(S){this._richEditBrackets=S}getElectricCharacters(){let S=[];if(this._richEditBrackets)for(const p of this._richEditBrackets.brackets)for(const C of p.close){const n=C.charAt(C.length-1);S.push(n)}return S=S.filter((p,C,n)=>n.indexOf(p)===C),S}onElectricCharacter(S,p,C){if(!this._richEditBrackets||this._richEditBrackets.brackets.length===0)return null;const n=p.findTokenIndexAtOffset(C-1);if((0,w.ignoreBracketsInToken)(p.getStandardTokenType(n)))return null;const g=this._richEditBrackets.reversedRegex,t=p.getLineContent().substring(0,C-1)+S,s=N.BracketsUtils.findPrevBracketInRange(g,1,t,0,t.length);if(!s)return null;const c=t.substring(s.startColumn-1,s.endColumn-1).toLowerCase();if(this._richEditBrackets.textIsOpenBracket[c])return null;const d=p.getActualLineContentBefore(s.startColumn-1);return/^\s*$/.test(d)?{matchOpenBracket:c}:null}}e.BracketElectricCharacterSupport=T}),define(J[402],ee([0,1,29]),function(j,e,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.generateTokensCSSForColorMap=e.ThemeTrieElement=e.ThemeTrieElementRule=e.strcmp=e.toStandardTokenType=e.TokenTheme=e.ColorMap=e.parseTokenTheme=e.ParsedTokenThemeRule=void 0;class N{constructor(a,r,o,i,l){this._parsedThemeRuleBrand=void 0,this.token=a,this.index=r,this.fontStyle=o,this.foreground=i,this.background=l}}e.ParsedTokenThemeRule=N;function T(d){if(!d||!Array.isArray(d))return[];let a=[],r=0;for(let o=0,i=d.length;o<i;o++){let l=d[o],h=-1;if(typeof l.fontStyle=="string"){h=0;let _=l.fontStyle.split(" ");for(let b=0,v=_.length;b<v;b++)switch(_[b]){case"italic":h=h|1;break;case"bold":h=h|2;break;case"underline":h=h|4;break}}let f=null;typeof l.foreground=="string"&&(f=l.foreground);let y=null;typeof l.background=="string"&&(y=l.background),a[r++]=new N(l.token||"",o,h,f,y)}return a}e.parseTokenTheme=T;function D(d,a){d.sort((b,v)=>{let m=t(b.token,v.token);return m!==0?m:b.index-v.index});let r=0,o="000000",i="ffffff";for(;d.length>=1&&d[0].token==="";){let b=d.shift();b.fontStyle!==-1&&(r=b.fontStyle),b.foreground!==null&&(o=b.foreground),b.background!==null&&(i=b.background)}let l=new p;for(let b of a)l.getId(b);let h=l.getId(o),f=l.getId(i),y=new s(r,h,f),_=new c(y);for(let b=0,v=d.length;b<v;b++){let m=d[b];_.insert(m.token,m.fontStyle,l.getId(m.foreground),l.getId(m.background))}return new C(l,_)}const S=/^#?([0-9A-Fa-f]{6})([0-9A-Fa-f]{2})?$/;class p{constructor(){this._lastColorId=0,this._id2color=[],this._color2id=new Map}getId(a){if(a===null)return 0;const r=a.match(S);if(!r)throw new Error("Illegal value for token color: "+a);a=r[1].toUpperCase();let o=this._color2id.get(a);return o||(o=++this._lastColorId,this._color2id.set(a,o),this._id2color[o]=w.Color.fromHex("#"+a),o)}getColorMap(){return this._id2color.slice(0)}}e.ColorMap=p;class C{constructor(a,r){this._colorMap=a,this._root=r,this._cache=new Map}static createFromRawTokenTheme(a,r){return this.createFromParsedTokenTheme(T(a),r)}static createFromParsedTokenTheme(a,r){return D(a,r)}getColorMap(){return this._colorMap.getColorMap()}_match(a){return this._root.match(a)}match(a,r){let o=this._cache.get(r);if(typeof o=="undefined"){let i=this._match(r),l=g(r);o=(i.metadata|l<<8)>>>0,this._cache.set(r,o)}return(o|a<<0)>>>0}}e.TokenTheme=C;const n=/\b(comment|string|regex|regexp)\b/;function g(d){let a=d.match(n);if(!a)return 0;switch(a[1]){case"comment":return 1;case"string":return 2;case"regex":return 4;case"regexp":return 4}throw new Error("Unexpected match for standard token type!")}e.toStandardTokenType=g;function t(d,a){return d<a?-1:d>a?1:0}e.strcmp=t;class s{constructor(a,r,o){this._themeTrieElementRuleBrand=void 0,this._fontStyle=a,this._foreground=r,this._background=o,this.metadata=(this._fontStyle<<11|this._foreground<<14|this._background<<23)>>>0}clone(){return new s(this._fontStyle,this._foreground,this._background)}acceptOverwrite(a,r,o){a!==-1&&(this._fontStyle=a),r!==0&&(this._foreground=r),o!==0&&(this._background=o),this.metadata=(this._fontStyle<<11|this._foreground<<14|this._background<<23)>>>0}}e.ThemeTrieElementRule=s;class c{constructor(a){this._themeTrieElementBrand=void 0,this._mainRule=a,this._children=new Map}match(a){if(a==="")return this._mainRule;let r=a.indexOf("."),o,i;r===-1?(o=a,i=""):(o=a.substring(0,r),i=a.substring(r+1));let l=this._children.get(o);return typeof l!="undefined"?l.match(i):this._mainRule}insert(a,r,o,i){if(a===""){this._mainRule.acceptOverwrite(r,o,i);return}let l=a.indexOf("."),h,f;l===-1?(h=a,f=""):(h=a.substring(0,l),f=a.substring(l+1));let y=this._children.get(h);typeof y=="undefined"&&(y=new c(this._mainRule.clone()),this._children.set(h,y)),y.insert(f,r,o,i)}}e.ThemeTrieElement=c;function u(d){let a=[];for(let r=1,o=d.length;r<o;r++){let i=d[r];a[r]=`.mtk${r} { color: ${i}; }`}return a.push(".mtki { font-style: italic; }"),a.push(".mtkb { font-weight: bold; }"),a.push(".mtku { text-decoration: underline; text-underline-position: under; }"),a.join(`
`)}e.generateTokensCSSForColorMap=u}),define(J[403],ee([0,1,4,2]),function(j,e,w,N){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TokenizationRegistryImpl=void 0;class T{constructor(){this._map=new Map,this._promises=new Map,this._onDidChange=new w.Emitter,this.onDidChange=this._onDidChange.event,this._colorMap=null}fire(S){this._onDidChange.fire({changedLanguages:S,changedColorMap:!1})}register(S,p){return this._map.set(S,p),this.fire([S]),(0,N.toDisposable)(()=>{this._map.get(S)===p&&(this._map.delete(S),this.fire([S]))})}registerPromise(S,p){let C=null,n=!1;return this._promises.set(S,p.then(g=>{this._promises.delete(S),!(n||!g)&&(C=this.register(S,g))})),(0,N.toDisposable)(()=>{n=!0,C&&C.dispose()})}getPromise(S){const p=this.get(S);if(p)return Promise.resolve(p);const C=this._promises.get(S);return C?C.then(n=>this.get(S)):null}get(S){return this._map.get(S)||null}setColorMap(S){this._colorMap=S,this._onDidChange.fire({changedLanguages:Array.from(this._map.keys()),changedColorMap:!0})}getColorMap(){return this._colorMap}getDefaultBackground(){return this._colorMap&&this._colorMap.length>2?this._colorMap[2]:null}}e.TokenizationRegistryImpl=T}),define(J[404],ee([0,1,105,17]),function(j,e,w,N){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.encodeSemanticTokensDto=void 0;function T(C){for(let n=0,g=C.length;n<g;n+=4){const t=C[n+0],s=C[n+1],c=C[n+2],u=C[n+3];C[n+0]=u,C[n+1]=c,C[n+2]=s,C[n+3]=t}}function D(C){const n=new Uint8Array(C.buffer,C.byteOffset,C.length*4);return N.isLittleEndian()||T(n),w.VSBuffer.wrap(n)}function S(C){const n=new Uint32Array(p(C));let g=0;if(n[g++]=C.id,C.type==="full")n[g++]=1,n[g++]=C.data.length,n.set(C.data,g),g+=C.data.length;else{n[g++]=2,n[g++]=C.deltas.length;for(const t of C.deltas)n[g++]=t.start,n[g++]=t.deleteCount,t.data?(n[g++]=t.data.length,n.set(t.data,g),g+=t.data.length):n[g++]=0}return D(n)}e.encodeSemanticTokensDto=S;function p(C){let n=0;if(n+=1+1,C.type==="full")n+=1+C.data.length;else{n+=1,n+=(1+1+1)*C.deltas.length;for(const g of C.deltas)g.data&&(n+=g.data.length)}return n}}),define(J[179],ee([0,1]),function(j,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.WrappingIndent=e.TrackedRangeStickiness=e.TextEditorCursorStyle=e.TextEditorCursorBlinkingStyle=e.SymbolTag=e.SymbolKind=e.SignatureHelpTriggerKind=e.SelectionDirection=e.ScrollbarVisibility=e.ScrollType=e.RenderMinimap=e.RenderLineNumbersType=e.OverviewRulerLane=e.OverlayWidgetPositionPreference=e.MouseTargetType=e.MinimapPosition=e.MarkerTag=e.MarkerSeverity=e.KeyCode=e.InlineCompletionTriggerKind=e.InlayHintKind=e.IndentAction=e.EndOfLineSequence=e.EndOfLinePreference=e.EditorOption=e.EditorAutoIndentStrategy=e.DocumentHighlightKind=e.DefaultEndOfLine=e.CursorChangeReason=e.ContentWidgetPositionPreference=e.CompletionTriggerKind=e.CompletionItemTag=e.CompletionItemKind=e.CompletionItemInsertTextRule=e.AccessibilitySupport=void 0;var w;(function(L){L[L.Unknown=0]="Unknown",L[L.Disabled=1]="Disabled",L[L.Enabled=2]="Enabled"})(w=e.AccessibilitySupport||(e.AccessibilitySupport={}));var N;(function(L){L[L.KeepWhitespace=1]="KeepWhitespace",L[L.InsertAsSnippet=4]="InsertAsSnippet"})(N=e.CompletionItemInsertTextRule||(e.CompletionItemInsertTextRule={}));var T;(function(L){L[L.Method=0]="Method",L[L.Function=1]="Function",L[L.Constructor=2]="Constructor",L[L.Field=3]="Field",L[L.Variable=4]="Variable",L[L.Class=5]="Class",L[L.Struct=6]="Struct",L[L.Interface=7]="Interface",L[L.Module=8]="Module",L[L.Property=9]="Property",L[L.Event=10]="Event",L[L.Operator=11]="Operator",L[L.Unit=12]="Unit",L[L.Value=13]="Value",L[L.Constant=14]="Constant",L[L.Enum=15]="Enum",L[L.EnumMember=16]="EnumMember",L[L.Keyword=17]="Keyword",L[L.Text=18]="Text",L[L.Color=19]="Color",L[L.File=20]="File",L[L.Reference=21]="Reference",L[L.Customcolor=22]="Customcolor",L[L.Folder=23]="Folder",L[L.TypeParameter=24]="TypeParameter",L[L.User=25]="User",L[L.Issue=26]="Issue",L[L.Snippet=27]="Snippet"})(T=e.CompletionItemKind||(e.CompletionItemKind={}));var D;(function(L){L[L.Deprecated=1]="Deprecated"})(D=e.CompletionItemTag||(e.CompletionItemTag={}));var S;(function(L){L[L.Invoke=0]="Invoke",L[L.TriggerCharacter=1]="TriggerCharacter",L[L.TriggerForIncompleteCompletions=2]="TriggerForIncompleteCompletions"})(S=e.CompletionTriggerKind||(e.CompletionTriggerKind={}));var p;(function(L){L[L.EXACT=0]="EXACT",L[L.ABOVE=1]="ABOVE",L[L.BELOW=2]="BELOW"})(p=e.ContentWidgetPositionPreference||(e.ContentWidgetPositionPreference={}));var C;(function(L){L[L.NotSet=0]="NotSet",L[L.ContentFlush=1]="ContentFlush",L[L.RecoverFromMarkers=2]="RecoverFromMarkers",L[L.Explicit=3]="Explicit",L[L.Paste=4]="Paste",L[L.Undo=5]="Undo",L[L.Redo=6]="Redo"})(C=e.CursorChangeReason||(e.CursorChangeReason={}));var n;(function(L){L[L.LF=1]="LF",L[L.CRLF=2]="CRLF"})(n=e.DefaultEndOfLine||(e.DefaultEndOfLine={}));var g;(function(L){L[L.Text=0]="Text",L[L.Read=1]="Read",L[L.Write=2]="Write"})(g=e.DocumentHighlightKind||(e.DocumentHighlightKind={}));var t;(function(L){L[L.None=0]="None",L[L.Keep=1]="Keep",L[L.Brackets=2]="Brackets",L[L.Advanced=3]="Advanced",L[L.Full=4]="Full"})(t=e.EditorAutoIndentStrategy||(e.EditorAutoIndentStrategy={}));var s;(function(L){L[L.acceptSuggestionOnCommitCharacter=0]="acceptSuggestionOnCommitCharacter",L[L.acceptSuggestionOnEnter=1]="acceptSuggestionOnEnter",L[L.accessibilitySupport=2]="accessibilitySupport",L[L.accessibilityPageSize=3]="accessibilityPageSize",L[L.ariaLabel=4]="ariaLabel",L[L.autoClosingBrackets=5]="autoClosingBrackets",L[L.autoClosingDelete=6]="autoClosingDelete",L[L.autoClosingOvertype=7]="autoClosingOvertype",L[L.autoClosingQuotes=8]="autoClosingQuotes",L[L.autoIndent=9]="autoIndent",L[L.automaticLayout=10]="automaticLayout",L[L.autoSurround=11]="autoSurround",L[L.bracketPairColorization=12]="bracketPairColorization",L[L.guides=13]="guides",L[L.codeLens=14]="codeLens",L[L.codeLensFontFamily=15]="codeLensFontFamily",L[L.codeLensFontSize=16]="codeLensFontSize",L[L.colorDecorators=17]="colorDecorators",L[L.columnSelection=18]="columnSelection",L[L.comments=19]="comments",L[L.contextmenu=20]="contextmenu",L[L.copyWithSyntaxHighlighting=21]="copyWithSyntaxHighlighting",L[L.cursorBlinking=22]="cursorBlinking",L[L.cursorSmoothCaretAnimation=23]="cursorSmoothCaretAnimation",L[L.cursorStyle=24]="cursorStyle",L[L.cursorSurroundingLines=25]="cursorSurroundingLines",L[L.cursorSurroundingLinesStyle=26]="cursorSurroundingLinesStyle",L[L.cursorWidth=27]="cursorWidth",L[L.disableLayerHinting=28]="disableLayerHinting",L[L.disableMonospaceOptimizations=29]="disableMonospaceOptimizations",L[L.domReadOnly=30]="domReadOnly",L[L.dragAndDrop=31]="dragAndDrop",L[L.emptySelectionClipboard=32]="emptySelectionClipboard",L[L.extraEditorClassName=33]="extraEditorClassName",L[L.fastScrollSensitivity=34]="fastScrollSensitivity",L[L.find=35]="find",L[L.fixedOverflowWidgets=36]="fixedOverflowWidgets",L[L.folding=37]="folding",L[L.foldingStrategy=38]="foldingStrategy",L[L.foldingHighlight=39]="foldingHighlight",L[L.foldingImportsByDefault=40]="foldingImportsByDefault",L[L.unfoldOnClickAfterEndOfLine=41]="unfoldOnClickAfterEndOfLine",L[L.fontFamily=42]="fontFamily",L[L.fontInfo=43]="fontInfo",L[L.fontLigatures=44]="fontLigatures",L[L.fontSize=45]="fontSize",L[L.fontWeight=46]="fontWeight",L[L.formatOnPaste=47]="formatOnPaste",L[L.formatOnType=48]="formatOnType",L[L.glyphMargin=49]="glyphMargin",L[L.gotoLocation=50]="gotoLocation",L[L.hideCursorInOverviewRuler=51]="hideCursorInOverviewRuler",L[L.hover=52]="hover",L[L.inDiffEditor=53]="inDiffEditor",L[L.inlineSuggest=54]="inlineSuggest",L[L.letterSpacing=55]="letterSpacing",L[L.lightbulb=56]="lightbulb",L[L.lineDecorationsWidth=57]="lineDecorationsWidth",L[L.lineHeight=58]="lineHeight",L[L.lineNumbers=59]="lineNumbers",L[L.lineNumbersMinChars=60]="lineNumbersMinChars",L[L.linkedEditing=61]="linkedEditing",L[L.links=62]="links",L[L.matchBrackets=63]="matchBrackets",L[L.minimap=64]="minimap",L[L.mouseStyle=65]="mouseStyle",L[L.mouseWheelScrollSensitivity=66]="mouseWheelScrollSensitivity",L[L.mouseWheelZoom=67]="mouseWheelZoom",L[L.multiCursorMergeOverlapping=68]="multiCursorMergeOverlapping",L[L.multiCursorModifier=69]="multiCursorModifier",L[L.multiCursorPaste=70]="multiCursorPaste",L[L.occurrencesHighlight=71]="occurrencesHighlight",L[L.overviewRulerBorder=72]="overviewRulerBorder",L[L.overviewRulerLanes=73]="overviewRulerLanes",L[L.padding=74]="padding",L[L.parameterHints=75]="parameterHints",L[L.peekWidgetDefaultFocus=76]="peekWidgetDefaultFocus",L[L.definitionLinkOpensInPeek=77]="definitionLinkOpensInPeek",L[L.quickSuggestions=78]="quickSuggestions",L[L.quickSuggestionsDelay=79]="quickSuggestionsDelay",L[L.readOnly=80]="readOnly",L[L.renameOnType=81]="renameOnType",L[L.renderControlCharacters=82]="renderControlCharacters",L[L.renderFinalNewline=83]="renderFinalNewline",L[L.renderLineHighlight=84]="renderLineHighlight",L[L.renderLineHighlightOnlyWhenFocus=85]="renderLineHighlightOnlyWhenFocus",L[L.renderValidationDecorations=86]="renderValidationDecorations",L[L.renderWhitespace=87]="renderWhitespace",L[L.revealHorizontalRightPadding=88]="revealHorizontalRightPadding",L[L.roundedSelection=89]="roundedSelection",L[L.rulers=90]="rulers",L[L.scrollbar=91]="scrollbar",L[L.scrollBeyondLastColumn=92]="scrollBeyondLastColumn",L[L.scrollBeyondLastLine=93]="scrollBeyondLastLine",L[L.scrollPredominantAxis=94]="scrollPredominantAxis",L[L.selectionClipboard=95]="selectionClipboard",L[L.selectionHighlight=96]="selectionHighlight",L[L.selectOnLineNumbers=97]="selectOnLineNumbers",L[L.showFoldingControls=98]="showFoldingControls",L[L.showUnused=99]="showUnused",L[L.snippetSuggestions=100]="snippetSuggestions",L[L.smartSelect=101]="smartSelect",L[L.smoothScrolling=102]="smoothScrolling",L[L.stickyTabStops=103]="stickyTabStops",L[L.stopRenderingLineAfter=104]="stopRenderingLineAfter",L[L.suggest=105]="suggest",L[L.suggestFontSize=106]="suggestFontSize",L[L.suggestLineHeight=107]="suggestLineHeight",L[L.suggestOnTriggerCharacters=108]="suggestOnTriggerCharacters",L[L.suggestSelection=109]="suggestSelection",L[L.tabCompletion=110]="tabCompletion",L[L.tabIndex=111]="tabIndex",L[L.unusualLineTerminators=112]="unusualLineTerminators",L[L.useShadowDOM=113]="useShadowDOM",L[L.useTabStops=114]="useTabStops",L[L.wordSeparators=115]="wordSeparators",L[L.wordWrap=116]="wordWrap",L[L.wordWrapBreakAfterCharacters=117]="wordWrapBreakAfterCharacters",L[L.wordWrapBreakBeforeCharacters=118]="wordWrapBreakBeforeCharacters",L[L.wordWrapColumn=119]="wordWrapColumn",L[L.wordWrapOverride1=120]="wordWrapOverride1",L[L.wordWrapOverride2=121]="wordWrapOverride2",L[L.wrappingIndent=122]="wrappingIndent",L[L.wrappingStrategy=123]="wrappingStrategy",L[L.showDeprecated=124]="showDeprecated",L[L.inlayHints=125]="inlayHints",L[L.editorClassName=126]="editorClassName",L[L.pixelRatio=127]="pixelRatio",L[L.tabFocusMode=128]="tabFocusMode",L[L.layoutInfo=129]="layoutInfo",L[L.wrappingInfo=130]="wrappingInfo"})(s=e.EditorOption||(e.EditorOption={}));var c;(function(L){L[L.TextDefined=0]="TextDefined",L[L.LF=1]="LF",L[L.CRLF=2]="CRLF"})(c=e.EndOfLinePreference||(e.EndOfLinePreference={}));var u;(function(L){L[L.LF=0]="LF",L[L.CRLF=1]="CRLF"})(u=e.EndOfLineSequence||(e.EndOfLineSequence={}));var d;(function(L){L[L.None=0]="None",L[L.Indent=1]="Indent",L[L.IndentOutdent=2]="IndentOutdent",L[L.Outdent=3]="Outdent"})(d=e.IndentAction||(e.IndentAction={}));var a;(function(L){L[L.Other=0]="Other",L[L.Type=1]="Type",L[L.Parameter=2]="Parameter"})(a=e.InlayHintKind||(e.InlayHintKind={}));var r;(function(L){L[L.Automatic=0]="Automatic",L[L.Explicit=1]="Explicit"})(r=e.InlineCompletionTriggerKind||(e.InlineCompletionTriggerKind={}));var o;(function(L){L[L.DependsOnKbLayout=-1]="DependsOnKbLayout",L[L.Unknown=0]="Unknown",L[L.Backspace=1]="Backspace",L[L.Tab=2]="Tab",L[L.Enter=3]="Enter",L[L.Shift=4]="Shift",L[L.Ctrl=5]="Ctrl",L[L.Alt=6]="Alt",L[L.PauseBreak=7]="PauseBreak",L[L.CapsLock=8]="CapsLock",L[L.Escape=9]="Escape",L[L.Space=10]="Space",L[L.PageUp=11]="PageUp",L[L.PageDown=12]="PageDown",L[L.End=13]="End",L[L.Home=14]="Home",L[L.LeftArrow=15]="LeftArrow",L[L.UpArrow=16]="UpArrow",L[L.RightArrow=17]="RightArrow",L[L.DownArrow=18]="DownArrow",L[L.Insert=19]="Insert",L[L.Delete=20]="Delete",L[L.Digit0=21]="Digit0",L[L.Digit1=22]="Digit1",L[L.Digit2=23]="Digit2",L[L.Digit3=24]="Digit3",L[L.Digit4=25]="Digit4",L[L.Digit5=26]="Digit5",L[L.Digit6=27]="Digit6",L[L.Digit7=28]="Digit7",L[L.Digit8=29]="Digit8",L[L.Digit9=30]="Digit9",L[L.KeyA=31]="KeyA",L[L.KeyB=32]="KeyB",L[L.KeyC=33]="KeyC",L[L.KeyD=34]="KeyD",L[L.KeyE=35]="KeyE",L[L.KeyF=36]="KeyF",L[L.KeyG=37]="KeyG",L[L.KeyH=38]="KeyH",L[L.KeyI=39]="KeyI",L[L.KeyJ=40]="KeyJ",L[L.KeyK=41]="KeyK",L[L.KeyL=42]="KeyL",L[L.KeyM=43]="KeyM",L[L.KeyN=44]="KeyN",L[L.KeyO=45]="KeyO",L[L.KeyP=46]="KeyP",L[L.KeyQ=47]="KeyQ",L[L.KeyR=48]="KeyR",L[L.KeyS=49]="KeyS",L[L.KeyT=50]="KeyT",L[L.KeyU=51]="KeyU",L[L.KeyV=52]="KeyV",L[L.KeyW=53]="KeyW",L[L.KeyX=54]="KeyX",L[L.KeyY=55]="KeyY",L[L.KeyZ=56]="KeyZ",L[L.Meta=57]="Meta",L[L.ContextMenu=58]="ContextMenu",L[L.F1=59]="F1",L[L.F2=60]="F2",L[L.F3=61]="F3",L[L.F4=62]="F4",L[L.F5=63]="F5",L[L.F6=64]="F6",L[L.F7=65]="F7",L[L.F8=66]="F8",L[L.F9=67]="F9",L[L.F10=68]="F10",L[L.F11=69]="F11",L[L.F12=70]="F12",L[L.F13=71]="F13",L[L.F14=72]="F14",L[L.F15=73]="F15",L[L.F16=74]="F16",L[L.F17=75]="F17",L[L.F18=76]="F18",L[L.F19=77]="F19",L[L.NumLock=78]="NumLock",L[L.ScrollLock=79]="ScrollLock",L[L.Semicolon=80]="Semicolon",L[L.Equal=81]="Equal",L[L.Comma=82]="Comma",L[L.Minus=83]="Minus",L[L.Period=84]="Period",L[L.Slash=85]="Slash",L[L.Backquote=86]="Backquote",L[L.BracketLeft=87]="BracketLeft",L[L.Backslash=88]="Backslash",L[L.BracketRight=89]="BracketRight",L[L.Quote=90]="Quote",L[L.OEM_8=91]="OEM_8",L[L.IntlBackslash=92]="IntlBackslash",L[L.Numpad0=93]="Numpad0",L[L.Numpad1=94]="Numpad1",L[L.Numpad2=95]="Numpad2",L[L.Numpad3=96]="Numpad3",L[L.Numpad4=97]="Numpad4",L[L.Numpad5=98]="Numpad5",L[L.Numpad6=99]="Numpad6",L[L.Numpad7=100]="Numpad7",L[L.Numpad8=101]="Numpad8",L[L.Numpad9=102]="Numpad9",L[L.NumpadMultiply=103]="NumpadMultiply",L[L.NumpadAdd=104]="NumpadAdd",L[L.NUMPAD_SEPARATOR=105]="NUMPAD_SEPARATOR",L[L.NumpadSubtract=106]="NumpadSubtract",L[L.NumpadDecimal=107]="NumpadDecimal",L[L.NumpadDivide=108]="NumpadDivide",L[L.KEY_IN_COMPOSITION=109]="KEY_IN_COMPOSITION",L[L.ABNT_C1=110]="ABNT_C1",L[L.ABNT_C2=111]="ABNT_C2",L[L.AudioVolumeMute=112]="AudioVolumeMute",L[L.AudioVolumeUp=113]="AudioVolumeUp",L[L.AudioVolumeDown=114]="AudioVolumeDown",L[L.BrowserSearch=115]="BrowserSearch",L[L.BrowserHome=116]="BrowserHome",L[L.BrowserBack=117]="BrowserBack",L[L.BrowserForward=118]="BrowserForward",L[L.MediaTrackNext=119]="MediaTrackNext",L[L.MediaTrackPrevious=120]="MediaTrackPrevious",L[L.MediaStop=121]="MediaStop",L[L.MediaPlayPause=122]="MediaPlayPause",L[L.LaunchMediaPlayer=123]="LaunchMediaPlayer",L[L.LaunchMail=124]="LaunchMail",L[L.LaunchApp2=125]="LaunchApp2",L[L.MAX_VALUE=126]="MAX_VALUE"})(o=e.KeyCode||(e.KeyCode={}));var i;(function(L){L[L.Hint=1]="Hint",L[L.Info=2]="Info",L[L.Warning=4]="Warning",L[L.Error=8]="Error"})(i=e.MarkerSeverity||(e.MarkerSeverity={}));var l;(function(L){L[L.Unnecessary=1]="Unnecessary",L[L.Deprecated=2]="Deprecated"})(l=e.MarkerTag||(e.MarkerTag={}));var h;(function(L){L[L.Inline=1]="Inline",L[L.Gutter=2]="Gutter"})(h=e.MinimapPosition||(e.MinimapPosition={}));var f;(function(L){L[L.UNKNOWN=0]="UNKNOWN",L[L.TEXTAREA=1]="TEXTAREA",L[L.GUTTER_GLYPH_MARGIN=2]="GUTTER_GLYPH_MARGIN",L[L.GUTTER_LINE_NUMBERS=3]="GUTTER_LINE_NUMBERS",L[L.GUTTER_LINE_DECORATIONS=4]="GUTTER_LINE_DECORATIONS",L[L.GUTTER_VIEW_ZONE=5]="GUTTER_VIEW_ZONE",L[L.CONTENT_TEXT=6]="CONTENT_TEXT",L[L.CONTENT_EMPTY=7]="CONTENT_EMPTY",L[L.CONTENT_VIEW_ZONE=8]="CONTENT_VIEW_ZONE",L[L.CONTENT_WIDGET=9]="CONTENT_WIDGET",L[L.OVERVIEW_RULER=10]="OVERVIEW_RULER",L[L.SCROLLBAR=11]="SCROLLBAR",L[L.OVERLAY_WIDGET=12]="OVERLAY_WIDGET",L[L.OUTSIDE_EDITOR=13]="OUTSIDE_EDITOR"})(f=e.MouseTargetType||(e.MouseTargetType={}));var y;(function(L){L[L.TOP_RIGHT_CORNER=0]="TOP_RIGHT_CORNER",L[L.BOTTOM_RIGHT_CORNER=1]="BOTTOM_RIGHT_CORNER",L[L.TOP_CENTER=2]="TOP_CENTER"})(y=e.OverlayWidgetPositionPreference||(e.OverlayWidgetPositionPreference={}));var _;(function(L){L[L.Left=1]="Left",L[L.Center=2]="Center",L[L.Right=4]="Right",L[L.Full=7]="Full"})(_=e.OverviewRulerLane||(e.OverviewRulerLane={}));var b;(function(L){L[L.Off=0]="Off",L[L.On=1]="On",L[L.Relative=2]="Relative",L[L.Interval=3]="Interval",L[L.Custom=4]="Custom"})(b=e.RenderLineNumbersType||(e.RenderLineNumbersType={}));var v;(function(L){L[L.None=0]="None",L[L.Text=1]="Text",L[L.Blocks=2]="Blocks"})(v=e.RenderMinimap||(e.RenderMinimap={}));var m;(function(L){L[L.Smooth=0]="Smooth",L[L.Immediate=1]="Immediate"})(m=e.ScrollType||(e.ScrollType={}));var E;(function(L){L[L.Auto=1]="Auto",L[L.Hidden=2]="Hidden",L[L.Visible=3]="Visible"})(E=e.ScrollbarVisibility||(e.ScrollbarVisibility={}));var I;(function(L){L[L.LTR=0]="LTR",L[L.RTL=1]="RTL"})(I=e.SelectionDirection||(e.SelectionDirection={}));var k;(function(L){L[L.Invoke=1]="Invoke",L[L.TriggerCharacter=2]="TriggerCharacter",L[L.ContentChange=3]="ContentChange"})(k=e.SignatureHelpTriggerKind||(e.SignatureHelpTriggerKind={}));var M;(function(L){L[L.File=0]="File",L[L.Module=1]="Module",L[L.Namespace=2]="Namespace",L[L.Package=3]="Package",L[L.Class=4]="Class",L[L.Method=5]="Method",L[L.Property=6]="Property",L[L.Field=7]="Field",L[L.Constructor=8]="Constructor",L[L.Enum=9]="Enum",L[L.Interface=10]="Interface",L[L.Function=11]="Function",L[L.Variable=12]="Variable",L[L.Constant=13]="Constant",L[L.String=14]="String",L[L.Number=15]="Number",L[L.Boolean=16]="Boolean",L[L.Array=17]="Array",L[L.Object=18]="Object",L[L.Key=19]="Key",L[L.Null=20]="Null",L[L.EnumMember=21]="EnumMember",L[L.Struct=22]="Struct",L[L.Event=23]="Event",L[L.Operator=24]="Operator",L[L.TypeParameter=25]="TypeParameter"})(M=e.SymbolKind||(e.SymbolKind={}));var P;(function(L){L[L.Deprecated=1]="Deprecated"})(P=e.SymbolTag||(e.SymbolTag={}));var F;(function(L){L[L.Hidden=0]="Hidden",L[L.Blink=1]="Blink",L[L.Smooth=2]="Smooth",L[L.Phase=3]="Phase",L[L.Expand=4]="Expand",L[L.Solid=5]="Solid"})(F=e.TextEditorCursorBlinkingStyle||(e.TextEditorCursorBlinkingStyle={}));var R;(function(L){L[L.Line=1]="Line",L[L.Block=2]="Block",L[L.Underline=3]="Underline",L[L.LineThin=4]="LineThin",L[L.BlockOutline=5]="BlockOutline",L[L.UnderlineThin=6]="UnderlineThin"})(R=e.TextEditorCursorStyle||(e.TextEditorCursorStyle={}));var A;(function(L){L[L.AlwaysGrowsWhenTypingAtEdges=0]="AlwaysGrowsWhenTypingAtEdges",L[L.NeverGrowsWhenTypingAtEdges=1]="NeverGrowsWhenTypingAtEdges",L[L.GrowsOnlyWhenTypingBefore=2]="GrowsOnlyWhenTypingBefore",L[L.GrowsOnlyWhenTypingAfter=3]="GrowsOnlyWhenTypingAfter"})(A=e.TrackedRangeStickiness||(e.TrackedRangeStickiness={}));var O;(function(L){L[L.None=0]="None",L[L.Same=1]="Same",L[L.Indent=2]="Indent",L[L.DeepIndent=3]="DeepIndent"})(O=e.WrappingIndent||(e.WrappingIndent={}))}),define(J[232],ee([0,1,23,4,55,24,13,3,22,141,179]),function(j,e,w,N,T,D,S,p,C,n,g){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.createMonacoBaseAPI=e.KeyMod=void 0;class t{static chord(u,d){return(0,T.KeyChord)(u,d)}}e.KeyMod=t,t.CtrlCmd=2048,t.Shift=1024,t.Alt=512,t.WinCtrl=256;function s(){return{editor:void 0,languages:void 0,CancellationTokenSource:w.CancellationTokenSource,Emitter:N.Emitter,KeyCode:g.KeyCode,KeyMod:t,Position:S.Position,Range:p.Range,Selection:C.Selection,SelectionDirection:g.SelectionDirection,MarkerSeverity:g.MarkerSeverity,MarkerTag:g.MarkerTag,Uri:D.URI,Token:n.Token}}e.createMonacoBaseAPI=s}),define(J[233],ee([0,1]),function(j,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.OverviewZoneManager=e.OverviewRulerZone=e.ColorZone=void 0;class w{constructor(S,p,C){this._colorZoneBrand=void 0,this.from=S|0,this.to=p|0,this.colorId=C|0}static compare(S,p){return S.colorId===p.colorId?S.from===p.from?S.to-p.to:S.from-p.from:S.colorId-p.colorId}}e.ColorZone=w;class N{constructor(S,p,C){this._overviewRulerZoneBrand=void 0,this.startLineNumber=S,this.endLineNumber=p,this.color=C,this._colorZone=null}static compare(S,p){return S.color===p.color?S.startLineNumber===p.startLineNumber?S.endLineNumber-p.endLineNumber:S.startLineNumber-p.startLineNumber:S.color<p.color?-1:1}setColorZone(S){this._colorZone=S}getColorZones(){return this._colorZone}}e.OverviewRulerZone=N;class T{constructor(S){this._getVerticalOffsetForLine=S,this._zones=[],this._colorZonesInvalid=!1,this._lineHeight=0,this._domWidth=0,this._domHeight=0,this._outerHeight=0,this._pixelRatio=1,this._lastAssignedId=0,this._color2Id=Object.create(null),this._id2Color=[]}getId2Color(){return this._id2Color}setZones(S){this._zones=S,this._zones.sort(N.compare)}setLineHeight(S){return this._lineHeight===S?!1:(this._lineHeight=S,this._colorZonesInvalid=!0,!0)}setPixelRatio(S){this._pixelRatio=S,this._colorZonesInvalid=!0}getDOMWidth(){return this._domWidth}getCanvasWidth(){return this._domWidth*this._pixelRatio}setDOMWidth(S){return this._domWidth===S?!1:(this._domWidth=S,this._colorZonesInvalid=!0,!0)}getDOMHeight(){return this._domHeight}getCanvasHeight(){return this._domHeight*this._pixelRatio}setDOMHeight(S){return this._domHeight===S?!1:(this._domHeight=S,this._colorZonesInvalid=!0,!0)}getOuterHeight(){return this._outerHeight}setOuterHeight(S){return this._outerHeight===S?!1:(this._outerHeight=S,this._colorZonesInvalid=!0,!0)}resolveColorZones(){const S=this._colorZonesInvalid,p=Math.floor(this._lineHeight),C=Math.floor(this.getCanvasHeight()),n=Math.floor(this._outerHeight),g=C/n,t=Math.floor(4*this._pixelRatio/2);let s=[];for(let c=0,u=this._zones.length;c<u;c++){const d=this._zones[c];if(!S){const y=d.getColorZones();if(y){s.push(y);continue}}const a=Math.floor(g*this._getVerticalOffsetForLine(d.startLineNumber)),r=Math.floor(g*(this._getVerticalOffsetForLine(d.endLineNumber)+p));let o=Math.floor((a+r)/2),i=r-o;i<t&&(i=t),o-i<0&&(o=i),o+i>C&&(o=C-i);const l=d.color;let h=this._color2Id[l];h||(h=++this._lastAssignedId,this._color2Id[l]=h,this._id2Color[h]=l);const f=new w(o-i,o+i,h);d.setColorZone(f),s.push(f)}return this._colorZonesInvalid=!1,s.sort(w.compare),s}}e.OverviewZoneManager=T}),define(J[117],ee([0,1]),function(j,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.VisibleRanges=e.HorizontalPosition=e.FloatHorizontalRange=e.HorizontalRange=e.LineVisibleRanges=e.RenderingContext=e.RestrictedRenderingContext=void 0;class w{constructor(g,t){this._restrictedRenderingContextBrand=void 0,this._viewLayout=g,this.viewportData=t,this.scrollWidth=this._viewLayout.getScrollWidth(),this.scrollHeight=this._viewLayout.getScrollHeight(),this.visibleRange=this.viewportData.visibleRange,this.bigNumbersDelta=this.viewportData.bigNumbersDelta;const s=this._viewLayout.getCurrentViewport();this.scrollTop=s.top,this.scrollLeft=s.left,this.viewportWidth=s.width,this.viewportHeight=s.height}getScrolledTopFromAbsoluteTop(g){return g-this.scrollTop}getVerticalOffsetForLineNumber(g){return this._viewLayout.getVerticalOffsetForLineNumber(g)}getDecorationsInViewport(){return this.viewportData.getDecorationsInViewport()}}e.RestrictedRenderingContext=w;class N extends w{constructor(g,t,s){super(g,t);this._renderingContextBrand=void 0,this._viewLines=s}linesVisibleRangesForRange(g,t){return this._viewLines.linesVisibleRangesForRange(g,t)}visibleRangeForPosition(g){return this._viewLines.visibleRangeForPosition(g)}}e.RenderingContext=N;class T{constructor(g,t,s){this.outsideRenderedLine=g,this.lineNumber=t,this.ranges=s}}e.LineVisibleRanges=T;class D{constructor(g,t){this._horizontalRangeBrand=void 0,this.left=Math.round(g),this.width=Math.round(t)}static from(g){const t=new Array(g.length);for(let s=0,c=g.length;s<c;s++){const u=g[s];t[s]=new D(u.left,u.width)}return t}toString(){return`[${this.left},${this.width}]`}}e.HorizontalRange=D;class S{constructor(g,t){this._floatHorizontalRangeBrand=void 0,this.left=g,this.width=t}toString(){return`[${this.left},${this.width}]`}static compare(g,t){return g.left-t.left}}e.FloatHorizontalRange=S;class p{constructor(g,t){this.outsideRenderedLine=g,this.originalLeft=t,this.left=Math.round(this.originalLeft)}}e.HorizontalPosition=p;class C{constructor(g,t){this.outsideRenderedLine=g,this.ranges=t}}e.VisibleRanges=C}),define(J[405],ee([0,1,117]),function(j,e,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.RangeUtil=void 0;class N{static _createRange(){return this._handyReadyRange||(this._handyReadyRange=document.createRange()),this._handyReadyRange}static _detachRange(D,S){D.selectNodeContents(S)}static _readClientRects(D,S,p,C,n){const g=this._createRange();try{return g.setStart(D,S),g.setEnd(p,C),g.getClientRects()}catch(t){return null}finally{this._detachRange(g,n)}}static _mergeAdjacentRanges(D){if(D.length===1)return D;D.sort(w.FloatHorizontalRange.compare);let S=[],p=0,C=D[0];for(let n=1,g=D.length;n<g;n++){const t=D[n];C.left+C.width+.9>=t.left?C.width=Math.max(C.width,t.left+t.width-C.left):(S[p++]=C,C=t)}return S[p++]=C,S}static _createHorizontalRangesFromClientRects(D,S){if(!D||D.length===0)return null;const p=[];for(let C=0,n=D.length;C<n;C++){const g=D[C];p[C]=new w.FloatHorizontalRange(Math.max(0,g.left-S),g.width)}return this._mergeAdjacentRanges(p)}static readHorizontalRanges(D,S,p,C,n,g,t){const s=0,c=D.children.length-1;if(s>c)return null;if(S=Math.min(c,Math.max(s,S)),C=Math.min(c,Math.max(s,C)),S===C&&p===n&&p===0&&!D.children[S].firstChild){const r=D.children[S].getClientRects();return this._createHorizontalRangesFromClientRects(r,g)}S!==C&&C>0&&n===0&&(C--,n=1073741824);let u=D.children[S].firstChild,d=D.children[C].firstChild;if((!u||!d)&&(!u&&p===0&&S>0&&(u=D.children[S-1].firstChild,p=1073741824),!d&&n===0&&C>0&&(d=D.children[C-1].firstChild,n=1073741824)),!u||!d)return null;p=Math.min(u.textContent.length,Math.max(0,p)),n=Math.min(d.textContent.length,Math.max(0,n));const a=this._readClientRects(u,p,d,n,t);return this._createHorizontalRangesFromClientRects(a,g)}}e.RangeUtil=N}),define(J[406],ee([0,1]),function(j,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ViewContext=e.EditorTheme=void 0;class w{constructor(D){this._theme=D}get type(){return this._theme.type}update(D){this._theme=D}getColor(D){return this._theme.getColor(D)}}e.EditorTheme=w;class N{constructor(D,S,p){this.configuration=D,this.theme=new w(S),this.model=p,this.viewLayout=p.viewLayout}addEventHandler(D){this.model.addViewEventHandler(D)}removeEventHandler(D){this.model.removeViewEventHandler(D)}}e.ViewContext=N}),define(J[180],ee([0,1]),function(j,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ViewZonesChangedEvent=e.ViewTokensColorsChangedEvent=e.ViewTokensChangedEvent=e.ViewThemeChangedEvent=e.ViewScrollChangedEvent=e.ViewRevealRangeRequestEvent=e.ViewLinesInsertedEvent=e.ViewLinesDeletedEvent=e.ViewLinesChangedEvent=e.ViewLineMappingChangedEvent=e.ViewLanguageConfigurationEvent=e.ViewFocusChangedEvent=e.ViewFlushedEvent=e.ViewDecorationsChangedEvent=e.ViewCursorStateChangedEvent=e.ViewConfigurationChangedEvent=e.ViewCompositionEndEvent=e.ViewCompositionStartEvent=void 0;class w{constructor(){this.type=0}}e.ViewCompositionStartEvent=w;class N{constructor(){this.type=1}}e.ViewCompositionEndEvent=N;class T{constructor(h){this.type=2,this._source=h}hasChanged(h){return this._source.hasChanged(h)}}e.ViewConfigurationChangedEvent=T;class D{constructor(h,f){this.type=3,this.selections=h,this.modelSelections=f}}e.ViewCursorStateChangedEvent=D;class S{constructor(h){this.type=4,h?(this.affectsMinimap=h.affectsMinimap,this.affectsOverviewRuler=h.affectsOverviewRuler):(this.affectsMinimap=!0,this.affectsOverviewRuler=!0)}}e.ViewDecorationsChangedEvent=S;class p{constructor(){this.type=5}}e.ViewFlushedEvent=p;class C{constructor(h){this.type=6,this.isFocused=h}}e.ViewFocusChangedEvent=C;class n{constructor(){this.type=7}}e.ViewLanguageConfigurationEvent=n;class g{constructor(){this.type=8}}e.ViewLineMappingChangedEvent=g;class t{constructor(h,f){this.type=9,this.fromLineNumber=h,this.toLineNumber=f}}e.ViewLinesChangedEvent=t;class s{constructor(h,f){this.type=10,this.fromLineNumber=h,this.toLineNumber=f}}e.ViewLinesDeletedEvent=s;class c{constructor(h,f){this.type=11,this.fromLineNumber=h,this.toLineNumber=f}}e.ViewLinesInsertedEvent=c;class u{constructor(h,f,y,_,b,v){this.type=12,this.source=h,this.range=f,this.selections=y,this.verticalType=_,this.revealHorizontal=b,this.scrollType=v}}e.ViewRevealRangeRequestEvent=u;class d{constructor(h){this.type=13,this.scrollWidth=h.scrollWidth,this.scrollLeft=h.scrollLeft,this.scrollHeight=h.scrollHeight,this.scrollTop=h.scrollTop,this.scrollWidthChanged=h.scrollWidthChanged,this.scrollLeftChanged=h.scrollLeftChanged,this.scrollHeightChanged=h.scrollHeightChanged,this.scrollTopChanged=h.scrollTopChanged}}e.ViewScrollChangedEvent=d;class a{constructor(){this.type=14}}e.ViewThemeChangedEvent=a;class r{constructor(h){this.type=15,this.ranges=h}}e.ViewTokensChangedEvent=r;class o{constructor(){this.type=16}}e.ViewTokensColorsChangedEvent=o;class i{constructor(){this.type=17}}e.ViewZonesChangedEvent=i}),define(J[144],ee([0,1,8]),function(j,e,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LineDecorationsNormalizer=e.DecorationSegment=e.LineDecoration=void 0;class N{constructor(C,n,g,t){this.startColumn=C,this.endColumn=n,this.className=g,this.type=t,this._lineDecorationBrand=void 0}static _equals(C,n){return C.startColumn===n.startColumn&&C.endColumn===n.endColumn&&C.className===n.className&&C.type===n.type}static equalsArr(C,n){const g=C.length,t=n.length;if(g!==t)return!1;for(let s=0;s<g;s++)if(!N._equals(C[s],n[s]))return!1;return!0}static extractWrapped(C,n,g){if(C.length===0)return C;const t=n+1,s=g+1,c=g-n,u=[];let d=0;for(const a of C)a.endColumn<=t||a.startColumn>=s||(u[d++]=new N(Math.max(1,a.startColumn-t+1),Math.min(c+1,a.endColumn-t+1),a.className,a.type));return u}static filter(C,n,g,t){if(C.length===0)return[];let s=[],c=0;for(let u=0,d=C.length;u<d;u++){const a=C[u],r=a.range;if(r.endLineNumber<n||r.startLineNumber>n||r.isEmpty()&&(a.type===0||a.type===3))continue;const o=r.startLineNumber===n?r.startColumn:g,i=r.endLineNumber===n?r.endColumn:t;s[c++]=new N(o,i,a.inlineClassName,a.type)}return s}static _typeCompare(C,n){const g=[2,0,1,3];return g[C]-g[n]}static compare(C,n){if(C.startColumn!==n.startColumn)return C.startColumn-n.startColumn;if(C.endColumn!==n.endColumn)return C.endColumn-n.endColumn;const g=N._typeCompare(C.type,n.type);return g!==0?g:C.className!==n.className?C.className<n.className?-1:1:0}}e.LineDecoration=N;class T{constructor(C,n,g,t){this.startOffset=C,this.endOffset=n,this.className=g,this.metadata=t}}e.DecorationSegment=T;class D{constructor(){this.stopOffsets=[],this.classNames=[],this.metadata=[],this.count=0}static _metadata(C){let n=0;for(let g=0,t=C.length;g<t;g++)n|=C[g];return n}consumeLowerThan(C,n,g){for(;this.count>0&&this.stopOffsets[0]<C;){let t=0;for(;t+1<this.count&&this.stopOffsets[t]===this.stopOffsets[t+1];)t++;g.push(new T(n,this.stopOffsets[t],this.classNames.join(" "),D._metadata(this.metadata))),n=this.stopOffsets[t]+1,this.stopOffsets.splice(0,t+1),this.classNames.splice(0,t+1),this.metadata.splice(0,t+1),this.count-=t+1}return this.count>0&&n<C&&(g.push(new T(n,C-1,this.classNames.join(" "),D._metadata(this.metadata))),n=C),n}insert(C,n,g){if(this.count===0||this.stopOffsets[this.count-1]<=C)this.stopOffsets.push(C),this.classNames.push(n),this.metadata.push(g);else for(let t=0;t<this.count;t++)if(this.stopOffsets[t]>=C){this.stopOffsets.splice(t,0,C),this.classNames.splice(t,0,n),this.metadata.splice(t,0,g);break}this.count++}}class S{static normalize(C,n){if(n.length===0)return[];let g=[];const t=new D;let s=0;for(let c=0,u=n.length;c<u;c++){const d=n[c];let a=d.startColumn,r=d.endColumn;const o=d.className,i=d.type===1?2:d.type===2?4:0;if(a>1){const f=C.charCodeAt(a-2);w.isHighSurrogate(f)&&a--}if(r>1){const f=C.charCodeAt(r-2);w.isHighSurrogate(f)&&r--}const l=a-1,h=r-2;s=t.consumeLowerThan(l,s,g),t.count===0&&(s=l),t.insert(h,o,i)}return t.consumeLowerThan(1073741824,s,g),g}}e.LineDecorationsNormalizer=S}),define(J[407],ee([0,1,8]),function(j,e,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LinesLayout=e.EditorWhitespace=void 0;class N{constructor(){this._hasPending=!1,this._inserts=[],this._changes=[],this._removes=[]}insert(p){this._hasPending=!0,this._inserts.push(p)}change(p){this._hasPending=!0,this._changes.push(p)}remove(p){this._hasPending=!0,this._removes.push(p)}mustCommit(){return this._hasPending}commit(p){if(!this._hasPending)return;const C=this._inserts,n=this._changes,g=this._removes;this._hasPending=!1,this._inserts=[],this._changes=[],this._removes=[],p._commitPendingChanges(C,n,g)}}class T{constructor(p,C,n,g,t){this.id=p,this.afterLineNumber=C,this.ordinal=n,this.height=g,this.minWidth=t,this.prefixSum=0}}e.EditorWhitespace=T;class D{constructor(p,C,n,g){this._instanceId=w.singleLetterHash(++D.INSTANCE_COUNT),this._pendingChanges=new N,this._lastWhitespaceId=0,this._arr=[],this._prefixSumValidIndex=-1,this._minWidth=-1,this._lineCount=p,this._lineHeight=C,this._paddingTop=n,this._paddingBottom=g}static findInsertionIndex(p,C,n){let g=0,t=p.length;for(;g<t;){const s=g+t>>>1;C===p[s].afterLineNumber?n<p[s].ordinal?t=s:g=s+1:C<p[s].afterLineNumber?t=s:g=s+1}return g}setLineHeight(p){this._checkPendingChanges(),this._lineHeight=p}setPadding(p,C){this._paddingTop=p,this._paddingBottom=C}onFlushed(p){this._checkPendingChanges(),this._lineCount=p}changeWhitespace(p){let C=!1;try{p({insertWhitespace:(g,t,s,c)=>{C=!0,g=g|0,t=t|0,s=s|0,c=c|0;const u=this._instanceId+ ++this._lastWhitespaceId;return this._pendingChanges.insert(new T(u,g,t,s,c)),u},changeOneWhitespace:(g,t,s)=>{C=!0,t=t|0,s=s|0,this._pendingChanges.change({id:g,newAfterLineNumber:t,newHeight:s})},removeWhitespace:g=>{C=!0,this._pendingChanges.remove({id:g})}})}finally{this._pendingChanges.commit(this)}return C}_commitPendingChanges(p,C,n){if((p.length>0||n.length>0)&&(this._minWidth=-1),p.length+C.length+n.length<=1){for(const u of p)this._insertWhitespace(u);for(const u of C)this._changeOneWhitespace(u.id,u.newAfterLineNumber,u.newHeight);for(const u of n){const d=this._findWhitespaceIndex(u.id);d!==-1&&this._removeWhitespace(d)}return}const g=new Set;for(const u of n)g.add(u.id);const t=new Map;for(const u of C)t.set(u.id,u);const s=u=>{let d=[];for(const a of u)if(!g.has(a.id)){if(t.has(a.id)){const r=t.get(a.id);a.afterLineNumber=r.newAfterLineNumber,a.height=r.newHeight}d.push(a)}return d},c=s(this._arr).concat(s(p));c.sort((u,d)=>u.afterLineNumber===d.afterLineNumber?u.ordinal-d.ordinal:u.afterLineNumber-d.afterLineNumber),this._arr=c,this._prefixSumValidIndex=-1}_checkPendingChanges(){this._pendingChanges.mustCommit()&&this._pendingChanges.commit(this)}_insertWhitespace(p){const C=D.findInsertionIndex(this._arr,p.afterLineNumber,p.ordinal);this._arr.splice(C,0,p),this._prefixSumValidIndex=Math.min(this._prefixSumValidIndex,C-1)}_findWhitespaceIndex(p){const C=this._arr;for(let n=0,g=C.length;n<g;n++)if(C[n].id===p)return n;return-1}_changeOneWhitespace(p,C,n){const g=this._findWhitespaceIndex(p);if(g!==-1&&(this._arr[g].height!==n&&(this._arr[g].height=n,this._prefixSumValidIndex=Math.min(this._prefixSumValidIndex,g-1)),this._arr[g].afterLineNumber!==C)){const t=this._arr[g];this._removeWhitespace(g),t.afterLineNumber=C,this._insertWhitespace(t)}}_removeWhitespace(p){this._arr.splice(p,1),this._prefixSumValidIndex=Math.min(this._prefixSumValidIndex,p-1)}onLinesDeleted(p,C){this._checkPendingChanges(),p=p|0,C=C|0,this._lineCount-=C-p+1;for(let n=0,g=this._arr.length;n<g;n++){const t=this._arr[n].afterLineNumber;p<=t&&t<=C?this._arr[n].afterLineNumber=p-1:t>C&&(this._arr[n].afterLineNumber-=C-p+1)}}onLinesInserted(p,C){this._checkPendingChanges(),p=p|0,C=C|0,this._lineCount+=C-p+1;for(let n=0,g=this._arr.length;n<g;n++){const t=this._arr[n].afterLineNumber;p<=t&&(this._arr[n].afterLineNumber+=C-p+1)}}getWhitespacesTotalHeight(){return this._checkPendingChanges(),this._arr.length===0?0:this.getWhitespacesAccumulatedHeight(this._arr.length-1)}getWhitespacesAccumulatedHeight(p){this._checkPendingChanges(),p=p|0;let C=Math.max(0,this._prefixSumValidIndex+1);C===0&&(this._arr[0].prefixSum=this._arr[0].height,C++);for(let n=C;n<=p;n++)this._arr[n].prefixSum=this._arr[n-1].prefixSum+this._arr[n].height;return this._prefixSumValidIndex=Math.max(this._prefixSumValidIndex,p),this._arr[p].prefixSum}getLinesTotalHeight(){this._checkPendingChanges();const p=this._lineHeight*this._lineCount,C=this.getWhitespacesTotalHeight();return p+C+this._paddingTop+this._paddingBottom}getWhitespaceAccumulatedHeightBeforeLineNumber(p){this._checkPendingChanges(),p=p|0;const C=this._findLastWhitespaceBeforeLineNumber(p);return C===-1?0:this.getWhitespacesAccumulatedHeight(C)}_findLastWhitespaceBeforeLineNumber(p){p=p|0;const C=this._arr;let n=0,g=C.length-1;for(;n<=g;){const s=(g-n|0)/2|0,c=n+s|0;if(C[c].afterLineNumber<p){if(c+1>=C.length||C[c+1].afterLineNumber>=p)return c;n=c+1|0}else g=c-1|0}return-1}_findFirstWhitespaceAfterLineNumber(p){p=p|0;const n=this._findLastWhitespaceBeforeLineNumber(p)+1;return n<this._arr.length?n:-1}getFirstWhitespaceIndexAfterLineNumber(p){return this._checkPendingChanges(),p=p|0,this._findFirstWhitespaceAfterLineNumber(p)}getVerticalOffsetForLineNumber(p){this._checkPendingChanges(),p=p|0;let C;p>1?C=this._lineHeight*(p-1):C=0;const n=this.getWhitespaceAccumulatedHeightBeforeLineNumber(p);return C+n+this._paddingTop}getWhitespaceMinWidth(){if(this._checkPendingChanges(),this._minWidth===-1){let p=0;for(let C=0,n=this._arr.length;C<n;C++)p=Math.max(p,this._arr[C].minWidth);this._minWidth=p}return this._minWidth}isAfterLines(p){this._checkPendingChanges();const C=this.getLinesTotalHeight();return p>C}isInTopPadding(p){return this._paddingTop===0?!1:(this._checkPendingChanges(),p<this._paddingTop)}isInBottomPadding(p){if(this._paddingBottom===0)return!1;this._checkPendingChanges();const C=this.getLinesTotalHeight();return p>=C-this._paddingBottom}getLineNumberAtOrAfterVerticalOffset(p){if(this._checkPendingChanges(),p=p|0,p<0)return 1;const C=this._lineCount|0,n=this._lineHeight;let g=1,t=C;for(;g<t;){const s=(g+t)/2|0,c=this.getVerticalOffsetForLineNumber(s)|0;if(p>=c+n)g=s+1;else{if(p>=c)return s;t=s}}return g>C?C:g}getLinesViewportData(p,C){this._checkPendingChanges(),p=p|0,C=C|0;const n=this._lineHeight,g=this.getLineNumberAtOrAfterVerticalOffset(p)|0,t=this.getVerticalOffsetForLineNumber(g)|0;let s=this._lineCount|0,c=this.getFirstWhitespaceIndexAfterLineNumber(g)|0;const u=this.getWhitespacesCount()|0;let d,a;c===-1?(c=u,a=s+1,d=0):(a=this.getAfterLineNumberForWhitespaceIndex(c)|0,d=this.getHeightForWhitespaceIndex(c)|0);let r=t,o=r;const i=5e5;let l=0;t>=i&&(l=Math.floor(t/i)*i,l=Math.floor(l/n)*n,o-=l);const h=[],f=p+(C-p)/2;let y=-1;for(let m=g;m<=s;m++){if(y===-1){const E=r,I=r+n;(E<=f&&f<I||E>f)&&(y=m)}for(r+=n,h[m-g]=o,o+=n;a===m;)o+=d,r+=d,c++,c>=u?a=s+1:(a=this.getAfterLineNumberForWhitespaceIndex(c)|0,d=this.getHeightForWhitespaceIndex(c)|0);if(r>=C){s=m;break}}y===-1&&(y=s);const _=this.getVerticalOffsetForLineNumber(s)|0;let b=g,v=s;return b<v&&t<p&&b++,b<v&&_+n>C&&v--,{bigNumbersDelta:l,startLineNumber:g,endLineNumber:s,relativeVerticalOffset:h,centeredLineNumber:y,completelyVisibleStartLineNumber:b,completelyVisibleEndLineNumber:v}}getVerticalOffsetForWhitespaceIndex(p){this._checkPendingChanges(),p=p|0;const C=this.getAfterLineNumberForWhitespaceIndex(p);let n;C>=1?n=this._lineHeight*C:n=0;let g;return p>0?g=this.getWhitespacesAccumulatedHeight(p-1):g=0,n+g+this._paddingTop}getWhitespaceIndexAtOrAfterVerticallOffset(p){this._checkPendingChanges(),p=p|0;let C=0,n=this.getWhitespacesCount()-1;if(n<0)return-1;const g=this.getVerticalOffsetForWhitespaceIndex(n),t=this.getHeightForWhitespaceIndex(n);if(p>=g+t)return-1;for(;C<n;){const s=Math.floor((C+n)/2),c=this.getVerticalOffsetForWhitespaceIndex(s),u=this.getHeightForWhitespaceIndex(s);if(p>=c+u)C=s+1;else{if(p>=c)return s;n=s}}return C}getWhitespaceAtVerticalOffset(p){this._checkPendingChanges(),p=p|0;const C=this.getWhitespaceIndexAtOrAfterVerticallOffset(p);if(C<0||C>=this.getWhitespacesCount())return null;const n=this.getVerticalOffsetForWhitespaceIndex(C);if(n>p)return null;const g=this.getHeightForWhitespaceIndex(C),t=this.getIdForWhitespaceIndex(C),s=this.getAfterLineNumberForWhitespaceIndex(C);return{id:t,afterLineNumber:s,verticalOffset:n,height:g}}getWhitespaceViewportData(p,C){this._checkPendingChanges(),p=p|0,C=C|0;const n=this.getWhitespaceIndexAtOrAfterVerticallOffset(p),g=this.getWhitespacesCount()-1;if(n<0)return[];let t=[];for(let s=n;s<=g;s++){const c=this.getVerticalOffsetForWhitespaceIndex(s),u=this.getHeightForWhitespaceIndex(s);if(c>=C)break;t.push({id:this.getIdForWhitespaceIndex(s),afterLineNumber:this.getAfterLineNumberForWhitespaceIndex(s),verticalOffset:c,height:u})}return t}getWhitespaces(){return this._checkPendingChanges(),this._arr.slice(0)}getWhitespacesCount(){return this._checkPendingChanges(),this._arr.length}getIdForWhitespaceIndex(p){return this._checkPendingChanges(),p=p|0,this._arr[p].id}getAfterLineNumberForWhitespaceIndex(p){return this._checkPendingChanges(),p=p|0,this._arr[p].afterLineNumber}getHeightForWhitespaceIndex(p){return this._checkPendingChanges(),p=p|0,this._arr[p].height}}e.LinesLayout=D,D.INSTANCE_COUNT=0}),define(J[118],ee([0,1,8,84,144]),function(j,e,w,N,T){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.renderViewLine2=e.RenderLineOutput2=e.renderViewLine=e.RenderLineOutput=e.CharacterMapping=e.DomPosition=e.RenderLineInput=e.LineRange=void 0;class D{constructor(b,v,m){this._linePartBrand=void 0,this.endIndex=b,this.type=v,this.metadata=m}isWhitespace(){return!!(this.metadata&1)}isPseudoAfter(){return!!(this.metadata&4)}}class S{constructor(b,v){this.startOffset=b,this.endOffset=v}equals(b){return this.startOffset===b.startOffset&&this.endOffset===b.endOffset}}e.LineRange=S;class p{constructor(b,v,m,E,I,k,M,P,F,R,A,O,L,B,W,K,H,Y,X){this.useMonospaceOptimizations=b,this.canUseHalfwidthRightwardsArrow=v,this.lineContent=m,this.continuesWithWrappedLine=E,this.isBasicASCII=I,this.containsRTL=k,this.fauxIndentLength=M,this.lineTokens=P,this.lineDecorations=F.sort(T.LineDecoration.compare),this.tabSize=R,this.startVisibleColumn=A,this.spaceWidth=O,this.stopRenderingLineAfter=W,this.renderWhitespace=K==="all"?4:K==="boundary"?1:K==="selection"?2:K==="trailing"?3:0,this.renderControlCharacters=H,this.fontLigatures=Y,this.selectionsOnLine=X&&X.sort((oe,G)=>oe.startOffset<G.startOffset?-1:1);const Z=Math.abs(B-O),se=Math.abs(L-O);Z<se?(this.renderSpaceWidth=B,this.renderSpaceCharCode=11825):(this.renderSpaceWidth=L,this.renderSpaceCharCode=183)}sameSelection(b){if(this.selectionsOnLine===null)return b===null;if(b===null||b.length!==this.selectionsOnLine.length)return!1;for(let v=0;v<this.selectionsOnLine.length;v++)if(!this.selectionsOnLine[v].equals(b[v]))return!1;return!0}equals(b){return this.useMonospaceOptimizations===b.useMonospaceOptimizations&&this.canUseHalfwidthRightwardsArrow===b.canUseHalfwidthRightwardsArrow&&this.lineContent===b.lineContent&&this.continuesWithWrappedLine===b.continuesWithWrappedLine&&this.isBasicASCII===b.isBasicASCII&&this.containsRTL===b.containsRTL&&this.fauxIndentLength===b.fauxIndentLength&&this.tabSize===b.tabSize&&this.startVisibleColumn===b.startVisibleColumn&&this.spaceWidth===b.spaceWidth&&this.renderSpaceWidth===b.renderSpaceWidth&&this.renderSpaceCharCode===b.renderSpaceCharCode&&this.stopRenderingLineAfter===b.stopRenderingLineAfter&&this.renderWhitespace===b.renderWhitespace&&this.renderControlCharacters===b.renderControlCharacters&&this.fontLigatures===b.fontLigatures&&T.LineDecoration.equalsArr(this.lineDecorations,b.lineDecorations)&&this.lineTokens.equals(b.lineTokens)&&this.sameSelection(b.selectionsOnLine)}}e.RenderLineInput=p;class C{constructor(b,v){this.partIndex=b,this.charIndex=v}}e.DomPosition=C;class n{constructor(b,v){this.length=b,this._data=new Uint32Array(this.length),this._absoluteOffsets=new Uint32Array(this.length)}static getPartIndex(b){return(b&4294901760)>>>16}static getCharIndex(b){return(b&65535)>>>0}setColumnInfo(b,v,m,E){const I=(v<<16|m<<0)>>>0;this._data[b-1]=I,this._absoluteOffsets[b-1]=E+m}getAbsoluteOffset(b){return this._absoluteOffsets.length===0?0:this._absoluteOffsets[b-1]}charOffsetToPartData(b){return this.length===0?0:b<0?this._data[0]:b>=this.length?this._data[this.length-1]:this._data[b]}getDomPosition(b){const v=this.charOffsetToPartData(b-1),m=n.getPartIndex(v),E=n.getCharIndex(v);return new C(m,E)}getColumn(b,v){return this.partDataToCharOffset(b.partIndex,v,b.charIndex)+1}partDataToCharOffset(b,v,m){if(this.length===0)return 0;let E=(b<<16|m<<0)>>>0,I=0,k=this.length-1;for(;I+1<k;){let W=I+k>>>1,K=this._data[W];if(K===E)return W;K>E?k=W:I=W}if(I===k)return I;let M=this._data[I],P=this._data[k];if(M===E)return I;if(P===E)return k;let F=n.getPartIndex(M),R=n.getCharIndex(M),A=n.getPartIndex(P),O;F!==A?O=v:O=n.getCharIndex(P);let L=m-R,B=O-m;return L<=B?I:k}}e.CharacterMapping=n;class g{constructor(b,v,m){this._renderLineOutputBrand=void 0,this.characterMapping=b,this.containsRTL=v,this.containsForeignElements=m}}e.RenderLineOutput=g;function t(_,b){if(_.lineContent.length===0){if(_.lineDecorations.length>0){b.appendASCIIString("<span>");let v=0,m=0,E=0;for(const k of _.lineDecorations)(k.type===1||k.type===2)&&(b.appendASCIIString('<span class="'),b.appendASCIIString(k.className),b.appendASCIIString('"></span>'),k.type===1&&(E|=1,v++),k.type===2&&(E|=2,m++));b.appendASCIIString("</span>");const I=new n(1,v+m);return I.setColumnInfo(1,v,0,0),new g(I,!1,E)}return b.appendASCIIString("<span><span></span></span>"),new g(new n(0,0),!1,0)}return f(d(_),b)}e.renderViewLine=t;class s{constructor(b,v,m,E){this.characterMapping=b,this.html=v,this.containsRTL=m,this.containsForeignElements=E}}e.RenderLineOutput2=s;function c(_){let b=(0,N.createStringBuilder)(1e4),v=t(_,b);return new s(v.characterMapping,b.build(),v.containsRTL,v.containsForeignElements)}e.renderViewLine2=c;class u{constructor(b,v,m,E,I,k,M,P,F,R,A,O,L,B,W){this.fontIsMonospace=b,this.canUseHalfwidthRightwardsArrow=v,this.lineContent=m,this.len=E,this.isOverflowing=I,this.parts=k,this.containsForeignElements=M,this.fauxIndentLength=P,this.tabSize=F,this.startVisibleColumn=R,this.containsRTL=A,this.spaceWidth=O,this.renderSpaceCharCode=L,this.renderWhitespace=B,this.renderControlCharacters=W}}function d(_){const b=_.lineContent;let v,m;_.stopRenderingLineAfter!==-1&&_.stopRenderingLineAfter<b.length?(v=!0,m=_.stopRenderingLineAfter):(v=!1,m=b.length);let E=a(_.lineTokens,_.fauxIndentLength,m);(_.renderWhitespace===4||_.renderWhitespace===1||_.renderWhitespace===2&&!!_.selectionsOnLine||_.renderWhitespace===3)&&(E=l(_,b,m,E));let I=0;if(_.lineDecorations.length>0){for(let k=0,M=_.lineDecorations.length;k<M;k++){const P=_.lineDecorations[k];P.type===3||P.type===1?I|=1:P.type===2&&(I|=2)}E=h(b,m,E,_.lineDecorations)}return _.containsRTL||(E=r(b,E,!_.isBasicASCII||_.fontLigatures)),_.renderControlCharacters&&!_.isBasicASCII&&(E=i(b,E)),new u(_.useMonospaceOptimizations,_.canUseHalfwidthRightwardsArrow,b,m,v,E,I,_.fauxIndentLength,_.tabSize,_.startVisibleColumn,_.containsRTL,_.spaceWidth,_.renderSpaceCharCode,_.renderWhitespace,_.renderControlCharacters)}function a(_,b,v){let m=[],E=0;b>0&&(m[E++]=new D(b,"",0));for(let I=0,k=_.getCount();I<k;I++){const M=_.getEndOffset(I);if(M<=b)continue;const P=_.getClassName(I);if(M>=v){m[E++]=new D(v,P,0);break}m[E++]=new D(M,P,0)}return m}function r(_,b,v){let m=0,E=[],I=0;if(v)for(let k=0,M=b.length;k<M;k++){const P=b[k],F=P.endIndex;if(m+50<F){const R=P.type,A=P.metadata;let O=-1,L=m;for(let B=m;B<F;B++)_.charCodeAt(B)===32&&(O=B),O!==-1&&B-L>=50&&(E[I++]=new D(O+1,R,A),L=O+1,O=-1);L!==F&&(E[I++]=new D(F,R,A))}else E[I++]=P;m=F}else for(let k=0,M=b.length;k<M;k++){const P=b[k],F=P.endIndex;let R=F-m;if(R>50){const A=P.type,O=P.metadata,L=Math.ceil(R/50);for(let B=1;B<L;B++){let W=m+B*50;E[I++]=new D(W,A,O)}E[I++]=new D(F,A,O)}else E[I++]=P;m=F}return E}function o(_){return _<32?_!==9:_===127||_>=8234&&_<=8238||_>=8294&&_<=8297||_>=8206&&_<=8207||_===1564}function i(_,b){let v=[],m=new D(0,"",0),E=0;for(const I of b){const k=I.endIndex;for(;E<k;E++){const M=_.charCodeAt(E);o(M)&&(E>m.endIndex&&(m=new D(E,I.type,I.metadata),v.push(m)),m=new D(E+1,"mtkcontrol",I.metadata),v.push(m))}E>m.endIndex&&(m=new D(k,I.type,I.metadata),v.push(m))}return v}function l(_,b,v,m){const E=_.continuesWithWrappedLine,I=_.fauxIndentLength,k=_.tabSize,M=_.startVisibleColumn,P=_.useMonospaceOptimizations,F=_.selectionsOnLine,R=_.renderWhitespace===1,A=_.renderWhitespace===3,O=_.renderSpaceWidth!==_.spaceWidth;let L=[],B=0,W=0,K=m[W].type,H=m[W].endIndex;const Y=m.length;let X=!1,Z=w.firstNonWhitespaceIndex(b),se;Z===-1?(X=!0,Z=v,se=v):se=w.lastNonWhitespaceIndex(b);let oe=!1,G=0,x=F&&F[G],U=M%k;for(let V=I;V<v;V++){const Q=b.charCodeAt(V);x&&V>=x.endOffset&&(G++,x=F&&F[G]);let ue;if(V<Z||V>se)ue=!0;else if(Q===9)ue=!0;else if(Q===32)if(R)if(oe)ue=!0;else{const pe=V+1<v?b.charCodeAt(V+1):0;ue=pe===32||pe===9}else ue=!0;else ue=!1;if(ue&&F&&(ue=!!x&&x.startOffset<=V&&x.endOffset>V),ue&&A&&(ue=X||V>se),oe){if(!ue||!P&&U>=k){if(O){const pe=B>0?L[B-1].endIndex:I;for(let fe=pe+1;fe<=V;fe++)L[B++]=new D(fe,"mtkw",1)}else L[B++]=new D(V,"mtkw",1);U=U%k}}else(V===H||ue&&V>I)&&(L[B++]=new D(V,K,0),U=U%k);for(Q===9?U=k:w.isFullWidthCharacter(Q)?U+=2:U++,oe=ue;V===H&&(W++,W<Y);)K=m[W].type,H=m[W].endIndex}let $=!1;if(oe)if(E&&R){let V=v>0?b.charCodeAt(v-1):0,Q=v>1?b.charCodeAt(v-2):0;V===32&&Q!==32&&Q!==9||($=!0)}else $=!0;if($)if(O){const V=B>0?L[B-1].endIndex:I;for(let Q=V+1;Q<=v;Q++)L[B++]=new D(Q,"mtkw",1)}else L[B++]=new D(v,"mtkw",1);else L[B++]=new D(v,K,0);return L}function h(_,b,v,m){m.sort(T.LineDecoration.compare);const E=T.LineDecorationsNormalizer.normalize(_,m),I=E.length;let k=0,M=[],P=0,F=0;for(let A=0,O=v.length;A<O;A++){const L=v[A],B=L.endIndex,W=L.type,K=L.metadata;for(;k<I&&E[k].startOffset<B;){const H=E[k];if(H.startOffset>F&&(F=H.startOffset,M[P++]=new D(F,W,K)),H.endOffset+1<=B)F=H.endOffset+1,M[P++]=new D(F,W+" "+H.className,K|H.metadata),k++;else{F=B,M[P++]=new D(F,W+" "+H.className,K|H.metadata);break}}B>F&&(F=B,M[P++]=new D(F,W,K))}const R=v[v.length-1].endIndex;if(k<I&&E[k].startOffset===R)for(;k<I&&E[k].startOffset===R;){const A=E[k];M[P++]=new D(F,A.className,A.metadata),k++}return M}function f(_,b){const v=_.fontIsMonospace,m=_.canUseHalfwidthRightwardsArrow,E=_.containsForeignElements,I=_.lineContent,k=_.len,M=_.isOverflowing,P=_.parts,F=_.fauxIndentLength,R=_.tabSize,A=_.startVisibleColumn,O=_.containsRTL,L=_.spaceWidth,B=_.renderSpaceCharCode,W=_.renderWhitespace,K=_.renderControlCharacters,H=new n(k+1,P.length);let Y=!1,X=0,Z=A,se=0,oe=0,G=0,x=0;O?b.appendASCIIString('<span dir="ltr">'):b.appendASCIIString("<span>");for(let U=0,$=P.length;U<$;U++){x+=G;const V=P[U],Q=V.endIndex,ue=V.type,pe=W!==0&&V.isWhitespace(),fe=pe&&!v&&(ue==="mtkw"||!E),re=X===Q&&V.isPseudoAfter();if(se=0,b.appendASCIIString('<span class="'),b.appendASCIIString(fe?"mtkz":ue),b.appendASCII(34),pe){let ie=0;{let ae=X,q=Z;for(;ae<Q;ae++){const ce=(I.charCodeAt(ae)===9?R-q%R:1)|0;ie+=ce,ae>=F&&(q+=ce)}}for(fe&&(b.appendASCIIString(' style="width:'),b.appendASCIIString(String(L*ie)),b.appendASCIIString('px"')),b.appendASCII(62);X<Q;X++){H.setColumnInfo(X+1,U-oe,se,x),oe=0;const ae=I.charCodeAt(X);let q;if(ae===9){q=R-Z%R|0,!m||q>1?b.write1(8594):b.write1(65515);for(let ne=2;ne<=q;ne++)b.write1(160)}else q=1,b.write1(B);se+=q,X>=F&&(Z+=q)}G=ie}else{let ie=0;for(b.appendASCII(62);X<Q;X++){H.setColumnInfo(X+1,U-oe,se,x),oe=0;const ae=I.charCodeAt(X);let q=1,ne=1;switch(ae){case 9:q=R-Z%R,ne=q;for(let ce=1;ce<=q;ce++)b.write1(160);break;case 32:b.write1(160);break;case 60:b.appendASCIIString("&lt;");break;case 62:b.appendASCIIString("&gt;");break;case 38:b.appendASCIIString("&amp;");break;case 0:K?b.write1(9216):b.appendASCIIString("&#00;");break;case 65279:case 8232:case 8233:case 133:b.write1(65533);break;default:w.isFullWidthCharacter(ae)&&ne++,K&&ae<32?b.write1(9216+ae):K&&ae===127?b.write1(9249):K&&o(ae)?(b.appendASCIIString("[U+"),b.appendASCIIString(y(ae)),b.appendASCIIString("]"),q=8):b.write1(ae)}se+=q,ie+=q,X>=F&&(Z+=ne)}G=ie}re?oe++:oe=0,X>=k&&!Y&&V.isPseudoAfter()&&(Y=!0,H.setColumnInfo(X+1,U,se,x)),b.appendASCIIString("</span>")}return Y||H.setColumnInfo(k+1,P.length-1,se,x),M&&b.appendASCIIString("<span>&hellip;</span>"),b.appendASCIIString("</span>"),new g(H,O,E)}function y(_){return _.toString(16).toUpperCase().padStart(4,"0")}}),define(J[408],ee([0,1,3]),function(j,e,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ViewportData=void 0;class N{constructor(D,S,p,C){this.selections=D,this.startLineNumber=S.startLineNumber|0,this.endLineNumber=S.endLineNumber|0,this.relativeVerticalOffset=S.relativeVerticalOffset,this.bigNumbersDelta=S.bigNumbersDelta|0,this.whitespaceViewportData=p,this._model=C,this.visibleRange=new w.Range(S.startLineNumber,this._model.getLineMinColumn(S.startLineNumber),S.endLineNumber,this._model.getLineMaxColumn(S.endLineNumber))}getViewLineRenderingData(D){return this._model.getViewLineRenderingData(this.visibleRange,D)}getDecorationsInViewport(){return this._model.getDecorationsInViewport(this.visibleRange)}}e.ViewportData=N}),define(J[234],ee([0,1,135]),function(j,e,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.PrefixSumComputer=e.PrefixSumIndexOfResult=void 0;class N{constructor(S,p){this._prefixSumIndexOfResultBrand=void 0,this.index=S,this.remainder=p}}e.PrefixSumIndexOfResult=N;class T{constructor(S){this.values=S,this.prefixSum=new Uint32Array(S.length),this.prefixSumValidIndex=new Int32Array(1),this.prefixSumValidIndex[0]=-1}insertValues(S,p){S=(0,w.toUint32)(S);const C=this.values,n=this.prefixSum,g=p.length;return g===0?!1:(this.values=new Uint32Array(C.length+g),this.values.set(C.subarray(0,S),0),this.values.set(C.subarray(S),S+g),this.values.set(p,S),S-1<this.prefixSumValidIndex[0]&&(this.prefixSumValidIndex[0]=S-1),this.prefixSum=new Uint32Array(this.values.length),this.prefixSumValidIndex[0]>=0&&this.prefixSum.set(n.subarray(0,this.prefixSumValidIndex[0]+1)),!0)}changeValue(S,p){return S=(0,w.toUint32)(S),p=(0,w.toUint32)(p),this.values[S]===p?!1:(this.values[S]=p,S-1<this.prefixSumValidIndex[0]&&(this.prefixSumValidIndex[0]=S-1),!0)}removeValues(S,p){S=(0,w.toUint32)(S),p=(0,w.toUint32)(p);const C=this.values,n=this.prefixSum;if(S>=C.length)return!1;let g=C.length-S;return p>=g&&(p=g),p===0?!1:(this.values=new Uint32Array(C.length-p),this.values.set(C.subarray(0,S),0),this.values.set(C.subarray(S+p),S),this.prefixSum=new Uint32Array(this.values.length),S-1<this.prefixSumValidIndex[0]&&(this.prefixSumValidIndex[0]=S-1),this.prefixSumValidIndex[0]>=0&&this.prefixSum.set(n.subarray(0,this.prefixSumValidIndex[0]+1)),!0)}getTotalSum(){return this.values.length===0?0:this._getPrefixSum(this.values.length-1)}getPrefixSum(S){return S<0?0:(S=(0,w.toUint32)(S),this._getPrefixSum(S))}_getPrefixSum(S){if(S<=this.prefixSumValidIndex[0])return this.prefixSum[S];let p=this.prefixSumValidIndex[0]+1;p===0&&(this.prefixSum[0]=this.values[0],p++),S>=this.values.length&&(S=this.values.length-1);for(let C=p;C<=S;C++)this.prefixSum[C]=this.prefixSum[C-1]+this.values[C];return this.prefixSumValidIndex[0]=Math.max(this.prefixSumValidIndex[0],S),this.prefixSum[S]}getIndexOf(S){S=Math.floor(S),this.getTotalSum();let p=0,C=this.values.length-1,n=0,g=0,t=0;for(;p<=C;)if(n=p+(C-p)/2|0,g=this.prefixSum[n],t=g-this.values[n],S<t)C=n-1;else if(S>=g)p=n+1;else break;return new N(n,S-t)}}e.PrefixSumComputer=T}),define(J[409],ee([0,1,8,13,234]),function(j,e,w,N,T){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MirrorTextModel=void 0;class D{constructor(p,C,n,g){this._uri=p,this._lines=C,this._eol=n,this._versionId=g,this._lineStarts=null,this._cachedTextValue=null}dispose(){this._lines.length=0}get version(){return this._versionId}getText(){return this._cachedTextValue===null&&(this._cachedTextValue=this._lines.join(this._eol)),this._cachedTextValue}onEvents(p){p.eol&&p.eol!==this._eol&&(this._eol=p.eol,this._lineStarts=null);const C=p.changes;for(const n of C)this._acceptDeleteRange(n.range),this._acceptInsertText(new N.Position(n.range.startLineNumber,n.range.startColumn),n.text);this._versionId=p.versionId,this._cachedTextValue=null}_ensureLineStarts(){if(!this._lineStarts){const p=this._eol.length,C=this._lines.length,n=new Uint32Array(C);for(let g=0;g<C;g++)n[g]=this._lines[g].length+p;this._lineStarts=new T.PrefixSumComputer(n)}}_setLineText(p,C){this._lines[p]=C,this._lineStarts&&this._lineStarts.changeValue(p,this._lines[p].length+this._eol.length)}_acceptDeleteRange(p){if(p.startLineNumber===p.endLineNumber){if(p.startColumn===p.endColumn)return;this._setLineText(p.startLineNumber-1,this._lines[p.startLineNumber-1].substring(0,p.startColumn-1)+this._lines[p.startLineNumber-1].substring(p.endColumn-1));return}this._setLineText(p.startLineNumber-1,this._lines[p.startLineNumber-1].substring(0,p.startColumn-1)+this._lines[p.endLineNumber-1].substring(p.endColumn-1)),this._lines.splice(p.startLineNumber,p.endLineNumber-p.startLineNumber),this._lineStarts&&this._lineStarts.removeValues(p.startLineNumber,p.endLineNumber-p.startLineNumber)}_acceptInsertText(p,C){if(C.length===0)return;let n=(0,w.splitLines)(C);if(n.length===1){this._setLineText(p.lineNumber-1,this._lines[p.lineNumber-1].substring(0,p.column-1)+n[0]+this._lines[p.lineNumber-1].substring(p.column-1));return}n[n.length-1]+=this._lines[p.lineNumber-1].substring(p.column-1),this._setLineText(p.lineNumber-1,this._lines[p.lineNumber-1].substring(0,p.column-1)+n[0]);let g=new Uint32Array(n.length-1);for(let t=1;t<n.length;t++)this._lines.splice(p.lineNumber+t-1,0,n[t]),g[t-1]=n[t].length+this._eol.length;this._lineStarts&&this._lineStarts.insertValues(p.lineNumber,g)}}e.MirrorTextModel=D}),define(J[410],ee([0,1,134,17,24,13,3,387,409,143,396,399,232,20,83]),function(j,e,w,N,T,D,S,p,C,n,g,t,s,c,u){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.create=e.EditorSimpleWorker=e.MirrorModel=void 0;class d extends C.MirrorTextModel{get uri(){return this._uri}get eol(){return this._eol}getValue(){return this.getText()}getLinesContent(){return this._lines.slice(0)}getLineCount(){return this._lines.length}getLineContent(i){return this._lines[i-1]}getWordAtPosition(i,l){let h=(0,n.getWordAtText)(i.column,(0,n.ensureValidWordDefinition)(l),this._lines[i.lineNumber-1],0);return h?new S.Range(i.lineNumber,h.startColumn,i.lineNumber,h.endColumn):null}words(i){const l=this._lines,h=this._wordenize.bind(this);let f=0,y="",_=0,b=[];return{*[Symbol.iterator](){for(;;)if(_<b.length){const v=y.substring(b[_].start,b[_].end);_+=1,yield v}else if(f<l.length)y=l[f],b=h(y,i),_=0,f+=1;else break}}}getLineWords(i,l){let h=this._lines[i-1],f=this._wordenize(h,l),y=[];for(const _ of f)y.push({word:h.substring(_.start,_.end),startColumn:_.start+1,endColumn:_.end+1});return y}_wordenize(i,l){const h=[];let f;for(l.lastIndex=0;(f=l.exec(i))&&f[0].length!==0;)h.push({start:f.index,end:f.index+f[0].length});return h}getValueInRange(i){if(i=this._validateRange(i),i.startLineNumber===i.endLineNumber)return this._lines[i.startLineNumber-1].substring(i.startColumn-1,i.endColumn-1);let l=this._eol,h=i.startLineNumber-1,f=i.endLineNumber-1,y=[];y.push(this._lines[h].substring(i.startColumn-1));for(let _=h+1;_<f;_++)y.push(this._lines[_]);return y.push(this._lines[f].substring(0,i.endColumn-1)),y.join(l)}offsetAt(i){return i=this._validatePosition(i),this._ensureLineStarts(),this._lineStarts.getPrefixSum(i.lineNumber-2)+(i.column-1)}positionAt(i){i=Math.floor(i),i=Math.max(0,i),this._ensureLineStarts();let l=this._lineStarts.getIndexOf(i),h=this._lines[l.index].length;return{lineNumber:1+l.index,column:1+Math.min(l.remainder,h)}}_validateRange(i){const l=this._validatePosition({lineNumber:i.startLineNumber,column:i.startColumn}),h=this._validatePosition({lineNumber:i.endLineNumber,column:i.endColumn});return l.lineNumber!==i.startLineNumber||l.column!==i.startColumn||h.lineNumber!==i.endLineNumber||h.column!==i.endColumn?{startLineNumber:l.lineNumber,startColumn:l.column,endLineNumber:h.lineNumber,endColumn:h.column}:i}_validatePosition(i){if(!D.Position.isIPosition(i))throw new Error("bad position");let{lineNumber:l,column:h}=i,f=!1;if(l<1)l=1,h=1,f=!0;else if(l>this._lines.length)l=this._lines.length,h=this._lines[l-1].length+1,f=!0;else{let y=this._lines[l-1].length+1;h<1?(h=1,f=!0):h>y&&(h=y,f=!0)}return f?{lineNumber:l,column:h}:i}}e.MirrorModel=d;class a{constructor(i,l){this._host=i,this._models=Object.create(null),this._foreignModuleFactory=l,this._foreignModule=null}dispose(){this._models=Object.create(null)}_getModel(i){return this._models[i]}_getModels(){let i=[];return Object.keys(this._models).forEach(l=>i.push(this._models[l])),i}acceptNewModel(i){this._models[i.url]=new d(T.URI.parse(i.url),i.lines,i.EOL,i.versionId)}acceptModelChanged(i,l){if(!this._models[i])return;this._models[i].onEvents(l)}acceptRemovedModel(i){!this._models[i]||delete this._models[i]}computeDiff(i,l,h,f){return Re(this,void 0,void 0,function*(){const y=this._getModel(i),_=this._getModel(l);if(!y||!_)return null;const b=y.getLinesContent(),v=_.getLinesContent(),E=new p.DiffComputer(b,v,{shouldComputeCharChanges:!0,shouldPostProcessCharChanges:!0,shouldIgnoreTrimWhitespace:h,shouldMakePrettyDiff:!0,maxComputationTime:f}).computeDiff(),I=E.changes.length>0?!1:this._modelsAreIdentical(y,_);return{quitEarly:E.quitEarly,identical:I,changes:E.changes}})}_modelsAreIdentical(i,l){const h=i.getLineCount(),f=l.getLineCount();if(h!==f)return!1;for(let y=1;y<=h;y++){const _=i.getLineContent(y),b=l.getLineContent(y);if(_!==b)return!1}return!0}computeMoreMinimalEdits(i,l){return Re(this,void 0,void 0,function*(){const h=this._getModel(i);if(!h)return l;const f=[];let y;l=l.slice(0).sort((_,b)=>{if(_.range&&b.range)return S.Range.compareRangesUsingStarts(_.range,b.range);let v=_.range?0:1,m=b.range?0:1;return v-m});for(let{range:_,text:b,eol:v}of l){if(typeof v=="number"&&(y=v),S.Range.isEmpty(_)&&!b)continue;const m=h.getValueInRange(_);if(b=b.replace(/\r\n|\n|\r/g,h.eol),m===b)continue;if(Math.max(b.length,m.length)>a._diffLimit){f.push({range:_,text:b});continue}const E=(0,w.stringDiff)(m,b,!1),I=h.offsetAt(S.Range.lift(_).getStartPosition());for(const k of E){const M=h.positionAt(I+k.originalStart),P=h.positionAt(I+k.originalStart+k.originalLength),F={text:b.substr(k.modifiedStart,k.modifiedLength),range:{startLineNumber:M.lineNumber,startColumn:M.column,endLineNumber:P.lineNumber,endColumn:P.column}};h.getValueInRange(F.range)!==F.text&&f.push(F)}}return typeof y=="number"&&f.push({eol:y,text:"",range:{startLineNumber:0,startColumn:0,endLineNumber:0,endColumn:0}}),f})}computeLinks(i){return Re(this,void 0,void 0,function*(){let l=this._getModel(i);return l?(0,g.computeLinks)(l):null})}textualSuggest(i,l,h,f){return Re(this,void 0,void 0,function*(){const y=new u.StopWatch(!0),_=new RegExp(h,f),b=new Set;e:for(let v of i){const m=this._getModel(v);if(!!m){for(let E of m.words(_))if(!(E===l||!isNaN(Number(E)))&&(b.add(E),b.size>a._suggestionsLimit))break e}}return{words:Array.from(b),duration:y.elapsed()}})}computeWordRanges(i,l,h,f){return Re(this,void 0,void 0,function*(){let y=this._getModel(i);if(!y)return Object.create(null);const _=new RegExp(h,f),b=Object.create(null);for(let v=l.startLineNumber;v<l.endLineNumber;v++){let m=y.getLineWords(v,_);for(const E of m){if(!isNaN(Number(E.word)))continue;let I=b[E.word];I||(I=[],b[E.word]=I),I.push({startLineNumber:v,startColumn:E.startColumn,endLineNumber:v,endColumn:E.endColumn})}}return b})}navigateValueSet(i,l,h,f,y){return Re(this,void 0,void 0,function*(){let _=this._getModel(i);if(!_)return null;let b=new RegExp(f,y);l.startColumn===l.endColumn&&(l={startLineNumber:l.startLineNumber,startColumn:l.startColumn,endLineNumber:l.endLineNumber,endColumn:l.endColumn+1});let v=_.getValueInRange(l),m=_.getWordAtPosition({lineNumber:l.startLineNumber,column:l.startColumn},b);if(!m)return null;let E=_.getValueInRange(m);return t.BasicInplaceReplace.INSTANCE.navigateValueSet(l,v,m,E,h)})}loadForeignModule(i,l,h){const f=(b,v)=>this._host.fhr(b,v);let _={host:c.createProxyObject(h,f),getMirrorModels:()=>this._getModels()};return this._foreignModuleFactory?(this._foreignModule=this._foreignModuleFactory(_,l),Promise.resolve(c.getAllMethodNames(this._foreignModule))):new Promise((b,v)=>{j([i],m=>{this._foreignModule=m.create(_,l),b(c.getAllMethodNames(this._foreignModule))},v)})}fmr(i,l){if(!this._foreignModule||typeof this._foreignModule[i]!="function")return Promise.reject(new Error("Missing requestHandler or method: "+i));try{return Promise.resolve(this._foreignModule[i].apply(this._foreignModule,l))}catch(h){return Promise.reject(h)}}}e.EditorSimpleWorker=a,a._diffLimit=1e5,a._suggestionsLimit=1e4;function r(o){return new a(o,null)}e.create=r,typeof importScripts=="function"&&(N.globals.monaco=(0,s.createMonacoBaseAPI)())}),define(J[119],ee([0,1,2]),function(j,e,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ViewEventHandler=void 0;class N extends w.Disposable{constructor(){super();this._shouldRender=!0}shouldRender(){return this._shouldRender}forceShouldRender(){this._shouldRender=!0}setShouldRender(){this._shouldRender=!0}onDidRender(){this._shouldRender=!1}onCompositionStart(D){return!1}onCompositionEnd(D){return!1}onConfigurationChanged(D){return!1}onCursorStateChanged(D){return!1}onDecorationsChanged(D){return!1}onFlushed(D){return!1}onFocusChanged(D){return!1}onLanguageConfigurationChanged(D){return!1}onLineMappingChanged(D){return!1}onLinesChanged(D){return!1}onLinesDeleted(D){return!1}onLinesInserted(D){return!1}onRevealRangeRequest(D){return!1}onScrollChanged(D){return!1}onThemeChanged(D){return!1}onTokensChanged(D){return!1}onTokensColorsChanged(D){return!1}onZonesChanged(D){return!1}handleEvents(D){let S=!1;for(let p=0,C=D.length;p<C;p++){let n=D[p];switch(n.type){case 0:this.onCompositionStart(n)&&(S=!0);break;case 1:this.onCompositionEnd(n)&&(S=!0);break;case 2:this.onConfigurationChanged(n)&&(S=!0);break;case 3:this.onCursorStateChanged(n)&&(S=!0);break;case 4:this.onDecorationsChanged(n)&&(S=!0);break;case 5:this.onFlushed(n)&&(S=!0);break;case 6:this.onFocusChanged(n)&&(S=!0);break;case 7:this.onLanguageConfigurationChanged(n)&&(S=!0);break;case 8:this.onLineMappingChanged(n)&&(S=!0);break;case 9:this.onLinesChanged(n)&&(S=!0);break;case 10:this.onLinesDeleted(n)&&(S=!0);break;case 11:this.onLinesInserted(n)&&(S=!0);break;case 12:this.onRevealRangeRequest(n)&&(S=!0);break;case 13:this.onScrollChanged(n)&&(S=!0);break;case 15:this.onTokensChanged(n)&&(S=!0);break;case 14:this.onThemeChanged(n)&&(S=!0);break;case 16:this.onTokensColorsChanged(n)&&(S=!0);break;case 17:this.onZonesChanged(n)&&(S=!0);break;default:console.info("View received unknown event: "),console.info(n)}}S&&(this._shouldRender=!0)}}e.ViewEventHandler=N}),define(J[100],ee([0,1,119]),function(j,e,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DynamicViewOverlay=void 0;class N extends w.ViewEventHandler{}e.DynamicViewOverlay=N}),define(J[50],ee([0,1,30,119]),function(j,e,w,N){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.PartFingerprints=e.ViewPart=void 0;class T extends N.ViewEventHandler{constructor(p){super();this._context=p,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),super.dispose()}}e.ViewPart=T;class D{static write(p,C){p instanceof w.FastDomNode,p.setAttribute("data-mprt",String(C))}static read(p){const C=p.getAttribute("data-mprt");return C===null?0:parseInt(C,10)}static collect(p,C){let n=[],g=0;for(;p&&p!==document.body&&p!==C;)p.nodeType===p.ELEMENT_NODE&&(n[g++]=this.read(p)),p=p.parentElement;const t=new Uint8Array(g);for(let s=0;s<g;s++)t[s]=n[g-s-1];return t}}e.PartFingerprints=D}),define(J[411],ee([0,1,7,30,50]),function(j,e,w,N,T){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ViewContentWidgets=void 0;class D{constructor(g,t){this._coordinateBrand=void 0,this.top=g,this.left=t}}class S extends T.ViewPart{constructor(g,t){super(g);this._viewDomNode=t,this._widgets={},this.domNode=(0,N.createFastDomNode)(document.createElement("div")),T.PartFingerprints.write(this.domNode,1),this.domNode.setClassName("contentWidgets"),this.domNode.setPosition("absolute"),this.domNode.setTop(0),this.overflowingContentWidgetsDomNode=(0,N.createFastDomNode)(document.createElement("div")),T.PartFingerprints.write(this.overflowingContentWidgetsDomNode,2),this.overflowingContentWidgetsDomNode.setClassName("overflowingContentWidgets")}dispose(){super.dispose(),this._widgets={}}onConfigurationChanged(g){const t=Object.keys(this._widgets);for(const s of t)this._widgets[s].onConfigurationChanged(g);return!0}onDecorationsChanged(g){return!0}onFlushed(g){return!0}onLineMappingChanged(g){const t=Object.keys(this._widgets);for(const s of t)this._widgets[s].onLineMappingChanged(g);return!0}onLinesChanged(g){return!0}onLinesDeleted(g){return!0}onLinesInserted(g){return!0}onScrollChanged(g){return!0}onZonesChanged(g){return!0}addWidget(g){const t=new p(this._context,this._viewDomNode,g);this._widgets[t.id]=t,t.allowEditorOverflow?this.overflowingContentWidgetsDomNode.appendChild(t.domNode):this.domNode.appendChild(t.domNode),this.setShouldRender()}setWidgetPosition(g,t,s){this._widgets[g.getId()].setPosition(t,s),this.setShouldRender()}removeWidget(g){const t=g.getId();if(this._widgets.hasOwnProperty(t)){const s=this._widgets[t];delete this._widgets[t];const c=s.domNode.domNode;c.parentNode.removeChild(c),c.removeAttribute("monaco-visible-content-widget"),this.setShouldRender()}}shouldSuppressMouseDownOnWidget(g){return this._widgets.hasOwnProperty(g)?this._widgets[g].suppressMouseDown:!1}onBeforeRender(g){const t=Object.keys(this._widgets);for(const s of t)this._widgets[s].onBeforeRender(g)}prepareRender(g){const t=Object.keys(this._widgets);for(const s of t)this._widgets[s].prepareRender(g)}render(g){const t=Object.keys(this._widgets);for(const s of t)this._widgets[s].render(g)}}e.ViewContentWidgets=S;class p{constructor(g,t,s){this._context=g,this._viewDomNode=t,this._actual=s,this.domNode=(0,N.createFastDomNode)(this._actual.getDomNode()),this.id=this._actual.getId(),this.allowEditorOverflow=this._actual.allowEditorOverflow||!1,this.suppressMouseDown=this._actual.suppressMouseDown||!1;const c=this._context.configuration.options,u=c.get(129);this._fixedOverflowWidgets=c.get(36),this._contentWidth=u.contentWidth,this._contentLeft=u.contentLeft,this._lineHeight=c.get(58),this._range=null,this._viewRange=null,this._preference=[],this._cachedDomNodeClientWidth=-1,this._cachedDomNodeClientHeight=-1,this._maxWidth=this._getMaxWidth(),this._isVisible=!1,this._renderData=null,this.domNode.setPosition(this._fixedOverflowWidgets&&this.allowEditorOverflow?"fixed":"absolute"),this.domNode.setVisibility("hidden"),this.domNode.setAttribute("widgetId",this.id),this.domNode.setMaxWidth(this._maxWidth)}onConfigurationChanged(g){const t=this._context.configuration.options;if(this._lineHeight=t.get(58),g.hasChanged(129)){const s=t.get(129);this._contentLeft=s.contentLeft,this._contentWidth=s.contentWidth,this._maxWidth=this._getMaxWidth()}}onLineMappingChanged(g){this._setPosition(this._range)}_setPosition(g){if(this._range=g,this._viewRange=null,this._range){const t=this._context.model.validateModelRange(this._range);(this._context.model.coordinatesConverter.modelPositionIsVisible(t.getStartPosition())||this._context.model.coordinatesConverter.modelPositionIsVisible(t.getEndPosition()))&&(this._viewRange=this._context.model.coordinatesConverter.convertModelRangeToViewRange(t))}}_getMaxWidth(){return this.allowEditorOverflow?window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth:this._contentWidth}setPosition(g,t){this._setPosition(g),this._preference=t,this._cachedDomNodeClientWidth=-1,this._cachedDomNodeClientHeight=-1}_layoutBoxInViewport(g,t,s,c,u){const d=g.top,a=d,r=t.top+this._lineHeight,o=u.viewportHeight-r,i=d-c,l=a>=c,h=r,f=o>=c;let y=g.left,_=t.left;return y+s>u.scrollLeft+u.viewportWidth&&(y=u.scrollLeft+u.viewportWidth-s),_+s>u.scrollLeft+u.viewportWidth&&(_=u.scrollLeft+u.viewportWidth-s),y<u.scrollLeft&&(y=u.scrollLeft),_<u.scrollLeft&&(_=u.scrollLeft),{fitsAbove:l,aboveTop:i,aboveLeft:y,fitsBelow:f,belowTop:h,belowLeft:_}}_layoutHorizontalSegmentInPage(g,t,s,c){const u=Math.max(0,t.left-c),d=Math.min(t.left+t.width+c,g.width);let a=t.left+s-w.StandardWindow.scrollX;if(a+c>d){const r=a-(d-c);a-=r,s-=r}if(a<u){const r=a-u;a-=r,s-=r}return[s,a]}_layoutBoxInPage(g,t,s,c,u){const d=g.top-c,a=t.top+this._lineHeight,r=w.getDomNodePagePosition(this._viewDomNode.domNode),o=r.top+d-w.StandardWindow.scrollY,i=r.top+a-w.StandardWindow.scrollY,l=w.getClientArea(document.body),[h,f]=this._layoutHorizontalSegmentInPage(l,r,g.left-u.scrollLeft+this._contentLeft,s),[y,_]=this._layoutHorizontalSegmentInPage(l,r,t.left-u.scrollLeft+this._contentLeft,s),b=22,v=22,m=o>=b,E=i+c<=l.height-v;return this._fixedOverflowWidgets?{fitsAbove:m,aboveTop:Math.max(o,b),aboveLeft:f,fitsBelow:E,belowTop:i,belowLeft:_}:{fitsAbove:m,aboveTop:d,aboveLeft:h,fitsBelow:E,belowTop:a,belowLeft:y}}_prepareRenderWidgetAtExactPositionOverflowing(g){return new D(g.top,g.left+this._contentLeft)}_getTopAndBottomLeft(g){if(!this._viewRange)return[null,null];const t=g.linesVisibleRangesForRange(this._viewRange,!1);if(!t||t.length===0)return[null,null];let s=t[0],c=t[0];for(const l of t)l.lineNumber<s.lineNumber&&(s=l),l.lineNumber>c.lineNumber&&(c=l);let u=1073741824;for(const l of s.ranges)l.left<u&&(u=l.left);let d=1073741824;for(const l of c.ranges)l.left<d&&(d=l.left);const a=g.getVerticalOffsetForLineNumber(s.lineNumber)-g.scrollTop,r=new D(a,u),o=g.getVerticalOffsetForLineNumber(c.lineNumber)-g.scrollTop,i=new D(o,d);return[r,i]}_prepareRenderWidget(g){const[t,s]=this._getTopAndBottomLeft(g);if(!t||!s)return null;if(this._cachedDomNodeClientWidth===-1||this._cachedDomNodeClientHeight===-1){let u=null;if(typeof this._actual.beforeRender=="function"&&(u=C(this._actual.beforeRender,this._actual)),u)this._cachedDomNodeClientWidth=u.width,this._cachedDomNodeClientHeight=u.height;else{const d=this.domNode.domNode;this._cachedDomNodeClientWidth=d.clientWidth,this._cachedDomNodeClientHeight=d.clientHeight}}let c;if(this.allowEditorOverflow?c=this._layoutBoxInPage(t,s,this._cachedDomNodeClientWidth,this._cachedDomNodeClientHeight,g):c=this._layoutBoxInViewport(t,s,this._cachedDomNodeClientWidth,this._cachedDomNodeClientHeight,g),this._preference)for(let u=1;u<=2;u++)for(const d of this._preference)if(d===1){if(!c)return null;if(u===2||c.fitsAbove)return{coordinate:new D(c.aboveTop,c.aboveLeft),position:1}}else if(d===2){if(!c)return null;if(u===2||c.fitsBelow)return{coordinate:new D(c.belowTop,c.belowLeft),position:2}}else return this.allowEditorOverflow?{coordinate:this._prepareRenderWidgetAtExactPositionOverflowing(t),position:0}:{coordinate:t,position:0};return null}onBeforeRender(g){!this._viewRange||!this._preference||this._viewRange.endLineNumber<g.startLineNumber||this._viewRange.startLineNumber>g.endLineNumber||this.domNode.setMaxWidth(this._maxWidth)}prepareRender(g){this._renderData=this._prepareRenderWidget(g)}render(g){if(!this._renderData){this._isVisible&&(this.domNode.removeAttribute("monaco-visible-content-widget"),this._isVisible=!1,this.domNode.setVisibility("hidden")),typeof this._actual.afterRender=="function"&&C(this._actual.afterRender,this._actual,null);return}this.allowEditorOverflow?(this.domNode.setTop(this._renderData.coordinate.top),this.domNode.setLeft(this._renderData.coordinate.left)):(this.domNode.setTop(this._renderData.coordinate.top+g.scrollTop-g.bigNumbersDelta),this.domNode.setLeft(this._renderData.coordinate.left)),this._isVisible||(this.domNode.setVisibility("inherit"),this.domNode.setAttribute("monaco-visible-content-widget","true"),this._isVisible=!0),typeof this._actual.afterRender=="function"&&C(this._actual.afterRender,this._actual,this._renderData.position)}}function C(n,g,...t){try{return n.call(g,...t)}catch(s){return null}}}),define(J[412],ee([0,1,100,3,117,338]),function(j,e,w,N,T){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DecorationsOverlay=void 0;class D extends w.DynamicViewOverlay{constructor(p){super();this._context=p;const C=this._context.configuration.options;this._lineHeight=C.get(58),this._typicalHalfwidthCharacterWidth=C.get(43).typicalHalfwidthCharacterWidth,this._renderResult=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(p){const C=this._context.configuration.options;return this._lineHeight=C.get(58),this._typicalHalfwidthCharacterWidth=C.get(43).typicalHalfwidthCharacterWidth,!0}onDecorationsChanged(p){return!0}onFlushed(p){return!0}onLinesChanged(p){return!0}onLinesDeleted(p){return!0}onLinesInserted(p){return!0}onScrollChanged(p){return p.scrollTopChanged||p.scrollWidthChanged}onZonesChanged(p){return!0}prepareRender(p){const C=p.getDecorationsInViewport();let n=[],g=0;for(let u=0,d=C.length;u<d;u++){const a=C[u];a.options.className&&(n[g++]=a)}n=n.sort((u,d)=>{if(u.options.zIndex<d.options.zIndex)return-1;if(u.options.zIndex>d.options.zIndex)return 1;const a=u.options.className,r=d.options.className;return a<r?-1:a>r?1:N.Range.compareRangesUsingStarts(u.range,d.range)});const t=p.visibleRange.startLineNumber,s=p.visibleRange.endLineNumber,c=[];for(let u=t;u<=s;u++){const d=u-t;c[d]=""}this._renderWholeLineDecorations(p,n,c),this._renderNormalDecorations(p,n,c),this._renderResult=c}_renderWholeLineDecorations(p,C,n){const g=String(this._lineHeight),t=p.visibleRange.startLineNumber,s=p.visibleRange.endLineNumber;for(let c=0,u=C.length;c<u;c++){const d=C[c];if(!d.options.isWholeLine)continue;const a='<div class="cdr '+d.options.className+'" style="left:0;width:100%;height:'+g+'px;"></div>',r=Math.max(d.range.startLineNumber,t),o=Math.min(d.range.endLineNumber,s);for(let i=r;i<=o;i++){const l=i-t;n[l]+=a}}}_renderNormalDecorations(p,C,n){const g=String(this._lineHeight),t=p.visibleRange.startLineNumber;let s=null,c=!1,u=null;for(let d=0,a=C.length;d<a;d++){const r=C[d];if(r.options.isWholeLine)continue;const o=r.options.className,i=Boolean(r.options.showIfCollapsed);let l=r.range;if(i&&l.endColumn===1&&l.endLineNumber!==l.startLineNumber&&(l=new N.Range(l.startLineNumber,l.startColumn,l.endLineNumber-1,this._context.model.getLineMaxColumn(l.endLineNumber-1))),s===o&&c===i&&N.Range.areIntersectingOrTouching(u,l)){u=N.Range.plusRange(u,l);continue}s!==null&&this._renderNormalDecoration(p,u,s,c,g,t,n),s=o,c=i,u=l}s!==null&&this._renderNormalDecoration(p,u,s,c,g,t,n)}_renderNormalDecoration(p,C,n,g,t,s,c){const u=p.linesVisibleRangesForRange(C,n==="findMatch");if(!!u)for(let d=0,a=u.length;d<a;d++){const r=u[d];if(r.outsideRenderedLine)continue;const o=r.lineNumber-s;if(g&&r.ranges.length===1){const i=r.ranges[0];i.width===0&&(r.ranges[0]=new T.HorizontalRange(i.left,this._typicalHalfwidthCharacterWidth))}for(let i=0,l=r.ranges.length;i<l;i++){const h=r.ranges[i],f='<div class="cdr '+n+'" style="left:'+String(h.left)+"px;width:"+String(h.width)+"px;height:"+t+'px;"></div>';c[o]+=f}}}render(p,C){if(!this._renderResult)return"";const n=C-p;return n<0||n>=this._renderResult.length?"":this._renderResult[n]}}e.DecorationsOverlay=D}),define(J[181],ee([0,1,100,339]),function(j,e,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.GlyphMarginOverlay=e.DedupOverlay=e.DecorationToRender=void 0;class N{constructor(p,C,n){this._decorationToRenderBrand=void 0,this.startLineNumber=+p,this.endLineNumber=+C,this.className=String(n)}}e.DecorationToRender=N;class T extends w.DynamicViewOverlay{_render(p,C,n){const g=[];for(let c=p;c<=C;c++){const u=c-p;g[u]=[]}if(n.length===0)return g;n.sort((c,u)=>c.className===u.className?c.startLineNumber===u.startLineNumber?c.endLineNumber-u.endLineNumber:c.startLineNumber-u.startLineNumber:c.className<u.className?-1:1);let t=null,s=0;for(let c=0,u=n.length;c<u;c++){const d=n[c],a=d.className;let r=Math.max(d.startLineNumber,p)-p;const o=Math.min(d.endLineNumber,C)-p;t===a?(r=Math.max(s+1,r),s=Math.max(s,o)):(t=a,s=o);for(let i=r;i<=s;i++)g[i].push(t)}return g}}e.DedupOverlay=T;class D extends T{constructor(p){super();this._context=p;const C=this._context.configuration.options,n=C.get(129);this._lineHeight=C.get(58),this._glyphMargin=C.get(49),this._glyphMarginLeft=n.glyphMarginLeft,this._glyphMarginWidth=n.glyphMarginWidth,this._renderResult=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(p){const C=this._context.configuration.options,n=C.get(129);return this._lineHeight=C.get(58),this._glyphMargin=C.get(49),this._glyphMarginLeft=n.glyphMarginLeft,this._glyphMarginWidth=n.glyphMarginWidth,!0}onDecorationsChanged(p){return!0}onFlushed(p){return!0}onLinesChanged(p){return!0}onLinesDeleted(p){return!0}onLinesInserted(p){return!0}onScrollChanged(p){return p.scrollTopChanged}onZonesChanged(p){return!0}_getDecorations(p){const C=p.getDecorationsInViewport();let n=[],g=0;for(let t=0,s=C.length;t<s;t++){const c=C[t],u=c.options.glyphMarginClassName;u&&(n[g++]=new N(c.range.startLineNumber,c.range.endLineNumber,u))}return n}prepareRender(p){if(!this._glyphMargin){this._renderResult=null;return}const C=p.visibleRange.startLineNumber,n=p.visibleRange.endLineNumber,g=this._render(C,n,this._getDecorations(p)),t=this._lineHeight.toString(),s=this._glyphMarginLeft.toString(),c=this._glyphMarginWidth.toString(),u='" style="left:'+s+"px;width:"+c+"px;height:"+t+'px;"></div>',d=[];for(let a=C;a<=n;a++){const r=a-C,o=g[r];o.length===0?d[r]="":d[r]='<div class="cgmr codicon '+o.join(" ")+u}this._renderResult=d}render(p,C){if(!this._renderResult)return"";const n=C-p;return n<0||n>=this._renderResult.length?"":this._renderResult[n]}}e.GlyphMarginOverlay=D}),define(J[413],ee([0,1,181,343]),function(j,e,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LinesDecorationsOverlay=void 0;class N extends w.DedupOverlay{constructor(D){super();this._context=D;const p=this._context.configuration.options.get(129);this._decorationsLeft=p.decorationsLeft,this._decorationsWidth=p.decorationsWidth,this._renderResult=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(D){const p=this._context.configuration.options.get(129);return this._decorationsLeft=p.decorationsLeft,this._decorationsWidth=p.decorationsWidth,!0}onDecorationsChanged(D){return!0}onFlushed(D){return!0}onLinesChanged(D){return!0}onLinesDeleted(D){return!0}onLinesInserted(D){return!0}onScrollChanged(D){return D.scrollTopChanged}onZonesChanged(D){return!0}_getDecorations(D){const S=D.getDecorationsInViewport();let p=[],C=0;for(let n=0,g=S.length;n<g;n++){const t=S[n],s=t.options.linesDecorationsClassName;s&&(p[C++]=new w.DecorationToRender(t.range.startLineNumber,t.range.endLineNumber,s));const c=t.options.firstLineDecorationClassName;c&&(p[C++]=new w.DecorationToRender(t.range.startLineNumber,t.range.startLineNumber,c))}return p}prepareRender(D){const S=D.visibleRange.startLineNumber,p=D.visibleRange.endLineNumber,C=this._render(S,p,this._getDecorations(D)),n=this._decorationsLeft.toString(),g=this._decorationsWidth.toString(),t='" style="left:'+n+"px;width:"+g+'px;"></div>',s=[];for(let c=S;c<=p;c++){const u=c-S,d=C[u];let a="";for(let r=0,o=d.length;r<o;r++)a+='<div class="cldr '+d[r]+t;s[u]=a}this._renderResult=s}render(D,S){return this._renderResult?this._renderResult[S-D]:""}}e.LinesDecorationsOverlay=N}),define(J[235],ee([0,1,30,50]),function(j,e,w,N){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Margin=void 0;class T extends N.ViewPart{constructor(S){super(S);const p=this._context.configuration.options,C=p.get(129);this._canUseLayerHinting=!p.get(28),this._contentLeft=C.contentLeft,this._glyphMarginLeft=C.glyphMarginLeft,this._glyphMarginWidth=C.glyphMarginWidth,this._domNode=(0,w.createFastDomNode)(document.createElement("div")),this._domNode.setClassName(T.OUTER_CLASS_NAME),this._domNode.setPosition("absolute"),this._domNode.setAttribute("role","presentation"),this._domNode.setAttribute("aria-hidden","true"),this._glyphMarginBackgroundDomNode=(0,w.createFastDomNode)(document.createElement("div")),this._glyphMarginBackgroundDomNode.setClassName(T.CLASS_NAME),this._domNode.appendChild(this._glyphMarginBackgroundDomNode)}dispose(){super.dispose()}getDomNode(){return this._domNode}onConfigurationChanged(S){const p=this._context.configuration.options,C=p.get(129);return this._canUseLayerHinting=!p.get(28),this._contentLeft=C.contentLeft,this._glyphMarginLeft=C.glyphMarginLeft,this._glyphMarginWidth=C.glyphMarginWidth,!0}onScrollChanged(S){return super.onScrollChanged(S)||S.scrollTopChanged}prepareRender(S){}render(S){this._domNode.setLayerHinting(this._canUseLayerHinting),this._domNode.setContain("strict");const p=S.scrollTop-S.bigNumbersDelta;this._domNode.setTop(-p);const C=Math.min(S.scrollHeight,1e6);this._domNode.setHeight(C),this._domNode.setWidth(this._contentLeft),this._glyphMarginBackgroundDomNode.setLeft(this._glyphMarginLeft),this._glyphMarginBackgroundDomNode.setWidth(this._glyphMarginWidth),this._glyphMarginBackgroundDomNode.setHeight(C)}}e.Margin=T,T.CLASS_NAME="glyph-margin",T.OUTER_CLASS_NAME="margin"}),define(J[414],ee([0,1,181,344]),function(j,e,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MarginViewLineDecorationsOverlay=void 0;class N extends w.DedupOverlay{constructor(D){super();this._context=D,this._renderResult=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(D){return!0}onDecorationsChanged(D){return!0}onFlushed(D){return!0}onLinesChanged(D){return!0}onLinesDeleted(D){return!0}onLinesInserted(D){return!0}onScrollChanged(D){return D.scrollTopChanged}onZonesChanged(D){return!0}_getDecorations(D){const S=D.getDecorationsInViewport();let p=[],C=0;for(let n=0,g=S.length;n<g;n++){const t=S[n],s=t.options.marginClassName;s&&(p[C++]=new w.DecorationToRender(t.range.startLineNumber,t.range.endLineNumber,s))}return p}prepareRender(D){const S=D.visibleRange.startLineNumber,p=D.visibleRange.endLineNumber,C=this._render(S,p,this._getDecorations(D)),n=[];for(let g=S;g<=p;g++){const t=g-S,s=C[t];let c="";for(let u=0,d=s.length;u<d;u++)c+='<div class="cmdr '+s[u]+'" style=""></div>';n[t]=c}this._renderResult=n}render(D,S){return this._renderResult?this._renderResult[S-D]:""}}e.MarginViewLineDecorationsOverlay=N}),define(J[415],ee([0,1,30,50,346]),function(j,e,w,N){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ViewOverlayWidgets=void 0;class T extends N.ViewPart{constructor(S){super(S);const C=this._context.configuration.options.get(129);this._widgets={},this._verticalScrollbarWidth=C.verticalScrollbarWidth,this._minimapWidth=C.minimap.minimapWidth,this._horizontalScrollbarHeight=C.horizontalScrollbarHeight,this._editorHeight=C.height,this._editorWidth=C.width,this._domNode=(0,w.createFastDomNode)(document.createElement("div")),N.PartFingerprints.write(this._domNode,4),this._domNode.setClassName("overlayWidgets")}dispose(){super.dispose(),this._widgets={}}getDomNode(){return this._domNode}onConfigurationChanged(S){const C=this._context.configuration.options.get(129);return this._verticalScrollbarWidth=C.verticalScrollbarWidth,this._minimapWidth=C.minimap.minimapWidth,this._horizontalScrollbarHeight=C.horizontalScrollbarHeight,this._editorHeight=C.height,this._editorWidth=C.width,!0}addWidget(S){const p=(0,w.createFastDomNode)(S.getDomNode());this._widgets[S.getId()]={widget:S,preference:null,domNode:p},p.setPosition("absolute"),p.setAttribute("widgetId",S.getId()),this._domNode.appendChild(p),this.setShouldRender()}setWidgetPosition(S,p){const C=this._widgets[S.getId()];return C.preference===p?!1:(C.preference=p,this.setShouldRender(),!0)}removeWidget(S){const p=S.getId();if(this._widgets.hasOwnProperty(p)){const n=this._widgets[p].domNode.domNode;delete this._widgets[p],n.parentNode.removeChild(n),this.setShouldRender()}}_renderWidget(S){const p=S.domNode;if(S.preference===null){p.unsetTop();return}if(S.preference===0)p.setTop(0),p.setRight(2*this._verticalScrollbarWidth+this._minimapWidth);else if(S.preference===1){const C=p.domNode.clientHeight;p.setTop(this._editorHeight-C-2*this._horizontalScrollbarHeight),p.setRight(2*this._verticalScrollbarWidth+this._minimapWidth)}else S.preference===2&&(p.setTop(0),p.domNode.style.right="50%")}prepareRender(S){}render(S){this._domNode.setWidth(this._editorWidth);const p=Object.keys(this._widgets);for(let C=0,n=p.length;C<n;C++){const g=p[C];this._renderWidget(this._widgets[g])}}}e.ViewOverlayWidgets=T}),define(J[416],ee([0,1,30,233,119]),function(j,e,w,N,T){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.OverviewRuler=void 0;class D extends T.ViewEventHandler{constructor(p,C){super();this._context=p;const n=this._context.configuration.options;this._domNode=(0,w.createFastDomNode)(document.createElement("canvas")),this._domNode.setClassName(C),this._domNode.setPosition("absolute"),this._domNode.setLayerHinting(!0),this._domNode.setContain("strict"),this._zoneManager=new N.OverviewZoneManager(g=>this._context.viewLayout.getVerticalOffsetForLineNumber(g)),this._zoneManager.setDOMWidth(0),this._zoneManager.setDOMHeight(0),this._zoneManager.setOuterHeight(this._context.viewLayout.getScrollHeight()),this._zoneManager.setLineHeight(n.get(58)),this._zoneManager.setPixelRatio(n.get(127)),this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),super.dispose()}onConfigurationChanged(p){const C=this._context.configuration.options;return p.hasChanged(58)&&(this._zoneManager.setLineHeight(C.get(58)),this._render()),p.hasChanged(127)&&(this._zoneManager.setPixelRatio(C.get(127)),this._domNode.setWidth(this._zoneManager.getDOMWidth()),this._domNode.setHeight(this._zoneManager.getDOMHeight()),this._domNode.domNode.width=this._zoneManager.getCanvasWidth(),this._domNode.domNode.height=this._zoneManager.getCanvasHeight(),this._render()),!0}onFlushed(p){return this._render(),!0}onScrollChanged(p){return p.scrollHeightChanged&&(this._zoneManager.setOuterHeight(p.scrollHeight),this._render()),!0}onZonesChanged(p){return this._render(),!0}getDomNode(){return this._domNode.domNode}setLayout(p){this._domNode.setTop(p.top),this._domNode.setRight(p.right);let C=!1;C=this._zoneManager.setDOMWidth(p.width)||C,C=this._zoneManager.setDOMHeight(p.height)||C,C&&(this._domNode.setWidth(this._zoneManager.getDOMWidth()),this._domNode.setHeight(this._zoneManager.getDOMHeight()),this._domNode.domNode.width=this._zoneManager.getCanvasWidth(),this._domNode.domNode.height=this._zoneManager.getCanvasHeight(),this._render())}setZones(p){this._zoneManager.setZones(p),this._render()}_render(){if(this._zoneManager.getOuterHeight()===0)return!1;const p=this._zoneManager.getCanvasWidth(),C=this._zoneManager.getCanvasHeight(),n=this._zoneManager.resolveColorZones(),g=this._zoneManager.getId2Color(),t=this._domNode.domNode.getContext("2d");return t.clearRect(0,0,p,C),n.length>0&&this._renderOneLane(t,n,g,p),!0}_renderOneLane(p,C,n,g){let t=0,s=0,c=0;for(const u of C){const d=u.colorId,a=u.from,r=u.to;d!==t?(p.fillRect(0,s,g,c-s),t=d,p.fillStyle=n[t],s=a,c=r):c>=a?c=Math.max(c,r):(p.fillRect(0,s,g,c-s),s=a,c=r)}p.fillRect(0,s,g,c-s)}}e.OverviewRuler=D}),define(J[417],ee([0,1,30,11,50,13]),function(j,e,w,N,T,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ViewZones=void 0;const S=()=>{throw new Error("Invalid change accessor")};class p extends T.ViewPart{constructor(g){super(g);const t=this._context.configuration.options,s=t.get(129);this._lineHeight=t.get(58),this._contentWidth=s.contentWidth,this._contentLeft=s.contentLeft,this.domNode=(0,w.createFastDomNode)(document.createElement("div")),this.domNode.setClassName("view-zones"),this.domNode.setPosition("absolute"),this.domNode.setAttribute("role","presentation"),this.domNode.setAttribute("aria-hidden","true"),this.marginDomNode=(0,w.createFastDomNode)(document.createElement("div")),this.marginDomNode.setClassName("margin-view-zones"),this.marginDomNode.setPosition("absolute"),this.marginDomNode.setAttribute("role","presentation"),this.marginDomNode.setAttribute("aria-hidden","true"),this._zones={}}dispose(){super.dispose(),this._zones={}}_recomputeWhitespacesProps(){const g=this._context.viewLayout.getWhitespaces(),t=new Map;for(const c of g)t.set(c.id,c);let s=!1;return this._context.model.changeWhitespace(c=>{const u=Object.keys(this._zones);for(let d=0,a=u.length;d<a;d++){const r=u[d],o=this._zones[r],i=this._computeWhitespaceProps(o.delegate);o.isInHiddenArea=i.isInHiddenArea;const l=t.get(r);l&&(l.afterLineNumber!==i.afterViewLineNumber||l.height!==i.heightInPx)&&(c.changeOneWhitespace(r,i.afterViewLineNumber,i.heightInPx),this._safeCallOnComputedHeight(o.delegate,i.heightInPx),s=!0)}}),s}onConfigurationChanged(g){const t=this._context.configuration.options,s=t.get(129);return this._lineHeight=t.get(58),this._contentWidth=s.contentWidth,this._contentLeft=s.contentLeft,g.hasChanged(58)&&this._recomputeWhitespacesProps(),!0}onLineMappingChanged(g){return this._recomputeWhitespacesProps()}onLinesDeleted(g){return!0}onScrollChanged(g){return g.scrollTopChanged||g.scrollWidthChanged}onZonesChanged(g){return!0}onLinesInserted(g){return!0}_getZoneOrdinal(g){return typeof g.afterColumn!="undefined"?g.afterColumn:1e4}_computeWhitespaceProps(g){if(g.afterLineNumber===0)return{isInHiddenArea:!1,afterViewLineNumber:0,heightInPx:this._heightInPixels(g),minWidthInPx:this._minWidthInPixels(g)};let t;if(typeof g.afterColumn!="undefined")t=this._context.model.validateModelPosition({lineNumber:g.afterLineNumber,column:g.afterColumn});else{const d=this._context.model.validateModelPosition({lineNumber:g.afterLineNumber,column:1}).lineNumber;t=new D.Position(d,this._context.model.getModelLineMaxColumn(d))}let s;t.column===this._context.model.getModelLineMaxColumn(t.lineNumber)?s=this._context.model.validateModelPosition({lineNumber:t.lineNumber+1,column:1}):s=this._context.model.validateModelPosition({lineNumber:t.lineNumber,column:t.column+1});const c=this._context.model.coordinatesConverter.convertModelPositionToViewPosition(t),u=this._context.model.coordinatesConverter.modelPositionIsVisible(s);return{isInHiddenArea:!u,afterViewLineNumber:c.lineNumber,heightInPx:u?this._heightInPixels(g):0,minWidthInPx:this._minWidthInPixels(g)}}changeViewZones(g){let t=!1;return this._context.model.changeWhitespace(s=>{const c={addZone:u=>(t=!0,this._addZone(s,u)),removeZone:u=>{!u||(t=this._removeZone(s,u)||t)},layoutZone:u=>{!u||(t=this._layoutZone(s,u)||t)}};C(g,c),c.addZone=S,c.removeZone=S,c.layoutZone=S}),t}_addZone(g,t){const s=this._computeWhitespaceProps(t),u={whitespaceId:g.insertWhitespace(s.afterViewLineNumber,this._getZoneOrdinal(t),s.heightInPx,s.minWidthInPx),delegate:t,isInHiddenArea:s.isInHiddenArea,isVisible:!1,domNode:(0,w.createFastDomNode)(t.domNode),marginDomNode:t.marginDomNode?(0,w.createFastDomNode)(t.marginDomNode):null};return this._safeCallOnComputedHeight(u.delegate,s.heightInPx),u.domNode.setPosition("absolute"),u.domNode.domNode.style.width="100%",u.domNode.setDisplay("none"),u.domNode.setAttribute("monaco-view-zone",u.whitespaceId),this.domNode.appendChild(u.domNode),u.marginDomNode&&(u.marginDomNode.setPosition("absolute"),u.marginDomNode.domNode.style.width="100%",u.marginDomNode.setDisplay("none"),u.marginDomNode.setAttribute("monaco-view-zone",u.whitespaceId),this.marginDomNode.appendChild(u.marginDomNode)),this._zones[u.whitespaceId]=u,this.setShouldRender(),u.whitespaceId}_removeZone(g,t){if(this._zones.hasOwnProperty(t)){const s=this._zones[t];return delete this._zones[t],g.removeWhitespace(s.whitespaceId),s.domNode.removeAttribute("monaco-visible-view-zone"),s.domNode.removeAttribute("monaco-view-zone"),s.domNode.domNode.parentNode.removeChild(s.domNode.domNode),s.marginDomNode&&(s.marginDomNode.removeAttribute("monaco-visible-view-zone"),s.marginDomNode.removeAttribute("monaco-view-zone"),s.marginDomNode.domNode.parentNode.removeChild(s.marginDomNode.domNode)),this.setShouldRender(),!0}return!1}_layoutZone(g,t){if(this._zones.hasOwnProperty(t)){const s=this._zones[t],c=this._computeWhitespaceProps(s.delegate);return s.isInHiddenArea=c.isInHiddenArea,g.changeOneWhitespace(s.whitespaceId,c.afterViewLineNumber,c.heightInPx),this._safeCallOnComputedHeight(s.delegate,c.heightInPx),this.setShouldRender(),!0}return!1}shouldSuppressMouseDownOnViewZone(g){if(this._zones.hasOwnProperty(g)){const t=this._zones[g];return Boolean(t.delegate.suppressMouseDown)}return!1}_heightInPixels(g){return typeof g.heightInPx=="number"?g.heightInPx:typeof g.heightInLines=="number"?this._lineHeight*g.heightInLines:this._lineHeight}_minWidthInPixels(g){return typeof g.minWidthInPx=="number"?g.minWidthInPx:0}_safeCallOnComputedHeight(g,t){if(typeof g.onComputedHeight=="function")try{g.onComputedHeight(t)}catch(s){(0,N.onUnexpectedError)(s)}}_safeCallOnDomNodeTop(g,t){if(typeof g.onDomNodeTop=="function")try{g.onDomNodeTop(t)}catch(s){(0,N.onUnexpectedError)(s)}}prepareRender(g){}render(g){const t=g.viewportData.whitespaceViewportData,s={};let c=!1;for(const d of t)this._zones[d.id].isInHiddenArea||(s[d.id]=d,c=!0);const u=Object.keys(this._zones);for(let d=0,a=u.length;d<a;d++){const r=u[d],o=this._zones[r];let i=0,l=0,h="none";s.hasOwnProperty(r)?(i=s[r].verticalOffset-g.bigNumbersDelta,l=s[r].height,h="block",o.isVisible||(o.domNode.setAttribute("monaco-visible-view-zone","true"),o.isVisible=!0),this._safeCallOnDomNodeTop(o.delegate,g.getScrolledTopFromAbsoluteTop(s[r].verticalOffset))):(o.isVisible&&(o.domNode.removeAttribute("monaco-visible-view-zone"),o.isVisible=!1),this._safeCallOnDomNodeTop(o.delegate,g.getScrolledTopFromAbsoluteTop(-1e6))),o.domNode.setTop(i),o.domNode.setHeight(l),o.domNode.setDisplay(h),o.marginDomNode&&(o.marginDomNode.setTop(i),o.marginDomNode.setHeight(l),o.marginDomNode.setDisplay(h))}c&&(this.domNode.setWidth(Math.max(g.scrollWidth,this._contentWidth)),this.marginDomNode.setWidth(this._contentLeft))}}e.ViewZones=p;function C(n,g){try{return n(g)}catch(t){(0,N.onUnexpectedError)(t)}}}),define(J[60],ee([0,1,8,13,3]),function(j,e,w,N,T){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.OverviewRulerDecorationsGroup=e.ViewModelDecoration=e.SingleLineInlineDecoration=e.InlineDecoration=e.ViewLineRenderingData=e.ViewLineData=e.MinimapLinesRenderingData=e.InjectedText=e.LineBreakData=e.OutputPosition=e.Viewport=void 0;class D{constructor(r,o,i,l){this._viewportBrand=void 0,this.top=r|0,this.left=o|0,this.width=i|0,this.height=l|0}}e.Viewport=D;class S{constructor(r,o){this.outputLineIndex=r,this.outputOffset=o}toString(){return`${this.outputLineIndex}:${this.outputOffset}`}toPosition(r,o){const i=this.outputLineIndex>0?o:0;return new N.Position(r+this.outputLineIndex,i+this.outputOffset+1)}}e.OutputPosition=S;class p{constructor(r,o,i,l,h){this.breakOffsets=r,this.breakOffsetsVisibleColumn=o,this.wrappedTextIndentLength=i,this.injectionOffsets=l,this.injectionOptions=h}getInputOffsetOfOutputPosition(r,o){let i=0;if(r===0?i=o:i=this.breakOffsets[r-1]+o,this.injectionOffsets!==null)for(let l=0;l<this.injectionOffsets.length&&i>this.injectionOffsets[l];l++)i<this.injectionOffsets[l]+this.injectionOptions[l].content.length?i=this.injectionOffsets[l]:i-=this.injectionOptions[l].content.length;return i}getOutputPositionOfInputOffset(r,o=2){let i=0;if(this.injectionOffsets!==null)for(let l=0;l<this.injectionOffsets.length&&!(r<this.injectionOffsets[l]||o!==1&&r===this.injectionOffsets[l]);l++)i+=this.injectionOptions[l].content.length;return r+=i,this.getOutputPositionOfOffsetInUnwrappedLine(r,o)}getOutputPositionOfOffsetInUnwrappedLine(r,o=2){let i=0,l=this.breakOffsets.length-1,h=0,f=0;for(;i<=l;){h=i+(l-i)/2|0;const y=this.breakOffsets[h];if(f=h>0?this.breakOffsets[h-1]:0,o===0)if(r<=f)l=h-1;else if(r>y)i=h+1;else break;else if(r<f)l=h-1;else if(r>=y)i=h+1;else break}return new S(h,r-f)}outputPositionToOffsetInUnwrappedLine(r,o){let i=(r>0?this.breakOffsets[r-1]:0)+o;return r>0&&(i-=this.wrappedTextIndentLength),i}normalizeOffsetAroundInjections(r,o){const i=this.getInjectedTextAtOffset(r);if(!i)return r;if(o===2)return r===i.offsetInUnwrappedLine+i.length?i.offsetInUnwrappedLine+i.length:i.offsetInUnwrappedLine;if(o===1){let f=i.offsetInUnwrappedLine+i.length,y=i.injectedTextIndex;for(;y+1<this.injectionOffsets.length&&this.injectionOffsets[y+1]===this.injectionOffsets[y];)f+=this.injectionOptions[y+1].content.length,y++;return f}let l=i.offsetInUnwrappedLine,h=i.injectedTextIndex;for(;h-1>=0&&this.injectionOffsets[h-1]===this.injectionOffsets[h];)l-=this.injectionOptions[h-1].content.length,h++;return l}getInjectedText(r,o){const i=this.outputPositionToOffsetInUnwrappedLine(r,o),l=this.getInjectedTextAtOffset(i);return l?{options:this.injectionOptions[l.injectedTextIndex]}:null}getInjectedTextAtOffset(r){const o=this.injectionOffsets,i=this.injectionOptions;if(o!==null){let l=0;for(let h=0;h<o.length;h++){const f=i[h].content.length,y=o[h]+l,_=o[h]+l+f;if(y>r)break;if(r<=_)return{injectedTextIndex:h,offsetInUnwrappedLine:y,length:f};l+=f}}}}e.LineBreakData=p;class C{constructor(r){this.options=r}}e.InjectedText=C;class n{constructor(r,o){this.tabSize=r,this.data=o}}e.MinimapLinesRenderingData=n;class g{constructor(r,o,i,l,h,f,y){this._viewLineDataBrand=void 0,this.content=r,this.continuesWithWrappedLine=o,this.minColumn=i,this.maxColumn=l,this.startVisibleColumn=h,this.tokens=f,this.inlineDecorations=y}}e.ViewLineData=g;class t{constructor(r,o,i,l,h,f,y,_,b,v){this.minColumn=r,this.maxColumn=o,this.content=i,this.continuesWithWrappedLine=l,this.isBasicASCII=t.isBasicASCII(i,f),this.containsRTL=t.containsRTL(i,this.isBasicASCII,h),this.tokens=y,this.inlineDecorations=_,this.tabSize=b,this.startVisibleColumn=v}static isBasicASCII(r,o){return o?w.isBasicASCII(r):!0}static containsRTL(r,o,i){return!o&&i?w.containsRTL(r):!1}}e.ViewLineRenderingData=t;class s{constructor(r,o,i){this.range=r,this.inlineClassName=o,this.type=i}}e.InlineDecoration=s;class c{constructor(r,o,i,l){this.startOffset=r,this.endOffset=o,this.inlineClassName=i,this.inlineClassNameAffectsLetterSpacing=l}toInlineDecoration(r){return new s(new T.Range(r,this.startOffset+1,r,this.endOffset+1),this.inlineClassName,this.inlineClassNameAffectsLetterSpacing?3:0)}}e.SingleLineInlineDecoration=c;class u{constructor(r,o){this._viewModelDecorationBrand=void 0,this.range=r,this.options=o}}e.ViewModelDecoration=u;class d{constructor(r,o,i){this.color=r,this.zIndex=o,this.data=i}static cmp(r,o){return r.zIndex===o.zIndex?r.color<o.color?-1:r.color>o.color?1:0:r.zIndex-o.zIndex}}e.OverviewRulerDecorationsGroup=d}),define(J[418],ee([0,1,8,97,60,99]),function(j,e,w,N,T,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MonospaceLineBreaksComputerFactory=void 0;class S extends N.CharacterClassifier{constructor(r,o){super(0);for(let i=0;i<r.length;i++)this.set(r.charCodeAt(i),1);for(let i=0;i<o.length;i++)this.set(o.charCodeAt(i),2)}get(r){return r>=0&&r<256?this._asciiMap[r]:r>=12352&&r<=12543||r>=13312&&r<=19903||r>=19968&&r<=40959?3:this._map.get(r)||this._defaultValue}}let p=[],C=[];class n{constructor(r,o){this.classifier=new S(r,o)}static create(r){return new n(r.get(118),r.get(117))}createLineBreaksComputer(r,o,i,l){o=o|0,i=+i;const h=[],f=[],y=[];return{addRequest:(_,b,v)=>{h.push(_),f.push(b),y.push(v)},finalize:()=>{const _=r.typicalFullwidthCharacterWidth/r.typicalHalfwidthCharacterWidth;let b=[];for(let v=0,m=h.length;v<m;v++){const E=f[v],I=y[v];I&&!I.injectionOptions&&!E?b[v]=g(this.classifier,I,h[v],o,i,_,l):b[v]=t(this.classifier,h[v],E,o,i,_,l)}return p.length=0,C.length=0,b}}}}e.MonospaceLineBreaksComputerFactory=n;function g(a,r,o,i,l,h,f){if(l===-1)return null;const y=o.length;if(y<=1)return null;const _=r.breakOffsets,b=r.breakOffsetsVisibleColumn,v=d(o,i,l,h,f),m=l-v;let E=p,I=C,k=0,M=0,P=0,F=l;const R=_.length;let A=0;if(A>=0){let O=Math.abs(b[A]-F);for(;A+1<R;){const L=Math.abs(b[A+1]-F);if(L>=O)break;O=L,A++}}for(;A<R;){let O=A<0?0:_[A],L=A<0?0:b[A];M>O&&(O=M,L=P);let B=0,W=0,K=0,H=0;if(L<=F){let X=L,Z=O===0?0:o.charCodeAt(O-1),se=O===0?0:a.get(Z),oe=!0;for(let G=O;G<y;G++){const x=G,U=o.charCodeAt(G);let $,V;if(w.isHighSurrogate(U)?(G++,$=0,V=2):($=a.get(U),V=s(U,X,i,h)),x>M&&u(Z,se,U,$)&&(B=x,W=X),X+=V,X>F){x>M?(K=x,H=X-V):(K=G+1,H=X),X-W>m&&(B=0),oe=!1;break}Z=U,se=$}if(oe){k>0&&(E[k]=_[_.length-1],I[k]=b[_.length-1],k++);break}}if(B===0){let X=L,Z=o.charCodeAt(O),se=a.get(Z),oe=!1;for(let G=O-1;G>=M;G--){const x=G+1,U=o.charCodeAt(G);if(U===9){oe=!0;break}let $,V;if(w.isLowSurrogate(U)?(G--,$=0,V=2):($=a.get(U),V=w.isFullWidthCharacter(U)?h:1),X<=F){if(K===0&&(K=x,H=X),X<=F-m)break;if(u(U,$,Z,se)){B=x,W=X;break}}X-=V,Z=U,se=$}if(B!==0){const G=m-(H-W);if(G<=i){const x=o.charCodeAt(K);let U;w.isHighSurrogate(x)?U=2:U=s(x,H,i,h),G-U<0&&(B=0)}}if(oe){A--;continue}}if(B===0&&(B=K,W=H),B<=M){const X=o.charCodeAt(M);w.isHighSurrogate(X)?(B=M+2,W=P+2):(B=M+1,W=P+s(X,P,i,h))}for(M=B,E[k]=B,P=W,I[k]=W,k++,F=W+m;A<0||A<R&&b[A]<W;)A++;let Y=Math.abs(b[A]-F);for(;A+1<R;){const X=Math.abs(b[A+1]-F);if(X>=Y)break;Y=X,A++}}return k===0?null:(E.length=k,I.length=k,p=r.breakOffsets,C=r.breakOffsetsVisibleColumn,r.breakOffsets=E,r.breakOffsetsVisibleColumn=I,r.wrappedTextIndentLength=v,r)}function t(a,r,o,i,l,h,f){const y=D.LineInjectedText.applyInjectedText(r,o);let _,b;if(o&&o.length>0?(_=o.map(W=>W.options),b=o.map(W=>W.column-1)):(_=null,b=null),l===-1)return _?new T.LineBreakData([y.length],[],0,b,_):null;const v=y.length;if(v<=1)return _?new T.LineBreakData([y.length],[],0,b,_):null;const m=d(y,i,l,h,f),E=l-m;let I=[],k=[],M=0,P=0,F=0,R=l,A=y.charCodeAt(0),O=a.get(A),L=s(A,0,i,h),B=1;w.isHighSurrogate(A)&&(L+=1,A=y.charCodeAt(1),O=a.get(A),B++);for(let W=B;W<v;W++){const K=W,H=y.charCodeAt(W);let Y,X;w.isHighSurrogate(H)?(W++,Y=0,X=2):(Y=a.get(H),X=s(H,L,i,h)),u(A,O,H,Y)&&(P=K,F=L),L+=X,L>R&&((P===0||L-F>E)&&(P=K,F=L-X),I[M]=P,k[M]=F,M++,R=F+E,P=0),A=H,O=Y}return M===0&&(!o||o.length===0)?null:(I[M]=v,k[M]=L,new T.LineBreakData(I,k,m,b,_))}function s(a,r,o,i){return a===9?o-r%o:w.isFullWidthCharacter(a)||a<32?i:1}function c(a,r){return r-a%r}function u(a,r,o,i){return o!==32&&(r===2||r===3&&i!==2||i===1||i===3&&r!==1)}function d(a,r,o,i,l){let h=0;if(l!==0){const f=w.firstNonWhitespaceIndex(a);if(f!==-1){for(let _=0;_<f;_++)h+=a.charCodeAt(_)===9?c(h,r):1;const y=l===3?2:l===2?1:0;for(let _=0;_<y;_++)h+=c(h,r);h+i>o&&(h=0)}}return h}}),define(J[182],ee([0,1,4,2]),function(j,e,w,N){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ReadOnlyEditAttemptEvent=e.CursorStateChangedEvent=e.HiddenAreasChangedEvent=e.ViewZonesChangedEvent=e.ScrollChangedEvent=e.FocusChangedEvent=e.ContentSizeChangedEvent=e.ViewModelEventsCollector=e.ViewModelEventDispatcher=void 0;class T extends N.Disposable{constructor(){super();this._onEvent=this._register(new w.Emitter),this.onEvent=this._onEvent.event,this._eventHandlers=[],this._viewEventQueue=null,this._isConsumingViewEventQueue=!1,this._collector=null,this._collectorCnt=0,this._outgoingEvents=[]}emitOutgoingEvent(u){this._addOutgoingEvent(u),this._emitOutgoingEvents()}_addOutgoingEvent(u){for(let d=0,a=this._outgoingEvents.length;d<a;d++)if(this._outgoingEvents[d].kind===u.kind){this._outgoingEvents[d]=this._outgoingEvents[d].merge(u);return}this._outgoingEvents.push(u)}_emitOutgoingEvents(){for(;this._outgoingEvents.length>0;){if(this._collector||this._isConsumingViewEventQueue)return;const u=this._outgoingEvents.shift();u.isNoOp()||this._onEvent.fire(u)}}addViewEventHandler(u){for(let d=0,a=this._eventHandlers.length;d<a;d++)this._eventHandlers[d]===u&&console.warn("Detected duplicate listener in ViewEventDispatcher",u);this._eventHandlers.push(u)}removeViewEventHandler(u){for(let d=0;d<this._eventHandlers.length;d++)if(this._eventHandlers[d]===u){this._eventHandlers.splice(d,1);break}}beginEmitViewEvents(){return this._collectorCnt++,this._collectorCnt===1&&(this._collector=new D),this._collector}endEmitViewEvents(){if(this._collectorCnt--,this._collectorCnt===0){const u=this._collector.outgoingEvents,d=this._collector.viewEvents;this._collector=null;for(const a of u)this._addOutgoingEvent(a);d.length>0&&this._emitMany(d)}this._emitOutgoingEvents()}emitSingleViewEvent(u){try{this.beginEmitViewEvents().emitViewEvent(u)}finally{this.endEmitViewEvents()}}_emitMany(u){this._viewEventQueue?this._viewEventQueue=this._viewEventQueue.concat(u):this._viewEventQueue=u,this._isConsumingViewEventQueue||this._consumeViewEventQueue()}_consumeViewEventQueue(){try{this._isConsumingViewEventQueue=!0,this._doConsumeQueue()}finally{this._isConsumingViewEventQueue=!1}}_doConsumeQueue(){for(;this._viewEventQueue;){const u=this._viewEventQueue;this._viewEventQueue=null;const d=this._eventHandlers.slice(0);for(const a of d)a.handleEvents(u)}}}e.ViewModelEventDispatcher=T;class D{constructor(){this.viewEvents=[],this.outgoingEvents=[]}emitViewEvent(u){this.viewEvents.push(u)}emitOutgoingEvent(u){this.outgoingEvents.push(u)}}e.ViewModelEventsCollector=D;class S{constructor(u,d,a,r){this.kind=0,this._oldContentWidth=u,this._oldContentHeight=d,this.contentWidth=a,this.contentHeight=r,this.contentWidthChanged=this._oldContentWidth!==this.contentWidth,this.contentHeightChanged=this._oldContentHeight!==this.contentHeight}isNoOp(){return!this.contentWidthChanged&&!this.contentHeightChanged}merge(u){return u.kind!==0?this:new S(this._oldContentWidth,this._oldContentHeight,u.contentWidth,u.contentHeight)}}e.ContentSizeChangedEvent=S;class p{constructor(u,d){this.kind=1,this.oldHasFocus=u,this.hasFocus=d}isNoOp(){return this.oldHasFocus===this.hasFocus}merge(u){return u.kind!==1?this:new p(this.oldHasFocus,u.hasFocus)}}e.FocusChangedEvent=p;class C{constructor(u,d,a,r,o,i,l,h){this.kind=2,this._oldScrollWidth=u,this._oldScrollLeft=d,this._oldScrollHeight=a,this._oldScrollTop=r,this.scrollWidth=o,this.scrollLeft=i,this.scrollHeight=l,this.scrollTop=h,this.scrollWidthChanged=this._oldScrollWidth!==this.scrollWidth,this.scrollLeftChanged=this._oldScrollLeft!==this.scrollLeft,this.scrollHeightChanged=this._oldScrollHeight!==this.scrollHeight,this.scrollTopChanged=this._oldScrollTop!==this.scrollTop}isNoOp(){return!this.scrollWidthChanged&&!this.scrollLeftChanged&&!this.scrollHeightChanged&&!this.scrollTopChanged}merge(u){return u.kind!==2?this:new C(this._oldScrollWidth,this._oldScrollLeft,this._oldScrollHeight,this._oldScrollTop,u.scrollWidth,u.scrollLeft,u.scrollHeight,u.scrollTop)}}e.ScrollChangedEvent=C;class n{constructor(){this.kind=3}isNoOp(){return!1}merge(u){return this}}e.ViewZonesChangedEvent=n;class g{constructor(){this.kind=4}isNoOp(){return!1}merge(u){return this}}e.HiddenAreasChangedEvent=g;class t{constructor(u,d,a,r,o,i,l){this.kind=6,this.oldSelections=u,this.selections=d,this.oldModelVersionId=a,this.modelVersionId=r,this.source=o,this.reason=i,this.reachedMaxCursorCount=l}static _selectionsAreEqual(u,d){if(!u&&!d)return!0;if(!u||!d)return!1;const a=u.length,r=d.length;if(a!==r)return!1;for(let o=0;o<a;o++)if(!u[o].equalsSelection(d[o]))return!1;return!0}isNoOp(){return t._selectionsAreEqual(this.oldSelections,this.selections)&&this.oldModelVersionId===this.modelVersionId}merge(u){return u.kind!==6?this:new t(this.oldSelections,u.selections,this.oldModelVersionId,u.modelVersionId,u.source,u.reason,this.reachedMaxCursorCount||u.reachedMaxCursorCount)}}e.CursorStateChangedEvent=t;class s{constructor(){this.kind=5}isNoOp(){return!1}merge(u){return this}}e.ReadOnlyEditAttemptEvent=s}),define(J[419],ee([0,1,4,2,133,407,60,182]),function(j,e,w,N,T,D,S,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ViewLayout=void 0;const C=125;class n{constructor(c,u,d,a){c=c|0,u=u|0,d=d|0,a=a|0,c<0&&(c=0),u<0&&(u=0),d<0&&(d=0),a<0&&(a=0),this.width=c,this.contentWidth=u,this.scrollWidth=Math.max(c,u),this.height=d,this.contentHeight=a,this.scrollHeight=Math.max(d,a)}equals(c){return this.width===c.width&&this.contentWidth===c.contentWidth&&this.height===c.height&&this.contentHeight===c.contentHeight}}class g extends N.Disposable{constructor(c,u){super();this._onDidContentSizeChange=this._register(new w.Emitter),this.onDidContentSizeChange=this._onDidContentSizeChange.event,this._dimensions=new n(0,0,0,0),this._scrollable=this._register(new T.Scrollable(c,u)),this.onDidScroll=this._scrollable.onScroll}getScrollable(){return this._scrollable}setSmoothScrollDuration(c){this._scrollable.setSmoothScrollDuration(c)}validateScrollPosition(c){return this._scrollable.validateScrollPosition(c)}getScrollDimensions(){return this._dimensions}setScrollDimensions(c){if(this._dimensions.equals(c))return;const u=this._dimensions;this._dimensions=c,this._scrollable.setScrollDimensions({width:c.width,scrollWidth:c.scrollWidth,height:c.height,scrollHeight:c.scrollHeight},!0);const d=u.contentWidth!==c.contentWidth,a=u.contentHeight!==c.contentHeight;(d||a)&&this._onDidContentSizeChange.fire(new p.ContentSizeChangedEvent(u.contentWidth,u.contentHeight,c.contentWidth,c.contentHeight))}getFutureScrollPosition(){return this._scrollable.getFutureScrollPosition()}getCurrentScrollPosition(){return this._scrollable.getCurrentScrollPosition()}setScrollPositionNow(c){this._scrollable.setScrollPositionNow(c)}setScrollPositionSmooth(c){this._scrollable.setScrollPositionSmooth(c)}}class t extends N.Disposable{constructor(c,u,d){super();this._configuration=c;const a=this._configuration.options,r=a.get(129),o=a.get(74);this._linesLayout=new D.LinesLayout(u,a.get(58),o.top,o.bottom),this._scrollable=this._register(new g(0,d)),this._configureSmoothScrollDuration(),this._scrollable.setScrollDimensions(new n(r.contentWidth,0,r.height,0)),this.onDidScroll=this._scrollable.onDidScroll,this.onDidContentSizeChange=this._scrollable.onDidContentSizeChange,this._updateHeight()}dispose(){super.dispose()}getScrollable(){return this._scrollable.getScrollable()}onHeightMaybeChanged(){this._updateHeight()}_configureSmoothScrollDuration(){this._scrollable.setSmoothScrollDuration(this._configuration.options.get(102)?C:0)}onConfigurationChanged(c){const u=this._configuration.options;if(c.hasChanged(58)&&this._linesLayout.setLineHeight(u.get(58)),c.hasChanged(74)){const d=u.get(74);this._linesLayout.setPadding(d.top,d.bottom)}if(c.hasChanged(129)){const d=u.get(129),a=d.contentWidth,r=d.height,o=this._scrollable.getScrollDimensions(),i=o.contentWidth;this._scrollable.setScrollDimensions(new n(a,o.contentWidth,r,this._getContentHeight(a,r,i)))}else this._updateHeight();c.hasChanged(102)&&this._configureSmoothScrollDuration()}onFlushed(c){this._linesLayout.onFlushed(c)}onLinesDeleted(c,u){this._linesLayout.onLinesDeleted(c,u)}onLinesInserted(c,u){this._linesLayout.onLinesInserted(c,u)}_getHorizontalScrollbarHeight(c,u){const a=this._configuration.options.get(91);return a.horizontal===2||c>=u?0:a.horizontalScrollbarSize}_getContentHeight(c,u,d){const a=this._configuration.options;let r=this._linesLayout.getLinesTotalHeight();return a.get(93)?r+=Math.max(0,u-a.get(58)-a.get(74).bottom):r+=this._getHorizontalScrollbarHeight(c,d),r}_updateHeight(){const c=this._scrollable.getScrollDimensions(),u=c.width,d=c.height,a=c.contentWidth;this._scrollable.setScrollDimensions(new n(u,c.contentWidth,d,this._getContentHeight(u,d,a)))}getCurrentViewport(){const c=this._scrollable.getScrollDimensions(),u=this._scrollable.getCurrentScrollPosition();return new S.Viewport(u.scrollTop,u.scrollLeft,c.width,c.height)}getFutureViewport(){const c=this._scrollable.getScrollDimensions(),u=this._scrollable.getFutureScrollPosition();return new S.Viewport(u.scrollTop,u.scrollLeft,c.width,c.height)}_computeContentWidth(c){const u=this._configuration.options,d=u.get(130),a=u.get(43);if(d.isViewportWrapping){const r=u.get(129),o=u.get(64);return c>r.contentWidth+a.typicalHalfwidthCharacterWidth&&o.enabled&&o.side==="right"?c+r.verticalScrollbarWidth:c}else{const r=u.get(92)*a.typicalHalfwidthCharacterWidth,o=this._linesLayout.getWhitespaceMinWidth();return Math.max(c+r,o)}}setMaxLineWidth(c){const u=this._scrollable.getScrollDimensions();this._scrollable.setScrollDimensions(new n(u.width,this._computeContentWidth(c),u.height,u.contentHeight)),this._updateHeight()}saveState(){const c=this._scrollable.getFutureScrollPosition();let u=c.scrollTop,d=this._linesLayout.getLineNumberAtOrAfterVerticalOffset(u),a=this._linesLayout.getWhitespaceAccumulatedHeightBeforeLineNumber(d);return{scrollTop:u,scrollTopWithoutViewZones:u-a,scrollLeft:c.scrollLeft}}changeWhitespace(c){const u=this._linesLayout.changeWhitespace(c);return u&&this.onHeightMaybeChanged(),u}getVerticalOffsetForLineNumber(c){return this._linesLayout.getVerticalOffsetForLineNumber(c)}isAfterLines(c){return this._linesLayout.isAfterLines(c)}isInTopPadding(c){return this._linesLayout.isInTopPadding(c)}isInBottomPadding(c){return this._linesLayout.isInBottomPadding(c)}getLineNumberAtVerticalOffset(c){return this._linesLayout.getLineNumberAtOrAfterVerticalOffset(c)}getWhitespaceAtVerticalOffset(c){return this._linesLayout.getWhitespaceAtVerticalOffset(c)}getLinesViewportData(){const c=this.getCurrentViewport();return this._linesLayout.getLinesViewportData(c.top,c.top+c.height)}getLinesViewportDataAtScrollTop(c){const u=this._scrollable.getScrollDimensions();return c+u.height>u.scrollHeight&&(c=u.scrollHeight-u.height),c<0&&(c=0),this._linesLayout.getLinesViewportData(c,c+u.height)}getWhitespaceViewportData(){const c=this.getCurrentViewport();return this._linesLayout.getWhitespaceViewportData(c.top,c.top+c.height)}getWhitespaces(){return this._linesLayout.getWhitespaces()}getContentWidth(){return this._scrollable.getScrollDimensions().contentWidth}getScrollWidth(){return this._scrollable.getScrollDimensions().scrollWidth}getContentHeight(){return this._scrollable.getScrollDimensions().contentHeight}getScrollHeight(){return this._scrollable.getScrollDimensions().scrollHeight}getCurrentScrollLeft(){return this._scrollable.getCurrentScrollPosition().scrollLeft}getCurrentScrollTop(){return this._scrollable.getCurrentScrollPosition().scrollTop}validateScrollPosition(c){return this._scrollable.validateScrollPosition(c)}setScrollPosition(c,u){u===1?this._scrollable.setScrollPositionNow(c):this._scrollable.setScrollPositionSmooth(c)}deltaScrollNow(c,u){const d=this._scrollable.getCurrentScrollPosition();this._scrollable.setScrollPositionNow({scrollLeft:d.scrollLeft+c,scrollTop:d.scrollTop+u})}}e.ViewLayout=t}),define(J[420],ee([0,1,3,22]),function(j,e,w,N){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MoveCaretCommand=void 0;class T{constructor(S,p){this._selection=S,this._isMovingLeft=p}getEditOperations(S,p){if(this._selection.startLineNumber!==this._selection.endLineNumber||this._selection.isEmpty())return;const C=this._selection.startLineNumber,n=this._selection.startColumn,g=this._selection.endColumn;if(!(this._isMovingLeft&&n===1)&&!(!this._isMovingLeft&&g===S.getLineMaxColumn(C)))if(this._isMovingLeft){const t=new w.Range(C,n-1,C,n),s=S.getValueInRange(t);p.addEditOperation(t,null),p.addEditOperation(new w.Range(C,g,C,g),s)}else{const t=new w.Range(C,g,C,g+1),s=S.getValueInRange(t);p.addEditOperation(t,null),p.addEditOperation(new w.Range(C,n,C,n),s)}}computeCursorState(S,p){return this._isMovingLeft?new N.Selection(this._selection.startLineNumber,this._selection.startColumn-1,this._selection.endLineNumber,this._selection.endColumn-1):new N.Selection(this._selection.startLineNumber,this._selection.startColumn+1,this._selection.endLineNumber,this._selection.endColumn+1)}}e.MoveCaretCommand=T}),define(J[145],ee([0,1]),function(j,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CodeActionCommandArgs=e.filtersAction=e.mayIncludeActionsOfKind=e.CodeActionKind=void 0;class w{constructor(C){this.value=C}equals(C){return this.value===C.value}contains(C){return this.equals(C)||this.value===""||C.value.startsWith(this.value+w.sep)}intersects(C){return this.contains(C)||C.contains(this)}append(C){return new w(this.value+w.sep+C)}}e.CodeActionKind=w,w.sep=".",w.None=new w("@@none@@"),w.Empty=new w(""),w.QuickFix=new w("quickfix"),w.Refactor=new w("refactor"),w.Source=new w("source"),w.SourceOrganizeImports=w.Source.append("organizeImports"),w.SourceFixAll=w.Source.append("fixAll");function N(p,C){return!(p.include&&!p.include.intersects(C)||p.excludes&&p.excludes.some(n=>D(C,n,p.include))||!p.includeSourceActions&&w.Source.contains(C))}e.mayIncludeActionsOfKind=N;function T(p,C){const n=C.kind?new w(C.kind):void 0;return!(p.include&&(!n||!p.include.contains(n))||p.excludes&&n&&p.excludes.some(g=>D(n,g,p.include))||!p.includeSourceActions&&n&&w.Source.contains(n)||p.onlyIncludePreferredActions&&!C.isPreferred)}e.filtersAction=T;function D(p,C,n){return!(!C.contains(p)||n&&C.contains(n))}class S{constructor(C,n,g){this.kind=C,this.apply=n,this.preferred=g}static fromUser(C,n){return!C||typeof C!="object"?new S(n.kind,n.apply,!1):new S(S.getKindFromUser(C,n.kind),S.getApplyFromUser(C,n.apply),S.getPreferredUser(C))}static getApplyFromUser(C,n){switch(typeof C.apply=="string"?C.apply.toLowerCase():""){case"first":return"first";case"never":return"never";case"ifsingle":return"ifSingle";default:return n}}static getKindFromUser(C,n){return typeof C.kind=="string"?new w(C.kind):n}static getPreferredUser(C){return typeof C.preferred=="boolean"?C.preferred:!1}}e.CodeActionCommandArgs=S}),define(J[421],ee([0,1,4]),function(j,e,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ColorPickerModel=void 0;class N{constructor(D,S,p){this.presentationIndex=p,this._onColorFlushed=new w.Emitter,this.onColorFlushed=this._onColorFlushed.event,this._onDidChangeColor=new w.Emitter,this.onDidChangeColor=this._onDidChangeColor.event,this._onDidChangePresentation=new w.Emitter,this.onDidChangePresentation=this._onDidChangePresentation.event,this.originalColor=D,this._color=D,this._colorPresentations=S}get color(){return this._color}set color(D){this._color.equals(D)||(this._color=D,this._onDidChangeColor.fire(D))}get presentation(){return this.colorPresentations[this.presentationIndex]}get colorPresentations(){return this._colorPresentations}set colorPresentations(D){this._colorPresentations=D,this.presentationIndex>D.length-1&&(this.presentationIndex=0),this._onDidChangePresentation.fire(this.presentation)}selectNextColorPresentation(){this.presentationIndex=(this.presentationIndex+1)%this.colorPresentations.length,this.flushColor(),this._onDidChangePresentation.fire(this.presentation)}guessColorPresentation(D,S){for(let p=0;p<this.colorPresentations.length;p++)if(S.toLowerCase()===this.colorPresentations[p].label){this.presentationIndex=p,this._onDidChangePresentation.fire(this.presentation);break}}flushColor(){this._onColorFlushed.fire(this._color)}}e.ColorPickerModel=N}),define(J[422],ee([0,1,3,22]),function(j,e,w,N){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DragAndDropCommand=void 0;class T{constructor(S,p,C){this.selection=S,this.targetPosition=p,this.copy=C,this.targetSelection=null}getEditOperations(S,p){let C=S.getValueInRange(this.selection);if(this.copy||p.addEditOperation(this.selection,null),p.addEditOperation(new w.Range(this.targetPosition.lineNumber,this.targetPosition.column,this.targetPosition.lineNumber,this.targetPosition.column),C),this.selection.containsPosition(this.targetPosition)&&!(this.copy&&(this.selection.getEndPosition().equals(this.targetPosition)||this.selection.getStartPosition().equals(this.targetPosition)))){this.targetSelection=this.selection;return}if(this.copy){this.targetSelection=new N.Selection(this.targetPosition.lineNumber,this.targetPosition.column,this.selection.endLineNumber-this.selection.startLineNumber+this.targetPosition.lineNumber,this.selection.startLineNumber===this.selection.endLineNumber?this.targetPosition.column+this.selection.endColumn-this.selection.startColumn:this.selection.endColumn);return}if(this.targetPosition.lineNumber>this.selection.endLineNumber){this.targetSelection=new N.Selection(this.targetPosition.lineNumber-this.selection.endLineNumber+this.selection.startLineNumber,this.targetPosition.column,this.targetPosition.lineNumber,this.selection.startLineNumber===this.selection.endLineNumber?this.targetPosition.column+this.selection.endColumn-this.selection.startColumn:this.selection.endColumn);return}if(this.targetPosition.lineNumber<this.selection.endLineNumber){this.targetSelection=new N.Selection(this.targetPosition.lineNumber,this.targetPosition.column,this.targetPosition.lineNumber+this.selection.endLineNumber-this.selection.startLineNumber,this.selection.startLineNumber===this.selection.endLineNumber?this.targetPosition.column+this.selection.endColumn-this.selection.startColumn:this.selection.endColumn);return}this.selection.endColumn<=this.targetPosition.column?this.targetSelection=new N.Selection(this.targetPosition.lineNumber-this.selection.endLineNumber+this.selection.startLineNumber,this.selection.startLineNumber===this.selection.endLineNumber?this.targetPosition.column-this.selection.endColumn+this.selection.startColumn:this.targetPosition.column-this.selection.endColumn+this.selection.startColumn,this.targetPosition.lineNumber,this.selection.startLineNumber===this.selection.endLineNumber?this.targetPosition.column:this.selection.endColumn):this.targetSelection=new N.Selection(this.targetPosition.lineNumber-this.selection.endLineNumber+this.selection.startLineNumber,this.targetPosition.column,this.targetPosition.lineNumber,this.targetPosition.column+this.selection.endColumn-this.selection.startColumn)}computeCursorState(S,p){return this.targetSelection}}e.DragAndDropCommand=T}),define(J[423],ee([0,1,3]),function(j,e,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ReplaceAllCommand=void 0;class N{constructor(D,S,p){this._editorSelection=D,this._ranges=S,this._replaceStrings=p,this._trackedEditorSelectionId=null}getEditOperations(D,S){if(this._ranges.length>0){let p=[];for(let g=0;g<this._ranges.length;g++)p.push({range:this._ranges[g],text:this._replaceStrings[g]});p.sort((g,t)=>w.Range.compareRangesUsingStarts(g.range,t.range));let C=[],n=p[0];for(let g=1;g<p.length;g++)n.range.endLineNumber===p[g].range.startLineNumber&&n.range.endColumn===p[g].range.startColumn?(n.range=n.range.plusRange(p[g].range),n.text=n.text+p[g].text):(C.push(n),n=p[g]);C.push(n);for(const g of C)S.addEditOperation(g.range,g.text)}this._trackedEditorSelectionId=S.trackSelection(this._editorSelection)}computeCursorState(D,S){return S.getTrackedSelection(this._trackedEditorSelectionId)}}e.ReplaceAllCommand=N}),define(J[424],ee([0,1,306]),function(j,e,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.parseReplaceString=e.ReplacePiece=e.ReplacePattern=void 0;class N{constructor(g){this.staticValue=g,this.kind=0}}class T{constructor(g){this.pieces=g,this.kind=1}}class D{constructor(g){!g||g.length===0?this._state=new N(""):g.length===1&&g[0].staticValue!==null?this._state=new N(g[0].staticValue):this._state=new T(g)}static fromStaticValue(g){return new D([S.staticValue(g)])}get hasReplacementPatterns(){return this._state.kind===1}buildReplaceString(g,t){if(this._state.kind===0)return t?(0,w.buildReplaceStringWithCasePreserved)(g,this._state.staticValue):this._state.staticValue;let s="";for(let c=0,u=this._state.pieces.length;c<u;c++){let d=this._state.pieces[c];if(d.staticValue!==null){s+=d.staticValue;continue}let a=D._substitute(d.matchIndex,g);if(d.caseOps!==null&&d.caseOps.length>0){let r=[],o=d.caseOps.length,i=0;for(let l=0,h=a.length;l<h;l++){if(i>=o){r.push(a.slice(l));break}switch(d.caseOps[i]){case"U":r.push(a[l].toUpperCase());break;case"u":r.push(a[l].toUpperCase()),i++;break;case"L":r.push(a[l].toLowerCase());break;case"l":r.push(a[l].toLowerCase()),i++;break;default:r.push(a[l])}}a=r.join("")}s+=a}return s}static _substitute(g,t){if(t===null)return"";if(g===0)return t[0];let s="";for(;g>0;){if(g<t.length)return(t[g]||"")+s;s=String(g%10)+s,g=Math.floor(g/10)}return"$"+s}}e.ReplacePattern=D;class S{constructor(g,t,s){this.staticValue=g,this.matchIndex=t,!s||s.length===0?this.caseOps=null:this.caseOps=s.slice(0)}static staticValue(g){return new S(g,-1,null)}static caseOps(g,t){return new S(null,g,t)}}e.ReplacePiece=S;class p{constructor(g){this._source=g,this._lastCharIndex=0,this._result=[],this._resultLen=0,this._currentStaticPiece=""}emitUnchanged(g){this._emitStatic(this._source.substring(this._lastCharIndex,g)),this._lastCharIndex=g}emitStatic(g,t){this._emitStatic(g),this._lastCharIndex=t}_emitStatic(g){g.length!==0&&(this._currentStaticPiece+=g)}emitMatchIndex(g,t,s){this._currentStaticPiece.length!==0&&(this._result[this._resultLen++]=S.staticValue(this._currentStaticPiece),this._currentStaticPiece=""),this._result[this._resultLen++]=S.caseOps(g,s),this._lastCharIndex=t}finalize(){return this.emitUnchanged(this._source.length),this._currentStaticPiece.length!==0&&(this._result[this._resultLen++]=S.staticValue(this._currentStaticPiece),this._currentStaticPiece=""),new D(this._result)}}function C(n){if(!n||n.length===0)return new D(null);let g=[],t=new p(n);for(let s=0,c=n.length;s<c;s++){let u=n.charCodeAt(s);if(u===92){if(s++,s>=c)break;let d=n.charCodeAt(s);switch(d){case 92:t.emitUnchanged(s-1),t.emitStatic("\\",s+1);break;case 110:t.emitUnchanged(s-1),t.emitStatic(`
`,s+1);break;case 116:t.emitUnchanged(s-1),t.emitStatic("    ",s+1);break;case 117:case 85:case 108:case 76:t.emitUnchanged(s-1),t.emitStatic("",s+1),g.push(String.fromCharCode(d));break}continue}if(u===36){if(s++,s>=c)break;let d=n.charCodeAt(s);if(d===36){t.emitUnchanged(s-1),t.emitStatic("$",s+1);continue}if(d===48||d===38){t.emitUnchanged(s-1),t.emitMatchIndex(0,s+1,g),g.length=0;continue}if(49<=d&&d<=57){let a=d-48;if(s+1<c){let r=n.charCodeAt(s+1);if(48<=r&&r<=57){s++,a=a*10+(r-48),t.emitUnchanged(s-2),t.emitMatchIndex(a,s+1,g),g.length=0;continue}}t.emitUnchanged(s-1),t.emitMatchIndex(a,s+1,g),g.length=0;continue}}}return t.finalize()}e.parseReplaceString=C}),define(J[183],ee([0,1]),function(j,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.FoldingRegion=e.FoldingRegions=e.MAX_LINE_NUMBER=e.MAX_FOLDING_REGIONS=void 0,e.MAX_FOLDING_REGIONS=65535,e.MAX_LINE_NUMBER=16777215;const w=4278190080;class N{constructor(S,p,C){if(S.length!==p.length||S.length>e.MAX_FOLDING_REGIONS)throw new Error("invalid startIndexes or endIndexes size");this._startIndexes=S,this._endIndexes=p,this._collapseStates=new Uint32Array(Math.ceil(S.length/32)),this._types=C,this._parentsComputed=!1}ensureParentIndices(){if(!this._parentsComputed){this._parentsComputed=!0;let S=[],p=(C,n)=>{let g=S[S.length-1];return this.getStartLineNumber(g)<=C&&this.getEndLineNumber(g)>=n};for(let C=0,n=this._startIndexes.length;C<n;C++){let g=this._startIndexes[C],t=this._endIndexes[C];if(g>e.MAX_LINE_NUMBER||t>e.MAX_LINE_NUMBER)throw new Error("startLineNumber or endLineNumber must not exceed "+e.MAX_LINE_NUMBER);for(;S.length>0&&!p(g,t);)S.pop();let s=S.length>0?S[S.length-1]:-1;S.push(C),this._startIndexes[C]=g+((s&255)<<24),this._endIndexes[C]=t+((s&65280)<<16)}}}get length(){return this._startIndexes.length}getStartLineNumber(S){return this._startIndexes[S]&e.MAX_LINE_NUMBER}getEndLineNumber(S){return this._endIndexes[S]&e.MAX_LINE_NUMBER}getType(S){return this._types?this._types[S]:void 0}hasTypes(){return!!this._types}isCollapsed(S){let p=S/32|0,C=S%32;return(this._collapseStates[p]&1<<C)!=0}setCollapsed(S,p){let C=S/32|0,n=S%32,g=this._collapseStates[C];p?this._collapseStates[C]=g|1<<n:this._collapseStates[C]=g&~(1<<n)}setCollapsedAllOfType(S,p){let C=!1;if(this._types)for(let n=0;n<this._types.length;n++)this._types[n]===S&&(this.setCollapsed(n,p),C=!0);return C}toRegion(S){return new T(this,S)}getParentIndex(S){this.ensureParentIndices();let p=((this._startIndexes[S]&w)>>>24)+((this._endIndexes[S]&w)>>>16);return p===e.MAX_FOLDING_REGIONS?-1:p}contains(S,p){return this.getStartLineNumber(S)<=p&&this.getEndLineNumber(S)>=p}findIndex(S){let p=0,C=this._startIndexes.length;if(C===0)return-1;for(;p<C;){let n=Math.floor((p+C)/2);S<this.getStartLineNumber(n)?C=n:p=n+1}return p-1}findRange(S){let p=this.findIndex(S);if(p>=0){if(this.getEndLineNumber(p)>=S)return p;for(p=this.getParentIndex(p);p!==-1;){if(this.contains(p,S))return p;p=this.getParentIndex(p)}}return-1}toString(){let S=[];for(let p=0;p<this.length;p++)S[p]=`[${this.isCollapsed(p)?"+":"-"}] ${this.getStartLineNumber(p)}/${this.getEndLineNumber(p)}`;return S.join(", ")}}e.FoldingRegions=N;class T{constructor(S,p){this.ranges=S,this.index=p}get startLineNumber(){return this.ranges.getStartLineNumber(this.index)}get endLineNumber(){return this.ranges.getEndLineNumber(this.index)}get regionIndex(){return this.index}get parentIndex(){return this.ranges.getParentIndex(this.index)}get isCollapsed(){return this.ranges.isCollapsed(this.index)}containedBy(S){return S.startLineNumber<=this.startLineNumber&&S.endLineNumber>=this.endLineNumber}containsLine(S){return this.startLineNumber<=S&&S<=this.endLineNumber}}e.FoldingRegion=T}),define(J[425],ee([0,1,4,183]),function(j,e,w,N){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getNextFoldLine=e.getPreviousFoldLine=e.getParentFoldLine=e.setCollapseStateForType=e.setCollapseStateForMatchingLines=e.setCollapseStateForRest=e.setCollapseStateAtLevel=e.setCollapseStateUp=e.setCollapseStateLevelsUp=e.setCollapseStateLevelsDown=e.toggleCollapseState=e.FoldingModel=void 0;class T{constructor(r,o){this._updateEventEmitter=new w.Emitter,this.onDidChange=this._updateEventEmitter.event,this._textModel=r,this._decorationProvider=o,this._regions=new N.FoldingRegions(new Uint32Array(0),new Uint32Array(0)),this._editorDecorationIds=[],this._isInitialized=!1}get regions(){return this._regions}get textModel(){return this._textModel}get isInitialized(){return this._isInitialized}toggleCollapseState(r){if(!r.length)return;r=r.sort((i,l)=>i.regionIndex-l.regionIndex);const o={};this._decorationProvider.changeDecorations(i=>{let l=0,h=-1,f=-1;const y=_=>{for(;l<_;){const b=this._regions.getEndLineNumber(l),v=this._regions.isCollapsed(l);b<=h&&i.changeDecorationOptions(this._editorDecorationIds[l],this._decorationProvider.getDecorationOption(v,b<=f)),v&&b>f&&(f=b),l++}};for(let _ of r){let b=_.regionIndex,v=this._editorDecorationIds[b];if(v&&!o[v]){o[v]=!0,y(b);let m=!this._regions.isCollapsed(b);this._regions.setCollapsed(b,m),h=Math.max(h,this._regions.getEndLineNumber(b))}}y(this._regions.length)}),this._updateEventEmitter.fire({model:this,collapseStateChanged:r})}update(r,o=[]){let i=[],l=(m,E)=>{for(let I of o)if(m<I&&I<=E)return!0;return!1},h=-1,f=(m,E)=>{const I=r.getStartLineNumber(m),k=r.getEndLineNumber(m);E||(E=r.isCollapsed(m)),E&&l(I,k)&&(E=!1),r.setCollapsed(m,E);const M=this._textModel.getLineMaxColumn(I),P={startLineNumber:I,startColumn:Math.max(M-1,1),endLineNumber:I,endColumn:M};i.push({range:P,options:this._decorationProvider.getDecorationOption(E,k<=h)}),E&&k>h&&(h=k)},y=0,_=()=>{for(;y<this._regions.length;){let m=this._regions.isCollapsed(y);if(y++,m)return y-1}return-1},b=0,v=_();for(;v!==-1&&b<r.length;){let m=this._textModel.getDecorationRange(this._editorDecorationIds[v]);if(m){let E=m.startLineNumber;if(m.startColumn===Math.max(m.endColumn-1,1)&&this._textModel.getLineMaxColumn(E)===m.endColumn)for(;b<r.length;){let I=r.getStartLineNumber(b);if(E>=I)f(b,E===I),b++;else break}}v=_()}for(;b<r.length;)f(b,!1),b++;this._editorDecorationIds=this._decorationProvider.deltaDecorations(this._editorDecorationIds,i),this._regions=r,this._isInitialized=!0,this._updateEventEmitter.fire({model:this})}getMemento(){let r=[];for(let o=0;o<this._regions.length;o++)if(this._regions.isCollapsed(o)){let i=this._textModel.getDecorationRange(this._editorDecorationIds[o]);if(i){let l=i.startLineNumber,h=i.endLineNumber+this._regions.getEndLineNumber(o)-this._regions.getStartLineNumber(o);r.push({startLineNumber:l,endLineNumber:h})}}if(r.length>0)return r}applyMemento(r){if(!Array.isArray(r))return;let o=[];for(let i of r){let l=this.getRegionAtLine(i.startLineNumber);l&&!l.isCollapsed&&o.push(l)}this.toggleCollapseState(o)}dispose(){this._decorationProvider.deltaDecorations(this._editorDecorationIds,[])}getAllRegionsAtLine(r,o){let i=[];if(this._regions){let l=this._regions.findRange(r),h=1;for(;l>=0;){let f=this._regions.toRegion(l);(!o||o(f,h))&&i.push(f),h++,l=f.parentIndex}}return i}getRegionAtLine(r){if(this._regions){let o=this._regions.findRange(r);if(o>=0)return this._regions.toRegion(o)}return null}getRegionsInside(r,o){let i=[],l=r?r.regionIndex+1:0,h=r?r.endLineNumber:Number.MAX_VALUE;if(o&&o.length===2){const f=[];for(let y=l,_=this._regions.length;y<_;y++){let b=this._regions.toRegion(y);if(this._regions.getStartLineNumber(y)<h){for(;f.length>0&&!b.containedBy(f[f.length-1]);)f.pop();f.push(b),o(b,f.length)&&i.push(b)}else break}}else for(let f=l,y=this._regions.length;f<y;f++){let _=this._regions.toRegion(f);if(this._regions.getStartLineNumber(f)<h)(!o||o(_))&&i.push(_);else break}return i}}e.FoldingModel=T;function D(a,r,o){let i=[];for(let l of o){let h=a.getRegionAtLine(l);if(h){const f=!h.isCollapsed;if(i.push(h),r>1){let y=a.getRegionsInside(h,(_,b)=>_.isCollapsed!==f&&b<r);i.push(...y)}}}a.toggleCollapseState(i)}e.toggleCollapseState=D;function S(a,r,o=Number.MAX_VALUE,i){let l=[];if(i&&i.length>0)for(let h of i){let f=a.getRegionAtLine(h);if(f&&(f.isCollapsed!==r&&l.push(f),o>1)){let y=a.getRegionsInside(f,(_,b)=>_.isCollapsed!==r&&b<o);l.push(...y)}}else{let h=a.getRegionsInside(null,(f,y)=>f.isCollapsed!==r&&y<o);l.push(...h)}a.toggleCollapseState(l)}e.setCollapseStateLevelsDown=S;function p(a,r,o,i){let l=[];for(let h of i){let f=a.getAllRegionsAtLine(h,(y,_)=>y.isCollapsed!==r&&_<=o);l.push(...f)}a.toggleCollapseState(l)}e.setCollapseStateLevelsUp=p;function C(a,r,o){let i=[];for(let l of o){let h=a.getAllRegionsAtLine(l,f=>f.isCollapsed!==r);h.length>0&&i.push(h[0])}a.toggleCollapseState(i)}e.setCollapseStateUp=C;function n(a,r,o,i){let l=(f,y)=>y===r&&f.isCollapsed!==o&&!i.some(_=>f.containsLine(_)),h=a.getRegionsInside(null,l);a.toggleCollapseState(h)}e.setCollapseStateAtLevel=n;function g(a,r,o){let i=[];for(let f of o)i.push(a.getAllRegionsAtLine(f,void 0)[0]);let l=f=>i.every(y=>!y.containedBy(f)&&!f.containedBy(y))&&f.isCollapsed!==r,h=a.getRegionsInside(null,l);a.toggleCollapseState(h)}e.setCollapseStateForRest=g;function t(a,r,o){let i=a.textModel,l=a.regions,h=[];for(let f=l.length-1;f>=0;f--)if(o!==l.isCollapsed(f)){let y=l.getStartLineNumber(f);r.test(i.getLineContent(y))&&h.push(l.toRegion(f))}a.toggleCollapseState(h)}e.setCollapseStateForMatchingLines=t;function s(a,r,o){let i=a.regions,l=[];for(let h=i.length-1;h>=0;h--)o!==i.isCollapsed(h)&&r===i.getType(h)&&l.push(i.toRegion(h));a.toggleCollapseState(l)}e.setCollapseStateForType=s;function c(a,r){let o=null,i=r.getRegionAtLine(a);if(i!==null&&(o=i.startLineNumber,a===o)){let l=i.parentIndex;l!==-1?o=r.regions.getStartLineNumber(l):o=null}return o}e.getParentFoldLine=c;function u(a,r){let o=r.getRegionAtLine(a);if(o!==null&&o.startLineNumber===a){if(a!==o.startLineNumber)return o.startLineNumber;{let i=o.parentIndex,l=0;for(i!==-1&&(l=r.regions.getStartLineNumber(o.parentIndex));o!==null;)if(o.regionIndex>0){if(o=r.regions.toRegion(o.regionIndex-1),o.startLineNumber<=l)return null;if(o.parentIndex===i)return o.startLineNumber}else return null}}else if(r.regions.length>0)for(o=r.regions.toRegion(r.regions.length-1);o!==null;){if(o.startLineNumber<a)return o.startLineNumber;o.regionIndex>0?o=r.regions.toRegion(o.regionIndex-1):o=null}return null}e.getPreviousFoldLine=u;function d(a,r){let o=r.getRegionAtLine(a);if(o!==null&&o.startLineNumber===a){let i=o.parentIndex,l=0;if(i!==-1)l=r.regions.getEndLineNumber(o.parentIndex);else{if(r.regions.length===0)return null;l=r.regions.getEndLineNumber(r.regions.length-1)}for(;o!==null;)if(o.regionIndex<r.regions.length){if(o=r.regions.toRegion(o.regionIndex+1),o.startLineNumber>=l)return null;if(o.parentIndex===i)return o.startLineNumber}else return null}else if(r.regions.length>0)for(o=r.regions.toRegion(0);o!==null;){if(o.startLineNumber>a)return o.startLineNumber;o.regionIndex<r.regions.length?o=r.regions.toRegion(o.regionIndex+1):o=null}return null}e.getNextFoldLine=d}),define(J[426],ee([0,1,19,4,3]),function(j,e,w,N,T){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.HiddenRangeModel=void 0;class D{constructor(n){this._updateEventEmitter=new N.Emitter,this._foldingModel=n,this._foldingModelListener=n.onDidChange(g=>this.updateHiddenRanges()),this._hiddenRanges=[],n.regions.length&&this.updateHiddenRanges()}get onDidChange(){return this._updateEventEmitter.event}get hiddenRanges(){return this._hiddenRanges}updateHiddenRanges(){let n=!1,g=[],t=0,s=0,c=Number.MAX_VALUE,u=-1,d=this._foldingModel.regions;for(;t<d.length;t++){if(!d.isCollapsed(t))continue;let a=d.getStartLineNumber(t)+1,r=d.getEndLineNumber(t);c<=a&&r<=u||(!n&&s<this._hiddenRanges.length&&this._hiddenRanges[s].startLineNumber===a&&this._hiddenRanges[s].endLineNumber===r?(g.push(this._hiddenRanges[s]),s++):(n=!0,g.push(new T.Range(a,1,r,1))),c=a,u=r)}(n||s<this._hiddenRanges.length)&&this.applyHiddenRanges(g)}applyMemento(n){if(!Array.isArray(n)||n.length===0)return!1;let g=[];for(let t of n){if(!t.startLineNumber||!t.endLineNumber)return!1;g.push(new T.Range(t.startLineNumber+1,1,t.endLineNumber,1))}return this.applyHiddenRanges(g),!0}getMemento(){return this._hiddenRanges.map(n=>({startLineNumber:n.startLineNumber-1,endLineNumber:n.endLineNumber}))}applyHiddenRanges(n){this._hiddenRanges=n,this._updateEventEmitter.fire(n)}hasRanges(){return this._hiddenRanges.length>0}isHidden(n){return p(this._hiddenRanges,n)!==null}adjustSelections(n){let g=!1,t=this._foldingModel.textModel,s=null,c=u=>((!s||!S(u,s))&&(s=p(this._hiddenRanges,u)),s?s.startLineNumber-1:null);for(let u=0,d=n.length;u<d;u++){let a=n[u],r=c(a.startLineNumber);r&&(a=a.setStartPosition(r,t.getLineMaxColumn(r)),g=!0);let o=c(a.endLineNumber);o&&(a=a.setEndPosition(o,t.getLineMaxColumn(o)),g=!0),n[u]=a}return g}dispose(){this.hiddenRanges.length>0&&(this._hiddenRanges=[],this._updateEventEmitter.fire(this._hiddenRanges)),this._foldingModelListener&&(this._foldingModelListener.dispose(),this._foldingModelListener=null)}}e.HiddenRangeModel=D;function S(C,n){return C>=n.startLineNumber&&C<=n.endLineNumber}function p(C,n){let g=(0,w.findFirstInSorted)(C,t=>n<t.startLineNumber)-1;return g>=0&&C[g].endLineNumber>=n?C[g]:null}}),define(J[236],ee([0,1,11,2,183]),function(j,e,w,N,T){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.sanitizeRanges=e.RangesCollector=e.SyntaxRangeProvider=e.ID_SYNTAX_PROVIDER=void 0;const D=5e3,S={};e.ID_SYNTAX_PROVIDER="syntax";class p{constructor(s,c,u,d=D){this.editorModel=s,this.providers=c,this.limit=d,this.id=e.ID_SYNTAX_PROVIDER;for(const a of c)typeof a.onDidChange=="function"&&(this.disposables||(this.disposables=new N.DisposableStore),this.disposables.add(a.onDidChange(u)))}compute(s){return C(this.providers,this.editorModel,s).then(c=>c?g(c,this.limit):null)}dispose(){var s;(s=this.disposables)===null||s===void 0||s.dispose()}}e.SyntaxRangeProvider=p;function C(t,s,c){let u=null,d=t.map((a,r)=>Promise.resolve(a.provideFoldingRanges(s,S,c)).then(o=>{if(!c.isCancellationRequested&&Array.isArray(o)){Array.isArray(u)||(u=[]);let i=s.getLineCount();for(let l of o)l.start>0&&l.end>l.start&&l.end<=i&&u.push({start:l.start,end:l.end,rank:r,kind:l.kind})}},w.onUnexpectedExternalError));return Promise.all(d).then(a=>u)}class n{constructor(s){this._startIndexes=[],this._endIndexes=[],this._nestingLevels=[],this._nestingLevelCounts=[],this._types=[],this._length=0,this._foldingRangesLimit=s}add(s,c,u,d){if(s>T.MAX_LINE_NUMBER||c>T.MAX_LINE_NUMBER)return;let a=this._length;this._startIndexes[a]=s,this._endIndexes[a]=c,this._nestingLevels[a]=d,this._types[a]=u,this._length++,d<30&&(this._nestingLevelCounts[d]=(this._nestingLevelCounts[d]||0)+1)}toIndentRanges(){if(this._length<=this._foldingRangesLimit){let s=new Uint32Array(this._length),c=new Uint32Array(this._length);for(let u=0;u<this._length;u++)s[u]=this._startIndexes[u],c[u]=this._endIndexes[u];return new T.FoldingRegions(s,c,this._types)}else{let s=0,c=this._nestingLevelCounts.length;for(let r=0;r<this._nestingLevelCounts.length;r++){let o=this._nestingLevelCounts[r];if(o){if(o+s>this._foldingRangesLimit){c=r;break}s+=o}}let u=new Uint32Array(this._foldingRangesLimit),d=new Uint32Array(this._foldingRangesLimit),a=[];for(let r=0,o=0;r<this._length;r++){let i=this._nestingLevels[r];(i<c||i===c&&s++<this._foldingRangesLimit)&&(u[o]=this._startIndexes[r],d[o]=this._endIndexes[r],a[o]=this._types[r],o++)}return new T.FoldingRegions(u,d,a)}}}e.RangesCollector=n;function g(t,s){let c=t.sort((r,o)=>{let i=r.start-o.start;return i===0&&(i=r.rank-o.rank),i}),u=new n(s),d,a=[];for(let r of c)if(!d)d=r,u.add(r.start,r.end,r.kind&&r.kind.value,a.length);else if(r.start>d.start)if(r.end<=d.end)a.push(d),d=r,u.add(r.start,r.end,r.kind&&r.kind.value,a.length);else{if(r.start>d.end){do d=a.pop();while(d&&r.start>d.end);d&&a.push(d),d=r}u.add(r.start,r.end,r.kind&&r.kind.value,a.length)}return u.toIndentRanges()}e.sanitizeRanges=g}),define(J[427],ee([0,1,236]),function(j,e,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.InitializingRangeProvider=e.ID_INIT_PROVIDER=void 0,e.ID_INIT_PROVIDER="init";class N{constructor(D,S,p,C){if(this.editorModel=D,this.id=e.ID_INIT_PROVIDER,S.length){let n=g=>({range:{startLineNumber:g.startLineNumber,startColumn:0,endLineNumber:g.endLineNumber,endColumn:D.getLineLength(g.endLineNumber)},options:{description:"folding-initializing-range-provider",stickiness:1}});this.decorationIds=D.deltaDecorations([],S.map(n)),this.timeout=setTimeout(p,C)}}dispose(){this.decorationIds&&(this.editorModel.deltaDecorations(this.decorationIds,[]),this.decorationIds=void 0),typeof this.timeout=="number"&&(clearTimeout(this.timeout),this.timeout=void 0)}compute(D){let S=[];if(this.decorationIds)for(let p of this.decorationIds){let C=this.editorModel.getDecorationRange(p);C&&S.push({start:C.startLineNumber,end:C.endLineNumber,rank:1})}return Promise.resolve((0,w.sanitizeRanges)(S,Number.MAX_VALUE))}}e.InitializingRangeProvider=N}),define(J[237],ee([0,1,59,3]),function(j,e,w,N){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.FormattingEdit=void 0;class T{static _handleEolEdits(S,p){let C,n=[];for(let g of p)typeof g.eol=="number"&&(C=g.eol),g.range&&typeof g.text=="string"&&n.push(g);return typeof C=="number"&&S.hasModel()&&S.getModel().pushEOL(C),n}static _isFullModelReplaceEdit(S,p){if(!S.hasModel())return!1;const C=S.getModel(),n=C.validateRange(p.range);return C.getFullModelRange().equalsRange(n)}static execute(S,p,C){C&&S.pushUndoStop();const n=T._handleEolEdits(S,p);n.length===1&&T._isFullModelReplaceEdit(S,n[0])?S.executeEdits("formatEditsCommand",n.map(g=>w.EditOperation.replace(N.Range.lift(g.range),g.text))):S.executeEdits("formatEditsCommand",n.map(g=>w.EditOperation.replaceMove(N.Range.lift(g.range),g.text))),C&&S.pushUndoStop()}}e.FormattingEdit=T}),define(J[238],ee([0,1,4,2,17]),function(j,e,w,N,T){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ClickLinkGesture=e.ClickLinkOptions=e.ClickLinkKeyboardEvent=e.ClickLinkMouseEvent=void 0;function D(t,s){return!!t[s]}class S{constructor(s,c){this.target=s.target,this.hasTriggerModifier=D(s.event,c.triggerModifier),this.hasSideBySideModifier=D(s.event,c.triggerSideBySideModifier),this.isNoneOrSingleMouseDown=s.event.detail<=1}}e.ClickLinkMouseEvent=S;class p{constructor(s,c){this.keyCodeIsTriggerKey=s.keyCode===c.triggerKey,this.keyCodeIsSideBySideKey=s.keyCode===c.triggerSideBySideKey,this.hasTriggerModifier=D(s,c.triggerModifier)}}e.ClickLinkKeyboardEvent=p;class C{constructor(s,c,u,d){this.triggerKey=s,this.triggerModifier=c,this.triggerSideBySideKey=u,this.triggerSideBySideModifier=d}equals(s){return this.triggerKey===s.triggerKey&&this.triggerModifier===s.triggerModifier&&this.triggerSideBySideKey===s.triggerSideBySideKey&&this.triggerSideBySideModifier===s.triggerSideBySideModifier}}e.ClickLinkOptions=C;function n(t){return t==="altKey"?T.isMacintosh?new C(57,"metaKey",6,"altKey"):new C(5,"ctrlKey",6,"altKey"):T.isMacintosh?new C(6,"altKey",57,"metaKey"):new C(6,"altKey",5,"ctrlKey")}class g extends N.Disposable{constructor(s){super();this._onMouseMoveOrRelevantKeyDown=this._register(new w.Emitter),this.onMouseMoveOrRelevantKeyDown=this._onMouseMoveOrRelevantKeyDown.event,this._onExecute=this._register(new w.Emitter),this.onExecute=this._onExecute.event,this._onCancel=this._register(new w.Emitter),this.onCancel=this._onCancel.event,this._editor=s,this._opts=n(this._editor.getOption(69)),this._lastMouseMoveEvent=null,this._hasTriggerKeyOnMouseDown=!1,this._lineNumberOnMouseDown=0,this._register(this._editor.onDidChangeConfiguration(c=>{if(c.hasChanged(69)){const u=n(this._editor.getOption(69));if(this._opts.equals(u))return;this._opts=u,this._lastMouseMoveEvent=null,this._hasTriggerKeyOnMouseDown=!1,this._lineNumberOnMouseDown=0,this._onCancel.fire()}})),this._register(this._editor.onMouseMove(c=>this._onEditorMouseMove(new S(c,this._opts)))),this._register(this._editor.onMouseDown(c=>this._onEditorMouseDown(new S(c,this._opts)))),this._register(this._editor.onMouseUp(c=>this._onEditorMouseUp(new S(c,this._opts)))),this._register(this._editor.onKeyDown(c=>this._onEditorKeyDown(new p(c,this._opts)))),this._register(this._editor.onKeyUp(c=>this._onEditorKeyUp(new p(c,this._opts)))),this._register(this._editor.onMouseDrag(()=>this._resetHandler())),this._register(this._editor.onDidChangeCursorSelection(c=>this._onDidChangeCursorSelection(c))),this._register(this._editor.onDidChangeModel(c=>this._resetHandler())),this._register(this._editor.onDidChangeModelContent(()=>this._resetHandler())),this._register(this._editor.onDidScrollChange(c=>{(c.scrollTopChanged||c.scrollLeftChanged)&&this._resetHandler()}))}_onDidChangeCursorSelection(s){s.selection&&s.selection.startColumn!==s.selection.endColumn&&this._resetHandler()}_onEditorMouseMove(s){this._lastMouseMoveEvent=s,this._onMouseMoveOrRelevantKeyDown.fire([s,null])}_onEditorMouseDown(s){this._hasTriggerKeyOnMouseDown=s.hasTriggerModifier,this._lineNumberOnMouseDown=s.target.position?s.target.position.lineNumber:0}_onEditorMouseUp(s){const c=s.target.position?s.target.position.lineNumber:0;this._hasTriggerKeyOnMouseDown&&this._lineNumberOnMouseDown&&this._lineNumberOnMouseDown===c&&this._onExecute.fire(s)}_onEditorKeyDown(s){this._lastMouseMoveEvent&&(s.keyCodeIsTriggerKey||s.keyCodeIsSideBySideKey&&s.hasTriggerModifier)?this._onMouseMoveOrRelevantKeyDown.fire([this._lastMouseMoveEvent,s]):s.hasTriggerModifier&&this._onCancel.fire()}_onEditorKeyUp(s){s.keyCodeIsTriggerKey&&this._onCancel.fire()}_resetHandler(){this._lastMouseMoveEvent=null,this._hasTriggerKeyOnMouseDown=!1,this._onCancel.fire()}}e.ClickLinkGesture=g}),define(J[239],ee([0,1,14,11]),function(j,e,w,N){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.HoverOperation=void 0;class T{constructor(S,p,C,n,g){this._computer=S,this._state=0,this._hoverTime=g,this._firstWaitScheduler=new w.RunOnceScheduler(()=>this._triggerAsyncComputation(),0),this._secondWaitScheduler=new w.RunOnceScheduler(()=>this._triggerSyncComputation(),0),this._loadingMessageScheduler=new w.RunOnceScheduler(()=>this._showLoadingMessage(),0),this._asyncComputationPromise=null,this._asyncComputationPromiseDone=!1,this._completeCallback=p,this._errorCallback=C,this._progressCallback=n}setHoverTime(S){this._hoverTime=S}_firstWaitTime(){return this._hoverTime/2}_secondWaitTime(){return this._hoverTime/2}_loadingMessageTime(){return 3*this._hoverTime}_triggerAsyncComputation(){this._state=2,this._secondWaitScheduler.schedule(this._secondWaitTime()),this._computer.computeAsync?(this._asyncComputationPromiseDone=!1,this._asyncComputationPromise=(0,w.createCancelablePromise)(S=>this._computer.computeAsync(S)),this._asyncComputationPromise.then(S=>{this._asyncComputationPromiseDone=!0,this._withAsyncResult(S)},S=>this._onError(S))):this._asyncComputationPromiseDone=!0}_triggerSyncComputation(){this._computer.computeSync&&this._computer.onResult(this._computer.computeSync(),!0),this._asyncComputationPromiseDone?(this._state=0,this._onComplete(this._computer.getResult())):(this._state=3,this._onProgress(this._computer.getResult()))}_showLoadingMessage(){this._state===3&&this._onProgress(this._computer.getResultWithLoadingMessage())}_withAsyncResult(S){S&&this._computer.onResult(S,!1),this._state===3&&(this._state=0,this._onComplete(this._computer.getResult()))}_onComplete(S){this._completeCallback(S)}_onError(S){this._errorCallback?this._errorCallback(S):(0,N.onUnexpectedError)(S)}_onProgress(S){this._progressCallback(S)}start(S){if(S===0)this._state===0&&(this._state=1,this._firstWaitScheduler.schedule(this._firstWaitTime()),this._loadingMessageScheduler.schedule(this._loadingMessageTime()));else switch(this._state){case 0:this._triggerAsyncComputation(),this._secondWaitScheduler.cancel(),this._triggerSyncComputation();break;case 2:this._secondWaitScheduler.cancel(),this._triggerSyncComputation();break}}cancel(){this._loadingMessageScheduler.cancel(),this._state===1&&this._firstWaitScheduler.cancel(),this._state===2&&(this._secondWaitScheduler.cancel(),this._asyncComputationPromise&&(this._asyncComputationPromise.cancel(),this._asyncComputationPromise=null)),this._state===3&&this._asyncComputationPromise&&(this._asyncComputationPromise.cancel(),this._asyncComputationPromise=null),this._state=0}}e.HoverOperation=T}),define(J[240],ee([0,1]),function(j,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.HoverForeignElementAnchor=e.HoverRangeAnchor=void 0;class w{constructor(D,S){this.priority=D,this.range=S,this.type=1}equals(D){return D.type===1&&this.range.equalsRange(D.range)}canAdoptVisibleHover(D,S){return D.type===1&&S.lineNumber===this.range.startLineNumber}}e.HoverRangeAnchor=w;class N{constructor(D,S,p){this.priority=D,this.owner=S,this.range=p,this.type=2}equals(D){return D.type===2&&this.owner===D.owner}canAdoptVisibleHover(D,S){return D.type===2&&this.owner===D.owner}}e.HoverForeignElementAnchor=N}),define(J[428],ee([0,1,22]),function(j,e,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.InPlaceReplaceCommand=void 0;class N{constructor(D,S,p){this._editRange=D,this._originalSelection=S,this._text=p}getEditOperations(D,S){S.addTrackedEditOperation(this._editRange,this._text)}computeCursorState(D,S){const C=S.getInverseEditOperations()[0].range;return this._originalSelection.isEmpty()?new w.Selection(C.endLineNumber,Math.min(this._originalSelection.positionColumn,C.endColumn),C.endLineNumber,Math.min(this._originalSelection.positionColumn,C.endColumn)):new w.Selection(C.endLineNumber,C.endColumn-this._text.length,C.endLineNumber,C.endColumn)}}e.InPlaceReplaceCommand=N}),define(J[241],ee([0,1]),function(j,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.generateIndent=e.getSpaceCnt=void 0;function w(T,D){let S=0;for(let p=0;p<T.length;p++)T.charAt(p)==="    "?S+=D:S++;return S}e.getSpaceCnt=w;function N(T,D,S){T=T<0?0:T;let p="";if(!S){let C=Math.floor(T/D);T=T%D;for(let n=0;n<C;n++)p+="    "}for(let C=0;C<T;C++)p+=" ";return p}e.generateIndent=N}),define(J[242],ee([0,1]),function(j,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.inlineSuggestCommitId=void 0,e.inlineSuggestCommitId="editor.action.inlineSuggest.commit"}),define(J[184],ee([0,1,4,2,3]),function(j,e,w,N,T){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BaseGhostTextWidgetModel=e.GhostTextPart=e.GhostText=void 0;class D{constructor(t,s,c=0){this.lineNumber=t,this.parts=s,this.additionalReservedLineCount=c}renderForScreenReader(t){if(this.parts.length===0)return"";const s=this.parts[this.parts.length-1],c=t.substr(0,s.column-1);return p(c,this.parts.map(d=>({range:{startLineNumber:1,endLineNumber:1,startColumn:d.column,endColumn:d.column},text:d.lines.join(`
`)}))).substring(this.parts[0].column-1)}}e.GhostText=D;class S{constructor(t){this.lineStartOffsetByLineIdx=[],this.lineStartOffsetByLineIdx.push(0);for(let s=0;s<t.length;s++)t.charAt(s)===`
`&&this.lineStartOffsetByLineIdx.push(s+1)}getOffset(t){return this.lineStartOffsetByLineIdx[t.lineNumber-1]+t.column-1}}function p(g,t){const s=new S(g),c=t.map(u=>{const d=T.Range.lift(u.range);return{startOffset:s.getOffset(d.getStartPosition()),endOffset:s.getOffset(d.getEndPosition()),text:u.text}});c.sort((u,d)=>d.startOffset-u.startOffset);for(const u of c)g=g.substring(0,u.startOffset)+u.text+g.substring(u.endOffset);return g}class C{constructor(t,s,c){this.column=t,this.lines=s,this.preview=c}}e.GhostTextPart=C;class n extends N.Disposable{constructor(t){super();this.editor=t,this._expanded=void 0,this.onDidChangeEmitter=new w.Emitter,this.onDidChange=this.onDidChangeEmitter.event,this._register(t.onDidChangeConfiguration(s=>{s.hasChanged(105)&&this._expanded===void 0&&this.onDidChangeEmitter.fire()}))}setExpanded(t){this._expanded=!0,this.onDidChangeEmitter.fire()}}e.BaseGhostTextWidgetModel=n}),define(J[185],ee([0,1,134,8,3,184]),function(j,e,w,N,T,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.inlineCompletionToGhostText=e.normalizedInlineCompletionsEquals=void 0;function S(t,s){return t===s?!0:!t||!s?!1:t.range.equalsRange(s.range)&&t.text===s.text&&t.command===s.command}e.normalizedInlineCompletionsEquals=S;function p(t,s,c,u,d=0){if(t.range.startLineNumber!==t.range.endLineNumber)return;const a=s.getLineContent(t.range.startLineNumber),r=N.getLeadingWhitespace(a).length;if(t.range.startColumn-1<=r){const _=N.getLeadingWhitespace(t.text).length,b=a.substring(t.range.startColumn-1,r),v=T.Range.fromPositions(t.range.getStartPosition().delta(0,b.length),t.range.getEndPosition()),m=t.text.startsWith(b)?t.text.substring(b.length):t.text.substring(_);t={range:v,text:m,command:t.command}}const i=s.getValueInRange(t.range),l=n(i,t.text);if(!l)return;const h=t.range.startLineNumber,f=new Array;if(c==="prefix"){const _=l.filter(b=>b.originalLength===0);if(_.length>1||_.length===1&&_[0].originalStart!==i.length)return}const y=t.text.length-d;for(const _ of l){const b=t.range.startColumn+_.originalStart+_.originalLength;if(c==="subwordSmart"&&u&&u.lineNumber===t.range.startLineNumber&&b<u.column||_.originalLength>0)return;if(_.modifiedLength===0)continue;const v=_.modifiedStart+_.modifiedLength,m=Math.max(_.modifiedStart,Math.min(v,y)),E=t.text.substring(_.modifiedStart,m),I=t.text.substring(m,Math.max(_.modifiedStart,v));if(E.length>0){const k=N.splitLines(E);f.push(new D.GhostTextPart(b,k,!1))}if(I.length>0){const k=N.splitLines(I);f.push(new D.GhostTextPart(b,k,!0))}}return new D.GhostText(h,f,0)}e.inlineCompletionToGhostText=p;let C;function n(t,s){if((C==null?void 0:C.originalValue)===t&&(C==null?void 0:C.newValue)===s)return C==null?void 0:C.changes;{const c=g(t,s);return C={originalValue:t,newValue:s,changes:c},c}}function g(t,s){if(t.length>5e3||s.length>5e3)return;function c(i){let l=0;for(let h=0,f=i.length;h<f;h++){const y=i.charCodeAt(h);y>l&&(l=y)}return l}const u=Math.max(c(t),c(s));function d(i){if(i<0)throw new Error("unexpected");return u+i+1}function a(i){let l=0,h=0;const f=new Int32Array(i.length);for(let y=0,_=i.length;y<_;y++){const b=h*100+l;i[y]==="("?(f[y]=d(2*b),l++):i[y]===")"?(f[y]=d(2*b+1),l===1&&h++,l=Math.max(l-1,0)):f[y]=i.charCodeAt(y)}return f}const r=a(t),o=a(s);return new w.LcsDiff({getElements:()=>r},{getElements:()=>o}).ComputeDiff(!1).changes}}),define(J[243],ee([0,1]),function(j,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.findMaxBy=e.compareByNumber=e.compareBy=e.createDisposableRef=void 0;function w(S,p){return{object:S,dispose:()=>p==null?void 0:p.dispose()}}e.createDisposableRef=w;function N(S,p){return(C,n)=>p(S(C),S(n))}e.compareBy=N;function T(){return(S,p)=>S-p}e.compareByNumber=T;function D(S,p){let C;for(const n of S)(C===void 0||p(n,C)>0)&&(C=n);return C}e.findMaxBy=D}),define(J[429],ee([0,1,3,22]),function(j,e,w,N){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CopyLinesCommand=void 0;class T{constructor(S,p,C){this._selection=S,this._isCopyingDown=p,this._noop=C||!1,this._selectionDirection=0,this._selectionId=null,this._startLineNumberDelta=0,this._endLineNumberDelta=0}getEditOperations(S,p){let C=this._selection;this._startLineNumberDelta=0,this._endLineNumberDelta=0,C.startLineNumber<C.endLineNumber&&C.endColumn===1&&(this._endLineNumberDelta=1,C=C.setEndPosition(C.endLineNumber-1,S.getLineMaxColumn(C.endLineNumber-1)));let n=[];for(let t=C.startLineNumber;t<=C.endLineNumber;t++)n.push(S.getLineContent(t));const g=n.join(`
`);g===""&&this._isCopyingDown&&(this._startLineNumberDelta++,this._endLineNumberDelta++),this._noop?p.addEditOperation(new w.Range(C.endLineNumber,S.getLineMaxColumn(C.endLineNumber),C.endLineNumber+1,1),C.endLineNumber===S.getLineCount()?"":`
`):this._isCopyingDown?p.addEditOperation(new w.Range(C.startLineNumber,1,C.startLineNumber,1),g+`
`):p.addEditOperation(new w.Range(C.endLineNumber,S.getLineMaxColumn(C.endLineNumber),C.endLineNumber,S.getLineMaxColumn(C.endLineNumber)),`
`+g),this._selectionId=p.trackSelection(C),this._selectionDirection=this._selection.getDirection()}computeCursorState(S,p){let C=p.getTrackedSelection(this._selectionId);if(this._startLineNumberDelta!==0||this._endLineNumberDelta!==0){let n=C.startLineNumber,g=C.startColumn,t=C.endLineNumber,s=C.endColumn;this._startLineNumberDelta!==0&&(n=n+this._startLineNumberDelta,g=1),this._endLineNumberDelta!==0&&(t=t+this._endLineNumberDelta,s=1),C=N.Selection.createWithDirection(n,g,t,s,this._selectionDirection)}return C}}e.CopyLinesCommand=T}),define(J[430],ee([0,1,59,3]),function(j,e,w,N){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SortLinesCommand=void 0;class T{constructor(C,n){this.selection=C,this.descending=n,this.selectionId=null}static getCollator(){return T._COLLATOR||(T._COLLATOR=new Intl.Collator),T._COLLATOR}getEditOperations(C,n){let g=S(C,this.selection,this.descending);g&&n.addEditOperation(g.range,g.text),this.selectionId=n.trackSelection(this.selection)}computeCursorState(C,n){return n.getTrackedSelection(this.selectionId)}static canRun(C,n,g){if(C===null)return!1;let t=D(C,n,g);if(!t)return!1;for(let s=0,c=t.before.length;s<c;s++)if(t.before[s]!==t.after[s])return!0;return!1}}e.SortLinesCommand=T,T._COLLATOR=null;function D(p,C,n){let g=C.startLineNumber,t=C.endLineNumber;if(C.endColumn===1&&t--,g>=t)return null;let s=[];for(let u=g;u<=t;u++)s.push(p.getLineContent(u));let c=s.slice(0);return c.sort(T.getCollator().compare),n===!0&&(c=c.reverse()),{startLineNumber:g,endLineNumber:t,before:s,after:c}}function S(p,C,n){let g=D(p,C,n);return g?w.EditOperation.replace(new N.Range(g.startLineNumber,1,g.endLineNumber,p.getLineMaxColumn(g.endLineNumber)),g.after.join(`
`)):null}}),define(J[244],ee([0,1,74,13,3]),function(j,e,w,N,T){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BracketSelectionRangeProvider=void 0;class D{provideSelectionRanges(p,C){return Re(this,void 0,void 0,function*(){const n=[];for(const g of C){const t=[];n.push(t);const s=new Map;yield new Promise(c=>D._bracketsRightYield(c,0,p,g,s)),yield new Promise(c=>D._bracketsLeftYield(c,0,p,g,s,t))}return n})}static _bracketsRightYield(p,C,n,g,t){const s=new Map,c=Date.now();for(;;){if(C>=D._maxRounds){p();break}if(!g){p();break}let u=n.findNextBracket(g);if(!u){p();break}if(Date.now()-c>D._maxDuration){setTimeout(()=>D._bracketsRightYield(p,C+1,n,g,t));break}const a=u.close[0];if(u.isOpen){let r=s.has(a)?s.get(a):0;s.set(a,r+1)}else{let r=s.has(a)?s.get(a):0;if(r-=1,s.set(a,Math.max(0,r)),r<0){let o=t.get(a);o||(o=new w.LinkedList,t.set(a,o)),o.push(u.range)}}g=u.range.getEndPosition()}}static _bracketsLeftYield(p,C,n,g,t,s){const c=new Map,u=Date.now();for(;;){if(C>=D._maxRounds&&t.size===0){p();break}if(!g){p();break}let d=n.findPrevBracket(g);if(!d){p();break}if(Date.now()-u>D._maxDuration){setTimeout(()=>D._bracketsLeftYield(p,C+1,n,g,t,s));break}const r=d.close[0];if(d.isOpen){let o=c.has(r)?c.get(r):0;if(o-=1,c.set(r,Math.max(0,o)),o<0){let i=t.get(r);if(i){let l=i.shift();i.size===0&&t.delete(r);const h=T.Range.fromPositions(d.range.getEndPosition(),l.getStartPosition()),f=T.Range.fromPositions(d.range.getStartPosition(),l.getEndPosition());s.push({range:h}),s.push({range:f}),D._addBracketLeading(n,f,s)}}}else{let o=c.has(r)?c.get(r):0;c.set(r,o+1)}g=d.range.getStartPosition()}}static _addBracketLeading(p,C,n){if(C.startLineNumber===C.endLineNumber)return;const g=C.startLineNumber,t=p.getLineFirstNonWhitespaceColumn(g);t!==0&&t!==C.startColumn&&(n.push({range:T.Range.fromPositions(new N.Position(g,t),C.getEndPosition())}),n.push({range:T.Range.fromPositions(new N.Position(g,1),C.getEndPosition())}));const s=g-1;if(s>0){const c=p.getLineFirstNonWhitespaceColumn(s);c===C.startColumn&&c!==p.getLineLastNonWhitespaceColumn(s)&&(n.push({range:T.Range.fromPositions(new N.Position(s,c),C.getEndPosition())}),n.push({range:T.Range.fromPositions(new N.Position(s,1),C.getEndPosition())}))}}}e.BracketSelectionRangeProvider=D,D._maxDuration=30,D._maxRounds=2}),define(J[431],ee([0,1,8,3]),function(j,e,w,N){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.WordSelectionRangeProvider=void 0;class T{provideSelectionRanges(S,p){const C=[];for(const n of p){const g=[];C.push(g),this._addInWordRanges(g,S,n),this._addWordRanges(g,S,n),this._addWhitespaceLine(g,S,n),g.push({range:S.getFullModelRange()})}return C}_addInWordRanges(S,p,C){const n=p.getWordAtPosition(C);if(!n)return;let{word:g,startColumn:t}=n,s=C.column-t,c=s,u=s,d=0;for(;c>=0;c--){let a=g.charCodeAt(c);if(c!==s&&(a===95||a===45))break;if((0,w.isLowerAsciiLetter)(a)&&(0,w.isUpperAsciiLetter)(d))break;d=a}for(c+=1;u<g.length;u++){let a=g.charCodeAt(u);if((0,w.isUpperAsciiLetter)(a)&&(0,w.isLowerAsciiLetter)(d))break;if(a===95||a===45)break;d=a}c<u&&S.push({range:new N.Range(C.lineNumber,t+c,C.lineNumber,t+u)})}_addWordRanges(S,p,C){const n=p.getWordAtPosition(C);n&&S.push({range:new N.Range(C.lineNumber,n.startColumn,C.lineNumber,n.endColumn)})}_addWhitespaceLine(S,p,C){p.getLineLength(C.lineNumber)>0&&p.getLineFirstNonWhitespaceColumn(C.lineNumber)===0&&p.getLineLastNonWhitespaceColumn(C.lineNumber)===0&&S.push({range:new N.Range(C.lineNumber,1,C.lineNumber,p.getLineMaxColumn(C.lineNumber))})}}e.WordSelectionRangeProvider=T}),define(J[120],ee([0,1]),function(j,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SnippetParser=e.TextmateSnippet=e.Variable=e.FormatString=e.Transform=e.Choice=e.Placeholder=e.TransformableMarker=e.Text=e.Marker=e.Scanner=void 0;class w{constructor(){this.value="",this.pos=0}static isDigitCharacter(d){return d>=48&&d<=57}static isVariableCharacter(d){return d===95||d>=97&&d<=122||d>=65&&d<=90}text(d){this.value=d,this.pos=0}tokenText(d){return this.value.substr(d.pos,d.len)}next(){if(this.pos>=this.value.length)return{type:14,pos:this.pos,len:0};let d=this.pos,a=0,r=this.value.charCodeAt(d),o;if(o=w._table[r],typeof o=="number")return this.pos+=1,{type:o,pos:d,len:1};if(w.isDigitCharacter(r)){o=8;do a+=1,r=this.value.charCodeAt(d+a);while(w.isDigitCharacter(r));return this.pos+=a,{type:o,pos:d,len:a}}if(w.isVariableCharacter(r)){o=9;do r=this.value.charCodeAt(d+ ++a);while(w.isVariableCharacter(r)||w.isDigitCharacter(r));return this.pos+=a,{type:o,pos:d,len:a}}o=10;do a+=1,r=this.value.charCodeAt(d+a);while(!isNaN(r)&&typeof w._table[r]=="undefined"&&!w.isDigitCharacter(r)&&!w.isVariableCharacter(r));return this.pos+=a,{type:o,pos:d,len:a}}}e.Scanner=w,w._table={[36]:0,[58]:1,[44]:2,[123]:3,[125]:4,[92]:5,[47]:6,[124]:7,[43]:11,[45]:12,[63]:13};class N{constructor(){this._children=[]}appendChild(d){return d instanceof T&&this._children[this._children.length-1]instanceof T?this._children[this._children.length-1].value+=d.value:(d.parent=this,this._children.push(d)),this}replace(d,a){const{parent:r}=d,o=r.children.indexOf(d),i=r.children.slice(0);i.splice(o,1,...a),r._children=i,function l(h,f){for(const y of h)y.parent=f,l(y.children,y)}(a,r)}get children(){return this._children}get snippet(){let d=this;for(;;){if(!d)return;if(d instanceof s)return d;d=d.parent}}toString(){return this.children.reduce((d,a)=>d+a.toString(),"")}len(){return 0}}e.Marker=N;class T extends N{constructor(d){super();this.value=d}toString(){return this.value}len(){return this.value.length}clone(){return new T(this.value)}}e.Text=T;class D extends N{}e.TransformableMarker=D;class S extends D{constructor(d){super();this.index=d}static compareByIndex(d,a){return d.index===a.index?0:d.isFinalTabstop?1:a.isFinalTabstop||d.index<a.index?-1:d.index>a.index?1:0}get isFinalTabstop(){return this.index===0}get choice(){return this._children.length===1&&this._children[0]instanceof p?this._children[0]:void 0}clone(){let d=new S(this.index);return this.transform&&(d.transform=this.transform.clone()),d._children=this.children.map(a=>a.clone()),d}}e.Placeholder=S;class p extends N{constructor(){super(...arguments);this.options=[]}appendChild(d){return d instanceof T&&(d.parent=this,this.options.push(d)),this}toString(){return this.options[0].value}len(){return this.options[0].len()}clone(){let d=new p;return this.options.forEach(d.appendChild,d),d}}e.Choice=p;class C extends N{constructor(){super(...arguments);this.regexp=new RegExp("")}resolve(d){const a=this;let r=!1,o=d.replace(this.regexp,function(){return r=!0,a._replace(Array.prototype.slice.call(arguments,0,-2))});return!r&&this._children.some(i=>i instanceof n&&Boolean(i.elseValue))&&(o=this._replace([])),o}_replace(d){let a="";for(const r of this._children)if(r instanceof n){let o=d[r.index]||"";o=r.resolve(o),a+=o}else a+=r.toString();return a}toString(){return""}clone(){let d=new C;return d.regexp=new RegExp(this.regexp.source,""+(this.regexp.ignoreCase?"i":"")+(this.regexp.global?"g":"")),d._children=this.children.map(a=>a.clone()),d}}e.Transform=C;class n extends N{constructor(d,a,r,o){super();this.index=d,this.shorthandName=a,this.ifValue=r,this.elseValue=o}resolve(d){return this.shorthandName==="upcase"?d?d.toLocaleUpperCase():"":this.shorthandName==="downcase"?d?d.toLocaleLowerCase():"":this.shorthandName==="capitalize"?d?d[0].toLocaleUpperCase()+d.substr(1):"":this.shorthandName==="pascalcase"?d?this._toPascalCase(d):"":this.shorthandName==="camelcase"?d?this._toCamelCase(d):"":Boolean(d)&&typeof this.ifValue=="string"?this.ifValue:!Boolean(d)&&typeof this.elseValue=="string"?this.elseValue:d||""}_toPascalCase(d){const a=d.match(/[a-z0-9]+/gi);return a?a.map(r=>r.charAt(0).toUpperCase()+r.substr(1).toLowerCase()).join(""):d}_toCamelCase(d){const a=d.match(/[a-z0-9]+/gi);return a?a.map((r,o)=>o===0?r.toLowerCase():r.charAt(0).toUpperCase()+r.substr(1).toLowerCase()).join(""):d}clone(){return new n(this.index,this.shorthandName,this.ifValue,this.elseValue)}}e.FormatString=n;class g extends D{constructor(d){super();this.name=d}resolve(d){let a=d.resolve(this);return this.transform&&(a=this.transform.resolve(a||"")),a!==void 0?(this._children=[new T(a)],!0):!1}clone(){const d=new g(this.name);return this.transform&&(d.transform=this.transform.clone()),d._children=this.children.map(a=>a.clone()),d}}e.Variable=g;function t(u,d){const a=[...u];for(;a.length>0;){const r=a.shift();if(!d(r))break;a.unshift(...r.children)}}class s extends N{get placeholderInfo(){if(!this._placeholders){let d=[],a;this.walk(function(r){return r instanceof S&&(d.push(r),a=!a||a.index<r.index?r:a),!0}),this._placeholders={all:d,last:a}}return this._placeholders}get placeholders(){const{all:d}=this.placeholderInfo;return d}offset(d){let a=0,r=!1;return this.walk(o=>o===d?(r=!0,!1):(a+=o.len(),!0)),r?a:-1}fullLen(d){let a=0;return t([d],r=>(a+=r.len(),!0)),a}enclosingPlaceholders(d){let a=[],{parent:r}=d;for(;r;)r instanceof S&&a.push(r),r=r.parent;return a}resolveVariables(d){return this.walk(a=>(a instanceof g&&a.resolve(d)&&(this._placeholders=void 0),!0)),this}appendChild(d){return this._placeholders=void 0,super.appendChild(d)}replace(d,a){return this._placeholders=void 0,super.replace(d,a)}clone(){let d=new s;return this._children=this.children.map(a=>a.clone()),d}walk(d){t(this.children,d)}}e.TextmateSnippet=s;class c{constructor(){this._scanner=new w,this._token={type:14,pos:0,len:0}}static escape(d){return d.replace(/\$|}|\\/g,"\\$&")}static guessNeedsClipboard(d){return/\${?CLIPBOARD/.test(d)}parse(d,a,r){this._scanner.text(d),this._token=this._scanner.next();const o=new s;for(;this._parse(o););const i=new Map,l=[];let h=0;o.walk(f=>(f instanceof S&&(h+=1,f.isFinalTabstop?i.set(0,void 0):!i.has(f.index)&&f.children.length>0?i.set(f.index,f.children):l.push(f)),!0));for(const f of l){const y=i.get(f.index);if(y){const _=new S(f.index);_.transform=f.transform;for(const b of y)_.appendChild(b.clone());o.replace(f,[_])}}return r||(r=h>0&&a),!i.has(0)&&r&&o.appendChild(new S(0)),o}_accept(d,a){if(d===void 0||this._token.type===d){let r=a?this._scanner.tokenText(this._token):!0;return this._token=this._scanner.next(),r}return!1}_backTo(d){return this._scanner.pos=d.pos+d.len,this._token=d,!1}_until(d){const a=this._token;for(;this._token.type!==d;){if(this._token.type===14)return!1;if(this._token.type===5){const o=this._scanner.next();if(o.type!==0&&o.type!==4&&o.type!==5)return!1}this._token=this._scanner.next()}const r=this._scanner.value.substring(a.pos,this._token.pos).replace(/\\(\$|}|\\)/g,"$1");return this._token=this._scanner.next(),r}_parse(d){return this._parseEscaped(d)||this._parseTabstopOrVariableName(d)||this._parseComplexPlaceholder(d)||this._parseComplexVariable(d)||this._parseAnything(d)}_parseEscaped(d){let a;return(a=this._accept(5,!0))?(a=this._accept(0,!0)||this._accept(4,!0)||this._accept(5,!0)||a,d.appendChild(new T(a)),!0):!1}_parseTabstopOrVariableName(d){let a;const r=this._token;return this._accept(0)&&(a=this._accept(9,!0)||this._accept(8,!0))?(d.appendChild(/^\d+$/.test(a)?new S(Number(a)):new g(a)),!0):this._backTo(r)}_parseComplexPlaceholder(d){let a;const r=this._token;if(!(this._accept(0)&&this._accept(3)&&(a=this._accept(8,!0))))return this._backTo(r);const i=new S(Number(a));if(this._accept(1))for(;;){if(this._accept(4))return d.appendChild(i),!0;if(!this._parse(i))return d.appendChild(new T("${"+a+":")),i.children.forEach(d.appendChild,d),!0}else if(i.index>0&&this._accept(7)){const l=new p;for(;;){if(this._parseChoiceElement(l)){if(this._accept(2))continue;if(this._accept(7)&&(i.appendChild(l),this._accept(4)))return d.appendChild(i),!0}return this._backTo(r),!1}}else return this._accept(6)?this._parseTransform(i)?(d.appendChild(i),!0):(this._backTo(r),!1):this._accept(4)?(d.appendChild(i),!0):this._backTo(r)}_parseChoiceElement(d){const a=this._token,r=[];for(;!(this._token.type===2||this._token.type===7);){let o;if((o=this._accept(5,!0))?o=this._accept(2,!0)||this._accept(7,!0)||this._accept(5,!0)||o:o=this._accept(void 0,!0),!o)return this._backTo(a),!1;r.push(o)}return r.length===0?(this._backTo(a),!1):(d.appendChild(new T(r.join(""))),!0)}_parseComplexVariable(d){let a;const r=this._token;if(!(this._accept(0)&&this._accept(3)&&(a=this._accept(9,!0))))return this._backTo(r);const i=new g(a);if(this._accept(1))for(;;){if(this._accept(4))return d.appendChild(i),!0;if(!this._parse(i))return d.appendChild(new T("${"+a+":")),i.children.forEach(d.appendChild,d),!0}else return this._accept(6)?this._parseTransform(i)?(d.appendChild(i),!0):(this._backTo(r),!1):this._accept(4)?(d.appendChild(i),!0):this._backTo(r)}_parseTransform(d){let a=new C,r="",o="";for(;!this._accept(6);){let i;if(i=this._accept(5,!0)){i=this._accept(6,!0)||i,r+=i;continue}if(this._token.type!==14){r+=this._accept(void 0,!0);continue}return!1}for(;!this._accept(6);){let i;if(i=this._accept(5,!0)){i=this._accept(5,!0)||this._accept(6,!0)||i,a.appendChild(new T(i));continue}if(!(this._parseFormatString(a)||this._parseAnything(a)))return!1}for(;!this._accept(4);){if(this._token.type!==14){o+=this._accept(void 0,!0);continue}return!1}try{a.regexp=new RegExp(r,o)}catch(i){return!1}return d.transform=a,!0}_parseFormatString(d){const a=this._token;if(!this._accept(0))return!1;let r=!1;this._accept(3)&&(r=!0);let o=this._accept(8,!0);if(o)if(r){if(this._accept(4))return d.appendChild(new n(Number(o))),!0;if(!this._accept(1))return this._backTo(a),!1}else return d.appendChild(new n(Number(o))),!0;else return this._backTo(a),!1;if(this._accept(6)){let i=this._accept(9,!0);return!i||!this._accept(4)?(this._backTo(a),!1):(d.appendChild(new n(Number(o),i)),!0)}else if(this._accept(11)){let i=this._until(4);if(i)return d.appendChild(new n(Number(o),void 0,i,void 0)),!0}else if(this._accept(12)){let i=this._until(4);if(i)return d.appendChild(new n(Number(o),void 0,void 0,i)),!0}else if(this._accept(13)){let i=this._until(1);if(i){let l=this._until(4);if(l)return d.appendChild(new n(Number(o),void 0,i,l)),!0}}else{let i=this._until(4);if(i)return d.appendChild(new n(Number(o),void 0,void 0,i)),!0}return this._backTo(a),!1}_parseAnything(d){return this._token.type!==14?(d.appendChild(new T(this._scanner.tokenText(this._token))),this._accept(void 0),!0):!1}}e.SnippetParser=c}),define(J[432],ee([0,1,19,68,8]),function(j,e,w,N,T){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CompletionModel=e.LineContext=void 0;class D{constructor(C,n){this.leadingLineContent=C,this.characterCountDelta=n}}e.LineContext=D;class S{constructor(C,n,g,t,s,c,u){this.clipboardText=u,this._snippetCompareFn=S._compareCompletionItems,this._items=C,this._column=n,this._wordDistance=t,this._options=s,this._refilterKind=1,this._lineContext=g,c==="top"?this._snippetCompareFn=S._compareCompletionItemsSnippetsUp:c==="bottom"&&(this._snippetCompareFn=S._compareCompletionItemsSnippetsDown)}get lineContext(){return this._lineContext}set lineContext(C){(this._lineContext.leadingLineContent!==C.leadingLineContent||this._lineContext.characterCountDelta!==C.characterCountDelta)&&(this._refilterKind=this._lineContext.characterCountDelta<C.characterCountDelta&&this._filteredItems?2:1,this._lineContext=C)}get items(){return this._ensureCachedState(),this._filteredItems}get allProvider(){return this._ensureCachedState(),this._providerInfo.keys()}get incomplete(){this._ensureCachedState();const C=new Set;for(let[n,g]of this._providerInfo)g&&C.add(n);return C}adopt(C){let n=[];for(let g=0;g<this._items.length;)C.has(this._items[g].provider)?g++:(n.push(this._items[g]),this._items[g]=this._items[this._items.length-1],this._items.pop());return this._refilterKind=1,n}get stats(){return this._ensureCachedState(),this._stats}_ensureCachedState(){this._refilterKind!==0&&this._createCachedState()}_createCachedState(){this._providerInfo=new Map;const C=[],{leadingLineContent:n,characterCountDelta:g}=this._lineContext;let t="",s="";const c=this._refilterKind===1?this._items:this._filteredItems,u=[],d=!this._options.filterGraceful||c.length>2e3?N.fuzzyScore:N.fuzzyScoreGracefulAggressive;for(let a=0;a<c.length;a++){const r=c[a];if(r.isInvalid)continue;this._providerInfo.set(r.provider,Boolean(r.container.incomplete));const o=r.position.column-r.editStart.column,i=o+g-(r.position.column-this._column);if(t.length!==i&&(t=i===0?"":n.slice(-i),s=t.toLowerCase()),r.word=t,i===0)r.score=N.FuzzyScore.Default;else{let l=0;for(;l<o;){const h=t.charCodeAt(l);if(h===32||h===9)l+=1;else break}if(l>=i)r.score=N.FuzzyScore.Default;else if(typeof r.completion.filterText=="string"){let h=d(t,s,l,r.completion.filterText,r.filterTextLow,0,!1);if(!h)continue;(0,T.compareIgnoreCase)(r.completion.filterText,r.textLabel)===0?r.score=h:(r.score=(0,N.anyScore)(t,s,l,r.textLabel,r.labelLow,0),r.score[0]=h[0])}else{let h=d(t,s,l,r.textLabel,r.labelLow,0,!1);if(!h)continue;r.score=h}}r.idx=a,r.distance=this._wordDistance.distance(r.position,r.completion),u.push(r),C.push(r.textLabel.length)}this._filteredItems=u.sort(this._snippetCompareFn),this._refilterKind=0,this._stats={pLabelLen:C.length?(0,w.quickSelect)(C.length-.85,C,(a,r)=>a-r):0}}static _compareCompletionItems(C,n){return C.score[0]>n.score[0]?-1:C.score[0]<n.score[0]?1:C.distance<n.distance?-1:C.distance>n.distance?1:C.idx<n.idx?-1:C.idx>n.idx?1:0}static _compareCompletionItemsSnippetsDown(C,n){if(C.completion.kind!==n.completion.kind){if(C.completion.kind===27)return 1;if(n.completion.kind===27)return-1}return S._compareCompletionItems(C,n)}static _compareCompletionItemsSnippetsUp(C,n){if(C.completion.kind!==n.completion.kind){if(C.completion.kind===27)return-1;if(n.completion.kind===27)return 1}return S._compareCompletionItems(C,n)}}e.CompletionModel=S}),define(J[245],ee([0,1,7,110,4,2]),function(j,e,w,N,T,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ResizableHTMLElement=void 0;class S{constructor(){this._onDidWillResize=new T.Emitter,this.onDidWillResize=this._onDidWillResize.event,this._onDidResize=new T.Emitter,this.onDidResize=this._onDidResize.event,this._sashListener=new D.DisposableStore,this._size=new w.Dimension(0,0),this._minSize=new w.Dimension(0,0),this._maxSize=new w.Dimension(Number.MAX_SAFE_INTEGER,Number.MAX_SAFE_INTEGER),this.domNode=document.createElement("div"),this._eastSash=new N.Sash(this.domNode,{getVerticalSashLeft:()=>this._size.width},{orientation:0}),this._westSash=new N.Sash(this.domNode,{getVerticalSashLeft:()=>0},{orientation:0}),this._northSash=new N.Sash(this.domNode,{getHorizontalSashTop:()=>0},{orientation:1,orthogonalEdge:N.OrthogonalEdge.North}),this._southSash=new N.Sash(this.domNode,{getHorizontalSashTop:()=>this._size.height},{orientation:1,orthogonalEdge:N.OrthogonalEdge.South}),this._northSash.orthogonalStartSash=this._westSash,this._northSash.orthogonalEndSash=this._eastSash,this._southSash.orthogonalStartSash=this._westSash,this._southSash.orthogonalEndSash=this._eastSash;let C,n=0,g=0;this._sashListener.add(T.Event.any(this._northSash.onDidStart,this._eastSash.onDidStart,this._southSash.onDidStart,this._westSash.onDidStart)(()=>{C===void 0&&(this._onDidWillResize.fire(),C=this._size,n=0,g=0)})),this._sashListener.add(T.Event.any(this._northSash.onDidEnd,this._eastSash.onDidEnd,this._southSash.onDidEnd,this._westSash.onDidEnd)(()=>{C!==void 0&&(C=void 0,n=0,g=0,this._onDidResize.fire({dimension:this._size,done:!0}))})),this._sashListener.add(this._eastSash.onDidChange(t=>{C&&(g=t.currentX-t.startX,this.layout(C.height+n,C.width+g),this._onDidResize.fire({dimension:this._size,done:!1,east:!0}))})),this._sashListener.add(this._westSash.onDidChange(t=>{C&&(g=-(t.currentX-t.startX),this.layout(C.height+n,C.width+g),this._onDidResize.fire({dimension:this._size,done:!1,west:!0}))})),this._sashListener.add(this._northSash.onDidChange(t=>{C&&(n=-(t.currentY-t.startY),this.layout(C.height+n,C.width+g),this._onDidResize.fire({dimension:this._size,done:!1,north:!0}))})),this._sashListener.add(this._southSash.onDidChange(t=>{C&&(n=t.currentY-t.startY,this.layout(C.height+n,C.width+g),this._onDidResize.fire({dimension:this._size,done:!1,south:!0}))})),this._sashListener.add(T.Event.any(this._eastSash.onDidReset,this._westSash.onDidReset)(t=>{this._preferredSize&&(this.layout(this._size.height,this._preferredSize.width),this._onDidResize.fire({dimension:this._size,done:!0}))})),this._sashListener.add(T.Event.any(this._northSash.onDidReset,this._southSash.onDidReset)(t=>{this._preferredSize&&(this.layout(this._preferredSize.height,this._size.width),this._onDidResize.fire({dimension:this._size,done:!0}))}))}dispose(){this._northSash.dispose(),this._southSash.dispose(),this._eastSash.dispose(),this._westSash.dispose(),this._sashListener.dispose(),this._onDidResize.dispose(),this._onDidWillResize.dispose(),this.domNode.remove()}enableSashes(C,n,g,t){this._northSash.state=C?3:0,this._eastSash.state=n?3:0,this._southSash.state=g?3:0,this._westSash.state=t?3:0}layout(C=this.size.height,n=this.size.width){const{height:g,width:t}=this._minSize,{height:s,width:c}=this._maxSize;C=Math.max(g,Math.min(s,C)),n=Math.max(t,Math.min(c,n));const u=new w.Dimension(n,C);w.Dimension.equals(u,this._size)||(this.domNode.style.height=C+"px",this.domNode.style.width=n+"px",this._size=u,this._northSash.layout(),this._eastSash.layout(),this._southSash.layout(),this._westSash.layout())}clearSashHoverState(){this._eastSash.clearSashHoverState(),this._westSash.clearSashHoverState(),this._northSash.clearSashHoverState(),this._southSash.clearSashHoverState()}get size(){return this._size}set maxSize(C){this._maxSize=C}get maxSize(){return this._maxSize}set minSize(C){this._minSize=C}get minSize(){return this._minSize}set preferredSize(C){this._preferredSize=C}get preferredSize(){return this._preferredSize}}e.ResizableHTMLElement=S}),define(J[433],ee([0,1,19,2,97]),function(j,e,w,N,T){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CommitCharacterController=void 0;class D{constructor(p,C,n){this._disposables=new N.DisposableStore,this._disposables.add(C.onDidShow(()=>this._onItem(C.getFocusedItem()))),this._disposables.add(C.onDidFocus(this._onItem,this)),this._disposables.add(C.onDidHide(this.reset,this)),this._disposables.add(p.onWillType(g=>{if(this._active&&!C.isFrozen()){const t=g.charCodeAt(g.length-1);this._active.acceptCharacters.has(t)&&p.getOption(0)&&n(this._active.item)}}))}_onItem(p){if(!p||!(0,w.isNonEmptyArray)(p.item.completion.commitCharacters)){this.reset();return}if(this._active&&this._active.item.item===p.item)return;const C=new T.CharacterSet;for(const n of p.item.completion.commitCharacters)n.length>0&&C.add(n.charCodeAt(0));this._active={acceptCharacters:C,item:p}}reset(){this._active=void 0}dispose(){this._disposables.dispose()}}e.CommitCharacterController=D}),define(J[434],ee([0,1,2]),function(j,e,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.OvertypingCapturer=void 0;class N{constructor(D,S){this._disposables=new w.DisposableStore,this._lastOvertyped=[],this._empty=!0,this._disposables.add(D.onWillType(()=>{if(!this._empty||!D.hasModel())return;const p=D.getSelections(),C=p.length;let n=!1;for(let t=0;t<C;t++)if(!p[t].isEmpty()){n=!0;break}if(!n)return;this._lastOvertyped=[];const g=D.getModel();for(let t=0;t<C;t++){const s=p[t];if(g.getValueLengthInRange(s)>N._maxSelectionLength)return;this._lastOvertyped[t]={value:g.getValueInRange(s),multiline:s.startLineNumber!==s.endLineNumber}}this._empty=!1})),this._disposables.add(S.onDidCancel(p=>{!this._empty&&!p.retrigger&&(this._empty=!0)}))}getLastOvertypedInfo(D){if(!this._empty&&D>=0&&D<this._lastOvertyped.length)return this._lastOvertyped[D]}dispose(){this._disposables.dispose()}}e.OvertypingCapturer=N,N._maxSelectionLength=51200}),define(J[435],ee([0,1,19,3,244]),function(j,e,w,N,T){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.WordDistance=void 0;class D{static create(p,C){return Re(this,void 0,void 0,function*(){if(!C.getOption(105).localityBonus||!C.hasModel())return D.None;const n=C.getModel(),g=C.getPosition();if(!p.canComputeWordRanges(n.uri))return D.None;const[t]=yield new T.BracketSelectionRangeProvider().provideSelectionRanges(n,[g]);if(t.length===0)return D.None;const s=yield p.computeWordRanges(n.uri,t[0].range);if(!s)return D.None;const c=n.getWordUntilPosition(g);return delete s[c.word],new class extends D{distance(u,d){if(!g.equals(C.getPosition()))return 0;if(d.kind===17)return 2<<20;let a=typeof d.label=="string"?d.label:d.label.label,r=s[a];if((0,w.isFalsyOrEmpty)(r))return 2<<20;let o=(0,w.binarySearch)(r,N.Range.fromPositions(u),N.Range.compareRangesUsingStarts),i=o>=0?r[o]:r[Math.max(0,~o-1)],l=t.length;for(const h of t){if(!N.Range.containsRange(h.range,i))break;l-=1}return l}}})}}e.WordDistance=D,D.None=new class extends D{distance(){return 0}}}),define(J[246],ee([0,1]),function(j,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.stateExists=e.findRules=e.substituteMatches=e.createError=e.log=e.sanitize=e.fixCase=e.empty=e.isIAction=e.isString=e.isFuzzyAction=e.isFuzzyActionArr=void 0;function w(u){return Array.isArray(u)}e.isFuzzyActionArr=w;function N(u){return!w(u)}e.isFuzzyAction=N;function T(u){return typeof u=="string"}e.isString=T;function D(u){return!T(u)}e.isIAction=D;function S(u){return!u}e.empty=S;function p(u,d){return u.ignoreCase&&d?d.toLowerCase():d}e.fixCase=p;function C(u){return u.replace(/[&<>'"_]/g,"-")}e.sanitize=C;function n(u,d){console.log(`${u.languageId}: ${d}`)}e.log=n;function g(u,d){return new Error(`${u.languageId}: ${d}`)}e.createError=g;function t(u,d,a,r,o){const i=/\$((\$)|(#)|(\d\d?)|[sS](\d\d?)|@(\w+))/g;let l=null;return d.replace(i,function(h,f,y,_,b,v,m,E,I){return S(y)?S(_)?!S(b)&&b<r.length?p(u,r[b]):!S(m)&&u&&typeof u[m]=="string"?u[m]:(l===null&&(l=o.split("."),l.unshift(o)),!S(v)&&v<l.length?p(u,l[v]):""):p(u,a):"$"})}e.substituteMatches=t;function s(u,d){let a=d;for(;a&&a.length>0;){const r=u.tokenizer[a];if(r)return r;const o=a.lastIndexOf(".");o<0?a=null:a=a.substr(0,o)}return null}e.findRules=s;function c(u,d){let a=d;for(;a&&a.length>0;){if(u.stateNames[a])return!0;const o=a.lastIndexOf(".");o<0?a=null:a=a.substr(0,o)}return!1}e.stateExists=c}),define(J[436],ee([0,1,246]),function(j,e,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.compile=void 0;function N(u,d){if(!d||!Array.isArray(d))return!1;for(const a of d)if(!u(a))return!1;return!0}function T(u,d){return typeof u=="boolean"?u:d}function D(u,d){return typeof u=="string"?u:d}function S(u){const d={};for(const a of u)d[a]=!0;return d}function p(u,d=!1){d&&(u=u.map(function(r){return r.toLowerCase()}));const a=S(u);return d?function(r){return a[r.toLowerCase()]!==void 0&&a.hasOwnProperty(r.toLowerCase())}:function(r){return a[r]!==void 0&&a.hasOwnProperty(r)}}function C(u,d){d=d.replace(/@@/g,"");let a=0,r;do r=!1,d=d.replace(/@(\w+)/g,function(i,l){r=!0;let h="";if(typeof u[l]=="string")h=u[l];else if(u[l]&&u[l]instanceof RegExp)h=u[l].source;else throw u[l]===void 0?w.createError(u,"language definition does not contain attribute '"+l+"', used at: "+d):w.createError(u,"attribute reference '"+l+"' must be a string, used at: "+d);return w.empty(h)?"":"(?:"+h+")"}),a++;while(r&&a<5);d=d.replace(/\x01/g,"@");let o=(u.ignoreCase?"i":"")+(u.unicode?"u":"");return new RegExp(d,o)}function n(u,d,a,r){if(r<0)return u;if(r<d.length)return d[r];if(r>=100){r=r-100;let o=a.split(".");if(o.unshift(a),r<o.length)return o[r]}return null}function g(u,d,a,r){let o=-1,i=a,l=a.match(/^\$(([sS]?)(\d\d?)|#)(.*)$/);l&&(l[3]&&(o=parseInt(l[3]),l[2]&&(o=o+100)),i=l[4]);let h="~",f=i;!i||i.length===0?(h="!=",f=""):/^\w*$/.test(f)?h="==":(l=i.match(/^(@|!@|~|!~|==|!=)(.*)$/),l&&(h=l[1],f=l[2]));let y;if((h==="~"||h==="!~")&&/^(\w|\|)*$/.test(f)){let _=p(f.split("|"),u.ignoreCase);y=function(b){return h==="~"?_(b):!_(b)}}else if(h==="@"||h==="!@"){let _=u[f];if(!_)throw w.createError(u,"the @ match target '"+f+"' is not defined, in rule: "+d);if(!N(function(v){return typeof v=="string"},_))throw w.createError(u,"the @ match target '"+f+"' must be an array of strings, in rule: "+d);let b=p(_,u.ignoreCase);y=function(v){return h==="@"?b(v):!b(v)}}else if(h==="~"||h==="!~")if(f.indexOf("$")<0){let _=C(u,"^"+f+"$");y=function(b){return h==="~"?_.test(b):!_.test(b)}}else y=function(_,b,v,m){return C(u,"^"+w.substituteMatches(u,f,b,v,m)+"$").test(_)};else if(f.indexOf("$")<0){let _=w.fixCase(u,f);y=function(b){return h==="=="?b===_:b!==_}}else{let _=w.fixCase(u,f);y=function(b,v,m,E,I){let k=w.substituteMatches(u,_,v,m,E);return h==="=="?b===k:b!==k}}return o===-1?{name:a,value:r,test:function(_,b,v,m){return y(_,_,b,v,m)}}:{name:a,value:r,test:function(_,b,v,m){let E=n(_,b,v,o);return y(E||"",_,b,v,m)}}}function t(u,d,a){if(a){if(typeof a=="string")return a;if(a.token||a.token===""){if(typeof a.token!="string")throw w.createError(u,"a 'token' attribute must be of type string, in rule: "+d);{let r={token:a.token};if(a.token.indexOf("$")>=0&&(r.tokenSubst=!0),typeof a.bracket=="string")if(a.bracket==="@open")r.bracket=1;else if(a.bracket==="@close")r.bracket=-1;else throw w.createError(u,"a 'bracket' attribute must be either '@open' or '@close', in rule: "+d);if(a.next){if(typeof a.next!="string")throw w.createError(u,"the next state must be a string value in rule: "+d);{let o=a.next;if(!/^(@pop|@push|@popall)$/.test(o)&&(o[0]==="@"&&(o=o.substr(1)),o.indexOf("$")<0&&!w.stateExists(u,w.substituteMatches(u,o,"",[],""))))throw w.createError(u,"the next state '"+a.next+"' is not defined in rule: "+d);r.next=o}}return typeof a.goBack=="number"&&(r.goBack=a.goBack),typeof a.switchTo=="string"&&(r.switchTo=a.switchTo),typeof a.log=="string"&&(r.log=a.log),typeof a.nextEmbedded=="string"&&(r.nextEmbedded=a.nextEmbedded,u.usesEmbedded=!0),r}}else if(Array.isArray(a)){let r=[];for(let o=0,i=a.length;o<i;o++)r[o]=t(u,d,a[o]);return{group:r}}else if(a.cases){let r=[];for(let i in a.cases)if(a.cases.hasOwnProperty(i)){const l=t(u,d,a.cases[i]);i==="@default"||i==="@"||i===""?r.push({test:void 0,value:l,name:i}):i==="@eos"?r.push({test:function(h,f,y,_){return _},value:l,name:i}):r.push(g(u,d,i,l))}const o=u.defaultToken;return{test:function(i,l,h,f){for(const y of r)if(!y.test||y.test(i,l,h,f))return y.value;return o}}}else throw w.createError(u,"an action must be a string, an object with a 'token' or 'cases' attribute, or an array of actions; in rule: "+d)}else return{token:""}}class s{constructor(d){this.regex=new RegExp(""),this.action={token:""},this.matchOnlyAtLineStart=!1,this.name="",this.name=d}setRegex(d,a){let r;if(typeof a=="string")r=a;else if(a instanceof RegExp)r=a.source;else throw w.createError(d,"rules must start with a match string or regular expression: "+this.name);this.matchOnlyAtLineStart=r.length>0&&r[0]==="^",this.name=this.name+": "+r,this.regex=C(d,"^(?:"+(this.matchOnlyAtLineStart?r.substr(1):r)+")")}setAction(d,a){this.action=t(d,this.name,a)}}function c(u,d){if(!d||typeof d!="object")throw new Error("Monarch: expecting a language definition object");let a={};a.languageId=u,a.includeLF=T(d.includeLF,!1),a.noThrow=!1,a.maxStack=100,a.start=typeof d.start=="string"?d.start:null,a.ignoreCase=T(d.ignoreCase,!1),a.unicode=T(d.unicode,!1),a.tokenPostfix=D(d.tokenPostfix,"."+a.languageId),a.defaultToken=D(d.defaultToken,"source"),a.usesEmbedded=!1;let r=d;r.languageId=u,r.includeLF=a.includeLF,r.ignoreCase=a.ignoreCase,r.unicode=a.unicode,r.noThrow=a.noThrow,r.usesEmbedded=a.usesEmbedded,r.stateNames=d.tokenizer,r.defaultToken=a.defaultToken;function o(l,h,f){for(const y of f){let _=y.include;if(_){if(typeof _!="string")throw w.createError(a,"an 'include' attribute must be a string at: "+l);if(_[0]==="@"&&(_=_.substr(1)),!d.tokenizer[_])throw w.createError(a,"include target '"+_+"' is not defined at: "+l);o(l+"."+_,h,d.tokenizer[_])}else{const b=new s(l);if(Array.isArray(y)&&y.length>=1&&y.length<=3)if(b.setRegex(r,y[0]),y.length>=3)if(typeof y[1]=="string")b.setAction(r,{token:y[1],next:y[2]});else if(typeof y[1]=="object"){const v=y[1];v.next=y[2],b.setAction(r,v)}else throw w.createError(a,"a next state as the last element of a rule can only be given if the action is either an object or a string, at: "+l);else b.setAction(r,y[1]);else{if(!y.regex)throw w.createError(a,"a rule must either be an array, or an object with a 'regex' or 'include' field at: "+l);y.name&&typeof y.name=="string"&&(b.name=y.name),y.matchOnlyAtStart&&(b.matchOnlyAtLineStart=T(y.matchOnlyAtLineStart,!1)),b.setRegex(r,y.regex),b.setAction(r,y.action)}h.push(b)}}}if(!d.tokenizer||typeof d.tokenizer!="object")throw w.createError(a,"a language definition must define the 'tokenizer' attribute as an object");a.tokenizer=[];for(let l in d.tokenizer)if(d.tokenizer.hasOwnProperty(l)){a.start||(a.start=l);const h=d.tokenizer[l];a.tokenizer[l]=new Array,o("tokenizer."+l,a.tokenizer[l],h)}if(a.usesEmbedded=r.usesEmbedded,d.brackets){if(!Array.isArray(d.brackets))throw w.createError(a,"the 'brackets' attribute must be defined as an array")}else d.brackets=[{open:"{",close:"}",token:"delimiter.curly"},{open:"[",close:"]",token:"delimiter.square"},{open:"(",close:")",token:"delimiter.parenthesis"},{open:"<",close:">",token:"delimiter.angle"}];let i=[];for(let l of d.brackets){let h=l;if(h&&Array.isArray(h)&&h.length===3&&(h={token:h[2],open:h[0],close:h[1]}),h.open===h.close)throw w.createError(a,"open and close brackets in a 'brackets' attribute must be different: "+h.open+`
 hint: use the 'bracket' attribute if matching on equal brackets is required.`);if(typeof h.open=="string"&&typeof h.token=="string"&&typeof h.close=="string")i.push({token:h.token+a.tokenPostfix,open:w.fixCase(a,h.open),close:w.fixCase(a,h.close)});else throw w.createError(a,"every element in the 'brackets' array must be a '{open,close,token}' object or array")}return a.brackets=i,a.noThrow=!0,a}e.compile=c}),define(J[437],ee([5,6]),function(j,e){return j.create("vs/base/browser/ui/actionbar/actionViewItems",e)}),define(J[438],ee([5,6]),function(j,e){return j.create("vs/base/browser/ui/findinput/findInput",e)}),define(J[439],ee([5,6]),function(j,e){return j.create("vs/base/browser/ui/findinput/findInputCheckboxes",e)}),define(J[247],ee([0,1,170,27,439]),function(j,e,w,N,T){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.RegexCheckbox=e.WholeWordsCheckbox=e.CaseSensitiveCheckbox=void 0;const D=T.localize(0,null),S=T.localize(1,null),p=T.localize(2,null);class C extends w.Checkbox{constructor(s){super({icon:N.Codicon.caseSensitive,title:D+s.appendTitle,isChecked:s.isChecked,inputActiveOptionBorder:s.inputActiveOptionBorder,inputActiveOptionForeground:s.inputActiveOptionForeground,inputActiveOptionBackground:s.inputActiveOptionBackground})}}e.CaseSensitiveCheckbox=C;class n extends w.Checkbox{constructor(s){super({icon:N.Codicon.wholeWord,title:S+s.appendTitle,isChecked:s.isChecked,inputActiveOptionBorder:s.inputActiveOptionBorder,inputActiveOptionForeground:s.inputActiveOptionForeground,inputActiveOptionBackground:s.inputActiveOptionBackground})}}e.WholeWordsCheckbox=n;class g extends w.Checkbox{constructor(s){super({icon:N.Codicon.regex,title:p+s.appendTitle,isChecked:s.isChecked,inputActiveOptionBorder:s.inputActiveOptionBorder,inputActiveOptionForeground:s.inputActiveOptionForeground,inputActiveOptionBackground:s.inputActiveOptionBackground})}}e.RegexCheckbox=g}),define(J[440],ee([5,6]),function(j,e){return j.create("vs/base/browser/ui/findinput/replaceInput",e)}),define(J[441],ee([5,6]),function(j,e){return j.create("vs/base/browser/ui/iconLabel/iconLabelHover",e)}),define(J[442],ee([0,1,7,14,23,69,2,20,441]),function(j,e,w,N,T,D,S,p,C){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.setupCustomHover=e.setupNativeHover=void 0;function n(s,c){(0,p.isString)(c)?s.title=c:(c==null?void 0:c.markdownNotSupportedFallback)?s.title=c.markdownNotSupportedFallback:s.removeAttribute("title")}e.setupNativeHover=n;class g{constructor(c,u,d){this.hoverDelegate=c,this.target=u,this.fadeInAnimation=d}update(c,u){var d;return Re(this,void 0,void 0,function*(){if(this._cancellationTokenSource&&(this._cancellationTokenSource.dispose(!0),this._cancellationTokenSource=void 0),this.isDisposed)return;let a;if(c===void 0||(0,p.isString)(c)||c instanceof HTMLElement)a=c;else if(!(0,p.isFunction)(c.markdown))a=(d=c.markdown)!==null&&d!==void 0?d:c.markdownNotSupportedFallback;else{this._hoverWidget||this.show((0,C.localize)(0,null),u),this._cancellationTokenSource=new T.CancellationTokenSource;const r=this._cancellationTokenSource.token;if(a=yield c.markdown(r),this.isDisposed||r.isCancellationRequested)return}this.show(a,u)})}show(c,u){const d=this._hoverWidget;if(this.hasContent(c)){const a={content:c,target:this.target,showPointer:this.hoverDelegate.placement==="element",hoverPosition:2,skipFadeInAnimation:!this.fadeInAnimation||!!d};this._hoverWidget=this.hoverDelegate.showHover(a,u)}d==null||d.dispose()}hasContent(c){return c?(0,D.isMarkdownString)(c)?!!c.value:!0:!1}get isDisposed(){var c;return(c=this._hoverWidget)===null||c===void 0?void 0:c.isDisposed}dispose(){var c,u;(c=this._hoverWidget)===null||c===void 0||c.dispose(),(u=this._cancellationTokenSource)===null||u===void 0||u.dispose(!0),this._cancellationTokenSource=void 0}}function t(s,c,u){let d,a;const r=(f,y)=>{var _;f&&(a==null||a.dispose(),a=void 0),y&&(d==null||d.dispose(),d=void 0),(_=s.onDidHideHover)===null||_===void 0||_.call(s)},o=(f,y,_)=>new N.TimeoutTimer(()=>Re(this,void 0,void 0,function*(){(!a||a.isDisposed)&&(a=new g(s,_||c,f>0),yield a.update(u,y))}),f),i=()=>{if(d)return;const f=new S.DisposableStore,y=v=>r(!1,v.fromElement===c);f.add(w.addDisposableListener(c,w.EventType.MOUSE_LEAVE,y,!0));const _=()=>r(!0,!0);f.add(w.addDisposableListener(c,w.EventType.MOUSE_DOWN,_,!0));const b={targetElements:[c],dispose:()=>{}};if(s.placement===void 0||s.placement==="mouse"){const v=m=>b.x=m.x+10;f.add(w.addDisposableListener(c,w.EventType.MOUSE_MOVE,v,!0))}f.add(o(s.delay,!1,b)),d=f},l=w.addDisposableListener(c,w.EventType.MOUSE_OVER,i,!0);return{show:f=>{r(!1,!0),o(0,f)},hide:()=>{r(!0,!0)},update:f=>Re(this,void 0,void 0,function*(){u=f,yield a==null?void 0:a.update(u)}),dispose:()=>{l.dispose(),r(!0,!0)}}}e.setupCustomHover=t}),define(J[186],ee([0,1,7,166,442,2,38,132,323]),function(j,e,w,N,T,D,S,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IconLabel=void 0;class C{constructor(u){this._element=u}get element(){return this._element}set textContent(u){this.disposed||u===this._textContent||(this._textContent=u,this._element.textContent=u)}set className(u){this.disposed||u===this._className||(this._className=u,this._element.className=u)}set empty(u){this.disposed||u===this._empty||(this._empty=u,this._element.style.marginLeft=u?"0":"")}dispose(){this.disposed=!0}}class n extends D.Disposable{constructor(u,d){super();this.customHovers=new Map,this.domNode=this._register(new C(w.append(u,w.$(".monaco-icon-label")))),this.labelContainer=w.append(this.domNode.element,w.$(".monaco-icon-label-container"));const a=w.append(this.labelContainer,w.$("span.monaco-icon-name-container"));this.descriptionContainer=this._register(new C(w.append(this.labelContainer,w.$("span.monaco-icon-description-container")))),(d==null?void 0:d.supportHighlights)||(d==null?void 0:d.supportIcons)?this.nameNode=new s(a,!!d.supportIcons):this.nameNode=new g(a),(d==null?void 0:d.supportDescriptionHighlights)?this.descriptionNodeFactory=()=>new N.HighlightedLabel(w.append(this.descriptionContainer.element,w.$("span.label-description")),!!d.supportIcons):this.descriptionNodeFactory=()=>this._register(new C(w.append(this.descriptionContainer.element,w.$("span.label-description")))),this.hoverDelegate=d==null?void 0:d.hoverDelegate}get element(){return this.domNode.element}setLabel(u,d,a){const r=["monaco-icon-label"];a&&(a.extraClasses&&r.push(...a.extraClasses),a.italic&&r.push("italic"),a.strikethrough&&r.push("strikethrough")),this.domNode.className=r.join(" "),this.setupHover((a==null?void 0:a.descriptionTitle)?this.labelContainer:this.element,a==null?void 0:a.title),this.nameNode.setLabel(u,a),(d||this.descriptionNode)&&(this.descriptionNode||(this.descriptionNode=this.descriptionNodeFactory()),this.descriptionNode instanceof N.HighlightedLabel?(this.descriptionNode.set(d||"",a?a.descriptionMatches:void 0),this.setupHover(this.descriptionNode.element,a==null?void 0:a.descriptionTitle)):(this.descriptionNode.textContent=d||"",this.setupHover(this.descriptionNode.element,(a==null?void 0:a.descriptionTitle)||""),this.descriptionNode.empty=!d))}setupHover(u,d){const a=this.customHovers.get(u);if(a&&(a.dispose(),this.customHovers.delete(u)),!d){u.removeAttribute("title");return}if(!this.hoverDelegate)(0,T.setupNativeHover)(u,d);else{const r=(0,T.setupCustomHover)(this.hoverDelegate,u,d);r&&this.customHovers.set(u,r)}}dispose(){super.dispose();for(const u of this.customHovers.values())u.dispose();this.customHovers.clear()}}e.IconLabel=n;class g{constructor(u){this.container=u,this.label=void 0,this.singleLabel=void 0}setLabel(u,d){if(!(this.label===u&&(0,S.equals)(this.options,d)))if(this.label=u,this.options=d,typeof u=="string")this.singleLabel||(this.container.innerText="",this.container.classList.remove("multiple"),this.singleLabel=w.append(this.container,w.$("a.label-name",{id:d==null?void 0:d.domId}))),this.singleLabel.textContent=u;else{this.container.innerText="",this.container.classList.add("multiple"),this.singleLabel=void 0;for(let a=0;a<u.length;a++){const r=u[a],o=(d==null?void 0:d.domId)&&`${d==null?void 0:d.domId}_${a}`;w.append(this.container,w.$("a.label-name",{id:o,"data-icon-label-count":u.length,"data-icon-label-index":a,role:"treeitem"},r)),a<u.length-1&&w.append(this.container,w.$("span.label-separator",void 0,(d==null?void 0:d.separator)||"/"))}}}}function t(c,u,d){if(!d)return;let a=0;return c.map(r=>{const o={start:a,end:a+r.length},i=d.map(l=>p.Range.intersect(o,l)).filter(l=>!p.Range.isEmpty(l)).map(({start:l,end:h})=>({start:l-a,end:h-a}));return a=o.end+u.length,i})}class s{constructor(u,d){this.container=u,this.supportIcons=d,this.label=void 0,this.singleLabel=void 0}setLabel(u,d){if(!(this.label===u&&(0,S.equals)(this.options,d)))if(this.label=u,this.options=d,typeof u=="string")this.singleLabel||(this.container.innerText="",this.container.classList.remove("multiple"),this.singleLabel=new N.HighlightedLabel(w.append(this.container,w.$("a.label-name",{id:d==null?void 0:d.domId})),this.supportIcons)),this.singleLabel.set(u,d==null?void 0:d.matches,void 0,d==null?void 0:d.labelEscapeNewLines);else{this.container.innerText="",this.container.classList.add("multiple"),this.singleLabel=void 0;const a=(d==null?void 0:d.separator)||"/",r=t(u,a,d==null?void 0:d.matches);for(let o=0;o<u.length;o++){const i=u[o],l=r?r[o]:void 0,h=(d==null?void 0:d.domId)&&`${d==null?void 0:d.domId}_${o}`,f=w.$("a.label-name",{id:h,"data-icon-label-count":u.length,"data-icon-label-index":o,role:"treeitem"});new N.HighlightedLabel(w.append(this.container,f),this.supportIcons).set(i,l,void 0,d==null?void 0:d.labelEscapeNewLines),o<u.length-1&&w.append(f,w.$("span.label-separator",void 0,a))}}}}}),define(J[443],ee([5,6]),function(j,e){return j.create("vs/base/browser/ui/inputbox/inputBox",e)}),define(J[444],ee([5,6]),function(j,e){return j.create("vs/base/browser/ui/keybindingLabel/keybindingLabel",e)}),define(J[445],ee([5,6]),function(j,e){return j.create("vs/base/browser/ui/menu/menu",e)}),define(J[446],ee([5,6]),function(j,e){return j.create("vs/base/browser/ui/tree/abstractTree",e)}),define(J[187],ee([0,1,169,7,94,52,171,111,163,104,208,19,14,207,4,68,2,106,17,446,335]),function(j,e,w,N,T,D,S,p,C,n,g,t,s,c,u,d,a,r,o,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AbstractTree=e.RenderIndentGuides=e.ComposedTreeDelegate=void 0;class l extends S.ElementsDragAndDropData{constructor(L){super(L.elements.map(B=>B.element));this.data=L}}function h(O){return O instanceof S.ElementsDragAndDropData?new l(O):O}class f{constructor(L,B){this.modelProvider=L,this.dnd=B,this.autoExpandDisposable=a.Disposable.None}getDragURI(L){return this.dnd.getDragURI(L.element)}getDragLabel(L,B){if(this.dnd.getDragLabel)return this.dnd.getDragLabel(L.map(W=>W.element),B)}onDragStart(L,B){this.dnd.onDragStart&&this.dnd.onDragStart(h(L),B)}onDragOver(L,B,W,K,H=!0){const Y=this.dnd.onDragOver(h(L),B&&B.element,W,K),X=this.autoExpandNode!==B;if(X&&(this.autoExpandDisposable.dispose(),this.autoExpandNode=B),typeof B=="undefined")return Y;if(X&&typeof Y!="boolean"&&Y.autoExpand&&(this.autoExpandDisposable=(0,s.disposableTimeout)(()=>{const x=this.modelProvider(),U=x.getNodeLocation(B);x.isCollapsed(U)&&x.setCollapsed(U,!1),this.autoExpandNode=void 0},500)),typeof Y=="boolean"||!Y.accept||typeof Y.bubble=="undefined"||Y.feedback){if(!H){const x=typeof Y=="boolean"?Y:Y.accept,U=typeof Y=="boolean"?void 0:Y.effect;return{accept:x,effect:U,feedback:[W]}}return Y}if(Y.bubble===1){const x=this.modelProvider(),U=x.getNodeLocation(B),$=x.getParentNodeLocation(U),V=x.getNode($),Q=$&&x.getListIndex($);return this.onDragOver(L,V,Q,K,!1)}const Z=this.modelProvider(),se=Z.getNodeLocation(B),oe=Z.getListIndex(se),G=Z.getListRenderCount(se);return Object.assign(Object.assign({},Y),{feedback:(0,t.range)(oe,oe+G)})}drop(L,B,W,K){this.autoExpandDisposable.dispose(),this.autoExpandNode=void 0,this.dnd.drop(h(L),B&&B.element,W,K)}onDragEnd(L){this.dnd.onDragEnd&&this.dnd.onDragEnd(L)}}function y(O,L){return L&&Object.assign(Object.assign({},L),{identityProvider:L.identityProvider&&{getId(B){return L.identityProvider.getId(B.element)}},dnd:L.dnd&&new f(O,L.dnd),multipleSelectionController:L.multipleSelectionController&&{isSelectionSingleChangeEvent(B){return L.multipleSelectionController.isSelectionSingleChangeEvent(Object.assign(Object.assign({},B),{element:B.element}))},isSelectionRangeChangeEvent(B){return L.multipleSelectionController.isSelectionRangeChangeEvent(Object.assign(Object.assign({},B),{element:B.element}))}},accessibilityProvider:L.accessibilityProvider&&Object.assign(Object.assign({},L.accessibilityProvider),{getSetSize(B){const W=O(),K=W.getNodeLocation(B),H=W.getParentNodeLocation(K);return W.getNode(H).visibleChildrenCount},getPosInSet(B){return B.visibleChildIndex+1},isChecked:L.accessibilityProvider&&L.accessibilityProvider.isChecked?B=>L.accessibilityProvider.isChecked(B.element):void 0,getRole:L.accessibilityProvider&&L.accessibilityProvider.getRole?B=>L.accessibilityProvider.getRole(B.element):()=>"treeitem",getAriaLabel(B){return L.accessibilityProvider.getAriaLabel(B.element)},getWidgetAriaLabel(){return L.accessibilityProvider.getWidgetAriaLabel()},getWidgetRole:L.accessibilityProvider&&L.accessibilityProvider.getWidgetRole?()=>L.accessibilityProvider.getWidgetRole():()=>"tree",getAriaLevel:L.accessibilityProvider&&L.accessibilityProvider.getAriaLevel?B=>L.accessibilityProvider.getAriaLevel(B.element):B=>B.depth,getActiveDescendantId:L.accessibilityProvider.getActiveDescendantId&&(B=>L.accessibilityProvider.getActiveDescendantId(B.element))}),keyboardNavigationLabelProvider:L.keyboardNavigationLabelProvider&&Object.assign(Object.assign({},L.keyboardNavigationLabelProvider),{getKeyboardNavigationLabel(B){return L.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(B.element)}}),enableKeyboardNavigation:L.simpleKeyboardNavigation})}class _{constructor(L){this.delegate=L}getHeight(L){return this.delegate.getHeight(L.element)}getTemplateId(L){return this.delegate.getTemplateId(L.element)}hasDynamicHeight(L){return!!this.delegate.hasDynamicHeight&&this.delegate.hasDynamicHeight(L.element)}setDynamicHeight(L,B){this.delegate.setDynamicHeight&&this.delegate.setDynamicHeight(L.element,B)}}e.ComposedTreeDelegate=_;var b;(function(O){O.None="none",O.OnHover="onHover",O.Always="always"})(b=e.RenderIndentGuides||(e.RenderIndentGuides={}));class v{constructor(L,B=[]){this._elements=B,this.onDidChange=u.Event.forEach(L,W=>this._elements=W)}get elements(){return this._elements}}class m{constructor(L,B,W,K,H={}){this.renderer=L,this.modelProvider=B,this.activeNodes=K,this.renderedElements=new Map,this.renderedNodes=new Map,this.indent=m.DefaultIndent,this.hideTwistiesOfChildlessElements=!1,this.shouldRenderIndentGuides=!1,this.renderedIndentGuides=new c.SetMap,this.activeIndentNodes=new Set,this.indentGuidesDisposable=a.Disposable.None,this.disposables=new a.DisposableStore,this.templateId=L.templateId,this.updateOptions(H),u.Event.map(W,Y=>Y.node)(this.onDidChangeNodeTwistieState,this,this.disposables),L.onDidChangeTwistieState&&L.onDidChangeTwistieState(this.onDidChangeTwistieState,this,this.disposables)}updateOptions(L={}){if(typeof L.indent!="undefined"&&(this.indent=(0,r.clamp)(L.indent,0,40)),typeof L.renderIndentGuides!="undefined"){const B=L.renderIndentGuides!==b.None;if(B!==this.shouldRenderIndentGuides&&(this.shouldRenderIndentGuides=B,this.indentGuidesDisposable.dispose(),B)){const W=new a.DisposableStore;this.activeNodes.onDidChange(this._onDidChangeActiveNodes,this,W),this.indentGuidesDisposable=W,this._onDidChangeActiveNodes(this.activeNodes.elements)}}typeof L.hideTwistiesOfChildlessElements!="undefined"&&(this.hideTwistiesOfChildlessElements=L.hideTwistiesOfChildlessElements)}renderTemplate(L){const B=(0,N.append)(L,(0,N.$)(".monaco-tl-row")),W=(0,N.append)(B,(0,N.$)(".monaco-tl-indent")),K=(0,N.append)(B,(0,N.$)(".monaco-tl-twistie")),H=(0,N.append)(B,(0,N.$)(".monaco-tl-contents")),Y=this.renderer.renderTemplate(H);return{container:L,indent:W,twistie:K,indentGuidesDisposable:a.Disposable.None,templateData:Y}}renderElement(L,B,W,K){typeof K=="number"&&(this.renderedNodes.set(L,{templateData:W,height:K}),this.renderedElements.set(L.element,L));const H=m.DefaultIndent+(L.depth-1)*this.indent;W.twistie.style.paddingLeft=`${H}px`,W.indent.style.width=`${H+this.indent-16}px`,this.renderTwistie(L,W),typeof K=="number"&&this.renderIndentGuides(L,W),this.renderer.renderElement(L,B,W.templateData,K)}disposeElement(L,B,W,K){W.indentGuidesDisposable.dispose(),this.renderer.disposeElement&&this.renderer.disposeElement(L,B,W.templateData,K),typeof K=="number"&&(this.renderedNodes.delete(L),this.renderedElements.delete(L.element))}disposeTemplate(L){this.renderer.disposeTemplate(L.templateData)}onDidChangeTwistieState(L){const B=this.renderedElements.get(L);!B||this.onDidChangeNodeTwistieState(B)}onDidChangeNodeTwistieState(L){const B=this.renderedNodes.get(L);!B||(this.renderTwistie(L,B.templateData),this._onDidChangeActiveNodes(this.activeNodes.elements),this.renderIndentGuides(L,B.templateData))}renderTwistie(L,B){B.twistie.classList.remove(...g.treeItemExpandedIcon.classNamesArray);let W=!1;this.renderer.renderTwistie&&(W=this.renderer.renderTwistie(L.element,B.twistie)),L.collapsible&&(!this.hideTwistiesOfChildlessElements||L.visibleChildrenCount>0)?(W||B.twistie.classList.add(...g.treeItemExpandedIcon.classNamesArray),B.twistie.classList.add("collapsible"),B.twistie.classList.toggle("collapsed",L.collapsed)):B.twistie.classList.remove("collapsible","collapsed"),L.collapsible?B.container.setAttribute("aria-expanded",String(!L.collapsed)):B.container.removeAttribute("aria-expanded")}renderIndentGuides(L,B){if((0,N.clearNode)(B.indent),B.indentGuidesDisposable.dispose(),!this.shouldRenderIndentGuides)return;const W=new a.DisposableStore,K=this.modelProvider();let H=L;for(;;){const Y=K.getNodeLocation(H),X=K.getParentNodeLocation(Y);if(!X)break;const Z=K.getNode(X),se=(0,N.$)(".indent-guide",{style:`width: ${this.indent}px`});this.activeIndentNodes.has(Z)&&se.classList.add("active"),B.indent.childElementCount===0?B.indent.appendChild(se):B.indent.insertBefore(se,B.indent.firstElementChild),this.renderedIndentGuides.add(Z,se),W.add((0,a.toDisposable)(()=>this.renderedIndentGuides.delete(Z,se))),H=Z}B.indentGuidesDisposable=W}_onDidChangeActiveNodes(L){if(!this.shouldRenderIndentGuides)return;const B=new Set,W=this.modelProvider();L.forEach(K=>{const H=W.getNodeLocation(K);try{const Y=W.getParentNodeLocation(H);K.collapsible&&K.children.length>0&&!K.collapsed?B.add(K):Y&&B.add(W.getNode(Y))}catch(Y){}}),this.activeIndentNodes.forEach(K=>{B.has(K)||this.renderedIndentGuides.forEach(K,H=>H.classList.remove("active"))}),B.forEach(K=>{this.activeIndentNodes.has(K)||this.renderedIndentGuides.forEach(K,H=>H.classList.add("active"))}),this.activeIndentNodes=B}dispose(){this.renderedNodes.clear(),this.renderedElements.clear(),this.indentGuidesDisposable.dispose(),(0,a.dispose)(this.disposables)}}m.DefaultIndent=8;class E{constructor(L,B,W){this.tree=L,this.keyboardNavigationLabelProvider=B,this._filter=W,this._totalCount=0,this._matchCount=0,this._pattern="",this._lowercasePattern="",this.disposables=new a.DisposableStore,L.onWillRefilter(this.reset,this,this.disposables)}get totalCount(){return this._totalCount}get matchCount(){return this._matchCount}set pattern(L){this._pattern=L,this._lowercasePattern=L.toLowerCase()}filter(L,B){if(this._filter){const H=this._filter.filter(L,B);if(this.tree.options.simpleKeyboardNavigation)return H;let Y;if(typeof H=="boolean"?Y=H?1:0:(0,C.isFilterResult)(H)?Y=(0,C.getVisibleState)(H.visibility):Y=H,Y===0)return!1}if(this._totalCount++,this.tree.options.simpleKeyboardNavigation||!this._pattern)return this._matchCount++,{data:d.FuzzyScore.Default,visibility:!0};const W=this.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(L),K=Array.isArray(W)?W:[W];for(const H of K){const Y=H&&H.toString();if(typeof Y=="undefined")return{data:d.FuzzyScore.Default,visibility:!0};const X=(0,d.fuzzyScore)(this._pattern,this._lowercasePattern,0,Y,Y.toLowerCase(),0,!0);if(X)return this._matchCount++,K.length===1?{data:X,visibility:!0}:{data:{label:Y,score:X},visibility:!0}}return this.tree.options.filterOnType?2:{data:d.FuzzyScore.Default,visibility:!0}}reset(){this._totalCount=0,this._matchCount=0}dispose(){(0,a.dispose)(this.disposables)}}class I{constructor(L,B,W,K,H){this.tree=L,this.view=W,this.filter=K,this.keyboardNavigationDelegate=H,this._enabled=!1,this._pattern="",this._empty=!1,this._onDidChangeEmptyState=new u.Emitter,this.positionClassName="ne",this.automaticKeyboardNavigation=!0,this.triggered=!1,this._onDidChangePattern=new u.Emitter,this.enabledDisposables=new a.DisposableStore,this.disposables=new a.DisposableStore,this.domNode=(0,N.$)(`.monaco-list-type-filter.${this.positionClassName}`),this.domNode.draggable=!0,this.disposables.add((0,N.addDisposableListener)(this.domNode,"dragstart",()=>this.onDragStart())),this.messageDomNode=(0,N.append)(W.getHTMLElement(),(0,N.$)(".monaco-list-type-filter-message")),this.labelDomNode=(0,N.append)(this.domNode,(0,N.$)("span.label"));const Y=(0,N.append)(this.domNode,(0,N.$)(".controls"));this._filterOnType=!!L.options.filterOnType,this.filterOnTypeDomNode=(0,N.append)(Y,(0,N.$)("input.filter")),this.filterOnTypeDomNode.type="checkbox",this.filterOnTypeDomNode.checked=this._filterOnType,this.filterOnTypeDomNode.tabIndex=-1,this.updateFilterOnTypeTitleAndIcon(),this.disposables.add((0,N.addDisposableListener)(this.filterOnTypeDomNode,"input",()=>this.onDidChangeFilterOnType())),this.clearDomNode=(0,N.append)(Y,(0,N.$)("button.clear"+g.treeFilterClearIcon.cssSelector)),this.clearDomNode.tabIndex=-1,this.clearDomNode.title=(0,i.localize)(0,null),this.keyboardNavigationEventFilter=L.options.keyboardNavigationEventFilter,B.onDidSplice(this.onDidSpliceModel,this,this.disposables),this.updateOptions(L.options)}get enabled(){return this._enabled}get pattern(){return this._pattern}get filterOnType(){return this._filterOnType}updateOptions(L){L.simpleKeyboardNavigation?this.disable():this.enable(),typeof L.filterOnType!="undefined"&&(this._filterOnType=!!L.filterOnType,this.filterOnTypeDomNode.checked=this._filterOnType,this.updateFilterOnTypeTitleAndIcon()),typeof L.automaticKeyboardNavigation!="undefined"&&(this.automaticKeyboardNavigation=L.automaticKeyboardNavigation),this.tree.refilter(),this.render(),this.automaticKeyboardNavigation||this.onEventOrInput("")}enable(){if(this._enabled)return;const L=this.enabledDisposables.add(new T.DomEmitter(this.view.getHTMLElement(),"keydown")),B=u.Event.chain(L.event).filter(K=>!(0,p.isInputElement)(K.target)||K.target===this.filterOnTypeDomNode).filter(K=>K.key!=="Dead"&&!/^Media/.test(K.key)).map(K=>new D.StandardKeyboardEvent(K)).filter(this.keyboardNavigationEventFilter||(()=>!0)).filter(()=>this.automaticKeyboardNavigation||this.triggered).filter(K=>this.keyboardNavigationDelegate.mightProducePrintableCharacter(K)&&!(K.keyCode===18||K.keyCode===16||K.keyCode===15||K.keyCode===17)||(this.pattern.length>0||this.triggered)&&(K.keyCode===9||K.keyCode===1)&&!K.altKey&&!K.ctrlKey&&!K.metaKey||K.keyCode===1&&(o.isMacintosh?K.altKey&&!K.metaKey:K.ctrlKey)&&!K.shiftKey).forEach(K=>{K.stopPropagation(),K.preventDefault()}).event,W=this.enabledDisposables.add(new T.DomEmitter(this.clearDomNode,"click"));u.Event.chain(u.Event.any(B,W.event)).event(this.onEventOrInput,this,this.enabledDisposables),this.filter.pattern="",this.tree.refilter(),this.render(),this._enabled=!0,this.triggered=!1}disable(){!this._enabled||(this.domNode.remove(),this.enabledDisposables.clear(),this.tree.refilter(),this.render(),this._enabled=!1,this.triggered=!1)}onEventOrInput(L){typeof L=="string"?this.onInput(L):L instanceof MouseEvent||L.keyCode===9||L.keyCode===1&&(o.isMacintosh?L.altKey:L.ctrlKey)?this.onInput(""):L.keyCode===1?this.onInput(this.pattern.length===0?"":this.pattern.substr(0,this.pattern.length-1)):this.onInput(this.pattern+L.browserEvent.key)}onInput(L){const B=this.view.getHTMLElement();L&&!this.domNode.parentElement?B.append(this.domNode):!L&&this.domNode.parentElement&&(this.domNode.remove(),this.tree.domFocus()),this._pattern=L,this._onDidChangePattern.fire(L),this.filter.pattern=L,this.tree.refilter(),L&&this.tree.focusNext(0,!0,void 0,K=>!d.FuzzyScore.isDefault(K.filterData));const W=this.tree.getFocus();if(W.length>0){const K=W[0];this.tree.getRelativeTop(K)===null&&this.tree.reveal(K,.5)}this.render(),L||(this.triggered=!1)}onDragStart(){const L=this.view.getHTMLElement(),{left:B}=(0,N.getDomNodePagePosition)(L),W=L.clientWidth,K=W/2,H=this.domNode.clientWidth,Y=new a.DisposableStore;let X=this.positionClassName;const Z=()=>{switch(X){case"nw":this.domNode.style.top="4px",this.domNode.style.left="4px";break;case"ne":this.domNode.style.top="4px",this.domNode.style.left=`${W-H-6}px`;break}},se=G=>{G.preventDefault();const x=G.clientX-B;G.dataTransfer&&(G.dataTransfer.dropEffect="none"),x<K?X="nw":X="ne",Z()},oe=()=>{this.positionClassName=X,this.domNode.className=`monaco-list-type-filter ${this.positionClassName}`,this.domNode.style.top="",this.domNode.style.left="",(0,a.dispose)(Y)};Z(),this.domNode.classList.remove(X),this.domNode.classList.add("dragging"),Y.add((0,a.toDisposable)(()=>this.domNode.classList.remove("dragging"))),Y.add((0,N.addDisposableListener)(document,"dragover",G=>se(G))),Y.add((0,N.addDisposableListener)(this.domNode,"dragend",()=>oe())),w.StaticDND.CurrentDragAndDropData=new w.DragAndDropData("vscode-ui"),Y.add((0,a.toDisposable)(()=>w.StaticDND.CurrentDragAndDropData=void 0))}onDidSpliceModel(){!this._enabled||this.pattern.length===0||(this.tree.refilter(),this.render())}onDidChangeFilterOnType(){this.tree.updateOptions({filterOnType:this.filterOnTypeDomNode.checked}),this.tree.refilter(),this.tree.domFocus(),this.render(),this.updateFilterOnTypeTitleAndIcon()}updateFilterOnTypeTitleAndIcon(){this.filterOnType?(this.filterOnTypeDomNode.classList.remove(...g.treeFilterOnTypeOffIcon.classNamesArray),this.filterOnTypeDomNode.classList.add(...g.treeFilterOnTypeOnIcon.classNamesArray),this.filterOnTypeDomNode.title=(0,i.localize)(1,null)):(this.filterOnTypeDomNode.classList.remove(...g.treeFilterOnTypeOnIcon.classNamesArray),this.filterOnTypeDomNode.classList.add(...g.treeFilterOnTypeOffIcon.classNamesArray),this.filterOnTypeDomNode.title=(0,i.localize)(2,null))}render(){const L=this.filter.totalCount>0&&this.filter.matchCount===0;this.pattern&&this.tree.options.filterOnType&&L?(this.messageDomNode.textContent=(0,i.localize)(3,null),this._empty=!0):(this.messageDomNode.innerText="",this._empty=!1),this.domNode.classList.toggle("no-matches",L),this.domNode.title=(0,i.localize)(4,null,this.filter.matchCount,this.filter.totalCount),this.labelDomNode.textContent=this.pattern.length>16?"\u2026"+this.pattern.substr(this.pattern.length-16):this.pattern,this._onDidChangeEmptyState.fire(this._empty)}shouldAllowFocus(L){return!this.enabled||!this.pattern||this.filterOnType||this.filter.totalCount>0&&this.filter.matchCount<=1?!0:!d.FuzzyScore.isDefault(L.filterData)}dispose(){this._enabled&&(this.domNode.remove(),this.enabledDisposables.dispose(),this._enabled=!1,this.triggered=!1),this._onDidChangePattern.dispose(),(0,a.dispose)(this.disposables)}}function k(O){let L=n.TreeMouseEventTarget.Unknown;return(0,N.hasParentWithClass)(O.browserEvent.target,"monaco-tl-twistie","monaco-tl-row")?L=n.TreeMouseEventTarget.Twistie:(0,N.hasParentWithClass)(O.browserEvent.target,"monaco-tl-contents","monaco-tl-row")&&(L=n.TreeMouseEventTarget.Element),{browserEvent:O.browserEvent,element:O.element?O.element.element:null,target:L}}function M(O,L){L(O),O.children.forEach(B=>M(B,L))}class P{constructor(L,B){this.getFirstViewElementWithTrait=L,this.identityProvider=B,this.nodes=[],this._onDidChange=new u.Emitter,this.onDidChange=this._onDidChange.event}get nodeSet(){return this._nodeSet||(this._nodeSet=this.createNodeSet()),this._nodeSet}set(L,B){var W;!((W=B)===null||W===void 0?void 0:W.__forceEvent)&&(0,t.equals)(this.nodes,L)||this._set(L,!1,B)}_set(L,B,W){if(this.nodes=[...L],this.elements=void 0,this._nodeSet=void 0,!B){const K=this;this._onDidChange.fire({get elements(){return K.get()},browserEvent:W})}}get(){return this.elements||(this.elements=this.nodes.map(L=>L.element)),[...this.elements]}getNodes(){return this.nodes}has(L){return this.nodeSet.has(L)}onDidModelSplice({insertedNodes:L,deletedNodes:B}){if(!this.identityProvider){const Z=this.createNodeSet(),se=oe=>Z.delete(oe);B.forEach(oe=>M(oe,se)),this.set([...Z.values()]);return}const W=new Set,K=Z=>W.add(this.identityProvider.getId(Z.element).toString());B.forEach(Z=>M(Z,K));const H=new Map,Y=Z=>H.set(this.identityProvider.getId(Z.element).toString(),Z);L.forEach(Z=>M(Z,Y));const X=[];for(const Z of this.nodes){const se=this.identityProvider.getId(Z.element).toString();if(!W.has(se))X.push(Z);else{const G=H.get(se);G&&X.push(G)}}if(this.nodes.length>0&&X.length===0){const Z=this.getFirstViewElementWithTrait();Z&&X.push(Z)}this._set(X,!0)}createNodeSet(){const L=new Set;for(const B of this.nodes)L.add(B);return L}}class F extends p.MouseController{constructor(L,B){super(L);this.tree=B}onViewPointer(L){if((0,p.isInputElement)(L.browserEvent.target)||(0,p.isMonacoEditor)(L.browserEvent.target))return;const B=L.element;if(!B)return super.onViewPointer(L);if(this.isSelectionRangeChangeEvent(L)||this.isSelectionSingleChangeEvent(L))return super.onViewPointer(L);const W=L.browserEvent.target,K=W.classList.contains("monaco-tl-twistie")||W.classList.contains("monaco-icon-label")&&W.classList.contains("folder-icon")&&L.browserEvent.offsetX<16;let H=!1;if(typeof this.tree.expandOnlyOnTwistieClick=="function"?H=this.tree.expandOnlyOnTwistieClick(B.element):H=!!this.tree.expandOnlyOnTwistieClick,H&&!K&&L.browserEvent.detail!==2)return super.onViewPointer(L);if(!this.tree.expandOnDoubleClick&&L.browserEvent.detail===2)return super.onViewPointer(L);if(B.collapsible){const Y=this.tree.model,X=Y.getNodeLocation(B),Z=L.browserEvent.altKey;if(this.tree.setFocus([X]),Y.setCollapsed(X,void 0,Z),H&&K)return}super.onViewPointer(L)}onDoubleClick(L){L.browserEvent.target.classList.contains("monaco-tl-twistie")||!this.tree.expandOnDoubleClick||super.onDoubleClick(L)}}class R extends p.List{constructor(L,B,W,K,H,Y,X,Z){super(L,B,W,K,Z);this.focusTrait=H,this.selectionTrait=Y,this.anchorTrait=X}createMouseController(L){return new F(this,L.tree)}splice(L,B,W=[]){if(super.splice(L,B,W),W.length===0)return;const K=[],H=[];let Y;W.forEach((X,Z)=>{this.focusTrait.has(X)&&K.push(L+Z),this.selectionTrait.has(X)&&H.push(L+Z),this.anchorTrait.has(X)&&(Y=L+Z)}),K.length>0&&super.setFocus((0,t.distinct)([...super.getFocus(),...K])),H.length>0&&super.setSelection((0,t.distinct)([...super.getSelection(),...H])),typeof Y=="number"&&super.setAnchor(Y)}setFocus(L,B,W=!1){super.setFocus(L,B),W||this.focusTrait.set(L.map(K=>this.element(K)),B)}setSelection(L,B,W=!1){super.setSelection(L,B),W||this.selectionTrait.set(L.map(K=>this.element(K)),B)}setAnchor(L,B=!1){super.setAnchor(L),B||(typeof L=="undefined"?this.anchorTrait.set([]):this.anchorTrait.set([this.element(L)]))}}class A{constructor(L,B,W,K,H={}){this._options=H,this.eventBufferer=new u.EventBufferer,this.disposables=new a.DisposableStore,this._onWillRefilter=new u.Emitter,this.onWillRefilter=this._onWillRefilter.event,this._onDidUpdateOptions=new u.Emitter;const Y=new _(W),X=new u.Relay,Z=new u.Relay,se=new v(Z.event);this.renderers=K.map(x=>new m(x,()=>this.model,X.event,se,H));for(let x of this.renderers)this.disposables.add(x);let oe;H.keyboardNavigationLabelProvider&&(oe=new E(this,H.keyboardNavigationLabelProvider,H.filter),H=Object.assign(Object.assign({},H),{filter:oe}),this.disposables.add(oe)),this.focus=new P(()=>this.view.getFocusedElements()[0],H.identityProvider),this.selection=new P(()=>this.view.getSelectedElements()[0],H.identityProvider),this.anchor=new P(()=>this.view.getAnchorElement(),H.identityProvider),this.view=new R(L,B,Y,this.renderers,this.focus,this.selection,this.anchor,Object.assign(Object.assign({},y(()=>this.model,H)),{tree:this})),this.model=this.createModel(L,this.view,H),X.input=this.model.onDidChangeCollapseState;const G=u.Event.forEach(this.model.onDidSplice,x=>{this.eventBufferer.bufferEvents(()=>{this.focus.onDidModelSplice(x),this.selection.onDidModelSplice(x)})});if(G(()=>null,null,this.disposables),Z.input=u.Event.chain(u.Event.any(G,this.focus.onDidChange,this.selection.onDidChange)).debounce(()=>null,0).map(()=>{const x=new Set;for(const U of this.focus.getNodes())x.add(U);for(const U of this.selection.getNodes())x.add(U);return[...x.values()]}).event,H.keyboardSupport!==!1){const x=u.Event.chain(this.view.onKeyDown).filter(U=>!(0,p.isInputElement)(U.target)).map(U=>new D.StandardKeyboardEvent(U));x.filter(U=>U.keyCode===15).on(this.onLeftArrow,this,this.disposables),x.filter(U=>U.keyCode===17).on(this.onRightArrow,this,this.disposables),x.filter(U=>U.keyCode===10).on(this.onSpace,this,this.disposables)}if(H.keyboardNavigationLabelProvider){const x=H.keyboardNavigationDelegate||p.DefaultKeyboardNavigationDelegate;this.typeFilterController=new I(this,this.model,this.view,oe,x),this.focusNavigationFilter=U=>this.typeFilterController.shouldAllowFocus(U),this.disposables.add(this.typeFilterController)}this.styleElement=(0,N.createStyleSheet)(this.view.getHTMLElement()),this.getHTMLElement().classList.toggle("always",this._options.renderIndentGuides===b.Always)}get onDidChangeFocus(){return this.eventBufferer.wrapEvent(this.focus.onDidChange)}get onDidChangeSelection(){return this.eventBufferer.wrapEvent(this.selection.onDidChange)}get onMouseDblClick(){return u.Event.map(this.view.onMouseDblClick,k)}get onPointer(){return u.Event.map(this.view.onPointer,k)}get onDidFocus(){return this.view.onDidFocus}get onDidChangeCollapseState(){return this.model.onDidChangeCollapseState}get expandOnDoubleClick(){return typeof this._options.expandOnDoubleClick=="undefined"?!0:this._options.expandOnDoubleClick}get expandOnlyOnTwistieClick(){return typeof this._options.expandOnlyOnTwistieClick=="undefined"?!0:this._options.expandOnlyOnTwistieClick}get onDidDispose(){return this.view.onDidDispose}updateOptions(L={}){this._options=Object.assign(Object.assign({},this._options),L);for(const B of this.renderers)B.updateOptions(L);this.view.updateOptions(Object.assign(Object.assign({},this._options),{enableKeyboardNavigation:this._options.simpleKeyboardNavigation})),this.typeFilterController&&this.typeFilterController.updateOptions(this._options),this._onDidUpdateOptions.fire(this._options),this.getHTMLElement().classList.toggle("always",this._options.renderIndentGuides===b.Always)}get options(){return this._options}getHTMLElement(){return this.view.getHTMLElement()}get scrollTop(){return this.view.scrollTop}set scrollTop(L){this.view.scrollTop=L}domFocus(){this.view.domFocus()}layout(L,B){this.view.layout(L,B)}style(L){const B=`.${this.view.domId}`,W=[];L.treeIndentGuidesStroke&&(W.push(`.monaco-list${B}:hover .monaco-tl-indent > .indent-guide, .monaco-list${B}.always .monaco-tl-indent > .indent-guide  { border-color: ${L.treeIndentGuidesStroke.transparent(.4)}; }`),W.push(`.monaco-list${B} .monaco-tl-indent > .indent-guide.active { border-color: ${L.treeIndentGuidesStroke}; }`)),this.styleElement.textContent=W.join(`
`),this.view.style(L)}collapse(L,B=!1){return this.model.setCollapsed(L,!0,B)}expand(L,B=!1){return this.model.setCollapsed(L,!1,B)}isCollapsible(L){return this.model.isCollapsible(L)}setCollapsible(L,B){return this.model.setCollapsible(L,B)}isCollapsed(L){return this.model.isCollapsed(L)}refilter(){this._onWillRefilter.fire(void 0),this.model.refilter()}setSelection(L,B){const W=L.map(H=>this.model.getNode(H));this.selection.set(W,B);const K=L.map(H=>this.model.getListIndex(H)).filter(H=>H>-1);this.view.setSelection(K,B,!0)}getSelection(){return this.selection.get()}setFocus(L,B){const W=L.map(H=>this.model.getNode(H));this.focus.set(W,B);const K=L.map(H=>this.model.getListIndex(H)).filter(H=>H>-1);this.view.setFocus(K,B,!0)}focusNext(L=1,B=!1,W,K=this.focusNavigationFilter){this.view.focusNext(L,B,W,K)}getFocus(){return this.focus.get()}reveal(L,B){this.model.expandTo(L);const W=this.model.getListIndex(L);W!==-1&&this.view.reveal(W,B)}getRelativeTop(L){const B=this.model.getListIndex(L);return B===-1?null:this.view.getRelativeTop(B)}onLeftArrow(L){L.preventDefault(),L.stopPropagation();const B=this.view.getFocusedElements();if(B.length===0)return;const W=B[0],K=this.model.getNodeLocation(W);if(!this.model.setCollapsed(K,!0)){const Y=this.model.getParentNodeLocation(K);if(!Y)return;const X=this.model.getListIndex(Y);this.view.reveal(X),this.view.setFocus([X])}}onRightArrow(L){L.preventDefault(),L.stopPropagation();const B=this.view.getFocusedElements();if(B.length===0)return;const W=B[0],K=this.model.getNodeLocation(W);if(!this.model.setCollapsed(K,!1)){if(!W.children.some(Z=>Z.visible))return;const[Y]=this.view.getFocus(),X=Y+1;this.view.reveal(X),this.view.setFocus([X])}}onSpace(L){L.preventDefault(),L.stopPropagation();const B=this.view.getFocusedElements();if(B.length===0)return;const W=B[0],K=this.model.getNodeLocation(W),H=L.browserEvent.altKey;this.model.setCollapsed(K,void 0,H)}dispose(){(0,a.dispose)(this.disposables),this.view.dispose()}}e.AbstractTree=A}),define(J[447],ee([0,1,187,164]),function(j,e,w,N){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DataTree=void 0;class T extends w.AbstractTree{constructor(S,p,C,n,g,t={}){super(S,p,C,n,t);this.user=S,this.dataSource=g,this.identityProvider=t.identityProvider}createModel(S,p,C){return new N.ObjectTreeModel(S,p,C)}}e.DataTree=T}),define(J[248],ee([0,1,187,304,164,92,54]),function(j,e,w,N,T,D,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CompressibleObjectTree=e.ObjectTree=void 0;class p extends w.AbstractTree{constructor(s,c,u,d,a={}){super(s,c,u,d,a)}get onDidChangeCollapseState(){return this.model.onDidChangeCollapseState}setChildren(s,c=S.Iterable.empty(),u){this.model.setChildren(s,c,u)}rerender(s){if(s===void 0){this.view.rerender();return}this.model.rerender(s)}hasElement(s){return this.model.has(s)}createModel(s,c,u){return new T.ObjectTreeModel(s,c,u)}}e.ObjectTree=p;class C{constructor(s,c){this._compressedTreeNodeProvider=s,this.renderer=c,this.templateId=c.templateId,c.onDidChangeTwistieState&&(this.onDidChangeTwistieState=c.onDidChangeTwistieState)}get compressedTreeNodeProvider(){return this._compressedTreeNodeProvider()}renderTemplate(s){const c=this.renderer.renderTemplate(s);return{compressedTreeNode:void 0,data:c}}renderElement(s,c,u,d){const a=this.compressedTreeNodeProvider.getCompressedTreeNode(s.element);a.element.elements.length===1?(u.compressedTreeNode=void 0,this.renderer.renderElement(s,c,u.data,d)):(u.compressedTreeNode=a,this.renderer.renderCompressedElements(a,c,u.data,d))}disposeElement(s,c,u,d){u.compressedTreeNode?this.renderer.disposeCompressedElements&&this.renderer.disposeCompressedElements(u.compressedTreeNode,c,u.data,d):this.renderer.disposeElement&&this.renderer.disposeElement(s,c,u.data,d)}disposeTemplate(s){this.renderer.disposeTemplate(s.data)}renderTwistie(s,c){return this.renderer.renderTwistie?this.renderer.renderTwistie(s,c):!1}}Fe([D.memoize],C.prototype,"compressedTreeNodeProvider",null);function n(t,s){return s&&Object.assign(Object.assign({},s),{keyboardNavigationLabelProvider:s.keyboardNavigationLabelProvider&&{getKeyboardNavigationLabel(c){let u;try{u=t().getCompressedTreeNode(c)}catch(d){return s.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(c)}return u.element.elements.length===1?s.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(c):s.keyboardNavigationLabelProvider.getCompressedNodeKeyboardNavigationLabel(u.element.elements)}}})}class g extends p{constructor(s,c,u,d,a={}){const r=()=>this,o=d.map(i=>new C(r,i));super(s,c,u,o,n(r,a))}setChildren(s,c=S.Iterable.empty(),u){this.model.setChildren(s,c,u)}createModel(s,c,u){return new N.CompressibleObjectTreeModel(s,c,u)}updateOptions(s={}){super.updateOptions(s),typeof s.compressionEnabled!="undefined"&&this.model.setCompressionEnabled(s.compressionEnabled)}getCompressedTreeNode(s=null){return this.model.getCompressedTreeNode(s)}}e.CompressibleObjectTree=g}),define(J[448],ee([0,1,171,187,163,248,104,208,14,11,4,54,2]),function(j,e,w,N,T,D,S,p,C,n,g,t,s){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CompressibleAsyncDataTree=e.AsyncDataTree=void 0;function c(M){return Object.assign(Object.assign({},M),{children:[],refreshPromise:void 0,stale:!0,slow:!1,collapsedByDefault:void 0})}function u(M,P){return P.parent?P.parent===M?!0:u(M,P.parent):!1}function d(M,P){return M===P||u(M,P)||u(P,M)}class a{constructor(P){this.node=P}get element(){return this.node.element.element}get children(){return this.node.children.map(P=>new a(P))}get depth(){return this.node.depth}get visibleChildrenCount(){return this.node.visibleChildrenCount}get visibleChildIndex(){return this.node.visibleChildIndex}get collapsible(){return this.node.collapsible}get collapsed(){return this.node.collapsed}get visible(){return this.node.visible}get filterData(){return this.node.filterData}}class r{constructor(P,F,R){this.renderer=P,this.nodeMapper=F,this.onDidChangeTwistieState=R,this.renderedNodes=new Map,this.templateId=P.templateId}renderTemplate(P){return{templateData:this.renderer.renderTemplate(P)}}renderElement(P,F,R,A){this.renderer.renderElement(this.nodeMapper.map(P),F,R.templateData,A)}renderTwistie(P,F){return P.slow?(F.classList.add(...p.treeItemLoadingIcon.classNamesArray),!0):(F.classList.remove(...p.treeItemLoadingIcon.classNamesArray),!1)}disposeElement(P,F,R,A){this.renderer.disposeElement&&this.renderer.disposeElement(this.nodeMapper.map(P),F,R.templateData,A)}disposeTemplate(P){this.renderer.disposeTemplate(P.templateData)}dispose(){this.renderedNodes.clear()}}function o(M){return{browserEvent:M.browserEvent,elements:M.elements.map(P=>P.element)}}function i(M){return{browserEvent:M.browserEvent,element:M.element&&M.element.element,target:M.target}}class l extends w.ElementsDragAndDropData{constructor(P){super(P.elements.map(F=>F.element));this.data=P}}function h(M){return M instanceof w.ElementsDragAndDropData?new l(M):M}class f{constructor(P){this.dnd=P}getDragURI(P){return this.dnd.getDragURI(P.element)}getDragLabel(P,F){if(this.dnd.getDragLabel)return this.dnd.getDragLabel(P.map(R=>R.element),F)}onDragStart(P,F){this.dnd.onDragStart&&this.dnd.onDragStart(h(P),F)}onDragOver(P,F,R,A,O=!0){return this.dnd.onDragOver(h(P),F&&F.element,R,A)}drop(P,F,R,A){this.dnd.drop(h(P),F&&F.element,R,A)}onDragEnd(P){this.dnd.onDragEnd&&this.dnd.onDragEnd(P)}}function y(M){return M&&Object.assign(Object.assign({},M),{collapseByDefault:!0,identityProvider:M.identityProvider&&{getId(P){return M.identityProvider.getId(P.element)}},dnd:M.dnd&&new f(M.dnd),multipleSelectionController:M.multipleSelectionController&&{isSelectionSingleChangeEvent(P){return M.multipleSelectionController.isSelectionSingleChangeEvent(Object.assign(Object.assign({},P),{element:P.element}))},isSelectionRangeChangeEvent(P){return M.multipleSelectionController.isSelectionRangeChangeEvent(Object.assign(Object.assign({},P),{element:P.element}))}},accessibilityProvider:M.accessibilityProvider&&Object.assign(Object.assign({},M.accessibilityProvider),{getPosInSet:void 0,getSetSize:void 0,getRole:M.accessibilityProvider.getRole?P=>M.accessibilityProvider.getRole(P.element):()=>"treeitem",isChecked:M.accessibilityProvider.isChecked?P=>{var F;return!!((F=M.accessibilityProvider)===null||F===void 0?void 0:F.isChecked(P.element))}:void 0,getAriaLabel(P){return M.accessibilityProvider.getAriaLabel(P.element)},getWidgetAriaLabel(){return M.accessibilityProvider.getWidgetAriaLabel()},getWidgetRole:M.accessibilityProvider.getWidgetRole?()=>M.accessibilityProvider.getWidgetRole():()=>"tree",getAriaLevel:M.accessibilityProvider.getAriaLevel&&(P=>M.accessibilityProvider.getAriaLevel(P.element)),getActiveDescendantId:M.accessibilityProvider.getActiveDescendantId&&(P=>M.accessibilityProvider.getActiveDescendantId(P.element))}),filter:M.filter&&{filter(P,F){return M.filter.filter(P.element,F)}},keyboardNavigationLabelProvider:M.keyboardNavigationLabelProvider&&Object.assign(Object.assign({},M.keyboardNavigationLabelProvider),{getKeyboardNavigationLabel(P){return M.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(P.element)}}),sorter:void 0,expandOnlyOnTwistieClick:typeof M.expandOnlyOnTwistieClick=="undefined"?void 0:typeof M.expandOnlyOnTwistieClick!="function"?M.expandOnlyOnTwistieClick:P=>M.expandOnlyOnTwistieClick(P.element),additionalScrollHeight:M.additionalScrollHeight})}function _(M,P){P(M),M.children.forEach(F=>_(F,P))}class b{constructor(P,F,R,A,O,L={}){this.user=P,this.dataSource=O,this.nodes=new Map,this.subTreeRefreshPromises=new Map,this.refreshPromises=new Map,this._onDidRender=new g.Emitter,this._onDidChangeNodeSlowState=new g.Emitter,this.nodeMapper=new S.WeakMapper(B=>new a(B)),this.disposables=new s.DisposableStore,this.identityProvider=L.identityProvider,this.autoExpandSingleChildren=typeof L.autoExpandSingleChildren=="undefined"?!1:L.autoExpandSingleChildren,this.sorter=L.sorter,this.collapseByDefault=L.collapseByDefault,this.tree=this.createTree(P,F,R,A,L),this.root=c({element:void 0,parent:null,hasChildren:!0}),this.identityProvider&&(this.root=Object.assign(Object.assign({},this.root),{id:null})),this.nodes.set(null,this.root),this.tree.onDidChangeCollapseState(this._onDidChangeCollapseState,this,this.disposables)}get onDidChangeFocus(){return g.Event.map(this.tree.onDidChangeFocus,o)}get onDidChangeSelection(){return g.Event.map(this.tree.onDidChangeSelection,o)}get onMouseDblClick(){return g.Event.map(this.tree.onMouseDblClick,i)}get onPointer(){return g.Event.map(this.tree.onPointer,i)}get onDidFocus(){return this.tree.onDidFocus}get onDidDispose(){return this.tree.onDidDispose}createTree(P,F,R,A,O){const L=new N.ComposedTreeDelegate(R),B=A.map(K=>new r(K,this.nodeMapper,this._onDidChangeNodeSlowState.event)),W=y(O)||{};return new D.ObjectTree(P,F,L,B,W)}updateOptions(P={}){this.tree.updateOptions(P)}getHTMLElement(){return this.tree.getHTMLElement()}get scrollTop(){return this.tree.scrollTop}set scrollTop(P){this.tree.scrollTop=P}domFocus(){this.tree.domFocus()}layout(P,F){this.tree.layout(P,F)}style(P){this.tree.style(P)}getInput(){return this.root.element}setInput(P,F){return Re(this,void 0,void 0,function*(){this.refreshPromises.forEach(A=>A.cancel()),this.refreshPromises.clear(),this.root.element=P;const R=F&&{viewState:F,focus:[],selection:[]};yield this._updateChildren(P,!0,!1,R),R&&(this.tree.setFocus(R.focus),this.tree.setSelection(R.selection)),F&&typeof F.scrollTop=="number"&&(this.scrollTop=F.scrollTop)})}_updateChildren(P=this.root.element,F=!0,R=!1,A,O){return Re(this,void 0,void 0,function*(){if(typeof this.root.element=="undefined")throw new S.TreeError(this.user,"Tree input not set");this.root.refreshPromise&&(yield this.root.refreshPromise,yield g.Event.toPromise(this._onDidRender.event));const L=this.getDataNode(P);if(yield this.refreshAndRenderNode(L,F,A,O),R)try{this.tree.rerender(L)}catch(B){}})}rerender(P){if(P===void 0||P===this.root.element){this.tree.rerender();return}const F=this.getDataNode(P);this.tree.rerender(F)}collapse(P,F=!1){const R=this.getDataNode(P);return this.tree.collapse(R===this.root?null:R,F)}expand(P,F=!1){return Re(this,void 0,void 0,function*(){if(typeof this.root.element=="undefined")throw new S.TreeError(this.user,"Tree input not set");this.root.refreshPromise&&(yield this.root.refreshPromise,yield g.Event.toPromise(this._onDidRender.event));const R=this.getDataNode(P);if(this.tree.hasElement(R)&&!this.tree.isCollapsible(R)||(R.refreshPromise&&(yield this.root.refreshPromise,yield g.Event.toPromise(this._onDidRender.event)),R!==this.root&&!R.refreshPromise&&!this.tree.isCollapsed(R)))return!1;const A=this.tree.expand(R===this.root?null:R,F);return R.refreshPromise&&(yield this.root.refreshPromise,yield g.Event.toPromise(this._onDidRender.event)),A})}setSelection(P,F){const R=P.map(A=>this.getDataNode(A));this.tree.setSelection(R,F)}getSelection(){return this.tree.getSelection().map(F=>F.element)}setFocus(P,F){const R=P.map(A=>this.getDataNode(A));this.tree.setFocus(R,F)}getFocus(){return this.tree.getFocus().map(F=>F.element)}reveal(P,F){this.tree.reveal(this.getDataNode(P),F)}getDataNode(P){const F=this.nodes.get(P===this.root.element?null:P);if(!F)throw new S.TreeError(this.user,`Data tree node not found: ${P}`);return F}refreshAndRenderNode(P,F,R,A){return Re(this,void 0,void 0,function*(){yield this.refreshNode(P,F,R),this.render(P,R,A)})}refreshNode(P,F,R){return Re(this,void 0,void 0,function*(){let A;return this.subTreeRefreshPromises.forEach((O,L)=>{!A&&d(L,P)&&(A=O.then(()=>this.refreshNode(P,F,R)))}),A||this.doRefreshSubTree(P,F,R)})}doRefreshSubTree(P,F,R){return Re(this,void 0,void 0,function*(){let A;P.refreshPromise=new Promise(O=>A=O),this.subTreeRefreshPromises.set(P,P.refreshPromise),P.refreshPromise.finally(()=>{P.refreshPromise=void 0,this.subTreeRefreshPromises.delete(P)});try{const O=yield this.doRefreshNode(P,F,R);P.stale=!1,yield C.Promises.settled(O.map(L=>this.doRefreshSubTree(L,F,R)))}finally{A()}})}doRefreshNode(P,F,R){return Re(this,void 0,void 0,function*(){P.hasChildren=!!this.dataSource.hasChildren(P.element);let A;if(!P.hasChildren)A=Promise.resolve(t.Iterable.empty());else{const O=(0,C.timeout)(800);O.then(()=>{P.slow=!0,this._onDidChangeNodeSlowState.fire(P)},L=>null),A=this.doGetChildren(P).finally(()=>O.cancel())}try{const O=yield A;return this.setChildren(P,O,F,R)}catch(O){if(P!==this.root&&this.tree.hasElement(P)&&this.tree.collapse(P),(0,n.isPromiseCanceledError)(O))return[];throw O}finally{P.slow&&(P.slow=!1,this._onDidChangeNodeSlowState.fire(P))}})}doGetChildren(P){let F=this.refreshPromises.get(P);return F||(F=(0,C.createCancelablePromise)(()=>Re(this,void 0,void 0,function*(){const R=yield this.dataSource.getChildren(P.element);return this.processChildren(R)})),this.refreshPromises.set(P,F),F.finally(()=>{this.refreshPromises.delete(P)}))}_onDidChangeCollapseState({node:P,deep:F}){P.element!==null&&!P.collapsed&&P.element.stale&&(F?this.collapse(P.element.element):this.refreshAndRenderNode(P.element,!1).catch(n.onUnexpectedError))}setChildren(P,F,R,A){const O=[...F];if(P.children.length===0&&O.length===0)return[];const L=new Map,B=new Map;for(const H of P.children)if(L.set(H.element,H),this.identityProvider){const Y=this.tree.isCollapsed(H);B.set(H.id,{node:H,collapsed:Y})}const W=[],K=O.map(H=>{const Y=!!this.dataSource.hasChildren(H);if(!this.identityProvider){const oe=c({element:H,parent:P,hasChildren:Y});return Y&&this.collapseByDefault&&!this.collapseByDefault(H)&&(oe.collapsedByDefault=!1,W.push(oe)),oe}const X=this.identityProvider.getId(H).toString(),Z=B.get(X);if(Z){const oe=Z.node;return L.delete(oe.element),this.nodes.delete(oe.element),this.nodes.set(H,oe),oe.element=H,oe.hasChildren=Y,R?Z.collapsed?(oe.children.forEach(G=>_(G,x=>this.nodes.delete(x.element))),oe.children.splice(0,oe.children.length),oe.stale=!0):W.push(oe):Y&&this.collapseByDefault&&!this.collapseByDefault(H)&&(oe.collapsedByDefault=!1,W.push(oe)),oe}const se=c({element:H,parent:P,id:X,hasChildren:Y});return A&&A.viewState.focus&&A.viewState.focus.indexOf(X)>-1&&A.focus.push(se),A&&A.viewState.selection&&A.viewState.selection.indexOf(X)>-1&&A.selection.push(se),A&&A.viewState.expanded&&A.viewState.expanded.indexOf(X)>-1?W.push(se):Y&&this.collapseByDefault&&!this.collapseByDefault(H)&&(se.collapsedByDefault=!1,W.push(se)),se});for(const H of L.values())_(H,Y=>this.nodes.delete(Y.element));for(const H of K)this.nodes.set(H.element,H);return P.children.splice(0,P.children.length,...K),P!==this.root&&this.autoExpandSingleChildren&&K.length===1&&W.length===0&&(K[0].collapsedByDefault=!1,W.push(K[0])),W}render(P,F,R){const A=P.children.map(L=>this.asTreeElement(L,F)),O=R&&Object.assign(Object.assign({},R),{diffIdentityProvider:R.diffIdentityProvider&&{getId(L){return R.diffIdentityProvider.getId(L.element)}}});this.tree.setChildren(P===this.root?null:P,A,O),P!==this.root&&this.tree.setCollapsible(P,P.hasChildren),this._onDidRender.fire()}asTreeElement(P,F){if(P.stale)return{element:P,collapsible:P.hasChildren,collapsed:!0};let R;return F&&F.viewState.expanded&&P.id&&F.viewState.expanded.indexOf(P.id)>-1?R=!1:R=P.collapsedByDefault,P.collapsedByDefault=void 0,{element:P,children:P.hasChildren?t.Iterable.map(P.children,A=>this.asTreeElement(A,F)):[],collapsible:P.hasChildren,collapsed:R}}processChildren(P){return this.sorter&&(P=[...P].sort(this.sorter.compare.bind(this.sorter))),P}dispose(){this.disposables.dispose()}}e.AsyncDataTree=b;class v{constructor(P){this.node=P}get element(){return{elements:this.node.element.elements.map(P=>P.element),incompressible:this.node.element.incompressible}}get children(){return this.node.children.map(P=>new v(P))}get depth(){return this.node.depth}get visibleChildrenCount(){return this.node.visibleChildrenCount}get visibleChildIndex(){return this.node.visibleChildIndex}get collapsible(){return this.node.collapsible}get collapsed(){return this.node.collapsed}get visible(){return this.node.visible}get filterData(){return this.node.filterData}}class m{constructor(P,F,R,A){this.renderer=P,this.nodeMapper=F,this.compressibleNodeMapperProvider=R,this.onDidChangeTwistieState=A,this.renderedNodes=new Map,this.disposables=[],this.templateId=P.templateId}renderTemplate(P){return{templateData:this.renderer.renderTemplate(P)}}renderElement(P,F,R,A){this.renderer.renderElement(this.nodeMapper.map(P),F,R.templateData,A)}renderCompressedElements(P,F,R,A){this.renderer.renderCompressedElements(this.compressibleNodeMapperProvider().map(P),F,R.templateData,A)}renderTwistie(P,F){return P.slow?(F.classList.add(...p.treeItemLoadingIcon.classNamesArray),!0):(F.classList.remove(...p.treeItemLoadingIcon.classNamesArray),!1)}disposeElement(P,F,R,A){this.renderer.disposeElement&&this.renderer.disposeElement(this.nodeMapper.map(P),F,R.templateData,A)}disposeCompressedElements(P,F,R,A){this.renderer.disposeCompressedElements&&this.renderer.disposeCompressedElements(this.compressibleNodeMapperProvider().map(P),F,R.templateData,A)}disposeTemplate(P){this.renderer.disposeTemplate(P.templateData)}dispose(){this.renderedNodes.clear(),this.disposables=(0,s.dispose)(this.disposables)}}function E(M){const P=M&&y(M);return P&&Object.assign(Object.assign({},P),{keyboardNavigationLabelProvider:P.keyboardNavigationLabelProvider&&Object.assign(Object.assign({},P.keyboardNavigationLabelProvider),{getCompressedNodeKeyboardNavigationLabel(F){return M.keyboardNavigationLabelProvider.getCompressedNodeKeyboardNavigationLabel(F.map(R=>R.element))}})})}class I extends b{constructor(P,F,R,A,O,L,B={}){super(P,F,R,O,L,B);this.compressionDelegate=A,this.compressibleNodeMapper=new S.WeakMapper(W=>new v(W)),this.filter=B.filter}createTree(P,F,R,A,O){const L=new N.ComposedTreeDelegate(R),B=A.map(K=>new m(K,this.nodeMapper,()=>this.compressibleNodeMapper,this._onDidChangeNodeSlowState.event)),W=E(O)||{};return new D.CompressibleObjectTree(P,F,L,B,W)}asTreeElement(P,F){return Object.assign({incompressible:this.compressionDelegate.isIncompressible(P.element)},super.asTreeElement(P,F))}updateOptions(P={}){this.tree.updateOptions(P)}render(P,F){if(!this.identityProvider)return super.render(P,F);const R=X=>this.identityProvider.getId(X).toString(),A=X=>{const Z=new Set;for(const se of X){const oe=this.tree.getCompressedTreeNode(se===this.root?null:se);if(!!oe.element)for(const G of oe.element.elements)Z.add(R(G.element))}return Z},O=A(this.tree.getSelection()),L=A(this.tree.getFocus());super.render(P,F);const B=this.getSelection();let W=!1;const K=this.getFocus();let H=!1;const Y=X=>{const Z=X.element;if(Z)for(let se=0;se<Z.elements.length;se++){const oe=R(Z.elements[se].element),G=Z.elements[Z.elements.length-1].element;O.has(oe)&&B.indexOf(G)===-1&&(B.push(G),W=!0),L.has(oe)&&K.indexOf(G)===-1&&(K.push(G),H=!0)}X.children.forEach(Y)};Y(this.tree.getCompressedTreeNode(P===this.root?null:P)),W&&this.setSelection(B),H&&this.setFocus(K)}processChildren(P){return this.filter&&(P=t.Iterable.filter(P,F=>{const R=this.filter.filter(F,1),A=k(R);if(A===2)throw new Error("Recursive tree visibility not supported in async data compressed trees");return A===1})),super.processChildren(P)}}e.CompressibleAsyncDataTree=I;function k(M){return typeof M=="boolean"?M?1:0:(0,T.isFilterResult)(M)?(0,T.getVisibleState)(M.visibility):(0,T.getVisibleState)(M)}}),define(J[449],ee([5,6]),function(j,e){return j.create("vs/base/common/actions",e)}),define(J[51],ee([0,1,4,2,449]),function(j,e,w,N,T){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EmptySubmenuAction=e.SubmenuAction=e.Separator=e.ActionRunner=e.Action=void 0;class D extends N.Disposable{constructor(t,s="",c="",u=!0,d){super();this._onDidChange=this._register(new w.Emitter),this.onDidChange=this._onDidChange.event,this._enabled=!0,this._id=t,this._label=s,this._cssClass=c,this._enabled=u,this._actionCallback=d}get id(){return this._id}get label(){return this._label}set label(t){this._setLabel(t)}_setLabel(t){this._label!==t&&(this._label=t,this._onDidChange.fire({label:t}))}get tooltip(){return this._tooltip||""}set tooltip(t){this._setTooltip(t)}_setTooltip(t){this._tooltip!==t&&(this._tooltip=t,this._onDidChange.fire({tooltip:t}))}get class(){return this._cssClass}set class(t){this._setClass(t)}_setClass(t){this._cssClass!==t&&(this._cssClass=t,this._onDidChange.fire({class:t}))}get enabled(){return this._enabled}set enabled(t){this._setEnabled(t)}_setEnabled(t){this._enabled!==t&&(this._enabled=t,this._onDidChange.fire({enabled:t}))}get checked(){return this._checked}set checked(t){this._setChecked(t)}_setChecked(t){this._checked!==t&&(this._checked=t,this._onDidChange.fire({checked:t}))}run(t,s){return Re(this,void 0,void 0,function*(){this._actionCallback&&(yield this._actionCallback(t))})}}e.Action=D;class S extends N.Disposable{constructor(){super(...arguments);this._onBeforeRun=this._register(new w.Emitter),this.onBeforeRun=this._onBeforeRun.event,this._onDidRun=this._register(new w.Emitter),this.onDidRun=this._onDidRun.event}run(t,s){return Re(this,void 0,void 0,function*(){if(!t.enabled)return;this._onBeforeRun.fire({action:t});let c;try{yield this.runAction(t,s)}catch(u){c=u}this._onDidRun.fire({action:t,error:c})})}runAction(t,s){return Re(this,void 0,void 0,function*(){yield t.run(s)})}}e.ActionRunner=S;class p extends D{constructor(t){super(p.ID,t,t?"separator text":"separator");this.checked=!1,this.enabled=!1}}e.Separator=p,p.ID="vs.actions.separator";class C{constructor(t,s,c,u){this.tooltip="",this.enabled=!0,this.checked=!1,this.id=t,this.label=s,this.class=u,this._actions=c}get actions(){return this._actions}dispose(){}run(){return Re(this,void 0,void 0,function*(){})}}e.SubmenuAction=C;class n extends D{constructor(){super(n.ID,T.localize(0,null),void 0,!1)}}e.EmptySubmenuAction=n,n.ID="vs.actions.empty"}),define(J[121],ee([0,1,34,169,7,58,51,2,17,20,437,214]),function(j,e,w,N,T,D,S,p,C,n,g){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ActionViewItem=e.BaseActionViewItem=void 0;class t extends p.Disposable{constructor(u,d,a={}){super();this.options=a,this._context=u||this,this._action=d,d instanceof S.Action&&this._register(d.onDidChange(r=>{!this.element||this.handleActionChangeEvent(r)}))}handleActionChangeEvent(u){u.enabled!==void 0&&this.updateEnabled(),u.checked!==void 0&&this.updateChecked(),u.class!==void 0&&this.updateClass(),u.label!==void 0&&(this.updateLabel(),this.updateTooltip()),u.tooltip!==void 0&&this.updateTooltip()}get actionRunner(){return this._actionRunner||(this._actionRunner=this._register(new S.ActionRunner)),this._actionRunner}set actionRunner(u){this._actionRunner=u}getAction(){return this._action}isEnabled(){return this._action.enabled}setActionContext(u){this._context=u}render(u){const d=this.element=u;this._register(D.Gesture.addTarget(u));const a=this.options&&this.options.draggable;a&&(u.draggable=!0,w.isFirefox&&this._register((0,T.addDisposableListener)(u,T.EventType.DRAG_START,r=>{var o;return(o=r.dataTransfer)===null||o===void 0?void 0:o.setData(N.DataTransfers.TEXT,this._action.label)}))),this._register((0,T.addDisposableListener)(d,D.EventType.Tap,r=>this.onClick(r,!0))),this._register((0,T.addDisposableListener)(d,T.EventType.MOUSE_DOWN,r=>{a||T.EventHelper.stop(r,!0),this._action.enabled&&r.button===0&&d.classList.add("active")})),C.isMacintosh&&this._register((0,T.addDisposableListener)(d,T.EventType.CONTEXT_MENU,r=>{r.button===0&&r.ctrlKey===!0&&this.onClick(r)})),this._register((0,T.addDisposableListener)(d,T.EventType.CLICK,r=>{T.EventHelper.stop(r,!0),this.options&&this.options.isMenu||this.onClick(r)})),this._register((0,T.addDisposableListener)(d,T.EventType.DBLCLICK,r=>{T.EventHelper.stop(r,!0)})),[T.EventType.MOUSE_UP,T.EventType.MOUSE_OUT].forEach(r=>{this._register((0,T.addDisposableListener)(d,r,o=>{T.EventHelper.stop(o),d.classList.remove("active")}))})}onClick(u,d=!1){var a;T.EventHelper.stop(u,!0);const r=n.isUndefinedOrNull(this._context)?((a=this.options)===null||a===void 0?void 0:a.useEventAsContext)?u:{preserveFocus:d}:this._context;this.actionRunner.run(this._action,r)}focus(){this.element&&(this.element.tabIndex=0,this.element.focus(),this.element.classList.add("focused"))}blur(){this.element&&(this.element.blur(),this.element.tabIndex=-1,this.element.classList.remove("focused"))}setFocusable(u){this.element&&(this.element.tabIndex=u?0:-1)}get trapsArrowNavigation(){return!1}updateEnabled(){}updateLabel(){}updateTooltip(){}updateClass(){}updateChecked(){}dispose(){this.element&&(this.element.remove(),this.element=void 0),super.dispose()}}e.BaseActionViewItem=t;class s extends t{constructor(u,d,a={}){super(u,d,a);this.options=a,this.options.icon=a.icon!==void 0?a.icon:!1,this.options.label=a.label!==void 0?a.label:!0,this.cssClass=""}render(u){super.render(u),this.element&&(this.label=(0,T.append)(this.element,(0,T.$)("a.action-label"))),this.label&&(this._action.id===S.Separator.ID?this.label.setAttribute("role","presentation"):this.options.isMenu?this.label.setAttribute("role","menuitem"):this.label.setAttribute("role","button")),this.options.label&&this.options.keybinding&&this.element&&((0,T.append)(this.element,(0,T.$)("span.keybinding")).textContent=this.options.keybinding),this.updateClass(),this.updateLabel(),this.updateTooltip(),this.updateEnabled(),this.updateChecked()}focus(){this.label&&(this.label.tabIndex=0,this.label.focus())}blur(){this.label&&(this.label.tabIndex=-1)}setFocusable(u){this.label&&(this.label.tabIndex=u?0:-1)}updateLabel(){this.options.label&&this.label&&(this.label.textContent=this.getAction().label)}updateTooltip(){let u=null;this.getAction().tooltip?u=this.getAction().tooltip:!this.options.label&&this.getAction().label&&this.options.icon&&(u=this.getAction().label,this.options.keybinding&&(u=g.localize(0,null,u,this.options.keybinding))),u&&this.label&&(this.label.title=u)}updateClass(){this.cssClass&&this.label&&this.label.classList.remove(...this.cssClass.split(" ")),this.options.icon?(this.cssClass=this.getAction().class,this.label&&(this.label.classList.add("codicon"),this.cssClass&&this.label.classList.add(...this.cssClass.split(" "))),this.updateEnabled()):this.label&&this.label.classList.remove("codicon")}updateEnabled(){this.getAction().enabled?(this.label&&(this.label.removeAttribute("aria-disabled"),this.label.classList.remove("disabled")),this.element&&this.element.classList.remove("disabled")):(this.label&&(this.label.setAttribute("aria-disabled","true"),this.label.classList.add("disabled")),this.element&&this.element.classList.add("disabled"))}updateChecked(){this.label&&(this.getAction().checked?this.label.classList.add("checked"):this.label.classList.remove("checked"))}}e.ActionViewItem=s}),define(J[86],ee([0,1,7,52,121,51,4,2,20,214]),function(j,e,w,N,T,D,S,p,C){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ActionBar=void 0;class n extends p.Disposable{constructor(t,s={}){var c,u,d,a,r,o;super();this.triggerKeyDown=!1,this.focusable=!0,this._onDidBlur=this._register(new S.Emitter),this.onDidBlur=this._onDidBlur.event,this._onDidCancel=this._register(new S.Emitter({onFirstListenerAdd:()=>this.cancelHasListener=!0})),this.onDidCancel=this._onDidCancel.event,this.cancelHasListener=!1,this._onDidRun=this._register(new S.Emitter),this.onDidRun=this._onDidRun.event,this._onBeforeRun=this._register(new S.Emitter),this.onBeforeRun=this._onBeforeRun.event,this.options=s,this._context=(c=s.context)!==null&&c!==void 0?c:null,this._orientation=(u=this.options.orientation)!==null&&u!==void 0?u:0,this._triggerKeys={keyDown:(a=(d=this.options.triggerKeys)===null||d===void 0?void 0:d.keyDown)!==null&&a!==void 0?a:!1,keys:(o=(r=this.options.triggerKeys)===null||r===void 0?void 0:r.keys)!==null&&o!==void 0?o:[3,10]},this.options.actionRunner?this._actionRunner=this.options.actionRunner:(this._actionRunner=new D.ActionRunner,this._register(this._actionRunner)),this._register(this._actionRunner.onDidRun(h=>this._onDidRun.fire(h))),this._register(this._actionRunner.onBeforeRun(h=>this._onBeforeRun.fire(h))),this._actionIds=[],this.viewItems=[],this.focusedItem=void 0,this.domNode=document.createElement("div"),this.domNode.className="monaco-action-bar",s.animated!==!1&&this.domNode.classList.add("animated");let i,l;switch(this._orientation){case 0:i=[15],l=[17];break;case 1:i=[16],l=[18],this.domNode.className+=" vertical";break}this._register(w.addDisposableListener(this.domNode,w.EventType.KEY_DOWN,h=>{const f=new N.StandardKeyboardEvent(h);let y=!0;const _=typeof this.focusedItem=="number"?this.viewItems[this.focusedItem]:void 0;i&&(f.equals(i[0])||f.equals(i[1]))?y=this.focusPrevious():l&&(f.equals(l[0])||f.equals(l[1]))?y=this.focusNext():f.equals(9)&&this.cancelHasListener?this._onDidCancel.fire():f.equals(14)?y=this.focusFirst():f.equals(13)?y=this.focusLast():f.equals(2)&&_ instanceof T.BaseActionViewItem&&_.trapsArrowNavigation?y=this.focusNext():this.isTriggerKeyEvent(f)?this._triggerKeys.keyDown?this.doTrigger(f):this.triggerKeyDown=!0:y=!1,y&&(f.preventDefault(),f.stopPropagation())})),this._register(w.addDisposableListener(this.domNode,w.EventType.KEY_UP,h=>{const f=new N.StandardKeyboardEvent(h);this.isTriggerKeyEvent(f)?(!this._triggerKeys.keyDown&&this.triggerKeyDown&&(this.triggerKeyDown=!1,this.doTrigger(f)),f.preventDefault(),f.stopPropagation()):(f.equals(2)||f.equals(1024|2))&&this.updateFocusedItem()})),this.focusTracker=this._register(w.trackFocus(this.domNode)),this._register(this.focusTracker.onDidBlur(()=>{(w.getActiveElement()===this.domNode||!w.isAncestor(w.getActiveElement(),this.domNode))&&(this._onDidBlur.fire(),this.focusedItem=void 0,this.triggerKeyDown=!1)})),this._register(this.focusTracker.onDidFocus(()=>this.updateFocusedItem())),this.actionsList=document.createElement("ul"),this.actionsList.className="actions-container",this.actionsList.setAttribute("role","toolbar"),this.options.ariaLabel&&this.actionsList.setAttribute("aria-label",this.options.ariaLabel),this.domNode.appendChild(this.actionsList),t.appendChild(this.domNode)}isTriggerKeyEvent(t){let s=!1;return this._triggerKeys.keys.forEach(c=>{s=s||t.equals(c)}),s}updateFocusedItem(){for(let t=0;t<this.actionsList.children.length;t++){const s=this.actionsList.children[t];if(w.isAncestor(w.getActiveElement(),s)){this.focusedItem=t;break}}}get context(){return this._context}set context(t){this._context=t,this.viewItems.forEach(s=>s.setActionContext(t))}get actionRunner(){return this._actionRunner}set actionRunner(t){t&&(this._actionRunner=t,this.viewItems.forEach(s=>s.actionRunner=t))}getContainer(){return this.domNode}push(t,s={}){const c=Array.isArray(t)?t:[t];let u=C.isNumber(s.index)?s.index:null;c.forEach(d=>{const a=document.createElement("li");a.className="action-item",a.setAttribute("role","presentation"),this.options.allowContextMenu||this._register(w.addDisposableListener(a,w.EventType.CONTEXT_MENU,o=>{w.EventHelper.stop(o,!0)}));let r;this.options.actionViewItemProvider&&(r=this.options.actionViewItemProvider(d)),r||(r=new T.ActionViewItem(this.context,d,s)),r.actionRunner=this._actionRunner,r.setActionContext(this.context),r.render(a),this.focusable&&r instanceof T.BaseActionViewItem&&this.viewItems.length===0&&r.setFocusable(!0),u===null||u<0||u>=this.actionsList.children.length?(this.actionsList.appendChild(a),this.viewItems.push(r),this._actionIds.push(d.id)):(this.actionsList.insertBefore(a,this.actionsList.children[u]),this.viewItems.splice(u,0,r),this._actionIds.splice(u,0,d.id),u++)}),typeof this.focusedItem=="number"&&this.focus(this.focusedItem)}clear(){(0,p.dispose)(this.viewItems),this.viewItems=[],this._actionIds=[],w.clearNode(this.actionsList)}length(){return this.viewItems.length}focus(t){let s=!1,c;if(t===void 0?s=!0:typeof t=="number"?c=t:typeof t=="boolean"&&(s=t),s&&typeof this.focusedItem=="undefined"){const u=this.viewItems.findIndex(d=>d.isEnabled());this.focusedItem=u===-1?void 0:u,this.updateFocus()}else c!==void 0&&(this.focusedItem=c),this.updateFocus()}focusFirst(){return this.focusedItem=this.length()>1?1:0,this.focusPrevious()}focusLast(){return this.focusedItem=this.length()<2?0:this.length()-2,this.focusNext()}focusNext(){if(typeof this.focusedItem=="undefined")this.focusedItem=this.viewItems.length-1;else if(this.viewItems.length<=1)return!1;const t=this.focusedItem;let s;do{if(this.options.preventLoopNavigation&&this.focusedItem+1>=this.viewItems.length)return this.focusedItem=t,!1;this.focusedItem=(this.focusedItem+1)%this.viewItems.length,s=this.viewItems[this.focusedItem]}while(this.focusedItem!==t&&this.options.focusOnlyEnabledItems&&!s.isEnabled());return this.updateFocus(),!0}focusPrevious(){if(typeof this.focusedItem=="undefined")this.focusedItem=0;else if(this.viewItems.length<=1)return!1;const t=this.focusedItem;let s;do{if(this.focusedItem=this.focusedItem-1,this.focusedItem<0){if(this.options.preventLoopNavigation)return this.focusedItem=t,!1;this.focusedItem=this.viewItems.length-1}s=this.viewItems[this.focusedItem]}while(this.focusedItem!==t&&this.options.focusOnlyEnabledItems&&!s.isEnabled());return this.updateFocus(!0),!0}updateFocus(t,s){typeof this.focusedItem=="undefined"&&this.actionsList.focus({preventScroll:s});for(let c=0;c<this.viewItems.length;c++){const u=this.viewItems[c],d=u;if(c===this.focusedItem){let a=!0;C.isFunction(d.focus)||(a=!1),this.options.focusOnlyEnabledItems&&C.isFunction(u.isEnabled)&&!u.isEnabled()&&(a=!1),a?d.focus(t):this.actionsList.focus({preventScroll:s})}else C.isFunction(d.blur)&&d.blur()}}doTrigger(t){if(typeof this.focusedItem=="undefined")return;const s=this.viewItems[this.focusedItem];if(s instanceof T.BaseActionViewItem){const c=s._context===null||s._context===void 0?t:s._context;this.run(s._action,c)}}run(t,s){return Re(this,void 0,void 0,function*(){yield this._actionRunner.run(t,s)})}dispose(){(0,p.dispose)(this.viewItems),this.viewItems=[],this._actionIds=[],this.getContainer().remove(),super.dispose()}}e.ActionBar=n}),define(J[450],ee([0,1,7,52,58,51,4,217]),function(j,e,w,N,T,D,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DropdownMenu=e.BaseDropdown=void 0;class p extends D.ActionRunner{constructor(g,t){super();this._onDidChangeVisibility=this._register(new S.Emitter),this.onDidChangeVisibility=this._onDidChangeVisibility.event,this._element=(0,w.append)(g,(0,w.$)(".monaco-dropdown")),this._label=(0,w.append)(this._element,(0,w.$)(".dropdown-label"));let s=t.labelRenderer;s||(s=u=>(u.textContent=t.label||"",null));for(const u of[w.EventType.CLICK,w.EventType.MOUSE_DOWN,T.EventType.Tap])this._register((0,w.addDisposableListener)(this.element,u,d=>w.EventHelper.stop(d,!0)));for(const u of[w.EventType.MOUSE_DOWN,T.EventType.Tap])this._register((0,w.addDisposableListener)(this._label,u,d=>{d instanceof MouseEvent&&d.detail>1||(this.visible?this.hide():this.show())}));this._register((0,w.addDisposableListener)(this._label,w.EventType.KEY_UP,u=>{const d=new N.StandardKeyboardEvent(u);(d.equals(3)||d.equals(10))&&(w.EventHelper.stop(u,!0),this.visible?this.hide():this.show())}));const c=s(this._label);c&&this._register(c),this._register(T.Gesture.addTarget(this._label))}get element(){return this._element}show(){this.visible||(this.visible=!0,this._onDidChangeVisibility.fire(!0))}hide(){this.visible&&(this.visible=!1,this._onDidChangeVisibility.fire(!1))}dispose(){super.dispose(),this.hide(),this.boxContainer&&(this.boxContainer.remove(),this.boxContainer=void 0),this.contents&&(this.contents.remove(),this.contents=void 0),this._label&&(this._label.remove(),this._label=void 0)}}e.BaseDropdown=p;class C extends p{constructor(g,t){super(g,t);this._actions=[],this._contextMenuProvider=t.contextMenuProvider,this.actions=t.actions||[],this.actionProvider=t.actionProvider,this.menuClassName=t.menuClassName||"",this.menuAsChild=!!t.menuAsChild}set menuOptions(g){this._menuOptions=g}get menuOptions(){return this._menuOptions}get actions(){return this.actionProvider?this.actionProvider.getActions():this._actions}set actions(g){this._actions=g}show(){super.show(),this.element.classList.add("active"),this._contextMenuProvider.showContextMenu({getAnchor:()=>this.element,getActions:()=>this.actions,getActionsContext:()=>this.menuOptions?this.menuOptions.context:null,getActionViewItem:g=>this.menuOptions&&this.menuOptions.actionViewItemProvider?this.menuOptions.actionViewItemProvider(g):void 0,getKeyBinding:g=>this.menuOptions&&this.menuOptions.getKeyBinding?this.menuOptions.getKeyBinding(g):void 0,getMenuClassName:()=>this.menuClassName,onHide:()=>this.onHide(),actionRunner:this.menuOptions?this.menuOptions.actionRunner:void 0,anchorAlignment:this.menuOptions?this.menuOptions.anchorAlignment:0,domForShadowRoot:this.menuAsChild?this.element:void 0})}hide(){super.hide()}onHide(){this.hide(),this.element.classList.remove("active")}}e.DropdownMenu=C}),define(J[451],ee([0,1,7,121,450,4,217]),function(j,e,w,N,T,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DropdownMenuActionViewItem=void 0;class S extends N.BaseActionViewItem{constructor(C,n,g,t=Object.create(null)){super(null,C,t);this.actionItem=null,this._onDidChangeVisibility=this._register(new D.Emitter),this.menuActionsOrProvider=n,this.contextMenuProvider=g,this.options=t,this.options.actionRunner&&(this.actionRunner=this.options.actionRunner)}render(C){this.actionItem=C;const n=s=>{this.element=(0,w.append)(s,(0,w.$)("a.action-label"));let c=[];return typeof this.options.classNames=="string"?c=this.options.classNames.split(/\s+/g).filter(u=>!!u):this.options.classNames&&(c=this.options.classNames),c.find(u=>u==="icon")||c.push("codicon"),this.element.classList.add(...c),this.element.setAttribute("role","button"),this.element.setAttribute("aria-haspopup","true"),this.element.setAttribute("aria-expanded","false"),this.element.title=this._action.label||"",null},g=Array.isArray(this.menuActionsOrProvider),t={contextMenuProvider:this.contextMenuProvider,labelRenderer:n,menuAsChild:this.options.menuAsChild,actions:g?this.menuActionsOrProvider:void 0,actionProvider:g?void 0:this.menuActionsOrProvider};if(this.dropdownMenu=this._register(new T.DropdownMenu(C,t)),this._register(this.dropdownMenu.onDidChangeVisibility(s=>{var c;(c=this.element)===null||c===void 0||c.setAttribute("aria-expanded",`${s}`),this._onDidChangeVisibility.fire(s)})),this.dropdownMenu.menuOptions={actionViewItemProvider:this.options.actionViewItemProvider,actionRunner:this.actionRunner,getKeyBinding:this.options.keybindingProvider,context:this._context},this.options.anchorAlignmentProvider){const s=this;this.dropdownMenu.menuOptions=Object.assign(Object.assign({},this.dropdownMenu.menuOptions),{get anchorAlignment(){return s.options.anchorAlignmentProvider()}})}this.updateEnabled()}setActionContext(C){super.setActionContext(C),this.dropdownMenu&&(this.dropdownMenu.menuOptions?this.dropdownMenu.menuOptions.context=C:this.dropdownMenu.menuOptions={context:C})}updateEnabled(){var C,n;const g=!this.getAction().enabled;(C=this.actionItem)===null||C===void 0||C.classList.toggle("disabled",g),(n=this.element)===null||n===void 0||n.classList.toggle("disabled",g)}}e.DropdownMenuActionViewItem=S}),define(J[188],ee([0,1,7,94,165,86,45,64,53,29,4,299,38,443,324]),function(j,e,w,N,T,D,S,p,C,n,g,t,s,c){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.HistoryInputBox=e.InputBox=void 0;const u=w.$,d={inputBackground:n.Color.fromHex("#3C3C3C"),inputForeground:n.Color.fromHex("#CCCCCC"),inputValidationInfoBorder:n.Color.fromHex("#55AAFF"),inputValidationInfoBackground:n.Color.fromHex("#063B49"),inputValidationWarningBorder:n.Color.fromHex("#B89500"),inputValidationWarningBackground:n.Color.fromHex("#352A05"),inputValidationErrorBorder:n.Color.fromHex("#BE1100"),inputValidationErrorBackground:n.Color.fromHex("#5A1D1D")};class a extends C.Widget{constructor(i,l,h){var f;super();this.state="idle",this.maxHeight=Number.POSITIVE_INFINITY,this._onDidChange=this._register(new g.Emitter),this.onDidChange=this._onDidChange.event,this._onDidHeightChange=this._register(new g.Emitter),this.onDidHeightChange=this._onDidHeightChange.event,this.contextViewProvider=l,this.options=h||Object.create(null),(0,s.mixin)(this.options,d,!1),this.message=null,this.placeholder=this.options.placeholder||"",this.tooltip=(f=this.options.tooltip)!==null&&f!==void 0?f:this.placeholder||"",this.ariaLabel=this.options.ariaLabel||"",this.inputBackground=this.options.inputBackground,this.inputForeground=this.options.inputForeground,this.inputBorder=this.options.inputBorder,this.inputValidationInfoBorder=this.options.inputValidationInfoBorder,this.inputValidationInfoBackground=this.options.inputValidationInfoBackground,this.inputValidationInfoForeground=this.options.inputValidationInfoForeground,this.inputValidationWarningBorder=this.options.inputValidationWarningBorder,this.inputValidationWarningBackground=this.options.inputValidationWarningBackground,this.inputValidationWarningForeground=this.options.inputValidationWarningForeground,this.inputValidationErrorBorder=this.options.inputValidationErrorBorder,this.inputValidationErrorBackground=this.options.inputValidationErrorBackground,this.inputValidationErrorForeground=this.options.inputValidationErrorForeground,this.options.validationOptions&&(this.validation=this.options.validationOptions.validation),this.element=w.append(i,u(".monaco-inputbox.idle"));let y=this.options.flexibleHeight?"textarea":"input",_=w.append(this.element,u(".ibwrapper"));if(this.input=w.append(_,u(y+".input.empty")),this.input.setAttribute("autocorrect","off"),this.input.setAttribute("autocapitalize","off"),this.input.setAttribute("spellcheck","false"),this.onfocus(this.input,()=>this.element.classList.add("synthetic-focus")),this.onblur(this.input,()=>this.element.classList.remove("synthetic-focus")),this.options.flexibleHeight){this.maxHeight=typeof this.options.flexibleMaxHeight=="number"?this.options.flexibleMaxHeight:Number.POSITIVE_INFINITY,this.mirror=w.append(_,u("div.mirror")),this.mirror.innerText="\xA0",this.scrollableElement=new p.ScrollableElement(this.element,{vertical:1}),this.options.flexibleWidth&&(this.input.setAttribute("wrap","off"),this.mirror.style.whiteSpace="pre",this.mirror.style.wordWrap="initial"),w.append(i,this.scrollableElement.getDomNode()),this._register(this.scrollableElement),this._register(this.scrollableElement.onScroll(m=>this.input.scrollTop=m.scrollTop));const b=this._register(new N.DomEmitter(document,"selectionchange")),v=g.Event.filter(b.event,()=>{const m=document.getSelection();return(m==null?void 0:m.anchorNode)===_});this._register(v(this.updateScrollDimensions,this)),this._register(this.onDidHeightChange(this.updateScrollDimensions,this))}else this.input.type=this.options.type||"text",this.input.setAttribute("wrap","off");this.ariaLabel&&this.input.setAttribute("aria-label",this.ariaLabel),this.placeholder&&!this.options.showPlaceholderOnFocus&&this.setPlaceHolder(this.placeholder),this.tooltip&&this.setTooltip(this.tooltip),this.oninput(this.input,()=>this.onValueChange()),this.onblur(this.input,()=>this.onBlur()),this.onfocus(this.input,()=>this.onFocus()),this.ignoreGesture(this.input),setTimeout(()=>this.updateMirror(),0),this.options.actions&&(this.actionbar=this._register(new D.ActionBar(this.element)),this.actionbar.push(this.options.actions,{icon:!0,label:!1})),this.applyStyles()}onBlur(){this._hideMessage(),this.options.showPlaceholderOnFocus&&this.input.setAttribute("placeholder","")}onFocus(){this._showMessage(),this.options.showPlaceholderOnFocus&&this.input.setAttribute("placeholder",this.placeholder||"")}setPlaceHolder(i){this.placeholder=i,this.input.setAttribute("placeholder",i)}setTooltip(i){this.tooltip=i,this.input.title=i}setAriaLabel(i){this.ariaLabel=i,i?this.input.setAttribute("aria-label",this.ariaLabel):this.input.removeAttribute("aria-label")}getAriaLabel(){return this.ariaLabel}get inputElement(){return this.input}get value(){return this.input.value}set value(i){this.input.value!==i&&(this.input.value=i,this.onValueChange())}get height(){return typeof this.cachedHeight=="number"?this.cachedHeight:w.getTotalHeight(this.element)}focus(){this.input.focus()}blur(){this.input.blur()}hasFocus(){return document.activeElement===this.input}select(i=null){this.input.select(),i&&(this.input.setSelectionRange(i.start,i.end),i.end===this.input.value.length&&(this.input.scrollLeft=this.input.scrollWidth))}isSelectionAtEnd(){return this.input.selectionEnd===this.input.value.length&&this.input.selectionStart===this.input.selectionEnd}enable(){this.input.removeAttribute("disabled")}disable(){this.blur(),this.input.disabled=!0,this._hideMessage()}get width(){return w.getTotalWidth(this.input)}set width(i){if(this.options.flexibleHeight&&this.options.flexibleWidth){let l=0;if(this.mirror){const h=parseFloat(this.mirror.style.paddingLeft||"")||0,f=parseFloat(this.mirror.style.paddingRight||"")||0;l=h+f}this.input.style.width=i-l+"px"}else this.input.style.width=i+"px";this.mirror&&(this.mirror.style.width=i+"px")}set paddingRight(i){this.options.flexibleHeight&&this.options.flexibleWidth?this.input.style.width=`calc(100% - ${i}px)`:this.input.style.paddingRight=i+"px",this.mirror&&(this.mirror.style.paddingRight=i+"px")}updateScrollDimensions(){if(typeof this.cachedContentHeight!="number"||typeof this.cachedHeight!="number"||!this.scrollableElement)return;const i=this.cachedContentHeight,l=this.cachedHeight,h=this.input.scrollTop;this.scrollableElement.setScrollDimensions({scrollHeight:i,height:l}),this.scrollableElement.setScrollPosition({scrollTop:h})}showMessage(i,l){this.message=i,this.element.classList.remove("idle"),this.element.classList.remove("info"),this.element.classList.remove("warning"),this.element.classList.remove("error"),this.element.classList.add(this.classForType(i.type));const h=this.stylesForType(this.message.type);this.element.style.border=h.border?`1px solid ${h.border}`:"",(this.hasFocus()||l)&&this._showMessage()}hideMessage(){this.message=null,this.element.classList.remove("info"),this.element.classList.remove("warning"),this.element.classList.remove("error"),this.element.classList.add("idle"),this._hideMessage(),this.applyStyles()}validate(){let i=null;return this.validation&&(i=this.validation(this.value),i?(this.inputElement.setAttribute("aria-invalid","true"),this.showMessage(i)):this.inputElement.hasAttribute("aria-invalid")&&(this.inputElement.removeAttribute("aria-invalid"),this.hideMessage())),i==null?void 0:i.type}stylesForType(i){switch(i){case 1:return{border:this.inputValidationInfoBorder,background:this.inputValidationInfoBackground,foreground:this.inputValidationInfoForeground};case 2:return{border:this.inputValidationWarningBorder,background:this.inputValidationWarningBackground,foreground:this.inputValidationWarningForeground};default:return{border:this.inputValidationErrorBorder,background:this.inputValidationErrorBackground,foreground:this.inputValidationErrorForeground}}}classForType(i){switch(i){case 1:return"info";case 2:return"warning";default:return"error"}}_showMessage(){if(!this.contextViewProvider||!this.message)return;let i,l=()=>i.style.width=w.getTotalWidth(this.element)+"px";this.contextViewProvider.showContextView({getAnchor:()=>this.element,anchorAlignment:1,render:f=>{if(!this.message)return null;i=w.append(f,u(".monaco-inputbox-container")),l();const y={inline:!0,className:"monaco-inputbox-message"},_=this.message.formatContent?(0,T.renderFormattedText)(this.message.content,y):(0,T.renderText)(this.message.content,y);_.classList.add(this.classForType(this.message.type));const b=this.stylesForType(this.message.type);return _.style.backgroundColor=b.background?b.background.toString():"",_.style.color=b.foreground?b.foreground.toString():"",_.style.border=b.border?`1px solid ${b.border}`:"",w.append(i,_),null},onHide:()=>{this.state="closed"},layout:l});let h;this.message.type===3?h=c.localize(0,null,this.message.content):this.message.type===2?h=c.localize(1,null,this.message.content):h=c.localize(2,null,this.message.content),S.alert(h),this.state="open"}_hideMessage(){!this.contextViewProvider||(this.state==="open"&&this.contextViewProvider.hideContextView(),this.state="idle")}onValueChange(){this._onDidChange.fire(this.value),this.validate(),this.updateMirror(),this.input.classList.toggle("empty",!this.value),this.state==="open"&&this.contextViewProvider&&this.contextViewProvider.layout()}updateMirror(){if(!this.mirror)return;const i=this.value,h=i.charCodeAt(i.length-1)===10?" ":"";(i+h).replace(/\u000c/g,"")?this.mirror.textContent=i+h:this.mirror.innerText="\xA0",this.layout()}style(i){this.inputBackground=i.inputBackground,this.inputForeground=i.inputForeground,this.inputBorder=i.inputBorder,this.inputValidationInfoBackground=i.inputValidationInfoBackground,this.inputValidationInfoForeground=i.inputValidationInfoForeground,this.inputValidationInfoBorder=i.inputValidationInfoBorder,this.inputValidationWarningBackground=i.inputValidationWarningBackground,this.inputValidationWarningForeground=i.inputValidationWarningForeground,this.inputValidationWarningBorder=i.inputValidationWarningBorder,this.inputValidationErrorBackground=i.inputValidationErrorBackground,this.inputValidationErrorForeground=i.inputValidationErrorForeground,this.inputValidationErrorBorder=i.inputValidationErrorBorder,this.applyStyles()}applyStyles(){const i=this.inputBackground?this.inputBackground.toString():"",l=this.inputForeground?this.inputForeground.toString():"",h=this.inputBorder?this.inputBorder.toString():"";this.element.style.backgroundColor=i,this.element.style.color=l,this.input.style.backgroundColor="inherit",this.input.style.color=l,this.element.style.borderWidth=h?"1px":"",this.element.style.borderStyle=h?"solid":"",this.element.style.borderColor=h}layout(){if(!this.mirror)return;const i=this.cachedContentHeight;this.cachedContentHeight=w.getTotalHeight(this.mirror),i!==this.cachedContentHeight&&(this.cachedHeight=Math.min(this.cachedContentHeight,this.maxHeight),this.input.style.height=this.cachedHeight+"px",this._onDidHeightChange.fire(this.cachedContentHeight))}insertAtCursor(i){const l=this.inputElement,h=l.selectionStart,f=l.selectionEnd,y=l.value;h!==null&&f!==null&&(this.value=y.substr(0,h)+i+y.substr(f),l.setSelectionRange(h+1,h+1),this.layout())}dispose(){this._hideMessage(),this.message=null,this.actionbar&&this.actionbar.dispose(),super.dispose()}}e.InputBox=a;class r extends a{constructor(i,l,h){const f=c.localize(3,null),y=` or \u21C5 ${f}`,_=` (\u21C5 ${f})`;super(i,l,h);this.history=new t.HistoryNavigator(h.history,100);const b=()=>{if(h.showHistoryHint&&h.showHistoryHint()&&!this.placeholder.endsWith(y)&&!this.placeholder.endsWith(_)&&this.history.getHistory().length){const v=this.placeholder.endsWith(")")?y:_,m=this.placeholder+v;h.showPlaceholderOnFocus&&document.activeElement!==this.input?this.placeholder=m:this.setPlaceHolder(m)}};this.observer=new MutationObserver((v,m)=>{v.forEach(E=>{E.target.textContent||b()})}),this.observer.observe(this.input,{attributeFilter:["class"]}),this.onfocus(this.input,()=>b()),this.onblur(this.input,()=>{const v=m=>{if(this.placeholder.endsWith(m)){const E=this.placeholder.slice(0,this.placeholder.length-m.length);return h.showPlaceholderOnFocus?this.placeholder=E:this.setPlaceHolder(E),!0}else return!1};v(_)||v(y)})}dispose(){super.dispose(),this.observer&&(this.observer.disconnect(),this.observer=void 0)}addToHistory(){this.value&&this.value!==this.getCurrentValue()&&this.history.add(this.value)}showNextValue(){this.history.has(this.value)||this.addToHistory();let i=this.getNextValue();i&&(i=i===this.value?this.getNextValue():i),i&&(this.value=i,S.status(this.value))}showPreviousValue(){this.history.has(this.value)||this.addToHistory();let i=this.getPreviousValue();i&&(i=i===this.value?this.getPreviousValue():i),i&&(this.value=i,S.status(this.value))}getCurrentValue(){let i=this.history.current();return i||(i=this.history.last(),this.history.next()),i}getPreviousValue(){return this.history.previous()||this.history.first()}getNextValue(){return this.history.next()||this.history.last()}}e.HistoryInputBox=r}),define(J[452],ee([0,1,7,247,188,53,4,438,218]),function(j,e,w,N,T,D,S,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.FindInput=void 0;const C=p.localize(0,null);class n extends D.Widget{constructor(t,s,c,u){super();this._showOptionButtons=c,this.fixFocusOnOptionClickEnabled=!0,this.imeSessionInProgress=!1,this._onDidOptionChange=this._register(new S.Emitter),this.onDidOptionChange=this._onDidOptionChange.event,this._onKeyDown=this._register(new S.Emitter),this.onKeyDown=this._onKeyDown.event,this._onMouseDown=this._register(new S.Emitter),this.onMouseDown=this._onMouseDown.event,this._onInput=this._register(new S.Emitter),this._onKeyUp=this._register(new S.Emitter),this._onCaseSensitiveKeyDown=this._register(new S.Emitter),this.onCaseSensitiveKeyDown=this._onCaseSensitiveKeyDown.event,this._onRegexKeyDown=this._register(new S.Emitter),this.onRegexKeyDown=this._onRegexKeyDown.event,this._lastHighlightFindOptions=0,this.contextViewProvider=s,this.placeholder=u.placeholder||"",this.validation=u.validation,this.label=u.label||C,this.inputActiveOptionBorder=u.inputActiveOptionBorder,this.inputActiveOptionForeground=u.inputActiveOptionForeground,this.inputActiveOptionBackground=u.inputActiveOptionBackground,this.inputBackground=u.inputBackground,this.inputForeground=u.inputForeground,this.inputBorder=u.inputBorder,this.inputValidationInfoBorder=u.inputValidationInfoBorder,this.inputValidationInfoBackground=u.inputValidationInfoBackground,this.inputValidationInfoForeground=u.inputValidationInfoForeground,this.inputValidationWarningBorder=u.inputValidationWarningBorder,this.inputValidationWarningBackground=u.inputValidationWarningBackground,this.inputValidationWarningForeground=u.inputValidationWarningForeground,this.inputValidationErrorBorder=u.inputValidationErrorBorder,this.inputValidationErrorBackground=u.inputValidationErrorBackground,this.inputValidationErrorForeground=u.inputValidationErrorForeground;const d=u.appendCaseSensitiveLabel||"",a=u.appendWholeWordsLabel||"",r=u.appendRegexLabel||"",o=u.history||[],i=!!u.flexibleHeight,l=!!u.flexibleWidth,h=u.flexibleMaxHeight;this.domNode=document.createElement("div"),this.domNode.classList.add("monaco-findInput"),this.inputBox=this._register(new T.HistoryInputBox(this.domNode,this.contextViewProvider,{placeholder:this.placeholder||"",ariaLabel:this.label||"",validationOptions:{validation:this.validation},inputBackground:this.inputBackground,inputForeground:this.inputForeground,inputBorder:this.inputBorder,inputValidationInfoBackground:this.inputValidationInfoBackground,inputValidationInfoForeground:this.inputValidationInfoForeground,inputValidationInfoBorder:this.inputValidationInfoBorder,inputValidationWarningBackground:this.inputValidationWarningBackground,inputValidationWarningForeground:this.inputValidationWarningForeground,inputValidationWarningBorder:this.inputValidationWarningBorder,inputValidationErrorBackground:this.inputValidationErrorBackground,inputValidationErrorForeground:this.inputValidationErrorForeground,inputValidationErrorBorder:this.inputValidationErrorBorder,history:o,showHistoryHint:u.showHistoryHint,flexibleHeight:i,flexibleWidth:l,flexibleMaxHeight:h})),this.regex=this._register(new N.RegexCheckbox({appendTitle:r,isChecked:!1,inputActiveOptionBorder:this.inputActiveOptionBorder,inputActiveOptionForeground:this.inputActiveOptionForeground,inputActiveOptionBackground:this.inputActiveOptionBackground})),this._register(this.regex.onChange(_=>{this._onDidOptionChange.fire(_),!_&&this.fixFocusOnOptionClickEnabled&&this.inputBox.focus(),this.validate()})),this._register(this.regex.onKeyDown(_=>{this._onRegexKeyDown.fire(_)})),this.wholeWords=this._register(new N.WholeWordsCheckbox({appendTitle:a,isChecked:!1,inputActiveOptionBorder:this.inputActiveOptionBorder,inputActiveOptionForeground:this.inputActiveOptionForeground,inputActiveOptionBackground:this.inputActiveOptionBackground})),this._register(this.wholeWords.onChange(_=>{this._onDidOptionChange.fire(_),!_&&this.fixFocusOnOptionClickEnabled&&this.inputBox.focus(),this.validate()})),this.caseSensitive=this._register(new N.CaseSensitiveCheckbox({appendTitle:d,isChecked:!1,inputActiveOptionBorder:this.inputActiveOptionBorder,inputActiveOptionForeground:this.inputActiveOptionForeground,inputActiveOptionBackground:this.inputActiveOptionBackground})),this._register(this.caseSensitive.onChange(_=>{this._onDidOptionChange.fire(_),!_&&this.fixFocusOnOptionClickEnabled&&this.inputBox.focus(),this.validate()})),this._register(this.caseSensitive.onKeyDown(_=>{this._onCaseSensitiveKeyDown.fire(_)})),this._showOptionButtons&&(this.inputBox.paddingRight=this.caseSensitive.width()+this.wholeWords.width()+this.regex.width());let f=[this.caseSensitive.domNode,this.wholeWords.domNode,this.regex.domNode];this.onkeydown(this.domNode,_=>{if(_.equals(15)||_.equals(17)||_.equals(9)){let b=f.indexOf(document.activeElement);if(b>=0){let v=-1;_.equals(17)?v=(b+1)%f.length:_.equals(15)&&(b===0?v=f.length-1:v=b-1),_.equals(9)?(f[b].blur(),this.inputBox.focus()):v>=0&&f[v].focus(),w.EventHelper.stop(_,!0)}}});let y=document.createElement("div");y.className="controls",y.style.display=this._showOptionButtons?"block":"none",y.appendChild(this.caseSensitive.domNode),y.appendChild(this.wholeWords.domNode),y.appendChild(this.regex.domNode),this.domNode.appendChild(y),t&&t.appendChild(this.domNode),this._register(w.addDisposableListener(this.inputBox.inputElement,"compositionstart",_=>{this.imeSessionInProgress=!0})),this._register(w.addDisposableListener(this.inputBox.inputElement,"compositionend",_=>{this.imeSessionInProgress=!1,this._onInput.fire()})),this.onkeydown(this.inputBox.inputElement,_=>this._onKeyDown.fire(_)),this.onkeyup(this.inputBox.inputElement,_=>this._onKeyUp.fire(_)),this.oninput(this.inputBox.inputElement,_=>this._onInput.fire()),this.onmousedown(this.inputBox.inputElement,_=>this._onMouseDown.fire(_))}enable(){this.domNode.classList.remove("disabled"),this.inputBox.enable(),this.regex.enable(),this.wholeWords.enable(),this.caseSensitive.enable()}disable(){this.domNode.classList.add("disabled"),this.inputBox.disable(),this.regex.disable(),this.wholeWords.disable(),this.caseSensitive.disable()}setFocusInputOnOptionClick(t){this.fixFocusOnOptionClickEnabled=t}setEnabled(t){t?this.enable():this.disable()}getValue(){return this.inputBox.value}setValue(t){this.inputBox.value!==t&&(this.inputBox.value=t)}style(t){this.inputActiveOptionBorder=t.inputActiveOptionBorder,this.inputActiveOptionForeground=t.inputActiveOptionForeground,this.inputActiveOptionBackground=t.inputActiveOptionBackground,this.inputBackground=t.inputBackground,this.inputForeground=t.inputForeground,this.inputBorder=t.inputBorder,this.inputValidationInfoBackground=t.inputValidationInfoBackground,this.inputValidationInfoForeground=t.inputValidationInfoForeground,this.inputValidationInfoBorder=t.inputValidationInfoBorder,this.inputValidationWarningBackground=t.inputValidationWarningBackground,this.inputValidationWarningForeground=t.inputValidationWarningForeground,this.inputValidationWarningBorder=t.inputValidationWarningBorder,this.inputValidationErrorBackground=t.inputValidationErrorBackground,this.inputValidationErrorForeground=t.inputValidationErrorForeground,this.inputValidationErrorBorder=t.inputValidationErrorBorder,this.applyStyles()}applyStyles(){if(this.domNode){const t={inputActiveOptionBorder:this.inputActiveOptionBorder,inputActiveOptionForeground:this.inputActiveOptionForeground,inputActiveOptionBackground:this.inputActiveOptionBackground};this.regex.style(t),this.wholeWords.style(t),this.caseSensitive.style(t);const s={inputBackground:this.inputBackground,inputForeground:this.inputForeground,inputBorder:this.inputBorder,inputValidationInfoBackground:this.inputValidationInfoBackground,inputValidationInfoForeground:this.inputValidationInfoForeground,inputValidationInfoBorder:this.inputValidationInfoBorder,inputValidationWarningBackground:this.inputValidationWarningBackground,inputValidationWarningForeground:this.inputValidationWarningForeground,inputValidationWarningBorder:this.inputValidationWarningBorder,inputValidationErrorBackground:this.inputValidationErrorBackground,inputValidationErrorForeground:this.inputValidationErrorForeground,inputValidationErrorBorder:this.inputValidationErrorBorder};this.inputBox.style(s)}}select(){this.inputBox.select()}focus(){this.inputBox.focus()}getCaseSensitive(){return this.caseSensitive.checked}setCaseSensitive(t){this.caseSensitive.checked=t}getWholeWords(){return this.wholeWords.checked}setWholeWords(t){this.wholeWords.checked=t}getRegex(){return this.regex.checked}setRegex(t){this.regex.checked=t,this.validate()}focusOnCaseSensitive(){this.caseSensitive.focus()}highlightFindOptions(){this.domNode.classList.remove("highlight-"+this._lastHighlightFindOptions),this._lastHighlightFindOptions=1-this._lastHighlightFindOptions,this.domNode.classList.add("highlight-"+this._lastHighlightFindOptions)}validate(){this.inputBox.validate()}clearMessage(){this.inputBox.hideMessage()}}e.FindInput=n}),define(J[453],ee([0,1,7,170,188,53,27,4,440,218]),function(j,e,w,N,T,D,S,p,C){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ReplaceInput=e.PreserveCaseCheckbox=void 0;const n=C.localize(0,null),g=C.localize(1,null);class t extends N.Checkbox{constructor(u){super({icon:S.Codicon.preserveCase,title:g+u.appendTitle,isChecked:u.isChecked,inputActiveOptionBorder:u.inputActiveOptionBorder,inputActiveOptionForeground:u.inputActiveOptionForeground,inputActiveOptionBackground:u.inputActiveOptionBackground})}}e.PreserveCaseCheckbox=t;class s extends D.Widget{constructor(u,d,a,r){super();this._showOptionButtons=a,this.fixFocusOnOptionClickEnabled=!0,this.cachedOptionsWidth=0,this._onDidOptionChange=this._register(new p.Emitter),this.onDidOptionChange=this._onDidOptionChange.event,this._onKeyDown=this._register(new p.Emitter),this.onKeyDown=this._onKeyDown.event,this._onMouseDown=this._register(new p.Emitter),this._onInput=this._register(new p.Emitter),this._onKeyUp=this._register(new p.Emitter),this._onPreserveCaseKeyDown=this._register(new p.Emitter),this.onPreserveCaseKeyDown=this._onPreserveCaseKeyDown.event,this.contextViewProvider=d,this.placeholder=r.placeholder||"",this.validation=r.validation,this.label=r.label||n,this.inputActiveOptionBorder=r.inputActiveOptionBorder,this.inputActiveOptionForeground=r.inputActiveOptionForeground,this.inputActiveOptionBackground=r.inputActiveOptionBackground,this.inputBackground=r.inputBackground,this.inputForeground=r.inputForeground,this.inputBorder=r.inputBorder,this.inputValidationInfoBorder=r.inputValidationInfoBorder,this.inputValidationInfoBackground=r.inputValidationInfoBackground,this.inputValidationInfoForeground=r.inputValidationInfoForeground,this.inputValidationWarningBorder=r.inputValidationWarningBorder,this.inputValidationWarningBackground=r.inputValidationWarningBackground,this.inputValidationWarningForeground=r.inputValidationWarningForeground,this.inputValidationErrorBorder=r.inputValidationErrorBorder,this.inputValidationErrorBackground=r.inputValidationErrorBackground,this.inputValidationErrorForeground=r.inputValidationErrorForeground;const o=r.appendPreserveCaseLabel||"",i=r.history||[],l=!!r.flexibleHeight,h=!!r.flexibleWidth,f=r.flexibleMaxHeight;this.domNode=document.createElement("div"),this.domNode.classList.add("monaco-findInput"),this.inputBox=this._register(new T.HistoryInputBox(this.domNode,this.contextViewProvider,{ariaLabel:this.label||"",placeholder:this.placeholder||"",validationOptions:{validation:this.validation},inputBackground:this.inputBackground,inputForeground:this.inputForeground,inputBorder:this.inputBorder,inputValidationInfoBackground:this.inputValidationInfoBackground,inputValidationInfoForeground:this.inputValidationInfoForeground,inputValidationInfoBorder:this.inputValidationInfoBorder,inputValidationWarningBackground:this.inputValidationWarningBackground,inputValidationWarningForeground:this.inputValidationWarningForeground,inputValidationWarningBorder:this.inputValidationWarningBorder,inputValidationErrorBackground:this.inputValidationErrorBackground,inputValidationErrorForeground:this.inputValidationErrorForeground,inputValidationErrorBorder:this.inputValidationErrorBorder,history:i,showHistoryHint:r.showHistoryHint,flexibleHeight:l,flexibleWidth:h,flexibleMaxHeight:f})),this.preserveCase=this._register(new t({appendTitle:o,isChecked:!1,inputActiveOptionBorder:this.inputActiveOptionBorder,inputActiveOptionForeground:this.inputActiveOptionForeground,inputActiveOptionBackground:this.inputActiveOptionBackground})),this._register(this.preserveCase.onChange(b=>{this._onDidOptionChange.fire(b),!b&&this.fixFocusOnOptionClickEnabled&&this.inputBox.focus(),this.validate()})),this._register(this.preserveCase.onKeyDown(b=>{this._onPreserveCaseKeyDown.fire(b)})),this._showOptionButtons?this.cachedOptionsWidth=this.preserveCase.width():this.cachedOptionsWidth=0;let y=[this.preserveCase.domNode];this.onkeydown(this.domNode,b=>{if(b.equals(15)||b.equals(17)||b.equals(9)){let v=y.indexOf(document.activeElement);if(v>=0){let m=-1;b.equals(17)?m=(v+1)%y.length:b.equals(15)&&(v===0?m=y.length-1:m=v-1),b.equals(9)?(y[v].blur(),this.inputBox.focus()):m>=0&&y[m].focus(),w.EventHelper.stop(b,!0)}}});let _=document.createElement("div");_.className="controls",_.style.display=this._showOptionButtons?"block":"none",_.appendChild(this.preserveCase.domNode),this.domNode.appendChild(_),u&&u.appendChild(this.domNode),this.onkeydown(this.inputBox.inputElement,b=>this._onKeyDown.fire(b)),this.onkeyup(this.inputBox.inputElement,b=>this._onKeyUp.fire(b)),this.oninput(this.inputBox.inputElement,b=>this._onInput.fire()),this.onmousedown(this.inputBox.inputElement,b=>this._onMouseDown.fire(b))}enable(){this.domNode.classList.remove("disabled"),this.inputBox.enable(),this.preserveCase.enable()}disable(){this.domNode.classList.add("disabled"),this.inputBox.disable(),this.preserveCase.disable()}setEnabled(u){u?this.enable():this.disable()}style(u){this.inputActiveOptionBorder=u.inputActiveOptionBorder,this.inputActiveOptionForeground=u.inputActiveOptionForeground,this.inputActiveOptionBackground=u.inputActiveOptionBackground,this.inputBackground=u.inputBackground,this.inputForeground=u.inputForeground,this.inputBorder=u.inputBorder,this.inputValidationInfoBackground=u.inputValidationInfoBackground,this.inputValidationInfoForeground=u.inputValidationInfoForeground,this.inputValidationInfoBorder=u.inputValidationInfoBorder,this.inputValidationWarningBackground=u.inputValidationWarningBackground,this.inputValidationWarningForeground=u.inputValidationWarningForeground,this.inputValidationWarningBorder=u.inputValidationWarningBorder,this.inputValidationErrorBackground=u.inputValidationErrorBackground,this.inputValidationErrorForeground=u.inputValidationErrorForeground,this.inputValidationErrorBorder=u.inputValidationErrorBorder,this.applyStyles()}applyStyles(){if(this.domNode){const u={inputActiveOptionBorder:this.inputActiveOptionBorder,inputActiveOptionForeground:this.inputActiveOptionForeground,inputActiveOptionBackground:this.inputActiveOptionBackground};this.preserveCase.style(u);const d={inputBackground:this.inputBackground,inputForeground:this.inputForeground,inputBorder:this.inputBorder,inputValidationInfoBackground:this.inputValidationInfoBackground,inputValidationInfoForeground:this.inputValidationInfoForeground,inputValidationInfoBorder:this.inputValidationInfoBorder,inputValidationWarningBackground:this.inputValidationWarningBackground,inputValidationWarningForeground:this.inputValidationWarningForeground,inputValidationWarningBorder:this.inputValidationWarningBorder,inputValidationErrorBackground:this.inputValidationErrorBackground,inputValidationErrorForeground:this.inputValidationErrorForeground,inputValidationErrorBorder:this.inputValidationErrorBorder};this.inputBox.style(d)}}select(){this.inputBox.select()}focus(){this.inputBox.focus()}getPreserveCase(){return this.preserveCase.checked}setPreserveCase(u){this.preserveCase.checked=u}focusOnPreserve(){this.preserveCase.focus()}validate(){this.inputBox&&this.inputBox.validate()}set width(u){this.inputBox.paddingRight=this.cachedOptionsWidth,this.inputBox.width=u,this.domNode.style.width=u+"px"}dispose(){super.dispose()}}e.ReplaceInput=s}),define(J[454],ee([0,1,34,58,7,52,56,86,121,136,215,64,51,14,27,107,2,17,8,445]),function(j,e,w,N,T,D,S,p,C,n,g,t,s,c,u,d,a,r,o,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.cleanMnemonic=e.Menu=e.Direction=e.MENU_ESCAPED_MNEMONIC_REGEX=e.MENU_MNEMONIC_REGEX=void 0,e.MENU_MNEMONIC_REGEX=/\(&([^\s&])\)|(^|[^&])&([^\s&])/,e.MENU_ESCAPED_MNEMONIC_REGEX=/(&amp;)?(&amp;)([^\s&])/g;const l=(0,u.registerCodicon)("menu-selection",u.Codicon.check),h=(0,u.registerCodicon)("menu-submenu",u.Codicon.chevronRight);var f;(function(I){I[I.Right=0]="Right",I[I.Left=1]="Left"})(f=e.Direction||(e.Direction={}));class y extends p.ActionBar{constructor(k,M,P={}){k.classList.add("monaco-menu-container"),k.setAttribute("role","presentation");const F=document.createElement("div");F.classList.add("monaco-menu"),F.setAttribute("role","presentation"),super(F,{orientation:1,actionViewItemProvider:O=>this.doGetActionViewItem(O,P,R),context:P.context,actionRunner:P.actionRunner,ariaLabel:P.ariaLabel,focusOnlyEnabledItems:!0,triggerKeys:{keys:[3,...r.isMacintosh||r.isLinux?[10]:[]],keyDown:!0}}),this.menuElement=F,this.actionsList.setAttribute("role","menu"),this.actionsList.tabIndex=0,this.menuDisposables=this._register(new a.DisposableStore),this.initializeStyleSheet(k),this._register(N.Gesture.addTarget(F)),(0,T.addDisposableListener)(F,T.EventType.KEY_DOWN,O=>{new D.StandardKeyboardEvent(O).equals(2)&&O.preventDefault()}),P.enableMnemonics&&this.menuDisposables.add((0,T.addDisposableListener)(F,T.EventType.KEY_DOWN,O=>{const L=O.key.toLocaleLowerCase();if(this.mnemonics.has(L)){T.EventHelper.stop(O,!0);const B=this.mnemonics.get(L);if(B.length===1&&(B[0]instanceof b&&B[0].container&&this.focusItemByElement(B[0].container),B[0].onClick(O)),B.length>1){const W=B.shift();W&&W.container&&(this.focusItemByElement(W.container),B.push(W)),this.mnemonics.set(L,B)}}})),r.isLinux&&this._register((0,T.addDisposableListener)(F,T.EventType.KEY_DOWN,O=>{const L=new D.StandardKeyboardEvent(O);L.equals(14)||L.equals(11)?(this.focusedItem=this.viewItems.length-1,this.focusNext(),T.EventHelper.stop(O,!0)):(L.equals(13)||L.equals(12))&&(this.focusedItem=0,this.focusPrevious(),T.EventHelper.stop(O,!0))})),this._register((0,T.addDisposableListener)(this.domNode,T.EventType.MOUSE_OUT,O=>{let L=O.relatedTarget;(0,T.isAncestor)(L,this.domNode)||(this.focusedItem=void 0,this.updateFocus(),O.stopPropagation())})),this._register((0,T.addDisposableListener)(this.actionsList,T.EventType.MOUSE_OVER,O=>{let L=O.target;if(!(!L||!(0,T.isAncestor)(L,this.actionsList)||L===this.actionsList)){for(;L.parentElement!==this.actionsList&&L.parentElement!==null;)L=L.parentElement;if(L.classList.contains("action-item")){const B=this.focusedItem;this.setFocusedItem(L),B!==this.focusedItem&&this.updateFocus()}}})),this._register(N.Gesture.addTarget(this.actionsList)),this._register((0,T.addDisposableListener)(this.actionsList,N.EventType.Tap,O=>{let L=O.initialTarget;if(!(!L||!(0,T.isAncestor)(L,this.actionsList)||L===this.actionsList)){for(;L.parentElement!==this.actionsList&&L.parentElement!==null;)L=L.parentElement;if(L.classList.contains("action-item")){const B=this.focusedItem;this.setFocusedItem(L),B!==this.focusedItem&&this.updateFocus()}}}));let R={parent:this};this.mnemonics=new Map,this.scrollableElement=this._register(new t.DomScrollableElement(F,{alwaysConsumeMouseWheel:!0,horizontal:2,vertical:3,verticalScrollbarSize:7,handleMouseWheel:!0,useShadows:!0}));const A=this.scrollableElement.getDomNode();A.style.position="",this._register((0,T.addDisposableListener)(F,N.EventType.Change,O=>{T.EventHelper.stop(O,!0);const L=this.scrollableElement.getScrollPosition().scrollTop;this.scrollableElement.setScrollPosition({scrollTop:L-O.translationY})})),this._register((0,T.addDisposableListener)(A,T.EventType.MOUSE_UP,O=>{O.preventDefault()})),F.style.maxHeight=`${Math.max(10,window.innerHeight-k.getBoundingClientRect().top-35)}px`,M=M.filter(O=>{var L;return((L=P.submenuIds)===null||L===void 0?void 0:L.has(O.id))?(console.warn(`Found submenu cycle: ${O.id}`),!1):!0}),this.push(M,{icon:!0,label:!0,isMenu:!0}),k.appendChild(this.scrollableElement.getDomNode()),this.scrollableElement.scanDomNode(),this.viewItems.filter(O=>!(O instanceof v)).forEach((O,L,B)=>{O.updatePositionInSet(L+1,B.length)})}initializeStyleSheet(k){(0,T.isInShadowDOM)(k)?(this.styleSheet=(0,T.createStyleSheet)(k),this.styleSheet.textContent=E):(y.globalStyleSheet||(y.globalStyleSheet=(0,T.createStyleSheet)(),y.globalStyleSheet.textContent=E),this.styleSheet=y.globalStyleSheet)}style(k){const M=this.getContainer(),P=k.foregroundColor?`${k.foregroundColor}`:"",F=k.backgroundColor?`${k.backgroundColor}`:"",R=k.borderColor?`1px solid ${k.borderColor}`:"",A=k.shadowColor?`0 2px 4px ${k.shadowColor}`:"";M.style.border=R,this.domNode.style.color=P,this.domNode.style.backgroundColor=F,M.style.boxShadow=A,this.viewItems&&this.viewItems.forEach(O=>{(O instanceof _||O instanceof v)&&O.style(k)})}getContainer(){return this.scrollableElement.getDomNode()}get onScroll(){return this.scrollableElement.onScroll}focusItemByElement(k){const M=this.focusedItem;this.setFocusedItem(k),M!==this.focusedItem&&this.updateFocus()}setFocusedItem(k){for(let M=0;M<this.actionsList.children.length;M++){let P=this.actionsList.children[M];if(k===P){this.focusedItem=M;break}}}updateFocus(k){super.updateFocus(k,!0),typeof this.focusedItem!="undefined"&&this.scrollableElement.setScrollPosition({scrollTop:Math.round(this.menuElement.scrollTop)})}doGetActionViewItem(k,M,P){if(k instanceof s.Separator)return new v(M.context,k,{icon:!0});if(k instanceof s.SubmenuAction){const F=new b(k,k.actions,P,Object.assign(Object.assign({},M),{submenuIds:new Set([...M.submenuIds||[],k.id])}));if(M.enableMnemonics){const R=F.getMnemonic();if(R&&F.isEnabled()){let A=[];this.mnemonics.has(R)&&(A=this.mnemonics.get(R)),A.push(F),this.mnemonics.set(R,A)}}return F}else{const F={enableMnemonics:M.enableMnemonics,useEventAsContext:M.useEventAsContext};if(M.getKeyBinding){const A=M.getKeyBinding(k);if(A){const O=A.getLabel();O&&(F.keybinding=O)}}const R=new _(M.context,k,F);if(M.enableMnemonics){const A=R.getMnemonic();if(A&&R.isEnabled()){let O=[];this.mnemonics.has(A)&&(O=this.mnemonics.get(A)),O.push(R),this.mnemonics.set(A,O)}}return R}}}e.Menu=y;class _ extends C.BaseActionViewItem{constructor(k,M,P={}){if(P.isMenu=!0,super(M,M,P),this.options=P,this.options.icon=P.icon!==void 0?P.icon:!1,this.options.label=P.label!==void 0?P.label:!0,this.cssClass="",this.options.label&&P.enableMnemonics){let F=this.getAction().label;if(F){let R=e.MENU_MNEMONIC_REGEX.exec(F);R&&(this.mnemonic=(R[1]?R[1]:R[3]).toLocaleLowerCase())}}this.runOnceToEnableMouseUp=new c.RunOnceScheduler(()=>{!this.element||(this._register((0,T.addDisposableListener)(this.element,T.EventType.MOUSE_UP,F=>{if(T.EventHelper.stop(F,!0),w.isFirefox){if(new S.StandardMouseEvent(F).rightButton)return;this.onClick(F)}else setTimeout(()=>{this.onClick(F)},0)})),this._register((0,T.addDisposableListener)(this.element,T.EventType.CONTEXT_MENU,F=>{T.EventHelper.stop(F,!0)})))},100),this._register(this.runOnceToEnableMouseUp)}render(k){super.render(k),!!this.element&&(this.container=k,this.item=(0,T.append)(this.element,(0,T.$)("a.action-menu-item")),this._action.id===s.Separator.ID?this.item.setAttribute("role","presentation"):(this.item.setAttribute("role","menuitem"),this.mnemonic&&this.item.setAttribute("aria-keyshortcuts",`${this.mnemonic}`)),this.check=(0,T.append)(this.item,(0,T.$)("span.menu-item-check"+l.cssSelector)),this.check.setAttribute("role","none"),this.label=(0,T.append)(this.item,(0,T.$)("span.action-label")),this.options.label&&this.options.keybinding&&((0,T.append)(this.item,(0,T.$)("span.keybinding")).textContent=this.options.keybinding),this.runOnceToEnableMouseUp.schedule(),this.updateClass(),this.updateLabel(),this.updateTooltip(),this.updateEnabled(),this.updateChecked())}blur(){super.blur(),this.applyStyle()}focus(){super.focus(),this.item&&this.item.focus(),this.applyStyle()}updatePositionInSet(k,M){this.item&&(this.item.setAttribute("aria-posinset",`${k}`),this.item.setAttribute("aria-setsize",`${M}`))}updateLabel(){if(!!this.label&&this.options.label){(0,T.clearNode)(this.label);let k=(0,d.stripIcons)(this.getAction().label);if(k){const M=m(k);this.options.enableMnemonics||(k=M),this.label.setAttribute("aria-label",M.replace(/&&/g,"&"));const P=e.MENU_MNEMONIC_REGEX.exec(k);if(P){k=o.escape(k),e.MENU_ESCAPED_MNEMONIC_REGEX.lastIndex=0;let F=e.MENU_ESCAPED_MNEMONIC_REGEX.exec(k);for(;F&&F[1];)F=e.MENU_ESCAPED_MNEMONIC_REGEX.exec(k);const R=A=>A.replace(/&amp;&amp;/g,"&amp;");F?this.label.append(o.ltrim(R(k.substr(0,F.index))," "),(0,T.$)("u",{"aria-hidden":"true"},F[3]),o.rtrim(R(k.substr(F.index+F[0].length))," ")):this.label.innerText=R(k).trim(),this.item&&this.item.setAttribute("aria-keyshortcuts",(P[1]?P[1]:P[3]).toLocaleLowerCase())}else this.label.innerText=k.replace(/&&/g,"&").trim()}}}updateTooltip(){let k=null;this.getAction().tooltip?k=this.getAction().tooltip:!this.options.label&&this.getAction().label&&this.options.icon&&(k=this.getAction().label,this.options.keybinding&&(k=i.localize(0,null,k,this.options.keybinding))),k&&this.item&&(this.item.title=k)}updateClass(){this.cssClass&&this.item&&this.item.classList.remove(...this.cssClass.split(" ")),this.options.icon&&this.label?(this.cssClass=this.getAction().class||"",this.label.classList.add("icon"),this.cssClass&&this.label.classList.add(...this.cssClass.split(" ")),this.updateEnabled()):this.label&&this.label.classList.remove("icon")}updateEnabled(){this.getAction().enabled?(this.element&&(this.element.classList.remove("disabled"),this.element.removeAttribute("aria-disabled")),this.item&&(this.item.classList.remove("disabled"),this.item.removeAttribute("aria-disabled"),this.item.tabIndex=0)):(this.element&&(this.element.classList.add("disabled"),this.element.setAttribute("aria-disabled","true")),this.item&&(this.item.classList.add("disabled"),this.item.setAttribute("aria-disabled","true")))}updateChecked(){if(!this.item)return;const k=this.getAction().checked;this.item.classList.toggle("checked",!!k),k!==void 0?(this.item.setAttribute("role","menuitemcheckbox"),this.item.setAttribute("aria-checked",k?"true":"false")):(this.item.setAttribute("role","menuitem"),this.item.setAttribute("aria-checked",""))}getMnemonic(){return this.mnemonic}applyStyle(){if(!this.menuStyle)return;const k=this.element&&this.element.classList.contains("focused"),M=k&&this.menuStyle.selectionForegroundColor?this.menuStyle.selectionForegroundColor:this.menuStyle.foregroundColor,P=k&&this.menuStyle.selectionBackgroundColor?this.menuStyle.selectionBackgroundColor:void 0,F=k&&this.menuStyle.selectionBorderColor?`thin solid ${this.menuStyle.selectionBorderColor}`:"";this.item&&(this.item.style.color=M?M.toString():"",this.item.style.backgroundColor=P?P.toString():""),this.check&&(this.check.style.color=M?M.toString():""),this.container&&(this.container.style.border=F)}style(k){this.menuStyle=k,this.applyStyle()}}class b extends _{constructor(k,M,P,F){super(k,k,F);this.submenuActions=M,this.parentData=P,this.submenuOptions=F,this.mysubmenu=null,this.submenuDisposables=this._register(new a.DisposableStore),this.mouseOver=!1,this.expandDirection=F&&F.expandDirection!==void 0?F.expandDirection:f.Right,this.showScheduler=new c.RunOnceScheduler(()=>{this.mouseOver&&(this.cleanupExistingSubmenu(!1),this.createSubmenu(!1))},250),this.hideScheduler=new c.RunOnceScheduler(()=>{this.element&&!(0,T.isAncestor)((0,T.getActiveElement)(),this.element)&&this.parentData.submenu===this.mysubmenu&&(this.parentData.parent.focus(!1),this.cleanupExistingSubmenu(!0))},750)}render(k){super.render(k),!!this.element&&(this.item&&(this.item.classList.add("monaco-submenu-item"),this.item.tabIndex=0,this.item.setAttribute("aria-haspopup","true"),this.updateAriaExpanded("false"),this.submenuIndicator=(0,T.append)(this.item,(0,T.$)("span.submenu-indicator"+h.cssSelector)),this.submenuIndicator.setAttribute("aria-hidden","true")),this._register((0,T.addDisposableListener)(this.element,T.EventType.KEY_UP,M=>{let P=new D.StandardKeyboardEvent(M);(P.equals(17)||P.equals(3))&&(T.EventHelper.stop(M,!0),this.createSubmenu(!0))})),this._register((0,T.addDisposableListener)(this.element,T.EventType.KEY_DOWN,M=>{let P=new D.StandardKeyboardEvent(M);(0,T.getActiveElement)()===this.item&&(P.equals(17)||P.equals(3))&&T.EventHelper.stop(M,!0)})),this._register((0,T.addDisposableListener)(this.element,T.EventType.MOUSE_OVER,M=>{this.mouseOver||(this.mouseOver=!0,this.showScheduler.schedule())})),this._register((0,T.addDisposableListener)(this.element,T.EventType.MOUSE_LEAVE,M=>{this.mouseOver=!1})),this._register((0,T.addDisposableListener)(this.element,T.EventType.FOCUS_OUT,M=>{this.element&&!(0,T.isAncestor)((0,T.getActiveElement)(),this.element)&&this.hideScheduler.schedule()})),this._register(this.parentData.parent.onScroll(()=>{this.parentData.parent.focus(!1),this.cleanupExistingSubmenu(!1)})))}updateEnabled(){}onClick(k){T.EventHelper.stop(k,!0),this.cleanupExistingSubmenu(!1),this.createSubmenu(!0)}cleanupExistingSubmenu(k){if(this.parentData.submenu&&(k||this.parentData.submenu!==this.mysubmenu)){try{this.parentData.submenu.dispose()}catch(M){}this.parentData.submenu=void 0,this.updateAriaExpanded("false"),this.submenuContainer&&(this.submenuDisposables.clear(),this.submenuContainer=void 0)}}calculateSubmenuMenuLayout(k,M,P,F){const R={top:0,left:0};return R.left=(0,g.layout)(k.width,M.width,{position:F===f.Right?0:1,offset:P.left,size:P.width}),R.left>=P.left&&R.left<P.left+P.width&&(P.left+10+M.width<=k.width&&(R.left=P.left+10),P.top+=10,P.height=0),R.top=(0,g.layout)(k.height,M.height,{position:0,offset:P.top,size:0}),R.top+M.height===P.top&&R.top+P.height+M.height<=k.height&&(R.top+=P.height),R}createSubmenu(k=!0){if(!!this.element)if(this.parentData.submenu)this.parentData.submenu.focus(!1);else{this.updateAriaExpanded("true"),this.submenuContainer=(0,T.append)(this.element,(0,T.$)("div.monaco-submenu")),this.submenuContainer.classList.add("menubar-menu-items-holder","context-view");const M=getComputedStyle(this.parentData.parent.domNode),P=parseFloat(M.paddingTop||"0")||0;this.submenuContainer.style.zIndex="1",this.submenuContainer.style.position="fixed",this.submenuContainer.style.top="0",this.submenuContainer.style.left="0",this.parentData.submenu=new y(this.submenuContainer,this.submenuActions.length?this.submenuActions:[new s.EmptySubmenuAction],this.submenuOptions),this.menuStyle&&this.parentData.submenu.style(this.menuStyle);const F=this.element.getBoundingClientRect(),R={top:F.top-P,left:F.left,height:F.height+2*P,width:F.width},A=this.submenuContainer.getBoundingClientRect(),{top:O,left:L}=this.calculateSubmenuMenuLayout(new T.Dimension(window.innerWidth,window.innerHeight),T.Dimension.lift(A),R,this.expandDirection);this.submenuContainer.style.left=`${L-A.left}px`,this.submenuContainer.style.top=`${O-A.top}px`,this.submenuDisposables.add((0,T.addDisposableListener)(this.submenuContainer,T.EventType.KEY_UP,B=>{new D.StandardKeyboardEvent(B).equals(15)&&(T.EventHelper.stop(B,!0),this.parentData.parent.focus(),this.cleanupExistingSubmenu(!0))})),this.submenuDisposables.add((0,T.addDisposableListener)(this.submenuContainer,T.EventType.KEY_DOWN,B=>{new D.StandardKeyboardEvent(B).equals(15)&&T.EventHelper.stop(B,!0)})),this.submenuDisposables.add(this.parentData.submenu.onDidCancel(()=>{this.parentData.parent.focus(),this.cleanupExistingSubmenu(!0)})),this.parentData.submenu.focus(k),this.mysubmenu=this.parentData.submenu}}updateAriaExpanded(k){var M;this.item&&((M=this.item)===null||M===void 0||M.setAttribute("aria-expanded",k))}applyStyle(){if(super.applyStyle(),!this.menuStyle)return;const M=this.element&&this.element.classList.contains("focused")&&this.menuStyle.selectionForegroundColor?this.menuStyle.selectionForegroundColor:this.menuStyle.foregroundColor;this.submenuIndicator&&(this.submenuIndicator.style.color=M?`${M}`:""),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.submenuContainer=void 0)}}class v extends C.ActionViewItem{style(k){this.label&&(this.label.style.borderBottomColor=k.separatorColor?`${k.separatorColor}`:"")}}function m(I){const k=e.MENU_MNEMONIC_REGEX,M=k.exec(I);if(!M)return I;const P=!M[1];return I.replace(k,P?"$2$3":"").trim()}e.cleanMnemonic=m;let E=`
.monaco-menu {
    font-size: 13px;
 
}
 
${(0,n.formatRule)(l)}
${(0,n.formatRule)(h)}
 
.monaco-menu .monaco-action-bar {
    text-align: right;
    overflow: hidden;
    white-space: nowrap;
}
 
.monaco-menu .monaco-action-bar .actions-container {
    display: flex;
    margin: 0 auto;
    padding: 0;
    width: 100%;
    justify-content: flex-end;
}
 
.monaco-menu .monaco-action-bar.vertical .actions-container {
    display: inline-block;
}
 
.monaco-menu .monaco-action-bar.reverse .actions-container {
    flex-direction: row-reverse;
}
 
.monaco-menu .monaco-action-bar .action-item {
    cursor: pointer;
    display: inline-block;
    transition: transform 50ms ease;
    position: relative;  /* DO NOT REMOVE - this is the key to preventing the ghosting icon bug in Chrome 42 */
}
 
.monaco-menu .monaco-action-bar .action-item.disabled {
    cursor: default;
}
 
.monaco-menu .monaco-action-bar.animated .action-item.active {
    transform: scale(1.272019649, 1.272019649); /* 1.272019649 = \u221A\u03C6 */
}
 
.monaco-menu .monaco-action-bar .action-item .icon,
.monaco-menu .monaco-action-bar .action-item .codicon {
    display: inline-block;
}
 
.monaco-menu .monaco-action-bar .action-item .codicon {
    display: flex;
    align-items: center;
}
 
.monaco-menu .monaco-action-bar .action-label {
    font-size: 11px;
    margin-right: 4px;
}
 
.monaco-menu .monaco-action-bar .action-item.disabled .action-label,
.monaco-menu .monaco-action-bar .action-item.disabled .action-label:hover {
    opacity: 0.4;
}
 
/* Vertical actions */
 
.monaco-menu .monaco-action-bar.vertical {
    text-align: left;
}
 
.monaco-menu .monaco-action-bar.vertical .action-item {
    display: block;
}
 
.monaco-menu .monaco-action-bar.vertical .action-label.separator {
    display: block;
    border-bottom: 1px solid #bbb;
    padding-top: 1px;
    margin-left: .8em;
    margin-right: .8em;
}
 
.monaco-menu .secondary-actions .monaco-action-bar .action-label {
    margin-left: 6px;
}
 
/* Action Items */
.monaco-menu .monaco-action-bar .action-item.select-container {
    overflow: hidden; /* somehow the dropdown overflows its container, we prevent it here to not push */
    flex: 1;
    max-width: 170px;
    min-width: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 10px;
}
 
.monaco-menu .monaco-action-bar.vertical {
    margin-left: 0;
    overflow: visible;
}
 
.monaco-menu .monaco-action-bar.vertical .actions-container {
    display: block;
}
 
.monaco-menu .monaco-action-bar.vertical .action-item {
    padding: 0;
    transform: none;
    display: flex;
}
 
.monaco-menu .monaco-action-bar.vertical .action-item.active {
    transform: none;
}
 
.monaco-menu .monaco-action-bar.vertical .action-menu-item {
    flex: 1 1 auto;
    display: flex;
    height: 2em;
    align-items: center;
    position: relative;
}
 
.monaco-menu .monaco-action-bar.vertical .action-label {
    flex: 1 1 auto;
    text-decoration: none;
    padding: 0 1em;
    background: none;
    font-size: 12px;
    line-height: 1;
}
 
.monaco-menu .monaco-action-bar.vertical .keybinding,
.monaco-menu .monaco-action-bar.vertical .submenu-indicator {
    display: inline-block;
    flex: 2 1 auto;
    padding: 0 1em;
    text-align: right;
    font-size: 12px;
    line-height: 1;
}
 
.monaco-menu .monaco-action-bar.vertical .submenu-indicator {
    height: 100%;
}
 
.monaco-menu .monaco-action-bar.vertical .submenu-indicator.codicon {
    font-size: 16px !important;
    display: flex;
    align-items: center;
}
 
.monaco-menu .monaco-action-bar.vertical .submenu-indicator.codicon::before {
    margin-left: auto;
    margin-right: -20px;
}
 
.monaco-menu .monaco-action-bar.vertical .action-item.disabled .keybinding,
.monaco-menu .monaco-action-bar.vertical .action-item.disabled .submenu-indicator {
    opacity: 0.4;
}
 
.monaco-menu .monaco-action-bar.vertical .action-label:not(.separator) {
    display: inline-block;
    box-sizing: border-box;
    margin: 0;
}
 
.monaco-menu .monaco-action-bar.vertical .action-item {
    position: static;
    overflow: visible;
}
 
.monaco-menu .monaco-action-bar.vertical .action-item .monaco-submenu {
    position: absolute;
}
 
.monaco-menu .monaco-action-bar.vertical .action-label.separator {
    padding: 0.5em 0 0 0;
    margin-bottom: 0.5em;
    width: 100%;
    height: 0px !important;
    margin-left: .8em !important;
    margin-right: .8em !important;
}
 
.monaco-menu .monaco-action-bar.vertical .action-label.separator.text {
    padding: 0.7em 1em 0.1em 1em;
    font-weight: bold;
    opacity: 1;
}
 
.monaco-menu .monaco-action-bar.vertical .action-label:hover {
    color: inherit;
}
 
.monaco-menu .monaco-action-bar.vertical .menu-item-check {
    position: absolute;
    visibility: hidden;
    width: 1em;
    height: 100%;
}
 
.monaco-menu .monaco-action-bar.vertical .action-menu-item.checked .menu-item-check {
    visibility: visible;
    display: flex;
    align-items: center;
    justify-content: center;
}
 
/* Context Menu */
 
.context-view.monaco-menu-container {
    outline: 0;
    border: none;
    animation: fadeIn 0.083s linear;
    -webkit-app-region: no-drag;
}
 
.context-view.monaco-menu-container :focus,
.context-view.monaco-menu-container .monaco-action-bar.vertical:focus,
.context-view.monaco-menu-container .monaco-action-bar.vertical :focus {
    outline: 0;
}
 
.monaco-menu .monaco-action-bar.vertical .action-item {
    border: thin solid transparent; /* prevents jumping behaviour on hover or focus */
}
 
 
/* High Contrast Theming */
:host-context(.hc-black) .context-view.monaco-menu-container {
    box-shadow: none;
}
 
:host-context(.hc-black) .monaco-menu .monaco-action-bar.vertical .action-item.focused {
    background: none;
}
 
/* Vertical Action Bar Styles */
 
.monaco-menu .monaco-action-bar.vertical {
    padding: .5em 0;
}
 
.monaco-menu .monaco-action-bar.vertical .action-menu-item {
    height: 1.8em;
}
 
.monaco-menu .monaco-action-bar.vertical .action-label:not(.separator),
.monaco-menu .monaco-action-bar.vertical .keybinding {
    font-size: inherit;
    padding: 0 2em;
}
 
.monaco-menu .monaco-action-bar.vertical .menu-item-check {
    font-size: inherit;
    width: 2em;
}
 
.monaco-menu .monaco-action-bar.vertical .action-label.separator {
    font-size: inherit;
    padding: 0.2em 0 0 0;
    margin-bottom: 0.2em;
}
 
:host-context(.linux) .monaco-menu .monaco-action-bar.vertical .action-label.separator {
    margin-left: 0;
    margin-right: 0;
}
 
.monaco-menu .monaco-action-bar.vertical .submenu-indicator {
    font-size: 60%;
    padding: 0 1.8em;
}
 
:host-context(.linux) .monaco-menu .monaco-action-bar.vertical .submenu-indicator {
    height: 100%;
    mask-size: 10px 10px;
    -webkit-mask-size: 10px 10px;
}
 
.monaco-menu .action-item {
    cursor: default;
}
 
/* Arrows */
.monaco-scrollable-element > .scrollbar > .scra {
    cursor: pointer;
    font-size: 11px !important;
}
 
.monaco-scrollable-element > .visible {
    opacity: 1;
 
    /* Background rule added for IE9 - to allow clicks on dom node */
    background:rgba(0,0,0,0);
 
    transition: opacity 100ms linear;
}
.monaco-scrollable-element > .invisible {
    opacity: 0;
    pointer-events: none;
}
.monaco-scrollable-element > .invisible.fade {
    transition: opacity 800ms linear;
}
 
/* Scrollable Content Inset Shadow */
.monaco-scrollable-element > .shadow {
    position: absolute;
    display: none;
}
.monaco-scrollable-element > .shadow.top {
    display: block;
    top: 0;
    left: 3px;
    height: 3px;
    width: 100%;
    box-shadow: #DDD 0 6px 6px -6px inset;
}
.monaco-scrollable-element > .shadow.left {
    display: block;
    top: 3px;
    left: 0;
    height: 100%;
    width: 3px;
    box-shadow: #DDD 6px 0 6px -6px inset;
}
.monaco-scrollable-element > .shadow.top-left-corner {
    display: block;
    top: 0;
    left: 0;
    height: 3px;
    width: 3px;
}
.monaco-scrollable-element > .shadow.top.left {
    box-shadow: #DDD 6px 6px 6px -6px inset;
}
 
/* ---------- Default Style ---------- */
 
:host-context(.vs) .monaco-scrollable-element > .scrollbar > .slider {
    background: rgba(100, 100, 100, .4);
}
:host-context(.vs-dark) .monaco-scrollable-element > .scrollbar > .slider {
    background: rgba(121, 121, 121, .4);
}
:host-context(.hc-black) .monaco-scrollable-element > .scrollbar > .slider {
    background: rgba(111, 195, 223, .6);
}
 
.monaco-scrollable-element > .scrollbar > .slider:hover {
    background: rgba(100, 100, 100, .7);
}
:host-context(.hc-black) .monaco-scrollable-element > .scrollbar > .slider:hover {
    background: rgba(111, 195, 223, .8);
}
 
.monaco-scrollable-element > .scrollbar > .slider.active {
    background: rgba(0, 0, 0, .6);
}
:host-context(.vs-dark) .monaco-scrollable-element > .scrollbar > .slider.active {
    background: rgba(191, 191, 191, .4);
}
:host-context(.hc-black) .monaco-scrollable-element > .scrollbar > .slider.active {
    background: rgba(111, 195, 223, 1);
}
 
:host-context(.vs-dark) .monaco-scrollable-element .shadow.top {
    box-shadow: none;
}
 
:host-context(.vs-dark) .monaco-scrollable-element .shadow.left {
    box-shadow: #000 6px 0 6px -6px inset;
}
 
:host-context(.vs-dark) .monaco-scrollable-element .shadow.top.left {
    box-shadow: #000 6px 6px 6px -6px inset;
}
 
:host-context(.hc-black) .monaco-scrollable-element .shadow.top {
    box-shadow: none;
}
 
:host-context(.hc-black) .monaco-scrollable-element .shadow.left {
    box-shadow: none;
}
 
:host-context(.hc-black) .monaco-scrollable-element .shadow.top.left {
    box-shadow: none;
}
`}),define(J[455],ee([0,1,7,52,56,188,2,76,138]),function(j,e,w,N,T,D,S,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.QuickInputBox=void 0;const C=w.$;class n extends S.Disposable{constructor(t){super();this.parent=t,this.onKeyDown=s=>w.addDisposableListener(this.inputBox.inputElement,w.EventType.KEY_DOWN,c=>{s(new N.StandardKeyboardEvent(c))}),this.onMouseDown=s=>w.addDisposableListener(this.inputBox.inputElement,w.EventType.MOUSE_DOWN,c=>{s(new T.StandardMouseEvent(c))}),this.onDidChange=s=>this.inputBox.onDidChange(s),this.container=w.append(this.parent,C(".quick-input-box")),this.inputBox=this._register(new D.InputBox(this.container,void 0))}get value(){return this.inputBox.value}set value(t){this.inputBox.value=t}select(t=null){this.inputBox.select(t)}isSelectionAtEnd(){return this.inputBox.isSelectionAtEnd()}get placeholder(){return this.inputBox.inputElement.getAttribute("placeholder")||""}set placeholder(t){this.inputBox.setPlaceHolder(t)}get ariaLabel(){return this.inputBox.getAriaLabel()}set ariaLabel(t){this.inputBox.setAriaLabel(t)}get password(){return this.inputBox.inputElement.type==="password"}set password(t){this.inputBox.inputElement.type=t?"password":"text"}setAttribute(t,s){this.inputBox.inputElement.setAttribute(t,s)}removeAttribute(t){this.inputBox.inputElement.removeAttribute(t)}showDecoration(t){t===p.default.Ignore?this.inputBox.hideMessage():this.inputBox.showMessage({type:t===p.default.Info?1:t===p.default.Warning?2:3,content:""})}stylesForType(t){return this.inputBox.stylesForType(t===p.default.Info?1:t===p.default.Warning?2:3)}setFocus(){this.inputBox.focus()}layout(){this.inputBox.layout()}style(t){this.inputBox.style(t)}}e.QuickInputBox=n}),define(J[456],ee([5,6]),function(j,e){return j.create("vs/base/common/errorMessage",e)}),define(J[457],ee([0,1,19,20,456]),function(j,e,w,N,T){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.toErrorMessage=void 0;function D(n,g){return g&&(n.stack||n.stacktrace)?T.localize(0,null,p(n),S(n.stack)||S(n.stacktrace)):p(n)}function S(n){return Array.isArray(n)?n.join(`
`):n}function p(n){return typeof n.code=="string"&&typeof n.errno=="number"&&typeof n.syscall=="string"?T.localize(1,null,n.message):n.message||T.localize(2,null)}function C(n=null,g=!1){if(!n)return T.localize(3,null);if(Array.isArray(n)){const t=w.coalesce(n),s=C(t[0],g);return t.length>1?T.localize(4,null,s,t.length):s}if(N.isString(n))return n;if(n.detail){const t=n.detail;if(t.error)return D(t.error,g);if(t.exception)return D(t.exception,g)}return n.stack?D(n,g):n.message?n.message:T.localize(5,null)}e.toErrorMessage=C}),define(J[458],ee([5,6]),function(j,e){return j.create("vs/base/common/keybindingLabels",e)}),define(J[189],ee([0,1,458]),function(j,e,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ElectronAcceleratorLabelProvider=e.AriaLabelProvider=e.UILabelProvider=e.ModifierLabelProvider=void 0;class N{constructor(S,p,C=p){this.modifierLabels=[null],this.modifierLabels[2]=S,this.modifierLabels[1]=p,this.modifierLabels[3]=C}toLabel(S,p,C){if(p.length===0)return null;const n=[];for(let g=0,t=p.length;g<t;g++){const s=p[g],c=C(s);if(c===null)return null;n[g]=T(s,c,this.modifierLabels[S])}return n.join(" ")}}e.ModifierLabelProvider=N,e.UILabelProvider=new N({ctrlKey:"\u2303",shiftKey:"\u21E7",altKey:"\u2325",metaKey:"\u2318",separator:""},{ctrlKey:w.localize(0,null),shiftKey:w.localize(1,null),altKey:w.localize(2,null),metaKey:w.localize(3,null),separator:"+"},{ctrlKey:w.localize(4,null),shiftKey:w.localize(5,null),altKey:w.localize(6,null),metaKey:w.localize(7,null),separator:"+"}),e.AriaLabelProvider=new N({ctrlKey:w.localize(8,null),shiftKey:w.localize(9,null),altKey:w.localize(10,null),metaKey:w.localize(11,null),separator:"+"},{ctrlKey:w.localize(12,null),shiftKey:w.localize(13,null),altKey:w.localize(14,null),metaKey:w.localize(15,null),separator:"+"},{ctrlKey:w.localize(16,null),shiftKey:w.localize(17,null),altKey:w.localize(18,null),metaKey:w.localize(19,null),separator:"+"}),e.ElectronAcceleratorLabelProvider=new N({ctrlKey:"Ctrl",shiftKey:"Shift",altKey:"Alt",metaKey:"Cmd",separator:"+"},{ctrlKey:"Ctrl",shiftKey:"Shift",altKey:"Alt",metaKey:"Super",separator:"+"});function T(D,S,p){if(S===null)return"";const C=[];return D.ctrlKey&&C.push(p.ctrlKey),D.shiftKey&&C.push(p.shiftKey),D.altKey&&C.push(p.altKey),D.metaKey&&C.push(p.metaKey),S!==""&&C.push(S),C.join(p.separator)}}),define(J[459],ee([0,1,7,189,38,444,325]),function(j,e,w,N,T,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.KeybindingLabel=void 0;const S=w.$;class p{constructor(n,g,t){this.os=g,this.keyElements=new Set,this.options=t||Object.create(null),this.labelBackground=this.options.keybindingLabelBackground,this.labelForeground=this.options.keybindingLabelForeground,this.labelBorder=this.options.keybindingLabelBorder,this.labelBottomBorder=this.options.keybindingLabelBottomBorder,this.labelShadow=this.options.keybindingLabelShadow,this.domNode=w.append(n,S(".monaco-keybinding")),this.didEverRender=!1,n.appendChild(this.domNode)}get element(){return this.domNode}set(n,g){this.didEverRender&&this.keybinding===n&&p.areSame(this.matches,g)||(this.keybinding=n,this.matches=g,this.render())}render(){if(this.clear(),this.keybinding){let[n,g]=this.keybinding.getParts();n&&this.renderPart(this.domNode,n,this.matches?this.matches.firstPart:null),g&&(w.append(this.domNode,S("span.monaco-keybinding-key-chord-separator",void 0," ")),this.renderPart(this.domNode,g,this.matches?this.matches.chordPart:null)),this.domNode.title=this.keybinding.getAriaLabel()||""}else this.options&&this.options.renderUnboundKeybindings&&this.renderUnbound(this.domNode);this.applyStyles(),this.didEverRender=!0}clear(){w.clearNode(this.domNode),this.keyElements.clear()}renderPart(n,g,t){const s=N.UILabelProvider.modifierLabels[this.os];g.ctrlKey&&this.renderKey(n,s.ctrlKey,Boolean(t==null?void 0:t.ctrlKey),s.separator),g.shiftKey&&this.renderKey(n,s.shiftKey,Boolean(t==null?void 0:t.shiftKey),s.separator),g.altKey&&this.renderKey(n,s.altKey,Boolean(t==null?void 0:t.altKey),s.separator),g.metaKey&&this.renderKey(n,s.metaKey,Boolean(t==null?void 0:t.metaKey),s.separator);const c=g.keyLabel;c&&this.renderKey(n,c,Boolean(t==null?void 0:t.keyCode),"")}renderKey(n,g,t,s){w.append(n,this.createKeyElement(g,t?".highlight":"")),s&&w.append(n,S("span.monaco-keybinding-key-separator",void 0,s))}renderUnbound(n){w.append(n,this.createKeyElement((0,D.localize)(0,null)))}createKeyElement(n,g=""){const t=S("span.monaco-keybinding-key"+g,void 0,n);return this.keyElements.add(t),t}style(n){this.labelBackground=n.keybindingLabelBackground,this.labelForeground=n.keybindingLabelForeground,this.labelBorder=n.keybindingLabelBorder,this.labelBottomBorder=n.keybindingLabelBottomBorder,this.labelShadow=n.keybindingLabelShadow,this.applyStyles()}applyStyles(){var n;if(this.element){for(const g of this.keyElements)this.labelBackground&&(g.style.backgroundColor=(n=this.labelBackground)===null||n===void 0?void 0:n.toString()),this.labelBorder&&(g.style.borderColor=this.labelBorder.toString()),this.labelBottomBorder&&(g.style.borderBottomColor=this.labelBottomBorder.toString()),this.labelShadow&&(g.style.boxShadow=`inset 0 -1px 0 ${this.labelShadow}`);this.labelForeground&&(this.element.style.color=this.labelForeground.toString())}}static areSame(n,g){return n===g||!n&&!g?!0:!!n&&!!g&&(0,T.equals)(n.firstPart,g.firstPart)&&(0,T.equals)(n.chordPart,g.chordPart)}}e.KeybindingLabel=p}),define(J[460],ee([5,6]),function(j,e){return j.create("vs/base/parts/quickinput/browser/quickInput",e)}),define(J[461],ee([5,6]),function(j,e){return j.create("vs/base/parts/quickinput/browser/quickInputList",e)}),define(J[462],ee([0,1,7,52,86,166,186,459,51,19,27,303,92,4,107,2,17,20,222,461,138]),function(j,e,w,N,T,D,S,p,C,n,g,t,s,c,u,d,a,r,o,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.QuickInputList=e.QuickInputListFocus=void 0;const l=w.$;class h{constructor(I){this.hidden=!1,this._onChecked=new c.Emitter,this.onChecked=this._onChecked.event,Object.assign(this,I)}get checked(){return!!this._checked}set checked(I){I!==this._checked&&(this._checked=I,this._onChecked.fire(I))}dispose(){this._onChecked.dispose()}}class f{get templateId(){return f.ID}renderTemplate(I){const k=Object.create(null);k.toDisposeElement=[],k.toDisposeTemplate=[],k.entry=w.append(I,l(".quick-input-list-entry"));const M=w.append(k.entry,l("label.quick-input-list-label"));k.toDisposeTemplate.push(w.addStandardDisposableListener(M,w.EventType.CLICK,L=>{k.checkbox.offsetParent||L.preventDefault()})),k.checkbox=w.append(M,l("input.quick-input-list-checkbox")),k.checkbox.type="checkbox",k.toDisposeTemplate.push(w.addStandardDisposableListener(k.checkbox,w.EventType.CHANGE,L=>{k.element.checked=k.checkbox.checked}));const P=w.append(M,l(".quick-input-list-rows")),F=w.append(P,l(".quick-input-list-row")),R=w.append(P,l(".quick-input-list-row"));k.label=new S.IconLabel(F,{supportHighlights:!0,supportDescriptionHighlights:!0,supportIcons:!0});const A=w.append(F,l(".quick-input-list-entry-keybinding"));k.keybinding=new p.KeybindingLabel(A,a.OS);const O=w.append(R,l(".quick-input-list-label-meta"));return k.detail=new D.HighlightedLabel(O,!0),k.separator=w.append(k.entry,l(".quick-input-list-separator")),k.actionBar=new T.ActionBar(k.entry),k.actionBar.domNode.classList.add("quick-input-list-entry-action-bar"),k.toDisposeTemplate.push(k.actionBar),k}renderElement(I,k,M){M.toDisposeElement=(0,d.dispose)(M.toDisposeElement),M.element=I,M.checkbox.checked=I.checked,M.toDisposeElement.push(I.onChecked(L=>M.checkbox.checked=L));const{labelHighlights:P,descriptionHighlights:F,detailHighlights:R}=I,A=Object.create(null);A.matches=P||[],A.descriptionTitle=I.saneDescription,A.descriptionMatches=F||[],A.extraClasses=I.item.iconClasses,A.italic=I.item.italic,A.strikethrough=I.item.strikethrough,M.label.setLabel(I.saneLabel,I.saneDescription,A),M.keybinding.set(I.item.keybinding),M.detail.set(I.saneDetail,R),I.separator&&I.separator.label?(M.separator.textContent=I.separator.label,M.separator.style.display=""):M.separator.style.display="none",M.entry.classList.toggle("quick-input-list-separator-border",!!I.separator),M.actionBar.clear();const O=I.item.buttons;O&&O.length?(M.actionBar.push(O.map((L,B)=>{let W=L.iconClass||(L.iconPath?(0,o.getIconClass)(L.iconPath):void 0);L.alwaysVisible&&(W=W?`${W} always-visible`:"always-visible");const K=new C.Action(`id-${B}`,"",W,!0,()=>Re(this,void 0,void 0,function*(){I.fireButtonTriggered({button:L,item:I.item})}));return K.tooltip=L.tooltip||"",K}),{icon:!0,label:!1}),M.entry.classList.add("has-actions")):M.entry.classList.remove("has-actions")}disposeElement(I,k,M){M.toDisposeElement=(0,d.dispose)(M.toDisposeElement)}disposeTemplate(I){I.toDisposeElement=(0,d.dispose)(I.toDisposeElement),I.toDisposeTemplate=(0,d.dispose)(I.toDisposeTemplate)}}f.ID="listelement";class y{getHeight(I){return I.saneDetail?44:22}getTemplateId(I){return f.ID}}var _;(function(E){E[E.First=1]="First",E[E.Second=2]="Second",E[E.Last=3]="Last",E[E.Next=4]="Next",E[E.Previous=5]="Previous",E[E.NextPage=6]="NextPage",E[E.PreviousPage=7]="PreviousPage"})(_=e.QuickInputListFocus||(e.QuickInputListFocus={}));class b{constructor(I,k,M){this.parent=I,this.inputElements=[],this.elements=[],this.elementsToIndexes=new Map,this.matchOnDescription=!1,this.matchOnDetail=!1,this.matchOnLabel=!0,this.matchOnMeta=!0,this.sortByLabel=!0,this._onChangedAllVisibleChecked=new c.Emitter,this.onChangedAllVisibleChecked=this._onChangedAllVisibleChecked.event,this._onChangedCheckedCount=new c.Emitter,this.onChangedCheckedCount=this._onChangedCheckedCount.event,this._onChangedVisibleCount=new c.Emitter,this.onChangedVisibleCount=this._onChangedVisibleCount.event,this._onChangedCheckedElements=new c.Emitter,this.onChangedCheckedElements=this._onChangedCheckedElements.event,this._onButtonTriggered=new c.Emitter,this.onButtonTriggered=this._onButtonTriggered.event,this._onKeyDown=new c.Emitter,this.onKeyDown=this._onKeyDown.event,this._onLeave=new c.Emitter,this.onLeave=this._onLeave.event,this._fireCheckedEvents=!0,this.elementDisposables=[],this.disposables=[],this.id=k,this.container=w.append(this.parent,l(".quick-input-list"));const P=new y,F=new m;this.list=M.createList("QuickInput",this.container,P,[new f],{identityProvider:{getId:R=>R.saneLabel},setRowLineHeight:!1,multipleSelectionSupport:!1,horizontalScrolling:!1,accessibilityProvider:F}),this.list.getHTMLElement().id=k,this.disposables.push(this.list),this.disposables.push(this.list.onKeyDown(R=>{const A=new N.StandardKeyboardEvent(R);switch(A.keyCode){case 10:this.toggleCheckbox();break;case 31:(a.isMacintosh?R.metaKey:R.ctrlKey)&&this.list.setFocus((0,n.range)(this.list.length));break;case 16:const O=this.list.getFocus();O.length===1&&O[0]===0&&this._onLeave.fire();break;case 18:const L=this.list.getFocus();L.length===1&&L[0]===this.list.length-1&&this._onLeave.fire();break}this._onKeyDown.fire(A)})),this.disposables.push(this.list.onMouseDown(R=>{R.browserEvent.button!==2&&R.browserEvent.preventDefault()})),this.disposables.push(w.addDisposableListener(this.container,w.EventType.CLICK,R=>{(R.x||R.y)&&this._onLeave.fire()})),this.disposables.push(this.list.onMouseMiddleClick(R=>{this._onLeave.fire()})),this.disposables.push(this.list.onContextMenu(R=>{typeof R.index=="number"&&(R.browserEvent.preventDefault(),this.list.setSelection([R.index]))})),this.disposables.push(this._onChangedAllVisibleChecked,this._onChangedCheckedCount,this._onChangedVisibleCount,this._onChangedCheckedElements,this._onButtonTriggered,this._onLeave,this._onKeyDown)}get onDidChangeFocus(){return c.Event.map(this.list.onDidChangeFocus,I=>I.elements.map(k=>k.item))}get onDidChangeSelection(){return c.Event.map(this.list.onDidChangeSelection,I=>({items:I.elements.map(k=>k.item),event:I.browserEvent}))}get scrollTop(){return this.list.scrollTop}set scrollTop(I){this.list.scrollTop=I}getAllVisibleChecked(){return this.allVisibleChecked(this.elements,!1)}allVisibleChecked(I,k=!0){for(let M=0,P=I.length;M<P;M++){const F=I[M];if(!F.hidden)if(F.checked)k=!0;else return!1}return k}getCheckedCount(){let I=0;const k=this.elements;for(let M=0,P=k.length;M<P;M++)k[M].checked&&I++;return I}getVisibleCount(){let I=0;const k=this.elements;for(let M=0,P=k.length;M<P;M++)k[M].hidden||I++;return I}setAllVisibleChecked(I){try{this._fireCheckedEvents=!1,this.elements.forEach(k=>{k.hidden||(k.checked=I)})}finally{this._fireCheckedEvents=!0,this.fireCheckedEvents()}}setElements(I){this.elementDisposables=(0,d.dispose)(this.elementDisposables);const k=M=>this.fireButtonTriggered(M);this.inputElements=I,this.elements=I.reduce((M,P,F)=>{var R,A,O;if(P.type!=="separator"){const L=F&&I[F-1],B=P.label&&P.label.replace(/\r?\n/g," "),W=P.meta&&P.meta.replace(/\r?\n/g," "),K=P.description&&P.description.replace(/\r?\n/g," "),H=P.detail&&P.detail.replace(/\r?\n/g," "),Y=P.ariaLabel||[B,K,H].map(X=>(0,g.getCodiconAriaLabel)(X)).filter(X=>!!X).join(", ");M.push(new h({index:F,item:P,saneLabel:B,saneMeta:W,saneAriaLabel:Y,saneDescription:K,saneDetail:H,labelHighlights:(R=P.highlights)===null||R===void 0?void 0:R.label,descriptionHighlights:(A=P.highlights)===null||A===void 0?void 0:A.description,detailHighlights:(O=P.highlights)===null||O===void 0?void 0:O.detail,checked:!1,separator:L&&L.type==="separator"?L:void 0,fireButtonTriggered:k}))}return M},[]),this.elementDisposables.push(...this.elements),this.elementDisposables.push(...this.elements.map(M=>M.onChecked(()=>this.fireCheckedEvents()))),this.elementsToIndexes=this.elements.reduce((M,P,F)=>(M.set(P.item,F),M),new Map),this.list.splice(0,this.list.length),this.list.splice(0,this.list.length,this.elements),this._onChangedVisibleCount.fire(this.elements.length)}getFocusedElements(){return this.list.getFocusedElements().map(I=>I.item)}setFocusedElements(I){if(this.list.setFocus(I.filter(k=>this.elementsToIndexes.has(k)).map(k=>this.elementsToIndexes.get(k))),I.length>0){const k=this.list.getFocus()[0];typeof k=="number"&&this.list.reveal(k)}}getActiveDescendant(){return this.list.getHTMLElement().getAttribute("aria-activedescendant")}setSelectedElements(I){this.list.setSelection(I.filter(k=>this.elementsToIndexes.has(k)).map(k=>this.elementsToIndexes.get(k)))}getCheckedElements(){return this.elements.filter(I=>I.checked).map(I=>I.item)}setCheckedElements(I){try{this._fireCheckedEvents=!1;const k=new Set;for(const M of I)k.add(M);for(const M of this.elements)M.checked=k.has(M.item)}finally{this._fireCheckedEvents=!0,this.fireCheckedEvents()}}set enabled(I){this.list.getHTMLElement().style.pointerEvents=I?"":"none"}focus(I){if(!this.list.length)return;switch(I===_.Next&&this.list.getFocus()[0]===this.list.length-1&&(I=_.First),I===_.Previous&&this.list.getFocus()[0]===0&&(I=_.Last),I===_.Second&&this.list.length<2&&(I=_.First),I){case _.First:this.list.focusFirst();break;case _.Second:this.list.focusNth(1);break;case _.Last:this.list.focusLast();break;case _.Next:this.list.focusNext();break;case _.Previous:this.list.focusPrevious();break;case _.NextPage:this.list.focusNextPage();break;case _.PreviousPage:this.list.focusPreviousPage();break}const k=this.list.getFocus()[0];typeof k=="number"&&this.list.reveal(k)}clearFocus(){this.list.setFocus([])}domFocus(){this.list.domFocus()}layout(I){this.list.getHTMLElement().style.maxHeight=I?`calc(${Math.floor(I/44)*44}px)`:"",this.list.layout()}filter(I){if(!(this.sortByLabel||this.matchOnLabel||this.matchOnDescription||this.matchOnDetail))return this.list.layout(),!1;if(I=I.trim(),!I||!(this.matchOnLabel||this.matchOnDescription||this.matchOnDetail))this.elements.forEach(M=>{M.labelHighlights=void 0,M.descriptionHighlights=void 0,M.detailHighlights=void 0,M.hidden=!1;const P=M.index&&this.inputElements[M.index-1];M.separator=P&&P.type==="separator"?P:void 0});else{let M;this.elements.forEach(P=>{const F=this.matchOnLabel?(0,r.withNullAsUndefined)((0,u.matchesFuzzyIconAware)(I,(0,u.parseLabelWithIcons)(P.saneLabel))):void 0,R=this.matchOnDescription?(0,r.withNullAsUndefined)((0,u.matchesFuzzyIconAware)(I,(0,u.parseLabelWithIcons)(P.saneDescription||""))):void 0,A=this.matchOnDetail?(0,r.withNullAsUndefined)((0,u.matchesFuzzyIconAware)(I,(0,u.parseLabelWithIcons)(P.saneDetail||""))):void 0,O=this.matchOnMeta?(0,r.withNullAsUndefined)((0,u.matchesFuzzyIconAware)(I,(0,u.parseLabelWithIcons)(P.saneMeta||""))):void 0;if(F||R||A||O?(P.labelHighlights=F,P.descriptionHighlights=R,P.detailHighlights=A,P.hidden=!1):(P.labelHighlights=void 0,P.descriptionHighlights=void 0,P.detailHighlights=void 0,P.hidden=!P.item.alwaysShow),P.separator=void 0,!this.sortByLabel){const L=P.index&&this.inputElements[P.index-1];M=L&&L.type==="separator"?L:M,M&&!P.hidden&&(P.separator=M,M=void 0)}})}const k=this.elements.filter(M=>!M.hidden);if(this.sortByLabel&&I){const M=I.toLowerCase();k.sort((P,F)=>v(P,F,M))}return this.elementsToIndexes=k.reduce((M,P,F)=>(M.set(P.item,F),M),new Map),this.list.splice(0,this.list.length,k),this.list.setFocus([]),this.list.layout(),this._onChangedAllVisibleChecked.fire(this.getAllVisibleChecked()),this._onChangedVisibleCount.fire(k.length),!0}toggleCheckbox(){try{this._fireCheckedEvents=!1;const I=this.list.getFocusedElements(),k=this.allVisibleChecked(I);for(const M of I)M.checked=!k}finally{this._fireCheckedEvents=!0,this.fireCheckedEvents()}}display(I){this.container.style.display=I?"":"none"}isDisplayed(){return this.container.style.display!=="none"}dispose(){this.elementDisposables=(0,d.dispose)(this.elementDisposables),this.disposables=(0,d.dispose)(this.disposables)}fireCheckedEvents(){this._fireCheckedEvents&&(this._onChangedAllVisibleChecked.fire(this.getAllVisibleChecked()),this._onChangedCheckedCount.fire(this.getCheckedCount()),this._onChangedCheckedElements.fire(this.getCheckedElements()))}fireButtonTriggered(I){this._onButtonTriggered.fire(I)}style(I){this.list.style(I)}}Fe([s.memoize],b.prototype,"onDidChangeFocus",null),Fe([s.memoize],b.prototype,"onDidChangeSelection",null),e.QuickInputList=b;function v(E,I,k){const M=E.labelHighlights||[],P=I.labelHighlights||[];return M.length&&!P.length?-1:!M.length&&P.length?1:M.length===0&&P.length===0?0:(0,t.compareAnything)(E.saneLabel,I.saneLabel,k)}class m{getWidgetAriaLabel(){return(0,i.localize)(0,null)}getAriaLabel(I){return I.saneAriaLabel}getWidgetRole(){return"listbox"}getRole(){return"option"}}}),define(J[463],ee([0,1,7,52,86,316,216,108,328,51,19,14,23,27,4,2,17,76,222,213,460,455,462,138]),function(j,e,w,N,T,D,S,p,C,n,g,t,s,c,u,d,a,r,o,i,l,h,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.QuickInputController=void 0;const y=w.$,b={iconClass:(0,c.registerCodicon)("quick-input-back",c.Codicon.arrowLeft).classNames,tooltip:(0,l.localize)(0,null),handle:-1};class v extends d.Disposable{constructor(k){super();this.ui=k,this.visible=!1,this._enabled=!0,this._busy=!1,this._ignoreFocusOut=!1,this._buttons=[],this.noValidationMessage=v.noPromptMessage,this._severity=r.default.Ignore,this.buttonsUpdated=!1,this.onDidTriggerButtonEmitter=this._register(new u.Emitter),this.onDidHideEmitter=this._register(new u.Emitter),this.onDisposeEmitter=this._register(new u.Emitter),this.visibleDisposables=this._register(new d.DisposableStore),this.onDidHide=this.onDidHideEmitter.event}get title(){return this._title}set title(k){this._title=k,this.update()}get description(){return this._description}set description(k){this._description=k,this.update()}get step(){return this._steps}set step(k){this._steps=k,this.update()}get totalSteps(){return this._totalSteps}set totalSteps(k){this._totalSteps=k,this.update()}get enabled(){return this._enabled}set enabled(k){this._enabled=k,this.update()}get contextKey(){return this._contextKey}set contextKey(k){this._contextKey=k,this.update()}get busy(){return this._busy}set busy(k){this._busy=k,this.update()}get ignoreFocusOut(){return this._ignoreFocusOut}set ignoreFocusOut(k){const M=this._ignoreFocusOut!==k&&!a.isIOS;this._ignoreFocusOut=k&&!a.isIOS,M&&this.update()}get buttons(){return this._buttons}set buttons(k){this._buttons=k,this.buttonsUpdated=!0,this.update()}get validationMessage(){return this._validationMessage}set validationMessage(k){this._validationMessage=k,this.update()}get severity(){return this._severity}set severity(k){this._severity=k,this.update()}show(){this.visible||(this.visibleDisposables.add(this.ui.onDidTriggerButton(k=>{this.buttons.indexOf(k)!==-1&&this.onDidTriggerButtonEmitter.fire(k)})),this.ui.show(this),this.visible=!0,this._lastValidationMessage=void 0,this._lastSeverity=void 0,this.buttons.length&&(this.buttonsUpdated=!0),this.update())}hide(){!this.visible||this.ui.hide()}didHide(k=i.QuickInputHideReason.Other){this.visible=!1,this.visibleDisposables.clear(),this.onDidHideEmitter.fire({reason:k})}update(){if(!this.visible)return;const k=this.getTitle();k&&this.ui.title.textContent!==k?this.ui.title.textContent=k:!k&&this.ui.title.innerHTML!=="&nbsp;"&&(this.ui.title.innerText="\xA0");const M=this.getDescription();if(this.ui.description1.textContent!==M&&(this.ui.description1.textContent=M),this.ui.description2.textContent!==M&&(this.ui.description2.textContent=M),this.busy&&!this.busyDelay&&(this.busyDelay=new t.TimeoutTimer,this.busyDelay.setIfNotSet(()=>{this.visible&&this.ui.progressBar.infinite()},800)),!this.busy&&this.busyDelay&&(this.ui.progressBar.stop(),this.busyDelay.cancel(),this.busyDelay=void 0),this.buttonsUpdated){this.buttonsUpdated=!1,this.ui.leftActionBar.clear();const F=this.buttons.filter(A=>A===b);this.ui.leftActionBar.push(F.map((A,O)=>{const L=new n.Action(`id-${O}`,"",A.iconClass||(0,o.getIconClass)(A.iconPath),!0,()=>Re(this,void 0,void 0,function*(){this.onDidTriggerButtonEmitter.fire(A)}));return L.tooltip=A.tooltip||"",L}),{icon:!0,label:!1}),this.ui.rightActionBar.clear();const R=this.buttons.filter(A=>A!==b);this.ui.rightActionBar.push(R.map((A,O)=>{const L=new n.Action(`id-${O}`,"",A.iconClass||(0,o.getIconClass)(A.iconPath),!0,()=>Re(this,void 0,void 0,function*(){this.onDidTriggerButtonEmitter.fire(A)}));return L.tooltip=A.tooltip||"",L}),{icon:!0,label:!1})}this.ui.ignoreFocusOut=this.ignoreFocusOut,this.ui.setEnabled(this.enabled),this.ui.setContextKey(this.contextKey);const P=this.validationMessage||this.noValidationMessage;this._lastValidationMessage!==P&&(this._lastValidationMessage=P,w.reset(this.ui.message,...(0,p.renderLabelWithIcons)(P))),this._lastSeverity!==this.severity&&(this._lastSeverity=this.severity,this.showMessageDecoration(this.severity))}getTitle(){return this.title&&this.step?`${this.title} (${this.getSteps()})`:this.title?this.title:this.step?this.getSteps():""}getDescription(){return this.description||""}getSteps(){return this.step&&this.totalSteps?(0,l.localize)(2,null,this.step,this.totalSteps):this.step?String(this.step):""}showMessageDecoration(k){if(this.ui.inputBox.showDecoration(k),k!==r.default.Ignore){const M=this.ui.inputBox.stylesForType(k);this.ui.message.style.color=M.foreground?`${M.foreground}`:"",this.ui.message.style.backgroundColor=M.background?`${M.background}`:"",this.ui.message.style.border=M.border?`1px solid ${M.border}`:"",this.ui.message.style.paddingBottom="4px"}else this.ui.message.style.color="",this.ui.message.style.backgroundColor="",this.ui.message.style.border="",this.ui.message.style.paddingBottom=""}dispose(){this.hide(),this.onDisposeEmitter.fire(),super.dispose()}}v.noPromptMessage=(0,l.localize)(1,null);class m extends v{constructor(){super(...arguments);this._value="",this.onDidChangeValueEmitter=this._register(new u.Emitter),this.onWillAcceptEmitter=this._register(new u.Emitter),this.onDidAcceptEmitter=this._register(new u.Emitter),this.onDidCustomEmitter=this._register(new u.Emitter),this._items=[],this.itemsUpdated=!1,this._canSelectMany=!1,this._canAcceptInBackground=!1,this._matchOnDescription=!1,this._matchOnDetail=!1,this._matchOnLabel=!0,this._sortByLabel=!0,this._autoFocusOnList=!0,this._keepScrollPosition=!1,this._itemActivation=this.ui.isScreenReaderOptimized()?i.ItemActivation.NONE:i.ItemActivation.FIRST,this._activeItems=[],this.activeItemsUpdated=!1,this.activeItemsToConfirm=[],this.onDidChangeActiveEmitter=this._register(new u.Emitter),this._selectedItems=[],this.selectedItemsUpdated=!1,this.selectedItemsToConfirm=[],this.onDidChangeSelectionEmitter=this._register(new u.Emitter),this.onDidTriggerItemButtonEmitter=this._register(new u.Emitter),this.valueSelectionUpdated=!0,this._ok="default",this._customButton=!1,this.filterValue=k=>k,this.onDidChangeValue=this.onDidChangeValueEmitter.event,this.onWillAccept=this.onWillAcceptEmitter.event,this.onDidAccept=this.onDidAcceptEmitter.event,this.onDidChangeActive=this.onDidChangeActiveEmitter.event,this.onDidChangeSelection=this.onDidChangeSelectionEmitter.event,this.onDidTriggerItemButton=this.onDidTriggerItemButtonEmitter.event}get quickNavigate(){return this._quickNavigate}set quickNavigate(k){this._quickNavigate=k,this.update()}get value(){return this._value}set value(k){this._value!==k&&(this._value=k||"",this.update(),this.onDidChangeValueEmitter.fire(this._value))}set ariaLabel(k){this._ariaLabel=k,this.update()}get ariaLabel(){return this._ariaLabel}get placeholder(){return this._placeholder}set placeholder(k){this._placeholder=k,this.update()}get items(){return this._items}get scrollTop(){return this.ui.list.scrollTop}set scrollTop(k){this.ui.list.scrollTop=k}set items(k){this._items=k,this.itemsUpdated=!0,this.update()}get canSelectMany(){return this._canSelectMany}set canSelectMany(k){this._canSelectMany=k,this.update()}get canAcceptInBackground(){return this._canAcceptInBackground}set canAcceptInBackground(k){this._canAcceptInBackground=k}get matchOnDescription(){return this._matchOnDescription}set matchOnDescription(k){this._matchOnDescription=k,this.update()}get matchOnDetail(){return this._matchOnDetail}set matchOnDetail(k){this._matchOnDetail=k,this.update()}get matchOnLabel(){return this._matchOnLabel}set matchOnLabel(k){this._matchOnLabel=k,this.update()}get sortByLabel(){return this._sortByLabel}set sortByLabel(k){this._sortByLabel=k,this.update()}get autoFocusOnList(){return this._autoFocusOnList}set autoFocusOnList(k){this._autoFocusOnList=k,this.update()}get keepScrollPosition(){return this._keepScrollPosition}set keepScrollPosition(k){this._keepScrollPosition=k}get itemActivation(){return this._itemActivation}set itemActivation(k){this._itemActivation=k}get activeItems(){return this._activeItems}set activeItems(k){this._activeItems=k,this.activeItemsUpdated=!0,this.update()}get selectedItems(){return this._selectedItems}set selectedItems(k){this._selectedItems=k,this.selectedItemsUpdated=!0,this.update()}get keyMods(){return this._quickNavigate?i.NO_KEY_MODS:this.ui.keyMods}set valueSelection(k){this._valueSelection=k,this.valueSelectionUpdated=!0,this.update()}get customButton(){return this._customButton}set customButton(k){this._customButton=k,this.update()}get customLabel(){return this._customButtonLabel}set customLabel(k){this._customButtonLabel=k,this.update()}get customHover(){return this._customButtonHover}set customHover(k){this._customButtonHover=k,this.update()}get ok(){return this._ok}set ok(k){this._ok=k,this.update()}get hideInput(){return!!this._hideInput}set hideInput(k){this._hideInput=k,this.update()}trySelectFirst(){this.autoFocusOnList&&(this.canSelectMany||this.ui.list.focus(f.QuickInputListFocus.First))}show(){this.visible||(this.visibleDisposables.add(this.ui.inputBox.onDidChange(k=>{if(k===this.value)return;this._value=k,this.ui.list.filter(this.filterValue(this.ui.inputBox.value))&&this.trySelectFirst(),this.onDidChangeValueEmitter.fire(k)})),this.visibleDisposables.add(this.ui.inputBox.onMouseDown(k=>{this.autoFocusOnList||this.ui.list.clearFocus()})),this.visibleDisposables.add((this._hideInput?this.ui.list:this.ui.inputBox).onKeyDown(k=>{switch(k.keyCode){case 18:this.ui.list.focus(f.QuickInputListFocus.Next),this.canSelectMany&&this.ui.list.domFocus(),w.EventHelper.stop(k,!0);break;case 16:this.ui.list.getFocusedElements().length?this.ui.list.focus(f.QuickInputListFocus.Previous):this.ui.list.focus(f.QuickInputListFocus.Last),this.canSelectMany&&this.ui.list.domFocus(),w.EventHelper.stop(k,!0);break;case 12:this.ui.list.focus(f.QuickInputListFocus.NextPage),this.canSelectMany&&this.ui.list.domFocus(),w.EventHelper.stop(k,!0);break;case 11:this.ui.list.focus(f.QuickInputListFocus.PreviousPage),this.canSelectMany&&this.ui.list.domFocus(),w.EventHelper.stop(k,!0);break;case 17:if(!this._canAcceptInBackground||!this.ui.inputBox.isSelectionAtEnd())return;this.activeItems[0]&&(this._selectedItems=[this.activeItems[0]],this.onDidChangeSelectionEmitter.fire(this.selectedItems),this.handleAccept(!0));break;case 14:(k.ctrlKey||k.metaKey)&&!k.shiftKey&&!k.altKey&&(this.ui.list.focus(f.QuickInputListFocus.First),w.EventHelper.stop(k,!0));break;case 13:(k.ctrlKey||k.metaKey)&&!k.shiftKey&&!k.altKey&&(this.ui.list.focus(f.QuickInputListFocus.Last),w.EventHelper.stop(k,!0));break}})),this.visibleDisposables.add(this.ui.onDidAccept(()=>{this.canSelectMany?this.ui.list.getCheckedElements().length||(this._selectedItems=[],this.onDidChangeSelectionEmitter.fire(this.selectedItems)):this.activeItems[0]&&(this._selectedItems=[this.activeItems[0]],this.onDidChangeSelectionEmitter.fire(this.selectedItems)),this.handleAccept(!1)})),this.visibleDisposables.add(this.ui.onDidCustom(()=>{this.onDidCustomEmitter.fire()})),this.visibleDisposables.add(this.ui.list.onDidChangeFocus(k=>{this.activeItemsUpdated||this.activeItemsToConfirm!==this._activeItems&&(0,g.equals)(k,this._activeItems,(M,P)=>M===P)||(this._activeItems=k,this.onDidChangeActiveEmitter.fire(k))})),this.visibleDisposables.add(this.ui.list.onDidChangeSelection(({items:k,event:M})=>{if(this.canSelectMany){k.length&&this.ui.list.setSelectedElements([]);return}this.selectedItemsToConfirm!==this._selectedItems&&(0,g.equals)(k,this._selectedItems,(P,F)=>P===F)||(this._selectedItems=k,this.onDidChangeSelectionEmitter.fire(k),k.length&&this.handleAccept(M instanceof MouseEvent&&M.button===1))})),this.visibleDisposables.add(this.ui.list.onChangedCheckedElements(k=>{!this.canSelectMany||this.selectedItemsToConfirm!==this._selectedItems&&(0,g.equals)(k,this._selectedItems,(M,P)=>M===P)||(this._selectedItems=k,this.onDidChangeSelectionEmitter.fire(k))})),this.visibleDisposables.add(this.ui.list.onButtonTriggered(k=>this.onDidTriggerItemButtonEmitter.fire(k))),this.visibleDisposables.add(this.registerQuickNavigation()),this.valueSelectionUpdated=!0),super.show()}handleAccept(k){let M=!1;this.onWillAcceptEmitter.fire({veto:()=>M=!0}),M||this.onDidAcceptEmitter.fire({inBackground:k})}registerQuickNavigation(){return w.addDisposableListener(this.ui.container,w.EventType.KEY_UP,k=>{if(this.canSelectMany||!this._quickNavigate)return;const M=new N.StandardKeyboardEvent(k),P=M.keyCode;this._quickNavigate.keybindings.some(A=>{const[O,L]=A.getParts();return L?!1:O.shiftKey&&P===4?!(M.ctrlKey||M.altKey||M.metaKey):!!(O.altKey&&P===6||O.ctrlKey&&P===5||O.metaKey&&P===57)})&&(this.activeItems[0]&&(this._selectedItems=[this.activeItems[0]],this.onDidChangeSelectionEmitter.fire(this.selectedItems),this.handleAccept(!1)),this._quickNavigate=void 0)})}update(){if(!this.visible)return;const k=this.keepScrollPosition?this.scrollTop:0,M=!!this._hideInput&&this._items.length>0;this.ui.container.classList.toggle("hidden-input",M&&!this.description);const P={title:!!this.title||!!this.step||!!this.buttons.length,description:!!this.description,checkAll:this.canSelectMany&&!this._hideCheckAll,checkBox:this.canSelectMany,inputBox:!M,progressBar:!M,visibleCount:!0,count:this.canSelectMany,ok:this.ok==="default"?this.canSelectMany:this.ok,list:!0,message:!!this.validationMessage,customButton:this.customButton};this.ui.setVisibilities(P),super.update(),this.ui.inputBox.value!==this.value&&(this.ui.inputBox.value=this.value),this.valueSelectionUpdated&&(this.valueSelectionUpdated=!1,this.ui.inputBox.select(this._valueSelection&&{start:this._valueSelection[0],end:this._valueSelection[1]})),this.ui.inputBox.placeholder!==(this.placeholder||"")&&(this.ui.inputBox.placeholder=this.placeholder||"");const F=this.ariaLabel||this.placeholder||m.DEFAULT_ARIA_LABEL;if(this.ui.inputBox.ariaLabel!==F&&(this.ui.inputBox.ariaLabel=F),this.ui.list.matchOnDescription=this.matchOnDescription,this.ui.list.matchOnDetail=this.matchOnDetail,this.ui.list.matchOnLabel=this.matchOnLabel,this.ui.list.sortByLabel=this.sortByLabel,this.itemsUpdated)switch(this.itemsUpdated=!1,this.ui.list.setElements(this.items),this.ui.list.filter(this.filterValue(this.ui.inputBox.value)),this.ui.checkAll.checked=this.ui.list.getAllVisibleChecked(),this.ui.visibleCount.setCount(this.ui.list.getVisibleCount()),this.ui.count.setCount(this.ui.list.getCheckedCount()),this._itemActivation){case i.ItemActivation.NONE:this._itemActivation=i.ItemActivation.FIRST;break;case i.ItemActivation.SECOND:this.ui.list.focus(f.QuickInputListFocus.Second),this._itemActivation=i.ItemActivation.FIRST;break;case i.ItemActivation.LAST:this.ui.list.focus(f.QuickInputListFocus.Last),this._itemActivation=i.ItemActivation.FIRST;break;default:this.trySelectFirst();break}this.ui.container.classList.contains("show-checkboxes")!==!!this.canSelectMany&&(this.canSelectMany?this.ui.list.clearFocus():this.trySelectFirst()),this.activeItemsUpdated&&(this.activeItemsUpdated=!1,this.activeItemsToConfirm=this._activeItems,this.ui.list.setFocusedElements(this.activeItems),this.activeItemsToConfirm===this._activeItems&&(this.activeItemsToConfirm=null)),this.selectedItemsUpdated&&(this.selectedItemsUpdated=!1,this.selectedItemsToConfirm=this._selectedItems,this.canSelectMany?this.ui.list.setCheckedElements(this.selectedItems):this.ui.list.setSelectedElements(this.selectedItems),this.selectedItemsToConfirm===this._selectedItems&&(this.selectedItemsToConfirm=null)),this.ui.customButton.label=this.customLabel||"",this.ui.customButton.element.title=this.customHover||"",this.ui.setComboboxAccessibility(!0),P.inputBox||(this.ui.list.domFocus(),this.canSelectMany&&this.ui.list.focus(f.QuickInputListFocus.First)),this.keepScrollPosition&&(this.scrollTop=k)}}m.DEFAULT_ARIA_LABEL=(0,l.localize)(3,null);class E extends d.Disposable{constructor(k){super();this.options=k,this.comboboxAccessibility=!1,this.enabled=!0,this.onDidAcceptEmitter=this._register(new u.Emitter),this.onDidCustomEmitter=this._register(new u.Emitter),this.onDidTriggerButtonEmitter=this._register(new u.Emitter),this.keyMods={ctrlCmd:!1,alt:!1},this.controller=null,this.onShowEmitter=this._register(new u.Emitter),this.onShow=this.onShowEmitter.event,this.onHideEmitter=this._register(new u.Emitter),this.onHide=this.onHideEmitter.event,this.idPrefix=k.idPrefix,this.parentElement=k.container,this.styles=k.styles,this.registerKeyModsListeners()}registerKeyModsListeners(){const k=M=>{this.keyMods.ctrlCmd=M.ctrlKey||M.metaKey,this.keyMods.alt=M.altKey};this._register(w.addDisposableListener(window,w.EventType.KEY_DOWN,k,!0)),this._register(w.addDisposableListener(window,w.EventType.KEY_UP,k,!0)),this._register(w.addDisposableListener(window,w.EventType.MOUSE_DOWN,k,!0))}getUI(){if(this.ui)return this.ui;const k=w.append(this.parentElement,y(".quick-input-widget.show-file-icons"));k.tabIndex=-1,k.style.display="none";const M=w.createStyleSheet(k),P=w.append(k,y(".quick-input-titlebar")),F=this._register(new T.ActionBar(P));F.domNode.classList.add("quick-input-left-action-bar");const R=w.append(P,y(".quick-input-title")),A=this._register(new T.ActionBar(P));A.domNode.classList.add("quick-input-right-action-bar");const O=w.append(k,y(".quick-input-description")),L=w.append(k,y(".quick-input-header")),B=w.append(L,y("input.quick-input-check-all"));B.type="checkbox",this._register(w.addStandardDisposableListener(B,w.EventType.CHANGE,fe=>{const re=B.checked;Q.setAllVisibleChecked(re)})),this._register(w.addDisposableListener(B,w.EventType.CLICK,fe=>{(fe.x||fe.y)&&Y.setFocus()}));const W=w.append(L,y(".quick-input-description")),K=w.append(L,y(".quick-input-and-message")),H=w.append(K,y(".quick-input-filter")),Y=this._register(new h.QuickInputBox(H));Y.setAttribute("aria-describedby",`${this.idPrefix}message`);const X=w.append(H,y(".quick-input-visible-count"));X.setAttribute("aria-live","polite"),X.setAttribute("aria-atomic","true");const Z=new S.CountBadge(X,{countFormat:(0,l.localize)(4,null)}),se=w.append(H,y(".quick-input-count"));se.setAttribute("aria-live","polite");const oe=new S.CountBadge(se,{countFormat:(0,l.localize)(5,null)}),G=w.append(L,y(".quick-input-action")),x=new D.Button(G);x.label=(0,l.localize)(6,null),this._register(x.onDidClick(fe=>{this.onDidAcceptEmitter.fire()}));const U=w.append(L,y(".quick-input-action")),$=new D.Button(U);$.label=(0,l.localize)(7,null),this._register($.onDidClick(fe=>{this.onDidCustomEmitter.fire()}));const V=w.append(K,y(`#${this.idPrefix}message.quick-input-message`)),Q=this._register(new f.QuickInputList(k,this.idPrefix+"list",this.options));this._register(Q.onChangedAllVisibleChecked(fe=>{B.checked=fe})),this._register(Q.onChangedVisibleCount(fe=>{Z.setCount(fe)})),this._register(Q.onChangedCheckedCount(fe=>{oe.setCount(fe)})),this._register(Q.onLeave(()=>{setTimeout(()=>{Y.setFocus(),this.controller instanceof m&&this.controller.canSelectMany&&Q.clearFocus()},0)})),this._register(Q.onDidChangeFocus(()=>{this.comboboxAccessibility&&this.getUI().inputBox.setAttribute("aria-activedescendant",this.getUI().list.getActiveDescendant()||"")}));const ue=new C.ProgressBar(k);ue.getContainer().classList.add("quick-input-progress");const pe=w.trackFocus(k);return this._register(pe),this._register(w.addDisposableListener(k,w.EventType.FOCUS,fe=>{this.previousFocusElement=fe.relatedTarget instanceof HTMLElement?fe.relatedTarget:void 0},!0)),this._register(pe.onDidBlur(()=>{!this.getUI().ignoreFocusOut&&!this.options.ignoreFocusOut()&&this.hide(i.QuickInputHideReason.Blur),this.previousFocusElement=void 0})),this._register(w.addDisposableListener(k,w.EventType.FOCUS,fe=>{Y.setFocus()})),this._register(w.addDisposableListener(k,w.EventType.KEY_DOWN,fe=>{const re=new N.StandardKeyboardEvent(fe);switch(re.keyCode){case 3:w.EventHelper.stop(fe,!0),this.onDidAcceptEmitter.fire();break;case 9:w.EventHelper.stop(fe,!0),this.hide(i.QuickInputHideReason.Gesture);break;case 2:if(!re.altKey&&!re.ctrlKey&&!re.metaKey){const ie=[".action-label.codicon"];k.classList.contains("show-checkboxes")?ie.push("input"):ie.push("input[type=text]"),this.getUI().list.isDisplayed()&&ie.push(".monaco-list");const ae=k.querySelectorAll(ie.join(", "));re.shiftKey&&re.target===ae[0]?(w.EventHelper.stop(fe,!0),ae[ae.length-1].focus()):!re.shiftKey&&re.target===ae[ae.length-1]&&(w.EventHelper.stop(fe,!0),ae[0].focus())}break}})),this.ui={container:k,styleSheet:M,leftActionBar:F,titleBar:P,title:R,description1:O,description2:W,rightActionBar:A,checkAll:B,filterContainer:H,inputBox:Y,visibleCountContainer:X,visibleCount:Z,countContainer:se,count:oe,okContainer:G,ok:x,message:V,customButtonContainer:U,customButton:$,list:Q,progressBar:ue,onDidAccept:this.onDidAcceptEmitter.event,onDidCustom:this.onDidCustomEmitter.event,onDidTriggerButton:this.onDidTriggerButtonEmitter.event,ignoreFocusOut:!1,keyMods:this.keyMods,isScreenReaderOptimized:()=>this.options.isScreenReaderOptimized(),show:fe=>this.show(fe),hide:()=>this.hide(),setVisibilities:fe=>this.setVisibilities(fe),setComboboxAccessibility:fe=>this.setComboboxAccessibility(fe),setEnabled:fe=>this.setEnabled(fe),setContextKey:fe=>this.options.setContextKey(fe)},this.updateStyles(),this.ui}pick(k,M={},P=s.CancellationToken.None){return new Promise((F,R)=>{let A=W=>{A=F,M.onKeyMods&&M.onKeyMods(O.keyMods),F(W)};if(P.isCancellationRequested){A(void 0);return}const O=this.createQuickPick();let L;const B=[O,O.onDidAccept(()=>{if(O.canSelectMany)A(O.selectedItems.slice()),O.hide();else{const W=O.activeItems[0];W&&(A(W),O.hide())}}),O.onDidChangeActive(W=>{const K=W[0];K&&M.onDidFocus&&M.onDidFocus(K)}),O.onDidChangeSelection(W=>{if(!O.canSelectMany){const K=W[0];K&&(A(K),O.hide())}}),O.onDidTriggerItemButton(W=>M.onDidTriggerItemButton&&M.onDidTriggerItemButton(Object.assign(Object.assign({},W),{removeItem:()=>{const K=O.items.indexOf(W.item);if(K!==-1){const H=O.items.slice(),Y=H.splice(K,1),X=O.activeItems.filter(se=>se!==Y[0]),Z=O.keepScrollPosition;O.keepScrollPosition=!0,O.items=H,X&&(O.activeItems=X),O.keepScrollPosition=Z}}}))),O.onDidChangeValue(W=>{L&&!W&&(O.activeItems.length!==1||O.activeItems[0]!==L)&&(O.activeItems=[L])}),P.onCancellationRequested(()=>{O.hide()}),O.onDidHide(()=>{(0,d.dispose)(B),A(void 0)})];O.title=M.title,O.canSelectMany=!!M.canPickMany,O.placeholder=M.placeHolder,O.ignoreFocusOut=!!M.ignoreFocusLost,O.matchOnDescription=!!M.matchOnDescription,O.matchOnDetail=!!M.matchOnDetail,O.matchOnLabel=M.matchOnLabel===void 0||M.matchOnLabel,O.autoFocusOnList=M.autoFocusOnList===void 0||M.autoFocusOnList,O.quickNavigate=M.quickNavigate,O.contextKey=M.contextKey,O.busy=!0,Promise.all([k,M.activeItem]).then(([W,K])=>{L=K,O.busy=!1,O.items=W,O.canSelectMany&&(O.selectedItems=W.filter(H=>H.type!=="separator"&&H.picked)),L&&(O.activeItems=[L])}),O.show(),Promise.resolve(k).then(void 0,W=>{R(W),O.hide()})})}createQuickPick(){const k=this.getUI();return new m(k)}show(k){const M=this.getUI();this.onShowEmitter.fire();const P=this.controller;this.controller=k,P&&P.didHide(),this.setEnabled(!0),M.leftActionBar.clear(),M.title.textContent="",M.description1.textContent="",M.description2.textContent="",M.rightActionBar.clear(),M.checkAll.checked=!1,M.inputBox.placeholder="",M.inputBox.password=!1,M.inputBox.showDecoration(r.default.Ignore),M.visibleCount.setCount(0),M.count.setCount(0),w.reset(M.message),M.progressBar.stop(),M.list.setElements([]),M.list.matchOnDescription=!1,M.list.matchOnDetail=!1,M.list.matchOnLabel=!0,M.list.sortByLabel=!0,M.ignoreFocusOut=!1,this.setComboboxAccessibility(!1),M.inputBox.ariaLabel="";const F=this.options.backKeybindingLabel();b.tooltip=F?(0,l.localize)(8,null,F):(0,l.localize)(9,null),M.container.style.display="",this.updateLayout(),M.inputBox.setFocus()}setVisibilities(k){const M=this.getUI();M.title.style.display=k.title?"":"none",M.description1.style.display=k.description&&(k.inputBox||k.checkAll)?"":"none",M.description2.style.display=k.description&&!(k.inputBox||k.checkAll)?"":"none",M.checkAll.style.display=k.checkAll?"":"none",M.filterContainer.style.display=k.inputBox?"":"none",M.visibleCountContainer.style.display=k.visibleCount?"":"none",M.countContainer.style.display=k.count?"":"none",M.okContainer.style.display=k.ok?"":"none",M.customButtonContainer.style.display=k.customButton?"":"none",M.message.style.display=k.message?"":"none",M.progressBar.getContainer().style.display=k.progressBar?"":"none",M.list.display(!!k.list),M.container.classList[k.checkBox?"add":"remove"]("show-checkboxes"),this.updateLayout()}setComboboxAccessibility(k){if(k!==this.comboboxAccessibility){const M=this.getUI();this.comboboxAccessibility=k,this.comboboxAccessibility?(M.inputBox.setAttribute("role","combobox"),M.inputBox.setAttribute("aria-haspopup","true"),M.inputBox.setAttribute("aria-autocomplete","list"),M.inputBox.setAttribute("aria-activedescendant",M.list.getActiveDescendant()||"")):(M.inputBox.removeAttribute("role"),M.inputBox.removeAttribute("aria-haspopup"),M.inputBox.removeAttribute("aria-autocomplete"),M.inputBox.removeAttribute("aria-activedescendant"))}}setEnabled(k){if(k!==this.enabled){this.enabled=k;for(const M of this.getUI().leftActionBar.viewItems)M.getAction().enabled=k;for(const M of this.getUI().rightActionBar.viewItems)M.getAction().enabled=k;this.getUI().checkAll.disabled=!k,this.getUI().ok.enabled=k,this.getUI().list.enabled=k}}hide(k){var M;const P=this.controller;if(P){const F=!((M=this.ui)===null||M===void 0?void 0:M.container.contains(document.activeElement));this.controller=null,this.onHideEmitter.fire(),this.getUI().container.style.display="none",F||(this.previousFocusElement&&this.previousFocusElement.offsetParent?(this.previousFocusElement.focus(),this.previousFocusElement=void 0):this.options.returnFocus()),P.didHide(k)}}layout(k,M){this.dimension=k,this.titleBarOffset=M,this.updateLayout()}updateLayout(){if(this.ui){this.ui.container.style.top=`${this.titleBarOffset}px`;const k=this.ui.container.style,M=Math.min(this.dimension.width*.62,E.MAX_WIDTH);k.width=M+"px",k.marginLeft="-"+M/2+"px",this.ui.inputBox.layout(),this.ui.list.layout(this.dimension&&this.dimension.height*.4)}}applyStyles(k){this.styles=k,this.updateStyles()}updateStyles(){if(this.ui){const{quickInputTitleBackground:k,quickInputBackground:M,quickInputForeground:P,contrastBorder:F,widgetShadow:R}=this.styles.widget;this.ui.titleBar.style.backgroundColor=k?k.toString():"",this.ui.container.style.backgroundColor=M?M.toString():"",this.ui.container.style.color=P?P.toString():"",this.ui.container.style.border=F?`1px solid ${F}`:"",this.ui.container.style.boxShadow=R?`0 0 8px 2px ${R}`:"",this.ui.inputBox.style(this.styles.inputBox),this.ui.count.style(this.styles.countBadge),this.ui.ok.style(this.styles.button),this.ui.customButton.style(this.styles.button),this.ui.progressBar.style(this.styles.progressBar),this.ui.list.style(this.styles.list);const A=[];this.styles.list.pickerGroupBorder&&A.push(`.quick-input-list .quick-input-list-entry { border-top-color:  ${this.styles.list.pickerGroupBorder}; }`),this.styles.list.pickerGroupForeground&&A.push(`.quick-input-list .quick-input-list-separator { color:  ${this.styles.list.pickerGroupForeground}; }`),(this.styles.keybindingLabel.keybindingLabelBackground||this.styles.keybindingLabel.keybindingLabelBorder||this.styles.keybindingLabel.keybindingLabelBottomBorder||this.styles.keybindingLabel.keybindingLabelShadow||this.styles.keybindingLabel.keybindingLabelForeground)&&(A.push(".quick-input-list .monaco-keybinding > .monaco-keybinding-key {"),this.styles.keybindingLabel.keybindingLabelBackground&&A.push(`background-color: ${this.styles.keybindingLabel.keybindingLabelBackground};`),this.styles.keybindingLabel.keybindingLabelBorder&&A.push(`border-color: ${this.styles.keybindingLabel.keybindingLabelBorder};`),this.styles.keybindingLabel.keybindingLabelBottomBorder&&A.push(`border-bottom-color: ${this.styles.keybindingLabel.keybindingLabelBottomBorder};`),this.styles.keybindingLabel.keybindingLabelShadow&&A.push(`box-shadow: inset 0 -1px 0 ${this.styles.keybindingLabel.keybindingLabelShadow};`),this.styles.keybindingLabel.keybindingLabelForeground&&A.push(`color: ${this.styles.keybindingLabel.keybindingLabelForeground};`),A.push("}"));const O=A.join(`
`);O!==this.ui.styleSheet.textContent&&(this.ui.styleSheet.textContent=O)}}}e.QuickInputController=E,E.MAX_WIDTH=600}),define(J[464],ee([5,6]),function(j,e){return j.create("vs/editor/browser/controller/coreCommands",e)}),define(J[465],ee([5,6]),function(j,e){return j.create("vs/editor/browser/controller/textAreaHandler",e)}),define(J[466],ee([5,6]),function(j,e){return j.create("vs/editor/browser/core/keybindingCancellation",e)}),define(J[467],ee([5,6]),function(j,e){return j.create("vs/editor/browser/editorExtensions",e)}),define(J[468],ee([5,6]),function(j,e){return j.create("vs/editor/browser/widget/codeEditorWidget",e)}),define(J[469],ee([5,6]),function(j,e){return j.create("vs/editor/browser/widget/diffEditorWidget",e)}),define(J[470],ee([5,6]),function(j,e){return j.create("vs/editor/browser/widget/diffReview",e)}),define(J[471],ee([5,6]),function(j,e){return j.create("vs/editor/browser/widget/inlineDiffMargin",e)}),define(J[472],ee([0,1,471,7,51,2,3,27]),function(j,e,w,N,T,D,S,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.InlineDiffMargin=void 0;class C extends D.Disposable{constructor(g,t,s,c,u,d){super();this._viewZoneId=g,this._marginDomNode=t,this.editor=s,this.diff=c,this._contextMenuService=u,this._clipboardService=d,this._visibility=!1,this._marginDomNode.style.zIndex="10",this._diffActions=document.createElement("div"),this._diffActions.className=p.Codicon.lightBulb.classNames+" lightbulb-glyph",this._diffActions.style.position="absolute";const a=s.getOption(58),r=s.getModel().getEOL();this._diffActions.style.right="0px",this._diffActions.style.visibility="hidden",this._diffActions.style.height=`${a}px`,this._diffActions.style.lineHeight=`${a}px`,this._marginDomNode.appendChild(this._diffActions);const o=[],i=c.modifiedEndLineNumber===0;o.push(new T.Action("diff.clipboard.copyDeletedContent",i?c.originalEndLineNumber>c.modifiedStartLineNumber?w.localize(0,null):w.localize(1,null):c.originalEndLineNumber>c.modifiedStartLineNumber?w.localize(2,null):w.localize(3,null),void 0,!0,()=>Re(this,void 0,void 0,function*(){const _=new S.Range(c.originalStartLineNumber,1,c.originalEndLineNumber+1,1),b=c.originalModel.getValueInRange(_);yield this._clipboardService.writeText(b)})));let l=0,h;c.originalEndLineNumber>c.modifiedStartLineNumber&&(h=new T.Action("diff.clipboard.copyDeletedLineContent",i?w.localize(4,null,c.originalStartLineNumber):w.localize(5,null,c.originalStartLineNumber),void 0,!0,()=>Re(this,void 0,void 0,function*(){const _=c.originalModel.getLineContent(c.originalStartLineNumber+l);if(_===""){const b=c.originalModel.getEndOfLineSequence();yield this._clipboardService.writeText(b===0?`
`:`\r
`)}else yield this._clipboardService.writeText(_)})),o.push(h)),s.getOption(80)||o.push(new T.Action("diff.inline.revertChange",w.localize(6,null),void 0,!0,()=>Re(this,void 0,void 0,function*(){const _=new S.Range(c.originalStartLineNumber,1,c.originalEndLineNumber,c.originalModel.getLineMaxColumn(c.originalEndLineNumber)),b=c.originalModel.getValueInRange(_);if(c.modifiedEndLineNumber===0){const v=s.getModel().getLineMaxColumn(c.modifiedStartLineNumber);s.executeEdits("diffEditor",[{range:new S.Range(c.modifiedStartLineNumber,v,c.modifiedStartLineNumber,v),text:r+b}])}else{const v=s.getModel().getLineMaxColumn(c.modifiedEndLineNumber);s.executeEdits("diffEditor",[{range:new S.Range(c.modifiedStartLineNumber,1,c.modifiedEndLineNumber,v),text:b}])}})));const y=(_,b)=>{this._contextMenuService.showContextMenu({getAnchor:()=>({x:_,y:b}),getActions:()=>(h&&(h.label=i?w.localize(7,null,c.originalStartLineNumber+l):w.localize(8,null,c.originalStartLineNumber+l)),o),autoSelectFirstItem:!0})};this._register(N.addStandardDisposableListener(this._diffActions,"mousedown",_=>{const{top:b,height:v}=N.getDomNodePagePosition(this._diffActions);let m=Math.floor(a/3);_.preventDefault(),y(_.posx,b+v+m)})),this._register(s.onMouseMove(_=>{_.target.type===8||_.target.type===5?_.target.detail.viewZoneId===this._viewZoneId?(this.visibility=!0,l=this._updateLightBulbPosition(this._marginDomNode,_.event.browserEvent.y,a)):this.visibility=!1:this.visibility=!1})),this._register(s.onMouseDown(_=>{!_.event.rightButton||(_.target.type===8||_.target.type===5)&&_.target.detail.viewZoneId===this._viewZoneId&&(_.event.preventDefault(),l=this._updateLightBulbPosition(this._marginDomNode,_.event.browserEvent.y,a),y(_.event.posx,_.event.posy+a))}))}get visibility(){return this._visibility}set visibility(g){this._visibility!==g&&(this._visibility=g,g?this._diffActions.style.visibility="visible":this._diffActions.style.visibility="hidden")}_updateLightBulbPosition(g,t,s){const{top:c}=N.getDomNodePagePosition(g),u=t-c,d=Math.floor(u/s),a=d*s;if(this._diffActions.style.top=`${a}px`,this.diff.viewLineCounts){let r=0;for(let o=0;o<this.diff.viewLineCounts.length;o++)if(r+=this.diff.viewLineCounts[o],d<r)return o}return d}}e.InlineDiffMargin=C}),define(J[473],ee([5,6]),function(j,e){return j.create("vs/editor/common/config/commonEditorConfig",e)}),define(J[474],ee([5,6]),function(j,e){return j.create("vs/editor/common/config/editorOptions",e)}),define(J[31],ee([0,1,474,17,143]),function(j,e,w,N,T){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EditorOptions=e.editorOptionsRegistry=e.EDITOR_MODEL_DEFAULTS=e.EDITOR_FONT_DEFAULTS=e.filterValidationDecorations=e.EditorLayoutInfoComputer=e.EditorFontLigatures=e.TextEditorCursorStyle=e.stringSet=e.clampedInt=e.boolean=e.ComputeOptionsMemory=e.ValidatedEditorOptions=e.ConfigurationChangedEvent=e.MINIMAP_GUTTER_WIDTH=void 0,e.MINIMAP_GUTTER_WIDTH=8;class D{constructor(z){this._values=z}hasChanged(z){return this._values[z]}}e.ConfigurationChangedEvent=D;class S{constructor(){this._values=[]}_read(z){return this._values[z]}get(z){return this._values[z]}_write(z,te){this._values[z]=te}}e.ValidatedEditorOptions=S;class p{constructor(){this.stableMinimapLayoutInput=null,this.stableFitMaxMinimapScale=0,this.stableFitRemainingWidth=0}}e.ComputeOptionsMemory=p;class C{constructor(z,te,he,ge){this.id=z,this.name=te,this.defaultValue=he,this.schema=ge}compute(z,te,he){return he}}class n{constructor(z,te=null){this.schema=void 0,this.id=z,this.name="_never_",this.defaultValue=void 0,this.deps=te}validate(z){return this.defaultValue}}class g{constructor(z,te,he,ge){this.id=z,this.name=te,this.defaultValue=he,this.schema=ge}validate(z){return typeof z=="undefined"?this.defaultValue:z}compute(z,te,he){return he}}function t(de,z){return typeof de=="undefined"?z:de==="false"?!1:Boolean(de)}e.boolean=t;class s extends g{constructor(z,te,he,ge=void 0){typeof ge!="undefined"&&(ge.type="boolean",ge.default=he),super(z,te,he,ge)}validate(z){return t(z,this.defaultValue)}}function c(de,z,te,he){if(typeof de=="undefined")return z;let ge=parseInt(de,10);return isNaN(ge)?z:(ge=Math.max(te,ge),ge=Math.min(he,ge),ge|0)}e.clampedInt=c;class u extends g{constructor(z,te,he,ge,ve,Se=void 0){typeof Se!="undefined"&&(Se.type="integer",Se.default=he,Se.minimum=ge,Se.maximum=ve),super(z,te,he,Se),this.minimum=ge,this.maximum=ve}static clampedInt(z,te,he,ge){return c(z,te,he,ge)}validate(z){return u.clampedInt(z,this.defaultValue,this.minimum,this.maximum)}}class d extends g{constructor(z,te,he,ge,ve){typeof ve!="undefined"&&(ve.type="number",ve.default=he),super(z,te,he,ve),this.validationFn=ge}static clamp(z,te,he){return z<te?te:z>he?he:z}static float(z,te){if(typeof z=="number")return z;if(typeof z=="undefined")return te;const he=parseFloat(z);return isNaN(he)?te:he}validate(z){return this.validationFn(d.float(z,this.defaultValue))}}class a extends g{static string(z,te){return typeof z!="string"?te:z}constructor(z,te,he,ge=void 0){typeof ge!="undefined"&&(ge.type="string",ge.default=he),super(z,te,he,ge)}validate(z){return a.string(z,this.defaultValue)}}function r(de,z,te){return typeof de!="string"||te.indexOf(de)===-1?z:de}e.stringSet=r;class o extends g{constructor(z,te,he,ge,ve=void 0){typeof ve!="undefined"&&(ve.type="string",ve.enum=ge,ve.default=he),super(z,te,he,ve),this._allowedValues=ge}validate(z){return r(z,this.defaultValue,this._allowedValues)}}class i extends C{constructor(z,te,he,ge,ve,Se,Ee=void 0){typeof Ee!="undefined"&&(Ee.type="string",Ee.enum=ve,Ee.default=ge),super(z,te,he,Ee),this._allowedValues=ve,this._convert=Se}validate(z){return typeof z!="string"?this.defaultValue:this._allowedValues.indexOf(z)===-1?this.defaultValue:this._convert(z)}}function l(de){switch(de){case"none":return 0;case"keep":return 1;case"brackets":return 2;case"advanced":return 3;case"full":return 4}}class h extends C{constructor(){super(2,"accessibilitySupport",0,{type:"string",enum:["auto","on","off"],enumDescriptions:[w.localize(0,null),w.localize(1,null),w.localize(2,null)],default:"auto",description:w.localize(3,null)})}validate(z){switch(z){case"auto":return 0;case"off":return 1;case"on":return 2}return this.defaultValue}compute(z,te,he){return he===0?z.accessibilitySupport:he}}class f extends C{constructor(){const z={insertSpace:!0,ignoreEmptyLines:!0};super(19,"comments",z,{"editor.comments.insertSpace":{type:"boolean",default:z.insertSpace,description:w.localize(4,null)},"editor.comments.ignoreEmptyLines":{type:"boolean",default:z.ignoreEmptyLines,description:w.localize(5,null)}})}validate(z){if(!z||typeof z!="object")return this.defaultValue;const te=z;return{insertSpace:t(te.insertSpace,this.defaultValue.insertSpace),ignoreEmptyLines:t(te.ignoreEmptyLines,this.defaultValue.ignoreEmptyLines)}}}function y(de){switch(de){case"blink":return 1;case"smooth":return 2;case"phase":return 3;case"expand":return 4;case"solid":return 5}}var _;(function(de){de[de.Line=1]="Line",de[de.Block=2]="Block",de[de.Underline=3]="Underline",de[de.LineThin=4]="LineThin",de[de.BlockOutline=5]="BlockOutline",de[de.UnderlineThin=6]="UnderlineThin"})(_=e.TextEditorCursorStyle||(e.TextEditorCursorStyle={}));function b(de){switch(de){case"line":return _.Line;case"block":return _.Block;case"underline":return _.Underline;case"line-thin":return _.LineThin;case"block-outline":return _.BlockOutline;case"underline-thin":return _.UnderlineThin}}class v extends n{constructor(){super(126,[65,33])}compute(z,te,he){const ge=["monaco-editor"];return te.get(33)&&ge.push(te.get(33)),z.extraEditorClassName&&ge.push(z.extraEditorClassName),te.get(65)==="default"?ge.push("mouse-default"):te.get(65)==="copy"&&ge.push("mouse-copy"),te.get(99)&&ge.push("showUnused"),te.get(124)&&ge.push("showDeprecated"),ge.join(" ")}}class m extends s{constructor(){super(32,"emptySelectionClipboard",!0,{description:w.localize(6,null)})}compute(z,te,he){return he&&z.emptySelectionClipboard}}class E extends C{constructor(){const z={cursorMoveOnType:!0,seedSearchStringFromSelection:"always",autoFindInSelection:"never",globalFindClipboard:!1,addExtraSpaceOnTop:!0,loop:!0};super(35,"find",z,{"editor.find.cursorMoveOnType":{type:"boolean",default:z.cursorMoveOnType,description:w.localize(7,null)},"editor.find.seedSearchStringFromSelection":{type:"string",enum:["never","always","selection"],default:z.seedSearchStringFromSelection,enumDescriptions:[w.localize(8,null),w.localize(9,null),w.localize(10,null)],description:w.localize(11,null)},"editor.find.autoFindInSelection":{type:"string",enum:["never","always","multiline"],default:z.autoFindInSelection,enumDescriptions:[w.localize(12,null),w.localize(13,null),w.localize(14,null)],description:w.localize(15,null)},"editor.find.globalFindClipboard":{type:"boolean",default:z.globalFindClipboard,description:w.localize(16,null),included:N.isMacintosh},"editor.find.addExtraSpaceOnTop":{type:"boolean",default:z.addExtraSpaceOnTop,description:w.localize(17,null)},"editor.find.loop":{type:"boolean",default:z.loop,description:w.localize(18,null)}})}validate(z){if(!z||typeof z!="object")return this.defaultValue;const te=z;return{cursorMoveOnType:t(te.cursorMoveOnType,this.defaultValue.cursorMoveOnType),seedSearchStringFromSelection:typeof z.seedSearchStringFromSelection=="boolean"?z.seedSearchStringFromSelection?"always":"never":r(te.seedSearchStringFromSelection,this.defaultValue.seedSearchStringFromSelection,["never","always","selection"]),autoFindInSelection:typeof z.autoFindInSelection=="boolean"?z.autoFindInSelection?"always":"never":r(te.autoFindInSelection,this.defaultValue.autoFindInSelection,["never","always","multiline"]),globalFindClipboard:t(te.globalFindClipboard,this.defaultValue.globalFindClipboard),addExtraSpaceOnTop:t(te.addExtraSpaceOnTop,this.defaultValue.addExtraSpaceOnTop),loop:t(te.loop,this.defaultValue.loop)}}}class I extends C{constructor(){super(44,"fontLigatures",I.OFF,{anyOf:[{type:"boolean",description:w.localize(19,null)},{type:"string",description:w.localize(20,null)}],description:w.localize(21,null),default:!1})}validate(z){return typeof z=="undefined"?this.defaultValue:typeof z=="string"?z==="false"?I.OFF:z==="true"?I.ON:z:Boolean(z)?I.ON:I.OFF}}e.EditorFontLigatures=I,I.OFF='"liga" off, "calt" off',I.ON='"liga" on, "calt" on';class k extends n{constructor(){super(43)}compute(z,te,he){return z.fontInfo}}class M extends g{constructor(){super(45,"fontSize",e.EDITOR_FONT_DEFAULTS.fontSize,{type:"number",minimum:6,maximum:100,default:e.EDITOR_FONT_DEFAULTS.fontSize,description:w.localize(22,null)})}validate(z){let te=d.float(z,this.defaultValue);return te===0?e.EDITOR_FONT_DEFAULTS.fontSize:d.clamp(te,6,100)}compute(z,te,he){return z.fontInfo.fontSize}}class P extends C{constructor(){super(46,"fontWeight",e.EDITOR_FONT_DEFAULTS.fontWeight,{anyOf:[{type:"number",minimum:P.MINIMUM_VALUE,maximum:P.MAXIMUM_VALUE,errorMessage:w.localize(23,null)},{type:"string",pattern:"^(normal|bold|1000|[1-9][0-9]{0,2})$"},{enum:P.SUGGESTION_VALUES}],default:e.EDITOR_FONT_DEFAULTS.fontWeight,description:w.localize(24,null)})}validate(z){return z==="normal"||z==="bold"?z:String(u.clampedInt(z,e.EDITOR_FONT_DEFAULTS.fontWeight,P.MINIMUM_VALUE,P.MAXIMUM_VALUE))}}P.SUGGESTION_VALUES=["normal","bold","100","200","300","400","500","600","700","800","900"],P.MINIMUM_VALUE=1,P.MAXIMUM_VALUE=1e3;class F extends C{constructor(){const z={multiple:"peek",multipleDefinitions:"peek",multipleTypeDefinitions:"peek",multipleDeclarations:"peek",multipleImplementations:"peek",multipleReferences:"peek",alternativeDefinitionCommand:"editor.action.goToReferences",alternativeTypeDefinitionCommand:"editor.action.goToReferences",alternativeDeclarationCommand:"editor.action.goToReferences",alternativeImplementationCommand:"",alternativeReferenceCommand:""},te={type:"string",enum:["peek","gotoAndPeek","goto"],default:z.multiple,enumDescriptions:[w.localize(25,null),w.localize(26,null),w.localize(27,null)]},he=["","editor.action.referenceSearch.trigger","editor.action.goToReferences","editor.action.peekImplementation","editor.action.goToImplementation","editor.action.peekTypeDefinition","editor.action.goToTypeDefinition","editor.action.peekDeclaration","editor.action.revealDeclaration","editor.action.peekDefinition","editor.action.revealDefinitionAside","editor.action.revealDefinition"];super(50,"gotoLocation",z,{"editor.gotoLocation.multiple":{deprecationMessage:w.localize(28,null)},"editor.gotoLocation.multipleDefinitions":Object.assign({description:w.localize(29,null)},te),"editor.gotoLocation.multipleTypeDefinitions":Object.assign({description:w.localize(30,null)},te),"editor.gotoLocation.multipleDeclarations":Object.assign({description:w.localize(31,null)},te),"editor.gotoLocation.multipleImplementations":Object.assign({description:w.localize(32,null)},te),"editor.gotoLocation.multipleReferences":Object.assign({description:w.localize(33,null)},te),"editor.gotoLocation.alternativeDefinitionCommand":{type:"string",default:z.alternativeDefinitionCommand,enum:he,description:w.localize(34,null)},"editor.gotoLocation.alternativeTypeDefinitionCommand":{type:"string",default:z.alternativeTypeDefinitionCommand,enum:he,description:w.localize(35,null)},"editor.gotoLocation.alternativeDeclarationCommand":{type:"string",default:z.alternativeDeclarationCommand,enum:he,description:w.localize(36,null)},"editor.gotoLocation.alternativeImplementationCommand":{type:"string",default:z.alternativeImplementationCommand,enum:he,description:w.localize(37,null)},"editor.gotoLocation.alternativeReferenceCommand":{type:"string",default:z.alternativeReferenceCommand,enum:he,description:w.localize(38,null)}})}validate(z){var te,he,ge,ve,Se;if(!z||typeof z!="object")return this.defaultValue;const Ee=z;return{multiple:r(Ee.multiple,this.defaultValue.multiple,["peek","gotoAndPeek","goto"]),multipleDefinitions:(te=Ee.multipleDefinitions)!==null&&te!==void 0?te:r(Ee.multipleDefinitions,"peek",["peek","gotoAndPeek","goto"]),multipleTypeDefinitions:(he=Ee.multipleTypeDefinitions)!==null&&he!==void 0?he:r(Ee.multipleTypeDefinitions,"peek",["peek","gotoAndPeek","goto"]),multipleDeclarations:(ge=Ee.multipleDeclarations)!==null&&ge!==void 0?ge:r(Ee.multipleDeclarations,"peek",["peek","gotoAndPeek","goto"]),multipleImplementations:(ve=Ee.multipleImplementations)!==null&&ve!==void 0?ve:r(Ee.multipleImplementations,"peek",["peek","gotoAndPeek","goto"]),multipleReferences:(Se=Ee.multipleReferences)!==null&&Se!==void 0?Se:r(Ee.multipleReferences,"peek",["peek","gotoAndPeek","goto"]),alternativeDefinitionCommand:a.string(Ee.alternativeDefinitionCommand,this.defaultValue.alternativeDefinitionCommand),alternativeTypeDefinitionCommand:a.string(Ee.alternativeTypeDefinitionCommand,this.defaultValue.alternativeTypeDefinitionCommand),alternativeDeclarationCommand:a.string(Ee.alternativeDeclarationCommand,this.defaultValue.alternativeDeclarationCommand),alternativeImplementationCommand:a.string(Ee.alternativeImplementationCommand,this.defaultValue.alternativeImplementationCommand),alternativeReferenceCommand:a.string(Ee.alternativeReferenceCommand,this.defaultValue.alternativeReferenceCommand)}}}class R extends C{constructor(){const z={enabled:!0,delay:300,sticky:!0,above:!0};super(52,"hover",z,{"editor.hover.enabled":{type:"boolean",default:z.enabled,description:w.localize(39,null)},"editor.hover.delay":{type:"number",default:z.delay,description:w.localize(40,null)},"editor.hover.sticky":{type:"boolean",default:z.sticky,description:w.localize(41,null)},"editor.hover.above":{type:"boolean",default:z.above,description:w.localize(42,null)}})}validate(z){if(!z||typeof z!="object")return this.defaultValue;const te=z;return{enabled:t(te.enabled,this.defaultValue.enabled),delay:u.clampedInt(te.delay,this.defaultValue.delay,0,1e4),sticky:t(te.sticky,this.defaultValue.sticky),above:t(te.above,this.defaultValue.above)}}}class A extends n{constructor(){super(129,[49,57,37,64,91,59,60,93,116,119,120,121,2])}compute(z,te,he){return A.computeLayout(te,{memory:z.memory,outerWidth:z.outerWidth,outerHeight:z.outerHeight,isDominatedByLongLines:z.isDominatedByLongLines,lineHeight:z.fontInfo.lineHeight,viewLineCount:z.viewLineCount,lineNumbersDigitCount:z.lineNumbersDigitCount,typicalHalfwidthCharacterWidth:z.fontInfo.typicalHalfwidthCharacterWidth,maxDigitWidth:z.fontInfo.maxDigitWidth,pixelRatio:z.pixelRatio})}static computeContainedMinimapLineCount(z){const te=z.height/z.lineHeight,he=z.scrollBeyondLastLine?te-1:0,ge=(z.viewLineCount+he)/(z.pixelRatio*z.height),ve=Math.floor(z.viewLineCount/ge);return{typicalViewportLineCount:te,extraLinesBeyondLastLine:he,desiredRatio:ge,minimapLineCount:ve}}static _computeMinimapLayout(z,te){const he=z.outerWidth,ge=z.outerHeight,ve=z.pixelRatio;if(!z.minimap.enabled)return{renderMinimap:0,minimapLeft:0,minimapWidth:0,minimapHeightIsEditorHeight:!1,minimapIsSampling:!1,minimapScale:1,minimapLineHeight:1,minimapCanvasInnerWidth:0,minimapCanvasInnerHeight:Math.floor(ve*ge),minimapCanvasOuterWidth:0,minimapCanvasOuterHeight:ge};const Se=te.stableMinimapLayoutInput,Ee=Se&&z.outerHeight===Se.outerHeight&&z.lineHeight===Se.lineHeight&&z.typicalHalfwidthCharacterWidth===Se.typicalHalfwidthCharacterWidth&&z.pixelRatio===Se.pixelRatio&&z.scrollBeyondLastLine===Se.scrollBeyondLastLine&&z.minimap.enabled===Se.minimap.enabled&&z.minimap.side===Se.minimap.side&&z.minimap.size===Se.minimap.size&&z.minimap.showSlider===Se.minimap.showSlider&&z.minimap.renderCharacters===Se.minimap.renderCharacters&&z.minimap.maxColumn===Se.minimap.maxColumn&&z.minimap.scale===Se.minimap.scale&&z.verticalScrollbarWidth===Se.verticalScrollbarWidth&&z.isViewportWrapping===Se.isViewportWrapping,Ae=z.lineHeight,Ne=z.typicalHalfwidthCharacterWidth,ze=z.scrollBeyondLastLine,xe=z.minimap.renderCharacters;let We=ve>=2?Math.round(z.minimap.scale*2):z.minimap.scale;const Ue=z.minimap.maxColumn,Le=z.minimap.size,ye=z.minimap.side,Oe=z.verticalScrollbarWidth,He=z.viewLineCount,Be=z.remainingWidth,Ke=z.isViewportWrapping,ke=xe?2:3;let Ie=Math.floor(ve*ge);const Me=Ie/ve;let me=!1,be=!1,De=ke*We,we=We/ve,_e=1;if(Le==="fill"||Le==="fit"){const{typicalViewportLineCount:Ze,extraLinesBeyondLastLine:$e,desiredRatio:Je,minimapLineCount:Ye}=A.computeContainedMinimapLineCount({viewLineCount:He,scrollBeyondLastLine:ze,height:ge,lineHeight:Ae,pixelRatio:ve});if(He/Ye>1)me=!0,be=!0,We=1,De=1,we=We/ve;else{let it=!1,Qe=We+1;if(Le==="fit"){const rt=Math.ceil((He+$e)*De);Ke&&Ee&&Be<=te.stableFitRemainingWidth?(it=!0,Qe=te.stableFitMaxMinimapScale):it=rt>Ie}if(Le==="fill"||it){me=!0;const rt=We;De=Math.min(Ae*ve,Math.max(1,Math.floor(1/Je))),Ke&&Ee&&Be<=te.stableFitRemainingWidth&&(Qe=te.stableFitMaxMinimapScale),We=Math.min(Qe,Math.max(1,Math.floor(De/ke))),We>rt&&(_e=Math.min(2,We/rt)),we=We/ve/_e,Ie=Math.ceil(Math.max(Ze,He+$e)*De),Ke?(te.stableMinimapLayoutInput=z,te.stableFitRemainingWidth=Be,te.stableFitMaxMinimapScale=We):(te.stableMinimapLayoutInput=null,te.stableFitRemainingWidth=0)}}}const Pe=Math.floor(Ue*we),Te=Math.min(Pe,Math.max(0,Math.floor((Be-Oe-2)*we/(Ne+we)))+e.MINIMAP_GUTTER_WIDTH);let Ve=Math.floor(ve*Te);const je=Ve/ve;Ve=Math.floor(Ve*_e);const qe=xe?1:2,Ge=ye==="left"?0:he-Te-Oe;return{renderMinimap:qe,minimapLeft:Ge,minimapWidth:Te,minimapHeightIsEditorHeight:me,minimapIsSampling:be,minimapScale:We,minimapLineHeight:De,minimapCanvasInnerWidth:Ve,minimapCanvasInnerHeight:Ie,minimapCanvasOuterWidth:je,minimapCanvasOuterHeight:Me}}static computeLayout(z,te){const he=te.outerWidth|0,ge=te.outerHeight|0,ve=te.lineHeight|0,Se=te.lineNumbersDigitCount|0,Ee=te.typicalHalfwidthCharacterWidth,Ae=te.maxDigitWidth,Ne=te.pixelRatio,ze=te.viewLineCount,xe=z.get(121),We=xe==="inherit"?z.get(120):xe,Ue=We==="inherit"?z.get(116):We,Le=z.get(119),ye=z.get(2),Oe=te.isDominatedByLongLines,He=z.get(49),Be=z.get(59).renderType!==0,Ke=z.get(60),ke=z.get(93),Ie=z.get(64),Me=z.get(91),me=Me.verticalScrollbarSize,be=Me.verticalHasArrows,De=Me.arrowSize,we=Me.horizontalScrollbarSize,_e=z.get(57),Pe=z.get(37);let Te;if(typeof _e=="string"&&/^\d+(\.\d+)?ch$/.test(_e)){const pt=parseFloat(_e.substr(0,_e.length-2));Te=u.clampedInt(pt*Ee,0,0,1e3)}else Te=u.clampedInt(_e,0,0,1e3);Pe&&(Te+=16);let Ve=0;if(Be){const pt=Math.max(Se,Ke);Ve=Math.round(pt*Ae)}let je=0;He&&(je=ve);let qe=0,Ge=qe+je,Ze=Ge+Ve,$e=Ze+Te;const Je=he-je-Ve-Te;let Ye=!1,et=!1,it=-1;ye!==2&&(We==="inherit"&&Oe?(Ye=!0,et=!0):Ue==="on"||Ue==="bounded"?et=!0:Ue==="wordWrapColumn"&&(it=Le));const Qe=A._computeMinimapLayout({outerWidth:he,outerHeight:ge,lineHeight:ve,typicalHalfwidthCharacterWidth:Ee,pixelRatio:Ne,scrollBeyondLastLine:ke,minimap:Ie,verticalScrollbarWidth:me,viewLineCount:ze,remainingWidth:Je,isViewportWrapping:et},te.memory||new p);Qe.renderMinimap!==0&&Qe.minimapLeft===0&&(qe+=Qe.minimapWidth,Ge+=Qe.minimapWidth,Ze+=Qe.minimapWidth,$e+=Qe.minimapWidth);const rt=Je-Qe.minimapWidth,mt=Math.max(1,Math.floor((rt-me-2)/Ee)),ht=be?De:0;return et&&(it=Math.max(1,mt),Ue==="bounded"&&(it=Math.min(it,Le))),{width:he,height:ge,glyphMarginLeft:qe,glyphMarginWidth:je,lineNumbersLeft:Ge,lineNumbersWidth:Ve,decorationsLeft:Ze,decorationsWidth:Te,contentLeft:$e,contentWidth:rt,minimap:Qe,viewportColumn:mt,isWordWrapMinified:Ye,isViewportWrapping:et,wrappingColumn:it,verticalScrollbarWidth:me,horizontalScrollbarHeight:we,overviewRuler:{top:ht,width:me,height:ge-2*ht,right:0}}}}e.EditorLayoutInfoComputer=A;class O extends C{constructor(){const z={enabled:!0};super(56,"lightbulb",z,{"editor.lightbulb.enabled":{type:"boolean",default:z.enabled,description:w.localize(43,null)}})}validate(z){return!z||typeof z!="object"?this.defaultValue:{enabled:t(z.enabled,this.defaultValue.enabled)}}}class L extends C{constructor(){const z={enabled:!0,fontSize:0,fontFamily:""};super(125,"inlayHints",z,{"editor.inlayHints.enabled":{type:"boolean",default:z.enabled,description:w.localize(44,null)},"editor.inlayHints.fontSize":{type:"number",default:z.fontSize,markdownDescription:w.localize(45,null)},"editor.inlayHints.fontFamily":{type:"string",default:z.fontFamily,markdownDescription:w.localize(46,null)}})}validate(z){if(!z||typeof z!="object")return this.defaultValue;const te=z;return{enabled:t(te.enabled,this.defaultValue.enabled),fontSize:u.clampedInt(te.fontSize,this.defaultValue.fontSize,0,100),fontFamily:a.string(te.fontFamily,this.defaultValue.fontFamily)}}}class B extends d{constructor(){super(58,"lineHeight",e.EDITOR_FONT_DEFAULTS.lineHeight,z=>d.clamp(z,0,150),{markdownDescription:w.localize(47,null)})}compute(z,te,he){return z.fontInfo.lineHeight}}class W extends C{constructor(){const z={enabled:!0,size:"proportional",side:"right",showSlider:"mouseover",renderCharacters:!0,maxColumn:120,scale:1};super(64,"minimap",z,{"editor.minimap.enabled":{type:"boolean",default:z.enabled,description:w.localize(48,null)},"editor.minimap.size":{type:"string",enum:["proportional","fill","fit"],enumDescriptions:[w.localize(49,null),w.localize(50,null),w.localize(51,null)],default:z.size,description:w.localize(52,null)},"editor.minimap.side":{type:"string",enum:["left","right"],default:z.side,description:w.localize(53,null)},"editor.minimap.showSlider":{type:"string",enum:["always","mouseover"],default:z.showSlider,description:w.localize(54,null)},"editor.minimap.scale":{type:"number",default:z.scale,minimum:1,maximum:3,enum:[1,2,3],description:w.localize(55,null)},"editor.minimap.renderCharacters":{type:"boolean",default:z.renderCharacters,description:w.localize(56,null)},"editor.minimap.maxColumn":{type:"number",default:z.maxColumn,description:w.localize(57,null)}})}validate(z){if(!z||typeof z!="object")return this.defaultValue;const te=z;return{enabled:t(te.enabled,this.defaultValue.enabled),size:r(te.size,this.defaultValue.size,["proportional","fill","fit"]),side:r(te.side,this.defaultValue.side,["right","left"]),showSlider:r(te.showSlider,this.defaultValue.showSlider,["always","mouseover"]),renderCharacters:t(te.renderCharacters,this.defaultValue.renderCharacters),scale:u.clampedInt(te.scale,1,1,3),maxColumn:u.clampedInt(te.maxColumn,this.defaultValue.maxColumn,1,1e4)}}}function K(de){return de==="ctrlCmd"?N.isMacintosh?"metaKey":"ctrlKey":"altKey"}class H extends C{constructor(){super(74,"padding",{top:0,bottom:0},{"editor.padding.top":{type:"number",default:0,minimum:0,maximum:1e3,description:w.localize(58,null)},"editor.padding.bottom":{type:"number",default:0,minimum:0,maximum:1e3,description:w.localize(59,null)}})}validate(z){if(!z||typeof z!="object")return this.defaultValue;const te=z;return{top:u.clampedInt(te.top,0,0,1e3),bottom:u.clampedInt(te.bottom,0,0,1e3)}}}class Y extends C{constructor(){const z={enabled:!0,cycle:!1};super(75,"parameterHints",z,{"editor.parameterHints.enabled":{type:"boolean",default:z.enabled,description:w.localize(60,null)},"editor.parameterHints.cycle":{type:"boolean",default:z.cycle,description:w.localize(61,null)}})}validate(z){if(!z||typeof z!="object")return this.defaultValue;const te=z;return{enabled:t(te.enabled,this.defaultValue.enabled),cycle:t(te.cycle,this.defaultValue.cycle)}}}class X extends n{constructor(){super(127)}compute(z,te,he){return z.pixelRatio}}class Z extends C{constructor(){const z={other:!0,comments:!1,strings:!1};super(78,"quickSuggestions",z,{anyOf:[{type:"boolean"},{type:"object",properties:{strings:{type:"boolean",default:z.strings,description:w.localize(62,null)},comments:{type:"boolean",default:z.comments,description:w.localize(63,null)},other:{type:"boolean",default:z.other,description:w.localize(64,null)}}}],default:z,description:w.localize(65,null)});this.defaultValue=z}validate(z){if(typeof z=="boolean")return z;if(z&&typeof z=="object"){const te=z,he={other:t(te.other,this.defaultValue.other),comments:t(te.comments,this.defaultValue.comments),strings:t(te.strings,this.defaultValue.strings)};return he.other&&he.comments&&he.strings?!0:!he.other&&!he.comments&&!he.strings?!1:he}return this.defaultValue}}class se extends C{constructor(){super(59,"lineNumbers",{renderType:1,renderFn:null},{type:"string",enum:["off","on","relative","interval"],enumDescriptions:[w.localize(66,null),w.localize(67,null),w.localize(68,null),w.localize(69,null)],default:"on",description:w.localize(70,null)})}validate(z){let te=this.defaultValue.renderType,he=this.defaultValue.renderFn;return typeof z!="undefined"&&(typeof z=="function"?(te=4,he=z):z==="interval"?te=3:z==="relative"?te=2:z==="on"?te=1:te=0),{renderType:te,renderFn:he}}}function oe(de){const z=de.get(86);return z==="editable"?de.get(80):z!=="on"}e.filterValidationDecorations=oe;class G extends C{constructor(){const z=[],te={type:"number",description:w.localize(71,null)};super(90,"rulers",z,{type:"array",items:{anyOf:[te,{type:["object"],properties:{column:te,color:{type:"string",description:w.localize(72,null),format:"color-hex"}}}]},default:z,description:w.localize(73,null)})}validate(z){if(Array.isArray(z)){let te=[];for(let he of z)if(typeof he=="number")te.push({column:u.clampedInt(he,0,0,1e4),color:null});else if(he&&typeof he=="object"){const ge=he;te.push({column:u.clampedInt(ge.column,0,0,1e4),color:ge.color})}return te.sort((he,ge)=>he.column-ge.column),te}return this.defaultValue}}function x(de,z){if(typeof de!="string")return z;switch(de){case"hidden":return 2;case"visible":return 3;default:return 1}}class U extends C{constructor(){const z={vertical:1,horizontal:1,arrowSize:11,useShadows:!0,verticalHasArrows:!1,horizontalHasArrows:!1,horizontalScrollbarSize:12,horizontalSliderSize:12,verticalScrollbarSize:14,verticalSliderSize:14,handleMouseWheel:!0,alwaysConsumeMouseWheel:!0,scrollByPage:!1};super(91,"scrollbar",z,{"editor.scrollbar.vertical":{type:"string",enum:["auto","visible","hidden"],enumDescriptions:[w.localize(74,null),w.localize(75,null),w.localize(76,null)],default:"auto",description:w.localize(77,null)},"editor.scrollbar.horizontal":{type:"string",enum:["auto","visible","hidden"],enumDescriptions:[w.localize(78,null),w.localize(79,null),w.localize(80,null)],default:"auto",description:w.localize(81,null)},"editor.scrollbar.verticalScrollbarSize":{type:"number",default:z.verticalScrollbarSize,description:w.localize(82,null)},"editor.scrollbar.horizontalScrollbarSize":{type:"number",default:z.horizontalScrollbarSize,description:w.localize(83,null)},"editor.scrollbar.scrollByPage":{type:"boolean",default:z.scrollByPage,description:w.localize(84,null)}})}validate(z){if(!z||typeof z!="object")return this.defaultValue;const te=z,he=u.clampedInt(te.horizontalScrollbarSize,this.defaultValue.horizontalScrollbarSize,0,1e3),ge=u.clampedInt(te.verticalScrollbarSize,this.defaultValue.verticalScrollbarSize,0,1e3);return{arrowSize:u.clampedInt(te.arrowSize,this.defaultValue.arrowSize,0,1e3),vertical:x(te.vertical,this.defaultValue.vertical),horizontal:x(te.horizontal,this.defaultValue.horizontal),useShadows:t(te.useShadows,this.defaultValue.useShadows),verticalHasArrows:t(te.verticalHasArrows,this.defaultValue.verticalHasArrows),horizontalHasArrows:t(te.horizontalHasArrows,this.defaultValue.horizontalHasArrows),handleMouseWheel:t(te.handleMouseWheel,this.defaultValue.handleMouseWheel),alwaysConsumeMouseWheel:t(te.alwaysConsumeMouseWheel,this.defaultValue.alwaysConsumeMouseWheel),horizontalScrollbarSize:he,horizontalSliderSize:u.clampedInt(te.horizontalSliderSize,he,0,1e3),verticalScrollbarSize:ge,verticalSliderSize:u.clampedInt(te.verticalSliderSize,ge,0,1e3),scrollByPage:t(te.scrollByPage,this.defaultValue.scrollByPage)}}}class $ extends C{constructor(){const z={enabled:!0,mode:"subwordSmart"};super(54,"inlineSuggest",z,{"editor.inlineSuggest.enabled":{type:"boolean",default:z.enabled,description:w.localize(85,null)}})}validate(z){if(!z||typeof z!="object")return this.defaultValue;const te=z;return{enabled:t(te.enabled,this.defaultValue.enabled),mode:r(te.mode,this.defaultValue.mode,["prefix","subword","subwordSmart"])}}}class V extends C{constructor(){const z={enabled:e.EDITOR_MODEL_DEFAULTS.bracketPairColorizationOptions.enabled};super(12,"bracketPairColorization",z,{"editor.bracketPairColorization.enabled":{type:"boolean",default:z.enabled,description:w.localize(86,null)}})}validate(z){return!z||typeof z!="object"?this.defaultValue:{enabled:t(z.enabled,this.defaultValue.enabled)}}}class Q extends C{constructor(){const z={bracketPairs:!1,bracketPairsHorizontal:"active",highlightActiveBracketPair:!0,indentation:!0,highlightActiveIndentation:!0};super(13,"guides",z,{"editor.guides.bracketPairs":{type:["boolean","string"],enum:[!0,"active",!1],enumDescriptions:[w.localize(87,null),w.localize(88,null),w.localize(89,null)],default:z.bracketPairs,description:w.localize(90,null)},"editor.guides.bracketPairsHorizontal":{type:["boolean","string"],enum:[!0,"active",!1],enumDescriptions:[w.localize(91,null),w.localize(92,null),w.localize(93,null)],default:z.bracketPairsHorizontal,description:w.localize(94,null)},"editor.guides.highlightActiveBracketPair":{type:"boolean",default:z.highlightActiveBracketPair,description:w.localize(95,null)},"editor.guides.indentation":{type:"boolean",default:z.indentation,description:w.localize(96,null)},"editor.guides.highlightActiveIndentation":{type:"boolean",default:z.highlightActiveIndentation,description:w.localize(97,null)}})}validate(z){if(!z||typeof z!="object")return this.defaultValue;const te=z;return{bracketPairs:ue(te.bracketPairs,this.defaultValue.bracketPairs,[!0,!1,"active"]),bracketPairsHorizontal:ue(te.bracketPairsHorizontal,this.defaultValue.bracketPairsHorizontal,[!0,!1,"active"]),highlightActiveBracketPair:t(te.highlightActiveBracketPair,this.defaultValue.highlightActiveBracketPair),indentation:t(te.indentation,this.defaultValue.indentation),highlightActiveIndentation:t(te.highlightActiveIndentation,this.defaultValue.highlightActiveIndentation)}}}function ue(de,z,te){const he=te.indexOf(de);return he===-1?z:te[he]}class pe extends C{constructor(){const z={insertMode:"insert",filterGraceful:!0,snippetsPreventQuickSuggestions:!0,localityBonus:!1,shareSuggestSelections:!1,showIcons:!0,showStatusBar:!1,preview:!1,previewMode:"subwordSmart",showInlineDetails:!0,showMethods:!0,showFunctions:!0,showConstructors:!0,showDeprecated:!0,showFields:!0,showVariables:!0,showClasses:!0,showStructs:!0,showInterfaces:!0,showModules:!0,showProperties:!0,showEvents:!0,showOperators:!0,showUnits:!0,showValues:!0,showConstants:!0,showEnums:!0,showEnumMembers:!0,showKeywords:!0,showWords:!0,showColors:!0,showFiles:!0,showReferences:!0,showFolders:!0,showTypeParameters:!0,showSnippets:!0,showUsers:!0,showIssues:!0};super(105,"suggest",z,{"editor.suggest.insertMode":{type:"string",enum:["insert","replace"],enumDescriptions:[w.localize(98,null),w.localize(99,null)],default:z.insertMode,description:w.localize(100,null)},"editor.suggest.filterGraceful":{type:"boolean",default:z.filterGraceful,description:w.localize(101,null)},"editor.suggest.localityBonus":{type:"boolean",default:z.localityBonus,description:w.localize(102,null)},"editor.suggest.shareSuggestSelections":{type:"boolean",default:z.shareSuggestSelections,markdownDescription:w.localize(103,null)},"editor.suggest.snippetsPreventQuickSuggestions":{type:"boolean",default:z.snippetsPreventQuickSuggestions,description:w.localize(104,null)},"editor.suggest.showIcons":{type:"boolean",default:z.showIcons,description:w.localize(105,null)},"editor.suggest.showStatusBar":{type:"boolean",default:z.showStatusBar,description:w.localize(106,null)},"editor.suggest.preview":{type:"boolean",default:z.preview,description:w.localize(107,null)},"editor.suggest.showInlineDetails":{type:"boolean",default:z.showInlineDetails,description:w.localize(108,null)},"editor.suggest.maxVisibleSuggestions":{type:"number",deprecationMessage:w.localize(109,null)},"editor.suggest.filteredTypes":{type:"object",deprecationMessage:w.localize(110,null)},"editor.suggest.showMethods":{type:"boolean",default:!0,markdownDescription:w.localize(111,null)},"editor.suggest.showFunctions":{type:"boolean",default:!0,markdownDescription:w.localize(112,null)},"editor.suggest.showConstructors":{type:"boolean",default:!0,markdownDescription:w.localize(113,null)},"editor.suggest.showDeprecated":{type:"boolean",default:!0,markdownDescription:w.localize(114,null)},"editor.suggest.showFields":{type:"boolean",default:!0,markdownDescription:w.localize(115,null)},"editor.suggest.showVariables":{type:"boolean",default:!0,markdownDescription:w.localize(116,null)},"editor.suggest.showClasses":{type:"boolean",default:!0,markdownDescription:w.localize(117,null)},"editor.suggest.showStructs":{type:"boolean",default:!0,markdownDescription:w.localize(118,null)},"editor.suggest.showInterfaces":{type:"boolean",default:!0,markdownDescription:w.localize(119,null)},"editor.suggest.showModules":{type:"boolean",default:!0,markdownDescription:w.localize(120,null)},"editor.suggest.showProperties":{type:"boolean",default:!0,markdownDescription:w.localize(121,null)},"editor.suggest.showEvents":{type:"boolean",default:!0,markdownDescription:w.localize(122,null)},"editor.suggest.showOperators":{type:"boolean",default:!0,markdownDescription:w.localize(123,null)},"editor.suggest.showUnits":{type:"boolean",default:!0,markdownDescription:w.localize(124,null)},"editor.suggest.showValues":{type:"boolean",default:!0,markdownDescription:w.localize(125,null)},"editor.suggest.showConstants":{type:"boolean",default:!0,markdownDescription:w.localize(126,null)},"editor.suggest.showEnums":{type:"boolean",default:!0,markdownDescription:w.localize(127,null)},"editor.suggest.showEnumMembers":{type:"boolean",default:!0,markdownDescription:w.localize(128,null)},"editor.suggest.showKeywords":{type:"boolean",default:!0,markdownDescription:w.localize(129,null)},"editor.suggest.showWords":{type:"boolean",default:!0,markdownDescription:w.localize(130,null)},"editor.suggest.showColors":{type:"boolean",default:!0,markdownDescription:w.localize(131,null)},"editor.suggest.showFiles":{type:"boolean",default:!0,markdownDescription:w.localize(132,null)},"editor.suggest.showReferences":{type:"boolean",default:!0,markdownDescription:w.localize(133,null)},"editor.suggest.showCustomcolors":{type:"boolean",default:!0,markdownDescription:w.localize(134,null)},"editor.suggest.showFolders":{type:"boolean",default:!0,markdownDescription:w.localize(135,null)},"editor.suggest.showTypeParameters":{type:"boolean",default:!0,markdownDescription:w.localize(136,null)},"editor.suggest.showSnippets":{type:"boolean",default:!0,markdownDescription:w.localize(137,null)},"editor.suggest.showUsers":{type:"boolean",default:!0,markdownDescription:w.localize(138,null)},"editor.suggest.showIssues":{type:"boolean",default:!0,markdownDescription:w.localize(139,null)}})}validate(z){if(!z||typeof z!="object")return this.defaultValue;const te=z;return{insertMode:r(te.insertMode,this.defaultValue.insertMode,["insert","replace"]),filterGraceful:t(te.filterGraceful,this.defaultValue.filterGraceful),snippetsPreventQuickSuggestions:t(te.snippetsPreventQuickSuggestions,this.defaultValue.filterGraceful),localityBonus:t(te.localityBonus,this.defaultValue.localityBonus),shareSuggestSelections:t(te.shareSuggestSelections,this.defaultValue.shareSuggestSelections),showIcons:t(te.showIcons,this.defaultValue.showIcons),showStatusBar:t(te.showStatusBar,this.defaultValue.showStatusBar),preview:t(te.preview,this.defaultValue.preview),previewMode:r(te.previewMode,this.defaultValue.previewMode,["prefix","subword","subwordSmart"]),showInlineDetails:t(te.showInlineDetails,this.defaultValue.showInlineDetails),showMethods:t(te.showMethods,this.defaultValue.showMethods),showFunctions:t(te.showFunctions,this.defaultValue.showFunctions),showConstructors:t(te.showConstructors,this.defaultValue.showConstructors),showDeprecated:t(te.showDeprecated,this.defaultValue.showDeprecated),showFields:t(te.showFields,this.defaultValue.showFields),showVariables:t(te.showVariables,this.defaultValue.showVariables),showClasses:t(te.showClasses,this.defaultValue.showClasses),showStructs:t(te.showStructs,this.defaultValue.showStructs),showInterfaces:t(te.showInterfaces,this.defaultValue.showInterfaces),showModules:t(te.showModules,this.defaultValue.showModules),showProperties:t(te.showProperties,this.defaultValue.showProperties),showEvents:t(te.showEvents,this.defaultValue.showEvents),showOperators:t(te.showOperators,this.defaultValue.showOperators),showUnits:t(te.showUnits,this.defaultValue.showUnits),showValues:t(te.showValues,this.defaultValue.showValues),showConstants:t(te.showConstants,this.defaultValue.showConstants),showEnums:t(te.showEnums,this.defaultValue.showEnums),showEnumMembers:t(te.showEnumMembers,this.defaultValue.showEnumMembers),showKeywords:t(te.showKeywords,this.defaultValue.showKeywords),showWords:t(te.showWords,this.defaultValue.showWords),showColors:t(te.showColors,this.defaultValue.showColors),showFiles:t(te.showFiles,this.defaultValue.showFiles),showReferences:t(te.showReferences,this.defaultValue.showReferences),showFolders:t(te.showFolders,this.defaultValue.showFolders),showTypeParameters:t(te.showTypeParameters,this.defaultValue.showTypeParameters),showSnippets:t(te.showSnippets,this.defaultValue.showSnippets),showUsers:t(te.showUsers,this.defaultValue.showUsers),showIssues:t(te.showIssues,this.defaultValue.showIssues)}}}class fe extends C{constructor(){super(101,"smartSelect",{selectLeadingAndTrailingWhitespace:!0},{"editor.smartSelect.selectLeadingAndTrailingWhitespace":{description:w.localize(140,null),default:!0,type:"boolean"}})}validate(z){return!z||typeof z!="object"?this.defaultValue:{selectLeadingAndTrailingWhitespace:t(z.selectLeadingAndTrailingWhitespace,this.defaultValue.selectLeadingAndTrailingWhitespace)}}}class re extends n{constructor(){super(128,[80])}compute(z,te,he){return te.get(80)?!0:z.tabFocusMode}}function ie(de){switch(de){case"none":return 0;case"same":return 1;case"indent":return 2;case"deepIndent":return 3}}class ae extends n{constructor(){super(130,[129])}compute(z,te,he){const ge=te.get(129);return{isDominatedByLongLines:z.isDominatedByLongLines,isWordWrapMinified:ge.isWordWrapMinified,isViewportWrapping:ge.isViewportWrapping,wrappingColumn:ge.wrappingColumn}}}const q="Consolas, 'Courier New', monospace",ne="Menlo, Monaco, 'Courier New', monospace",ce="'Droid Sans Mono', 'monospace', monospace, 'Droid Sans Fallback'";e.EDITOR_FONT_DEFAULTS={fontFamily:N.isMacintosh?ne:N.isLinux?ce:q,fontWeight:"normal",fontSize:N.isMacintosh?12:14,lineHeight:0,letterSpacing:0},e.EDITOR_MODEL_DEFAULTS={tabSize:4,indentSize:4,insertSpaces:!0,detectIndentation:!0,trimAutoWhitespace:!0,largeFileOptimizations:!0,bracketPairColorizationOptions:{enabled:!1}},e.editorOptionsRegistry=[];function le(de){return e.editorOptionsRegistry[de.id]=de,de}e.EditorOptions={acceptSuggestionOnCommitCharacter:le(new s(0,"acceptSuggestionOnCommitCharacter",!0,{markdownDescription:w.localize(141,null)})),acceptSuggestionOnEnter:le(new o(1,"acceptSuggestionOnEnter","on",["on","smart","off"],{markdownEnumDescriptions:["",w.localize(142,null),""],markdownDescription:w.localize(143,null)})),accessibilitySupport:le(new h),accessibilityPageSize:le(new u(3,"accessibilityPageSize",10,1,1073741824,{description:w.localize(144,null)})),ariaLabel:le(new a(4,"ariaLabel",w.localize(145,null))),autoClosingBrackets:le(new o(5,"autoClosingBrackets","languageDefined",["always","languageDefined","beforeWhitespace","never"],{enumDescriptions:["",w.localize(146,null),w.localize(147,null),""],description:w.localize(148,null)})),autoClosingDelete:le(new o(6,"autoClosingDelete","auto",["always","auto","never"],{enumDescriptions:["",w.localize(149,null),""],description:w.localize(150,null)})),autoClosingOvertype:le(new o(7,"autoClosingOvertype","auto",["always","auto","never"],{enumDescriptions:["",w.localize(151,null),""],description:w.localize(152,null)})),autoClosingQuotes:le(new o(8,"autoClosingQuotes","languageDefined",["always","languageDefined","beforeWhitespace","never"],{enumDescriptions:["",w.localize(153,null),w.localize(154,null),""],description:w.localize(155,null)})),autoIndent:le(new i(9,"autoIndent",4,"full",["none","keep","brackets","advanced","full"],l,{enumDescriptions:[w.localize(156,null),w.localize(157,null),w.localize(158,null),w.localize(159,null),w.localize(160,null)],description:w.localize(161,null)})),automaticLayout:le(new s(10,"automaticLayout",!1)),autoSurround:le(new o(11,"autoSurround","languageDefined",["languageDefined","quotes","brackets","never"],{enumDescriptions:[w.localize(162,null),w.localize(163,null),w.localize(164,null),""],description:w.localize(165,null)})),bracketPairColorization:le(new V),bracketPairGuides:le(new Q),stickyTabStops:le(new s(103,"stickyTabStops",!1,{description:w.localize(166,null)})),codeLens:le(new s(14,"codeLens",!0,{description:w.localize(167,null)})),codeLensFontFamily:le(new a(15,"codeLensFontFamily","",{description:w.localize(168,null)})),codeLensFontSize:le(new u(16,"codeLensFontSize",0,0,100,{type:"number",default:0,minimum:0,maximum:100,markdownDescription:w.localize(169,null)})),colorDecorators:le(new s(17,"colorDecorators",!0,{description:w.localize(170,null)})),columnSelection:le(new s(18,"columnSelection",!1,{description:w.localize(171,null)})),comments:le(new f),contextmenu:le(new s(20,"contextmenu",!0)),copyWithSyntaxHighlighting:le(new s(21,"copyWithSyntaxHighlighting",!0,{description:w.localize(172,null)})),cursorBlinking:le(new i(22,"cursorBlinking",1,"blink",["blink","smooth","phase","expand","solid"],y,{description:w.localize(173,null)})),cursorSmoothCaretAnimation:le(new s(23,"cursorSmoothCaretAnimation",!1,{description:w.localize(174,null)})),cursorStyle:le(new i(24,"cursorStyle",_.Line,"line",["line","block","underline","line-thin","block-outline","underline-thin"],b,{description:w.localize(175,null)})),cursorSurroundingLines:le(new u(25,"cursorSurroundingLines",0,0,1073741824,{description:w.localize(176,null)})),cursorSurroundingLinesStyle:le(new o(26,"cursorSurroundingLinesStyle","default",["default","all"],{enumDescriptions:[w.localize(177,null),w.localize(178,null)],description:w.localize(179,null)})),cursorWidth:le(new u(27,"cursorWidth",0,0,1073741824,{markdownDescription:w.localize(180,null)})),disableLayerHinting:le(new s(28,"disableLayerHinting",!1)),disableMonospaceOptimizations:le(new s(29,"disableMonospaceOptimizations",!1)),domReadOnly:le(new s(30,"domReadOnly",!1)),dragAndDrop:le(new s(31,"dragAndDrop",!0,{description:w.localize(181,null)})),emptySelectionClipboard:le(new m),extraEditorClassName:le(new a(33,"extraEditorClassName","")),fastScrollSensitivity:le(new d(34,"fastScrollSensitivity",5,de=>de<=0?5:de,{markdownDescription:w.localize(182,null)})),find:le(new E),fixedOverflowWidgets:le(new s(36,"fixedOverflowWidgets",!1)),folding:le(new s(37,"folding",!0,{description:w.localize(183,null)})),foldingStrategy:le(new o(38,"foldingStrategy","auto",["auto","indentation"],{enumDescriptions:[w.localize(184,null),w.localize(185,null)],description:w.localize(186,null)})),foldingHighlight:le(new s(39,"foldingHighlight",!0,{description:w.localize(187,null)})),foldingImportsByDefault:le(new s(40,"foldingImportsByDefault",!1,{description:w.localize(188,null)})),unfoldOnClickAfterEndOfLine:le(new s(41,"unfoldOnClickAfterEndOfLine",!1,{description:w.localize(189,null)})),fontFamily:le(new a(42,"fontFamily",e.EDITOR_FONT_DEFAULTS.fontFamily,{description:w.localize(190,null)})),fontInfo:le(new k),fontLigatures2:le(new I),fontSize:le(new M),fontWeight:le(new P),formatOnPaste:le(new s(47,"formatOnPaste",!1,{description:w.localize(191,null)})),formatOnType:le(new s(48,"formatOnType",!1,{description:w.localize(192,null)})),glyphMargin:le(new s(49,"glyphMargin",!0,{description:w.localize(193,null)})),gotoLocation:le(new F),hideCursorInOverviewRuler:le(new s(51,"hideCursorInOverviewRuler",!1,{description:w.localize(194,null)})),hover:le(new R),inDiffEditor:le(new s(53,"inDiffEditor",!1)),letterSpacing:le(new d(55,"letterSpacing",e.EDITOR_FONT_DEFAULTS.letterSpacing,de=>d.clamp(de,-5,20),{description:w.localize(195,null)})),lightbulb:le(new O),lineDecorationsWidth:le(new g(57,"lineDecorationsWidth",10)),lineHeight:le(new B),lineNumbers:le(new se),lineNumbersMinChars:le(new u(60,"lineNumbersMinChars",5,1,300)),linkedEditing:le(new s(61,"linkedEditing",!1,{description:w.localize(196,null)})),links:le(new s(62,"links",!0,{description:w.localize(197,null)})),matchBrackets:le(new o(63,"matchBrackets","always",["always","near","never"],{description:w.localize(198,null)})),minimap:le(new W),mouseStyle:le(new o(65,"mouseStyle","text",["text","default","copy"])),mouseWheelScrollSensitivity:le(new d(66,"mouseWheelScrollSensitivity",1,de=>de===0?1:de,{markdownDescription:w.localize(199,null)})),mouseWheelZoom:le(new s(67,"mouseWheelZoom",!1,{markdownDescription:w.localize(200,null)})),multiCursorMergeOverlapping:le(new s(68,"multiCursorMergeOverlapping",!0,{description:w.localize(201,null)})),multiCursorModifier:le(new i(69,"multiCursorModifier","altKey","alt",["ctrlCmd","alt"],K,{markdownEnumDescriptions:[w.localize(202,null),w.localize(203,null)],markdownDescription:w.localize(204,null)})),multiCursorPaste:le(new o(70,"multiCursorPaste","spread",["spread","full"],{markdownEnumDescriptions:[w.localize(205,null),w.localize(206,null)],markdownDescription:w.localize(207,null)})),occurrencesHighlight:le(new s(71,"occurrencesHighlight",!0,{description:w.localize(208,null)})),overviewRulerBorder:le(new s(72,"overviewRulerBorder",!0,{description:w.localize(209,null)})),overviewRulerLanes:le(new u(73,"overviewRulerLanes",3,0,3)),padding:le(new H),parameterHints:le(new Y),peekWidgetDefaultFocus:le(new o(76,"peekWidgetDefaultFocus","tree",["tree","editor"],{enumDescriptions:[w.localize(210,null),w.localize(211,null)],description:w.localize(212,null)})),definitionLinkOpensInPeek:le(new s(77,"definitionLinkOpensInPeek",!1,{description:w.localize(213,null)})),quickSuggestions:le(new Z),quickSuggestionsDelay:le(new u(79,"quickSuggestionsDelay",10,0,1073741824,{description:w.localize(214,null)})),readOnly:le(new s(80,"readOnly",!1)),renameOnType:le(new s(81,"renameOnType",!1,{description:w.localize(215,null),markdownDeprecationMessage:w.localize(216,null)})),renderControlCharacters:le(new s(82,"renderControlCharacters",!0,{description:w.localize(217,null),restricted:!0})),renderFinalNewline:le(new s(83,"renderFinalNewline",!0,{description:w.localize(218,null)})),renderLineHighlight:le(new o(84,"renderLineHighlight","line",["none","gutter","line","all"],{enumDescriptions:["","","",w.localize(219,null)],description:w.localize(220,null)})),renderLineHighlightOnlyWhenFocus:le(new s(85,"renderLineHighlightOnlyWhenFocus",!1,{description:w.localize(221,null)})),renderValidationDecorations:le(new o(86,"renderValidationDecorations","editable",["editable","on","off"])),renderWhitespace:le(new o(87,"renderWhitespace","selection",["none","boundary","selection","trailing","all"],{enumDescriptions:["",w.localize(222,null),w.localize(223,null),w.localize(224,null),""],description:w.localize(225,null)})),revealHorizontalRightPadding:le(new u(88,"revealHorizontalRightPadding",30,0,1e3)),roundedSelection:le(new s(89,"roundedSelection",!0,{description:w.localize(226,null)})),rulers:le(new G),scrollbar:le(new U),scrollBeyondLastColumn:le(new u(92,"scrollBeyondLastColumn",5,0,1073741824,{description:w.localize(227,null)})),scrollBeyondLastLine:le(new s(93,"scrollBeyondLastLine",!0,{description:w.localize(228,null)})),scrollPredominantAxis:le(new s(94,"scrollPredominantAxis",!0,{description:w.localize(229,null)})),selectionClipboard:le(new s(95,"selectionClipboard",!0,{description:w.localize(230,null),included:N.isLinux})),selectionHighlight:le(new s(96,"selectionHighlight",!0,{description:w.localize(231,null)})),selectOnLineNumbers:le(new s(97,"selectOnLineNumbers",!0)),showFoldingControls:le(new o(98,"showFoldingControls","mouseover",["always","mouseover"],{enumDescriptions:[w.localize(232,null),w.localize(233,null)],description:w.localize(234,null)})),showUnused:le(new s(99,"showUnused",!0,{description:w.localize(235,null)})),showDeprecated:le(new s(124,"showDeprecated",!0,{description:w.localize(236,null)})),inlayHints:le(new L),snippetSuggestions:le(new o(100,"snippetSuggestions","inline",["top","bottom","inline","none"],{enumDescriptions:[w.localize(237,null),w.localize(238,null),w.localize(239,null),w.localize(240,null)],description:w.localize(241,null)})),smartSelect:le(new fe),smoothScrolling:le(new s(102,"smoothScrolling",!1,{description:w.localize(242,null)})),stopRenderingLineAfter:le(new u(104,"stopRenderingLineAfter",1e4,-1,1073741824)),suggest:le(new pe),inlineSuggest:le(new $),suggestFontSize:le(new u(106,"suggestFontSize",0,0,1e3,{markdownDescription:w.localize(243,null)})),suggestLineHeight:le(new u(107,"suggestLineHeight",0,0,1e3,{markdownDescription:w.localize(244,null)})),suggestOnTriggerCharacters:le(new s(108,"suggestOnTriggerCharacters",!0,{description:w.localize(245,null)})),suggestSelection:le(new o(109,"suggestSelection","recentlyUsed",["first","recentlyUsed","recentlyUsedByPrefix"],{markdownEnumDescriptions:[w.localize(246,null),w.localize(247,null),w.localize(248,null)],description:w.localize(249,null)})),tabCompletion:le(new o(110,"tabCompletion","off",["on","off","onlySnippets"],{enumDescriptions:[w.localize(250,null),w.localize(251,null),w.localize(252,null)],description:w.localize(253,null)})),tabIndex:le(new u(111,"tabIndex",0,-1,1073741824)),unusualLineTerminators:le(new o(112,"unusualLineTerminators","prompt",["auto","off","prompt"],{enumDescriptions:[w.localize(254,null),w.localize(255,null),w.localize(256,null)],description:w.localize(257,null)})),useShadowDOM:le(new s(113,"useShadowDOM",!0)),useTabStops:le(new s(114,"useTabStops",!0,{description:w.localize(258,null)})),wordSeparators:le(new a(115,"wordSeparators",T.USUAL_WORD_SEPARATORS,{description:w.localize(259,null)})),wordWrap:le(new o(116,"wordWrap","off",["off","on","wordWrapColumn","bounded"],{markdownEnumDescriptions:[w.localize(260,null),w.localize(261,null),w.localize(262,null),w.localize(263,null)],description:w.localize(264,null)})),wordWrapBreakAfterCharacters:le(new a(117,"wordWrapBreakAfterCharacters","     })]?|/&.,;\xA2\xB0\u2032\u2033\u2030\u2103\u3001\u3002\uFF61\uFF64\uFFE0\uFF0C\uFF0E\uFF1A\uFF1B\uFF1F\uFF01\uFF05\u30FB\uFF65\u309D\u309E\u30FD\u30FE\u30FC\u30A1\u30A3\u30A5\u30A7\u30A9\u30C3\u30E3\u30E5\u30E7\u30EE\u30F5\u30F6\u3041\u3043\u3045\u3047\u3049\u3063\u3083\u3085\u3087\u308E\u3095\u3096\u31F0\u31F1\u31F2\u31F3\u31F4\u31F5\u31F6\u31F7\u31F8\u31F9\u31FA\u31FB\u31FC\u31FD\u31FE\u31FF\u3005\u303B\uFF67\uFF68\uFF69\uFF6A\uFF6B\uFF6C\uFF6D\uFF6E\uFF6F\uFF70\u201D\u3009\u300B\u300D\u300F\u3011\u3015\uFF09\uFF3D\uFF5D\uFF63")),wordWrapBreakBeforeCharacters:le(new a(118,"wordWrapBreakBeforeCharacters","([{\u2018\u201C\u3008\u300A\u300C\u300E\u3010\u3014\uFF08\uFF3B\uFF5B\uFF62\xA3\xA5\uFF04\uFFE1\uFFE5+\uFF0B")),wordWrapColumn:le(new u(119,"wordWrapColumn",80,1,1073741824,{markdownDescription:w.localize(265,null)})),wordWrapOverride1:le(new o(120,"wordWrapOverride1","inherit",["off","on","inherit"])),wordWrapOverride2:le(new o(121,"wordWrapOverride2","inherit",["off","on","inherit"])),wrappingIndent:le(new i(122,"wrappingIndent",1,"same",["none","same","indent","deepIndent"],ie,{enumDescriptions:[w.localize(266,null),w.localize(267,null),w.localize(268,null),w.localize(269,null)],description:w.localize(270,null)})),wrappingStrategy:le(new o(123,"wrappingStrategy","simple",["simple","advanced"],{enumDescriptions:[w.localize(271,null),w.localize(272,null)],description:w.localize(273,null)})),editorClassName:le(new v),pixelRatio:le(new X),tabFocusMode:le(new re),layoutInfo:le(new A),wrappingInfo:le(new ae)}}),define(J[475],ee([0,1,34,31]),function(j,e,w,N){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.readCharWidths=e.CharWidthRequest=void 0;class T{constructor(C,n){this.chr=C,this.type=n,this.width=0}fulfill(C){this.width=C}}e.CharWidthRequest=T;class D{constructor(C,n){this._bareFontInfo=C,this._requests=n,this._container=null,this._testElements=null}read(){this._createDomElements(),document.body.appendChild(this._container),this._readFromDomElements(),document.body.removeChild(this._container),this._container=null,this._testElements=null}_createDomElements(){const C=this._bareFontInfo.getMassagedFontFamily(w.isSafari?N.EDITOR_FONT_DEFAULTS.fontFamily:null),n=document.createElement("div");n.style.position="absolute",n.style.top="-50000px",n.style.width="50000px";const g=document.createElement("div");g.style.fontFamily=C,g.style.fontWeight=this._bareFontInfo.fontWeight,g.style.fontSize=this._bareFontInfo.fontSize+"px",g.style.fontFeatureSettings=this._bareFontInfo.fontFeatureSettings,g.style.lineHeight=this._bareFontInfo.lineHeight+"px",g.style.letterSpacing=this._bareFontInfo.letterSpacing+"px",n.appendChild(g);const t=document.createElement("div");t.style.fontFamily=C,t.style.fontWeight="bold",t.style.fontSize=this._bareFontInfo.fontSize+"px",t.style.fontFeatureSettings=this._bareFontInfo.fontFeatureSettings,t.style.lineHeight=this._bareFontInfo.lineHeight+"px",t.style.letterSpacing=this._bareFontInfo.letterSpacing+"px",n.appendChild(t);const s=document.createElement("div");s.style.fontFamily=C,s.style.fontWeight=this._bareFontInfo.fontWeight,s.style.fontSize=this._bareFontInfo.fontSize+"px",s.style.fontFeatureSettings=this._bareFontInfo.fontFeatureSettings,s.style.lineHeight=this._bareFontInfo.lineHeight+"px",s.style.letterSpacing=this._bareFontInfo.letterSpacing+"px",s.style.fontStyle="italic",n.appendChild(s);const c=[];for(const u of this._requests){let d;u.type===0&&(d=g),u.type===2&&(d=t),u.type===1&&(d=s),d.appendChild(document.createElement("br"));const a=document.createElement("span");D._render(a,u),d.appendChild(a),c.push(a)}this._container=n,this._testElements=c}static _render(C,n){if(n.chr===" "){let g="\xA0";for(let t=0;t<8;t++)g+=g;C.innerText=g}else{let g=n.chr;for(let t=0;t<8;t++)g+=g;C.textContent=g}}_readFromDomElements(){for(let C=0,n=this._requests.length;C<n;C++){const g=this._requests[C],t=this._testElements[C];g.fulfill(t.offsetWidth/256)}}}function S(p,C){new D(p,C).read()}e.readCharWidths=S}),define(J[476],ee([0,1,13,3,60,31]),function(j,e,w,N,T,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ViewModelDecorations=void 0;class S{constructor(C,n,g,t,s){this.editorId=C,this.model=n,this.configuration=g,this._linesCollection=t,this._coordinatesConverter=s,this._decorationsCache=Object.create(null),this._cachedModelDecorationsResolver=null,this._cachedModelDecorationsResolverViewRange=null}_clearCachedModelDecorationsResolver(){this._cachedModelDecorationsResolver=null,this._cachedModelDecorationsResolverViewRange=null}dispose(){this._decorationsCache=Object.create(null),this._clearCachedModelDecorationsResolver()}reset(){this._decorationsCache=Object.create(null),this._clearCachedModelDecorationsResolver()}onModelDecorationsChanged(){this._decorationsCache=Object.create(null),this._clearCachedModelDecorationsResolver()}onLineMappingChanged(){this._decorationsCache=Object.create(null),this._clearCachedModelDecorationsResolver()}_getOrCreateViewModelDecoration(C){const n=C.id;let g=this._decorationsCache[n];if(!g){const t=C.range,s=C.options;let c;if(s.isWholeLine){const u=this._coordinatesConverter.convertModelPositionToViewPosition(new w.Position(t.startLineNumber,1),0),d=this._coordinatesConverter.convertModelPositionToViewPosition(new w.Position(t.endLineNumber,this.model.getLineMaxColumn(t.endLineNumber)),1);c=new N.Range(u.lineNumber,u.column,d.lineNumber,d.column)}else c=this._coordinatesConverter.convertModelRangeToViewRange(t,1);g=new T.ViewModelDecoration(c,s),this._decorationsCache[n]=g}return g}getDecorationsViewportData(C){let n=this._cachedModelDecorationsResolver!==null;return n=n&&C.equalsRange(this._cachedModelDecorationsResolverViewRange),n||(this._cachedModelDecorationsResolver=this._getDecorationsViewportData(C),this._cachedModelDecorationsResolverViewRange=C),this._cachedModelDecorationsResolver}_getDecorationsViewportData(C){const n=this._linesCollection.getDecorationsInRange(C,this.editorId,(0,D.filterValidationDecorations)(this.configuration.options)),g=C.startLineNumber,t=C.endLineNumber;let s=[],c=0,u=[];for(let d=g;d<=t;d++)u[d-g]=[];for(let d=0,a=n.length;d<a;d++){let r=n[d],o=r.options,i=this._getOrCreateViewModelDecoration(r),l=i.range;if(s[c++]=i,o.inlineClassName){let h=new T.InlineDecoration(l,o.inlineClassName,o.inlineClassNameAffectsLetterSpacing?3:0),f=Math.max(g,l.startLineNumber),y=Math.min(t,l.endLineNumber);for(let _=f;_<=y;_++)u[_-g].push(h)}if(o.beforeContentClassName&&g<=l.startLineNumber&&l.startLineNumber<=t){let h=new T.InlineDecoration(new N.Range(l.startLineNumber,l.startColumn,l.startLineNumber,l.startColumn),o.beforeContentClassName,1);u[l.startLineNumber-g].push(h)}if(o.afterContentClassName&&g<=l.endLineNumber&&l.endLineNumber<=t){let h=new T.InlineDecoration(new N.Range(l.endLineNumber,l.endColumn,l.endLineNumber,l.endColumn),o.afterContentClassName,2);u[l.endLineNumber-g].push(h)}}return{decorations:s,inlineDecorations:u}}}e.ViewModelDecorations=S}),define(J[477],ee([5,6]),function(j,e){return j.create("vs/editor/common/editorContextKeys",e)}),define(J[478],ee([5,6]),function(j,e){return j.create("vs/editor/common/model/editStack",e)}),define(J[249],ee([0,1,478,11,22,24,230,105,44]),function(j,e,w,N,T,D,S,p,C){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EditStack=e.isEditStackElement=e.MultiModelEditStackElement=e.SingleModelEditStackElement=e.SingleModelEditStackData=void 0;function n(a){return a.toString()}class g{constructor(r,o,i,l,h,f,y){this.beforeVersionId=r,this.afterVersionId=o,this.beforeEOL=i,this.afterEOL=l,this.beforeCursorState=h,this.afterCursorState=f,this.changes=y}static create(r,o){const i=r.getAlternativeVersionId(),l=c(r);return new g(i,i,l,l,o,o,[])}append(r,o,i,l,h){o.length>0&&(this.changes=(0,S.compressConsecutiveTextChanges)(this.changes,o)),this.afterEOL=i,this.afterVersionId=l,this.afterCursorState=h}static _writeSelectionsSize(r){return 4+4*4*(r?r.length:0)}static _writeSelections(r,o,i){if(p.writeUInt32BE(r,o?o.length:0,i),i+=4,o)for(const l of o)p.writeUInt32BE(r,l.selectionStartLineNumber,i),i+=4,p.writeUInt32BE(r,l.selectionStartColumn,i),i+=4,p.writeUInt32BE(r,l.positionLineNumber,i),i+=4,p.writeUInt32BE(r,l.positionColumn,i),i+=4;return i}static _readSelections(r,o,i){const l=p.readUInt32BE(r,o);o+=4;for(let h=0;h<l;h++){const f=p.readUInt32BE(r,o);o+=4;const y=p.readUInt32BE(r,o);o+=4;const _=p.readUInt32BE(r,o);o+=4;const b=p.readUInt32BE(r,o);o+=4,i.push(new T.Selection(f,y,_,b))}return o}serialize(){let r=4+4+1+1+g._writeSelectionsSize(this.beforeCursorState)+g._writeSelectionsSize(this.afterCursorState)+4;for(const l of this.changes)r+=l.writeSize();const o=new Uint8Array(r);let i=0;p.writeUInt32BE(o,this.beforeVersionId,i),i+=4,p.writeUInt32BE(o,this.afterVersionId,i),i+=4,p.writeUInt8(o,this.beforeEOL,i),i+=1,p.writeUInt8(o,this.afterEOL,i),i+=1,i=g._writeSelections(o,this.beforeCursorState,i),i=g._writeSelections(o,this.afterCursorState,i),p.writeUInt32BE(o,this.changes.length,i),i+=4;for(const l of this.changes)i=l.write(o,i);return o.buffer}static deserialize(r){const o=new Uint8Array(r);let i=0;const l=p.readUInt32BE(o,i);i+=4;const h=p.readUInt32BE(o,i);i+=4;const f=p.readUInt8(o,i);i+=1;const y=p.readUInt8(o,i);i+=1;const _=[];i=g._readSelections(o,i,_);const b=[];i=g._readSelections(o,i,b);const v=p.readUInt32BE(o,i);i+=4;const m=[];for(let E=0;E<v;E++)i=S.TextChange.read(o,i,m);return new g(l,h,f,y,_,b,m)}}e.SingleModelEditStackData=g;class t{constructor(r,o){this.model=r,this._data=g.create(r,o)}get type(){return 0}get resource(){return D.URI.isUri(this.model)?this.model:this.model.uri}get label(){return w.localize(0,null)}toString(){return(this._data instanceof g?this._data:g.deserialize(this._data)).changes.map(o=>o.toString()).join(", ")}matchesResource(r){return(D.URI.isUri(this.model)?this.model:this.model.uri).toString()===r.toString()}setModel(r){this.model=r}canAppend(r){return this.model===r&&this._data instanceof g}append(r,o,i,l,h){this._data instanceof g&&this._data.append(r,o,i,l,h)}close(){this._data instanceof g&&(this._data=this._data.serialize())}open(){this._data instanceof g||(this._data=g.deserialize(this._data))}undo(){if(D.URI.isUri(this.model))throw new Error("Invalid SingleModelEditStackElement");this._data instanceof g&&(this._data=this._data.serialize());const r=g.deserialize(this._data);this.model._applyUndo(r.changes,r.beforeEOL,r.beforeVersionId,r.beforeCursorState)}redo(){if(D.URI.isUri(this.model))throw new Error("Invalid SingleModelEditStackElement");this._data instanceof g&&(this._data=this._data.serialize());const r=g.deserialize(this._data);this.model._applyRedo(r.changes,r.afterEOL,r.afterVersionId,r.afterCursorState)}heapSize(){return this._data instanceof g&&(this._data=this._data.serialize()),this._data.byteLength+168}}e.SingleModelEditStackElement=t;class s{constructor(r,o){this.type=1,this.label=r,this._isOpen=!0,this._editStackElementsArr=o.slice(0),this._editStackElementsMap=new Map;for(const i of this._editStackElementsArr){const l=n(i.resource);this._editStackElementsMap.set(l,i)}this._delegate=null}get resources(){return this._editStackElementsArr.map(r=>r.resource)}prepareUndoRedo(){if(this._delegate)return this._delegate.prepareUndoRedo(this)}matchesResource(r){const o=n(r);return this._editStackElementsMap.has(o)}setModel(r){const o=n(D.URI.isUri(r)?r:r.uri);this._editStackElementsMap.has(o)&&this._editStackElementsMap.get(o).setModel(r)}canAppend(r){if(!this._isOpen)return!1;const o=n(r.uri);return this._editStackElementsMap.has(o)?this._editStackElementsMap.get(o).canAppend(r):!1}append(r,o,i,l,h){const f=n(r.uri);this._editStackElementsMap.get(f).append(r,o,i,l,h)}close(){this._isOpen=!1}open(){}undo(){this._isOpen=!1;for(const r of this._editStackElementsArr)r.undo()}redo(){for(const r of this._editStackElementsArr)r.redo()}heapSize(r){const o=n(r);return this._editStackElementsMap.has(o)?this._editStackElementsMap.get(o).heapSize():0}split(){return this._editStackElementsArr}toString(){let r=[];for(const o of this._editStackElementsArr)r.push(`${(0,C.basename)(o.resource)}: ${o}`);return`{${r.join(", ")}}`}}e.MultiModelEditStackElement=s;function c(a){return a.getEOL()===`
`?0:1}function u(a){return a?a instanceof t||a instanceof s:!1}e.isEditStackElement=u;class d{constructor(r,o){this._model=r,this._undoRedoService=o}pushStackElement(){const r=this._undoRedoService.getLastElement(this._model.uri);u(r)&&r.close()}popStackElement(){const r=this._undoRedoService.getLastElement(this._model.uri);u(r)&&r.open()}clear(){this._undoRedoService.removeElements(this._model.uri)}_getOrCreateEditStackElement(r){const o=this._undoRedoService.getLastElement(this._model.uri);if(u(o)&&o.canAppend(this._model))return o;const i=new t(this._model,r);return this._undoRedoService.pushElement(i),i}pushEOL(r){const o=this._getOrCreateEditStackElement(null);this._model.setEOL(r),o.append(this._model,[],c(this._model),this._model.getAlternativeVersionId(),null)}pushEditOperation(r,o,i){const l=this._getOrCreateEditStackElement(r),h=this._model.applyEdits(o,!0),f=d._computeCursorState(i,h),y=h.map((_,b)=>({index:b,textChange:_.textChange}));return y.sort((_,b)=>_.textChange.oldPosition===b.textChange.oldPosition?_.index-b.index:_.textChange.oldPosition-b.textChange.oldPosition),l.append(this._model,y.map(_=>_.textChange),c(this._model),this._model.getAlternativeVersionId(),f),f}static _computeCursorState(r,o){try{return r?r(o):null}catch(i){return(0,N.onUnexpectedError)(i),null}}}e.EditStack=d}),define(J[479],ee([5,6]),function(j,e){return j.create("vs/editor/common/modes/modesRegistry",e)}),define(J[480],ee([5,6]),function(j,e){return j.create("vs/editor/common/standaloneStrings",e)}),define(J[65],ee([0,1,480]),function(j,e,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SimpleServicesNLS=e.ToggleHighContrastNLS=e.StandaloneCodeEditorNLS=e.QuickOutlineNLS=e.QuickCommandNLS=e.QuickHelpNLS=e.GoToLineNLS=e.InspectTokensNLS=e.AccessibilityHelpNLS=void 0;var N;(function(s){s.noSelection=w.localize(0,null),s.singleSelectionRange=w.localize(1,null),s.singleSelection=w.localize(2,null),s.multiSelectionRange=w.localize(3,null),s.multiSelection=w.localize(4,null),s.emergencyConfOn=w.localize(5,null),s.openingDocs=w.localize(6,null),s.readonlyDiffEditor=w.localize(7,null),s.editableDiffEditor=w.localize(8,null),s.readonlyEditor=w.localize(9,null),s.editableEditor=w.localize(10,null),s.changeConfigToOnMac=w.localize(11,null),s.changeConfigToOnWinLinux=w.localize(12,null),s.auto_on=w.localize(13,null),s.auto_off=w.localize(14,null),s.tabFocusModeOnMsg=w.localize(15,null),s.tabFocusModeOnMsgNoKb=w.localize(16,null),s.tabFocusModeOffMsg=w.localize(17,null),s.tabFocusModeOffMsgNoKb=w.localize(18,null),s.openDocMac=w.localize(19,null),s.openDocWinLinux=w.localize(20,null),s.outroMsg=w.localize(21,null),s.showAccessibilityHelpAction=w.localize(22,null)})(N=e.AccessibilityHelpNLS||(e.AccessibilityHelpNLS={}));var T;(function(s){s.inspectTokensAction=w.localize(23,null)})(T=e.InspectTokensNLS||(e.InspectTokensNLS={}));var D;(function(s){s.gotoLineActionLabel=w.localize(24,null)})(D=e.GoToLineNLS||(e.GoToLineNLS={}));var S;(function(s){s.helpQuickAccessActionLabel=w.localize(25,null)})(S=e.QuickHelpNLS||(e.QuickHelpNLS={}));var p;(function(s){s.quickCommandActionLabel=w.localize(26,null),s.quickCommandHelp=w.localize(27,null)})(p=e.QuickCommandNLS||(e.QuickCommandNLS={}));var C;(function(s){s.quickOutlineActionLabel=w.localize(28,null),s.quickOutlineByCategoryActionLabel=w.localize(29,null)})(C=e.QuickOutlineNLS||(e.QuickOutlineNLS={}));var n;(function(s){s.editorViewAccessibleLabel=w.localize(30,null),s.accessibilityHelpMessage=w.localize(31,null)})(n=e.StandaloneCodeEditorNLS||(e.StandaloneCodeEditorNLS={}));var g;(function(s){s.toggleHighContrast=w.localize(32,null)})(g=e.ToggleHighContrastNLS||(e.ToggleHighContrastNLS={}));var t;(function(s){s.bulkEditServiceSummary=w.localize(33,null)})(t=e.SimpleServicesNLS||(e.SimpleServicesNLS={}))}),define(J[481],ee([5,6]),function(j,e){return j.create("vs/editor/common/view/editorColorRegistry",e)}),define(J[482],ee([5,6]),function(j,e){return j.create("vs/editor/contrib/anchorSelect/anchorSelect",e)}),define(J[483],ee([5,6]),function(j,e){return j.create("vs/editor/contrib/bracketMatching/bracketMatching",e)}),define(J[484],ee([5,6]),function(j,e){return j.create("vs/editor/contrib/caretOperations/caretOperations",e)}),define(J[485],ee([5,6]),function(j,e){return j.create("vs/editor/contrib/caretOperations/transpose",e)}),define(J[486],ee([5,6]),function(j,e){return j.create("vs/editor/contrib/clipboard/clipboard",e)}),define(J[487],ee([5,6]),function(j,e){return j.create("vs/editor/contrib/codeAction/codeActionCommands",e)}),define(J[488],ee([5,6]),function(j,e){return j.create("vs/editor/contrib/codeAction/lightBulbWidget",e)}),define(J[489],ee([5,6]),function(j,e){return j.create("vs/editor/contrib/codelens/codelensController",e)}),define(J[490],ee([5,6]),function(j,e){return j.create("vs/editor/contrib/colorPicker/colorPickerWidget",e)}),define(J[491],ee([5,6]),function(j,e){return j.create("vs/editor/contrib/comment/comment",e)}),define(J[492],ee([5,6]),function(j,e){return j.create("vs/editor/contrib/contextmenu/contextmenu",e)}),define(J[493],ee([5,6]),function(j,e){return j.create("vs/editor/contrib/cursorUndo/cursorUndo",e)}),define(J[494],ee([5,6]),function(j,e){return j.create("vs/editor/contrib/find/findController",e)}),define(J[495],ee([5,6]),function(j,e){return j.create("vs/editor/contrib/find/findWidget",e)}),define(J[496],ee([5,6]),function(j,e){return j.create("vs/editor/contrib/folding/folding",e)}),define(J[497],ee([5,6]),function(j,e){return j.create("vs/editor/contrib/folding/foldingDecorations",e)}),define(J[498],ee([5,6]),function(j,e){return j.create("vs/editor/contrib/fontZoom/fontZoom",e)}),define(J[499],ee([5,6]),function(j,e){return j.create("vs/editor/contrib/format/format",e)}),define(J[500],ee([5,6]),function(j,e){return j.create("vs/editor/contrib/format/formatActions",e)}),define(J[501],ee([5,6]),function(j,e){return j.create("vs/editor/contrib/gotoError/gotoError",e)}),define(J[502],ee([5,6]),function(j,e){return j.create("vs/editor/contrib/gotoError/gotoErrorWidget",e)}),define(J[503],ee([5,6]),function(j,e){return j.create("vs/editor/contrib/gotoSymbol/goToCommands",e)}),define(J[504],ee([5,6]),function(j,e){return j.create("vs/editor/contrib/gotoSymbol/link/goToDefinitionAtPosition",e)}),define(J[505],ee([5,6]),function(j,e){return j.create("vs/editor/contrib/gotoSymbol/peek/referencesController",e)}),define(J[506],ee([5,6]),function(j,e){return j.create("vs/editor/contrib/gotoSymbol/peek/referencesTree",e)}),define(J[507],ee([5,6]),function(j,e){return j.create("vs/editor/contrib/gotoSymbol/peek/referencesWidget",e)}),define(J[508],ee([5,6]),function(j,e){return j.create("vs/editor/contrib/gotoSymbol/referencesModel",e)}),define(J[122],ee([0,1,11,4,131,2,47,44,8,3,508]),function(j,e,w,N,T,D,S,p,C,n,g){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ReferencesModel=e.FileReferences=e.FilePreview=e.OneReference=void 0;class t{constructor(a,r,o,i){this.isProviderFirst=a,this.parent=r,this.link=o,this._rangeCallback=i,this.id=T.defaultGenerator.nextId()}get uri(){return this.link.uri}get range(){var a,r;return(r=(a=this._range)!==null&&a!==void 0?a:this.link.targetSelectionRange)!==null&&r!==void 0?r:this.link.range}set range(a){this._range=a,this._rangeCallback(this)}get ariaMessage(){var a;const r=(a=this.parent.getPreview(this))===null||a===void 0?void 0:a.preview(this.range);return r?(0,g.localize)(1,null,(0,p.basename)(this.uri),this.range.startLineNumber,this.range.startColumn,r.value):(0,g.localize)(0,null,(0,p.basename)(this.uri),this.range.startLineNumber,this.range.startColumn)}}e.OneReference=t;class s{constructor(a){this._modelReference=a}dispose(){this._modelReference.dispose()}preview(a,r=8){const o=this._modelReference.object.textEditorModel;if(!o)return;const{startLineNumber:i,startColumn:l,endLineNumber:h,endColumn:f}=a,y=o.getWordUntilPosition({lineNumber:i,column:l-r}),_=new n.Range(i,y.startColumn,i,l),b=new n.Range(h,f,h,1073741824),v=o.getValueInRange(_).replace(/^\s+/,""),m=o.getValueInRange(a),E=o.getValueInRange(b).replace(/\s+$/,"");return{value:v+m+E,highlight:{start:v.length,end:v.length+m.length}}}}e.FilePreview=s;class c{constructor(a,r){this.parent=a,this.uri=r,this.children=[],this._previews=new S.ResourceMap}dispose(){(0,D.dispose)(this._previews.values()),this._previews.clear()}getPreview(a){return this._previews.get(a.uri)}get ariaMessage(){const a=this.children.length;return a===1?(0,g.localize)(2,null,(0,p.basename)(this.uri),this.uri.fsPath):(0,g.localize)(3,null,a,(0,p.basename)(this.uri),this.uri.fsPath)}resolve(a){return Re(this,void 0,void 0,function*(){if(this._previews.size!==0)return this;for(let r of this.children)if(!this._previews.has(r.uri))try{const o=yield a.createModelReference(r.uri);this._previews.set(r.uri,new s(o))}catch(o){(0,w.onUnexpectedError)(o)}return this})}}e.FileReferences=c;class u{constructor(a,r){this.groups=[],this.references=[],this._onDidChangeReferenceRange=new N.Emitter,this.onDidChangeReferenceRange=this._onDidChangeReferenceRange.event,this._links=a,this._title=r;const[o]=a;a.sort(u._compareReferences);let i;for(let l of a)if((!i||!p.extUri.isEqual(i.uri,l.uri,!0))&&(i=new c(this,l.uri),this.groups.push(i)),i.children.length===0||u._compareReferences(l,i.children[i.children.length-1])!==0){const h=new t(o===l,i,l,f=>this._onDidChangeReferenceRange.fire(f));this.references.push(h),i.children.push(h)}}dispose(){(0,D.dispose)(this.groups),this._onDidChangeReferenceRange.dispose(),this.groups.length=0}clone(){return new u(this._links,this._title)}get title(){return this._title}get isEmpty(){return this.groups.length===0}get ariaMessage(){return this.isEmpty?(0,g.localize)(4,null):this.references.length===1?(0,g.localize)(5,null,this.references[0].uri.fsPath):this.groups.length===1?(0,g.localize)(6,null,this.references.length,this.groups[0].uri.fsPath):(0,g.localize)(7,null,this.references.length,this.groups.length)}nextOrPreviousReference(a,r){let{parent:o}=a,i=o.children.indexOf(a),l=o.children.length,h=o.parent.groups.length;return h===1||r&&i+1<l||!r&&i>0?(r?i=(i+1)%l:i=(i+l-1)%l,o.children[i]):(i=o.parent.groups.indexOf(o),r?(i=(i+1)%h,o.parent.groups[i].children[0]):(i=(i+h-1)%h,o.parent.groups[i].children[o.parent.groups[i].children.length-1]))}nearestReference(a,r){const o=this.references.map((i,l)=>({idx:l,prefixLen:C.commonPrefixLength(i.uri.toString(),a.toString()),offsetDist:Math.abs(i.range.startLineNumber-r.lineNumber)*100+Math.abs(i.range.startColumn-r.column)})).sort((i,l)=>i.prefixLen>l.prefixLen?-1:i.prefixLen<l.prefixLen?1:i.offsetDist<l.offsetDist?-1:i.offsetDist>l.offsetDist?1:0)[0];if(o)return this.references[o.idx]}referenceAt(a,r){for(const o of this.references)if(o.uri.toString()===a.toString()&&n.Range.containsPosition(o.range,r))return o}firstReference(){for(const a of this.references)if(a.isProviderFirst)return a;return this.references[0]}static _compareReferences(a,r){return p.extUri.compare(a.uri,r.uri)||n.Range.compareRangesUsingStarts(a.range,r.range)}}e.ReferencesModel=u}),define(J[509],ee([5,6]),function(j,e){return j.create("vs/editor/contrib/gotoSymbol/symbolNavigation",e)}),define(J[510],ee([5,6]),function(j,e){return j.create("vs/editor/contrib/hover/hover",e)}),define(J[511],ee([5,6]),function(j,e){return j.create("vs/editor/contrib/hover/markdownHoverParticipant",e)}),define(J[512],ee([5,6]),function(j,e){return j.create("vs/editor/contrib/hover/markerHoverParticipant",e)}),define(J[513],ee([5,6]),function(j,e){return j.create("vs/editor/contrib/inPlaceReplace/inPlaceReplace",e)}),define(J[514],ee([5,6]),function(j,e){return j.create("vs/editor/contrib/indentation/indentation",e)}),define(J[515],ee([5,6]),function(j,e){return j.create("vs/editor/contrib/inlineCompletions/ghostTextController",e)}),define(J[516],ee([5,6]),function(j,e){return j.create("vs/editor/contrib/inlineCompletions/inlineCompletionsHoverParticipant",e)}),define(J[517],ee([5,6]),function(j,e){return j.create("vs/editor/contrib/linesOperations/linesOperations",e)}),define(J[518],ee([5,6]),function(j,e){return j.create("vs/editor/contrib/linkedEditing/linkedEditing",e)}),define(J[519],ee([5,6]),function(j,e){return j.create("vs/editor/contrib/links/links",e)}),define(J[520],ee([5,6]),function(j,e){return j.create("vs/editor/contrib/message/messageController",e)}),define(J[521],ee([5,6]),function(j,e){return j.create("vs/editor/contrib/multicursor/multicursor",e)}),define(J[522],ee([5,6]),function(j,e){return j.create("vs/editor/contrib/parameterHints/parameterHints",e)}),define(J[523],ee([5,6]),function(j,e){return j.create("vs/editor/contrib/parameterHints/parameterHintsWidget",e)}),define(J[524],ee([5,6]),function(j,e){return j.create("vs/editor/contrib/peekView/peekView",e)}),define(J[525],ee([5,6]),function(j,e){return j.create("vs/editor/contrib/quickAccess/gotoLineQuickAccess",e)}),define(J[526],ee([5,6]),function(j,e){return j.create("vs/editor/contrib/quickAccess/gotoSymbolQuickAccess",e)}),define(J[527],ee([5,6]),function(j,e){return j.create("vs/editor/contrib/rename/rename",e)}),define(J[528],ee([5,6]),function(j,e){return j.create("vs/editor/contrib/rename/renameInputField",e)}),define(J[529],ee([5,6]),function(j,e){return j.create("vs/editor/contrib/smartSelect/smartSelect",e)}),define(J[530],ee([5,6]),function(j,e){return j.create("vs/editor/contrib/snippet/snippetController2",e)}),define(J[531],ee([5,6]),function(j,e){return j.create("vs/editor/contrib/snippet/snippetVariables",e)}),define(J[532],ee([5,6]),function(j,e){return j.create("vs/editor/contrib/suggest/suggest",e)}),define(J[533],ee([5,6]),function(j,e){return j.create("vs/editor/contrib/suggest/suggestController",e)}),define(J[534],ee([5,6]),function(j,e){return j.create("vs/editor/contrib/suggest/suggestWidget",e)}),define(J[535],ee([5,6]),function(j,e){return j.create("vs/editor/contrib/suggest/suggestWidgetDetails",e)}),define(J[536],ee([5,6]),function(j,e){return j.create("vs/editor/contrib/suggest/suggestWidgetRenderer",e)}),define(J[537],ee([5,6]),function(j,e){return j.create("vs/editor/contrib/suggest/suggestWidgetStatus",e)}),define(J[538],ee([5,6]),function(j,e){return j.create("vs/editor/contrib/symbolIcons/symbolIcons",e)}),define(J[539],ee([5,6]),function(j,e){return j.create("vs/editor/contrib/toggleTabFocusMode/toggleTabFocusMode",e)}),define(J[540],ee([5,6]),function(j,e){return j.create("vs/editor/contrib/tokenization/tokenization",e)}),define(J[541],ee([5,6]),function(j,e){return j.create("vs/editor/contrib/unusualLineTerminators/unusualLineTerminators",e)}),define(J[542],ee([5,6]),function(j,e){return j.create("vs/editor/contrib/wordHighlighter/wordHighlighter",e)}),define(J[543],ee([5,6]),function(j,e){return j.create("vs/editor/contrib/wordOperations/wordOperations",e)}),define(J[544],ee([5,6]),function(j,e){return j.create("vs/platform/actions/browser/menuEntryActionViewItem",e)}),define(J[545],ee([5,6]),function(j,e){return j.create("vs/platform/configuration/common/configurationRegistry",e)}),define(J[546],ee([5,6]),function(j,e){return j.create("vs/platform/contextkey/browser/contextKeyService",e)}),define(J[547],ee([5,6]),function(j,e){return j.create("vs/platform/contextkey/common/contextkeys",e)}),define(J[548],ee([5,6]),function(j,e){return j.create("vs/platform/keybinding/common/abstractKeybindingService",e)}),define(J[549],ee([5,6]),function(j,e){return j.create("vs/platform/list/browser/listService",e)}),define(J[550],ee([5,6]),function(j,e){return j.create("vs/platform/markers/common/markers",e)}),define(J[551],ee([5,6]),function(j,e){return j.create("vs/platform/quickinput/browser/commandsQuickAccess",e)}),define(J[552],ee([5,6]),function(j,e){return j.create("vs/platform/quickinput/browser/helpQuickAccess",e)}),define(J[553],ee([5,6]),function(j,e){return j.create("vs/platform/theme/common/colorRegistry",e)}),define(J[554],ee([5,6]),function(j,e){return j.create("vs/platform/theme/common/iconRegistry",e)}),define(J[555],ee([5,6]),function(j,e){return j.create("vs/platform/undoRedo/common/undoRedoService",e)}),define(J[556],ee([0,1]),function(j,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.showHistoryKeybindingHint=void 0;function w(N){var T,D;return((T=N.lookupKeybinding("history.showPrevious"))===null||T===void 0?void 0:T.getElectronAccelerator())==="Up"&&((D=N.lookupKeybinding("history.showNext"))===null||D===void 0?void 0:D.getElectronAccelerator())==="Down"}e.showHistoryKeybindingHint=w}),define(J[557],ee([0,1,7]),function(j,e,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BrowserClipboardService=void 0;class N{constructor(){this.mapTextToType=new Map,this.findText=""}writeText(D,S){return Re(this,void 0,void 0,function*(){if(S){this.mapTextToType.set(S,D);return}try{return yield navigator.clipboard.writeText(D)}catch(n){console.error(n)}const p=document.activeElement,C=document.body.appendChild((0,w.$)("textarea",{"aria-hidden":!0}));C.style.height="1px",C.style.width="1px",C.style.position="absolute",C.value=D,C.focus(),C.select(),document.execCommand("copy"),p instanceof HTMLElement&&p.focus(),document.body.removeChild(C)})}readText(D){return Re(this,void 0,void 0,function*(){if(D)return this.mapTextToType.get(D)||"";try{return yield navigator.clipboard.readText()}catch(S){return console.error(S),""}})}readFindText(){return Re(this,void 0,void 0,function*(){return this.findText})}writeFindText(D){return Re(this,void 0,void 0,function*(){this.findText=D})}}e.BrowserClipboardService=N}),define(J[558],ee([0,1]),function(j,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EditorOpenContext=void 0;var w;(function(N){N[N.API=0]="API",N[N.USER=1]="USER"})(w=e.EditorOpenContext||(e.EditorOpenContext={}))}),define(J[559],ee([0,1]),function(j,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ExtensionIdentifier=void 0;class w{constructor(T){this.value=T,this._lower=T.toLowerCase()}static toKey(T){return typeof T=="string"?T.toLowerCase():T._lower}}e.ExtensionIdentifier=w}),define(J[250],ee([0,1]),function(j,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.FileKind=void 0;var w;(function(N){N[N.FILE=0]="FILE",N[N.FOLDER=1]="FOLDER",N[N.ROOT_FOLDER=2]="ROOT_FOLDER"})(w=e.FileKind||(e.FileKind={}))}),define(J[251],ee([0,1]),function(j,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SyncDescriptor=void 0;class w{constructor(T,D=[],S=!1){this.ctor=T,this.staticArguments=D,this.supportsDelayedInstantiation=S}}e.SyncDescriptor=w}),define(J[70],ee([0,1,251]),function(j,e,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getSingletonServiceDescriptors=e.registerSingleton=void 0;const N=[];function T(S,p,C){p instanceof w.SyncDescriptor||(p=new w.SyncDescriptor(p,[],C)),N.push([S,p])}e.registerSingleton=T;function D(){return N}e.getSingletonServiceDescriptors=D}),define(J[560],ee([0,1]),function(j,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Graph=e.Node=void 0;class w{constructor(D){this.incoming=new Map,this.outgoing=new Map,this.data=D}}e.Node=w;class N{constructor(D){this._hashFn=D,this._nodes=new Map}roots(){const D=[];for(let S of this._nodes.values())S.outgoing.size===0&&D.push(S);return D}insertEdge(D,S){const p=this.lookupOrInsertNode(D),C=this.lookupOrInsertNode(S);p.outgoing.set(this._hashFn(S),C),C.incoming.set(this._hashFn(D),p)}removeNode(D){const S=this._hashFn(D);this._nodes.delete(S);for(let p of this._nodes.values())p.outgoing.delete(S),p.incoming.delete(S)}lookupOrInsertNode(D){const S=this._hashFn(D);let p=this._nodes.get(S);return p||(p=new w(D),this._nodes.set(S,p)),p}isEmpty(){return this._nodes.size===0}toString(){let D=[];for(let[S,p]of this._nodes)D.push(`${S}, (incoming)[${[...p.incoming.keys()].join(", ")}], (outgoing)[${[...p.outgoing.keys()].join(",")}]`);return D.join(`
`)}findCycleSlow(){for(let[D,S]of this._nodes){const p=new Set([D]),C=this._findCycle(S,p);if(C)return C}}_findCycle(D,S){for(let[p,C]of D.outgoing){if(S.has(p))return[...S,p].join(" -> ");S.add(p);const n=this._findCycle(C,S);if(n)return n;S.delete(p)}}}e.Graph=N}),define(J[9],ee([0,1]),function(j,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.optional=e.createDecorator=e.IInstantiationService=e._util=void 0;var w;(function(S){S.serviceIds=new Map,S.DI_TARGET="$di$target",S.DI_DEPENDENCIES="$di$dependencies";function p(C){return C[S.DI_DEPENDENCIES]||[]}S.getServiceDependencies=p})(w=e._util||(e._util={})),e.IInstantiationService=T("instantiationService");function N(S,p,C,n){p[w.DI_TARGET]===p?p[w.DI_DEPENDENCIES].push({id:S,index:C,optional:n}):(p[w.DI_DEPENDENCIES]=[{id:S,index:C,optional:n}],p[w.DI_TARGET]=p)}function T(S){if(w.serviceIds.has(S))return w.serviceIds.get(S);const p=function(C,n,g){if(arguments.length!==3)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");N(p,C,g,!1)};return p.toString=()=>S,w.serviceIds.set(S,p),p}e.createDecorator=T;function D(S){return function(p,C,n){if(arguments.length!==3)throw new Error("@optional-decorator can only be used to decorate a parameter");N(S,p,n,!0)}}e.optional=D}),define(J[146],ee([0,1,9,24,20]),function(j,e,w,N,T){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ResourceFileEdit=e.ResourceTextEdit=e.ResourceEdit=e.IBulkEditService=void 0,e.IBulkEditService=(0,w.createDecorator)("IWorkspaceEditService");function D(g){return(0,T.isObject)(g)&&(Boolean(g.newUri)||Boolean(g.oldUri))}function S(g){return(0,T.isObject)(g)&&N.URI.isUri(g.resource)&&(0,T.isObject)(g.edit)}class p{constructor(t){this.metadata=t}static convert(t){return t.edits.map(s=>{if(S(s))return new C(s.resource,s.edit,s.modelVersionId,s.metadata);if(D(s))return new n(s.oldUri,s.newUri,s.options,s.metadata);throw new Error("Unsupported edit")})}}e.ResourceEdit=p;class C extends p{constructor(t,s,c,u){super(u);this.resource=t,this.textEdit=s,this.versionId=c}}e.ResourceTextEdit=C;class n extends p{constructor(t,s,c,u){super(u);this.oldResource=t,this.newResource=s,this.options=c}}e.ResourceFileEdit=n}),define(J[28],ee([0,1,9]),function(j,e,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ICodeEditorService=void 0,e.ICodeEditorService=(0,w.createDecorator)("codeEditorService")}),define(J[78],ee([0,1,9]),function(j,e,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IEditorWorkerService=e.ID_EDITOR_WORKER_SERVICE=void 0,e.ID_EDITOR_WORKER_SERVICE="editorWorkerService",e.IEditorWorkerService=(0,w.createDecorator)(e.ID_EDITOR_WORKER_SERVICE)}),define(J[190],ee([0,1,9]),function(j,e,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IMarkerDecorationsService=void 0,e.IMarkerDecorationsService=(0,w.createDecorator)("markerDecorationsService")}),define(J[39],ee([0,1,9]),function(j,e,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IModeService=void 0,e.IModeService=(0,w.createDecorator)("modeService")}),define(J[42],ee([0,1,9]),function(j,e,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.shouldSynchronizeModel=e.IModelService=void 0,e.IModelService=(0,w.createDecorator)("modelService");function N(T){return!T.isTooLargeForSyncing()&&!T.isForSimpleWidget}e.shouldSynchronizeModel=N}),define(J[147],ee([0,1,4,95,2,47,106,395,42]),function(j,e,w,N,T,D,S,p,C){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LanguageFeatureRequestDelays=e.LanguageFeatureRegistry=void 0;function n(d){return typeof d=="string"?!1:Array.isArray(d)?d.every(n):!!d.exclusive}class g{constructor(){this._clock=0,this._entries=[],this._onDidChange=new w.Emitter}get onDidChange(){return this._onDidChange.event}register(a,r){let o={selector:a,provider:r,_score:-1,_time:this._clock++};return this._entries.push(o),this._lastCandidate=void 0,this._onDidChange.fire(this._entries.length),(0,T.toDisposable)(()=>{if(o){let i=this._entries.indexOf(o);i>=0&&(this._entries.splice(i,1),this._lastCandidate=void 0,this._onDidChange.fire(this._entries.length),o=void 0)}})}has(a){return this.all(a).length>0}all(a){if(!a)return[];this._updateScores(a);const r=[];for(let o of this._entries)o._score>0&&r.push(o.provider);return r}ordered(a){const r=[];return this._orderedForEach(a,o=>r.push(o.provider)),r}orderedGroups(a){const r=[];let o,i;return this._orderedForEach(a,l=>{o&&i===l._score?o.push(l.provider):(i=l._score,o=[l.provider],r.push(o))}),r}_orderedForEach(a,r){if(!!a){this._updateScores(a);for(const o of this._entries)o._score>0&&r(o)}}_updateScores(a){let r={uri:a.uri.toString(),language:a.getLanguageId()};if(!(this._lastCandidate&&this._lastCandidate.language===r.language&&this._lastCandidate.uri===r.uri)){this._lastCandidate=r;for(let o of this._entries)if(o._score=(0,p.score)(o.selector,a.uri,a.getLanguageId(),(0,C.shouldSynchronizeModel)(a)),n(o.selector)&&o._score>0){for(let i of this._entries)i._score=0;o._score=1e3;break}this._entries.sort(g._compareByScoreAndTime)}}static _compareByScoreAndTime(a,r){return a._score<r._score?1:a._score>r._score?-1:a._time<r._time?1:a._time>r._time?-1:0}}e.LanguageFeatureRegistry=g;const t=new WeakMap;let s=0;function c(d){let a=t.get(d);return a===void 0&&(a=++s,t.set(d,a)),a}class u{constructor(a,r,o=Number.MAX_SAFE_INTEGER){this._registry=a,this.min=r,this.max=o,this._cache=new D.LRUCache(50,.7)}_key(a){return a.id+this._registry.all(a).reduce((r,o)=>(0,N.doHash)(c(o),r),0)}_clamp(a){return a===void 0?this.min:Math.min(this.max,Math.max(this.min,Math.floor(a*1.3)))}get(a){const r=this._key(a),o=this._cache.get(r);return this._clamp(o==null?void 0:o.value)}update(a,r){const o=this._key(a);let i=this._cache.get(o);return i||(i=new S.MovingAverage,this._cache.set(o,i)),i.update(r),this.get(a)}}e.LanguageFeatureRequestDelays=u}),define(J[18],ee([0,1,24,3,147,403,27]),function(j,e,w,N,T,D,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TokenizationRegistry=e.DocumentRangeSemanticTokensProviderRegistry=e.DocumentSemanticTokensProviderRegistry=e.FoldingRangeProviderRegistry=e.SelectionRangeRegistry=e.ColorProviderRegistry=e.LinkProviderRegistry=e.OnTypeFormattingEditProviderRegistry=e.DocumentRangeFormattingEditProviderRegistry=e.DocumentFormattingEditProviderRegistry=e.CodeActionProviderRegistry=e.InlayHintsProviderRegistry=e.CodeLensProviderRegistry=e.TypeDefinitionProviderRegistry=e.ImplementationProviderRegistry=e.DeclarationProviderRegistry=e.DefinitionProviderRegistry=e.LinkedEditingRangeProviderRegistry=e.DocumentHighlightProviderRegistry=e.DocumentSymbolProviderRegistry=e.HoverProviderRegistry=e.SignatureHelpProviderRegistry=e.InlineCompletionsProviderRegistry=e.CompletionProviderRegistry=e.RenameProviderRegistry=e.ReferenceProviderRegistry=e.InlayHintKind=e.FoldingRangeKind=e.SymbolKinds=e.isLocationLink=e.DocumentHighlightKind=e.SignatureHelpTriggerKind=e.InlineCompletionTriggerKind=e.completionKindFromString=e.completionKindToCssClass=e.TokenMetadata=void 0;class p{static getLanguageId(a){return(a&255)>>>0}static getTokenType(a){return(a&1792)>>>8}static getFontStyle(a){return(a&14336)>>>11}static getForeground(a){return(a&8372224)>>>14}static getBackground(a){return(a&4286578688)>>>23}static getClassNameFromMetadata(a){let r=this.getForeground(a),o="mtk"+r,i=this.getFontStyle(a);return i&1&&(o+=" mtki"),i&2&&(o+=" mtkb"),i&4&&(o+=" mtku"),o}static getInlineStyleFromMetadata(a,r){const o=this.getForeground(a),i=this.getFontStyle(a);let l=`color: ${r[o]};`;return i&1&&(l+="font-style: italic;"),i&2&&(l+="font-weight: bold;"),i&4&&(l+="text-decoration: underline;"),l}}e.TokenMetadata=p,e.completionKindToCssClass=function(){let d=Object.create(null);return d[0]="symbol-method",d[1]="symbol-function",d[2]="symbol-constructor",d[3]="symbol-field",d[4]="symbol-variable",d[5]="symbol-class",d[6]="symbol-struct",d[7]="symbol-interface",d[8]="symbol-module",d[9]="symbol-property",d[10]="symbol-event",d[11]="symbol-operator",d[12]="symbol-unit",d[13]="symbol-value",d[14]="symbol-constant",d[15]="symbol-enum",d[16]="symbol-enum-member",d[17]="symbol-keyword",d[27]="symbol-snippet",d[18]="symbol-text",d[19]="symbol-color",d[20]="symbol-file",d[21]="symbol-reference",d[22]="symbol-customcolor",d[23]="symbol-folder",d[24]="symbol-type-parameter",d[25]="account",d[26]="issues",function(a){const r=d[a];let o=r&&S.iconRegistry.get(r);return o||(console.info("No codicon found for CompletionItemKind "+a),o=S.Codicon.symbolProperty),o.classNames}}(),e.completionKindFromString=function(){let d=Object.create(null);return d.method=0,d.function=1,d.constructor=2,d.field=3,d.variable=4,d.class=5,d.struct=6,d.interface=7,d.module=8,d.property=9,d.event=10,d.operator=11,d.unit=12,d.value=13,d.constant=14,d.enum=15,d["enum-member"]=16,d.enumMember=16,d.keyword=17,d.snippet=27,d.text=18,d.color=19,d.file=20,d.reference=21,d.customcolor=22,d.folder=23,d["type-parameter"]=24,d.typeParameter=24,d.account=25,d.issue=26,function(a,r){let o=d[a];return typeof o=="undefined"&&!r&&(o=9),o}}();var C;(function(d){d[d.Automatic=0]="Automatic",d[d.Explicit=1]="Explicit"})(C=e.InlineCompletionTriggerKind||(e.InlineCompletionTriggerKind={}));var n;(function(d){d[d.Invoke=1]="Invoke",d[d.TriggerCharacter=2]="TriggerCharacter",d[d.ContentChange=3]="ContentChange"})(n=e.SignatureHelpTriggerKind||(e.SignatureHelpTriggerKind={}));var g;(function(d){d[d.Text=0]="Text",d[d.Read=1]="Read",d[d.Write=2]="Write"})(g=e.DocumentHighlightKind||(e.DocumentHighlightKind={}));function t(d){return d&&w.URI.isUri(d.uri)&&N.Range.isIRange(d.range)&&(N.Range.isIRange(d.originSelectionRange)||N.Range.isIRange(d.targetSelectionRange))}e.isLocationLink=t;var s;(function(d){const a=new Map;a.set("file",0),a.set("module",1),a.set("namespace",2),a.set("package",3),a.set("class",4),a.set("method",5),a.set("property",6),a.set("field",7),a.set("constructor",8),a.set("enum",9),a.set("interface",10),a.set("function",11),a.set("variable",12),a.set("constant",13),a.set("string",14),a.set("number",15),a.set("boolean",16),a.set("array",17),a.set("object",18),a.set("key",19),a.set("null",20),a.set("enum-member",21),a.set("struct",22),a.set("event",23),a.set("operator",24),a.set("type-parameter",25);const r=new Map;r.set(0,"file"),r.set(1,"module"),r.set(2,"namespace"),r.set(3,"package"),r.set(4,"class"),r.set(5,"method"),r.set(6,"property"),r.set(7,"field"),r.set(8,"constructor"),r.set(9,"enum"),r.set(10,"interface"),r.set(11,"function"),r.set(12,"variable"),r.set(13,"constant"),r.set(14,"string"),r.set(15,"number"),r.set(16,"boolean"),r.set(17,"array"),r.set(18,"object"),r.set(19,"key"),r.set(20,"null"),r.set(21,"enum-member"),r.set(22,"struct"),r.set(23,"event"),r.set(24,"operator"),r.set(25,"type-parameter");function o(h){return a.get(h)}d.fromString=o;function i(h){return r.get(h)}d.toString=i;function l(h,f){const y=r.get(h);let _=y&&S.iconRegistry.get("symbol-"+y);return _||(console.info("No codicon found for SymbolKind "+h),_=S.Codicon.symbolProperty),`${f?"inline":"block"} ${_.classNames}`}d.toCssClassName=l})(s=e.SymbolKinds||(e.SymbolKinds={}));class c{constructor(a){this.value=a}}e.FoldingRangeKind=c,c.Comment=new c("comment"),c.Imports=new c("imports"),c.Region=new c("region");var u;(function(d){d[d.Other=0]="Other",d[d.Type=1]="Type",d[d.Parameter=2]="Parameter"})(u=e.InlayHintKind||(e.InlayHintKind={})),e.ReferenceProviderRegistry=new T.LanguageFeatureRegistry,e.RenameProviderRegistry=new T.LanguageFeatureRegistry,e.CompletionProviderRegistry=new T.LanguageFeatureRegistry,e.InlineCompletionsProviderRegistry=new T.LanguageFeatureRegistry,e.SignatureHelpProviderRegistry=new T.LanguageFeatureRegistry,e.HoverProviderRegistry=new T.LanguageFeatureRegistry,e.DocumentSymbolProviderRegistry=new T.LanguageFeatureRegistry,e.DocumentHighlightProviderRegistry=new T.LanguageFeatureRegistry,e.LinkedEditingRangeProviderRegistry=new T.LanguageFeatureRegistry,e.DefinitionProviderRegistry=new T.LanguageFeatureRegistry,e.DeclarationProviderRegistry=new T.LanguageFeatureRegistry,e.ImplementationProviderRegistry=new T.LanguageFeatureRegistry,e.TypeDefinitionProviderRegistry=new T.LanguageFeatureRegistry,e.CodeLensProviderRegistry=new T.LanguageFeatureRegistry,e.InlayHintsProviderRegistry=new T.LanguageFeatureRegistry,e.CodeActionProviderRegistry=new T.LanguageFeatureRegistry,e.DocumentFormattingEditProviderRegistry=new T.LanguageFeatureRegistry,e.DocumentRangeFormattingEditProviderRegistry=new T.LanguageFeatureRegistry,e.OnTypeFormattingEditProviderRegistry=new T.LanguageFeatureRegistry,e.LinkProviderRegistry=new T.LanguageFeatureRegistry,e.ColorProviderRegistry=new T.LanguageFeatureRegistry,e.SelectionRangeRegistry=new T.LanguageFeatureRegistry,e.FoldingRangeProviderRegistry=new T.LanguageFeatureRegistry,e.DocumentSemanticTokensProviderRegistry=new T.LanguageFeatureRegistry,e.DocumentRangeSemanticTokensProviderRegistry=new T.LanguageFeatureRegistry,e.TokenizationRegistry=new D.TokenizationRegistryImpl}),define(J[87],ee([0,1,18]),function(j,e,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SlicedLineTokens=e.LineTokens=void 0;class N{constructor(S,p,C){this._lineTokensBrand=void 0,this._tokens=S,this._tokensCount=this._tokens.length>>>1,this._text=p,this._languageIdCodec=C}static createEmpty(S,p){const C=N.defaultTokenMetadata,n=new Uint32Array(2);return n[0]=S.length,n[1]=C,new N(n,S,p)}equals(S){return S instanceof N?this.slicedEquals(S,0,this._tokensCount):!1}slicedEquals(S,p,C){if(this._text!==S._text||this._tokensCount!==S._tokensCount)return!1;const n=p<<1,g=n+(C<<1);for(let t=n;t<g;t++)if(this._tokens[t]!==S._tokens[t])return!1;return!0}getLineContent(){return this._text}getCount(){return this._tokensCount}getStartOffset(S){return S>0?this._tokens[S-1<<1]:0}getMetadata(S){return this._tokens[(S<<1)+1]}getLanguageId(S){const p=this._tokens[(S<<1)+1],C=w.TokenMetadata.getLanguageId(p);return this._languageIdCodec.decodeLanguageId(C)}getStandardTokenType(S){const p=this._tokens[(S<<1)+1];return w.TokenMetadata.getTokenType(p)}getForeground(S){const p=this._tokens[(S<<1)+1];return w.TokenMetadata.getForeground(p)}getClassName(S){const p=this._tokens[(S<<1)+1];return w.TokenMetadata.getClassNameFromMetadata(p)}getInlineStyle(S,p){const C=this._tokens[(S<<1)+1];return w.TokenMetadata.getInlineStyleFromMetadata(C,p)}getEndOffset(S){return this._tokens[S<<1]}findTokenIndexAtOffset(S){return N.findIndexInTokensArray(this._tokens,S)}inflate(){return this}sliceAndInflate(S,p,C){return new T(this,S,p,C)}static convertToEndOffset(S,p){const n=(S.length>>>1)-1;for(let g=0;g<n;g++)S[g<<1]=S[g+1<<1];S[n<<1]=p}static findIndexInTokensArray(S,p){if(S.length<=2)return 0;let C=0,n=(S.length>>>1)-1;for(;C<n;){const g=C+Math.floor((n-C)/2),t=S[g<<1];if(t===p)return g+1;t<p?C=g+1:t>p&&(n=g)}return C}withInserted(S){if(S.length===0)return this;let p=0,C=0,n="";const g=new Array;let t=0;for(;;){let s=p<this._tokensCount?this._tokens[p<<1]:-1,c=C<S.length?S[C]:null;if(s!==-1&&(c===null||s<=c.offset)){n+=this._text.substring(t,s);const u=this._tokens[(p<<1)+1];g.push(n.length,u),p++,t=s}else if(c){if(c.offset>t){n+=this._text.substring(t,c.offset);const u=this._tokens[(p<<1)+1];g.push(n.length,u),t=c.offset}n+=c.text,g.push(n.length,c.tokenMetadata),C++}else break}return new N(new Uint32Array(g),n,this._languageIdCodec)}}e.LineTokens=N,N.defaultTokenMetadata=(0<<11|1<<14|2<<23)>>>0;class T{constructor(S,p,C,n){this._source=S,this._startOffset=p,this._endOffset=C,this._deltaOffset=n,this._firstTokenIndex=S.findTokenIndexAtOffset(p),this._tokensCount=0;for(let g=this._firstTokenIndex,t=S.getCount();g<t&&!(S.getStartOffset(g)>=C);g++)this._tokensCount++}equals(S){return S instanceof T?this._startOffset===S._startOffset&&this._endOffset===S._endOffset&&this._deltaOffset===S._deltaOffset&&this._source.slicedEquals(S._source,this._firstTokenIndex,this._tokensCount):!1}getCount(){return this._tokensCount}getForeground(S){return this._source.getForeground(this._firstTokenIndex+S)}getEndOffset(S){const p=this._source.getEndOffset(this._firstTokenIndex+S);return Math.min(this._endOffset,p)-this._startOffset+this._deltaOffset}getClassName(S){return this._source.getClassName(this._firstTokenIndex+S)}getInlineStyle(S,p){return this._source.getInlineStyle(this._firstTokenIndex+S,p)}findTokenIndexAtOffset(S){return this._source.findTokenIndexAtOffset(S+this._startOffset-this._deltaOffset)-this._firstTokenIndex}}e.SlicedLineTokens=T}),define(J[252],ee([0,1,11,115,18,142,85]),function(j,e,w,N,T,D,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.FastTokenizer=e.TextBufferTokenizer=e.Token=void 0;class p{constructor(s,c,u,d,a){this.length=s,this.kind=c,this.bracketId=u,this.bracketIds=d,this.astNode=a}}e.Token=p;class C{constructor(s,c){this.textModel=s,this.bracketTokens=c,this.reader=new n(this.textModel,this.bracketTokens),this._offset=S.lengthZero,this.didPeek=!1,this.peeked=null,this.textBufferLineCount=s.getLineCount(),this.textBufferLastLineLength=s.getLineLength(this.textBufferLineCount)}get offset(){return this._offset}get length(){return(0,S.toLength)(this.textBufferLineCount,this.textBufferLastLineLength)}skip(s){this.didPeek=!1,this._offset=(0,S.lengthAdd)(this._offset,s);const c=(0,S.lengthToObj)(this._offset);this.reader.setPosition(c.lineCount,c.columnCount)}read(){let s;return this.peeked?(this.didPeek=!1,s=this.peeked):s=this.reader.read(),s&&(this._offset=(0,S.lengthAdd)(this._offset,s.length)),s}peek(){return this.didPeek||(this.peeked=this.reader.read(),this.didPeek=!0),this.peeked}}e.TextBufferTokenizer=C;class n{constructor(s,c){this.textModel=s,this.bracketTokens=c,this.lineIdx=0,this.line=null,this.lineCharOffset=0,this.lineTokens=null,this.lineTokenOffset=0,this.peekedToken=null,this.textBufferLineCount=s.getLineCount(),this.textBufferLastLineLength=s.getLineLength(this.textBufferLineCount)}setPosition(s,c){s===this.lineIdx?(this.lineCharOffset=c,this.lineTokenOffset=this.lineCharOffset===0?0:this.lineTokens.findTokenIndexAtOffset(this.lineCharOffset)):(this.lineIdx=s,this.lineCharOffset=c,this.line=null),this.peekedToken=null}read(){if(this.peekedToken){const a=this.peekedToken;return this.peekedToken=null,this.lineCharOffset+=(0,S.lengthGetColumnCountIfZeroLineCount)(a.length),a}if(this.lineIdx>this.textBufferLineCount-1||this.lineIdx===this.textBufferLineCount-1&&this.lineCharOffset>=this.textBufferLastLineLength)return null;this.line===null&&(this.lineTokens=this.textModel.getLineTokens(this.lineIdx+1),this.line=this.lineTokens.getLineContent(),this.lineTokenOffset=this.lineCharOffset===0?0:this.lineTokens.findTokenIndexAtOffset(this.lineCharOffset));const s=this.lineIdx,c=this.lineCharOffset;let u=0;for(;;){const a=this.lineTokens,r=a.getCount();let o=null;if(this.lineTokenOffset<r){const i=a.getMetadata(this.lineTokenOffset);for(;this.lineTokenOffset+1<r&&i===a.getMetadata(this.lineTokenOffset+1);)this.lineTokenOffset++;const l=T.TokenMetadata.getTokenType(i)===0,h=a.getEndOffset(this.lineTokenOffset);if(l&&h!==this.lineCharOffset){const f=a.getLanguageId(this.lineTokenOffset),y=this.line.substring(this.lineCharOffset,h),_=this.bracketTokens.getSingleLanguageBracketTokens(f),b=_.regExpGlobal;if(b){b.lastIndex=0;const v=b.exec(y);v&&(o=_.getToken(v[0]),o&&(this.lineCharOffset+=v.index))}}if(u+=h-this.lineCharOffset,o)if(s!==this.lineIdx||c!==this.lineCharOffset){this.peekedToken=o;break}else return this.lineCharOffset+=(0,S.lengthGetColumnCountIfZeroLineCount)(o.length),o;else this.lineTokenOffset++,this.lineCharOffset=h}else if(this.lineIdx===this.textBufferLineCount-1||(this.lineIdx++,this.lineTokens=this.textModel.getLineTokens(this.lineIdx+1),this.lineTokenOffset=0,this.line=this.lineTokens.getLineContent(),this.lineCharOffset=0,u+=33,u>1e3))break;if(u>1500)break}const d=(0,S.lengthDiff)(s,c,this.lineIdx,this.lineCharOffset);return new p(d,0,-1,N.SmallImmutableSet.getEmpty(),new D.TextAstNode(d))}}class g{constructor(s,c){this.text=s,this._offset=S.lengthZero,this.idx=0;const d=c.getRegExpStr()?new RegExp(c.getRegExpStr()+`|
`,"g"):null,a=[];let r,o=0,i=0,l=0,h=0;const f=new Array;for(let b=0;b<60;b++)f.push(new p((0,S.toLength)(0,b),0,-1,N.SmallImmutableSet.getEmpty(),new D.TextAstNode((0,S.toLength)(0,b))));const y=new Array;for(let b=0;b<60;b++)y.push(new p((0,S.toLength)(1,b),0,-1,N.SmallImmutableSet.getEmpty(),new D.TextAstNode((0,S.toLength)(1,b))));if(d)for(d.lastIndex=0;(r=d.exec(s))!==null;){const b=r.index,v=r[0];if(v===`
`)o++,i=b+1;else{if(l!==b){let m;if(h===o){const E=b-l;if(E<f.length)m=f[E];else{const I=(0,S.toLength)(0,E);m=new p(I,0,-1,N.SmallImmutableSet.getEmpty(),new D.TextAstNode(I))}}else{const E=o-h,I=b-i;if(E===1&&I<y.length)m=y[I];else{const k=(0,S.toLength)(E,I);m=new p(k,0,-1,N.SmallImmutableSet.getEmpty(),new D.TextAstNode(k))}}a.push(m)}a.push(c.getToken(v)),l=b+v.length,h=o}}const _=s.length;if(l!==_){const b=h===o?(0,S.toLength)(0,_-l):(0,S.toLength)(o-h,_-i);a.push(new p(b,0,-1,N.SmallImmutableSet.getEmpty(),new D.TextAstNode(b)))}this.length=(0,S.toLength)(o,_-i),this.tokens=a}get offset(){return this._offset}read(){return this.tokens[this.idx++]||null}peek(){return this.tokens[this.idx]||null}skip(s){throw new w.NotSupportedError}}e.FastTokenizer=g}),define(J[561],ee([0,1,8,142,85,115,252]),function(j,e,w,N,T,D,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LanguageAgnosticBracketTokens=e.BracketTokens=void 0;class p{constructor(t){this.map=t,this.hasRegExp=!1,this._regExpGlobal=null}static createFromLanguage(t,s){function c(o,i){return s.getKey(`${o}:::${i}`)}const u=t.characterPair.getColorizedBrackets(),d=new Map,a=new Set;for(const[o,i]of u){a.add(o);let l=d.get(i);const h=c(t.languageId,o);l||(l={openingBrackets:D.SmallImmutableSet.getEmpty(),first:h},d.set(i,l)),l.openingBrackets=l.openingBrackets.add(h,D.identityKeyProvider)}const r=new Map;for(const[o,i]of d){const l=(0,T.toLength)(0,o.length);r.set(o,new S.Token(l,2,i.first,i.openingBrackets,N.BracketAstNode.create(l)))}for(const o of a){const i=(0,T.toLength)(0,o.length),l=c(t.languageId,o);r.set(o,new S.Token(i,1,l,D.SmallImmutableSet.getEmpty().add(l,D.identityKeyProvider),N.BracketAstNode.create(i)))}return new p(r)}getRegExpStr(){if(this.isEmpty)return null;{const t=[...this.map.keys()];return t.sort(),t.reverse(),t.map(s=>C(s)).join("|")}}get regExpGlobal(){if(!this.hasRegExp){const t=this.getRegExpStr();this._regExpGlobal=t?new RegExp(t,"g"):null,this.hasRegExp=!0}return this._regExpGlobal}getToken(t){return this.map.get(t)}get isEmpty(){return this.map.size===0}}e.BracketTokens=p;function C(g){const t=(0,w.escapeRegExpCharacters)(g);return/^[\w ]+$/.test(g)?`\\b${t}\\b`:t}class n{constructor(t,s){this.denseKeyProvider=t,this.getLanguageConfiguration=s,this.languageIdToBracketTokens=new Map}didLanguageChange(t){const s=this.languageIdToBracketTokens.get(t);if(!s)return!1;const c=p.createFromLanguage(this.getLanguageConfiguration(t),this.denseKeyProvider).getRegExpStr();return s.getRegExpStr()!==c}getSingleLanguageBracketTokens(t){let s=this.languageIdToBracketTokens.get(t);return s||(s=p.createFromLanguage(this.getLanguageConfiguration(t),this.denseKeyProvider),this.languageIdToBracketTokens.set(t,s)),s}}e.LanguageAgnosticBracketTokens=n}),define(J[562],ee([0,1,4,2,3,388,229,561,85,391,115,252]),function(j,e,w,N,T,D,S,p,C,n,g,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BracketPairs=void 0;class s extends N.Disposable{constructor(i,l){super();this.textModel=i,this.languageConfigurationService=l,this.cache=this._register(new N.MutableDisposable),this.onDidChangeEmitter=new w.Emitter,this.onDidChange=this.onDidChangeEmitter.event,this.bracketsRequested=!1,this._register(i.onDidChangeOptions(h=>{this.cache.clear(),this.updateCache()})),this._register(i.onDidChangeLanguage(h=>{this.cache.clear(),this.updateCache()})),this._register(this.languageConfigurationService.onDidChange(h=>{var f;(!h.languageId||((f=this.cache.value)===null||f===void 0?void 0:f.object.didLanguageChange(h.languageId)))&&(this.cache.clear(),this.updateCache())}))}get isDocumentSupported(){const i=5e4*100;return this.textModel.getValueLength()<=i}updateCache(){if(this.bracketsRequested&&this.isDocumentSupported){if(!this.cache.value){const i=new N.DisposableStore;this.cache.value=c(i.add(new u(this.textModel,l=>this.languageConfigurationService.getLanguageConfiguration(l))),i),i.add(this.cache.value.object.onDidChange(l=>this.onDidChangeEmitter.fire(l))),this.onDidChangeEmitter.fire()}}else this.cache.clear(),this.onDidChangeEmitter.fire()}handleContentChanged(i){var l;(l=this.cache.value)===null||l===void 0||l.object.handleContentChanged(i)}getBracketPairsInRange(i){var l;return this.bracketsRequested=!0,this.updateCache(),((l=this.cache.value)===null||l===void 0?void 0:l.object.getBracketPairsInRange(i,!1))||[]}getBracketPairsInRangeWithMinIndentation(i){var l;return this.bracketsRequested=!0,this.updateCache(),((l=this.cache.value)===null||l===void 0?void 0:l.object.getBracketPairsInRange(i,!0))||[]}getBracketsInRange(i){var l;return this.bracketsRequested=!0,this.updateCache(),((l=this.cache.value)===null||l===void 0?void 0:l.object.getBracketsInRange(i))||[]}}e.BracketPairs=s;function c(o,i){return{object:o,dispose:()=>i==null?void 0:i.dispose()}}class u extends N.Disposable{constructor(i,l){super();if(this.textModel=i,this.getLanguageConfiguration=l,this.didChangeEmitter=new w.Emitter,this.denseKeyProvider=new g.DenseKeyProvider,this.brackets=new p.LanguageAgnosticBracketTokens(this.denseKeyProvider,this.getLanguageConfiguration),this.onDidChange=this.didChangeEmitter.event,this._register(i.onBackgroundTokenizationStateChanged(()=>{if(i.backgroundTokenizationState===2){const h=this.initialAstWithoutTokens===void 0;this.initialAstWithoutTokens=void 0,h||this.didChangeEmitter.fire()}})),this._register(i.onDidChangeTokens(({ranges:h})=>{const f=h.map(y=>new S.TextEditInfo((0,C.toLength)(y.fromLineNumber-1,0),(0,C.toLength)(y.toLineNumber,0),(0,C.toLength)(y.toLineNumber-y.fromLineNumber+1,0)));this.astWithTokens=this.parseDocumentFromTextBuffer(f,this.astWithTokens,!1),this.initialAstWithoutTokens||this.didChangeEmitter.fire()})),i.backgroundTokenizationState===0){const h=this.brackets.getSingleLanguageBracketTokens(this.textModel.getLanguageId()),f=new t.FastTokenizer(this.textModel.getValue(),h);this.initialAstWithoutTokens=(0,n.parseDocument)(f,[],void 0,!0),this.astWithTokens=this.initialAstWithoutTokens}else i.backgroundTokenizationState===2?(this.initialAstWithoutTokens=void 0,this.astWithTokens=this.parseDocumentFromTextBuffer([],void 0,!1)):i.backgroundTokenizationState===1&&(this.initialAstWithoutTokens=this.parseDocumentFromTextBuffer([],void 0,!0),this.astWithTokens=this.initialAstWithoutTokens)}didLanguageChange(i){return this.brackets.didLanguageChange(i)}handleContentChanged(i){const l=i.changes.map(h=>{const f=T.Range.lift(h.range);return new S.TextEditInfo((0,C.positionToLength)(f.getStartPosition()),(0,C.positionToLength)(f.getEndPosition()),(0,C.lengthOfString)(h.text))}).reverse();this.astWithTokens=this.parseDocumentFromTextBuffer(l,this.astWithTokens,!1),this.initialAstWithoutTokens&&(this.initialAstWithoutTokens=this.parseDocumentFromTextBuffer(l,this.initialAstWithoutTokens,!1))}parseDocumentFromTextBuffer(i,l,h){const y=!1?l==null?void 0:l.deepClone():l,_=new t.TextBufferTokenizer(this.textModel,this.brackets);return(0,n.parseDocument)(_,i,y,h)}getBracketsInRange(i){const l=(0,C.toLength)(i.startLineNumber-1,i.startColumn-1),h=(0,C.toLength)(i.endLineNumber-1,i.endColumn-1),f=new Array,y=this.initialAstWithoutTokens||this.astWithTokens;return d(y,C.lengthZero,y.length,l,h,f),f}getBracketPairsInRange(i,l){const h=new Array,f=(0,C.positionToLength)(i.getStartPosition()),y=(0,C.positionToLength)(i.getEndPosition()),_=this.initialAstWithoutTokens||this.astWithTokens,b=new a(h,l,this.textModel);return r(_,C.lengthZero,_.length,f,y,b),h}}function d(o,i,l,h,f,y,_=0){if(o.kind===1){const b=(0,C.lengthsToRange)(i,l);y.push(new D.BracketInfo(b,_-1,!1))}else if(o.kind===3){const b=(0,C.lengthsToRange)(i,l);y.push(new D.BracketInfo(b,_-1,!0))}else if(o.kind===4)for(const b of o.children)l=(0,C.lengthAdd)(i,b.length),(0,C.lengthLessThanEqual)(i,f)&&(0,C.lengthGreaterThanEqual)(l,h)&&d(b,i,l,h,f,y,_),i=l;else if(o.kind===2){_++;{const b=o.openingBracket;l=(0,C.lengthAdd)(i,b.length),(0,C.lengthLessThanEqual)(i,f)&&(0,C.lengthGreaterThanEqual)(l,h)&&d(b,i,l,h,f,y,_),i=l}if(o.child){const b=o.child;l=(0,C.lengthAdd)(i,b.length),(0,C.lengthLessThanEqual)(i,f)&&(0,C.lengthGreaterThanEqual)(l,h)&&d(b,i,l,h,f,y,_),i=l}if(o.closingBracket){const b=o.closingBracket;l=(0,C.lengthAdd)(i,b.length),(0,C.lengthLessThanEqual)(i,f)&&(0,C.lengthGreaterThanEqual)(l,h)&&d(b,i,l,h,f,y,_),i=l}}}class a{constructor(i,l,h){this.result=i,this.includeMinIndentation=l,this.textModel=h}}function r(o,i,l,h,f,y,_=0){var b;if(o.kind===2){const m=(0,C.lengthAdd)(i,o.openingBracket.length);let E=-1;y.includeMinIndentation&&(E=o.computeMinIndentation(i,y.textModel)),y.result.push(new D.BracketPairWithMinIndentationInfo((0,C.lengthsToRange)(i,l),(0,C.lengthsToRange)(i,m),o.closingBracket?(0,C.lengthsToRange)((0,C.lengthAdd)(m,((b=o.child)===null||b===void 0?void 0:b.length)||C.lengthZero),l):void 0,_,E)),_++}let v=i;for(const m of o.children){const E=v;v=(0,C.lengthAdd)(v,m.length),(0,C.lengthLessThanEqual)(E,f)&&(0,C.lengthLessThanEqual)(h,v)&&r(m,E,v,h,f,y,_)}}}),define(J[148],ee([0,1,19,87,13,3,18]),function(j,e,w,N,T,D,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TokensStore=e.TokensStore2=e.MultilineTokens=e.MultilineTokens2=e.LineTokens2=e.SparseEncodedTokens=e.MultilineTokensBuilder=e.countEOL=void 0;function p(o){let i=0,l=0,h=0,f=0;for(let y=0,_=o.length;y<_;y++){const b=o.charCodeAt(y);b===13?(i===0&&(l=y),i++,y+1<_&&o.charCodeAt(y+1)===10?(f|=2,y++):f|=3,h=y+1):b===10&&(f|=1,i===0&&(l=y),i++,h=y+1)}return i===0&&(l=o.length),[i,l,o.length-h,f]}e.countEOL=p;function C(o){return(o<<0|0<<8|0<<11|1<<14|2<<23)>>>0}const n=new Uint32Array(0).buffer;class g{constructor(){this.tokens=[]}add(i,l){if(this.tokens.length>0){const h=this.tokens[this.tokens.length-1];if(h.startLineNumber+h.tokens.length-1+1===i){h.tokens.push(l);return}}this.tokens.push(new u(i,[l]))}}e.MultilineTokensBuilder=g;class t{constructor(i){this._tokens=i,this._tokenCount=i.length/4}toString(i){let l=[];for(let h=0;h<this._tokenCount;h++)l.push(`(${this._getDeltaLine(h)+i},${this._getStartCharacter(h)}-${this._getEndCharacter(h)})`);return`[${l.join(",")}]`}getMaxDeltaLine(){const i=this._getTokenCount();return i===0?-1:this._getDeltaLine(i-1)}getRange(){const i=this._getTokenCount();if(i===0)return null;const l=this._getStartCharacter(0),h=this._getDeltaLine(i-1),f=this._getEndCharacter(i-1);return new D.Range(0,l+1,h,f+1)}_getTokenCount(){return this._tokenCount}_getDeltaLine(i){return this._tokens[4*i]}_getStartCharacter(i){return this._tokens[4*i+1]}_getEndCharacter(i){return this._tokens[4*i+2]}isEmpty(){return this._getTokenCount()===0}getLineTokens(i){let l=0,h=this._getTokenCount()-1;for(;l<h;){const f=l+Math.floor((h-l)/2),y=this._getDeltaLine(f);if(y<i)l=f+1;else if(y>i)h=f-1;else{let _=f;for(;_>l&&this._getDeltaLine(_-1)===i;)_--;let b=f;for(;b<h&&this._getDeltaLine(b+1)===i;)b++;return new s(this._tokens.subarray(4*_,4*b+4))}}return this._getDeltaLine(l)===i?new s(this._tokens.subarray(4*l,4*l+4)):null}clear(){this._tokenCount=0}removeTokens(i,l,h,f){const y=this._tokens,_=this._tokenCount;let b=0,v=!1,m=0;for(let E=0;E<_;E++){const I=4*E,k=y[I],M=y[I+1],P=y[I+2],F=y[I+3];if((k>i||k===i&&P>=l)&&(k<h||k===h&&M<=f))v=!0;else{if(b===0&&(m=k),v){const R=4*b;y[R]=k-m,y[R+1]=M,y[R+2]=P,y[R+3]=F}b++}}return this._tokenCount=b,m}split(i,l,h,f){const y=this._tokens,_=this._tokenCount;let b=[],v=[],m=b,E=0,I=0;for(let k=0;k<_;k++){const M=4*k,P=y[M],F=y[M+1],R=y[M+2],A=y[M+3];if(P>i||P===i&&R>=l){if(P<h||P===h&&F<=f)continue;m!==v&&(m=v,E=0,I=P)}m[E++]=P-I,m[E++]=F,m[E++]=R,m[E++]=A}return[new t(new Uint32Array(b)),new t(new Uint32Array(v)),I]}acceptDeleteRange(i,l,h,f,y){const _=this._tokens,b=this._tokenCount,v=f-l;let m=0,E=!1;for(let I=0;I<b;I++){const k=4*I;let M=_[k],P=_[k+1],F=_[k+2];const R=_[k+3];if(M<l||M===l&&F<=h){m++;continue}else if(M===l&&P<h)M===f&&F>y?F-=y-h:F=h;else if(M===l&&P===h)if(M===f&&F>y)F-=y-h;else{E=!0;continue}else if(M<f||M===f&&P<y)if(M===f&&F>y)M===l?(P=h,F=P+(F-y)):(P=0,F=P+(F-y));else{E=!0;continue}else if(M>f){if(v===0&&!E){m=b;break}M-=v}else if(M===f&&P>=y)i&&M===0&&(P+=i,F+=i),M-=v,P-=y-h,F-=y-h;else throw new Error("Not possible!");const A=4*m;_[A]=M,_[A+1]=P,_[A+2]=F,_[A+3]=R,m++}this._tokenCount=m}acceptInsertText(i,l,h,f,y,_){const b=h===0&&f===1&&(_>=48&&_<=57||_>=65&&_<=90||_>=97&&_<=122),v=this._tokens,m=this._tokenCount;for(let E=0;E<m;E++){const I=4*E;let k=v[I],M=v[I+1],P=v[I+2];if(!(k<i||k===i&&P<l)){if(k===i&&P===l)if(b)P+=1;else continue;else if(k===i&&M<l&&l<P)h===0?P+=f:P=l;else{if(k===i&&M===l&&b)continue;if(k===i)if(k+=h,h===0)M+=f,P+=f;else{const F=P-M;M=y+(M-l),P=M+F}else k+=h}v[I]=k,v[I+1]=M,v[I+2]=P}}}}e.SparseEncodedTokens=t;class s{constructor(i){this._tokens=i}getCount(){return this._tokens.length/4}getStartCharacter(i){return this._tokens[4*i+1]}getEndCharacter(i){return this._tokens[4*i+2]}getMetadata(i){return this._tokens[4*i+3]}}e.LineTokens2=s;class c{constructor(i,l){this.startLineNumber=i,this.tokens=l,this.endLineNumber=this.startLineNumber+this.tokens.getMaxDeltaLine()}toString(){return this.tokens.toString(this.startLineNumber)}_updateEndLineNumber(){this.endLineNumber=this.startLineNumber+this.tokens.getMaxDeltaLine()}isEmpty(){return this.tokens.isEmpty()}getLineTokens(i){return this.startLineNumber<=i&&i<=this.endLineNumber?this.tokens.getLineTokens(i-this.startLineNumber):null}getRange(){const i=this.tokens.getRange();return i&&new D.Range(this.startLineNumber+i.startLineNumber,i.startColumn,this.startLineNumber+i.endLineNumber,i.endColumn)}removeTokens(i){const l=i.startLineNumber-this.startLineNumber,h=i.endLineNumber-this.startLineNumber;this.startLineNumber+=this.tokens.removeTokens(l,i.startColumn-1,h,i.endColumn-1),this._updateEndLineNumber()}split(i){const l=i.startLineNumber-this.startLineNumber,h=i.endLineNumber-this.startLineNumber,[f,y,_]=this.tokens.split(l,i.startColumn-1,h,i.endColumn-1);return[new c(this.startLineNumber,f),new c(this.startLineNumber+_,y)]}applyEdit(i,l){const[h,f,y]=p(l);this.acceptEdit(i,h,f,y,l.length>0?l.charCodeAt(0):0)}acceptEdit(i,l,h,f,y){this._acceptDeleteRange(i),this._acceptInsertText(new T.Position(i.startLineNumber,i.startColumn),l,h,f,y),this._updateEndLineNumber()}_acceptDeleteRange(i){if(i.startLineNumber===i.endLineNumber&&i.startColumn===i.endColumn)return;const l=i.startLineNumber-this.startLineNumber,h=i.endLineNumber-this.startLineNumber;if(h<0){const y=h-l;this.startLineNumber-=y;return}const f=this.tokens.getMaxDeltaLine();if(!(l>=f+1)){if(l<0&&h>=f+1){this.startLineNumber=0,this.tokens.clear();return}if(l<0){const y=-l;this.startLineNumber-=y,this.tokens.acceptDeleteRange(i.startColumn-1,0,0,h,i.endColumn-1)}else this.tokens.acceptDeleteRange(0,l,i.startColumn-1,h,i.endColumn-1)}}_acceptInsertText(i,l,h,f,y){if(l===0&&h===0)return;const _=i.lineNumber-this.startLineNumber;if(_<0){this.startLineNumber+=l;return}const b=this.tokens.getMaxDeltaLine();_>=b+1||this.tokens.acceptInsertText(_,i.column-1,l,h,f,y)}}e.MultilineTokens2=c;class u{constructor(i,l){this.startLineNumber=i,this.tokens=l}}e.MultilineTokens=u;function d(o){return o instanceof Uint32Array?o:new Uint32Array(o)}class a{constructor(i){this._pieces=[],this._isComplete=!1,this._languageIdCodec=i}flush(){this._pieces=[],this._isComplete=!1}isEmpty(){return this._pieces.length===0}set(i,l){this._pieces=i||[],this._isComplete=l}setPartial(i,l){let h=i;if(l.length>0){const y=l[0].getRange(),_=l[l.length-1].getRange();if(!y||!_)return i;h=i.plusRange(y).plusRange(_)}let f=null;for(let y=0,_=this._pieces.length;y<_;y++){const b=this._pieces[y];if(b.endLineNumber<h.startLineNumber)continue;if(b.startLineNumber>h.endLineNumber){f=f||{index:y};break}if(b.removeTokens(h),b.isEmpty()){this._pieces.splice(y,1),y--,_--;continue}if(b.endLineNumber<h.startLineNumber)continue;if(b.startLineNumber>h.endLineNumber){f=f||{index:y};continue}const[v,m]=b.split(h);if(v.isEmpty()){f=f||{index:y};continue}m.isEmpty()||(this._pieces.splice(y,1,v,m),y++,_++,f=f||{index:y})}return f=f||{index:this._pieces.length},l.length>0&&(this._pieces=w.arrayInsert(this._pieces,f.index,l)),h}isComplete(){return this._isComplete}addSemanticTokens(i,l){const h=this._pieces;if(h.length===0)return l;const f=a._findFirstPieceWithLine(h,i),y=h[f].getLineTokens(i);if(!y)return l;const _=l.getCount(),b=y.getCount();let v=0,m=[],E=0,I=0;const k=(M,P)=>{M!==I&&(I=M,m[E++]=M,m[E++]=P)};for(let M=0;M<b;M++){const P=y.getStartCharacter(M),F=y.getEndCharacter(M),R=y.getMetadata(M),A=((R&1?2048:0)|(R&2?4096:0)|(R&4?8192:0)|(R&8?8372224:0)|(R&16?4286578688:0))>>>0,O=~A>>>0;for(;v<_&&l.getEndOffset(v)<=P;)k(l.getEndOffset(v),l.getMetadata(v)),v++;for(v<_&&l.getStartOffset(v)<P&&k(P,l.getMetadata(v));v<_&&l.getEndOffset(v)<F;)k(l.getEndOffset(v),l.getMetadata(v)&O|R&A),v++;if(v<_)k(F,l.getMetadata(v)&O|R&A),l.getEndOffset(v)===F&&v++;else{const L=Math.min(Math.max(0,v-1),_-1);k(F,l.getMetadata(L)&O|R&A)}}for(;v<_;)k(l.getEndOffset(v),l.getMetadata(v)),v++;return new N.LineTokens(new Uint32Array(m),l.getLineContent(),this._languageIdCodec)}static _findFirstPieceWithLine(i,l){let h=0,f=i.length-1;for(;h<f;){let y=h+Math.floor((f-h)/2);if(i[y].endLineNumber<l)h=y+1;else if(i[y].startLineNumber>l)f=y-1;else{for(;y>h&&i[y-1].startLineNumber<=l&&l<=i[y-1].endLineNumber;)y--;return y}}return h}acceptEdit(i,l,h,f,y){for(const _ of this._pieces)_.acceptEdit(i,l,h,f,y)}}e.TokensStore2=a;class r{constructor(i){this._lineTokens=[],this._len=0,this._languageIdCodec=i}flush(){this._lineTokens=[],this._len=0}getTokens(i,l,h){let f=null;if(l<this._len&&(f=this._lineTokens[l]),f!==null&&f!==n)return new N.LineTokens(d(f),h,this._languageIdCodec);const y=new Uint32Array(2);return y[0]=h.length,y[1]=C(this._languageIdCodec.encodeLanguageId(i)),new N.LineTokens(y,h,this._languageIdCodec)}static _massageTokens(i,l,h){const f=h?d(h):null;if(l===0){let y=!1;if(f&&f.length>1&&(y=S.TokenMetadata.getLanguageId(f[1])!==i),!y)return n}if(!f||f.length===0){const y=new Uint32Array(2);return y[0]=l,y[1]=C(i),y.buffer}return f[f.length-2]=l,f.byteOffset===0&&f.byteLength===f.buffer.byteLength?f.buffer:f}_ensureLine(i){for(;i>=this._len;)this._lineTokens[this._len]=null,this._len++}_deleteLines(i,l){l!==0&&(i+l>this._len&&(l=this._len-i),this._lineTokens.splice(i,l),this._len-=l)}_insertLines(i,l){if(l===0)return;let h=[];for(let f=0;f<l;f++)h[f]=null;this._lineTokens=w.arrayInsert(this._lineTokens,i,h),this._len+=l}setTokens(i,l,h,f,y){const _=r._massageTokens(this._languageIdCodec.encodeLanguageId(i),h,f);this._ensureLine(l);const b=this._lineTokens[l];return this._lineTokens[l]=_,y?!r._equals(b,_):!1}static _equals(i,l){if(!i||!l)return!i&&!l;const h=d(i),f=d(l);if(h.length!==f.length)return!1;for(let y=0,_=h.length;y<_;y++)if(h[y]!==f[y])return!1;return!0}acceptEdit(i,l,h){this._acceptDeleteRange(i),this._acceptInsertText(new T.Position(i.startLineNumber,i.startColumn),l,h)}_acceptDeleteRange(i){const l=i.startLineNumber-1;if(l>=this._len)return;if(i.startLineNumber===i.endLineNumber){if(i.startColumn===i.endColumn)return;this._lineTokens[l]=r._delete(this._lineTokens[l],i.startColumn-1,i.endColumn-1);return}this._lineTokens[l]=r._deleteEnding(this._lineTokens[l],i.startColumn-1);const h=i.endLineNumber-1;let f=null;h<this._len&&(f=r._deleteBeginning(this._lineTokens[h],i.endColumn-1)),this._lineTokens[l]=r._append(this._lineTokens[l],f),this._deleteLines(i.startLineNumber,i.endLineNumber-i.startLineNumber)}_acceptInsertText(i,l,h){if(l===0&&h===0)return;const f=i.lineNumber-1;if(!(f>=this._len)){if(l===0){this._lineTokens[f]=r._insert(this._lineTokens[f],i.column-1,h);return}this._lineTokens[f]=r._deleteEnding(this._lineTokens[f],i.column-1),this._lineTokens[f]=r._insert(this._lineTokens[f],i.column-1,h),this._insertLines(i.lineNumber,l)}}static _deleteBeginning(i,l){return i===null||i===n?i:r._delete(i,0,l)}static _deleteEnding(i,l){if(i===null||i===n)return i;const h=d(i),f=h[h.length-2];return r._delete(i,l,f)}static _delete(i,l,h){if(i===null||i===n||l===h)return i;const f=d(i),y=f.length>>>1;if(l===0&&f[f.length-2]===h)return n;const _=N.LineTokens.findIndexInTokensArray(f,l),b=_>0?f[_-1<<1]:0,v=f[_<<1];if(h<v){const M=h-l;for(let P=_;P<y;P++)f[P<<1]-=M;return i}let m,E;b!==l?(f[_<<1]=l,m=_+1<<1,E=l):(m=_<<1,E=b);const I=h-l;for(let M=_+1;M<y;M++){const P=f[M<<1]-I;P>E&&(f[m++]=P,f[m++]=f[(M<<1)+1],E=P)}if(m===f.length)return i;let k=new Uint32Array(m);return k.set(f.subarray(0,m),0),k.buffer}static _append(i,l){if(l===n)return i;if(i===n)return l;if(i===null)return i;if(l===null)return null;const h=d(i),f=d(l),y=f.length>>>1;let _=new Uint32Array(h.length+f.length);_.set(h,0);let b=h.length;const v=h[h.length-2];for(let m=0;m<y;m++)_[b++]=f[m<<1]+v,_[b++]=f[(m<<1)+1];return _.buffer}static _insert(i,l,h){if(i===null||i===n)return i;const f=d(i),y=f.length>>>1;let _=N.LineTokens.findIndexInTokensArray(f,l);_>0&&f[_-1<<1]===l&&_--;for(let b=_;b<y;b++)f[b<<1]+=h;return i}}e.TokensStore=r}),define(J[253],ee([0,1,4,8,3,49,231,148,230,2]),function(j,e,w,N,T,D,S,p,C,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.PieceTreeTextBuffer=void 0;class g extends n.Disposable{constructor(s,c,u,d,a,r,o){super();this._onDidChangeContent=this._register(new w.Emitter),this._BOM=c,this._mightContainNonBasicASCII=!r,this._mightContainRTL=d,this._mightContainUnusualLineTerminators=a,this._pieceTree=new S.PieceTreeBase(s,u,o)}mightContainRTL(){return this._mightContainRTL}mightContainUnusualLineTerminators(){return this._mightContainUnusualLineTerminators}resetMightContainUnusualLineTerminators(){this._mightContainUnusualLineTerminators=!1}mightContainNonBasicASCII(){return this._mightContainNonBasicASCII}getBOM(){return this._BOM}getEOL(){return this._pieceTree.getEOL()}createSnapshot(s){return this._pieceTree.createSnapshot(s?this._BOM:"")}getOffsetAt(s,c){return this._pieceTree.getOffsetAt(s,c)}getPositionAt(s){return this._pieceTree.getPositionAt(s)}getRangeAt(s,c){let u=s+c;const d=this.getPositionAt(s),a=this.getPositionAt(u);return new T.Range(d.lineNumber,d.column,a.lineNumber,a.column)}getValueInRange(s,c=0){if(s.isEmpty())return"";const u=this._getEndOfLine(c);return this._pieceTree.getValueInRange(s,u)}getValueLengthInRange(s,c=0){if(s.isEmpty())return 0;if(s.startLineNumber===s.endLineNumber)return s.endColumn-s.startColumn;let u=this.getOffsetAt(s.startLineNumber,s.startColumn);return this.getOffsetAt(s.endLineNumber,s.endColumn)-u}getCharacterCountInRange(s,c=0){if(this._mightContainNonBasicASCII){let u=0;const d=s.startLineNumber,a=s.endLineNumber;for(let r=d;r<=a;r++){const o=this.getLineContent(r),i=r===d?s.startColumn-1:0,l=r===a?s.endColumn-1:o.length;for(let h=i;h<l;h++)N.isHighSurrogate(o.charCodeAt(h))?(u=u+1,h=h+1):u=u+1}return u+=this._getEndOfLine(c).length*(a-d),u}return this.getValueLengthInRange(s,c)}getLength(){return this._pieceTree.getLength()}getLineCount(){return this._pieceTree.getLineCount()}getLinesContent(){return this._pieceTree.getLinesContent()}getLineContent(s){return this._pieceTree.getLineContent(s)}getLineCharCode(s,c){return this._pieceTree.getLineCharCode(s,c)}getLineLength(s){return this._pieceTree.getLineLength(s)}getLineFirstNonWhitespaceColumn(s){const c=N.firstNonWhitespaceIndex(this.getLineContent(s));return c===-1?0:c+1}getLineLastNonWhitespaceColumn(s){const c=N.lastNonWhitespaceIndex(this.getLineContent(s));return c===-1?0:c+2}_getEndOfLine(s){switch(s){case 1:return`
`;case 2:return`\r
`;case 0:return this.getEOL();default:throw new Error("Unknown EOL preference")}}setEOL(s){this._pieceTree.setEOL(s)}applyEdits(s,c,u){let d=this._mightContainRTL,a=this._mightContainUnusualLineTerminators,r=this._mightContainNonBasicASCII,o=!0,i=[];for(let v=0;v<s.length;v++){let m=s[v];o&&m._isTracked&&(o=!1);let E=m.range;if(m.text){let F=!0;r||(F=!N.isBasicASCII(m.text),r=F),!d&&F&&(d=N.containsRTL(m.text)),!a&&F&&(a=N.containsUnusualLineTerminators(m.text))}let I="",k=0,M=0,P=0;if(m.text){let F;[k,M,P,F]=(0,p.countEOL)(m.text);const R=this.getEOL();F===0||F===(R===`\r
`?2:1)?I=m.text:I=m.text.replace(/\r\n|\r|\n/g,R)}i[v]={sortIndex:v,identifier:m.identifier||null,range:E,rangeOffset:this.getOffsetAt(E.startLineNumber,E.startColumn),rangeLength:this.getValueLengthInRange(E),text:I,eolCount:k,firstLineLength:M,lastLineLength:P,forceMoveMarkers:Boolean(m.forceMoveMarkers),isAutoWhitespaceEdit:m.isAutoWhitespaceEdit||!1}}i.sort(g._sortOpsAscending);let l=!1;for(let v=0,m=i.length-1;v<m;v++){let E=i[v].range.getEndPosition(),I=i[v+1].range.getStartPosition();if(I.isBeforeOrEqual(E)){if(I.isBefore(E))throw new Error("Overlapping ranges are not allowed!");l=!0}}o&&(i=this._reduceOperations(i));let h=u||c?g._getInverseEditRanges(i):[],f=[];if(c)for(let v=0;v<i.length;v++){let m=i[v],E=h[v];if(m.isAutoWhitespaceEdit&&m.range.isEmpty())for(let I=E.startLineNumber;I<=E.endLineNumber;I++){let k="";I===E.startLineNumber&&(k=this.getLineContent(m.range.startLineNumber),N.firstNonWhitespaceIndex(k)!==-1)||f.push({lineNumber:I,oldContent:k})}}let y=null;if(u){let v=0;y=[];for(let m=0;m<i.length;m++){const E=i[m],I=h[m],k=this.getValueInRange(E.range),M=E.rangeOffset+v;v+=E.text.length-k.length,y[m]={sortIndex:E.sortIndex,identifier:E.identifier,range:I,text:k,textChange:new C.TextChange(E.rangeOffset,k,M,E.text)}}l||y.sort((m,E)=>m.sortIndex-E.sortIndex)}this._mightContainRTL=d,this._mightContainUnusualLineTerminators=a,this._mightContainNonBasicASCII=r;const _=this._doApplyEdits(i);let b=null;if(c&&f.length>0){f.sort((v,m)=>m.lineNumber-v.lineNumber),b=[];for(let v=0,m=f.length;v<m;v++){let E=f[v].lineNumber;if(v>0&&f[v-1].lineNumber===E)continue;let I=f[v].oldContent,k=this.getLineContent(E);k.length===0||k===I||N.firstNonWhitespaceIndex(k)!==-1||b.push(E)}}return this._onDidChangeContent.fire(),new D.ApplyEditsResult(y,_,b)}_reduceOperations(s){return s.length<1e3?s:[this._toSingleEditOperation(s)]}_toSingleEditOperation(s){let c=!1;const u=s[0].range,d=s[s.length-1].range,a=new T.Range(u.startLineNumber,u.startColumn,d.endLineNumber,d.endColumn);let r=u.startLineNumber,o=u.startColumn;const i=[];for(let _=0,b=s.length;_<b;_++){const v=s[_],m=v.range;c=c||v.forceMoveMarkers,i.push(this.getValueInRange(new T.Range(r,o,m.startLineNumber,m.startColumn))),v.text.length>0&&i.push(v.text),r=m.endLineNumber,o=m.endColumn}const l=i.join(""),[h,f,y]=(0,p.countEOL)(l);return{sortIndex:0,identifier:s[0].identifier,range:a,rangeOffset:this.getOffsetAt(a.startLineNumber,a.startColumn),rangeLength:this.getValueLengthInRange(a,0),text:l,eolCount:h,firstLineLength:f,lastLineLength:y,forceMoveMarkers:c,isAutoWhitespaceEdit:!1}}_doApplyEdits(s){s.sort(g._sortOpsDescending);let c=[];for(let u=0;u<s.length;u++){let d=s[u];const a=d.range.startLineNumber,r=d.range.startColumn,o=d.range.endLineNumber,i=d.range.endColumn;if(a===o&&r===i&&d.text.length===0)continue;d.text?(this._pieceTree.delete(d.rangeOffset,d.rangeLength),this._pieceTree.insert(d.rangeOffset,d.text,!0)):this._pieceTree.delete(d.rangeOffset,d.rangeLength);const l=new T.Range(a,r,o,i);c.push({range:l,rangeLength:d.rangeLength,text:d.text,rangeOffset:d.rangeOffset,forceMoveMarkers:d.forceMoveMarkers})}return c}findMatchesLineByLine(s,c,u,d){return this._pieceTree.findMatchesLineByLine(s,c,u,d)}static _getInverseEditRanges(s){let c=[],u=0,d=0,a=null;for(let r=0,o=s.length;r<o;r++){let i=s[r],l,h;a?a.range.endLineNumber===i.range.startLineNumber?(l=u,h=d+(i.range.startColumn-a.range.endColumn)):(l=u+(i.range.startLineNumber-a.range.endLineNumber),h=i.range.startColumn):(l=i.range.startLineNumber,h=i.range.startColumn);let f;if(i.text.length>0){const y=i.eolCount+1;y===1?f=new T.Range(l,h,l,h+i.firstLineLength):f=new T.Range(l,h,l+y-1,i.lastLineLength+1)}else f=new T.Range(l,h,l,h);u=f.endLineNumber,d=f.endColumn,c.push(f),a=i}return c}static _sortOpsAscending(s,c){let u=T.Range.compareRangesUsingEnds(s.range,c.range);return u===0?s.sortIndex-c.sortIndex:u}static _sortOpsDescending(s,c){let u=T.Range.compareRangesUsingEnds(s.range,c.range);return u===0?c.sortIndex-s.sortIndex:-u}}e.PieceTreeTextBuffer=g}),define(J[563],ee([0,1,8,231,253]),function(j,e,w,N,T){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.PieceTreeTextBufferBuilder=e.PieceTreeTextBufferFactory=void 0;class D{constructor(C,n,g,t,s,c,u,d,a){this._chunks=C,this._bom=n,this._cr=g,this._lf=t,this._crlf=s,this._containsRTL=c,this._containsUnusualLineTerminators=u,this._isBasicASCII=d,this._normalizeEOL=a}_getEOL(C){const n=this._cr+this._lf+this._crlf,g=this._cr+this._crlf;return n===0?C===1?`
`:`\r
`:g>n/2?`\r
`:`
`}create(C){const n=this._getEOL(C);let g=this._chunks;if(this._normalizeEOL&&(n===`\r
`&&(this._cr>0||this._lf>0)||n===`
`&&(this._cr>0||this._crlf>0)))for(let s=0,c=g.length;s<c;s++){let u=g[s].buffer.replace(/\r\n|\r|\n/g,n),d=(0,N.createLineStartsFast)(u);g[s]=new N.StringBuffer(u,d)}const t=new T.PieceTreeTextBuffer(g,this._bom,n,this._containsRTL,this._containsUnusualLineTerminators,this._isBasicASCII,this._normalizeEOL);return{textBuffer:t,disposable:t}}}e.PieceTreeTextBufferFactory=D;class S{constructor(){this.chunks=[],this.BOM="",this._hasPreviousChar=!1,this._previousChar=0,this._tmpLineStarts=[],this.cr=0,this.lf=0,this.crlf=0,this.containsRTL=!1,this.containsUnusualLineTerminators=!1,this.isBasicASCII=!0}acceptChunk(C){if(C.length===0)return;this.chunks.length===0&&w.startsWithUTF8BOM(C)&&(this.BOM=w.UTF8_BOM_CHARACTER,C=C.substr(1));const n=C.charCodeAt(C.length-1);n===13||n>=55296&&n<=56319?(this._acceptChunk1(C.substr(0,C.length-1),!1),this._hasPreviousChar=!0,this._previousChar=n):(this._acceptChunk1(C,!1),this._hasPreviousChar=!1,this._previousChar=n)}_acceptChunk1(C,n){!n&&C.length===0||(this._hasPreviousChar?this._acceptChunk2(String.fromCharCode(this._previousChar)+C):this._acceptChunk2(C))}_acceptChunk2(C){const n=(0,N.createLineStarts)(this._tmpLineStarts,C);this.chunks.push(new N.StringBuffer(C,n.lineStarts)),this.cr+=n.cr,this.lf+=n.lf,this.crlf+=n.crlf,this.isBasicASCII&&(this.isBasicASCII=n.isBasicASCII),!this.isBasicASCII&&!this.containsRTL&&(this.containsRTL=w.containsRTL(C)),!this.isBasicASCII&&!this.containsUnusualLineTerminators&&(this.containsUnusualLineTerminators=w.containsUnusualLineTerminators(C))}finish(C=!0){return this._finish(),new D(this.chunks,this.BOM,this.cr,this.lf,this.crlf,this.containsRTL,this.containsUnusualLineTerminators,this.isBasicASCII,C)}_finish(){if(this.chunks.length===0&&this._acceptChunk1("",!0),this._hasPreviousChar){this._hasPreviousChar=!1;let C=this.chunks[this.chunks.length-1];C.buffer+=String.fromCharCode(this._previousChar);let n=(0,N.createLineStartsFast)(C.buffer);C.lineStarts=n,this._previousChar===13&&this.cr++}}}e.PieceTreeTextBufferBuilder=S}),define(J[564],ee([0,1,19,11,87,13,18,77,2,83,148,17]),function(j,e,w,N,T,D,S,p,C,n,g,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TextModelTokenization=e.TokenizationStateStore=void 0;class s{constructor(){this._beginState=[],this._valid=[],this._len=0,this._invalidLineStartIndex=0}_reset(r){this._beginState=[],this._valid=[],this._len=0,this._invalidLineStartIndex=0,r&&this._setBeginState(0,r)}flush(r){this._reset(r)}get invalidLineStartIndex(){return this._invalidLineStartIndex}_invalidateLine(r){r<this._len&&(this._valid[r]=!1),r<this._invalidLineStartIndex&&(this._invalidLineStartIndex=r)}_isValid(r){return r<this._len?this._valid[r]:!1}getBeginState(r){return r<this._len?this._beginState[r]:null}_ensureLine(r){for(;r>=this._len;)this._beginState[this._len]=null,this._valid[this._len]=!1,this._len++}_deleteLines(r,o){o!==0&&(r+o>this._len&&(o=this._len-r),this._beginState.splice(r,o),this._valid.splice(r,o),this._len-=o)}_insertLines(r,o){if(o===0)return;const i=[],l=[];for(let h=0;h<o;h++)i[h]=null,l[h]=!1;this._beginState=w.arrayInsert(this._beginState,r,i),this._valid=w.arrayInsert(this._valid,r,l),this._len+=o}_setValid(r,o){this._ensureLine(r),this._valid[r]=o}_setBeginState(r,o){this._ensureLine(r),this._beginState[r]=o}setEndState(r,o,i){if(this._setValid(o,!0),this._invalidLineStartIndex=o+1,o===r-1)return;const l=this.getBeginState(o+1);if(l===null||!i.equals(l)){this._setBeginState(o+1,i),this._invalidateLine(o+1);return}let h=o+1;for(;h<r&&this._isValid(h);)h++;this._invalidLineStartIndex=h}setFakeTokens(r){this._setValid(r,!1)}applyEdits(r,o){const i=r.endLineNumber-r.startLineNumber,h=Math.min(i,o);for(let f=h;f>=0;f--)this._invalidateLine(r.startLineNumber+f-1);this._acceptDeleteRange(r),this._acceptInsertText(new D.Position(r.startLineNumber,r.startColumn),o)}_acceptDeleteRange(r){r.startLineNumber-1>=this._len||this._deleteLines(r.startLineNumber,r.endLineNumber-r.startLineNumber)}_acceptInsertText(r,o){r.lineNumber-1>=this._len||this._insertLines(r.lineNumber,o)}}e.TokenizationStateStore=s;class c extends C.Disposable{constructor(r,o){super();this._textModel=r,this._languageIdCodec=o,this._isDisposed=!1,this._tokenizationStateStore=new s,this._tokenizationSupport=null,this._register(S.TokenizationRegistry.onDidChange(i=>{const l=this._textModel.getLanguageId();i.changedLanguages.indexOf(l)!==-1&&(this._resetTokenizationState(),this._textModel.clearTokens())})),this._register(this._textModel.onDidChangeContentFast(i=>{if(i.isFlush){this._resetTokenizationState();return}for(let l=0,h=i.changes.length;l<h;l++){const f=i.changes[l],[y]=(0,g.countEOL)(f.text);this._tokenizationStateStore.applyEdits(f.range,y)}this._beginBackgroundTokenization()})),this._register(this._textModel.onDidChangeAttached(()=>{this._beginBackgroundTokenization()})),this._register(this._textModel.onDidChangeLanguage(()=>{this._resetTokenizationState(),this._textModel.clearTokens()})),this._resetTokenizationState()}dispose(){this._isDisposed=!0,super.dispose()}_resetTokenizationState(){const[r,o]=u(this._textModel);this._tokenizationSupport=r,this._tokenizationStateStore.flush(o),this._beginBackgroundTokenization()}_beginBackgroundTokenization(){this._textModel.isAttachedToEditor()&&this._hasLinesToTokenize()&&t.setImmediate(()=>{this._isDisposed||this._revalidateTokensNow()})}_revalidateTokensNow(){const r=this._textModel.getLineCount(),o=1,i=new g.MultilineTokensBuilder,l=n.StopWatch.create(!1);let h=-1;for(;this._hasLinesToTokenize()&&!(l.elapsed()>o||(h=this._tokenizeOneInvalidLine(i),h>=r)););this._beginBackgroundTokenization(),this._textModel.setTokens(i.tokens,!this._hasLinesToTokenize())}tokenizeViewport(r,o){const i=new g.MultilineTokensBuilder;this._tokenizeViewport(i,r,o),this._textModel.setTokens(i.tokens,!this._hasLinesToTokenize())}reset(){this._resetTokenizationState(),this._textModel.clearTokens()}forceTokenization(r){const o=new g.MultilineTokensBuilder;this._updateTokensUntilLine(o,r),this._textModel.setTokens(o.tokens,!this._hasLinesToTokenize())}isCheapToTokenize(r){if(!this._tokenizationSupport)return!0;const o=this._tokenizationStateStore.invalidLineStartIndex+1;return r>o?!1:r<o||this._textModel.getLineLength(r)<2048}_hasLinesToTokenize(){return this._tokenizationSupport?this._tokenizationStateStore.invalidLineStartIndex<this._textModel.getLineCount():!1}_tokenizeOneInvalidLine(r){if(!this._hasLinesToTokenize())return this._textModel.getLineCount()+1;const o=this._tokenizationStateStore.invalidLineStartIndex+1;return this._updateTokensUntilLine(r,o),o}_updateTokensUntilLine(r,o){if(!this._tokenizationSupport)return;const i=this._textModel.getLanguageId(),l=this._textModel.getLineCount(),h=o-1;for(let f=this._tokenizationStateStore.invalidLineStartIndex;f<=h;f++){const y=this._textModel.getLineContent(f+1),_=this._tokenizationStateStore.getBeginState(f),b=d(this._languageIdCodec,i,this._tokenizationSupport,y,!0,_);r.add(f+1,b.tokens),this._tokenizationStateStore.setEndState(l,f,b.endState),f=this._tokenizationStateStore.invalidLineStartIndex-1}}_tokenizeViewport(r,o,i){if(!this._tokenizationSupport||i<=this._tokenizationStateStore.invalidLineStartIndex)return;if(o<=this._tokenizationStateStore.invalidLineStartIndex){this._updateTokensUntilLine(r,i);return}let l=this._textModel.getLineFirstNonWhitespaceColumn(o);const h=[];let f=null;for(let b=o-1;l>1&&b>=1;b--){const v=this._textModel.getLineFirstNonWhitespaceColumn(b);if(v!==0&&v<l){if(f=this._tokenizationStateStore.getBeginState(b-1),f)break;h.push(this._textModel.getLineContent(b)),l=v}}f||(f=this._tokenizationSupport.getInitialState());const y=this._textModel.getLanguageId();let _=f;for(let b=h.length-1;b>=0;b--)_=d(this._languageIdCodec,y,this._tokenizationSupport,h[b],!1,_).endState;for(let b=o;b<=i;b++){const v=this._textModel.getLineContent(b),m=d(this._languageIdCodec,y,this._tokenizationSupport,v,!0,_);r.add(b,m.tokens),this._tokenizationStateStore.setFakeTokens(b-1),_=m.endState}}}e.TextModelTokenization=c;function u(a){const r=a.getLanguageId();let o=a.isTooLargeForTokenization()?null:S.TokenizationRegistry.get(r),i=null;if(o)try{i=o.getInitialState()}catch(l){(0,N.onUnexpectedError)(l),o=null}return[o,i]}function d(a,r,o,i,l,h){let f=null;if(o)try{f=o.tokenize2(i,l,h.clone(),0)}catch(y){(0,N.onUnexpectedError)(y)}return f||(f=(0,p.nullTokenize2)(a.encodeLanguageId(r),i,h,0)),T.LineTokens.convertToEndOffset(f.tokens,i.length),f}}),define(J[254],ee([0,1,8,87,77]),function(j,e,w,N,T){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.tokenizeLineToHTML=e.tokenizeToString=void 0;const D={getInitialState:()=>T.NULL_STATE,tokenize2:(n,g,t,s)=>(0,T.nullTokenize2)(0,n,t,s)};function S(n,g,t=D){return C(n,g,t||D)}e.tokenizeToString=S;function p(n,g,t,s,c,u,d){let a="<div>",r=s,o=0,i=!0;for(let l=0,h=g.getCount();l<h;l++){const f=g.getEndOffset(l);if(f<=s)continue;let y="";for(;r<f&&r<c;r++){const _=n.charCodeAt(r);switch(_){case 9:let b=u-(r+o)%u;for(o+=b-1;b>0;)d&&i?(y+="&#160;",i=!1):(y+=" ",i=!0),b--;break;case 60:y+="&lt;",i=!1;break;case 62:y+="&gt;",i=!1;break;case 38:y+="&amp;",i=!1;break;case 0:y+="&#00;",i=!1;break;case 65279:case 8232:case 8233:case 133:y+="\uFFFD",i=!1;break;case 13:y+="&#8203",i=!1;break;case 32:d&&i?(y+="&#160;",i=!1):(y+=" ",i=!0);break;default:y+=String.fromCharCode(_),i=!1}}if(a+=`<span style="${g.getInlineStyle(l,t)}">${y}</span>`,f>c||r>=c)break}return a+="</div>",a}e.tokenizeLineToHTML=p;function C(n,g,t){let s='<div class="monaco-tokenized-source">';const c=w.splitLines(n);let u=t.getInitialState();for(let d=0,a=c.length;d<a;d++){const r=c[d];d>0&&(s+="<br/>");const o=t.tokenize2(r,!0,u,0);N.LineTokens.convertToEndOffset(o.tokens,r.length);const l=new N.LineTokens(o.tokens,r,g).inflate();let h=0;for(let f=0,y=l.getCount();f<y;f++){const _=l.getClassName(f),b=l.getEndOffset(f);s+=`<span class="${_}">${w.escape(r.substring(h,b))}</span>`,h=b}u=o.endState}return s+="</div>",s}}),define(J[66],ee([0,1,9]),function(j,e,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ITextModelService=void 0,e.ITextModelService=(0,w.createDecorator)("textModelService")}),define(J[149],ee([0,1,9]),function(j,e,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ITextResourcePropertiesService=e.ITextResourceConfigurationService=void 0,e.ITextResourceConfigurationService=(0,w.createDecorator)("textResourceConfigurationService"),e.ITextResourcePropertiesService=(0,w.createDecorator)("textResourcePropertiesService")}),define(J[255],ee([0,1,4,2,227,18]),function(j,e,w,N,T,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MinimapTokensColorTracker=void 0;class S extends N.Disposable{constructor(){super();this._onDidChange=new w.Emitter,this.onDidChange=this._onDidChange.event,this._updateColorMap(),this._register(D.TokenizationRegistry.onDidChange(C=>{C.changedColorMap&&this._updateColorMap()}))}static getInstance(){return this._INSTANCE||(this._INSTANCE=(0,N.markAsSingleton)(new S)),this._INSTANCE}_updateColorMap(){const C=D.TokenizationRegistry.getColorMap();if(!C){this._colors=[T.RGBA8.Empty],this._backgroundIsLight=!0;return}this._colors=[T.RGBA8.Empty];for(let g=1;g<C.length;g++){const t=C[g].rgba;this._colors[g]=new T.RGBA8(t.r,t.g,t.b,Math.round(t.a*255))}let n=C[2].getRelativeLuminance();this._backgroundIsLight=n>=.5,this._onDidChange.fire(void 0)}getColor(C){return(C<1||C>=this._colors.length)&&(C=2),this._colors[C]}backgroundIsLight(){return this._backgroundIsLight}}e.MinimapTokensColorTracker=S,S._INSTANCE=null}),define(J[256],ee([0,1,19,23,11,54,47,3,18,147]),function(j,e,w,N,T,D,S,p,C,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.OutlineModel=e.OutlineGroup=e.OutlineElement=e.TreeElement=void 0;class g{remove(){this.parent&&this.parent.children.delete(this.id)}static findId(d,a){let r;typeof d=="string"?r=`${a.id}/${d}`:(r=`${a.id}/${d.name}`,a.children.get(r)!==void 0&&(r=`${a.id}/${d.name}_${d.range.startLineNumber}_${d.range.startColumn}`));let o=r;for(let i=0;a.children.get(o)!==void 0;i++)o=`${r}_${i}`;return o}static empty(d){return d.children.size===0}}e.TreeElement=g;class t extends g{constructor(d,a,r){super();this.id=d,this.parent=a,this.symbol=r,this.children=new Map}}e.OutlineElement=t;class s extends g{constructor(d,a,r,o){super();this.id=d,this.parent=a,this.label=r,this.order=o,this.children=new Map}}e.OutlineGroup=s;class c extends g{constructor(d){super();this.uri=d,this.id="root",this.parent=void 0,this._groups=new Map,this.children=new Map,this.id="root",this.parent=void 0}static create(d,a){let r=this._keys.for(d,!0),o=c._requests.get(r);if(!o){let i=new N.CancellationTokenSource;o={promiseCnt:0,source:i,promise:c._create(d,i.token),model:void 0},c._requests.set(r,o);const l=Date.now();o.promise.then(()=>{this._requestDurations.update(d,Date.now()-l)})}return o.model?Promise.resolve(o.model):(o.promiseCnt+=1,a.onCancellationRequested(()=>{--o.promiseCnt==0&&(o.source.cancel(),c._requests.delete(r))}),new Promise((i,l)=>{o.promise.then(h=>{o.model=h,i(h)},h=>{c._requests.delete(r),l(h)})}))}static _create(d,a){const r=new N.CancellationTokenSource(a),o=new c(d.uri),i=C.DocumentSymbolProviderRegistry.ordered(d),l=i.map((f,y)=>{var _;let b=g.findId(`provider_${y}`,o),v=new s(b,o,(_=f.displayName)!==null&&_!==void 0?_:"Unknown Outline Provider",y);return Promise.resolve(f.provideDocumentSymbols(d,r.token)).then(m=>{for(const E of m||[])c._makeOutlineElement(E,v);return v},m=>((0,T.onUnexpectedExternalError)(m),v)).then(m=>{g.empty(m)?m.remove():o._groups.set(b,m)})}),h=C.DocumentSymbolProviderRegistry.onDidChange(()=>{const f=C.DocumentSymbolProviderRegistry.ordered(d);(0,w.equals)(f,i)||r.cancel()});return Promise.all(l).then(()=>r.token.isCancellationRequested&&!a.isCancellationRequested?c._create(d,a):o._compact()).finally(()=>{h.dispose()})}static _makeOutlineElement(d,a){let r=g.findId(d,a),o=new t(r,a,d);if(d.children)for(const i of d.children)c._makeOutlineElement(i,o);a.children.set(o.id,o)}_compact(){let d=0;for(const[a,r]of this._groups)r.children.size===0?this._groups.delete(a):d+=1;if(d!==1)this.children=this._groups;else{let a=D.Iterable.first(this._groups.values());for(let[,r]of a.children)r.parent=this,this.children.set(r.id,r)}return this}getTopLevelSymbols(){const d=[];for(const a of this.children.values())a instanceof t?d.push(a.symbol):d.push(...D.Iterable.map(a.children.values(),r=>r.symbol));return d.sort((a,r)=>p.Range.compareRangesUsingStarts(a.range,r.range))}asListOfDocumentSymbols(){const d=this.getTopLevelSymbols(),a=[];return c._flattenDocumentSymbols(a,d,""),a.sort((r,o)=>p.Range.compareRangesUsingStarts(r.range,o.range))}static _flattenDocumentSymbols(d,a,r){for(const o of a)d.push({kind:o.kind,tags:o.tags,name:o.name,detail:o.detail,containerName:o.containerName||r,range:o.range,selectionRange:o.selectionRange,children:void 0}),o.children&&c._flattenDocumentSymbols(d,o.children,o.name)}}e.OutlineModel=c,c._requestDurations=new n.LanguageFeatureRequestDelays(C.DocumentSymbolProviderRegistry,350),c._requests=new S.LRUCache(9,.75),c._keys=new class{constructor(){this._counter=1,this._data=new WeakMap}for(u,d){return`${u.id}/${d?u.getVersionId():""}/${this._hash(C.DocumentSymbolProviderRegistry.all(u))}`}_hash(u){let d="";for(const a of u){let r=this._data.get(a);typeof r=="undefined"&&(r=this._counter++,this._data.set(a,r)),d+=r}return d}}}),define(J[257],ee([0,1,141,18,77,246]),function(j,e,w,N,T,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.createTokenizationSupport=e.MonarchTokenizer=void 0;const S=5;class p{constructor(o){this._maxCacheDepth=o,this._entries=Object.create(null)}static create(o,i){return this._INSTANCE.create(o,i)}create(o,i){if(o!==null&&o.depth>=this._maxCacheDepth)return new C(o,i);let l=C.getStackElementId(o);l.length>0&&(l+="|"),l+=i;let h=this._entries[l];return h||(h=new C(o,i),this._entries[l]=h,h)}}p._INSTANCE=new p(S);class C{constructor(o,i){this.parent=o,this.state=i,this.depth=(this.parent?this.parent.depth:0)+1}static getStackElementId(o){let i="";for(;o!==null;)i.length>0&&(i+="|"),i+=o.state,o=o.parent;return i}static _equals(o,i){for(;o!==null&&i!==null;){if(o===i)return!0;if(o.state!==i.state)return!1;o=o.parent,i=i.parent}return o===null&&i===null}equals(o){return C._equals(this,o)}push(o){return p.create(this,o)}pop(){return this.parent}popall(){let o=this;for(;o.parent;)o=o.parent;return o}switchTo(o){return p.create(this.parent,o)}}class n{constructor(o,i){this.languageId=o,this.state=i}equals(o){return this.languageId===o.languageId&&this.state.equals(o.state)}clone(){return this.state.clone()===this.state?this:new n(this.languageId,this.state)}}class g{constructor(o){this._maxCacheDepth=o,this._entries=Object.create(null)}static create(o,i){return this._INSTANCE.create(o,i)}create(o,i){if(i!==null)return new t(o,i);if(o!==null&&o.depth>=this._maxCacheDepth)return new t(o,i);let l=C.getStackElementId(o),h=this._entries[l];return h||(h=new t(o,null),this._entries[l]=h,h)}}g._INSTANCE=new g(S);class t{constructor(o,i){this.stack=o,this.embeddedModeData=i}clone(){return(this.embeddedModeData?this.embeddedModeData.clone():null)===this.embeddedModeData?this:g.create(this.stack,this.embeddedModeData)}equals(o){return!(o instanceof t)||!this.stack.equals(o.stack)?!1:this.embeddedModeData===null&&o.embeddedModeData===null?!0:this.embeddedModeData===null||o.embeddedModeData===null?!1:this.embeddedModeData.equals(o.embeddedModeData)}}class s{constructor(){this._tokens=[],this._languageId=null,this._lastTokenType=null,this._lastTokenLanguage=null}enterMode(o,i){this._languageId=i}emit(o,i){this._lastTokenType===i&&this._lastTokenLanguage===this._languageId||(this._lastTokenType=i,this._lastTokenLanguage=this._languageId,this._tokens.push(new w.Token(o,i,this._languageId)))}nestedModeTokenize(o,i,l,h){const f=l.languageId,y=l.state,_=N.TokenizationRegistry.get(f);if(!_)return this.enterMode(h,f),this.emit(h,""),y;let b=_.tokenize(o,i,y,h);return this._tokens=this._tokens.concat(b.tokens),this._lastTokenType=null,this._lastTokenLanguage=null,this._languageId=null,b.endState}finalize(o){return new w.TokenizationResult(this._tokens,o)}}class c{constructor(o,i){this._modeService=o,this._theme=i,this._prependTokens=null,this._tokens=[],this._currentLanguageId=0,this._lastTokenMetadata=0}enterMode(o,i){this._currentLanguageId=this._modeService.languageIdCodec.encodeLanguageId(i)}emit(o,i){let l=this._theme.match(this._currentLanguageId,i);this._lastTokenMetadata!==l&&(this._lastTokenMetadata=l,this._tokens.push(o),this._tokens.push(l))}static _merge(o,i,l){let h=o!==null?o.length:0,f=i.length,y=l!==null?l.length:0;if(h===0&&f===0&&y===0)return new Uint32Array(0);if(h===0&&f===0)return l;if(f===0&&y===0)return o;let _=new Uint32Array(h+f+y);o!==null&&_.set(o);for(let b=0;b<f;b++)_[h+b]=i[b];return l!==null&&_.set(l,h+f),_}nestedModeTokenize(o,i,l,h){const f=l.languageId,y=l.state,_=N.TokenizationRegistry.get(f);if(!_)return this.enterMode(h,f),this.emit(h,""),y;let b=_.tokenize2(o,i,y,h);return this._prependTokens=c._merge(this._prependTokens,this._tokens,b.tokens),this._tokens=[],this._currentLanguageId=0,this._lastTokenMetadata=0,b.endState}finalize(o){return new w.TokenizationResult2(c._merge(this._prependTokens,this._tokens,null),o)}}class u{constructor(o,i,l,h){this._modeService=o,this._standaloneThemeService=i,this._languageId=l,this._lexer=h,this._embeddedModes=Object.create(null),this.embeddedLoaded=Promise.resolve(void 0);let f=!1;this._tokenizationRegistryListener=N.TokenizationRegistry.onDidChange(y=>{if(f)return;let _=!1;for(let b=0,v=y.changedLanguages.length;b<v;b++){let m=y.changedLanguages[b];if(this._embeddedModes[m]){_=!0;break}}_&&(f=!0,N.TokenizationRegistry.fire([this._languageId]),f=!1)})}dispose(){this._tokenizationRegistryListener.dispose()}getLoadStatus(){let o=[];for(let i in this._embeddedModes){const l=N.TokenizationRegistry.get(i);if(l){if(l instanceof u){const f=l.getLoadStatus();f.loaded===!1&&o.push(f.promise)}continue}const h=N.TokenizationRegistry.getPromise(i);h&&o.push(h)}return o.length===0?{loaded:!0}:{loaded:!1,promise:Promise.all(o).then(i=>{})}}getInitialState(){let o=p.create(null,this._lexer.start);return g.create(o,null)}tokenize(o,i,l,h){let f=new s,y=this._tokenize(o,i,l,h,f);return f.finalize(y)}tokenize2(o,i,l,h){let f=new c(this._modeService,this._standaloneThemeService.getColorTheme().tokenTheme),y=this._tokenize(o,i,l,h,f);return f.finalize(y)}_tokenize(o,i,l,h,f){return l.embeddedModeData?this._nestedTokenize(o,i,l,h,f):this._myTokenize(o,i,l,h,f)}_findLeavingNestedModeOffset(o,i){let l=this._lexer.tokenizer[i.stack.state];if(!l&&(l=D.findRules(this._lexer,i.stack.state),!l))throw D.createError(this._lexer,"tokenizer state is not defined: "+i.stack.state);let h=-1,f=!1;for(const y of l){if(!D.isIAction(y.action)||y.action.nextEmbedded!=="@pop")continue;f=!0;let _=y.regex,b=y.regex.source;if(b.substr(0,4)==="^(?:"&&b.substr(b.length-1,1)===")"){let m=(_.ignoreCase?"i":"")+(_.unicode?"u":"");_=new RegExp(b.substr(4,b.length-5),m)}let v=o.search(_);v===-1||v!==0&&y.matchOnlyAtLineStart||(h===-1||v<h)&&(h=v)}if(!f)throw D.createError(this._lexer,'no rule containing nextEmbedded: "@pop" in tokenizer embedded state: '+i.stack.state);return h}_nestedTokenize(o,i,l,h,f){let y=this._findLeavingNestedModeOffset(o,l);if(y===-1){let v=f.nestedModeTokenize(o,i,l.embeddedModeData,h);return g.create(l.stack,new n(l.embeddedModeData.languageId,v))}let _=o.substring(0,y);_.length>0&&f.nestedModeTokenize(_,!1,l.embeddedModeData,h);let b=o.substring(y);return this._myTokenize(b,i,l,h+y,f)}_safeRuleName(o){return o?o.name:"(unknown)"}_myTokenize(o,i,l,h,f){f.enterMode(h,this._languageId);const y=o.length,_=i&&this._lexer.includeLF?o+`
`:o,b=_.length;let v=l.embeddedModeData,m=l.stack,E=0,I=null,k=!0;for(;k||E<b;){const M=E,P=m.depth,F=I?I.groups.length:0,R=m.state;let A=null,O=null,L=null,B=null,W=null;if(I){A=I.matches;const Y=I.groups.shift();O=Y.matched,L=Y.action,B=I.rule,I.groups.length===0&&(I=null)}else{if(!k&&E>=b)break;k=!1;let Y=this._lexer.tokenizer[R];if(!Y&&(Y=D.findRules(this._lexer,R),!Y))throw D.createError(this._lexer,"tokenizer state is not defined: "+R);let X=_.substr(E);for(const Z of Y)if((E===0||!Z.matchOnlyAtLineStart)&&(A=X.match(Z.regex),A)){O=A[0],L=Z.action;break}}if(A||(A=[""],O=""),L||(E<b&&(A=[_.charAt(E)],O=A[0]),L=this._lexer.defaultToken),O===null)break;for(E+=O.length;D.isFuzzyAction(L)&&D.isIAction(L)&&L.test;)L=L.test(O,A,R,E===b);let K=null;if(typeof L=="string"||Array.isArray(L))K=L;else if(L.group)K=L.group;else if(L.token!==null&&L.token!==void 0){if(L.tokenSubst?K=D.substituteMatches(this._lexer,L.token,O,A,R):K=L.token,L.nextEmbedded)if(L.nextEmbedded==="@pop"){if(!v)throw D.createError(this._lexer,"cannot pop embedded mode if not inside one");v=null}else{if(v)throw D.createError(this._lexer,"cannot enter embedded mode from within an embedded mode");W=D.substituteMatches(this._lexer,L.nextEmbedded,O,A,R)}if(L.goBack&&(E=Math.max(0,E-L.goBack)),L.switchTo&&typeof L.switchTo=="string"){let Y=D.substituteMatches(this._lexer,L.switchTo,O,A,R);if(Y[0]==="@"&&(Y=Y.substr(1)),D.findRules(this._lexer,Y))m=m.switchTo(Y);else throw D.createError(this._lexer,"trying to switch to a state '"+Y+"' that is undefined in rule: "+this._safeRuleName(B))}else{if(L.transform&&typeof L.transform=="function")throw D.createError(this._lexer,"action.transform not supported");if(L.next)if(L.next==="@push"){if(m.depth>=this._lexer.maxStack)throw D.createError(this._lexer,"maximum tokenizer stack size reached: ["+m.state+","+m.parent.state+",...]");m=m.push(R)}else if(L.next==="@pop"){if(m.depth<=1)throw D.createError(this._lexer,"trying to pop an empty stack in rule: "+this._safeRuleName(B));m=m.pop()}else if(L.next==="@popall")m=m.popall();else{let Y=D.substituteMatches(this._lexer,L.next,O,A,R);if(Y[0]==="@"&&(Y=Y.substr(1)),D.findRules(this._lexer,Y))m=m.push(Y);else throw D.createError(this._lexer,"trying to set a next state '"+Y+"' that is undefined in rule: "+this._safeRuleName(B))}}L.log&&typeof L.log=="string"&&D.log(this._lexer,this._lexer.languageId+": "+D.substituteMatches(this._lexer,L.log,O,A,R))}if(K===null)throw D.createError(this._lexer,"lexer rule has no well-defined action in rule: "+this._safeRuleName(B));const H=Y=>{let X=this._modeService.getModeIdForLanguageName(Y);X&&(Y=X);const Z=this._getNestedEmbeddedModeData(Y);if(E<b){const se=o.substr(E);return this._nestedTokenize(se,i,g.create(m,Z),h+E,f)}else return g.create(m,Z)};if(Array.isArray(K)){if(I&&I.groups.length>0)throw D.createError(this._lexer,"groups cannot be nested: "+this._safeRuleName(B));if(A.length!==K.length+1)throw D.createError(this._lexer,"matched number of groups does not match the number of actions in rule: "+this._safeRuleName(B));let Y=0;for(let X=1;X<A.length;X++)Y+=A[X].length;if(Y!==O.length)throw D.createError(this._lexer,"with groups, all characters should be matched in consecutive groups in rule: "+this._safeRuleName(B));I={rule:B,matches:A,groups:[]};for(let X=0;X<K.length;X++)I.groups[X]={action:K[X],matched:A[X+1]};E-=O.length;continue}else{if(K==="@rematch"&&(E-=O.length,O="",A=null,K="",W!==null))return H(W);if(O.length===0){if(b===0||P!==m.depth||R!==m.state||(I?I.groups.length:0)!==F)continue;throw D.createError(this._lexer,"no progress in tokenizer in rule: "+this._safeRuleName(B))}let Y=null;if(D.isString(K)&&K.indexOf("@brackets")===0){let X=K.substr("@brackets".length),Z=d(this._lexer,O);if(!Z)throw D.createError(this._lexer,"@brackets token returned but no bracket defined as: "+O);Y=D.sanitize(Z.token+X)}else{let X=K===""?"":K+this._lexer.tokenPostfix;Y=D.sanitize(X)}M<y&&f.emit(M+h,Y)}if(W!==null)return H(W)}return g.create(m,v)}_getNestedEmbeddedModeData(o){let i=this._locateMode(o);if(i){let l=N.TokenizationRegistry.get(i);if(l)return new n(i,l.getInitialState())}return new n(i||T.NULL_MODE_ID,T.NULL_STATE)}_locateMode(o){if(!o||!this._modeService.isRegisteredMode(o))return null;if(o===this._languageId)return o;const i=this._modeService.getModeId(o);return i&&(this._modeService.triggerMode(i),this._embeddedModes[i]=!0),i}}e.MonarchTokenizer=u;function d(r,o){if(!o)return null;o=D.fixCase(r,o);let i=r.brackets;for(const l of i){if(l.open===o)return{token:l.token,bracketType:1};if(l.close===o)return{token:l.token,bracketType:-1}}return null}function a(r,o,i,l){return new u(r,o,i,l)}e.createTokenizationSupport=a}),define(J[565],ee([0,1,14,8,87,18,118,60,257]),function(j,e,w,N,T,D,S,p,C){"use strict";var n;Object.defineProperty(e,"__esModule",{value:!0}),e.Colorizer=void 0;const g=(n=window.trustedTypes)===null||n===void 0?void 0:n.createPolicy("standaloneColorizer",{createHTML:d=>d});class t{static colorizeElement(a,r,o,i){i=i||{};let l=i.theme||"vs",h=i.mimeType||o.getAttribute("lang")||o.getAttribute("data-lang");if(!h)return console.error("Mode not detected"),Promise.resolve();a.setTheme(l);let f=o.firstChild?o.firstChild.nodeValue:"";o.className+=" "+l;let y=_=>{var b;const v=(b=g==null?void 0:g.createHTML(_))!==null&&b!==void 0?b:_;o.innerHTML=v};return this.colorize(r,f||"",h,i).then(y,_=>console.error(_))}static colorize(a,r,o,i){const l=a.languageIdCodec;let h=4;i&&typeof i.tabSize=="number"&&(h=i.tabSize),N.startsWithUTF8BOM(r)&&(r=r.substr(1));let f=N.splitLines(r),y=a.getModeId(o);if(!y)return Promise.resolve(c(f,h,l));a.triggerMode(y);const _=D.TokenizationRegistry.get(y);if(_)return s(f,h,_,l);const b=D.TokenizationRegistry.getPromise(y);return b?new Promise((v,m)=>{b.then(E=>{s(f,h,E,l).then(v,m)},m)}):new Promise((v,m)=>{let E=null,I=null;const k=()=>{E&&(E.dispose(),E=null),I&&(I.dispose(),I=null);const M=D.TokenizationRegistry.get(y);if(M){s(f,h,M,l).then(v,m);return}v(c(f,h,l))};I=new w.TimeoutTimer,I.cancelAndSet(k,500),E=D.TokenizationRegistry.onDidChange(M=>{M.changedLanguages.indexOf(y)>=0&&k()})})}static colorizeLine(a,r,o,i,l=4){const h=p.ViewLineRenderingData.isBasicASCII(a,r),f=p.ViewLineRenderingData.containsRTL(a,h,o);return(0,S.renderViewLine2)(new S.RenderLineInput(!1,!0,a,!1,h,f,0,i,[],l,0,0,0,0,-1,"none",!1,!1,null)).html}static colorizeModelLine(a,r,o=4){let i=a.getLineContent(r);a.forceTokenization(r);let h=a.getLineTokens(r).inflate();return this.colorizeLine(i,a.mightContainNonBasicASCII(),a.mightContainRTL(),h,o)}}e.Colorizer=t;function s(d,a,r,o){return new Promise((i,l)=>{const h=()=>{const f=u(d,a,r,o);if(r instanceof C.MonarchTokenizer){const y=r.getLoadStatus();if(y.loaded===!1){y.promise.then(h,l);return}}i(f)};h()})}function c(d,a,r){let o=[];const i=(0<<11|1<<14|2<<23)>>>0,l=new Uint32Array(2);l[0]=0,l[1]=i;for(let h=0,f=d.length;h<f;h++){let y=d[h];l[0]=y.length;const _=new T.LineTokens(l,y,r),b=p.ViewLineRenderingData.isBasicASCII(y,!0),v=p.ViewLineRenderingData.containsRTL(y,b,!0);let m=(0,S.renderViewLine2)(new S.RenderLineInput(!1,!0,y,!1,b,v,0,_,[],a,0,0,0,0,-1,"none",!1,!1,null));o=o.concat(m.html),o.push("<br/>")}return o.join("")}function u(d,a,r,o){let i=[],l=r.getInitialState();for(let h=0,f=d.length;h<f;h++){let y=d[h],_=r.tokenize2(y,!0,l,0);T.LineTokens.convertToEndOffset(_.tokens,y.length);let b=new T.LineTokens(_.tokens,y,o);const v=p.ViewLineRenderingData.isBasicASCII(y,!0),m=p.ViewLineRenderingData.containsRTL(y,v,!0);let E=(0,S.renderViewLine2)(new S.RenderLineInput(!1,!0,y,!1,v,m,0,b.inflate(),[],a,0,0,0,0,-1,"none",!1,!1,null));i=i.concat(E.html),i.push("<br/>"),l=_.endState}return i.join("")}}),define(J[123],ee([0,1,9]),function(j,e,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IStandaloneThemeService=void 0,e.IStandaloneThemeService=(0,w.createDecorator)("themeService")}),define(J[88],ee([0,1,9]),function(j,e,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IClipboardService=void 0,e.IClipboardService=(0,w.createDecorator)("clipboardService")}),define(J[26],ee([0,1,4,54,2,74,20,9]),function(j,e,w,N,T,D,S,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CommandsRegistry=e.ICommandService=void 0,e.ICommandService=(0,p.createDecorator)("commandService"),e.CommandsRegistry=new class{constructor(){this._commands=new Map,this._onDidRegisterCommand=new w.Emitter,this.onDidRegisterCommand=this._onDidRegisterCommand.event}registerCommand(C,n){if(!C)throw new Error("invalid command");if(typeof C=="string"){if(!n)throw new Error("invalid command");return this.registerCommand({id:C,handler:n})}if(C.description){const u=[];for(let a of C.description.args)u.push(a.constraint);const d=C.handler;C.handler=function(a,...r){return(0,S.validateConstraints)(r,u),d(a,...r)}}const{id:g}=C;let t=this._commands.get(g);t||(t=new D.LinkedList,this._commands.set(g,t));let s=t.unshift(C),c=(0,T.toDisposable)(()=>{s();const u=this._commands.get(g);(u==null?void 0:u.isEmpty())&&this._commands.delete(g)});return this._onDidRegisterCommand.fire(g),c}registerCommandAlias(C,n){return e.CommandsRegistry.registerCommand(C,(g,...t)=>g.get(e.ICommandService).executeCommand(n,...t))}getCommand(C){const n=this._commands.get(C);if(!(!n||n.isEmpty()))return N.Iterable.first(n)}getCommands(){const C=new Map;for(const n of this._commands.keys()){const g=this.getCommand(n);g&&C.set(n,g)}return C}},e.CommandsRegistry.registerCommand("noop",()=>{})}),define(J[258],ee([0,1,23,11,24,18,42,26,20,404,3]),function(j,e,w,N,T,D,S,p,C,n,g){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getDocumentRangeSemanticTokens=e.hasDocumentRangeSemanticTokensProvider=e.getDocumentSemanticTokens=e.hasDocumentSemanticTokensProvider=e.DocumentSemanticTokensResult=e.isSemanticTokensEdits=e.isSemanticTokens=void 0;function t(f){return f&&!!f.data}e.isSemanticTokens=t;function s(f){return f&&Array.isArray(f.edits)}e.isSemanticTokensEdits=s;class c{constructor(y,_){this.provider=y,this.tokens=_}}e.DocumentSemanticTokensResult=c;function u(f){return D.DocumentSemanticTokensProviderRegistry.has(f)}e.hasDocumentSemanticTokensProvider=u;function d(f){const y=D.DocumentSemanticTokensProviderRegistry.orderedGroups(f);return y.length>0?y[0]:[]}function a(f,y,_,b){return Re(this,void 0,void 0,function*(){const v=d(f),m=yield Promise.all(v.map(E=>Re(this,void 0,void 0,function*(){let I;try{I=yield E.provideDocumentSemanticTokens(f,E===y?_:null,b)}catch(k){(0,N.onUnexpectedExternalError)(k),I=null}return(!I||!t(I)&&!s(I))&&(I=null),new c(E,I)})));for(const E of m)if(E.tokens)return E;return m.length>0?m[0]:null})}e.getDocumentSemanticTokens=a;function r(f){const y=D.DocumentSemanticTokensProviderRegistry.orderedGroups(f);return y.length>0?y[0]:null}class o{constructor(y,_){this.provider=y,this.tokens=_}}function i(f){return D.DocumentRangeSemanticTokensProviderRegistry.has(f)}e.hasDocumentRangeSemanticTokensProvider=i;function l(f){const y=D.DocumentRangeSemanticTokensProviderRegistry.orderedGroups(f);return y.length>0?y[0]:[]}function h(f,y,_){return Re(this,void 0,void 0,function*(){const b=l(f),v=yield Promise.all(b.map(m=>Re(this,void 0,void 0,function*(){let E;try{E=yield m.provideDocumentRangeSemanticTokens(f,y,_)}catch(I){(0,N.onUnexpectedExternalError)(I),E=null}return(!E||!t(E))&&(E=null),new o(m,E)})));for(const m of v)if(m.tokens)return m;return v.length>0?v[0]:null})}e.getDocumentRangeSemanticTokens=h,p.CommandsRegistry.registerCommand("_provideDocumentSemanticTokensLegend",(f,...y)=>Re(void 0,void 0,void 0,function*(){const[_]=y;(0,C.assertType)(_ instanceof T.URI);const b=f.get(S.IModelService).getModel(_);if(!b)return;const v=r(b);return v?v[0].getLegend():f.get(p.ICommandService).executeCommand("_provideDocumentRangeSemanticTokensLegend",_)})),p.CommandsRegistry.registerCommand("_provideDocumentSemanticTokens",(f,...y)=>Re(void 0,void 0,void 0,function*(){const[_]=y;(0,C.assertType)(_ instanceof T.URI);const b=f.get(S.IModelService).getModel(_);if(!b)return;if(!u(b))return f.get(p.ICommandService).executeCommand("_provideDocumentRangeSemanticTokens",_,b.getFullModelRange());const v=yield a(b,null,null,w.CancellationToken.None);if(!v)return;const{provider:m,tokens:E}=v;if(!E||!t(E))return;const I=(0,n.encodeSemanticTokensDto)({id:0,type:"full",data:E.data});return E.resultId&&m.releaseDocumentSemanticTokens(E.resultId),I})),p.CommandsRegistry.registerCommand("_provideDocumentRangeSemanticTokensLegend",(f,...y)=>Re(void 0,void 0,void 0,function*(){const[_,b]=y;(0,C.assertType)(_ instanceof T.URI);const v=f.get(S.IModelService).getModel(_);if(!v)return;const m=l(v);if(m.length===0)return;if(m.length===1)return m[0].getLegend();if(!b||!g.Range.isIRange(b))return console.warn("provideDocumentRangeSemanticTokensLegend might be out-of-sync with provideDocumentRangeSemanticTokens unless a range argument is passed in"),m[0].getLegend();const E=yield h(v,g.Range.lift(b),w.CancellationToken.None);if(!!E)return E.provider.getLegend()})),p.CommandsRegistry.registerCommand("_provideDocumentRangeSemanticTokens",(f,...y)=>Re(void 0,void 0,void 0,function*(){const[_,b]=y;(0,C.assertType)(_ instanceof T.URI),(0,C.assertType)(g.Range.isIRange(b));const v=f.get(S.IModelService).getModel(_);if(!v)return;const m=yield h(v,g.Range.lift(b),w.CancellationToken.None);if(!(!m||!m.tokens))return(0,n.encodeSemanticTokensDto)({id:0,type:"full",data:m.tokens.data})}))}),define(J[259],ee([0,1,23,11,2,20,24,18,42,26]),function(j,e,w,N,T,D,S,p,C,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getCodeLensModel=e.CodeLensModel=void 0;class g{constructor(){this.lenses=[],this._disposables=new T.DisposableStore}dispose(){this._disposables.dispose()}add(c,u){this._disposables.add(c);for(const d of c.lenses)this.lenses.push({symbol:d,provider:u})}}e.CodeLensModel=g;function t(s,c){return Re(this,void 0,void 0,function*(){const u=p.CodeLensProviderRegistry.ordered(s),d=new Map,a=new g,r=u.map((o,i)=>Re(this,void 0,void 0,function*(){d.set(o,i);try{const l=yield Promise.resolve(o.provideCodeLenses(s,c));l&&a.add(l,o)}catch(l){(0,N.onUnexpectedExternalError)(l)}}));return yield Promise.all(r),a.lenses=a.lenses.sort((o,i)=>o.symbol.range.startLineNumber<i.symbol.range.startLineNumber?-1:o.symbol.range.startLineNumber>i.symbol.range.startLineNumber?1:d.get(o.provider)<d.get(i.provider)?-1:d.get(o.provider)>d.get(i.provider)?1:o.symbol.range.startColumn<i.symbol.range.startColumn?-1:o.symbol.range.startColumn>i.symbol.range.startColumn?1:0),a})}e.getCodeLensModel=t,n.CommandsRegistry.registerCommand("_executeCodeLensProvider",function(s,...c){let[u,d]=c;(0,D.assertType)(S.URI.isUri(u)),(0,D.assertType)(typeof d=="number"||!d);const a=s.get(C.IModelService).getModel(u);if(!a)throw(0,N.illegalArgument)();const r=[],o=new T.DisposableStore;return t(a,w.CancellationToken.None).then(i=>{o.add(i);let l=[];for(const h of i.lenses)d==null||Boolean(h.symbol.command)?r.push(h.symbol):d-- >0&&h.provider.resolveCodeLens&&l.push(Promise.resolve(h.provider.resolveCodeLens(a,h.symbol,w.CancellationToken.None)).then(f=>r.push(f||h.symbol)));return Promise.all(l)}).then(()=>r).finally(()=>{setTimeout(()=>o.dispose(),100)})})}),define(J[260],ee([0,1,23,11,24,3,18,42,26]),function(j,e,w,N,T,D,S,p,C){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getColorPresentations=e.getColors=void 0;function n(t,s){const c=[],d=S.ColorProviderRegistry.ordered(t).reverse().map(a=>Promise.resolve(a.provideDocumentColors(t,s)).then(r=>{if(Array.isArray(r))for(let o of r)c.push({colorInfo:o,provider:a})}));return Promise.all(d).then(()=>c)}e.getColors=n;function g(t,s,c,u){return Promise.resolve(c.provideColorPresentations(t,s,u))}e.getColorPresentations=g,C.CommandsRegistry.registerCommand("_executeDocumentColorProvider",function(t,...s){const[c]=s;if(!(c instanceof T.URI))throw(0,N.illegalArgument)();const u=t.get(p.IModelService).getModel(c);if(!u)throw(0,N.illegalArgument)();const d=[],r=S.ColorProviderRegistry.ordered(u).reverse().map(o=>Promise.resolve(o.provideDocumentColors(u,w.CancellationToken.None)).then(i=>{if(Array.isArray(i))for(let l of i)d.push({range:l.range,color:[l.color.red,l.color.green,l.color.blue,l.color.alpha]})}));return Promise.all(r).then(()=>d)}),C.CommandsRegistry.registerCommand("_executeColorPresentationProvider",function(t,...s){const[c,u]=s,{uri:d,range:a}=u;if(!(d instanceof T.URI)||!Array.isArray(c)||c.length!==4||!D.Range.isIRange(a))throw(0,N.illegalArgument)();const[r,o,i,l]=c,h=t.get(p.IModelService).getModel(d);if(!h)throw(0,N.illegalArgument)();const f={range:a,color:{red:r,green:o,blue:i,alpha:l}},y=[],b=S.ColorProviderRegistry.ordered(h).reverse().map(v=>Promise.resolve(v.provideColorPresentations(h,f,w.CancellationToken.None)).then(m=>{Array.isArray(m)&&y.push(...m)}));return Promise.all(b).then(()=>y)})}),define(J[566],ee([0,1,23,20,24,42,66,256,26]),function(j,e,w,N,T,D,S,p,C){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getDocumentSymbols=void 0;function n(g,t,s){return Re(this,void 0,void 0,function*(){const c=yield p.OutlineModel.create(g,s);return t?c.asListOfDocumentSymbols():c.getTopLevelSymbols()})}e.getDocumentSymbols=n,C.CommandsRegistry.registerCommand("_executeDocumentSymbolProvider",function(g,...t){return Re(this,void 0,void 0,function*(){const[s]=t;(0,N.assertType)(T.URI.isUri(s));const c=g.get(D.IModelService).getModel(s);if(c)return n(c,!1,w.CancellationToken.None);const u=yield g.get(S.ITextModelService).createModelReference(s);try{return yield n(u.object.textEditorModel,!1,w.CancellationToken.None)}finally{u.dispose()}})})}),define(J[567],ee([0,1,19,23,11,2,20,24,3,18,42,26]),function(j,e,w,N,T,D,S,p,C,n,g,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getLinks=e.LinksList=e.Link=void 0;class s{constructor(a,r){this._link=a,this._provider=r}toJSON(){return{range:this.range,url:this.url,tooltip:this.tooltip}}get range(){return this._link.range}get url(){return this._link.url}get tooltip(){return this._link.tooltip}resolve(a){return Re(this,void 0,void 0,function*(){return this._link.url?this._link.url:typeof this._provider.resolveLink=="function"?Promise.resolve(this._provider.resolveLink(this._link,a)).then(r=>(this._link=r||this._link,this._link.url?this.resolve(a):Promise.reject(new Error("missing")))):Promise.reject(new Error("missing"))})}}e.Link=s;class c{constructor(a){this._disposables=new D.DisposableStore;let r=[];for(const[o,i]of a){const l=o.links.map(h=>new s(h,i));r=c._union(r,l),(0,D.isDisposable)(o)&&this._disposables.add(o)}this.links=r}dispose(){this._disposables.dispose(),this.links.length=0}static _union(a,r){let o=[],i,l,h,f;for(i=0,h=0,l=a.length,f=r.length;i<l&&h<f;){const y=a[i],_=r[h];if(C.Range.areIntersectingOrTouching(y.range,_.range)){i++;continue}C.Range.compareRangesUsingStarts(y.range,_.range)<0?(o.push(y),i++):(o.push(_),h++)}for(;i<l;i++)o.push(a[i]);for(;h<f;h++)o.push(r[h]);return o}}e.LinksList=c;function u(d,a){const r=[],o=n.LinkProviderRegistry.ordered(d).reverse().map((i,l)=>Promise.resolve(i.provideLinks(d,a)).then(h=>{h&&(r[l]=[h,i])},T.onUnexpectedExternalError));return Promise.all(o).then(()=>{const i=new c((0,w.coalesce)(r));return a.isCancellationRequested?(i.dispose(),new c([])):i})}e.getLinks=u,t.CommandsRegistry.registerCommand("_executeLinkProvider",(d,...a)=>Re(void 0,void 0,void 0,function*(){let[r,o]=a;(0,S.assertType)(r instanceof p.URI),typeof o!="number"&&(o=0);const i=d.get(g.IModelService).getModel(r);if(!i)return[];const l=yield u(i,N.CancellationToken.None);if(!l)return[];for(let f=0;f<Math.min(o,l.links.length);f++)yield l.links[f].resolve(N.CancellationToken.None);const h=l.links.slice(0);return l.dispose(),h}))}),define(J[15],ee([0,1,17,8,9]),function(j,e,w,N,T){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.implies=e.SET_CONTEXT_COMMAND_ID=e.IContextKeyService=e.RawContextKey=e.ContextKeyNotRegexExpr=e.ContextKeyRegexExpr=e.ContextKeySmallerEqualsExpr=e.ContextKeySmallerExpr=e.ContextKeyGreaterEqualsExpr=e.ContextKeyGreaterExpr=e.ContextKeyNotExpr=e.ContextKeyNotEqualsExpr=e.ContextKeyNotInExpr=e.ContextKeyInExpr=e.ContextKeyEqualsExpr=e.ContextKeyDefinedExpr=e.ContextKeyTrueExpr=e.ContextKeyFalseExpr=e.expressionsAreEqualWithConstantSubstitution=e.ContextKeyExpr=void 0;let D=w.userAgent||"";const S=new Map;S.set("false",!1),S.set("true",!0),S.set("isMac",w.isMacintosh),S.set("isLinux",w.isLinux),S.set("isWindows",w.isWindows),S.set("isWeb",w.isWeb),S.set("isMacNative",w.isMacintosh&&!w.isWeb),S.set("isEdge",D.indexOf("Edg/")>=0),S.set("isFirefox",D.indexOf("Firefox")>=0),S.set("isChrome",D.indexOf("Chrome")>=0),S.set("isSafari",D.indexOf("Safari")>=0);const p=Object.prototype.hasOwnProperty;class C{static has(A){return c.create(A)}static equals(A,O){return u.create(A,O)}static regex(A,O){return _.create(A,O)}static not(A){return o.create(A)}static and(...A){return m.create(A,null)}static or(...A){return E.create(A,null,!0)}static deserialize(A,O=!1){if(!!A)return this._deserializeOrExpression(A,O)}static _deserializeOrExpression(A,O){let L=A.split("||");return E.create(L.map(B=>this._deserializeAndExpression(B,O)),null,!0)}static _deserializeAndExpression(A,O){let L=A.split("&&");return m.create(L.map(B=>this._deserializeOne(B,O)),null)}static _deserializeOne(A,O){if(A=A.trim(),A.indexOf("!=")>=0){let L=A.split("!=");return r.create(L[0].trim(),this._deserializeValue(L[1],O))}if(A.indexOf("==")>=0){let L=A.split("==");return u.create(L[0].trim(),this._deserializeValue(L[1],O))}if(A.indexOf("=~")>=0){let L=A.split("=~");return _.create(L[0].trim(),this._deserializeRegexValue(L[1],O))}if(A.indexOf(" in ")>=0){let L=A.split(" in ");return d.create(L[0].trim(),L[1].trim())}if(/^[^<=>]+>=[^<=>]+$/.test(A)){const L=A.split(">=");return h.create(L[0].trim(),L[1].trim())}if(/^[^<=>]+>[^<=>]+$/.test(A)){const L=A.split(">");return l.create(L[0].trim(),L[1].trim())}if(/^[^<=>]+<=[^<=>]+$/.test(A)){const L=A.split("<=");return y.create(L[0].trim(),L[1].trim())}if(/^[^<=>]+<[^<=>]+$/.test(A)){const L=A.split("<");return f.create(L[0].trim(),L[1].trim())}return/^\!\s*/.test(A)?o.create(A.substr(1).trim()):c.create(A)}static _deserializeValue(A,O){if(A=A.trim(),A==="true")return!0;if(A==="false")return!1;let L=/^'([^']*)'$/.exec(A);return L?L[1].trim():A}static _deserializeRegexValue(A,O){if((0,N.isFalsyOrWhitespace)(A)){if(O)throw new Error("missing regexp-value for =~-expression");return console.warn("missing regexp-value for =~-expression"),null}let L=A.indexOf("/"),B=A.lastIndexOf("/");if(L===B||L<0){if(O)throw new Error(`bad regexp-value '${A}', missing /-enclosure`);return console.warn(`bad regexp-value '${A}', missing /-enclosure`),null}let W=A.slice(L+1,B),K=A[B+1]==="i"?"i":"";try{return new RegExp(W,K)}catch(H){if(O)throw new Error(`bad regexp-value '${A}', parse error: ${H}`);return console.warn(`bad regexp-value '${A}', parse error: ${H}`),null}}}e.ContextKeyExpr=C;function n(R,A){const O=R?R.substituteConstants():void 0,L=A?A.substituteConstants():void 0;return!O&&!L?!0:!O||!L?!1:O.equals(L)}e.expressionsAreEqualWithConstantSubstitution=n;function g(R,A){return R.cmp(A)}class t{constructor(){this.type=0}cmp(A){return this.type-A.type}equals(A){return A.type===this.type}substituteConstants(){return this}evaluate(A){return!1}serialize(){return"false"}keys(){return[]}negate(){return s.INSTANCE}}e.ContextKeyFalseExpr=t,t.INSTANCE=new t;class s{constructor(){this.type=1}cmp(A){return this.type-A.type}equals(A){return A.type===this.type}substituteConstants(){return this}evaluate(A){return!0}serialize(){return"true"}keys(){return[]}negate(){return t.INSTANCE}}e.ContextKeyTrueExpr=s,s.INSTANCE=new s;class c{constructor(A,O){this.key=A,this.negated=O,this.type=2}static create(A,O=null){const L=S.get(A);return typeof L=="boolean"?L?s.INSTANCE:t.INSTANCE:new c(A,O)}cmp(A){return A.type!==this.type?this.type-A.type:k(this.key,A.key)}equals(A){return A.type===this.type?this.key===A.key:!1}substituteConstants(){const A=S.get(this.key);return typeof A=="boolean"?A?s.INSTANCE:t.INSTANCE:this}evaluate(A){return!!A.getValue(this.key)}serialize(){return this.key}keys(){return[this.key]}negate(){return this.negated||(this.negated=o.create(this.key,this)),this.negated}}e.ContextKeyDefinedExpr=c;class u{constructor(A,O,L){this.key=A,this.value=O,this.negated=L,this.type=4}static create(A,O,L=null){if(typeof O=="boolean")return O?c.create(A,L):o.create(A,L);const B=S.get(A);return typeof B=="boolean"?O===(B?"true":"false")?s.INSTANCE:t.INSTANCE:new u(A,O,L)}cmp(A){return A.type!==this.type?this.type-A.type:M(this.key,this.value,A.key,A.value)}equals(A){return A.type===this.type?this.key===A.key&&this.value===A.value:!1}substituteConstants(){const A=S.get(this.key);if(typeof A=="boolean"){const O=A?"true":"false";return this.value===O?s.INSTANCE:t.INSTANCE}return this}evaluate(A){return A.getValue(this.key)==this.value}serialize(){return`${this.key} == '${this.value}'`}keys(){return[this.key]}negate(){return this.negated||(this.negated=r.create(this.key,this.value,this)),this.negated}}e.ContextKeyEqualsExpr=u;class d{constructor(A,O){this.key=A,this.valueKey=O,this.type=10,this.negated=null}static create(A,O){return new d(A,O)}cmp(A){return A.type!==this.type?this.type-A.type:M(this.key,this.valueKey,A.key,A.valueKey)}equals(A){return A.type===this.type?this.key===A.key&&this.valueKey===A.valueKey:!1}substituteConstants(){return this}evaluate(A){const O=A.getValue(this.valueKey),L=A.getValue(this.key);return Array.isArray(O)?O.indexOf(L)>=0:typeof L=="string"&&typeof O=="object"&&O!==null?p.call(O,L):!1}serialize(){return`${this.key} in '${this.valueKey}'`}keys(){return[this.key,this.valueKey]}negate(){return this.negated||(this.negated=a.create(this)),this.negated}}e.ContextKeyInExpr=d;class a{constructor(A){this._actual=A,this.type=11}static create(A){return new a(A)}cmp(A){return A.type!==this.type?this.type-A.type:this._actual.cmp(A._actual)}equals(A){return A.type===this.type?this._actual.equals(A._actual):!1}substituteConstants(){return this}evaluate(A){return!this._actual.evaluate(A)}serialize(){throw new Error("Method not implemented.")}keys(){return this._actual.keys()}negate(){return this._actual}}e.ContextKeyNotInExpr=a;class r{constructor(A,O,L){this.key=A,this.value=O,this.negated=L,this.type=5}static create(A,O,L=null){if(typeof O=="boolean")return O?o.create(A,L):c.create(A,L);const B=S.get(A);return typeof B=="boolean"?O===(B?"true":"false")?t.INSTANCE:s.INSTANCE:new r(A,O,L)}cmp(A){return A.type!==this.type?this.type-A.type:M(this.key,this.value,A.key,A.value)}equals(A){return A.type===this.type?this.key===A.key&&this.value===A.value:!1}substituteConstants(){const A=S.get(this.key);if(typeof A=="boolean"){const O=A?"true":"false";return this.value===O?t.INSTANCE:s.INSTANCE}return this}evaluate(A){return A.getValue(this.key)!=this.value}serialize(){return`${this.key} != '${this.value}'`}keys(){return[this.key]}negate(){return this.negated||(this.negated=u.create(this.key,this.value,this)),this.negated}}e.ContextKeyNotEqualsExpr=r;class o{constructor(A,O){this.key=A,this.negated=O,this.type=3}static create(A,O=null){const L=S.get(A);return typeof L=="boolean"?L?t.INSTANCE:s.INSTANCE:new o(A,O)}cmp(A){return A.type!==this.type?this.type-A.type:k(this.key,A.key)}equals(A){return A.type===this.type?this.key===A.key:!1}substituteConstants(){const A=S.get(this.key);return typeof A=="boolean"?A?t.INSTANCE:s.INSTANCE:this}evaluate(A){return!A.getValue(this.key)}serialize(){return`!${this.key}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=c.create(this.key,this)),this.negated}}e.ContextKeyNotExpr=o;function i(R,A){if(typeof R=="string"){const O=parseFloat(R);isNaN(O)||(R=O)}return typeof R=="string"||typeof R=="number"?A(R):t.INSTANCE}class l{constructor(A,O,L){this.key=A,this.value=O,this.negated=L,this.type=12}static create(A,O,L=null){return i(O,B=>new l(A,B,L))}cmp(A){return A.type!==this.type?this.type-A.type:M(this.key,this.value,A.key,A.value)}equals(A){return A.type===this.type?this.key===A.key&&this.value===A.value:!1}substituteConstants(){return this}evaluate(A){return typeof this.value=="string"?!1:parseFloat(A.getValue(this.key))>this.value}serialize(){return`${this.key} > ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=y.create(this.key,this.value,this)),this.negated}}e.ContextKeyGreaterExpr=l;class h{constructor(A,O,L){this.key=A,this.value=O,this.negated=L,this.type=13}static create(A,O,L=null){return i(O,B=>new h(A,B,L))}cmp(A){return A.type!==this.type?this.type-A.type:M(this.key,this.value,A.key,A.value)}equals(A){return A.type===this.type?this.key===A.key&&this.value===A.value:!1}substituteConstants(){return this}evaluate(A){return typeof this.value=="string"?!1:parseFloat(A.getValue(this.key))>=this.value}serialize(){return`${this.key} >= ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=f.create(this.key,this.value,this)),this.negated}}e.ContextKeyGreaterEqualsExpr=h;class f{constructor(A,O,L){this.key=A,this.value=O,this.negated=L,this.type=14}static create(A,O,L=null){return i(O,B=>new f(A,B,L))}cmp(A){return A.type!==this.type?this.type-A.type:M(this.key,this.value,A.key,A.value)}equals(A){return A.type===this.type?this.key===A.key&&this.value===A.value:!1}substituteConstants(){return this}evaluate(A){return typeof this.value=="string"?!1:parseFloat(A.getValue(this.key))<this.value}serialize(){return`${this.key} < ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=h.create(this.key,this.value,this)),this.negated}}e.ContextKeySmallerExpr=f;class y{constructor(A,O,L){this.key=A,this.value=O,this.negated=L,this.type=15}static create(A,O,L=null){return i(O,B=>new y(A,B,L))}cmp(A){return A.type!==this.type?this.type-A.type:M(this.key,this.value,A.key,A.value)}equals(A){return A.type===this.type?this.key===A.key&&this.value===A.value:!1}substituteConstants(){return this}evaluate(A){return typeof this.value=="string"?!1:parseFloat(A.getValue(this.key))<=this.value}serialize(){return`${this.key} <= ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=l.create(this.key,this.value,this)),this.negated}}e.ContextKeySmallerEqualsExpr=y;class _{constructor(A,O){this.key=A,this.regexp=O,this.type=7,this.negated=null}static create(A,O){return new _(A,O)}cmp(A){if(A.type!==this.type)return this.type-A.type;if(this.key<A.key)return-1;if(this.key>A.key)return 1;const O=this.regexp?this.regexp.source:"",L=A.regexp?A.regexp.source:"";return O<L?-1:O>L?1:0}equals(A){if(A.type===this.type){const O=this.regexp?this.regexp.source:"",L=A.regexp?A.regexp.source:"";return this.key===A.key&&O===L}return!1}substituteConstants(){return this}evaluate(A){let O=A.getValue(this.key);return this.regexp?this.regexp.test(O):!1}serialize(){const A=this.regexp?`/${this.regexp.source}/${this.regexp.ignoreCase?"i":""}`:"/invalid/";return`${this.key} =~ ${A}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=b.create(this)),this.negated}}e.ContextKeyRegexExpr=_;class b{constructor(A){this._actual=A,this.type=8}static create(A){return new b(A)}cmp(A){return A.type!==this.type?this.type-A.type:this._actual.cmp(A._actual)}equals(A){return A.type===this.type?this._actual.equals(A._actual):!1}substituteConstants(){return this}evaluate(A){return!this._actual.evaluate(A)}serialize(){throw new Error("Method not implemented.")}keys(){return this._actual.keys()}negate(){return this._actual}}e.ContextKeyNotRegexExpr=b;function v(R){let A=null;for(let O=0,L=R.length;O<L;O++){const B=R[O].substituteConstants();if(R[O]!==B&&A===null){A=[];for(let W=0;W<O;W++)A[W]=R[W]}A!==null&&(A[O]=B)}return A===null?R:A}class m{constructor(A,O){this.expr=A,this.negated=O,this.type=6}static create(A,O){return m._normalizeArr(A,O)}cmp(A){if(A.type!==this.type)return this.type-A.type;if(this.expr.length<A.expr.length)return-1;if(this.expr.length>A.expr.length)return 1;for(let O=0,L=this.expr.length;O<L;O++){const B=g(this.expr[O],A.expr[O]);if(B!==0)return B}return 0}equals(A){if(A.type===this.type){if(this.expr.length!==A.expr.length)return!1;for(let O=0,L=this.expr.length;O<L;O++)if(!this.expr[O].equals(A.expr[O]))return!1;return!0}return!1}substituteConstants(){const A=v(this.expr);return A===this.expr?this:m.create(A,this.negated)}evaluate(A){for(let O=0,L=this.expr.length;O<L;O++)if(!this.expr[O].evaluate(A))return!1;return!0}static _normalizeArr(A,O){const L=[];let B=!1;for(const W of A)if(!!W){if(W.type===1){B=!0;continue}if(W.type===0)return t.INSTANCE;if(W.type===6){L.push(...W.expr);continue}L.push(W)}if(L.length===0&&B)return s.INSTANCE;if(L.length!==0){if(L.length===1)return L[0];L.sort(g);for(let W=1;W<L.length;W++)L[W-1].equals(L[W])&&(L.splice(W,1),W--);if(L.length===1)return L[0];for(;L.length>1;){const W=L[L.length-1];if(W.type!==9)break;L.pop();const K=L.pop(),H=L.length===0,Y=E.create(W.expr.map(X=>m.create([X,K],null)),null,H);Y&&(L.push(Y),L.sort(g))}return L.length===1?L[0]:new m(L,O)}}serialize(){return this.expr.map(A=>A.serialize()).join(" && ")}keys(){const A=[];for(let O of this.expr)A.push(...O.keys());return A}negate(){if(!this.negated){const A=[];for(let O of this.expr)A.push(O.negate());this.negated=E.create(A,this,!0)}return this.negated}}class E{constructor(A,O){this.expr=A,this.negated=O,this.type=9}static create(A,O,L){return E._normalizeArr(A,O,L)}cmp(A){if(A.type!==this.type)return this.type-A.type;if(this.expr.length<A.expr.length)return-1;if(this.expr.length>A.expr.length)return 1;for(let O=0,L=this.expr.length;O<L;O++){const B=g(this.expr[O],A.expr[O]);if(B!==0)return B}return 0}equals(A){if(A.type===this.type){if(this.expr.length!==A.expr.length)return!1;for(let O=0,L=this.expr.length;O<L;O++)if(!this.expr[O].equals(A.expr[O]))return!1;return!0}return!1}substituteConstants(){const A=v(this.expr);return A===this.expr?this:E.create(A,this.negated,!1)}evaluate(A){for(let O=0,L=this.expr.length;O<L;O++)if(this.expr[O].evaluate(A))return!0;return!1}static _normalizeArr(A,O,L){let B=[],W=!1;if(A){for(let K=0,H=A.length;K<H;K++){const Y=A[K];if(!!Y){if(Y.type===0){W=!0;continue}if(Y.type===1)return s.INSTANCE;if(Y.type===9){B=B.concat(Y.expr);continue}B.push(Y)}}if(B.length===0&&W)return t.INSTANCE;B.sort(g)}if(B.length!==0){if(B.length===1)return B[0];for(let K=1;K<B.length;K++)B[K-1].equals(B[K])&&(B.splice(K,1),K--);if(B.length===1)return B[0];if(L){for(let K=0;K<B.length;K++)for(let H=K+1;H<B.length;H++)P(B[K],B[H])&&(B.splice(H,1),H--);if(B.length===1)return B[0]}return new E(B,O)}}serialize(){return this.expr.map(A=>A.serialize()).join(" || ")}keys(){const A=[];for(let O of this.expr)A.push(...O.keys());return A}negate(){if(!this.negated){let A=[];for(let O of this.expr)A.push(O.negate());for(;A.length>1;){const O=A.shift(),L=A.shift(),B=[];for(const K of F(O))for(const H of F(L))B.push(m.create([K,H],null));const W=A.length===0;A.unshift(E.create(B,null,W))}this.negated=A[0]}return this.negated}}class I extends c{constructor(A,O,L){super(A,null);this._defaultValue=O,typeof L=="object"?I._info.push(Object.assign(Object.assign({},L),{key:A})):L!==!0&&I._info.push({key:A,description:L,type:O!=null?typeof O:void 0})}static all(){return I._info.values()}bindTo(A){return A.createKey(this.key,this._defaultValue)}getValue(A){return A.getContextKeyValue(this.key)}toNegated(){return this.negate()}isEqualTo(A){return u.create(this.key,A)}}e.RawContextKey=I,I._info=[],e.IContextKeyService=(0,T.createDecorator)("contextKeyService"),e.SET_CONTEXT_COMMAND_ID="setContext";function k(R,A){return R<A?-1:R>A?1:0}function M(R,A,O,L){return R<O?-1:R>O?1:A<L?-1:A>L?1:0}function P(R,A){if(A.type===6&&R.type!==9&&R.type!==6){for(const B of A.expr)if(R.equals(B))return!0}const O=R.negate(),L=F(O).concat(F(A));L.sort(g);for(let B=0;B<L.length;B++){const K=L[B].negate();for(let H=B+1;H<L.length;H++){const Y=L[H];if(K.equals(Y))return!0}}return!1}e.implies=P;function F(R){return R.type===9?R.expr:[R]}}),define(J[25],ee([0,1,477,15]),function(j,e,w,N){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EditorContextKeys=void 0;var T;(function(D){D.editorSimpleInput=new N.RawContextKey("editorSimpleInput",!1,!0),D.editorTextFocus=new N.RawContextKey("editorTextFocus",!1,w.localize(0,null)),D.focus=new N.RawContextKey("editorFocus",!1,w.localize(1,null)),D.textInputFocus=new N.RawContextKey("textInputFocus",!1,w.localize(2,null)),D.readOnly=new N.RawContextKey("editorReadonly",!1,w.localize(3,null)),D.inDiffEditor=new N.RawContextKey("inDiffEditor",!1,w.localize(4,null)),D.columnSelection=new N.RawContextKey("editorColumnSelection",!1,w.localize(5,null)),D.writable=D.readOnly.toNegated(),D.hasNonEmptySelection=new N.RawContextKey("editorHasSelection",!1,w.localize(6,null)),D.hasOnlyEmptySelection=D.hasNonEmptySelection.toNegated(),D.hasMultipleSelections=new N.RawContextKey("editorHasMultipleSelections",!1,w.localize(7,null)),D.hasSingleSelection=D.hasMultipleSelections.toNegated(),D.tabMovesFocus=new N.RawContextKey("editorTabMovesFocus",!1,w.localize(8,null)),D.tabDoesNotMoveFocus=D.tabMovesFocus.toNegated(),D.isInWalkThroughSnippet=new N.RawContextKey("isInEmbeddedEditor",!1,!0),D.canUndo=new N.RawContextKey("canUndo",!1,!0),D.canRedo=new N.RawContextKey("canRedo",!1,!0),D.hoverVisible=new N.RawContextKey("editorHoverVisible",!1,w.localize(9,null)),D.inCompositeEditor=new N.RawContextKey("inCompositeEditor",void 0,w.localize(10,null)),D.notInCompositeEditor=D.inCompositeEditor.toNegated(),D.languageId=new N.RawContextKey("editorLangId","",w.localize(11,null)),D.hasCompletionItemProvider=new N.RawContextKey("editorHasCompletionItemProvider",!1,w.localize(12,null)),D.hasCodeActionsProvider=new N.RawContextKey("editorHasCodeActionsProvider",!1,w.localize(13,null)),D.hasCodeLensProvider=new N.RawContextKey("editorHasCodeLensProvider",!1,w.localize(14,null)),D.hasDefinitionProvider=new N.RawContextKey("editorHasDefinitionProvider",!1,w.localize(15,null)),D.hasDeclarationProvider=new N.RawContextKey("editorHasDeclarationProvider",!1,w.localize(16,null)),D.hasImplementationProvider=new N.RawContextKey("editorHasImplementationProvider",!1,w.localize(17,null)),D.hasTypeDefinitionProvider=new N.RawContextKey("editorHasTypeDefinitionProvider",!1,w.localize(18,null)),D.hasHoverProvider=new N.RawContextKey("editorHasHoverProvider",!1,w.localize(19,null)),D.hasDocumentHighlightProvider=new N.RawContextKey("editorHasDocumentHighlightProvider",!1,w.localize(20,null)),D.hasDocumentSymbolProvider=new N.RawContextKey("editorHasDocumentSymbolProvider",!1,w.localize(21,null)),D.hasReferenceProvider=new N.RawContextKey("editorHasReferenceProvider",!1,w.localize(22,null)),D.hasRenameProvider=new N.RawContextKey("editorHasRenameProvider",!1,w.localize(23,null)),D.hasSignatureHelpProvider=new N.RawContextKey("editorHasSignatureHelpProvider",!1,w.localize(24,null)),D.hasInlayHintsProvider=new N.RawContextKey("editorHasInlayHintsProvider",!1,w.localize(25,null)),D.hasDocumentFormattingProvider=new N.RawContextKey("editorHasDocumentFormattingProvider",!1,w.localize(26,null)),D.hasDocumentSelectionFormattingProvider=new N.RawContextKey("editorHasDocumentSelectionFormattingProvider",!1,w.localize(27,null)),D.hasMultipleDocumentFormattingProvider=new N.RawContextKey("editorHasMultipleDocumentFormattingProvider",!1,w.localize(28,null)),D.hasMultipleDocumentSelectionFormattingProvider=new N.RawContextKey("editorHasMultipleDocumentSelectionFormattingProvider",!1,w.localize(29,null))})(T=e.EditorContextKeys||(e.EditorContextKeys={}))}),define(J[191],ee([0,1,23,11,20,24,13,18,66,26,15]),function(j,e,w,N,T,D,S,p,C,n,g){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.provideSignatureHelp=e.Context=void 0,e.Context={Visible:new g.RawContextKey("parameterHintsVisible",!1),MultipleSignatures:new g.RawContextKey("parameterHintsMultipleSignatures",!1)};function t(s,c,u,d){return Re(this,void 0,void 0,function*(){const a=p.SignatureHelpProviderRegistry.ordered(s);for(const r of a)try{const o=yield r.provideSignatureHelp(s,c,d,u);if(o)return o}catch(o){(0,N.onUnexpectedExternalError)(o)}})}e.provideSignatureHelp=t,n.CommandsRegistry.registerCommand("_executeSignatureHelpProvider",(s,...c)=>Re(void 0,void 0,void 0,function*(){const[u,d,a]=c;(0,T.assertType)(D.URI.isUri(u)),(0,T.assertType)(S.Position.isIPosition(d)),(0,T.assertType)(typeof a=="string"||!a);const r=yield s.get(C.ITextModelService).createModelReference(u);try{const o=yield t(r.object.textEditorModel,S.Position.lift(d),{triggerKind:p.SignatureHelpTriggerKind.Invoke,isRetrigger:!1,triggerCharacter:a},w.CancellationToken.None);return o?(setTimeout(()=>o.dispose(),0),o.value):void 0}finally{r.dispose()}}))}),define(J[568],ee([0,1,14,11,4,2,97,18,191]),function(j,e,w,N,T,D,S,p,C){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ParameterHintsModel=void 0;var n;(function(s){s.Default={type:0};class c{constructor(a,r){this.request=a,this.previouslyActiveHints=r,this.type=2}}s.Pending=c;class u{constructor(a){this.hints=a,this.type=1}}s.Active=u})(n||(n={}));class g extends D.Disposable{constructor(c,u=g.DEFAULT_DELAY){super();this._onChangedHints=this._register(new T.Emitter),this.onChangedHints=this._onChangedHints.event,this.triggerOnType=!1,this._state=n.Default,this._pendingTriggers=[],this._lastSignatureHelpResult=this._register(new D.MutableDisposable),this.triggerChars=new S.CharacterSet,this.retriggerChars=new S.CharacterSet,this.triggerId=0,this.editor=c,this.throttledDelayer=new w.Delayer(u),this._register(this.editor.onDidBlurEditorWidget(()=>this.cancel())),this._register(this.editor.onDidChangeConfiguration(()=>this.onEditorConfigurationChange())),this._register(this.editor.onDidChangeModel(d=>this.onModelChanged())),this._register(this.editor.onDidChangeModelLanguage(d=>this.onModelChanged())),this._register(this.editor.onDidChangeCursorSelection(d=>this.onCursorChange(d))),this._register(this.editor.onDidChangeModelContent(d=>this.onModelContentChange())),this._register(p.SignatureHelpProviderRegistry.onDidChange(this.onModelChanged,this)),this._register(this.editor.onDidType(d=>this.onDidType(d))),this.onEditorConfigurationChange(),this.onModelChanged()}get state(){return this._state}set state(c){this._state.type===2&&this._state.request.cancel(),this._state=c}cancel(c=!1){this.state=n.Default,this.throttledDelayer.cancel(),c||this._onChangedHints.fire(void 0)}trigger(c,u){const d=this.editor.getModel();if(!d||!p.SignatureHelpProviderRegistry.has(d))return;const a=++this.triggerId;this._pendingTriggers.push(c),this.throttledDelayer.trigger(()=>this.doTrigger(a),u).catch(N.onUnexpectedError)}next(){if(this.state.type!==1)return;const c=this.state.hints.signatures.length,u=this.state.hints.activeSignature,d=u%c==c-1,a=this.editor.getOption(75).cycle;if((c<2||d)&&!a){this.cancel();return}this.updateActiveSignature(d&&a?0:u+1)}previous(){if(this.state.type!==1)return;const c=this.state.hints.signatures.length,u=this.state.hints.activeSignature,d=u===0,a=this.editor.getOption(75).cycle;if((c<2||d)&&!a){this.cancel();return}this.updateActiveSignature(d&&a?c-1:u-1)}updateActiveSignature(c){this.state.type===1&&(this.state=new n.Active(Object.assign(Object.assign({},this.state.hints),{activeSignature:c})),this._onChangedHints.fire(this.state.hints))}doTrigger(c){return Re(this,void 0,void 0,function*(){const u=this.state.type===1||this.state.type===2,d=this.getLastActiveHints();if(this.cancel(!0),this._pendingTriggers.length===0)return!1;const a=this._pendingTriggers.reduce(t);this._pendingTriggers=[];const r={triggerKind:a.triggerKind,triggerCharacter:a.triggerCharacter,isRetrigger:u,activeSignatureHelp:d};if(!this.editor.hasModel())return!1;const o=this.editor.getModel(),i=this.editor.getPosition();this.state=new n.Pending((0,w.createCancelablePromise)(l=>(0,C.provideSignatureHelp)(o,i,r,l)),d);try{const l=yield this.state.request;return c!==this.triggerId?(l==null||l.dispose(),!1):!l||!l.value.signatures||l.value.signatures.length===0?(l==null||l.dispose(),this._lastSignatureHelpResult.clear(),this.cancel(),!1):(this.state=new n.Active(l.value),this._lastSignatureHelpResult.value=l,this._onChangedHints.fire(this.state.hints),!0)}catch(l){return c===this.triggerId&&(this.state=n.Default),(0,N.onUnexpectedError)(l),!1}})}getLastActiveHints(){switch(this.state.type){case 1:return this.state.hints;case 2:return this.state.previouslyActiveHints;default:return}}get isTriggered(){return this.state.type===1||this.state.type===2||this.throttledDelayer.isTriggered()}onModelChanged(){this.cancel(),this.triggerChars=new S.CharacterSet,this.retriggerChars=new S.CharacterSet;const c=this.editor.getModel();if(!!c)for(const u of p.SignatureHelpProviderRegistry.ordered(c)){for(const d of u.signatureHelpTriggerCharacters||[])this.triggerChars.add(d.charCodeAt(0)),this.retriggerChars.add(d.charCodeAt(0));for(const d of u.signatureHelpRetriggerCharacters||[])this.retriggerChars.add(d.charCodeAt(0))}}onDidType(c){if(!this.triggerOnType)return;const u=c.length-1,d=c.charCodeAt(u);(this.triggerChars.has(d)||this.isTriggered&&this.retriggerChars.has(d))&&this.trigger({triggerKind:p.SignatureHelpTriggerKind.TriggerCharacter,triggerCharacter:c.charAt(u)})}onCursorChange(c){c.source==="mouse"?this.cancel():this.isTriggered&&this.trigger({triggerKind:p.SignatureHelpTriggerKind.ContentChange})}onModelContentChange(){this.isTriggered&&this.trigger({triggerKind:p.SignatureHelpTriggerKind.ContentChange})}onEditorConfigurationChange(){this.triggerOnType=this.editor.getOption(75).enabled,this.triggerOnType||this.cancel()}dispose(){this.cancel(!0),super.dispose()}}e.ParameterHintsModel=g,g.DEFAULT_DELAY=120;function t(s,c){switch(c.triggerKind){case p.SignatureHelpTriggerKind.Invoke:return c;case p.SignatureHelpTriggerKind.ContentChange:return s;case p.SignatureHelpTriggerKind.TriggerCharacter:default:return c}}});var Ce=this&&this.__param||function(j,e){return function(w,N){e(w,N,j)}};define(J[569],ee([0,1,15]),function(j,e,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SuggestAlternatives=void 0;let N=class kt{constructor(D,S){this._editor=D,this._index=0,this._ckOtherSuggestions=kt.OtherSuggestions.bindTo(S)}dispose(){this.reset()}reset(){var D;this._ckOtherSuggestions.reset(),(D=this._listener)===null||D===void 0||D.dispose(),this._model=void 0,this._acceptNext=void 0,this._ignore=!1}set({model:D,index:S},p){if(D.items.length===0){this.reset();return}if(kt._moveIndex(!0,D,S)===S){this.reset();return}this._acceptNext=p,this._model=D,this._index=S,this._listener=this._editor.onDidChangeCursorPosition(()=>{this._ignore||this.reset()}),this._ckOtherSuggestions.set(!0)}static _moveIndex(D,S,p){let C=p;for(;C=(C+S.items.length+(D?1:-1))%S.items.length,!(C===p||!S.items[C].completion.additionalTextEdits););return C}next(){this._move(!0)}prev(){this._move(!1)}_move(D){if(!!this._model)try{this._ignore=!0,this._index=kt._moveIndex(D,this._model,this._index),this._acceptNext({index:this._index,item:this._model.items[this._index],model:this._model})}finally{this._ignore=!1}}};N.OtherSuggestions=new w.RawContextKey("hasOtherSuggestions",!1),N=Fe([Ce(1,w.IContextKeyService)],N),e.SuggestAlternatives=N}),define(J[570],ee([0,1,15]),function(j,e,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.WordContextKey=void 0;let N=class fi{constructor(D,S){this._editor=D,this._enabled=!1,this._ckAtEnd=fi.AtEnd.bindTo(S),this._configListener=this._editor.onDidChangeConfiguration(p=>p.hasChanged(110)&&this._update()),this._update()}dispose(){var D;this._configListener.dispose(),(D=this._selectionListener)===null||D===void 0||D.dispose(),this._ckAtEnd.reset()}_update(){const D=this._editor.getOption(110)==="on";if(this._enabled!==D)if(this._enabled=D,this._enabled){const S=()=>{if(!this._editor.hasModel()){this._ckAtEnd.set(!1);return}const p=this._editor.getModel(),C=this._editor.getSelection(),n=p.getWordAtPosition(C.getStartPosition());if(!n){this._ckAtEnd.set(!1);return}this._ckAtEnd.set(n.endColumn===C.getStartPosition().column)};this._selectionListener=this._editor.onDidChangeCursorSelection(S),S()}else this._selectionListener&&(this._ckAtEnd.reset(),this._selectionListener.dispose(),this._selectionListener=void 0)}};N.AtEnd=new w.RawContextKey("atEndOfWord",!1),N=Fe([Ce(1,w.IContextKeyService)],N),e.WordContextKey=N}),define(J[61],ee([0,1,15,9]),function(j,e,w,N){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CONTEXT_ACCESSIBILITY_MODE_ENABLED=e.IAccessibilityService=void 0,e.IAccessibilityService=(0,N.createDecorator)("accessibilityService"),e.CONTEXT_ACCESSIBILITY_MODE_ENABLED=new w.RawContextKey("accessibilityModeEnabled",!1)}),define(J[261],ee([0,1,17,547,15]),function(j,e,w,N,T){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.InputFocusedContextKey=e.IsWindowsContext=void 0,e.IsWindowsContext=new T.RawContextKey("isWindows",w.isWindows,(0,N.localize)(0,null)),e.InputFocusedContextKey="inputFocus"}),define(J[71],ee([0,1,9]),function(j,e,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IContextMenuService=e.IContextViewService=void 0,e.IContextViewService=(0,w.createDecorator)("contextViewService"),e.IContextMenuService=(0,w.createDecorator)("contextMenuService")}),define(J[124],ee([0,1,9]),function(j,e,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IDialogService=void 0,e.IDialogService=(0,w.createDecorator)("dialogService")}),define(J[150],ee([0,1]),function(j,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ServiceCollection=void 0;class w{constructor(...T){this._entries=new Map;for(let[D,S]of T)this.set(D,S)}set(T,D){const S=this._entries.get(T);return this._entries.set(T,D),S}has(T){return this._entries.has(T)}get(T){return this._entries.get(T)}}e.ServiceCollection=w}),define(J[571],ee([0,1,14,11,251,560,9,150]),function(j,e,w,N,T,D,S,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.InstantiationService=void 0;const C=!1;class n extends Error{constructor(c){var u;super("cyclic dependency between services");this.message=(u=c.findCycleSlow())!==null&&u!==void 0?u:`UNABLE to detect cycle, dumping graph: 
${c.toString()}`}}class g{constructor(c=new p.ServiceCollection,u=!1,d){this._activeInstantiations=new Set,this._services=c,this._strict=u,this._parent=d,this._services.set(S.IInstantiationService,this)}createChild(c){return new g(c,this._strict,this)}invokeFunction(c,...u){let d=t.traceInvocation(c),a=!1;try{return c({get:(o,i)=>{if(a)throw(0,N.illegalState)("service accessor is only valid during the invocation of its target method");const l=this._getOrCreateServiceInstance(o,d);if(!l&&i!==S.optional)throw new Error(`[invokeFunction] unknown service '${o}'`);return l}},...u)}finally{a=!0,d.stop()}}createInstance(c,...u){let d,a;return c instanceof T.SyncDescriptor?(d=t.traceCreation(c.ctor),a=this._createInstance(c.ctor,c.staticArguments.concat(u),d)):(d=t.traceCreation(c),a=this._createInstance(c,u,d)),d.stop(),a}_createInstance(c,u=[],d){let a=S._util.getServiceDependencies(c).sort((i,l)=>i.index-l.index),r=[];for(const i of a){let l=this._getOrCreateServiceInstance(i.id,d);if(!l&&this._strict&&!i.optional)throw new Error(`[createInstance] ${c.name} depends on UNKNOWN service ${i.id}.`);r.push(l)}let o=a.length>0?a[0].index:u.length;if(u.length!==o){console.warn(`[createInstance] First service dependency of ${c.name} at position ${o+1} conflicts with ${u.length} static arguments`);let i=o-u.length;i>0?u=u.concat(new Array(i)):u=u.slice(0,o)}return new c(...[...u,...r])}_setServiceInstance(c,u){if(this._services.get(c)instanceof T.SyncDescriptor)this._services.set(c,u);else if(this._parent)this._parent._setServiceInstance(c,u);else throw new Error("illegalState - setting UNKNOWN service instance")}_getServiceInstanceOrDescriptor(c){let u=this._services.get(c);return!u&&this._parent?this._parent._getServiceInstanceOrDescriptor(c):u}_getOrCreateServiceInstance(c,u){let d=this._getServiceInstanceOrDescriptor(c);return d instanceof T.SyncDescriptor?this._safeCreateAndCacheServiceInstance(c,d,u.branch(c,!0)):(u.branch(c,!1),d)}_safeCreateAndCacheServiceInstance(c,u,d){if(this._activeInstantiations.has(c))throw new Error(`illegal state - RECURSIVELY instantiating service '${c}'`);this._activeInstantiations.add(c);try{return this._createAndCacheServiceInstance(c,u,d)}finally{this._activeInstantiations.delete(c)}}_createAndCacheServiceInstance(c,u,d){const a=new D.Graph(i=>i.id.toString());let r=0;const o=[{id:c,desc:u,_trace:d}];for(;o.length;){const i=o.pop();if(a.lookupOrInsertNode(i),r++>1e3)throw new n(a);for(let l of S._util.getServiceDependencies(i.desc.ctor)){let h=this._getServiceInstanceOrDescriptor(l.id);if(!h&&!l.optional&&console.warn(`[createInstance] ${c} depends on ${l.id} which is NOT registered.`),h instanceof T.SyncDescriptor){const f={id:l.id,desc:h,_trace:i._trace.branch(l.id,!0)};a.insertEdge(i,f),o.push(f)}}}for(;;){const i=a.roots();if(i.length===0){if(!a.isEmpty())throw new n(a);break}for(const{data:l}of i){if(this._getServiceInstanceOrDescriptor(l.id)instanceof T.SyncDescriptor){const f=this._createServiceInstanceWithOwner(l.id,l.desc.ctor,l.desc.staticArguments,l.desc.supportsDelayedInstantiation,l._trace);this._setServiceInstance(l.id,f)}a.removeNode(l)}}return this._getServiceInstanceOrDescriptor(c)}_createServiceInstanceWithOwner(c,u,d=[],a,r){if(this._services.get(c)instanceof T.SyncDescriptor)return this._createServiceInstance(u,d,a,r);if(this._parent)return this._parent._createServiceInstanceWithOwner(c,u,d,a,r);throw new Error(`illegalState - creating UNKNOWN service instance ${u.name}`)}_createServiceInstance(c,u=[],d,a){if(d){const r=new w.IdleValue(()=>this._createInstance(c,u,a));return new Proxy(Object.create(null),{get(o,i){if(i in o)return o[i];let l=r.value,h=l[i];return typeof h!="function"||(h=h.bind(l),o[i]=h),h},set(o,i,l){return r.value[i]=l,!0}})}else return this._createInstance(c,u,a)}}e.InstantiationService=g;class t{constructor(c,u){this.type=c,this.name=u,this._start=Date.now(),this._dep=[]}static traceInvocation(c){return C?new t(1,c.name||c.toString().substring(0,42).replace(/\n/g,"")):t._None}static traceCreation(c){return C?new t(0,c.name):t._None}branch(c,u){let d=new t(2,c.toString());return this._dep.push([c,u,d]),d}stop(){let c=Date.now()-this._start;t._totals+=c;let u=!1;function d(r,o){let i=[],l=new Array(r+1).join("    ");for(const[h,f,y]of o._dep)if(f&&y){u=!0,i.push(`${l}CREATES -> ${h}`);let _=d(r+1,y);_&&i.push(_)}else i.push(`${l}uses -> ${h}`);return i.join(`
`)}let a=[`${this.type===0?"CREATE":"CALL"} ${this.name}`,`${d(1,this)}`,`DONE, took ${c.toFixed(2)}ms (grand total ${t._totals.toFixed(2)}ms)`];(c>2||u)&&console.log(a.join(`
`))}}t._None=new class extends t{constructor(){super(-1,null)}stop(){}branch(){return this}},t._totals=0}),define(J[572],ee([0,1,14,4,2,548]),function(j,e,w,N,T,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AbstractKeybindingService=void 0;const S=/^(cursor|delete)/;class p extends T.Disposable{constructor(g,t,s,c,u){super();this._contextKeyService=g,this._commandService=t,this._telemetryService=s,this._notificationService=c,this._logService=u,this._onDidUpdateKeybindings=this._register(new N.Emitter),this._currentChord=null,this._currentChordChecker=new w.IntervalTimer,this._currentChordStatusMessage=null,this._ignoreSingleModifiers=C.EMPTY,this._currentSingleModifier=null,this._currentSingleModifierClearTimeout=new w.TimeoutTimer,this._logging=!1}get onDidUpdateKeybindings(){return this._onDidUpdateKeybindings?this._onDidUpdateKeybindings.event:N.Event.None}dispose(){super.dispose()}_log(g){this._logging&&this._logService.info(`[KeybindingService]: ${g}`)}getKeybindings(){return this._getResolver().getKeybindings()}lookupKeybinding(g,t){const s=this._getResolver().lookupPrimaryKeybinding(g,t||this._contextKeyService);if(!!s)return s.resolvedKeybinding}dispatchEvent(g,t){return this._dispatch(g,t)}softDispatch(g,t){const s=this.resolveKeyboardEvent(g);if(s.isChord())return console.warn("Unexpected keyboard event mapped to a chord"),null;const[c]=s.getDispatchParts();if(c===null)return null;const u=this._contextKeyService.getContext(t),d=this._currentChord?this._currentChord.keypress:null;return this._getResolver().resolve(u,d,c)}_enterChordMode(g,t){this._currentChord={keypress:g,label:t},this._currentChordStatusMessage=this._notificationService.status(D.localize(0,null,t));const s=Date.now();this._currentChordChecker.cancelAndSet(()=>{if(!this._documentHasFocus()){this._leaveChordMode();return}Date.now()-s>5e3&&this._leaveChordMode()},500)}_leaveChordMode(){this._currentChordStatusMessage&&(this._currentChordStatusMessage.dispose(),this._currentChordStatusMessage=null),this._currentChordChecker.cancel(),this._currentChord=null}_dispatch(g,t){return this._doDispatch(this.resolveKeyboardEvent(g),t,!1)}_singleModifierDispatch(g,t){const s=this.resolveKeyboardEvent(g),[c]=s.getSingleModifierDispatchParts();if(c)return this._ignoreSingleModifiers.has(c)?(this._log(`+ Ignoring single modifier ${c} due to it being pressed together with other keys.`),this._ignoreSingleModifiers=C.EMPTY,this._currentSingleModifierClearTimeout.cancel(),this._currentSingleModifier=null,!1):(this._ignoreSingleModifiers=C.EMPTY,this._currentSingleModifier===null?(this._log(`+ Storing single modifier for possible chord ${c}.`),this._currentSingleModifier=c,this._currentSingleModifierClearTimeout.cancelAndSet(()=>{this._log("+ Clearing single modifier due to 300ms elapsed."),this._currentSingleModifier=null},300),!1):c===this._currentSingleModifier?(this._log(`/ Dispatching single modifier chord ${c} ${c}`),this._currentSingleModifierClearTimeout.cancel(),this._currentSingleModifier=null,this._doDispatch(s,t,!0)):(this._log(`+ Clearing single modifier due to modifier mismatch: ${this._currentSingleModifier} ${c}`),this._currentSingleModifierClearTimeout.cancel(),this._currentSingleModifier=null,!1));const[u]=s.getParts();return this._ignoreSingleModifiers=new C(u),this._currentSingleModifier!==null&&this._log("+ Clearing single modifier due to other key up."),this._currentSingleModifierClearTimeout.cancel(),this._currentSingleModifier=null,!1}_doDispatch(g,t,s=!1){let c=!1;if(g.isChord())return console.warn("Unexpected keyboard event mapped to a chord"),!1;let u=null,d=null;if(s){const[i]=g.getSingleModifierDispatchParts();u=i,d=i}else[u]=g.getDispatchParts(),d=this._currentChord?this._currentChord.keypress:null;if(u===null)return this._log("\\ Keyboard event cannot be dispatched in keydown phase."),c;const a=this._contextKeyService.getContext(t),r=g.getLabel(),o=this._getResolver().resolve(a,d,u);return this._logService.trace("KeybindingService#dispatch",r,o==null?void 0:o.commandId),o&&o.enterChord?(c=!0,this._enterChordMode(u,r),c):(this._currentChord&&(!o||!o.commandId)&&(this._notificationService.status(D.localize(1,null,this._currentChord.label,r),{hideAfter:10*1e3}),c=!0),this._leaveChordMode(),o&&o.commandId&&(o.bubble||(c=!0),typeof o.commandArgs=="undefined"?this._commandService.executeCommand(o.commandId).then(void 0,i=>this._notificationService.warn(i)):this._commandService.executeCommand(o.commandId,o.commandArgs).then(void 0,i=>this._notificationService.warn(i)),S.test(o.commandId)||this._telemetryService.publicLog2("workbenchActionExecuted",{id:o.commandId,from:"keybinding"})),c)}mightProducePrintableCharacter(g){return g.ctrlKey||g.metaKey?!1:g.keyCode>=31&&g.keyCode<=56||g.keyCode>=21&&g.keyCode<=30}}e.AbstractKeybindingService=p;class C{constructor(g){this._ctrlKey=g?g.ctrlKey:!1,this._shiftKey=g?g.shiftKey:!1,this._altKey=g?g.altKey:!1,this._metaKey=g?g.metaKey:!1}has(g){switch(g){case"ctrl":return this._ctrlKey;case"shift":return this._shiftKey;case"alt":return this._altKey;case"meta":return this._metaKey}}}C.EMPTY=new C(null)}),define(J[573],ee([0,1,11,189,93]),function(j,e,w,N,T){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BaseResolvedKeybinding=void 0;class D extends T.ResolvedKeybinding{constructor(p,C){super();if(C.length===0)throw(0,w.illegalArgument)("parts");this._os=p,this._parts=C}getLabel(){return N.UILabelProvider.toLabel(this._os,this._parts,p=>this._getLabel(p))}getAriaLabel(){return N.AriaLabelProvider.toLabel(this._os,this._parts,p=>this._getAriaLabel(p))}getElectronAccelerator(){return this._parts.length>1||this._parts[0].isDuplicateModifierCase()?null:N.ElectronAcceleratorLabelProvider.toLabel(this._os,this._parts,p=>this._getElectronAccelerator(p))}isChord(){return this._parts.length>1}getParts(){return this._parts.map(p=>this._getPart(p))}_getPart(p){return new T.ResolvedKeybindingPart(p.ctrlKey,p.shiftKey,p.altKey,p.metaKey,this._getLabel(p),this._getAriaLabel(p))}getDispatchParts(){return this._parts.map(p=>this._getDispatchPart(p))}getSingleModifierDispatchParts(){return this._parts.map(p=>this._getSingleModifierDispatchPart(p))}}e.BaseResolvedKeybinding=D}),define(J[40],ee([0,1,9]),function(j,e,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IKeybindingService=void 0,e.IKeybindingService=(0,w.createDecorator)("keybindingService")}),define(J[262],ee([0,1,15]),function(j,e,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.KeybindingResolver=void 0;class N{constructor(p,C,n){this._log=n,this._defaultKeybindings=p,this._defaultBoundCommands=new Map;for(let g=0,t=p.length;g<t;g++){const s=p[g].command;s&&this._defaultBoundCommands.set(s,!0)}this._map=new Map,this._lookupMap=new Map,this._keybindings=N.combine(p,C);for(let g=0,t=this._keybindings.length;g<t;g++){let s=this._keybindings[g];s.keypressParts.length!==0&&(s.when&&s.when.type===0||this._addKeyPress(s.keypressParts[0],s))}}static _isTargetedForRemoval(p,C,n,g,t){return!(p.command!==g||C&&p.keypressParts[0]!==C||n&&p.keypressParts[1]!==n||t&&(!p.when||!(0,w.expressionsAreEqualWithConstantSubstitution)(t,p.when)))}static combine(p,C){p=p.slice(0);let n=[];for(const g of C){if(!g.command||g.command.length===0||g.command.charAt(0)!=="-"){n.push(g);continue}const t=g.command.substr(1),s=g.keypressParts[0],c=g.keypressParts[1],u=g.when;for(let d=p.length-1;d>=0;d--)this._isTargetedForRemoval(p[d],s,c,t,u)&&p.splice(d,1)}return p.concat(n)}_addKeyPress(p,C){const n=this._map.get(p);if(typeof n=="undefined"){this._map.set(p,[C]),this._addToLookupMap(C);return}for(let g=n.length-1;g>=0;g--){let t=n[g];if(t.command===C.command)continue;const s=t.keypressParts.length>1,c=C.keypressParts.length>1;s&&c&&t.keypressParts[1]!==C.keypressParts[1]||N.whenIsEntirelyIncluded(t.when,C.when)&&this._removeFromLookupMap(t)}n.push(C),this._addToLookupMap(C)}_addToLookupMap(p){if(!p.command)return;let C=this._lookupMap.get(p.command);typeof C=="undefined"?(C=[p],this._lookupMap.set(p.command,C)):C.push(p)}_removeFromLookupMap(p){if(!p.command)return;let C=this._lookupMap.get(p.command);if(typeof C!="undefined"){for(let n=0,g=C.length;n<g;n++)if(C[n]===p){C.splice(n,1);return}}}static whenIsEntirelyIncluded(p,C){return!C||C.type===1?!0:!p||p.type===1?!1:(0,w.implies)(p,C)}getKeybindings(){return this._keybindings}lookupPrimaryKeybinding(p,C){const n=this._lookupMap.get(p);if(typeof n=="undefined"||n.length===0)return null;if(n.length===1)return n[0];for(let g=n.length-1;g>=0;g--){const t=n[g];if(C.contextMatchesRules(t.when))return t}return n[n.length-1]}resolve(p,C,n){this._log(`| Resolving ${n}${C?` chorded from ${C}`:""}`);let g=null;if(C!==null){const s=this._map.get(C);if(typeof s=="undefined")return this._log("\\ No keybinding entries."),null;g=[];for(let c=0,u=s.length;c<u;c++){let d=s[c];d.keypressParts[1]===n&&g.push(d)}}else{const s=this._map.get(n);if(typeof s=="undefined")return this._log("\\ No keybinding entries."),null;g=s}let t=this._findCommand(p,g);return t?C===null&&t.keypressParts.length>1&&t.keypressParts[1]!==null?(this._log(`\\ From ${g.length} keybinding entries, matched chord, when: ${T(t.when)}, source: ${D(t)}.`),{enterChord:!0,leaveChord:!1,commandId:null,commandArgs:null,bubble:!1}):(this._log(`\\ From ${g.length} keybinding entries, matched ${t.command}, when: ${T(t.when)}, source: ${D(t)}.`),{enterChord:!1,leaveChord:t.keypressParts.length>1,commandId:t.command,commandArgs:t.commandArgs,bubble:t.bubble}):(this._log(`\\ From ${g.length} keybinding entries, no when clauses matched the context.`),null)}_findCommand(p,C){for(let n=C.length-1;n>=0;n--){let g=C[n];if(!!N.contextMatchesRules(p,g.when))return g}return null}static contextMatchesRules(p,C){return C?C.evaluate(p):!0}}e.KeybindingResolver=N;function T(S){return S?`${S.serialize()}`:"no when condition"}function D(S){return S.extensionId?S.isBuiltinExtension?`built-in extension ${S.extensionId}`:`user extension ${S.extensionId}`:S.isDefault?"built-in":"user"}}),define(J[263],ee([0,1]),function(j,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.removeElementsAfterNulls=e.ResolvedKeybindingItem=void 0;class w{constructor(D,S,p,C,n,g,t){this._resolvedKeybindingItemBrand=void 0,this.resolvedKeybinding=D,this.keypressParts=D?N(D.getDispatchParts()):[],D&&this.keypressParts.length===0&&(this.keypressParts=N(D.getSingleModifierDispatchParts())),this.bubble=S?S.charCodeAt(0)===94:!1,this.command=this.bubble?S.substr(1):S,this.commandArgs=p,this.when=C,this.isDefault=n,this.extensionId=g,this.isBuiltinExtension=t}}e.ResolvedKeybindingItem=w;function N(T){let D=[];for(let S=0,p=T.length;S<p;S++){const C=T[S];if(!C)return D;D.push(C)}return D}e.removeElementsAfterNulls=N}),define(J[574],ee([0,1,55,93,573,263]),function(j,e,w,N,T,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.USLayoutResolvedKeybinding=void 0;class S extends T.BaseResolvedKeybinding{constructor(C,n){super(n,C.parts)}_keyCodeToUILabel(C){if(this._os===2)switch(C){case 15:return"\u2190";case 16:return"\u2191";case 17:return"\u2192";case 18:return"\u2193"}return w.KeyCodeUtils.toString(C)}_getLabel(C){return C.isDuplicateModifierCase()?"":this._keyCodeToUILabel(C.keyCode)}_getAriaLabel(C){return C.isDuplicateModifierCase()?"":w.KeyCodeUtils.toString(C.keyCode)}_getElectronAccelerator(C){return w.KeyCodeUtils.toElectronAccelerator(C.keyCode)}_getDispatchPart(C){return S.getDispatchStr(C)}static getDispatchStr(C){if(C.isModifierKey())return null;let n="";return C.ctrlKey&&(n+="ctrl+"),C.shiftKey&&(n+="shift+"),C.altKey&&(n+="alt+"),C.metaKey&&(n+="meta+"),n+=w.KeyCodeUtils.toString(C.keyCode),n}_getSingleModifierDispatchPart(C){return C.keyCode===5&&!C.shiftKey&&!C.altKey&&!C.metaKey?"ctrl":C.keyCode===4&&!C.ctrlKey&&!C.altKey&&!C.metaKey?"shift":C.keyCode===6&&!C.ctrlKey&&!C.shiftKey&&!C.metaKey?"alt":C.keyCode===57&&!C.ctrlKey&&!C.shiftKey&&!C.altKey?"meta":null}static _scanCodeToKeyCode(C){const n=w.IMMUTABLE_CODE_TO_KEY_CODE[C];if(n!==-1)return n;switch(C){case 10:return 31;case 11:return 32;case 12:return 33;case 13:return 34;case 14:return 35;case 15:return 36;case 16:return 37;case 17:return 38;case 18:return 39;case 19:return 40;case 20:return 41;case 21:return 42;case 22:return 43;case 23:return 44;case 24:return 45;case 25:return 46;case 26:return 47;case 27:return 48;case 28:return 49;case 29:return 50;case 30:return 51;case 31:return 52;case 32:return 53;case 33:return 54;case 34:return 55;case 35:return 56;case 36:return 22;case 37:return 23;case 38:return 24;case 39:return 25;case 40:return 26;case 41:return 27;case 42:return 28;case 43:return 29;case 44:return 30;case 45:return 21;case 51:return 83;case 52:return 81;case 53:return 87;case 54:return 89;case 55:return 88;case 56:return 0;case 57:return 80;case 58:return 90;case 59:return 86;case 60:return 82;case 61:return 84;case 62:return 85;case 106:return 92}return 0}static _resolveSimpleUserBinding(C){if(!C)return null;if(C instanceof N.SimpleKeybinding)return C;const n=this._scanCodeToKeyCode(C.scanCode);return n===0?null:new N.SimpleKeybinding(C.ctrlKey,C.shiftKey,C.altKey,C.metaKey,n)}static resolveUserBinding(C,n){const g=(0,D.removeElementsAfterNulls)(C.map(t=>this._resolveSimpleUserBinding(t)));return g.length>0?[new S(new N.ChordKeybinding(g),n)]:[]}}e.USLayoutResolvedKeybinding=S}),define(J[125],ee([0,1,9]),function(j,e,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ILabelService=void 0,e.ILabelService=(0,w.createDecorator)("labelService")}),define(J[151],ee([0,1,9]),function(j,e,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ILayoutService=void 0,e.ILayoutService=(0,w.createDecorator)("layoutService")}),define(J[575],ee([0,1,215,2,151]),function(j,e,w,N,T){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ContextViewService=void 0;let D=class extends N.Disposable{constructor(p){super();this.layoutService=p,this.currentViewDisposable=N.Disposable.None,this.container=p.container,this.contextView=this._register(new w.ContextView(this.container,1)),this.layout(),this._register(p.onDidLayout(()=>this.layout()))}setContainer(p,C){this.contextView.setContainer(p,C||1)}showContextView(p,C,n){C?C!==this.container&&(this.container=C,this.setContainer(C,n?3:2)):this.container!==this.layoutService.container&&(this.container=this.layoutService.container,this.setContainer(this.container,1)),this.contextView.show(p);const g=(0,N.toDisposable)(()=>{this.currentViewDisposable===g&&this.hideContextView()});return this.currentViewDisposable=g,g}getContextViewElement(){return this.contextView.getViewElement()}layout(){this.contextView.layout()}hideContextView(p){this.contextView.hide(p)}};D=Fe([Ce(0,T.ILayoutService)],D),e.ContextViewService=D}),define(J[72],ee([0,1,4,2,9]),function(j,e,w,N,T){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LogService=e.ConsoleLogger=e.AbstractLogger=e.DEFAULT_LOG_LEVEL=e.LogLevel=e.ILogService=void 0,e.ILogService=(0,T.createDecorator)("logService");var D;(function(n){n[n.Trace=0]="Trace",n[n.Debug=1]="Debug",n[n.Info=2]="Info",n[n.Warning=3]="Warning",n[n.Error=4]="Error",n[n.Critical=5]="Critical",n[n.Off=6]="Off"})(D=e.LogLevel||(e.LogLevel={})),e.DEFAULT_LOG_LEVEL=D.Info;class S extends N.Disposable{constructor(){super(...arguments);this.level=e.DEFAULT_LOG_LEVEL,this._onDidChangeLogLevel=this._register(new w.Emitter)}setLevel(g){this.level!==g&&(this.level=g,this._onDidChangeLogLevel.fire(this.level))}getLevel(){return this.level}}e.AbstractLogger=S;class p extends S{constructor(g=e.DEFAULT_LOG_LEVEL){super();this.setLevel(g)}trace(g,...t){this.getLevel()<=D.Trace&&console.log("%cTRACE","color: #888",g,...t)}debug(g,...t){this.getLevel()<=D.Debug&&console.log("%cDEBUG","background: #eee; color: #888",g,...t)}info(g,...t){this.getLevel()<=D.Info&&console.log("%c INFO","color: #33f",g,...t)}error(g,...t){this.getLevel()<=D.Error&&console.log("%c  ERR","color: #f33",g,...t)}dispose(){}}e.ConsoleLogger=p;class C extends N.Disposable{constructor(g){super();this.logger=g,this._register(g)}getLevel(){return this.logger.getLevel()}trace(g,...t){this.logger.trace(g,...t)}debug(g,...t){this.logger.debug(g,...t)}info(g,...t){this.logger.info(g,...t)}error(g,...t){this.logger.error(g,...t)}}e.LogService=C}),define(J[89],ee([0,1,76,550,9]),function(j,e,w,N,T){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IMarkerService=e.IMarkerData=e.MarkerSeverity=void 0;var D;(function(p){p[p.Hint=1]="Hint",p[p.Info=2]="Info",p[p.Warning=4]="Warning",p[p.Error=8]="Error"})(D=e.MarkerSeverity||(e.MarkerSeverity={})),function(p){function C(c,u){return u-c}p.compare=C;const n=Object.create(null);n[p.Error]=(0,N.localize)(0,null),n[p.Warning]=(0,N.localize)(1,null),n[p.Info]=(0,N.localize)(2,null);function g(c){return n[c]||""}p.toString=g;function t(c){switch(c){case w.default.Error:return p.Error;case w.default.Warning:return p.Warning;case w.default.Info:return p.Info;case w.default.Ignore:return p.Hint}}p.fromSeverity=t;function s(c){switch(c){case p.Error:return w.default.Error;case p.Warning:return w.default.Warning;case p.Info:return w.default.Info;case p.Hint:return w.default.Ignore}}p.toSeverity=s}(D=e.MarkerSeverity||(e.MarkerSeverity={}));var S;(function(p){const C="";function n(t){return g(t,!0)}p.makeKey=n;function g(t,s){let c=[C];return t.source?c.push(t.source.replace("\xA6","\\\xA6")):c.push(C),t.code?typeof t.code=="string"?c.push(t.code.replace("\xA6","\\\xA6")):c.push(t.code.value.replace("\xA6","\\\xA6")):c.push(C),t.severity!==void 0&&t.severity!==null?c.push(D.toString(t.severity)):c.push(C),t.message&&s?c.push(t.message.replace("\xA6","\\\xA6")):c.push(C),t.startLineNumber!==void 0&&t.startLineNumber!==null?c.push(t.startLineNumber.toString()):c.push(C),t.startColumn!==void 0&&t.startColumn!==null?c.push(t.startColumn.toString()):c.push(C),t.endLineNumber!==void 0&&t.endLineNumber!==null?c.push(t.endLineNumber.toString()):c.push(C),t.endColumn!==void 0&&t.endColumn!==null?c.push(t.endColumn.toString()):c.push(C),c.push(C),c.join("\xA6")}p.makeKeyOptionalMessage=g})(S=e.IMarkerData||(e.IMarkerData={})),e.IMarkerService=(0,T.createDecorator)("markerService")}),define(J[576],ee([0,1,19,4,2,74,8,24,3,70,9,89]),function(j,e,w,N,T,D,S,p,C,n,g,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IMarkerNavigationService=e.MarkerList=e.MarkerCoordinate=void 0;class s{constructor(a,r,o){this.marker=a,this.index=r,this.total=o}}e.MarkerCoordinate=s;let c=class mi{constructor(a,r){this._markerService=r,this._onDidChange=new N.Emitter,this.onDidChange=this._onDidChange.event,this._dispoables=new T.DisposableStore,this._markers=[],this._nextIdx=-1,p.URI.isUri(a)?this._resourceFilter=i=>i.toString()===a.toString():a&&(this._resourceFilter=a);const o=()=>{this._markers=this._markerService.read({resource:p.URI.isUri(a)?a:void 0,severities:t.MarkerSeverity.Error|t.MarkerSeverity.Warning|t.MarkerSeverity.Info}),typeof a=="function"&&(this._markers=this._markers.filter(i=>this._resourceFilter(i.resource))),this._markers.sort(mi._compareMarker)};o(),this._dispoables.add(r.onMarkerChanged(i=>{(!this._resourceFilter||i.some(l=>this._resourceFilter(l)))&&(o(),this._nextIdx=-1,this._onDidChange.fire())}))}dispose(){this._dispoables.dispose(),this._onDidChange.dispose()}matches(a){return!this._resourceFilter&&!a?!0:!this._resourceFilter||!a?!1:this._resourceFilter(a)}get selected(){const a=this._markers[this._nextIdx];return a&&new s(a,this._nextIdx+1,this._markers.length)}_initIdx(a,r,o){let i=!1,l=this._markers.findIndex(h=>h.resource.toString()===a.uri.toString());l<0&&(l=(0,w.binarySearch)(this._markers,{resource:a.uri},(h,f)=>(0,S.compare)(h.resource.toString(),f.resource.toString())),l<0&&(l=~l));for(let h=l;h<this._markers.length;h++){let f=C.Range.lift(this._markers[h]);if(f.isEmpty()){const y=a.getWordAtPosition(f.getStartPosition());y&&(f=new C.Range(f.startLineNumber,y.startColumn,f.startLineNumber,y.endColumn))}if(r&&(f.containsPosition(r)||r.isBeforeOrEqual(f.getStartPosition()))){this._nextIdx=h,i=!0;break}if(this._markers[h].resource.toString()!==a.uri.toString())break}i||(this._nextIdx=o?0:this._markers.length-1),this._nextIdx<0&&(this._nextIdx=this._markers.length-1)}resetIndex(){this._nextIdx=-1}move(a,r,o){if(this._markers.length===0)return!1;let i=this._nextIdx;return this._nextIdx===-1?this._initIdx(r,o,a):a?this._nextIdx=(this._nextIdx+1)%this._markers.length:a||(this._nextIdx=(this._nextIdx-1+this._markers.length)%this._markers.length),i!==this._nextIdx}find(a,r){let o=this._markers.findIndex(i=>i.resource.toString()===a.toString());if(!(o<0)){for(;o<this._markers.length;o++)if(C.Range.containsPosition(this._markers[o],r))return new s(this._markers[o],o+1,this._markers.length)}}static _compareMarker(a,r){let o=(0,S.compare)(a.resource.toString(),r.resource.toString());return o===0&&(o=t.MarkerSeverity.compare(a.severity,r.severity)),o===0&&(o=C.Range.compareRangesUsingStarts(a,r)),o}};c=Fe([Ce(1,t.IMarkerService)],c),e.MarkerList=c,e.IMarkerNavigationService=(0,g.createDecorator)("IMarkerNavigationService");let u=class{constructor(a){this._markerService=a,this._provider=new D.LinkedList}getMarkerList(a){for(let r of this._provider){const o=r.getMarkerList(a);if(o)return o}return new c(a,this._markerService)}};u=Fe([Ce(0,t.IMarkerService)],u),(0,n.registerSingleton)(e.IMarkerNavigationService,u,!0)}),define(J[577],ee([0,1,19,4,54,47,48,24,89]),function(j,e,w,N,T,D,S,p,C){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MarkerService=void 0;class n{constructor(){this._byResource=new D.ResourceMap,this._byOwner=new Map}set(c,u,d){let a=this._byResource.get(c);a||(a=new Map,this._byResource.set(c,a)),a.set(u,d);let r=this._byOwner.get(u);r||(r=new D.ResourceMap,this._byOwner.set(u,r)),r.set(c,d)}get(c,u){let d=this._byResource.get(c);return d==null?void 0:d.get(u)}delete(c,u){let d=!1,a=!1,r=this._byResource.get(c);r&&(d=r.delete(u));let o=this._byOwner.get(u);if(o&&(a=o.delete(c)),d!==a)throw new Error("illegal state");return d&&a}values(c){var u,d,a,r;return typeof c=="string"?(d=(u=this._byOwner.get(c))===null||u===void 0?void 0:u.values())!==null&&d!==void 0?d:T.Iterable.empty():p.URI.isUri(c)?(r=(a=this._byResource.get(c))===null||a===void 0?void 0:a.values())!==null&&r!==void 0?r:T.Iterable.empty():T.Iterable.map(T.Iterable.concat(...this._byOwner.values()),o=>o[1])}}class g{constructor(c){this.errors=0,this.infos=0,this.warnings=0,this.unknowns=0,this._data=new D.ResourceMap,this._service=c,this._subscription=c.onMarkerChanged(this._update,this)}dispose(){this._subscription.dispose()}_update(c){for(const u of c){const d=this._data.get(u);d&&this._substract(d);const a=this._resourceStats(u);this._add(a),this._data.set(u,a)}}_resourceStats(c){const u={errors:0,warnings:0,infos:0,unknowns:0};if(c.scheme===S.Schemas.inMemory||c.scheme===S.Schemas.walkThrough||c.scheme===S.Schemas.walkThroughSnippet)return u;for(const{severity:d}of this._service.read({resource:c}))d===C.MarkerSeverity.Error?u.errors+=1:d===C.MarkerSeverity.Warning?u.warnings+=1:d===C.MarkerSeverity.Info?u.infos+=1:u.unknowns+=1;return u}_substract(c){this.errors-=c.errors,this.warnings-=c.warnings,this.infos-=c.infos,this.unknowns-=c.unknowns}_add(c){this.errors+=c.errors,this.warnings+=c.warnings,this.infos+=c.infos,this.unknowns+=c.unknowns}}class t{constructor(){this._onMarkerChanged=new N.DebounceEmitter({delay:0,merge:t._merge}),this.onMarkerChanged=this._onMarkerChanged.event,this._data=new n,this._stats=new g(this)}dispose(){this._stats.dispose(),this._onMarkerChanged.dispose()}remove(c,u){for(const d of u||[])this.changeOne(c,d,[])}changeOne(c,u,d){if((0,w.isFalsyOrEmpty)(d))this._data.delete(u,c)&&this._onMarkerChanged.fire([u]);else{const a=[];for(const r of d){const o=t._toMarker(c,u,r);o&&a.push(o)}this._data.set(u,c,a),this._onMarkerChanged.fire([u])}}static _toMarker(c,u,d){let{code:a,severity:r,message:o,source:i,startLineNumber:l,startColumn:h,endLineNumber:f,endColumn:y,relatedInformation:_,tags:b}=d;if(!!o)return l=l>0?l:1,h=h>0?h:1,f=f>=l?f:l,y=y>0?y:h,{resource:u,owner:c,code:a,severity:r,message:o,source:i,startLineNumber:l,startColumn:h,endLineNumber:f,endColumn:y,relatedInformation:_,tags:b}}read(c=Object.create(null)){let{owner:u,resource:d,severities:a,take:r}=c;if((!r||r<0)&&(r=-1),u&&d){const o=this._data.get(d,u);if(o){const i=[];for(const l of o)if(t._accept(l,a)){const h=i.push(l);if(r>0&&h===r)break}return i}else return[]}else if(!u&&!d){const o=[];for(let i of this._data.values())for(let l of i)if(t._accept(l,a)){const h=o.push(l);if(r>0&&h===r)return o}return o}else{const o=this._data.values(d??u),i=[];for(const l of o)for(const h of l)if(t._accept(h,a)){const f=i.push(h);if(r>0&&f===r)return i}return i}}static _accept(c,u){return u===void 0||(u&c.severity)===c.severity}static _merge(c){const u=new D.ResourceMap;for(let d of c)for(let a of d)u.set(a,!0);return Array.from(u.keys())}}e.MarkerService=t}),define(J[36],ee([0,1,76,9]),function(j,e,w,N){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NoOpNotification=e.INotificationService=e.Severity=void 0,e.Severity=w.default,e.INotificationService=(0,N.createDecorator)("notificationService");class T{}e.NoOpNotification=T}),define(J[57],ee([0,1,2,8,24,9]),function(j,e,w,N,T,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.matchesScheme=e.NullOpenerService=e.IOpenerService=void 0,e.IOpenerService=(0,D.createDecorator)("openerService"),e.NullOpenerService=Object.freeze({_serviceBrand:void 0,registerOpener(){return w.Disposable.None},registerValidator(){return w.Disposable.None},registerExternalUriResolver(){return w.Disposable.None},setDefaultExternalOpener(){},registerExternalOpener(){return w.Disposable.None},open(){return Re(this,void 0,void 0,function*(){return!1})},resolveExternalUri(p){return Re(this,void 0,void 0,function*(){return{resolved:p,dispose(){}}})}});function S(p,C){return T.URI.isUri(p)?(0,N.equalsIgnoreCase)(p.scheme,C):(0,N.startsWithIgnoreCase)(p,C+":")}e.matchesScheme=S}),define(J[578],ee([0,1,7,23,74,47,210,48,44,24,28,26,558,57]),function(j,e,w,N,T,D,S,p,C,n,g,t,s,c){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.OpenerService=void 0;let u=class{constructor(o){this._commandService=o}open(o,i){return Re(this,void 0,void 0,function*(){if(!(0,c.matchesScheme)(o,p.Schemas.command))return!1;if(!(i==null?void 0:i.allowCommands))return!0;typeof o=="string"&&(o=n.URI.parse(o));let l=[];try{l=(0,S.parse)(decodeURIComponent(o.query))}catch(h){try{l=(0,S.parse)(o.query)}catch(f){}}return Array.isArray(l)||(l=[l]),yield this._commandService.executeCommand(o.path,...l),!0})}};u=Fe([Ce(0,t.ICommandService)],u);let d=class{constructor(o){this._editorService=o}open(o,i){return Re(this,void 0,void 0,function*(){typeof o=="string"&&(o=n.URI.parse(o));let l;const h=/^L?(\d+)(?:,(\d+))?/.exec(o.fragment);return h&&(l={startLineNumber:parseInt(h[1]),startColumn:h[2]?parseInt(h[2]):1},o=o.with({fragment:""})),o.scheme===p.Schemas.file&&(o=(0,C.normalizePath)(o)),yield this._editorService.openCodeEditor({resource:o,options:Object.assign({selection:l,context:(i==null?void 0:i.fromUserGesture)?s.EditorOpenContext.USER:s.EditorOpenContext.API},i==null?void 0:i.editorOptions)},this._editorService.getFocusedCodeEditor(),i==null?void 0:i.openToSide),!0})}};d=Fe([Ce(0,g.ICodeEditorService)],d);let a=class{constructor(o,i){this._openers=new T.LinkedList,this._validators=new T.LinkedList,this._resolvers=new T.LinkedList,this._resolvedUriTargets=new D.ResourceMap(l=>l.with({path:null,fragment:null,query:null}).toString()),this._externalOpeners=new T.LinkedList,this._defaultExternalOpener={openExternal:l=>Re(this,void 0,void 0,function*(){return(0,c.matchesScheme)(l,p.Schemas.http)||(0,c.matchesScheme)(l,p.Schemas.https)?w.windowOpenNoOpener(l):window.location.href=l,!0})},this._openers.push({open:(l,h)=>Re(this,void 0,void 0,function*(){return(h==null?void 0:h.openExternal)||(0,c.matchesScheme)(l,p.Schemas.mailto)||(0,c.matchesScheme)(l,p.Schemas.http)||(0,c.matchesScheme)(l,p.Schemas.https)?(yield this._doOpenExternal(l,h),!0):!1})}),this._openers.push(new u(i)),this._openers.push(new d(o))}registerOpener(o){return{dispose:this._openers.unshift(o)}}registerValidator(o){return{dispose:this._validators.push(o)}}registerExternalUriResolver(o){return{dispose:this._resolvers.push(o)}}setDefaultExternalOpener(o){this._defaultExternalOpener=o}registerExternalOpener(o){return{dispose:this._externalOpeners.push(o)}}open(o,i){var l;return Re(this,void 0,void 0,function*(){const h=typeof o=="string"?n.URI.parse(o):o,f=(l=this._resolvedUriTargets.get(h))!==null&&l!==void 0?l:o;for(const y of this._validators)if(!(yield y.shouldOpen(f)))return!1;for(const y of this._openers)if(yield y.open(o,i))return!0;return!1})}resolveExternalUri(o,i){return Re(this,void 0,void 0,function*(){for(const l of this._resolvers)try{const h=yield l.resolveExternalUri(o,i);if(h)return this._resolvedUriTargets.has(h.resolved)||this._resolvedUriTargets.set(h.resolved,o),h}catch(h){}throw new Error("Could not resolve external URI: "+o.toString())})}_doOpenExternal(o,i){return Re(this,void 0,void 0,function*(){const l=typeof o=="string"?n.URI.parse(o):o;let h;try{h=(yield this.resolveExternalUri(l,i)).resolved}catch(y){h=l}let f;if(typeof o=="string"&&l.toString()===h.toString()?f=o:f=encodeURI(h.toString(!0)),i==null?void 0:i.allowContributedOpeners){const y=typeof(i==null?void 0:i.allowContributedOpeners)=="string"?i==null?void 0:i.allowContributedOpeners:void 0;for(const _ of this._externalOpeners)if(yield _.openExternal(f,{sourceUri:l,preferredOpenerId:y},N.CancellationToken.None))return!0}return this._defaultExternalOpener.openExternal(f,{sourceUri:l},N.CancellationToken.None)})}dispose(){this._validators.clear()}};a=Fe([Ce(0,g.ICodeEditorService),Ce(1,t.ICommandService)],a),e.OpenerService=a}),define(J[62],ee([0,1,9]),function(j,e,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IEditorProgressService=e.Progress=void 0;class N{constructor(D){this.callback=D}report(D){this._value=D,this.callback(this._value)}}e.Progress=N,N.None=Object.freeze({report(){}}),e.IEditorProgressService=(0,w.createDecorator)("editorProgressService")}),define(J[579],ee([0,1,14,23,2]),function(j,e,w,N,T){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.PickerQuickAccessProvider=e.TriggerAction=void 0;var D;(function(n){n[n.NO_ACTION=0]="NO_ACTION",n[n.CLOSE_PICKER=1]="CLOSE_PICKER",n[n.REFRESH_PICKER=2]="REFRESH_PICKER",n[n.REMOVE_ITEM=3]="REMOVE_ITEM"})(D=e.TriggerAction||(e.TriggerAction={}));function S(n){const g=n;return Array.isArray(g.items)}function p(n){const g=n;return!!g.picks&&g.additionalPicks instanceof Promise}class C extends T.Disposable{constructor(g,t){super();this.prefix=g,this.options=t}provide(g,t){var s;const c=new T.DisposableStore;g.canAcceptInBackground=!!((s=this.options)===null||s===void 0?void 0:s.canAcceptInBackground),g.matchOnLabel=g.matchOnDescription=g.matchOnDetail=g.sortByLabel=!1;let u;const d=c.add(new T.MutableDisposable),a=()=>Re(this,void 0,void 0,function*(){const r=d.value=new T.DisposableStore;u==null||u.dispose(!0),g.busy=!1,u=new N.CancellationTokenSource(t);const o=u.token,i=g.value.substr(this.prefix.length).trim(),l=this._getPicks(i,r,o),h=(f,y)=>{var _;let b,v;if(S(f)?(b=f.items,v=f.active):b=f,b.length===0){if(y)return!1;i.length>0&&((_=this.options)===null||_===void 0?void 0:_.noResultsPick)&&(b=[this.options.noResultsPick])}return g.items=b,v&&(g.activeItems=[v]),!0};if(l!==null)if(p(l)){let f=!1,y=!1;yield Promise.all([(()=>Re(this,void 0,void 0,function*(){yield(0,w.timeout)(C.FAST_PICKS_RACE_DELAY),!o.isCancellationRequested&&(y||(f=h(l.picks,!0)))}))(),(()=>Re(this,void 0,void 0,function*(){g.busy=!0;try{const _=yield l.additionalPicks;if(o.isCancellationRequested)return;let b,v;S(l.picks)?(b=l.picks.items,v=l.picks.active):b=l.picks;let m,E;if(S(_)?(m=_.items,E=_.active):m=_,m.length>0||!f){let I;if(!v&&!E){const k=g.activeItems[0];k&&b.indexOf(k)!==-1&&(I=k)}h({items:[...b,...m],active:v||E||I})}}finally{o.isCancellationRequested||(g.busy=!1),y=!0}}))()])}else if(!(l instanceof Promise))h(l);else{g.busy=!0;try{const f=yield l;if(o.isCancellationRequested)return;h(f)}finally{o.isCancellationRequested||(g.busy=!1)}}});return c.add(g.onDidChangeValue(()=>a())),a(),c.add(g.onDidAccept(r=>{const[o]=g.selectedItems;typeof(o==null?void 0:o.accept)=="function"&&(r.inBackground||g.hide(),o.accept(g.keyMods,r))})),c.add(g.onDidTriggerItemButton(({button:r,item:o})=>Re(this,void 0,void 0,function*(){var i,l;if(typeof o.trigger=="function"){const h=(l=(i=o.buttons)===null||i===void 0?void 0:i.indexOf(r))!==null&&l!==void 0?l:-1;if(h>=0){const f=o.trigger(h,g.keyMods),y=typeof f=="number"?f:yield f;if(t.isCancellationRequested)return;switch(y){case D.NO_ACTION:break;case D.CLOSE_PICKER:g.hide();break;case D.REFRESH_PICKER:a();break;case D.REMOVE_ITEM:const _=g.items.indexOf(o);if(_!==-1){const b=g.items.slice(),v=b.splice(_,1),m=g.activeItems.filter(I=>I!==v[0]),E=g.keepScrollPosition;g.keepScrollPosition=!0,g.items=b,m&&(g.activeItems=m),g.keepScrollPosition=E}break}}}}))),c}}e.PickerQuickAccessProvider=C,C.FAST_PICKS_RACE_DELAY=200});var zt=this&&this.__createBinding||(Object.create?function(j,e,w,N){N===void 0&&(N=w),Object.defineProperty(j,N,{enumerable:!0,get:function(){return e[w]}})}:function(j,e,w,N){N===void 0&&(N=w),j[N]=e[w]}),Ht=this&&this.__exportStar||function(j,e){for(var w in j)w!=="default"&&!Object.prototype.hasOwnProperty.call(e,w)&&zt(e,j,w)};define(J[79],ee([0,1,9,213]),function(j,e,w,N){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IQuickInputService=void 0,Ht(N,e),e.IQuickInputService=(0,w.createDecorator)("quickInputService")}),define(J[33],ee([0,1,206,20]),function(j,e,w,N){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Registry=void 0;class T{constructor(){this.data=new Map}add(S,p){w.ok(N.isString(S)),w.ok(N.isObject(p)),w.ok(!this.data.has(S),"There is already an extension with this id"),this.data.set(S,p)}as(S){return this.data.get(S)||null}}e.Registry=new T}),define(J[192],ee([0,1,4,33]),function(j,e,w,N){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Extensions=void 0,e.Extensions={JSONContribution:"base.contributions.json"};function T(p){return p.length>0&&p.charAt(p.length-1)==="#"?p.substring(0,p.length-1):p}class D{constructor(){this._onDidChangeSchema=new w.Emitter,this.schemasById={}}registerSchema(C,n){this.schemasById[T(C)]=n,this._onDidChangeSchema.fire(C)}notifySchemaChanged(C){this._onDidChangeSchema.fire(C)}}const S=new D;N.Registry.add(e.Extensions.JSONContribution,S)}),define(J[101],ee([0,1,4,20,545,192,33]),function(j,e,w,N,T,D,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.validateProperty=e.getDefaultValue=e.overrideIdentifierFromKey=e.OVERRIDE_PROPERTY_PATTERN=e.resourceLanguageSettingsSchemaId=e.resourceSettings=e.windowSettings=e.machineOverridableSettings=e.machineSettings=e.applicationSettings=e.allSettings=e.Extensions=void 0,e.Extensions={Configuration:"base.contributions.configuration"},e.allSettings={properties:{},patternProperties:{}},e.applicationSettings={properties:{},patternProperties:{}},e.machineSettings={properties:{},patternProperties:{}},e.machineOverridableSettings={properties:{},patternProperties:{}},e.windowSettings={properties:{},patternProperties:{}},e.resourceSettings={properties:{},patternProperties:{}},e.resourceLanguageSettingsSchemaId="vscode://schemas/settings/resourceLanguage";const p=S.Registry.as(D.Extensions.JSONContribution);class C{constructor(){this.overrideIdentifiers=new Set,this._onDidSchemaChange=new w.Emitter,this._onDidUpdateConfiguration=new w.Emitter,this.defaultValues={},this.defaultLanguageConfigurationOverridesNode={id:"defaultOverrides",title:T.localize(0,null),properties:{}},this.configurationContributors=[this.defaultLanguageConfigurationOverridesNode],this.resourceLanguageSettingsSchema={properties:{},patternProperties:{},additionalProperties:!1,errorMessage:"Unknown editor configuration setting",allowTrailingCommas:!0,allowComments:!0},this.configurationProperties={},this.excludedConfigurationProperties={},p.registerSchema(e.resourceLanguageSettingsSchemaId,this.resourceLanguageSettingsSchema)}registerConfiguration(d,a=!0){this.registerConfigurations([d],a)}registerConfigurations(d,a=!0){const r=this.doRegisterConfigurations(d,a);p.registerSchema(e.resourceLanguageSettingsSchemaId,this.resourceLanguageSettingsSchema),this._onDidSchemaChange.fire(),this._onDidUpdateConfiguration.fire(r)}registerOverrideIdentifiers(d){for(const a of d)this.overrideIdentifiers.add(a);this.updateOverridePropertyPatternKey()}doRegisterConfigurations(d,a){const r=[];return d.forEach(o=>{r.push(...this.validateAndRegisterProperties(o,a,o.extensionInfo)),this.configurationContributors.push(o),this.registerJSONConfiguration(o)}),r}validateAndRegisterProperties(d,a=!0,r,o=3){var i;o=N.isUndefinedOrNull(d.scope)?o:d.scope;let l=[],h=d.properties;if(h)for(let y in h){if(a&&c(y)){delete h[y];continue}const _=h[y];if(this.updatePropertyDefaultValue(y,_),e.OVERRIDE_PROPERTY_PATTERN.test(y)?_.scope=void 0:(_.scope=N.isUndefinedOrNull(_.scope)?o:_.scope,_.restricted=N.isUndefinedOrNull(_.restricted)?!!((i=r==null?void 0:r.restrictedConfigurations)===null||i===void 0?void 0:i.includes(y)):_.restricted),h[y].hasOwnProperty("included")&&!h[y].included){this.excludedConfigurationProperties[y]=h[y],delete h[y];continue}else this.configurationProperties[y]=h[y];!h[y].deprecationMessage&&h[y].markdownDeprecationMessage&&(h[y].deprecationMessage=h[y].markdownDeprecationMessage),l.push(y)}let f=d.allOf;if(f)for(let y of f)l.push(...this.validateAndRegisterProperties(y,a,r,o));return l}getConfigurationProperties(){return this.configurationProperties}registerJSONConfiguration(d){const a=r=>{let o=r.properties;if(o)for(const l in o)this.updateSchema(l,o[l]);let i=r.allOf;i&&i.forEach(a)};a(d)}updateSchema(d,a){switch(e.allSettings.properties[d]=a,a.scope){case 1:e.applicationSettings.properties[d]=a;break;case 2:e.machineSettings.properties[d]=a;break;case 6:e.machineOverridableSettings.properties[d]=a;break;case 3:e.windowSettings.properties[d]=a;break;case 4:e.resourceSettings.properties[d]=a;break;case 5:e.resourceSettings.properties[d]=a,this.resourceLanguageSettingsSchema.properties[d]=a;break}}updateOverridePropertyPatternKey(){for(const d of this.overrideIdentifiers.values()){const a=`[${d}]`,r={type:"object",description:T.localize(1,null),errorMessage:T.localize(2,null),$ref:e.resourceLanguageSettingsSchemaId};this.updatePropertyDefaultValue(a,r),e.allSettings.properties[a]=r,e.applicationSettings.properties[a]=r,e.machineSettings.properties[a]=r,e.machineOverridableSettings.properties[a]=r,e.windowSettings.properties[a]=r,e.resourceSettings.properties[a]=r}this._onDidSchemaChange.fire()}updatePropertyDefaultValue(d,a){let r=this.defaultValues[d];N.isUndefined(r)&&(r=a.default),N.isUndefined(r)&&(r=t(a.type)),a.default=r}}const n="\\[.*\\]$";e.OVERRIDE_PROPERTY_PATTERN=new RegExp(n);function g(u){return u.substring(1,u.length-1)}e.overrideIdentifierFromKey=g;function t(u){switch(Array.isArray(u)?u[0]:u){case"boolean":return!1;case"integer":case"number":return 0;case"string":return"";case"array":return[];case"object":return{};default:return null}}e.getDefaultValue=t;const s=new C;S.Registry.add(e.Extensions.Configuration,s);function c(u){return u.trim()?e.OVERRIDE_PROPERTY_PATTERN.test(u)?T.localize(4,null,u):s.getConfigurationProperties()[u]!==void 0?T.localize(5,null,u):null:T.localize(3,null)}e.validateProperty=c}),define(J[193],ee([0,1,473,4,2,38,19,31,139,173,101,33,207]),function(j,e,w,N,T,D,S,p,C,n,g,t,s){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.isDiffEditorConfigurationKey=e.isEditorConfigurationKey=e.editorConfigurationBaseNode=e.CommonEditorConfiguration=e.ComputedEditorOptions=e.TabFocus=void 0,e.TabFocus=new class{constructor(){this._tabFocus=!1,this._onDidChangeTabFocus=new N.Emitter,this.onDidChangeTabFocus=this._onDidChangeTabFocus.event}getTabFocusMode(){return this._tabFocus}setTabFocusMode(m){this._tabFocus!==m&&(this._tabFocus=m,this._onDidChangeTabFocus.fire(this._tabFocus))}};const c=Object.hasOwnProperty;class u{constructor(){this._values=[]}_read(E){return this._values[E]}get(E){return this._values[E]}_write(E,I){this._values[E]=I}}e.ComputedEditorOptions=u;class d{constructor(){this._values=[]}_read(E){return this._values[E]}_write(E,I){this._values[E]=I}}class a{static readOptions(E){const I=E,k=new d;for(const M of p.editorOptionsRegistry){const P=M.name==="_never_"?void 0:I[M.name];k._write(M.id,P)}return k}static validateOptions(E){const I=new p.ValidatedEditorOptions;for(const k of p.editorOptionsRegistry)I._write(k.id,k.validate(E._read(k.id)));return I}static computeOptions(E,I){const k=new u;for(const M of p.editorOptionsRegistry)k._write(M.id,M.compute(I,k,E._read(M.id)));return k}static _deepEquals(E,I){if(typeof E!="object"||typeof I!="object")return E===I;if(Array.isArray(E)||Array.isArray(I))return Array.isArray(E)&&Array.isArray(I)?S.equals(E,I):!1;for(let k in E)if(!a._deepEquals(E[k],I[k]))return!1;return!0}static checkEquals(E,I){const k=[];let M=!1;for(const P of p.editorOptionsRegistry){const F=!a._deepEquals(E._read(P.id),I._read(P.id));k[P.id]=F,F&&(M=!0)}return M?new p.ConfigurationChangedEvent(k):null}}function r(m){const E=m.wordWrap;E===!0?m.wordWrap="on":E===!1&&(m.wordWrap="off");const I=m.lineNumbers;I===!0?m.lineNumbers="on":I===!1&&(m.lineNumbers="off"),m.autoClosingBrackets===!1&&(m.autoClosingBrackets="never",m.autoClosingQuotes="never",m.autoSurround="never"),m.cursorBlinking==="visible"&&(m.cursorBlinking="solid");const P=m.renderWhitespace;P===!0?m.renderWhitespace="boundary":P===!1&&(m.renderWhitespace="none");const F=m.renderLineHighlight;F===!0?m.renderLineHighlight="line":F===!1&&(m.renderLineHighlight="none");const R=m.acceptSuggestionOnEnter;R===!0?m.acceptSuggestionOnEnter="on":R===!1&&(m.acceptSuggestionOnEnter="off");const A=m.tabCompletion;A===!1?m.tabCompletion="off":A===!0&&(m.tabCompletion="onlySnippets");const O=m.suggest;if(O&&typeof O.filteredTypes=="object"&&O.filteredTypes){const X={};X.method="showMethods",X.function="showFunctions",X.constructor="showConstructors",X.deprecated="showDeprecated",X.field="showFields",X.variable="showVariables",X.class="showClasses",X.struct="showStructs",X.interface="showInterfaces",X.module="showModules",X.property="showProperties",X.event="showEvents",X.operator="showOperators",X.unit="showUnits",X.value="showValues",X.constant="showConstants",X.enum="showEnums",X.enumMember="showEnumMembers",X.keyword="showKeywords",X.text="showWords",X.color="showColors",X.file="showFiles",X.reference="showReferences",X.folder="showFolders",X.typeParameter="showTypeParameters",X.snippet="showSnippets",(0,s.forEach)(X,Z=>{const se=O.filteredTypes[Z.key];se===!1&&(O[Z.value]=se)})}const L=m.hover;L===!0?m.hover={enabled:!0}:L===!1&&(m.hover={enabled:!1});const B=m.parameterHints;B===!0?m.parameterHints={enabled:!0}:B===!1&&(m.parameterHints={enabled:!1});const W=m.autoIndent;W===!0?m.autoIndent="full":W===!1&&(m.autoIndent="advanced");const K=m.matchBrackets;K===!0?m.matchBrackets="always":K===!1&&(m.matchBrackets="never");const{renderIndentGuides:H,highlightActiveIndentGuide:Y}=m;m.guides||(m.guides={}),H!==void 0&&(m.guides.indentation=!!H),Y!==void 0&&(m.guides.highlightActiveIndentation=!!Y)}function o(m){const E=D.deepClone(m);return r(E),E}class i extends T.Disposable{constructor(E,I){super();this._onDidChange=this._register(new N.Emitter),this.onDidChange=this._onDidChange.event,this._onDidChangeFast=this._register(new N.Emitter),this.onDidChangeFast=this._onDidChangeFast.event,this.isSimpleWidget=E,this._isDominatedByLongLines=!1,this._computeOptionsMemory=new p.ComputeOptionsMemory,this._viewLineCount=1,this._lineNumbersDigitCount=1,this._rawOptions=o(I),this._readOptions=a.readOptions(this._rawOptions),this._validatedOptions=a.validateOptions(this._readOptions),this._register(C.EditorZoom.onDidChangeZoomLevel(k=>this._recomputeOptions())),this._register(e.TabFocus.onDidChangeTabFocus(k=>this._recomputeOptions()))}observeReferenceElement(E){}updatePixelRatio(){}_recomputeOptions(){const E=this.options,I=this._computeInternalOptions();if(!E)this.options=I;else{const k=a.checkEquals(E,I);if(k===null)return;this.options=I,this._onDidChangeFast.fire(k),this._onDidChange.fire(k)}}getRawOptions(){return this._rawOptions}_computeInternalOptions(){const E=this._getEnvConfiguration(),I=n.BareFontInfo.createFromValidatedSettings(this._validatedOptions,E.zoomLevel,E.pixelRatio,this.isSimpleWidget),k={memory:this._computeOptionsMemory,outerWidth:E.outerWidth,outerHeight:E.outerHeight,fontInfo:this.readConfiguration(I),extraEditorClassName:E.extraEditorClassName,isDominatedByLongLines:this._isDominatedByLongLines,viewLineCount:this._viewLineCount,lineNumbersDigitCount:this._lineNumbersDigitCount,emptySelectionClipboard:E.emptySelectionClipboard,pixelRatio:E.pixelRatio,tabFocusMode:e.TabFocus.getTabFocusMode(),accessibilitySupport:E.accessibilitySupport};return a.computeOptions(this._validatedOptions,k)}static _subsetEquals(E,I){for(const k in I)if(c.call(I,k)){const M=I[k],P=E[k];if(P===M)continue;if(Array.isArray(P)&&Array.isArray(M)){if(!S.equals(P,M))return!1;continue}if(P&&typeof P=="object"&&M&&typeof M=="object"){if(!this._subsetEquals(P,M))return!1;continue}return!1}return!0}updateOptions(E){if(typeof E=="undefined")return;const I=o(E);i._subsetEquals(this._rawOptions,I)||(this._rawOptions=D.mixin(this._rawOptions,I||{}),this._readOptions=a.readOptions(this._rawOptions),this._validatedOptions=a.validateOptions(this._readOptions),this._recomputeOptions())}setIsDominatedByLongLines(E){this._isDominatedByLongLines=E,this._recomputeOptions()}setMaxLineNumber(E){const I=i._digitCount(E);this._lineNumbersDigitCount!==I&&(this._lineNumbersDigitCount=I,this._recomputeOptions())}setViewLineCount(E){this._viewLineCount!==E&&(this._viewLineCount=E,this._recomputeOptions())}static _digitCount(E){let I=0;for(;E;)E=Math.floor(E/10),I++;return I||1}}e.CommonEditorConfiguration=i,e.editorConfigurationBaseNode=Object.freeze({id:"editor",order:5,type:"object",title:w.localize(0,null),scope:5});const l=t.Registry.as(g.Extensions.Configuration),h=Object.assign(Object.assign({},e.editorConfigurationBaseNode),{properties:{"editor.tabSize":{type:"number",default:p.EDITOR_MODEL_DEFAULTS.tabSize,minimum:1,markdownDescription:w.localize(1,null)},"editor.insertSpaces":{type:"boolean",default:p.EDITOR_MODEL_DEFAULTS.insertSpaces,markdownDescription:w.localize(2,null)},"editor.detectIndentation":{type:"boolean",default:p.EDITOR_MODEL_DEFAULTS.detectIndentation,markdownDescription:w.localize(3,null)},"editor.trimAutoWhitespace":{type:"boolean",default:p.EDITOR_MODEL_DEFAULTS.trimAutoWhitespace,description:w.localize(4,null)},"editor.largeFileOptimizations":{type:"boolean",default:p.EDITOR_MODEL_DEFAULTS.largeFileOptimizations,description:w.localize(5,null)},"editor.wordBasedSuggestions":{type:"boolean",default:!0,description:w.localize(6,null)},"editor.wordBasedSuggestionsMode":{enum:["currentDocument","matchingDocuments","allDocuments"],default:"matchingDocuments",enumDescriptions:[w.localize(7,null),w.localize(8,null),w.localize(9,null)],description:w.localize(10,null)},"editor.semanticHighlighting.enabled":{enum:[!0,!1,"configuredByTheme"],enumDescriptions:[w.localize(11,null),w.localize(12,null),w.localize(13,null)],default:"configuredByTheme",description:w.localize(14,null)},"editor.stablePeek":{type:"boolean",default:!1,markdownDescription:w.localize(15,null)},"editor.maxTokenizationLineLength":{type:"integer",default:2e4,description:w.localize(16,null)},"editor.language.brackets":{type:"array",default:!1,description:w.localize(17,null),items:{type:"array",items:[{type:"string",description:w.localize(18,null)},{type:"string",description:w.localize(19,null)}]}},"editor.language.colorizedBracketPairs":{type:"array",default:!1,description:w.localize(20,null),items:{type:"array",items:[{type:"string",description:w.localize(21,null)},{type:"string",description:w.localize(22,null)}]}},"diffEditor.maxComputationTime":{type:"number",default:5e3,description:w.localize(23,null)},"diffEditor.maxFileSize":{type:"number",default:50,description:w.localize(24,null)},"diffEditor.renderSideBySide":{type:"boolean",default:!0,description:w.localize(25,null)},"diffEditor.ignoreTrimWhitespace":{type:"boolean",default:!0,description:w.localize(26,null)},"diffEditor.renderIndicators":{type:"boolean",default:!0,description:w.localize(27,null)},"diffEditor.codeLens":{type:"boolean",default:!1,description:w.localize(28,null)},"diffEditor.wordWrap":{type:"string",enum:["off","on","inherit"],default:"inherit",markdownEnumDescriptions:[w.localize(29,null),w.localize(30,null),w.localize(31,null)]}}});function f(m){return typeof m.type!="undefined"||typeof m.anyOf!="undefined"}for(const m of p.editorOptionsRegistry){const E=m.schema;if(typeof E!="undefined")if(f(E))h.properties[`editor.${m.name}`]=E;else for(let I in E)c.call(E,I)&&(h.properties[I]=E[I])}let y=null;function _(){return y===null&&(y=Object.create(null),Object.keys(h.properties).forEach(m=>{y[m]=!0})),y}function b(m){return _()[`editor.${m}`]||!1}e.isEditorConfigurationKey=b;function v(m){return _()[`diffEditor.${m}`]||!1}e.isDiffEditorConfigurationKey=v,l.registerConfiguration(h)}),define(J[63],ee([0,1,34,4,2,17,475,223,193,31,173]),function(j,e,w,N,T,D,S,p,C,n,g){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Configuration=e.clearAllFontInfos=void 0;class t{constructor(){this._keys=Object.create(null),this._values=Object.create(null)}has(a){const r=a.getId();return!!this._values[r]}get(a){const r=a.getId();return this._values[r]}put(a,r){const o=a.getId();this._keys[o]=a,this._values[o]=r}remove(a){const r=a.getId();delete this._keys[r],delete this._values[r]}getValues(){return Object.keys(this._keys).map(a=>this._values[a])}}function s(){c.INSTANCE.clearCache()}e.clearAllFontInfos=s;class c extends T.Disposable{constructor(){super();this._onDidChange=this._register(new N.Emitter),this.onDidChange=this._onDidChange.event,this._cache=new t,this._evictUntrustedReadingsTimeout=-1}dispose(){this._evictUntrustedReadingsTimeout!==-1&&(clearTimeout(this._evictUntrustedReadingsTimeout),this._evictUntrustedReadingsTimeout=-1),super.dispose()}clearCache(){this._cache=new t,this._onDidChange.fire()}_writeToCache(a,r){this._cache.put(a,r),!r.isTrusted&&this._evictUntrustedReadingsTimeout===-1&&(this._evictUntrustedReadingsTimeout=setTimeout(()=>{this._evictUntrustedReadingsTimeout=-1,this._evictUntrustedReadings()},5e3))}_evictUntrustedReadings(){const a=this._cache.getValues();let r=!1;for(const o of a)o.isTrusted||(r=!0,this._cache.remove(o));r&&this._onDidChange.fire()}readConfiguration(a){if(!this._cache.has(a)){let r=c._actualReadConfiguration(a);(r.typicalHalfwidthCharacterWidth<=2||r.typicalFullwidthCharacterWidth<=2||r.spaceWidth<=2||r.maxDigitWidth<=2)&&(r=new g.FontInfo({zoomLevel:w.getZoomLevel(),pixelRatio:w.getPixelRatio(),fontFamily:r.fontFamily,fontWeight:r.fontWeight,fontSize:r.fontSize,fontFeatureSettings:r.fontFeatureSettings,lineHeight:r.lineHeight,letterSpacing:r.letterSpacing,isMonospace:r.isMonospace,typicalHalfwidthCharacterWidth:Math.max(r.typicalHalfwidthCharacterWidth,5),typicalFullwidthCharacterWidth:Math.max(r.typicalFullwidthCharacterWidth,5),canUseHalfwidthRightwardsArrow:r.canUseHalfwidthRightwardsArrow,spaceWidth:Math.max(r.spaceWidth,5),middotWidth:Math.max(r.middotWidth,5),wsmiddotWidth:Math.max(r.wsmiddotWidth,5),maxDigitWidth:Math.max(r.maxDigitWidth,5)},!1)),this._writeToCache(a,r)}return this._cache.get(a)}static createRequest(a,r,o,i){const l=new S.CharWidthRequest(a,r);return o.push(l),i&&i.push(l),l}static _actualReadConfiguration(a){const r=[],o=[],i=this.createRequest("n",0,r,o),l=this.createRequest("\uFF4D",0,r,null),h=this.createRequest(" ",0,r,o),f=this.createRequest("0",0,r,o),y=this.createRequest("1",0,r,o),_=this.createRequest("2",0,r,o),b=this.createRequest("3",0,r,o),v=this.createRequest("4",0,r,o),m=this.createRequest("5",0,r,o),E=this.createRequest("6",0,r,o),I=this.createRequest("7",0,r,o),k=this.createRequest("8",0,r,o),M=this.createRequest("9",0,r,o),P=this.createRequest("\u2192",0,r,o),F=this.createRequest("\uFFEB",0,r,null),R=this.createRequest("\xB7",0,r,o),A=this.createRequest(String.fromCharCode(11825),0,r,null),O="|/-_ilm%";for(let Y=0,X=O.length;Y<X;Y++)this.createRequest(O.charAt(Y),0,r,o),this.createRequest(O.charAt(Y),1,r,o),this.createRequest(O.charAt(Y),2,r,o);(0,S.readCharWidths)(a,r);const L=Math.max(f.width,y.width,_.width,b.width,v.width,m.width,E.width,I.width,k.width,M.width);let B=a.fontFeatureSettings===n.EditorFontLigatures.OFF;const W=o[0].width;for(let Y=1,X=o.length;B&&Y<X;Y++){const Z=W-o[Y].width;if(Z<-.001||Z>.001){B=!1;break}}let K=!0;B&&F.width!==W&&(K=!1),F.width>P.width&&(K=!1);const H=w.getTimeSinceLastZoomLevelChanged()>2e3;return new g.FontInfo({zoomLevel:w.getZoomLevel(),pixelRatio:w.getPixelRatio(),fontFamily:a.fontFamily,fontWeight:a.fontWeight,fontSize:a.fontSize,fontFeatureSettings:a.fontFeatureSettings,lineHeight:a.lineHeight,letterSpacing:a.letterSpacing,isMonospace:B,typicalHalfwidthCharacterWidth:i.width,typicalFullwidthCharacterWidth:l.width,canUseHalfwidthRightwardsArrow:K,spaceWidth:h.width,middotWidth:R.width,wsmiddotWidth:A.width,maxDigitWidth:L},H)}}c.INSTANCE=new c;class u extends C.CommonEditorConfiguration{constructor(a,r,o=null,i){super(a,r);this.accessibilityService=i,this._elementSizeObserver=this._register(new p.ElementSizeObserver(o,r.dimension,()=>this._recomputeOptions())),this._register(c.INSTANCE.onDidChange(()=>this._recomputeOptions())),this._validatedOptions.get(10)&&this._elementSizeObserver.startObserving(),this._register(w.onDidChangeZoomLevel(l=>this._recomputeOptions())),this._register(this.accessibilityService.onDidChangeScreenReaderOptimized(()=>this._recomputeOptions())),this._recomputeOptions()}static applyFontInfoSlow(a,r){a.style.fontFamily=r.getMassagedFontFamily(w.isSafari?n.EDITOR_FONT_DEFAULTS.fontFamily:null),a.style.fontWeight=r.fontWeight,a.style.fontSize=r.fontSize+"px",a.style.fontFeatureSettings=r.fontFeatureSettings,a.style.lineHeight=r.lineHeight+"px",a.style.letterSpacing=r.letterSpacing+"px"}static applyFontInfo(a,r){a.setFontFamily(r.getMassagedFontFamily(w.isSafari?n.EDITOR_FONT_DEFAULTS.fontFamily:null)),a.setFontWeight(r.fontWeight),a.setFontSize(r.fontSize),a.setFontFeatureSettings(r.fontFeatureSettings),a.setLineHeight(r.lineHeight),a.setLetterSpacing(r.letterSpacing)}observeReferenceElement(a){this._elementSizeObserver.observe(a)}updatePixelRatio(){this._recomputeOptions()}static _getExtraEditorClassName(){let a="";return!w.isSafari&&!w.isWebkitWebView&&(a+="no-user-select "),w.isSafari&&(a+="no-minimap-shadow "),D.isMacintosh&&(a+="mac "),a}_getEnvConfiguration(){return{extraEditorClassName:u._getExtraEditorClassName(),outerWidth:this._elementSizeObserver.getWidth(),outerHeight:this._elementSizeObserver.getHeight(),emptySelectionClipboard:w.isWebKit||w.isFirefox,pixelRatio:w.getPixelRatio(),zoomLevel:w.getZoomLevel(),accessibilitySupport:this.accessibilityService.isScreenReaderOptimized()?2:this.accessibilityService.getAccessibilitySupport()}}readConfiguration(a){return c.INSTANCE.readConfiguration(a)}}e.Configuration=u}),define(J[126],ee([0,1,310,57,39,11,254,4,2,18,63]),function(j,e,w,N,T,D,S,p,C,n,g){"use strict";var t;Object.defineProperty(e,"__esModule",{value:!0}),e.MarkdownRenderer=void 0;let s=class pi{constructor(u,d,a){this._options=u,this._modeService=d,this._openerService=a,this._onDidRenderAsync=new p.Emitter,this.onDidRenderAsync=this._onDidRenderAsync.event}dispose(){this._onDidRenderAsync.dispose()}render(u,d,a){if(!u)return{element:document.createElement("span"),dispose:()=>{}};const r=new C.DisposableStore;return{element:r.add((0,w.renderMarkdown)(u,Object.assign(Object.assign({},this._getRenderOptions(u,r)),d),a)).element,dispose:()=>r.dispose()}}_getRenderOptions(u,d){return{baseUrl:this._options.baseUrl,codeBlockRenderer:(a,r)=>Re(this,void 0,void 0,function*(){var o,i,l,h;let f;a?f=this._modeService.getModeIdForLanguageName(a):this._options.editor&&(f=(o=this._options.editor.getModel())===null||o===void 0?void 0:o.getLanguageId()),f||(f="plaintext"),this._modeService.triggerMode(f);const y=(i=yield n.TokenizationRegistry.getPromise(f))!==null&&i!==void 0?i:void 0,_=document.createElement("span");if(_.innerHTML=(h=(l=pi._ttpTokenizer)===null||l===void 0?void 0:l.createHTML(r,this._modeService.languageIdCodec,y))!==null&&h!==void 0?h:(0,S.tokenizeToString)(r,this._modeService.languageIdCodec,y),this._options.editor){const b=this._options.editor.getOption(43);g.Configuration.applyFontInfoSlow(_,b)}else this._options.codeBlockFontFamily&&(_.style.fontFamily=this._options.codeBlockFontFamily);return _}),asyncRenderCallback:()=>this._onDidRenderAsync.fire(),actionHandler:{callback:a=>this._openerService.open(a,{fromUserGesture:!0,allowContributedOpeners:!0,allowCommands:u.isTrusted}).catch(D.onUnexpectedError),disposables:d}}}};s._ttpTokenizer=(t=window.trustedTypes)===null||t===void 0?void 0:t.createPolicy("tokenizeToString",{createHTML(c,u,d){return(0,S.tokenizeToString)(c,u,d)}}),s=Fe([Ce(1,T.IModeService),Ce(2,N.IOpenerService)],s),e.MarkdownRenderer=s}),define(J[580],ee([0,1,84,8,63,60,99]),function(j,e,w,N,T,D,S){"use strict";var p;Object.defineProperty(e,"__esModule",{value:!0}),e.DOMLineBreaksComputerFactory=void 0;const C=(p=window.trustedTypes)===null||p===void 0?void 0:p.createPolicy("domLineBreaksComputer",{createHTML:d=>d});class n{static create(){return new n}constructor(){}createLineBreaksComputer(a,r,o,i){r=r|0,o=+o;let l=[],h=[];return{addRequest:(f,y,_)=>{l.push(f),h.push(y)},finalize:()=>g(l,a,r,o,i,h)}}}e.DOMLineBreaksComputerFactory=n;function g(d,a,r,o,i,l){var h;function f(W){const K=l[W];if(K){const H=S.LineInjectedText.applyInjectedText(d[W],K),Y=K.map(Z=>Z.options),X=K.map(Z=>Z.column-1);return new D.LineBreakData([H.length],[],0,X,Y)}else return null}if(o===-1){const W=[];for(let K=0,H=d.length;K<H;K++)W[K]=f(K);return W}const y=Math.round(o*a.typicalHalfwidthCharacterWidth),b=Math.round(r*(i===3?2:i===2?1:0)),v=Math.ceil(a.spaceWidth*b),m=document.createElement("div");T.Configuration.applyFontInfoSlow(m,a);const E=(0,w.createStringBuilder)(1e4),I=[],k=[],M=[],P=[],F=[];for(let W=0;W<d.length;W++){const K=S.LineInjectedText.applyInjectedText(d[W],l[W]);let H=0,Y=0,X=y;if(i!==0)if(H=N.firstNonWhitespaceIndex(K),H===-1)H=0;else{for(let G=0;G<H;G++)Y+=K.charCodeAt(G)===9?r-Y%r:1;const oe=Math.ceil(a.spaceWidth*Y);oe+a.typicalFullwidthCharacterWidth>y?(H=0,Y=0):X=y-oe}const Z=K.substr(H),se=t(Z,Y,r,X,E,v);I[W]=H,k[W]=Y,M[W]=Z,P[W]=se[0],F[W]=se[1]}const R=E.build(),A=(h=C==null?void 0:C.createHTML(R))!==null&&h!==void 0?h:R;m.innerHTML=A,m.style.position="absolute",m.style.top="10000",m.style.wordWrap="break-word",document.body.appendChild(m);let O=document.createRange();const L=Array.prototype.slice.call(m.children,0);let B=[];for(let W=0;W<d.length;W++){const K=L[W],H=s(O,K,M[W],P[W]);if(H===null){B[W]=f(W);continue}const Y=I[W],X=k[W]+b,Z=F[W],se=[];for(let U=0,$=H.length;U<$;U++)se[U]=Z[H[U]];if(Y!==0)for(let U=0,$=H.length;U<$;U++)H[U]+=Y;let oe,G;const x=l[W];x?(oe=x.map(U=>U.options),G=x.map(U=>U.column-1)):(oe=null,G=null),B[W]=new D.LineBreakData(H,se,X,G,oe)}return document.body.removeChild(m),B}function t(d,a,r,o,i,l){if(l!==0){let m=String(l);i.appendASCIIString('<div style="text-indent: -'),i.appendASCIIString(m),i.appendASCIIString("px; padding-left: "),i.appendASCIIString(m),i.appendASCIIString("px; box-sizing: border-box; width:")}else i.appendASCIIString('<div style="width:');i.appendASCIIString(String(o)),i.appendASCIIString('px;">');const h=d.length;let f=a,y=0,_=[],b=[],v=0<h?d.charCodeAt(0):0;i.appendASCIIString("<span>");for(let m=0;m<h;m++){m!==0&&m%16384==0&&i.appendASCIIString("</span><span>"),_[m]=y,b[m]=f;const E=v;v=m+1<h?d.charCodeAt(m+1):0;let I=1,k=1;switch(E){case 9:I=r-f%r,k=I;for(let M=1;M<=I;M++)M<I?i.write1(160):i.appendASCII(32);break;case 32:v===32?i.write1(160):i.appendASCII(32);break;case 60:i.appendASCIIString("&lt;");break;case 62:i.appendASCIIString("&gt;");break;case 38:i.appendASCIIString("&amp;");break;case 0:i.appendASCIIString("&#00;");break;case 65279:case 8232:case 8233:case 133:i.write1(65533);break;default:N.isFullWidthCharacter(E)&&k++,E<32?i.write1(9216+E):i.write1(E)}y+=I,f+=k}return i.appendASCIIString("</span>"),_[d.length]=y,b[d.length]=f,i.appendASCIIString("</div>"),[_,b]}function s(d,a,r,o){if(r.length<=1)return null;const i=Array.prototype.slice.call(a.children,0),l=[];try{c(d,i,o,0,null,r.length-1,null,l)}catch(h){return console.log(h),null}return l.length===0?null:(l.push(r.length),l)}function c(d,a,r,o,i,l,h,f){if(o===l||(i=i||u(d,a,r[o],r[o+1]),h=h||u(d,a,r[l],r[l+1]),Math.abs(i[0].top-h[0].top)<=.1))return;if(o+1===l){f.push(l);return}const y=o+(l-o)/2|0,_=u(d,a,r[y],r[y+1]);c(d,a,r,o,i,y,_,f),c(d,a,r,y,_,l,h,f)}function u(d,a,r,o){return d.setStart(a[r/16384|0].firstChild,r%16384),d.setEnd(a[o/16384|0].firstChild,o%16384),d.getClientRects()}}),define(J[581],ee([0,1,30,63,175,50]),function(j,e,w,N,T,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MarginViewOverlays=e.ContentViewOverlays=e.ViewOverlayLine=e.ViewOverlays=void 0;class S extends D.ViewPart{constructor(t){super(t);this._visibleLines=new T.VisibleLinesCollection(this),this.domNode=this._visibleLines.domNode,this._dynamicOverlays=[],this._isFocused=!1,this.domNode.setClassName("view-overlays")}shouldRender(){if(super.shouldRender())return!0;for(let t=0,s=this._dynamicOverlays.length;t<s;t++)if(this._dynamicOverlays[t].shouldRender())return!0;return!1}dispose(){super.dispose();for(let t=0,s=this._dynamicOverlays.length;t<s;t++)this._dynamicOverlays[t].dispose();this._dynamicOverlays=[]}getDomNode(){return this.domNode}createVisibleLine(){return new p(this._context.configuration,this._dynamicOverlays)}addDynamicOverlay(t){this._dynamicOverlays.push(t)}onConfigurationChanged(t){this._visibleLines.onConfigurationChanged(t);const s=this._visibleLines.getStartLineNumber(),c=this._visibleLines.getEndLineNumber();for(let u=s;u<=c;u++)this._visibleLines.getVisibleLine(u).onConfigurationChanged(t);return!0}onFlushed(t){return this._visibleLines.onFlushed(t)}onFocusChanged(t){return this._isFocused=t.isFocused,!0}onLinesChanged(t){return this._visibleLines.onLinesChanged(t)}onLinesDeleted(t){return this._visibleLines.onLinesDeleted(t)}onLinesInserted(t){return this._visibleLines.onLinesInserted(t)}onScrollChanged(t){return this._visibleLines.onScrollChanged(t)||!0}onTokensChanged(t){return this._visibleLines.onTokensChanged(t)}onZonesChanged(t){return this._visibleLines.onZonesChanged(t)}prepareRender(t){const s=this._dynamicOverlays.filter(c=>c.shouldRender());for(let c=0,u=s.length;c<u;c++){const d=s[c];d.prepareRender(t),d.onDidRender()}}render(t){this._viewOverlaysRender(t),this.domNode.toggleClassName("focused",this._isFocused)}_viewOverlaysRender(t){this._visibleLines.renderLines(t.viewportData)}}e.ViewOverlays=S;class p{constructor(t,s){this._configuration=t,this._lineHeight=this._configuration.options.get(58),this._dynamicOverlays=s,this._domNode=null,this._renderedContent=null}getDomNode(){return this._domNode?this._domNode.domNode:null}setDomNode(t){this._domNode=(0,w.createFastDomNode)(t)}onContentChanged(){}onTokensChanged(){}onConfigurationChanged(t){this._lineHeight=this._configuration.options.get(58)}renderLine(t,s,c,u){let d="";for(let a=0,r=this._dynamicOverlays.length;a<r;a++)d+=this._dynamicOverlays[a].render(c.startLineNumber,t);return this._renderedContent===d?!1:(this._renderedContent=d,u.appendASCIIString('<div style="position:absolute;top:'),u.appendASCIIString(String(s)),u.appendASCIIString("px;width:100%;height:"),u.appendASCIIString(String(this._lineHeight)),u.appendASCIIString('px;">'),u.appendASCIIString(d),u.appendASCIIString("</div>"),!0)}layoutLine(t,s){this._domNode&&(this._domNode.setTop(s),this._domNode.setHeight(this._lineHeight))}}e.ViewOverlayLine=p;class C extends S{constructor(t){super(t);const c=this._context.configuration.options.get(129);this._contentWidth=c.contentWidth,this.domNode.setHeight(0)}onConfigurationChanged(t){const c=this._context.configuration.options.get(129);return this._contentWidth=c.contentWidth,super.onConfigurationChanged(t)||!0}onScrollChanged(t){return super.onScrollChanged(t)||t.scrollWidthChanged}_viewOverlaysRender(t){super._viewOverlaysRender(t),this.domNode.setWidth(Math.max(t.scrollWidth,this._contentWidth))}}e.ContentViewOverlays=C;class n extends S{constructor(t){super(t);const s=this._context.configuration.options,c=s.get(129);this._contentLeft=c.contentLeft,this.domNode.setClassName("margin-view-overlays"),this.domNode.setWidth(1),N.Configuration.applyFontInfo(this.domNode,s.get(43))}onConfigurationChanged(t){const s=this._context.configuration.options;N.Configuration.applyFontInfo(this.domNode,s.get(43));const c=s.get(129);return this._contentLeft=c.contentLeft,super.onConfigurationChanged(t)||!0}onScrollChanged(t){return super.onScrollChanged(t)||t.scrollHeightChanged}_viewOverlaysRender(t){super._viewOverlaysRender(t);const s=Math.min(t.scrollHeight,1e6);this.domNode.setHeight(s),this.domNode.setWidth(this._contentLeft)}}e.MarginViewOverlays=n}),define(J[582],ee([0,1,7,30,8,63,31,13,3,137]),function(j,e,w,N,T,D,S,p,C,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ViewCursor=void 0;class g{constructor(c,u,d,a,r,o){this.top=c,this.left=u,this.width=d,this.height=a,this.textContent=r,this.textContentClassName=o}}class t{constructor(c){this._context=c;const u=this._context.configuration.options,d=u.get(43);this._cursorStyle=u.get(24),this._lineHeight=u.get(58),this._typicalHalfwidthCharacterWidth=d.typicalHalfwidthCharacterWidth,this._lineCursorWidth=Math.min(u.get(27),this._typicalHalfwidthCharacterWidth),this._isVisible=!0,this._domNode=(0,N.createFastDomNode)(document.createElement("div")),this._domNode.setClassName(`cursor ${n.MOUSE_CURSOR_TEXT_CSS_CLASS_NAME}`),this._domNode.setHeight(this._lineHeight),this._domNode.setTop(0),this._domNode.setLeft(0),D.Configuration.applyFontInfo(this._domNode,d),this._domNode.setDisplay("none"),this._position=new p.Position(1,1),this._lastRenderedContent="",this._renderData=null}getDomNode(){return this._domNode}getPosition(){return this._position}show(){this._isVisible||(this._domNode.setVisibility("inherit"),this._isVisible=!0)}hide(){this._isVisible&&(this._domNode.setVisibility("hidden"),this._isVisible=!1)}onConfigurationChanged(c){const u=this._context.configuration.options,d=u.get(43);return this._cursorStyle=u.get(24),this._lineHeight=u.get(58),this._typicalHalfwidthCharacterWidth=d.typicalHalfwidthCharacterWidth,this._lineCursorWidth=Math.min(u.get(27),this._typicalHalfwidthCharacterWidth),D.Configuration.applyFontInfo(this._domNode,d),!0}onCursorPositionChanged(c){return this._position=c,!0}_prepareRender(c){let u="";if(this._cursorStyle===S.TextEditorCursorStyle.Line||this._cursorStyle===S.TextEditorCursorStyle.LineThin){const _=c.visibleRangeForPosition(this._position);if(!_||_.outsideRenderedLine)return null;let b;if(this._cursorStyle===S.TextEditorCursorStyle.Line){if(b=w.computeScreenAwareSize(this._lineCursorWidth>0?this._lineCursorWidth:2),b>2){const E=this._context.model.getLineContent(this._position.lineNumber),I=T.nextCharLength(E,this._position.column-1);u=E.substr(this._position.column-1,I)}}else b=w.computeScreenAwareSize(1);let v=_.left;b>=2&&v>=1&&(v-=1);const m=c.getVerticalOffsetForLineNumber(this._position.lineNumber)-c.bigNumbersDelta;return new g(m,v,b,this._lineHeight,u,"")}const d=this._context.model.getLineContent(this._position.lineNumber),a=T.nextCharLength(d,this._position.column-1),r=c.linesVisibleRangesForRange(new C.Range(this._position.lineNumber,this._position.column,this._position.lineNumber,this._position.column+a),!1);if(!r||r.length===0)return null;const o=r[0];if(o.outsideRenderedLine||o.ranges.length===0)return null;const i=o.ranges[0],l=i.width<1?this._typicalHalfwidthCharacterWidth:i.width;let h="";if(this._cursorStyle===S.TextEditorCursorStyle.Block){const _=this._context.model.getViewLineData(this._position.lineNumber);u=d.substr(this._position.column-1,a);const b=_.tokens.findTokenIndexAtOffset(this._position.column-1);h=_.tokens.getClassName(b)}let f=c.getVerticalOffsetForLineNumber(this._position.lineNumber)-c.bigNumbersDelta,y=this._lineHeight;return(this._cursorStyle===S.TextEditorCursorStyle.Underline||this._cursorStyle===S.TextEditorCursorStyle.UnderlineThin)&&(f+=this._lineHeight-2,y=2),new g(f,i.left,l,y,u,h)}prepareRender(c){this._renderData=this._prepareRender(c)}render(c){return this._renderData?(this._lastRenderedContent!==this._renderData.textContent&&(this._lastRenderedContent=this._renderData.textContent,this._domNode.domNode.textContent=this._lastRenderedContent),this._domNode.setClassName(`cursor ${n.MOUSE_CURSOR_TEXT_CSS_CLASS_NAME} ${this._renderData.textContentClassName}`),this._domNode.setDisplay("block"),this._domNode.setTop(this._renderData.top),this._domNode.setLeft(this._renderData.left),this._domNode.setWidth(this._renderData.width),this._domNode.setLineHeight(this._renderData.height),this._domNode.setHeight(this._renderData.height),{domNode:this._domNode.domNode,position:this._position,contentLeft:this._renderData.left,height:this._renderData.height,width:2}):(this._domNode.setDisplay("none"),null)}}e.ViewCursor=t}),define(J[583],ee([0,1,7,19,69,2,126,239,53,57,220]),function(j,e,w,N,T,D,S,p,C,n,g){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ModesGlyphHoverWidget=void 0;const t=w.$;class s{constructor(d){this._editor=d,this._lineNumber=-1,this._result=[]}setLineNumber(d){this._lineNumber=d,this._result=[]}clearResult(){this._result=[]}computeSync(){const d=o=>({value:o}),a=this._editor.getLineDecorations(this._lineNumber),r=[];if(!a)return r;for(const o of a){if(!o.options.glyphMarginClassName)continue;const i=o.options.glyphMarginHoverMessage;!i||(0,T.isEmptyMarkdownString)(i)||r.push(...(0,N.asArray)(i).map(d))}return r}onResult(d,a){this._result=this._result.concat(d)}getResult(){return this._result}getResultWithLoadingMessage(){return this.getResult()}}class c extends C.Widget{constructor(d,a,r=n.NullOpenerService){super();this._renderDisposeables=this._register(new D.DisposableStore),this._editor=d,this._isVisible=!1,this._messages=[],this._lastLineNumber=-1,this._hover=this._register(new g.HoverWidget),this._hover.containerDomNode.classList.toggle("hidden",!this._isVisible),this._markdownRenderer=this._register(new S.MarkdownRenderer({editor:this._editor},a,r)),this._computer=new s(this._editor),this._hoverOperation=new p.HoverOperation(this._computer,o=>this._withResult(o),void 0,o=>this._withResult(o),300),this._register(this._editor.onDidChangeConfiguration(o=>{o.hasChanged(43)&&this._updateFont()})),this._editor.addOverlayWidget(this)}dispose(){this._hoverOperation.cancel(),this._editor.removeOverlayWidget(this),super.dispose()}getId(){return c.ID}getDomNode(){return this._hover.containerDomNode}getPosition(){return null}_showAt(d){this._isVisible||(this._isVisible=!0,this._hover.containerDomNode.classList.toggle("hidden",!this._isVisible));const a=this._editor.getLayoutInfo(),r=this._editor.getTopForLineNumber(d),o=this._editor.getScrollTop(),i=this._editor.getOption(58),l=this._hover.containerDomNode.clientHeight,h=r-o-(l-i)/2;this._hover.containerDomNode.style.left=`${a.glyphMarginLeft+a.glyphMarginWidth}px`,this._hover.containerDomNode.style.top=`${Math.max(Math.round(h),0)}px`}_updateFont(){Array.prototype.slice.call(this._hover.contentsDomNode.getElementsByClassName("code")).forEach(a=>this._editor.applyFontInfo(a))}_updateContents(d){this._hover.contentsDomNode.textContent="",this._hover.contentsDomNode.appendChild(d),this._updateFont()}onModelDecorationsChanged(){this._isVisible&&(this._hoverOperation.cancel(),this._computer.clearResult(),this._hoverOperation.start(0))}startShowingAt(d){this._lastLineNumber!==d&&(this._hoverOperation.cancel(),this.hide(),this._lastLineNumber=d,this._computer.setLineNumber(d),this._hoverOperation.start(0))}hide(){this._lastLineNumber=-1,this._hoverOperation.cancel(),!!this._isVisible&&(this._isVisible=!1,this._hover.containerDomNode.classList.toggle("hidden",!this._isVisible))}_withResult(d){this._messages=d,this._messages.length>0?this._renderMessages(this._lastLineNumber,this._messages):this.hide()}_renderMessages(d,a){this._renderDisposeables.clear();const r=document.createDocumentFragment();for(const o of a){const i=t("div.hover-row.markdown-hover"),l=w.append(i,t("div.hover-contents")),h=this._renderDisposeables.add(this._markdownRenderer.render(o.value));l.appendChild(h.element),r.appendChild(i)}this._updateContents(r),this._showAt(d)}}e.ModesGlyphHoverWidget=c,c.ID="editor.contrib.modesGlyphHoverWidget"}),define(J[264],ee([0,1,34,7,64,27,4,69,2,126,31,245,535,9]),function(j,e,w,N,T,D,S,p,C,n,g,t,s,c){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SuggestDetailsOverlay=e.SuggestDetailsWidget=e.canExpandCompletionItem=void 0;function u(r){return!!r&&Boolean(r.completion.documentation||r.completion.detail&&r.completion.detail!==r.completion.label)}e.canExpandCompletionItem=u;let d=class{constructor(o,i){this._editor=o,this._onDidClose=new S.Emitter,this.onDidClose=this._onDidClose.event,this._onDidChangeContents=new S.Emitter,this.onDidChangeContents=this._onDidChangeContents.event,this._disposables=new C.DisposableStore,this._renderDisposeable=new C.DisposableStore,this._borderWidth=1,this._size=new N.Dimension(330,0),this.domNode=N.$(".suggest-details"),this.domNode.classList.add("no-docs"),this._markdownRenderer=i.createInstance(n.MarkdownRenderer,{editor:o}),this._body=N.$(".body"),this._scrollbar=new T.DomScrollableElement(this._body,{}),N.append(this.domNode,this._scrollbar.getDomNode()),this._disposables.add(this._scrollbar),this._header=N.append(this._body,N.$(".header")),this._close=N.append(this._header,N.$("span"+D.Codicon.close.cssSelector)),this._close.title=s.localize(0,null),this._type=N.append(this._header,N.$("p.type")),this._docs=N.append(this._body,N.$("p.docs")),this._configureFont(),this._disposables.add(this._editor.onDidChangeConfiguration(l=>{l.hasChanged(43)&&this._configureFont()}))}dispose(){this._disposables.dispose(),this._renderDisposeable.dispose()}_configureFont(){const o=this._editor.getOptions(),i=o.get(43),l=i.getMassagedFontFamily(w.isSafari?g.EDITOR_FONT_DEFAULTS.fontFamily:null),h=o.get(106)||i.fontSize,f=o.get(107)||i.lineHeight,y=i.fontWeight,_=`${h}px`,b=`${f}px`;this.domNode.style.fontSize=_,this.domNode.style.lineHeight=`${f/h}`,this.domNode.style.fontWeight=y,this.domNode.style.fontFeatureSettings=i.fontFeatureSettings,this._type.style.fontFamily=l,this._close.style.height=b,this._close.style.width=b}getLayoutInfo(){const o=this._editor.getOption(107)||this._editor.getOption(43).lineHeight,i=this._borderWidth,l=i*2;return{lineHeight:o,borderWidth:i,borderHeight:l,verticalPadding:22,horizontalPadding:14}}renderLoading(){this._type.textContent=s.localize(1,null),this._docs.textContent="",this.domNode.classList.remove("no-docs","no-type"),this.layout(this.size.width,this.getLayoutInfo().lineHeight*2),this._onDidChangeContents.fire(this)}renderItem(o,i){var l,h;this._renderDisposeable.clear();let{detail:f,documentation:y}=o.completion;if(i){let _="";_+=`score: ${o.score[0]}
`,_+=`prefix: ${(l=o.word)!==null&&l!==void 0?l:"(no prefix)"}
`,_+=`word: ${o.completion.filterText?o.completion.filterText+" (filterText)":o.textLabel}
`,_+=`distance: ${o.distance} (localityBonus-setting)
`,_+=`index: ${o.idx}, based on ${o.completion.sortText&&`sortText: "${o.completion.sortText}"`||"label"}
`,_+=`commit_chars: ${(h=o.completion.commitCharacters)===null||h===void 0?void 0:h.join("")}
`,y=new p.MarkdownString().appendCodeblock("empty",_),f=`Provider: ${o.provider._debugDisplayName}`}if(!i&&!u(o)){this.clearContents();return}if(this.domNode.classList.remove("no-docs","no-type"),f){const _=f.length>1e5?`${f.substr(0,1e5)}\u2026`:f;this._type.textContent=_,this._type.title=_,N.show(this._type),this._type.classList.toggle("auto-wrap",!/\r?\n^\s+/gmi.test(_))}else N.clearNode(this._type),this._type.title="",N.hide(this._type),this.domNode.classList.add("no-type");if(N.clearNode(this._docs),typeof y=="string")this._docs.classList.remove("markdown-docs"),this._docs.textContent=y;else if(y){this._docs.classList.add("markdown-docs"),N.clearNode(this._docs);const _=this._markdownRenderer.render(y);this._docs.appendChild(_.element),this._renderDisposeable.add(_),this._renderDisposeable.add(this._markdownRenderer.onDidRenderAsync(()=>{this.layout(this._size.width,this._type.clientHeight+this._docs.clientHeight),this._onDidChangeContents.fire(this)}))}this.domNode.style.userSelect="text",this.domNode.tabIndex=-1,this._close.onmousedown=_=>{_.preventDefault(),_.stopPropagation()},this._close.onclick=_=>{_.preventDefault(),_.stopPropagation(),this._onDidClose.fire()},this._body.scrollTop=0,this.layout(this._size.width,this._type.clientHeight+this._docs.clientHeight),this._onDidChangeContents.fire(this)}clearContents(){this.domNode.classList.add("no-docs"),this._type.textContent="",this._docs.textContent=""}get size(){return this._size}layout(o,i){const l=new N.Dimension(o,i);N.Dimension.equals(l,this._size)||(this._size=l,N.size(this.domNode,o,i)),this._scrollbar.scanDomNode()}scrollDown(o=8){this._body.scrollTop+=o}scrollUp(o=8){this._body.scrollTop-=o}scrollTop(){this._body.scrollTop=0}scrollBottom(){this._body.scrollTop=this._body.scrollHeight}pageDown(){this.scrollDown(80)}pageUp(){this.scrollUp(80)}set borderWidth(o){this._borderWidth=o}get borderWidth(){return this._borderWidth}};d=Fe([Ce(1,c.IInstantiationService)],d),e.SuggestDetailsWidget=d;class a{constructor(o,i){this.widget=o,this._editor=i,this._disposables=new C.DisposableStore,this._added=!1,this._resizable=new t.ResizableHTMLElement,this._resizable.domNode.classList.add("suggest-details-container"),this._resizable.domNode.appendChild(o.domNode),this._resizable.enableSashes(!1,!0,!0,!1);let l,h,f=0,y=0;this._disposables.add(this._resizable.onDidWillResize(()=>{l=this._topLeft,h=this._resizable.size})),this._disposables.add(this._resizable.onDidResize(_=>{if(l&&h){this.widget.layout(_.dimension.width,_.dimension.height);let b=!1;_.west&&(y=h.width-_.dimension.width,b=!0),_.north&&(f=h.height-_.dimension.height,b=!0),b&&this._applyTopLeft({top:l.top+f,left:l.left+y})}_.done&&(l=void 0,h=void 0,f=0,y=0,this._userSize=_.dimension)})),this._disposables.add(this.widget.onDidChangeContents(()=>{var _;this._anchorBox&&this._placeAtAnchor(this._anchorBox,(_=this._userSize)!==null&&_!==void 0?_:this.widget.size)}))}dispose(){this._resizable.dispose(),this._disposables.dispose(),this.hide()}getId(){return"suggest.details"}getDomNode(){return this._resizable.domNode}getPosition(){return null}show(){this._added||(this._editor.addOverlayWidget(this),this.getDomNode().style.position="fixed",this._added=!0)}hide(o=!1){this._resizable.clearSashHoverState(),this._added&&(this._editor.removeOverlayWidget(this),this._added=!1,this._anchorBox=void 0,this._topLeft=void 0),o&&(this._userSize=void 0,this.widget.clearContents())}placeAtAnchor(o){var i;const l=N.getDomNodePagePosition(o);this._anchorBox=l,this._placeAtAnchor(this._anchorBox,(i=this._userSize)!==null&&i!==void 0?i:this.widget.size)}_placeAtAnchor(o,i){var l;const h=N.getClientArea(document.body),f=this.widget.getLayoutInfo(),y=new N.Dimension(220,2*f.lineHeight),_=o.top,b=function(){const A=h.width-(o.left+o.width+f.borderWidth+f.horizontalPadding),O=-f.borderWidth+o.left+o.width,L=new N.Dimension(A,h.height-o.top-f.borderHeight-f.verticalPadding),B=L.with(void 0,o.top+o.height-f.borderHeight-f.verticalPadding);return{top:_,left:O,fit:A-i.width,maxSizeTop:L,maxSizeBottom:B,minSize:y.with(Math.min(A,y.width))}}(),v=function(){const A=o.left-f.borderWidth-f.horizontalPadding,O=Math.max(f.horizontalPadding,o.left-i.width-f.borderWidth),L=new N.Dimension(A,h.height-o.top-f.borderHeight-f.verticalPadding),B=L.with(void 0,o.top+o.height-f.borderHeight-f.verticalPadding);return{top:_,left:O,fit:A-i.width,maxSizeTop:L,maxSizeBottom:B,minSize:y.with(Math.min(A,y.width))}}(),m=function(){const A=o.left,O=-f.borderWidth+o.top+o.height,L=new N.Dimension(o.width-f.borderHeight,h.height-o.top-o.height-f.verticalPadding);return{top:O,left:A,fit:L.height-i.height,maxSizeBottom:L,maxSizeTop:L,minSize:y.with(L.width)}}(),E=[b,v,m],I=(l=E.find(A=>A.fit>=0))!==null&&l!==void 0?l:E.sort((A,O)=>O.fit-A.fit)[0],k=o.top+o.height-f.borderHeight;let M,P=i.height;const F=Math.max(I.maxSizeTop.height,I.maxSizeBottom.height);P>F&&(P=F);let R;P<=I.maxSizeTop.height?(M=!0,R=I.maxSizeTop):(M=!1,R=I.maxSizeBottom),this._applyTopLeft({left:I.left,top:M?I.top:k-P}),this.getDomNode().style.position="fixed",this._resizable.enableSashes(!M,I===b,M,I!==b),this._resizable.minSize=I.minSize,this._resizable.maxSize=R,this._resizable.layout(P,Math.min(R.width,i.width)),this.widget.layout(this._resizable.size.width,this._resizable.size.height)}_applyTopLeft(o){this._topLeft=o,this.getDomNode().style.left=`${this._topLeft.left}px`,this.getDomNode().style.top=`${this._topLeft.top}px`}}e.SuggestDetailsOverlay=a}),define(J[41],ee([0,1,101,9,33]),function(j,e,w,N,T){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getDefaultValues=e.getConfigurationKeys=e.getConfigurationValue=e.removeFromValueTree=e.addToValueTree=e.toValuesTree=e.IConfigurationService=void 0,e.IConfigurationService=(0,N.createDecorator)("configurationService");function D(s,c){const u=Object.create(null);for(let d in s)S(u,d,s[d],c);return u}e.toValuesTree=D;function S(s,c,u,d){const a=c.split("."),r=a.pop();let o=s;for(let i=0;i<a.length;i++){let l=a[i],h=o[l];switch(typeof h){case"undefined":h=o[l]=Object.create(null);break;case"object":break;default:d(`Ignoring ${c} as ${a.slice(0,i+1).join(".")} is ${JSON.stringify(h)}`);return}o=h}if(typeof o=="object"&&o!==null)try{o[r]=u}catch(i){d(`Ignoring ${c} as ${a.join(".")} is ${JSON.stringify(o)}`)}else d(`Ignoring ${c} as ${a.join(".")} is ${JSON.stringify(o)}`)}e.addToValueTree=S;function p(s,c){const u=c.split(".");C(s,u)}e.removeFromValueTree=p;function C(s,c){const u=c.shift();if(c.length===0){delete s[u];return}if(Object.keys(s).indexOf(u)!==-1){const d=s[u];typeof d=="object"&&!Array.isArray(d)&&(C(d,c),Object.keys(d).length===0&&delete s[u])}}function n(s,c,u){function d(o,i){let l=o;for(const h of i){if(typeof l!="object"||l===null)return;l=l[h]}return l}const a=c.split("."),r=d(s,a);return typeof r=="undefined"?u:r}e.getConfigurationValue=n;function g(){const s=T.Registry.as(w.Extensions.Configuration).getConfigurationProperties();return Object.keys(s)}e.getConfigurationKeys=g;function t(){const s=Object.create(null),c=T.Registry.as(w.Extensions.Configuration).getConfigurationProperties();for(let u in c){let d=c[u].default;S(s,u,d,a=>console.error(`Conflict in default settings: ${a}`))}return s}e.getDefaultValues=t}),define(J[37],ee([0,1,4,2,8,143,116,177,397,401,398,400,178,9,41,39,70]),function(j,e,w,N,T,D,S,p,C,n,g,t,s,c,u,d,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ResolvedLanguageConfiguration=e.LanguageConfigurationRegistry=e.LanguageConfigurationRegistryImpl=e.LanguageConfigurationChangeEvent=e.LanguageConfigurationService=e.ILanguageConfigurationService=e.LanguageConfigurationServiceChangeEvent=void 0;class r{constructor(k){this.languageId=k}affects(k){return this.languageId?this.languageId===k:!0}}e.LanguageConfigurationServiceChangeEvent=r,e.ILanguageConfigurationService=(0,c.createDecorator)("languageConfigurationService");let o=class extends N.Disposable{constructor(k,M){super();this.configurationService=k,this.modeService=M,this.onDidChangeEmitter=this._register(new w.Emitter),this.onDidChange=this.onDidChangeEmitter.event,this.configurations=new Map;const P=new Set(Object.values(l));this._register(this.configurationService.onDidChangeConfiguration(F=>{const R=F.change.keys.some(O=>P.has(O)),A=F.change.overrides.filter(([O,L])=>L.some(B=>P.has(B))).map(([O])=>this.modeService.validateLanguageId(O));if(R)this.configurations.clear(),this.onDidChangeEmitter.fire(new r(void 0));else for(const O of A)O&&(this.configurations.delete(O),this.onDidChangeEmitter.fire(new r(O)))})),this._register(e.LanguageConfigurationRegistry.onDidChange(F=>{this.configurations.delete(F.languageId),this.onDidChangeEmitter.fire(new r(F.languageId))}))}getLanguageConfiguration(k){let M=this.configurations.get(k);return M||(M=i(k,this.configurationService,this.modeService),this.configurations.set(k,M)),M}};o=Fe([Ce(0,u.IConfigurationService),Ce(1,d.IModeService)],o),e.LanguageConfigurationService=o;function i(I,k,M){let P=e.LanguageConfigurationRegistry.getLanguageConfiguration(I);if(!P){const O=M.validateLanguageId(I);if(!O)throw new Error("Unexpected languageId");P=new E(O,{})}const F=h(P.languageId,k),R=v([P.underlyingConfig,F]);return new E(P.languageId,R)}const l={brackets:"editor.language.brackets",colorizedBracketPairs:"editor.language.colorizedBracketPairs"};function h(I,k){const M=k.getValue(l.brackets,{overrideIdentifier:I}),P=k.getValue(l.colorizedBracketPairs,{overrideIdentifier:I});return{brackets:f(M),colorizedBracketPairs:f(P)}}function f(I){if(!!Array.isArray(I))return I.map(k=>{if(!(!Array.isArray(k)||k.length!==2))return[k[0],k[1]]}).filter(k=>!!k)}class y{constructor(k){this.languageId=k}}e.LanguageConfigurationChangeEvent=y;class _{constructor(){this._entries=new Map,this._onDidChange=new w.Emitter,this.onDidChange=this._onDidChange.event}register(k,M,P=0){let F=this._entries.get(k);F||(F=new b(k),this._entries.set(k,F));const R=F.register(M,P);return this._onDidChange.fire(new y(k)),(0,N.toDisposable)(()=>{R.dispose(),this._onDidChange.fire(new y(k))})}getLanguageConfiguration(k){let M=this._entries.get(k);return(M==null?void 0:M.getResolvedConfiguration())||null}getIndentationRules(k){const M=this.getLanguageConfiguration(k);return M&&M.indentationRules||null}_getElectricCharacterSupport(k){let M=this.getLanguageConfiguration(k);return M&&M.electricCharacter||null}getElectricCharacters(k){let M=this._getElectricCharacterSupport(k);return M?M.getElectricCharacters():[]}onElectricCharacter(k,M,P){let F=(0,p.createScopedLineTokens)(M,P-1),R=this._getElectricCharacterSupport(F.languageId);return R?R.onElectricCharacter(k,F,P-F.firstCharOffset):null}getComments(k){let M=this.getLanguageConfiguration(k);return M&&M.comments||null}_getCharacterPairSupport(k){let M=this.getLanguageConfiguration(k);return M&&M.characterPair||null}getAutoClosingPairs(k){const M=this._getCharacterPairSupport(k);return new S.AutoClosingPairs(M?M.getAutoClosingPairs():[])}getAutoCloseBeforeSet(k){let M=this._getCharacterPairSupport(k);return M?M.getAutoCloseBeforeSet():C.CharacterPairSupport.DEFAULT_AUTOCLOSE_BEFORE_LANGUAGE_DEFINED}getSurroundingPairs(k){let M=this._getCharacterPairSupport(k);return M?M.getSurroundingPairs():[]}shouldAutoClosePair(k,M,P){const F=(0,p.createScopedLineTokens)(M,P-1);return C.CharacterPairSupport.shouldAutoClosePair(k,F,P-F.firstCharOffset)}getWordDefinition(k){let M=this.getLanguageConfiguration(k);return M?(0,D.ensureValidWordDefinition)(M.wordDefinition||null):(0,D.ensureValidWordDefinition)(null)}getFoldingRules(k){let M=this.getLanguageConfiguration(k);return M?M.foldingRules:{}}getIndentRulesSupport(k){let M=this.getLanguageConfiguration(k);return M&&M.indentRulesSupport||null}getPrecedingValidLine(k,M,P){let F=k.getLanguageIdAtPosition(M,0);if(M>1){let R,A=-1;for(R=M-1;R>=1;R--){if(k.getLanguageIdAtPosition(R,0)!==F)return A;let O=k.getLineContent(R);if(P.shouldIgnore(O)||/^\s+$/.test(O)||O===""){A=R;continue}return R}}return-1}getInheritIndentForLine(k,M,P,F=!0){if(k<4)return null;const R=this.getIndentRulesSupport(M.getLanguageId());if(!R)return null;if(P<=1)return{indentation:"",action:null};const A=this.getPrecedingValidLine(M,P,R);if(A<0)return null;if(A<1)return{indentation:"",action:null};const O=M.getLineContent(A);if(R.shouldIncrease(O)||R.shouldIndentNextLine(O))return{indentation:T.getLeadingWhitespace(O),action:S.IndentAction.Indent,line:A};if(R.shouldDecrease(O))return{indentation:T.getLeadingWhitespace(O),action:null,line:A};{if(A===1)return{indentation:T.getLeadingWhitespace(M.getLineContent(A)),action:null,line:A};const L=A-1,B=R.getIndentMetadata(M.getLineContent(L));if(!(B&(1|2))&&B&4){let W=0;for(let K=L-1;K>0;K--)if(!R.shouldIndentNextLine(M.getLineContent(K))){W=K;break}return{indentation:T.getLeadingWhitespace(M.getLineContent(W+1)),action:null,line:W+1}}if(F)return{indentation:T.getLeadingWhitespace(M.getLineContent(A)),action:null,line:A};for(let W=A;W>0;W--){const K=M.getLineContent(W);if(R.shouldIncrease(K))return{indentation:T.getLeadingWhitespace(K),action:S.IndentAction.Indent,line:W};if(R.shouldIndentNextLine(K)){let H=0;for(let Y=W-1;Y>0;Y--)if(!R.shouldIndentNextLine(M.getLineContent(W))){H=Y;break}return{indentation:T.getLeadingWhitespace(M.getLineContent(H+1)),action:null,line:H+1}}else if(R.shouldDecrease(K))return{indentation:T.getLeadingWhitespace(K),action:null,line:W}}return{indentation:T.getLeadingWhitespace(M.getLineContent(1)),action:null,line:1}}}getGoodIndentForLine(k,M,P,F,R){if(k<4)return null;const A=this.getLanguageConfiguration(P);if(!A)return null;const O=this.getIndentRulesSupport(P);if(!O)return null;const L=this.getInheritIndentForLine(k,M,F),B=M.getLineContent(F);if(L){const W=L.line;if(W!==void 0){const K=A.onEnter(k,"",M.getLineContent(W),"");if(K){let H=T.getLeadingWhitespace(M.getLineContent(W));return K.removeText&&(H=H.substring(0,H.length-K.removeText)),K.indentAction===S.IndentAction.Indent||K.indentAction===S.IndentAction.IndentOutdent?H=R.shiftIndent(H):K.indentAction===S.IndentAction.Outdent&&(H=R.unshiftIndent(H)),O.shouldDecrease(B)&&(H=R.unshiftIndent(H)),K.appendText&&(H+=K.appendText),T.getLeadingWhitespace(H)}}return O.shouldDecrease(B)?L.action===S.IndentAction.Indent?L.indentation:R.unshiftIndent(L.indentation):L.action===S.IndentAction.Indent?R.shiftIndent(L.indentation):L.indentation}return null}getIndentForEnter(k,M,P,F){if(k<4)return null;M.forceTokenization(P.startLineNumber);const R=M.getLineTokens(P.startLineNumber),A=(0,p.createScopedLineTokens)(R,P.startColumn-1),O=A.getLineContent();let L=!1,B;A.firstCharOffset>0&&R.getLanguageId(0)!==A.languageId?(L=!0,B=O.substr(0,P.startColumn-1-A.firstCharOffset)):B=R.getLineContent().substring(0,P.startColumn-1);let W;P.isEmpty()?W=O.substr(P.startColumn-1-A.firstCharOffset):W=this.getScopedLineTokens(M,P.endLineNumber,P.endColumn).getLineContent().substr(P.endColumn-1-A.firstCharOffset);const K=this.getIndentRulesSupport(A.languageId);if(!K)return null;const H=B,Y=T.getLeadingWhitespace(B),X={getLineTokens:G=>M.getLineTokens(G),getLanguageId:()=>M.getLanguageId(),getLanguageIdAtPosition:(G,x)=>M.getLanguageIdAtPosition(G,x),getLineContent:G=>G===P.startLineNumber?H:M.getLineContent(G)},Z=T.getLeadingWhitespace(R.getLineContent()),se=this.getInheritIndentForLine(k,X,P.startLineNumber+1);if(!se){const G=L?Z:Y;return{beforeEnter:G,afterEnter:G}}let oe=L?Z:se.indentation;return se.action===S.IndentAction.Indent&&(oe=F.shiftIndent(oe)),K.shouldDecrease(W)&&(oe=F.unshiftIndent(oe)),{beforeEnter:L?Z:Y,afterEnter:oe}}getIndentActionForType(k,M,P,F,R){if(k<4)return null;const A=this.getScopedLineTokens(M,P.startLineNumber,P.startColumn);if(A.firstCharOffset)return null;const O=this.getIndentRulesSupport(A.languageId);if(!O)return null;const L=A.getLineContent(),B=L.substr(0,P.startColumn-1-A.firstCharOffset);let W;if(P.isEmpty()?W=L.substr(P.startColumn-1-A.firstCharOffset):W=this.getScopedLineTokens(M,P.endLineNumber,P.endColumn).getLineContent().substr(P.endColumn-1-A.firstCharOffset),!O.shouldDecrease(B+W)&&O.shouldDecrease(B+F+W)){const K=this.getInheritIndentForLine(k,M,P.startLineNumber,!1);if(!K)return null;let H=K.indentation;return K.action!==S.IndentAction.Indent&&(H=R.unshiftIndent(H)),H}return null}getIndentMetadata(k,M){const P=this.getIndentRulesSupport(k.getLanguageId());return!P||M<1||M>k.getLineCount()?null:P.getIndentMetadata(k.getLineContent(M))}getEnterAction(k,M,P){const F=this.getScopedLineTokens(M,P.startLineNumber,P.startColumn),R=this.getLanguageConfiguration(F.languageId);if(!R)return null;const A=F.getLineContent(),O=A.substr(0,P.startColumn-1-F.firstCharOffset);let L;P.isEmpty()?L=A.substr(P.startColumn-1-F.firstCharOffset):L=this.getScopedLineTokens(M,P.endLineNumber,P.endColumn).getLineContent().substr(P.endColumn-1-F.firstCharOffset);let B="";if(P.startLineNumber>1&&F.firstCharOffset===0){const Z=this.getScopedLineTokens(M,P.startLineNumber-1);Z.languageId===F.languageId&&(B=Z.getLineContent())}const W=R.onEnter(k,B,O,L);if(!W)return null;const K=W.indentAction;let H=W.appendText;const Y=W.removeText||0;H?K===S.IndentAction.Indent&&(H="    "+H):K===S.IndentAction.Indent||K===S.IndentAction.IndentOutdent?H="    ":H="";let X=this.getIndentationAtPosition(M,P.startLineNumber,P.startColumn);return Y&&(X=X.substring(0,X.length-Y)),{indentAction:K,appendText:H,removeText:Y,indentation:X}}getIndentationAtPosition(k,M,P){const F=k.getLineContent(M);let R=T.getLeadingWhitespace(F);return R.length>P-1&&(R=R.substring(0,P-1)),R}getScopedLineTokens(k,M,P){k.forceTokenization(M);const F=k.getLineTokens(M),R=typeof P=="undefined"?k.getLineMaxColumn(M)-1:P-1;return(0,p.createScopedLineTokens)(F,R)}}e.LanguageConfigurationRegistryImpl=_,e.LanguageConfigurationRegistry=new _;class b{constructor(k){this.languageId=k,this._resolved=null,this._entries=[],this._order=0,this._resolved=null}register(k,M){const P=new m(k,M,++this._order);return this._entries.push(P),this._resolved=null,(0,N.toDisposable)(()=>{for(let F=0;F<this._entries.length;F++)if(this._entries[F]===P){this._entries.splice(F,1),this._resolved=null;break}})}getResolvedConfiguration(){if(!this._resolved){const k=this._resolve();k&&(this._resolved=new E(this.languageId,k))}return this._resolved}_resolve(){return this._entries.length===0?null:(this._entries.sort(m.cmp),v(this._entries.map(k=>k.configuration)))}}function v(I){let k={comments:void 0,brackets:void 0,wordPattern:void 0,indentationRules:void 0,onEnterRules:void 0,autoClosingPairs:void 0,surroundingPairs:void 0,autoCloseBefore:void 0,folding:void 0,colorizedBracketPairs:void 0,__electricCharacterSupport:void 0};for(const M of I)k={comments:M.comments||k.comments,brackets:M.brackets||k.brackets,wordPattern:M.wordPattern||k.wordPattern,indentationRules:M.indentationRules||k.indentationRules,onEnterRules:M.onEnterRules||k.onEnterRules,autoClosingPairs:M.autoClosingPairs||k.autoClosingPairs,surroundingPairs:M.surroundingPairs||k.surroundingPairs,autoCloseBefore:M.autoCloseBefore||k.autoCloseBefore,folding:M.folding||k.folding,colorizedBracketPairs:M.colorizedBracketPairs||k.colorizedBracketPairs,__electricCharacterSupport:M.__electricCharacterSupport||k.__electricCharacterSupport};return k}class m{constructor(k,M,P){this.configuration=k,this.priority=M,this.order=P}static cmp(k,M){return k.priority===M.priority?k.order-M.order:k.priority-M.priority}}class E{constructor(k,M){this.languageId=k,this.underlyingConfig=M,this._brackets=null,this._electricCharacter=null,this._onEnterSupport=this.underlyingConfig.brackets||this.underlyingConfig.indentationRules||this.underlyingConfig.onEnterRules?new t.OnEnterSupport(this.underlyingConfig):null,this.comments=E._handleComments(this.underlyingConfig),this.characterPair=new C.CharacterPairSupport(this.underlyingConfig),this.wordDefinition=this.underlyingConfig.wordPattern||D.DEFAULT_WORD_REGEXP,this.indentationRules=this.underlyingConfig.indentationRules,this.underlyingConfig.indentationRules?this.indentRulesSupport=new g.IndentRulesSupport(this.underlyingConfig.indentationRules):this.indentRulesSupport=null,this.foldingRules=this.underlyingConfig.folding||{}}getWordDefinition(){return(0,D.ensureValidWordDefinition)(this.wordDefinition)}get brackets(){return!this._brackets&&this.underlyingConfig.brackets&&(this._brackets=new s.RichEditBrackets(this.languageId,this.underlyingConfig.brackets)),this._brackets}get electricCharacter(){return this._electricCharacter||(this._electricCharacter=new n.BracketElectricCharacterSupport(this.brackets)),this._electricCharacter}onEnter(k,M,P,F){return this._onEnterSupport?this._onEnterSupport.onEnter(k,M,P,F):null}static _handleComments(k){let M=k.comments;if(!M)return null;let P={};if(M.lineComment&&(P.lineCommentToken=M.lineComment),M.blockComment){let[F,R]=M.blockComment;P.blockCommentStartToken=F,P.blockCommentEndToken=R}return P}}e.ResolvedLanguageConfiguration=E,(0,a.registerSingleton)(e.ILanguageConfigurationService,o)}),define(J[127],ee([0,1,479,4,37,33,109]),function(j,e,w,N,T,D,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.PLAINTEXT_EXTENSION=e.PLAINTEXT_MODE_ID=e.ModesRegistry=e.EditorModesRegistry=e.Extensions=void 0,e.Extensions={ModesRegistry:"editor.modesRegistry"};class p{constructor(){this._onDidChangeLanguages=new N.Emitter,this.onDidChangeLanguages=this._onDidChangeLanguages.event,this._languages=[],this._dynamicLanguages=[]}registerLanguage(n){return this._languages.push(n),this._onDidChangeLanguages.fire(void 0),{dispose:()=>{for(let g=0,t=this._languages.length;g<t;g++)if(this._languages[g]===n){this._languages.splice(g,1);return}}}}getLanguages(){return[].concat(this._languages).concat(this._dynamicLanguages)}}e.EditorModesRegistry=p,e.ModesRegistry=new p,D.Registry.add(e.Extensions.ModesRegistry,e.ModesRegistry),e.PLAINTEXT_MODE_ID="plaintext",e.PLAINTEXT_EXTENSION=".txt",e.ModesRegistry.registerLanguage({id:e.PLAINTEXT_MODE_ID,extensions:[e.PLAINTEXT_EXTENSION],aliases:[w.localize(0,null),"text"],mimetypes:[S.Mimes.text]}),T.LanguageConfigurationRegistry.register(e.PLAINTEXT_MODE_ID,{brackets:[["(",")"],["[","]"],["{","}"]],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:"<",close:">"},{open:'"',close:'"'},{open:"'",close:"'"},{open:"`",close:"`"}],colorizedBracketPairs:[],folding:{offSide:!0}},0)}),define(J[265],ee([0,1,14,2,212,313,3,18,37,410,42,149,8,19,72,83,11]),function(j,e,w,N,T,D,S,p,C,n,g,t,s,c,u,d,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EditorWorkerClient=e.EditorWorkerHost=e.EditorWorkerServiceImpl=void 0;const r=60*1e3,o=5*60*1e3;function i(m,E){let I=m.getModel(E);return!(!I||I.isTooLargeForSyncing())}let l=class extends N.Disposable{constructor(E,I,k){super();this._modelService=E,this._workerManager=this._register(new f(this._modelService)),this._logService=k,this._register(p.LinkProviderRegistry.register({language:"*",hasAccessToAllModels:!0},{provideLinks:(M,P)=>i(this._modelService,M.uri)?this._workerManager.withWorker().then(F=>F.computeLinks(M.uri)).then(F=>F&&{links:F}):Promise.resolve({links:[]})})),this._register(p.CompletionProviderRegistry.register("*",new h(this._workerManager,I,this._modelService)))}dispose(){super.dispose()}computeDiff(E,I,k,M){return this._workerManager.withWorker().then(P=>P.computeDiff(E,I,k,M))}computeMoreMinimalEdits(E,I){if((0,c.isNonEmptyArray)(I)){if(!i(this._modelService,E))return Promise.resolve(I);const k=d.StopWatch.create(!0),M=this._workerManager.withWorker().then(P=>P.computeMoreMinimalEdits(E,I));return M.finally(()=>this._logService.trace("FORMAT#computeMoreMinimalEdits",E.toString(!0),k.elapsed())),Promise.race([M,(0,w.timeout)(1e3).then(()=>I)])}else return Promise.resolve(void 0)}canNavigateValueSet(E){return i(this._modelService,E)}navigateValueSet(E,I,k){return this._workerManager.withWorker().then(M=>M.navigateValueSet(E,I,k))}canComputeWordRanges(E){return i(this._modelService,E)}computeWordRanges(E,I){return this._workerManager.withWorker().then(k=>k.computeWordRanges(E,I))}};l=Fe([Ce(0,g.IModelService),Ce(1,t.ITextResourceConfigurationService),Ce(2,u.ILogService)],l),e.EditorWorkerServiceImpl=l;class h{constructor(E,I,k){this._debugDisplayName="wordbasedCompletions",this._workerManager=E,this._configurationService=I,this._modelService=k}provideCompletionItems(E,I){return Re(this,void 0,void 0,function*(){const k=this._configurationService.getValue(E.uri,I,"editor");if(!k.wordBasedSuggestions)return;const M=[];if(k.wordBasedSuggestionsMode==="currentDocument")i(this._modelService,E.uri)&&M.push(E.uri);else for(const B of this._modelService.getModels())!i(this._modelService,B.uri)||(B===E?M.unshift(B.uri):(k.wordBasedSuggestionsMode==="allDocuments"||B.getLanguageId()===E.getLanguageId())&&M.push(B.uri));if(M.length===0)return;const P=C.LanguageConfigurationRegistry.getWordDefinition(E.getLanguageId()),F=E.getWordAtPosition(I),R=F?new S.Range(I.lineNumber,F.startColumn,I.lineNumber,F.endColumn):S.Range.fromPositions(I),A=R.setEndPosition(I.lineNumber,I.column),L=yield(yield this._workerManager.withWorker()).textualSuggest(M,F==null?void 0:F.word,P);if(!!L)return{duration:L.duration,suggestions:L.words.map(B=>({kind:18,label:B,insertText:B,range:{insert:A,replace:R}}))}})}}class f extends N.Disposable{constructor(E){super();this._modelService=E,this._editorWorkerClient=null,this._lastWorkerUsedTime=new Date().getTime(),this._register(new w.IntervalTimer).cancelAndSet(()=>this._checkStopIdleWorker(),Math.round(o/2)),this._register(this._modelService.onModelRemoved(k=>this._checkStopEmptyWorker()))}dispose(){this._editorWorkerClient&&(this._editorWorkerClient.dispose(),this._editorWorkerClient=null),super.dispose()}_checkStopEmptyWorker(){if(!this._editorWorkerClient)return;this._modelService.getModels().length===0&&(this._editorWorkerClient.dispose(),this._editorWorkerClient=null)}_checkStopIdleWorker(){if(!this._editorWorkerClient)return;new Date().getTime()-this._lastWorkerUsedTime>o&&(this._editorWorkerClient.dispose(),this._editorWorkerClient=null)}withWorker(){return this._lastWorkerUsedTime=new Date().getTime(),this._editorWorkerClient||(this._editorWorkerClient=new v(this._modelService,!1,"editorWorkerService")),Promise.resolve(this._editorWorkerClient)}}class y extends N.Disposable{constructor(E,I,k){super();if(this._syncedModels=Object.create(null),this._syncedModelsLastUsedTime=Object.create(null),this._proxy=E,this._modelService=I,!k){let M=new w.IntervalTimer;M.cancelAndSet(()=>this._checkStopModelSync(),Math.round(r/2)),this._register(M)}}dispose(){for(let E in this._syncedModels)(0,N.dispose)(this._syncedModels[E]);this._syncedModels=Object.create(null),this._syncedModelsLastUsedTime=Object.create(null),super.dispose()}ensureSyncedResources(E,I){for(const k of E){let M=k.toString();this._syncedModels[M]||this._beginModelSync(k,I),this._syncedModels[M]&&(this._syncedModelsLastUsedTime[M]=new Date().getTime())}}_checkStopModelSync(){let E=new Date().getTime(),I=[];for(let k in this._syncedModelsLastUsedTime)E-this._syncedModelsLastUsedTime[k]>r&&I.push(k);for(const k of I)this._stopModelSync(k)}_beginModelSync(E,I){let k=this._modelService.getModel(E);if(!k||!I&&k.isTooLargeForSyncing())return;let M=E.toString();this._proxy.acceptNewModel({url:k.uri.toString(),lines:k.getLinesContent(),EOL:k.getEOL(),versionId:k.getVersionId()});const P=new N.DisposableStore;P.add(k.onDidChangeContent(F=>{this._proxy.acceptModelChanged(M.toString(),F)})),P.add(k.onWillDispose(()=>{this._stopModelSync(M)})),P.add((0,N.toDisposable)(()=>{this._proxy.acceptRemovedModel(M)})),this._syncedModels[M]=P}_stopModelSync(E){let I=this._syncedModels[E];delete this._syncedModels[E],delete this._syncedModelsLastUsedTime[E],(0,N.dispose)(I)}}class _{constructor(E){this._instance=E,this._proxyObj=Promise.resolve(this._instance)}dispose(){this._instance.dispose()}getProxyObject(){return this._proxyObj}}class b{constructor(E){this._workerClient=E}fhr(E,I){return this._workerClient.fhr(E,I)}}e.EditorWorkerHost=b;class v extends N.Disposable{constructor(E,I,k){super();this._disposed=!1,this._modelService=E,this._keepIdleModels=I,this._workerFactory=new D.DefaultWorkerFactory(k),this._worker=null,this._modelManager=null}fhr(E,I){throw new Error("Not implemented!")}_getOrCreateWorker(){if(!this._worker)try{this._worker=this._register(new T.SimpleWorkerClient(this._workerFactory,"vs/editor/common/services/editorSimpleWorker",new b(this)))}catch(E){(0,T.logOnceWebWorkerWarning)(E),this._worker=new _(new n.EditorSimpleWorker(new b(this),null))}return this._worker}_getProxy(){return this._getOrCreateWorker().getProxyObject().then(void 0,E=>((0,T.logOnceWebWorkerWarning)(E),this._worker=new _(new n.EditorSimpleWorker(new b(this),null)),this._getOrCreateWorker().getProxyObject()))}_getOrCreateModelManager(E){return this._modelManager||(this._modelManager=this._register(new y(E,this._modelService,this._keepIdleModels))),this._modelManager}_withSyncedResources(E,I=!1){return Re(this,void 0,void 0,function*(){return this._disposed?Promise.reject((0,a.canceled)()):this._getProxy().then(k=>(this._getOrCreateModelManager(k).ensureSyncedResources(E,I),k))})}computeDiff(E,I,k,M){return this._withSyncedResources([E,I],!0).then(P=>P.computeDiff(E.toString(),I.toString(),k,M))}computeMoreMinimalEdits(E,I){return this._withSyncedResources([E]).then(k=>k.computeMoreMinimalEdits(E.toString(),I))}computeLinks(E){return this._withSyncedResources([E]).then(I=>I.computeLinks(E.toString()))}textualSuggest(E,I,k){return Re(this,void 0,void 0,function*(){const M=yield this._withSyncedResources(E),P=k.source,F=(0,s.regExpFlags)(k);return M.textualSuggest(E.map(R=>R.toString()),I,P,F)})}computeWordRanges(E,I){return this._withSyncedResources([E]).then(k=>{let M=this._modelService.getModel(E);if(!M)return Promise.resolve(null);let P=C.LanguageConfigurationRegistry.getWordDefinition(M.getLanguageId()),F=P.source,R=(0,s.regExpFlags)(P);return k.computeWordRanges(E.toString(),I,F,R)})}navigateValueSet(E,I,k){return this._withSyncedResources([E]).then(M=>{let P=this._modelService.getModel(E);if(!P)return null;let F=C.LanguageConfigurationRegistry.getWordDefinition(P.getLanguageId()),R=F.source,A=(0,s.regExpFlags)(F);return M.navigateValueSet(E.toString(),I,k,R,A)})}dispose(){super.dispose(),this._disposed=!0}}e.EditorWorkerClient=v}),define(J[584],ee([0,1,48,44,127,250]),function(j,e,w,N,T,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.cssEscape=e.getIconClasses=void 0;function S(n,g,t,s){const c=s===D.FileKind.ROOT_FOLDER?["rootfolder-icon"]:s===D.FileKind.FOLDER?["folder-icon"]:["file-icon"];if(t){let u;if(t.scheme===w.Schemas.data?u=N.DataUri.parseMetaData(t).get(N.DataUri.META_DATA_LABEL):u=C((0,N.basenameOrAuthority)(t).toLowerCase()),s===D.FileKind.FOLDER)c.push(`${u}-name-folder-icon`);else{if(u){if(c.push(`${u}-name-file-icon`),u.length<=255){const a=u.split(".");for(let r=1;r<a.length;r++)c.push(`${a.slice(r).join(".")}-ext-file-icon`)}c.push("ext-file-icon")}const d=p(n,g,t);d&&c.push(`${C(d)}-lang-file-icon`)}}return c}e.getIconClasses=S;function p(n,g,t){if(!t)return null;let s=null;if(t.scheme===w.Schemas.data){const u=N.DataUri.parseMetaData(t).get(N.DataUri.META_DATA_MIME);u&&(s=g.getModeId(u))}else{const c=n.getModel(t);c&&(s=c.getLanguageId())}return s&&s!==T.PLAINTEXT_MODE_ID?s:g.getModeIdByFilepathOrFirstLine(t)}function C(n){return n.replace(/[\11\12\14\15\40]/g,"/")}e.cssEscape=C}),define(J[585],ee([0,1,11,4,2,109,8,127,77,101,33]),function(j,e,w,N,T,D,S,p,C,n,g){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LanguagesRegistry=e.LanguageIdCodec=void 0;const t=Object.prototype.hasOwnProperty;class s{constructor(){this._languageIdToLanguage=[],this._languageToLanguageId=new Map,this._register(C.NULL_MODE_ID,0),this._register(p.PLAINTEXT_MODE_ID,1),this._nextLanguageId=2}_register(d,a){this._languageIdToLanguage[a]=d,this._languageToLanguageId.set(d,a)}register(d){if(this._languageToLanguageId.has(d))return;const a=this._nextLanguageId++;this._register(d,a)}encodeLanguageId(d){return this._languageToLanguageId.get(d)||0}decodeLanguageId(d){return this._languageIdToLanguage[d]||C.NULL_MODE_ID}}e.LanguageIdCodec=s;class c extends T.Disposable{constructor(d=!0,a=!1){super();this._onDidChange=this._register(new N.Emitter),this.onDidChange=this._onDidChange.event,c.instanceCount++,this._warnOnOverwrite=a,this.languageIdCodec=new s,this._languages={},this._mimeTypesMap={},this._nameMap={},this._lowercaseNameMap={},d&&(this._initializeFromRegistry(),this._register(p.ModesRegistry.onDidChangeLanguages(r=>{this._initializeFromRegistry()})))}dispose(){c.instanceCount--,super.dispose()}_initializeFromRegistry(){this._languages={},this._mimeTypesMap={},this._nameMap={},this._lowercaseNameMap={},D.clearTextMimes();const d=p.ModesRegistry.getLanguages();this._registerLanguages(d)}_registerLanguages(d){for(const a of d)this._registerLanguage(a);this._mimeTypesMap={},this._nameMap={},this._lowercaseNameMap={},Object.keys(this._languages).forEach(a=>{let r=this._languages[a];r.name&&(this._nameMap[r.name]=r.identifier),r.aliases.forEach(o=>{this._lowercaseNameMap[o.toLowerCase()]=r.identifier}),r.mimetypes.forEach(o=>{this._mimeTypesMap[o]=r.identifier})}),g.Registry.as(n.Extensions.Configuration).registerOverrideIdentifiers(p.ModesRegistry.getLanguages().map(a=>a.id)),this._onDidChange.fire()}_registerLanguage(d){const a=d.id;let r;t.call(this._languages,a)?r=this._languages[a]:(this.languageIdCodec.register(a),r={identifier:a,name:null,mimetypes:[],aliases:[],extensions:[],filenames:[],configurationFiles:[]},this._languages[a]=r),this._mergeLanguage(r,d)}_mergeLanguage(d,a){const r=a.id;let o=null;if(Array.isArray(a.mimetypes)&&a.mimetypes.length>0&&(d.mimetypes.push(...a.mimetypes),o=a.mimetypes[0]),o||(o=`text/x-${r}`,d.mimetypes.push(o)),Array.isArray(a.extensions)){a.configuration?d.extensions=a.extensions.concat(d.extensions):d.extensions=d.extensions.concat(a.extensions);for(let h of a.extensions)D.registerTextMime({id:r,mime:o,extension:h},this._warnOnOverwrite)}if(Array.isArray(a.filenames))for(let h of a.filenames)D.registerTextMime({id:r,mime:o,filename:h},this._warnOnOverwrite),d.filenames.push(h);if(Array.isArray(a.filenamePatterns))for(let h of a.filenamePatterns)D.registerTextMime({id:r,mime:o,filepattern:h},this._warnOnOverwrite);if(typeof a.firstLine=="string"&&a.firstLine.length>0){let h=a.firstLine;h.charAt(0)!=="^"&&(h="^"+h);try{let f=new RegExp(h);S.regExpLeadsToEndlessLoop(f)||D.registerTextMime({id:r,mime:o,firstline:f},this._warnOnOverwrite)}catch(f){(0,w.onUnexpectedError)(f)}}d.aliases.push(r);let i=null;if(typeof a.aliases!="undefined"&&Array.isArray(a.aliases)&&(a.aliases.length===0?i=[null]:i=a.aliases),i!==null)for(const h of i)!h||h.length===0||d.aliases.push(h);let l=i!==null&&i.length>0;if(!(l&&i[0]===null)){let h=(l?i[0]:null)||r;(l||!d.name)&&(d.name=h)}a.configuration&&d.configurationFiles.push(a.configuration)}isRegisteredMode(d){return t.call(this._mimeTypesMap,d)?!0:t.call(this._languages,d)}getModeIdForLanguageNameLowercase(d){return t.call(this._lowercaseNameMap,d)?this._lowercaseNameMap[d]:null}extractModeIds(d){return d?d.split(",").map(a=>a.trim()).map(a=>t.call(this._mimeTypesMap,a)?this._mimeTypesMap[a]:a).filter(a=>t.call(this._languages,a)):[]}validateLanguageId(d){return!d||d===C.NULL_MODE_ID?C.NULL_MODE_ID:t.call(this._languages,d)?d:null}getModeIdsFromFilepathOrFirstLine(d,a){if(!d&&!a)return[];let r=D.guessMimeTypes(d,a);return this.extractModeIds(r.join(","))}}e.LanguagesRegistry=c,c.instanceCount=0}),define(J[586],ee([0,1,4,2,77,585,19]),function(j,e,w,N,T,D,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ModeServiceImpl=void 0;class p{constructor(g,t){this._selector=t,this.languageId=this._selector();let s;this._onDidChange=new w.Emitter({onFirstListenerAdd:()=>{s=g(()=>this._evaluate())},onLastListenerRemove:()=>{s.dispose()}}),this.onDidChange=this._onDidChange.event}_evaluate(){const g=this._selector();g!==this.languageId&&(this.languageId=g,this._onDidChange.fire(this.languageId))}}class C extends N.Disposable{constructor(g=!1){super();this._onDidEncounterLanguage=this._register(new w.Emitter),this.onDidEncounterLanguage=this._onDidEncounterLanguage.event,this._onLanguagesMaybeChanged=this._register(new w.Emitter({leakWarningThreshold:200})),this.onLanguagesMaybeChanged=this._onLanguagesMaybeChanged.event,C.instanceCount++,this._encounteredLanguages=new Set,this._registry=this._register(new D.LanguagesRegistry(!0,g)),this.languageIdCodec=this._registry.languageIdCodec,this._register(this._registry.onDidChange(()=>this._onLanguagesMaybeChanged.fire()))}dispose(){C.instanceCount--,super.dispose()}isRegisteredMode(g){return this._registry.isRegisteredMode(g)}getModeIdForLanguageName(g){return this._registry.getModeIdForLanguageNameLowercase(g)}getModeIdByFilepathOrFirstLine(g,t){const s=this._registry.getModeIdsFromFilepathOrFirstLine(g,t);return(0,S.firstOrDefault)(s,null)}getModeId(g){const t=this._registry.extractModeIds(g);return(0,S.firstOrDefault)(t,null)}validateLanguageId(g){return this._registry.validateLanguageId(g)}create(g){return new p(this.onLanguagesMaybeChanged,()=>{const t=this.getModeId(g);return this._createModeAndGetLanguageIdentifier(t)})}createByFilepathOrFirstLine(g,t){return new p(this.onLanguagesMaybeChanged,()=>{const s=this.getModeIdByFilepathOrFirstLine(g,t);return this._createModeAndGetLanguageIdentifier(s)})}_createModeAndGetLanguageIdentifier(g){const t=this.validateLanguageId(g||"plaintext")||T.NULL_MODE_ID;return this._getOrCreateMode(t),t}triggerMode(g){const t=this.getModeId(g);this._getOrCreateMode(t||"plaintext")}_getOrCreateMode(g){if(!this._encounteredLanguages.has(g)){this._encounteredLanguages.add(g);const t=this.validateLanguageId(g)||T.NULL_MODE_ID;this._onDidEncounterLanguage.fire(t)}}}e.ModeServiceImpl=C,C.instanceCount=0}),define(J[587],ee([0,1,265,20]),function(j,e,w,N){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.createWebWorker=void 0;function T(S,p){return new D(S,p)}e.createWebWorker=T;class D extends w.EditorWorkerClient{constructor(p,C){super(p,C.keepIdleModels||!1,C.label);this._foreignModuleId=C.moduleId,this._foreignModuleCreateData=C.createData||null,this._foreignModuleHost=C.host||null,this._foreignProxy=null}fhr(p,C){if(!this._foreignModuleHost||typeof this._foreignModuleHost[p]!="function")return Promise.reject(new Error("Missing method "+p+" or missing main thread foreign host."));try{return Promise.resolve(this._foreignModuleHost[p].apply(this._foreignModuleHost,C))}catch(n){return Promise.reject(n)}}_getForeignProxy(){return this._foreignProxy||(this._foreignProxy=this._getProxy().then(p=>{const C=this._foreignModuleHost?N.getAllMethodNames(this._foreignModuleHost):[];return p.loadForeignModule(this._foreignModuleId,this._foreignModuleCreateData,C).then(n=>{this._foreignModuleCreateData=null;const g=(c,u)=>p.fmr(c,u),t=(c,u)=>function(){const d=Array.prototype.slice.call(arguments,0);return u(c,d)};let s={};for(const c of n)s[c]=t(c,g);return s})})),this._foreignProxy}getProxy(){return this._getForeignProxy()}withSyncedResources(p){return this._withSyncedResources(p).then(C=>this.getProxy())}}}),define(J[266],ee([0,1,59,13,3,22,37]),function(j,e,w,N,T,D,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BlockCommentCommand=void 0;class p{constructor(n,g){this._selection=n,this._insertSpace=g,this._usedEndToken=null}static _haystackHasNeedleAtOffset(n,g,t){if(t<0)return!1;const s=g.length,c=n.length;if(t+s>c)return!1;for(let u=0;u<s;u++){const d=n.charCodeAt(t+u),a=g.charCodeAt(u);if(d!==a&&!(d>=65&&d<=90&&d+32===a)&&!(a>=65&&a<=90&&a+32===d))return!1}return!0}_createOperationsForBlockComment(n,g,t,s,c,u){const d=n.startLineNumber,a=n.startColumn,r=n.endLineNumber,o=n.endColumn,i=c.getLineContent(d),l=c.getLineContent(r);let h=i.lastIndexOf(g,a-1+g.length),f=l.indexOf(t,o-1-t.length);if(h!==-1&&f!==-1)if(d===r)i.substring(h+g.length,f).indexOf(t)>=0&&(h=-1,f=-1);else{const _=i.substring(h+g.length),b=l.substring(0,f);(_.indexOf(t)>=0||b.indexOf(t)>=0)&&(h=-1,f=-1)}let y;h!==-1&&f!==-1?(s&&h+g.length<i.length&&i.charCodeAt(h+g.length)===32&&(g=g+" "),s&&f>0&&l.charCodeAt(f-1)===32&&(t=" "+t,f-=1),y=p._createRemoveBlockCommentOperations(new T.Range(d,h+g.length+1,r,f+1),g,t)):(y=p._createAddBlockCommentOperations(n,g,t,this._insertSpace),this._usedEndToken=y.length===1?t:null);for(const _ of y)u.addTrackedEditOperation(_.range,_.text)}static _createRemoveBlockCommentOperations(n,g,t){let s=[];return T.Range.isEmpty(n)?s.push(w.EditOperation.delete(new T.Range(n.startLineNumber,n.startColumn-g.length,n.endLineNumber,n.endColumn+t.length))):(s.push(w.EditOperation.delete(new T.Range(n.startLineNumber,n.startColumn-g.length,n.startLineNumber,n.startColumn))),s.push(w.EditOperation.delete(new T.Range(n.endLineNumber,n.endColumn,n.endLineNumber,n.endColumn+t.length)))),s}static _createAddBlockCommentOperations(n,g,t,s){let c=[];return T.Range.isEmpty(n)?c.push(w.EditOperation.replace(new T.Range(n.startLineNumber,n.startColumn,n.endLineNumber,n.endColumn),g+"  "+t)):(c.push(w.EditOperation.insert(new N.Position(n.startLineNumber,n.startColumn),g+(s?" ":""))),c.push(w.EditOperation.insert(new N.Position(n.endLineNumber,n.endColumn),(s?" ":"")+t))),c}getEditOperations(n,g){const t=this._selection.startLineNumber,s=this._selection.startColumn;n.tokenizeIfCheap(t);const c=n.getLanguageIdAtPosition(t,s),u=S.LanguageConfigurationRegistry.getComments(c);!u||!u.blockCommentStartToken||!u.blockCommentEndToken||this._createOperationsForBlockComment(this._selection,u.blockCommentStartToken,u.blockCommentEndToken,this._insertSpace,n,g)}computeCursorState(n,g){const t=g.getInverseEditOperations();if(t.length===2){const s=t[0],c=t[1];return new D.Selection(s.range.endLineNumber,s.range.endColumn,c.range.startLineNumber,c.range.startColumn)}else{const s=t[0].range,c=this._usedEndToken?-this._usedEndToken.length-1:0;return new D.Selection(s.endLineNumber,s.endColumn+c,s.endLineNumber,s.endColumn+c)}}}e.BlockCommentCommand=p}),define(J[588],ee([0,1,8,59,13,3,22,37,266]),function(j,e,w,N,T,D,S,p,C){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LineCommentCommand=void 0;class n{constructor(t,s,c,u,d,a){this._selection=t,this._tabSize=s,this._type=c,this._insertSpace=u,this._selectionId=null,this._deltaColumn=0,this._moveEndPositionDown=!1,this._ignoreEmptyLines=d,this._ignoreFirstLine=a||!1}static _gatherPreflightCommentStrings(t,s,c){t.tokenizeIfCheap(s);const u=t.getLanguageIdAtPosition(s,1),d=p.LanguageConfigurationRegistry.getComments(u),a=d?d.lineCommentToken:null;if(!a)return null;let r=[];for(let o=0,i=c-s+1;o<i;o++)r[o]={ignore:!1,commentStr:a,commentStrOffset:0,commentStrLength:a.length};return r}static _analyzeLines(t,s,c,u,d,a,r){let o=!0,i;t===0?i=!0:t===1?i=!1:i=!0;for(let l=0,h=u.length;l<h;l++){const f=u[l],y=d+l;if(y===d&&r){f.ignore=!0;continue}const _=c.getLineContent(y),b=w.firstNonWhitespaceIndex(_);if(b===-1){f.ignore=a,f.commentStrOffset=_.length;continue}if(o=!1,f.ignore=!1,f.commentStrOffset=b,i&&!C.BlockCommentCommand._haystackHasNeedleAtOffset(_,f.commentStr,b)&&(t===0?i=!1:t===1||(f.ignore=!0)),i&&s){const v=b+f.commentStrLength;v<_.length&&_.charCodeAt(v)===32&&(f.commentStrLength+=1)}}if(t===0&&o){i=!1;for(let l=0,h=u.length;l<h;l++)u[l].ignore=!1}return{supported:!0,shouldRemoveComments:i,lines:u}}static _gatherPreflightData(t,s,c,u,d,a,r){const o=n._gatherPreflightCommentStrings(c,u,d);return o===null?{supported:!1}:n._analyzeLines(t,s,c,o,u,a,r)}_executeLineComments(t,s,c,u){let d;c.shouldRemoveComments?d=n._createRemoveLineCommentsOperations(c.lines,u.startLineNumber):(n._normalizeInsertionPoint(t,c.lines,u.startLineNumber,this._tabSize),d=this._createAddLineCommentsOperations(c.lines,u.startLineNumber));const a=new T.Position(u.positionLineNumber,u.positionColumn);for(let r=0,o=d.length;r<o;r++)s.addEditOperation(d[r].range,d[r].text),D.Range.isEmpty(d[r].range)&&D.Range.getStartPosition(d[r].range).equals(a)&&t.getLineContent(a.lineNumber).length+1===a.column&&(this._deltaColumn=(d[r].text||"").length);this._selectionId=s.trackSelection(u)}_attemptRemoveBlockComment(t,s,c,u){let d=s.startLineNumber,a=s.endLineNumber,r=u.length+Math.max(t.getLineFirstNonWhitespaceColumn(s.startLineNumber),s.startColumn),o=t.getLineContent(d).lastIndexOf(c,r-1),i=t.getLineContent(a).indexOf(u,s.endColumn-1-c.length);return o!==-1&&i===-1&&(i=t.getLineContent(d).indexOf(u,o+c.length),a=d),o===-1&&i!==-1&&(o=t.getLineContent(a).lastIndexOf(c,i),d=a),s.isEmpty()&&(o===-1||i===-1)&&(o=t.getLineContent(d).indexOf(c),o!==-1&&(i=t.getLineContent(d).indexOf(u,o+c.length))),o!==-1&&t.getLineContent(d).charCodeAt(o+c.length)===32&&(c+=" "),i!==-1&&t.getLineContent(a).charCodeAt(i-1)===32&&(u=" "+u,i-=1),o!==-1&&i!==-1?C.BlockCommentCommand._createRemoveBlockCommentOperations(new D.Range(d,o+c.length+1,a,i+1),c,u):null}_executeBlockComment(t,s,c){t.tokenizeIfCheap(c.startLineNumber);let u=t.getLanguageIdAtPosition(c.startLineNumber,1),d=p.LanguageConfigurationRegistry.getComments(u);if(!d||!d.blockCommentStartToken||!d.blockCommentEndToken)return;const a=d.blockCommentStartToken,r=d.blockCommentEndToken;let o=this._attemptRemoveBlockComment(t,c,a,r);if(!o){if(c.isEmpty()){const i=t.getLineContent(c.startLineNumber);let l=w.firstNonWhitespaceIndex(i);l===-1&&(l=i.length),o=C.BlockCommentCommand._createAddBlockCommentOperations(new D.Range(c.startLineNumber,l+1,c.startLineNumber,i.length+1),a,r,this._insertSpace)}else o=C.BlockCommentCommand._createAddBlockCommentOperations(new D.Range(c.startLineNumber,t.getLineFirstNonWhitespaceColumn(c.startLineNumber),c.endLineNumber,t.getLineMaxColumn(c.endLineNumber)),a,r,this._insertSpace);o.length===1&&(this._deltaColumn=a.length+1)}this._selectionId=s.trackSelection(c);for(const i of o)s.addEditOperation(i.range,i.text)}getEditOperations(t,s){let c=this._selection;if(this._moveEndPositionDown=!1,c.startLineNumber===c.endLineNumber&&this._ignoreFirstLine){s.addEditOperation(new D.Range(c.startLineNumber,t.getLineMaxColumn(c.startLineNumber),c.startLineNumber+1,1),c.startLineNumber===t.getLineCount()?"":`
`),this._selectionId=s.trackSelection(c);return}c.startLineNumber<c.endLineNumber&&c.endColumn===1&&(this._moveEndPositionDown=!0,c=c.setEndPosition(c.endLineNumber-1,t.getLineMaxColumn(c.endLineNumber-1)));const u=n._gatherPreflightData(this._type,this._insertSpace,t,c.startLineNumber,c.endLineNumber,this._ignoreEmptyLines,this._ignoreFirstLine);return u.supported?this._executeLineComments(t,s,u,c):this._executeBlockComment(t,s,c)}computeCursorState(t,s){let c=s.getTrackedSelection(this._selectionId);return this._moveEndPositionDown&&(c=c.setEndPosition(c.endLineNumber+1,1)),new S.Selection(c.selectionStartLineNumber,c.selectionStartColumn+this._deltaColumn,c.positionLineNumber,c.positionColumn+this._deltaColumn)}static _createRemoveLineCommentsOperations(t,s){let c=[];for(let u=0,d=t.length;u<d;u++){const a=t[u];a.ignore||c.push(N.EditOperation.delete(new D.Range(s+u,a.commentStrOffset+1,s+u,a.commentStrOffset+a.commentStrLength+1)))}return c}_createAddLineCommentsOperations(t,s){let c=[];const u=this._insertSpace?" ":"";for(let d=0,a=t.length;d<a;d++){const r=t[d];r.ignore||c.push(N.EditOperation.insert(new T.Position(s+d,r.commentStrOffset+1),r.commentStr+u))}return c}static nextVisibleColumn(t,s,c,u){return c?t+(s-t%s):t+u}static _normalizeInsertionPoint(t,s,c,u){let d=1073741824,a,r;for(let o=0,i=s.length;o<i;o++){if(s[o].ignore)continue;const l=t.getLineContent(c+o);let h=0;for(let f=0,y=s[o].commentStrOffset;h<d&&f<y;f++)h=n.nextVisibleColumn(h,u,l.charCodeAt(f)===9,1);h<d&&(d=h)}d=Math.floor(d/u)*u;for(let o=0,i=s.length;o<i;o++){if(s[o].ignore)continue;const l=t.getLineContent(c+o);let h=0;for(a=0,r=s[o].commentStrOffset;h<d&&a<r;a++)h=n.nextVisibleColumn(h,u,l.charCodeAt(a)===9,1);h>d?s[o].commentStrOffset=a-1:s[o].commentStrOffset=a}}}e.LineCommentCommand=n}),define(J[589],ee([0,1,4,2,61,41,15]),function(j,e,w,N,T,D,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AccessibilityService=void 0;let p=class extends N.Disposable{constructor(n,g){super();this._contextKeyService=n,this._configurationService=g,this._accessibilitySupport=0,this._onDidChangeScreenReaderOptimized=new w.Emitter,this._accessibilityModeEnabledContext=T.CONTEXT_ACCESSIBILITY_MODE_ENABLED.bindTo(this._contextKeyService);const t=()=>this._accessibilityModeEnabledContext.set(this.isScreenReaderOptimized());this._register(this._configurationService.onDidChangeConfiguration(s=>{s.affectsConfiguration("editor.accessibilitySupport")&&(t(),this._onDidChangeScreenReaderOptimized.fire())})),t(),this.onDidChangeScreenReaderOptimized(()=>t())}get onDidChangeScreenReaderOptimized(){return this._onDidChangeScreenReaderOptimized.event}isScreenReaderOptimized(){const n=this._configurationService.getValue("editor.accessibilitySupport");return n==="on"||n==="auto"&&this._accessibilitySupport===2}getAccessibilitySupport(){return this._accessibilitySupport}};p=Fe([Ce(0,S.IContextKeyService),Ce(1,D.IConfigurationService)],p),e.AccessibilityService=p}),define(J[590],ee([0,1,19,47,38,20,24,41,101]),function(j,e,w,N,T,D,S,p,C){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ConfigurationChangeEvent=e.Configuration=e.DefaultConfigurationModel=e.ConfigurationModel=void 0;class n{constructor(u={},d=[],a=[]){this._contents=u,this._keys=d,this._overrides=a,this.isFrozen=!1,this.overrideConfigurations=new Map}get contents(){return this.checkAndFreeze(this._contents)}get overrides(){return this.checkAndFreeze(this._overrides)}get keys(){return this.checkAndFreeze(this._keys)}isEmpty(){return this._keys.length===0&&Object.keys(this._contents).length===0&&this._overrides.length===0}getValue(u){return u?(0,p.getConfigurationValue)(this.contents,u):this.contents}override(u){let d=this.overrideConfigurations.get(u);return d||(d=this.createOverrideConfigurationModel(u),this.overrideConfigurations.set(u,d)),d}merge(...u){const d=T.deepClone(this.contents),a=T.deepClone(this.overrides),r=[...this.keys];for(const o of u){this.mergeContents(d,o.contents);for(const i of o.overrides){const[l]=a.filter(h=>w.equals(h.identifiers,i.identifiers));l?this.mergeContents(l.contents,i.contents):a.push(T.deepClone(i))}for(const i of o.keys)r.indexOf(i)===-1&&r.push(i)}return new n(d,r,a)}freeze(){return this.isFrozen=!0,this}createOverrideConfigurationModel(u){const d=this.getContentsForOverrideIdentifer(u);if(!d||typeof d!="object"||!Object.keys(d).length)return this;let a={};for(const r of w.distinct([...Object.keys(this.contents),...Object.keys(d)])){let o=this.contents[r],i=d[r];i&&(typeof o=="object"&&typeof i=="object"?(o=T.deepClone(o),this.mergeContents(o,i)):o=i),a[r]=o}return new n(a,this.keys,this.overrides)}mergeContents(u,d){for(const a of Object.keys(d)){if(a in u&&D.isObject(u[a])&&D.isObject(d[a])){this.mergeContents(u[a],d[a]);continue}u[a]=T.deepClone(d[a])}}checkAndFreeze(u){return this.isFrozen&&!Object.isFrozen(u)?T.deepFreeze(u):u}getContentsForOverrideIdentifer(u){for(const d of this.overrides)if(d.identifiers.indexOf(u)!==-1)return d.contents;return null}toJSON(){return{contents:this.contents,overrides:this.overrides,keys:this.keys}}setValue(u,d){this.addKey(u),(0,p.addToValueTree)(this.contents,u,d,a=>{throw new Error(a)})}removeValue(u){this.removeKey(u)&&(0,p.removeFromValueTree)(this.contents,u)}addKey(u){let d=this.keys.length;for(let a=0;a<d;a++)u.indexOf(this.keys[a])===0&&(d=a);this.keys.splice(d,1,u)}removeKey(u){let d=this.keys.indexOf(u);return d!==-1?(this.keys.splice(d,1),!0):!1}}e.ConfigurationModel=n;class g extends n{constructor(){const u=(0,p.getDefaultValues)(),d=(0,p.getConfigurationKeys)(),a=[];for(const r of Object.keys(u))C.OVERRIDE_PROPERTY_PATTERN.test(r)&&a.push({identifiers:[(0,C.overrideIdentifierFromKey)(r).trim()],keys:Object.keys(u[r]),contents:(0,p.toValuesTree)(u[r],o=>console.error(`Conflict in default settings file: ${o}`))});super(u,d,a)}}e.DefaultConfigurationModel=g;class t{constructor(u,d,a=new n,r=new n,o=new N.ResourceMap,i=new n,l=new N.ResourceMap,h=!0){this._defaultConfiguration=u,this._localUserConfiguration=d,this._remoteUserConfiguration=a,this._workspaceConfiguration=r,this._folderConfigurations=o,this._memoryConfiguration=i,this._memoryConfigurationByResource=l,this._freeze=h,this._workspaceConsolidatedConfiguration=null,this._foldersConsolidatedConfigurations=new N.ResourceMap,this._userConfiguration=null}getValue(u,d,a){return this.getConsolidateConfigurationModel(d,a).getValue(u)}updateValue(u,d,a={}){let r;a.resource?(r=this._memoryConfigurationByResource.get(a.resource),r||(r=new n,this._memoryConfigurationByResource.set(a.resource,r))):r=this._memoryConfiguration,d===void 0?r.removeValue(u):r.setValue(u,d),a.resource||(this._workspaceConsolidatedConfiguration=null)}get userConfiguration(){return this._userConfiguration||(this._userConfiguration=this._remoteUserConfiguration.isEmpty()?this._localUserConfiguration:this._localUserConfiguration.merge(this._remoteUserConfiguration),this._freeze&&this._userConfiguration.freeze()),this._userConfiguration}getConsolidateConfigurationModel(u,d){let a=this.getConsolidatedConfigurationModelForResource(u,d);return u.overrideIdentifier?a.override(u.overrideIdentifier):a}getConsolidatedConfigurationModelForResource({resource:u},d){let a=this.getWorkspaceConsolidatedConfiguration();if(d&&u){const r=d.getFolder(u);r&&(a=this.getFolderConsolidatedConfiguration(r.uri)||a);const o=this._memoryConfigurationByResource.get(u);o&&(a=a.merge(o))}return a}getWorkspaceConsolidatedConfiguration(){return this._workspaceConsolidatedConfiguration||(this._workspaceConsolidatedConfiguration=this._defaultConfiguration.merge(this.userConfiguration,this._workspaceConfiguration,this._memoryConfiguration),this._freeze&&(this._workspaceConfiguration=this._workspaceConfiguration.freeze())),this._workspaceConsolidatedConfiguration}getFolderConsolidatedConfiguration(u){let d=this._foldersConsolidatedConfigurations.get(u);if(!d){const a=this.getWorkspaceConsolidatedConfiguration(),r=this._folderConfigurations.get(u);r?(d=a.merge(r),this._freeze&&(d=d.freeze()),this._foldersConsolidatedConfigurations.set(u,d)):d=a}return d}toData(){return{defaults:{contents:this._defaultConfiguration.contents,overrides:this._defaultConfiguration.overrides,keys:this._defaultConfiguration.keys},user:{contents:this.userConfiguration.contents,overrides:this.userConfiguration.overrides,keys:this.userConfiguration.keys},workspace:{contents:this._workspaceConfiguration.contents,overrides:this._workspaceConfiguration.overrides,keys:this._workspaceConfiguration.keys},folders:[...this._folderConfigurations.keys()].reduce((u,d)=>{const{contents:a,overrides:r,keys:o}=this._folderConfigurations.get(d);return u.push([d,{contents:a,overrides:r,keys:o}]),u},[])}}static parse(u){const d=this.parseConfigurationModel(u.defaults),a=this.parseConfigurationModel(u.user),r=this.parseConfigurationModel(u.workspace),o=u.folders.reduce((i,l)=>(i.set(S.URI.revive(l[0]),this.parseConfigurationModel(l[1])),i),new N.ResourceMap);return new t(d,a,new n,r,o,new n,new N.ResourceMap,!1)}static parseConfigurationModel(u){return new n(u.contents,u.keys,u.overrides).freeze()}}e.Configuration=t;class s{constructor(u,d,a,r){this.change=u,this.previous=d,this.currentConfiguraiton=a,this.currentWorkspace=r,this._previousConfiguration=void 0;const o=new Set;u.keys.forEach(l=>o.add(l)),u.overrides.forEach(([,l])=>l.forEach(h=>o.add(h))),this.affectedKeys=[...o.values()];const i=new n;this.affectedKeys.forEach(l=>i.setValue(l,{})),this.affectedKeysTree=i.contents}get previousConfiguration(){return!this._previousConfiguration&&this.previous&&(this._previousConfiguration=t.parse(this.previous.data)),this._previousConfiguration}affectsConfiguration(u,d){var a;if(this.doesAffectedKeysTreeContains(this.affectedKeysTree,u)){if(d){const r=this.previousConfiguration?this.previousConfiguration.getValue(u,d,(a=this.previous)===null||a===void 0?void 0:a.workspace):void 0,o=this.currentConfiguraiton.getValue(u,d,this.currentWorkspace);return!T.equals(r,o)}return!0}return!1}doesAffectedKeysTreeContains(u,d){let a=(0,p.toValuesTree)({[d]:!0},()=>{}),r;for(;typeof a=="object"&&(r=Object.keys(a)[0]);){if(u=u[r],!u)return!1;a=a[r]}return!0}}e.ConfigurationChangeEvent=s}),define(J[591],ee([0,1,4,54,2,47,546,26,41,15,262]),function(j,e,w,N,T,D,S,p,C,n,g){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ContextKeyService=e.AbstractContextKeyService=e.Context=void 0;const t="data-keybinding-context";class s{constructor(_,b){this._id=_,this._parent=b,this._value=Object.create(null),this._value._contextId=_}setValue(_,b){return this._value[_]!==b?(this._value[_]=b,!0):!1}removeValue(_){return _ in this._value?(delete this._value[_],!0):!1}getValue(_){const b=this._value[_];return typeof b=="undefined"&&this._parent?this._parent.getValue(_):b}}e.Context=s;class c extends s{constructor(){super(-1,null)}setValue(_,b){return!1}removeValue(_){return!1}getValue(_){}}c.INSTANCE=new c;class u extends s{constructor(_,b,v){super(_,null);this._configurationService=b,this._values=D.TernarySearchTree.forConfigKeys(),this._listener=this._configurationService.onDidChangeConfiguration(m=>{if(m.source===6){const E=Array.from(N.Iterable.map(this._values,([I])=>I));this._values.clear(),v.fire(new r(E))}else{const E=[];for(const I of m.affectedKeys){const k=`config.${I}`,M=this._values.findSuperstr(k);M!==void 0&&(E.push(...N.Iterable.map(M,([P])=>P)),this._values.deleteSuperstr(k)),this._values.has(k)&&(E.push(k),this._values.delete(k))}v.fire(new r(E))}})}dispose(){this._listener.dispose()}getValue(_){if(_.indexOf(u._keyPrefix)!==0)return super.getValue(_);if(this._values.has(_))return this._values.get(_);const b=_.substr(u._keyPrefix.length),v=this._configurationService.getValue(b);let m;switch(typeof v){case"number":case"boolean":case"string":m=v;break;default:Array.isArray(v)?m=JSON.stringify(v):m=v}return this._values.set(_,m),m}setValue(_,b){return super.setValue(_,b)}removeValue(_){return super.removeValue(_)}}u._keyPrefix="config.";class d{constructor(_,b,v){this._service=_,this._key=b,this._defaultValue=v,this.reset()}set(_){this._service.setContext(this._key,_)}reset(){typeof this._defaultValue=="undefined"?this._service.removeContext(this._key):this._service.setContext(this._key,this._defaultValue)}get(){return this._service.getContextKeyValue(this._key)}}class a{constructor(_){this.key=_}affectsSome(_){return _.has(this.key)}}class r{constructor(_){this.keys=_}affectsSome(_){for(const b of this.keys)if(_.has(b))return!0;return!1}}class o{constructor(_){this.events=_}affectsSome(_){for(const b of this.events)if(b.affectsSome(_))return!0;return!1}}class i{constructor(_){this._onDidChangeContext=new w.PauseableEmitter({merge:b=>new o(b)}),this.onDidChangeContext=this._onDidChangeContext.event,this._isDisposed=!1,this._myContextId=_}createKey(_,b){if(this._isDisposed)throw new Error("AbstractContextKeyService has been disposed");return new d(this,_,b)}bufferChangeEvents(_){this._onDidChangeContext.pause();try{_()}finally{this._onDidChangeContext.resume()}}createScoped(_){if(this._isDisposed)throw new Error("AbstractContextKeyService has been disposed");return new h(this,_)}contextMatchesRules(_){if(this._isDisposed)throw new Error("AbstractContextKeyService has been disposed");const b=this.getContextValuesContainer(this._myContextId);return g.KeybindingResolver.contextMatchesRules(b,_)}getContextKeyValue(_){if(!this._isDisposed)return this.getContextValuesContainer(this._myContextId).getValue(_)}setContext(_,b){if(this._isDisposed)return;const v=this.getContextValuesContainer(this._myContextId);!v||v.setValue(_,b)&&this._onDidChangeContext.fire(new a(_))}removeContext(_){this._isDisposed||this.getContextValuesContainer(this._myContextId).removeValue(_)&&this._onDidChangeContext.fire(new a(_))}getContext(_){return this._isDisposed?c.INSTANCE:this.getContextValuesContainer(f(_))}}e.AbstractContextKeyService=i;let l=class extends i{constructor(_){super(0);this._contexts=new Map,this._toDispose=new T.DisposableStore,this._lastContextId=0;const b=new u(this._myContextId,_,this._onDidChangeContext);this._contexts.set(this._myContextId,b),this._toDispose.add(b)}dispose(){this._onDidChangeContext.dispose(),this._isDisposed=!0,this._toDispose.dispose()}getContextValuesContainer(_){return this._isDisposed?c.INSTANCE:this._contexts.get(_)||c.INSTANCE}createChildContext(_=this._myContextId){if(this._isDisposed)throw new Error("ContextKeyService has been disposed");let b=++this._lastContextId;return this._contexts.set(b,new s(b,this.getContextValuesContainer(_))),b}disposeContext(_){this._isDisposed||this._contexts.delete(_)}};l=Fe([Ce(0,C.IConfigurationService)],l),e.ContextKeyService=l;class h extends i{constructor(_,b){super(_.createChildContext());if(this._parentChangeListener=new T.MutableDisposable,this._parent=_,this._updateParentChangeListener(),this._domNode=b,this._domNode.hasAttribute(t)){let v="";this._domNode.classList&&(v=Array.from(this._domNode.classList.values()).join(", ")),console.error(`Element already has context attribute${v?": "+v:""}`)}this._domNode.setAttribute(t,String(this._myContextId))}_updateParentChangeListener(){this._parentChangeListener.value=this._parent.onDidChangeContext(this._onDidChangeContext.fire,this._onDidChangeContext)}dispose(){this._isDisposed||(this._onDidChangeContext.dispose(),this._parent.disposeContext(this._myContextId),this._parentChangeListener.dispose(),this._domNode.removeAttribute(t),this._isDisposed=!0)}getContextValuesContainer(_){return this._isDisposed?c.INSTANCE:this._parent.getContextValuesContainer(_)}createChildContext(_=this._myContextId){if(this._isDisposed)throw new Error("ScopedContextKeyService has been disposed");return this._parent.createChildContext(_)}disposeContext(_){this._isDisposed||this._parent.disposeContext(_)}}function f(y){for(;y;){if(y.hasAttribute(t)){const _=y.getAttribute(t);return _?parseInt(_,10):NaN}y=y.parentElement}return 0}p.CommandsRegistry.registerCommand(n.SET_CONTEXT_COMMAND_ID,function(y,_,b){y.get(n.IContextKeyService).createKey(String(_),b)}),p.CommandsRegistry.registerCommand({id:"getContextKeyInfo",handler(){return[...n.RawContextKey.all()].sort((y,_)=>y.key.localeCompare(_.key))},description:{description:(0,S.localize)(0,null),args:[]}}),p.CommandsRegistry.registerCommand("_generateContextKeyInfo",function(){const y=[],_=new Set;for(let b of n.RawContextKey.all())_.has(b.key)||(_.add(b.key),y.push(b));y.sort((b,v)=>b.key.localeCompare(v.key)),console.log(JSON.stringify(y,void 0,2))})}),define(J[80],ee([0,1,93,17,26,33]),function(j,e,w,N,T,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Extensions=e.KeybindingsRegistry=void 0;class S{constructor(){this._coreKeybindings=[],this._extensionKeybindings=[],this._cachedMergedKeybindings=null}static bindToCurrentPlatform(n){if(N.OS===1){if(n&&n.win)return n.win}else if(N.OS===2){if(n&&n.mac)return n.mac}else if(n&&n.linux)return n.linux;return n}registerKeybindingRule(n){const g=S.bindToCurrentPlatform(n);if(g&&g.primary){const t=(0,w.createKeybinding)(g.primary,N.OS);t&&this._registerDefaultKeybinding(t,n.id,n.args,n.weight,0,n.when)}if(g&&Array.isArray(g.secondary))for(let t=0,s=g.secondary.length;t<s;t++){const c=g.secondary[t],u=(0,w.createKeybinding)(c,N.OS);u&&this._registerDefaultKeybinding(u,n.id,n.args,n.weight,-t-1,n.when)}}registerCommandAndKeybindingRule(n){this.registerKeybindingRule(n),T.CommandsRegistry.registerCommand(n)}static _mightProduceChar(n){return n>=21&&n<=30||n>=31&&n<=56?!0:n===80||n===81||n===82||n===83||n===84||n===85||n===86||n===110||n===111||n===87||n===88||n===89||n===90||n===91||n===92}_assertNoCtrlAlt(n,g){n.ctrlKey&&n.altKey&&!n.metaKey&&S._mightProduceChar(n.keyCode)&&console.warn("Ctrl+Alt+ keybindings should not be used by default under Windows. Offender: ",n," for ",g)}_registerDefaultKeybinding(n,g,t,s,c,u){N.OS===1&&this._assertNoCtrlAlt(n.parts[0],g),this._coreKeybindings.push({keybinding:n.parts,command:g,commandArgs:t,when:u,weight1:s,weight2:c,extensionId:null,isBuiltinExtension:!1}),this._cachedMergedKeybindings=null}getDefaultKeybindings(){return this._cachedMergedKeybindings||(this._cachedMergedKeybindings=[].concat(this._coreKeybindings).concat(this._extensionKeybindings),this._cachedMergedKeybindings.sort(p)),this._cachedMergedKeybindings.slice(0)}}e.KeybindingsRegistry=new S,e.Extensions={EditorModes:"platform.keybindingsRegistry"},D.Registry.add(e.Extensions.EditorModes,e.KeybindingsRegistry);function p(C,n){return C.weight1!==n.weight1?C.weight1-n.weight1:C.command<n.command?-1:C.command>n.command?1:C.weight2-n.weight2}}),define(J[102],ee([0,1,19,2,33]),function(j,e,w,N,T){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.QuickAccessRegistry=e.Extensions=e.DefaultQuickAccessFilterValue=void 0;var D;(function(p){p[p.PRESERVE=0]="PRESERVE",p[p.LAST=1]="LAST"})(D=e.DefaultQuickAccessFilterValue||(e.DefaultQuickAccessFilterValue={})),e.Extensions={Quickaccess:"workbench.contributions.quickaccess"};class S{constructor(){this.providers=[],this.defaultProvider=void 0}registerQuickAccessProvider(C){return C.prefix.length===0?this.defaultProvider=C:this.providers.push(C),this.providers.sort((n,g)=>g.prefix.length-n.prefix.length),(0,N.toDisposable)(()=>{this.providers.splice(this.providers.indexOf(C),1),this.defaultProvider===C&&(this.defaultProvider=void 0)})}getQuickAccessProviders(){return(0,w.coalesce)([this.defaultProvider,...this.providers])}getQuickAccessProvider(C){return C&&this.providers.find(g=>C.startsWith(g.prefix))||void 0||this.defaultProvider}}e.QuickAccessRegistry=S,T.Registry.add(e.Extensions.Quickaccess,new S)}),define(J[592],ee([0,1,2,552,102,79,33]),function(j,e,w,N,T,D,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.HelpQuickAccessProvider=void 0;let p=class Nt{constructor(n){this.quickInputService=n,this.registry=S.Registry.as(T.Extensions.Quickaccess)}provide(n){const g=new w.DisposableStore;g.add(n.onDidAccept(()=>{const[c]=n.selectedItems;c&&this.quickInputService.quickAccess.show(c.prefix,{preserveValue:!0})})),g.add(n.onDidChangeValue(c=>{const u=this.registry.getQuickAccessProvider(c.substr(Nt.PREFIX.length));u&&u.prefix&&u.prefix!==Nt.PREFIX&&this.quickInputService.quickAccess.show(u.prefix,{preserveValue:!0})}));const{editorProviders:t,globalProviders:s}=this.getQuickAccessProviders();return n.items=t.length===0||s.length===0?[...t.length===0?s:t]:[{label:(0,N.localize)(0,null),type:"separator"},...s,{label:(0,N.localize)(1,null),type:"separator"},...t],g}getQuickAccessProviders(){const n=[],g=[];for(const t of this.registry.getQuickAccessProviders().sort((s,c)=>s.prefix.localeCompare(c.prefix)))if(t.prefix!==Nt.PREFIX)for(const s of t.helpEntries){const c=s.prefix||t.prefix,u=c||"\u2026";(s.needsEditor?g:n).push({prefix:c,label:u,ariaLabel:(0,N.localize)(2,null,u,s.description),description:s.description})}return{editorProviders:g,globalProviders:n}}};p.PREFIX="?",p=Fe([Ce(0,D.IQuickInputService)],p),e.HelpQuickAccessProvider=p}),define(J[593],ee([0,1,33,102,65,592]),function(j,e,w,N,T,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),w.Registry.as(N.Extensions.Quickaccess).registerQuickAccessProvider({ctor:D.HelpQuickAccessProvider,prefix:"",helpEntries:[{description:T.QuickHelpNLS.helpQuickAccessActionLabel,needsEditor:!0}]})}),define(J[594],ee([0,1,23,82,2,9,102,79,33]),function(j,e,w,N,T,D,S,p,C){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.QuickAccessController=void 0;let n=class extends T.Disposable{constructor(t,s){super();this.quickInputService=t,this.instantiationService=s,this.registry=C.Registry.as(S.Extensions.Quickaccess),this.mapProviderToDescriptor=new Map,this.lastAcceptedPickerValues=new Map,this.visibleQuickAccess=void 0}show(t="",s){this.doShowOrPick(t,!1,s)}doShowOrPick(t,s,c){var u;const[d,a]=this.getOrInstantiateProvider(t),r=this.visibleQuickAccess,o=r==null?void 0:r.descriptor;if(r&&a&&o===a){t!==a.prefix&&!(c==null?void 0:c.preserveValue)&&(r.picker.value=t),this.adjustValueSelection(r.picker,a,c);return}if(a&&!(c==null?void 0:c.preserveValue)){let _;if(r&&o&&o!==a){const b=r.value.substr(o.prefix.length);b&&(_=`${a.prefix}${b}`)}if(!_){const b=d==null?void 0:d.defaultFilterValue;b===S.DefaultQuickAccessFilterValue.LAST?_=this.lastAcceptedPickerValues.get(a):typeof b=="string"&&(_=`${a.prefix}${b}`)}typeof _=="string"&&(t=_)}const i=new T.DisposableStore,l=i.add(this.quickInputService.createQuickPick());l.value=t,this.adjustValueSelection(l,a,c),l.placeholder=a==null?void 0:a.placeholder,l.quickNavigate=c==null?void 0:c.quickNavigateConfiguration,l.hideInput=!!l.quickNavigate&&!r,(typeof(c==null?void 0:c.itemActivation)=="number"||(c==null?void 0:c.quickNavigateConfiguration))&&(l.itemActivation=(u=c==null?void 0:c.itemActivation)!==null&&u!==void 0?u:p.ItemActivation.SECOND),l.contextKey=a==null?void 0:a.contextKey,l.filterValue=_=>_.substring(a?a.prefix.length:0),(a==null?void 0:a.placeholder)&&(l.ariaLabel=a==null?void 0:a.placeholder);let h,f;s&&(h=new Promise(_=>f=_),i.add((0,N.once)(l.onWillAccept)(_=>{_.veto(),l.hide()}))),i.add(this.registerPickerListeners(l,d,a,t));const y=i.add(new w.CancellationTokenSource);if(d&&i.add(d.provide(l,y.token)),(0,N.once)(l.onDidHide)(()=>{l.selectedItems.length===0&&y.cancel(),i.dispose(),f==null||f(l.selectedItems)}),l.show(),s)return h}adjustValueSelection(t,s,c){var u;let d;(c==null?void 0:c.preserveValue)?d=[t.value.length,t.value.length]:d=[(u=s==null?void 0:s.prefix.length)!==null&&u!==void 0?u:0,t.value.length],t.valueSelection=d}registerPickerListeners(t,s,c,u){const d=new T.DisposableStore,a=this.visibleQuickAccess={picker:t,descriptor:c,value:u};return d.add((0,T.toDisposable)(()=>{a===this.visibleQuickAccess&&(this.visibleQuickAccess=void 0)})),d.add(t.onDidChangeValue(r=>{const[o]=this.getOrInstantiateProvider(r);o!==s?this.show(r,{preserveValue:!0}):a.value=r})),c&&d.add(t.onDidAccept(()=>{this.lastAcceptedPickerValues.set(c,t.value)})),d}getOrInstantiateProvider(t){const s=this.registry.getQuickAccessProvider(t);if(!s)return[void 0,void 0];let c=this.mapProviderToDescriptor.get(s);return c||(c=this.instantiationService.createInstance(s.ctor),this.mapProviderToDescriptor.set(s,c)),[c,s]}};n=Fe([Ce(0,p.IQuickInputService),Ce(1,D.IInstantiationService)],n),e.QuickAccessController=n}),define(J[73],ee([0,1,4,2,20,312,9]),function(j,e,w,N,T,D,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.InMemoryStorageService=e.AbstractStorageService=e.WillSaveStateReason=e.IStorageService=void 0;const p="__$__targetStorageMarker";e.IStorageService=(0,S.createDecorator)("storageService");var C;(function(t){t[t.NONE=0]="NONE",t[t.SHUTDOWN=1]="SHUTDOWN"})(C=e.WillSaveStateReason||(e.WillSaveStateReason={}));class n extends N.Disposable{constructor(s={flushInterval:n.DEFAULT_FLUSH_INTERVAL}){super();this.options=s,this._onDidChangeValue=this._register(new w.PauseableEmitter),this._onDidChangeTarget=this._register(new w.PauseableEmitter),this._onWillSaveState=this._register(new w.Emitter),this.onWillSaveState=this._onWillSaveState.event,this._workspaceKeyTargets=void 0,this._globalKeyTargets=void 0}emitDidChangeValue(s,c){c===p?(s===0?this._globalKeyTargets=void 0:s===1&&(this._workspaceKeyTargets=void 0),this._onDidChangeTarget.fire({scope:s})):this._onDidChangeValue.fire({scope:s,key:c,target:this.getKeyTargets(s)[c]})}get(s,c,u){var d;return(d=this.getStorage(c))===null||d===void 0?void 0:d.get(s,u)}getBoolean(s,c,u){var d;return(d=this.getStorage(c))===null||d===void 0?void 0:d.getBoolean(s,u)}getNumber(s,c,u){var d;return(d=this.getStorage(c))===null||d===void 0?void 0:d.getNumber(s,u)}store(s,c,u,d){if((0,T.isUndefinedOrNull)(c)){this.remove(s,u);return}this.withPausedEmitters(()=>{var a;this.updateKeyTarget(s,u,d),(a=this.getStorage(u))===null||a===void 0||a.set(s,c)})}remove(s,c){this.withPausedEmitters(()=>{var u;this.updateKeyTarget(s,c,void 0),(u=this.getStorage(c))===null||u===void 0||u.delete(s)})}withPausedEmitters(s){this._onDidChangeValue.pause(),this._onDidChangeTarget.pause();try{s()}finally{this._onDidChangeValue.resume(),this._onDidChangeTarget.resume()}}updateKeyTarget(s,c,u){var d,a;const r=this.getKeyTargets(c);typeof u=="number"?r[s]!==u&&(r[s]=u,(d=this.getStorage(c))===null||d===void 0||d.set(p,JSON.stringify(r))):typeof r[s]=="number"&&(delete r[s],(a=this.getStorage(c))===null||a===void 0||a.set(p,JSON.stringify(r)))}get workspaceKeyTargets(){return this._workspaceKeyTargets||(this._workspaceKeyTargets=this.loadKeyTargets(1)),this._workspaceKeyTargets}get globalKeyTargets(){return this._globalKeyTargets||(this._globalKeyTargets=this.loadKeyTargets(0)),this._globalKeyTargets}getKeyTargets(s){return s===0?this.globalKeyTargets:this.workspaceKeyTargets}loadKeyTargets(s){const c=this.get(p,s);if(c)try{return JSON.parse(c)}catch(u){}return Object.create(null)}}e.AbstractStorageService=n,n.DEFAULT_FLUSH_INTERVAL=60*1e3;class g extends n{constructor(){super();this.globalStorage=this._register(new D.Storage(new D.InMemoryStorageDatabase)),this.workspaceStorage=this._register(new D.Storage(new D.InMemoryStorageDatabase)),this._register(this.workspaceStorage.onDidChangeStorage(s=>this.emitDidChangeValue(1,s))),this._register(this.globalStorage.onDidChangeStorage(s=>this.emitDidChangeValue(0,s)))}getStorage(s){return s===0?this.globalStorage:this.workspaceStorage}}e.InMemoryStorageService=g}),define(J[595],ee([0,1,14,82,47,3,259,70,9,73]),function(j,e,w,N,T,D,S,p,C,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CodeLensCache=e.ICodeLensCache=void 0,e.ICodeLensCache=(0,C.createDecorator)("ICodeLensCache");class g{constructor(c,u){this.lineCount=c,this.data=u}}let t=class{constructor(c){this._fakeProvider=new class{provideCodeLenses(){throw new Error("not supported")}},this._cache=new T.LRUCache(20,.75);const u="codelens/cache";(0,w.runWhenIdle)(()=>c.remove(u,1));const d="codelens/cache2",a=c.get(d,1,"{}");this._deserialize(a),(0,N.once)(c.onWillSaveState)(r=>{r.reason===n.WillSaveStateReason.SHUTDOWN&&c.store(d,this._serialize(),1,1)})}put(c,u){const d=u.lenses.map(o=>{var i;return{range:o.symbol.range,command:o.symbol.command&&{id:"",title:(i=o.symbol.command)===null||i===void 0?void 0:i.title}}}),a=new S.CodeLensModel;a.add({lenses:d,dispose:()=>{}},this._fakeProvider);const r=new g(c.getLineCount(),a);this._cache.set(c.uri.toString(),r)}get(c){const u=this._cache.get(c.uri.toString());return u&&u.lineCount===c.getLineCount()?u.data:void 0}delete(c){this._cache.delete(c.uri.toString())}_serialize(){const c=Object.create(null);for(const[u,d]of this._cache){const a=new Set;for(const r of d.data.lenses)a.add(r.symbol.range.startLineNumber);c[u]={lineCount:d.lineCount,lines:[...a.values()]}}return JSON.stringify(c)}_deserialize(c){try{const u=JSON.parse(c);for(const d in u){const a=u[d],r=[];for(const i of a.lines)r.push({range:new D.Range(i,1,i,11)});const o=new S.CodeLensModel;o.add({lenses:r,dispose(){}},this._fakeProvider),this._cache.set(d,new g(a.lineCount,o))}}catch(u){}}};t=Fe([Ce(0,n.IStorageService)],t),e.CodeLensCache=t,(0,p.registerSingleton)(e.ICodeLensCache,t)}),define(J[596],ee([0,1,14,2,47,18,41,70,9,73]),function(j,e,w,N,T,D,S,p,C,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ISuggestMemoryService=e.SuggestMemoryService=e.PrefixMemory=e.LRUMemory=e.NoMemory=e.Memory=void 0;class g{constructor(a){this.name=a}select(a,r,o){if(o.length===0)return 0;let i=o[0].score[0];for(let l=0;l<o.length;l++){const{score:h,completion:f}=o[l];if(h[0]!==i)break;if(f.preselect)return l}return 0}}e.Memory=g;class t extends g{constructor(){super("first")}memorize(a,r,o){}toJSON(){}fromJSON(){}}e.NoMemory=t;class s extends g{constructor(){super("recentlyUsed");this._cache=new T.LRUCache(300,.66),this._seq=0}memorize(a,r,o){const i=`${a.getLanguageId()}/${o.textLabel}`;this._cache.set(i,{touch:this._seq++,type:o.completion.kind,insertText:o.completion.insertText})}select(a,r,o){if(o.length===0)return 0;const i=a.getLineContent(r.lineNumber).substr(r.column-10,r.column-1);if(/\s$/.test(i))return super.select(a,r,o);let l=o[0].score[0],h=-1,f=-1,y=-1;for(let _=0;_<o.length&&o[_].score[0]===l;_++){const b=`${a.getLanguageId()}/${o[_].textLabel}`,v=this._cache.peek(b);if(v&&v.touch>y&&v.type===o[_].completion.kind&&v.insertText===o[_].completion.insertText&&(y=v.touch,f=_),o[_].completion.preselect&&h===-1)return h=_}return f!==-1?f:h!==-1?h:0}toJSON(){return this._cache.toJSON()}fromJSON(a){this._cache.clear();let r=0;for(const[o,i]of a)i.touch=r,i.type=typeof i.type=="number"?i.type:(0,D.completionKindFromString)(i.type),this._cache.set(o,i);this._seq=this._cache.size}}e.LRUMemory=s;class c extends g{constructor(){super("recentlyUsedByPrefix");this._trie=T.TernarySearchTree.forStrings(),this._seq=0}memorize(a,r,o){const{word:i}=a.getWordUntilPosition(r),l=`${a.getLanguageId()}/${i}`;this._trie.set(l,{type:o.completion.kind,insertText:o.completion.insertText,touch:this._seq++})}select(a,r,o){let{word:i}=a.getWordUntilPosition(r);if(!i)return super.select(a,r,o);let l=`${a.getLanguageId()}/${i}`,h=this._trie.get(l);if(h||(h=this._trie.findSubstr(l)),h)for(let f=0;f<o.length;f++){let{kind:y,insertText:_}=o[f].completion;if(y===h.type&&_===h.insertText)return f}return super.select(a,r,o)}toJSON(){let a=[];return this._trie.forEach((r,o)=>a.push([o,r])),a.sort((r,o)=>-(r[1].touch-o[1].touch)).forEach((r,o)=>r[1].touch=o),a.slice(0,200)}fromJSON(a){if(this._trie.clear(),a.length>0){this._seq=a[0][1].touch+1;for(const[r,o]of a)o.type=typeof o.type=="number"?o.type:(0,D.completionKindFromString)(o.type),this._trie.set(r,o)}}}e.PrefixMemory=c;let u=class Tt{constructor(a,r){this._storageService=a,this._configService=r,this._disposables=new N.DisposableStore,this._persistSoon=new w.RunOnceScheduler(()=>this._saveState(),500),this._disposables.add(a.onWillSaveState(o=>{o.reason===n.WillSaveStateReason.SHUTDOWN&&this._saveState()}))}dispose(){this._disposables.dispose(),this._persistSoon.dispose()}memorize(a,r,o){this._withStrategy(a,r).memorize(a,r,o),this._persistSoon.schedule()}select(a,r,o){return this._withStrategy(a,r).select(a,r,o)}_withStrategy(a,r){var o;const i=this._configService.getValue("editor.suggestSelection",{overrideIdentifier:a.getLanguageIdAtPosition(r.lineNumber,r.column),resource:a.uri});if(((o=this._strategy)===null||o===void 0?void 0:o.name)!==i){this._saveState();const l=Tt._strategyCtors.get(i)||t;this._strategy=new l;try{const f=this._configService.getValue("editor.suggest.shareSuggestSelections")?0:1,y=this._storageService.get(`${Tt._storagePrefix}/${i}`,f);y&&this._strategy.fromJSON(JSON.parse(y))}catch(h){}}return this._strategy}_saveState(){if(this._strategy){const r=this._configService.getValue("editor.suggest.shareSuggestSelections")?0:1,o=JSON.stringify(this._strategy);this._storageService.store(`${Tt._storagePrefix}/${this._strategy.name}`,o,r,1)}}};u._strategyCtors=new Map([["recentlyUsedByPrefix",c],["recentlyUsed",s],["first",t]]),u._storagePrefix="suggest/memories",u=Fe([Ce(0,n.IStorageService),Ce(1,S.IConfigurationService)],u),e.SuggestMemoryService=u,e.ISuggestMemoryService=(0,C.createDecorator)("ISuggestMemories"),(0,p.registerSingleton)(e.ISuggestMemoryService,u,!0)}),define(J[90],ee([0,1,9]),function(j,e,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ITelemetryService=void 0,e.ITelemetryService=(0,w.createDecorator)("telemetryService")}),define(J[597],ee([0,1,457,11,68,2,47,76,20,551,26,41,124,9,40,579,73,90]),function(j,e,w,N,T,D,S,p,C,n,g,t,s,c,u,d,a,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CommandsHistory=e.AbstractCommandsQuickAccessProvider=void 0;let o=class Mt extends d.PickerQuickAccessProvider{constructor(h,f,y,_,b,v){super(Mt.PREFIX,h);this.instantiationService=f,this.keybindingService=y,this.commandService=_,this.telemetryService=b,this.dialogService=v,this.commandsHistory=this._register(this.instantiationService.createInstance(i)),this.options=h}_getPicks(h,f,y){return Re(this,void 0,void 0,function*(){const _=yield this.getCommandPicks(f,y);if(y.isCancellationRequested)return[];const b=[];for(const I of _){const k=(0,C.withNullAsUndefined)(Mt.WORD_FILTER(h,I.label)),M=I.commandAlias?(0,C.withNullAsUndefined)(Mt.WORD_FILTER(h,I.commandAlias)):void 0;k||M?(I.highlights={label:k,detail:this.options.showAlias?M:void 0},b.push(I)):h===I.commandId&&b.push(I)}const v=new Map;for(const I of b){const k=v.get(I.label);k?(I.description=I.commandId,k.description=k.commandId):v.set(I.label,I)}b.sort((I,k)=>{const M=this.commandsHistory.peek(I.commandId),P=this.commandsHistory.peek(k.commandId);return M&&P?M>P?-1:1:M?-1:P?1:I.label.localeCompare(k.label)});const m=[];let E=!1;for(let I=0;I<b.length;I++){const k=b[I],M=this.keybindingService.lookupKeybinding(k.commandId),P=M?(0,n.localize)(0,null,k.label,M.getAriaLabel()):k.label;I===0&&this.commandsHistory.peek(k.commandId)&&(m.push({type:"separator",label:(0,n.localize)(1,null)}),E=!0),I!==0&&E&&!this.commandsHistory.peek(k.commandId)&&(m.push({type:"separator",label:(0,n.localize)(2,null)}),E=!1),m.push(Object.assign(Object.assign({},k),{ariaLabel:P,detail:this.options.showAlias&&k.commandAlias!==k.label?k.commandAlias:void 0,keybinding:M,accept:()=>Re(this,void 0,void 0,function*(){this.commandsHistory.push(k.commandId),this.telemetryService.publicLog2("workbenchActionExecuted",{id:k.commandId,from:"quick open"});try{yield this.commandService.executeCommand(k.commandId)}catch(F){(0,N.isPromiseCanceledError)(F)||this.dialogService.show(p.default.Error,(0,n.localize)(3,null,k.label,(0,w.toErrorMessage)(F)))}})}))}return m})}};o.PREFIX=">",o.WORD_FILTER=(0,T.or)(T.matchesPrefix,T.matchesWords,T.matchesContiguousSubString),o=Fe([Ce(1,c.IInstantiationService),Ce(2,u.IKeybindingService),Ce(3,g.ICommandService),Ce(4,r.ITelemetryService),Ce(5,s.IDialogService)],o),e.AbstractCommandsQuickAccessProvider=o;let i=class tt extends D.Disposable{constructor(h,f){super();this.storageService=h,this.configurationService=f,this.configuredCommandsHistoryLength=0,this.updateConfiguration(),this.load(),this.registerListeners()}registerListeners(){this._register(this.configurationService.onDidChangeConfiguration(()=>this.updateConfiguration()))}updateConfiguration(){this.configuredCommandsHistoryLength=tt.getConfiguredCommandHistoryLength(this.configurationService),tt.cache&&tt.cache.limit!==this.configuredCommandsHistoryLength&&(tt.cache.limit=this.configuredCommandsHistoryLength,tt.saveState(this.storageService))}load(){const h=this.storageService.get(tt.PREF_KEY_CACHE,0);let f;if(h)try{f=JSON.parse(h)}catch(_){}const y=tt.cache=new S.LRUCache(this.configuredCommandsHistoryLength,1);if(f){let _;f.usesLRU?_=f.entries:_=f.entries.sort((b,v)=>b.value-v.value),_.forEach(b=>y.set(b.key,b.value))}tt.counter=this.storageService.getNumber(tt.PREF_KEY_COUNTER,0,tt.counter)}push(h){!tt.cache||(tt.cache.set(h,tt.counter++),tt.saveState(this.storageService))}peek(h){var f;return(f=tt.cache)===null||f===void 0?void 0:f.peek(h)}static saveState(h){if(!tt.cache)return;const f={usesLRU:!0,entries:[]};tt.cache.forEach((y,_)=>f.entries.push({key:_,value:y})),h.store(tt.PREF_KEY_CACHE,JSON.stringify(f),0,0),h.store(tt.PREF_KEY_COUNTER,tt.counter,0,0)}static getConfiguredCommandHistoryLength(h){var f,y;const b=(y=(f=h.getValue().workbench)===null||f===void 0?void 0:f.commandPalette)===null||y===void 0?void 0:y.history;return typeof b=="number"?b:tt.DEFAULT_COMMANDS_HISTORY_LENGTH}};i.DEFAULT_COMMANDS_HISTORY_LENGTH=50,i.PREF_KEY_CACHE="commandPalette.mru.cache",i.PREF_KEY_COUNTER="commandPalette.mru.counter",i.counter=1,i=Fe([Ce(0,a.IStorageService),Ce(1,t.IConfigurationService)],i),e.CommandsHistory=i}),define(J[598],ee([0,1,107,597]),function(j,e,w,N){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AbstractEditorCommandsQuickAccessProvider=void 0;class T extends N.AbstractCommandsQuickAccessProvider{constructor(S,p,C,n,g,t){super(S,p,C,n,g,t)}getCodeEditorCommandPicks(){const S=this.activeTextEditorControl;if(!S)return[];const p=[];for(const C of S.getSupportedActions())p.push({commandId:C.id,commandAlias:C.alias,label:(0,w.stripIcons)(C.label)||C.id});return p}}e.AbstractEditorCommandsQuickAccessProvider=T}),define(J[21],ee([0,1,14,29,4,20,553,192,33]),function(j,e,w,N,T,D,S,p,C){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.workbenchColorsSchemaId=e.resolveColorValue=e.ifDefinedThenElse=e.oneOf=e.transparent=e.lighten=e.darken=e.executeTransform=e.problemsInfoIconForeground=e.problemsWarningIconForeground=e.problemsErrorIconForeground=e.minimapSliderActiveBackground=e.minimapSliderHoverBackground=e.minimapSliderBackground=e.minimapForegroundOpacity=e.minimapBackground=e.minimapWarning=e.minimapError=e.minimapSelection=e.minimapSelectionOccurrenceHighlight=e.minimapFindMatch=e.overviewRulerSelectionHighlightForeground=e.overviewRulerFindMatchForeground=e.snippetFinalTabstopHighlightBorder=e.snippetFinalTabstopHighlightBackground=e.snippetTabstopHighlightBorder=e.snippetTabstopHighlightBackground=e.toolbarHoverBackground=e.menuSeparatorBackground=e.menuSelectionBorder=e.menuSelectionBackground=e.menuSelectionForeground=e.menuBackground=e.menuForeground=e.menuBorder=e.quickInputListFocusBackground=e.quickInputListFocusIconForeground=e.quickInputListFocusForeground=e._deprecatedQuickInputListFocusBackground=e.tableColumnsBorder=e.treeIndentGuidesStroke=e.listFilterWidgetNoMatchesOutline=e.listFilterWidgetOutline=e.listFilterWidgetBackground=e.listFocusHighlightForeground=e.listHighlightForeground=e.listDropBackground=e.listHoverForeground=e.listHoverBackground=e.listInactiveFocusOutline=e.listInactiveFocusBackground=e.listInactiveSelectionIconForeground=e.listInactiveSelectionForeground=e.listInactiveSelectionBackground=e.listActiveSelectionIconForeground=e.listActiveSelectionForeground=e.listActiveSelectionBackground=e.listFocusOutline=e.listFocusForeground=e.listFocusBackground=e.diffDiagonalFill=e.diffBorder=e.diffRemovedOutline=e.diffInsertedOutline=e.diffRemoved=e.diffInserted=e.defaultRemoveColor=e.defaultInsertColor=e.editorLightBulbAutoFixForeground=e.editorLightBulbForeground=e.editorInlayHintParameterBackground=e.editorInlayHintParameterForeground=e.editorInlayHintTypeBackground=e.editorInlayHintTypeForeground=e.editorInlayHintBackground=e.editorInlayHintForeground=e.editorActiveLinkForeground=e.editorHoverStatusBarBackground=e.editorHoverBorder=e.editorHoverForeground=e.editorHoverBackground=e.editorHoverHighlight=e.editorFindRangeHighlightBorder=e.editorFindMatchHighlightBorder=e.editorFindMatchBorder=e.editorFindRangeHighlight=e.editorFindMatchHighlight=e.editorFindMatch=e.editorSelectionHighlightBorder=e.editorSelectionHighlight=e.editorInactiveSelection=e.editorSelectionForeground=e.editorSelectionBackground=e.keybindingLabelBottomBorder=e.keybindingLabelBorder=e.keybindingLabelForeground=e.keybindingLabelBackground=e.pickerGroupBorder=e.pickerGroupForeground=e.quickInputTitleBackground=e.quickInputForeground=e.quickInputBackground=e.editorWidgetResizeBorder=e.editorWidgetBorder=e.editorWidgetForeground=e.editorWidgetBackground=e.editorForeground=e.editorBackground=e.editorHintBorder=e.editorHintForeground=e.editorInfoBorder=e.editorInfoForeground=e.editorInfoBackground=e.editorWarningBorder=e.editorWarningForeground=e.editorWarningBackground=e.editorErrorBorder=e.editorErrorForeground=e.editorErrorBackground=e.progressBarBackground=e.scrollbarSliderActiveBackground=e.scrollbarSliderHoverBackground=e.scrollbarSliderBackground=e.scrollbarShadow=e.badgeForeground=e.badgeBackground=e.buttonHoverBackground=e.buttonBackground=e.buttonForeground=e.selectForeground=e.selectBackground=e.inputValidationErrorBorder=e.inputValidationErrorForeground=e.inputValidationErrorBackground=e.inputValidationWarningBorder=e.inputValidationWarningForeground=e.inputValidationWarningBackground=e.inputValidationInfoBorder=e.inputValidationInfoForeground=e.inputValidationInfoBackground=e.inputActiveOptionForeground=e.inputActiveOptionBackground=e.inputActiveOptionBorder=e.inputBorder=e.inputForeground=e.inputBackground=e.widgetShadow=e.textCodeBlockBackground=e.textLinkActiveForeground=e.textLinkForeground=e.activeContrastBorder=e.contrastBorder=e.focusBorder=e.iconForeground=e.errorForeground=e.foreground=e.registerColor=e.Extensions=void 0,e.Extensions={ColorContribution:"base.contributions.colors"};class n{constructor(){this._onDidChangeSchema=new T.Emitter,this.onDidChangeSchema=this._onDidChangeSchema.event,this.colorSchema={type:"object",properties:{}},this.colorReferenceSchema={type:"string",enum:[],enumDescriptions:[]},this.colorsById={}}registerColor(y,_,b,v=!1,m){let E={id:y,description:b,defaults:_,needsTransparency:v,deprecationMessage:m};this.colorsById[y]=E;let I={type:"string",description:b,format:"color-hex",defaultSnippets:[{body:"${1:#ff0000}"}]};return m&&(I.deprecationMessage=m),this.colorSchema.properties[y]=I,this.colorReferenceSchema.enum.push(y),this.colorReferenceSchema.enumDescriptions.push(b),this._onDidChangeSchema.fire(),y}resolveDefaultColor(y,_){const b=this.colorsById[y];if(b&&b.defaults){const v=b.defaults[_.type];return i(v,_)}}getColorSchema(){return this.colorSchema}toString(){let y=(_,b)=>{let v=_.indexOf(".")===-1?0:1,m=b.indexOf(".")===-1?0:1;return v!==m?v-m:_.localeCompare(b)};return Object.keys(this.colorsById).sort(y).map(_=>`- \`${_}\`: ${this.colorsById[_].description}`).join(`
`)}}const g=new n;C.Registry.add(e.Extensions.ColorContribution,g);function t(f,y,_,b,v){return g.registerColor(f,y,_,b,v)}e.registerColor=t,e.foreground=t("foreground",{dark:"#CCCCCC",light:"#616161",hc:"#FFFFFF"},S.localize(0,null)),e.errorForeground=t("errorForeground",{dark:"#F48771",light:"#A1260D",hc:"#F48771"},S.localize(1,null)),e.iconForeground=t("icon.foreground",{dark:"#C5C5C5",light:"#424242",hc:"#FFFFFF"},S.localize(2,null)),e.focusBorder=t("focusBorder",{dark:"#007FD4",light:"#0090F1",hc:"#F38518"},S.localize(3,null)),e.contrastBorder=t("contrastBorder",{light:null,dark:null,hc:"#6FC3DF"},S.localize(4,null)),e.activeContrastBorder=t("contrastActiveBorder",{light:null,dark:null,hc:e.focusBorder},S.localize(5,null)),e.textLinkForeground=t("textLink.foreground",{light:"#006AB1",dark:"#3794FF",hc:"#3794FF"},S.localize(6,null)),e.textLinkActiveForeground=t("textLink.activeForeground",{light:"#006AB1",dark:"#3794FF",hc:"#3794FF"},S.localize(7,null)),e.textCodeBlockBackground=t("textCodeBlock.background",{light:"#dcdcdc66",dark:"#0a0a0a66",hc:N.Color.black},S.localize(8,null)),e.widgetShadow=t("widget.shadow",{dark:d(N.Color.black,.36),light:d(N.Color.black,.16),hc:null},S.localize(9,null)),e.inputBackground=t("input.background",{dark:"#3C3C3C",light:N.Color.white,hc:N.Color.black},S.localize(10,null)),e.inputForeground=t("input.foreground",{dark:e.foreground,light:e.foreground,hc:e.foreground},S.localize(11,null)),e.inputBorder=t("input.border",{dark:null,light:null,hc:e.contrastBorder},S.localize(12,null)),e.inputActiveOptionBorder=t("inputOption.activeBorder",{dark:"#007ACC00",light:"#007ACC00",hc:e.contrastBorder},S.localize(13,null)),e.inputActiveOptionBackground=t("inputOption.activeBackground",{dark:d(e.focusBorder,.4),light:d(e.focusBorder,.2),hc:N.Color.transparent},S.localize(14,null)),e.inputActiveOptionForeground=t("inputOption.activeForeground",{dark:N.Color.white,light:N.Color.black,hc:null},S.localize(15,null)),e.inputValidationInfoBackground=t("inputValidation.infoBackground",{dark:"#063B49",light:"#D6ECF2",hc:N.Color.black},S.localize(16,null)),e.inputValidationInfoForeground=t("inputValidation.infoForeground",{dark:null,light:null,hc:null},S.localize(17,null)),e.inputValidationInfoBorder=t("inputValidation.infoBorder",{dark:"#007acc",light:"#007acc",hc:e.contrastBorder},S.localize(18,null)),e.inputValidationWarningBackground=t("inputValidation.warningBackground",{dark:"#352A05",light:"#F6F5D2",hc:N.Color.black},S.localize(19,null)),e.inputValidationWarningForeground=t("inputValidation.warningForeground",{dark:null,light:null,hc:null},S.localize(20,null)),e.inputValidationWarningBorder=t("inputValidation.warningBorder",{dark:"#B89500",light:"#B89500",hc:e.contrastBorder},S.localize(21,null)),e.inputValidationErrorBackground=t("inputValidation.errorBackground",{dark:"#5A1D1D",light:"#F2DEDE",hc:N.Color.black},S.localize(22,null)),e.inputValidationErrorForeground=t("inputValidation.errorForeground",{dark:null,light:null,hc:null},S.localize(23,null)),e.inputValidationErrorBorder=t("inputValidation.errorBorder",{dark:"#BE1100",light:"#BE1100",hc:e.contrastBorder},S.localize(24,null)),e.selectBackground=t("dropdown.background",{dark:"#3C3C3C",light:N.Color.white,hc:N.Color.black},S.localize(25,null)),e.selectForeground=t("dropdown.foreground",{dark:"#F0F0F0",light:null,hc:N.Color.white},S.localize(26,null)),e.buttonForeground=t("button.foreground",{dark:N.Color.white,light:N.Color.white,hc:N.Color.white},S.localize(27,null)),e.buttonBackground=t("button.background",{dark:"#0E639C",light:"#007ACC",hc:null},S.localize(28,null)),e.buttonHoverBackground=t("button.hoverBackground",{dark:u(e.buttonBackground,.2),light:c(e.buttonBackground,.2),hc:null},S.localize(29,null)),e.badgeBackground=t("badge.background",{dark:"#4D4D4D",light:"#C4C4C4",hc:N.Color.black},S.localize(30,null)),e.badgeForeground=t("badge.foreground",{dark:N.Color.white,light:"#333",hc:N.Color.white},S.localize(31,null)),e.scrollbarShadow=t("scrollbar.shadow",{dark:"#000000",light:"#DDDDDD",hc:null},S.localize(32,null)),e.scrollbarSliderBackground=t("scrollbarSlider.background",{dark:N.Color.fromHex("#797979").transparent(.4),light:N.Color.fromHex("#646464").transparent(.4),hc:d(e.contrastBorder,.6)},S.localize(33,null)),e.scrollbarSliderHoverBackground=t("scrollbarSlider.hoverBackground",{dark:N.Color.fromHex("#646464").transparent(.7),light:N.Color.fromHex("#646464").transparent(.7),hc:d(e.contrastBorder,.8)},S.localize(34,null)),e.scrollbarSliderActiveBackground=t("scrollbarSlider.activeBackground",{dark:N.Color.fromHex("#BFBFBF").transparent(.4),light:N.Color.fromHex("#000000").transparent(.6),hc:e.contrastBorder},S.localize(35,null)),e.progressBarBackground=t("progressBar.background",{dark:N.Color.fromHex("#0E70C0"),light:N.Color.fromHex("#0E70C0"),hc:e.contrastBorder},S.localize(36,null)),e.editorErrorBackground=t("editorError.background",{dark:null,light:null,hc:null},S.localize(37,null),!0),e.editorErrorForeground=t("editorError.foreground",{dark:"#F14C4C",light:"#E51400",hc:null},S.localize(38,null)),e.editorErrorBorder=t("editorError.border",{dark:null,light:null,hc:N.Color.fromHex("#E47777").transparent(.8)},S.localize(39,null)),e.editorWarningBackground=t("editorWarning.background",{dark:null,light:null,hc:null},S.localize(40,null),!0),e.editorWarningForeground=t("editorWarning.foreground",{dark:"#CCA700",light:"#BF8803",hc:null},S.localize(41,null)),e.editorWarningBorder=t("editorWarning.border",{dark:null,light:null,hc:N.Color.fromHex("#FFCC00").transparent(.8)},S.localize(42,null)),e.editorInfoBackground=t("editorInfo.background",{dark:null,light:null,hc:null},S.localize(43,null),!0),e.editorInfoForeground=t("editorInfo.foreground",{dark:"#3794FF",light:"#1a85ff",hc:"#3794FF"},S.localize(44,null)),e.editorInfoBorder=t("editorInfo.border",{dark:null,light:null,hc:N.Color.fromHex("#3794FF").transparent(.8)},S.localize(45,null)),e.editorHintForeground=t("editorHint.foreground",{dark:N.Color.fromHex("#eeeeee").transparent(.7),light:"#6c6c6c",hc:null},S.localize(46,null)),e.editorHintBorder=t("editorHint.border",{dark:null,light:null,hc:N.Color.fromHex("#eeeeee").transparent(.8)},S.localize(47,null)),e.editorBackground=t("editor.background",{light:"#fffffe",dark:"#1E1E1E",hc:N.Color.black},S.localize(48,null)),e.editorForeground=t("editor.foreground",{light:"#333333",dark:"#BBBBBB",hc:N.Color.white},S.localize(49,null)),e.editorWidgetBackground=t("editorWidget.background",{dark:"#252526",light:"#F3F3F3",hc:"#0C141F"},S.localize(50,null)),e.editorWidgetForeground=t("editorWidget.foreground",{dark:e.foreground,light:e.foreground,hc:e.foreground},S.localize(51,null)),e.editorWidgetBorder=t("editorWidget.border",{dark:"#454545",light:"#C8C8C8",hc:e.contrastBorder},S.localize(52,null)),e.editorWidgetResizeBorder=t("editorWidget.resizeBorder",{light:null,dark:null,hc:null},S.localize(53,null)),e.quickInputBackground=t("quickInput.background",{dark:e.editorWidgetBackground,light:e.editorWidgetBackground,hc:e.editorWidgetBackground},S.localize(54,null)),e.quickInputForeground=t("quickInput.foreground",{dark:e.editorWidgetForeground,light:e.editorWidgetForeground,hc:e.editorWidgetForeground},S.localize(55,null)),e.quickInputTitleBackground=t("quickInputTitle.background",{dark:new N.Color(new N.RGBA(255,255,255,.105)),light:new N.Color(new N.RGBA(0,0,0,.06)),hc:"#000000"},S.localize(56,null)),e.pickerGroupForeground=t("pickerGroup.foreground",{dark:"#3794FF",light:"#0066BF",hc:N.Color.white},S.localize(57,null)),e.pickerGroupBorder=t("pickerGroup.border",{dark:"#3F3F46",light:"#CCCEDB",hc:N.Color.white},S.localize(58,null)),e.keybindingLabelBackground=t("keybindingLabel.background",{dark:new N.Color(new N.RGBA(128,128,128,.17)),light:new N.Color(new N.RGBA(221,221,221,.4)),hc:N.Color.transparent},S.localize(59,null)),e.keybindingLabelForeground=t("keybindingLabel.foreground",{dark:N.Color.fromHex("#CCCCCC"),light:N.Color.fromHex("#555555"),hc:N.Color.white},S.localize(60,null)),e.keybindingLabelBorder=t("keybindingLabel.border",{dark:new N.Color(new N.RGBA(51,51,51,.6)),light:new N.Color(new N.RGBA(204,204,204,.4)),hc:new N.Color(new N.RGBA(111,195,223))},S.localize(61,null)),e.keybindingLabelBottomBorder=t("keybindingLabel.bottomBorder",{dark:new N.Color(new N.RGBA(68,68,68,.6)),light:new N.Color(new N.RGBA(187,187,187,.4)),hc:new N.Color(new N.RGBA(111,195,223))},S.localize(62,null)),e.editorSelectionBackground=t("editor.selectionBackground",{light:"#ADD6FF",dark:"#264F78",hc:"#f3f518"},S.localize(63,null)),e.editorSelectionForeground=t("editor.selectionForeground",{light:null,dark:null,hc:"#000000"},S.localize(64,null)),e.editorInactiveSelection=t("editor.inactiveSelectionBackground",{light:d(e.editorSelectionBackground,.5),dark:d(e.editorSelectionBackground,.5),hc:d(e.editorSelectionBackground,.5)},S.localize(65,null),!0),e.editorSelectionHighlight=t("editor.selectionHighlightBackground",{light:o(e.editorSelectionBackground,e.editorBackground,.3,.6),dark:o(e.editorSelectionBackground,e.editorBackground,.3,.6),hc:null},S.localize(66,null),!0),e.editorSelectionHighlightBorder=t("editor.selectionHighlightBorder",{light:null,dark:null,hc:e.activeContrastBorder},S.localize(67,null)),e.editorFindMatch=t("editor.findMatchBackground",{light:"#A8AC94",dark:"#515C6A",hc:null},S.localize(68,null)),e.editorFindMatchHighlight=t("editor.findMatchHighlightBackground",{light:"#EA5C0055",dark:"#EA5C0055",hc:null},S.localize(69,null),!0),e.editorFindRangeHighlight=t("editor.findRangeHighlightBackground",{dark:"#3a3d4166",light:"#b4b4b44d",hc:null},S.localize(70,null),!0),e.editorFindMatchBorder=t("editor.findMatchBorder",{light:null,dark:null,hc:e.activeContrastBorder},S.localize(71,null)),e.editorFindMatchHighlightBorder=t("editor.findMatchHighlightBorder",{light:null,dark:null,hc:e.activeContrastBorder},S.localize(72,null)),e.editorFindRangeHighlightBorder=t("editor.findRangeHighlightBorder",{dark:null,light:null,hc:d(e.activeContrastBorder,.4)},S.localize(73,null),!0),e.editorHoverHighlight=t("editor.hoverHighlightBackground",{light:"#ADD6FF26",dark:"#264f7840",hc:"#ADD6FF26"},S.localize(74,null),!0),e.editorHoverBackground=t("editorHoverWidget.background",{light:e.editorWidgetBackground,dark:e.editorWidgetBackground,hc:e.editorWidgetBackground},S.localize(75,null)),e.editorHoverForeground=t("editorHoverWidget.foreground",{light:e.editorWidgetForeground,dark:e.editorWidgetForeground,hc:e.editorWidgetForeground},S.localize(76,null)),e.editorHoverBorder=t("editorHoverWidget.border",{light:e.editorWidgetBorder,dark:e.editorWidgetBorder,hc:e.editorWidgetBorder},S.localize(77,null)),e.editorHoverStatusBarBackground=t("editorHoverWidget.statusBarBackground",{dark:u(e.editorHoverBackground,.2),light:c(e.editorHoverBackground,.05),hc:e.editorWidgetBackground},S.localize(78,null)),e.editorActiveLinkForeground=t("editorLink.activeForeground",{dark:"#4E94CE",light:N.Color.blue,hc:N.Color.cyan},S.localize(79,null)),e.editorInlayHintForeground=t("editorInlayHint.foreground",{dark:d(e.badgeForeground,.8),light:d(e.badgeForeground,.8),hc:e.badgeForeground},S.localize(80,null)),e.editorInlayHintBackground=t("editorInlayHint.background",{dark:d(e.badgeBackground,.6),light:d(e.badgeBackground,.3),hc:e.badgeBackground},S.localize(81,null)),e.editorInlayHintTypeForeground=t("editorInlayHint.typeForeground",{dark:e.editorInlayHintForeground,light:e.editorInlayHintForeground,hc:e.editorInlayHintForeground},S.localize(82,null)),e.editorInlayHintTypeBackground=t("editorInlayHint.typeBackground",{dark:e.editorInlayHintBackground,light:e.editorInlayHintBackground,hc:e.editorInlayHintBackground},S.localize(83,null)),e.editorInlayHintParameterForeground=t("editorInlayHint.parameterForeground",{dark:e.editorInlayHintForeground,light:e.editorInlayHintForeground,hc:e.editorInlayHintForeground},S.localize(84,null)),e.editorInlayHintParameterBackground=t("editorInlayHint.parameterBackground",{dark:e.editorInlayHintBackground,light:e.editorInlayHintBackground,hc:e.editorInlayHintBackground},S.localize(85,null)),e.editorLightBulbForeground=t("editorLightBulb.foreground",{dark:"#FFCC00",light:"#DDB100",hc:"#FFCC00"},S.localize(86,null)),e.editorLightBulbAutoFixForeground=t("editorLightBulbAutoFix.foreground",{dark:"#75BEFF",light:"#007ACC",hc:"#75BEFF"},S.localize(87,null)),e.defaultInsertColor=new N.Color(new N.RGBA(155,185,85,.2)),e.defaultRemoveColor=new N.Color(new N.RGBA(255,0,0,.2)),e.diffInserted=t("diffEditor.insertedTextBackground",{dark:e.defaultInsertColor,light:e.defaultInsertColor,hc:null},S.localize(88,null),!0),e.diffRemoved=t("diffEditor.removedTextBackground",{dark:e.defaultRemoveColor,light:e.defaultRemoveColor,hc:null},S.localize(89,null),!0),e.diffInsertedOutline=t("diffEditor.insertedTextBorder",{dark:null,light:null,hc:"#33ff2eff"},S.localize(90,null)),e.diffRemovedOutline=t("diffEditor.removedTextBorder",{dark:null,light:null,hc:"#FF008F"},S.localize(91,null)),e.diffBorder=t("diffEditor.border",{dark:null,light:null,hc:e.contrastBorder},S.localize(92,null)),e.diffDiagonalFill=t("diffEditor.diagonalFill",{dark:"#cccccc33",light:"#22222233",hc:null},S.localize(93,null)),e.listFocusBackground=t("list.focusBackground",{dark:null,light:null,hc:null},S.localize(94,null)),e.listFocusForeground=t("list.focusForeground",{dark:null,light:null,hc:null},S.localize(95,null)),e.listFocusOutline=t("list.focusOutline",{dark:e.focusBorder,light:e.focusBorder,hc:e.activeContrastBorder},S.localize(96,null)),e.listActiveSelectionBackground=t("list.activeSelectionBackground",{dark:"#094771",light:"#0060C0",hc:null},S.localize(97,null)),e.listActiveSelectionForeground=t("list.activeSelectionForeground",{dark:N.Color.white,light:N.Color.white,hc:null},S.localize(98,null)),e.listActiveSelectionIconForeground=t("list.activeSelectionIconForeground",{dark:null,light:null,hc:null},S.localize(99,null)),e.listInactiveSelectionBackground=t("list.inactiveSelectionBackground",{dark:"#37373D",light:"#E4E6F1",hc:null},S.localize(100,null)),e.listInactiveSelectionForeground=t("list.inactiveSelectionForeground",{dark:null,light:null,hc:null},S.localize(101,null)),e.listInactiveSelectionIconForeground=t("list.inactiveSelectionIconForeground",{dark:null,light:null,hc:null},S.localize(102,null)),e.listInactiveFocusBackground=t("list.inactiveFocusBackground",{dark:null,light:null,hc:null},S.localize(103,null)),e.listInactiveFocusOutline=t("list.inactiveFocusOutline",{dark:null,light:null,hc:null},S.localize(104,null)),e.listHoverBackground=t("list.hoverBackground",{dark:"#2A2D2E",light:"#F0F0F0",hc:null},S.localize(105,null)),e.listHoverForeground=t("list.hoverForeground",{dark:null,light:null,hc:null},S.localize(106,null)),e.listDropBackground=t("list.dropBackground",{dark:"#062F4A",light:"#D6EBFF",hc:null},S.localize(107,null)),e.listHighlightForeground=t("list.highlightForeground",{dark:"#18A3FF",light:"#0066BF",hc:e.focusBorder},S.localize(108,null)),e.listFocusHighlightForeground=t("list.focusHighlightForeground",{dark:e.listHighlightForeground,light:r(e.listActiveSelectionBackground,e.listHighlightForeground,"#9DDDFF"),hc:e.listHighlightForeground},S.localize(109,null)),e.listFilterWidgetBackground=t("listFilterWidget.background",{light:"#efc1ad",dark:"#653723",hc:N.Color.black},S.localize(110,null)),e.listFilterWidgetOutline=t("listFilterWidget.outline",{dark:N.Color.transparent,light:N.Color.transparent,hc:"#f38518"},S.localize(111,null)),e.listFilterWidgetNoMatchesOutline=t("listFilterWidget.noMatchesOutline",{dark:"#BE1100",light:"#BE1100",hc:e.contrastBorder},S.localize(112,null)),e.treeIndentGuidesStroke=t("tree.indentGuidesStroke",{dark:"#585858",light:"#a9a9a9",hc:"#a9a9a9"},S.localize(113,null)),e.tableColumnsBorder=t("tree.tableColumnsBorder",{dark:"#CCCCCC20",light:"#61616120",hc:null},S.localize(114,null)),e._deprecatedQuickInputListFocusBackground=t("quickInput.list.focusBackground",{dark:null,light:null,hc:null},"",void 0,S.localize(115,null)),e.quickInputListFocusForeground=t("quickInputList.focusForeground",{dark:e.listActiveSelectionForeground,light:e.listActiveSelectionForeground,hc:e.listActiveSelectionForeground},S.localize(116,null)),e.quickInputListFocusIconForeground=t("quickInputList.focusIconForeground",{dark:e.listActiveSelectionIconForeground,light:e.listActiveSelectionIconForeground,hc:e.listActiveSelectionIconForeground},S.localize(117,null)),e.quickInputListFocusBackground=t("quickInputList.focusBackground",{dark:a(e._deprecatedQuickInputListFocusBackground,e.listActiveSelectionBackground),light:a(e._deprecatedQuickInputListFocusBackground,e.listActiveSelectionBackground),hc:null},S.localize(118,null)),e.menuBorder=t("menu.border",{dark:null,light:null,hc:e.contrastBorder},S.localize(119,null)),e.menuForeground=t("menu.foreground",{dark:e.selectForeground,light:e.foreground,hc:e.selectForeground},S.localize(120,null)),e.menuBackground=t("menu.background",{dark:e.selectBackground,light:e.selectBackground,hc:e.selectBackground},S.localize(121,null)),e.menuSelectionForeground=t("menu.selectionForeground",{dark:e.listActiveSelectionForeground,light:e.listActiveSelectionForeground,hc:e.listActiveSelectionForeground},S.localize(122,null)),e.menuSelectionBackground=t("menu.selectionBackground",{dark:e.listActiveSelectionBackground,light:e.listActiveSelectionBackground,hc:e.listActiveSelectionBackground},S.localize(123,null)),e.menuSelectionBorder=t("menu.selectionBorder",{dark:null,light:null,hc:e.activeContrastBorder},S.localize(124,null)),e.menuSeparatorBackground=t("menu.separatorBackground",{dark:"#BBBBBB",light:"#888888",hc:e.contrastBorder},S.localize(125,null)),e.toolbarHoverBackground=t("toolbar.hoverBackground",{dark:"#5a5d5e50",light:"#b8b8b850",hc:null},S.localize(126,null)),e.snippetTabstopHighlightBackground=t("editor.snippetTabstopHighlightBackground",{dark:new N.Color(new N.RGBA(124,124,124,.3)),light:new N.Color(new N.RGBA(10,50,100,.2)),hc:new N.Color(new N.RGBA(124,124,124,.3))},S.localize(127,null)),e.snippetTabstopHighlightBorder=t("editor.snippetTabstopHighlightBorder",{dark:null,light:null,hc:null},S.localize(128,null)),e.snippetFinalTabstopHighlightBackground=t("editor.snippetFinalTabstopHighlightBackground",{dark:null,light:null,hc:null},S.localize(129,null)),e.snippetFinalTabstopHighlightBorder=t("editor.snippetFinalTabstopHighlightBorder",{dark:"#525252",light:new N.Color(new N.RGBA(10,50,100,.5)),hc:"#525252"},S.localize(130,null)),e.overviewRulerFindMatchForeground=t("editorOverviewRuler.findMatchForeground",{dark:"#d186167e",light:"#d186167e",hc:"#AB5A00"},S.localize(131,null),!0),e.overviewRulerSelectionHighlightForeground=t("editorOverviewRuler.selectionHighlightForeground",{dark:"#A0A0A0CC",light:"#A0A0A0CC",hc:"#A0A0A0CC"},S.localize(132,null),!0),e.minimapFindMatch=t("minimap.findMatchHighlight",{light:"#d18616",dark:"#d18616",hc:"#AB5A00"},S.localize(133,null),!0),e.minimapSelectionOccurrenceHighlight=t("minimap.selectionOccurrenceHighlight",{light:"#c9c9c9",dark:"#676767",hc:"#ffffff"},S.localize(134,null),!0),e.minimapSelection=t("minimap.selectionHighlight",{light:"#ADD6FF",dark:"#264F78",hc:"#ffffff"},S.localize(135,null),!0),e.minimapError=t("minimap.errorHighlight",{dark:new N.Color(new N.RGBA(255,18,18,.7)),light:new N.Color(new N.RGBA(255,18,18,.7)),hc:new N.Color(new N.RGBA(255,50,50,1))},S.localize(136,null)),e.minimapWarning=t("minimap.warningHighlight",{dark:e.editorWarningForeground,light:e.editorWarningForeground,hc:e.editorWarningBorder},S.localize(137,null)),e.minimapBackground=t("minimap.background",{dark:null,light:null,hc:null},S.localize(138,null)),e.minimapForegroundOpacity=t("minimap.foregroundOpacity",{dark:N.Color.fromHex("#000f"),light:N.Color.fromHex("#000f"),hc:N.Color.fromHex("#000f")},S.localize(139,null)),e.minimapSliderBackground=t("minimapSlider.background",{light:d(e.scrollbarSliderBackground,.5),dark:d(e.scrollbarSliderBackground,.5),hc:d(e.scrollbarSliderBackground,.5)},S.localize(140,null)),e.minimapSliderHoverBackground=t("minimapSlider.hoverBackground",{light:d(e.scrollbarSliderHoverBackground,.5),dark:d(e.scrollbarSliderHoverBackground,.5),hc:d(e.scrollbarSliderHoverBackground,.5)},S.localize(141,null)),e.minimapSliderActiveBackground=t("minimapSlider.activeBackground",{light:d(e.scrollbarSliderActiveBackground,.5),dark:d(e.scrollbarSliderActiveBackground,.5),hc:d(e.scrollbarSliderActiveBackground,.5)},S.localize(142,null)),e.problemsErrorIconForeground=t("problemsErrorIcon.foreground",{dark:e.editorErrorForeground,light:e.editorErrorForeground,hc:e.editorErrorForeground},S.localize(143,null)),e.problemsWarningIconForeground=t("problemsWarningIcon.foreground",{dark:e.editorWarningForeground,light:e.editorWarningForeground,hc:e.editorWarningForeground},S.localize(144,null)),e.problemsInfoIconForeground=t("problemsInfoIcon.foreground",{dark:e.editorInfoForeground,light:e.editorInfoForeground,hc:e.editorInfoForeground},S.localize(145,null));function s(f,y){var _,b,v;switch(f.op){case 0:return(_=i(f.value,y))===null||_===void 0?void 0:_.darken(f.factor);case 1:return(b=i(f.value,y))===null||b===void 0?void 0:b.lighten(f.factor);case 2:return(v=i(f.value,y))===null||v===void 0?void 0:v.transparent(f.factor);case 3:for(const I of f.values){const k=i(I,y);if(k)return k}return;case 5:return i(y.defines(f.if)?f.then:f.else,y);case 4:const m=i(f.value,y);if(!m)return;const E=i(f.background,y);return E?m.isDarkerThan(E)?N.Color.getLighterColor(m,E,f.factor).transparent(f.transparency):N.Color.getDarkerColor(m,E,f.factor).transparent(f.transparency):m.transparent(f.factor*f.transparency);default:throw(0,D.assertNever)(f)}}e.executeTransform=s;function c(f,y){return{op:0,value:f,factor:y}}e.darken=c;function u(f,y){return{op:1,value:f,factor:y}}e.lighten=u;function d(f,y){return{op:2,value:f,factor:y}}e.transparent=d;function a(...f){return{op:3,values:f}}e.oneOf=a;function r(f,y,_){return{op:5,if:f,then:y,else:_}}e.ifDefinedThenElse=r;function o(f,y,_,b){return{op:4,value:f,background:y,factor:_,transparency:b}}function i(f,y){if(f!==null){if(typeof f=="string")return f[0]==="#"?N.Color.fromHex(f):y.getColor(f);if(f instanceof N.Color)return f;if(typeof f=="object")return s(f,y)}}e.resolveColorValue=i,e.workbenchColorsSchemaId="vscode://schemas/workbench-colors";let l=C.Registry.as(p.Extensions.JSONContribution);l.registerSchema(e.workbenchColorsSchemaId,g.getColorSchema());const h=new w.RunOnceScheduler(()=>l.notifySchemaChanged(e.workbenchColorsSchemaId),200);g.onDidChangeSchema(()=>{h.isScheduled()||h.schedule()})}),define(J[128],ee([0,1,21]),function(j,e,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.attachMenuStyler=e.defaultMenuStyles=e.defaultListStyles=e.attachListStyler=e.attachBadgeStyler=e.attachStyler=e.computeStyles=void 0;function N(C,n){const g=Object.create(null);for(let t in n){const s=n[t];s&&(g[t]=(0,w.resolveColorValue)(s,C))}return g}e.computeStyles=N;function T(C,n,g){function t(){const s=N(C.getColorTheme(),n);typeof g=="function"?g(s):g.style(s)}return t(),C.onDidColorThemeChange(t)}e.attachStyler=T;function D(C,n,g){return T(n,{badgeBackground:(g==null?void 0:g.badgeBackground)||w.badgeBackground,badgeForeground:(g==null?void 0:g.badgeForeground)||w.badgeForeground,badgeBorder:w.contrastBorder},C)}e.attachBadgeStyler=D;function S(C,n,g){return T(n,Object.assign(Object.assign({},e.defaultListStyles),g||{}),C)}e.attachListStyler=S,e.defaultListStyles={listFocusBackground:w.listFocusBackground,listFocusForeground:w.listFocusForeground,listFocusOutline:w.listFocusOutline,listActiveSelectionBackground:w.listActiveSelectionBackground,listActiveSelectionForeground:w.listActiveSelectionForeground,listActiveSelectionIconForeground:w.listActiveSelectionIconForeground,listFocusAndSelectionBackground:w.listActiveSelectionBackground,listFocusAndSelectionForeground:w.listActiveSelectionForeground,listInactiveSelectionBackground:w.listInactiveSelectionBackground,listInactiveSelectionIconForeground:w.listInactiveSelectionIconForeground,listInactiveSelectionForeground:w.listInactiveSelectionForeground,listInactiveFocusBackground:w.listInactiveFocusBackground,listInactiveFocusOutline:w.listInactiveFocusOutline,listHoverBackground:w.listHoverBackground,listHoverForeground:w.listHoverForeground,listDropBackground:w.listDropBackground,listSelectionOutline:w.activeContrastBorder,listHoverOutline:w.activeContrastBorder,listFilterWidgetBackground:w.listFilterWidgetBackground,listFilterWidgetOutline:w.listFilterWidgetOutline,listFilterWidgetNoMatchesOutline:w.listFilterWidgetNoMatchesOutline,listMatchesShadow:w.widgetShadow,treeIndentGuidesStroke:w.treeIndentGuidesStroke,tableColumnsBorder:w.tableColumnsBorder},e.defaultMenuStyles={shadowColor:w.widgetShadow,borderColor:w.menuBorder,foregroundColor:w.menuForeground,backgroundColor:w.menuBackground,selectionForegroundColor:w.menuSelectionForeground,selectionBackgroundColor:w.menuSelectionBackground,selectionBorderColor:w.menuSelectionBorder,separatorColor:w.menuSeparatorBackground};function p(C,n,g){return T(n,Object.assign(Object.assign({},e.defaultMenuStyles),g),C)}e.attachMenuStyler=p}),define(J[599],ee([0,1,7,56,454,51,11,2,128,380]),function(j,e,w,N,T,D,S,p,C){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ContextMenuHandler=void 0;class n{constructor(t,s,c,u,d){this.contextViewService=t,this.telemetryService=s,this.notificationService=c,this.keybindingService=u,this.themeService=d,this.focusToReturn=null,this.block=null,this.options={blockMouse:!0}}configure(t){this.options=t}showContextMenu(t){const s=t.getActions();if(!s.length)return;this.focusToReturn=document.activeElement;let c,u=(0,w.isHTMLElement)(t.domForShadowRoot)?t.domForShadowRoot:void 0;this.contextViewService.showContextView({getAnchor:()=>t.getAnchor(),canRelayout:!1,anchorAlignment:t.anchorAlignment,anchorAxisAlignment:t.anchorAxisAlignment,render:d=>{let a=t.getMenuClassName?t.getMenuClassName():"";a&&(d.className+=" "+a),this.options.blockMouse&&(this.block=d.appendChild((0,w.$)(".context-view-block")),this.block.style.position="fixed",this.block.style.cursor="initial",this.block.style.left="0",this.block.style.top="0",this.block.style.width="100%",this.block.style.height="100%",this.block.style.zIndex="-1",(0,w.addDisposableListener)(this.block,w.EventType.MOUSE_DOWN,i=>i.stopPropagation()));const r=new p.DisposableStore,o=t.actionRunner||new D.ActionRunner;return o.onBeforeRun(this.onActionRun,this,r),o.onDidRun(this.onDidActionRun,this,r),c=new T.Menu(d,s,{actionViewItemProvider:t.getActionViewItem,context:t.getActionsContext?t.getActionsContext():null,actionRunner:o,getKeyBinding:t.getKeyBinding?t.getKeyBinding:i=>this.keybindingService.lookupKeybinding(i.id)}),r.add((0,C.attachMenuStyler)(c,this.themeService)),c.onDidCancel(()=>this.contextViewService.hideContextView(!0),null,r),c.onDidBlur(()=>this.contextViewService.hideContextView(!0),null,r),r.add((0,w.addDisposableListener)(window,w.EventType.BLUR,()=>this.contextViewService.hideContextView(!0))),r.add((0,w.addDisposableListener)(window,w.EventType.MOUSE_DOWN,i=>{if(i.defaultPrevented)return;let l=new N.StandardMouseEvent(i),h=l.target;if(!l.rightButton){for(;h;){if(h===d)return;h=h.parentElement}this.contextViewService.hideContextView(!0)}})),(0,p.combinedDisposable)(r,c)},focus:()=>{c&&c.focus(!!t.autoSelectFirstItem)},onHide:d=>{t.onHide&&t.onHide(!!d),this.block&&(this.block.remove(),this.block=null),this.focusToReturn&&this.focusToReturn.focus()}},u,!!u)}onActionRun(t){this.telemetryService.publicLog2("workbenchActionExecuted",{id:t.action.id,from:"contextMenu"}),this.contextViewService.hideContextView(!1),this.focusToReturn&&this.focusToReturn.focus()}onDidActionRun(t){t.error&&!(0,S.isPromiseCanceledError)(t.error)&&this.notificationService.error(t.error)}}e.ContextMenuHandler=n}),define(J[103],ee([0,1]),function(j,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ColorScheme=void 0;var w;(function(N){N.DARK="dark",N.LIGHT="light",N.HIGH_CONTRAST="hc"})(w=e.ColorScheme||(e.ColorScheme={}))}),define(J[267],ee([0,1,34,30,17,405,117,144,118,103,31]),function(j,e,w,N,T,D,S,p,C,n,g){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ViewLine=e.ViewLineOptions=e.DomReadingContext=void 0;const t=function(){return T.isNative?!0:!(T.isLinux||w.isFirefox||w.isSafari)}();let s=!0;class c{constructor(y,_){this._domNode=y,this._clientRectDeltaLeft=0,this._clientRectDeltaLeftRead=!1,this.endNode=_}get clientRectDeltaLeft(){return this._clientRectDeltaLeftRead||(this._clientRectDeltaLeftRead=!0,this._clientRectDeltaLeft=this._domNode.getBoundingClientRect().left),this._clientRectDeltaLeft}}e.DomReadingContext=c;class u{constructor(y,_){this.themeType=_;const b=y.options,v=b.get(43);this.renderWhitespace=b.get(87),this.renderControlCharacters=b.get(82),this.spaceWidth=v.spaceWidth,this.middotWidth=v.middotWidth,this.wsmiddotWidth=v.wsmiddotWidth,this.useMonospaceOptimizations=v.isMonospace&&!b.get(29),this.canUseHalfwidthRightwardsArrow=v.canUseHalfwidthRightwardsArrow,this.lineHeight=b.get(58),this.stopRenderingLineAfter=b.get(104),this.fontLigatures=b.get(44)}equals(y){return this.themeType===y.themeType&&this.renderWhitespace===y.renderWhitespace&&this.renderControlCharacters===y.renderControlCharacters&&this.spaceWidth===y.spaceWidth&&this.middotWidth===y.middotWidth&&this.wsmiddotWidth===y.wsmiddotWidth&&this.useMonospaceOptimizations===y.useMonospaceOptimizations&&this.canUseHalfwidthRightwardsArrow===y.canUseHalfwidthRightwardsArrow&&this.lineHeight===y.lineHeight&&this.stopRenderingLineAfter===y.stopRenderingLineAfter&&this.fontLigatures===y.fontLigatures}}e.ViewLineOptions=u;class d{constructor(y){this._options=y,this._isMaybeInvalid=!0,this._renderedViewLine=null}getDomNode(){return this._renderedViewLine&&this._renderedViewLine.domNode?this._renderedViewLine.domNode.domNode:null}setDomNode(y){if(this._renderedViewLine)this._renderedViewLine.domNode=(0,N.createFastDomNode)(y);else throw new Error("I have no rendered view line to set the dom node to...")}onContentChanged(){this._isMaybeInvalid=!0}onTokensChanged(){this._isMaybeInvalid=!0}onDecorationsChanged(){this._isMaybeInvalid=!0}onOptionsChanged(y){this._isMaybeInvalid=!0,this._options=y}onSelectionChanged(){return this._options.themeType===n.ColorScheme.HIGH_CONTRAST||this._options.renderWhitespace==="selection"?(this._isMaybeInvalid=!0,!0):!1}renderLine(y,_,b,v){if(this._isMaybeInvalid===!1)return!1;this._isMaybeInvalid=!1;const m=b.getViewLineRenderingData(y),E=this._options,I=p.LineDecoration.filter(m.inlineDecorations,y,m.minColumn,m.maxColumn);let k=null;if(E.themeType===n.ColorScheme.HIGH_CONTRAST||this._options.renderWhitespace==="selection"){const R=b.selections;for(const A of R){if(A.endLineNumber<y||A.startLineNumber>y)continue;const O=A.startLineNumber===y?A.startColumn:m.minColumn,L=A.endLineNumber===y?A.endColumn:m.maxColumn;O<L&&(E.themeType===n.ColorScheme.HIGH_CONTRAST||this._options.renderWhitespace!=="selection"?I.push(new p.LineDecoration(O,L,"inline-selected-text",0)):(k||(k=[]),k.push(new C.LineRange(O-1,L-1))))}}const M=new C.RenderLineInput(E.useMonospaceOptimizations,E.canUseHalfwidthRightwardsArrow,m.content,m.continuesWithWrappedLine,m.isBasicASCII,m.containsRTL,m.minColumn-1,m.tokens,I,m.tabSize,m.startVisibleColumn,E.spaceWidth,E.middotWidth,E.wsmiddotWidth,E.stopRenderingLineAfter,E.renderWhitespace,E.renderControlCharacters,E.fontLigatures!==g.EditorFontLigatures.OFF,k);if(this._renderedViewLine&&this._renderedViewLine.input.equals(M))return!1;v.appendASCIIString('<div style="top:'),v.appendASCIIString(String(_)),v.appendASCIIString("px;height:"),v.appendASCIIString(String(this._options.lineHeight)),v.appendASCIIString('px;" class="'),v.appendASCIIString(d.CLASS_NAME),v.appendASCIIString('">');const P=(0,C.renderViewLine)(M,v);v.appendASCIIString("</div>");let F=null;return s&&t&&m.isBasicASCII&&E.useMonospaceOptimizations&&P.containsForeignElements===0&&m.content.length<300&&M.lineTokens.getCount()<100&&(F=new a(this._renderedViewLine?this._renderedViewLine.domNode:null,M,P.characterMapping)),F||(F=i(this._renderedViewLine?this._renderedViewLine.domNode:null,M,P.characterMapping,P.containsRTL,P.containsForeignElements)),this._renderedViewLine=F,!0}layoutLine(y,_){this._renderedViewLine&&this._renderedViewLine.domNode&&(this._renderedViewLine.domNode.setTop(_),this._renderedViewLine.domNode.setHeight(this._options.lineHeight))}getWidth(){return this._renderedViewLine?this._renderedViewLine.getWidth():0}getWidthIsFast(){return this._renderedViewLine?this._renderedViewLine.getWidthIsFast():!0}needsMonospaceFontCheck(){return this._renderedViewLine?this._renderedViewLine instanceof a:!1}monospaceAssumptionsAreValid(){return this._renderedViewLine&&this._renderedViewLine instanceof a?this._renderedViewLine.monospaceAssumptionsAreValid():s}onMonospaceAssumptionsInvalidated(){this._renderedViewLine&&this._renderedViewLine instanceof a&&(this._renderedViewLine=this._renderedViewLine.toSlowRenderedLine())}getVisibleRangesForRange(y,_,b,v){if(!this._renderedViewLine)return null;_=_|0,b=b|0,_=Math.min(this._renderedViewLine.input.lineContent.length+1,Math.max(1,_)),b=Math.min(this._renderedViewLine.input.lineContent.length+1,Math.max(1,b));const m=this._renderedViewLine.input.stopRenderingLineAfter|0;let E=!1;m!==-1&&_>m+1&&b>m+1&&(E=!0),m!==-1&&_>m+1&&(_=m+1),m!==-1&&b>m+1&&(b=m+1);const I=this._renderedViewLine.getVisibleRangesForRange(y,_,b,v);return I&&I.length>0?new S.VisibleRanges(E,I):null}getColumnOfNodeOffset(y,_,b){return this._renderedViewLine?this._renderedViewLine.getColumnOfNodeOffset(y,_,b):1}}e.ViewLine=d,d.CLASS_NAME="view-line";class a{constructor(y,_,b){this.domNode=y,this.input=_,this._characterMapping=b,this._charWidth=_.spaceWidth}getWidth(){return Math.round(this._getCharPosition(this._characterMapping.length))}getWidthIsFast(){return!0}monospaceAssumptionsAreValid(){if(!this.domNode)return s;const y=this.getWidth(),_=this.domNode.domNode.firstChild.offsetWidth;return Math.abs(y-_)>=2&&(console.warn("monospace assumptions have been violated, therefore disabling monospace optimizations!"),s=!1),s}toSlowRenderedLine(){return i(this.domNode,this.input,this._characterMapping,!1,0)}getVisibleRangesForRange(y,_,b,v){const m=this._getCharPosition(_),E=this._getCharPosition(b);return[new S.FloatHorizontalRange(m,E-m)]}_getCharPosition(y){const _=this._characterMapping.getAbsoluteOffset(y);return this._charWidth*_}getColumnOfNodeOffset(y,_,b){const v=_.textContent.length;let m=-1;for(;_;)_=_.previousSibling,m++;return this._characterMapping.getColumn(new C.DomPosition(m,b),v)}}class r{constructor(y,_,b,v,m){if(this.domNode=y,this.input=_,this._characterMapping=b,this._isWhitespaceOnly=/^\s*$/.test(_.lineContent),this._containsForeignElements=m,this._cachedWidth=-1,this._pixelOffsetCache=null,!v||this._characterMapping.length===0){this._pixelOffsetCache=new Float32Array(Math.max(2,this._characterMapping.length+1));for(let E=0,I=this._characterMapping.length;E<=I;E++)this._pixelOffsetCache[E]=-1}}_getReadingTarget(y){return y.domNode.firstChild}getWidth(){return this.domNode?(this._cachedWidth===-1&&(this._cachedWidth=this._getReadingTarget(this.domNode).offsetWidth),this._cachedWidth):0}getWidthIsFast(){return this._cachedWidth!==-1}getVisibleRangesForRange(y,_,b,v){if(!this.domNode)return null;if(this._pixelOffsetCache!==null){const m=this._readPixelOffset(this.domNode,y,_,v);if(m===-1)return null;const E=this._readPixelOffset(this.domNode,y,b,v);return E===-1?null:[new S.FloatHorizontalRange(m,E-m)]}return this._readVisibleRangesForRange(this.domNode,y,_,b,v)}_readVisibleRangesForRange(y,_,b,v,m){if(b===v){const E=this._readPixelOffset(y,_,b,m);return E===-1?null:[new S.FloatHorizontalRange(E,0)]}else return this._readRawVisibleRangesForRange(y,b,v,m)}_readPixelOffset(y,_,b,v){if(this._characterMapping.length===0){if(this._containsForeignElements===0||this._containsForeignElements===2)return 0;if(this._containsForeignElements===1)return this.getWidth();const m=this._getReadingTarget(y);return m.firstChild?m.firstChild.offsetWidth:0}if(this._pixelOffsetCache!==null){const m=this._pixelOffsetCache[b];if(m!==-1)return m;const E=this._actualReadPixelOffset(y,_,b,v);return this._pixelOffsetCache[b]=E,E}return this._actualReadPixelOffset(y,_,b,v)}_actualReadPixelOffset(y,_,b,v){if(this._characterMapping.length===0){const k=D.RangeUtil.readHorizontalRanges(this._getReadingTarget(y),0,0,0,0,v.clientRectDeltaLeft,v.endNode);return!k||k.length===0?-1:k[0].left}if(b===this._characterMapping.length&&this._isWhitespaceOnly&&this._containsForeignElements===0)return this.getWidth();const m=this._characterMapping.getDomPosition(b),E=D.RangeUtil.readHorizontalRanges(this._getReadingTarget(y),m.partIndex,m.charIndex,m.partIndex,m.charIndex,v.clientRectDeltaLeft,v.endNode);if(!E||E.length===0)return-1;const I=E[0].left;if(this.input.isBasicASCII){const k=this._characterMapping.getAbsoluteOffset(b),M=Math.round(this.input.spaceWidth*k);if(Math.abs(M-I)<=1)return M}return I}_readRawVisibleRangesForRange(y,_,b,v){if(_===1&&b===this._characterMapping.length)return[new S.FloatHorizontalRange(0,this.getWidth())];const m=this._characterMapping.getDomPosition(_),E=this._characterMapping.getDomPosition(b);return D.RangeUtil.readHorizontalRanges(this._getReadingTarget(y),m.partIndex,m.charIndex,E.partIndex,E.charIndex,v.clientRectDeltaLeft,v.endNode)}getColumnOfNodeOffset(y,_,b){const v=_.textContent.length;let m=-1;for(;_;)_=_.previousSibling,m++;return this._characterMapping.getColumn(new C.DomPosition(m,b),v)}}class o extends r{_readVisibleRangesForRange(y,_,b,v,m){const E=super._readVisibleRangesForRange(y,_,b,v,m);if(!E||E.length===0||b===v||b===1&&v===this._characterMapping.length)return E;if(!this.input.containsRTL){const I=this._readPixelOffset(y,_,v,m);if(I!==-1){const k=E[E.length-1];k.left<I&&(k.width=I-k.left)}}return E}}const i=function(){return w.isWebKit?l:h}();function l(f,y,_,b,v){return new o(f,y,_,b,v)}function h(f,y,_,b,v){return new r(f,y,_,b,v)}}),define(J[600],ee([0,1,17,14,63,175,50,267,13,3,117,137,342]),function(j,e,w,N,T,D,S,p,C,n,g,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ViewLines=void 0;class s{constructor(){this._currentVisibleRange=new n.Range(1,1,1,1)}getCurrentVisibleRange(){return this._currentVisibleRange}setCurrentVisibleRange(r){this._currentVisibleRange=r}}class c{constructor(r,o,i,l,h,f){this.lineNumber=r,this.startColumn=o,this.endColumn=i,this.startScrollTop=l,this.stopScrollTop=h,this.scrollType=f,this.type="range",this.minLineNumber=r,this.maxLineNumber=r}}class u{constructor(r,o,i,l){this.selections=r,this.startScrollTop=o,this.stopScrollTop=i,this.scrollType=l,this.type="selections";let h=r[0].startLineNumber,f=r[0].endLineNumber;for(let y=1,_=r.length;y<_;y++){const b=r[y];h=Math.min(h,b.startLineNumber),f=Math.max(f,b.endLineNumber)}this.minLineNumber=h,this.maxLineNumber=f}}class d extends S.ViewPart{constructor(r,o){super(r);this._linesContent=o,this._textRangeRestingSpot=document.createElement("div"),this._visibleLines=new D.VisibleLinesCollection(this),this.domNode=this._visibleLines.domNode;const i=this._context.configuration,l=this._context.configuration.options,h=l.get(43),f=l.get(130);this._lineHeight=l.get(58),this._typicalHalfwidthCharacterWidth=h.typicalHalfwidthCharacterWidth,this._isViewportWrapping=f.isViewportWrapping,this._revealHorizontalRightPadding=l.get(88),this._cursorSurroundingLines=l.get(25),this._cursorSurroundingLinesStyle=l.get(26),this._canUseLayerHinting=!l.get(28),this._viewLineOptions=new p.ViewLineOptions(i,this._context.theme.type),S.PartFingerprints.write(this.domNode,7),this.domNode.setClassName(`view-lines ${t.MOUSE_CURSOR_TEXT_CSS_CLASS_NAME}`),T.Configuration.applyFontInfo(this.domNode,h),this._maxLineWidth=0,this._asyncUpdateLineWidths=new N.RunOnceScheduler(()=>{this._updateLineWidthsSlow()},200),this._asyncCheckMonospaceFontAssumptions=new N.RunOnceScheduler(()=>{this._checkMonospaceFontAssumptions()},2e3),this._lastRenderedData=new s,this._horizontalRevealRequest=null}dispose(){this._asyncUpdateLineWidths.dispose(),this._asyncCheckMonospaceFontAssumptions.dispose(),super.dispose()}getDomNode(){return this.domNode}createVisibleLine(){return new p.ViewLine(this._viewLineOptions)}onConfigurationChanged(r){this._visibleLines.onConfigurationChanged(r),r.hasChanged(130)&&(this._maxLineWidth=0);const o=this._context.configuration.options,i=o.get(43),l=o.get(130);return this._lineHeight=o.get(58),this._typicalHalfwidthCharacterWidth=i.typicalHalfwidthCharacterWidth,this._isViewportWrapping=l.isViewportWrapping,this._revealHorizontalRightPadding=o.get(88),this._cursorSurroundingLines=o.get(25),this._cursorSurroundingLinesStyle=o.get(26),this._canUseLayerHinting=!o.get(28),T.Configuration.applyFontInfo(this.domNode,i),this._onOptionsMaybeChanged(),r.hasChanged(129)&&(this._maxLineWidth=0),!0}_onOptionsMaybeChanged(){const r=this._context.configuration,o=new p.ViewLineOptions(r,this._context.theme.type);if(!this._viewLineOptions.equals(o)){this._viewLineOptions=o;const i=this._visibleLines.getStartLineNumber(),l=this._visibleLines.getEndLineNumber();for(let h=i;h<=l;h++)this._visibleLines.getVisibleLine(h).onOptionsChanged(this._viewLineOptions);return!0}return!1}onCursorStateChanged(r){const o=this._visibleLines.getStartLineNumber(),i=this._visibleLines.getEndLineNumber();let l=!1;for(let h=o;h<=i;h++)l=this._visibleLines.getVisibleLine(h).onSelectionChanged()||l;return l}onDecorationsChanged(r){{const o=this._visibleLines.getStartLineNumber(),i=this._visibleLines.getEndLineNumber();for(let l=o;l<=i;l++)this._visibleLines.getVisibleLine(l).onDecorationsChanged()}return!0}onFlushed(r){const o=this._visibleLines.onFlushed(r);return this._maxLineWidth=0,o}onLinesChanged(r){return this._visibleLines.onLinesChanged(r)}onLinesDeleted(r){return this._visibleLines.onLinesDeleted(r)}onLinesInserted(r){return this._visibleLines.onLinesInserted(r)}onRevealRangeRequest(r){const o=this._computeScrollTopToRevealRange(this._context.viewLayout.getFutureViewport(),r.source,r.range,r.selections,r.verticalType);if(o===-1)return!1;let i=this._context.viewLayout.validateScrollPosition({scrollTop:o});r.revealHorizontal?r.range&&r.range.startLineNumber!==r.range.endLineNumber?i={scrollTop:i.scrollTop,scrollLeft:0}:r.range?this._horizontalRevealRequest=new c(r.range.startLineNumber,r.range.startColumn,r.range.endColumn,this._context.viewLayout.getCurrentScrollTop(),i.scrollTop,r.scrollType):r.selections&&r.selections.length>0&&(this._horizontalRevealRequest=new u(r.selections,this._context.viewLayout.getCurrentScrollTop(),i.scrollTop,r.scrollType)):this._horizontalRevealRequest=null;const h=Math.abs(this._context.viewLayout.getCurrentScrollTop()-i.scrollTop)<=this._lineHeight?1:r.scrollType;return this._context.model.setScrollPosition(i,h),!0}onScrollChanged(r){if(this._horizontalRevealRequest&&r.scrollLeftChanged&&(this._horizontalRevealRequest=null),this._horizontalRevealRequest&&r.scrollTopChanged){const o=Math.min(this._horizontalRevealRequest.startScrollTop,this._horizontalRevealRequest.stopScrollTop),i=Math.max(this._horizontalRevealRequest.startScrollTop,this._horizontalRevealRequest.stopScrollTop);(r.scrollTop<o||r.scrollTop>i)&&(this._horizontalRevealRequest=null)}return this.domNode.setWidth(r.scrollWidth),this._visibleLines.onScrollChanged(r)||!0}onTokensChanged(r){return this._visibleLines.onTokensChanged(r)}onZonesChanged(r){return this._context.model.setMaxLineWidth(this._maxLineWidth),this._visibleLines.onZonesChanged(r)}onThemeChanged(r){return this._onOptionsMaybeChanged()}getPositionFromDOMInfo(r,o){const i=this._getViewLineDomNode(r);if(i===null)return null;const l=this._getLineNumberFor(i);if(l===-1||l<1||l>this._context.model.getLineCount())return null;if(this._context.model.getLineMaxColumn(l)===1)return new C.Position(l,1);const h=this._visibleLines.getStartLineNumber(),f=this._visibleLines.getEndLineNumber();if(l<h||l>f)return null;let y=this._visibleLines.getVisibleLine(l).getColumnOfNodeOffset(l,r,o);const _=this._context.model.getLineMinColumn(l);return y<_&&(y=_),new C.Position(l,y)}_getViewLineDomNode(r){for(;r&&r.nodeType===1;){if(r.className===p.ViewLine.CLASS_NAME)return r;r=r.parentElement}return null}_getLineNumberFor(r){const o=this._visibleLines.getStartLineNumber(),i=this._visibleLines.getEndLineNumber();for(let l=o;l<=i;l++){const h=this._visibleLines.getVisibleLine(l);if(r===h.getDomNode())return l}return-1}getLineWidth(r){const o=this._visibleLines.getStartLineNumber(),i=this._visibleLines.getEndLineNumber();return r<o||r>i?-1:this._visibleLines.getVisibleLine(r).getWidth()}linesVisibleRangesForRange(r,o){if(this.shouldRender())return null;const i=r.endLineNumber,l=n.Range.intersectRanges(r,this._lastRenderedData.getCurrentVisibleRange());if(!l)return null;let h=[],f=0;const y=new p.DomReadingContext(this.domNode.domNode,this._textRangeRestingSpot);let _=0;o&&(_=this._context.model.coordinatesConverter.convertViewPositionToModelPosition(new C.Position(l.startLineNumber,1)).lineNumber);const b=this._visibleLines.getStartLineNumber(),v=this._visibleLines.getEndLineNumber();for(let m=l.startLineNumber;m<=l.endLineNumber;m++){if(m<b||m>v)continue;const E=m===l.startLineNumber?l.startColumn:1,I=m===l.endLineNumber?l.endColumn:this._context.model.getLineMaxColumn(m),k=this._visibleLines.getVisibleLine(m).getVisibleRangesForRange(m,E,I,y);if(!!k){if(o&&m<i){const M=_;_=this._context.model.coordinatesConverter.convertViewPositionToModelPosition(new C.Position(m+1,1)).lineNumber,M!==_&&(k.ranges[k.ranges.length-1].width+=this._typicalHalfwidthCharacterWidth)}h[f++]=new g.LineVisibleRanges(k.outsideRenderedLine,m,g.HorizontalRange.from(k.ranges))}}return f===0?null:h}_visibleRangesForLineRange(r,o,i){return this.shouldRender()||r<this._visibleLines.getStartLineNumber()||r>this._visibleLines.getEndLineNumber()?null:this._visibleLines.getVisibleLine(r).getVisibleRangesForRange(r,o,i,new p.DomReadingContext(this.domNode.domNode,this._textRangeRestingSpot))}visibleRangeForPosition(r){const o=this._visibleRangesForLineRange(r.lineNumber,r.column,r.column);return o?new g.HorizontalPosition(o.outsideRenderedLine,o.ranges[0].left):null}updateLineWidths(){this._updateLineWidths(!1)}_updateLineWidthsFast(){return this._updateLineWidths(!0)}_updateLineWidthsSlow(){this._updateLineWidths(!1)}_updateLineWidths(r){const o=this._visibleLines.getStartLineNumber(),i=this._visibleLines.getEndLineNumber();let l=1,h=!0;for(let f=o;f<=i;f++){const y=this._visibleLines.getVisibleLine(f);if(r&&!y.getWidthIsFast()){h=!1;continue}l=Math.max(l,y.getWidth())}return h&&o===1&&i===this._context.model.getLineCount()&&(this._maxLineWidth=0),this._ensureMaxLineWidth(l),h}_checkMonospaceFontAssumptions(){let r=-1,o=-1;const i=this._visibleLines.getStartLineNumber(),l=this._visibleLines.getEndLineNumber();for(let h=i;h<=l;h++){const f=this._visibleLines.getVisibleLine(h);if(f.needsMonospaceFontCheck()){const y=f.getWidth();y>o&&(o=y,r=h)}}if(r!==-1&&!this._visibleLines.getVisibleLine(r).monospaceAssumptionsAreValid())for(let h=i;h<=l;h++)this._visibleLines.getVisibleLine(h).onMonospaceAssumptionsInvalidated()}prepareRender(){throw new Error("Not supported")}render(){throw new Error("Not supported")}renderText(r){if(this._visibleLines.renderLines(r),this._lastRenderedData.setCurrentVisibleRange(r.visibleRange),this.domNode.setWidth(this._context.viewLayout.getScrollWidth()),this.domNode.setHeight(Math.min(this._context.viewLayout.getScrollHeight(),1e6)),this._horizontalRevealRequest){const i=this._horizontalRevealRequest;if(r.startLineNumber<=i.minLineNumber&&i.maxLineNumber<=r.endLineNumber){this._horizontalRevealRequest=null,this.onDidRender();const l=this._computeScrollLeftToReveal(i);l&&(this._isViewportWrapping||this._ensureMaxLineWidth(l.maxHorizontalOffset),this._context.model.setScrollPosition({scrollLeft:l.scrollLeft},i.scrollType))}}if(this._updateLineWidthsFast()||this._asyncUpdateLineWidths.schedule(),w.isLinux&&!this._asyncCheckMonospaceFontAssumptions.isScheduled()){const i=this._visibleLines.getStartLineNumber(),l=this._visibleLines.getEndLineNumber();for(let h=i;h<=l;h++)if(this._visibleLines.getVisibleLine(h).needsMonospaceFontCheck()){this._asyncCheckMonospaceFontAssumptions.schedule();break}}this._linesContent.setLayerHinting(this._canUseLayerHinting),this._linesContent.setContain("strict");const o=this._context.viewLayout.getCurrentScrollTop()-r.bigNumbersDelta;this._linesContent.setTop(-o),this._linesContent.setLeft(-this._context.viewLayout.getCurrentScrollLeft())}_ensureMaxLineWidth(r){const o=Math.ceil(r);this._maxLineWidth<o&&(this._maxLineWidth=o,this._context.model.setMaxLineWidth(this._maxLineWidth))}_computeScrollTopToRevealRange(r,o,i,l,h){const f=r.top,y=r.height,_=f+y;let b,v,m;if(l&&l.length>0){let k=l[0].startLineNumber,M=l[0].endLineNumber;for(let P=1,F=l.length;P<F;P++){const R=l[P];k=Math.min(k,R.startLineNumber),M=Math.max(M,R.endLineNumber)}b=!1,v=this._context.viewLayout.getVerticalOffsetForLineNumber(k),m=this._context.viewLayout.getVerticalOffsetForLineNumber(M)+this._lineHeight}else if(i)b=!0,v=this._context.viewLayout.getVerticalOffsetForLineNumber(i.startLineNumber),m=this._context.viewLayout.getVerticalOffsetForLineNumber(i.endLineNumber)+this._lineHeight;else return-1;if(!(o==="mouse"&&this._cursorSurroundingLinesStyle==="default")){const k=Math.min(y/this._lineHeight/2,this._cursorSurroundingLines);v-=k*this._lineHeight,m+=Math.max(0,k-1)*this._lineHeight}(h===0||h===4)&&(m+=this._lineHeight);let I;if(m-v>y){if(!b)return-1;I=v}else if(h===5||h===6)if(h===6&&f<=v&&m<=_)I=f;else{const k=Math.max(5*this._lineHeight,y*.2),M=v-k,P=m-y;I=Math.max(P,M)}else if(h===1||h===2)if(h===2&&f<=v&&m<=_)I=f;else{const k=(v+m)/2;I=Math.max(0,k-y/2)}else I=this._computeMinimumScrolling(f,_,v,m,h===3,h===4);return I}_computeScrollLeftToReveal(r){const o=this._context.viewLayout.getCurrentViewport(),i=o.left,l=i+o.width;let h=1073741824,f=0;if(r.type==="range"){const _=this._visibleRangesForLineRange(r.lineNumber,r.startColumn,r.endColumn);if(!_)return null;for(const b of _.ranges)h=Math.min(h,Math.round(b.left)),f=Math.max(f,Math.round(b.left+b.width))}else for(const _ of r.selections){if(_.startLineNumber!==_.endLineNumber)return null;const b=this._visibleRangesForLineRange(_.startLineNumber,_.startColumn,_.endColumn);if(!b)return null;for(const v of b.ranges)h=Math.min(h,Math.round(v.left)),f=Math.max(f,Math.round(v.left+v.width))}return h=Math.max(0,h-d.HORIZONTAL_EXTRA_PX),f+=this._revealHorizontalRightPadding,r.type==="selections"&&f-h>o.width?null:{scrollLeft:this._computeMinimumScrolling(i,l,h,f),maxHorizontalOffset:f}}_computeMinimumScrolling(r,o,i,l,h,f){r=r|0,o=o|0,i=i|0,l=l|0,h=!!h,f=!!f;const y=o-r;if(l-i<y){if(h)return i;if(f)return Math.max(0,l-y);if(i<r)return i;if(l>o)return Math.max(0,l-y)}else return i;return r}}e.ViewLines=d,d.HORIZONTAL_EXTRA_PX=30}),define(J[10],ee([0,1,27,4,2,9,33,103]),function(j,e,w,N,T,D,S,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Themable=e.registerThemingParticipant=e.Extensions=e.getThemeTypeSelector=e.ThemeIcon=e.themeColorFromId=e.ThemeColor=e.IThemeService=void 0,e.IThemeService=(0,D.createDecorator)("themeService");var C;(function(a){function r(o){return o&&typeof o=="object"&&typeof o.id=="string"}a.isThemeColor=r})(C=e.ThemeColor||(e.ThemeColor={}));function n(a){return{id:a}}e.themeColorFromId=n;var g;(function(a){function r(y){return y&&typeof y=="object"&&typeof y.id=="string"&&(typeof y.color=="undefined"||C.isThemeColor(y.color))}a.isThemeIcon=r;const o=new RegExp(`^\\$\\((${w.CSSIcon.iconNameExpression}(?:${w.CSSIcon.iconModifierExpression})?)\\)$`);function i(y){const _=o.exec(y);if(!_)return;let[,b]=_;return{id:b}}a.fromString=i;function l(y,_){let b=y.id;const v=b.lastIndexOf("~");return v!==-1&&(b=b.substring(0,v)),_&&(b=`${b}~${_}`),{id:b}}a.modify=l;function h(y,_){var b,v;return y.id===_.id&&((b=y.color)===null||b===void 0?void 0:b.id)===((v=_.color)===null||v===void 0?void 0:v.id)}a.isEqual=h;function f(y,_){return{id:y.id,color:_?n(_):void 0}}a.asThemeIcon=f,a.asClassNameArray=w.CSSIcon.asClassNameArray,a.asClassName=w.CSSIcon.asClassName,a.asCSSSelector=w.CSSIcon.asCSSSelector})(g=e.ThemeIcon||(e.ThemeIcon={}));function t(a){switch(a){case p.ColorScheme.DARK:return"vs-dark";case p.ColorScheme.HIGH_CONTRAST:return"hc-black";default:return"vs"}}e.getThemeTypeSelector=t,e.Extensions={ThemingContribution:"base.contributions.theming"};class s{constructor(){this.themingParticipants=[],this.themingParticipants=[],this.onThemingParticipantAddedEmitter=new N.Emitter}onColorThemeChange(r){return this.themingParticipants.push(r),this.onThemingParticipantAddedEmitter.fire(r),(0,T.toDisposable)(()=>{const o=this.themingParticipants.indexOf(r);this.themingParticipants.splice(o,1)})}getThemingParticipants(){return this.themingParticipants}}let c=new s;S.Registry.add(e.Extensions.ThemingContribution,c);function u(a){return c.onColorThemeChange(a)}e.registerThemingParticipant=u;class d extends T.Disposable{constructor(r){super();this.themeService=r,this.theme=r.getColorTheme(),this._register(this.themeService.onDidColorThemeChange(o=>this.onThemeChange(o)))}onThemeChange(r){this.theme=r,this.updateStyles()}updateStyles(){}}e.Themable=d}),define(J[601],ee([0,1,7,2,8,24,381,113,49,10]),function(j,e,w,N,T,D,S,p,C,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e._CSS_MAP=e.DecorationTypeOptionsProvider=e.DecorationSubTypeOptionsProvider=e.CodeEditorServiceImpl=e.GlobalStyleSheet=e.RefCountedStyleSheet=void 0;class g{constructor(o,i,l){this._parent=o,this._editorId=i,this._styleSheet=l,this._refCount=0}ref(){this._refCount++}unref(){var o;this._refCount--,this._refCount===0&&((o=this._styleSheet.parentNode)===null||o===void 0||o.removeChild(this._styleSheet),this._parent._removeEditorStyleSheets(this._editorId))}insertRule(o,i){this._styleSheet.sheet.insertRule(o,i)}removeRulesContainingSelector(o){w.removeCSSRulesContainingSelector(o,this._styleSheet)}}e.RefCountedStyleSheet=g;class t{constructor(o){this._styleSheet=o}ref(){}unref(){}insertRule(o,i){this._styleSheet.sheet.insertRule(o,i)}removeRulesContainingSelector(o){w.removeCSSRulesContainingSelector(o,this._styleSheet)}}e.GlobalStyleSheet=t;let s=class extends S.AbstractCodeEditorService{constructor(o,i){super();this._decorationOptionProviders=new Map,this._editorStyleSheets=new Map,this._globalStyleSheet=o||null,this._themeService=i}_getOrCreateGlobalStyleSheet(){return this._globalStyleSheet||(this._globalStyleSheet=new t(w.createStyleSheet())),this._globalStyleSheet}_getOrCreateStyleSheet(o){if(!o)return this._getOrCreateGlobalStyleSheet();const i=o.getContainerDomNode();if(!w.isInShadowDOM(i))return this._getOrCreateGlobalStyleSheet();const l=o.getId();if(!this._editorStyleSheets.has(l)){const h=new g(this,l,w.createStyleSheet(i));this._editorStyleSheets.set(l,h)}return this._editorStyleSheets.get(l)}_removeEditorStyleSheets(o){this._editorStyleSheets.delete(o)}registerDecorationType(o,i,l,h,f){let y=this._decorationOptionProviders.get(i);if(!y){const _=this._getOrCreateStyleSheet(f),b={styleSheet:_,key:i,parentTypeKey:h,options:l||Object.create(null)};h?y=new c(this._themeService,_,b):y=new u(o,this._themeService,_,b),this._decorationOptionProviders.set(i,y),this._onDecorationTypeRegistered.fire(i)}y.refCount++}removeDecorationType(o){const i=this._decorationOptionProviders.get(o);i&&(i.refCount--,i.refCount<=0&&(this._decorationOptionProviders.delete(o),i.dispose(),this.listCodeEditors().forEach(l=>l.removeDecorations(o))))}resolveDecorationOptions(o,i){const l=this._decorationOptionProviders.get(o);if(!l)throw new Error("Unknown decoration type key: "+o);return l.getOptions(this,i)}};s=Fe([Ce(1,n.IThemeService)],s),e.CodeEditorServiceImpl=s;class c{constructor(o,i,l){this._styleSheet=i,this._styleSheet.ref(),this._parentTypeKey=l.parentTypeKey,this.refCount=0,this._beforeContentRules=new d(3,l,o),this._afterContentRules=new d(4,l,o)}getOptions(o,i){const l=o.resolveDecorationOptions(this._parentTypeKey,!0);return this._beforeContentRules&&(l.beforeContentClassName=this._beforeContentRules.className),this._afterContentRules&&(l.afterContentClassName=this._afterContentRules.className),l}dispose(){this._beforeContentRules&&(this._beforeContentRules.dispose(),this._beforeContentRules=null),this._afterContentRules&&(this._afterContentRules.dispose(),this._afterContentRules=null),this._styleSheet.unref()}}e.DecorationSubTypeOptionsProvider=c;class u{constructor(o,i,l,h){this._disposables=new N.DisposableStore,this.description=o,this._styleSheet=l,this._styleSheet.ref(),this.refCount=0;const f=E=>{const I=new d(E,h,i);if(this._disposables.add(I),I.hasContent)return I.className},y=E=>{const I=new d(E,h,i);return this._disposables.add(I),I.hasContent?{className:I.className,hasLetterSpacing:I.hasLetterSpacing}:null};this.className=f(0);const _=y(1);if(_&&(this.inlineClassName=_.className,this.inlineClassNameAffectsLetterSpacing=_.hasLetterSpacing),this.beforeContentClassName=f(3),this.afterContentClassName=f(4),h.options.beforeInjectedText&&h.options.beforeInjectedText.contentText){const E=y(5);this.beforeInjectedText={content:h.options.beforeInjectedText.contentText,inlineClassName:E==null?void 0:E.className,inlineClassNameAffectsLetterSpacing:(E==null?void 0:E.hasLetterSpacing)||h.options.beforeInjectedText.affectsLetterSpacing}}if(h.options.afterInjectedText&&h.options.afterInjectedText.contentText){const E=y(6);this.afterInjectedText={content:h.options.afterInjectedText.contentText,inlineClassName:E==null?void 0:E.className,inlineClassNameAffectsLetterSpacing:(E==null?void 0:E.hasLetterSpacing)||h.options.afterInjectedText.affectsLetterSpacing}}this.glyphMarginClassName=f(2);const b=h.options;this.isWholeLine=Boolean(b.isWholeLine),this.stickiness=b.rangeBehavior;const v=b.light&&b.light.overviewRulerColor||b.overviewRulerColor,m=b.dark&&b.dark.overviewRulerColor||b.overviewRulerColor;(typeof v!="undefined"||typeof m!="undefined")&&(this.overviewRuler={color:v||m,darkColor:m||v,position:b.overviewRulerLane||C.OverviewRulerLane.Center})}getOptions(o,i){return i?{description:this.description,inlineClassName:this.inlineClassName,beforeContentClassName:this.beforeContentClassName,afterContentClassName:this.afterContentClassName,className:this.className,glyphMarginClassName:this.glyphMarginClassName,isWholeLine:this.isWholeLine,overviewRuler:this.overviewRuler,stickiness:this.stickiness,before:this.beforeInjectedText,after:this.afterInjectedText}:this}dispose(){this._disposables.dispose(),this._styleSheet.unref()}}e.DecorationTypeOptionsProvider=u,e._CSS_MAP={color:"color:{0} !important;",opacity:"opacity:{0};",backgroundColor:"background-color:{0};",outline:"outline:{0};",outlineColor:"outline-color:{0};",outlineStyle:"outline-style:{0};",outlineWidth:"outline-width:{0};",border:"border:{0};",borderColor:"border-color:{0};",borderRadius:"border-radius:{0};",borderSpacing:"border-spacing:{0};",borderStyle:"border-style:{0};",borderWidth:"border-width:{0};",fontStyle:"font-style:{0};",fontWeight:"font-weight:{0};",fontSize:"font-size:{0};",fontFamily:"font-family:{0};",textDecoration:"text-decoration:{0};",cursor:"cursor:{0};",letterSpacing:"letter-spacing:{0};",gutterIconPath:"background:{0} center center no-repeat;",gutterIconSize:"background-size:{0};",contentText:"content:'{0}';",contentIconPath:"content:{0};",margin:"margin:{0};",padding:"padding:{0};",width:"width:{0};",height:"height:{0};",verticalAlign:"vertical-align:{0};"};class d{constructor(o,i,l){this._theme=l.getColorTheme(),this._ruleType=o,this._providerArgs=i,this._usesThemeColors=!1,this._hasContent=!1,this._hasLetterSpacing=!1;let h=a.getClassName(this._providerArgs.key,o);this._providerArgs.parentTypeKey&&(h=h+" "+a.getClassName(this._providerArgs.parentTypeKey,o)),this._className=h,this._unThemedSelector=a.getSelector(this._providerArgs.key,this._providerArgs.parentTypeKey,o),this._buildCSS(),this._usesThemeColors?this._themeListener=l.onDidColorThemeChange(f=>{this._theme=l.getColorTheme(),this._removeCSS(),this._buildCSS()}):this._themeListener=null}dispose(){this._hasContent&&(this._removeCSS(),this._hasContent=!1),this._themeListener&&(this._themeListener.dispose(),this._themeListener=null)}get hasContent(){return this._hasContent}get hasLetterSpacing(){return this._hasLetterSpacing}get className(){return this._className}_buildCSS(){const o=this._providerArgs.options;let i,l,h;switch(this._ruleType){case 0:i=this.getCSSTextForModelDecorationClassName(o),l=this.getCSSTextForModelDecorationClassName(o.light),h=this.getCSSTextForModelDecorationClassName(o.dark);break;case 1:i=this.getCSSTextForModelDecorationInlineClassName(o),l=this.getCSSTextForModelDecorationInlineClassName(o.light),h=this.getCSSTextForModelDecorationInlineClassName(o.dark);break;case 2:i=this.getCSSTextForModelDecorationGlyphMarginClassName(o),l=this.getCSSTextForModelDecorationGlyphMarginClassName(o.light),h=this.getCSSTextForModelDecorationGlyphMarginClassName(o.dark);break;case 3:i=this.getCSSTextForModelDecorationContentClassName(o.before),l=this.getCSSTextForModelDecorationContentClassName(o.light&&o.light.before),h=this.getCSSTextForModelDecorationContentClassName(o.dark&&o.dark.before);break;case 4:i=this.getCSSTextForModelDecorationContentClassName(o.after),l=this.getCSSTextForModelDecorationContentClassName(o.light&&o.light.after),h=this.getCSSTextForModelDecorationContentClassName(o.dark&&o.dark.after);break;case 5:i=this.getCSSTextForModelDecorationContentClassName(o.beforeInjectedText),l=this.getCSSTextForModelDecorationContentClassName(o.light&&o.light.beforeInjectedText),h=this.getCSSTextForModelDecorationContentClassName(o.dark&&o.dark.beforeInjectedText);break;case 6:i=this.getCSSTextForModelDecorationContentClassName(o.afterInjectedText),l=this.getCSSTextForModelDecorationContentClassName(o.light&&o.light.afterInjectedText),h=this.getCSSTextForModelDecorationContentClassName(o.dark&&o.dark.afterInjectedText);break;default:throw new Error("Unknown rule type: "+this._ruleType)}const f=this._providerArgs.styleSheet;let y=!1;i.length>0&&(f.insertRule(`${this._unThemedSelector} {${i}}`,0),y=!0),l.length>0&&(f.insertRule(`.vs${this._unThemedSelector} {${l}}`,0),y=!0),h.length>0&&(f.insertRule(`.vs-dark${this._unThemedSelector}, .hc-black${this._unThemedSelector} {${h}}`,0),y=!0),this._hasContent=y}_removeCSS(){this._providerArgs.styleSheet.removeRulesContainingSelector(this._unThemedSelector)}getCSSTextForModelDecorationClassName(o){if(!o)return"";const i=[];return this.collectCSSText(o,["backgroundColor"],i),this.collectCSSText(o,["outline","outlineColor","outlineStyle","outlineWidth"],i),this.collectBorderSettingsCSSText(o,i),i.join("")}getCSSTextForModelDecorationInlineClassName(o){if(!o)return"";const i=[];return this.collectCSSText(o,["fontStyle","fontWeight","textDecoration","cursor","color","opacity","letterSpacing"],i),o.letterSpacing&&(this._hasLetterSpacing=!0),i.join("")}getCSSTextForModelDecorationContentClassName(o){if(!o)return"";const i=[];if(typeof o!="undefined"){if(this.collectBorderSettingsCSSText(o,i),typeof o.contentIconPath!="undefined"&&i.push(T.format(e._CSS_MAP.contentIconPath,w.asCSSUrl(D.URI.revive(o.contentIconPath)))),typeof o.contentText=="string"){const h=o.contentText.match(/^.*$/m)[0].replace(/['\\]/g,"\\$&");i.push(T.format(e._CSS_MAP.contentText,h))}this.collectCSSText(o,["verticalAlign","fontStyle","fontWeight","fontSize","fontFamily","textDecoration","color","opacity","backgroundColor","margin","padding"],i),this.collectCSSText(o,["width","height"],i)&&i.push("display:inline-block;")}return i.join("")}getCSSTextForModelDecorationGlyphMarginClassName(o){if(!o)return"";const i=[];return typeof o.gutterIconPath!="undefined"&&(i.push(T.format(e._CSS_MAP.gutterIconPath,w.asCSSUrl(D.URI.revive(o.gutterIconPath)))),typeof o.gutterIconSize!="undefined"&&i.push(T.format(e._CSS_MAP.gutterIconSize,o.gutterIconSize))),i.join("")}collectBorderSettingsCSSText(o,i){return this.collectCSSText(o,["border","borderColor","borderRadius","borderSpacing","borderStyle","borderWidth"],i)?(i.push(T.format("box-sizing: border-box;")),!0):!1}collectCSSText(o,i,l){const h=l.length;for(let f of i){const y=this.resolveValue(o[f]);typeof y=="string"&&l.push(T.format(e._CSS_MAP[f],y))}return l.length!==h}resolveValue(o){if((0,p.isThemeColor)(o)){this._usesThemeColors=!0;const i=this._theme.getColor(o.id);return i?i.toString():"transparent"}return o}}class a{static getClassName(o,i){return"ced-"+o+"-"+i}static getSelector(o,i,l){let h=".monaco-editor ."+this.getClassName(o,l);return i&&(h=h+"."+this.getClassName(i,l)),l===3?h+="::before":l===4&&(h+="::after"),h}}}),define(J[602],ee([0,1,7,30,64,50,10,21]),function(j,e,w,N,T,D,S,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EditorScrollbar=void 0;class C extends D.ViewPart{constructor(g,t,s,c){super(g);const u=this._context.configuration.options,d=u.get(91),a=u.get(66),r=u.get(34),o=u.get(94),i={listenOnDomNode:s.domNode,className:"editor-scrollable "+(0,S.getThemeTypeSelector)(g.theme.type),useShadows:!1,lazyRender:!0,vertical:d.vertical,horizontal:d.horizontal,verticalHasArrows:d.verticalHasArrows,horizontalHasArrows:d.horizontalHasArrows,verticalScrollbarSize:d.verticalScrollbarSize,verticalSliderSize:d.verticalSliderSize,horizontalScrollbarSize:d.horizontalScrollbarSize,horizontalSliderSize:d.horizontalSliderSize,handleMouseWheel:d.handleMouseWheel,alwaysConsumeMouseWheel:d.alwaysConsumeMouseWheel,arrowSize:d.arrowSize,mouseWheelScrollSensitivity:a,fastScrollSensitivity:r,scrollPredominantAxis:o,scrollByPage:d.scrollByPage};this.scrollbar=this._register(new T.SmoothScrollableElement(t.domNode,i,this._context.viewLayout.getScrollable())),D.PartFingerprints.write(this.scrollbar.getDomNode(),5),this.scrollbarDomNode=(0,N.createFastDomNode)(this.scrollbar.getDomNode()),this.scrollbarDomNode.setPosition("absolute"),this._setLayout();const l=(h,f,y)=>{const _={};if(f){const b=h.scrollTop;b&&(_.scrollTop=this._context.viewLayout.getCurrentScrollTop()+b,h.scrollTop=0)}if(y){const b=h.scrollLeft;b&&(_.scrollLeft=this._context.viewLayout.getCurrentScrollLeft()+b,h.scrollLeft=0)}this._context.model.setScrollPosition(_,1)};this._register(w.addDisposableListener(s.domNode,"scroll",h=>l(s.domNode,!0,!0))),this._register(w.addDisposableListener(t.domNode,"scroll",h=>l(t.domNode,!0,!1))),this._register(w.addDisposableListener(c.domNode,"scroll",h=>l(c.domNode,!0,!1))),this._register(w.addDisposableListener(this.scrollbarDomNode.domNode,"scroll",h=>l(this.scrollbarDomNode.domNode,!0,!1)))}dispose(){super.dispose()}_setLayout(){const g=this._context.configuration.options,t=g.get(129);this.scrollbarDomNode.setLeft(t.contentLeft),g.get(64).side==="right"?this.scrollbarDomNode.setWidth(t.contentWidth+t.minimap.minimapWidth):this.scrollbarDomNode.setWidth(t.contentWidth),this.scrollbarDomNode.setHeight(t.height)}getOverviewRulerLayoutInfo(){return this.scrollbar.getOverviewRulerLayoutInfo()}getDomNode(){return this.scrollbarDomNode}delegateVerticalScrollbarMouseDown(g){this.scrollbar.delegateVerticalScrollbarMouseDown(g)}onConfigurationChanged(g){if(g.hasChanged(91)||g.hasChanged(66)||g.hasChanged(34)){const t=this._context.configuration.options,s=t.get(91),c=t.get(66),u=t.get(34),d=t.get(94),a={vertical:s.vertical,horizontal:s.horizontal,verticalScrollbarSize:s.verticalScrollbarSize,horizontalScrollbarSize:s.horizontalScrollbarSize,scrollByPage:s.scrollByPage,handleMouseWheel:s.handleMouseWheel,mouseWheelScrollSensitivity:c,fastScrollSensitivity:u,scrollPredominantAxis:d};this.scrollbar.updateOptions(a)}return g.hasChanged(129)&&this._setLayout(),!0}onScrollChanged(g){return!0}onThemeChanged(g){return this.scrollbar.updateClassName("editor-scrollable "+(0,S.getThemeTypeSelector)(this._context.theme.type)),!0}prepareRender(g){}render(g){this.scrollbar.renderNow()}}e.EditorScrollbar=C,(0,S.registerThemingParticipant)((n,g)=>{const t=n.getColor(p.scrollbarShadow);t&&g.addRule(`
            .monaco-scrollable-element > .shadow.top {
                box-shadow: ${t} 0 6px 6px -6px inset;
            }
 
            .monaco-scrollable-element > .shadow.left {
                box-shadow: ${t} 6px 0 6px -6px inset;
            }
 
            .monaco-scrollable-element > .shadow.top.left {
                box-shadow: ${t} 6px 6px 6px -6px inset;
            }
        `);const s=n.getColor(p.scrollbarSliderBackground);s&&g.addRule(`
            .monaco-scrollable-element > .scrollbar > .slider {
                background: ${s};
            }
        `);const c=n.getColor(p.scrollbarSliderHoverBackground);c&&g.addRule(`
            .monaco-scrollable-element > .scrollbar > .slider:hover {
                background: ${c};
            }
        `);const u=n.getColor(p.scrollbarSliderActiveBackground);u&&g.addRule(`
            .monaco-scrollable-element > .scrollbar > .slider.active {
                background: ${u};
            }
        `)})}),define(J[603],ee([0,1,7,30,96,2,17,8,175,50,31,3,227,255,60,21,10,22,58,384,49,82,345]),function(j,e,w,N,T,D,S,p,C,n,g,t,s,c,u,d,a,r,o,i,l,h){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Minimap=void 0;const f=140,y=2;class _{constructor(R,A,O){const L=R.options,B=L.get(127),W=L.get(129),K=W.minimap,H=L.get(43),Y=L.get(64);this.renderMinimap=K.renderMinimap,this.size=Y.size,this.minimapHeightIsEditorHeight=K.minimapHeightIsEditorHeight,this.scrollBeyondLastLine=L.get(93),this.showSlider=Y.showSlider,this.pixelRatio=B,this.typicalHalfwidthCharacterWidth=H.typicalHalfwidthCharacterWidth,this.lineHeight=L.get(58),this.minimapLeft=K.minimapLeft,this.minimapWidth=K.minimapWidth,this.minimapHeight=W.height,this.canvasInnerWidth=K.minimapCanvasInnerWidth,this.canvasInnerHeight=K.minimapCanvasInnerHeight,this.canvasOuterWidth=K.minimapCanvasOuterWidth,this.canvasOuterHeight=K.minimapCanvasOuterHeight,this.isSampling=K.minimapIsSampling,this.editorHeight=W.height,this.fontScale=K.minimapScale,this.minimapLineHeight=K.minimapLineHeight,this.minimapCharWidth=1*this.fontScale,this.charRenderer=(0,h.once)(()=>i.MinimapCharRendererFactory.create(this.fontScale,H.fontFamily)),this.defaultBackgroundColor=O.getColor(2),this.backgroundColor=_._getMinimapBackground(A,this.defaultBackgroundColor),this.foregroundAlpha=_._getMinimapForegroundOpacity(A)}static _getMinimapBackground(R,A){const O=R.getColor(d.minimapBackground);return O?new s.RGBA8(O.rgba.r,O.rgba.g,O.rgba.b,Math.round(255*O.rgba.a)):A}static _getMinimapForegroundOpacity(R){const A=R.getColor(d.minimapForegroundOpacity);return A?s.RGBA8._clamp(Math.round(255*A.rgba.a)):255}equals(R){return this.renderMinimap===R.renderMinimap&&this.size===R.size&&this.minimapHeightIsEditorHeight===R.minimapHeightIsEditorHeight&&this.scrollBeyondLastLine===R.scrollBeyondLastLine&&this.showSlider===R.showSlider&&this.pixelRatio===R.pixelRatio&&this.typicalHalfwidthCharacterWidth===R.typicalHalfwidthCharacterWidth&&this.lineHeight===R.lineHeight&&this.minimapLeft===R.minimapLeft&&this.minimapWidth===R.minimapWidth&&this.minimapHeight===R.minimapHeight&&this.canvasInnerWidth===R.canvasInnerWidth&&this.canvasInnerHeight===R.canvasInnerHeight&&this.canvasOuterWidth===R.canvasOuterWidth&&this.canvasOuterHeight===R.canvasOuterHeight&&this.isSampling===R.isSampling&&this.editorHeight===R.editorHeight&&this.fontScale===R.fontScale&&this.minimapLineHeight===R.minimapLineHeight&&this.minimapCharWidth===R.minimapCharWidth&&this.defaultBackgroundColor&&this.defaultBackgroundColor.equals(R.defaultBackgroundColor)&&this.backgroundColor&&this.backgroundColor.equals(R.backgroundColor)&&this.foregroundAlpha===R.foregroundAlpha}}class b{constructor(R,A,O,L,B,W,K,H){this.scrollTop=R,this.scrollHeight=A,this.sliderNeeded=O,this._computedSliderRatio=L,this.sliderTop=B,this.sliderHeight=W,this.startLineNumber=K,this.endLineNumber=H}getDesiredScrollTopFromDelta(R){return Math.round(this.scrollTop+R/this._computedSliderRatio)}getDesiredScrollTopFromTouchLocation(R){return Math.round((R-this.sliderHeight/2)/this._computedSliderRatio)}static create(R,A,O,L,B,W,K,H,Y,X,Z){const se=R.pixelRatio,oe=R.minimapLineHeight,G=Math.floor(R.canvasInnerHeight/oe),x=R.lineHeight;if(R.minimapHeightIsEditorHeight){const pe=H*R.lineHeight+(R.scrollBeyondLastLine?B-R.lineHeight:0),fe=Math.max(1,Math.floor(B*B/pe)),re=Math.max(0,R.minimapHeight-fe),ie=re/(X-B),ae=Y*ie,q=re>0,ne=Math.floor(R.canvasInnerHeight/R.minimapLineHeight);return new b(Y,X,q,ie,ae,fe,1,Math.min(K,ne))}let U;if(W&&O!==K){const pe=O-A+1;U=Math.floor(pe*oe/se)}else{const pe=B/x;U=Math.floor(pe*oe/se)}let $;R.scrollBeyondLastLine?$=(K-1)*oe/se:$=Math.max(0,K*oe/se-U),$=Math.min(R.minimapHeight-U,$);const V=$/(X-B),Q=Y*V;let ue=0;if(R.scrollBeyondLastLine&&(ue=B/x-1),G>=K+ue){const pe=1,fe=K,re=$>0;return new b(Y,X,re,V,Q,U,pe,fe)}else{let pe=Math.max(1,Math.floor(A-Q*se/oe));Z&&Z.scrollHeight===X&&(Z.scrollTop>Y&&(pe=Math.min(pe,Z.startLineNumber)),Z.scrollTop<Y&&(pe=Math.max(pe,Z.startLineNumber)));const fe=Math.min(K,pe+G-1),re=(Y-L)/x,ie=(A-pe+re)*oe/se;return new b(Y,X,!0,V,ie,U,pe,fe)}}}class v{constructor(R){this.dy=R}onContentChanged(){this.dy=-1}onTokensChanged(){this.dy=-1}}v.INVALID=new v(-1);class m{constructor(R,A,O){this.renderedLayout=R,this._imageData=A,this._renderedLines=new C.RenderedLinesCollection(()=>v.INVALID),this._renderedLines._set(R.startLineNumber,O)}linesEquals(R){if(!this.scrollEquals(R))return!1;const O=this._renderedLines._get().lines;for(let L=0,B=O.length;L<B;L++)if(O[L].dy===-1)return!1;return!0}scrollEquals(R){return this.renderedLayout.startLineNumber===R.startLineNumber&&this.renderedLayout.endLineNumber===R.endLineNumber}_get(){const R=this._renderedLines._get();return{imageData:this._imageData,rendLineNumberStart:R.rendLineNumberStart,lines:R.lines}}onLinesChanged(R,A){return this._renderedLines.onLinesChanged(R,A)}onLinesDeleted(R,A){this._renderedLines.onLinesDeleted(R,A)}onLinesInserted(R,A){this._renderedLines.onLinesInserted(R,A)}onTokensChanged(R){return this._renderedLines.onTokensChanged(R)}}class E{constructor(R,A,O,L){this._backgroundFillData=E._createBackgroundFillData(A,O,L),this._buffers=[R.createImageData(A,O),R.createImageData(A,O)],this._lastUsedBuffer=0}getBuffer(){this._lastUsedBuffer=1-this._lastUsedBuffer;const R=this._buffers[this._lastUsedBuffer];return R.data.set(this._backgroundFillData),R}static _createBackgroundFillData(R,A,O){const L=O.r,B=O.g,W=O.b,K=O.a,H=new Uint8ClampedArray(R*A*4);let Y=0;for(let X=0;X<A;X++)for(let Z=0;Z<R;Z++)H[Y]=L,H[Y+1]=B,H[Y+2]=W,H[Y+3]=K,Y+=4;return H}}class I{constructor(R,A){this.samplingRatio=R,this.minimapLines=A}static compute(R,A,O){if(R.renderMinimap===0||!R.isSampling)return[null,[]];const L=R.pixelRatio,B=R.lineHeight,W=R.scrollBeyondLastLine,{minimapLineCount:K}=g.EditorLayoutInfoComputer.computeContainedMinimapLineCount({viewLineCount:A,scrollBeyondLastLine:W,height:R.editorHeight,lineHeight:B,pixelRatio:L}),H=A/K,Y=H/2;if(!O||O.minimapLines.length===0){let Q=[];if(Q[0]=1,K>1){for(let ue=0,pe=K-1;ue<pe;ue++)Q[ue]=Math.round(ue*H+Y);Q[K-1]=A}return[new I(H,Q),[]]}const X=O.minimapLines,Z=X.length;let se=[],oe=0,G=0,x=1;const U=10;let $=[],V=null;for(let Q=0;Q<K;Q++){const ue=Math.max(x,Math.round(Q*H)),pe=Math.max(ue,Math.round((Q+1)*H));for(;oe<Z&&X[oe]<ue;){if($.length<U){const re=oe+1+G;V&&V.type==="deleted"&&V._oldIndex===oe-1?V.deleteToLineNumber++:(V={type:"deleted",_oldIndex:oe,deleteFromLineNumber:re,deleteToLineNumber:re},$.push(V)),G--}oe++}let fe;if(oe<Z&&X[oe]<=pe)fe=X[oe],oe++;else if(Q===0?fe=1:Q+1===K?fe=A:fe=Math.round(Q*H+Y),$.length<U){const re=oe+1+G;V&&V.type==="inserted"&&V._i===Q-1?V.insertToLineNumber++:(V={type:"inserted",_i:Q,insertFromLineNumber:re,insertToLineNumber:re},$.push(V)),G++}se[Q]=fe,x=fe}if($.length<U)for(;oe<Z;){const Q=oe+1+G;V&&V.type==="deleted"&&V._oldIndex===oe-1?V.deleteToLineNumber++:(V={type:"deleted",_oldIndex:oe,deleteFromLineNumber:Q,deleteToLineNumber:Q},$.push(V)),G--,oe++}else $=[{type:"flush"}];return[new I(H,se),$]}modelLineToMinimapLine(R){return Math.min(this.minimapLines.length,Math.max(1,Math.round(R/this.samplingRatio)))}modelLineRangeToMinimapLineRange(R,A){let O=this.modelLineToMinimapLine(R)-1;for(;O>0&&this.minimapLines[O-1]>=R;)O--;let L=this.modelLineToMinimapLine(A)-1;for(;L+1<this.minimapLines.length&&this.minimapLines[L+1]<=A;)L++;if(O===L){const B=this.minimapLines[O];if(B<R||B>A)return null}return[O+1,L+1]}decorationLineRangeToMinimapLineRange(R,A){let O=this.modelLineToMinimapLine(R),L=this.modelLineToMinimapLine(A);return R!==A&&L===O&&(L===this.minimapLines.length?O>1&&O--:L++),[O,L]}onLinesDeleted(R){const A=R.toLineNumber-R.fromLineNumber+1;let O=this.minimapLines.length,L=0;for(let B=this.minimapLines.length-1;B>=0&&!(this.minimapLines[B]<R.fromLineNumber);B--)this.minimapLines[B]<=R.toLineNumber?(this.minimapLines[B]=Math.max(1,R.fromLineNumber-1),O=Math.min(O,B),L=Math.max(L,B)):this.minimapLines[B]-=A;return[O,L]}onLinesInserted(R){const A=R.toLineNumber-R.fromLineNumber+1;for(let O=this.minimapLines.length-1;O>=0&&!(this.minimapLines[O]<R.fromLineNumber);O--)this.minimapLines[O]+=A}}class k extends n.ViewPart{constructor(R){super(R);this.tokensColorTracker=c.MinimapTokensColorTracker.getInstance(),this._selections=[],this._minimapSelections=null,this.options=new _(this._context.configuration,this._context.theme,this.tokensColorTracker);const[A]=I.compute(this.options,this._context.model.getLineCount(),null);this._samplingState=A,this._shouldCheckSampling=!1,this._actual=new M(R.theme,this)}dispose(){this._actual.dispose(),super.dispose()}getDomNode(){return this._actual.getDomNode()}_onOptionsMaybeChanged(){const R=new _(this._context.configuration,this._context.theme,this.tokensColorTracker);return this.options.equals(R)?!1:(this.options=R,this._recreateLineSampling(),this._actual.onDidChangeOptions(),!0)}onConfigurationChanged(R){return this._onOptionsMaybeChanged()}onCursorStateChanged(R){return this._selections=R.selections,this._minimapSelections=null,this._actual.onSelectionChanged()}onDecorationsChanged(R){return R.affectsMinimap?this._actual.onDecorationsChanged():!1}onFlushed(R){return this._samplingState&&(this._shouldCheckSampling=!0),this._actual.onFlushed()}onLinesChanged(R){if(this._samplingState){const A=this._samplingState.modelLineRangeToMinimapLineRange(R.fromLineNumber,R.toLineNumber);return A?this._actual.onLinesChanged(A[0],A[1]):!1}else return this._actual.onLinesChanged(R.fromLineNumber,R.toLineNumber)}onLinesDeleted(R){if(this._samplingState){const[A,O]=this._samplingState.onLinesDeleted(R);return A<=O&&this._actual.onLinesChanged(A+1,O+1),this._shouldCheckSampling=!0,!0}else return this._actual.onLinesDeleted(R.fromLineNumber,R.toLineNumber)}onLinesInserted(R){return this._samplingState?(this._samplingState.onLinesInserted(R),this._shouldCheckSampling=!0,!0):this._actual.onLinesInserted(R.fromLineNumber,R.toLineNumber)}onScrollChanged(R){return this._actual.onScrollChanged()}onThemeChanged(R){return this._context.model.invalidateMinimapColorCache(),this._actual.onThemeChanged(),this._onOptionsMaybeChanged(),!0}onTokensChanged(R){if(this._samplingState){let A=[];for(const O of R.ranges){const L=this._samplingState.modelLineRangeToMinimapLineRange(O.fromLineNumber,O.toLineNumber);L&&A.push({fromLineNumber:L[0],toLineNumber:L[1]})}return A.length?this._actual.onTokensChanged(A):!1}else return this._actual.onTokensChanged(R.ranges)}onTokensColorsChanged(R){return this._onOptionsMaybeChanged(),this._actual.onTokensColorsChanged()}onZonesChanged(R){return this._actual.onZonesChanged()}prepareRender(R){this._shouldCheckSampling&&(this._shouldCheckSampling=!1,this._recreateLineSampling())}render(R){let A=R.visibleRange.startLineNumber,O=R.visibleRange.endLineNumber;this._samplingState&&(A=this._samplingState.modelLineToMinimapLine(A),O=this._samplingState.modelLineToMinimapLine(O));const L={viewportContainsWhitespaceGaps:R.viewportData.whitespaceViewportData.length>0,scrollWidth:R.scrollWidth,scrollHeight:R.scrollHeight,viewportStartLineNumber:A,viewportEndLineNumber:O,viewportStartLineNumberVerticalOffset:R.getVerticalOffsetForLineNumber(A),scrollTop:R.scrollTop,scrollLeft:R.scrollLeft,viewportWidth:R.viewportWidth,viewportHeight:R.viewportHeight};this._actual.render(L)}_recreateLineSampling(){this._minimapSelections=null;const R=Boolean(this._samplingState),[A,O]=I.compute(this.options,this._context.model.getLineCount(),this._samplingState);if(this._samplingState=A,R&&this._samplingState)for(const L of O)switch(L.type){case"deleted":this._actual.onLinesDeleted(L.deleteFromLineNumber,L.deleteToLineNumber);break;case"inserted":this._actual.onLinesInserted(L.insertFromLineNumber,L.insertToLineNumber);break;case"flush":this._actual.onFlushed();break}}getLineCount(){return this._samplingState?this._samplingState.minimapLines.length:this._context.model.getLineCount()}getRealLineCount(){return this._context.model.getLineCount()}getLineContent(R){return this._samplingState?this._context.model.getLineContent(this._samplingState.minimapLines[R-1]):this._context.model.getLineContent(R)}getLineMaxColumn(R){return this._samplingState?this._context.model.getLineMaxColumn(this._samplingState.minimapLines[R-1]):this._context.model.getLineMaxColumn(R)}getMinimapLinesRenderingData(R,A,O){if(this._samplingState){let L=[];for(let B=0,W=A-R+1;B<W;B++)O[B]?L[B]=this._context.model.getViewLineData(this._samplingState.minimapLines[R+B-1]):L[B]=null;return L}return this._context.model.getMinimapLinesRenderingData(R,A,O).data}getSelections(){if(this._minimapSelections===null)if(this._samplingState){this._minimapSelections=[];for(const R of this._selections){const[A,O]=this._samplingState.decorationLineRangeToMinimapLineRange(R.startLineNumber,R.endLineNumber);this._minimapSelections.push(new r.Selection(A,R.startColumn,O,R.endColumn))}}else this._minimapSelections=this._selections;return this._minimapSelections}getMinimapDecorationsInViewport(R,A){let O;if(this._samplingState){const B=this._samplingState.minimapLines[R-1],W=this._samplingState.minimapLines[A-1];O=new t.Range(B,1,W,this._context.model.getLineMaxColumn(W))}else O=new t.Range(R,1,A,this._context.model.getLineMaxColumn(A));const L=this._context.model.getDecorationsInViewport(O);if(this._samplingState){let B=[];for(const W of L){if(!W.options.minimap)continue;const K=W.range,H=this._samplingState.modelLineToMinimapLine(K.startLineNumber),Y=this._samplingState.modelLineToMinimapLine(K.endLineNumber);B.push(new u.ViewModelDecoration(new t.Range(H,K.startColumn,Y,K.endColumn),W.options))}return B}return L}getOptions(){return this._context.model.getTextModelOptions()}revealLineNumber(R){this._samplingState&&(R=this._samplingState.minimapLines[R-1]),this._context.model.revealRange("mouse",!1,new t.Range(R,1,R,1),1,0)}setScrollTop(R){this._context.model.setScrollPosition({scrollTop:R},1)}}e.Minimap=k;class M extends D.Disposable{constructor(R,A){super();this._renderDecorations=!1,this._gestureInProgress=!1,this._theme=R,this._model=A,this._lastRenderData=null,this._buffers=null,this._selectionColor=this._theme.getColor(d.minimapSelection),this._domNode=(0,N.createFastDomNode)(document.createElement("div")),n.PartFingerprints.write(this._domNode,8),this._domNode.setClassName(this._getMinimapDomNodeClassName()),this._domNode.setPosition("absolute"),this._domNode.setAttribute("role","presentation"),this._domNode.setAttribute("aria-hidden","true"),this._shadow=(0,N.createFastDomNode)(document.createElement("div")),this._shadow.setClassName("minimap-shadow-hidden"),this._domNode.appendChild(this._shadow),this._canvas=(0,N.createFastDomNode)(document.createElement("canvas")),this._canvas.setPosition("absolute"),this._canvas.setLeft(0),this._domNode.appendChild(this._canvas),this._decorationsCanvas=(0,N.createFastDomNode)(document.createElement("canvas")),this._decorationsCanvas.setPosition("absolute"),this._decorationsCanvas.setClassName("minimap-decorations-layer"),this._decorationsCanvas.setLeft(0),this._domNode.appendChild(this._decorationsCanvas),this._slider=(0,N.createFastDomNode)(document.createElement("div")),this._slider.setPosition("absolute"),this._slider.setClassName("minimap-slider"),this._slider.setLayerHinting(!0),this._slider.setContain("strict"),this._domNode.appendChild(this._slider),this._sliderHorizontal=(0,N.createFastDomNode)(document.createElement("div")),this._sliderHorizontal.setPosition("absolute"),this._sliderHorizontal.setClassName("minimap-slider-horizontal"),this._slider.appendChild(this._sliderHorizontal),this._applyLayout(),this._mouseDownListener=w.addStandardDisposableListener(this._domNode.domNode,"mousedown",O=>{if(O.preventDefault(),this._model.options.renderMinimap===0||!this._lastRenderData)return;if(this._model.options.size!=="proportional"){if(O.leftButton&&this._lastRenderData){const Y=w.getDomNodePagePosition(this._slider.domNode),X=Y.top+Y.height/2;this._startSliderDragging(O.buttons,O.posx,X,O.posy,this._lastRenderData.renderedLayout)}return}const B=this._model.options.minimapLineHeight,W=this._model.options.canvasInnerHeight/this._model.options.canvasOuterHeight*O.browserEvent.offsetY;let H=Math.floor(W/B)+this._lastRenderData.renderedLayout.startLineNumber;H=Math.min(H,this._model.getLineCount()),this._model.revealLineNumber(H)}),this._sliderMouseMoveMonitor=new T.GlobalMouseMoveMonitor,this._sliderMouseDownListener=w.addStandardDisposableListener(this._slider.domNode,"mousedown",O=>{O.preventDefault(),O.stopPropagation(),O.leftButton&&this._lastRenderData&&this._startSliderDragging(O.buttons,O.posx,O.posy,O.posy,this._lastRenderData.renderedLayout)}),this._gestureDisposable=o.Gesture.addTarget(this._domNode.domNode),this._sliderTouchStartListener=w.addDisposableListener(this._domNode.domNode,o.EventType.Start,O=>{O.preventDefault(),O.stopPropagation(),this._lastRenderData&&(this._slider.toggleClassName("active",!0),this._gestureInProgress=!0,this.scrollDueToTouchEvent(O))},{passive:!1}),this._sliderTouchMoveListener=w.addDisposableListener(this._domNode.domNode,o.EventType.Change,O=>{O.preventDefault(),O.stopPropagation(),this._lastRenderData&&this._gestureInProgress&&this.scrollDueToTouchEvent(O)},{passive:!1}),this._sliderTouchEndListener=w.addStandardDisposableListener(this._domNode.domNode,o.EventType.End,O=>{O.preventDefault(),O.stopPropagation(),this._gestureInProgress=!1,this._slider.toggleClassName("active",!1)})}_startSliderDragging(R,A,O,L,B){this._slider.toggleClassName("active",!0);const W=(K,H)=>{const Y=Math.abs(H-A);if(S.isWindows&&Y>f){this._model.setScrollTop(B.scrollTop);return}const X=K-O;this._model.setScrollTop(B.getDesiredScrollTopFromDelta(X))};L!==O&&W(L,A),this._sliderMouseMoveMonitor.startMonitoring(this._slider.domNode,R,T.standardMouseMoveMerger,K=>W(K.posy,K.posx),()=>{this._slider.toggleClassName("active",!1)})}scrollDueToTouchEvent(R){const A=this._domNode.domNode.getBoundingClientRect().top,O=this._lastRenderData.renderedLayout.getDesiredScrollTopFromTouchLocation(R.pageY-A);this._model.setScrollTop(O)}dispose(){this._mouseDownListener.dispose(),this._sliderMouseMoveMonitor.dispose(),this._sliderMouseDownListener.dispose(),this._gestureDisposable.dispose(),this._sliderTouchStartListener.dispose(),this._sliderTouchMoveListener.dispose(),this._sliderTouchEndListener.dispose(),super.dispose()}_getMinimapDomNodeClassName(){return this._model.options.showSlider==="always"?"minimap slider-always":"minimap slider-mouseover"}getDomNode(){return this._domNode}_applyLayout(){this._domNode.setLeft(this._model.options.minimapLeft),this._domNode.setWidth(this._model.options.minimapWidth),this._domNode.setHeight(this._model.options.minimapHeight),this._shadow.setHeight(this._model.options.minimapHeight),this._canvas.setWidth(this._model.options.canvasOuterWidth),this._canvas.setHeight(this._model.options.canvasOuterHeight),this._canvas.domNode.width=this._model.options.canvasInnerWidth,this._canvas.domNode.height=this._model.options.canvasInnerHeight,this._decorationsCanvas.setWidth(this._model.options.canvasOuterWidth),this._decorationsCanvas.setHeight(this._model.options.canvasOuterHeight),this._decorationsCanvas.domNode.width=this._model.options.canvasInnerWidth,this._decorationsCanvas.domNode.height=this._model.options.canvasInnerHeight,this._slider.setWidth(this._model.options.minimapWidth)}_getBuffer(){return this._buffers||this._model.options.canvasInnerWidth>0&&this._model.options.canvasInnerHeight>0&&(this._buffers=new E(this._canvas.domNode.getContext("2d"),this._model.options.canvasInnerWidth,this._model.options.canvasInnerHeight,this._model.options.backgroundColor)),this._buffers?this._buffers.getBuffer():null}onDidChangeOptions(){this._lastRenderData=null,this._buffers=null,this._applyLayout(),this._domNode.setClassName(this._getMinimapDomNodeClassName())}onSelectionChanged(){return this._renderDecorations=!0,!0}onDecorationsChanged(){return this._renderDecorations=!0,!0}onFlushed(){return this._lastRenderData=null,!0}onLinesChanged(R,A){return this._lastRenderData?this._lastRenderData.onLinesChanged(R,A):!1}onLinesDeleted(R,A){return this._lastRenderData&&this._lastRenderData.onLinesDeleted(R,A),!0}onLinesInserted(R,A){return this._lastRenderData&&this._lastRenderData.onLinesInserted(R,A),!0}onScrollChanged(){return this._renderDecorations=!0,!0}onThemeChanged(){return this._selectionColor=this._theme.getColor(d.minimapSelection),this._renderDecorations=!0,!0}onTokensChanged(R){return this._lastRenderData?this._lastRenderData.onTokensChanged(R):!1}onTokensColorsChanged(){return this._lastRenderData=null,this._buffers=null,!0}onZonesChanged(){return this._lastRenderData=null,!0}render(R){if(this._model.options.renderMinimap===0){this._shadow.setClassName("minimap-shadow-hidden"),this._sliderHorizontal.setWidth(0),this._sliderHorizontal.setHeight(0);return}R.scrollLeft+R.viewportWidth>=R.scrollWidth?this._shadow.setClassName("minimap-shadow-hidden"):this._shadow.setClassName("minimap-shadow-visible");const O=b.create(this._model.options,R.viewportStartLineNumber,R.viewportEndLineNumber,R.viewportStartLineNumberVerticalOffset,R.viewportHeight,R.viewportContainsWhitespaceGaps,this._model.getLineCount(),this._model.getRealLineCount(),R.scrollTop,R.scrollHeight,this._lastRenderData?this._lastRenderData.renderedLayout:null);this._slider.setDisplay(O.sliderNeeded?"block":"none"),this._slider.setTop(O.sliderTop),this._slider.setHeight(O.sliderHeight),this._sliderHorizontal.setLeft(0),this._sliderHorizontal.setWidth(this._model.options.minimapWidth),this._sliderHorizontal.setTop(0),this._sliderHorizontal.setHeight(O.sliderHeight),this.renderDecorations(O),this._lastRenderData=this.renderLines(O)}renderDecorations(R){if(this._renderDecorations){this._renderDecorations=!1;const A=this._model.getSelections();A.sort(t.Range.compareRangesUsingStarts);const O=this._model.getMinimapDecorationsInViewport(R.startLineNumber,R.endLineNumber);O.sort((se,oe)=>(se.options.zIndex||0)-(oe.options.zIndex||0));const{canvasInnerWidth:L,canvasInnerHeight:B}=this._model.options,W=this._model.options.minimapLineHeight,K=this._model.options.minimapCharWidth,H=this._model.getOptions().tabSize,Y=this._decorationsCanvas.domNode.getContext("2d");Y.clearRect(0,0,L,B);const X=new P(R.startLineNumber,R.endLineNumber,!1);this._renderSelectionLineHighlights(Y,A,X,R,W),this._renderDecorationsLineHighlights(Y,O,X,R,W);const Z=new P(R.startLineNumber,R.endLineNumber,null);this._renderSelectionsHighlights(Y,A,Z,R,W,H,K,L),this._renderDecorationsHighlights(Y,O,Z,R,W,H,K,L)}}_renderSelectionLineHighlights(R,A,O,L,B){if(!this._selectionColor||this._selectionColor.isTransparent())return;R.fillStyle=this._selectionColor.transparent(.5).toString();let W=0,K=0;for(const H of A){const Y=Math.max(L.startLineNumber,H.startLineNumber),X=Math.min(L.endLineNumber,H.endLineNumber);if(Y>X)continue;for(let oe=Y;oe<=X;oe++)O.set(oe,!0);const Z=(Y-L.startLineNumber)*B,se=(X-L.startLineNumber)*B+B;K>=Z||(K>W&&R.fillRect(g.MINIMAP_GUTTER_WIDTH,W,R.canvas.width,K-W),W=Z),K=se}K>W&&R.fillRect(g.MINIMAP_GUTTER_WIDTH,W,R.canvas.width,K-W)}_renderDecorationsLineHighlights(R,A,O,L,B){const W=new Map;for(let K=A.length-1;K>=0;K--){const H=A[K],Y=H.options.minimap;if(!Y||Y.position!==l.MinimapPosition.Inline)continue;const X=Math.max(L.startLineNumber,H.range.startLineNumber),Z=Math.min(L.endLineNumber,H.range.endLineNumber);if(X>Z)continue;const se=Y.getColor(this._theme);if(!se||se.isTransparent())continue;let oe=W.get(se.toString());oe||(oe=se.transparent(.5).toString(),W.set(se.toString(),oe)),R.fillStyle=oe;for(let G=X;G<=Z;G++){if(O.has(G))continue;O.set(G,!0);const x=(X-L.startLineNumber)*B;R.fillRect(g.MINIMAP_GUTTER_WIDTH,x,R.canvas.width,B)}}}_renderSelectionsHighlights(R,A,O,L,B,W,K,H){if(!(!this._selectionColor||this._selectionColor.isTransparent()))for(const Y of A){const X=Math.max(L.startLineNumber,Y.startLineNumber),Z=Math.min(L.endLineNumber,Y.endLineNumber);if(!(X>Z))for(let se=X;se<=Z;se++)this.renderDecorationOnLine(R,O,Y,this._selectionColor,L,se,B,B,W,K,H)}}_renderDecorationsHighlights(R,A,O,L,B,W,K,H){for(const Y of A){const X=Y.options.minimap;if(!X)continue;const Z=Math.max(L.startLineNumber,Y.range.startLineNumber),se=Math.min(L.endLineNumber,Y.range.endLineNumber);if(Z>se)continue;const oe=X.getColor(this._theme);if(!(!oe||oe.isTransparent()))for(let G=Z;G<=se;G++)switch(X.position){case l.MinimapPosition.Inline:this.renderDecorationOnLine(R,O,Y.range,oe,L,G,B,B,W,K,H);continue;case l.MinimapPosition.Gutter:const x=(G-L.startLineNumber)*B,U=2;this.renderDecoration(R,oe,U,x,y,B);continue}}}renderDecorationOnLine(R,A,O,L,B,W,K,H,Y,X,Z){const se=(W-B.startLineNumber)*H;if(se+K<0||se>this._model.options.canvasInnerHeight)return;const{startLineNumber:oe,endLineNumber:G}=O,x=oe===W?O.startColumn:1,U=G===W?O.endColumn:this._model.getLineMaxColumn(W),$=this.getXOffsetForPosition(A,W,x,Y,X,Z),V=this.getXOffsetForPosition(A,W,U,Y,X,Z);this.renderDecoration(R,L,$,se,V-$,K)}getXOffsetForPosition(R,A,O,L,B,W){if(O===1)return g.MINIMAP_GUTTER_WIDTH;if((O-1)*B>=W)return W;let H=R.get(A);if(!H){const Y=this._model.getLineContent(A);H=[g.MINIMAP_GUTTER_WIDTH];let X=g.MINIMAP_GUTTER_WIDTH;for(let Z=1;Z<Y.length+1;Z++){const se=Y.charCodeAt(Z-1),oe=se===9?L*B:p.isFullWidthCharacter(se)?2*B:B,G=X+oe;if(G>=W){H[Z]=W;break}H[Z]=G,X=G}R.set(A,H)}return O-1<H.length?H[O-1]:W}renderDecoration(R,A,O,L,B,W){R.fillStyle=A&&A.toString()||"",R.fillRect(O,L,B,W)}renderLines(R){const A=R.startLineNumber,O=R.endLineNumber,L=this._model.options.minimapLineHeight;if(this._lastRenderData&&this._lastRenderData.linesEquals(R)){const z=this._lastRenderData._get();return new m(R,z.imageData,z.lines)}const B=this._getBuffer();if(!B)return null;let[W,K,H]=M._renderUntouchedLines(B,A,O,L,this._lastRenderData);const Y=this._model.getMinimapLinesRenderingData(A,O,H),X=this._model.getOptions().tabSize,Z=this._model.options.defaultBackgroundColor,se=this._model.options.backgroundColor,oe=this._model.options.foregroundAlpha,G=this._model.tokensColorTracker,x=G.backgroundIsLight(),U=this._model.options.renderMinimap,$=this._model.options.charRenderer(),V=this._model.options.fontScale,Q=this._model.options.minimapCharWidth,pe=(U===1?2:2+1)*V,fe=L>pe?Math.floor((L-pe)/2):0,re=se.a/255,ie=new s.RGBA8(Math.round((se.r-Z.r)*re+Z.r),Math.round((se.g-Z.g)*re+Z.g),Math.round((se.b-Z.b)*re+Z.b),255);let ae=0;const q=[];for(let z=0,te=O-A+1;z<te;z++)H[z]&&M._renderLine(B,ie,se.a,x,U,Q,G,oe,$,ae,fe,X,Y[z],V,L),q[z]=new v(ae),ae+=L;const ne=W===-1?0:W,le=(K===-1?B.height:K)-ne;return this._canvas.domNode.getContext("2d").putImageData(B,0,0,0,ne,B.width,le),new m(R,B,q)}static _renderUntouchedLines(R,A,O,L,B){const W=[];if(!B){for(let ie=0,ae=O-A+1;ie<ae;ie++)W[ie]=!0;return[-1,-1,W]}const K=B._get(),H=K.imageData.data,Y=K.rendLineNumberStart,X=K.lines,Z=X.length,se=R.width,oe=R.data,G=(O-A+1)*L*se*4;let x=-1,U=-1,$=-1,V=-1,Q=-1,ue=-1,pe=0;for(let ie=A;ie<=O;ie++){const ae=ie-A,q=ie-Y,ne=q>=0&&q<Z?X[q].dy:-1;if(ne===-1){W[ae]=!0,pe+=L;continue}const ce=ne*se*4,le=(ne+L)*se*4,de=pe*se*4,z=(pe+L)*se*4;V===ce&&ue===de?(V=le,ue=z):($!==-1&&(oe.set(H.subarray($,V),Q),x===-1&&$===0&&$===Q&&(x=V),U===-1&&V===G&&$===Q&&(U=$)),$=ce,V=le,Q=de,ue=z),W[ae]=!1,pe+=L}$!==-1&&(oe.set(H.subarray($,V),Q),x===-1&&$===0&&$===Q&&(x=V),U===-1&&V===G&&$===Q&&(U=$));const fe=x===-1?-1:x/(se*4),re=U===-1?-1:U/(se*4);return[fe,re,W]}static _renderLine(R,A,O,L,B,W,K,H,Y,X,Z,se,oe,G,x){const U=oe.content,$=oe.tokens,V=R.width-W,Q=x===1;let ue=g.MINIMAP_GUTTER_WIDTH,pe=0,fe=0;for(let re=0,ie=$.getCount();re<ie;re++){const ae=$.getEndOffset(re),q=$.getForeground(re),ne=K.getColor(q);for(;pe<ae;pe++){if(ue>V)return;const ce=U.charCodeAt(pe);if(ce===9){const le=se-(pe+fe)%se;fe+=le-1,ue+=le*W}else if(ce===32)ue+=W;else{const le=p.isFullWidthCharacter(ce)?2:1;for(let de=0;de<le;de++)if(B===2?Y.blockRenderChar(R,ue,X+Z,ne,H,A,O,Q):Y.renderChar(R,ue,X+Z,ce,ne,H,A,O,G,L,Q),ue+=W,ue>V)return}}}}}class P{constructor(R,A,O){this._startLineNumber=R,this._endLineNumber=A,this._defaultValue=O,this._values=[];for(let L=0,B=this._endLineNumber-this._startLineNumber+1;L<B;L++)this._values[L]=O}has(R){return this.get(R)!==this._defaultValue}set(R,A){R<this._startLineNumber||R>this._endLineNumber||(this._values[R-this._startLineNumber]=A)}get(R){return R<this._startLineNumber||R>this._endLineNumber?this._defaultValue:this._values[R-this._startLineNumber]}}(0,a.registerThemingParticipant)((F,R)=>{const A=F.getColor(d.minimapSliderBackground);A&&R.addRule(`.monaco-editor .minimap-slider .minimap-slider-horizontal { background: ${A}; }`);const O=F.getColor(d.minimapSliderHoverBackground);O&&R.addRule(`.monaco-editor .minimap-slider:hover .minimap-slider-horizontal { background: ${O}; }`);const L=F.getColor(d.minimapSliderActiveBackground);L&&R.addRule(`.monaco-editor .minimap-slider.active .minimap-slider-horizontal { background: ${L}; }`);const B=F.getColor(d.scrollbarShadow);B&&R.addRule(`.monaco-editor .minimap-shadow-visible { box-shadow: ${B} -6px 0 6px -6px inset; }`)})}),define(J[604],ee([0,1,30,50,21,10,348]),function(j,e,w,N,T,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ScrollDecorationViewPart=void 0;class S extends N.ViewPart{constructor(C){super(C);this._scrollTop=0,this._width=0,this._updateWidth(),this._shouldShow=!1;const g=this._context.configuration.options.get(91);this._useShadows=g.useShadows,this._domNode=(0,w.createFastDomNode)(document.createElement("div")),this._domNode.setAttribute("role","presentation"),this._domNode.setAttribute("aria-hidden","true")}dispose(){super.dispose()}_updateShouldShow(){const C=this._useShadows&&this._scrollTop>0;return this._shouldShow!==C?(this._shouldShow=C,!0):!1}getDomNode(){return this._domNode}_updateWidth(){const n=this._context.configuration.options.get(129);n.minimap.renderMinimap===0||n.minimap.minimapWidth>0&&n.minimap.minimapLeft===0?this._width=n.width:this._width=n.width-n.minimap.minimapWidth-n.verticalScrollbarWidth}onConfigurationChanged(C){const g=this._context.configuration.options.get(91);return this._useShadows=g.useShadows,this._updateWidth(),this._updateShouldShow(),!0}onScrollChanged(C){return this._scrollTop=C.scrollTop,this._updateShouldShow()}prepareRender(C){}render(C){this._domNode.setWidth(this._width),this._domNode.setClassName(this._shouldShow?"scroll-decoration":"")}}e.ScrollDecorationViewPart=S,(0,D.registerThemingParticipant)((p,C)=>{const n=p.getColor(T.scrollbarShadow);n&&C.addRule(`.monaco-editor .scroll-decoration { box-shadow: ${n} 0 6px 6px -6px inset; }`)})}),define(J[605],ee([0,1,100,21,10,349]),function(j,e,w,N,T){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SelectionsOverlay=void 0;class D{constructor(s){this.left=s.left,this.width=s.width,this.startStyle=null,this.endStyle=null}}class S{constructor(s,c){this.lineNumber=s,this.ranges=c}}function p(t){return new D(t)}function C(t){return new S(t.lineNumber,t.ranges.map(p))}class n extends w.DynamicViewOverlay{constructor(s){super();this._previousFrameVisibleRangesWithStyle=[],this._context=s;const c=this._context.configuration.options;this._lineHeight=c.get(58),this._roundedSelection=c.get(89),this._typicalHalfwidthCharacterWidth=c.get(43).typicalHalfwidthCharacterWidth,this._selections=[],this._renderResult=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(s){const c=this._context.configuration.options;return this._lineHeight=c.get(58),this._roundedSelection=c.get(89),this._typicalHalfwidthCharacterWidth=c.get(43).typicalHalfwidthCharacterWidth,!0}onCursorStateChanged(s){return this._selections=s.selections.slice(0),!0}onDecorationsChanged(s){return!0}onFlushed(s){return!0}onLinesChanged(s){return!0}onLinesDeleted(s){return!0}onLinesInserted(s){return!0}onScrollChanged(s){return s.scrollTopChanged}onZonesChanged(s){return!0}_visibleRangesHaveGaps(s){for(let c=0,u=s.length;c<u;c++)if(s[c].ranges.length>1)return!0;return!1}_enrichVisibleRangesWithStyle(s,c,u){const d=this._typicalHalfwidthCharacterWidth/4;let a=null,r=null;if(u&&u.length>0&&c.length>0){const o=c[0].lineNumber;if(o===s.startLineNumber)for(let l=0;!a&&l<u.length;l++)u[l].lineNumber===o&&(a=u[l].ranges[0]);const i=c[c.length-1].lineNumber;if(i===s.endLineNumber)for(let l=u.length-1;!r&&l>=0;l--)u[l].lineNumber===i&&(r=u[l].ranges[0]);a&&!a.startStyle&&(a=null),r&&!r.startStyle&&(r=null)}for(let o=0,i=c.length;o<i;o++){const l=c[o].ranges[0],h=l.left,f=l.left+l.width,y={top:0,bottom:0},_={top:0,bottom:0};if(o>0){const b=c[o-1].ranges[0].left,v=c[o-1].ranges[0].left+c[o-1].ranges[0].width;g(h-b)<d?y.top=2:h>b&&(y.top=1),g(f-v)<d?_.top=2:b<f&&f<v&&(_.top=1)}else a&&(y.top=a.startStyle.top,_.top=a.endStyle.top);if(o+1<i){const b=c[o+1].ranges[0].left,v=c[o+1].ranges[0].left+c[o+1].ranges[0].width;g(h-b)<d?y.bottom=2:b<h&&h<v&&(y.bottom=1),g(f-v)<d?_.bottom=2:f<v&&(_.bottom=1)}else r&&(y.bottom=r.startStyle.bottom,_.bottom=r.endStyle.bottom);l.startStyle=y,l.endStyle=_}}_getVisibleRangesWithStyle(s,c,u){const a=(c.linesVisibleRangesForRange(s,!0)||[]).map(C);return!this._visibleRangesHaveGaps(a)&&this._roundedSelection&&this._enrichVisibleRangesWithStyle(c.visibleRange,a,u),a}_createSelectionPiece(s,c,u,d,a){return'<div class="cslr '+u+'" style="top:'+s.toString()+"px;left:"+d.toString()+"px;width:"+a.toString()+"px;height:"+c+'px;"></div>'}_actualRenderOneSelection(s,c,u,d){if(d.length===0)return;const a=!!d[0].ranges[0].startStyle,r=this._lineHeight.toString(),o=(this._lineHeight-1).toString(),i=d[0].lineNumber,l=d[d.length-1].lineNumber;for(let h=0,f=d.length;h<f;h++){const y=d[h],_=y.lineNumber,b=_-c,v=u&&(_===l||_===i)?o:r,m=u&&_===i?1:0;let E="",I="";for(let k=0,M=y.ranges.length;k<M;k++){const P=y.ranges[k];if(a){const R=P.startStyle,A=P.endStyle;if(R.top===1||R.bottom===1){E+=this._createSelectionPiece(m,v,n.SELECTION_CLASS_NAME,P.left-n.ROUNDED_PIECE_WIDTH,n.ROUNDED_PIECE_WIDTH);let O=n.EDITOR_BACKGROUND_CLASS_NAME;R.top===1&&(O+=" "+n.SELECTION_TOP_RIGHT),R.bottom===1&&(O+=" "+n.SELECTION_BOTTOM_RIGHT),E+=this._createSelectionPiece(m,v,O,P.left-n.ROUNDED_PIECE_WIDTH,n.ROUNDED_PIECE_WIDTH)}if(A.top===1||A.bottom===1){E+=this._createSelectionPiece(m,v,n.SELECTION_CLASS_NAME,P.left+P.width,n.ROUNDED_PIECE_WIDTH);let O=n.EDITOR_BACKGROUND_CLASS_NAME;A.top===1&&(O+=" "+n.SELECTION_TOP_LEFT),A.bottom===1&&(O+=" "+n.SELECTION_BOTTOM_LEFT),E+=this._createSelectionPiece(m,v,O,P.left+P.width,n.ROUNDED_PIECE_WIDTH)}}let F=n.SELECTION_CLASS_NAME;if(a){const R=P.startStyle,A=P.endStyle;R.top===0&&(F+=" "+n.SELECTION_TOP_LEFT),R.bottom===0&&(F+=" "+n.SELECTION_BOTTOM_LEFT),A.top===0&&(F+=" "+n.SELECTION_TOP_RIGHT),A.bottom===0&&(F+=" "+n.SELECTION_BOTTOM_RIGHT)}I+=this._createSelectionPiece(m,v,F,P.left,P.width)}s[b][0]+=E,s[b][1]+=I}}prepareRender(s){const c=[],u=s.visibleRange.startLineNumber,d=s.visibleRange.endLineNumber;for(let r=u;r<=d;r++){const o=r-u;c[o]=["",""]}const a=[];for(let r=0,o=this._selections.length;r<o;r++){const i=this._selections[r];if(i.isEmpty()){a[r]=null;continue}const l=this._getVisibleRangesWithStyle(i,s,this._previousFrameVisibleRangesWithStyle[r]);a[r]=l,this._actualRenderOneSelection(c,u,this._selections.length>1,l)}this._previousFrameVisibleRangesWithStyle=a,this._renderResult=c.map(([r,o])=>r+o)}render(s,c){if(!this._renderResult)return"";const u=c-s;return u<0||u>=this._renderResult.length?"":this._renderResult[u]}}e.SelectionsOverlay=n,n.SELECTION_CLASS_NAME="selected-text",n.SELECTION_TOP_LEFT="top-left-radius",n.SELECTION_BOTTOM_LEFT="bottom-left-radius",n.SELECTION_TOP_RIGHT="top-right-radius",n.SELECTION_BOTTOM_RIGHT="bottom-right-radius",n.EDITOR_BACKGROUND_CLASS_NAME="monaco-editor-background",n.ROUNDED_PIECE_WIDTH=10,(0,T.registerThemingParticipant)((t,s)=>{const c=t.getColor(N.editorSelectionBackground);c&&s.addRule(`.monaco-editor .focused .selected-text { background-color: ${c}; }`);const u=t.getColor(N.editorInactiveSelection);u&&s.addRule(`.monaco-editor .selected-text { background-color: ${u}; }`);const d=t.getColor(N.editorSelectionForeground);d&&!d.isTransparent()&&s.addRule(`.monaco-editor .view-line span.inline-selected-text { color: ${d}; }`)});function g(t){return t<0?-t:t}}),define(J[268],ee([0,1,18,10,72,148,39]),function(j,e,w,N,T,D,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.toMultilineTokens2=e.SemanticTokensProviderStyling=void 0;let p=class{constructor(s,c,u,d){this._legend=s,this._themeService=c,this._modeService=u,this._logService=d,this._hashTable=new g,this._hasWarnedOverlappingTokens=!1}getMetadata(s,c,u){const d=this._modeService.languageIdCodec.encodeLanguageId(u),a=this._hashTable.get(s,c,d);let r;if(a)r=a.metadata,this._logService.getLevel()===T.LogLevel.Trace&&this._logService.trace(`SemanticTokensProviderStyling [CACHED] ${s} / ${c}: foreground ${w.TokenMetadata.getForeground(r)}, fontStyle ${w.TokenMetadata.getFontStyle(r).toString(2)}`);else{let o=this._legend.tokenTypes[s];const i=[];if(o){let l=c;for(let f=0;l>0&&f<this._legend.tokenModifiers.length;f++)l&1&&i.push(this._legend.tokenModifiers[f]),l=l>>1;l>0&&this._logService.getLevel()===T.LogLevel.Trace&&(this._logService.trace(`SemanticTokensProviderStyling: unknown token modifier index: ${c.toString(2)} for legend: ${JSON.stringify(this._legend.tokenModifiers)}`),i.push("not-in-legend"));const h=this._themeService.getColorTheme().getTokenStyleMetadata(o,i,u);typeof h=="undefined"?r=2147483647:(r=0,typeof h.italic!="undefined"&&(r|=(h.italic?1:0)<<11|1),typeof h.bold!="undefined"&&(r|=(h.bold?2:0)<<11|2),typeof h.underline!="undefined"&&(r|=(h.underline?4:0)<<11|4),h.foreground&&(r|=h.foreground<<14|8),r===0&&(r=2147483647))}else this._logService.getLevel()===T.LogLevel.Trace&&this._logService.trace(`SemanticTokensProviderStyling: unknown token type index: ${s} for legend: ${JSON.stringify(this._legend.tokenTypes)}`),r=2147483647,o="not-in-legend";this._hashTable.add(s,c,d,r),this._logService.getLevel()===T.LogLevel.Trace&&this._logService.trace(`SemanticTokensProviderStyling ${s} (${o}) / ${c} (${i.join(" ")}): foreground ${w.TokenMetadata.getForeground(r)}, fontStyle ${w.TokenMetadata.getFontStyle(r).toString(2)}`)}return r}warnOverlappingSemanticTokens(s,c){this._hasWarnedOverlappingTokens||(this._hasWarnedOverlappingTokens=!0,console.warn(`Overlapping semantic tokens detected at lineNumber ${s}, column ${c}`))}};p=Fe([Ce(1,N.IThemeService),Ce(2,S.IModeService),Ce(3,T.ILogService)],p),e.SemanticTokensProviderStyling=p;function C(t,s,c){const u=t.data,d=t.data.length/5|0,a=Math.max(Math.ceil(d/1024),400),r=[];let o=0,i=1,l=0;for(;o<d;){const h=o;let f=Math.min(h+a,d);if(f<d){let k=f;for(;k-1>h&&u[5*k]===0;)k--;if(k-1===h){let M=f;for(;M+1<d&&u[5*M]===0;)M++;f=M}else f=k}let y=new Uint32Array((f-h)*4),_=0,b=0,v=0,m=0,E=0;for(;o<f;){const k=5*o,M=u[k],P=u[k+1],F=i+M|0,R=M===0?l+P|0:P,A=u[k+2],O=u[k+3],L=u[k+4],B=s.getMetadata(O,L,c);B!==2147483647&&(b===0&&(b=F),v===F&&E>R&&(s.warnOverlappingSemanticTokens(F,R+1),m<R?y[_-4+2]=R:_-=4),y[_]=F-b,y[_+1]=R,y[_+2]=R+A,y[_+3]=B,_+=4,v=F,m=R,E=R+A),i=F,l=R,o++}_!==y.length&&(y=y.subarray(0,_));const I=new D.MultilineTokens2(b,new D.SparseEncodedTokens(y));r.push(I)}return r}e.toMultilineTokens2=C;class n{constructor(s,c,u,d){this.tokenTypeIndex=s,this.tokenModifierSet=c,this.languageId=u,this.metadata=d,this.next=null}}class g{constructor(){this._elementsCount=0,this._currentLengthIndex=0,this._currentLength=g._SIZES[this._currentLengthIndex],this._growCount=Math.round(this._currentLengthIndex+1<g._SIZES.length?2/3*this._currentLength:0),this._elements=[],g._nullOutEntries(this._elements,this._currentLength)}static _nullOutEntries(s,c){for(let u=0;u<c;u++)s[u]=null}_hash2(s,c){return(s<<5)-s+c|0}_hashFunc(s,c,u){return this._hash2(this._hash2(s,c),u)%this._currentLength}get(s,c,u){const d=this._hashFunc(s,c,u);let a=this._elements[d];for(;a;){if(a.tokenTypeIndex===s&&a.tokenModifierSet===c&&a.languageId===u)return a;a=a.next}return null}add(s,c,u,d){if(this._elementsCount++,this._growCount!==0&&this._elementsCount>=this._growCount){const a=this._elements;this._currentLengthIndex++,this._currentLength=g._SIZES[this._currentLengthIndex],this._growCount=Math.round(this._currentLengthIndex+1<g._SIZES.length?2/3*this._currentLength:0),this._elements=[],g._nullOutEntries(this._elements,this._currentLength);for(const r of a){let o=r;for(;o;){const i=o.next;o.next=null,this._add(o),o=i}}}this._add(new n(s,c,u,d))}_add(s){const c=this._hashFunc(s.tokenTypeIndex,s.tokenModifierSet,s.languageId);s.next=this._elements[c],this._elements[c]=s}}g._SIZES=[3,7,13,31,61,127,251,509,1021,2039,4093,8191,16381,32749,65521,131071,262139,524287,1048573,2097143]}),define(J[46],ee([0,1,481,29,21,10]),function(j,e,w,N,T,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.editorBracketPairGuideActiveBackground6=e.editorBracketPairGuideActiveBackground5=e.editorBracketPairGuideActiveBackground4=e.editorBracketPairGuideActiveBackground3=e.editorBracketPairGuideActiveBackground2=e.editorBracketPairGuideActiveBackground1=e.editorBracketPairGuideBackground6=e.editorBracketPairGuideBackground5=e.editorBracketPairGuideBackground4=e.editorBracketPairGuideBackground3=e.editorBracketPairGuideBackground2=e.editorBracketPairGuideBackground1=e.editorBracketHighlightingUnexpectedBracketForeground=e.editorBracketHighlightingForeground6=e.editorBracketHighlightingForeground5=e.editorBracketHighlightingForeground4=e.editorBracketHighlightingForeground3=e.editorBracketHighlightingForeground2=e.editorBracketHighlightingForeground1=e.overviewRulerInfo=e.overviewRulerWarning=e.overviewRulerError=e.overviewRulerRangeHighlight=e.ghostTextForeground=e.ghostTextBorder=e.editorUnnecessaryCodeOpacity=e.editorUnnecessaryCodeBorder=e.editorGutter=e.editorOverviewRulerBackground=e.editorOverviewRulerBorder=e.editorBracketMatchBorder=e.editorBracketMatchBackground=e.editorCodeLensForeground=e.editorRuler=e.editorActiveLineNumber=e.editorLineNumbers=e.editorActiveIndentGuides=e.editorIndentGuides=e.editorWhitespaces=e.editorCursorBackground=e.editorCursorForeground=e.editorSymbolHighlightBorder=e.editorSymbolHighlight=e.editorRangeHighlightBorder=e.editorRangeHighlight=e.editorLineHighlightBorder=e.editorLineHighlight=void 0,e.editorLineHighlight=(0,T.registerColor)("editor.lineHighlightBackground",{dark:null,light:null,hc:null},w.localize(0,null)),e.editorLineHighlightBorder=(0,T.registerColor)("editor.lineHighlightBorder",{dark:"#282828",light:"#eeeeee",hc:"#f38518"},w.localize(1,null)),e.editorRangeHighlight=(0,T.registerColor)("editor.rangeHighlightBackground",{dark:"#ffffff0b",light:"#fdff0033",hc:null},w.localize(2,null),!0),e.editorRangeHighlightBorder=(0,T.registerColor)("editor.rangeHighlightBorder",{dark:null,light:null,hc:T.activeContrastBorder},w.localize(3,null),!0),e.editorSymbolHighlight=(0,T.registerColor)("editor.symbolHighlightBackground",{dark:T.editorFindMatchHighlight,light:T.editorFindMatchHighlight,hc:null},w.localize(4,null),!0),e.editorSymbolHighlightBorder=(0,T.registerColor)("editor.symbolHighlightBorder",{dark:null,light:null,hc:T.activeContrastBorder},w.localize(5,null),!0),e.editorCursorForeground=(0,T.registerColor)("editorCursor.foreground",{dark:"#AEAFAD",light:N.Color.black,hc:N.Color.white},w.localize(6,null)),e.editorCursorBackground=(0,T.registerColor)("editorCursor.background",null,w.localize(7,null)),e.editorWhitespaces=(0,T.registerColor)("editorWhitespace.foreground",{dark:"#e3e4e229",light:"#33333333",hc:"#e3e4e229"},w.localize(8,null)),e.editorIndentGuides=(0,T.registerColor)("editorIndentGuide.background",{dark:e.editorWhitespaces,light:e.editorWhitespaces,hc:e.editorWhitespaces},w.localize(9,null)),e.editorActiveIndentGuides=(0,T.registerColor)("editorIndentGuide.activeBackground",{dark:e.editorWhitespaces,light:e.editorWhitespaces,hc:e.editorWhitespaces},w.localize(10,null)),e.editorLineNumbers=(0,T.registerColor)("editorLineNumber.foreground",{dark:"#858585",light:"#237893",hc:N.Color.white},w.localize(11,null));const S=(0,T.registerColor)("editorActiveLineNumber.foreground",{dark:"#c6c6c6",light:"#0B216F",hc:T.activeContrastBorder},w.localize(12,null),!1,w.localize(13,null));e.editorActiveLineNumber=(0,T.registerColor)("editorLineNumber.activeForeground",{dark:S,light:S,hc:S},w.localize(14,null)),e.editorRuler=(0,T.registerColor)("editorRuler.foreground",{dark:"#5A5A5A",light:N.Color.lightgrey,hc:N.Color.white},w.localize(15,null)),e.editorCodeLensForeground=(0,T.registerColor)("editorCodeLens.foreground",{dark:"#999999",light:"#919191",hc:"#999999"},w.localize(16,null)),e.editorBracketMatchBackground=(0,T.registerColor)("editorBracketMatch.background",{dark:"#0064001a",light:"#0064001a",hc:"#0064001a"},w.localize(17,null)),e.editorBracketMatchBorder=(0,T.registerColor)("editorBracketMatch.border",{dark:"#888",light:"#B9B9B9",hc:T.contrastBorder},w.localize(18,null)),e.editorOverviewRulerBorder=(0,T.registerColor)("editorOverviewRuler.border",{dark:"#7f7f7f4d",light:"#7f7f7f4d",hc:"#7f7f7f4d"},w.localize(19,null)),e.editorOverviewRulerBackground=(0,T.registerColor)("editorOverviewRuler.background",null,w.localize(20,null)),e.editorGutter=(0,T.registerColor)("editorGutter.background",{dark:T.editorBackground,light:T.editorBackground,hc:T.editorBackground},w.localize(21,null)),e.editorUnnecessaryCodeBorder=(0,T.registerColor)("editorUnnecessaryCode.border",{dark:null,light:null,hc:N.Color.fromHex("#fff").transparent(.8)},w.localize(22,null)),e.editorUnnecessaryCodeOpacity=(0,T.registerColor)("editorUnnecessaryCode.opacity",{dark:N.Color.fromHex("#000a"),light:N.Color.fromHex("#0007"),hc:null},w.localize(23,null)),e.ghostTextBorder=(0,T.registerColor)("editorGhostText.border",{dark:null,light:null,hc:N.Color.fromHex("#fff").transparent(.8)},w.localize(24,null)),e.ghostTextForeground=(0,T.registerColor)("editorGhostText.foreground",{dark:N.Color.fromHex("#ffffff56"),light:N.Color.fromHex("#0007"),hc:null},w.localize(25,null));const p=new N.Color(new N.RGBA(0,122,204,.6));e.overviewRulerRangeHighlight=(0,T.registerColor)("editorOverviewRuler.rangeHighlightForeground",{dark:p,light:p,hc:p},w.localize(26,null),!0),e.overviewRulerError=(0,T.registerColor)("editorOverviewRuler.errorForeground",{dark:new N.Color(new N.RGBA(255,18,18,.7)),light:new N.Color(new N.RGBA(255,18,18,.7)),hc:new N.Color(new N.RGBA(255,50,50,1))},w.localize(27,null)),e.overviewRulerWarning=(0,T.registerColor)("editorOverviewRuler.warningForeground",{dark:T.editorWarningForeground,light:T.editorWarningForeground,hc:T.editorWarningBorder},w.localize(28,null)),e.overviewRulerInfo=(0,T.registerColor)("editorOverviewRuler.infoForeground",{dark:T.editorInfoForeground,light:T.editorInfoForeground,hc:T.editorInfoBorder},w.localize(29,null)),e.editorBracketHighlightingForeground1=(0,T.registerColor)("editorBracketHighlight.foreground1",{dark:"#FFD700",light:"#0431FAFF",hc:"#FFD700"},w.localize(30,null)),e.editorBracketHighlightingForeground2=(0,T.registerColor)("editorBracketHighlight.foreground2",{dark:"#DA70D6",light:"#319331FF",hc:"#DA70D6"},w.localize(31,null)),e.editorBracketHighlightingForeground3=(0,T.registerColor)("editorBracketHighlight.foreground3",{dark:"#179FFF",light:"#7B3814FF",hc:"#87CEFA"},w.localize(32,null)),e.editorBracketHighlightingForeground4=(0,T.registerColor)("editorBracketHighlight.foreground4",{dark:"#00000000",light:"#00000000",hc:"#00000000"},w.localize(33,null)),e.editorBracketHighlightingForeground5=(0,T.registerColor)("editorBracketHighlight.foreground5",{dark:"#00000000",light:"#00000000",hc:"#00000000"},w.localize(34,null)),e.editorBracketHighlightingForeground6=(0,T.registerColor)("editorBracketHighlight.foreground6",{dark:"#00000000",light:"#00000000",hc:"#00000000"},w.localize(35,null)),e.editorBracketHighlightingUnexpectedBracketForeground=(0,T.registerColor)("editorBracketHighlight.unexpectedBracket.foreground",{dark:new N.Color(new N.RGBA(255,18,18,.8)),light:new N.Color(new N.RGBA(255,18,18,.8)),hc:new N.Color(new N.RGBA(255,50,50,1))},w.localize(36,null)),e.editorBracketPairGuideBackground1=(0,T.registerColor)("editorBracketPairGuide.background1",{dark:"#00000000",light:"#00000000",hc:"#00000000"},w.localize(37,null)),e.editorBracketPairGuideBackground2=(0,T.registerColor)("editorBracketPairGuide.background2",{dark:"#00000000",light:"#00000000",hc:"#00000000"},w.localize(38,null)),e.editorBracketPairGuideBackground3=(0,T.registerColor)("editorBracketPairGuide.background3",{dark:"#00000000",light:"#00000000",hc:"#00000000"},w.localize(39,null)),e.editorBracketPairGuideBackground4=(0,T.registerColor)("editorBracketPairGuide.background4",{dark:"#00000000",light:"#00000000",hc:"#00000000"},w.localize(40,null)),e.editorBracketPairGuideBackground5=(0,T.registerColor)("editorBracketPairGuide.background5",{dark:"#00000000",light:"#00000000",hc:"#00000000"},w.localize(41,null)),e.editorBracketPairGuideBackground6=(0,T.registerColor)("editorBracketPairGuide.background6",{dark:"#00000000",light:"#00000000",hc:"#00000000"},w.localize(42,null)),e.editorBracketPairGuideActiveBackground1=(0,T.registerColor)("editorBracketPairGuide.activeBackground1",{dark:"#00000000",light:"#00000000",hc:"#00000000"},w.localize(43,null)),e.editorBracketPairGuideActiveBackground2=(0,T.registerColor)("editorBracketPairGuide.activeBackground2",{dark:"#00000000",light:"#00000000",hc:"#00000000"},w.localize(44,null)),e.editorBracketPairGuideActiveBackground3=(0,T.registerColor)("editorBracketPairGuide.activeBackground3",{dark:"#00000000",light:"#00000000",hc:"#00000000"},w.localize(45,null)),e.editorBracketPairGuideActiveBackground4=(0,T.registerColor)("editorBracketPairGuide.activeBackground4",{dark:"#00000000",light:"#00000000",hc:"#00000000"},w.localize(46,null)),e.editorBracketPairGuideActiveBackground5=(0,T.registerColor)("editorBracketPairGuide.activeBackground5",{dark:"#00000000",light:"#00000000",hc:"#00000000"},w.localize(47,null)),e.editorBracketPairGuideActiveBackground6=(0,T.registerColor)("editorBracketPairGuide.activeBackground6",{dark:"#00000000",light:"#00000000",hc:"#00000000"},w.localize(48,null)),(0,D.registerThemingParticipant)((C,n)=>{const g=C.getColor(T.editorBackground);g&&n.addRule(`.monaco-editor, .monaco-editor-background, .monaco-editor .inputarea.ime-input { background-color: ${g}; }`);const t=C.getColor(T.editorForeground);t&&n.addRule(`.monaco-editor, .monaco-editor .inputarea.ime-input { color: ${t}; }`);const s=C.getColor(e.editorGutter);s&&n.addRule(`.monaco-editor .margin { background-color: ${s}; }`);const c=C.getColor(e.editorRangeHighlight);c&&n.addRule(`.monaco-editor .rangeHighlight { background-color: ${c}; }`);const u=C.getColor(e.editorRangeHighlightBorder);u&&n.addRule(`.monaco-editor .rangeHighlight { border: 1px ${C.type==="hc"?"dotted":"solid"} ${u}; }`);const d=C.getColor(e.editorSymbolHighlight);d&&n.addRule(`.monaco-editor .symbolHighlight { background-color: ${d}; }`);const a=C.getColor(e.editorSymbolHighlightBorder);a&&n.addRule(`.monaco-editor .symbolHighlight { border: 1px ${C.type==="hc"?"dotted":"solid"} ${a}; }`);const r=C.getColor(e.editorWhitespaces);r&&(n.addRule(`.monaco-editor .mtkw { color: ${r} !important; }`),n.addRule(`.monaco-editor .mtkz { color: ${r} !important; }`))})}),define(J[606],ee([0,1,100,46,19,10,22,337]),function(j,e,w,N,T,D,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CurrentLineMarginHighlightOverlay=e.CurrentLineHighlightOverlay=e.AbstractLineHighlightOverlay=void 0;let p=!0;class C extends w.DynamicViewOverlay{constructor(s){super();this._context=s;const c=this._context.configuration.options,u=c.get(129);this._lineHeight=c.get(58),this._renderLineHighlight=c.get(84),this._renderLineHighlightOnlyWhenFocus=c.get(85),this._contentLeft=u.contentLeft,this._contentWidth=u.contentWidth,this._selectionIsEmpty=!0,this._focused=!1,this._cursorLineNumbers=[1],this._selections=[new S.Selection(1,1,1,1)],this._renderData=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),super.dispose()}_readFromSelections(){let s=!1;const c=p?this._selections.slice(0,1):this._selections,u=c.map(a=>a.positionLineNumber);u.sort((a,r)=>a-r),T.equals(this._cursorLineNumbers,u)||(this._cursorLineNumbers=u,s=!0);const d=c.every(a=>a.isEmpty());return this._selectionIsEmpty!==d&&(this._selectionIsEmpty=d,s=!0),s}onThemeChanged(s){return this._readFromSelections()}onConfigurationChanged(s){const c=this._context.configuration.options,u=c.get(129);return this._lineHeight=c.get(58),this._renderLineHighlight=c.get(84),this._renderLineHighlightOnlyWhenFocus=c.get(85),this._contentLeft=u.contentLeft,this._contentWidth=u.contentWidth,!0}onCursorStateChanged(s){return this._selections=s.selections,this._readFromSelections()}onFlushed(s){return!0}onLinesDeleted(s){return!0}onLinesInserted(s){return!0}onScrollChanged(s){return s.scrollWidthChanged||s.scrollTopChanged}onZonesChanged(s){return!0}onFocusChanged(s){return this._renderLineHighlightOnlyWhenFocus?(this._focused=s.isFocused,!0):!1}prepareRender(s){if(!this._shouldRenderThis()){this._renderData=null;return}const c=this._renderOne(s),u=s.visibleRange.startLineNumber,d=s.visibleRange.endLineNumber,a=this._cursorLineNumbers.length;let r=0;const o=[];for(let i=u;i<=d;i++){const l=i-u;for(;r<a&&this._cursorLineNumbers[r]<i;)r++;r<a&&this._cursorLineNumbers[r]===i?o[l]=c:o[l]=""}this._renderData=o}render(s,c){if(!this._renderData)return"";const u=c-s;return u>=this._renderData.length?"":this._renderData[u]}}e.AbstractLineHighlightOverlay=C;class n extends C{_renderOne(s){return`<div class="${"current-line"+(this._shouldRenderOther()?" current-line-both":"")}" style="width:${Math.max(s.scrollWidth,this._contentWidth)}px; height:${this._lineHeight}px;"></div>`}_shouldRenderThis(){return(this._renderLineHighlight==="line"||this._renderLineHighlight==="all")&&this._selectionIsEmpty&&(!this._renderLineHighlightOnlyWhenFocus||this._focused)}_shouldRenderOther(){return(this._renderLineHighlight==="gutter"||this._renderLineHighlight==="all")&&(!this._renderLineHighlightOnlyWhenFocus||this._focused)}}e.CurrentLineHighlightOverlay=n;class g extends C{_renderOne(s){return`<div class="${"current-line"+(this._shouldRenderMargin()?" current-line-margin":"")+(this._shouldRenderOther()?" current-line-margin-both":"")}" style="width:${this._contentLeft}px; height:${this._lineHeight}px;"></div>`}_shouldRenderMargin(){return(this._renderLineHighlight==="gutter"||this._renderLineHighlight==="all")&&(!this._renderLineHighlightOnlyWhenFocus||this._focused)}_shouldRenderThis(){return!0}_shouldRenderOther(){return(this._renderLineHighlight==="line"||this._renderLineHighlight==="all")&&this._selectionIsEmpty&&(!this._renderLineHighlightOnlyWhenFocus||this._focused)}}e.CurrentLineMarginHighlightOverlay=g,(0,D.registerThemingParticipant)((t,s)=>{p=!1;const c=t.getColor(N.editorLineHighlight);if(c&&(s.addRule(`.monaco-editor .view-overlays .current-line { background-color: ${c}; }`),s.addRule(`.monaco-editor .margin-view-overlays .current-line-margin { background-color: ${c}; border: none; }`)),!c||c.isTransparent()||t.defines(N.editorLineHighlightBorder)){const u=t.getColor(N.editorLineHighlightBorder);u&&(p=!0,s.addRule(`.monaco-editor .view-overlays .current-line { border: 2px solid ${u}; }`),s.addRule(`.monaco-editor .margin-view-overlays .current-line-margin { border: 2px solid ${u}; }`),t.type==="hc"&&(s.addRule(".monaco-editor .view-overlays .current-line { border-width: 1px; }"),s.addRule(".monaco-editor .margin-view-overlays .current-line-margin { border-width: 1px; }")))}})}),define(J[269],ee([0,1,17,100,13,46,10,341]),function(j,e,w,N,T,D,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LineNumbersOverlay=void 0;class p extends N.DynamicViewOverlay{constructor(n){super();this._context=n,this._readConfig(),this._lastCursorModelPosition=new T.Position(1,1),this._renderResult=null,this._activeLineNumber=1,this._context.addEventHandler(this)}_readConfig(){const n=this._context.configuration.options;this._lineHeight=n.get(58);const g=n.get(59);this._renderLineNumbers=g.renderType,this._renderCustomLineNumbers=g.renderFn,this._renderFinalNewline=n.get(83);const t=n.get(129);this._lineNumbersLeft=t.lineNumbersLeft,this._lineNumbersWidth=t.lineNumbersWidth}dispose(){this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(n){return this._readConfig(),!0}onCursorStateChanged(n){const g=n.selections[0].getPosition();this._lastCursorModelPosition=this._context.model.coordinatesConverter.convertViewPositionToModelPosition(g);let t=!1;return this._activeLineNumber!==g.lineNumber&&(this._activeLineNumber=g.lineNumber,t=!0),(this._renderLineNumbers===2||this._renderLineNumbers===3)&&(t=!0),t}onFlushed(n){return!0}onLinesChanged(n){return!0}onLinesDeleted(n){return!0}onLinesInserted(n){return!0}onScrollChanged(n){return n.scrollTopChanged}onZonesChanged(n){return!0}_getLineRenderLineNumber(n){const g=this._context.model.coordinatesConverter.convertViewPositionToModelPosition(new T.Position(n,1));if(g.column!==1)return"";const t=g.lineNumber;if(this._renderCustomLineNumbers)return this._renderCustomLineNumbers(t);if(this._renderLineNumbers===2){const s=Math.abs(this._lastCursorModelPosition.lineNumber-t);return s===0?'<span class="relative-current-line-number">'+t+"</span>":String(s)}return this._renderLineNumbers===3?this._lastCursorModelPosition.lineNumber===t||t%10==0?String(t):"":String(t)}prepareRender(n){if(this._renderLineNumbers===0){this._renderResult=null;return}const g=w.isLinux?this._lineHeight%2==0?" lh-even":" lh-odd":"",t=n.visibleRange.startLineNumber,s=n.visibleRange.endLineNumber,c='<div class="'+p.CLASS_NAME+g+'" style="left:'+this._lineNumbersLeft+"px;width:"+this._lineNumbersWidth+'px;">',u=this._context.model.getLineCount(),d=[];for(let a=t;a<=s;a++){const r=a-t;if(!this._renderFinalNewline&&a===u&&this._context.model.getLineLength(a)===0){d[r]="";continue}const o=this._getLineRenderLineNumber(a);o?a===this._activeLineNumber?d[r]='<div class="active-line-number '+p.CLASS_NAME+g+'" style="left:'+this._lineNumbersLeft+"px;width:"+this._lineNumbersWidth+'px;">'+o+"</div>":d[r]=c+o+"</div>":d[r]=""}this._renderResult=d}render(n,g){if(!this._renderResult)return"";const t=g-n;return t<0||t>=this._renderResult.length?"":this._renderResult[t]}}e.LineNumbersOverlay=p,p.CLASS_NAME="line-numbers",(0,S.registerThemingParticipant)((C,n)=>{const g=C.getColor(D.editorLineNumbers);g&&n.addRule(`.monaco-editor .line-numbers { color: ${g}; }`);const t=C.getColor(D.editorActiveLineNumber);t&&n.addRule(`.monaco-editor .line-numbers.active-line-number { color: ${t}; }`)})}),define(J[607],ee([0,1,465,34,30,17,8,63,174,225,50,269,235,31,112,13,3,22,137,336]),function(j,e,w,N,T,D,S,p,C,n,g,t,s,c,u,d,a,r,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TextAreaHandler=void 0;class i{constructor(v,m,E){this._visibleTextAreaBrand=void 0,this.top=v,this.left=m,this.width=E}setWidth(v){return new i(this.top,this.left,v)}}const l=N.isFirefox;class h extends g.ViewPart{constructor(v,m,E){super(v);this._primaryCursorPosition=new d.Position(1,1),this._primaryCursorVisibleRange=null,this._viewController=m,this._viewHelper=E,this._scrollLeft=0,this._scrollTop=0;const I=this._context.configuration.options,k=I.get(129);this._setAccessibilityOptions(I),this._contentLeft=k.contentLeft,this._contentWidth=k.contentWidth,this._contentHeight=k.height,this._fontInfo=I.get(43),this._lineHeight=I.get(58),this._emptySelectionClipboard=I.get(32),this._copyWithSyntaxHighlighting=I.get(21),this._visibleTextArea=null,this._selections=[new r.Selection(1,1,1,1)],this._modelSelections=[new r.Selection(1,1,1,1)],this._lastRenderPosition=null,this.textArea=(0,T.createFastDomNode)(document.createElement("textarea")),g.PartFingerprints.write(this.textArea,6),this.textArea.setClassName(`inputarea ${o.MOUSE_CURSOR_TEXT_CSS_CLASS_NAME}`),this.textArea.setAttribute("wrap","off"),this.textArea.setAttribute("autocorrect","off"),this.textArea.setAttribute("autocapitalize","off"),this.textArea.setAttribute("autocomplete","off"),this.textArea.setAttribute("spellcheck","false"),this.textArea.setAttribute("aria-label",this._getAriaLabel(I)),this.textArea.setAttribute("tabindex",String(I.get(111))),this.textArea.setAttribute("role","textbox"),this.textArea.setAttribute("aria-roledescription",w.localize(0,null)),this.textArea.setAttribute("aria-multiline","true"),this.textArea.setAttribute("aria-haspopup","false"),this.textArea.setAttribute("aria-autocomplete","both"),I.get(30)&&I.get(80)&&this.textArea.setAttribute("readonly","true"),this.textAreaCover=(0,T.createFastDomNode)(document.createElement("div")),this.textAreaCover.setPosition("absolute");const M={getLineCount:()=>this._context.model.getLineCount(),getLineMaxColumn:F=>this._context.model.getLineMaxColumn(F),getValueInRange:(F,R)=>this._context.model.getValueInRange(F,R)},P={getDataToCopy:F=>{const R=this._context.model.getPlainTextToCopy(this._modelSelections,this._emptySelectionClipboard,D.isWindows),A=this._context.model.getEOL(),O=this._emptySelectionClipboard&&this._modelSelections.length===1&&this._modelSelections[0].isEmpty(),L=Array.isArray(R)?R:null,B=Array.isArray(R)?R.join(A):R;let W,K=null;if(F&&(C.CopyOptions.forceCopyWithSyntaxHighlighting||this._copyWithSyntaxHighlighting&&B.length<65536)){const H=this._context.model.getRichTextToCopy(this._modelSelections,this._emptySelectionClipboard);H&&(W=H.html,K=H.mode)}return{isFromEmptySelection:O,multicursorText:L,text:B,html:W,mode:K}},getScreenReaderContent:F=>{if(this._accessibilitySupport===1){if(D.isMacintosh){const R=this._selections[0];if(R.isEmpty()){const A=R.getStartPosition();let O=this._getWordBeforePosition(A);if(O.length===0&&(O=this._getCharacterBeforePosition(A)),O.length>0)return new n.TextAreaState(O,O.length,O.length,A,A)}}return n.TextAreaState.EMPTY}if(N.isAndroid){const R=this._selections[0];if(R.isEmpty()){const A=R.getStartPosition(),[O,L]=this._getAndroidWordAtPosition(A);if(O.length>0)return new n.TextAreaState(O,L,L,A,A)}return n.TextAreaState.EMPTY}return n.PagedScreenReaderStrategy.fromEditorSelection(F,M,this._selections[0],this._accessibilityPageSize,this._accessibilitySupport===0)},deduceModelPosition:(F,R,A)=>this._context.model.deduceModelPositionRelativeToViewPosition(F,R,A)};this._textAreaInput=this._register(new C.TextAreaInput(P,this.textArea)),this._register(this._textAreaInput.onKeyDown(F=>{this._viewController.emitKeyDown(F)})),this._register(this._textAreaInput.onKeyUp(F=>{this._viewController.emitKeyUp(F)})),this._register(this._textAreaInput.onPaste(F=>{let R=!1,A=null,O=null;F.metadata&&(R=this._emptySelectionClipboard&&!!F.metadata.isFromEmptySelection,A=typeof F.metadata.multicursorText!="undefined"?F.metadata.multicursorText:null,O=F.metadata.mode),this._viewController.paste(F.text,R,A,O)})),this._register(this._textAreaInput.onCut(()=>{this._viewController.cut()})),this._register(this._textAreaInput.onType(F=>{F.replacePrevCharCnt||F.replaceNextCharCnt||F.positionDelta?(n._debugComposition&&console.log(` => compositionType: <<${F.text}>>, ${F.replacePrevCharCnt}, ${F.replaceNextCharCnt}, ${F.positionDelta}`),this._viewController.compositionType(F.text,F.replacePrevCharCnt,F.replaceNextCharCnt,F.positionDelta)):(n._debugComposition&&console.log(` => type: <<${F.text}>>`),this._viewController.type(F.text))})),this._register(this._textAreaInput.onSelectionChangeRequest(F=>{this._viewController.setSelection(F)})),this._register(this._textAreaInput.onCompositionStart(F=>{const R=this._selections[0].startLineNumber,A=this._selections[0].startColumn+F.revealDeltaColumns;this._context.model.revealRange("keyboard",!0,new a.Range(R,A,R,A),0,1);const O=this._viewHelper.visibleRangeForPositionRelativeToEditor(R,A);O&&(this._visibleTextArea=new i(this._context.viewLayout.getVerticalOffsetForLineNumber(R),O.left,l?0:1),this._render()),this.textArea.setClassName(`inputarea ${o.MOUSE_CURSOR_TEXT_CSS_CLASS_NAME} ime-input`),this._viewController.compositionStart(),this._context.model.onCompositionStart()})),this._register(this._textAreaInput.onCompositionUpdate(F=>{!this._visibleTextArea||(this._visibleTextArea=this._visibleTextArea.setWidth(f(F.data,this._fontInfo)),this._render())})),this._register(this._textAreaInput.onCompositionEnd(()=>{this._visibleTextArea=null,this._render(),this.textArea.setClassName(`inputarea ${o.MOUSE_CURSOR_TEXT_CSS_CLASS_NAME}`),this._viewController.compositionEnd(),this._context.model.onCompositionEnd()})),this._register(this._textAreaInput.onFocus(()=>{this._context.model.setHasFocus(!0)})),this._register(this._textAreaInput.onBlur(()=>{this._context.model.setHasFocus(!1)}))}dispose(){super.dispose()}_getAndroidWordAtPosition(v){const m='`~!@#$%^&*()-=+[{]}\\|;:",.<>/?',E=this._context.model.getLineContent(v.lineNumber),I=(0,u.getMapForWordSeparators)(m);let k=!0,M=v.column,P=!0,F=v.column,R=0;for(;R<50&&(k||P);){if(k&&M<=1&&(k=!1),k){const A=E.charCodeAt(M-2);I.get(A)!==0?k=!1:M--}if(P&&F>E.length&&(P=!1),P){const A=E.charCodeAt(F-1);I.get(A)!==0?P=!1:F++}R++}return[E.substring(M-1,F-1),v.column-M]}_getWordBeforePosition(v){const m=this._context.model.getLineContent(v.lineNumber),E=(0,u.getMapForWordSeparators)(this._context.configuration.options.get(115));let I=v.column,k=0;for(;I>1;){const M=m.charCodeAt(I-2);if(E.get(M)!==0||k>50)return m.substring(I-1,v.column-1);k++,I--}return m.substring(0,v.column-1)}_getCharacterBeforePosition(v){if(v.column>1){const E=this._context.model.getLineContent(v.lineNumber).charAt(v.column-2);if(!S.isHighSurrogate(E.charCodeAt(0)))return E}return""}_getAriaLabel(v){return v.get(2)===1?w.localize(1,null,D.isLinux?"Shift+Alt+F1":"Alt+F1"):v.get(4)}_setAccessibilityOptions(v){this._accessibilitySupport=v.get(2);const m=v.get(3);this._accessibilitySupport===2&&m===c.EditorOptions.accessibilityPageSize.defaultValue?this._accessibilityPageSize=500:this._accessibilityPageSize=m}onConfigurationChanged(v){const m=this._context.configuration.options,E=m.get(129);return this._setAccessibilityOptions(m),this._contentLeft=E.contentLeft,this._contentWidth=E.contentWidth,this._contentHeight=E.height,this._fontInfo=m.get(43),this._lineHeight=m.get(58),this._emptySelectionClipboard=m.get(32),this._copyWithSyntaxHighlighting=m.get(21),this.textArea.setAttribute("aria-label",this._getAriaLabel(m)),this.textArea.setAttribute("tabindex",String(m.get(111))),(v.hasChanged(30)||v.hasChanged(80))&&(m.get(30)&&m.get(80)?this.textArea.setAttribute("readonly","true"):this.textArea.removeAttribute("readonly")),v.hasChanged(2)&&this._textAreaInput.writeScreenReaderContent("strategy changed"),!0}onCursorStateChanged(v){return this._selections=v.selections.slice(0),this._modelSelections=v.modelSelections.slice(0),this._textAreaInput.writeScreenReaderContent("selection changed"),!0}onDecorationsChanged(v){return!0}onFlushed(v){return!0}onLinesChanged(v){return!0}onLinesDeleted(v){return!0}onLinesInserted(v){return!0}onScrollChanged(v){return this._scrollLeft=v.scrollLeft,this._scrollTop=v.scrollTop,!0}onZonesChanged(v){return!0}isFocused(){return this._textAreaInput.isFocused()}focusTextArea(){this._textAreaInput.focusTextArea()}getLastRenderData(){return this._lastRenderPosition}setAriaOptions(v){v.activeDescendant?(this.textArea.setAttribute("aria-haspopup","true"),this.textArea.setAttribute("aria-autocomplete","list"),this.textArea.setAttribute("aria-activedescendant",v.activeDescendant)):(this.textArea.setAttribute("aria-haspopup","false"),this.textArea.setAttribute("aria-autocomplete","both"),this.textArea.removeAttribute("aria-activedescendant")),v.role&&this.textArea.setAttribute("role",v.role)}prepareRender(v){this._primaryCursorPosition=new d.Position(this._selections[0].positionLineNumber,this._selections[0].positionColumn),this._primaryCursorVisibleRange=v.visibleRangeForPosition(this._primaryCursorPosition)}render(v){this._textAreaInput.writeScreenReaderContent("render"),this._render()}_render(){if(this._visibleTextArea){this._renderInsideEditor(null,this._visibleTextArea.top-this._scrollTop,this._contentLeft+this._visibleTextArea.left-this._scrollLeft,this._visibleTextArea.width,this._lineHeight);return}if(!this._primaryCursorVisibleRange){this._renderAtTopLeft();return}const v=this._contentLeft+this._primaryCursorVisibleRange.left-this._scrollLeft;if(v<this._contentLeft||v>this._contentLeft+this._contentWidth){this._renderAtTopLeft();return}const m=this._context.viewLayout.getVerticalOffsetForLineNumber(this._selections[0].positionLineNumber)-this._scrollTop;if(m<0||m>this._contentHeight){this._renderAtTopLeft();return}if(D.isMacintosh){this._renderInsideEditor(this._primaryCursorPosition,m,v,l?0:1,this._lineHeight);return}this._renderInsideEditor(this._primaryCursorPosition,m,v,l?0:1,l?0:1)}_renderInsideEditor(v,m,E,I,k){this._lastRenderPosition=v;const M=this.textArea,P=this.textAreaCover;p.Configuration.applyFontInfo(M,this._fontInfo),M.setTop(m),M.setLeft(E),M.setWidth(I),M.setHeight(k),P.setTop(0),P.setLeft(0),P.setWidth(0),P.setHeight(0)}_renderAtTopLeft(){this._lastRenderPosition=null;const v=this.textArea,m=this.textAreaCover;if(p.Configuration.applyFontInfo(v,this._fontInfo),v.setTop(0),v.setLeft(0),m.setTop(0),m.setLeft(0),l){v.setWidth(0),v.setHeight(0),m.setWidth(0),m.setHeight(0);return}v.setWidth(1),v.setHeight(1),m.setWidth(1),m.setHeight(1);const E=this._context.configuration.options;E.get(49)?m.setClassName("monaco-editor-background textAreaCover "+s.Margin.OUTER_CLASS_NAME):E.get(59).renderType!==0?m.setClassName("monaco-editor-background textAreaCover "+t.LineNumbersOverlay.CLASS_NAME):m.setClassName("monaco-editor-background textAreaCover")}}e.TextAreaHandler=h;function f(b,v){const E=document.createElement("canvas").getContext("2d");E.font=y(v);const I=E.measureText(b);return N.isFirefox?I.width+2:I.width}function y(b){return _("normal",b.fontWeight,b.fontSize,b.lineHeight,b.fontFamily)}function _(b,v,m,E,I){return`${b} normal ${v} ${m}px / ${E}px ${I}`}}),define(J[608],ee([0,1,30,29,50,13,18,46,60]),function(j,e,w,N,T,D,S,p,C){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DecorationsOverviewRuler=void 0;class n{constructor(s,c){const u=s.options;this.lineHeight=u.get(58),this.pixelRatio=u.get(127),this.overviewRulerLanes=u.get(73),this.renderBorder=u.get(72);const d=c.getColor(p.editorOverviewRulerBorder);this.borderColor=d?d.toString():null,this.hideCursor=u.get(51);const a=c.getColor(p.editorCursorForeground);this.cursorColor=a?a.transparent(.7).toString():null,this.themeType=c.type;const r=u.get(64),o=r.enabled,i=r.side,l=o?c.getColor(p.editorOverviewRulerBackground)||S.TokenizationRegistry.getDefaultBackground():null;l===null||i==="left"?this.backgroundColor=null:this.backgroundColor=N.Color.Format.CSS.formatHex(l);const f=u.get(129).overviewRuler;this.top=f.top,this.right=f.right,this.domWidth=f.width,this.domHeight=f.height,this.overviewRulerLanes===0?(this.canvasWidth=0,this.canvasHeight=0):(this.canvasWidth=this.domWidth*this.pixelRatio|0,this.canvasHeight=this.domHeight*this.pixelRatio|0);const[y,_]=this._initLanes(1,this.canvasWidth,this.overviewRulerLanes);this.x=y,this.w=_}_initLanes(s,c,u){const d=c-s;if(u>=3){const a=Math.floor(d/3),r=Math.floor(d/3),o=d-a-r,i=s,l=i+a,h=i+a+o;return[[0,i,l,i,h,i,l,i],[0,a,o,a+o,r,a+o+r,o+r,a+o+r]]}else if(u===2){const a=Math.floor(d/2),r=d-a,o=s,i=o+a;return[[0,o,o,o,i,o,o,o],[0,a,a,a,r,a+r,a+r,a+r]]}else{const a=s,r=d;return[[0,a,a,a,a,a,a,a],[0,r,r,r,r,r,r,r]]}}equals(s){return this.lineHeight===s.lineHeight&&this.pixelRatio===s.pixelRatio&&this.overviewRulerLanes===s.overviewRulerLanes&&this.renderBorder===s.renderBorder&&this.borderColor===s.borderColor&&this.hideCursor===s.hideCursor&&this.cursorColor===s.cursorColor&&this.themeType===s.themeType&&this.backgroundColor===s.backgroundColor&&this.top===s.top&&this.right===s.right&&this.domWidth===s.domWidth&&this.domHeight===s.domHeight&&this.canvasWidth===s.canvasWidth&&this.canvasHeight===s.canvasHeight}}class g extends T.ViewPart{constructor(s){super(s);this._domNode=(0,w.createFastDomNode)(document.createElement("canvas")),this._domNode.setClassName("decorationsOverviewRuler"),this._domNode.setPosition("absolute"),this._domNode.setLayerHinting(!0),this._domNode.setContain("strict"),this._domNode.setAttribute("aria-hidden","true"),this._updateSettings(!1),this._tokensColorTrackerListener=S.TokenizationRegistry.onDidChange(c=>{c.changedColorMap&&this._updateSettings(!0)}),this._cursorPositions=[]}dispose(){super.dispose(),this._tokensColorTrackerListener.dispose()}_updateSettings(s){const c=new n(this._context.configuration,this._context.theme);return this._settings&&this._settings.equals(c)?!1:(this._settings=c,this._domNode.setTop(this._settings.top),this._domNode.setRight(this._settings.right),this._domNode.setWidth(this._settings.domWidth),this._domNode.setHeight(this._settings.domHeight),this._domNode.domNode.width=this._settings.canvasWidth,this._domNode.domNode.height=this._settings.canvasHeight,s&&this._render(),!0)}onConfigurationChanged(s){return this._updateSettings(!1)}onCursorStateChanged(s){this._cursorPositions=[];for(let c=0,u=s.selections.length;c<u;c++)this._cursorPositions[c]=s.selections[c].getPosition();return this._cursorPositions.sort(D.Position.compare),!0}onDecorationsChanged(s){return!!s.affectsOverviewRuler}onFlushed(s){return!0}onScrollChanged(s){return s.scrollHeightChanged}onZonesChanged(s){return!0}onThemeChanged(s){return this._context.model.invalidateOverviewRulerColorCache(),this._updateSettings(!1)}getDomNode(){return this._domNode.domNode}prepareRender(s){}render(s){this._render()}_render(){if(this._settings.overviewRulerLanes===0){this._domNode.setBackgroundColor(this._settings.backgroundColor?this._settings.backgroundColor:"");return}const s=this._settings.canvasWidth,c=this._settings.canvasHeight,u=this._settings.lineHeight,d=this._context.viewLayout,a=this._context.viewLayout.getScrollHeight(),r=c/a,o=this._context.model.getAllOverviewRulerDecorations(this._context.theme),i=6*this._settings.pixelRatio|0,l=i/2|0,h=this._domNode.domNode.getContext("2d");this._settings.backgroundColor===null?h.clearRect(0,0,s,c):(h.fillStyle=this._settings.backgroundColor,h.fillRect(0,0,s,c));const f=this._settings.x,y=this._settings.w;o.sort(C.OverviewRulerDecorationsGroup.cmp);for(const _ of o){const b=_.color,v=_.data;h.fillStyle=b;let m=0,E=0,I=0;for(let k=0,M=v.length/3;k<M;k++){const P=v[3*k],F=v[3*k+1],R=v[3*k+2];let A=d.getVerticalOffsetForLineNumber(F)*r|0,O=(d.getVerticalOffsetForLineNumber(R)+u)*r|0;if(O-A<i){let B=(A+O)/2|0;B<l?B=l:B+l>c&&(B=c-l),A=B-l,O=B+l}A>I+1||P!==m?(k!==0&&h.fillRect(f[m],E,y[m],I-E),m=P,E=A,I=O):O>I&&(I=O)}h.fillRect(f[m],E,y[m],I-E)}if(!this._settings.hideCursor&&this._settings.cursorColor){const _=2*this._settings.pixelRatio|0,b=_/2|0,v=this._settings.x[7],m=this._settings.w[7];h.fillStyle=this._settings.cursorColor;let E=-100,I=-100;for(let k=0,M=this._cursorPositions.length;k<M;k++){const P=this._cursorPositions[k];let F=d.getVerticalOffsetForLineNumber(P.lineNumber)*r|0;F<b?F=b:F+b>c&&(F=c-b);const R=F-b,A=R+_;R>I+1?(k!==0&&h.fillRect(v,E,m,I-E),E=R,I=A):A>I&&(I=A)}h.fillRect(v,E,m,I-E)}this._settings.renderBorder&&this._settings.borderColor&&this._settings.overviewRulerLanes>0&&(h.beginPath(),h.lineWidth=1,h.strokeStyle=this._settings.borderColor,h.moveTo(0,0),h.lineTo(0,c),h.stroke(),h.moveTo(0,0),h.lineTo(s,0),h.stroke())}}e.DecorationsOverviewRuler=g}),define(J[609],ee([0,1,30,50,46,10,347]),function(j,e,w,N,T,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Rulers=void 0;class S extends N.ViewPart{constructor(C){super(C);this.domNode=(0,w.createFastDomNode)(document.createElement("div")),this.domNode.setAttribute("role","presentation"),this.domNode.setAttribute("aria-hidden","true"),this.domNode.setClassName("view-rulers"),this._renderedRulers=[];const n=this._context.configuration.options;this._rulers=n.get(90),this._typicalHalfwidthCharacterWidth=n.get(43).typicalHalfwidthCharacterWidth}dispose(){super.dispose()}onConfigurationChanged(C){const n=this._context.configuration.options;return this._rulers=n.get(90),this._typicalHalfwidthCharacterWidth=n.get(43).typicalHalfwidthCharacterWidth,!0}onScrollChanged(C){return C.scrollHeightChanged}prepareRender(C){}_ensureRulersCount(){const C=this._renderedRulers.length,n=this._rulers.length;if(C===n)return;if(C<n){const{tabSize:t}=this._context.model.getTextModelOptions(),s=t;let c=n-C;for(;c>0;){const u=(0,w.createFastDomNode)(document.createElement("div"));u.setClassName("view-ruler"),u.setWidth(s),this.domNode.appendChild(u),this._renderedRulers.push(u),c--}return}let g=C-n;for(;g>0;){const t=this._renderedRulers.pop();this.domNode.removeChild(t),g--}}render(C){this._ensureRulersCount();for(let n=0,g=this._rulers.length;n<g;n++){const t=this._renderedRulers[n],s=this._rulers[n];t.setBoxShadow(s.color?`1px 0 0 0 ${s.color} inset`:""),t.setHeight(Math.min(C.scrollHeight,1e6)),t.setLeft(s.column*this._typicalHalfwidthCharacterWidth)}}}e.Rulers=S,(0,D.registerThemingParticipant)((p,C)=>{const n=p.getColor(T.editorRuler);n&&C.addRule(`.monaco-editor .view-ruler { box-shadow: 1px 0 0 0 ${n} inset; }`)})}),define(J[610],ee([0,1,30,14,50,582,31,46,10,350]),function(j,e,w,N,T,D,S,p,C){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ViewCursors=void 0;class n extends T.ViewPart{constructor(t){super(t);const s=this._context.configuration.options;this._readOnly=s.get(80),this._cursorBlinking=s.get(22),this._cursorStyle=s.get(24),this._cursorSmoothCaretAnimation=s.get(23),this._selectionIsEmpty=!0,this._isComposingInput=!1,this._isVisible=!1,this._primaryCursor=new D.ViewCursor(this._context),this._secondaryCursors=[],this._renderData=[],this._domNode=(0,w.createFastDomNode)(document.createElement("div")),this._domNode.setAttribute("role","presentation"),this._domNode.setAttribute("aria-hidden","true"),this._updateDomClassName(),this._domNode.appendChild(this._primaryCursor.getDomNode()),this._startCursorBlinkAnimation=new N.TimeoutTimer,this._cursorFlatBlinkInterval=new N.IntervalTimer,this._blinkingEnabled=!1,this._editorHasFocus=!1,this._updateBlinking()}dispose(){super.dispose(),this._startCursorBlinkAnimation.dispose(),this._cursorFlatBlinkInterval.dispose()}getDomNode(){return this._domNode}onCompositionStart(t){return this._isComposingInput=!0,this._updateBlinking(),!0}onCompositionEnd(t){return this._isComposingInput=!1,this._updateBlinking(),!0}onConfigurationChanged(t){const s=this._context.configuration.options;this._readOnly=s.get(80),this._cursorBlinking=s.get(22),this._cursorStyle=s.get(24),this._cursorSmoothCaretAnimation=s.get(23),this._updateBlinking(),this._updateDomClassName(),this._primaryCursor.onConfigurationChanged(t);for(let c=0,u=this._secondaryCursors.length;c<u;c++)this._secondaryCursors[c].onConfigurationChanged(t);return!0}_onCursorPositionChanged(t,s){if(this._primaryCursor.onCursorPositionChanged(t),this._updateBlinking(),this._secondaryCursors.length<s.length){const c=s.length-this._secondaryCursors.length;for(let u=0;u<c;u++){const d=new D.ViewCursor(this._context);this._domNode.domNode.insertBefore(d.getDomNode().domNode,this._primaryCursor.getDomNode().domNode.nextSibling),this._secondaryCursors.push(d)}}else if(this._secondaryCursors.length>s.length){const c=this._secondaryCursors.length-s.length;for(let u=0;u<c;u++)this._domNode.removeChild(this._secondaryCursors[0].getDomNode()),this._secondaryCursors.splice(0,1)}for(let c=0;c<s.length;c++)this._secondaryCursors[c].onCursorPositionChanged(s[c])}onCursorStateChanged(t){const s=[];for(let u=0,d=t.selections.length;u<d;u++)s[u]=t.selections[u].getPosition();this._onCursorPositionChanged(s[0],s.slice(1));const c=t.selections[0].isEmpty();return this._selectionIsEmpty!==c&&(this._selectionIsEmpty=c,this._updateDomClassName()),!0}onDecorationsChanged(t){return!0}onFlushed(t){return!0}onFocusChanged(t){return this._editorHasFocus=t.isFocused,this._updateBlinking(),!1}onLinesChanged(t){return!0}onLinesDeleted(t){return!0}onLinesInserted(t){return!0}onScrollChanged(t){return!0}onTokensChanged(t){const s=c=>{for(let u=0,d=t.ranges.length;u<d;u++)if(t.ranges[u].fromLineNumber<=c.lineNumber&&c.lineNumber<=t.ranges[u].toLineNumber)return!0;return!1};if(s(this._primaryCursor.getPosition()))return!0;for(const c of this._secondaryCursors)if(s(c.getPosition()))return!0;return!1}onZonesChanged(t){return!0}_getCursorBlinking(){return this._isComposingInput||!this._editorHasFocus?0:this._readOnly?5:this._cursorBlinking}_updateBlinking(){this._startCursorBlinkAnimation.cancel(),this._cursorFlatBlinkInterval.cancel();const t=this._getCursorBlinking(),s=t===0,c=t===5;s?this._hide():this._show(),this._blinkingEnabled=!1,this._updateDomClassName(),!s&&!c&&(t===1?this._cursorFlatBlinkInterval.cancelAndSet(()=>{this._isVisible?this._hide():this._show()},n.BLINK_INTERVAL):this._startCursorBlinkAnimation.setIfNotSet(()=>{this._blinkingEnabled=!0,this._updateDomClassName()},n.BLINK_INTERVAL))}_updateDomClassName(){this._domNode.setClassName(this._getClassName())}_getClassName(){let t="cursors-layer";switch(this._selectionIsEmpty||(t+=" has-selection"),this._cursorStyle){case S.TextEditorCursorStyle.Line:t+=" cursor-line-style";break;case S.TextEditorCursorStyle.Block:t+=" cursor-block-style";break;case S.TextEditorCursorStyle.Underline:t+=" cursor-underline-style";break;case S.TextEditorCursorStyle.LineThin:t+=" cursor-line-thin-style";break;case S.TextEditorCursorStyle.BlockOutline:t+=" cursor-block-outline-style";break;case S.TextEditorCursorStyle.UnderlineThin:t+=" cursor-underline-thin-style";break;default:t+=" cursor-line-style"}if(this._blinkingEnabled)switch(this._getCursorBlinking()){case 1:t+=" cursor-blink";break;case 2:t+=" cursor-smooth";break;case 3:t+=" cursor-phase";break;case 4:t+=" cursor-expand";break;case 5:t+=" cursor-solid";break;default:t+=" cursor-solid"}else t+=" cursor-solid";return this._cursorSmoothCaretAnimation&&(t+=" cursor-smooth-caret-animation"),t}_show(){this._primaryCursor.show();for(let t=0,s=this._secondaryCursors.length;t<s;t++)this._secondaryCursors[t].show();this._isVisible=!0}_hide(){this._primaryCursor.hide();for(let t=0,s=this._secondaryCursors.length;t<s;t++)this._secondaryCursors[t].hide();this._isVisible=!1}prepareRender(t){this._primaryCursor.prepareRender(t);for(let s=0,c=this._secondaryCursors.length;s<c;s++)this._secondaryCursors[s].prepareRender(t)}render(t){let s=[],c=0;const u=this._primaryCursor.render(t);u&&(s[c++]=u);for(let d=0,a=this._secondaryCursors.length;d<a;d++){const r=this._secondaryCursors[d].render(t);r&&(s[c++]=r)}this._renderData=s}getLastRenderData(){return this._renderData}}e.ViewCursors=n,n.BLINK_INTERVAL=500,(0,C.registerThemingParticipant)((g,t)=>{const s=g.getColor(p.editorCursorForeground);if(s){let c=g.getColor(p.editorCursorBackground);c||(c=s.opposite()),t.addRule(`.monaco-editor .cursors-layer .cursor { background-color: ${s}; border-color: ${s}; color: ${c}; }`),g.type==="hc"&&t.addRule(`.monaco-editor .cursors-layer.has-selection .cursor { border-left: 1px solid ${c}; border-right: 1px solid ${c}; }`)}})}),define(J[611],ee([0,1,4,2,3,46,10]),function(j,e,w,N,T,D,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ColorizedBracketPairsDecorationProvider=void 0;class p extends N.Disposable{constructor(g){super();this.textModel=g,this.colorProvider=new C,this.onDidChangeEmitter=new w.Emitter,this.onDidChange=this.onDidChangeEmitter.event,this.colorizationOptions=g.getOptions().bracketPairColorizationOptions,this._register(g.onDidChangeOptions(t=>{this.colorizationOptions=g.getOptions().bracketPairColorizationOptions})),this._register(g.bracketPairs.onDidChange(t=>{this.onDidChangeEmitter.fire()}))}getDecorationsInRange(g,t,s){if(t===void 0)return[];if(!this.colorizationOptions.enabled)return[];const c=new Array,u=this.textModel.bracketPairs.getBracketsInRange(g);for(const d of u)c.push({id:`bracket${d.range.toString()}-${d.nestingLevel}`,options:{description:"BracketPairColorization",inlineClassName:this.colorProvider.getInlineClassName(d)},ownerId:0,range:d.range});return c}getAllDecorations(g,t){return g===void 0?[]:this.colorizationOptions.enabled?this.getDecorationsInRange(new T.Range(1,1,this.textModel.getLineCount(),1),g,t):[]}}e.ColorizedBracketPairsDecorationProvider=p;class C{constructor(){this.unexpectedClosingBracketClassName="unexpected-closing-bracket"}getInlineClassName(g){return g.isInvalid?this.unexpectedClosingBracketClassName:this.getInlineClassNameOfLevel(g.nestingLevel)}getInlineClassNameOfLevel(g){return`bracket-highlighting-${g%30}`}}(0,S.registerThemingParticipant)((n,g)=>{const t=[D.editorBracketHighlightingForeground1,D.editorBracketHighlightingForeground2,D.editorBracketHighlightingForeground3,D.editorBracketHighlightingForeground4,D.editorBracketHighlightingForeground5,D.editorBracketHighlightingForeground6],s=new C;g.addRule(`.monaco-editor .${s.unexpectedClosingBracketClassName} { color: ${n.getColor(D.editorBracketHighlightingUnexpectedBracketForeground)}; }`);let c=t.map(u=>n.getColor(u)).filter(u=>!!u).filter(u=>!u.isTransparent());for(let u=0;u<30;u++){const d=c[u%c.length];g.addRule(`.monaco-editor .${s.getInlineClassNameOfLevel(u)} { color: ${d}; }`)}})}),define(J[612],ee([0,1,89,2,49,10,46,42,3,48,4,21,47]),function(j,e,w,N,T,D,S,p,C,n,g,t,s){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MarkerDecorationsService=void 0;class c extends N.Disposable{constructor(a){super();this.model=a,this._markersData=new Map,this._register((0,N.toDisposable)(()=>{this.model.deltaDecorations([...this._markersData.keys()],[]),this._markersData.clear()}))}update(a,r){const o=[...this._markersData.keys()];this._markersData.clear();const i=this.model.deltaDecorations(o,r);for(let l=0;l<i.length;l++)this._markersData.set(i[l],a[l]);return o.length!==0||i.length!==0}getMarker(a){return this._markersData.get(a.id)}}let u=class extends N.Disposable{constructor(a,r){super();this._markerService=r,this._onDidChangeMarker=this._register(new g.Emitter),this._markerDecorations=new s.ResourceMap,a.getModels().forEach(o=>this._onModelAdded(o)),this._register(a.onModelAdded(this._onModelAdded,this)),this._register(a.onModelRemoved(this._onModelRemoved,this)),this._register(this._markerService.onMarkerChanged(this._handleMarkerChange,this))}dispose(){super.dispose(),this._markerDecorations.forEach(a=>a.dispose()),this._markerDecorations.clear()}getMarker(a,r){const o=this._markerDecorations.get(a);return o&&o.getMarker(r)||null}_handleMarkerChange(a){a.forEach(r=>{const o=this._markerDecorations.get(r);o&&this._updateDecorations(o)})}_onModelAdded(a){const r=new c(a);this._markerDecorations.set(a.uri,r),this._updateDecorations(r)}_onModelRemoved(a){const r=this._markerDecorations.get(a.uri);r&&(r.dispose(),this._markerDecorations.delete(a.uri)),(a.uri.scheme===n.Schemas.inMemory||a.uri.scheme===n.Schemas.internal||a.uri.scheme===n.Schemas.vscode)&&this._markerService&&this._markerService.read({resource:a.uri}).map(o=>o.owner).forEach(o=>this._markerService.remove(o,[a.uri]))}_updateDecorations(a){const r=this._markerService.read({resource:a.model.uri,take:500});let o=r.map(i=>({range:this._createDecorationRange(a.model,i),options:this._createDecorationOption(i)}));a.update(r,o)&&this._onDidChangeMarker.fire(a.model)}_createDecorationRange(a,r){let o=C.Range.lift(r);return r.severity===w.MarkerSeverity.Hint&&!this._hasMarkerTag(r,1)&&!this._hasMarkerTag(r,2)&&(o=o.setEndPosition(o.startLineNumber,o.startColumn+2)),a.validateRange(o)}_createDecorationOption(a){let r,o,i,l,h;switch(a.severity){case w.MarkerSeverity.Hint:this._hasMarkerTag(a,2)?r=void 0:this._hasMarkerTag(a,1)?r="squiggly-unnecessary":r="squiggly-hint",i=0;break;case w.MarkerSeverity.Warning:r="squiggly-warning",o=(0,D.themeColorFromId)(S.overviewRulerWarning),i=20,h={color:(0,D.themeColorFromId)(t.minimapWarning),position:T.MinimapPosition.Inline};break;case w.MarkerSeverity.Info:r="squiggly-info",o=(0,D.themeColorFromId)(S.overviewRulerInfo),i=10;break;case w.MarkerSeverity.Error:default:r="squiggly-error",o=(0,D.themeColorFromId)(S.overviewRulerError),i=30,h={color:(0,D.themeColorFromId)(t.minimapError),position:T.MinimapPosition.Inline};break}return a.tags&&(a.tags.indexOf(1)!==-1&&(l="squiggly-inline-unnecessary"),a.tags.indexOf(2)!==-1&&(l="squiggly-inline-deprecated")),{description:"marker-decoration",stickiness:1,className:r,showIfCollapsed:!0,overviewRuler:{color:o,position:T.OverviewRulerLane.Right},minimap:h,zIndex:i,inlineClassName:l}}_hasMarkerTag(a,r){return a.tags?a.tags.indexOf(r)>=0:!1}};u=Fe([Ce(0,p.IModelService),Ce(1,w.IMarkerService)],u),e.MarkerDecorationsService=u}),define(J[613],ee([0,1,34,7,96,53,29,4,2,490,21,10,358]),function(j,e,w,N,T,D,S,p,C,n,g,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ColorPickerWidget=e.ColorPickerBody=e.ColorPickerHeader=void 0;const s=N.$;class c extends C.Disposable{constructor(h,f,y){super();this.model=f,this.domNode=s(".colorpicker-header"),N.append(h,this.domNode),this.pickedColorNode=N.append(this.domNode,s(".picked-color"));const _=(0,n.localize)(0,null);this.pickedColorNode.setAttribute("title",_);const b=N.append(this.domNode,s(".original-color"));b.style.backgroundColor=S.Color.Format.CSS.format(this.model.originalColor)||"",this.backgroundColor=y.getColorTheme().getColor(g.editorHoverBackground)||S.Color.white,this._register((0,t.registerThemingParticipant)((v,m)=>{this.backgroundColor=v.getColor(g.editorHoverBackground)||S.Color.white})),this._register(N.addDisposableListener(this.pickedColorNode,N.EventType.CLICK,()=>this.model.selectNextColorPresentation())),this._register(N.addDisposableListener(b,N.EventType.CLICK,()=>{this.model.color=this.model.originalColor,this.model.flushColor()})),this._register(f.onDidChangeColor(this.onDidChangeColor,this)),this._register(f.onDidChangePresentation(this.onDidChangePresentation,this)),this.pickedColorNode.style.backgroundColor=S.Color.Format.CSS.format(f.color)||"",this.pickedColorNode.classList.toggle("light",f.color.rgba.a<.5?this.backgroundColor.isLighter():f.color.isLighter())}onDidChangeColor(h){this.pickedColorNode.style.backgroundColor=S.Color.Format.CSS.format(h)||"",this.pickedColorNode.classList.toggle("light",h.rgba.a<.5?this.backgroundColor.isLighter():h.isLighter()),this.onDidChangePresentation()}onDidChangePresentation(){this.pickedColorNode.textContent=this.model.presentation?this.model.presentation.label:"",this.pickedColorNode.prepend(s(".codicon.codicon-color-mode"))}}e.ColorPickerHeader=c;class u extends C.Disposable{constructor(h,f,y){super();this.model=f,this.pixelRatio=y,this.domNode=s(".colorpicker-body"),N.append(h,this.domNode),this.saturationBox=new d(this.domNode,this.model,this.pixelRatio),this._register(this.saturationBox),this._register(this.saturationBox.onDidChange(this.onDidSaturationValueChange,this)),this._register(this.saturationBox.onColorFlushed(this.flushColor,this)),this.opacityStrip=new r(this.domNode,this.model),this._register(this.opacityStrip),this._register(this.opacityStrip.onDidChange(this.onDidOpacityChange,this)),this._register(this.opacityStrip.onColorFlushed(this.flushColor,this)),this.hueStrip=new o(this.domNode,this.model),this._register(this.hueStrip),this._register(this.hueStrip.onDidChange(this.onDidHueChange,this)),this._register(this.hueStrip.onColorFlushed(this.flushColor,this))}flushColor(){this.model.flushColor()}onDidSaturationValueChange({s:h,v:f}){const y=this.model.color.hsva;this.model.color=new S.Color(new S.HSVA(y.h,h,f,y.a))}onDidOpacityChange(h){const f=this.model.color.hsva;this.model.color=new S.Color(new S.HSVA(f.h,f.s,f.v,h))}onDidHueChange(h){const f=this.model.color.hsva,y=(1-h)*360;this.model.color=new S.Color(new S.HSVA(y===360?0:y,f.s,f.v,f.a))}layout(){this.saturationBox.layout(),this.opacityStrip.layout(),this.hueStrip.layout()}}e.ColorPickerBody=u;class d extends C.Disposable{constructor(h,f,y){super();this.model=f,this.pixelRatio=y,this._onDidChange=new p.Emitter,this.onDidChange=this._onDidChange.event,this._onColorFlushed=new p.Emitter,this.onColorFlushed=this._onColorFlushed.event,this.domNode=s(".saturation-wrap"),N.append(h,this.domNode),this.canvas=document.createElement("canvas"),this.canvas.className="saturation-box",N.append(this.domNode,this.canvas),this.selection=s(".saturation-selection"),N.append(this.domNode,this.selection),this.layout(),this._register(N.addDisposableGenericMouseDownListner(this.domNode,_=>this.onMouseDown(_))),this._register(this.model.onDidChangeColor(this.onDidChangeColor,this)),this.monitor=null}onMouseDown(h){this.monitor=this._register(new T.GlobalMouseMoveMonitor);const f=N.getDomNodePagePosition(this.domNode);h.target!==this.selection&&this.onDidChangePosition(h.offsetX,h.offsetY),this.monitor.startMonitoring(h.target,h.buttons,T.standardMouseMoveMerger,_=>this.onDidChangePosition(_.posx-f.left,_.posy-f.top),()=>null);const y=N.addDisposableGenericMouseUpListner(document,()=>{this._onColorFlushed.fire(),y.dispose(),this.monitor&&(this.monitor.stopMonitoring(!0),this.monitor=null)},!0)}onDidChangePosition(h,f){const y=Math.max(0,Math.min(1,h/this.width)),_=Math.max(0,Math.min(1,1-f/this.height));this.paintSelection(y,_),this._onDidChange.fire({s:y,v:_})}layout(){this.width=this.domNode.offsetWidth,this.height=this.domNode.offsetHeight,this.canvas.width=this.width*this.pixelRatio,this.canvas.height=this.height*this.pixelRatio,this.paint();const h=this.model.color.hsva;this.paintSelection(h.s,h.v)}paint(){const h=this.model.color.hsva,f=new S.Color(new S.HSVA(h.h,1,1,1)),y=this.canvas.getContext("2d"),_=y.createLinearGradient(0,0,this.canvas.width,0);_.addColorStop(0,"rgba(255, 255, 255, 1)"),_.addColorStop(.5,"rgba(255, 255, 255, 0.5)"),_.addColorStop(1,"rgba(255, 255, 255, 0)");const b=y.createLinearGradient(0,0,0,this.canvas.height);b.addColorStop(0,"rgba(0, 0, 0, 0)"),b.addColorStop(1,"rgba(0, 0, 0, 1)"),y.rect(0,0,this.canvas.width,this.canvas.height),y.fillStyle=S.Color.Format.CSS.format(f),y.fill(),y.fillStyle=_,y.fill(),y.fillStyle=b,y.fill()}paintSelection(h,f){this.selection.style.left=`${h*this.width}px`,this.selection.style.top=`${this.height-f*this.height}px`}onDidChangeColor(){this.monitor&&this.monitor.isMonitoring()||this.paint()}}class a extends C.Disposable{constructor(h,f){super();this.model=f,this._onDidChange=new p.Emitter,this.onDidChange=this._onDidChange.event,this._onColorFlushed=new p.Emitter,this.onColorFlushed=this._onColorFlushed.event,this.domNode=N.append(h,s(".strip")),this.overlay=N.append(this.domNode,s(".overlay")),this.slider=N.append(this.domNode,s(".slider")),this.slider.style.top="0px",this._register(N.addDisposableGenericMouseDownListner(this.domNode,y=>this.onMouseDown(y))),this.layout()}layout(){this.height=this.domNode.offsetHeight-this.slider.offsetHeight;const h=this.getValue(this.model.color);this.updateSliderPosition(h)}onMouseDown(h){const f=this._register(new T.GlobalMouseMoveMonitor),y=N.getDomNodePagePosition(this.domNode);this.domNode.classList.add("grabbing"),h.target!==this.slider&&this.onDidChangeTop(h.offsetY),f.startMonitoring(h.target,h.buttons,T.standardMouseMoveMerger,b=>this.onDidChangeTop(b.posy-y.top),()=>null);const _=N.addDisposableGenericMouseUpListner(document,()=>{this._onColorFlushed.fire(),_.dispose(),f.stopMonitoring(!0),this.domNode.classList.remove("grabbing")},!0)}onDidChangeTop(h){const f=Math.max(0,Math.min(1,1-h/this.height));this.updateSliderPosition(f),this._onDidChange.fire(f)}updateSliderPosition(h){this.slider.style.top=`${(1-h)*this.height}px`}}class r extends a{constructor(h,f){super(h,f);this.domNode.classList.add("opacity-strip"),this._register(f.onDidChangeColor(this.onDidChangeColor,this)),this.onDidChangeColor(this.model.color)}onDidChangeColor(h){const{r:f,g:y,b:_}=h.rgba,b=new S.Color(new S.RGBA(f,y,_,1)),v=new S.Color(new S.RGBA(f,y,_,0));this.overlay.style.background=`linear-gradient(to bottom, ${b} 0%, ${v} 100%)`}getValue(h){return h.hsva.a}}class o extends a{constructor(h,f){super(h,f);this.domNode.classList.add("hue-strip")}getValue(h){return 1-h.hsva.h/360}}class i extends D.Widget{constructor(h,f,y,_){super();this.model=f,this.pixelRatio=y,this._register((0,w.onDidChangeZoomLevel)(()=>this.layout()));const b=s(".colorpicker-widget");h.appendChild(b);const v=new c(b,this.model,_);this.body=new u(b,this.model,this.pixelRatio),this._register(v),this._register(this.body)}layout(){this.body.layout()}}e.ColorPickerWidget=i}),define(J[614],ee([0,1,7,216,166,186,68,168,2,44,66,506,9,40,125,128,10,122]),function(j,e,w,N,T,D,S,p,C,n,g,t,s,c,u,d,a,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AccessibilityProvider=e.OneReferenceRenderer=e.FileReferencesRenderer=e.IdentityProvider=e.StringRepresentationProvider=e.Delegate=e.DataSource=void 0;let o=class{constructor(E){this._resolverService=E}hasChildren(E){return E instanceof r.ReferencesModel||E instanceof r.FileReferences}getChildren(E){if(E instanceof r.ReferencesModel)return E.groups;if(E instanceof r.FileReferences)return E.resolve(this._resolverService).then(I=>I.children);throw new Error("bad tree")}};o=Fe([Ce(0,g.ITextModelService)],o),e.DataSource=o;class i{getHeight(){return 23}getTemplateId(E){return E instanceof r.FileReferences?y.id:b.id}}e.Delegate=i;let l=class{constructor(E){this._keybindingService=E}getKeyboardNavigationLabel(E){var I;if(E instanceof r.OneReference){const k=(I=E.parent.getPreview(E))===null||I===void 0?void 0:I.preview(E.range);if(k)return k.value}return(0,n.basename)(E.uri)}};l=Fe([Ce(0,c.IKeybindingService)],l),e.StringRepresentationProvider=l;class h{getId(E){return E instanceof r.OneReference?E.id:E.uri}}e.IdentityProvider=h;let f=class extends C.Disposable{constructor(E,I,k){super();this._uriLabel=I;const M=document.createElement("div");M.classList.add("reference-file"),this.file=this._register(new D.IconLabel(M,{supportHighlights:!0})),this.badge=new N.CountBadge(w.append(M,w.$(".count"))),this._register((0,d.attachBadgeStyler)(this.badge,k)),E.appendChild(M)}set(E,I){let k=(0,n.dirname)(E.uri);this.file.setLabel((0,p.getBaseLabel)(E.uri),this._uriLabel.getUriLabel(k,{relative:!0}),{title:this._uriLabel.getUriLabel(E.uri),matches:I});const M=E.children.length;this.badge.setCount(M),M>1?this.badge.setTitleFormat((0,t.localize)(0,null,M)):this.badge.setTitleFormat((0,t.localize)(1,null,M))}};f=Fe([Ce(1,u.ILabelService),Ce(2,a.IThemeService)],f);let y=class Ci{constructor(E){this._instantiationService=E,this.templateId=Ci.id}renderTemplate(E){return this._instantiationService.createInstance(f,E)}renderElement(E,I,k){k.set(E.element,(0,S.createMatches)(E.filterData))}disposeTemplate(E){E.dispose()}};y.id="FileReferencesRenderer",y=Fe([Ce(0,s.IInstantiationService)],y),e.FileReferencesRenderer=y;class _{constructor(E){this.label=new T.HighlightedLabel(E,!1)}set(E,I){var k;const M=(k=E.parent.getPreview(E))===null||k===void 0?void 0:k.preview(E.range);if(!M||!M.value)this.label.set(`${(0,n.basename)(E.uri)}:${E.range.startLineNumber+1}:${E.range.startColumn+1}`);else{const{value:P,highlight:F}=M;I&&!S.FuzzyScore.isDefault(I)?(this.label.element.classList.toggle("referenceMatch",!1),this.label.set(P,(0,S.createMatches)(I))):(this.label.element.classList.toggle("referenceMatch",!0),this.label.set(P,[F]))}}}class b{constructor(){this.templateId=b.id}renderTemplate(E){return new _(E)}renderElement(E,I,k){k.set(E.element,E.filterData)}disposeTemplate(){}}e.OneReferenceRenderer=b,b.id="OneReferenceRenderer";class v{getWidgetAriaLabel(){return(0,t.localize)(2,null)}getAriaLabel(E){return E.ariaMessage}}e.AccessibilityProvider=v}),define(J[270],ee([0,1,82,2,20,114,49,46,10]),function(j,e,w,N,T,D,S,p,C){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AbstractEditorNavigationQuickAccessProvider=void 0;class n{constructor(t){this.options=t,this.rangeHighlightDecorationId=void 0}provide(t,s){var c;const u=new N.DisposableStore;t.canAcceptInBackground=!!((c=this.options)===null||c===void 0?void 0:c.canAcceptInBackground),t.matchOnLabel=t.matchOnDescription=t.matchOnDetail=t.sortByLabel=!1;const d=u.add(new N.MutableDisposable);return d.value=this.doProvide(t,s),u.add(this.onDidActiveTextEditorControlChange(()=>{d.value=void 0,d.value=this.doProvide(t,s)})),u}doProvide(t,s){const c=new N.DisposableStore,u=this.activeTextEditorControl;if(u&&this.canProvideWithTextEditor(u)){const d={editor:u},a=(0,D.getCodeEditor)(u);if(a){let r=(0,T.withNullAsUndefined)(u.saveViewState());c.add(a.onDidChangeCursorPosition(()=>{r=(0,T.withNullAsUndefined)(u.saveViewState())})),d.restoreViewState=()=>{r&&u===this.activeTextEditorControl&&u.restoreViewState(r)},c.add((0,w.once)(s.onCancellationRequested)(()=>{var o;return(o=d.restoreViewState)===null||o===void 0?void 0:o.call(d)}))}c.add((0,N.toDisposable)(()=>this.clearDecorations(u))),c.add(this.provideWithTextEditor(d,t,s))}else c.add(this.provideWithoutTextEditor(t,s));return c}canProvideWithTextEditor(t){return!0}gotoLocation({editor:t},s){t.setSelection(s.range),t.revealRangeInCenter(s.range,0),s.preserveFocus||t.focus()}getModel(t){var s;return(0,D.isDiffEditor)(t)?(s=t.getModel())===null||s===void 0?void 0:s.modified:t.getModel()}addDecorations(t,s){t.changeDecorations(c=>{const u=[];this.rangeHighlightDecorationId&&(u.push(this.rangeHighlightDecorationId.overviewRulerDecorationId),u.push(this.rangeHighlightDecorationId.rangeHighlightId),this.rangeHighlightDecorationId=void 0);const d=[{range:s,options:{description:"quick-access-range-highlight",className:"rangeHighlight",isWholeLine:!0}},{range:s,options:{description:"quick-access-range-highlight-overview",overviewRuler:{color:(0,C.themeColorFromId)(p.overviewRulerRangeHighlight),position:S.OverviewRulerLane.Full}}}],[a,r]=c.deltaDecorations(u,d);this.rangeHighlightDecorationId={rangeHighlightId:a,overviewRulerDecorationId:r}})}clearDecorations(t){const s=this.rangeHighlightDecorationId;s&&(t.changeDecorations(c=>{c.deltaDecorations([s.overviewRulerDecorationId,s.rangeHighlightId],[])}),this.rangeHighlightDecorationId=void 0)}}e.AbstractEditorNavigationQuickAccessProvider=n}),define(J[615],ee([0,1,2,114,270,525]),function(j,e,w,N,T,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AbstractGotoLineQuickAccessProvider=void 0;class S extends T.AbstractEditorNavigationQuickAccessProvider{constructor(){super({canAcceptInBackground:!0})}provideWithoutTextEditor(C){const n=(0,D.localize)(0,null);return C.items=[{label:n}],C.ariaLabel=n,w.Disposable.None}provideWithTextEditor(C,n,g){const t=C.editor,s=new w.DisposableStore;s.add(n.onDidAccept(d=>{const[a]=n.selectedItems;if(a){if(!this.isValidLineNumber(t,a.lineNumber))return;this.gotoLocation(C,{range:this.toRange(a.lineNumber,a.column),keyMods:n.keyMods,preserveFocus:d.inBackground}),d.inBackground||n.hide()}}));const c=()=>{const d=this.parsePosition(t,n.value.trim().substr(S.PREFIX.length)),a=this.getPickLabel(t,d.lineNumber,d.column);if(n.items=[{lineNumber:d.lineNumber,column:d.column,label:a}],n.ariaLabel=a,!this.isValidLineNumber(t,d.lineNumber)){this.clearDecorations(t);return}const r=this.toRange(d.lineNumber,d.column);t.revealRangeInCenter(r,0),this.addDecorations(t,r)};c(),s.add(n.onDidChangeValue(()=>c()));const u=(0,N.getCodeEditor)(t);return u&&u.getOptions().get(59).renderType===2&&(u.updateOptions({lineNumbers:"on"}),s.add((0,w.toDisposable)(()=>u.updateOptions({lineNumbers:"relative"})))),s}toRange(C=1,n=1){return{startLineNumber:C,startColumn:n,endLineNumber:C,endColumn:n}}parsePosition(C,n){const g=n.split(/,|:|#/).map(s=>parseInt(s,10)).filter(s=>!isNaN(s)),t=this.lineCount(C)+1;return{lineNumber:g[0]>0?g[0]:t+g[0],column:g[1]}}getPickLabel(C,n,g){if(this.isValidLineNumber(C,n))return this.isValidColumn(C,n,g)?(0,D.localize)(1,null,n,g):(0,D.localize)(2,null,n);const t=C.getPosition()||{lineNumber:1,column:1},s=this.lineCount(C);return s>1?(0,D.localize)(3,null,t.lineNumber,t.column,s):(0,D.localize)(4,null,t.lineNumber,t.column)}isValidLineNumber(C,n){return!n||typeof n!="number"?!1:n>0&&n<=this.lineCount(C)}isValidColumn(C,n,g){if(!g||typeof g!="number")return!1;const t=this.getModel(C);if(!t)return!1;const s={lineNumber:n,column:g};return t.validatePosition(s).equals(s)}lineCount(C){var n,g;return(g=(n=this.getModel(C))===null||n===void 0?void 0:n.getLineCount())!==null&&g!==void 0?g:0}}e.AbstractGotoLineQuickAccessProvider=S,S.PREFIX=":"}),define(J[616],ee([0,1,23,27,305,2,8,3,18,256,270,526]),function(j,e,w,N,T,D,S,p,C,n,g,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AbstractGotoSymbolQuickAccessProvider=void 0;class s extends g.AbstractEditorNavigationQuickAccessProvider{constructor(a=Object.create(null)){super(a);this.options=a,this.options.canAcceptInBackground=!0}provideWithoutTextEditor(a){return this.provideLabelPick(a,(0,t.localize)(0,null)),D.Disposable.None}provideWithTextEditor(a,r,o){const i=a.editor,l=this.getModel(i);return l?C.DocumentSymbolProviderRegistry.has(l)?this.doProvideWithEditorSymbols(a,l,r,o):this.doProvideWithoutEditorSymbols(a,l,r,o):D.Disposable.None}doProvideWithoutEditorSymbols(a,r,o,i){const l=new D.DisposableStore;return this.provideLabelPick(o,(0,t.localize)(1,null)),(()=>Re(this,void 0,void 0,function*(){!(yield this.waitForLanguageSymbolRegistry(r,l))||i.isCancellationRequested||l.add(this.doProvideWithEditorSymbols(a,r,o,i))}))(),l}provideLabelPick(a,r){a.items=[{label:r,index:0,kind:14}],a.ariaLabel=r}waitForLanguageSymbolRegistry(a,r){return Re(this,void 0,void 0,function*(){if(C.DocumentSymbolProviderRegistry.has(a))return!0;let o;const i=new Promise(h=>o=h),l=r.add(C.DocumentSymbolProviderRegistry.onDidChange(()=>{C.DocumentSymbolProviderRegistry.has(a)&&(l.dispose(),o(!0))}));return r.add((0,D.toDisposable)(()=>o(!1))),i})}doProvideWithEditorSymbols(a,r,o,i){const l=a.editor,h=new D.DisposableStore;h.add(o.onDidAccept(v=>{const[m]=o.selectedItems;m&&m.range&&(this.gotoLocation(a,{range:m.range.selection,keyMods:o.keyMods,preserveFocus:v.inBackground}),v.inBackground||o.hide())})),h.add(o.onDidTriggerItemButton(({item:v})=>{v&&v.range&&(this.gotoLocation(a,{range:v.range.selection,keyMods:o.keyMods,forceSideBySide:!0}),o.hide())}));const f=this.getDocumentSymbols(r,i);let y;const _=()=>Re(this,void 0,void 0,function*(){y==null||y.dispose(!0),o.busy=!1,y=new w.CancellationTokenSource(i),o.busy=!0;try{const v=(0,T.prepareQuery)(o.value.substr(s.PREFIX.length).trim()),m=yield this.doGetSymbolPicks(f,v,void 0,y.token);if(i.isCancellationRequested)return;m.length>0?o.items=m:v.original.length>0?this.provideLabelPick(o,(0,t.localize)(2,null)):this.provideLabelPick(o,(0,t.localize)(3,null))}finally{i.isCancellationRequested||(o.busy=!1)}});h.add(o.onDidChangeValue(()=>_())),_();let b=!0;return h.add(o.onDidChangeActive(()=>{const[v]=o.activeItems;if(v&&v.range){if(b){b=!1;return}l.revealRangeInCenter(v.range.selection,0),this.addDecorations(l,v.range.decoration)}})),h}doGetSymbolPicks(a,r,o,i){return Re(this,void 0,void 0,function*(){const l=yield a;if(i.isCancellationRequested)return[];const h=r.original.indexOf(s.SCOPE_PREFIX)===0,f=h?1:0;let y,_;r.values&&r.values.length>1?(y=(0,T.pieceToQuery)(r.values[0]),_=(0,T.pieceToQuery)(r.values.slice(1))):y=r;const b=[];for(let E=0;E<l.length;E++){const I=l[E],k=(0,S.trim)(I.name),M=`$(symbol-${C.SymbolKinds.toString(I.kind)||"property"}) ${k}`,P=M.length-k.length;let F=I.containerName;(o==null?void 0:o.extraContainerLabel)&&(F?F=`${o.extraContainerLabel} \u2022 ${F}`:F=o.extraContainerLabel);let R,A,O,L;if(r.original.length>f){let W=!1;if(y!==r&&([R,A]=(0,T.scoreFuzzy2)(M,Object.assign(Object.assign({},r),{values:void 0}),f,P),typeof R=="number"&&(W=!0)),typeof R!="number"&&([R,A]=(0,T.scoreFuzzy2)(M,y,f,P),typeof R!="number"))continue;if(!W&&_){if(F&&_.original.length>0&&([O,L]=(0,T.scoreFuzzy2)(F,_)),typeof O!="number")continue;typeof R=="number"&&(R+=O)}}const B=I.tags&&I.tags.indexOf(1)>=0;b.push({index:E,kind:I.kind,score:R,label:M,ariaLabel:k,description:F,highlights:B?void 0:{label:A,description:L},range:{selection:p.Range.collapseToStart(I.selectionRange),decoration:I.range},strikethrough:B,buttons:(()=>{var W,K;const H=((W=this.options)===null||W===void 0?void 0:W.openSideBySideDirection)?(K=this.options)===null||K===void 0?void 0:K.openSideBySideDirection():void 0;if(!!H)return[{iconClass:H==="right"?N.Codicon.splitHorizontal.classNames:N.Codicon.splitVertical.classNames,tooltip:H==="right"?(0,t.localize)(4,null):(0,t.localize)(5,null)}]})()})}const v=b.sort((E,I)=>h?this.compareByKindAndScore(E,I):this.compareByScore(E,I));let m=[];if(h){let M=function(){I&&typeof E=="number"&&k>0&&(I.label=(0,S.format)(u[E]||c,k))},E,I,k=0;for(const P of v)E!==P.kind?(M(),E=P.kind,k=1,I={type:"separator"},m.push(I)):k++,m.push(P);M()}else v.length>0&&(m=[{label:(0,t.localize)(6,null,b.length),type:"separator"},...v]);return m})}compareByScore(a,r){if(typeof a.score!="number"&&typeof r.score=="number")return 1;if(typeof a.score=="number"&&typeof r.score!="number")return-1;if(typeof a.score=="number"&&typeof r.score=="number"){if(a.score>r.score)return-1;if(a.score<r.score)return 1}return a.index<r.index?-1:a.index>r.index?1:0}compareByKindAndScore(a,r){const o=u[a.kind]||c,i=u[r.kind]||c,l=o.localeCompare(i);return l===0?this.compareByScore(a,r):l}getDocumentSymbols(a,r){return Re(this,void 0,void 0,function*(){const o=yield n.OutlineModel.create(a,r);return r.isCancellationRequested?[]:o.asListOfDocumentSymbols()})}}e.AbstractGotoSymbolQuickAccessProvider=s,s.PREFIX="@",s.SCOPE_PREFIX=":",s.PREFIX_BY_CATEGORY=`${s.PREFIX}${s.SCOPE_PREFIX}`;const c=(0,t.localize)(7,null),u={[5]:(0,t.localize)(8,null),[11]:(0,t.localize)(9,null),[8]:(0,t.localize)(10,null),[12]:(0,t.localize)(11,null),[4]:(0,t.localize)(12,null),[22]:(0,t.localize)(13,null),[23]:(0,t.localize)(14,null),[24]:(0,t.localize)(15,null),[10]:(0,t.localize)(16,null),[2]:(0,t.localize)(17,null),[3]:(0,t.localize)(18,null),[25]:(0,t.localize)(19,null),[1]:(0,t.localize)(20,null),[6]:(0,t.localize)(21,null),[9]:(0,t.localize)(22,null),[21]:(0,t.localize)(23,null),[14]:(0,t.localize)(24,null),[0]:(0,t.localize)(25,null),[17]:(0,t.localize)(26,null),[15]:(0,t.localize)(27,null),[16]:(0,t.localize)(28,null),[18]:(0,t.localize)(29,null),[19]:(0,t.localize)(30,null),[7]:(0,t.localize)(31,null),[13]:(0,t.localize)(32,null)}}),define(J[617],ee([0,1,2,13,528,15,40,21,10,370]),function(j,e,w,N,T,D,S,p,C){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.RenameInputField=e.CONTEXT_RENAME_INPUT_VISIBLE=void 0,e.CONTEXT_RENAME_INPUT_VISIBLE=new D.RawContextKey("renameInputVisible",!1,(0,T.localize)(0,null));let n=class{constructor(t,s,c,u,d){this._editor=t,this._acceptKeybindings=s,this._themeService=c,this._keybindingService=u,this._disposables=new w.DisposableStore,this.allowEditorOverflow=!0,this._visibleContextKey=e.CONTEXT_RENAME_INPUT_VISIBLE.bindTo(d),this._editor.addContentWidget(this),this._disposables.add(this._editor.onDidChangeConfiguration(a=>{a.hasChanged(43)&&this._updateFont()})),this._disposables.add(c.onDidColorThemeChange(this._updateStyles,this))}dispose(){this._disposables.dispose(),this._editor.removeContentWidget(this)}getId(){return"__renameInputWidget"}getDomNode(){if(!this._domNode){this._domNode=document.createElement("div"),this._domNode.className="monaco-editor rename-box",this._input=document.createElement("input"),this._input.className="rename-input",this._input.type="text",this._input.setAttribute("aria-label",(0,T.localize)(1,null)),this._domNode.appendChild(this._input),this._label=document.createElement("div"),this._label.className="rename-label",this._domNode.appendChild(this._label);const t=()=>{var s,c;const[u,d]=this._acceptKeybindings;this._keybindingService.lookupKeybinding(u),this._label.innerText=(0,T.localize)(2,null,(s=this._keybindingService.lookupKeybinding(u))===null||s===void 0?void 0:s.getLabel(),(c=this._keybindingService.lookupKeybinding(d))===null||c===void 0?void 0:c.getLabel())};t(),this._disposables.add(this._keybindingService.onDidUpdateKeybindings(t)),this._updateFont(),this._updateStyles(this._themeService.getColorTheme())}return this._domNode}_updateStyles(t){var s,c,u,d;if(!this._input||!this._domNode)return;const a=t.getColor(p.widgetShadow);this._domNode.style.backgroundColor=String((s=t.getColor(p.editorWidgetBackground))!==null&&s!==void 0?s:""),this._domNode.style.boxShadow=a?` 0 0 8px 2px ${a}`:"",this._domNode.style.color=String((c=t.getColor(p.inputForeground))!==null&&c!==void 0?c:""),this._input.style.backgroundColor=String((u=t.getColor(p.inputBackground))!==null&&u!==void 0?u:"");const r=t.getColor(p.inputBorder);this._input.style.borderWidth=r?"1px":"0px",this._input.style.borderStyle=r?"solid":"none",this._input.style.borderColor=(d=r==null?void 0:r.toString())!==null&&d!==void 0?d:"none"}_updateFont(){if(!this._input||!this._label)return;const t=this._editor.getOption(43);this._input.style.fontFamily=t.fontFamily,this._input.style.fontWeight=t.fontWeight,this._input.style.fontSize=`${t.fontSize}px`,this._label.style.fontSize=`${t.fontSize*.8}px`}getPosition(){return this._visible?{position:this._position,preference:[2,1]}:null}afterRender(t){t||this.cancelInput(!0)}acceptInput(t){this._currentAcceptInput&&this._currentAcceptInput(t)}cancelInput(t){this._currentCancelInput&&this._currentCancelInput(t)}getInput(t,s,c,u,d,a){this._domNode.classList.toggle("preview",d),this._position=new N.Position(t.startLineNumber,t.startColumn),this._input.value=s,this._input.setAttribute("selectionStart",c.toString()),this._input.setAttribute("selectionEnd",u.toString()),this._input.size=Math.max((t.endColumn-t.startColumn)*1.1,20);const r=new w.DisposableStore;return new Promise(o=>{this._currentCancelInput=i=>(this._currentAcceptInput=void 0,this._currentCancelInput=void 0,o(i),!0),this._currentAcceptInput=i=>{if(this._input.value.trim().length===0||this._input.value===s){this.cancelInput(!0);return}this._currentAcceptInput=void 0,this._currentCancelInput=void 0,o({newName:this._input.value,wantsPreview:d&&i})},a.onCancellationRequested(()=>this.cancelInput(!0)),r.add(this._editor.onDidBlurEditorWidget(()=>this.cancelInput(!1))),this._show()}).finally(()=>{r.dispose(),this._hide()})}_show(){this._editor.revealLineInCenterIfOutsideViewport(this._position.lineNumber,0),this._visible=!0,this._visibleContextKey.set(!0),this._editor.layoutContentWidget(this),setTimeout(()=>{this._input.focus(),this._input.setSelectionRange(parseInt(this._input.getAttribute("selectionStart")),parseInt(this._input.getAttribute("selectionEnd")))},100)}_hide(){this._visible=!1,this._visibleContextKey.reset(),this._editor.layoutContentWidget(this)}};n=Fe([Ce(2,C.IThemeService),Ce(3,S.IKeybindingService),Ce(4,D.IContextKeyService)],n),e.RenameInputField=n}),define(J[271],ee([0,1,27,538,21,10]),function(j,e,w,N,T,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SYMBOL_ICON_VARIABLE_FOREGROUND=e.SYMBOL_ICON_UNIT_FOREGROUND=e.SYMBOL_ICON_TYPEPARAMETER_FOREGROUND=e.SYMBOL_ICON_TEXT_FOREGROUND=e.SYMBOL_ICON_STRUCT_FOREGROUND=e.SYMBOL_ICON_STRING_FOREGROUND=e.SYMBOL_ICON_SNIPPET_FOREGROUND=e.SYMBOL_ICON_REFERENCE_FOREGROUND=e.SYMBOL_ICON_PROPERTY_FOREGROUND=e.SYMBOL_ICON_PACKAGE_FOREGROUND=e.SYMBOL_ICON_OPERATOR_FOREGROUND=e.SYMBOL_ICON_OBJECT_FOREGROUND=e.SYMBOL_ICON_NUMBER_FOREGROUND=e.SYMBOL_ICON_NULL_FOREGROUND=e.SYMBOL_ICON_NAMESPACE_FOREGROUND=e.SYMBOL_ICON_MODULE_FOREGROUND=e.SYMBOL_ICON_METHOD_FOREGROUND=e.SYMBOL_ICON_KEYWORD_FOREGROUND=e.SYMBOL_ICON_KEY_FOREGROUND=e.SYMBOL_ICON_INTERFACE_FOREGROUND=e.SYMBOL_ICON_FUNCTION_FOREGROUND=e.SYMBOL_ICON_FOLDER_FOREGROUND=e.SYMBOL_ICON_FILE_FOREGROUND=e.SYMBOL_ICON_FIELD_FOREGROUND=e.SYMBOL_ICON_EVENT_FOREGROUND=e.SYMBOL_ICON_ENUMERATOR_MEMBER_FOREGROUND=e.SYMBOL_ICON_ENUMERATOR_FOREGROUND=e.SYMBOL_ICON_CONSTRUCTOR_FOREGROUND=e.SYMBOL_ICON_CONSTANT_FOREGROUND=e.SYMBOL_ICON_COLOR_FOREGROUND=e.SYMBOL_ICON_CLASS_FOREGROUND=e.SYMBOL_ICON_BOOLEAN_FOREGROUND=e.SYMBOL_ICON_ARRAY_FOREGROUND=void 0,e.SYMBOL_ICON_ARRAY_FOREGROUND=(0,T.registerColor)("symbolIcon.arrayForeground",{dark:T.foreground,light:T.foreground,hc:T.foreground},(0,N.localize)(0,null)),e.SYMBOL_ICON_BOOLEAN_FOREGROUND=(0,T.registerColor)("symbolIcon.booleanForeground",{dark:T.foreground,light:T.foreground,hc:T.foreground},(0,N.localize)(1,null)),e.SYMBOL_ICON_CLASS_FOREGROUND=(0,T.registerColor)("symbolIcon.classForeground",{dark:"#EE9D28",light:"#D67E00",hc:"#EE9D28"},(0,N.localize)(2,null)),e.SYMBOL_ICON_COLOR_FOREGROUND=(0,T.registerColor)("symbolIcon.colorForeground",{dark:T.foreground,light:T.foreground,hc:T.foreground},(0,N.localize)(3,null)),e.SYMBOL_ICON_CONSTANT_FOREGROUND=(0,T.registerColor)("symbolIcon.constantForeground",{dark:T.foreground,light:T.foreground,hc:T.foreground},(0,N.localize)(4,null)),e.SYMBOL_ICON_CONSTRUCTOR_FOREGROUND=(0,T.registerColor)("symbolIcon.constructorForeground",{dark:"#B180D7",light:"#652D90",hc:"#B180D7"},(0,N.localize)(5,null)),e.SYMBOL_ICON_ENUMERATOR_FOREGROUND=(0,T.registerColor)("symbolIcon.enumeratorForeground",{dark:"#EE9D28",light:"#D67E00",hc:"#EE9D28"},(0,N.localize)(6,null)),e.SYMBOL_ICON_ENUMERATOR_MEMBER_FOREGROUND=(0,T.registerColor)("symbolIcon.enumeratorMemberForeground",{dark:"#75BEFF",light:"#007ACC",hc:"#75BEFF"},(0,N.localize)(7,null)),e.SYMBOL_ICON_EVENT_FOREGROUND=(0,T.registerColor)("symbolIcon.eventForeground",{dark:"#EE9D28",light:"#D67E00",hc:"#EE9D28"},(0,N.localize)(8,null)),e.SYMBOL_ICON_FIELD_FOREGROUND=(0,T.registerColor)("symbolIcon.fieldForeground",{dark:"#75BEFF",light:"#007ACC",hc:"#75BEFF"},(0,N.localize)(9,null)),e.SYMBOL_ICON_FILE_FOREGROUND=(0,T.registerColor)("symbolIcon.fileForeground",{dark:T.foreground,light:T.foreground,hc:T.foreground},(0,N.localize)(10,null)),e.SYMBOL_ICON_FOLDER_FOREGROUND=(0,T.registerColor)("symbolIcon.folderForeground",{dark:T.foreground,light:T.foreground,hc:T.foreground},(0,N.localize)(11,null)),e.SYMBOL_ICON_FUNCTION_FOREGROUND=(0,T.registerColor)("symbolIcon.functionForeground",{dark:"#B180D7",light:"#652D90",hc:"#B180D7"},(0,N.localize)(12,null)),e.SYMBOL_ICON_INTERFACE_FOREGROUND=(0,T.registerColor)("symbolIcon.interfaceForeground",{dark:"#75BEFF",light:"#007ACC",hc:"#75BEFF"},(0,N.localize)(13,null)),e.SYMBOL_ICON_KEY_FOREGROUND=(0,T.registerColor)("symbolIcon.keyForeground",{dark:T.foreground,light:T.foreground,hc:T.foreground},(0,N.localize)(14,null)),e.SYMBOL_ICON_KEYWORD_FOREGROUND=(0,T.registerColor)("symbolIcon.keywordForeground",{dark:T.foreground,light:T.foreground,hc:T.foreground},(0,N.localize)(15,null)),e.SYMBOL_ICON_METHOD_FOREGROUND=(0,T.registerColor)("symbolIcon.methodForeground",{dark:"#B180D7",light:"#652D90",hc:"#B180D7"},(0,N.localize)(16,null)),e.SYMBOL_ICON_MODULE_FOREGROUND=(0,T.registerColor)("symbolIcon.moduleForeground",{dark:T.foreground,light:T.foreground,hc:T.foreground},(0,N.localize)(17,null)),e.SYMBOL_ICON_NAMESPACE_FOREGROUND=(0,T.registerColor)("symbolIcon.namespaceForeground",{dark:T.foreground,light:T.foreground,hc:T.foreground},(0,N.localize)(18,null)),e.SYMBOL_ICON_NULL_FOREGROUND=(0,T.registerColor)("symbolIcon.nullForeground",{dark:T.foreground,light:T.foreground,hc:T.foreground},(0,N.localize)(19,null)),e.SYMBOL_ICON_NUMBER_FOREGROUND=(0,T.registerColor)("symbolIcon.numberForeground",{dark:T.foreground,light:T.foreground,hc:T.foreground},(0,N.localize)(20,null)),e.SYMBOL_ICON_OBJECT_FOREGROUND=(0,T.registerColor)("symbolIcon.objectForeground",{dark:T.foreground,light:T.foreground,hc:T.foreground},(0,N.localize)(21,null)),e.SYMBOL_ICON_OPERATOR_FOREGROUND=(0,T.registerColor)("symbolIcon.operatorForeground",{dark:T.foreground,light:T.foreground,hc:T.foreground},(0,N.localize)(22,null)),e.SYMBOL_ICON_PACKAGE_FOREGROUND=(0,T.registerColor)("symbolIcon.packageForeground",{dark:T.foreground,light:T.foreground,hc:T.foreground},(0,N.localize)(23,null)),e.SYMBOL_ICON_PROPERTY_FOREGROUND=(0,T.registerColor)("symbolIcon.propertyForeground",{dark:T.foreground,light:T.foreground,hc:T.foreground},(0,N.localize)(24,null)),e.SYMBOL_ICON_REFERENCE_FOREGROUND=(0,T.registerColor)("symbolIcon.referenceForeground",{dark:T.foreground,light:T.foreground,hc:T.foreground},(0,N.localize)(25,null)),e.SYMBOL_ICON_SNIPPET_FOREGROUND=(0,T.registerColor)("symbolIcon.snippetForeground",{dark:T.foreground,light:T.foreground,hc:T.foreground},(0,N.localize)(26,null)),e.SYMBOL_ICON_STRING_FOREGROUND=(0,T.registerColor)("symbolIcon.stringForeground",{dark:T.foreground,light:T.foreground,hc:T.foreground},(0,N.localize)(27,null)),e.SYMBOL_ICON_STRUCT_FOREGROUND=(0,T.registerColor)("symbolIcon.structForeground",{dark:T.foreground,light:T.foreground,hc:T.foreground},(0,N.localize)(28,null)),e.SYMBOL_ICON_TEXT_FOREGROUND=(0,T.registerColor)("symbolIcon.textForeground",{dark:T.foreground,light:T.foreground,hc:T.foreground},(0,N.localize)(29,null)),e.SYMBOL_ICON_TYPEPARAMETER_FOREGROUND=(0,T.registerColor)("symbolIcon.typeParameterForeground",{dark:T.foreground,light:T.foreground,hc:T.foreground},(0,N.localize)(30,null)),e.SYMBOL_ICON_UNIT_FOREGROUND=(0,T.registerColor)("symbolIcon.unitForeground",{dark:T.foreground,light:T.foreground,hc:T.foreground},(0,N.localize)(31,null)),e.SYMBOL_ICON_VARIABLE_FOREGROUND=(0,T.registerColor)("symbolIcon.variableForeground",{dark:"#75BEFF",light:"#007ACC",hc:"#75BEFF"},(0,N.localize)(32,null)),(0,D.registerThemingParticipant)((S,p)=>{const C=S.getColor(e.SYMBOL_ICON_ARRAY_FOREGROUND);C&&p.addRule(`${w.Codicon.symbolArray.cssSelector} { color: ${C}; }`);const n=S.getColor(e.SYMBOL_ICON_BOOLEAN_FOREGROUND);n&&p.addRule(`${w.Codicon.symbolBoolean.cssSelector} { color: ${n}; }`);const g=S.getColor(e.SYMBOL_ICON_CLASS_FOREGROUND);g&&p.addRule(`${w.Codicon.symbolClass.cssSelector} { color: ${g}; }`);const t=S.getColor(e.SYMBOL_ICON_METHOD_FOREGROUND);t&&p.addRule(`${w.Codicon.symbolMethod.cssSelector} { color: ${t}; }`);const s=S.getColor(e.SYMBOL_ICON_COLOR_FOREGROUND);s&&p.addRule(`${w.Codicon.symbolColor.cssSelector} { color: ${s}; }`);const c=S.getColor(e.SYMBOL_ICON_CONSTANT_FOREGROUND);c&&p.addRule(`${w.Codicon.symbolConstant.cssSelector} { color: ${c}; }`);const u=S.getColor(e.SYMBOL_ICON_CONSTRUCTOR_FOREGROUND);u&&p.addRule(`${w.Codicon.symbolConstructor.cssSelector} { color: ${u}; }`);const d=S.getColor(e.SYMBOL_ICON_ENUMERATOR_FOREGROUND);d&&p.addRule(`
            ${w.Codicon.symbolValue.cssSelector},${w.Codicon.symbolEnum.cssSelector} { color: ${d}; }`);const a=S.getColor(e.SYMBOL_ICON_ENUMERATOR_MEMBER_FOREGROUND);a&&p.addRule(`${w.Codicon.symbolEnumMember.cssSelector} { color: ${a}; }`);const r=S.getColor(e.SYMBOL_ICON_EVENT_FOREGROUND);r&&p.addRule(`${w.Codicon.symbolEvent.cssSelector} { color: ${r}; }`);const o=S.getColor(e.SYMBOL_ICON_FIELD_FOREGROUND);o&&p.addRule(`${w.Codicon.symbolField.cssSelector} { color: ${o}; }`);const i=S.getColor(e.SYMBOL_ICON_FILE_FOREGROUND);i&&p.addRule(`${w.Codicon.symbolFile.cssSelector} { color: ${i}; }`);const l=S.getColor(e.SYMBOL_ICON_FOLDER_FOREGROUND);l&&p.addRule(`${w.Codicon.symbolFolder.cssSelector} { color: ${l}; }`);const h=S.getColor(e.SYMBOL_ICON_FUNCTION_FOREGROUND);h&&p.addRule(`${w.Codicon.symbolFunction.cssSelector} { color: ${h}; }`);const f=S.getColor(e.SYMBOL_ICON_INTERFACE_FOREGROUND);f&&p.addRule(`${w.Codicon.symbolInterface.cssSelector} { color: ${f}; }`);const y=S.getColor(e.SYMBOL_ICON_KEY_FOREGROUND);y&&p.addRule(`${w.Codicon.symbolKey.cssSelector} { color: ${y}; }`);const _=S.getColor(e.SYMBOL_ICON_KEYWORD_FOREGROUND);_&&p.addRule(`${w.Codicon.symbolKeyword.cssSelector} { color: ${_}; }`);const b=S.getColor(e.SYMBOL_ICON_MODULE_FOREGROUND);b&&p.addRule(`${w.Codicon.symbolModule.cssSelector} { color: ${b}; }`);const v=S.getColor(e.SYMBOL_ICON_NAMESPACE_FOREGROUND);v&&p.addRule(`${w.Codicon.symbolNamespace.cssSelector} { color: ${v}; }`);const m=S.getColor(e.SYMBOL_ICON_NULL_FOREGROUND);m&&p.addRule(`${w.Codicon.symbolNull.cssSelector} { color: ${m}; }`);const E=S.getColor(e.SYMBOL_ICON_NUMBER_FOREGROUND);E&&p.addRule(`${w.Codicon.symbolNumber.cssSelector} { color: ${E}; }`);const I=S.getColor(e.SYMBOL_ICON_OBJECT_FOREGROUND);I&&p.addRule(`${w.Codicon.symbolObject.cssSelector} { color: ${I}; }`);const k=S.getColor(e.SYMBOL_ICON_OPERATOR_FOREGROUND);k&&p.addRule(`${w.Codicon.symbolOperator.cssSelector} { color: ${k}; }`);const M=S.getColor(e.SYMBOL_ICON_PACKAGE_FOREGROUND);M&&p.addRule(`${w.Codicon.symbolPackage.cssSelector} { color: ${M}; }`);const P=S.getColor(e.SYMBOL_ICON_PROPERTY_FOREGROUND);P&&p.addRule(`${w.Codicon.symbolProperty.cssSelector} { color: ${P}; }`);const F=S.getColor(e.SYMBOL_ICON_REFERENCE_FOREGROUND);F&&p.addRule(`${w.Codicon.symbolReference.cssSelector} { color: ${F}; }`);const R=S.getColor(e.SYMBOL_ICON_SNIPPET_FOREGROUND);R&&p.addRule(`${w.Codicon.symbolSnippet.cssSelector} { color: ${R}; }`);const A=S.getColor(e.SYMBOL_ICON_STRING_FOREGROUND);A&&p.addRule(`${w.Codicon.symbolString.cssSelector} { color: ${A}; }`);const O=S.getColor(e.SYMBOL_ICON_STRUCT_FOREGROUND);O&&p.addRule(`${w.Codicon.symbolStruct.cssSelector} { color: ${O}; }`);const L=S.getColor(e.SYMBOL_ICON_TEXT_FOREGROUND);L&&p.addRule(`${w.Codicon.symbolText.cssSelector} { color: ${L}; }`);const B=S.getColor(e.SYMBOL_ICON_TYPEPARAMETER_FOREGROUND);B&&p.addRule(`${w.Codicon.symbolTypeParameter.cssSelector} { color: ${B}; }`);const W=S.getColor(e.SYMBOL_ICON_UNIT_FOREGROUND);W&&p.addRule(`${w.Codicon.symbolUnit.cssSelector} { color: ${W}; }`);const K=S.getColor(e.SYMBOL_ICON_VARIABLE_FOREGROUND);K&&p.addRule(`${w.Codicon.symbolVariable.cssSelector} { color: ${K}; }`)})}),define(J[272],ee([0,1,7,48,601,15,10]),function(j,e,w,N,T,D,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.StandaloneCodeEditorServiceImpl=void 0;let p=class extends T.CodeEditorServiceImpl{constructor(n,g,t){super(n,t);this.onCodeEditorAdd(()=>this._checkContextKey()),this.onCodeEditorRemove(()=>this._checkContextKey()),this._editorIsOpen=g.createKey("editorIsOpen",!1),this._activeCodeEditor=null}_checkContextKey(){let n=!1;for(const g of this.listCodeEditors())if(!g.isSimpleWidget){n=!0;break}this._editorIsOpen.set(n)}setActiveCodeEditor(n){this._activeCodeEditor=n}getActiveCodeEditor(){return this._activeCodeEditor}openCodeEditor(n,g,t){return g?Promise.resolve(this.doOpenEditor(g,n)):Promise.resolve(null)}doOpenEditor(n,g){if(!this.findModel(n,g.resource)){if(g.resource){const c=g.resource.scheme;if(c===N.Schemas.http||c===N.Schemas.https)return(0,w.windowOpenNoOpener)(g.resource.toString()),n}return null}const s=g.options?g.options.selection:null;if(s)if(typeof s.endLineNumber=="number"&&typeof s.endColumn=="number")n.setSelection(s),n.revealRangeInCenter(s,1);else{const c={lineNumber:s.startLineNumber,column:s.startColumn};n.setPosition(c),n.revealPositionInCenter(c,1)}return n}findModel(n,g){const t=n.getModel();return t&&t.uri.toString()!==g.toString()?null:t}};p=Fe([Ce(1,D.IContextKeyService),Ce(2,S.IThemeService)],p),e.StandaloneCodeEditorServiceImpl=p}),define(J[618],ee([0,1,46,21]),function(j,e,w,N){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.hc_black=e.vs_dark=e.vs=void 0,e.vs={base:"vs",inherit:!1,rules:[{token:"",foreground:"000000",background:"fffffe"},{token:"invalid",foreground:"cd3131"},{token:"emphasis",fontStyle:"italic"},{token:"strong",fontStyle:"bold"},{token:"variable",foreground:"001188"},{token:"variable.predefined",foreground:"4864AA"},{token:"constant",foreground:"dd0000"},{token:"comment",foreground:"008000"},{token:"number",foreground:"098658"},{token:"number.hex",foreground:"3030c0"},{token:"regexp",foreground:"800000"},{token:"annotation",foreground:"808080"},{token:"type",foreground:"008080"},{token:"delimiter",foreground:"000000"},{token:"delimiter.html",foreground:"383838"},{token:"delimiter.xml",foreground:"0000FF"},{token:"tag",foreground:"800000"},{token:"tag.id.pug",foreground:"4F76AC"},{token:"tag.class.pug",foreground:"4F76AC"},{token:"meta.scss",foreground:"800000"},{token:"metatag",foreground:"e00000"},{token:"metatag.content.html",foreground:"FF0000"},{token:"metatag.html",foreground:"808080"},{token:"metatag.xml",foreground:"808080"},{token:"metatag.php",fontStyle:"bold"},{token:"key",foreground:"863B00"},{token:"string.key.json",foreground:"A31515"},{token:"string.value.json",foreground:"0451A5"},{token:"attribute.name",foreground:"FF0000"},{token:"attribute.value",foreground:"0451A5"},{token:"attribute.value.number",foreground:"098658"},{token:"attribute.value.unit",foreground:"098658"},{token:"attribute.value.html",foreground:"0000FF"},{token:"attribute.value.xml",foreground:"0000FF"},{token:"string",foreground:"A31515"},{token:"string.html",foreground:"0000FF"},{token:"string.sql",foreground:"FF0000"},{token:"string.yaml",foreground:"0451A5"},{token:"keyword",foreground:"0000FF"},{token:"keyword.json",foreground:"0451A5"},{token:"keyword.flow",foreground:"AF00DB"},{token:"keyword.flow.scss",foreground:"0000FF"},{token:"operator.scss",foreground:"666666"},{token:"operator.sql",foreground:"778899"},{token:"operator.swift",foreground:"666666"},{token:"predefined.sql",foreground:"C700C7"}],colors:{[N.editorBackground]:"#FFFFFE",[N.editorForeground]:"#000000",[N.editorInactiveSelection]:"#E5EBF1",[w.editorIndentGuides]:"#D3D3D3",[w.editorActiveIndentGuides]:"#939393",[N.editorSelectionHighlight]:"#ADD6FF4D"}},e.vs_dark={base:"vs-dark",inherit:!1,rules:[{token:"",foreground:"D4D4D4",background:"1E1E1E"},{token:"invalid",foreground:"f44747"},{token:"emphasis",fontStyle:"italic"},{token:"strong",fontStyle:"bold"},{token:"variable",foreground:"74B0DF"},{token:"variable.predefined",foreground:"4864AA"},{token:"variable.parameter",foreground:"9CDCFE"},{token:"constant",foreground:"569CD6"},{token:"comment",foreground:"608B4E"},{token:"number",foreground:"B5CEA8"},{token:"number.hex",foreground:"5BB498"},{token:"regexp",foreground:"B46695"},{token:"annotation",foreground:"cc6666"},{token:"type",foreground:"3DC9B0"},{token:"delimiter",foreground:"DCDCDC"},{token:"delimiter.html",foreground:"808080"},{token:"delimiter.xml",foreground:"808080"},{token:"tag",foreground:"569CD6"},{token:"tag.id.pug",foreground:"4F76AC"},{token:"tag.class.pug",foreground:"4F76AC"},{token:"meta.scss",foreground:"A79873"},{token:"meta.tag",foreground:"CE9178"},{token:"metatag",foreground:"DD6A6F"},{token:"metatag.content.html",foreground:"9CDCFE"},{token:"metatag.html",foreground:"569CD6"},{token:"metatag.xml",foreground:"569CD6"},{token:"metatag.php",fontStyle:"bold"},{token:"key",foreground:"9CDCFE"},{token:"string.key.json",foreground:"9CDCFE"},{token:"string.value.json",foreground:"CE9178"},{token:"attribute.name",foreground:"9CDCFE"},{token:"attribute.value",foreground:"CE9178"},{token:"attribute.value.number.css",foreground:"B5CEA8"},{token:"attribute.value.unit.css",foreground:"B5CEA8"},{token:"attribute.value.hex.css",foreground:"D4D4D4"},{token:"string",foreground:"CE9178"},{token:"string.sql",foreground:"FF0000"},{token:"keyword",foreground:"569CD6"},{token:"keyword.flow",foreground:"C586C0"},{token:"keyword.json",foreground:"CE9178"},{token:"keyword.flow.scss",foreground:"569CD6"},{token:"operator.scss",foreground:"909090"},{token:"operator.sql",foreground:"778899"},{token:"operator.swift",foreground:"909090"},{token:"predefined.sql",foreground:"FF00FF"}],colors:{[N.editorBackground]:"#1E1E1E",[N.editorForeground]:"#D4D4D4",[N.editorInactiveSelection]:"#3A3D41",[w.editorIndentGuides]:"#404040",[w.editorActiveIndentGuides]:"#707070",[N.editorSelectionHighlight]:"#ADD6FF26"}},e.hc_black={base:"hc-black",inherit:!1,rules:[{token:"",foreground:"FFFFFF",background:"000000"},{token:"invalid",foreground:"f44747"},{token:"emphasis",fontStyle:"italic"},{token:"strong",fontStyle:"bold"},{token:"variable",foreground:"1AEBFF"},{token:"variable.parameter",foreground:"9CDCFE"},{token:"constant",foreground:"569CD6"},{token:"comment",foreground:"608B4E"},{token:"number",foreground:"FFFFFF"},{token:"regexp",foreground:"C0C0C0"},{token:"annotation",foreground:"569CD6"},{token:"type",foreground:"3DC9B0"},{token:"delimiter",foreground:"FFFF00"},{token:"delimiter.html",foreground:"FFFF00"},{token:"tag",foreground:"569CD6"},{token:"tag.id.pug",foreground:"4F76AC"},{token:"tag.class.pug",foreground:"4F76AC"},{token:"meta",foreground:"D4D4D4"},{token:"meta.tag",foreground:"CE9178"},{token:"metatag",foreground:"569CD6"},{token:"metatag.content.html",foreground:"1AEBFF"},{token:"metatag.html",foreground:"569CD6"},{token:"metatag.xml",foreground:"569CD6"},{token:"metatag.php",fontStyle:"bold"},{token:"key",foreground:"9CDCFE"},{token:"string.key",foreground:"9CDCFE"},{token:"string.value",foreground:"CE9178"},{token:"attribute.name",foreground:"569CD6"},{token:"attribute.value",foreground:"3FF23F"},{token:"string",foreground:"CE9178"},{token:"string.sql",foreground:"FF0000"},{token:"keyword",foreground:"569CD6"},{token:"keyword.flow",foreground:"C586C0"},{token:"operator.sql",foreground:"778899"},{token:"operator.swift",foreground:"909090"},{token:"predefined.sql",foreground:"FF00FF"}],colors:{[N.editorBackground]:"#000000",[N.editorForeground]:"#FFFFFF",[w.editorIndentGuides]:"#FFFFFF",[w.editorActiveIndentGuides]:"#FFFFFF"}}}),define(J[35],ee([0,1,51,27,4,54,2,74,26,15,9,10]),function(j,e,w,N,T,D,S,p,C,n,g,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MenuItemAction=e.SubmenuItemAction=e.MenuRegistry=e.IMenuService=e.MenuId=e.isIMenuItem=void 0;function s(a){return a.command!==void 0}e.isIMenuItem=s;class c{constructor(r){this.id=c._idPool++,this._debugName=r}}e.MenuId=c,c._idPool=0,c.CommandPalette=new c("CommandPalette"),c.EditorContext=new c("EditorContext"),c.SimpleEditorContext=new c("SimpleEditorContext"),c.EditorContextCopy=new c("EditorContextCopy"),c.EditorContextPeek=new c("EditorContextPeek"),c.MenubarEditMenu=new c("MenubarEditMenu"),c.MenubarCopy=new c("MenubarCopy"),c.MenubarGoMenu=new c("MenubarGoMenu"),c.MenubarSelectionMenu=new c("MenubarSelectionMenu"),c.InlineCompletionsActions=new c("InlineCompletionsActions"),e.IMenuService=(0,g.createDecorator)("menuService"),e.MenuRegistry=new class{constructor(){this._commands=new Map,this._menuItems=new Map,this._onDidChangeMenu=new T.Emitter,this.onDidChangeMenu=this._onDidChangeMenu.event,this._commandPaletteChangeEvent={has:a=>a===c.CommandPalette}}addCommand(a){return this.addCommands(D.Iterable.single(a))}addCommands(a){for(const r of a)this._commands.set(r.id,r);return this._onDidChangeMenu.fire(this._commandPaletteChangeEvent),(0,S.toDisposable)(()=>{let r=!1;for(const o of a)r=this._commands.delete(o.id)||r;r&&this._onDidChangeMenu.fire(this._commandPaletteChangeEvent)})}getCommand(a){return this._commands.get(a)}getCommands(){const a=new Map;return this._commands.forEach((r,o)=>a.set(o,r)),a}appendMenuItem(a,r){return this.appendMenuItems(D.Iterable.single({id:a,item:r}))}appendMenuItems(a){const r=new Set,o=new p.LinkedList;for(const{id:i,item:l}of a){let h=this._menuItems.get(i);h||(h=new p.LinkedList,this._menuItems.set(i,h)),o.push(h.push(l)),r.add(i)}return this._onDidChangeMenu.fire(r),(0,S.toDisposable)(()=>{if(o.size>0){for(let i of o)i();this._onDidChangeMenu.fire(r),o.clear()}})}getMenuItems(a){let r;return this._menuItems.has(a)?r=[...this._menuItems.get(a)]:r=[],a===c.CommandPalette&&this._appendImplicitItems(r),r}_appendImplicitItems(a){const r=new Set;for(const o of a)s(o)&&(r.add(o.command.id),o.alt&&r.add(o.alt.id));this._commands.forEach((o,i)=>{r.has(i)||a.push({command:o})})}};class u extends w.SubmenuAction{constructor(r,o,i,l){super(`submenuitem.${r.submenu.id}`,typeof r.title=="string"?r.title:r.title.value,[],"submenu");this.item=r,this._menuService=o,this._contextKeyService=i,this._options=l}get actions(){const r=[],o=this._menuService.createMenu(this.item.submenu,this._contextKeyService),i=o.getActions(this._options);o.dispose();for(const[,l]of i)l.length>0&&(r.push(...l),r.push(new w.Separator));return r.length&&r.pop(),r}}e.SubmenuItemAction=u;let d=class vi{constructor(r,o,i,l,h){var f,y;if(this._commandService=h,this.id=r.id,this.label=(i==null?void 0:i.renderShortTitle)&&r.shortTitle?typeof r.shortTitle=="string"?r.shortTitle:r.shortTitle.value:typeof r.title=="string"?r.title:r.title.value,this.tooltip=(y=typeof r.tooltip=="string"?r.tooltip:(f=r.tooltip)===null||f===void 0?void 0:f.value)!==null&&y!==void 0?y:"",this.enabled=!r.precondition||l.contextMatchesRules(r.precondition),this.checked=void 0,r.toggled){const _=r.toggled.condition?r.toggled:{condition:r.toggled};this.checked=l.contextMatchesRules(_.condition),this.checked&&_.tooltip&&(this.tooltip=typeof _.tooltip=="string"?_.tooltip:_.tooltip.value),_.title&&(this.label=typeof _.title=="string"?_.title:_.title.value)}this.item=r,this.alt=o?new vi(o,void 0,i,l,h):void 0,this._options=i,t.ThemeIcon.isThemeIcon(r.icon)&&(this.class=N.CSSIcon.asClassName(r.icon))}dispose(){}run(...r){var o,i;let l=[];return((o=this._options)===null||o===void 0?void 0:o.arg)&&(l=[...l,this._options.arg]),((i=this._options)===null||i===void 0?void 0:i.shouldForwardArgs)&&(l=[...l,...r]),this._commandService.executeCommand(this.id,...l)}};d=Fe([Ce(3,n.IContextKeyService),Ce(4,C.ICommandService)],d),e.MenuItemAction=d}),define(J[16],ee([0,1,467,24,28,13,42,66,35,26,15,80,33,90,20,72]),function(j,e,w,N,T,D,S,p,C,n,g,t,s,c,u,d){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SelectAllCommand=e.RedoCommand=e.UndoCommand=e.EditorExtensionsRegistry=e.registerEditorContribution=e.registerInstantiatedEditorAction=e.registerMultiEditorAction=e.registerEditorAction=e.registerEditorCommand=e.registerModelCommand=e.registerModelAndPositionCommand=e.MultiEditorAction=e.EditorAction=e.EditorCommand=e.ProxyCommand=e.MultiCommand=e.Command=void 0;class a{constructor(R){this.id=R.id,this.precondition=R.precondition,this._kbOpts=R.kbOpts,this._menuOpts=R.menuOpts,this._description=R.description}register(){if(Array.isArray(this._menuOpts)?this._menuOpts.forEach(this._registerMenuItem,this):this._menuOpts&&this._registerMenuItem(this._menuOpts),this._kbOpts){const R=Array.isArray(this._kbOpts)?this._kbOpts:[this._kbOpts];for(const A of R){let O=A.kbExpr;this.precondition&&(O?O=g.ContextKeyExpr.and(O,this.precondition):O=this.precondition);const L={id:this.id,weight:A.weight,args:A.args,when:O,primary:A.primary,secondary:A.secondary,win:A.win,linux:A.linux,mac:A.mac};t.KeybindingsRegistry.registerKeybindingRule(L)}}n.CommandsRegistry.registerCommand({id:this.id,handler:(R,A)=>this.runCommand(R,A),description:this._description})}_registerMenuItem(R){C.MenuRegistry.appendMenuItem(R.menuId,{group:R.group,command:{id:this.id,title:R.title,icon:R.icon,precondition:this.precondition},when:R.when,order:R.order})}}e.Command=a;class r extends a{constructor(){super(...arguments);this._implementations=[]}addImplementation(R,A,O){return this._implementations.push({priority:R,name:A,implementation:O}),this._implementations.sort((L,B)=>B.priority-L.priority),{dispose:()=>{for(let L=0;L<this._implementations.length;L++)if(this._implementations[L].implementation===O){this._implementations.splice(L,1);return}}}}runCommand(R,A){const O=R.get(d.ILogService);O.trace(`Executing Command '${this.id}' which has ${this._implementations.length} bound.`);for(const L of this._implementations){const B=L.implementation(R,A);if(B)return O.trace(`Command '${this.id}' was handled by '${L.name}'.`),typeof B=="boolean"?void 0:B}O.trace(`The Command '${this.id}' was not handled by any implementation.`)}}e.MultiCommand=r;class o extends a{constructor(R,A){super(A);this.command=R}runCommand(R,A){return this.command.runCommand(R,A)}}e.ProxyCommand=o;class i extends a{static bindToContribution(R){return class extends i{constructor(O){super(O);this._callback=O.handler}runEditorCommand(O,L,B){R(L)&&this._callback(R(L),B)}}}runCommand(R,A){const O=R.get(T.ICodeEditorService),L=O.getFocusedCodeEditor()||O.getActiveCodeEditor();if(!!L)return L.invokeWithinContext(B=>{if(!!B.get(g.IContextKeyService).contextMatchesRules((0,u.withNullAsUndefined)(this.precondition)))return this.runEditorCommand(B,L,A)})}}e.EditorCommand=i;class l extends i{constructor(R){super(l.convertOptions(R));this.label=R.label,this.alias=R.alias}static convertOptions(R){let A;Array.isArray(R.menuOpts)?A=R.menuOpts:R.menuOpts?A=[R.menuOpts]:A=[];function O(L){return L.menuId||(L.menuId=C.MenuId.EditorContext),L.title||(L.title=R.label),L.when=g.ContextKeyExpr.and(R.precondition,L.when),L}return Array.isArray(R.contextMenuOpts)?A.push(...R.contextMenuOpts.map(O)):R.contextMenuOpts&&A.push(O(R.contextMenuOpts)),R.menuOpts=A,R}runEditorCommand(R,A,O){return this.reportTelemetry(R,A),this.run(R,A,O||{})}reportTelemetry(R,A){R.get(c.ITelemetryService).publicLog2("editorActionInvoked",{name:this.label,id:this.id})}}e.EditorAction=l;class h extends l{constructor(){super(...arguments);this._implementations=[]}addImplementation(R,A){return this._implementations.push([R,A]),this._implementations.sort((O,L)=>L[0]-O[0]),{dispose:()=>{for(let O=0;O<this._implementations.length;O++)if(this._implementations[O][1]===A){this._implementations.splice(O,1);return}}}}run(R,A,O){for(const L of this._implementations){const B=L[1](R,A,O);if(B)return typeof B=="boolean"?void 0:B}}}e.MultiEditorAction=h;function f(F,R){n.CommandsRegistry.registerCommand(F,function(A,...O){const[L,B]=O;(0,u.assertType)(N.URI.isUri(L)),(0,u.assertType)(D.Position.isIPosition(B));const W=A.get(S.IModelService).getModel(L);if(W){const K=D.Position.lift(B);return R(W,K,...O.slice(2))}return A.get(p.ITextModelService).createModelReference(L).then(K=>new Promise((H,Y)=>{try{const X=R(K.object.textEditorModel,D.Position.lift(B),O.slice(2));H(X)}catch(X){Y(X)}}).finally(()=>{K.dispose()}))})}e.registerModelAndPositionCommand=f;function y(F,R){n.CommandsRegistry.registerCommand(F,function(A,...O){const[L]=O;(0,u.assertType)(N.URI.isUri(L));const B=A.get(S.IModelService).getModel(L);return B?R(B,...O.slice(1)):A.get(p.ITextModelService).createModelReference(L).then(W=>new Promise((K,H)=>{try{const Y=R(W.object.textEditorModel,O.slice(1));K(Y)}catch(Y){H(Y)}}).finally(()=>{W.dispose()}))})}e.registerModelCommand=y;function _(F){return M.INSTANCE.registerEditorCommand(F),F}e.registerEditorCommand=_;function b(F){const R=new F;return M.INSTANCE.registerEditorAction(R),R}e.registerEditorAction=b;function v(F){return M.INSTANCE.registerEditorAction(F),F}e.registerMultiEditorAction=v;function m(F){M.INSTANCE.registerEditorAction(F)}e.registerInstantiatedEditorAction=m;function E(F,R){M.INSTANCE.registerEditorContribution(F,R)}e.registerEditorContribution=E;var I;(function(F){function R(W){return M.INSTANCE.getEditorCommand(W)}F.getEditorCommand=R;function A(){return M.INSTANCE.getEditorActions()}F.getEditorActions=A;function O(){return M.INSTANCE.getEditorContributions()}F.getEditorContributions=O;function L(W){return M.INSTANCE.getEditorContributions().filter(K=>W.indexOf(K.id)>=0)}F.getSomeEditorContributions=L;function B(){return M.INSTANCE.getDiffEditorContributions()}F.getDiffEditorContributions=B})(I=e.EditorExtensionsRegistry||(e.EditorExtensionsRegistry={}));const k={EditorCommonContributions:"editor.contributions"};class M{constructor(){this.editorContributions=[],this.diffEditorContributions=[],this.editorActions=[],this.editorCommands=Object.create(null)}registerEditorContribution(R,A){this.editorContributions.push({id:R,ctor:A})}getEditorContributions(){return this.editorContributions.slice(0)}getDiffEditorContributions(){return this.diffEditorContributions.slice(0)}registerEditorAction(R){R.register(),this.editorActions.push(R)}getEditorActions(){return this.editorActions.slice(0)}registerEditorCommand(R){R.register(),this.editorCommands[R.id]=R}getEditorCommand(R){return this.editorCommands[R]||null}}M.INSTANCE=new M,s.Registry.add(k.EditorCommonContributions,M.INSTANCE);function P(F){return F.register(),F}e.UndoCommand=P(new r({id:"undo",precondition:void 0,kbOpts:{weight:0,primary:2048|56},menuOpts:[{menuId:C.MenuId.MenubarEditMenu,group:"1_do",title:w.localize(0,null),order:1},{menuId:C.MenuId.CommandPalette,group:"",title:w.localize(1,null),order:1}]})),P(new o(e.UndoCommand,{id:"default:undo",precondition:void 0})),e.RedoCommand=P(new r({id:"redo",precondition:void 0,kbOpts:{weight:0,primary:2048|55,secondary:[2048|1024|56],mac:{primary:2048|1024|56}},menuOpts:[{menuId:C.MenuId.MenubarEditMenu,group:"1_do",title:w.localize(2,null),order:2},{menuId:C.MenuId.CommandPalette,group:"",title:w.localize(3,null),order:1}]})),P(new o(e.RedoCommand,{id:"default:redo",precondition:void 0})),e.SelectAllCommand=P(new r({id:"editor.action.selectAll",precondition:void 0,kbOpts:{weight:0,kbExpr:null,primary:2048|31},menuOpts:[{menuId:C.MenuId.MenubarSelectionMenu,group:"1_basic",title:w.localize(4,null),order:1},{menuId:C.MenuId.CommandPalette,group:"",title:w.localize(5,null),order:1}]}))}),define(J[619],ee([0,1,16,15,23,74,9,70,466]),function(j,e,w,N,T,D,S,p,C){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EditorKeybindingCancellationTokenSource=void 0;const n=(0,S.createDecorator)("IEditorCancelService"),g=new N.RawContextKey("cancellableOperation",!1,(0,C.localize)(0,null));(0,p.registerSingleton)(n,class{constructor(){this._tokens=new WeakMap}add(s,c){let u=this._tokens.get(s);u||(u=s.invokeWithinContext(a=>{const r=g.bindTo(a.get(N.IContextKeyService)),o=new D.LinkedList;return{key:r,tokens:o}}),this._tokens.set(s,u));let d;return u.key.set(!0),d=u.tokens.push(c),()=>{d&&(d(),u.key.set(!u.tokens.isEmpty()),d=void 0)}}cancel(s){const c=this._tokens.get(s);if(!c)return;const u=c.tokens.pop();u&&(u.cancel(),c.key.set(!c.tokens.isEmpty()))}},!0);class t extends T.CancellationTokenSource{constructor(c,u){super(u);this.editor=c,this._unregister=c.invokeWithinContext(d=>d.get(n).add(c,this))}dispose(){this._unregister(),super.dispose()}}e.EditorKeybindingCancellationTokenSource=t,(0,w.registerEditorCommand)(new class extends w.EditorCommand{constructor(){super({id:"editor.cancelOperation",kbOpts:{weight:100,primary:9},precondition:g})}runEditorCommand(s,c){s.get(n).cancel(c)}})}),define(J[67],ee([0,1,8,3,23,2,619]),function(j,e,w,N,T,D,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.StableEditorScrollState=e.TextModelCancellationTokenSource=e.EditorStateCancellationTokenSource=e.EditorState=void 0;class p{constructor(s,c){if(this.flags=c,(this.flags&1)!=0){const u=s.getModel();this.modelVersionId=u?w.format("{0}#{1}",u.uri.toString(),u.getVersionId()):null}else this.modelVersionId=null;(this.flags&4)!=0?this.position=s.getPosition():this.position=null,(this.flags&2)!=0?this.selection=s.getSelection():this.selection=null,(this.flags&8)!=0?(this.scrollLeft=s.getScrollLeft(),this.scrollTop=s.getScrollTop()):(this.scrollLeft=-1,this.scrollTop=-1)}_equals(s){if(!(s instanceof p))return!1;const c=s;return!(this.modelVersionId!==c.modelVersionId||this.scrollLeft!==c.scrollLeft||this.scrollTop!==c.scrollTop||!this.position&&c.position||this.position&&!c.position||this.position&&c.position&&!this.position.equals(c.position)||!this.selection&&c.selection||this.selection&&!c.selection||this.selection&&c.selection&&!this.selection.equalsRange(c.selection))}validate(s){return this._equals(new p(s,this.flags))}}e.EditorState=p;class C extends S.EditorKeybindingCancellationTokenSource{constructor(s,c,u,d){super(s,d);this._listener=new D.DisposableStore,c&4&&this._listener.add(s.onDidChangeCursorPosition(a=>{(!u||!N.Range.containsPosition(u,a.position))&&this.cancel()})),c&2&&this._listener.add(s.onDidChangeCursorSelection(a=>{(!u||!N.Range.containsRange(u,a.selection))&&this.cancel()})),c&8&&this._listener.add(s.onDidScrollChange(a=>this.cancel())),c&1&&(this._listener.add(s.onDidChangeModel(a=>this.cancel())),this._listener.add(s.onDidChangeModelContent(a=>this.cancel())))}dispose(){this._listener.dispose(),super.dispose()}}e.EditorStateCancellationTokenSource=C;class n extends T.CancellationTokenSource{constructor(s,c){super(c);this._listener=s.onDidChangeContent(()=>this.cancel())}dispose(){this._listener.dispose(),super.dispose()}}e.TextModelCancellationTokenSource=n;class g{constructor(s,c,u){this._visiblePosition=s,this._visiblePositionScrollDelta=c,this._cursorPosition=u}static capture(s){let c=null,u=0;if(s.getScrollTop()!==0){const d=s.getVisibleRanges();if(d.length>0){c=d[0].getStartPosition();const a=s.getTopForPosition(c.lineNumber,c.column);u=s.getScrollTop()-a}}return new g(c,u,s.getPosition())}restore(s){if(this._visiblePosition){const c=s.getTopForPosition(this._visiblePosition.lineNumber,this._visiblePosition.column);s.setScrollTop(c+this._visiblePositionScrollDelta)}}restoreRelativeVerticalPositionOfCursor(s){const c=s.getPosition();if(!this._cursorPosition||!c)return;const u=s.getTopForLineNumber(c.lineNumber)-s.getTopForLineNumber(this._cursorPosition.lineNumber);s.setScrollTop(s.getScrollTop()+u)}}e.StableEditorScrollState=g}),define(J[620],ee([0,1,190,16]),function(j,e,w,N){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MarkerDecorationsContribution=void 0;let T=class{constructor(S,p){}dispose(){}};T.ID="editor.contrib.markerDecorations",T=Fe([Ce(1,w.IMarkerDecorationsService)],T),e.MarkerDecorationsContribution=T,(0,N.registerEditorContribution)(T.ID,T)}),define(J[621],ee([0,1,45,69,55,16,22,25,482,15,354]),function(j,e,w,N,T,D,S,p,C,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SelectionAnchorSet=void 0,e.SelectionAnchorSet=new n.RawContextKey("selectionAnchorSet",!1);let g=class bi{constructor(a,r){this.editor=a,this.selectionAnchorSetContextKey=e.SelectionAnchorSet.bindTo(r),this.modelChangeListener=a.onDidChangeModel(()=>this.selectionAnchorSetContextKey.reset())}static get(a){return a.getContribution(bi.ID)}setSelectionAnchor(){if(this.editor.hasModel()){const a=this.editor.getPosition(),r=this.decorationId?[this.decorationId]:[],o=this.editor.deltaDecorations(r,[{range:S.Selection.fromPositions(a,a),options:{description:"selection-anchor",stickiness:1,hoverMessage:new N.MarkdownString().appendText((0,C.localize)(0,null)),className:"selection-anchor"}}]);this.decorationId=o[0],this.selectionAnchorSetContextKey.set(!!this.decorationId),(0,w.alert)((0,C.localize)(1,null,a.lineNumber,a.column))}}goToSelectionAnchor(){if(this.editor.hasModel()&&this.decorationId){const a=this.editor.getModel().getDecorationRange(this.decorationId);a&&this.editor.setPosition(a.getStartPosition())}}selectFromAnchorToCursor(){if(this.editor.hasModel()&&this.decorationId){const a=this.editor.getModel().getDecorationRange(this.decorationId);if(a){const r=this.editor.getPosition();this.editor.setSelection(S.Selection.fromPositions(a.getStartPosition(),r)),this.cancelSelectionAnchor()}}}cancelSelectionAnchor(){this.decorationId&&(this.editor.deltaDecorations([this.decorationId],[]),this.decorationId=void 0,this.selectionAnchorSetContextKey.set(!1))}dispose(){this.cancelSelectionAnchor(),this.modelChangeListener.dispose()}};g.ID="editor.contrib.selectionAnchorController",g=Fe([Ce(1,n.IContextKeyService)],g);class t extends D.EditorAction{constructor(){super({id:"editor.action.setSelectionAnchor",label:(0,C.localize)(2,null),alias:"Set Selection Anchor",precondition:void 0,kbOpts:{kbExpr:p.EditorContextKeys.editorTextFocus,primary:(0,T.KeyChord)(2048|41,2048|32),weight:100}})}run(a,r){return Re(this,void 0,void 0,function*(){g.get(r).setSelectionAnchor()})}}class s extends D.EditorAction{constructor(){super({id:"editor.action.goToSelectionAnchor",label:(0,C.localize)(3,null),alias:"Go to Selection Anchor",precondition:e.SelectionAnchorSet})}run(a,r){return Re(this,void 0,void 0,function*(){g.get(r).goToSelectionAnchor()})}}class c extends D.EditorAction{constructor(){super({id:"editor.action.selectFromAnchorToCursor",label:(0,C.localize)(4,null),alias:"Select from Anchor to Cursor",precondition:e.SelectionAnchorSet,kbOpts:{kbExpr:p.EditorContextKeys.editorTextFocus,primary:(0,T.KeyChord)(2048|41,2048|41),weight:100}})}run(a,r){return Re(this,void 0,void 0,function*(){g.get(r).selectFromAnchorToCursor()})}}class u extends D.EditorAction{constructor(){super({id:"editor.action.cancelSelectionAnchor",label:(0,C.localize)(5,null),alias:"Cancel Selection Anchor",precondition:e.SelectionAnchorSet,kbOpts:{kbExpr:p.EditorContextKeys.editorTextFocus,primary:9,weight:100}})}run(a,r){return Re(this,void 0,void 0,function*(){g.get(r).cancelSelectionAnchor()})}}(0,D.registerEditorContribution)(g.ID,g),(0,D.registerEditorAction)(t),(0,D.registerEditorAction)(s),(0,D.registerEditorAction)(c),(0,D.registerEditorAction)(u)}),define(J[622],ee([0,1,16,25,420,484]),function(j,e,w,N,T,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0});class S extends w.EditorAction{constructor(g,t){super(t);this.left=g}run(g,t){if(!t.hasModel())return;let s=[],c=t.getSelections();for(const u of c)s.push(new T.MoveCaretCommand(u,this.left));t.pushUndoStop(),t.executeCommands(this.id,s),t.pushUndoStop()}}class p extends S{constructor(){super(!0,{id:"editor.action.moveCarretLeftAction",label:D.localize(0,null),alias:"Move Selected Text Left",precondition:N.EditorContextKeys.writable})}}class C extends S{constructor(){super(!1,{id:"editor.action.moveCarretRightAction",label:D.localize(1,null),alias:"Move Selected Text Right",precondition:N.EditorContextKeys.writable})}}(0,w.registerEditorAction)(p),(0,w.registerEditorAction)(C)}),define(J[623],ee([0,1,34,17,174,16,28,25,486,35,88]),function(j,e,w,N,T,D,S,p,C,n,g){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.PasteAction=e.CopyAction=e.CutAction=void 0;const t="9_cutcopypaste",s=N.isNative||document.queryCommandSupported("cut"),c=N.isNative||document.queryCommandSupported("copy"),u=typeof navigator.clipboard=="undefined"||w.isFirefox?document.queryCommandSupported("paste"):!0;function d(o){return o.register(),o}e.CutAction=s?d(new D.MultiCommand({id:"editor.action.clipboardCutAction",precondition:void 0,kbOpts:N.isNative?{primary:2048|54,win:{primary:2048|54,secondary:[1024|20]},weight:100}:void 0,menuOpts:[{menuId:n.MenuId.MenubarEditMenu,group:"2_ccp",title:C.localize(0,null),order:1},{menuId:n.MenuId.EditorContext,group:t,title:C.localize(1,null),when:p.EditorContextKeys.writable,order:1},{menuId:n.MenuId.CommandPalette,group:"",title:C.localize(2,null),order:1},{menuId:n.MenuId.SimpleEditorContext,group:t,title:C.localize(3,null),when:p.EditorContextKeys.writable,order:1}]})):void 0,e.CopyAction=c?d(new D.MultiCommand({id:"editor.action.clipboardCopyAction",precondition:void 0,kbOpts:N.isNative?{primary:2048|33,win:{primary:2048|33,secondary:[2048|19]},weight:100}:void 0,menuOpts:[{menuId:n.MenuId.MenubarEditMenu,group:"2_ccp",title:C.localize(4,null),order:2},{menuId:n.MenuId.EditorContext,group:t,title:C.localize(5,null),order:2},{menuId:n.MenuId.CommandPalette,group:"",title:C.localize(6,null),order:1},{menuId:n.MenuId.SimpleEditorContext,group:t,title:C.localize(7,null),order:2}]})):void 0,n.MenuRegistry.appendMenuItem(n.MenuId.MenubarEditMenu,{submenu:n.MenuId.MenubarCopy,title:{value:C.localize(8,null),original:"Copy As"},group:"2_ccp",order:3}),n.MenuRegistry.appendMenuItem(n.MenuId.EditorContext,{submenu:n.MenuId.EditorContextCopy,title:{value:C.localize(9,null),original:"Copy As"},group:t,order:3}),e.PasteAction=u?d(new D.MultiCommand({id:"editor.action.clipboardPasteAction",precondition:void 0,kbOpts:N.isNative?{primary:2048|52,win:{primary:2048|52,secondary:[1024|19]},linux:{primary:2048|52,secondary:[1024|19]},weight:100}:void 0,menuOpts:[{menuId:n.MenuId.MenubarEditMenu,group:"2_ccp",title:C.localize(10,null),order:4},{menuId:n.MenuId.EditorContext,group:t,title:C.localize(11,null),when:p.EditorContextKeys.writable,order:4},{menuId:n.MenuId.CommandPalette,group:"",title:C.localize(12,null),order:1},{menuId:n.MenuId.SimpleEditorContext,group:t,title:C.localize(13,null),when:p.EditorContextKeys.writable,order:4}]})):void 0;class a extends D.EditorAction{constructor(){super({id:"editor.action.clipboardCopyWithSyntaxHighlightingAction",label:C.localize(14,null),alias:"Copy With Syntax Highlighting",precondition:void 0,kbOpts:{kbExpr:p.EditorContextKeys.textInputFocus,primary:0,weight:100}})}run(i,l){!l.hasModel()||!l.getOption(32)&&l.getSelection().isEmpty()||(T.CopyOptions.forceCopyWithSyntaxHighlighting=!0,l.focus(),document.execCommand("copy"),T.CopyOptions.forceCopyWithSyntaxHighlighting=!1)}}function r(o,i){!o||(o.addImplementation(1e4,"code-editor",(l,h)=>{const f=l.get(S.ICodeEditorService).getFocusedCodeEditor();if(f&&f.hasTextFocus()){const y=f.getOption(32),_=f.getSelection();return _&&_.isEmpty()&&!y||document.execCommand(i),!0}return!1}),o.addImplementation(0,"generic-dom",(l,h)=>(document.execCommand(i),!0)))}r(e.CutAction,"cut"),r(e.CopyAction,"copy"),e.PasteAction&&(e.PasteAction.addImplementation(1e4,"code-editor",(o,i)=>{const l=o.get(S.ICodeEditorService),h=o.get(g.IClipboardService),f=l.getFocusedCodeEditor();return f&&f.hasTextFocus()?!document.execCommand("paste")&&N.isWeb?(()=>Re(void 0,void 0,void 0,function*(){const _=yield h.readText();if(_!==""){const b=T.InMemoryClipboardMetadataManager.INSTANCE.get(_);let v=!1,m=null,E=null;b&&(v=f.getOption(32)&&!!b.isFromEmptySelection,m=typeof b.multicursorText!="undefined"?b.multicursorText:null,E=b.mode),f.trigger("keyboard","paste",{text:_,pasteOnNewLine:v,multicursorText:m,mode:E})}}))():!0:!1}),e.PasteAction.addImplementation(0,"generic-dom",(o,i)=>(document.execCommand("paste"),!0))),c&&(0,D.registerEditorAction)(a)}),define(J[152],ee([0,1,19,23,11,2,24,67,3,22,18,42,26,62,145]),function(j,e,w,N,T,D,S,p,C,n,g,t,s,c,u){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getCodeActions=e.CodeActionItem=e.fixAllCommandId=e.organizeImportsCommandId=e.sourceActionCommandId=e.refactorCommandId=e.codeActionCommandId=void 0,e.codeActionCommandId="editor.action.codeAction",e.refactorCommandId="editor.action.refactor",e.sourceActionCommandId="editor.action.sourceAction",e.organizeImportsCommandId="editor.action.organizeImports",e.fixAllCommandId="editor.action.fixAll";class d{constructor(f,y){this.action=f,this.provider=y}resolve(f){var y;return Re(this,void 0,void 0,function*(){if(((y=this.provider)===null||y===void 0?void 0:y.resolveCodeAction)&&!this.action.edit){let _;try{_=yield this.provider.resolveCodeAction(this.action,f)}catch(b){(0,T.onUnexpectedExternalError)(b)}_&&(this.action.edit=_.edit)}return this})}}e.CodeActionItem=d;class a extends D.Disposable{constructor(f,y,_){super();this.documentation=y,this._register(_),this.allActions=[...f].sort(a.codeActionsComparator),this.validActions=this.allActions.filter(({action:b})=>!b.disabled)}static codeActionsComparator({action:f},{action:y}){return f.isPreferred&&!y.isPreferred?-1:!f.isPreferred&&y.isPreferred?1:(0,w.isNonEmptyArray)(f.diagnostics)?(0,w.isNonEmptyArray)(y.diagnostics)?f.diagnostics[0].message.localeCompare(y.diagnostics[0].message):-1:(0,w.isNonEmptyArray)(y.diagnostics)?1:0}get hasAutoFix(){return this.validActions.some(({action:f})=>!!f.kind&&u.CodeActionKind.QuickFix.contains(new u.CodeActionKind(f.kind))&&!!f.isPreferred)}}const r={actions:[],documentation:void 0};function o(h,f,y,_,b){var v;const m=y.filter||{},E={only:(v=m.include)===null||v===void 0?void 0:v.value,trigger:y.type},I=new p.TextModelCancellationTokenSource(h,b),k=i(h,m),M=new D.DisposableStore,P=k.map(R=>Re(this,void 0,void 0,function*(){try{_.report(R);const A=yield R.provideCodeActions(h,f,E,I.token);if(A&&M.add(A),I.token.isCancellationRequested)return r;const O=((A==null?void 0:A.actions)||[]).filter(B=>B&&(0,u.filtersAction)(m,B)),L=l(R,O,m.include);return{actions:O.map(B=>new d(B,R)),documentation:L}}catch(A){if((0,T.isPromiseCanceledError)(A))throw A;return(0,T.onUnexpectedExternalError)(A),r}})),F=g.CodeActionProviderRegistry.onDidChange(()=>{const R=g.CodeActionProviderRegistry.all(h);(0,w.equals)(R,k)||I.cancel()});return Promise.all(P).then(R=>{const A=(0,w.flatten)(R.map(L=>L.actions)),O=(0,w.coalesce)(R.map(L=>L.documentation));return new a(A,O,M)}).finally(()=>{F.dispose(),I.dispose()})}e.getCodeActions=o;function i(h,f){return g.CodeActionProviderRegistry.all(h).filter(y=>y.providedCodeActionKinds?y.providedCodeActionKinds.some(_=>(0,u.mayIncludeActionsOfKind)(f,new u.CodeActionKind(_))):!0)}function l(h,f,y){if(!h.documentation)return;const _=h.documentation.map(b=>({kind:new u.CodeActionKind(b.kind),command:b.command}));if(y){let b;for(const v of _)v.kind.contains(y)&&(b?b.kind.contains(v.kind)&&(b=v):b=v);if(b)return b==null?void 0:b.command}for(const b of f)if(!!b.kind){for(const v of _)if(v.kind.contains(new u.CodeActionKind(b.kind)))return v.command}}s.CommandsRegistry.registerCommand("_executeCodeActionProvider",function(h,f,y,_,b){return Re(this,void 0,void 0,function*(){if(!(f instanceof S.URI))throw(0,T.illegalArgument)();const v=h.get(t.IModelService).getModel(f);if(!v)throw(0,T.illegalArgument)();const m=n.Selection.isISelection(y)?n.Selection.liftSelection(y):C.Range.isIRange(y)?v.validateRange(y):void 0;if(!m)throw(0,T.illegalArgument)();const E=typeof _=="string"?new u.CodeActionKind(_):void 0,I=yield o(v,m,{type:1,filter:{includeSourceActions:!0,include:E}},c.Progress.None,N.CancellationToken.None),k=[],M=Math.min(I.validActions.length,typeof b=="number"?b:0);for(let P=0;P<M;P++)k.push(I.validActions[P].resolve(N.CancellationToken.None));try{return yield Promise.all(k),I.validActions.map(P=>P.action)}finally{setTimeout(()=>I.dispose(),100)}})})}),define(J[624],ee([0,1,7,51,11,160,2,13,18,152,145,71,40]),function(j,e,w,N,T,D,S,p,C,n,g,t,s){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CodeActionKeybindingResolver=e.CodeActionMenu=void 0;class c extends N.Action{constructor(o,i){super(o.command?o.command.id:o.title,u(o.title),void 0,!o.disabled,i);this.action=o}}function u(r){return r.replace(/\r\n|\r|\n/g," ")}let d=class extends S.Disposable{constructor(o,i,l,h){super();this._editor=o,this._delegate=i,this._contextMenuService=l,this._visible=!1,this._showingActions=this._register(new S.MutableDisposable),this._keybindingResolver=new a({getKeybindings:()=>h.getKeybindings()})}get isVisible(){return this._visible}show(o,i,l,h){return Re(this,void 0,void 0,function*(){const f=h.includeDisabledActions?i.allActions:i.validActions;if(!f.length){this._visible=!1;return}if(!this._editor.getDomNode())throw this._visible=!1,(0,T.canceled)();this._visible=!0,this._showingActions.value=i;const y=this.getMenuActions(o,f,i.documentation),_=p.Position.isIPosition(l)?this._toCoords(l):l||{x:0,y:0},b=this._keybindingResolver.getResolver(),v=this._editor.getOption(113);this._contextMenuService.showContextMenu({domForShadowRoot:v?this._editor.getDomNode():void 0,getAnchor:()=>_,getActions:()=>y,onHide:()=>{this._visible=!1,this._editor.focus()},autoSelectFirstItem:!0,getKeyBinding:m=>m instanceof c?b(m.action):void 0})})}getMenuActions(o,i,l){var h,f;const y=m=>new c(m.action,()=>this._delegate.onSelectCodeAction(m)),_=i.map(y),b=[...l],v=this._editor.getModel();if(v&&_.length)for(const m of C.CodeActionProviderRegistry.all(v))m._getAdditionalMenuItems&&b.push(...m._getAdditionalMenuItems({trigger:o.type,only:(f=(h=o.filter)===null||h===void 0?void 0:h.include)===null||f===void 0?void 0:f.value},i.map(E=>E.action)));return b.length&&_.push(new N.Separator,...b.map(m=>y(new n.CodeActionItem({title:m.title,command:m},void 0)))),_}_toCoords(o){if(!this._editor.hasModel())return{x:0,y:0};this._editor.revealPosition(o,1),this._editor.render();const i=this._editor.getScrolledVisiblePosition(o),l=(0,w.getDomNodePagePosition)(this._editor.getDomNode()),h=l.left+i.left,f=l.top+i.top+i.height;return{x:h,y:f}}};d=Fe([Ce(2,t.IContextMenuService),Ce(3,s.IKeybindingService)],d),e.CodeActionMenu=d;class a{constructor(o){this._keybindingProvider=o}getResolver(){const o=new D.Lazy(()=>this._keybindingProvider.getKeybindings().filter(i=>a.codeActionCommands.indexOf(i.command)>=0).filter(i=>i.resolvedKeybinding).map(i=>{let l=i.commandArgs;return i.command===n.organizeImportsCommandId?l={kind:g.CodeActionKind.SourceOrganizeImports.value}:i.command===n.fixAllCommandId&&(l={kind:g.CodeActionKind.SourceFixAll.value}),Object.assign({resolvedKeybinding:i.resolvedKeybinding},g.CodeActionCommandArgs.fromUser(l,{kind:g.CodeActionKind.None,apply:"never"}))}));return i=>{if(i.kind){const l=this.bestKeybindingForCodeAction(i,o.getValue());return l==null?void 0:l.resolvedKeybinding}}}bestKeybindingForCodeAction(o,i){if(!o.kind)return;const l=new g.CodeActionKind(o.kind);return i.filter(h=>h.kind.contains(l)).filter(h=>h.preferred?o.isPreferred:!0).reduceRight((h,f)=>h?h.kind.contains(f.kind)?f:h:f,void 0)}}e.CodeActionKeybindingResolver=a,a.codeActionCommands=[n.refactorCommandId,n.codeActionCommandId,n.sourceActionCommandId,n.organizeImportsCommandId,n.fixAllCommandId]});var St=this&&this.__classPrivateFieldGet||function(j,e,w,N){if(w==="a"&&!N)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?j!==e||!N:!e.has(j))throw new TypeError("Cannot read private member from an object whose class did not declare it");return w==="m"?N:w==="a"?N.call(j):N?N.value:e.get(j)},Ut=this&&this.__classPrivateFieldSet||function(j,e,w,N,T){if(N==="m")throw new TypeError("Private method is not writable");if(N==="a"&&!T)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?j!==e||!T:!e.has(j))throw new TypeError("Cannot write private member to an object whose class did not declare it");return N==="a"?T.call(j,w):T?T.value=w:e.set(j,w),w};define(J[625],ee([0,1,14,11,4,2,44,3,18,15,62,152]),function(j,e,w,N,T,D,S,p,C,n,g,t){"use strict";var s;Object.defineProperty(e,"__esModule",{value:!0}),e.CodeActionModel=e.CodeActionsState=e.SUPPORTED_CODE_ACTIONS=void 0,e.SUPPORTED_CODE_ACTIONS=new n.RawContextKey("supportedCodeAction","");class c extends D.Disposable{constructor(o,i,l,h=250){super();this._editor=o,this._markerService=i,this._signalChange=l,this._delay=h,this._autoTriggerTimer=this._register(new w.TimeoutTimer),this._register(this._markerService.onMarkerChanged(f=>this._onMarkerChanges(f))),this._register(this._editor.onDidChangeCursorPosition(()=>this._onCursorChange()))}trigger(o){const i=this._getRangeOfSelectionUnlessWhitespaceEnclosed(o);return this._createEventAndSignalChange(o,i)}_onMarkerChanges(o){const i=this._editor.getModel();!i||o.some(l=>(0,S.isEqual)(l,i.uri))&&this._autoTriggerTimer.cancelAndSet(()=>{this.trigger({type:2})},this._delay)}_onCursorChange(){this._autoTriggerTimer.cancelAndSet(()=>{this.trigger({type:2})},this._delay)}_getRangeOfMarker(o){const i=this._editor.getModel();if(!!i)for(const l of this._markerService.read({resource:i.uri})){const h=i.validateRange(l);if(p.Range.intersectRanges(h,o))return p.Range.lift(h)}}_getRangeOfSelectionUnlessWhitespaceEnclosed(o){if(!this._editor.hasModel())return;const i=this._editor.getModel(),l=this._editor.getSelection();if(l.isEmpty()&&o.type===2){const{lineNumber:h,column:f}=l.getPosition(),y=i.getLineContent(h);if(y.length===0)return;if(f===1){if(/\s/.test(y[0]))return}else if(f===i.getLineMaxColumn(h)){if(/\s/.test(y[y.length-1]))return}else if(/\s/.test(y[f-2])&&/\s/.test(y[f-1]))return}return l}_createEventAndSignalChange(o,i){const l=this._editor.getModel();if(!i||!l){this._signalChange(void 0);return}const h=this._getRangeOfMarker(i),f=h?h.getStartPosition():i.getStartPosition(),y={trigger:o,selection:i,position:f};return this._signalChange(y),y}}var u;(function(r){r.Empty={type:0};class o{constructor(l,h,f,y){this.trigger=l,this.rangeOrSelection=h,this.position=f,this._cancellablePromise=y,this.type=1,this.actions=y.catch(_=>{if((0,N.isPromiseCanceledError)(_))return d;throw _})}cancel(){this._cancellablePromise.cancel()}}r.Triggered=o})(u=e.CodeActionsState||(e.CodeActionsState={}));const d={allActions:[],validActions:[],dispose:()=>{},documentation:[],hasAutoFix:!1};class a extends D.Disposable{constructor(o,i,l,h){super();this._editor=o,this._markerService=i,this._progressService=h,this._codeActionOracle=this._register(new D.MutableDisposable),this._state=u.Empty,this._onDidChangeState=this._register(new T.Emitter),this.onDidChangeState=this._onDidChangeState.event,s.set(this,!1),this._supportedCodeActions=e.SUPPORTED_CODE_ACTIONS.bindTo(l),this._register(this._editor.onDidChangeModel(()=>this._update())),this._register(this._editor.onDidChangeModelLanguage(()=>this._update())),this._register(C.CodeActionProviderRegistry.onDidChange(()=>this._update())),this._update()}dispose(){St(this,s,"f")||(Ut(this,s,!0,"f"),super.dispose(),this.setState(u.Empty,!0))}_update(){if(St(this,s,"f"))return;this._codeActionOracle.value=void 0,this.setState(u.Empty);const o=this._editor.getModel();if(o&&C.CodeActionProviderRegistry.has(o)&&!this._editor.getOption(80)){const i=[];for(const l of C.CodeActionProviderRegistry.all(o))Array.isArray(l.providedCodeActionKinds)&&i.push(...l.providedCodeActionKinds);this._supportedCodeActions.set(i.join(" ")),this._codeActionOracle.value=new c(this._editor,this._markerService,l=>{var h;if(!l){this.setState(u.Empty);return}const f=(0,w.createCancelablePromise)(y=>(0,t.getCodeActions)(o,l.selection,l.trigger,g.Progress.None,y));l.trigger.type===1&&((h=this._progressService)===null||h===void 0||h.showWhile(f,250)),this.setState(new u.Triggered(l.trigger,l.selection,l.position,f))},void 0),this._codeActionOracle.value.trigger({type:2})}else this._supportedCodeActions.reset()}trigger(o){this._codeActionOracle.value&&this._codeActionOracle.value.trigger(o)}setState(o,i){o!==this._state&&(this._state.type===1&&this._state.cancel(),this._state=o,!i&&!St(this,s,"f")&&this._onDidChangeState.fire(o))}}e.CodeActionModel=a,s=new WeakMap}),define(J[626],ee([0,1,55,16,3,25,266,588,491,35]),function(j,e,w,N,T,D,S,p,C,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});class g extends N.EditorAction{constructor(a,r){super(r);this._type=a}run(a,r){if(!r.hasModel())return;const o=r.getModel(),i=[],l=o.getOptions(),h=r.getOption(19),f=r.getSelections().map((_,b)=>({selection:_,index:b,ignoreFirstLine:!1}));f.sort((_,b)=>T.Range.compareRangesUsingStarts(_.selection,b.selection));let y=f[0];for(let _=1;_<f.length;_++){const b=f[_];y.selection.endLineNumber===b.selection.startLineNumber&&(y.index<b.index?b.ignoreFirstLine=!0:(y.ignoreFirstLine=!0,y=b))}for(const _ of f)i.push(new p.LineCommentCommand(_.selection,l.tabSize,this._type,h.insertSpace,h.ignoreEmptyLines,_.ignoreFirstLine));r.pushUndoStop(),r.executeCommands(this.id,i),r.pushUndoStop()}}class t extends g{constructor(){super(0,{id:"editor.action.commentLine",label:C.localize(0,null),alias:"Toggle Line Comment",precondition:D.EditorContextKeys.writable,kbOpts:{kbExpr:D.EditorContextKeys.editorTextFocus,primary:2048|85,weight:100},menuOpts:{menuId:n.MenuId.MenubarEditMenu,group:"5_insert",title:C.localize(1,null),order:1}})}}class s extends g{constructor(){super(1,{id:"editor.action.addCommentLine",label:C.localize(2,null),alias:"Add Line Comment",precondition:D.EditorContextKeys.writable,kbOpts:{kbExpr:D.EditorContextKeys.editorTextFocus,primary:(0,w.KeyChord)(2048|41,2048|33),weight:100}})}}class c extends g{constructor(){super(2,{id:"editor.action.removeCommentLine",label:C.localize(3,null),alias:"Remove Line Comment",precondition:D.EditorContextKeys.writable,kbOpts:{kbExpr:D.EditorContextKeys.editorTextFocus,primary:(0,w.KeyChord)(2048|41,2048|51),weight:100}})}}class u extends N.EditorAction{constructor(){super({id:"editor.action.blockComment",label:C.localize(4,null),alias:"Toggle Block Comment",precondition:D.EditorContextKeys.writable,kbOpts:{kbExpr:D.EditorContextKeys.editorTextFocus,primary:1024|512|31,linux:{primary:2048|1024|31},weight:100},menuOpts:{menuId:n.MenuId.MenubarEditMenu,group:"5_insert",title:C.localize(5,null),order:2}})}run(a,r){if(!r.hasModel())return;const o=r.getOption(19),i=[],l=r.getSelections();for(const h of l)i.push(new S.BlockCommentCommand(h,o.insertSpace));r.pushUndoStop(),r.executeCommands(this.id,i),r.pushUndoStop()}}(0,N.registerEditorAction)(t),(0,N.registerEditorAction)(s),(0,N.registerEditorAction)(c),(0,N.registerEditorAction)(u)}),define(J[627],ee([0,1,7,121,51,2,17,16,25,492,35,15,71,40]),function(j,e,w,N,T,D,S,p,C,n,g,t,s,c){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ContextMenuController=void 0;let u=class _i{constructor(r,o,i,l,h,f){this._contextMenuService=o,this._contextViewService=i,this._contextKeyService=l,this._keybindingService=h,this._menuService=f,this._toDispose=new D.DisposableStore,this._contextMenuIsBeingShownCount=0,this._editor=r,this._toDispose.add(this._editor.onContextMenu(y=>this._onContextMenu(y))),this._toDispose.add(this._editor.onMouseWheel(y=>{if(this._contextMenuIsBeingShownCount>0){const _=this._contextViewService.getContextViewElement(),b=y.srcElement;b.shadowRoot&&w.getShadowRoot(_)===b.shadowRoot||this._contextViewService.hideContextView()}})),this._toDispose.add(this._editor.onKeyDown(y=>{y.keyCode===58&&(y.preventDefault(),y.stopPropagation(),this.showContextMenu())}))}static get(r){return r.getContribution(_i.ID)}_onContextMenu(r){if(!this._editor.hasModel())return;if(!this._editor.getOption(20)){this._editor.focus(),r.target.position&&!this._editor.getSelection().containsPosition(r.target.position)&&this._editor.setPosition(r.target.position);return}if(r.target.type===12||(r.event.preventDefault(),r.event.stopPropagation(),r.target.type!==6&&r.target.type!==7&&r.target.type!==1))return;if(this._editor.focus(),r.target.position){let i=!1;for(const l of this._editor.getSelections())if(l.containsPosition(r.target.position)){i=!0;break}i||this._editor.setPosition(r.target.position)}let o=null;r.target.type!==1&&(o={x:r.event.posx-1,width:2,y:r.event.posy-1,height:2}),this.showContextMenu(o)}showContextMenu(r){if(!this._editor.getOption(20)||!this._editor.hasModel())return;if(!this._contextMenuService){this._editor.focus();return}const o=this._getMenuActions(this._editor.getModel(),this._editor.isSimpleWidget?g.MenuId.SimpleEditorContext:g.MenuId.EditorContext);o.length>0&&this._doShowContextMenu(o,r)}_getMenuActions(r,o){const i=[],l=this._menuService.createMenu(o,this._contextKeyService),h=l.getActions({arg:r.uri});l.dispose();for(let f of h){const[,y]=f;let _=0;for(const b of y)if(b instanceof g.SubmenuItemAction){const v=this._getMenuActions(r,b.item.submenu);v.length>0&&(i.push(new T.SubmenuAction(b.id,b.label,v)),_++)}else i.push(b),_++;_&&i.push(new T.Separator)}return i.length&&i.pop(),i}_doShowContextMenu(r,o=null){if(!this._editor.hasModel())return;const i=this._editor.getOption(52);if(this._editor.updateOptions({hover:{enabled:!1}}),!o){this._editor.revealPosition(this._editor.getPosition(),1),this._editor.render();const h=this._editor.getScrolledVisiblePosition(this._editor.getPosition()),f=w.getDomNodePagePosition(this._editor.getDomNode()),y=f.left+h.left,_=f.top+h.top+h.height;o={x:y,y:_}}const l=this._editor.getOption(113)&&!S.isIOS;this._contextMenuIsBeingShownCount++,this._contextMenuService.showContextMenu({domForShadowRoot:l?this._editor.getDomNode():void 0,getAnchor:()=>o,getActions:()=>r,getActionViewItem:h=>{const f=this._keybindingFor(h);if(f)return new N.ActionViewItem(h,h,{label:!0,keybinding:f.getLabel(),isMenu:!0});const y=h;return typeof y.getActionViewItem=="function"?y.getActionViewItem():new N.ActionViewItem(h,h,{icon:!0,label:!0,isMenu:!0})},getKeyBinding:h=>this._keybindingFor(h),onHide:h=>{this._contextMenuIsBeingShownCount--,this._editor.focus(),this._editor.updateOptions({hover:i})}})}_keybindingFor(r){return this._keybindingService.lookupKeybinding(r.id)}dispose(){this._contextMenuIsBeingShownCount>0&&this._contextViewService.hideContextView(),this._toDispose.dispose()}};u.ID="editor.contrib.contextmenu",u=Fe([Ce(1,s.IContextMenuService),Ce(2,s.IContextViewService),Ce(3,t.IContextKeyService),Ce(4,c.IKeybindingService),Ce(5,g.IMenuService)],u),e.ContextMenuController=u;class d extends p.EditorAction{constructor(){super({id:"editor.action.showContextMenu",label:n.localize(0,null),alias:"Show Editor Context Menu",precondition:void 0,kbOpts:{kbExpr:C.EditorContextKeys.textInputFocus,primary:1024|68,weight:100}})}run(r,o){u.get(o).showContextMenu()}}(0,p.registerEditorContribution)(u.ID,u),(0,p.registerEditorAction)(d)}),define(J[628],ee([0,1,2,16,25,493]),function(j,e,w,N,T,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CursorRedo=e.CursorUndo=e.CursorUndoRedoController=void 0;class S{constructor(s){this.selections=s}equals(s){const c=this.selections.length,u=s.selections.length;if(c!==u)return!1;for(let d=0;d<c;d++)if(!this.selections[d].equalsSelection(s.selections[d]))return!1;return!0}}class p{constructor(s,c,u){this.cursorState=s,this.scrollTop=c,this.scrollLeft=u}}class C extends w.Disposable{constructor(s){super();this._editor=s,this._isCursorUndoRedo=!1,this._undoStack=[],this._redoStack=[],this._register(s.onDidChangeModel(c=>{this._undoStack=[],this._redoStack=[]})),this._register(s.onDidChangeModelContent(c=>{this._undoStack=[],this._redoStack=[]})),this._register(s.onDidChangeCursorSelection(c=>{if(this._isCursorUndoRedo||!c.oldSelections||c.oldModelVersionId!==c.modelVersionId)return;const u=new S(c.oldSelections);this._undoStack.length>0&&this._undoStack[this._undoStack.length-1].cursorState.equals(u)||(this._undoStack.push(new p(u,s.getScrollTop(),s.getScrollLeft())),this._redoStack=[],this._undoStack.length>50&&this._undoStack.shift())}))}static get(s){return s.getContribution(C.ID)}cursorUndo(){!this._editor.hasModel()||this._undoStack.length===0||(this._redoStack.push(new p(new S(this._editor.getSelections()),this._editor.getScrollTop(),this._editor.getScrollLeft())),this._applyState(this._undoStack.pop()))}cursorRedo(){!this._editor.hasModel()||this._redoStack.length===0||(this._undoStack.push(new p(new S(this._editor.getSelections()),this._editor.getScrollTop(),this._editor.getScrollLeft())),this._applyState(this._redoStack.pop()))}_applyState(s){this._isCursorUndoRedo=!0,this._editor.setSelections(s.cursorState.selections),this._editor.setScrollPosition({scrollTop:s.scrollTop,scrollLeft:s.scrollLeft}),this._isCursorUndoRedo=!1}}e.CursorUndoRedoController=C,C.ID="editor.contrib.cursorUndoRedoController";class n extends N.EditorAction{constructor(){super({id:"cursorUndo",label:D.localize(0,null),alias:"Cursor Undo",precondition:void 0,kbOpts:{kbExpr:T.EditorContextKeys.textInputFocus,primary:2048|51,weight:100}})}run(s,c,u){C.get(c).cursorUndo()}}e.CursorUndo=n;class g extends N.EditorAction{constructor(){super({id:"cursorRedo",label:D.localize(1,null),alias:"Cursor Redo",precondition:void 0})}run(s,c,u){C.get(c).cursorRedo()}}e.CursorRedo=g,(0,N.registerEditorContribution)(C.ID,C),(0,N.registerEditorAction)(n),(0,N.registerEditorAction)(g)}),define(J[629],ee([0,1,16,139,498]),function(j,e,w,N,T){"use strict";Object.defineProperty(e,"__esModule",{value:!0});class D extends w.EditorAction{constructor(){super({id:"editor.action.fontZoomIn",label:T.localize(0,null),alias:"Editor Font Zoom In",precondition:void 0})}run(n,g){N.EditorZoom.setZoomLevel(N.EditorZoom.getZoomLevel()+1)}}class S extends w.EditorAction{constructor(){super({id:"editor.action.fontZoomOut",label:T.localize(1,null),alias:"Editor Font Zoom Out",precondition:void 0})}run(n,g){N.EditorZoom.setZoomLevel(N.EditorZoom.getZoomLevel()-1)}}class p extends w.EditorAction{constructor(){super({id:"editor.action.fontZoomReset",label:T.localize(2,null),alias:"Editor Font Zoom Reset",precondition:void 0})}run(n,g){N.EditorZoom.setZoomLevel(0)}}(0,w.registerEditorAction)(D),(0,w.registerEditorAction)(S),(0,w.registerEditorAction)(p)}),define(J[273],ee([0,1,45,19,23,11,54,74,20,24,67,114,13,3,22,18,78,66,237,499,26,559,9]),function(j,e,w,N,T,D,S,p,C,n,g,t,s,c,u,d,a,r,o,i,l,h,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getOnTypeFormattingEdits=e.getDocumentFormattingEditsUntilResult=e.getDocumentRangeFormattingEditsUntilResult=e.formatDocumentWithProvider=e.formatDocumentWithSelectedProvider=e.formatDocumentRangesWithProvider=e.formatDocumentRangesWithSelectedProvider=e.FormattingConflicts=e.getRealAndSyntheticDocumentFormattersOrdered=e.alertFormattingEdits=void 0;function y(F){if(F=F.filter(L=>L.range),!F.length)return;let{range:R}=F[0];for(let L=1;L<F.length;L++)R=c.Range.plusRange(R,F[L].range);const{startLineNumber:A,endLineNumber:O}=R;A===O?F.length===1?(0,w.alert)(i.localize(0,null,A)):(0,w.alert)(i.localize(1,null,F.length,A)):F.length===1?(0,w.alert)(i.localize(2,null,A,O)):(0,w.alert)(i.localize(3,null,F.length,A,O))}e.alertFormattingEdits=y;function _(F){const R=[],A=new Set,O=d.DocumentFormattingEditProviderRegistry.ordered(F);for(const B of O)R.push(B),B.extensionId&&A.add(h.ExtensionIdentifier.toKey(B.extensionId));const L=d.DocumentRangeFormattingEditProviderRegistry.ordered(F);for(const B of L){if(B.extensionId){if(A.has(h.ExtensionIdentifier.toKey(B.extensionId)))continue;A.add(h.ExtensionIdentifier.toKey(B.extensionId))}R.push({displayName:B.displayName,extensionId:B.extensionId,provideDocumentFormattingEdits(W,K,H){return B.provideDocumentRangeFormattingEdits(W,W.getFullModelRange(),K,H)}})}return R}e.getRealAndSyntheticDocumentFormattersOrdered=_;class b{static setFormatterSelector(R){return{dispose:b._selectors.unshift(R)}}static select(R,A,O){return Re(this,void 0,void 0,function*(){if(R.length===0)return;const L=S.Iterable.first(b._selectors);if(L)return yield L(R,A,O)})}}e.FormattingConflicts=b,b._selectors=new p.LinkedList;function v(F,R,A,O,L,B){return Re(this,void 0,void 0,function*(){const W=F.get(f.IInstantiationService),K=(0,t.isCodeEditor)(R)?R.getModel():R,H=d.DocumentRangeFormattingEditProviderRegistry.ordered(K),Y=yield b.select(H,K,O);Y&&(L.report(Y),yield W.invokeFunction(m,Y,R,A,B))})}e.formatDocumentRangesWithSelectedProvider=v;function m(F,R,A,O,L){return Re(this,void 0,void 0,function*(){const B=F.get(a.IEditorWorkerService);let W,K;(0,t.isCodeEditor)(A)?(W=A.getModel(),K=new g.EditorStateCancellationTokenSource(A,1|4,void 0,L)):(W=A,K=new g.TextModelCancellationTokenSource(A,L));let H=[],Y=0;for(let G of(0,N.asArray)(O).sort(c.Range.compareRangesUsingStarts))Y>0&&c.Range.areIntersectingOrTouching(H[Y-1],G)?H[Y-1]=c.Range.fromPositions(H[Y-1].getStartPosition(),G.getEndPosition()):Y=H.push(G);const X=G=>Re(this,void 0,void 0,function*(){return(yield R.provideDocumentRangeFormattingEdits(W,G,W.getFormattingOptions(),K.token))||[]}),Z=(G,x)=>{if(!G.length||!x.length)return!1;const U=G.reduce(($,V)=>c.Range.plusRange($,V.range),G[0].range);if(!x.some($=>c.Range.intersectRanges(U,$.range)))return!1;for(let $ of G)for(let V of x)if(c.Range.intersectRanges($.range,V.range))return!0;return!1},se=[],oe=[];try{for(let G of H){if(K.token.isCancellationRequested)return!0;oe.push(yield X(G))}for(let G=0;G<H.length;++G)for(let x=G+1;x<H.length;++x){if(K.token.isCancellationRequested)return!0;if(Z(oe[G],oe[x])){const U=c.Range.plusRange(H[G],H[x]),$=yield X(U);H.splice(x,1),H.splice(G,1),H.push(U),oe.splice(x,1),oe.splice(G,1),oe.push($),G=0,x=0}}for(let G of oe){if(K.token.isCancellationRequested)return!0;const x=yield B.computeMoreMinimalEdits(W.uri,G);x&&se.push(...x)}}finally{K.dispose()}if(se.length===0)return!1;if((0,t.isCodeEditor)(A))o.FormattingEdit.execute(A,se,!0),y(se),A.revealPositionInCenterIfOutsideViewport(A.getPosition(),1);else{const[{range:G}]=se,x=new u.Selection(G.startLineNumber,G.startColumn,G.endLineNumber,G.endColumn);W.pushEditOperations([x],se.map(U=>({text:U.text,range:c.Range.lift(U.range),forceMoveMarkers:!0})),U=>{for(const{range:$}of U)if(c.Range.areIntersectingOrTouching($,x))return[new u.Selection($.startLineNumber,$.startColumn,$.endLineNumber,$.endColumn)];return null})}return!0})}e.formatDocumentRangesWithProvider=m;function E(F,R,A,O,L){return Re(this,void 0,void 0,function*(){const B=F.get(f.IInstantiationService),W=(0,t.isCodeEditor)(R)?R.getModel():R,K=_(W),H=yield b.select(K,W,A);H&&(O.report(H),yield B.invokeFunction(I,H,R,A,L))})}e.formatDocumentWithSelectedProvider=E;function I(F,R,A,O,L){return Re(this,void 0,void 0,function*(){const B=F.get(a.IEditorWorkerService);let W,K;(0,t.isCodeEditor)(A)?(W=A.getModel(),K=new g.EditorStateCancellationTokenSource(A,1|4,void 0,L)):(W=A,K=new g.TextModelCancellationTokenSource(A,L));let H;try{const Y=yield R.provideDocumentFormattingEdits(W,W.getFormattingOptions(),K.token);if(H=yield B.computeMoreMinimalEdits(W.uri,Y),K.token.isCancellationRequested)return!0}finally{K.dispose()}if(!H||H.length===0)return!1;if((0,t.isCodeEditor)(A))o.FormattingEdit.execute(A,H,O!==2),O!==2&&(y(H),A.revealPositionInCenterIfOutsideViewport(A.getPosition(),1));else{const[{range:Y}]=H,X=new u.Selection(Y.startLineNumber,Y.startColumn,Y.endLineNumber,Y.endColumn);W.pushEditOperations([X],H.map(Z=>({text:Z.text,range:c.Range.lift(Z.range),forceMoveMarkers:!0})),Z=>{for(const{range:se}of Z)if(c.Range.areIntersectingOrTouching(se,X))return[new u.Selection(se.startLineNumber,se.startColumn,se.endLineNumber,se.endColumn)];return null})}return!0})}e.formatDocumentWithProvider=I;function k(F,R,A,O,L){return Re(this,void 0,void 0,function*(){const B=d.DocumentRangeFormattingEditProviderRegistry.ordered(R);for(const W of B){let K=yield Promise.resolve(W.provideDocumentRangeFormattingEdits(R,A,O,L)).catch(D.onUnexpectedExternalError);if((0,N.isNonEmptyArray)(K))return yield F.computeMoreMinimalEdits(R.uri,K)}})}e.getDocumentRangeFormattingEditsUntilResult=k;function M(F,R,A,O){return Re(this,void 0,void 0,function*(){const L=_(R);for(const B of L){let W=yield Promise.resolve(B.provideDocumentFormattingEdits(R,A,O)).catch(D.onUnexpectedExternalError);if((0,N.isNonEmptyArray)(W))return yield F.computeMoreMinimalEdits(R.uri,W)}})}e.getDocumentFormattingEditsUntilResult=M;function P(F,R,A,O,L){const B=d.OnTypeFormattingEditProviderRegistry.ordered(R);return B.length===0||B[0].autoFormatTriggerCharacters.indexOf(O)<0?Promise.resolve(void 0):Promise.resolve(B[0].provideOnTypeFormattingEdits(R,A,O,L,T.CancellationToken.None)).catch(D.onUnexpectedExternalError).then(W=>F.computeMoreMinimalEdits(R.uri,W))}e.getOnTypeFormattingEdits=P,l.CommandsRegistry.registerCommand("_executeFormatRangeProvider",function(F,...R){return Re(this,void 0,void 0,function*(){const[A,O,L]=R;(0,C.assertType)(n.URI.isUri(A)),(0,C.assertType)(c.Range.isIRange(O));const B=F.get(r.ITextModelService),W=F.get(a.IEditorWorkerService),K=yield B.createModelReference(A);try{return k(W,K.object.textEditorModel,c.Range.lift(O),L,T.CancellationToken.None)}finally{K.dispose()}})}),l.CommandsRegistry.registerCommand("_executeFormatDocumentProvider",function(F,...R){return Re(this,void 0,void 0,function*(){const[A,O]=R;(0,C.assertType)(n.URI.isUri(A));const L=F.get(r.ITextModelService),B=F.get(a.IEditorWorkerService),W=yield L.createModelReference(A);try{return M(B,W.object.textEditorModel,O,T.CancellationToken.None)}finally{W.dispose()}})}),l.CommandsRegistry.registerCommand("_executeFormatOnTypeProvider",function(F,...R){return Re(this,void 0,void 0,function*(){const[A,O,L,B]=R;(0,C.assertType)(n.URI.isUri(A)),(0,C.assertType)(s.Position.isIPosition(O)),(0,C.assertType)(typeof L=="string");const W=F.get(r.ITextModelService),K=F.get(a.IEditorWorkerService),H=yield W.createModelReference(A);try{return P(K,H.object.textEditorModel,s.Position.lift(O),L,B)}finally{H.dispose()}})})}),define(J[630],ee([0,1,19,23,11,55,2,16,28,97,3,25,18,78,273,237,500,26,15,9,62]),function(j,e,w,N,T,D,S,p,C,n,g,t,s,c,u,d,a,r,o,i,l){"use strict";Object.defineProperty(e,"__esModule",{value:!0});let h=class{constructor(v,m){this._workerService=m,this._callOnDispose=new S.DisposableStore,this._callOnModel=new S.DisposableStore,this._editor=v,this._callOnDispose.add(v.onDidChangeConfiguration(()=>this._update())),this._callOnDispose.add(v.onDidChangeModel(()=>this._update())),this._callOnDispose.add(v.onDidChangeModelLanguage(()=>this._update())),this._callOnDispose.add(s.OnTypeFormattingEditProviderRegistry.onDidChange(this._update,this))}dispose(){this._callOnDispose.dispose(),this._callOnModel.dispose()}_update(){if(this._callOnModel.clear(),!this._editor.getOption(48)||!this._editor.hasModel())return;const v=this._editor.getModel(),[m]=s.OnTypeFormattingEditProviderRegistry.ordered(v);if(!m||!m.autoFormatTriggerCharacters)return;let E=new n.CharacterSet;for(let I of m.autoFormatTriggerCharacters)E.add(I.charCodeAt(0));this._callOnModel.add(this._editor.onDidType(I=>{let k=I.charCodeAt(I.length-1);E.has(k)&&this._trigger(String.fromCharCode(k))}))}_trigger(v){if(!this._editor.hasModel()||this._editor.getSelections().length>1||!this._editor.getSelection().isEmpty())return;const m=this._editor.getModel(),E=this._editor.getPosition();let I=!1;const k=this._editor.onDidChangeModelContent(M=>{if(M.isFlush){I=!0,k.dispose();return}for(let P=0,F=M.changes.length;P<F;P++)if(M.changes[P].range.endLineNumber<=E.lineNumber){I=!0,k.dispose();return}});(0,u.getOnTypeFormattingEdits)(this._workerService,m,E,v,m.getFormattingOptions()).then(M=>{k.dispose(),!I&&(0,w.isNonEmptyArray)(M)&&(d.FormattingEdit.execute(this._editor,M,!0),(0,u.alertFormattingEdits)(M))},M=>{throw k.dispose(),M})}};h.ID="editor.contrib.autoFormat",h=Fe([Ce(1,c.IEditorWorkerService)],h);let f=class{constructor(v,m){this.editor=v,this._instantiationService=m,this._callOnDispose=new S.DisposableStore,this._callOnModel=new S.DisposableStore,this._callOnDispose.add(v.onDidChangeConfiguration(()=>this._update())),this._callOnDispose.add(v.onDidChangeModel(()=>this._update())),this._callOnDispose.add(v.onDidChangeModelLanguage(()=>this._update())),this._callOnDispose.add(s.DocumentRangeFormattingEditProviderRegistry.onDidChange(this._update,this))}dispose(){this._callOnDispose.dispose(),this._callOnModel.dispose()}_update(){this._callOnModel.clear(),!!this.editor.getOption(47)&&(!this.editor.hasModel()||!s.DocumentRangeFormattingEditProviderRegistry.has(this.editor.getModel())||this._callOnModel.add(this.editor.onDidPaste(({range:v})=>this._trigger(v))))}_trigger(v){!this.editor.hasModel()||this.editor.getSelections().length>1||this._instantiationService.invokeFunction(u.formatDocumentRangesWithSelectedProvider,this.editor,v,2,l.Progress.None,N.CancellationToken.None).catch(T.onUnexpectedError)}};f.ID="editor.contrib.formatOnPaste",f=Fe([Ce(1,i.IInstantiationService)],f);class y extends p.EditorAction{constructor(){super({id:"editor.action.formatDocument",label:a.localize(0,null),alias:"Format Document",precondition:o.ContextKeyExpr.and(t.EditorContextKeys.notInCompositeEditor,t.EditorContextKeys.writable,t.EditorContextKeys.hasDocumentFormattingProvider),kbOpts:{kbExpr:t.EditorContextKeys.editorTextFocus,primary:1024|512|36,linux:{primary:2048|1024|39},weight:100},contextMenuOpts:{group:"1_modification",order:1.3}})}run(v,m){return Re(this,void 0,void 0,function*(){if(m.hasModel()){const E=v.get(i.IInstantiationService);yield v.get(l.IEditorProgressService).showWhile(E.invokeFunction(u.formatDocumentWithSelectedProvider,m,1,l.Progress.None,N.CancellationToken.None),250)}})}}class _ extends p.EditorAction{constructor(){super({id:"editor.action.formatSelection",label:a.localize(1,null),alias:"Format Selection",precondition:o.ContextKeyExpr.and(t.EditorContextKeys.writable,t.EditorContextKeys.hasDocumentSelectionFormattingProvider),kbOpts:{kbExpr:t.EditorContextKeys.editorTextFocus,primary:(0,D.KeyChord)(2048|41,2048|36),weight:100},contextMenuOpts:{when:t.EditorContextKeys.hasNonEmptySelection,group:"1_modification",order:1.31}})}run(v,m){return Re(this,void 0,void 0,function*(){if(!m.hasModel())return;const E=v.get(i.IInstantiationService),I=m.getModel(),k=m.getSelections().map(P=>P.isEmpty()?new g.Range(P.startLineNumber,1,P.startLineNumber,I.getLineMaxColumn(P.startLineNumber)):P);yield v.get(l.IEditorProgressService).showWhile(E.invokeFunction(u.formatDocumentRangesWithSelectedProvider,m,k,1,l.Progress.None,N.CancellationToken.None),250)})}}(0,p.registerEditorContribution)(h.ID,h),(0,p.registerEditorContribution)(f.ID,f),(0,p.registerEditorAction)(y),(0,p.registerEditorAction)(_),r.CommandsRegistry.registerCommand("editor.action.format",b=>Re(void 0,void 0,void 0,function*(){const v=b.get(C.ICodeEditorService).getFocusedCodeEditor();if(!v||!v.hasModel())return;const m=b.get(r.ICommandService);v.getSelection().isEmpty()?yield m.executeCommand("editor.action.formatDocument"):yield m.executeCommand("editor.action.formatSelection")}))}),define(J[274],ee([0,1,23,11,16,18,122]),function(j,e,w,N,T,D,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getReferencesAtPosition=e.getTypeDefinitionsAtPosition=e.getImplementationsAtPosition=e.getDeclarationsAtPosition=e.getDefinitionsAtPosition=void 0;function p(u,d,a,r){const i=a.ordered(u).map(l=>Promise.resolve(r(l,u,d)).then(void 0,h=>{(0,N.onUnexpectedExternalError)(h)}));return Promise.all(i).then(l=>{const h=[];for(let f of l)Array.isArray(f)?h.push(...f):f&&h.push(f);return h})}function C(u,d,a){return p(u,d,D.DefinitionProviderRegistry,(r,o,i)=>r.provideDefinition(o,i,a))}e.getDefinitionsAtPosition=C;function n(u,d,a){return p(u,d,D.DeclarationProviderRegistry,(r,o,i)=>r.provideDeclaration(o,i,a))}e.getDeclarationsAtPosition=n;function g(u,d,a){return p(u,d,D.ImplementationProviderRegistry,(r,o,i)=>r.provideImplementation(o,i,a))}e.getImplementationsAtPosition=g;function t(u,d,a){return p(u,d,D.TypeDefinitionProviderRegistry,(r,o,i)=>r.provideTypeDefinition(o,i,a))}e.getTypeDefinitionsAtPosition=t;function s(u,d,a,r){return p(u,d,D.ReferenceProviderRegistry,(o,i,l)=>Re(this,void 0,void 0,function*(){const h=yield o.provideReferences(i,l,{includeDeclaration:!0},r);if(!a||!h||h.length!==2)return h;const f=yield o.provideReferences(i,l,{includeDeclaration:!1},r);return f&&f.length===1?f:h}))}e.getReferencesAtPosition=s;function c(u){return Re(this,void 0,void 0,function*(){const d=yield u(),a=new S.ReferencesModel(d,""),r=a.references.map(o=>o.link);return a.dispose(),r})}(0,T.registerModelAndPositionCommand)("_executeDefinitionProvider",(u,d)=>c(()=>C(u,d,w.CancellationToken.None))),(0,T.registerModelAndPositionCommand)("_executeDeclarationProvider",(u,d)=>c(()=>n(u,d,w.CancellationToken.None))),(0,T.registerModelAndPositionCommand)("_executeImplementationProvider",(u,d)=>c(()=>g(u,d,w.CancellationToken.None))),(0,T.registerModelAndPositionCommand)("_executeTypeDefinitionProvider",(u,d)=>c(()=>t(u,d,w.CancellationToken.None))),(0,T.registerModelAndPositionCommand)("_executeReferenceProvider",(u,d)=>c(()=>s(u,d,!1,w.CancellationToken.None)))}),define(J[631],ee([0,1,4,2,44,16,28,3,509,15,70,9,40,80,36]),function(j,e,w,N,T,D,S,p,C,n,g,t,s,c,u){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ISymbolNavigationService=e.ctxHasSymbols=void 0,e.ctxHasSymbols=new n.RawContextKey("hasSymbols",!1,(0,C.localize)(0,null)),e.ISymbolNavigationService=(0,t.createDecorator)("ISymbolNavigationService");let d=class{constructor(o,i,l,h){this._editorService=i,this._notificationService=l,this._keybindingService=h,this._currentModel=void 0,this._currentIdx=-1,this._ignoreEditorChange=!1,this._ctxHasSymbols=e.ctxHasSymbols.bindTo(o)}reset(){var o,i;this._ctxHasSymbols.reset(),(o=this._currentState)===null||o===void 0||o.dispose(),(i=this._currentMessage)===null||i===void 0||i.dispose(),this._currentModel=void 0,this._currentIdx=-1}put(o){const i=o.parent.parent;if(i.references.length<=1){this.reset();return}this._currentModel=i,this._currentIdx=i.references.indexOf(o),this._ctxHasSymbols.set(!0),this._showMessage();const l=new a(this._editorService),h=l.onDidChange(f=>{if(this._ignoreEditorChange)return;const y=this._editorService.getActiveCodeEditor();if(!y)return;const _=y.getModel(),b=y.getPosition();if(!_||!b)return;let v=!1,m=!1;for(const E of i.references)if((0,T.isEqual)(E.uri,_.uri))v=!0,m=m||p.Range.containsPosition(E.range,b);else if(v)break;(!v||!m)&&this.reset()});this._currentState=(0,N.combinedDisposable)(l,h)}revealNext(o){if(!this._currentModel)return Promise.resolve();this._currentIdx+=1,this._currentIdx%=this._currentModel.references.length;const i=this._currentModel.references[this._currentIdx];return this._showMessage(),this._ignoreEditorChange=!0,this._editorService.openCodeEditor({resource:i.uri,options:{selection:p.Range.collapseToStart(i.range),selectionRevealType:3}},o).finally(()=>{this._ignoreEditorChange=!1})}_showMessage(){var o;(o=this._currentMessage)===null||o===void 0||o.dispose();const i=this._keybindingService.lookupKeybinding("editor.gotoNextSymbolFromResult"),l=i?(0,C.localize)(1,null,this._currentIdx+1,this._currentModel.references.length,i.getLabel()):(0,C.localize)(2,null,this._currentIdx+1,this._currentModel.references.length);this._currentMessage=this._notificationService.status(l)}};d=Fe([Ce(0,n.IContextKeyService),Ce(1,S.ICodeEditorService),Ce(2,u.INotificationService),Ce(3,s.IKeybindingService)],d),(0,g.registerSingleton)(e.ISymbolNavigationService,d,!0),(0,D.registerEditorCommand)(new class extends D.EditorCommand{constructor(){super({id:"editor.gotoNextSymbolFromResult",precondition:e.ctxHasSymbols,kbOpts:{weight:100,primary:70}})}runEditorCommand(r,o){return r.get(e.ISymbolNavigationService).revealNext(o)}}),c.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"editor.gotoNextSymbolFromResult.cancel",weight:100,when:e.ctxHasSymbols,primary:9,handler(r){r.get(e.ISymbolNavigationService).reset()}});let a=class{constructor(o){this._listener=new Map,this._disposables=new N.DisposableStore,this._onDidChange=new w.Emitter,this.onDidChange=this._onDidChange.event,this._disposables.add(o.onCodeEditorRemove(this._onDidRemoveEditor,this)),this._disposables.add(o.onCodeEditorAdd(this._onDidAddEditor,this)),o.listCodeEditors().forEach(this._onDidAddEditor,this)}dispose(){this._disposables.dispose(),this._onDidChange.dispose(),(0,N.dispose)(this._listener.values())}_onDidAddEditor(o){this._listener.set(o,(0,N.combinedDisposable)(o.onDidChangeCursorPosition(i=>this._onDidChange.fire({editor:o})),o.onDidChangeModelContent(i=>this._onDidChange.fire({editor:o}))))}_onDidRemoveEditor(o){var i;(i=this._listener.get(o))===null||i===void 0||i.dispose(),this._listener.delete(o)}};a=Fe([Ce(0,S.ICodeEditorService)],a)}),define(J[632],ee([0,1,19,23,11,16,18]),function(j,e,w,N,T,D,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getHover=void 0;function p(n,g,t){const c=S.HoverProviderRegistry.ordered(n).map(u=>Promise.resolve(u.provideHover(n,g,t)).then(d=>d&&C(d)?d:void 0,d=>{(0,T.onUnexpectedExternalError)(d)}));return Promise.all(c).then(w.coalesce)}e.getHover=p,(0,D.registerModelAndPositionCommand)("_executeHoverProvider",(n,g)=>p(n,g,N.CancellationToken.None));function C(n){const g=typeof n.range!="undefined",t=typeof n.contents!="undefined"&&n.contents&&n.contents.length>0;return g&&t}}),define(J[633],ee([0,1,7,19,69,2,126,13,3,18,39,632,511,41,57]),function(j,e,w,N,T,D,S,p,C,n,g,t,s,c,u){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MarkdownHoverParticipant=e.MarkdownHover=void 0;const d=w.$;class a{constructor(i,l,h){this.owner=i,this.range=l,this.contents=h}isValidForHoverAnchor(i){return i.type===1&&this.range.startColumn<=i.range.startColumn&&this.range.endColumn>=i.range.endColumn}}e.MarkdownHover=a;let r=class{constructor(i,l,h,f,y){this._editor=i,this._hover=l,this._modeService=h,this._openerService=f,this._configurationService=y}createLoadingMessage(i){return new a(this,i.range,[new T.MarkdownString().appendText(s.localize(0,null))])}computeSync(i,l){if(!this._editor.hasModel()||i.type!==1)return[];const h=this._editor.getModel(),f=i.range.startLineNumber,y=h.getLineMaxColumn(f),_=[];for(const E of l){const I=E.range.startLineNumber===f?E.range.startColumn:1,k=E.range.endLineNumber===f?E.range.endColumn:y,M=E.options.hoverMessage;if(!M||(0,T.isEmptyMarkdownString)(M))continue;const P=new C.Range(i.range.startLineNumber,I,i.range.startLineNumber,k);_.push(new a(this,P,(0,N.asArray)(M)))}const b=h.getLineLength(f),v=h.getLanguageIdAtPosition(i.range.startLineNumber,i.range.startColumn),m=this._configurationService.getValue("editor.maxTokenizationLineLength",{overrideIdentifier:v});return typeof m=="number"&&b>=m&&_.push(new a(this,i.range,[{value:s.localize(1,null)}])),_}computeAsync(i,l,h){return Re(this,void 0,void 0,function*(){if(!this._editor.hasModel()||i.type!==1)return Promise.resolve([]);const f=this._editor.getModel();if(!n.HoverProviderRegistry.has(f))return Promise.resolve([]);const y=yield(0,t.getHover)(f,new p.Position(i.range.startLineNumber,i.range.startColumn),h),_=[];for(const b of y){if((0,T.isEmptyMarkdownString)(b.contents))continue;const v=b.range?C.Range.lift(b.range):i.range;_.push(new a(this,v,b.contents))}return _})}renderHoverParts(i,l,h){const f=new D.DisposableStore;for(const y of i)for(const _ of y.contents){if((0,T.isEmptyMarkdownString)(_))continue;const b=d("div.hover-row.markdown-hover"),v=w.append(b,d("div.hover-contents")),m=f.add(new S.MarkdownRenderer({editor:this._editor},this._modeService,this._openerService));f.add(m.onDidRenderAsync(()=>{v.className="hover-contents code-hover-contents",this._hover.onContentsChanged()}));const E=f.add(m.render(_));v.appendChild(E.element),l.appendChild(b)}return f}};r=Fe([Ce(2,g.IModeService),Ce(3,u.IOpenerService),Ce(4,c.IConfigurationService)],r),e.MarkdownHoverParticipant=r}),define(J[634],ee([0,1,14,23,11,95,2,47,20,24,16,28,31,13,3,18,147,66,26,21,10]),function(j,e,w,N,T,D,S,p,C,n,g,t,s,c,u,d,a,r,o,i,l){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.InlayHintsController=e.getInlayHints=void 0;const h=1500;class f{constructor(){this._data=new p.ResourceMap}push(I,k){const M=this._data.get(I.uri);M===void 0?this._data.set(I.uri,new Set([k])):M.add(k)}pop(I,k){const M=this._data.get(I.uri);M&&(M.delete(k),M.size===0&&this._data.delete(I.uri))}has(I,k){var M;return Boolean((M=this._data.get(I.uri))===null||M===void 0?void 0:M.has(k))}}function y(E,I,k,M){return Re(this,void 0,void 0,function*(){const P=[],R=d.InlayHintsProviderRegistry.ordered(E).reverse().map(A=>I.map(O=>Re(this,void 0,void 0,function*(){try{k.push(E,A);const L=yield A.provideInlayHints(E,O,M);(L==null?void 0:L.length)&&P.push(L.filter(B=>O.containsPosition(B.position)))}catch(L){(0,T.onUnexpectedExternalError)(L)}finally{k.pop(E,A)}})));return yield Promise.all(R.flat()),P.flat().sort((A,O)=>c.Position.compare(A.position,O.position))})}e.getInlayHints=y;class _{constructor(){this._entries=new p.LRUCache(50)}get(I){const k=_._key(I);return this._entries.get(k)}set(I,k){const M=_._key(I);this._entries.set(M,k)}static _key(I){return`${I.uri.toString()}/${I.getVersionId()}`}}let b=class Si{constructor(I,k){this._editor=I,this._codeEditorService=k,this._decorationOwnerId=++Si._decorationOwnerIdPool,this._disposables=new S.DisposableStore,this._sessionDisposables=new S.DisposableStore,this._getInlayHintsDelays=new a.LanguageFeatureRequestDelays(d.InlayHintsProviderRegistry,25,500),this._cache=new _,this._decorations=new Map,this._disposables.add(d.InlayHintsProviderRegistry.onDidChange(()=>this._update())),this._disposables.add(I.onDidChangeModel(()=>this._update())),this._disposables.add(I.onDidChangeModelLanguage(()=>this._update())),this._disposables.add(I.onDidChangeConfiguration(M=>{M.hasChanged(125)&&this._update()})),this._update()}dispose(){this._sessionDisposables.dispose(),this._removeAllDecorations(),this._disposables.dispose()}_update(){if(this._sessionDisposables.clear(),this._removeAllDecorations(),!this._editor.getOption(125).enabled)return;const I=this._editor.getModel();if(!I||!d.InlayHintsProviderRegistry.has(I))return;const k=this._cache.get(I);k&&this._updateHintsDecorators([I.getFullModelRange()],k);const M=new f,P=new w.RunOnceScheduler(()=>Re(this,void 0,void 0,function*(){const R=Date.now(),A=new N.CancellationTokenSource;this._sessionDisposables.add((0,S.toDisposable)(()=>A.dispose(!0)));const O=this._getHintsRanges(),L=yield y(I,O,M,A.token);P.delay=this._getInlayHintsDelays.update(I,Date.now()-R),!A.token.isCancellationRequested&&(this._updateHintsDecorators(O,L),this._cache.set(I,Array.from(this._decorations.values()).map(B=>B.hint)))}),this._getInlayHintsDelays.get(I));this._sessionDisposables.add(P),this._sessionDisposables.add(this._editor.onDidChangeModelContent(()=>P.schedule())),this._disposables.add(this._editor.onDidScrollChange(()=>P.schedule())),P.schedule();const F=new S.DisposableStore;this._sessionDisposables.add(F);for(const R of d.InlayHintsProviderRegistry.all(I))typeof R.onDidChangeInlayHints=="function"&&F.add(R.onDidChangeInlayHints(()=>{M.has(I,R)||P.schedule()}))}_getHintsRanges(){const I=30,k=this._editor.getModel(),M=this._editor.getVisibleRangesPlusViewportAboveBelow(),P=[];for(const F of M.sort(u.Range.compareRangesUsingStarts)){const R=k.validateRange(new u.Range(F.startLineNumber-I,F.startColumn,F.endLineNumber+I,F.endColumn));P.length===0||!u.Range.areIntersectingOrTouching(P[P.length-1],R)?P.push(R):P[P.length-1]=u.Range.plusRange(P[P.length-1],R)}return P}_updateHintsDecorators(I,k){const{fontSize:M,fontFamily:P}=this._getLayoutInfo(),F=this._editor.getModel(),R=[],A=[],O="--code-editorInlayHintsFontFamily";this._editor.getContainerDomNode().style.setProperty(O,P);for(const W of k){const{text:K,position:H,whitespaceBefore:Y,whitespaceAfter:X}=W,Z=Y?M/3|0:0,se=X?M/3|0:0,oe={contentText:m(K),fontSize:`${M}px`,margin:`0px ${se}px 0px ${Z}px`,fontFamily:`var(${O}), ${s.EDITOR_FONT_DEFAULTS.fontFamily}`,padding:`1px ${Math.max(1,M/4)|0}px`,borderRadius:`${M/4|0}px`,verticalAlign:"middle",backgroundColor:(0,l.themeColorFromId)(i.editorInlayHintBackground),color:(0,l.themeColorFromId)(i.editorInlayHintForeground)};W.kind===d.InlayHintKind.Parameter?(oe.backgroundColor=(0,l.themeColorFromId)(i.editorInlayHintParameterBackground),oe.color=(0,l.themeColorFromId)(i.editorInlayHintParameterForeground)):W.kind===d.InlayHintKind.Type&&(oe.backgroundColor=(0,l.themeColorFromId)(i.editorInlayHintTypeBackground),oe.color=(0,l.themeColorFromId)(i.editorInlayHintTypeForeground));let G={beforeInjectedText:Object.assign(Object.assign({},oe),{affectsLetterSpacing:!0})},x=u.Range.fromPositions(H),U=F.getWordAtPosition(H),$=!1;U&&(U.endColumn===H.column?(G.afterInjectedText=G.beforeInjectedText,G.beforeInjectedText=void 0,$=!0,x=v(U,H.lineNumber)):U.startColumn===H.column&&($=!0,x=v(U,H.lineNumber)));const V="inlayHints-"+(0,D.hash)(G).toString(16);if(this._codeEditorService.registerDecorationType("inlay-hints-controller",V,G,void 0,this._editor),R.push(V),A.push({range:x,options:Object.assign(Object.assign({},this._codeEditorService.resolveDecorationOptions(V,!0)),{showIfCollapsed:!$,stickiness:0})})>h)break}const L=[];for(const W of I)for(const{id:K}of F.getDecorationsInRange(W,this._decorationOwnerId,!0)){const H=this._decorations.get(K);H&&(L.push(K),this._codeEditorService.removeDecorationType(H.decorationTypeId),this._decorations.delete(K))}const B=F.deltaDecorations(L,A,this._decorationOwnerId);for(let W=0;W<B.length;W++)this._decorations.set(B[W],{hint:k[W],decorationTypeId:R[W]})}_getLayoutInfo(){const I=this._editor.getOption(125),k=this._editor.getOption(45);let M=I.fontSize;(!M||M<5||M>k)&&(M=k*.9|0);const P=I.fontFamily||this._editor.getOption(42);return{fontSize:M,fontFamily:P}}_removeAllDecorations(){this._editor.deltaDecorations(Array.from(this._decorations.keys()),[]);for(let I of this._decorations.values())this._codeEditorService.removeDecorationType(I.decorationTypeId);this._decorations.clear()}};b.ID="editor.contrib.InlayHints",b._decorationOwnerIdPool=0,b=Fe([Ce(1,t.ICodeEditorService)],b),e.InlayHintsController=b;function v(E,I){return new u.Range(I,E.startColumn,I,E.endColumn)}function m(E){const I="\xA0";return E.replace(/[ \t]/g,I)}(0,g.registerEditorContribution)(b.ID,b),o.CommandsRegistry.registerCommand("_executeInlayHintProvider",(E,...I)=>Re(void 0,void 0,void 0,function*(){const[k,M]=I;(0,C.assertType)(n.URI.isUri(k)),(0,C.assertType)(u.Range.isIRange(M));const P=yield E.get(r.ITextModelService).createModelReference(k);try{return yield y(P.object.textEditorModel,[u.Range.lift(M)],new f,N.CancellationToken.None)}finally{P.dispose()}}))}),define(J[153],ee([0,1,45,14,2,16,3,520,15,21,103,10,367]),function(j,e,w,N,T,D,S,p,C,n,g,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MessageController=void 0;let s=class Kt{constructor(a,r){this._messageWidget=new T.MutableDisposable,this._messageListeners=new T.DisposableStore,this._editor=a,this._visible=Kt.MESSAGE_VISIBLE.bindTo(r),this._editorListener=this._editor.onDidAttemptReadOnlyEdit(()=>this._onDidAttemptReadOnlyEdit())}static get(a){return a.getContribution(Kt.ID)}dispose(){this._editorListener.dispose(),this._messageListeners.dispose(),this._messageWidget.dispose(),this._visible.reset()}showMessage(a,r){(0,w.alert)(a),this._visible.set(!0),this._messageWidget.clear(),this._messageListeners.clear(),this._messageWidget.value=new u(this._editor,r,a),this._messageListeners.add(this._editor.onDidBlurEditorText(()=>this.closeMessage())),this._messageListeners.add(this._editor.onDidChangeCursorPosition(()=>this.closeMessage())),this._messageListeners.add(this._editor.onDidDispose(()=>this.closeMessage())),this._messageListeners.add(this._editor.onDidChangeModel(()=>this.closeMessage())),this._messageListeners.add(new N.TimeoutTimer(()=>this.closeMessage(),3e3));let o;this._messageListeners.add(this._editor.onMouseMove(i=>{!i.target.position||(o?o.containsPosition(i.target.position)||this.closeMessage():o=new S.Range(r.lineNumber-3,1,i.target.position.lineNumber+3,1))}))}closeMessage(){this._visible.reset(),this._messageListeners.clear(),this._messageWidget.value&&this._messageListeners.add(u.fadeOut(this._messageWidget.value))}_onDidAttemptReadOnlyEdit(){this._editor.hasModel()&&this.showMessage(p.localize(1,null),this._editor.getPosition())}};s.ID="editor.contrib.messageController",s.MESSAGE_VISIBLE=new C.RawContextKey("messageVisible",!1,p.localize(0,null)),s=Fe([Ce(1,C.IContextKeyService)],s),e.MessageController=s;const c=D.EditorCommand.bindToContribution(s.get);(0,D.registerEditorCommand)(new c({id:"leaveEditorMessage",precondition:s.MESSAGE_VISIBLE,handler:d=>d.closeMessage(),kbOpts:{weight:100+30,primary:9}}));class u{constructor(a,{lineNumber:r,column:o},i){this.allowEditorOverflow=!0,this.suppressMouseDown=!1,this._editor=a,this._editor.revealLinesInCenterIfOutsideViewport(r,r,0),this._position={lineNumber:r,column:o-1},this._domNode=document.createElement("div"),this._domNode.classList.add("monaco-editor-overlaymessage");const l=document.createElement("div");l.classList.add("anchor","top"),this._domNode.appendChild(l);const h=document.createElement("div");h.classList.add("message"),h.textContent=i,this._domNode.appendChild(h);const f=document.createElement("div");f.classList.add("anchor","below"),this._domNode.appendChild(f),this._editor.addContentWidget(this),this._domNode.classList.add("fadeIn")}static fadeOut(a){let r;const o=()=>{a.dispose(),clearTimeout(r),a.getDomNode().removeEventListener("animationend",o)};return r=setTimeout(o,110),a.getDomNode().addEventListener("animationend",o),a.getDomNode().classList.add("fadeOut"),{dispose:o}}dispose(){this._editor.removeContentWidget(this)}getId(){return"messageoverlay"}getDomNode(){return this._domNode}getPosition(){return{position:this._position,preference:[1,2]}}afterRender(a){this._domNode.classList.toggle("below",a===2)}}(0,D.registerEditorContribution)(s.ID,s),(0,t.registerThemingParticipant)((d,a)=>{const r=d.getColor(n.inputValidationInfoBorder);if(r){let l=d.type===g.ColorScheme.HIGH_CONTRAST?2:1;a.addRule(`.monaco-editor .monaco-editor-overlaymessage .anchor.below { border-top-color: ${r}; }`),a.addRule(`.monaco-editor .monaco-editor-overlaymessage .anchor.top { border-bottom-color: ${r}; }`),a.addRule(`.monaco-editor .monaco-editor-overlaymessage .message { border: ${l}px solid ${r}; }`)}const o=d.getColor(n.inputValidationInfoBackground);o&&a.addRule(`.monaco-editor .monaco-editor-overlaymessage .message { background-color: ${o}; }`);const i=d.getColor(n.inputValidationInfoForeground);i&&a.addRule(`.monaco-editor .monaco-editor-overlaymessage .message { color: ${i}; }`)})}),define(J[635],ee([0,1,45,14,23,11,2,20,24,67,16,146,28,13,3,25,18,149,153,527,101,15,9,72,36,62,33,617]),function(j,e,w,N,T,D,S,p,C,n,g,t,s,c,u,d,a,r,o,i,l,h,f,y,_,b,v,m){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.RenameAction=e.rename=void 0;class E{constructor(R,A){this.model=R,this.position=A,this._providerRenameIdx=0,this._providers=a.RenameProviderRegistry.ordered(R)}hasProvider(){return this._providers.length>0}resolveRenameLocation(R){return Re(this,void 0,void 0,function*(){const A=[];for(this._providerRenameIdx=0;this._providerRenameIdx<this._providers.length;this._providerRenameIdx++){const L=this._providers[this._providerRenameIdx];if(!L.resolveRenameLocation)break;let B=yield L.resolveRenameLocation(this.model,this.position,R);if(!!B){if(B.rejectReason){A.push(B.rejectReason);continue}return B}}const O=this.model.getWordAtPosition(this.position);return O?{range:new u.Range(this.position.lineNumber,O.startColumn,this.position.lineNumber,O.endColumn),text:O.word,rejectReason:A.length>0?A.join(`
`):void 0}:{range:u.Range.fromPositions(this.position),text:"",rejectReason:A.length>0?A.join(`
`):void 0}})}provideRenameEdits(R,A){return Re(this,void 0,void 0,function*(){return this._provideRenameEdits(R,this._providerRenameIdx,[],A)})}_provideRenameEdits(R,A,O,L){return Re(this,void 0,void 0,function*(){const B=this._providers[A];if(!B)return{edits:[],rejectReason:O.join(`
`)};const W=yield B.provideRenameEdits(this.model,this.position,R,L);if(W){if(W.rejectReason)return this._provideRenameEdits(R,A+1,O.concat(W.rejectReason),L)}else return this._provideRenameEdits(R,A+1,O.concat(i.localize(0,null)),L);return W})}}function I(F,R,A){return Re(this,void 0,void 0,function*(){const O=new E(F,R),L=yield O.resolveRenameLocation(T.CancellationToken.None);return(L==null?void 0:L.rejectReason)?{edits:[],rejectReason:L.rejectReason}:O.provideRenameEdits(A,T.CancellationToken.None)})}e.rename=I;let k=class wi{constructor(R,A,O,L,B,W,K){this.editor=R,this._instaService=A,this._notificationService=O,this._bulkEditService=L,this._progressService=B,this._logService=W,this._configService=K,this._dispoableStore=new S.DisposableStore,this._cts=new T.CancellationTokenSource,this._renameInputField=this._dispoableStore.add(new N.IdleValue(()=>this._dispoableStore.add(this._instaService.createInstance(m.RenameInputField,this.editor,["acceptRenameInput","acceptRenameInputWithPreview"]))))}static get(R){return R.getContribution(wi.ID)}dispose(){this._dispoableStore.dispose(),this._cts.dispose(!0)}run(){return Re(this,void 0,void 0,function*(){if(this._cts.dispose(!0),!this.editor.hasModel())return;const R=this.editor.getPosition(),A=new E(this.editor.getModel(),R);if(!A.hasProvider())return;this._cts=new n.EditorStateCancellationTokenSource(this.editor,4|1);let O;try{const X=A.resolveRenameLocation(this._cts.token);this._progressService.showWhile(X,250),O=yield X}catch(X){o.MessageController.get(this.editor).showMessage(X||i.localize(1,null),R);return}if(!O)return;if(O.rejectReason){o.MessageController.get(this.editor).showMessage(O.rejectReason,R);return}if(this._cts.token.isCancellationRequested)return;this._cts.dispose(),this._cts=new n.EditorStateCancellationTokenSource(this.editor,4|1,O.range);let L=this.editor.getSelection(),B=0,W=O.text.length;!u.Range.isEmpty(L)&&!u.Range.spansMultipleLines(L)&&u.Range.containsRange(O.range,L)&&(B=Math.max(0,L.startColumn-O.range.startColumn),W=Math.min(O.range.endColumn,L.endColumn)-O.range.startColumn);const K=this._bulkEditService.hasPreviewHandler()&&this._configService.getValue(this.editor.getModel().uri,"editor.rename.enablePreview"),H=yield this._renameInputField.value.getInput(O.range,O.text,B,W,K,this._cts.token);if(typeof H=="boolean"){H&&this.editor.focus();return}this.editor.focus();const Y=(0,N.raceCancellation)(A.provideRenameEdits(H.newName,this._cts.token),this._cts.token).then(X=>Re(this,void 0,void 0,function*(){if(!(!X||!this.editor.hasModel())){if(X.rejectReason){this._notificationService.info(X.rejectReason);return}this.editor.setSelection(u.Range.fromPositions(this.editor.getSelection().getPosition())),this._bulkEditService.apply(t.ResourceEdit.convert(X),{editor:this.editor,showPreview:H.wantsPreview,label:i.localize(2,null,O==null?void 0:O.text),quotableLabel:i.localize(3,null,O==null?void 0:O.text)}).then(Z=>{Z.ariaSummary&&(0,w.alert)(i.localize(4,null,O.text,H.newName,Z.ariaSummary))}).catch(Z=>{this._notificationService.error(i.localize(5,null)),this._logService.error(Z)})}}),X=>{this._notificationService.error(i.localize(6,null)),this._logService.error(X)});return this._progressService.showWhile(Y,250),Y})}acceptRenameInput(R){this._renameInputField.value.acceptInput(R)}cancelRenameInput(){this._renameInputField.value.cancelInput(!0)}};k.ID="editor.contrib.renameController",k=Fe([Ce(1,f.IInstantiationService),Ce(2,_.INotificationService),Ce(3,t.IBulkEditService),Ce(4,b.IEditorProgressService),Ce(5,y.ILogService),Ce(6,r.ITextResourceConfigurationService)],k);class M extends g.EditorAction{constructor(){super({id:"editor.action.rename",label:i.localize(7,null),alias:"Rename Symbol",precondition:h.ContextKeyExpr.and(d.EditorContextKeys.writable,d.EditorContextKeys.hasRenameProvider),kbOpts:{kbExpr:d.EditorContextKeys.editorTextFocus,primary:60,weight:100},contextMenuOpts:{group:"1_modification",order:1.1}})}runCommand(R,A){const O=R.get(s.ICodeEditorService),[L,B]=Array.isArray(A)&&A||[void 0,void 0];return C.URI.isUri(L)&&c.Position.isIPosition(B)?O.openCodeEditor({resource:L},O.getActiveCodeEditor()).then(W=>{!W||(W.setPosition(B),W.invokeWithinContext(K=>(this.reportTelemetry(K,W),this.run(K,W))))},D.onUnexpectedError):super.runCommand(R,A)}run(R,A){const O=k.get(A);return O?O.run():Promise.resolve()}}e.RenameAction=M,(0,g.registerEditorContribution)(k.ID,k),(0,g.registerEditorAction)(M);const P=g.EditorCommand.bindToContribution(k.get);(0,g.registerEditorCommand)(new P({id:"acceptRenameInput",precondition:m.CONTEXT_RENAME_INPUT_VISIBLE,handler:F=>F.acceptRenameInput(!1),kbOpts:{weight:100+99,kbExpr:d.EditorContextKeys.focus,primary:3}})),(0,g.registerEditorCommand)(new P({id:"acceptRenameInputWithPreview",precondition:h.ContextKeyExpr.and(m.CONTEXT_RENAME_INPUT_VISIBLE,h.ContextKeyExpr.has("config.editor.rename.enablePreview")),handler:F=>F.acceptRenameInput(!0),kbOpts:{weight:100+99,kbExpr:d.EditorContextKeys.focus,primary:1024+3}})),(0,g.registerEditorCommand)(new P({id:"cancelRenameInput",precondition:m.CONTEXT_RENAME_INPUT_VISIBLE,handler:F=>F.cancelRenameInput(),kbOpts:{weight:100+99,kbExpr:d.EditorContextKeys.focus,primary:9,secondary:[1024|9]}})),(0,g.registerModelAndPositionCommand)("_executeDocumentRenameProvider",function(F,R,...A){const[O]=A;return(0,p.assertType)(typeof O=="string"),I(F,R,O)}),(0,g.registerModelAndPositionCommand)("_executePrepareRename",function(F,R){return Re(this,void 0,void 0,function*(){const O=yield new E(F,R).resolveRenameLocation(T.CancellationToken.None);if(O==null?void 0:O.rejectReason)throw new Error(O.rejectReason);return O})}),v.Registry.as(l.Extensions.Configuration).registerConfiguration({id:"editor",properties:{"editor.rename.enablePreview":{scope:5,description:i.localize(8,null),default:!0,type:"boolean"}}})}),define(J[636],ee([0,1,19,23,11,16,13,3,22,25,18,244,431,529,35,26]),function(j,e,w,N,T,D,S,p,C,n,g,t,s,c,u,d){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.provideSelectionRanges=void 0;class a{constructor(y,_){this.index=y,this.ranges=_}mov(y){let _=this.index+(y?1:-1);if(_<0||_>=this.ranges.length)return this;const b=new a(_,this.ranges);return b.ranges[_].equalsRange(this.ranges[this.index])?b.mov(y):b}}class r{constructor(y){this._editor=y,this._ignoreSelection=!1}static get(y){return y.getContribution(r.ID)}dispose(){var y;(y=this._selectionListener)===null||y===void 0||y.dispose()}run(y){return Re(this,void 0,void 0,function*(){if(!this._editor.hasModel())return;const _=this._editor.getSelections(),b=this._editor.getModel();if(!g.SelectionRangeRegistry.has(b)||(this._state||(yield h(b,_.map(m=>m.getPosition()),this._editor.getOption(101),N.CancellationToken.None).then(m=>{var E;if(!(!w.isNonEmptyArray(m)||m.length!==_.length)&&!(!this._editor.hasModel()||!w.equals(this._editor.getSelections(),_,(I,k)=>I.equalsSelection(k)))){for(let I=0;I<m.length;I++)m[I]=m[I].filter(k=>k.containsPosition(_[I].getStartPosition())&&k.containsPosition(_[I].getEndPosition())),m[I].unshift(_[I]);this._state=m.map(I=>new a(0,I)),(E=this._selectionListener)===null||E===void 0||E.dispose(),this._selectionListener=this._editor.onDidChangeCursorPosition(()=>{var I;this._ignoreSelection||((I=this._selectionListener)===null||I===void 0||I.dispose(),this._state=void 0)})}})),!this._state))return;this._state=this._state.map(m=>m.mov(y));const v=this._state.map(m=>C.Selection.fromPositions(m.ranges[m.index].getStartPosition(),m.ranges[m.index].getEndPosition()));this._ignoreSelection=!0;try{this._editor.setSelections(v)}finally{this._ignoreSelection=!1}})}}r.ID="editor.contrib.smartSelectController";class o extends D.EditorAction{constructor(y,_){super(_);this._forward=y}run(y,_){return Re(this,void 0,void 0,function*(){let b=r.get(_);b&&(yield b.run(this._forward))})}}class i extends o{constructor(){super(!0,{id:"editor.action.smartSelect.expand",label:c.localize(0,null),alias:"Expand Selection",precondition:void 0,kbOpts:{kbExpr:n.EditorContextKeys.editorTextFocus,primary:1024|512|17,mac:{primary:2048|256|1024|17,secondary:[256|1024|17]},weight:100},menuOpts:{menuId:u.MenuId.MenubarSelectionMenu,group:"1_basic",title:c.localize(1,null),order:2}})}}d.CommandsRegistry.registerCommandAlias("editor.action.smartSelect.grow","editor.action.smartSelect.expand");class l extends o{constructor(){super(!1,{id:"editor.action.smartSelect.shrink",label:c.localize(2,null),alias:"Shrink Selection",precondition:void 0,kbOpts:{kbExpr:n.EditorContextKeys.editorTextFocus,primary:1024|512|15,mac:{primary:2048|256|1024|15,secondary:[256|1024|15]},weight:100},menuOpts:{menuId:u.MenuId.MenubarSelectionMenu,group:"1_basic",title:c.localize(3,null),order:3}})}}(0,D.registerEditorContribution)(r.ID,r),(0,D.registerEditorAction)(i),(0,D.registerEditorAction)(l),g.SelectionRangeRegistry.register("*",new s.WordSelectionRangeProvider);function h(f,y,_,b){return Re(this,void 0,void 0,function*(){const v=g.SelectionRangeRegistry.all(f);v.length===1&&v.unshift(new t.BracketSelectionRangeProvider);let m=[],E=[];for(const I of v)m.push(Promise.resolve(I.provideSelectionRanges(f,y,b)).then(k=>{if(w.isNonEmptyArray(k)&&k.length===y.length)for(let M=0;M<y.length;M++){E[M]||(E[M]=[]);for(const P of k[M])p.Range.isIRange(P.range)&&p.Range.containsPosition(P.range,y[M])&&E[M].push(p.Range.lift(P.range))}},T.onUnexpectedExternalError));return yield Promise.all(m),E.map(I=>{if(I.length===0)return[];I.sort((F,R)=>S.Position.isBefore(F.getStartPosition(),R.getStartPosition())?1:S.Position.isBefore(R.getStartPosition(),F.getStartPosition())||S.Position.isBefore(F.getEndPosition(),R.getEndPosition())?-1:S.Position.isBefore(R.getEndPosition(),F.getEndPosition())?1:0);let k=[],M;for(const F of I)(!M||p.Range.containsRange(F,M)&&!p.Range.equalsRange(F,M))&&(k.push(F),M=F);if(!_.selectLeadingAndTrailingWhitespace)return k;let P=[k[0]];for(let F=1;F<k.length;F++){const R=k[F-1],A=k[F];if(A.startLineNumber!==R.startLineNumber||A.endLineNumber!==R.endLineNumber){const O=new p.Range(R.startLineNumber,f.getLineFirstNonWhitespaceColumn(R.startLineNumber),R.endLineNumber,f.getLineLastNonWhitespaceColumn(R.endLineNumber));O.containsRange(R)&&!O.equalsRange(R)&&A.containsRange(O)&&!A.equalsRange(O)&&P.push(O);const L=new p.Range(R.startLineNumber,1,R.endLineNumber,f.getLineMaxColumn(R.endLineNumber));L.containsRange(R)&&!L.equalsRange(O)&&A.containsRange(L)&&!A.equalsRange(L)&&P.push(L)}P.push(A)}return P})})}e.provideSelectionRanges=h,(0,D.registerModelCommand)("_executeSelectionRangeProvider",function(f,...y){const[_]=y;return h(f,_,{selectLeadingAndTrailingWhitespace:!0},N.CancellationToken.None)})}),define(J[91],ee([0,1,23,11,68,2,83,20,24,13,3,18,66,120,532,35,26,15]),function(j,e,w,N,T,D,S,p,C,n,g,t,s,c,u,d,a,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.showSimpleSuggestions=e.getSuggestionComparator=e.provideSuggestionItems=e.CompletionItemModel=e.getSnippetSuggestSupport=e.CompletionOptions=e.CompletionItem=e.suggestWidgetStatusbarMenu=e.Context=void 0,e.Context={Visible:new r.RawContextKey("suggestWidgetVisible",!1,(0,u.localize)(0,null)),DetailsVisible:new r.RawContextKey("suggestWidgetDetailsVisible",!1,(0,u.localize)(1,null)),MultipleSuggestions:new r.RawContextKey("suggestWidgetMultipleSuggestions",!1,(0,u.localize)(2,null)),MakesTextEdit:new r.RawContextKey("suggestionMakesTextEdit",!0,(0,u.localize)(3,null)),AcceptSuggestionsOnEnter:new r.RawContextKey("acceptSuggestionOnEnter",!0,(0,u.localize)(4,null)),HasInsertAndReplaceRange:new r.RawContextKey("suggestionHasInsertAndReplaceRange",!1,(0,u.localize)(5,null)),InsertMode:new r.RawContextKey("suggestionInsertMode",void 0,{type:"string",description:(0,u.localize)(6,null)}),CanResolve:new r.RawContextKey("suggestionCanResolve",!1,(0,u.localize)(7,null))},e.suggestWidgetStatusbarMenu=new d.MenuId("suggestWidgetStatusBar");class o{constructor(P,F,R,A){this.position=P,this.completion=F,this.container=R,this.provider=A,this.isInvalid=!1,this.score=T.FuzzyScore.Default,this.distance=0,this.textLabel=typeof F.label=="string"?F.label:F.label.label,this.labelLow=this.textLabel.toLowerCase(),this.isInvalid=!this.textLabel,this.sortTextLow=F.sortText&&F.sortText.toLowerCase(),this.filterTextLow=F.filterText&&F.filterText.toLowerCase(),g.Range.isIRange(F.range)?(this.editStart=new n.Position(F.range.startLineNumber,F.range.startColumn),this.editInsertEnd=new n.Position(F.range.endLineNumber,F.range.endColumn),this.editReplaceEnd=new n.Position(F.range.endLineNumber,F.range.endColumn),this.isInvalid=this.isInvalid||g.Range.spansMultipleLines(F.range)||F.range.startLineNumber!==P.lineNumber):(this.editStart=new n.Position(F.range.insert.startLineNumber,F.range.insert.startColumn),this.editInsertEnd=new n.Position(F.range.insert.endLineNumber,F.range.insert.endColumn),this.editReplaceEnd=new n.Position(F.range.replace.endLineNumber,F.range.replace.endColumn),this.isInvalid=this.isInvalid||g.Range.spansMultipleLines(F.range.insert)||g.Range.spansMultipleLines(F.range.replace)||F.range.insert.startLineNumber!==P.lineNumber||F.range.replace.startLineNumber!==P.lineNumber||F.range.insert.startColumn!==F.range.replace.startColumn),typeof A.resolveCompletionItem!="function"&&(this._resolveCache=Promise.resolve(),this._isResolved=!0)}get isResolved(){return!!this._isResolved}resolve(P){return Re(this,void 0,void 0,function*(){if(!this._resolveCache){const F=P.onCancellationRequested(()=>{this._resolveCache=void 0,this._isResolved=!1});this._resolveCache=Promise.resolve(this.provider.resolveCompletionItem(this.completion,P)).then(R=>{Object.assign(this.completion,R),this._isResolved=!0,F.dispose()},R=>{(0,N.isPromiseCanceledError)(R)&&(this._resolveCache=void 0,this._isResolved=!1)})}return this._resolveCache})}}e.CompletionItem=o;class i{constructor(P=2,F=new Set,R=new Set,A=!0){this.snippetSortOrder=P,this.kindFilter=F,this.providerFilter=R,this.showDeprecated=A}}e.CompletionOptions=i,i.default=new i;let l;function h(){return l}e.getSnippetSuggestSupport=h;class f{constructor(P,F,R,A){this.items=P,this.needsClipboard=F,this.durations=R,this.disposable=A}}e.CompletionItemModel=f;function y(M,P,F=i.default,R={triggerKind:0},A=w.CancellationToken.None){return Re(this,void 0,void 0,function*(){const O=new S.StopWatch(!0);P=P.clone();const L=M.getWordAtPosition(P),B=L?new g.Range(P.lineNumber,L.startColumn,P.lineNumber,L.endColumn):g.Range.fromPositions(P),W={replace:B,insert:B.setEndPosition(P.lineNumber,P.column)},K=[],H=new D.DisposableStore,Y=[];let X=!1;const Z=(oe,G,x)=>{var U,$,V;if(!!G){for(let Q of G.suggestions)if(!F.kindFilter.has(Q.kind)){if(!F.showDeprecated&&((U=Q==null?void 0:Q.tags)===null||U===void 0?void 0:U.includes(1)))continue;Q.range||(Q.range=W),Q.sortText||(Q.sortText=typeof Q.label=="string"?Q.label:Q.label.label),!X&&Q.insertTextRules&&Q.insertTextRules&4&&(X=c.SnippetParser.guessNeedsClipboard(Q.insertText)),K.push(new o(P,Q,G,oe))}(0,D.isDisposable)(G)&&H.add(G),Y.push({providerName:($=oe._debugDisplayName)!==null&&$!==void 0?$:"unkown_provider",elapsedProvider:(V=G.duration)!==null&&V!==void 0?V:-1,elapsedOverall:x.elapsed()})}},se=(()=>Re(this,void 0,void 0,function*(){if(!l||F.kindFilter.has(27)||F.providerFilter.size>0&&!F.providerFilter.has(l))return;const oe=new S.StopWatch(!0),G=yield l.provideCompletionItems(M,P,R,A);Z(l,G,oe)}))();for(let oe of t.CompletionProviderRegistry.orderedGroups(M)){let G=K.length;if(yield Promise.all(oe.map(x=>Re(this,void 0,void 0,function*(){if(!(F.providerFilter.size>0&&!F.providerFilter.has(x)))try{const U=new S.StopWatch(!0),$=yield x.provideCompletionItems(M,P,R,A);Z(x,$,U)}catch(U){(0,N.onUnexpectedExternalError)(U)}}))),G!==K.length||A.isCancellationRequested)break}return yield se,A.isCancellationRequested?(H.dispose(),Promise.reject((0,N.canceled)())):new f(K.sort(E(F.snippetSortOrder)),X,{entries:Y,elapsed:O.elapsed()},H)})}e.provideSuggestionItems=y;function _(M,P){if(M.sortTextLow&&P.sortTextLow){if(M.sortTextLow<P.sortTextLow)return-1;if(M.sortTextLow>P.sortTextLow)return 1}return M.completion.label<P.completion.label?-1:M.completion.label>P.completion.label?1:M.completion.kind-P.completion.kind}function b(M,P){if(M.completion.kind!==P.completion.kind){if(M.completion.kind===27)return-1;if(P.completion.kind===27)return 1}return _(M,P)}function v(M,P){if(M.completion.kind!==P.completion.kind){if(M.completion.kind===27)return 1;if(P.completion.kind===27)return-1}return _(M,P)}const m=new Map;m.set(0,b),m.set(2,v),m.set(1,_);function E(M){return m.get(M)}e.getSuggestionComparator=E,a.CommandsRegistry.registerCommand("_executeCompletionItemProvider",(M,...P)=>Re(void 0,void 0,void 0,function*(){const[F,R,A,O]=P;(0,p.assertType)(C.URI.isUri(F)),(0,p.assertType)(n.Position.isIPosition(R)),(0,p.assertType)(typeof A=="string"||!A),(0,p.assertType)(typeof O=="number"||!O);const L=yield M.get(s.ITextModelService).createModelReference(F);try{const B={incomplete:!1,suggestions:[]},W=[],K=yield y(L.object.textEditorModel,n.Position.lift(R),void 0,{triggerCharacter:A,triggerKind:A?1:0});for(const H of K.items)W.length<(O??0)&&W.push(H.resolve(w.CancellationToken.None)),B.incomplete=B.incomplete||H.container.incomplete,B.suggestions.push(H.completion);try{return yield Promise.all(W),B}finally{setTimeout(()=>K.disposable.dispose(),100)}}finally{L.dispose()}}));const I=new class{constructor(){this.onlyOnceSuggestions=[]}provideCompletionItems(){let P={suggestions:this.onlyOnceSuggestions.slice(0)};return this.onlyOnceSuggestions.length=0,P}};t.CompletionProviderRegistry.register("*",I);function k(M,P){setTimeout(()=>{I.onlyOnceSuggestions.push(...P),M.getContribution("editor.contrib.suggestController").triggerSuggest(new Set().add(I))},0)}e.showSimpleSuggestions=k}),define(J[275],ee([0,1,45,16,193,539]),function(j,e,w,N,T,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ToggleTabFocusModeAction=void 0;class S extends N.EditorAction{constructor(){super({id:S.ID,label:D.localize(0,null),alias:"Toggle Tab Key Moves Focus",precondition:void 0,kbOpts:{kbExpr:null,primary:2048|43,mac:{primary:256|1024|43},weight:100}})}run(C,n){const t=!T.TabFocus.getTabFocusMode();T.TabFocus.setTabFocusMode(t),t?(0,w.alert)(D.localize(1,null)):(0,w.alert)(D.localize(2,null))}}e.ToggleTabFocusModeAction=S,S.ID="editor.action.toggleTabFocusMode",(0,N.registerEditorAction)(S)}),define(J[637],ee([0,1,83,16,540]),function(j,e,w,N,T){"use strict";Object.defineProperty(e,"__esModule",{value:!0});class D extends N.EditorAction{constructor(){super({id:"editor.action.forceRetokenize",label:T.localize(0,null),alias:"Developer: Force Retokenize",precondition:void 0})}run(p,C){if(!C.hasModel())return;const n=C.getModel();n.resetTokenization();const g=new w.StopWatch(!0);n.forceTokenization(n.getLineCount()),g.stop(),console.log(`tokenization took ${g.elapsed()}`)}}(0,N.registerEditorAction)(D)}),define(J[638],ee([0,1,2,44,16,28,541,124]),function(j,e,w,N,T,D,S,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.UnusualLineTerminatorsDetector=void 0;const C="ignoreUnusualLineTerminators";function n(s,c,u){s.setModelProperty(c.uri,C,u)}function g(s,c){return s.getModelProperty(c.uri,C)}let t=class extends w.Disposable{constructor(c,u,d){super();this._editor=c,this._dialogService=u,this._codeEditorService=d,this._config=this._editor.getOption(112),this._register(this._editor.onDidChangeConfiguration(a=>{a.hasChanged(112)&&(this._config=this._editor.getOption(112),this._checkForUnusualLineTerminators())})),this._register(this._editor.onDidChangeModel(()=>{this._checkForUnusualLineTerminators()})),this._register(this._editor.onDidChangeModelContent(a=>{a.isUndoing||this._checkForUnusualLineTerminators()}))}_checkForUnusualLineTerminators(){return Re(this,void 0,void 0,function*(){if(this._config==="off"||!this._editor.hasModel())return;const c=this._editor.getModel();if(!c.mightContainUnusualLineTerminators()||g(this._codeEditorService,c)===!0||this._editor.getOption(80))return;if(this._config==="auto"){c.removeUnusualLineTerminators(this._editor.getSelections());return}if(!(yield this._dialogService.confirm({title:S.localize(0,null),message:S.localize(1,null),detail:S.localize(2,null,(0,N.basename)(c.uri)),primaryButton:S.localize(3,null),secondaryButton:S.localize(4,null)})).confirmed){n(this._codeEditorService,c,!0);return}c.removeUnusualLineTerminators(this._editor.getSelections())})}};t.ID="editor.contrib.unusualLineTerminatorsDetector",t=Fe([Ce(1,p.IDialogService),Ce(2,D.ICodeEditorService)],t),e.UnusualLineTerminatorsDetector=t,(0,T.registerEditorContribution)(t.ID,t)}),define(J[639],ee([0,1,7,30,165,45,53,2,17,8,24,16,25,275,15,9,40,57,21,10,65,374]),function(j,e,w,N,T,D,S,p,C,n,g,t,s,c,u,d,a,r,o,i,l){"use strict";Object.defineProperty(e,"__esModule",{value:!0});const h=new u.RawContextKey("accessibilityHelpWidgetVisible",!1);let f=class yi extends p.Disposable{constructor(E,I){super();this._editor=E,this._widget=this._register(I.createInstance(_,this._editor))}static get(E){return E.getContribution(yi.ID)}show(){this._widget.show()}hide(){this._widget.hide()}};f.ID="editor.contrib.accessibilityHelpController",f=Fe([Ce(1,d.IInstantiationService)],f);function y(m,E){return!m||m.length===0?l.AccessibilityHelpNLS.noSelection:m.length===1?E?n.format(l.AccessibilityHelpNLS.singleSelectionRange,m[0].positionLineNumber,m[0].positionColumn,E):n.format(l.AccessibilityHelpNLS.singleSelection,m[0].positionLineNumber,m[0].positionColumn):E?n.format(l.AccessibilityHelpNLS.multiSelectionRange,m.length,E):m.length>0?n.format(l.AccessibilityHelpNLS.multiSelection,m.length):""}let _=class At extends S.Widget{constructor(E,I,k,M){super();this._contextKeyService=I,this._keybindingService=k,this._openerService=M,this._editor=E,this._isVisibleKey=h.bindTo(this._contextKeyService),this._domNode=(0,N.createFastDomNode)(document.createElement("div")),this._domNode.setClassName("accessibilityHelpWidget"),this._domNode.setDisplay("none"),this._domNode.setAttribute("role","dialog"),this._domNode.setAttribute("aria-hidden","true"),this._contentDomNode=(0,N.createFastDomNode)(document.createElement("div")),this._contentDomNode.setAttribute("role","document"),this._domNode.appendChild(this._contentDomNode),this._isVisible=!1,this._register(this._editor.onDidLayoutChange(()=>{this._isVisible&&this._layout()})),this._register(w.addStandardDisposableListener(this._contentDomNode.domNode,"keydown",P=>{if(!!this._isVisible&&(P.equals(2048|35)&&((0,D.alert)(l.AccessibilityHelpNLS.emergencyConfOn),this._editor.updateOptions({accessibilitySupport:"on"}),w.clearNode(this._contentDomNode.domNode),this._buildContent(),this._contentDomNode.domNode.focus(),P.preventDefault(),P.stopPropagation()),P.equals(2048|38))){(0,D.alert)(l.AccessibilityHelpNLS.openingDocs);let F=this._editor.getRawOptions().accessibilityHelpUrl;typeof F=="undefined"&&(F="https://go.microsoft.com/fwlink/?linkid=852450"),this._openerService.open(g.URI.parse(F)),P.preventDefault(),P.stopPropagation()}})),this.onblur(this._contentDomNode.domNode,()=>{this.hide()}),this._editor.addOverlayWidget(this)}dispose(){this._editor.removeOverlayWidget(this),super.dispose()}getId(){return At.ID}getDomNode(){return this._domNode.domNode}getPosition(){return{preference:null}}show(){this._isVisible||(this._isVisible=!0,this._isVisibleKey.set(!0),this._layout(),this._domNode.setDisplay("block"),this._domNode.setAttribute("aria-hidden","false"),this._contentDomNode.domNode.tabIndex=0,this._buildContent(),this._contentDomNode.domNode.focus())}_descriptionForCommand(E,I,k){let M=this._keybindingService.lookupKeybinding(E);return M?n.format(I,M.getAriaLabel()):n.format(k,E)}_buildContent(){const E=this._editor.getOptions(),I=this._editor.getSelections();let k=0;if(I){const R=this._editor.getModel();R&&I.forEach(A=>{k+=R.getValueLengthInRange(A)})}let M=y(I,k);E.get(53)?E.get(80)?M+=l.AccessibilityHelpNLS.readonlyDiffEditor:M+=l.AccessibilityHelpNLS.editableDiffEditor:E.get(80)?M+=l.AccessibilityHelpNLS.readonlyEditor:M+=l.AccessibilityHelpNLS.editableEditor;const P=C.isMacintosh?l.AccessibilityHelpNLS.changeConfigToOnMac:l.AccessibilityHelpNLS.changeConfigToOnWinLinux;switch(E.get(2)){case 0:M+=`
 
 - `+P;break;case 2:M+=`
 
 - `+l.AccessibilityHelpNLS.auto_on;break;case 1:M+=`
 
 - `+l.AccessibilityHelpNLS.auto_off,M+=" "+P;break}E.get(128)?M+=`
 
 - `+this._descriptionForCommand(c.ToggleTabFocusModeAction.ID,l.AccessibilityHelpNLS.tabFocusModeOnMsg,l.AccessibilityHelpNLS.tabFocusModeOnMsgNoKb):M+=`
 
 - `+this._descriptionForCommand(c.ToggleTabFocusModeAction.ID,l.AccessibilityHelpNLS.tabFocusModeOffMsg,l.AccessibilityHelpNLS.tabFocusModeOffMsgNoKb);const F=C.isMacintosh?l.AccessibilityHelpNLS.openDocMac:l.AccessibilityHelpNLS.openDocWinLinux;M+=`
 
 - `+F,M+=`
 
`+l.AccessibilityHelpNLS.outroMsg,this._contentDomNode.domNode.appendChild((0,T.renderFormattedText)(M)),this._contentDomNode.domNode.setAttribute("aria-label",M)}hide(){!this._isVisible||(this._isVisible=!1,this._isVisibleKey.reset(),this._domNode.setDisplay("none"),this._domNode.setAttribute("aria-hidden","true"),this._contentDomNode.domNode.tabIndex=-1,w.clearNode(this._contentDomNode.domNode),this._editor.focus())}_layout(){let E=this._editor.getLayoutInfo(),I=Math.max(5,Math.min(At.WIDTH,E.width-40)),k=Math.max(5,Math.min(At.HEIGHT,E.height-40));this._domNode.setWidth(I),this._domNode.setHeight(k);let M=Math.round((E.height-k)/2);this._domNode.setTop(M);let P=Math.round((E.width-I)/2);this._domNode.setLeft(P)}};_.ID="editor.contrib.accessibilityHelpWidget",_.WIDTH=500,_.HEIGHT=300,_=Fe([Ce(1,u.IContextKeyService),Ce(2,a.IKeybindingService),Ce(3,r.IOpenerService)],_);class b extends t.EditorAction{constructor(){super({id:"editor.action.showAccessibilityHelp",label:l.AccessibilityHelpNLS.showAccessibilityHelpAction,alias:"Show Accessibility Help",precondition:void 0,kbOpts:{primary:512|59,weight:100,linux:{primary:512|1024|59,secondary:[512|59]}}})}run(E,I){let k=f.get(I);k&&k.show()}}(0,t.registerEditorContribution)(f.ID,f),(0,t.registerEditorAction)(b);const v=t.EditorCommand.bindToContribution(f.get);(0,t.registerEditorCommand)(new v({id:"closeAccessibilityHelp",precondition:h,handler:m=>m.hide(),kbOpts:{weight:100+100,kbExpr:s.EditorContextKeys.focus,primary:9,secondary:[1024|9]}})),(0,i.registerThemingParticipant)((m,E)=>{const I=m.getColor(o.editorWidgetBackground);I&&E.addRule(`.monaco-editor .accessibilityHelpWidget { background-color: ${I}; }`);const k=m.getColor(o.editorWidgetForeground);k&&E.addRule(`.monaco-editor .accessibilityHelpWidget { color: ${k}; }`);const M=m.getColor(o.widgetShadow);M&&E.addRule(`.monaco-editor .accessibilityHelpWidget { box-shadow: 0 2px 8px ${M}; }`);const P=m.getColor(o.contrastBorder);P&&E.addRule(`.monaco-editor .accessibilityHelpWidget { border: 2px solid ${P}; }`)})}),define(J[640],ee([0,1,7,2,16,17,375]),function(j,e,w,N,T,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IPadShowKeyboard=void 0;class S extends N.Disposable{constructor(n){super();this.editor=n,this.widget=null,D.isIOS&&(this._register(n.onDidChangeConfiguration(()=>this.update())),this.update())}update(){const n=!this.editor.getOption(80);!this.widget&&n?this.widget=new p(this.editor):this.widget&&!n&&(this.widget.dispose(),this.widget=null)}dispose(){super.dispose(),this.widget&&(this.widget.dispose(),this.widget=null)}}e.IPadShowKeyboard=S,S.ID="editor.contrib.iPadShowKeyboard";class p extends N.Disposable{constructor(n){super();this.editor=n,this._domNode=document.createElement("textarea"),this._domNode.className="iPadShowKeyboard",this._register(w.addDisposableListener(this._domNode,"touchstart",g=>{this.editor.focus()})),this._register(w.addDisposableListener(this._domNode,"focus",g=>{this.editor.focus()})),this.editor.addOverlayWidget(this)}dispose(){this.editor.removeOverlayWidget(this),super.dispose()}getId(){return p.ID}getDomNode(){return this._domNode}getPosition(){return{preference:1}}}p.ID="editor.contrib.ShowKeyboardWidget",(0,T.registerEditorContribution)(S.ID,S)}),define(J[641],ee([0,1,7,29,2,16,18,77,39,123,21,10,65,103,376]),function(j,e,w,N,T,D,S,p,C,n,g,t,s,c){"use strict";Object.defineProperty(e,"__esModule",{value:!0});let u=class Li extends T.Disposable{constructor(l,h,f){super();this._editor=l,this._modeService=f,this._widget=null,this._register(this._editor.onDidChangeModel(y=>this.stop())),this._register(this._editor.onDidChangeModelLanguage(y=>this.stop())),this._register(S.TokenizationRegistry.onDidChange(y=>this.stop())),this._register(this._editor.onKeyUp(y=>y.keyCode===9&&this.stop()))}static get(l){return l.getContribution(Li.ID)}dispose(){this.stop(),super.dispose()}launch(){this._widget||!this._editor.hasModel()||(this._widget=new o(this._editor,this._modeService))}stop(){this._widget&&(this._widget.dispose(),this._widget=null)}};u.ID="editor.contrib.inspectTokens",u=Fe([Ce(1,n.IStandaloneThemeService),Ce(2,C.IModeService)],u);class d extends D.EditorAction{constructor(){super({id:"editor.action.inspectTokens",label:s.InspectTokensNLS.inspectTokensAction,alias:"Developer: Inspect Tokens",precondition:void 0})}run(l,h){let f=u.get(h);f&&f.launch()}}function a(i){let l="";for(let h=0,f=i.length;h<f;h++){let y=i.charCodeAt(h);switch(y){case 9:l+="\u2192";break;case 32:l+="\xB7";break;default:l+=String.fromCharCode(y)}}return l}function r(i,l){const h=S.TokenizationRegistry.get(l);if(h)return h;const f=i.encodeLanguageId(l);return{getInitialState:()=>p.NULL_STATE,tokenize:(y,_,b,v)=>(0,p.nullTokenize)(l,y,b,v),tokenize2:(y,_,b,v)=>(0,p.nullTokenize2)(f,y,b,v)}}class o extends T.Disposable{constructor(l,h){super();this.allowEditorOverflow=!0,this._editor=l,this._modeService=h,this._model=this._editor.getModel(),this._domNode=document.createElement("div"),this._domNode.className="tokens-inspect-widget",this._tokenizationSupport=r(this._modeService.languageIdCodec,this._model.getLanguageId()),this._compute(this._editor.getPosition()),this._register(this._editor.onDidChangeCursorPosition(f=>this._compute(this._editor.getPosition()))),this._editor.addContentWidget(this)}dispose(){this._editor.removeContentWidget(this),super.dispose()}getId(){return o._ID}_compute(l){let h=this._getTokensAtLine(l.lineNumber),f=0;for(let m=h.tokens1.length-1;m>=0;m--){let E=h.tokens1[m];if(l.column-1>=E.offset){f=m;break}}let y=0;for(let m=h.tokens2.length>>>1;m>=0;m--)if(l.column-1>=h.tokens2[m<<1]){y=m;break}let _=this._model.getLineContent(l.lineNumber),b="";if(f<h.tokens1.length){let m=h.tokens1[f].offset,E=f+1<h.tokens1.length?h.tokens1[f+1].offset:_.length;b=_.substring(m,E)}(0,w.reset)(this._domNode,(0,w.$)("h2.tm-token",void 0,a(b),(0,w.$)("span.tm-token-length",void 0,`${b.length} ${b.length===1?"char":"chars"}`))),(0,w.append)(this._domNode,(0,w.$)("hr.tokens-inspect-separator",{style:"clear:both"}));const v=(y<<1)+1<h.tokens2.length?this._decodeMetadata(h.tokens2[(y<<1)+1]):null;(0,w.append)(this._domNode,(0,w.$)("table.tm-metadata-table",void 0,(0,w.$)("tbody",void 0,(0,w.$)("tr",void 0,(0,w.$)("td.tm-metadata-key",void 0,"language"),(0,w.$)("td.tm-metadata-value",void 0,`${v?v.languageId:"-?-"}`)),(0,w.$)("tr",void 0,(0,w.$)("td.tm-metadata-key",void 0,"token type"),(0,w.$)("td.tm-metadata-value",void 0,`${v?this._tokenTypeToString(v.tokenType):"-?-"}`)),(0,w.$)("tr",void 0,(0,w.$)("td.tm-metadata-key",void 0,"font style"),(0,w.$)("td.tm-metadata-value",void 0,`${v?this._fontStyleToString(v.fontStyle):"-?-"}`)),(0,w.$)("tr",void 0,(0,w.$)("td.tm-metadata-key",void 0,"foreground"),(0,w.$)("td.tm-metadata-value",void 0,`${v?N.Color.Format.CSS.formatHex(v.foreground):"-?-"}`)),(0,w.$)("tr",void 0,(0,w.$)("td.tm-metadata-key",void 0,"background"),(0,w.$)("td.tm-metadata-value",void 0,`${v?N.Color.Format.CSS.formatHex(v.background):"-?-"}`))))),(0,w.append)(this._domNode,(0,w.$)("hr.tokens-inspect-separator")),f<h.tokens1.length&&(0,w.append)(this._domNode,(0,w.$)("span.tm-token-type",void 0,h.tokens1[f].type)),this._editor.layoutContentWidget(this)}_decodeMetadata(l){let h=S.TokenizationRegistry.getColorMap(),f=S.TokenMetadata.getLanguageId(l),y=S.TokenMetadata.getTokenType(l),_=S.TokenMetadata.getFontStyle(l),b=S.TokenMetadata.getForeground(l),v=S.TokenMetadata.getBackground(l);return{languageId:this._modeService.languageIdCodec.decodeLanguageId(f),tokenType:y,fontStyle:_,foreground:h[b],background:h[v]}}_tokenTypeToString(l){switch(l){case 0:return"Other";case 1:return"Comment";case 2:return"String";case 4:return"RegEx";default:return"??"}}_fontStyleToString(l){let h="";return l&1&&(h+="italic "),l&2&&(h+="bold "),l&4&&(h+="underline "),h.length===0&&(h="---"),h}_getTokensAtLine(l){let h=this._getStateBeforeLine(l),f=this._tokenizationSupport.tokenize(this._model.getLineContent(l),!0,h,0),y=this._tokenizationSupport.tokenize2(this._model.getLineContent(l),!0,h,0);return{startState:h,tokens1:f.tokens,tokens2:y.tokens,endState:f.endState}}_getStateBeforeLine(l){let h=this._tokenizationSupport.getInitialState();for(let f=1;f<l;f++)h=this._tokenizationSupport.tokenize(this._model.getLineContent(f),!0,h,0).endState;return h}getDomNode(){return this._domNode}getPosition(){return{position:this._editor.getPosition(),preference:[2,1]}}}o._ID="editor.contrib.inspectTokensWidget",(0,D.registerEditorContribution)(u.ID,u),(0,D.registerEditorAction)(d),(0,t.registerThemingParticipant)((i,l)=>{const h=i.getColor(g.editorHoverBorder);if(h){let _=i.type===c.ColorScheme.HIGH_CONTRAST?2:1;l.addRule(`.monaco-editor .tokens-inspect-widget { border: ${_}px solid ${h}; }`),l.addRule(`.monaco-editor .tokens-inspect-widget .tokens-inspect-separator { background-color: ${h}; }`)}const f=i.getColor(g.editorHoverBackground);f&&l.addRule(`.monaco-editor .tokens-inspect-widget { background-color: ${f}; }`);const y=i.getColor(g.editorHoverForeground);y&&l.addRule(`.monaco-editor .tokens-inspect-widget { color: ${y}; }`)})}),define(J[642],ee([0,1,33,102,65,28,598,20,9,40,26,90,124,16,25,79]),function(j,e,w,N,T,D,S,p,C,n,g,t,s,c,u,d){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.GotoLineAction=e.StandaloneCommandsQuickAccessProvider=void 0;let a=class extends S.AbstractEditorCommandsQuickAccessProvider{constructor(i,l,h,f,y,_){super({showAlias:!1},i,h,f,y,_);this.codeEditorService=l}get activeTextEditorControl(){return(0,p.withNullAsUndefined)(this.codeEditorService.getFocusedCodeEditor())}getCommandPicks(){return Re(this,void 0,void 0,function*(){return this.getCodeEditorCommandPicks()})}};a=Fe([Ce(0,C.IInstantiationService),Ce(1,D.ICodeEditorService),Ce(2,n.IKeybindingService),Ce(3,g.ICommandService),Ce(4,t.ITelemetryService),Ce(5,s.IDialogService)],a),e.StandaloneCommandsQuickAccessProvider=a,w.Registry.as(N.Extensions.Quickaccess).registerQuickAccessProvider({ctor:a,prefix:a.PREFIX,helpEntries:[{description:T.QuickCommandNLS.quickCommandHelp,needsEditor:!0}]});class r extends c.EditorAction{constructor(){super({id:"editor.action.quickCommand",label:T.QuickCommandNLS.quickCommandActionLabel,alias:"Command Palette",precondition:void 0,kbOpts:{kbExpr:u.EditorContextKeys.focus,primary:59,weight:100},contextMenuOpts:{group:"z_commands",order:1}})}run(i){i.get(d.IQuickInputService).quickAccess.show(a.PREFIX)}}e.GotoLineAction=r,(0,c.registerEditorAction)(r)}),define(J[643],ee([0,1,615,33,102,28,20,65,4,16,25,79]),function(j,e,w,N,T,D,S,p,C,n,g,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.GotoLineAction=e.StandaloneGotoLineQuickAccessProvider=void 0;let s=class extends w.AbstractGotoLineQuickAccessProvider{constructor(d){super();this.editorService=d,this.onDidActiveTextEditorControlChange=C.Event.None}get activeTextEditorControl(){return(0,S.withNullAsUndefined)(this.editorService.getFocusedCodeEditor())}};s=Fe([Ce(0,D.ICodeEditorService)],s),e.StandaloneGotoLineQuickAccessProvider=s,N.Registry.as(T.Extensions.Quickaccess).registerQuickAccessProvider({ctor:s,prefix:s.PREFIX,helpEntries:[{description:p.GoToLineNLS.gotoLineActionLabel,needsEditor:!0}]});class c extends n.EditorAction{constructor(){super({id:"editor.action.gotoLine",label:p.GoToLineNLS.gotoLineActionLabel,alias:"Go to Line/Column...",precondition:void 0,kbOpts:{kbExpr:g.EditorContextKeys.focus,primary:2048|37,mac:{primary:256|37},weight:100}})}run(d){d.get(t.IQuickInputService).quickAccess.show(s.PREFIX)}}e.GotoLineAction=c,(0,n.registerEditorAction)(c)}),define(J[644],ee([0,1,616,33,102,28,20,65,4,16,25,79,136,271]),function(j,e,w,N,T,D,S,p,C,n,g,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.GotoLineAction=e.StandaloneGotoSymbolQuickAccessProvider=void 0;let s=class extends w.AbstractGotoSymbolQuickAccessProvider{constructor(d){super();this.editorService=d,this.onDidActiveTextEditorControlChange=C.Event.None}get activeTextEditorControl(){return(0,S.withNullAsUndefined)(this.editorService.getFocusedCodeEditor())}};s=Fe([Ce(0,D.ICodeEditorService)],s),e.StandaloneGotoSymbolQuickAccessProvider=s,N.Registry.as(T.Extensions.Quickaccess).registerQuickAccessProvider({ctor:s,prefix:w.AbstractGotoSymbolQuickAccessProvider.PREFIX,helpEntries:[{description:p.QuickOutlineNLS.quickOutlineActionLabel,prefix:w.AbstractGotoSymbolQuickAccessProvider.PREFIX,needsEditor:!0},{description:p.QuickOutlineNLS.quickOutlineByCategoryActionLabel,prefix:w.AbstractGotoSymbolQuickAccessProvider.PREFIX_BY_CATEGORY,needsEditor:!0}]});class c extends n.EditorAction{constructor(){super({id:"editor.action.quickOutline",label:p.QuickOutlineNLS.quickOutlineActionLabel,alias:"Go to Symbol...",precondition:g.EditorContextKeys.hasDocumentSymbolProvider,kbOpts:{kbExpr:g.EditorContextKeys.focus,primary:2048|1024|45,weight:100},contextMenuOpts:{group:"navigation",order:3}})}run(d){d.get(t.IQuickInputService).quickAccess.show(w.AbstractGotoSymbolQuickAccessProvider.PREFIX)}}e.GotoLineAction=c,(0,n.registerEditorAction)(c)}),define(J[645],ee([0,1,16,123,65]),function(j,e,w,N,T){"use strict";Object.defineProperty(e,"__esModule",{value:!0});class D extends w.EditorAction{constructor(){super({id:"editor.action.toggleHighContrast",label:T.ToggleHighContrastNLS.toggleHighContrast,alias:"Toggle High Contrast Theme",precondition:void 0});this._originalThemeName=null}run(p,C){const n=p.get(N.IStandaloneThemeService);this._originalThemeName?(n.setTheme(this._originalThemeName),this._originalThemeName=null):(this._originalThemeName=n.getColorTheme().themeName,n.setTheme("hc-black"))}}(0,w.registerEditorAction)(D)}),define(J[194],ee([0,1,7,52,121,451,51,189,2,17,544,35,15,71,9,40,36,73,10,379]),function(j,e,w,N,T,D,S,p,C,n,g,t,s,c,u,d,a,r,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.createActionViewItem=e.SubmenuEntryActionViewItem=e.MenuEntryActionViewItem=e.createAndFillInActionBarActions=void 0;function i(v,m,E,I,k,M,P){const F=v.getActions(m),R=typeof I=="string"?A=>A===I:I;return h(F,E,!1,R,k,M,P),l(F)}e.createAndFillInActionBarActions=i;function l(v){const m=new C.DisposableStore;for(const[,E]of v)for(const I of E)m.add(I);return m}function h(v,m,E,I=F=>F==="navigation",k=Number.MAX_SAFE_INTEGER,M=()=>!1,P=!1){let F,R;Array.isArray(m)?(F=m,R=m):(F=m.primary,R=m.secondary);const A=new Set;for(const[O,L]of v){let B;I(O)?(B=F,B.length>0&&P&&B.push(new S.Separator)):(B=R,B.length>0&&B.push(new S.Separator));for(let W of L){E&&(W=W instanceof t.MenuItemAction&&W.alt?W.alt:W);const K=B.push(W);W instanceof S.SubmenuAction&&A.add({group:O,action:W,index:K-1})}}for(const{group:O,action:L,index:B}of A){const W=I(O)?F:R,K=L.actions;(K.length<=1||W.length+K.length-2<=k)&&M(L,O,W.length)&&W.splice(B,1,...K)}if(F!==R&&F.length>k){const O=F.splice(k,F.length-k);R.unshift(...O,new S.Separator)}}let f=class extends T.ActionViewItem{constructor(m,E,I,k,M){super(void 0,m,{icon:!!(m.class||m.item.icon),label:!m.class&&!m.item.icon,draggable:E==null?void 0:E.draggable});this._keybindingService=I,this._notificationService=k,this._contextKeyService=M,this._wantsAltCommand=!1,this._itemClassDispose=this._register(new C.MutableDisposable),this._altKey=w.ModifierKeyEmitter.getInstance()}get _menuItemAction(){return this._action}get _commandAction(){return this._wantsAltCommand&&this._menuItemAction.alt||this._menuItemAction}onClick(m){return Re(this,void 0,void 0,function*(){m.preventDefault(),m.stopPropagation();try{yield this.actionRunner.run(this._commandAction,this._context)}catch(E){this._notificationService.error(E)}})}render(m){super.render(m),m.classList.add("menu-entry"),this._updateItemClass(this._menuItemAction.item);let E=!1,I=this._altKey.keyStatus.altKey||(n.isWindows||n.isLinux)&&this._altKey.keyStatus.shiftKey;const k=()=>{const M=E&&I;M!==this._wantsAltCommand&&(this._wantsAltCommand=M,this.updateLabel(),this.updateTooltip(),this.updateClass())};this._menuItemAction.alt&&this._register(this._altKey.event(M=>{I=M.altKey||(n.isWindows||n.isLinux)&&M.shiftKey,k()})),this._register((0,w.addDisposableListener)(m,"mouseleave",M=>{E=!1,k()})),this._register((0,w.addDisposableListener)(m,"mouseenter",M=>{E=!0,k()}))}updateLabel(){this.options.label&&this.label&&(this.label.textContent=this._commandAction.label)}updateTooltip(){if(this.label){const m=this._keybindingService.lookupKeybinding(this._commandAction.id,this._contextKeyService),E=m&&m.getLabel(),I=this._commandAction.tooltip||this._commandAction.label;let k=E?(0,g.localize)(0,null,I,E):I;if(!this._wantsAltCommand&&this._menuItemAction.alt){const M=this._menuItemAction.alt.tooltip||this._menuItemAction.alt.label,P=this._keybindingService.lookupKeybinding(this._menuItemAction.alt.id,this._contextKeyService),F=P&&P.getLabel(),R=F?(0,g.localize)(1,null,M,F):M;k+=`
[${p.UILabelProvider.modifierLabels[n.OS].altKey}] ${R}`}this.label.title=k}}updateClass(){this.options.icon&&(this._commandAction!==this._menuItemAction?this._menuItemAction.alt&&this._updateItemClass(this._menuItemAction.alt.item):this._menuItemAction.alt&&this._updateItemClass(this._menuItemAction.item))}_updateItemClass(m){var E;this._itemClassDispose.value=void 0;const{element:I,label:k}=this;if(!I||!k)return;const M=this._commandAction.checked&&((E=m.toggled)===null||E===void 0?void 0:E.icon)?m.toggled.icon:m.icon;if(!!M)if(o.ThemeIcon.isThemeIcon(M)){const P=o.ThemeIcon.asClassNameArray(M);k.classList.add(...P),this._itemClassDispose.value=(0,C.toDisposable)(()=>{k.classList.remove(...P)})}else M.light&&k.style.setProperty("--menu-entry-icon-light",(0,w.asCSSUrl)(M.light)),M.dark&&k.style.setProperty("--menu-entry-icon-dark",(0,w.asCSSUrl)(M.dark)),k.classList.add("icon"),this._itemClassDispose.value=(0,C.toDisposable)(()=>{k.classList.remove("icon"),k.style.removeProperty("--menu-entry-icon-light"),k.style.removeProperty("--menu-entry-icon-dark")})}};f=Fe([Ce(2,d.IKeybindingService),Ce(3,a.INotificationService),Ce(4,s.IContextKeyService)],f),e.MenuEntryActionViewItem=f;let y=class extends D.DropdownMenuActionViewItem{constructor(m,E,I){var k,M;const P=Object.assign({},E??Object.create(null),{menuAsChild:(k=E==null?void 0:E.menuAsChild)!==null&&k!==void 0?k:!1,classNames:(M=E==null?void 0:E.classNames)!==null&&M!==void 0?M:o.ThemeIcon.isThemeIcon(m.item.icon)?o.ThemeIcon.asClassName(m.item.icon):void 0});super(m,{getActions:()=>m.actions},I,P)}render(m){if(super.render(m),this.element){m.classList.add("menu-entry");const{icon:E}=this._action.item;E&&!o.ThemeIcon.isThemeIcon(E)&&(this.element.classList.add("icon"),E.light&&this.element.style.setProperty("--menu-entry-icon-light",(0,w.asCSSUrl)(E.light)),E.dark&&this.element.style.setProperty("--menu-entry-icon-dark",(0,w.asCSSUrl)(E.dark)))}}};y=Fe([Ce(2,c.IContextMenuService)],y),e.SubmenuEntryActionViewItem=y;let _=class extends T.BaseActionViewItem{constructor(m,E,I,k,M,P,F,R){var A,O,L;super(null,m);this._keybindingService=I,this._notificationService=k,this._contextMenuService=M,this._menuService=P,this._instaService=F,this._storageService=R,this._container=null,this._storageKey=`${m.item.submenu._debugName}_lastActionId`;let B,W=R.get(this._storageKey,1);W&&(B=m.actions.find(H=>W===H.id)),B||(B=m.actions[0]),this._defaultAction=this._instaService.createInstance(f,B,void 0);const K=Object.assign({},E??Object.create(null),{menuAsChild:(A=E==null?void 0:E.menuAsChild)!==null&&A!==void 0?A:!0,classNames:(O=E==null?void 0:E.classNames)!==null&&O!==void 0?O:["codicon","codicon-chevron-down"],actionRunner:(L=E==null?void 0:E.actionRunner)!==null&&L!==void 0?L:new S.ActionRunner});this._dropdown=new D.DropdownMenuActionViewItem(m,m.actions,this._contextMenuService,K),this._dropdown.actionRunner.onDidRun(H=>{H.action instanceof t.MenuItemAction&&this.update(H.action)})}update(m){this._storageService.store(this._storageKey,m.id,1,0),this._defaultAction.dispose(),this._defaultAction=this._instaService.createInstance(f,m,void 0),this._defaultAction.actionRunner=new class extends S.ActionRunner{runAction(E,I){return Re(this,void 0,void 0,function*(){yield E.run(void 0)})}},this._container&&this._defaultAction.render((0,w.prepend)(this._container,(0,w.$)(".action-container")))}setActionContext(m){super.setActionContext(m),this._defaultAction.setActionContext(m),this._dropdown.setActionContext(m)}render(m){this._container=m,super.render(this._container),this._container.classList.add("monaco-dropdown-with-default");const E=(0,w.$)(".action-container");this._defaultAction.render((0,w.append)(this._container,E)),this._register((0,w.addDisposableListener)(E,w.EventType.KEY_DOWN,k=>{const M=new N.StandardKeyboardEvent(k);M.equals(17)&&(this._defaultAction.element.tabIndex=-1,this._dropdown.focus(),M.stopPropagation())}));const I=(0,w.$)(".dropdown-action-container");this._dropdown.render((0,w.append)(this._container,I)),this._register((0,w.addDisposableListener)(I,w.EventType.KEY_DOWN,k=>{var M;const P=new N.StandardKeyboardEvent(k);P.equals(15)&&(this._defaultAction.element.tabIndex=0,this._dropdown.setFocusable(!1),(M=this._defaultAction.element)===null||M===void 0||M.focus(),P.stopPropagation())}))}focus(m){m?this._dropdown.focus():(this._defaultAction.element.tabIndex=0,this._defaultAction.element.focus())}blur(){this._defaultAction.element.tabIndex=-1,this._dropdown.blur(),this._container.blur()}setFocusable(m){m?this._defaultAction.element.tabIndex=0:(this._defaultAction.element.tabIndex=-1,this._dropdown.setFocusable(!1))}dispose(){this._defaultAction.dispose(),this._dropdown.dispose(),super.dispose()}};_=Fe([Ce(2,d.IKeybindingService),Ce(3,a.INotificationService),Ce(4,c.IContextMenuService),Ce(5,t.IMenuService),Ce(6,u.IInstantiationService),Ce(7,r.IStorageService)],_);function b(v,m,E){return m instanceof t.MenuItemAction?v.createInstance(f,m,void 0):m instanceof t.SubmenuItemAction?m.item.rememberDefaultAction?v.createInstance(_,m,E):v.createInstance(y,m,E):void 0}e.createActionViewItem=b}),define(J[646],ee([0,1,7,86,2,91,537,194,35,15,9]),function(j,e,w,N,T,D,S,p,C,n,g){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SuggestWidgetStatus=void 0;class t extends p.MenuEntryActionViewItem{updateLabel(){const u=this._keybindingService.lookupKeybinding(this._action.id,this._contextKeyService);if(!u)return super.updateLabel();this.label&&(this.label.textContent=(0,S.localize)(0,null,this._action.label,t.symbolPrintEnter(u)))}static symbolPrintEnter(u){var d;return(d=u.getLabel())===null||d===void 0?void 0:d.replace(/\benter\b/gi,"\u23CE")}}let s=class{constructor(u,d,a,r){this._menuService=a,this._contextKeyService=r,this._menuDisposables=new T.DisposableStore,this.element=w.append(u,w.$(".suggest-status-bar"));const o=i=>i instanceof C.MenuItemAction?d.createInstance(t,i,void 0):void 0;this._leftActions=new N.ActionBar(this.element,{actionViewItemProvider:o}),this._rightActions=new N.ActionBar(this.element,{actionViewItemProvider:o}),this._leftActions.domNode.classList.add("left"),this._rightActions.domNode.classList.add("right")}dispose(){this._menuDisposables.dispose(),this.element.remove()}show(){const u=this._menuService.createMenu(D.suggestWidgetStatusbarMenu,this._contextKeyService),d=()=>{const a=[],r=[];for(let[o,i]of u.getActions())o==="left"?a.push(...i):r.push(...i);this._leftActions.clear(),this._leftActions.push(a),this._rightActions.clear(),this._rightActions.push(r)};this._menuDisposables.add(u.onDidChange(()=>d())),this._menuDisposables.add(u)}hide(){this._menuDisposables.clear()}};s=Fe([Ce(1,g.IInstantiationService),Ce(2,C.IMenuService),Ce(3,n.IContextKeyService)],s),e.SuggestWidgetStatus=s}),define(J[647],ee([0,1,14,4,2,35,26,15]),function(j,e,w,N,T,D,S,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MenuService=void 0;let C=class{constructor(t){this._commandService=t}createMenu(t,s,c){return new n(t,Object.assign({emitEventsForSubmenuChanges:!1,eventDebounceDelay:50},c),this._commandService,s,this)}};C=Fe([Ce(0,S.ICommandService)],C),e.MenuService=C;let n=class vt{constructor(t,s,c,u,d){this._id=t,this._options=s,this._commandService=c,this._contextKeyService=u,this._menuService=d,this._disposables=new T.DisposableStore,this._menuGroups=[],this._contextKeys=new Set,this._build();const a=new w.RunOnceScheduler(()=>{this._build(),this._onDidChange.fire(this)},s.eventDebounceDelay);this._disposables.add(a),this._disposables.add(D.MenuRegistry.onDidChangeMenu(i=>{i.has(t)&&a.schedule()}));const r=this._disposables.add(new T.DisposableStore),o=()=>{const i=new w.RunOnceScheduler(()=>this._onDidChange.fire(this),s.eventDebounceDelay);r.add(i),r.add(u.onDidChangeContext(l=>{l.affectsSome(this._contextKeys)&&i.schedule()}))};this._onDidChange=new N.Emitter({onFirstListenerAdd:o,onLastListenerRemove:r.clear.bind(r)}),this.onDidChange=this._onDidChange.event}dispose(){this._disposables.dispose(),this._onDidChange.dispose()}_build(){this._menuGroups.length=0,this._contextKeys.clear();const t=D.MenuRegistry.getMenuItems(this._id);let s;t.sort(vt._compareMenuItems);for(const c of t){const u=c.group||"";(!s||s[0]!==u)&&(s=[u,[]],this._menuGroups.push(s)),s[1].push(c),this._collectContextKeys(c)}}_collectContextKeys(t){if(vt._fillInKbExprKeys(t.when,this._contextKeys),(0,D.isIMenuItem)(t)){if(t.command.precondition&&vt._fillInKbExprKeys(t.command.precondition,this._contextKeys),t.command.toggled){const s=t.command.toggled.condition||t.command.toggled;vt._fillInKbExprKeys(s,this._contextKeys)}}else this._options.emitEventsForSubmenuChanges&&D.MenuRegistry.getMenuItems(t.submenu).forEach(this._collectContextKeys,this)}getActions(t){const s=[];for(let c of this._menuGroups){const[u,d]=c,a=[];for(const r of d)if(this._contextKeyService.contextMatchesRules(r.when)){const o=(0,D.isIMenuItem)(r)?new D.MenuItemAction(r.command,r.alt,t,this._contextKeyService,this._commandService):new D.SubmenuItemAction(r,this._menuService,this._contextKeyService,t);a.push(o)}a.length>0&&s.push([u,a])}return s}static _fillInKbExprKeys(t,s){if(t)for(let c of t.keys())s.add(c)}static _compareMenuItems(t,s){let c=t.group,u=s.group;if(c!==u){if(c){if(!u)return-1}else return 1;if(c==="navigation")return-1;if(u==="navigation")return 1;let r=c.localeCompare(u);if(r!==0)return r}let d=t.order||0,a=s.order||0;return d<a?-1:d>a?1:vt._compareTitles((0,D.isIMenuItem)(t)?t.command.title:t.title,(0,D.isIMenuItem)(s)?s.command.title:s.title)}static _compareTitles(t,s){const c=typeof t=="string"?t:t.original,u=typeof s=="string"?s:s.original;return c.localeCompare(u)}};n=Fe([Ce(2,S.ICommandService),Ce(3,p.IContextKeyService),Ce(4,D.IMenuService)],n)}),define(J[648],ee([0,1,452,453,15,80,91]),function(j,e,w,N,T,D,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ContextScopedReplaceInput=e.ContextScopedFindInput=e.createAndBindHistoryNavigationWidgetScopedContextKeyService=e.HistoryNavigationWidgetContext=void 0,e.HistoryNavigationWidgetContext="historyNavigationWidget";const p="historyNavigationForwardsEnabled",C="historyNavigationBackwardsEnabled";function n(d,a,r){new T.RawContextKey(r,a).bindTo(d)}function g(d,a){return d.createScoped(a.target)}function t(d,a){return d.getContext(document.activeElement).getValue(a)}function s(d,a){const r=g(d,a);n(r,a,e.HistoryNavigationWidgetContext);const o=new T.RawContextKey(p,!0).bindTo(r),i=new T.RawContextKey(C,!0).bindTo(r);return{scopedContextKeyService:r,historyNavigationForwardsEnablement:o,historyNavigationBackwardsEnablement:i}}e.createAndBindHistoryNavigationWidgetScopedContextKeyService=s;let c=class extends w.FindInput{constructor(a,r,o,i,l=!1){super(a,r,l,o);this._register(s(i,{target:this.inputBox.element,historyNavigator:this.inputBox}).scopedContextKeyService)}};c=Fe([Ce(3,T.IContextKeyService)],c),e.ContextScopedFindInput=c;let u=class extends N.ReplaceInput{constructor(a,r,o,i,l=!1){super(a,r,l,o);this._register(s(i,{target:this.inputBox.element,historyNavigator:this.inputBox}).scopedContextKeyService)}};u=Fe([Ce(3,T.IContextKeyService)],u),e.ContextScopedReplaceInput=u,D.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"history.showPrevious",weight:200,when:T.ContextKeyExpr.and(T.ContextKeyExpr.has(e.HistoryNavigationWidgetContext),T.ContextKeyExpr.equals(C,!0),S.Context.Visible.isEqualTo(!1)),primary:16,secondary:[512|16],handler:d=>{const a=t(d.get(T.IContextKeyService),e.HistoryNavigationWidgetContext);a&&a.historyNavigator.showPreviousValue()}}),D.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"history.showNext",weight:200,when:T.ContextKeyExpr.and(T.ContextKeyExpr.has(e.HistoryNavigationWidgetContext),T.ContextKeyExpr.equals(p,!0),S.Context.Visible.isEqualTo(!1)),primary:18,secondary:[512|18],handler:d=>{const a=t(d.get(T.IContextKeyService),e.HistoryNavigationWidgetContext);a&&a.historyNavigator.showNextValue()}})}),define(J[649],ee([0,1,7,2,40,36,90,10,599,71]),function(j,e,w,N,T,D,S,p,C,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ContextMenuService=void 0;let g=class extends N.Disposable{constructor(s,c,u,d,a){super();this.contextMenuHandler=new C.ContextMenuHandler(u,s,c,d,a)}configure(s){this.contextMenuHandler.configure(s)}showContextMenu(s){this.contextMenuHandler.showContextMenu(s),w.ModifierKeyEmitter.getInstance().resetKeyStatus()}};g=Fe([Ce(0,S.ITelemetryService),Ce(1,D.INotificationService),Ce(2,n.IContextViewService),Ce(3,T.IKeybindingService),Ce(4,p.IThemeService)],g),e.ContextMenuService=g}),define(J[154],ee([0,1,7,331,111,334,448,447,248,4,2,549,61,41,101,15,261,9,40,33,128,10]),function(j,e,w,N,T,D,S,p,C,n,g,t,s,c,u,d,a,r,o,i,l,h){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.WorkbenchCompressibleAsyncDataTree=e.WorkbenchAsyncDataTree=e.WorkbenchDataTree=e.WorkbenchCompressibleObjectTree=e.WorkbenchObjectTree=e.WorkbenchTable=e.WorkbenchPagedList=e.WorkbenchList=e.WorkbenchListAutomaticKeyboardNavigationKey=e.WorkbenchListSelectionNavigation=e.WorkbenchListMultiSelection=e.WorkbenchListDoubleSelection=e.WorkbenchListHasSelectionOrFocus=e.WorkbenchListFocusContextKey=e.WorkbenchListSupportsMultiSelectContextKey=e.ListService=e.IListService=void 0,e.IListService=(0,r.createDecorator)("listService");let f=class{constructor(re){this._themeService=re,this.disposables=new g.DisposableStore,this.lists=[],this._lastFocusedWidget=void 0,this._hasCreatedStyleController=!1}get lastFocusedList(){return this._lastFocusedWidget}register(re,ie){if(!this._hasCreatedStyleController){this._hasCreatedStyleController=!0;const q=new T.DefaultStyleController((0,w.createStyleSheet)(),"");this.disposables.add((0,l.attachListStyler)(q,this._themeService))}if(this.lists.some(q=>q.widget===re))throw new Error("Cannot register the same widget multiple times");const ae={widget:re,extraContextKeys:ie};return this.lists.push(ae),re.getHTMLElement()===document.activeElement&&(this._lastFocusedWidget=re),(0,g.combinedDisposable)(re.onDidFocus(()=>this._lastFocusedWidget=re),(0,g.toDisposable)(()=>this.lists.splice(this.lists.indexOf(ae),1)),re.onDidDispose(()=>{this.lists=this.lists.filter(q=>q!==ae),this._lastFocusedWidget===re&&(this._lastFocusedWidget=void 0)}))}dispose(){this.disposables.dispose()}};f=Fe([Ce(0,h.IThemeService)],f),e.ListService=f;const y=new d.RawContextKey("listFocus",!0);e.WorkbenchListSupportsMultiSelectContextKey=new d.RawContextKey("listSupportsMultiselect",!0),e.WorkbenchListFocusContextKey=d.ContextKeyExpr.and(y,d.ContextKeyExpr.not(a.InputFocusedContextKey)),e.WorkbenchListHasSelectionOrFocus=new d.RawContextKey("listHasSelectionOrFocus",!1),e.WorkbenchListDoubleSelection=new d.RawContextKey("listDoubleSelection",!1),e.WorkbenchListMultiSelection=new d.RawContextKey("listMultiSelection",!1),e.WorkbenchListSelectionNavigation=new d.RawContextKey("listSelectionNavigation",!1),e.WorkbenchListAutomaticKeyboardNavigationKey="listAutomaticKeyboardNavigation";function _(fe,re){const ie=fe.createScoped(re.getHTMLElement());return y.bindTo(ie),ie}const b="workbench.list.multiSelectModifier",v="workbench.list.openMode",m="workbench.list.horizontalScrolling",E="workbench.list.keyboardNavigation",I="workbench.list.automaticKeyboardNavigation",k="workbench.tree.indent",M="workbench.tree.renderIndentGuides",P="workbench.list.smoothScrolling",F="workbench.list.mouseWheelScrollSensitivity",R="workbench.list.fastScrollSensitivity",A="workbench.tree.expandMode";function O(fe){return fe.getValue(b)==="alt"}class L extends g.Disposable{constructor(re){super();this.configurationService=re,this.useAltAsMultipleSelectionModifier=O(re),this.registerListeners()}registerListeners(){this._register(this.configurationService.onDidChangeConfiguration(re=>{re.affectsConfiguration(b)&&(this.useAltAsMultipleSelectionModifier=O(this.configurationService))}))}isSelectionSingleChangeEvent(re){return this.useAltAsMultipleSelectionModifier?re.browserEvent.altKey:(0,T.isSelectionSingleChangeEvent)(re)}isSelectionRangeChangeEvent(re){return(0,T.isSelectionRangeChangeEvent)(re)}}function B(fe,re,ie){var ae;const q=new g.DisposableStore;return[Object.assign(Object.assign({},fe),{keyboardNavigationDelegate:{mightProducePrintableCharacter(ce){return ie.mightProducePrintableCharacter(ce)}},smoothScrolling:Boolean(re.getValue(P)),mouseWheelScrollSensitivity:re.getValue(F),fastScrollSensitivity:re.getValue(R),multipleSelectionController:(ae=fe.multipleSelectionController)!==null&&ae!==void 0?ae:q.add(new L(re))}),q]}let W=class extends T.List{constructor(re,ie,ae,q,ne,ce,le,de,z,te){const he=typeof ne.horizontalScrolling!="undefined"?ne.horizontalScrolling:Boolean(z.getValue(m)),[ge,ve]=B(ne,z,te);super(re,ie,ae,q,Object.assign(Object.assign(Object.assign({keyboardSupport:!1},(0,l.computeStyles)(de.getColorTheme(),l.defaultListStyles)),ge),{horizontalScrolling:he}));this.disposables.add(ve),this.contextKeyService=_(ce,this),this.themeService=de,this.listSupportsMultiSelect=e.WorkbenchListSupportsMultiSelectContextKey.bindTo(this.contextKeyService),this.listSupportsMultiSelect.set(ne.multipleSelectionSupport!==!1),e.WorkbenchListSelectionNavigation.bindTo(this.contextKeyService).set(Boolean(ne.selectionNavigation)),this.listHasSelectionOrFocus=e.WorkbenchListHasSelectionOrFocus.bindTo(this.contextKeyService),this.listDoubleSelection=e.WorkbenchListDoubleSelection.bindTo(this.contextKeyService),this.listMultiSelection=e.WorkbenchListMultiSelection.bindTo(this.contextKeyService),this.horizontalScrolling=ne.horizontalScrolling,this._useAltAsMultipleSelectionModifier=O(z),this.disposables.add(this.contextKeyService),this.disposables.add(le.register(this)),ne.overrideStyles&&this.updateStyles(ne.overrideStyles),this.disposables.add(this.onDidChangeSelection(()=>{const Ee=this.getSelection(),Ae=this.getFocus();this.contextKeyService.bufferChangeEvents(()=>{this.listHasSelectionOrFocus.set(Ee.length>0||Ae.length>0),this.listMultiSelection.set(Ee.length>1),this.listDoubleSelection.set(Ee.length===2)})})),this.disposables.add(this.onDidChangeFocus(()=>{const Ee=this.getSelection(),Ae=this.getFocus();this.listHasSelectionOrFocus.set(Ee.length>0||Ae.length>0)})),this.disposables.add(z.onDidChangeConfiguration(Ee=>{Ee.affectsConfiguration(b)&&(this._useAltAsMultipleSelectionModifier=O(z));let Ae={};if(Ee.affectsConfiguration(m)&&this.horizontalScrolling===void 0){const Ne=Boolean(z.getValue(m));Ae=Object.assign(Object.assign({},Ae),{horizontalScrolling:Ne})}if(Ee.affectsConfiguration(P)){const Ne=Boolean(z.getValue(P));Ae=Object.assign(Object.assign({},Ae),{smoothScrolling:Ne})}if(Ee.affectsConfiguration(F)){const Ne=z.getValue(F);Ae=Object.assign(Object.assign({},Ae),{mouseWheelScrollSensitivity:Ne})}if(Ee.affectsConfiguration(R)){const Ne=z.getValue(R);Ae=Object.assign(Object.assign({},Ae),{fastScrollSensitivity:Ne})}Object.keys(Ae).length>0&&this.updateOptions(Ae)})),this.navigator=new X(this,Object.assign({configurationService:z},ne)),this.disposables.add(this.navigator)}updateOptions(re){super.updateOptions(re),re.overrideStyles&&this.updateStyles(re.overrideStyles),re.multipleSelectionSupport!==void 0&&this.listSupportsMultiSelect.set(!!re.multipleSelectionSupport)}updateStyles(re){var ie;(ie=this._styler)===null||ie===void 0||ie.dispose(),this._styler=(0,l.attachListStyler)(this,this.themeService,re)}dispose(){var re;(re=this._styler)===null||re===void 0||re.dispose(),super.dispose()}};W=Fe([Ce(5,d.IContextKeyService),Ce(6,e.IListService),Ce(7,h.IThemeService),Ce(8,c.IConfigurationService),Ce(9,o.IKeybindingService)],W),e.WorkbenchList=W;let K=class extends N.PagedList{constructor(re,ie,ae,q,ne,ce,le,de,z,te){const he=typeof ne.horizontalScrolling!="undefined"?ne.horizontalScrolling:Boolean(z.getValue(m)),[ge,ve]=B(ne,z,te);super(re,ie,ae,q,Object.assign(Object.assign(Object.assign({keyboardSupport:!1},(0,l.computeStyles)(de.getColorTheme(),l.defaultListStyles)),ge),{horizontalScrolling:he}));this.disposables=new g.DisposableStore,this.disposables.add(ve),this.contextKeyService=_(ce,this),this.themeService=de,this.horizontalScrolling=ne.horizontalScrolling,this.listSupportsMultiSelect=e.WorkbenchListSupportsMultiSelectContextKey.bindTo(this.contextKeyService),this.listSupportsMultiSelect.set(ne.multipleSelectionSupport!==!1),e.WorkbenchListSelectionNavigation.bindTo(this.contextKeyService).set(Boolean(ne.selectionNavigation)),this._useAltAsMultipleSelectionModifier=O(z),this.disposables.add(this.contextKeyService),this.disposables.add(le.register(this)),ne.overrideStyles&&this.updateStyles(ne.overrideStyles),ne.overrideStyles&&this.disposables.add((0,l.attachListStyler)(this,de,ne.overrideStyles)),this.disposables.add(z.onDidChangeConfiguration(Ee=>{Ee.affectsConfiguration(b)&&(this._useAltAsMultipleSelectionModifier=O(z));let Ae={};if(Ee.affectsConfiguration(m)&&this.horizontalScrolling===void 0){const Ne=Boolean(z.getValue(m));Ae=Object.assign(Object.assign({},Ae),{horizontalScrolling:Ne})}if(Ee.affectsConfiguration(P)){const Ne=Boolean(z.getValue(P));Ae=Object.assign(Object.assign({},Ae),{smoothScrolling:Ne})}if(Ee.affectsConfiguration(F)){const Ne=z.getValue(F);Ae=Object.assign(Object.assign({},Ae),{mouseWheelScrollSensitivity:Ne})}if(Ee.affectsConfiguration(R)){const Ne=z.getValue(R);Ae=Object.assign(Object.assign({},Ae),{fastScrollSensitivity:Ne})}Object.keys(Ae).length>0&&this.updateOptions(Ae)})),this.navigator=new X(this,Object.assign({configurationService:z},ne)),this.disposables.add(this.navigator)}updateOptions(re){super.updateOptions(re),re.overrideStyles&&this.updateStyles(re.overrideStyles),re.multipleSelectionSupport!==void 0&&this.listSupportsMultiSelect.set(!!re.multipleSelectionSupport)}updateStyles(re){var ie;(ie=this._styler)===null||ie===void 0||ie.dispose(),this._styler=(0,l.attachListStyler)(this,this.themeService,re)}dispose(){var re;(re=this._styler)===null||re===void 0||re.dispose(),this.disposables.dispose(),super.dispose()}};K=Fe([Ce(5,d.IContextKeyService),Ce(6,e.IListService),Ce(7,h.IThemeService),Ce(8,c.IConfigurationService),Ce(9,o.IKeybindingService)],K),e.WorkbenchPagedList=K;let H=class extends D.Table{constructor(re,ie,ae,q,ne,ce,le,de,z,te,he){const ge=typeof ce.horizontalScrolling!="undefined"?ce.horizontalScrolling:Boolean(te.getValue(m)),[ve,Se]=B(ce,te,he);super(re,ie,ae,q,ne,Object.assign(Object.assign(Object.assign({keyboardSupport:!1},(0,l.computeStyles)(z.getColorTheme(),l.defaultListStyles)),ve),{horizontalScrolling:ge}));this.disposables=new g.DisposableStore,this.disposables.add(Se),this.contextKeyService=_(le,this),this.themeService=z,this.listSupportsMultiSelect=e.WorkbenchListSupportsMultiSelectContextKey.bindTo(this.contextKeyService),this.listSupportsMultiSelect.set(ce.multipleSelectionSupport!==!1),e.WorkbenchListSelectionNavigation.bindTo(this.contextKeyService).set(Boolean(ce.selectionNavigation)),this.listHasSelectionOrFocus=e.WorkbenchListHasSelectionOrFocus.bindTo(this.contextKeyService),this.listDoubleSelection=e.WorkbenchListDoubleSelection.bindTo(this.contextKeyService),this.listMultiSelection=e.WorkbenchListMultiSelection.bindTo(this.contextKeyService),this.horizontalScrolling=ce.horizontalScrolling,this._useAltAsMultipleSelectionModifier=O(te),this.disposables.add(this.contextKeyService),this.disposables.add(de.register(this)),ce.overrideStyles&&this.updateStyles(ce.overrideStyles),this.disposables.add(this.onDidChangeSelection(()=>{const Ae=this.getSelection(),Ne=this.getFocus();this.contextKeyService.bufferChangeEvents(()=>{this.listHasSelectionOrFocus.set(Ae.length>0||Ne.length>0),this.listMultiSelection.set(Ae.length>1),this.listDoubleSelection.set(Ae.length===2)})})),this.disposables.add(this.onDidChangeFocus(()=>{const Ae=this.getSelection(),Ne=this.getFocus();this.listHasSelectionOrFocus.set(Ae.length>0||Ne.length>0)})),this.disposables.add(te.onDidChangeConfiguration(Ae=>{Ae.affectsConfiguration(b)&&(this._useAltAsMultipleSelectionModifier=O(te));let Ne={};if(Ae.affectsConfiguration(m)&&this.horizontalScrolling===void 0){const ze=Boolean(te.getValue(m));Ne=Object.assign(Object.assign({},Ne),{horizontalScrolling:ze})}if(Ae.affectsConfiguration(P)){const ze=Boolean(te.getValue(P));Ne=Object.assign(Object.assign({},Ne),{smoothScrolling:ze})}if(Ae.affectsConfiguration(F)){const ze=te.getValue(F);Ne=Object.assign(Object.assign({},Ne),{mouseWheelScrollSensitivity:ze})}if(Ae.affectsConfiguration(R)){const ze=te.getValue(R);Ne=Object.assign(Object.assign({},Ne),{fastScrollSensitivity:ze})}Object.keys(Ne).length>0&&this.updateOptions(Ne)})),this.navigator=new Z(this,Object.assign({configurationService:te},ce)),this.disposables.add(this.navigator)}updateOptions(re){super.updateOptions(re),re.overrideStyles&&this.updateStyles(re.overrideStyles),re.multipleSelectionSupport!==void 0&&this.listSupportsMultiSelect.set(!!re.multipleSelectionSupport)}updateStyles(re){var ie;(ie=this._styler)===null||ie===void 0||ie.dispose(),this._styler=(0,l.attachListStyler)(this,this.themeService,re)}dispose(){var re;(re=this._styler)===null||re===void 0||re.dispose(),this.disposables.dispose(),super.dispose()}};H=Fe([Ce(6,d.IContextKeyService),Ce(7,e.IListService),Ce(8,h.IThemeService),Ce(9,c.IConfigurationService),Ce(10,o.IKeybindingService)],H),e.WorkbenchTable=H;class Y extends g.Disposable{constructor(re,ie){var ae;super();this.widget=re,this._onDidOpen=this._register(new n.Emitter),this.onDidOpen=this._onDidOpen.event,this._register(n.Event.filter(this.widget.onDidChangeSelection,q=>q.browserEvent instanceof KeyboardEvent)(q=>this.onSelectionFromKeyboard(q))),this._register(this.widget.onPointer(q=>this.onPointer(q.element,q.browserEvent))),this._register(this.widget.onMouseDblClick(q=>this.onMouseDblClick(q.element,q.browserEvent))),typeof(ie==null?void 0:ie.openOnSingleClick)!="boolean"&&(ie==null?void 0:ie.configurationService)?(this.openOnSingleClick=(ie==null?void 0:ie.configurationService.getValue(v))!=="doubleClick",this._register(ie==null?void 0:ie.configurationService.onDidChangeConfiguration(()=>{this.openOnSingleClick=(ie==null?void 0:ie.configurationService.getValue(v))!=="doubleClick"}))):this.openOnSingleClick=(ae=ie==null?void 0:ie.openOnSingleClick)!==null&&ae!==void 0?ae:!0}onSelectionFromKeyboard(re){if(re.elements.length!==1)return;const ie=re.browserEvent,ae=typeof ie.preserveFocus=="boolean"?ie.preserveFocus:!0,q=typeof ie.pinned=="boolean"?ie.pinned:!ae,ne=!1;this._open(this.getSelectedElement(),ae,q,ne,re.browserEvent)}onPointer(re,ie){if(!this.openOnSingleClick||ie.detail===2)return;const q=ie.button===1,ne=!0,ce=q,le=ie.ctrlKey||ie.metaKey||ie.altKey;this._open(re,ne,ce,le,ie)}onMouseDblClick(re,ie){if(!ie)return;const ae=ie.target;if(ae.classList.contains("monaco-tl-twistie")||ae.classList.contains("monaco-icon-label")&&ae.classList.contains("folder-icon")&&ie.offsetX<16)return;const ne=!1,ce=!0,le=ie.ctrlKey||ie.metaKey||ie.altKey;this._open(re,ne,ce,le,ie)}_open(re,ie,ae,q,ne){!re||this._onDidOpen.fire({editorOptions:{preserveFocus:ie,pinned:ae,revealIfVisible:!0},sideBySide:q,element:re,browserEvent:ne})}}class X extends Y{constructor(re,ie){super(re,ie);this.widget=re}getSelectedElement(){return this.widget.getSelectedElements()[0]}}class Z extends Y{constructor(re,ie){super(re,ie)}getSelectedElement(){return this.widget.getSelectedElements()[0]}}class se extends Y{constructor(re,ie){super(re,ie)}getSelectedElement(){var re;return(re=this.widget.getSelection()[0])!==null&&re!==void 0?re:void 0}}function oe(fe,re){let ie=!1;return ae=>{if(ie)return ie=!1,!1;const q=re.softDispatch(ae,fe);return q&&q.enterChord?(ie=!0,!1):(ie=!1,!0)}}let G=class extends C.ObjectTree{constructor(re,ie,ae,q,ne,ce,le,de,z,te,he){const{options:ge,getAutomaticKeyboardNavigation:ve,disposable:Se}=Q(ie,ne,ce,z,te,he);super(re,ie,ae,q,ge);this.disposables.add(Se),this.internals=new ue(this,ne,ve,ne.overrideStyles,ce,le,de,z,he),this.disposables.add(this.internals)}updateOptions(re){super.updateOptions(re),this.internals.updateOptions(re)}};G=Fe([Ce(5,d.IContextKeyService),Ce(6,e.IListService),Ce(7,h.IThemeService),Ce(8,c.IConfigurationService),Ce(9,o.IKeybindingService),Ce(10,s.IAccessibilityService)],G),e.WorkbenchObjectTree=G;let x=class extends C.CompressibleObjectTree{constructor(re,ie,ae,q,ne,ce,le,de,z,te,he){const{options:ge,getAutomaticKeyboardNavigation:ve,disposable:Se}=Q(ie,ne,ce,z,te,he);super(re,ie,ae,q,ge);this.disposables.add(Se),this.internals=new ue(this,ne,ve,ne.overrideStyles,ce,le,de,z,he),this.disposables.add(this.internals)}updateOptions(re={}){super.updateOptions(re),re.overrideStyles&&this.internals.updateStyleOverrides(re.overrideStyles),this.internals.updateOptions(re)}};x=Fe([Ce(5,d.IContextKeyService),Ce(6,e.IListService),Ce(7,h.IThemeService),Ce(8,c.IConfigurationService),Ce(9,o.IKeybindingService),Ce(10,s.IAccessibilityService)],x),e.WorkbenchCompressibleObjectTree=x;let U=class extends p.DataTree{constructor(re,ie,ae,q,ne,ce,le,de,z,te,he,ge){const{options:ve,getAutomaticKeyboardNavigation:Se,disposable:Ee}=Q(ie,ce,le,te,he,ge);super(re,ie,ae,q,ne,ve);this.disposables.add(Ee),this.internals=new ue(this,ce,Se,ce.overrideStyles,le,de,z,te,ge),this.disposables.add(this.internals)}updateOptions(re={}){super.updateOptions(re),re.overrideStyles&&this.internals.updateStyleOverrides(re.overrideStyles),this.internals.updateOptions(re)}};U=Fe([Ce(6,d.IContextKeyService),Ce(7,e.IListService),Ce(8,h.IThemeService),Ce(9,c.IConfigurationService),Ce(10,o.IKeybindingService),Ce(11,s.IAccessibilityService)],U),e.WorkbenchDataTree=U;let $=class extends S.AsyncDataTree{constructor(re,ie,ae,q,ne,ce,le,de,z,te,he,ge){const{options:ve,getAutomaticKeyboardNavigation:Se,disposable:Ee}=Q(ie,ce,le,te,he,ge);super(re,ie,ae,q,ne,ve);this.disposables.add(Ee),this.internals=new ue(this,ce,Se,ce.overrideStyles,le,de,z,te,ge),this.disposables.add(this.internals)}get onDidOpen(){return this.internals.onDidOpen}updateOptions(re={}){super.updateOptions(re),re.overrideStyles&&this.internals.updateStyleOverrides(re.overrideStyles),this.internals.updateOptions(re)}};$=Fe([Ce(6,d.IContextKeyService),Ce(7,e.IListService),Ce(8,h.IThemeService),Ce(9,c.IConfigurationService),Ce(10,o.IKeybindingService),Ce(11,s.IAccessibilityService)],$),e.WorkbenchAsyncDataTree=$;let V=class extends S.CompressibleAsyncDataTree{constructor(re,ie,ae,q,ne,ce,le,de,z,te,he,ge,ve){const{options:Se,getAutomaticKeyboardNavigation:Ee,disposable:Ae}=Q(ie,le,de,he,ge,ve);super(re,ie,ae,q,ne,ce,Se);this.disposables.add(Ae),this.internals=new ue(this,le,Ee,le.overrideStyles,de,z,te,he,ve),this.disposables.add(this.internals)}updateOptions(re){super.updateOptions(re),this.internals.updateOptions(re)}};V=Fe([Ce(7,d.IContextKeyService),Ce(8,e.IListService),Ce(9,h.IThemeService),Ce(10,c.IConfigurationService),Ce(11,o.IKeybindingService),Ce(12,s.IAccessibilityService)],V),e.WorkbenchCompressibleAsyncDataTree=V;function Q(fe,re,ie,ae,q,ne){var ce;const le=()=>{let Se=Boolean(ie.getContextKeyValue(e.WorkbenchListAutomaticKeyboardNavigationKey));return Se&&(Se=Boolean(ae.getValue(I))),Se},de=ne.isScreenReaderOptimized(),z=re.simpleKeyboardNavigation||de?"simple":ae.getValue(E),te=re.horizontalScrolling!==void 0?re.horizontalScrolling:Boolean(ae.getValue(m)),[he,ge]=B(re,ae,q),ve=re.additionalScrollHeight;return{getAutomaticKeyboardNavigation:le,disposable:ge,options:Object.assign(Object.assign({keyboardSupport:!1},he),{indent:typeof ae.getValue(k)=="number"?ae.getValue(k):void 0,renderIndentGuides:ae.getValue(M),smoothScrolling:Boolean(ae.getValue(P)),automaticKeyboardNavigation:le(),simpleKeyboardNavigation:z==="simple",filterOnType:z==="filter",horizontalScrolling:te,keyboardNavigationEventFilter:oe(fe,q),additionalScrollHeight:ve,hideTwistiesOfChildlessElements:re.hideTwistiesOfChildlessElements,expandOnlyOnTwistieClick:(ce=re.expandOnlyOnTwistieClick)!==null&&ce!==void 0?ce:ae.getValue(A)==="doubleClick"})}}let ue=class{constructor(re,ie,ae,q,ne,ce,le,de,z){this.tree=re,this.themeService=le,this.disposables=[],this.contextKeyService=_(ne,re),this.listSupportsMultiSelect=e.WorkbenchListSupportsMultiSelectContextKey.bindTo(this.contextKeyService),this.listSupportsMultiSelect.set(ie.multipleSelectionSupport!==!1),e.WorkbenchListSelectionNavigation.bindTo(this.contextKeyService).set(Boolean(ie.selectionNavigation)),this.hasSelectionOrFocus=e.WorkbenchListHasSelectionOrFocus.bindTo(this.contextKeyService),this.hasDoubleSelection=e.WorkbenchListDoubleSelection.bindTo(this.contextKeyService),this.hasMultiSelection=e.WorkbenchListMultiSelection.bindTo(this.contextKeyService),this._useAltAsMultipleSelectionModifier=O(de);const he=new Set;he.add(e.WorkbenchListAutomaticKeyboardNavigationKey);const ge=()=>{const Se=z.isScreenReaderOptimized()?"simple":de.getValue(E);re.updateOptions({simpleKeyboardNavigation:Se==="simple",filterOnType:Se==="filter"})};this.updateStyleOverrides(q),this.disposables.push(this.contextKeyService,ce.register(re),re.onDidChangeSelection(()=>{const ve=re.getSelection(),Se=re.getFocus();this.contextKeyService.bufferChangeEvents(()=>{this.hasSelectionOrFocus.set(ve.length>0||Se.length>0),this.hasMultiSelection.set(ve.length>1),this.hasDoubleSelection.set(ve.length===2)})}),re.onDidChangeFocus(()=>{const ve=re.getSelection(),Se=re.getFocus();this.hasSelectionOrFocus.set(ve.length>0||Se.length>0)}),de.onDidChangeConfiguration(ve=>{let Se={};if(ve.affectsConfiguration(b)&&(this._useAltAsMultipleSelectionModifier=O(de)),ve.affectsConfiguration(k)){const Ee=de.getValue(k);Se=Object.assign(Object.assign({},Se),{indent:Ee})}if(ve.affectsConfiguration(M)){const Ee=de.getValue(M);Se=Object.assign(Object.assign({},Se),{renderIndentGuides:Ee})}if(ve.affectsConfiguration(P)){const Ee=Boolean(de.getValue(P));Se=Object.assign(Object.assign({},Se),{smoothScrolling:Ee})}if(ve.affectsConfiguration(E)&&ge(),ve.affectsConfiguration(I)&&(Se=Object.assign(Object.assign({},Se),{automaticKeyboardNavigation:ae()})),ve.affectsConfiguration(m)&&ie.horizontalScrolling===void 0){const Ee=Boolean(de.getValue(m));Se=Object.assign(Object.assign({},Se),{horizontalScrolling:Ee})}if(ve.affectsConfiguration(A)&&ie.expandOnlyOnTwistieClick===void 0&&(Se=Object.assign(Object.assign({},Se),{expandOnlyOnTwistieClick:de.getValue(A)==="doubleClick"})),ve.affectsConfiguration(F)){const Ee=de.getValue(F);Se=Object.assign(Object.assign({},Se),{mouseWheelScrollSensitivity:Ee})}if(ve.affectsConfiguration(R)){const Ee=de.getValue(R);Se=Object.assign(Object.assign({},Se),{fastScrollSensitivity:Ee})}Object.keys(Se).length>0&&re.updateOptions(Se)}),this.contextKeyService.onDidChangeContext(ve=>{ve.affectsSome(he)&&re.updateOptions({automaticKeyboardNavigation:ae()})}),z.onDidChangeScreenReaderOptimized(()=>ge())),this.navigator=new se(re,Object.assign({configurationService:de},ie)),this.disposables.push(this.navigator)}get onDidOpen(){return this.navigator.onDidOpen}updateOptions(re){re.multipleSelectionSupport!==void 0&&this.listSupportsMultiSelect.set(!!re.multipleSelectionSupport)}updateStyleOverrides(re){(0,g.dispose)(this.styler),this.styler=re?(0,l.attachListStyler)(this.tree,this.themeService,re):g.Disposable.None}dispose(){this.disposables=(0,g.dispose)(this.disposables),(0,g.dispose)(this.styler),this.styler=void 0}};ue=Fe([Ce(4,d.IContextKeyService),Ce(5,e.IListService),Ce(6,h.IThemeService),Ce(7,c.IConfigurationService),Ce(8,s.IAccessibilityService)],ue),i.Registry.as(u.Extensions.Configuration).registerConfiguration({id:"workbench",order:7,title:(0,t.localize)(0,null),type:"object",properties:{[b]:{type:"string",enum:["ctrlCmd","alt"],enumDescriptions:[(0,t.localize)(1,null),(0,t.localize)(2,null)],default:"ctrlCmd",description:(0,t.localize)(3,null)},[v]:{type:"string",enum:["singleClick","doubleClick"],default:"singleClick",description:(0,t.localize)(4,null)},[m]:{type:"boolean",default:!1,description:(0,t.localize)(5,null)},[k]:{type:"number",default:8,minimum:0,maximum:40,description:(0,t.localize)(6,null)},[M]:{type:"string",enum:["none","onHover","always"],default:"onHover",description:(0,t.localize)(7,null)},[P]:{type:"boolean",default:!1,description:(0,t.localize)(8,null)},[F]:{type:"number",default:1,description:(0,t.localize)(9,null)},[R]:{type:"number",default:5,description:(0,t.localize)(10,null)},[E]:{type:"string",enum:["simple","highlight","filter"],enumDescriptions:[(0,t.localize)(11,null),(0,t.localize)(12,null),(0,t.localize)(13,null)],default:"highlight",description:(0,t.localize)(14,null)},[I]:{type:"boolean",default:!0,markdownDescription:(0,t.localize)(15,null)},[A]:{type:"string",enum:["singleClick","doubleClick"],default:"singleClick",description:(0,t.localize)(16,null)}}})}),define(J[650],ee([0,1,23,463,61,15,9,151,154,594,21,128,10]),function(j,e,w,N,T,D,S,p,C,n,g,t,s){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.QuickInputService=void 0;let c=class extends s.Themable{constructor(d,a,r,o,i){super(r);this.instantiationService=d,this.contextKeyService=a,this.accessibilityService=o,this.layoutService=i,this.contexts=new Map}get controller(){return this._controller||(this._controller=this._register(this.createController())),this._controller}get quickAccess(){return this._quickAccess||(this._quickAccess=this._register(this.instantiationService.createInstance(n.QuickAccessController))),this._quickAccess}createController(d=this.layoutService,a){var r,o;const i={idPrefix:"quickInput_",container:d.container,ignoreFocusOut:()=>!1,isScreenReaderOptimized:()=>this.accessibilityService.isScreenReaderOptimized(),backKeybindingLabel:()=>{},setContextKey:h=>this.setContextKey(h),returnFocus:()=>d.focus(),createList:(h,f,y,_,b)=>this.instantiationService.createInstance(C.WorkbenchList,h,f,y,_,b),styles:this.computeStyles()},l=this._register(new N.QuickInputController(Object.assign(Object.assign({},i),a)));return l.layout(d.dimension,(o=(r=d.offset)===null||r===void 0?void 0:r.top)!==null&&o!==void 0?o:0),this._register(d.onDidLayout(h=>{var f,y;return l.layout(h,(y=(f=d.offset)===null||f===void 0?void 0:f.top)!==null&&y!==void 0?y:0)})),this._register(l.onShow(()=>this.resetContextKeys())),this._register(l.onHide(()=>this.resetContextKeys())),l}setContextKey(d){let a;d&&(a=this.contexts.get(d),a||(a=new D.RawContextKey(d,!1).bindTo(this.contextKeyService),this.contexts.set(d,a))),!(a&&a.get())&&(this.resetContextKeys(),a&&a.set(!0))}resetContextKeys(){this.contexts.forEach(d=>{d.get()&&d.reset()})}pick(d,a={},r=w.CancellationToken.None){return this.controller.pick(d,a,r)}createQuickPick(){return this.controller.createQuickPick()}updateStyles(){this.controller.applyStyles(this.computeStyles())}computeStyles(){return{widget:Object.assign({},(0,t.computeStyles)(this.theme,{quickInputBackground:g.quickInputBackground,quickInputForeground:g.quickInputForeground,quickInputTitleBackground:g.quickInputTitleBackground,contrastBorder:g.contrastBorder,widgetShadow:g.widgetShadow})),inputBox:(0,t.computeStyles)(this.theme,{inputForeground:g.inputForeground,inputBackground:g.inputBackground,inputBorder:g.inputBorder,inputValidationInfoBackground:g.inputValidationInfoBackground,inputValidationInfoForeground:g.inputValidationInfoForeground,inputValidationInfoBorder:g.inputValidationInfoBorder,inputValidationWarningBackground:g.inputValidationWarningBackground,inputValidationWarningForeground:g.inputValidationWarningForeground,inputValidationWarningBorder:g.inputValidationWarningBorder,inputValidationErrorBackground:g.inputValidationErrorBackground,inputValidationErrorForeground:g.inputValidationErrorForeground,inputValidationErrorBorder:g.inputValidationErrorBorder}),countBadge:(0,t.computeStyles)(this.theme,{badgeBackground:g.badgeBackground,badgeForeground:g.badgeForeground,badgeBorder:g.contrastBorder}),button:(0,t.computeStyles)(this.theme,{buttonForeground:g.buttonForeground,buttonBackground:g.buttonBackground,buttonHoverBackground:g.buttonHoverBackground,buttonBorder:g.contrastBorder}),progressBar:(0,t.computeStyles)(this.theme,{progressBarBackground:g.progressBarBackground}),keybindingLabel:(0,t.computeStyles)(this.theme,{keybindingLabelBackground:g.keybindingLabelBackground,keybindingLabelForeground:g.keybindingLabelForeground,keybindingLabelBorder:g.keybindingLabelBorder,keybindingLabelBottomBorder:g.keybindingLabelBottomBorder,keybindingLabelShadow:g.widgetShadow}),list:(0,t.computeStyles)(this.theme,{listBackground:g.quickInputBackground,listInactiveFocusForeground:g.quickInputListFocusForeground,listInactiveSelectionIconForeground:g.quickInputListFocusIconForeground,listInactiveFocusBackground:g.quickInputListFocusBackground,listFocusOutline:g.activeContrastBorder,listInactiveFocusOutline:g.activeContrastBorder,pickerGroupBorder:g.pickerGroupBorder,pickerGroupForeground:g.pickerGroupForeground})}}};c=Fe([Ce(0,S.IInstantiationService),Ce(1,D.IContextKeyService),Ce(2,s.IThemeService),Ce(3,T.IAccessibilityService),Ce(4,p.ILayoutService)],c),e.QuickInputService=c}),define(J[651],ee([0,1,16,10,23,9,15,61,151,28,650,82,377]),function(j,e,w,N,T,D,S,p,C,n,g,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.QuickInputEditorWidget=e.QuickInputEditorContribution=e.StandaloneQuickInputServiceImpl=e.EditorScopedQuickInputServiceImpl=void 0;let s=class extends g.QuickInputService{constructor(r,o,i,l,h,f){super(o,i,l,h,f);this.host=void 0;const y=u.get(r);this.host={_serviceBrand:void 0,get container(){return y.widget.getDomNode()},get dimension(){return r.getLayoutInfo()},get onDidLayout(){return r.onDidLayoutChange},focus:()=>r.focus()}}createController(){return super.createController(this.host)}};s=Fe([Ce(1,D.IInstantiationService),Ce(2,S.IContextKeyService),Ce(3,N.IThemeService),Ce(4,p.IAccessibilityService),Ce(5,C.ILayoutService)],s),e.EditorScopedQuickInputServiceImpl=s;let c=class{constructor(r,o){this.instantiationService=r,this.codeEditorService=o,this.mapEditorToService=new Map}get activeService(){const r=this.codeEditorService.getFocusedCodeEditor();if(!r)throw new Error("Quick input service needs a focused editor to work.");let o=this.mapEditorToService.get(r);if(!o){const i=o=this.instantiationService.createInstance(s,r);this.mapEditorToService.set(r,o),(0,t.once)(r.onDidDispose)(()=>{i.dispose(),this.mapEditorToService.delete(r)})}return o}get quickAccess(){return this.activeService.quickAccess}pick(r,o={},i=T.CancellationToken.None){return this.activeService.pick(r,o,i)}createQuickPick(){return this.activeService.createQuickPick()}};c=Fe([Ce(0,D.IInstantiationService),Ce(1,n.ICodeEditorService)],c),e.StandaloneQuickInputServiceImpl=c;class u{constructor(r){this.editor=r,this.widget=new d(this.editor)}static get(r){return r.getContribution(u.ID)}dispose(){this.widget.dispose()}}e.QuickInputEditorContribution=u,u.ID="editor.controller.quickInput";class d{constructor(r){this.codeEditor=r,this.domNode=document.createElement("div"),this.codeEditor.addOverlayWidget(this)}getId(){return d.ID}getDomNode(){return this.domNode}getPosition(){return{preference:2}}dispose(){this.codeEditor.removeOverlayWidget(this)}}e.QuickInputEditorWidget=d,d.ID="editor.contrib.quickInputWidget",(0,w.registerEditorContribution)(u.ID,u)}),define(J[652],ee([0,1,27,76,21,10]),function(j,e,w,N,T,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SeverityIcon=void 0;var S;(function(p){function C(n){switch(n){case N.default.Ignore:return"severity-ignore "+w.Codicon.info.classNames;case N.default.Info:return w.Codicon.info.classNames;case N.default.Warning:return w.Codicon.warning.classNames;case N.default.Error:return w.Codicon.error.classNames;default:return""}}p.className=C})(S=e.SeverityIcon||(e.SeverityIcon={})),(0,D.registerThemingParticipant)((p,C)=>{const n=p.getColor(T.problemsErrorIconForeground);if(n){const s=w.Codicon.error.cssSelector;C.addRule(`
            .monaco-editor .zone-widget ${s},
            .markers-panel .marker-icon${s},
            .text-search-provider-messages .providerMessage ${s},
            .extensions-viewlet > .extensions ${s} {
                color: ${n};
            }
        `)}const g=p.getColor(T.problemsWarningIconForeground);if(g){const s=w.Codicon.warning.cssSelector;C.addRule(`
            .monaco-editor .zone-widget ${s},
            .markers-panel .marker-icon${s},
            .extensions-viewlet > .extensions ${s},
            .extension-editor ${s},
            .text-search-provider-messages .providerMessage ${s},
            .preferences-editor ${s} {
                color: ${g};
            }
        `)}const t=p.getColor(T.problemsInfoIconForeground);if(t){const s=w.Codicon.info.cssSelector;C.addRule(`
            .monaco-editor .zone-widget ${s},
            .markers-panel .marker-icon${s},
            .extensions-viewlet > .extensions ${s},
            .text-search-provider-messages .providerMessage ${s},
            .extension-editor ${s} {
                color: ${t};
            }
        `)}})}),define(J[81],ee([0,1,14,27,4,554,192,33,10]),function(j,e,w,N,T,D,S,p,C){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.widgetClose=e.iconsSchemaId=e.getIconRegistry=e.registerIcon=e.Extensions=void 0,e.Extensions={IconContribution:"base.contributions.icons"};class n{constructor(){this._onDidChange=new T.Emitter,this.onDidChange=this._onDidChange.event,this.iconSchema={definitions:{icons:{type:"object",properties:{fontId:{type:"string",description:(0,D.localize)(0,null)},fontCharacter:{type:"string",description:(0,D.localize)(1,null)}},additionalProperties:!1,defaultSnippets:[{body:{fontCharacter:"\\\\e030"}}]}},type:"object",properties:{}},this.iconReferenceSchema={type:"string",pattern:`^${N.CSSIcon.iconNameExpression}$`,enum:[],enumDescriptions:[]},this.iconsById={},this.iconFontsById={}}registerIcon(r,o,i,l){const h=this.iconsById[r];if(h){if(i&&!h.description){h.description=i,this.iconSchema.properties[r].markdownDescription=`${i} $(${r})`;const _=this.iconReferenceSchema.enum.indexOf(r);_!==-1&&(this.iconReferenceSchema.enumDescriptions[_]=i),this._onDidChange.fire()}return h}let f={id:r,description:i,defaults:o,deprecationMessage:l};this.iconsById[r]=f;let y={$ref:"#/definitions/icons"};return l&&(y.deprecationMessage=l),i&&(y.markdownDescription=`${i}: $(${r})`),this.iconSchema.properties[r]=y,this.iconReferenceSchema.enum.push(r),this.iconReferenceSchema.enumDescriptions.push(i||""),this._onDidChange.fire(),{id:r}}getIcons(){return Object.keys(this.iconsById).map(r=>this.iconsById[r])}getIcon(r){return this.iconsById[r]}getIconSchema(){return this.iconSchema}getIconFont(r){return this.iconFontsById[r]}toString(){const r=(h,f)=>h.id.localeCompare(f.id),o=h=>{for(;C.ThemeIcon.isThemeIcon(h.defaults);)h=this.iconsById[h.defaults.id];return`codicon codicon-${h?h.id:""}`};let i=[];i.push("| preview     | identifier                        | default codicon ID                | description"),i.push("| ----------- | --------------------------------- | --------------------------------- | --------------------------------- |");const l=Object.keys(this.iconsById).map(h=>this.iconsById[h]);for(const h of l.filter(f=>!!f.description).sort(r))i.push(`|<i class="${o(h)}"></i>|${h.id}|${C.ThemeIcon.isThemeIcon(h.defaults)?h.defaults.id:h.id}|${h.description||""}|`);i.push("| preview     | identifier                        "),i.push("| ----------- | --------------------------------- |");for(const h of l.filter(f=>!C.ThemeIcon.isThemeIcon(f.defaults)).sort(r))i.push(`|<i class="${o(h)}"></i>|${h.id}|`);return i.join(`
`)}}const g=new n;p.Registry.add(e.Extensions.IconContribution,g);function t(a,r,o,i){return g.registerIcon(a,r,o,i)}e.registerIcon=t;function s(){return g}e.getIconRegistry=s;function c(){for(const a of N.iconRegistry.all)g.registerIcon(a.id,a.definition,a.description);N.iconRegistry.onDidRegister(a=>g.registerIcon(a.id,a.definition,a.description))}c(),e.iconsSchemaId="vscode://schemas/icons";let u=p.Registry.as(S.Extensions.JSONContribution);u.registerSchema(e.iconsSchemaId,g.getIconSchema());const d=new w.RunOnceScheduler(()=>u.notifySchemaChanged(e.iconsSchemaId),200);g.onDidChange(()=>{d.isScheduled()||d.schedule()}),e.widgetClose=t("widget-close",N.Codicon.close,(0,D.localize)(2,null))}),define(J[653],ee([0,1,470,7,30,86,64,51,2,63,16,28,31,87,13,46,118,60,15,21,10,27,81,39,352]),function(j,e,w,N,T,D,S,p,C,n,g,t,s,c,u,d,a,r,o,i,l,h,f,y){"use strict";var _;Object.defineProperty(e,"__esModule",{value:!0}),e.DiffReview=void 0;const b=3;class v{constructor(O,L,B,W){this.originalLineStart=O,this.originalLineEnd=L,this.modifiedLineStart=B,this.modifiedLineEnd=W}getType(){return this.originalLineStart===0?1:this.modifiedLineStart===0?2:0}}class m{constructor(O){this.entries=O}}const E=(0,f.registerIcon)("diff-review-insert",h.Codicon.add,w.localize(0,null)),I=(0,f.registerIcon)("diff-review-remove",h.Codicon.remove,w.localize(1,null)),k=(0,f.registerIcon)("diff-review-close",h.Codicon.close,w.localize(2,null));let M=class Ct extends C.Disposable{constructor(O,L){super();this._modeService=L,this._width=0,this._diffEditor=O,this._isVisible=!1,this.shadow=(0,T.createFastDomNode)(document.createElement("div")),this.shadow.setClassName("diff-review-shadow"),this.actionBarContainer=(0,T.createFastDomNode)(document.createElement("div")),this.actionBarContainer.setClassName("diff-review-actions"),this._actionBar=this._register(new D.ActionBar(this.actionBarContainer.domNode)),this._actionBar.push(new p.Action("diffreview.close",w.localize(3,null),"close-diff-review "+l.ThemeIcon.asClassName(k),!0,()=>Re(this,void 0,void 0,function*(){return this.hide()})),{label:!1,icon:!0}),this.domNode=(0,T.createFastDomNode)(document.createElement("div")),this.domNode.setClassName("diff-review monaco-editor-background"),this._content=(0,T.createFastDomNode)(document.createElement("div")),this._content.setClassName("diff-review-content"),this._content.setAttribute("role","code"),this.scrollbar=this._register(new S.DomScrollableElement(this._content.domNode,{})),this.domNode.domNode.appendChild(this.scrollbar.getDomNode()),this._register(O.onDidUpdateDiff(()=>{!this._isVisible||(this._diffs=this._compute(),this._render())})),this._register(O.getModifiedEditor().onDidChangeCursorPosition(()=>{!this._isVisible||this._render()})),this._register(N.addStandardDisposableListener(this.domNode.domNode,"click",B=>{B.preventDefault();let W=N.findParentWithClass(B.target,"diff-review-row");W&&this._goToRow(W)})),this._register(N.addStandardDisposableListener(this.domNode.domNode,"keydown",B=>{(B.equals(18)||B.equals(2048|18)||B.equals(512|18))&&(B.preventDefault(),this._goToRow(this._getNextRow())),(B.equals(16)||B.equals(2048|16)||B.equals(512|16))&&(B.preventDefault(),this._goToRow(this._getPrevRow())),(B.equals(9)||B.equals(2048|9)||B.equals(512|9)||B.equals(1024|9))&&(B.preventDefault(),this.hide()),(B.equals(10)||B.equals(3))&&(B.preventDefault(),this.accept())})),this._diffs=[],this._currentDiff=null}prev(){let O=0;if(this._isVisible||(this._diffs=this._compute()),this._isVisible){let B=-1;for(let W=0,K=this._diffs.length;W<K;W++)if(this._diffs[W]===this._currentDiff){B=W;break}O=this._diffs.length+B-1}else O=this._findDiffIndex(this._diffEditor.getPosition());if(this._diffs.length===0)return;O=O%this._diffs.length;const L=this._diffs[O].entries;this._diffEditor.setPosition(new u.Position(L[0].modifiedLineStart,1)),this._diffEditor.setSelection({startColumn:1,startLineNumber:L[0].modifiedLineStart,endColumn:1073741824,endLineNumber:L[L.length-1].modifiedLineEnd}),this._isVisible=!0,this._diffEditor.doLayout(),this._render(),this._goToRow(this._getNextRow())}next(){let O=0;if(this._isVisible||(this._diffs=this._compute()),this._isVisible){let B=-1;for(let W=0,K=this._diffs.length;W<K;W++)if(this._diffs[W]===this._currentDiff){B=W;break}O=B+1}else O=this._findDiffIndex(this._diffEditor.getPosition());if(this._diffs.length===0)return;O=O%this._diffs.length;const L=this._diffs[O].entries;this._diffEditor.setPosition(new u.Position(L[0].modifiedLineStart,1)),this._diffEditor.setSelection({startColumn:1,startLineNumber:L[0].modifiedLineStart,endColumn:1073741824,endLineNumber:L[L.length-1].modifiedLineEnd}),this._isVisible=!0,this._diffEditor.doLayout(),this._render(),this._goToRow(this._getNextRow())}accept(){let O=-1,L=this._getCurrentFocusedRow();if(L){let B=parseInt(L.getAttribute("data-line"),10);isNaN(B)||(O=B)}this.hide(),O!==-1&&(this._diffEditor.setPosition(new u.Position(O,1)),this._diffEditor.revealPosition(new u.Position(O,1),1))}hide(){this._isVisible=!1,this._diffEditor.updateOptions({readOnly:!1}),this._diffEditor.focus(),this._diffEditor.doLayout(),this._render()}_getPrevRow(){let O=this._getCurrentFocusedRow();return O?O.previousElementSibling?O.previousElementSibling:O:this._getFirstRow()}_getNextRow(){let O=this._getCurrentFocusedRow();return O?O.nextElementSibling?O.nextElementSibling:O:this._getFirstRow()}_getFirstRow(){return this.domNode.domNode.querySelector(".diff-review-row")}_getCurrentFocusedRow(){let O=document.activeElement;return O&&/diff-review-row/.test(O.className)?O:null}_goToRow(O){let L=this._getCurrentFocusedRow();O.tabIndex=0,O.focus(),L&&L!==O&&(L.tabIndex=-1),this.scrollbar.scanDomNode()}isVisible(){return this._isVisible}layout(O,L,B){this._width=L,this.shadow.setTop(O-6),this.shadow.setWidth(L),this.shadow.setHeight(this._isVisible?6:0),this.domNode.setTop(O),this.domNode.setWidth(L),this.domNode.setHeight(B),this._content.setHeight(B),this._content.setWidth(L),this._isVisible?(this.actionBarContainer.setAttribute("aria-hidden","false"),this.actionBarContainer.setDisplay("block")):(this.actionBarContainer.setAttribute("aria-hidden","true"),this.actionBarContainer.setDisplay("none"))}_compute(){const O=this._diffEditor.getLineChanges();if(!O||O.length===0)return[];const L=this._diffEditor.getOriginalEditor().getModel(),B=this._diffEditor.getModifiedEditor().getModel();return!L||!B?[]:Ct._mergeAdjacent(O,L.getLineCount(),B.getLineCount())}static _mergeAdjacent(O,L,B){if(!O||O.length===0)return[];let W=[],K=0;for(let Z=0,se=O.length;Z<se;Z++){const oe=O[Z],G=oe.originalStartLineNumber,x=oe.originalEndLineNumber,U=oe.modifiedStartLineNumber,$=oe.modifiedEndLineNumber;let V=[],Q=0;{const ue=x===0?G:G-1,pe=$===0?U:U-1;let fe=1,re=1;if(Z>0){const q=O[Z-1];q.originalEndLineNumber===0?fe=q.originalStartLineNumber+1:fe=q.originalEndLineNumber+1,q.modifiedEndLineNumber===0?re=q.modifiedStartLineNumber+1:re=q.modifiedEndLineNumber+1}let ie=ue-b+1,ae=pe-b+1;if(ie<fe){const q=fe-ie;ie=ie+q,ae=ae+q}if(ae<re){const q=re-ae;ie=ie+q,ae=ae+q}V[Q++]=new v(ie,ue,ae,pe)}x!==0&&(V[Q++]=new v(G,x,0,0)),$!==0&&(V[Q++]=new v(0,0,U,$));{const ue=x===0?G+1:x+1,pe=$===0?U+1:$+1;let fe=L,re=B;if(Z+1<se){const q=O[Z+1];q.originalEndLineNumber===0?fe=q.originalStartLineNumber:fe=q.originalStartLineNumber-1,q.modifiedEndLineNumber===0?re=q.modifiedStartLineNumber:re=q.modifiedStartLineNumber-1}let ie=ue+b-1,ae=pe+b-1;if(ie>fe){const q=fe-ie;ie=ie+q,ae=ae+q}if(ae>re){const q=re-ae;ie=ie+q,ae=ae+q}V[Q++]=new v(ue,ie,pe,ae)}W[K++]=new m(V)}let H=W[0].entries,Y=[],X=0;for(let Z=1,se=W.length;Z<se;Z++){const oe=W[Z].entries,G=H[H.length-1],x=oe[0];if(G.getType()===0&&x.getType()===0&&x.originalLineStart<=G.originalLineEnd){H[H.length-1]=new v(G.originalLineStart,x.originalLineEnd,G.modifiedLineStart,x.modifiedLineEnd),H=H.concat(oe.slice(1));continue}Y[X++]=new m(H),H=oe}return Y[X++]=new m(H),Y}_findDiffIndex(O){const L=O.lineNumber;for(let B=0,W=this._diffs.length;B<W;B++){const K=this._diffs[B].entries,H=K[K.length-1].modifiedLineEnd;if(L<=H)return B}return 0}_render(){const O=this._diffEditor.getOriginalEditor().getOptions(),L=this._diffEditor.getModifiedEditor().getOptions(),B=this._diffEditor.getOriginalEditor().getModel(),W=this._diffEditor.getModifiedEditor().getModel(),K=B.getOptions(),H=W.getOptions();if(!this._isVisible||!B||!W){N.clearNode(this._content.domNode),this._currentDiff=null,this.scrollbar.scanDomNode();return}this._diffEditor.updateOptions({readOnly:!0});const Y=this._findDiffIndex(this._diffEditor.getPosition());if(this._diffs[Y]===this._currentDiff)return;this._currentDiff=this._diffs[Y];const X=this._diffs[Y].entries;let Z=document.createElement("div");Z.className="diff-review-table",Z.setAttribute("role","list"),Z.setAttribute("aria-label",'Difference review. Use "Stage | Unstage | Revert Selected Ranges" commands'),n.Configuration.applyFontInfoSlow(Z,L.get(43));let se=0,oe=0,G=0,x=0;for(let ae=0,q=X.length;ae<q;ae++){const ne=X[ae],ce=ne.originalLineStart,le=ne.originalLineEnd,de=ne.modifiedLineStart,z=ne.modifiedLineEnd;ce!==0&&(se===0||ce<se)&&(se=ce),le!==0&&(oe===0||le>oe)&&(oe=le),de!==0&&(G===0||de<G)&&(G=de),z!==0&&(x===0||z>x)&&(x=z)}let U=document.createElement("div");U.className="diff-review-row";let $=document.createElement("div");$.className="diff-review-cell diff-review-summary";const V=oe-se+1,Q=x-G+1;$.appendChild(document.createTextNode(`${Y+1}/${this._diffs.length}: @@ -${se},${V} +${G},${Q} @@`)),U.setAttribute("data-line",String(G));const ue=ae=>ae===0?w.localize(4,null):ae===1?w.localize(5,null):w.localize(6,null,ae),pe=ue(V),fe=ue(Q);U.setAttribute("aria-label",w.localize(7,null,Y+1,this._diffs.length,se,pe,G,fe)),U.appendChild($),U.setAttribute("role","listitem"),Z.appendChild(U);const re=L.get(58);let ie=G;for(let ae=0,q=X.length;ae<q;ae++){const ne=X[ae];Ct._renderSection(Z,ne,ie,re,this._width,O,B,K,L,W,H,this._modeService.languageIdCodec),ne.modifiedLineStart!==0&&(ie=ne.modifiedLineEnd)}N.clearNode(this._content.domNode),this._content.domNode.appendChild(Z),this.scrollbar.scanDomNode()}static _renderSection(O,L,B,W,K,H,Y,X,Z,se,oe,G){const x=L.getType();let U="diff-review-row",$="";const V="diff-review-spacer";let Q=null;switch(x){case 1:U="diff-review-row line-insert",$=" char-insert",Q=E;break;case 2:U="diff-review-row line-delete",$=" char-delete",Q=I;break}const ue=L.originalLineStart,pe=L.originalLineEnd,fe=L.modifiedLineStart,re=L.modifiedLineEnd,ie=Math.max(re-fe,pe-ue),ae=H.get(129),q=ae.glyphMarginWidth+ae.lineNumbersWidth,ne=Z.get(129),ce=10+ne.glyphMarginWidth+ne.lineNumbersWidth;for(let le=0;le<=ie;le++){const de=ue===0?0:ue+le,z=fe===0?0:fe+le,te=document.createElement("div");te.style.minWidth=K+"px",te.className=U,te.setAttribute("role","listitem"),z!==0&&(B=z),te.setAttribute("data-line",String(B));let he=document.createElement("div");he.className="diff-review-cell",he.style.height=`${W}px`,te.appendChild(he);const ge=document.createElement("span");ge.style.width=q+"px",ge.style.minWidth=q+"px",ge.className="diff-review-line-number"+$,de!==0?ge.appendChild(document.createTextNode(String(de))):ge.innerText="\xA0",he.appendChild(ge);const ve=document.createElement("span");ve.style.width=ce+"px",ve.style.minWidth=ce+"px",ve.style.paddingRight="10px",ve.className="diff-review-line-number"+$,z!==0?ve.appendChild(document.createTextNode(String(z))):ve.innerText="\xA0",he.appendChild(ve);const Se=document.createElement("span");if(Se.className=V,Q){const Ne=document.createElement("span");Ne.className=l.ThemeIcon.asClassName(Q),Ne.innerText="\xA0\xA0",Se.appendChild(Ne)}else Se.innerText="\xA0\xA0";he.appendChild(Se);let Ee;if(z!==0){let Ne=this._renderLine(se,Z,oe.tabSize,z,G);Ct._ttPolicy&&(Ne=Ct._ttPolicy.createHTML(Ne)),he.insertAdjacentHTML("beforeend",Ne),Ee=se.getLineContent(z)}else{let Ne=this._renderLine(Y,H,X.tabSize,de,G);Ct._ttPolicy&&(Ne=Ct._ttPolicy.createHTML(Ne)),he.insertAdjacentHTML("beforeend",Ne),Ee=Y.getLineContent(de)}Ee.length===0&&(Ee=w.localize(8,null));let Ae="";switch(x){case 0:de===z?Ae=w.localize(9,null,Ee,de):Ae=w.localize(10,null,Ee,de,z);break;case 1:Ae=w.localize(11,null,Ee,z);break;case 2:Ae=w.localize(12,null,Ee,de);break}te.setAttribute("aria-label",Ae),O.appendChild(te)}}static _renderLine(O,L,B,W,K){const H=O.getLineContent(W),Y=L.get(43),X=c.LineTokens.createEmpty(H,K),Z=r.ViewLineRenderingData.isBasicASCII(H,O.mightContainNonBasicASCII()),se=r.ViewLineRenderingData.containsRTL(H,Z,O.mightContainRTL());return(0,a.renderViewLine2)(new a.RenderLineInput(Y.isMonospace&&!L.get(29),Y.canUseHalfwidthRightwardsArrow,H,!1,Z,se,0,X,[],B,0,Y.spaceWidth,Y.middotWidth,Y.wsmiddotWidth,L.get(104),L.get(87),L.get(82),L.get(44)!==s.EditorFontLigatures.OFF,null)).html}};M._ttPolicy=(_=window.trustedTypes)===null||_===void 0?void 0:_.createPolicy("diffReview",{createHTML:A=>A}),M=Fe([Ce(1,y.IModeService)],M),e.DiffReview=M,(0,l.registerThemingParticipant)((A,O)=>{const L=A.getColor(d.editorLineNumbers);L&&O.addRule(`.monaco-diff-editor .diff-review-line-number { color: ${L}; }`);const B=A.getColor(i.scrollbarShadow);B&&O.addRule(`.monaco-diff-editor .diff-review-shadow { box-shadow: ${B} 0 -6px 6px -6px inset; }`)});class P extends g.EditorAction{constructor(){super({id:"editor.action.diffReview.next",label:w.localize(13,null),alias:"Go to Next Difference",precondition:o.ContextKeyExpr.has("isInDiffEditor"),kbOpts:{kbExpr:null,primary:65,weight:100}})}run(O,L){const B=R(O);B&&B.diffReviewNext()}}class F extends g.EditorAction{constructor(){super({id:"editor.action.diffReview.prev",label:w.localize(14,null),alias:"Go to Previous Difference",precondition:o.ContextKeyExpr.has("isInDiffEditor"),kbOpts:{kbExpr:null,primary:1024|65,weight:100}})}run(O,L){const B=R(O);B&&B.diffReviewPrev()}}function R(A){const O=A.get(t.ICodeEditorService),L=O.listDiffEditors(),B=O.getActiveCodeEditor();if(!B)return null;for(let W=0,K=L.length;W<K;W++){const H=L[W];if(H.getModifiedEditor().getId()===B.getId()||H.getOriginalEditor().getId()===B.getId())return H}return null}(0,g.registerEditorAction)(P),(0,g.registerEditorAction)(F)}),define(J[654],ee([0,1,7,45,64,27,4,2,8,20,126,39,568,191,523,15,57,21,81,103,10,368]),function(j,e,w,N,T,D,S,p,C,n,g,t,s,c,u,d,a,r,o,i,l){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.editorHoverWidgetHighlightForeground=e.ParameterHintsWidget=void 0;const h=w.$,f=(0,o.registerIcon)("parameter-hints-next",D.Codicon.chevronDown,u.localize(0,null)),y=(0,o.registerIcon)("parameter-hints-previous",D.Codicon.chevronUp,u.localize(1,null));let _=class Ei extends p.Disposable{constructor(v,m,E,I){super();this.editor=v,this.renderDisposeables=this._register(new p.DisposableStore),this.visible=!1,this.announcedLabel=null,this.allowEditorOverflow=!0,this.markdownRenderer=this._register(new g.MarkdownRenderer({editor:v},I,E)),this.model=this._register(new s.ParameterHintsModel(v)),this.keyVisible=c.Context.Visible.bindTo(m),this.keyMultipleSignatures=c.Context.MultipleSignatures.bindTo(m),this._register(this.model.onChangedHints(k=>{k?(this.show(),this.render(k)):this.hide()}))}createParameterHintDOMNodes(){const v=h(".editor-widget.parameter-hints-widget"),m=w.append(v,h(".phwrapper"));m.tabIndex=-1;const E=w.append(m,h(".controls")),I=w.append(E,h(".button"+l.ThemeIcon.asCSSSelector(y))),k=w.append(E,h(".overloads")),M=w.append(E,h(".button"+l.ThemeIcon.asCSSSelector(f)));this._register(w.addDisposableListener(I,"click",L=>{w.EventHelper.stop(L),this.previous()})),this._register(w.addDisposableListener(M,"click",L=>{w.EventHelper.stop(L),this.next()}));const P=h(".body"),F=new T.DomScrollableElement(P,{});this._register(F),m.appendChild(F.getDomNode());const R=w.append(P,h(".signature")),A=w.append(P,h(".docs"));v.style.userSelect="text",this.domNodes={element:v,signature:R,overloads:k,docs:A,scrollbar:F},this.editor.addContentWidget(this),this.hide(),this._register(this.editor.onDidChangeCursorSelection(L=>{this.visible&&this.editor.layoutContentWidget(this)}));const O=()=>{if(!this.domNodes)return;const L=this.editor.getOption(43);this.domNodes.element.style.fontSize=`${L.fontSize}px`,this.domNodes.element.style.lineHeight=`${L.lineHeight/L.fontSize}`};O(),this._register(S.Event.chain(this.editor.onDidChangeConfiguration.bind(this.editor)).filter(L=>L.hasChanged(43)).on(O,null)),this._register(this.editor.onDidLayoutChange(L=>this.updateMaxHeight())),this.updateMaxHeight()}show(){this.visible||(this.domNodes||this.createParameterHintDOMNodes(),this.keyVisible.set(!0),this.visible=!0,setTimeout(()=>{this.domNodes&&this.domNodes.element.classList.add("visible")},100),this.editor.layoutContentWidget(this))}hide(){this.renderDisposeables.clear(),!!this.visible&&(this.keyVisible.reset(),this.visible=!1,this.announcedLabel=null,this.domNodes&&this.domNodes.element.classList.remove("visible"),this.editor.layoutContentWidget(this))}getPosition(){return this.visible?{position:this.editor.getPosition(),preference:[1,2]}:null}render(v){var m;if(this.renderDisposeables.clear(),!this.domNodes)return;const E=v.signatures.length>1;this.domNodes.element.classList.toggle("multiple",E),this.keyMultipleSignatures.set(E),this.domNodes.signature.innerText="",this.domNodes.docs.innerText="";const I=v.signatures[v.activeSignature];if(!I)return;const k=w.append(this.domNodes.signature,h(".code")),M=this.editor.getOption(43);k.style.fontSize=`${M.fontSize}px`,k.style.fontFamily=M.fontFamily;const P=I.parameters.length>0,F=(m=I.activeParameter)!==null&&m!==void 0?m:v.activeParameter;if(P)this.renderParameters(k,I,F);else{const O=w.append(k,h("span"));O.textContent=I.label}const R=I.parameters[F];if(R==null?void 0:R.documentation){const O=h("span.documentation");if(typeof R.documentation=="string")O.textContent=R.documentation;else{const L=this.renderMarkdownDocs(R.documentation);O.appendChild(L.element)}w.append(this.domNodes.docs,h("p",{},O))}if(I.documentation!==void 0)if(typeof I.documentation=="string")w.append(this.domNodes.docs,h("p",{},I.documentation));else{const O=this.renderMarkdownDocs(I.documentation);w.append(this.domNodes.docs,O.element)}const A=this.hasDocs(I,R);if(this.domNodes.signature.classList.toggle("has-docs",A),this.domNodes.docs.classList.toggle("empty",!A),this.domNodes.overloads.textContent=String(v.activeSignature+1).padStart(v.signatures.length.toString().length,"0")+"/"+v.signatures.length,R){let O="";const L=I.parameters[F];Array.isArray(L.label)?O=I.label.substring(L.label[0],L.label[1]):O=L.label,L.documentation&&(O+=typeof L.documentation=="string"?`, ${L.documentation}`:`, ${L.documentation.value}`),I.documentation&&(O+=typeof I.documentation=="string"?`, ${I.documentation}`:`, ${I.documentation.value}`),this.announcedLabel!==O&&(N.alert(u.localize(2,null,O)),this.announcedLabel=O)}this.editor.layoutContentWidget(this),this.domNodes.scrollbar.scanDomNode()}renderMarkdownDocs(v){const m=this.renderDisposeables.add(this.markdownRenderer.render(v,{asyncRenderCallback:()=>{var E;(E=this.domNodes)===null||E===void 0||E.scrollbar.scanDomNode()}}));return m.element.classList.add("markdown-docs"),m}hasDocs(v,m){return!!(m&&typeof m.documentation=="string"&&(0,n.assertIsDefined)(m.documentation).length>0||m&&typeof m.documentation=="object"&&(0,n.assertIsDefined)(m.documentation).value.length>0||v.documentation&&typeof v.documentation=="string"&&(0,n.assertIsDefined)(v.documentation).length>0||v.documentation&&typeof v.documentation=="object"&&(0,n.assertIsDefined)(v.documentation.value).length>0)}renderParameters(v,m,E){const[I,k]=this.getParameterLabelOffsets(m,E),M=document.createElement("span");M.textContent=m.label.substring(0,I);const P=document.createElement("span");P.textContent=m.label.substring(I,k),P.className="parameter active";const F=document.createElement("span");F.textContent=m.label.substring(k),w.append(v,M,P,F)}getParameterLabelOffsets(v,m){const E=v.parameters[m];if(E){if(Array.isArray(E.label))return E.label;if(E.label.length){const I=new RegExp(`(\\W|^)${(0,C.escapeRegExpCharacters)(E.label)}(?=\\W|$)`,"g");I.test(v.label);const k=I.lastIndex-E.label.length;return k>=0?[k,I.lastIndex]:[0,0]}else return[0,0]}else return[0,0]}next(){this.editor.focus(),this.model.next()}previous(){this.editor.focus(),this.model.previous()}cancel(){this.model.cancel()}getDomNode(){return this.domNodes||this.createParameterHintDOMNodes(),this.domNodes.element}getId(){return Ei.ID}trigger(v){this.model.trigger(v,0)}updateMaxHeight(){if(!this.domNodes)return;const m=`${Math.max(this.editor.getLayoutInfo().height/4,250)}px`;this.domNodes.element.style.maxHeight=m;const E=this.domNodes.element.getElementsByClassName("phwrapper");E.length&&(E[0].style.maxHeight=m)}};_.ID="editor.widget.parameterHintsWidget",_=Fe([Ce(1,d.IContextKeyService),Ce(2,a.IOpenerService),Ce(3,t.IModeService)],_),e.ParameterHintsWidget=_,e.editorHoverWidgetHighlightForeground=(0,r.registerColor)("editorHoverWidget.highlightForeground",{dark:r.listHighlightForeground,light:r.listHighlightForeground,hc:r.listHighlightForeground},u.localize(3,null)),(0,l.registerThemingParticipant)((b,v)=>{const m=b.getColor(r.editorHoverBorder);if(m){const R=b.type===i.ColorScheme.HIGH_CONTRAST?2:1;v.addRule(`.monaco-editor .parameter-hints-widget { border: ${R}px solid ${m}; }`),v.addRule(`.monaco-editor .parameter-hints-widget.multiple .body { border-left: 1px solid ${m.transparent(.5)}; }`),v.addRule(`.monaco-editor .parameter-hints-widget .signature.has-docs { border-bottom: 1px solid ${m.transparent(.5)}; }`)}const E=b.getColor(r.editorHoverBackground);E&&v.addRule(`.monaco-editor .parameter-hints-widget { background-color: ${E}; }`);const I=b.getColor(r.textLinkForeground);I&&v.addRule(`.monaco-editor .parameter-hints-widget a { color: ${I}; }`);const k=b.getColor(r.textLinkActiveForeground);k&&v.addRule(`.monaco-editor .parameter-hints-widget a:hover { color: ${k}; }`);const M=b.getColor(r.editorHoverForeground);M&&v.addRule(`.monaco-editor .parameter-hints-widget { color: ${M}; }`);const P=b.getColor(r.textCodeBlockBackground);P&&v.addRule(`.monaco-editor .parameter-hints-widget code { background-color: ${P}; }`);const F=b.getColor(e.editorHoverWidgetHighlightForeground);F&&v.addRule(`.monaco-editor .parameter-hints-widget .parameter.active { color: ${F}}`)})}),define(J[655],ee([0,1,2,16,25,18,191,522,15,9,654]),function(j,e,w,N,T,D,S,p,C,n,g){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TriggerParameterHintsAction=void 0;let t=class Di extends w.Disposable{constructor(a,r){super();this.editor=a,this.widget=this._register(r.createInstance(g.ParameterHintsWidget,this.editor))}static get(a){return a.getContribution(Di.ID)}cancel(){this.widget.cancel()}previous(){this.widget.previous()}next(){this.widget.next()}trigger(a){this.widget.trigger(a)}};t.ID="editor.controller.parameterHints",t=Fe([Ce(1,n.IInstantiationService)],t);class s extends N.EditorAction{constructor(){super({id:"editor.action.triggerParameterHints",label:p.localize(0,null),alias:"Trigger Parameter Hints",precondition:T.EditorContextKeys.hasSignatureHelpProvider,kbOpts:{kbExpr:T.EditorContextKeys.editorTextFocus,primary:2048|1024|10,weight:100}})}run(a,r){const o=t.get(r);o&&o.trigger({triggerKind:D.SignatureHelpTriggerKind.Invoke})}}e.TriggerParameterHintsAction=s,(0,N.registerEditorContribution)(t.ID,t),(0,N.registerEditorAction)(s);const c=100+75,u=N.EditorCommand.bindToContribution(t.get);(0,N.registerEditorCommand)(new u({id:"closeParameterHints",precondition:S.Context.Visible,handler:d=>d.cancel(),kbOpts:{weight:c,kbExpr:T.EditorContextKeys.focus,primary:9,secondary:[1024|9]}})),(0,N.registerEditorCommand)(new u({id:"showPrevParameterHint",precondition:C.ContextKeyExpr.and(S.Context.Visible,S.Context.MultipleSignatures),handler:d=>d.previous(),kbOpts:{weight:c,kbExpr:T.EditorContextKeys.focus,primary:16,secondary:[512|16],mac:{primary:16,secondary:[512|16,256|46]}}})),(0,N.registerEditorCommand)(new u({id:"showNextParameterHint",precondition:C.ContextKeyExpr.and(S.Context.Visible,S.Context.MultipleSignatures),handler:d=>d.next(),kbOpts:{weight:c,kbExpr:T.EditorContextKeys.focus,primary:18,secondary:[512|18],mac:{primary:18,secondary:[512|18,256|44]}}}))}),define(J[656],ee([0,1,34,7,186,19,27,4,68,2,24,31,18,584,42,39,536,250,81,10,264]),function(j,e,w,N,T,D,S,p,C,n,g,t,s,c,u,d,a,r,o,i,l){"use strict";var h;Object.defineProperty(e,"__esModule",{value:!0}),e.ItemRenderer=e.suggestMoreInfoIcon=e.getAriaId=void 0;function f(v){return`suggest-aria-id:${v}`}e.getAriaId=f,e.suggestMoreInfoIcon=(0,o.registerIcon)("suggest-more-info",S.Codicon.chevronRight,a.localize(0,null));const y=new(h=class Rt{extract(m,E){if(m.textLabel.match(Rt._regexStrict))return E[0]=m.textLabel,!0;if(m.completion.detail&&m.completion.detail.match(Rt._regexStrict))return E[0]=m.completion.detail,!0;if(typeof m.completion.documentation=="string"){const I=Rt._regexRelaxed.exec(m.completion.documentation);if(I&&(I.index===0||I.index+I[0].length===m.completion.documentation.length))return E[0]=I[0],!0}return!1}},h._regexRelaxed=/(#([\da-fA-F]{3}){1,2}|(rgb|hsl)a\(\s*(\d{1,3}%?\s*,\s*){3}(1|0?\.\d+)\)|(rgb|hsl)\(\s*\d{1,3}%?(\s*,\s*\d{1,3}%?){2}\s*\))/,h._regexStrict=new RegExp(`^${h._regexRelaxed.source}$`,"i"),h);let _=class{constructor(m,E,I,k){this._editor=m,this._modelService=E,this._modeService=I,this._themeService=k,this._onDidToggleDetails=new p.Emitter,this.onDidToggleDetails=this._onDidToggleDetails.event,this.templateId="suggestion"}dispose(){this._onDidToggleDetails.dispose()}renderTemplate(m){const E=Object.create(null);E.disposables=new n.DisposableStore,E.root=m,E.root.classList.add("show-file-icons"),E.icon=(0,N.append)(m,(0,N.$)(".icon")),E.colorspan=(0,N.append)(E.icon,(0,N.$)("span.colorspan"));const I=(0,N.append)(m,(0,N.$)(".contents")),k=(0,N.append)(I,(0,N.$)(".main"));E.iconContainer=(0,N.append)(k,(0,N.$)(".icon-label.codicon")),E.left=(0,N.append)(k,(0,N.$)("span.left")),E.right=(0,N.append)(k,(0,N.$)("span.right")),E.iconLabel=new T.IconLabel(E.left,{supportHighlights:!0,supportIcons:!0}),E.disposables.add(E.iconLabel),E.parametersLabel=(0,N.append)(E.left,(0,N.$)("span.signature-label")),E.qualifierLabel=(0,N.append)(E.left,(0,N.$)("span.qualifier-label")),E.detailsLabel=(0,N.append)(E.right,(0,N.$)("span.details-label")),E.readMore=(0,N.append)(E.right,(0,N.$)("span.readMore"+i.ThemeIcon.asCSSSelector(e.suggestMoreInfoIcon))),E.readMore.title=a.localize(1,null);const M=()=>{const P=this._editor.getOptions(),F=P.get(43),R=F.getMassagedFontFamily(w.isSafari?t.EDITOR_FONT_DEFAULTS.fontFamily:null),A=F.fontFeatureSettings,O=P.get(106)||F.fontSize,L=P.get(107)||F.lineHeight,B=F.fontWeight,W=`${O}px`,K=`${L}px`;E.root.style.fontSize=W,E.root.style.fontWeight=B,k.style.fontFamily=R,k.style.fontFeatureSettings=A,k.style.lineHeight=K,E.icon.style.height=K,E.icon.style.width=K,E.readMore.style.height=K,E.readMore.style.width=K};return M(),E.disposables.add(this._editor.onDidChangeConfiguration(P=>{(P.hasChanged(43)||P.hasChanged(106)||P.hasChanged(107))&&M()})),E}renderElement(m,E,I){const{completion:k}=m;I.root.id=f(E),I.colorspan.style.backgroundColor="";const M={labelEscapeNewLines:!0,matches:(0,C.createMatches)(m.score)};let P=[];if(k.kind===19&&y.extract(m,P))I.icon.className="icon customcolor",I.iconContainer.className="icon hide",I.colorspan.style.backgroundColor=P[0];else if(k.kind===20&&this._themeService.getFileIconTheme().hasFileIcons){I.icon.className="icon hide",I.iconContainer.className="icon hide";const F=(0,c.getIconClasses)(this._modelService,this._modeService,g.URI.from({scheme:"fake",path:m.textLabel}),r.FileKind.FILE),R=(0,c.getIconClasses)(this._modelService,this._modeService,g.URI.from({scheme:"fake",path:k.detail}),r.FileKind.FILE);M.extraClasses=F.length>R.length?F:R}else k.kind===23&&this._themeService.getFileIconTheme().hasFolderIcons?(I.icon.className="icon hide",I.iconContainer.className="icon hide",M.extraClasses=(0,D.flatten)([(0,c.getIconClasses)(this._modelService,this._modeService,g.URI.from({scheme:"fake",path:m.textLabel}),r.FileKind.FOLDER),(0,c.getIconClasses)(this._modelService,this._modeService,g.URI.from({scheme:"fake",path:k.detail}),r.FileKind.FOLDER)])):(I.icon.className="icon hide",I.iconContainer.className="",I.iconContainer.classList.add("suggest-icon",...(0,s.completionKindToCssClass)(k.kind).split(" ")));k.tags&&k.tags.indexOf(1)>=0&&(M.extraClasses=(M.extraClasses||[]).concat(["deprecated"]),M.matches=[]),I.iconLabel.setLabel(m.textLabel,void 0,M),typeof k.label=="string"?(I.parametersLabel.textContent="",I.detailsLabel.textContent=b(k.detail||""),I.root.classList.add("string-label")):(I.parametersLabel.textContent=b(k.label.detail||""),I.detailsLabel.textContent=b(k.label.description||""),I.root.classList.remove("string-label")),this._editor.getOption(105).showInlineDetails?(0,N.show)(I.detailsLabel):(0,N.hide)(I.detailsLabel),(0,l.canExpandCompletionItem)(m)?(I.right.classList.add("can-expand-details"),(0,N.show)(I.readMore),I.readMore.onmousedown=F=>{F.stopPropagation(),F.preventDefault()},I.readMore.onclick=F=>{F.stopPropagation(),F.preventDefault(),this._onDidToggleDetails.fire()}):(I.right.classList.remove("can-expand-details"),(0,N.hide)(I.readMore),I.readMore.onmousedown=null,I.readMore.onclick=null)}disposeTemplate(m){m.disposables.dispose()}};_=Fe([Ce(1,u.IModelService),Ce(2,d.IModeService),Ce(3,i.IThemeService)],_),e.ItemRenderer=_;function b(v){return v.replace(/\r\n|\r|\n/g,"")}}),define(J[657],ee([0,1,7,4,81,10]),function(j,e,w,N,T,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getIconsStyleSheet=void 0;function S(){const p=new N.Emitter,C=(0,T.getIconRegistry)();return C.onDidChange(()=>p.fire()),{onDidChange:p.event,getCSS(){const n={},g=s=>{let c=s.defaults;for(;D.ThemeIcon.isThemeIcon(c);){const d=C.getIcon(c.id);if(!d)return;c=d.defaults}const u=c.fontId;if(u){const d=C.getIconFont(u);if(d)return n[u]=d,`.codicon-${s.id}:before { content: '${c.fontCharacter}'; font-family: ${(0,w.asCSSPropertyValue)(u)}; }`}return`.codicon-${s.id}:before { content: '${c.fontCharacter}'; }`},t=[];for(let s of C.getIcons()){const c=g(s);c&&t.push(c)}for(let s in n){const u=n[s].definition.src.map(d=>`${(0,w.asCSSUrl)(d.location)} format('${d.format}')`).join(", ");t.push(`@font-face { src: ${u}; font-family: ${(0,w.asCSSPropertyValue)(s)}; font-display: block; }`)}return t.join(`
`)}}}e.getIconsStyleSheet=S}),define(J[658],ee([0,1,7,29,4,18,402,618,33,21,10,2,103,657]),function(j,e,w,N,T,D,S,p,C,n,g,t,s,c){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.StandaloneThemeServiceImpl=void 0;const u="vs",d="vs-dark",a="hc-black",r=C.Registry.as(n.Extensions.ColorContribution),o=C.Registry.as(g.Extensions.ThemingContribution);class i{constructor(b,v){this.semanticHighlighting=!1,this.themeData=v;let m=v.base;b.length>0?(l(b)?this.id=b:this.id=m+" "+b,this.themeName=b):(this.id=m,this.themeName=m),this.colors=null,this.defaultColors=Object.create(null),this._tokenTheme=null}get base(){return this.themeData.base}notifyBaseUpdated(){this.themeData.inherit&&(this.colors=null,this._tokenTheme=null)}getColors(){if(!this.colors){const b=new Map;for(let v in this.themeData.colors)b.set(v,N.Color.fromHex(this.themeData.colors[v]));if(this.themeData.inherit){let v=h(this.themeData.base);for(let m in v.colors)b.has(m)||b.set(m,N.Color.fromHex(v.colors[m]))}this.colors=b}return this.colors}getColor(b,v){const m=this.getColors().get(b);if(m)return m;if(v!==!1)return this.getDefault(b)}getDefault(b){let v=this.defaultColors[b];return v||(v=r.resolveDefaultColor(b,this),this.defaultColors[b]=v,v)}defines(b){return Object.prototype.hasOwnProperty.call(this.getColors(),b)}get type(){switch(this.base){case u:return s.ColorScheme.LIGHT;case a:return s.ColorScheme.HIGH_CONTRAST;default:return s.ColorScheme.DARK}}get tokenTheme(){if(!this._tokenTheme){let b=[],v=[];if(this.themeData.inherit){let I=h(this.themeData.base);b=I.rules,I.encodedTokensColors&&(v=I.encodedTokensColors)}const m=this.themeData.colors["editor.foreground"],E=this.themeData.colors["editor.background"];if(m||E){const I={token:""};m&&(I.foreground=m),E&&(I.background=E),b.push(I)}b=b.concat(this.themeData.rules),this.themeData.encodedTokensColors&&(v=this.themeData.encodedTokensColors),this._tokenTheme=S.TokenTheme.createFromRawTokenTheme(b,v)}return this._tokenTheme}getTokenStyleMetadata(b,v,m){const I=this.tokenTheme._match([b].concat(v).join(".")).metadata,k=D.TokenMetadata.getForeground(I),M=D.TokenMetadata.getFontStyle(I);return{foreground:k,italic:Boolean(M&1),bold:Boolean(M&2),underline:Boolean(M&4)}}}function l(_){return _===u||_===d||_===a}function h(_){switch(_){case u:return p.vs;case d:return p.vs_dark;case a:return p.hc_black}}function f(_){let b=h(_);return new i(_,b)}class y extends t.Disposable{constructor(){super();this._onColorThemeChange=this._register(new T.Emitter),this.onDidColorThemeChange=this._onColorThemeChange.event,this._environment=Object.create(null),this._autoDetectHighContrast=!0,this._knownThemes=new Map,this._knownThemes.set(u,f(u)),this._knownThemes.set(d,f(d)),this._knownThemes.set(a,f(a));const b=(0,c.getIconsStyleSheet)();this._codiconCSS=b.getCSS(),this._themeCSS="",this._allCSS=`${this._codiconCSS}
${this._themeCSS}`,this._globalStyleElement=null,this._styleElements=[],this._colorMapOverride=null,this.setTheme(u),b.onDidChange(()=>{this._codiconCSS=b.getCSS(),this._updateCSS()}),w.addMatchMediaChangeListener("(forced-colors: active)",()=>{this._updateActualTheme()})}registerEditorContainer(b){return w.isInShadowDOM(b)?this._registerShadowDomContainer(b):this._registerRegularEditorContainer()}_registerRegularEditorContainer(){return this._globalStyleElement||(this._globalStyleElement=w.createStyleSheet(),this._globalStyleElement.className="monaco-colors",this._globalStyleElement.textContent=this._allCSS,this._styleElements.push(this._globalStyleElement)),t.Disposable.None}_registerShadowDomContainer(b){const v=w.createStyleSheet(b);return v.className="monaco-colors",v.textContent=this._allCSS,this._styleElements.push(v),{dispose:()=>{for(let m=0;m<this._styleElements.length;m++)if(this._styleElements[m]===v){this._styleElements.splice(m,1);return}}}}defineTheme(b,v){if(!/^[a-z0-9\-]+$/i.test(b))throw new Error("Illegal theme name!");if(!l(v.base)&&!l(b))throw new Error("Illegal theme base!");this._knownThemes.set(b,new i(b,v)),l(b)&&this._knownThemes.forEach(m=>{m.base===b&&m.notifyBaseUpdated()}),this._theme.themeName===b&&this.setTheme(b)}getColorTheme(){return this._theme}setColorMapOverride(b){this._colorMapOverride=b,this._updateThemeOrColorMap()}setTheme(b){let v;this._knownThemes.has(b)?v=this._knownThemes.get(b):v=this._knownThemes.get(u),this._desiredTheme=v,this._updateActualTheme()}_updateActualTheme(){const b=this._autoDetectHighContrast&&window.matchMedia("(forced-colors: active)").matches?this._knownThemes.get(a):this._desiredTheme;this._theme!==b&&(this._theme=b,this._updateThemeOrColorMap())}setAutoDetectHighContrast(b){this._autoDetectHighContrast=b,this._updateActualTheme()}_updateThemeOrColorMap(){let b=[],v={},m={addRule:I=>{v[I]||(b.push(I),v[I]=!0)}};o.getThemingParticipants().forEach(I=>I(this._theme,m,this._environment));const E=this._colorMapOverride||this._theme.tokenTheme.getColorMap();m.addRule((0,S.generateTokensCSSForColorMap)(E)),this._themeCSS=b.join(`
`),this._updateCSS(),D.TokenizationRegistry.setColorMap(E),this._onColorThemeChange.fire(this._theme)}_updateCSS(){this._allCSS=`${this._codiconCSS}
${this._themeCSS}`,this._styleElements.forEach(b=>b.textContent=this._allCSS)}getFileIconTheme(){return{hasFileIcons:!1,hasFolderIcons:!1,hidesExplorerArrows:!1}}}e.StandaloneThemeServiceImpl=y}),define(J[129],ee([0,1,9]),function(j,e,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.UndoRedoSource=e.UndoRedoGroup=e.ResourceEditStackSnapshot=e.IUndoRedoService=void 0,e.IUndoRedoService=(0,w.createDecorator)("undoRedoService");class N{constructor(p,C){this.resource=p,this.elements=C}}e.ResourceEditStackSnapshot=N;class T{constructor(){this.id=T._ID++,this.order=1}nextOrder(){return this.id===0?0:this.order++}}e.UndoRedoGroup=T,T._ID=0,T.None=new T;class D{constructor(){this.id=D._ID++,this.order=1}nextOrder(){return this.id===0?0:this.order++}}e.UndoRedoSource=D,D._ID=0,D.None=new D}),define(J[32],ee([0,1,11,4,2,8,24,31,13,3,22,49,249,392,393,563,99,176,564,143,37,77,177,178,148,29,129,253,19,562,611,140,39]),function(j,e,w,N,T,D,S,p,C,n,g,t,s,c,u,d,a,r,o,i,l,h,f,y,_,b,v,m,E,I,k,M,P){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DidChangeContentEmitter=e.DidChangeDecorationsEmitter=e.ModelDecorationOptions=e.ModelDecorationInjectedTextOptions=e.ModelDecorationMinimapOptions=e.ModelDecorationOverviewRulerOptions=e.BracketPairGuidesClassNames=e.TextModel=e.LONG_LINE_BOUNDARY=e.createTextBuffer=e.createTextBufferFactory=void 0;function F(){return new d.PieceTreeTextBufferBuilder}function R(ae){const q=F();return q.acceptChunk(ae),q.finish()}e.createTextBufferFactory=R;function A(ae,q){return(typeof ae=="string"?R(ae):ae).create(q)}e.createTextBuffer=A;let O=0;const L=999;e.LONG_LINE_BOUNDARY=1e4;class B{constructor(q){this._source=q,this._eos=!1}read(){if(this._eos)return null;let q=[],ne=0,ce=0;do{let le=this._source.read();if(le===null)return this._eos=!0,ne===0?null:q.join("");if(le.length>0&&(q[ne++]=le,ce+=le.length),ce>=64*1024)return q.join("")}while(!0)}}const W=()=>{throw new Error("Invalid change accessor")};class K{constructor(){this._searchCanceledBrand=void 0}}K.INSTANCE=new K;function H(ae){return ae instanceof K?null:ae}let Y=class lt extends T.Disposable{constructor(q,ne,ce,le=null,de,z,te){super();this._undoRedoService=de,this._modeService=z,this._languageConfigurationService=te,this._onWillDispose=this._register(new N.Emitter),this.onWillDispose=this._onWillDispose.event,this._onDidChangeDecorations=this._register(new re(Ee=>this.handleBeforeFireDecorationsChangedEvent(Ee))),this.onDidChangeDecorations=this._onDidChangeDecorations.event,this._onDidChangeLanguage=this._register(new N.Emitter),this.onDidChangeLanguage=this._onDidChangeLanguage.event,this._onDidChangeLanguageConfiguration=this._register(new N.Emitter),this.onDidChangeLanguageConfiguration=this._onDidChangeLanguageConfiguration.event,this._onDidChangeTokens=this._register(new N.Emitter),this.onDidChangeTokens=this._onDidChangeTokens.event,this._onDidChangeOptions=this._register(new N.Emitter),this.onDidChangeOptions=this._onDidChangeOptions.event,this._onDidChangeAttached=this._register(new N.Emitter),this.onDidChangeAttached=this._onDidChangeAttached.event,this._onDidChangeContentOrInjectedText=this._register(new N.Emitter),this.onDidChangeContentOrInjectedText=this._onDidChangeContentOrInjectedText.event,this._eventEmitter=this._register(new ie),this._backgroundTokenizationState=0,this._onBackgroundTokenizationStateChanged=this._register(new N.Emitter),this.onBackgroundTokenizationStateChanged=this._onBackgroundTokenizationStateChanged.event,this._register(this._eventEmitter.fastEvent(Ee=>{this._onDidChangeContentOrInjectedText.fire(Ee.rawContentChangedEvent)})),O++,this.id="$model"+O,this.isForSimpleWidget=ne.isForSimpleWidget,typeof le=="undefined"||le===null?this._associatedResource=S.URI.parse("inmemory://model/"+O):this._associatedResource=le,this._attachedEditorCount=0;const{textBuffer:he,disposable:ge}=A(q,ne.defaultEOL);this._buffer=he,this._bufferDisposable=ge,this._options=lt.resolveOptions(this._buffer,ne);const ve=this._buffer.getLineCount(),Se=this._buffer.getValueLengthInRange(new n.Range(1,1,ve,this._buffer.getLineLength(ve)+1),0);ne.largeFileOptimizations?this._isTooLargeForTokenization=Se>lt.LARGE_FILE_SIZE_THRESHOLD||ve>lt.LARGE_FILE_LINE_COUNT_THRESHOLD:this._isTooLargeForTokenization=!1,this._isTooLargeForSyncing=Se>lt.MODEL_SYNC_LIMIT,this._versionId=1,this._alternativeVersionId=1,this._initialUndoRedoSnapshot=null,this._isDisposed=!1,this._isDisposing=!1,this._languageId=ce||h.NULL_MODE_ID,this._languageRegistryListener=this._languageConfigurationService.onDidChange(Ee=>{Ee.affects(this._languageId)&&this._onDidChangeLanguageConfiguration.fire({})}),this._instanceId=D.singleLetterHash(O),this._lastDecorationId=0,this._decorations=Object.create(null),this._decorationsTree=new G,this._commandManager=new s.EditStack(this,this._undoRedoService),this._isUndoing=!1,this._isRedoing=!1,this._trimAutoWhitespaceLines=null,this._tokens=new _.TokensStore(this._modeService.languageIdCodec),this._tokens2=new _.TokensStore2(this._modeService.languageIdCodec),this._tokenization=new o.TextModelTokenization(this,this._modeService.languageIdCodec),this._bracketPairColorizer=this._register(new I.BracketPairs(this,this._languageConfigurationService)),this._decorationProvider=this._register(new k.ColorizedBracketPairsDecorationProvider(this)),this._register(this._decorationProvider.onDidChange(()=>{this._onDidChangeDecorations.beginDeferredEmit(),this._onDidChangeDecorations.fire(),this._onDidChangeDecorations.endDeferredEmit()}))}static resolveOptions(q,ne){if(ne.detectIndentation){const ce=(0,c.guessIndentation)(q,ne.tabSize,ne.insertSpaces);return new t.TextModelResolvedOptions({tabSize:ce.tabSize,indentSize:ce.tabSize,insertSpaces:ce.insertSpaces,trimAutoWhitespace:ne.trimAutoWhitespace,defaultEOL:ne.defaultEOL,bracketPairColorizationOptions:ne.bracketPairColorizationOptions})}return new t.TextModelResolvedOptions({tabSize:ne.tabSize,indentSize:ne.indentSize,insertSpaces:ne.insertSpaces,trimAutoWhitespace:ne.trimAutoWhitespace,defaultEOL:ne.defaultEOL,bracketPairColorizationOptions:ne.bracketPairColorizationOptions})}onDidChangeContentFast(q){return this._eventEmitter.fastEvent(ne=>q(ne.contentChangedEvent))}onDidChangeContent(q){return this._eventEmitter.slowEvent(ne=>q(ne.contentChangedEvent))}get bracketPairs(){return this._bracketPairColorizer}get backgroundTokenizationState(){return this._backgroundTokenizationState}handleTokenizationProgress(q){if(this._backgroundTokenizationState===2)return;const ne=q?2:1;this._backgroundTokenizationState!==ne&&(this._backgroundTokenizationState=ne,this._onBackgroundTokenizationStateChanged.fire())}dispose(){this._isDisposing=!0,this._onWillDispose.fire(),this._languageRegistryListener.dispose(),this._tokenization.dispose(),this._isDisposed=!0,super.dispose(),this._bufferDisposable.dispose(),this._isDisposing=!1;const q=new m.PieceTreeTextBuffer([],"",`
`,!1,!1,!0,!0);q.dispose(),this._buffer=q}_assertNotDisposed(){if(this._isDisposed)throw new Error("Model is disposed!")}_emitContentChangedEvent(q,ne){this._bracketPairColorizer.handleContentChanged(ne),!this._isDisposing&&this._eventEmitter.fire(new a.InternalModelContentChangeEvent(q,ne))}setValue(q){if(this._assertNotDisposed(),q===null)return;const{textBuffer:ne,disposable:ce}=A(q,this._options.defaultEOL);this._setValueFromTextBuffer(ne,ce)}_createContentChanged2(q,ne,ce,le,de,z,te){return{changes:[{range:q,rangeOffset:ne,rangeLength:ce,text:le}],eol:this._buffer.getEOL(),versionId:this.getVersionId(),isUndoing:de,isRedoing:z,isFlush:te}}_setValueFromTextBuffer(q,ne){this._assertNotDisposed();const ce=this.getFullModelRange(),le=this.getValueLengthInRange(ce),de=this.getLineCount(),z=this.getLineMaxColumn(de);this._buffer=q,this._bufferDisposable.dispose(),this._bufferDisposable=ne,this._increaseVersionId(),this._tokens.flush(),this._tokens2.flush(),this._decorations=Object.create(null),this._decorationsTree=new G,this._commandManager.clear(),this._trimAutoWhitespaceLines=null,this._emitContentChangedEvent(new a.ModelRawContentChangedEvent([new a.ModelRawFlush],this._versionId,!1,!1),this._createContentChanged2(new n.Range(1,1,de,z),0,le,this.getValue(),!1,!1,!0))}setEOL(q){this._assertNotDisposed();const ne=q===1?`\r
`:`
`;if(this._buffer.getEOL()===ne)return;const ce=this.getFullModelRange(),le=this.getValueLengthInRange(ce),de=this.getLineCount(),z=this.getLineMaxColumn(de);this._onBeforeEOLChange(),this._buffer.setEOL(ne),this._increaseVersionId(),this._onAfterEOLChange(),this._emitContentChangedEvent(new a.ModelRawContentChangedEvent([new a.ModelRawEOLChanged],this._versionId,!1,!1),this._createContentChanged2(new n.Range(1,1,de,z),0,le,this.getValue(),!1,!1,!1))}_onBeforeEOLChange(){this._decorationsTree.ensureAllNodesHaveRanges(this)}_onAfterEOLChange(){const q=this.getVersionId(),ne=this._decorationsTree.collectNodesPostOrder();for(let ce=0,le=ne.length;ce<le;ce++){const de=ne[ce],z=de.range,te=de.cachedAbsoluteStart-de.start,he=this._buffer.getOffsetAt(z.startLineNumber,z.startColumn),ge=this._buffer.getOffsetAt(z.endLineNumber,z.endColumn);de.cachedAbsoluteStart=he,de.cachedAbsoluteEnd=ge,de.cachedVersionId=q,de.start=he-te,de.end=ge-te,(0,u.recomputeMaxEnd)(de)}}onBeforeAttached(){this._attachedEditorCount++,this._attachedEditorCount===1&&this._onDidChangeAttached.fire(void 0)}onBeforeDetached(){this._attachedEditorCount--,this._attachedEditorCount===0&&this._onDidChangeAttached.fire(void 0)}isAttachedToEditor(){return this._attachedEditorCount>0}getAttachedEditorCount(){return this._attachedEditorCount}isTooLargeForSyncing(){return this._isTooLargeForSyncing}isTooLargeForTokenization(){return this._isTooLargeForTokenization}isDisposed(){return this._isDisposed}isDominatedByLongLines(){if(this._assertNotDisposed(),this.isTooLargeForTokenization())return!1;let q=0,ne=0;const ce=this._buffer.getLineCount();for(let le=1;le<=ce;le++){const de=this._buffer.getLineLength(le);de>=e.LONG_LINE_BOUNDARY?ne+=de:q+=de}return ne>q}get uri(){return this._associatedResource}getOptions(){return this._assertNotDisposed(),this._options}getFormattingOptions(){return{tabSize:this._options.indentSize,insertSpaces:this._options.insertSpaces}}updateOptions(q){this._assertNotDisposed();let ne=typeof q.tabSize!="undefined"?q.tabSize:this._options.tabSize,ce=typeof q.indentSize!="undefined"?q.indentSize:this._options.indentSize,le=typeof q.insertSpaces!="undefined"?q.insertSpaces:this._options.insertSpaces,de=typeof q.trimAutoWhitespace!="undefined"?q.trimAutoWhitespace:this._options.trimAutoWhitespace,z=typeof q.bracketColorizationOptions!="undefined"?q.bracketColorizationOptions:this._options.bracketPairColorizationOptions,te=new t.TextModelResolvedOptions({tabSize:ne,indentSize:ce,insertSpaces:le,defaultEOL:this._options.defaultEOL,trimAutoWhitespace:de,bracketPairColorizationOptions:z});if(this._options.equals(te))return;let he=this._options.createChangeEvent(te);this._options=te,this._onDidChangeOptions.fire(he)}detectIndentation(q,ne){this._assertNotDisposed();let ce=(0,c.guessIndentation)(this._buffer,ne,q);this.updateOptions({insertSpaces:ce.insertSpaces,tabSize:ce.tabSize,indentSize:ce.tabSize})}static _normalizeIndentationFromWhitespace(q,ne,ce){let le=0;for(let z=0;z<q.length;z++)q.charAt(z)==="    "?le+=ne:le++;let de="";if(!ce){let z=Math.floor(le/ne);le=le%ne;for(let te=0;te<z;te++)de+="    "}for(let z=0;z<le;z++)de+=" ";return de}static normalizeIndentation(q,ne,ce){let le=D.firstNonWhitespaceIndex(q);return le===-1&&(le=q.length),lt._normalizeIndentationFromWhitespace(q.substring(0,le),ne,ce)+q.substring(le)}normalizeIndentation(q){return this._assertNotDisposed(),lt.normalizeIndentation(q,this._options.indentSize,this._options.insertSpaces)}getVersionId(){return this._assertNotDisposed(),this._versionId}mightContainRTL(){return this._buffer.mightContainRTL()}mightContainUnusualLineTerminators(){return this._buffer.mightContainUnusualLineTerminators()}removeUnusualLineTerminators(q=null){const ne=this.findMatches(D.UNUSUAL_LINE_TERMINATORS.source,!1,!0,!1,null,!1,1073741824);this._buffer.resetMightContainUnusualLineTerminators(),this.pushEditOperations(q,ne.map(ce=>({range:ce.range,text:null})),()=>null)}mightContainNonBasicASCII(){return this._buffer.mightContainNonBasicASCII()}getAlternativeVersionId(){return this._assertNotDisposed(),this._alternativeVersionId}getInitialUndoRedoSnapshot(){return this._assertNotDisposed(),this._initialUndoRedoSnapshot}getOffsetAt(q){this._assertNotDisposed();let ne=this._validatePosition(q.lineNumber,q.column,0);return this._buffer.getOffsetAt(ne.lineNumber,ne.column)}getPositionAt(q){this._assertNotDisposed();let ne=Math.min(this._buffer.getLength(),Math.max(0,q));return this._buffer.getPositionAt(ne)}_increaseVersionId(){this._versionId=this._versionId+1,this._alternativeVersionId=this._versionId}_overwriteVersionId(q){this._versionId=q}_overwriteAlternativeVersionId(q){this._alternativeVersionId=q}_overwriteInitialUndoRedoSnapshot(q){this._initialUndoRedoSnapshot=q}getValue(q,ne=!1){this._assertNotDisposed();const ce=this.getFullModelRange(),le=this.getValueInRange(ce,q);return ne?this._buffer.getBOM()+le:le}createSnapshot(q=!1){return new B(this._buffer.createSnapshot(q))}getValueLength(q,ne=!1){this._assertNotDisposed();const ce=this.getFullModelRange(),le=this.getValueLengthInRange(ce,q);return ne?this._buffer.getBOM().length+le:le}getValueInRange(q,ne=0){return this._assertNotDisposed(),this._buffer.getValueInRange(this.validateRange(q),ne)}getValueLengthInRange(q,ne=0){return this._assertNotDisposed(),this._buffer.getValueLengthInRange(this.validateRange(q),ne)}getCharacterCountInRange(q,ne=0){return this._assertNotDisposed(),this._buffer.getCharacterCountInRange(this.validateRange(q),ne)}getLineCount(){return this._assertNotDisposed(),this._buffer.getLineCount()}getLineContent(q){if(this._assertNotDisposed(),q<1||q>this.getLineCount())throw new Error("Illegal value for lineNumber");return this._buffer.getLineContent(q)}getLineLength(q){if(this._assertNotDisposed(),q<1||q>this.getLineCount())throw new Error("Illegal value for lineNumber");return this._buffer.getLineLength(q)}getLinesContent(){return this._assertNotDisposed(),this._buffer.getLinesContent()}getEOL(){return this._assertNotDisposed(),this._buffer.getEOL()}getEndOfLineSequence(){return this._assertNotDisposed(),this._buffer.getEOL()===`
`?0:1}getLineMinColumn(q){return this._assertNotDisposed(),1}getLineMaxColumn(q){if(this._assertNotDisposed(),q<1||q>this.getLineCount())throw new Error("Illegal value for lineNumber");return this._buffer.getLineLength(q)+1}getLineFirstNonWhitespaceColumn(q){if(this._assertNotDisposed(),q<1||q>this.getLineCount())throw new Error("Illegal value for lineNumber");return this._buffer.getLineFirstNonWhitespaceColumn(q)}getLineLastNonWhitespaceColumn(q){if(this._assertNotDisposed(),q<1||q>this.getLineCount())throw new Error("Illegal value for lineNumber");return this._buffer.getLineLastNonWhitespaceColumn(q)}_validateRangeRelaxedNoAllocations(q){const ne=this._buffer.getLineCount(),ce=q.startLineNumber,le=q.startColumn;let de=Math.floor(typeof ce=="number"&&!isNaN(ce)?ce:1),z=Math.floor(typeof le=="number"&&!isNaN(le)?le:1);if(de<1)de=1,z=1;else if(de>ne)de=ne,z=this.getLineMaxColumn(de);else if(z<=1)z=1;else{const Se=this.getLineMaxColumn(de);z>=Se&&(z=Se)}const te=q.endLineNumber,he=q.endColumn;let ge=Math.floor(typeof te=="number"&&!isNaN(te)?te:1),ve=Math.floor(typeof he=="number"&&!isNaN(he)?he:1);if(ge<1)ge=1,ve=1;else if(ge>ne)ge=ne,ve=this.getLineMaxColumn(ge);else if(ve<=1)ve=1;else{const Se=this.getLineMaxColumn(ge);ve>=Se&&(ve=Se)}return ce===de&&le===z&&te===ge&&he===ve&&q instanceof n.Range&&!(q instanceof g.Selection)?q:new n.Range(de,z,ge,ve)}_isValidPosition(q,ne,ce){if(typeof q!="number"||typeof ne!="number"||isNaN(q)||isNaN(ne)||q<1||ne<1||(q|0)!==q||(ne|0)!==ne)return!1;const le=this._buffer.getLineCount();if(q>le)return!1;if(ne===1)return!0;const de=this.getLineMaxColumn(q);if(ne>de)return!1;if(ce===1){const z=this._buffer.getLineCharCode(q,ne-2);if(D.isHighSurrogate(z))return!1}return!0}_validatePosition(q,ne,ce){const le=Math.floor(typeof q=="number"&&!isNaN(q)?q:1),de=Math.floor(typeof ne=="number"&&!isNaN(ne)?ne:1),z=this._buffer.getLineCount();if(le<1)return new C.Position(1,1);if(le>z)return new C.Position(z,this.getLineMaxColumn(z));if(de<=1)return new C.Position(le,1);const te=this.getLineMaxColumn(le);if(de>=te)return new C.Position(le,te);if(ce===1){const he=this._buffer.getLineCharCode(le,de-2);if(D.isHighSurrogate(he))return new C.Position(le,de-1)}return new C.Position(le,de)}validatePosition(q){const ne=1;return this._assertNotDisposed(),q instanceof C.Position&&this._isValidPosition(q.lineNumber,q.column,ne)?q:this._validatePosition(q.lineNumber,q.column,ne)}_isValidRange(q,ne){const ce=q.startLineNumber,le=q.startColumn,de=q.endLineNumber,z=q.endColumn;if(!this._isValidPosition(ce,le,0)||!this._isValidPosition(de,z,0))return!1;if(ne===1){const te=le>1?this._buffer.getLineCharCode(ce,le-2):0,he=z>1&&z<=this._buffer.getLineLength(de)?this._buffer.getLineCharCode(de,z-2):0,ge=D.isHighSurrogate(te),ve=D.isHighSurrogate(he);return!ge&&!ve}return!0}validateRange(q){const ne=1;if(this._assertNotDisposed(),q instanceof n.Range&&!(q instanceof g.Selection)&&this._isValidRange(q,ne))return q;const ce=this._validatePosition(q.startLineNumber,q.startColumn,0),le=this._validatePosition(q.endLineNumber,q.endColumn,0),de=ce.lineNumber,z=ce.column,te=le.lineNumber,he=le.column;if(ne===1){const ge=z>1?this._buffer.getLineCharCode(de,z-2):0,ve=he>1&&he<=this._buffer.getLineLength(te)?this._buffer.getLineCharCode(te,he-2):0,Se=D.isHighSurrogate(ge),Ee=D.isHighSurrogate(ve);return!Se&&!Ee?new n.Range(de,z,te,he):de===te&&z===he?new n.Range(de,z-1,te,he-1):Se&&Ee?new n.Range(de,z-1,te,he+1):Se?new n.Range(de,z-1,te,he):new n.Range(de,z,te,he+1)}return new n.Range(de,z,te,he)}modifyPosition(q,ne){this._assertNotDisposed();let ce=this.getOffsetAt(q)+ne;return this.getPositionAt(Math.min(this._buffer.getLength(),Math.max(0,ce)))}getFullModelRange(){this._assertNotDisposed();const q=this.getLineCount();return new n.Range(1,1,q,this.getLineMaxColumn(q))}findMatchesLineByLine(q,ne,ce,le){return this._buffer.findMatchesLineByLine(q,ne,ce,le)}findMatches(q,ne,ce,le,de,z,te=L){this._assertNotDisposed();let he=null;ne!==null&&(Array.isArray(ne)||(ne=[ne]),ne.every(Se=>n.Range.isIRange(Se))&&(he=ne.map(Se=>this.validateRange(Se)))),he===null&&(he=[this.getFullModelRange()]),he=he.sort((Se,Ee)=>Se.startLineNumber-Ee.startLineNumber||Se.startColumn-Ee.startColumn);const ge=[];ge.push(he.reduce((Se,Ee)=>n.Range.areIntersecting(Se,Ee)?Se.plusRange(Ee):(ge.push(Se),Ee)));let ve;if(!ce&&q.indexOf(`
`)<0){const Ee=new r.SearchParams(q,ce,le,de).parseSearchRequest();if(!Ee)return[];ve=Ae=>this.findMatchesLineByLine(Ae,Ee,z,te)}else ve=Se=>r.TextModelSearch.findMatches(this,new r.SearchParams(q,ce,le,de),Se,z,te);return ge.map(ve).reduce((Se,Ee)=>Se.concat(Ee),[])}findNextMatch(q,ne,ce,le,de,z){this._assertNotDisposed();const te=this.validatePosition(ne);if(!ce&&q.indexOf(`
`)<0){const ge=new r.SearchParams(q,ce,le,de).parseSearchRequest();if(!ge)return null;const ve=this.getLineCount();let Se=new n.Range(te.lineNumber,te.column,ve,this.getLineMaxColumn(ve)),Ee=this.findMatchesLineByLine(Se,ge,z,1);return r.TextModelSearch.findNextMatch(this,new r.SearchParams(q,ce,le,de),te,z),Ee.length>0||(Se=new n.Range(1,1,te.lineNumber,this.getLineMaxColumn(te.lineNumber)),Ee=this.findMatchesLineByLine(Se,ge,z,1),Ee.length>0)?Ee[0]:null}return r.TextModelSearch.findNextMatch(this,new r.SearchParams(q,ce,le,de),te,z)}findPreviousMatch(q,ne,ce,le,de,z){this._assertNotDisposed();const te=this.validatePosition(ne);return r.TextModelSearch.findPreviousMatch(this,new r.SearchParams(q,ce,le,de),te,z)}pushStackElement(){this._commandManager.pushStackElement()}popStackElement(){this._commandManager.popStackElement()}pushEOL(q){if((this.getEOL()===`
`?0:1)!==q)try{this._onDidChangeDecorations.beginDeferredEmit(),this._eventEmitter.beginDeferredEmit(),this._initialUndoRedoSnapshot===null&&(this._initialUndoRedoSnapshot=this._undoRedoService.createSnapshot(this.uri)),this._commandManager.pushEOL(q)}finally{this._eventEmitter.endDeferredEmit(),this._onDidChangeDecorations.endDeferredEmit()}}_validateEditOperation(q){return q instanceof t.ValidAnnotatedEditOperation?q:new t.ValidAnnotatedEditOperation(q.identifier||null,this.validateRange(q.range),q.text,q.forceMoveMarkers||!1,q.isAutoWhitespaceEdit||!1,q._isTracked||!1)}_validateEditOperations(q){const ne=[];for(let ce=0,le=q.length;ce<le;ce++)ne[ce]=this._validateEditOperation(q[ce]);return ne}pushEditOperations(q,ne,ce){try{return this._onDidChangeDecorations.beginDeferredEmit(),this._eventEmitter.beginDeferredEmit(),this._pushEditOperations(q,this._validateEditOperations(ne),ce)}finally{this._eventEmitter.endDeferredEmit(),this._onDidChangeDecorations.endDeferredEmit()}}_pushEditOperations(q,ne,ce){if(this._options.trimAutoWhitespace&&this._trimAutoWhitespaceLines){let le=ne.map(z=>({range:this.validateRange(z.range),text:z.text})),de=!0;if(q)for(let z=0,te=q.length;z<te;z++){let he=q[z],ge=!1;for(let ve=0,Se=le.length;ve<Se;ve++){let Ee=le[ve].range,Ae=Ee.startLineNumber>he.endLineNumber,Ne=he.startLineNumber>Ee.endLineNumber;if(!Ae&&!Ne){ge=!0;break}}if(!ge){de=!1;break}}if(de)for(let z=0,te=this._trimAutoWhitespaceLines.length;z<te;z++){let he=this._trimAutoWhitespaceLines[z],ge=this.getLineMaxColumn(he),ve=!0;for(let Se=0,Ee=le.length;Se<Ee;Se++){let Ae=le[Se].range,Ne=le[Se].text;if(!(he<Ae.startLineNumber||he>Ae.endLineNumber)&&!(he===Ae.startLineNumber&&Ae.startColumn===ge&&Ae.isEmpty()&&Ne&&Ne.length>0&&Ne.charAt(0)===`
`)&&!(he===Ae.startLineNumber&&Ae.startColumn===1&&Ae.isEmpty()&&Ne&&Ne.length>0&&Ne.charAt(Ne.length-1)===`
`)){ve=!1;break}}if(ve){const Se=new n.Range(he,1,he,ge);ne.push(new t.ValidAnnotatedEditOperation(null,Se,null,!1,!1,!1))}}this._trimAutoWhitespaceLines=null}return this._initialUndoRedoSnapshot===null&&(this._initialUndoRedoSnapshot=this._undoRedoService.createSnapshot(this.uri)),this._commandManager.pushEditOperation(q,ne,ce)}_applyUndo(q,ne,ce,le){const de=q.map(z=>{const te=this.getPositionAt(z.newPosition),he=this.getPositionAt(z.newEnd);return{range:new n.Range(te.lineNumber,te.column,he.lineNumber,he.column),text:z.oldText}});this._applyUndoRedoEdits(de,ne,!0,!1,ce,le)}_applyRedo(q,ne,ce,le){const de=q.map(z=>{const te=this.getPositionAt(z.oldPosition),he=this.getPositionAt(z.oldEnd);return{range:new n.Range(te.lineNumber,te.column,he.lineNumber,he.column),text:z.newText}});this._applyUndoRedoEdits(de,ne,!1,!0,ce,le)}_applyUndoRedoEdits(q,ne,ce,le,de,z){try{this._onDidChangeDecorations.beginDeferredEmit(),this._eventEmitter.beginDeferredEmit(),this._isUndoing=ce,this._isRedoing=le,this.applyEdits(q,!1),this.setEOL(ne),this._overwriteAlternativeVersionId(de)}finally{this._isUndoing=!1,this._isRedoing=!1,this._eventEmitter.endDeferredEmit(z),this._onDidChangeDecorations.endDeferredEmit()}}applyEdits(q,ne=!1){try{this._onDidChangeDecorations.beginDeferredEmit(),this._eventEmitter.beginDeferredEmit();const ce=this._validateEditOperations(q);return this._doApplyEdits(ce,ne)}finally{this._eventEmitter.endDeferredEmit(),this._onDidChangeDecorations.endDeferredEmit()}}_doApplyEdits(q,ne){const ce=this._buffer.getLineCount(),le=this._buffer.applyEdits(q,this._options.trimAutoWhitespace,ne),de=this._buffer.getLineCount(),z=le.changes;if(this._trimAutoWhitespaceLines=le.trimAutoWhitespaceLineNumbers,z.length!==0){for(let ge=0,ve=z.length;ge<ve;ge++){const Se=z[ge],[Ee,Ae,Ne]=(0,_.countEOL)(Se.text);this._tokens.acceptEdit(Se.range,Ee,Ae),this._tokens2.acceptEdit(Se.range,Ee,Ae,Ne,Se.text.length>0?Se.text.charCodeAt(0):0),this._decorationsTree.acceptReplace(Se.rangeOffset,Se.rangeLength,Se.text.length,Se.forceMoveMarkers)}let te=[];this._increaseVersionId();let he=ce;for(let ge=0,ve=z.length;ge<ve;ge++){const Se=z[ge],[Ee]=(0,_.countEOL)(Se.text);this._onDidChangeDecorations.fire();const Ae=Se.range.startLineNumber,Ne=Se.range.endLineNumber,ze=Ne-Ae,xe=Ee,We=Math.min(ze,xe),Ue=xe-ze,Le=de-he-Ue+Ae,ye=Le,Oe=Le+xe,He=this._decorationsTree.getInjectedTextInInterval(this,this.getOffsetAt(new C.Position(ye,1)),this.getOffsetAt(new C.Position(Oe,this.getLineMaxColumn(Oe))),0),Be=a.LineInjectedText.fromDecorations(He),Ke=new E.ArrayQueue(Be);for(let ke=We;ke>=0;ke--){const Ie=Ae+ke,Me=Le+ke;Ke.takeFromEndWhile(be=>be.lineNumber>Me);const me=Ke.takeFromEndWhile(be=>be.lineNumber===Me);te.push(new a.ModelRawLineChanged(Ie,this.getLineContent(Me),me))}if(We<ze){const ke=Ae+We;te.push(new a.ModelRawLinesDeleted(ke+1,Ne))}if(We<xe){const ke=new E.ArrayQueue(Be),Ie=Ae+We,Me=xe-We,me=de-he-Me+Ie+1;let be=[],De=[];for(let we=0;we<Me;we++){let _e=me+we;De[we]=this.getLineContent(_e),ke.takeWhile(Pe=>Pe.lineNumber<_e),be[we]=ke.takeWhile(Pe=>Pe.lineNumber===_e)}te.push(new a.ModelRawLinesInserted(Ie+1,Ae+xe,De,be))}he+=Ue}this._emitContentChangedEvent(new a.ModelRawContentChangedEvent(te,this.getVersionId(),this._isUndoing,this._isRedoing),{changes:z,eol:this._buffer.getEOL(),versionId:this.getVersionId(),isUndoing:this._isUndoing,isRedoing:this._isRedoing,isFlush:!1})}return le.reverseEdits===null?void 0:le.reverseEdits}undo(){return this._undoRedoService.undo(this.uri)}canUndo(){return this._undoRedoService.canUndo(this.uri)}redo(){return this._undoRedoService.redo(this.uri)}canRedo(){return this._undoRedoService.canRedo(this.uri)}handleBeforeFireDecorationsChangedEvent(q){if(q===null||q.size===0)return;const ce=[...q].map(le=>new a.ModelRawLineChanged(le,this.getLineContent(le),this._getInjectedTextInLine(le)));this._onDidChangeContentOrInjectedText.fire(new a.ModelInjectedTextChangedEvent(ce))}changeDecorations(q,ne=0){this._assertNotDisposed();try{return this._onDidChangeDecorations.beginDeferredEmit(),this._changeDecorations(ne,q)}finally{this._onDidChangeDecorations.endDeferredEmit()}}_changeDecorations(q,ne){let ce={addDecoration:(de,z)=>this._deltaDecorationsImpl(q,[],[{range:de,options:z}])[0],changeDecoration:(de,z)=>{this._changeDecorationImpl(de,z)},changeDecorationOptions:(de,z)=>{this._changeDecorationOptionsImpl(de,fe(z))},removeDecoration:de=>{this._deltaDecorationsImpl(q,[de],[])},deltaDecorations:(de,z)=>de.length===0&&z.length===0?[]:this._deltaDecorationsImpl(q,de,z)},le=null;try{le=ne(ce)}catch(de){(0,w.onUnexpectedError)(de)}return ce.addDecoration=W,ce.changeDecoration=W,ce.changeDecorationOptions=W,ce.removeDecoration=W,ce.deltaDecorations=W,le}deltaDecorations(q,ne,ce=0){if(this._assertNotDisposed(),q||(q=[]),q.length===0&&ne.length===0)return[];try{return this._onDidChangeDecorations.beginDeferredEmit(),this._deltaDecorationsImpl(ce,q,ne)}finally{this._onDidChangeDecorations.endDeferredEmit()}}_getTrackedRange(q){return this.getDecorationRange(q)}_setTrackedRange(q,ne,ce){const le=q?this._decorations[q]:null;if(!le)return ne?this._deltaDecorationsImpl(0,[],[{range:ne,options:pe[ce]}])[0]:null;if(!ne)return this._decorationsTree.delete(le),delete this._decorations[le.id],null;const de=this._validateRangeRelaxedNoAllocations(ne),z=this._buffer.getOffsetAt(de.startLineNumber,de.startColumn),te=this._buffer.getOffsetAt(de.endLineNumber,de.endColumn);return this._decorationsTree.delete(le),le.reset(this.getVersionId(),z,te,de),le.setOptions(pe[ce]),this._decorationsTree.insert(le),le.id}removeAllDecorationsWithOwnerId(q){if(this._isDisposed)return;const ne=this._decorationsTree.collectNodesFromOwner(q);for(let ce=0,le=ne.length;ce<le;ce++){const de=ne[ce];this._decorationsTree.delete(de),delete this._decorations[de.id]}}getDecorationOptions(q){const ne=this._decorations[q];return ne?ne.options:null}getDecorationRange(q){const ne=this._decorations[q];return ne?this._decorationsTree.getNodeRange(this,ne):null}getLineDecorations(q,ne=0,ce=!1){return q<1||q>this.getLineCount()?[]:this.getLinesDecorations(q,q,ne,ce)}getLinesDecorations(q,ne,ce=0,le=!1){let de=this.getLineCount(),z=Math.min(de,Math.max(1,q)),te=Math.min(de,Math.max(1,ne)),he=this.getLineMaxColumn(te);const ge=new n.Range(z,1,te,he),ve=this._getDecorationsInRange(ge,ce,le);return ve.push(...this._decorationProvider.getDecorationsInRange(ge,ce,le)),ve}getDecorationsInRange(q,ne=0,ce=!1){let le=this.validateRange(q);const de=this._getDecorationsInRange(le,ne,ce);return de.push(...this._decorationProvider.getDecorationsInRange(le,ne,ce)),de}getOverviewRulerDecorations(q=0,ne=!1){return this._decorationsTree.getAll(this,q,ne,!0)}getInjectedTextDecorations(q=0){return this._decorationsTree.getAllInjectedText(this,q)}_getInjectedTextInLine(q){const ne=this._buffer.getOffsetAt(q,1),ce=ne+this._buffer.getLineLength(q),le=this._decorationsTree.getInjectedTextInInterval(this,ne,ce,0);return a.LineInjectedText.fromDecorations(le).filter(de=>de.lineNumber===q)}getAllDecorations(q=0,ne=!1){let ce=this._decorationsTree.getAll(this,q,ne,!1);return ce=ce.concat(this._decorationProvider.getAllDecorations(q,ne)),ce}_getDecorationsInRange(q,ne,ce){const le=this._buffer.getOffsetAt(q.startLineNumber,q.startColumn),de=this._buffer.getOffsetAt(q.endLineNumber,q.endColumn);return this._decorationsTree.getAllInInterval(this,le,de,ne,ce)}getRangeAt(q,ne){return this._buffer.getRangeAt(q,ne-q)}_changeDecorationImpl(q,ne){const ce=this._decorations[q];if(!ce)return;if(ce.options.after){const te=this.getDecorationRange(q);this._onDidChangeDecorations.recordLineAffectedByInjectedText(te.endLineNumber)}if(ce.options.before){const te=this.getDecorationRange(q);this._onDidChangeDecorations.recordLineAffectedByInjectedText(te.startLineNumber)}const le=this._validateRangeRelaxedNoAllocations(ne),de=this._buffer.getOffsetAt(le.startLineNumber,le.startColumn),z=this._buffer.getOffsetAt(le.endLineNumber,le.endColumn);this._decorationsTree.delete(ce),ce.reset(this.getVersionId(),de,z,le),this._decorationsTree.insert(ce),this._onDidChangeDecorations.checkAffectedAndFire(ce.options),ce.options.after&&this._onDidChangeDecorations.recordLineAffectedByInjectedText(le.endLineNumber),ce.options.before&&this._onDidChangeDecorations.recordLineAffectedByInjectedText(le.startLineNumber)}_changeDecorationOptionsImpl(q,ne){const ce=this._decorations[q];if(!ce)return;const le=!!(ce.options.overviewRuler&&ce.options.overviewRuler.color),de=!!(ne.overviewRuler&&ne.overviewRuler.color);if(this._onDidChangeDecorations.checkAffectedAndFire(ce.options),this._onDidChangeDecorations.checkAffectedAndFire(ne),ce.options.after||ne.after){const z=this._decorationsTree.getNodeRange(this,ce);this._onDidChangeDecorations.recordLineAffectedByInjectedText(z.endLineNumber)}if(ce.options.before||ne.before){const z=this._decorationsTree.getNodeRange(this,ce);this._onDidChangeDecorations.recordLineAffectedByInjectedText(z.startLineNumber)}le!==de?(this._decorationsTree.delete(ce),ce.setOptions(ne),this._decorationsTree.insert(ce)):ce.setOptions(ne)}_deltaDecorationsImpl(q,ne,ce){const le=this.getVersionId(),de=ne.length;let z=0;const te=ce.length;let he=0,ge=new Array(te);for(;z<de||he<te;){let ve=null;if(z<de){do ve=this._decorations[ne[z++]];while(!ve&&z<de);if(ve){if(ve.options.after){const Se=this._decorationsTree.getNodeRange(this,ve);this._onDidChangeDecorations.recordLineAffectedByInjectedText(Se.endLineNumber)}if(ve.options.before){const Se=this._decorationsTree.getNodeRange(this,ve);this._onDidChangeDecorations.recordLineAffectedByInjectedText(Se.startLineNumber)}this._decorationsTree.delete(ve),this._onDidChangeDecorations.checkAffectedAndFire(ve.options)}}if(he<te){if(!ve){const xe=++this._lastDecorationId,We=`${this._instanceId};${xe}`;ve=new u.IntervalNode(We,0,0),this._decorations[We]=ve}const Se=ce[he],Ee=this._validateRangeRelaxedNoAllocations(Se.range),Ae=fe(Se.options),Ne=this._buffer.getOffsetAt(Ee.startLineNumber,Ee.startColumn),ze=this._buffer.getOffsetAt(Ee.endLineNumber,Ee.endColumn);ve.ownerId=q,ve.reset(le,Ne,ze,Ee),ve.setOptions(Ae),ve.options.after&&this._onDidChangeDecorations.recordLineAffectedByInjectedText(Ee.endLineNumber),ve.options.before&&this._onDidChangeDecorations.recordLineAffectedByInjectedText(Ee.startLineNumber),this._onDidChangeDecorations.checkAffectedAndFire(Ae),this._decorationsTree.insert(ve),ge[he]=ve.id,he++}else ve&&delete this._decorations[ve.id]}return ge}setTokens(q,ne=!1){if(q.length!==0){let ce=[];for(let le=0,de=q.length;le<de;le++){const z=q[le];let te=0,he=0,ge=!1;for(let ve=0,Se=z.tokens.length;ve<Se;ve++){const Ee=z.startLineNumber+ve;ge?(this._tokens.setTokens(this._languageId,Ee-1,this._buffer.getLineLength(Ee),z.tokens[ve],!1),he=Ee):this._tokens.setTokens(this._languageId,Ee-1,this._buffer.getLineLength(Ee),z.tokens[ve],!0)&&(ge=!0,te=Ee,he=Ee)}ge&&ce.push({fromLineNumber:te,toLineNumber:he})}ce.length>0&&this._emitModelTokensChangedEvent({tokenizationSupportChanged:!1,semanticTokensApplied:!1,ranges:ce})}this.handleTokenizationProgress(ne)}setSemanticTokens(q,ne){this._tokens2.set(q,ne),this._emitModelTokensChangedEvent({tokenizationSupportChanged:!1,semanticTokensApplied:q!==null,ranges:[{fromLineNumber:1,toLineNumber:this.getLineCount()}]})}hasCompleteSemanticTokens(){return this._tokens2.isComplete()}hasSomeSemanticTokens(){return!this._tokens2.isEmpty()}setPartialSemanticTokens(q,ne){if(this.hasCompleteSemanticTokens())return;const ce=this._tokens2.setPartial(q,ne);this._emitModelTokensChangedEvent({tokenizationSupportChanged:!1,semanticTokensApplied:!0,ranges:[{fromLineNumber:ce.startLineNumber,toLineNumber:ce.endLineNumber}]})}tokenizeViewport(q,ne){q=Math.max(1,q),ne=Math.min(this._buffer.getLineCount(),ne),this._tokenization.tokenizeViewport(q,ne)}clearTokens(){this._tokens.flush(),this._emitModelTokensChangedEvent({tokenizationSupportChanged:!0,semanticTokensApplied:!1,ranges:[{fromLineNumber:1,toLineNumber:this._buffer.getLineCount()}]})}_emitModelTokensChangedEvent(q){this._isDisposing||this._onDidChangeTokens.fire(q)}resetTokenization(){this._tokenization.reset()}forceTokenization(q){if(q<1||q>this.getLineCount())throw new Error("Illegal value for lineNumber");this._tokenization.forceTokenization(q)}isCheapToTokenize(q){return this._tokenization.isCheapToTokenize(q)}tokenizeIfCheap(q){this.isCheapToTokenize(q)&&this.forceTokenization(q)}getLineTokens(q){if(q<1||q>this.getLineCount())throw new Error("Illegal value for lineNumber");return this._getLineTokens(q)}_getLineTokens(q){const ne=this.getLineContent(q),ce=this._tokens.getTokens(this._languageId,q-1,ne);return this._tokens2.addSemanticTokens(q,ce)}getLanguageId(){return this._languageId}setMode(q){if(this._languageId===q)return;let ne={oldLanguage:this._languageId,newLanguage:q};this._languageId=q,this._onDidChangeLanguage.fire(ne),this._onDidChangeLanguageConfiguration.fire({})}getLanguageIdAtPosition(q,ne){const ce=this.validatePosition(new C.Position(q,ne)),le=this.getLineTokens(ce.lineNumber);return le.getLanguageId(le.findTokenIndexAtOffset(ce.column-1))}getLanguageConfiguration(q){return this._languageConfigurationService.getLanguageConfiguration(q)}getWordAtPosition(q){this._assertNotDisposed();const ne=this.validatePosition(q),ce=this.getLineContent(ne.lineNumber),le=this._getLineTokens(ne.lineNumber),de=le.findTokenIndexAtOffset(ne.column-1),[z,te]=lt._findLanguageBoundaries(le,de),he=(0,i.getWordAtText)(ne.column,this.getLanguageConfiguration(le.getLanguageId(de)).getWordDefinition(),ce.substring(z,te),z);if(he&&he.startColumn<=q.column&&q.column<=he.endColumn)return he;if(de>0&&z===ne.column-1){const[ge,ve]=lt._findLanguageBoundaries(le,de-1),Se=(0,i.getWordAtText)(ne.column,this.getLanguageConfiguration(le.getLanguageId(de-1)).getWordDefinition(),ce.substring(ge,ve),ge);if(Se&&Se.startColumn<=q.column&&q.column<=Se.endColumn)return Se}return null}static _findLanguageBoundaries(q,ne){const ce=q.getLanguageId(ne);let le=0;for(let z=ne;z>=0&&q.getLanguageId(z)===ce;z--)le=q.getStartOffset(z);let de=q.getLineContent().length;for(let z=ne,te=q.getCount();z<te&&q.getLanguageId(z)===ce;z++)de=q.getEndOffset(z);return[le,de]}getWordUntilPosition(q){const ne=this.getWordAtPosition(q);return ne?{word:ne.word.substr(0,q.column-ne.startColumn),startColumn:ne.startColumn,endColumn:q.column}:{word:"",startColumn:q.column,endColumn:q.column}}findMatchingBracketUp(q,ne){let ce=q.toLowerCase(),le=this.validatePosition(ne),de=this._getLineTokens(le.lineNumber),z=de.getLanguageId(de.findTokenIndexAtOffset(le.column-1)),te=this.getLanguageConfiguration(z).brackets;if(!te)return null;let he=te.textIsBracket[ce];return he?H(this._findMatchingBracketUp(he,le,null)):null}matchBracket(q){return this._matchBracket(this.validatePosition(q))}_establishBracketSearchOffsets(q,ne,ce,le){const de=ne.getCount(),z=ne.getLanguageId(le);let te=Math.max(0,q.column-1-ce.maxBracketLength);for(let ge=le-1;ge>=0;ge--){const ve=ne.getEndOffset(ge);if(ve<=te)break;if((0,f.ignoreBracketsInToken)(ne.getStandardTokenType(ge))||ne.getLanguageId(ge)!==z){te=ve;break}}let he=Math.min(ne.getLineContent().length,q.column-1+ce.maxBracketLength);for(let ge=le+1;ge<de;ge++){const ve=ne.getStartOffset(ge);if(ve>=he)break;if((0,f.ignoreBracketsInToken)(ne.getStandardTokenType(ge))||ne.getLanguageId(ge)!==z){he=ve;break}}return{searchStartOffset:te,searchEndOffset:he}}_matchBracket(q){const ne=q.lineNumber,ce=this._getLineTokens(ne),le=this._buffer.getLineContent(ne),de=ce.findTokenIndexAtOffset(q.column-1);if(de<0)return null;const z=this.getLanguageConfiguration(ce.getLanguageId(de)).brackets;if(z&&!(0,f.ignoreBracketsInToken)(ce.getStandardTokenType(de))){let{searchStartOffset:te,searchEndOffset:he}=this._establishBracketSearchOffsets(q,ce,z,de),ge=null;for(;;){const ve=y.BracketsUtils.findNextBracketInRange(z.forwardRegex,ne,le,te,he);if(!ve)break;if(ve.startColumn<=q.column&&q.column<=ve.endColumn){const Se=le.substring(ve.startColumn-1,ve.endColumn-1).toLowerCase(),Ee=this._matchFoundBracket(ve,z.textIsBracket[Se],z.textIsOpenBracket[Se],null);if(Ee){if(Ee instanceof K)return null;ge=Ee}}te=ve.endColumn-1}if(ge)return ge}if(de>0&&ce.getStartOffset(de)===q.column-1){const te=de-1,he=this.getLanguageConfiguration(ce.getLanguageId(te)).brackets;if(he&&!(0,f.ignoreBracketsInToken)(ce.getStandardTokenType(te))){let{searchStartOffset:ge,searchEndOffset:ve}=this._establishBracketSearchOffsets(q,ce,he,te);const Se=y.BracketsUtils.findPrevBracketInRange(he.reversedRegex,ne,le,ge,ve);if(Se&&Se.startColumn<=q.column&&q.column<=Se.endColumn){const Ee=le.substring(Se.startColumn-1,Se.endColumn-1).toLowerCase(),Ae=this._matchFoundBracket(Se,he.textIsBracket[Ee],he.textIsOpenBracket[Ee],null);if(Ae)return Ae instanceof K?null:Ae}}}return null}_matchFoundBracket(q,ne,ce,le){if(!ne)return null;const de=ce?this._findMatchingBracketDown(ne,q.getEndPosition(),le):this._findMatchingBracketUp(ne,q.getStartPosition(),le);return de?de instanceof K?de:[q,de]:null}_findMatchingBracketUp(q,ne,ce){const le=q.languageId,de=q.reversedRegex;let z=-1,te=0;const he=(ge,ve,Se,Ee)=>{for(;;){if(ce&&++te%100==0&&!ce())return K.INSTANCE;const Ae=y.BracketsUtils.findPrevBracketInRange(de,ge,ve,Se,Ee);if(!Ae)break;const Ne=ve.substring(Ae.startColumn-1,Ae.endColumn-1).toLowerCase();if(q.isOpen(Ne)?z++:q.isClose(Ne)&&z--,z===0)return Ae;Ee=Ae.startColumn-1}return null};for(let ge=ne.lineNumber;ge>=1;ge--){const ve=this._getLineTokens(ge),Se=ve.getCount(),Ee=this._buffer.getLineContent(ge);let Ae=Se-1,Ne=Ee.length,ze=Ee.length;ge===ne.lineNumber&&(Ae=ve.findTokenIndexAtOffset(ne.column-1),Ne=ne.column-1,ze=ne.column-1);let xe=!0;for(;Ae>=0;Ae--){const We=ve.getLanguageId(Ae)===le&&!(0,f.ignoreBracketsInToken)(ve.getStandardTokenType(Ae));if(We)xe?Ne=ve.getStartOffset(Ae):(Ne=ve.getStartOffset(Ae),ze=ve.getEndOffset(Ae));else if(xe&&Ne!==ze){const Ue=he(ge,Ee,Ne,ze);if(Ue)return Ue}xe=We}if(xe&&Ne!==ze){const We=he(ge,Ee,Ne,ze);if(We)return We}}return null}_findMatchingBracketDown(q,ne,ce){const le=q.languageId,de=q.forwardRegex;let z=1,te=0;const he=(ve,Se,Ee,Ae)=>{for(;;){if(ce&&++te%100==0&&!ce())return K.INSTANCE;const Ne=y.BracketsUtils.findNextBracketInRange(de,ve,Se,Ee,Ae);if(!Ne)break;const ze=Se.substring(Ne.startColumn-1,Ne.endColumn-1).toLowerCase();if(q.isOpen(ze)?z++:q.isClose(ze)&&z--,z===0)return Ne;Ee=Ne.endColumn-1}return null},ge=this.getLineCount();for(let ve=ne.lineNumber;ve<=ge;ve++){const Se=this._getLineTokens(ve),Ee=Se.getCount(),Ae=this._buffer.getLineContent(ve);let Ne=0,ze=0,xe=0;ve===ne.lineNumber&&(Ne=Se.findTokenIndexAtOffset(ne.column-1),ze=ne.column-1,xe=ne.column-1);let We=!0;for(;Ne<Ee;Ne++){const Ue=Se.getLanguageId(Ne)===le&&!(0,f.ignoreBracketsInToken)(Se.getStandardTokenType(Ne));if(Ue)We||(ze=Se.getStartOffset(Ne)),xe=Se.getEndOffset(Ne);else if(We&&ze!==xe){const Le=he(ve,Ae,ze,xe);if(Le)return Le}We=Ue}if(We&&ze!==xe){const Ue=he(ve,Ae,ze,xe);if(Ue)return Ue}}return null}findPrevBracket(q){const ne=this.validatePosition(q);let ce=null,le=null;for(let de=ne.lineNumber;de>=1;de--){const z=this._getLineTokens(de),te=z.getCount(),he=this._buffer.getLineContent(de);let ge=te-1,ve=he.length,Se=he.length;if(de===ne.lineNumber){ge=z.findTokenIndexAtOffset(ne.column-1),ve=ne.column-1,Se=ne.column-1;const Ae=z.getLanguageId(ge);ce!==Ae&&(ce=Ae,le=this.getLanguageConfiguration(ce).brackets)}let Ee=!0;for(;ge>=0;ge--){const Ae=z.getLanguageId(ge);if(ce!==Ae){if(le&&Ee&&ve!==Se){const ze=y.BracketsUtils.findPrevBracketInRange(le.reversedRegex,de,he,ve,Se);if(ze)return this._toFoundBracket(le,ze);Ee=!1}ce=Ae,le=this.getLanguageConfiguration(ce).brackets}const Ne=!!le&&!(0,f.ignoreBracketsInToken)(z.getStandardTokenType(ge));if(Ne)Ee?ve=z.getStartOffset(ge):(ve=z.getStartOffset(ge),Se=z.getEndOffset(ge));else if(le&&Ee&&ve!==Se){const ze=y.BracketsUtils.findPrevBracketInRange(le.reversedRegex,de,he,ve,Se);if(ze)return this._toFoundBracket(le,ze)}Ee=Ne}if(le&&Ee&&ve!==Se){const Ae=y.BracketsUtils.findPrevBracketInRange(le.reversedRegex,de,he,ve,Se);if(Ae)return this._toFoundBracket(le,Ae)}}return null}findNextBracket(q){const ne=this.validatePosition(q),ce=this.getLineCount();let le=null,de=null;for(let z=ne.lineNumber;z<=ce;z++){const te=this._getLineTokens(z),he=te.getCount(),ge=this._buffer.getLineContent(z);let ve=0,Se=0,Ee=0;if(z===ne.lineNumber){ve=te.findTokenIndexAtOffset(ne.column-1),Se=ne.column-1,Ee=ne.column-1;const Ne=te.getLanguageId(ve);le!==Ne&&(le=Ne,de=this.getLanguageConfiguration(le).brackets)}let Ae=!0;for(;ve<he;ve++){const Ne=te.getLanguageId(ve);if(le!==Ne){if(de&&Ae&&Se!==Ee){const xe=y.BracketsUtils.findNextBracketInRange(de.forwardRegex,z,ge,Se,Ee);if(xe)return this._toFoundBracket(de,xe);Ae=!1}le=Ne,de=this.getLanguageConfiguration(le).brackets}const ze=!!de&&!(0,f.ignoreBracketsInToken)(te.getStandardTokenType(ve));if(ze)Ae||(Se=te.getStartOffset(ve)),Ee=te.getEndOffset(ve);else if(de&&Ae&&Se!==Ee){const xe=y.BracketsUtils.findNextBracketInRange(de.forwardRegex,z,ge,Se,Ee);if(xe)return this._toFoundBracket(de,xe)}Ae=ze}if(de&&Ae&&Se!==Ee){const Ne=y.BracketsUtils.findNextBracketInRange(de.forwardRegex,z,ge,Se,Ee);if(Ne)return this._toFoundBracket(de,Ne)}}return null}findEnclosingBrackets(q,ne){let ce;if(typeof ne=="undefined")ce=null;else{const Ae=Date.now();ce=()=>Date.now()-Ae<=ne}const le=this.validatePosition(q),de=this.getLineCount(),z=new Map;let te=[];const he=(Ae,Ne)=>{if(!z.has(Ae)){let ze=[];for(let xe=0,We=Ne?Ne.brackets.length:0;xe<We;xe++)ze[xe]=0;z.set(Ae,ze)}te=z.get(Ae)};let ge=0;const ve=(Ae,Ne,ze,xe,We)=>{for(;;){if(ce&&++ge%100==0&&!ce())return K.INSTANCE;const Ue=y.BracketsUtils.findNextBracketInRange(Ae.forwardRegex,Ne,ze,xe,We);if(!Ue)break;const Le=ze.substring(Ue.startColumn-1,Ue.endColumn-1).toLowerCase(),ye=Ae.textIsBracket[Le];if(ye&&(ye.isOpen(Le)?te[ye.index]++:ye.isClose(Le)&&te[ye.index]--,te[ye.index]===-1))return this._matchFoundBracket(Ue,ye,!1,ce);xe=Ue.endColumn-1}return null};let Se=null,Ee=null;for(let Ae=le.lineNumber;Ae<=de;Ae++){const Ne=this._getLineTokens(Ae),ze=Ne.getCount(),xe=this._buffer.getLineContent(Ae);let We=0,Ue=0,Le=0;if(Ae===le.lineNumber){We=Ne.findTokenIndexAtOffset(le.column-1),Ue=le.column-1,Le=le.column-1;const Oe=Ne.getLanguageId(We);Se!==Oe&&(Se=Oe,Ee=this.getLanguageConfiguration(Se).brackets,he(Se,Ee))}let ye=!0;for(;We<ze;We++){const Oe=Ne.getLanguageId(We);if(Se!==Oe){if(Ee&&ye&&Ue!==Le){const Be=ve(Ee,Ae,xe,Ue,Le);if(Be)return H(Be);ye=!1}Se=Oe,Ee=this.getLanguageConfiguration(Se).brackets,he(Se,Ee)}const He=!!Ee&&!(0,f.ignoreBracketsInToken)(Ne.getStandardTokenType(We));if(He)ye||(Ue=Ne.getStartOffset(We)),Le=Ne.getEndOffset(We);else if(Ee&&ye&&Ue!==Le){const Be=ve(Ee,Ae,xe,Ue,Le);if(Be)return H(Be)}ye=He}if(Ee&&ye&&Ue!==Le){const Oe=ve(Ee,Ae,xe,Ue,Le);if(Oe)return H(Oe)}}return null}_toFoundBracket(q,ne){if(!ne)return null;let ce=this.getValueInRange(ne);ce=ce.toLowerCase();let le=q.textIsBracket[ce];return le?{range:ne,open:le.open,close:le.close,isOpen:q.textIsOpenBracket[ce]}:null}static computeIndentLevel(q,ne){let ce=0,le=0,de=q.length;for(;le<de;){let z=q.charCodeAt(le);if(z===32)ce++;else if(z===9)ce=ce-ce%ne+ne;else break;le++}return le===de?-1:ce}_computeIndentLevel(q){return lt.computeIndentLevel(this._buffer.getLineContent(q+1),this._options.tabSize)}getActiveIndentGuide(q,ne,ce){this._assertNotDisposed();const le=this.getLineCount();if(q<1||q>le)throw new Error("Illegal value for lineNumber");const de=this.getLanguageConfiguration(this._languageId).foldingRules,z=Boolean(de&&de.offSide);let te=-2,he=-1,ge=-2,ve=-1;const Se=Be=>{if(te!==-1&&(te===-2||te>Be-1)){te=-1,he=-1;for(let Ke=Be-2;Ke>=0;Ke--){let ke=this._computeIndentLevel(Ke);if(ke>=0){te=Ke,he=ke;break}}}if(ge===-2){ge=-1,ve=-1;for(let Ke=Be;Ke<le;Ke++){let ke=this._computeIndentLevel(Ke);if(ke>=0){ge=Ke,ve=ke;break}}}};let Ee=-2,Ae=-1,Ne=-2,ze=-1;const xe=Be=>{if(Ee===-2){Ee=-1,Ae=-1;for(let Ke=Be-2;Ke>=0;Ke--){let ke=this._computeIndentLevel(Ke);if(ke>=0){Ee=Ke,Ae=ke;break}}}if(Ne!==-1&&(Ne===-2||Ne<Be-1)){Ne=-1,ze=-1;for(let Ke=Be;Ke<le;Ke++){let ke=this._computeIndentLevel(Ke);if(ke>=0){Ne=Ke,ze=ke;break}}}};let We=0,Ue=!0,Le=0,ye=!0,Oe=0,He=0;for(let Be=0;Ue||ye;Be++){const Ke=q-Be,ke=q+Be;Be>1&&(Ke<1||Ke<ne)&&(Ue=!1),Be>1&&(ke>le||ke>ce)&&(ye=!1),Be>5e4&&(Ue=!1,ye=!1);let Ie=-1;if(Ue){const me=this._computeIndentLevel(Ke-1);me>=0?(ge=Ke-1,ve=me,Ie=Math.ceil(me/this._options.indentSize)):(Se(Ke),Ie=this._getIndentLevelForWhitespaceLine(z,he,ve))}let Me=-1;if(ye){const me=this._computeIndentLevel(ke-1);me>=0?(Ee=ke-1,Ae=me,Me=Math.ceil(me/this._options.indentSize)):(xe(ke),Me=this._getIndentLevelForWhitespaceLine(z,Ae,ze))}if(Be===0){He=Ie;continue}if(Be===1){if(ke<=le&&Me>=0&&He+1===Me){Ue=!1,We=ke,Le=ke,Oe=Me;continue}if(Ke>=1&&Ie>=0&&Ie-1===He){ye=!1,We=Ke,Le=Ke,Oe=Ie;continue}if(We=q,Le=q,Oe=He,Oe===0)return{startLineNumber:We,endLineNumber:Le,indent:Oe}}Ue&&(Ie>=Oe?We=Ke:Ue=!1),ye&&(Me>=Oe?Le=ke:ye=!1)}return{startLineNumber:We,endLineNumber:Le,indent:Oe}}getLinesBracketGuides(q,ne,ce,le){var de,z,te,he,ge;const ve=[],Se=this._bracketPairColorizer.getBracketPairsInRangeWithMinIndentation(new n.Range(q,1,ne,this.getLineMaxColumn(ne)));let Ee;if(ce&&Se.length>0){const We=q<=ce.lineNumber&&ce.lineNumber<=ne?Se.filter(Ue=>Ue.range.containsPosition(ce)):this._bracketPairColorizer.getBracketPairsInRange(n.Range.fromPositions(ce));Ee=(de=(0,E.findLast)(We,Ue=>Ue.range.startLineNumber!==Ue.range.endLineNumber))===null||de===void 0?void 0:de.range}const Ae=new E.ArrayQueue(Se),Ne=new Array,ze=new Array,xe=new Z;for(let We=q;We<=ne;We++){let Ue=new Array;ze.length>0&&(Ue=Ue.concat(ze),ze.length=0),ve.push(Ue);for(const ye of Ae.takeWhile(Oe=>Oe.openingBracketRange.startLineNumber<=We)||[]){if(ye.range.startLineNumber===ye.range.endLineNumber)continue;const Oe=Math.min(this.getVisibleColumnFromPosition(ye.openingBracketRange.getStartPosition()),this.getVisibleColumnFromPosition((te=(z=ye.closingBracketRange)===null||z===void 0?void 0:z.getStartPosition())!==null&&te!==void 0?te:ye.range.getEndPosition()),ye.minVisibleColumnIndentation+1);let He=!1;ye.closingBracketRange&&D.firstNonWhitespaceIndex(this.getLineContent(ye.closingBracketRange.startLineNumber))<ye.closingBracketRange.startColumn-1&&(He=!0);const Be=ye.openingBracketRange.getStartPosition(),Ke=(ge=(he=ye.closingBracketRange)===null||he===void 0?void 0:he.getStartPosition())!==null&&ge!==void 0?ge:ye.range.getEndPosition();ye.closingBracketRange===void 0?Ne[ye.nestingLevel]=null:Ne[ye.nestingLevel]={nestingLevel:ye.nestingLevel,guideVisibleColumn:Oe,start:Be,visibleStartColumn:this.getVisibleColumnFromPosition(Be),end:Ke,visibleEndColumn:this.getVisibleColumnFromPosition(Ke),bracketPair:ye,renderHorizontalEndLineAtTheBottom:He}}for(const ye of Ne){if(!ye)continue;const Oe=Ee&&ye.bracketPair.range.equalsRange(Ee),He=xe.getInlineClassNameOfLevel(ye.nestingLevel)+(le.highlightActive&&Oe?" "+xe.activeClassName:"");(Oe&&le.horizontalGuides!==t.HorizontalGuidesState.Disabled||le.includeInactive&&le.horizontalGuides===t.HorizontalGuidesState.Enabled)&&(ye.start.lineNumber===We&&ye.guideVisibleColumn<ye.visibleStartColumn&&Ue.push(new t.IndentGuide(ye.guideVisibleColumn,He,new t.IndentGuideHorizontalLine(!1,ye.start.column))),ye.end.lineNumber===We+1&&ye.guideVisibleColumn<ye.visibleEndColumn&&ze.push(new t.IndentGuide(ye.guideVisibleColumn,He,new t.IndentGuideHorizontalLine(!ye.renderHorizontalEndLineAtTheBottom,ye.end.column))))}let Le=Number.MAX_SAFE_INTEGER;for(let ye=Ne.length-1;ye>=0;ye--){const Oe=Ne[ye];if(!Oe)continue;const He=le.highlightActive&&Ee&&Oe.bracketPair.range.equalsRange(Ee),Be=xe.getInlineClassNameOfLevel(Oe.nestingLevel)+(He?" "+xe.activeClassName:"");(He||le.includeInactive)&&Oe.renderHorizontalEndLineAtTheBottom&&Oe.end.lineNumber===We+1&&ze.push(new t.IndentGuide(Oe.guideVisibleColumn,Be,null)),!(Oe.end.lineNumber<=We||Oe.start.lineNumber>=We)&&(Oe.guideVisibleColumn>=Le&&!He||(Le=Oe.guideVisibleColumn,(He||le.includeInactive)&&Ue.push(new t.IndentGuide(Oe.guideVisibleColumn,Be,null))))}Ue.sort((ye,Oe)=>ye.visibleColumn-Oe.visibleColumn)}return ve}getVisibleColumnFromPosition(q){return M.CursorColumns.visibleColumnFromColumn(this.getLineContent(q.lineNumber),q.column,this._options.tabSize)+1}getLinesIndentGuides(q,ne){this._assertNotDisposed();const ce=this.getLineCount();if(q<1||q>ce)throw new Error("Illegal value for startLineNumber");if(ne<1||ne>ce)throw new Error("Illegal value for endLineNumber");const le=this.getLanguageConfiguration(this._languageId).foldingRules,de=Boolean(le&&le.offSide);let z=new Array(ne-q+1),te=-2,he=-1,ge=-2,ve=-1;for(let Se=q;Se<=ne;Se++){let Ee=Se-q;const Ae=this._computeIndentLevel(Se-1);if(Ae>=0){te=Se-1,he=Ae,z[Ee]=Math.ceil(Ae/this._options.indentSize);continue}if(te===-2){te=-1,he=-1;for(let Ne=Se-2;Ne>=0;Ne--){let ze=this._computeIndentLevel(Ne);if(ze>=0){te=Ne,he=ze;break}}}if(ge!==-1&&(ge===-2||ge<Se-1)){ge=-1,ve=-1;for(let Ne=Se;Ne<ce;Ne++){let ze=this._computeIndentLevel(Ne);if(ze>=0){ge=Ne,ve=ze;break}}}z[Ee]=this._getIndentLevelForWhitespaceLine(de,he,ve)}return z}_getIndentLevelForWhitespaceLine(q,ne,ce){return ne===-1||ce===-1?0:ne<ce?1+Math.floor(ne/this._options.indentSize):ne===ce?Math.ceil(ce/this._options.indentSize):q?Math.ceil(ce/this._options.indentSize):1+Math.floor(ce/this._options.indentSize)}normalizePosition(q,ne){return q}getLineIndentColumn(q){return X(this.getLineContent(q))+1}};Y.MODEL_SYNC_LIMIT=50*1024*1024,Y.LARGE_FILE_SIZE_THRESHOLD=20*1024*1024,Y.LARGE_FILE_LINE_COUNT_THRESHOLD=300*1e3,Y.DEFAULT_CREATION_OPTIONS={isForSimpleWidget:!1,tabSize:p.EDITOR_MODEL_DEFAULTS.tabSize,indentSize:p.EDITOR_MODEL_DEFAULTS.indentSize,insertSpaces:p.EDITOR_MODEL_DEFAULTS.insertSpaces,detectIndentation:!1,defaultEOL:1,trimAutoWhitespace:p.EDITOR_MODEL_DEFAULTS.trimAutoWhitespace,largeFileOptimizations:p.EDITOR_MODEL_DEFAULTS.largeFileOptimizations,bracketPairColorizationOptions:p.EDITOR_MODEL_DEFAULTS.bracketPairColorizationOptions},Y=Fe([Ce(4,v.IUndoRedoService),Ce(5,P.IModeService),Ce(6,l.ILanguageConfigurationService)],Y),e.TextModel=Y;function X(ae){let q=0;for(const ne of ae)if(ne===" "||ne==="    ")q++;else break;return q}class Z{constructor(){this.activeClassName="indent-active"}getInlineClassNameOfLevel(q){return`bracket-indent-guide lvl-${q%30}`}}e.BracketPairGuidesClassNames=Z;function se(ae){return!!(ae.options.overviewRuler&&ae.options.overviewRuler.color)}function oe(ae){return!!ae.options.after||!!ae.options.before}class G{constructor(){this._decorationsTree0=new u.IntervalTree,this._decorationsTree1=new u.IntervalTree,this._injectedTextDecorationsTree=new u.IntervalTree}ensureAllNodesHaveRanges(q){this.getAll(q,0,!1,!1)}_ensureNodesHaveRanges(q,ne){for(const ce of ne)ce.range===null&&(ce.range=q.getRangeAt(ce.cachedAbsoluteStart,ce.cachedAbsoluteEnd));return ne}getAllInInterval(q,ne,ce,le,de){const z=q.getVersionId(),te=this._intervalSearch(ne,ce,le,de,z);return this._ensureNodesHaveRanges(q,te)}_intervalSearch(q,ne,ce,le,de){const z=this._decorationsTree0.intervalSearch(q,ne,ce,le,de),te=this._decorationsTree1.intervalSearch(q,ne,ce,le,de),he=this._injectedTextDecorationsTree.intervalSearch(q,ne,ce,le,de);return z.concat(te).concat(he)}getInjectedTextInInterval(q,ne,ce,le){const de=q.getVersionId(),z=this._injectedTextDecorationsTree.intervalSearch(ne,ce,le,!1,de);return this._ensureNodesHaveRanges(q,z).filter(te=>te.options.showIfCollapsed||!te.range.isEmpty())}getAllInjectedText(q,ne){const ce=q.getVersionId(),le=this._injectedTextDecorationsTree.search(ne,!1,ce);return this._ensureNodesHaveRanges(q,le).filter(de=>de.options.showIfCollapsed||!de.range.isEmpty())}getAll(q,ne,ce,le){const de=q.getVersionId(),z=this._search(ne,ce,le,de);return this._ensureNodesHaveRanges(q,z)}_search(q,ne,ce,le){if(ce)return this._decorationsTree1.search(q,ne,le);{const de=this._decorationsTree0.search(q,ne,le),z=this._decorationsTree1.search(q,ne,le),te=this._injectedTextDecorationsTree.search(q,ne,le);return de.concat(z).concat(te)}}collectNodesFromOwner(q){const ne=this._decorationsTree0.collectNodesFromOwner(q),ce=this._decorationsTree1.collectNodesFromOwner(q),le=this._injectedTextDecorationsTree.collectNodesFromOwner(q);return ne.concat(ce).concat(le)}collectNodesPostOrder(){const q=this._decorationsTree0.collectNodesPostOrder(),ne=this._decorationsTree1.collectNodesPostOrder(),ce=this._injectedTextDecorationsTree.collectNodesPostOrder();return q.concat(ne).concat(ce)}insert(q){oe(q)?this._injectedTextDecorationsTree.insert(q):se(q)?this._decorationsTree1.insert(q):this._decorationsTree0.insert(q)}delete(q){oe(q)?this._injectedTextDecorationsTree.delete(q):se(q)?this._decorationsTree1.delete(q):this._decorationsTree0.delete(q)}getNodeRange(q,ne){const ce=q.getVersionId();return ne.cachedVersionId!==ce&&this._resolveNode(ne,ce),ne.range===null&&(ne.range=q.getRangeAt(ne.cachedAbsoluteStart,ne.cachedAbsoluteEnd)),ne.range}_resolveNode(q,ne){oe(q)?this._injectedTextDecorationsTree.resolveNode(q,ne):se(q)?this._decorationsTree1.resolveNode(q,ne):this._decorationsTree0.resolveNode(q,ne)}acceptReplace(q,ne,ce,le){this._decorationsTree0.acceptReplace(q,ne,ce,le),this._decorationsTree1.acceptReplace(q,ne,ce,le),this._injectedTextDecorationsTree.acceptReplace(q,ne,ce,le)}}function x(ae){return ae.replace(/[^a-z0-9\-_]/gi," ")}class U{constructor(q){this.color=q.color||"",this.darkColor=q.darkColor||""}}class $ extends U{constructor(q){super(q);this._resolvedColor=null,this.position=typeof q.position=="number"?q.position:t.OverviewRulerLane.Center}getColor(q){return this._resolvedColor||(q.type!=="light"&&this.darkColor?this._resolvedColor=this._resolveColor(this.darkColor,q):this._resolvedColor=this._resolveColor(this.color,q)),this._resolvedColor}invalidateCachedColor(){this._resolvedColor=null}_resolveColor(q,ne){if(typeof q=="string")return q;let ce=q?ne.getColor(q.id):null;return ce?ce.toString():""}}e.ModelDecorationOverviewRulerOptions=$;class V extends U{constructor(q){super(q);this.position=q.position}getColor(q){return this._resolvedColor||(q.type!=="light"&&this.darkColor?this._resolvedColor=this._resolveColor(this.darkColor,q):this._resolvedColor=this._resolveColor(this.color,q)),this._resolvedColor}invalidateCachedColor(){this._resolvedColor=void 0}_resolveColor(q,ne){return typeof q=="string"?b.Color.fromHex(q):ne.getColor(q.id)}}e.ModelDecorationMinimapOptions=V;class Q{constructor(q){this.content=q.content||"",this.inlineClassName=q.inlineClassName||null,this.inlineClassNameAffectsLetterSpacing=q.inlineClassNameAffectsLetterSpacing||!1}static from(q){return q instanceof Q?q:new Q(q)}}e.ModelDecorationInjectedTextOptions=Q;class ue{constructor(q){this.description=q.description,this.stickiness=q.stickiness||0,this.zIndex=q.zIndex||0,this.className=q.className?x(q.className):null,this.hoverMessage=q.hoverMessage||null,this.glyphMarginHoverMessage=q.glyphMarginHoverMessage||null,this.isWholeLine=q.isWholeLine||!1,this.showIfCollapsed=q.showIfCollapsed||!1,this.collapseOnReplaceEdit=q.collapseOnReplaceEdit||!1,this.overviewRuler=q.overviewRuler?new $(q.overviewRuler):null,this.minimap=q.minimap?new V(q.minimap):null,this.glyphMarginClassName=q.glyphMarginClassName?x(q.glyphMarginClassName):null,this.linesDecorationsClassName=q.linesDecorationsClassName?x(q.linesDecorationsClassName):null,this.firstLineDecorationClassName=q.firstLineDecorationClassName?x(q.firstLineDecorationClassName):null,this.marginClassName=q.marginClassName?x(q.marginClassName):null,this.inlineClassName=q.inlineClassName?x(q.inlineClassName):null,this.inlineClassNameAffectsLetterSpacing=q.inlineClassNameAffectsLetterSpacing||!1,this.beforeContentClassName=q.beforeContentClassName?x(q.beforeContentClassName):null,this.afterContentClassName=q.afterContentClassName?x(q.afterContentClassName):null,this.after=q.after?Q.from(q.after):null,this.before=q.before?Q.from(q.before):null}static register(q){return new ue(q)}static createDynamic(q){return new ue(q)}}e.ModelDecorationOptions=ue,ue.EMPTY=ue.register({description:"empty"});const pe=[ue.register({description:"tracked-range-always-grows-when-typing-at-edges",stickiness:0}),ue.register({description:"tracked-range-never-grows-when-typing-at-edges",stickiness:1}),ue.register({description:"tracked-range-grows-only-when-typing-before",stickiness:2}),ue.register({description:"tracked-range-grows-only-when-typing-after",stickiness:3})];function fe(ae){return ae instanceof ue?ae:ue.createDynamic(ae)}class re extends T.Disposable{constructor(q){super();this.handleBeforeFire=q,this._actual=this._register(new N.Emitter),this.event=this._actual.event,this._affectedInjectedTextLines=null,this._deferredCnt=0,this._shouldFire=!1,this._affectsMinimap=!1,this._affectsOverviewRuler=!1}beginDeferredEmit(){this._deferredCnt++}endDeferredEmit(){var q;if(this._deferredCnt--,this._deferredCnt===0){if(this._shouldFire){this.handleBeforeFire(this._affectedInjectedTextLines);const ne={affectsMinimap:this._affectsMinimap,affectsOverviewRuler:this._affectsOverviewRuler};this._shouldFire=!1,this._affectsMinimap=!1,this._affectsOverviewRuler=!1,this._actual.fire(ne)}(q=this._affectedInjectedTextLines)===null||q===void 0||q.clear(),this._affectedInjectedTextLines=null}}recordLineAffectedByInjectedText(q){this._affectedInjectedTextLines||(this._affectedInjectedTextLines=new Set),this._affectedInjectedTextLines.add(q)}checkAffectedAndFire(q){this._affectsMinimap||(this._affectsMinimap=!!(q.minimap&&q.minimap.position)),this._affectsOverviewRuler||(this._affectsOverviewRuler=!!(q.overviewRuler&&q.overviewRuler.color)),this._shouldFire=!0}fire(){this._affectsMinimap=!0,this._affectsOverviewRuler=!0,this._shouldFire=!0}}e.DidChangeDecorationsEmitter=re;class ie extends T.Disposable{constructor(){super();this._fastEmitter=this._register(new N.Emitter),this.fastEvent=this._fastEmitter.event,this._slowEmitter=this._register(new N.Emitter),this.slowEvent=this._slowEmitter.event,this._deferredCnt=0,this._deferredEvent=null}beginDeferredEmit(){this._deferredCnt++}endDeferredEmit(q=null){if(this._deferredCnt--,this._deferredCnt===0&&this._deferredEvent!==null){this._deferredEvent.rawContentChangedEvent.resultingSelection=q;const ne=this._deferredEvent;this._deferredEvent=null,this._fastEmitter.fire(ne),this._slowEmitter.fire(ne)}}fire(q){if(this._deferredCnt>0){this._deferredEvent?this._deferredEvent=this._deferredEvent.merge(q):this._deferredEvent=q;return}this._fastEmitter.fire(q),this._slowEmitter.fire(q)}}e.DidChangeContentEmitter=ie}),define(J[659],ee([0,1,100,46,10,13,49,19,32,20,340]),function(j,e,w,N,T,D,S,p,C,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IndentGuidesOverlay=void 0;class g extends w.DynamicViewOverlay{constructor(c){super();this._context=c,this._primaryPosition=null;const u=this._context.configuration.options,d=u.get(130),a=u.get(43);this._lineHeight=u.get(58),this._spaceWidth=a.spaceWidth,this._maxIndentLeft=d.wrappingColumn===-1?-1:d.wrappingColumn*a.typicalHalfwidthCharacterWidth,this._bracketPairGuideOptions=u.get(13),this._renderResult=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(c){const u=this._context.configuration.options,d=u.get(130),a=u.get(43);return this._lineHeight=u.get(58),this._spaceWidth=a.spaceWidth,this._maxIndentLeft=d.wrappingColumn===-1?-1:d.wrappingColumn*a.typicalHalfwidthCharacterWidth,this._bracketPairGuideOptions=u.get(13),!0}onCursorStateChanged(c){var u;const a=c.selections[0].getPosition();return((u=this._primaryPosition)===null||u===void 0?void 0:u.equals(a))?!1:(this._primaryPosition=a,!0)}onDecorationsChanged(c){return!0}onFlushed(c){return!0}onLinesChanged(c){return!0}onLinesDeleted(c){return!0}onLinesInserted(c){return!0}onScrollChanged(c){return c.scrollTopChanged}onZonesChanged(c){return!0}onLanguageConfigurationChanged(c){return!0}prepareRender(c){var u,d,a,r;if(!this._bracketPairGuideOptions.indentation&&this._bracketPairGuideOptions.bracketPairs===!1){this._renderResult=null;return}const o=c.visibleRange.startLineNumber,i=c.visibleRange.endLineNumber,l=c.scrollWidth,h=this._lineHeight,f=this._primaryPosition,y=this.getGuidesByLine(o,i,f),_=[];for(let b=o;b<=i;b++){const v=b-o,m=y[v];let E="";const I=(d=(u=c.visibleRangeForPosition(new D.Position(b,1)))===null||u===void 0?void 0:u.left)!==null&&d!==void 0?d:0;for(const k of m){const M=I+(k.visibleColumn-1)*this._spaceWidth;if(M>l||this._maxIndentLeft>0&&M>this._maxIndentLeft)break;const P=k.horizontalLine?k.horizontalLine.top?"horizontal-top":"horizontal-bottom":"vertical",F=k.horizontalLine?((r=(a=c.visibleRangeForPosition(new D.Position(b,k.horizontalLine.endColumn)))===null||a===void 0?void 0:a.left)!==null&&r!==void 0?r:M+this._spaceWidth)-M:this._spaceWidth;E+=`<div class="core-guide ${k.className} ${P}" style="left:${M}px;height:${h}px;width:${F}px"></div>`}_[v]=E}this._renderResult=_}getGuidesByLine(c,u,d){const a=this._bracketPairGuideOptions.bracketPairs!==!1?this._context.model.getBracketGuidesInRangeByLine(c,u,d,{highlightActive:this._bracketPairGuideOptions.highlightActiveBracketPair,horizontalGuides:this._bracketPairGuideOptions.bracketPairsHorizontal===!0?S.HorizontalGuidesState.Enabled:this._bracketPairGuideOptions.bracketPairsHorizontal==="active"?S.HorizontalGuidesState.EnabledForActive:S.HorizontalGuidesState.Disabled,includeInactive:this._bracketPairGuideOptions.bracketPairs===!0}):null,r=this._bracketPairGuideOptions.indentation?this._context.model.getLinesIndentGuides(c,u):null;let o=0,i=0,l=0;if(this._bracketPairGuideOptions.highlightActiveIndentation&&d){const y=this._context.model.getActiveIndentGuide(d.lineNumber,c,u);o=y.startLineNumber,i=y.endLineNumber,l=y.indent}const{indentSize:h}=this._context.model.getTextModelOptions(),f=[];for(let y=c;y<=u;y++){const _=new Array;f.push(_);const b=a?a[y-c]:[],v=new p.ArrayQueue(b),m=r?r[y-c]:[];for(let E=1;E<=m;E++){const I=(E-1)*h+1,k=b.length===0&&o<=y&&y<=i&&E===l;_.push(...v.takeWhile(P=>P.visibleColumn<I)||[]);const M=v.peek();(!M||M.visibleColumn!==I||M.horizontalLine)&&_.push(new S.IndentGuide(I,k?"core-guide-indent-active":"core-guide-indent",null))}_.push(...v.takeWhile(E=>!0)||[])}return f}render(c,u){if(!this._renderResult)return"";const d=u-c;return d<0||d>=this._renderResult.length?"":this._renderResult[d]}}e.IndentGuidesOverlay=g;function t(s){if(!(s&&s.isTransparent()))return s}(0,T.registerThemingParticipant)((s,c)=>{const u=s.getColor(N.editorIndentGuides);u&&c.addRule(`.monaco-editor .lines-content .core-guide-indent { box-shadow: 1px 0 0 0 ${u} inset; }`);const d=s.getColor(N.editorActiveIndentGuides)||u;d&&c.addRule(`.monaco-editor .lines-content .core-guide-indent-active { box-shadow: 1px 0 0 0 ${d} inset; }`);const a=[{bracketColor:N.editorBracketHighlightingForeground1,guideColor:N.editorBracketPairGuideBackground1,guideColorActive:N.editorBracketPairGuideActiveBackground1},{bracketColor:N.editorBracketHighlightingForeground2,guideColor:N.editorBracketPairGuideBackground2,guideColorActive:N.editorBracketPairGuideActiveBackground2},{bracketColor:N.editorBracketHighlightingForeground3,guideColor:N.editorBracketPairGuideBackground3,guideColorActive:N.editorBracketPairGuideActiveBackground3},{bracketColor:N.editorBracketHighlightingForeground4,guideColor:N.editorBracketPairGuideBackground4,guideColorActive:N.editorBracketPairGuideActiveBackground4},{bracketColor:N.editorBracketHighlightingForeground5,guideColor:N.editorBracketPairGuideBackground5,guideColorActive:N.editorBracketPairGuideActiveBackground5},{bracketColor:N.editorBracketHighlightingForeground6,guideColor:N.editorBracketPairGuideBackground6,guideColorActive:N.editorBracketPairGuideActiveBackground6}],r=new C.BracketPairGuidesClassNames;let o=a.map(i=>{var l,h;const f=s.getColor(i.bracketColor),y=s.getColor(i.guideColor),_=s.getColor(i.guideColorActive),b=t((l=t(y))!==null&&l!==void 0?l:f==null?void 0:f.transparent(.3)),v=t((h=t(_))!==null&&h!==void 0?h:f);if(!(!b||!v))return{guideColor:b,guideColorActive:v}}).filter(n.isDefined);if(o.length>0){for(let i=0;i<30;i++){const l=o[i%o.length];c.addRule(`.monaco-editor .${r.getInlineClassNameOfLevel(i).replace(/ /g,".")} { --guide-color: ${l.guideColor}; --guide-color-active: ${l.guideColorActive}; }`)}c.addRule(".monaco-editor .vertical { box-shadow: 1px 0 0 0 var(--guide-color) inset; }"),c.addRule(".monaco-editor .horizontal-top { border-top: 1px solid var(--guide-color); }"),c.addRule(".monaco-editor .horizontal-bottom { border-bottom: 1px solid var(--guide-color); }"),c.addRule(`.monaco-editor .vertical.${r.activeClassName} { box-shadow: 1px 0 0 0 var(--guide-color-active) inset; }`),c.addRule(`.monaco-editor .horizontal-top.${r.activeClassName} { border-top: 1px solid var(--guide-color-active); }`),c.addRule(`.monaco-editor .horizontal-bottom.${r.activeClassName} { border-bottom: 1px solid var(--guide-color-active); }`)}})}),define(J[43],ee([0,1,11,13,3,22,32,37,140]),function(j,e,w,N,T,D,S,p,C){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.isQuote=e.EditOperationResult=e.CursorState=e.PartialViewCursorState=e.PartialModelCursorState=e.CursorContext=e.SingleCursorState=e.CursorConfiguration=e.CursorColumns=void 0,Object.defineProperty(e,"CursorColumns",{enumerable:!0,get:function(){return C.CursorColumns}});const n=()=>!0,g=()=>!1,t=l=>l===" "||l==="    ";class s{constructor(h,f,y){this._cursorMoveConfigurationBrand=void 0,this._languageId=h;const _=y.options,b=_.get(129);this.readOnly=_.get(80),this.tabSize=f.tabSize,this.indentSize=f.indentSize,this.insertSpaces=f.insertSpaces,this.stickyTabStops=_.get(103),this.lineHeight=_.get(58),this.pageSize=Math.max(1,Math.floor(b.height/this.lineHeight)-2),this.useTabStops=_.get(114),this.wordSeparators=_.get(115),this.emptySelectionClipboard=_.get(32),this.copyWithSyntaxHighlighting=_.get(21),this.multiCursorMergeOverlapping=_.get(68),this.multiCursorPaste=_.get(70),this.autoClosingBrackets=_.get(5),this.autoClosingQuotes=_.get(8),this.autoClosingDelete=_.get(6),this.autoClosingOvertype=_.get(7),this.autoSurround=_.get(11),this.autoIndent=_.get(9),this.surroundingPairs={},this._electricChars=null,this.shouldAutoCloseBefore={quote:s._getShouldAutoClose(h,this.autoClosingQuotes),bracket:s._getShouldAutoClose(h,this.autoClosingBrackets)},this.autoClosingPairs=p.LanguageConfigurationRegistry.getAutoClosingPairs(h);let v=s._getSurroundingPairs(h);if(v)for(const m of v)this.surroundingPairs[m.open]=m.close}static shouldRecreate(h){return h.hasChanged(129)||h.hasChanged(115)||h.hasChanged(32)||h.hasChanged(68)||h.hasChanged(70)||h.hasChanged(5)||h.hasChanged(8)||h.hasChanged(6)||h.hasChanged(7)||h.hasChanged(11)||h.hasChanged(114)||h.hasChanged(58)||h.hasChanged(80)}get electricChars(){if(!this._electricChars){this._electricChars={};let h=s._getElectricCharacters(this._languageId);if(h)for(const f of h)this._electricChars[f]=!0}return this._electricChars}normalizeIndentation(h){return S.TextModel.normalizeIndentation(h,this.indentSize,this.insertSpaces)}static _getElectricCharacters(h){try{return p.LanguageConfigurationRegistry.getElectricCharacters(h)}catch(f){return(0,w.onUnexpectedError)(f),null}}static _getShouldAutoClose(h,f){switch(f){case"beforeWhitespace":return t;case"languageDefined":return s._getLanguageDefinedShouldAutoClose(h);case"always":return n;case"never":return g}}static _getLanguageDefinedShouldAutoClose(h){try{const f=p.LanguageConfigurationRegistry.getAutoCloseBeforeSet(h);return y=>f.indexOf(y)!==-1}catch(f){return(0,w.onUnexpectedError)(f),g}}static _getSurroundingPairs(h){try{return p.LanguageConfigurationRegistry.getSurroundingPairs(h)}catch(f){return(0,w.onUnexpectedError)(f),null}}}e.CursorConfiguration=s;class c{constructor(h,f,y,_){this._singleCursorStateBrand=void 0,this.selectionStart=h,this.selectionStartLeftoverVisibleColumns=f,this.position=y,this.leftoverVisibleColumns=_,this.selection=c._computeSelection(this.selectionStart,this.position)}equals(h){return this.selectionStartLeftoverVisibleColumns===h.selectionStartLeftoverVisibleColumns&&this.leftoverVisibleColumns===h.leftoverVisibleColumns&&this.position.equals(h.position)&&this.selectionStart.equalsRange(h.selectionStart)}hasSelection(){return!this.selection.isEmpty()||!this.selectionStart.isEmpty()}move(h,f,y,_){return h?new c(this.selectionStart,this.selectionStartLeftoverVisibleColumns,new N.Position(f,y),_):new c(new T.Range(f,y,f,y),_,new N.Position(f,y),_)}static _computeSelection(h,f){let y,_,b,v;return h.isEmpty()?(y=h.startLineNumber,_=h.startColumn,b=f.lineNumber,v=f.column):f.isBeforeOrEqual(h.getStartPosition())?(y=h.endLineNumber,_=h.endColumn,b=f.lineNumber,v=f.column):(y=h.startLineNumber,_=h.startColumn,b=f.lineNumber,v=f.column),new D.Selection(y,_,b,v)}}e.SingleCursorState=c;class u{constructor(h,f,y,_){this._cursorContextBrand=void 0,this.model=h,this.viewModel=f,this.coordinatesConverter=y,this.cursorConfig=_}}e.CursorContext=u;class d{constructor(h){this.modelState=h,this.viewState=null}}e.PartialModelCursorState=d;class a{constructor(h){this.modelState=null,this.viewState=h}}e.PartialViewCursorState=a;class r{constructor(h,f){this._cursorStateBrand=void 0,this.modelState=h,this.viewState=f}static fromModelState(h){return new d(h)}static fromViewState(h){return new a(h)}static fromModelSelection(h){const f=h.selectionStartLineNumber,y=h.selectionStartColumn,_=h.positionLineNumber,b=h.positionColumn,v=new c(new T.Range(f,y,f,y),0,new N.Position(_,b),0);return r.fromModelState(v)}static fromModelSelections(h){let f=[];for(let y=0,_=h.length;y<_;y++)f[y]=this.fromModelSelection(h[y]);return f}equals(h){return this.viewState.equals(h.viewState)&&this.modelState.equals(h.modelState)}}e.CursorState=r;class o{constructor(h,f,y){this._editOperationResultBrand=void 0,this.type=h,this.commands=f,this.shouldPushStackElementBefore=y.shouldPushStackElementBefore,this.shouldPushStackElementAfter=y.shouldPushStackElementAfter}}e.EditOperationResult=o;function i(l){return l==="'"||l==='"'||l==="`"}e.isQuote=i}),define(J[195],ee([0,1,8,43,3,22,37]),function(j,e,w,N,T,D,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ShiftCommand=e.cachedStringRepeat=void 0;const p=Object.create(null);function C(g,t){if(t<=0)return"";p[g]||(p[g]=["",g]);const s=p[g];for(let c=s.length;c<=t;c++)s[c]=s[c-1]+g;return s[t]}e.cachedStringRepeat=C;class n{constructor(t,s){this._opts=s,this._selection=t,this._selectionId=null,this._useLastEditRangeForCursorEndPosition=!1,this._selectionStartColumnStaysPut=!1}static unshiftIndent(t,s,c,u,d){const a=N.CursorColumns.visibleColumnFromColumn(t,s,c);if(d){const r=C(" ",u),i=N.CursorColumns.prevIndentTabStop(a,u)/u;return C(r,i)}else{const r="    ",i=N.CursorColumns.prevRenderTabStop(a,c)/c;return C(r,i)}}static shiftIndent(t,s,c,u,d){const a=N.CursorColumns.visibleColumnFromColumn(t,s,c);if(d){const r=C(" ",u),i=N.CursorColumns.nextIndentTabStop(a,u)/u;return C(r,i)}else{const r="    ",i=N.CursorColumns.nextRenderTabStop(a,c)/c;return C(r,i)}}_addEditOperation(t,s,c){this._useLastEditRangeForCursorEndPosition?t.addTrackedEditOperation(s,c):t.addEditOperation(s,c)}getEditOperations(t,s){const c=this._selection.startLineNumber;let u=this._selection.endLineNumber;this._selection.endColumn===1&&c!==u&&(u=u-1);const{tabSize:d,indentSize:a,insertSpaces:r}=this._opts,o=c===u;if(this._opts.useTabStops){this._selection.isEmpty()&&/^\s*$/.test(t.getLineContent(c))&&(this._useLastEditRangeForCursorEndPosition=!0);let i=0,l=0;for(let h=c;h<=u;h++,i=l){l=0;let f=t.getLineContent(h),y=w.firstNonWhitespaceIndex(f);if(this._opts.isUnshift&&(f.length===0||y===0)||!o&&!this._opts.isUnshift&&f.length===0)continue;if(y===-1&&(y=f.length),h>1&&N.CursorColumns.visibleColumnFromColumn(f,y+1,d)%a!=0&&t.isCheapToTokenize(h-1)){let v=S.LanguageConfigurationRegistry.getEnterAction(this._opts.autoIndent,t,new T.Range(h-1,t.getLineMaxColumn(h-1),h-1,t.getLineMaxColumn(h-1)));if(v){if(l=i,v.appendText)for(let m=0,E=v.appendText.length;m<E&&l<a&&v.appendText.charCodeAt(m)===32;m++)l++;v.removeText&&(l=Math.max(0,l-v.removeText));for(let m=0;m<l&&!(y===0||f.charCodeAt(y-1)!==32);m++)y--}}if(this._opts.isUnshift&&y===0)continue;let _;this._opts.isUnshift?_=n.unshiftIndent(f,y+1,d,a,r):_=n.shiftIndent(f,y+1,d,a,r),this._addEditOperation(s,new T.Range(h,1,h,y+1),_),h===c&&!this._selection.isEmpty()&&(this._selectionStartColumnStaysPut=this._selection.startColumn<=y+1)}}else{!this._opts.isUnshift&&this._selection.isEmpty()&&t.getLineLength(c)===0&&(this._useLastEditRangeForCursorEndPosition=!0);const i=r?C(" ",a):"    ";for(let l=c;l<=u;l++){const h=t.getLineContent(l);let f=w.firstNonWhitespaceIndex(h);if(!(this._opts.isUnshift&&(h.length===0||f===0))&&!(!o&&!this._opts.isUnshift&&h.length===0)&&(f===-1&&(f=h.length),!(this._opts.isUnshift&&f===0)))if(this._opts.isUnshift){f=Math.min(f,a);for(let y=0;y<f;y++)if(h.charCodeAt(y)===9){f=y+1;break}this._addEditOperation(s,new T.Range(l,1,l,f+1),"")}else this._addEditOperation(s,new T.Range(l,1,l,1),i),l===c&&!this._selection.isEmpty()&&(this._selectionStartColumnStaysPut=this._selection.startColumn===1)}}this._selectionId=s.trackSelection(this._selection)}computeCursorState(t,s){if(this._useLastEditRangeForCursorEndPosition){let u=s.getInverseEditOperations()[0];return new D.Selection(u.range.endLineNumber,u.range.endColumn,u.range.endLineNumber,u.range.endColumn)}const c=s.getTrackedSelection(this._selectionId);if(this._selectionStartColumnStaysPut){let u=this._selection.startColumn;return c.startColumn<=u?c:c.getDirection()===0?new D.Selection(c.startLineNumber,u,c.endLineNumber,c.endColumn):new D.Selection(c.endLineNumber,c.endColumn,c.startLineNumber,u)}return c}}e.ShiftCommand=n}),define(J[276],ee([0,1,43]),function(j,e,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AtomicTabMoveOperations=void 0;class N{static whitespaceVisibleColumn(D,S,p){const C=D.length;let n=0,g=-1,t=-1;for(let s=0;s<C;s++){if(s===S)return[g,t,n];switch(n%p==0&&(g=s,t=n),D.charCodeAt(s)){case 32:n+=1;break;case 9:n=w.CursorColumns.nextRenderTabStop(n,p);break;default:return[-1,-1,-1]}}return S===C?[g,t,n]:[-1,-1,-1]}static atomicPosition(D,S,p,C){const n=D.length,[g,t,s]=N.whitespaceVisibleColumn(D,S,p);if(s===-1)return-1;let c;switch(C){case 0:c=!0;break;case 1:c=!1;break;case 2:if(s%p==0)return S;c=s%p<=p/2;break}if(c){if(g===-1)return-1;let a=t;for(let r=g;r<n;++r){if(a===t+p)return g;switch(D.charCodeAt(r)){case 32:a+=1;break;case 9:a=w.CursorColumns.nextRenderTabStop(a,p);break;default:return-1}}return a===t+p?g:-1}const u=w.CursorColumns.nextRenderTabStop(s,p);let d=s;for(let a=S;a<n;a++){if(d===u)return a;switch(D.charCodeAt(a)){case 32:d+=1;break;case 9:d=w.CursorColumns.nextRenderTabStop(d,p);break;default:return-1}}return d===u?n:-1}}e.AtomicTabMoveOperations=N}),define(J[196],ee([0,1,172,50,267,13,3,43,7,276]),function(j,e,w,N,T,D,S,p,C,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.shadowCaretRangeFromPoint=e.MouseTargetFactory=e.HitTestContext=e.MouseTarget=e.PointerHandlerLastRenderData=void 0;class g{constructor(b=null){this.hitTarget=b,this.type=0}}class t{constructor(b,v,m){this.position=b,this.spanNode=v,this.injectedText=m,this.type=1}}var s;(function(_){function b(v,m,E){const I=v.getPositionFromDOMInfo(m,E);return I?new t(I,m,null):new g(m)}_.createFromDOMInfo=b})(s||(s={}));class c{constructor(b,v){this.lastViewCursorsRenderData=b,this.lastTextareaPosition=v}}e.PointerHandlerLastRenderData=c;class u{constructor(b,v,m=0,E=null,I=null,k=null){this.element=b,this.type=v,this.mouseColumn=m,this.position=E,!I&&E&&(I=new S.Range(E.lineNumber,E.column,E.lineNumber,E.column)),this.range=I,this.detail=k}static _typeToString(b){return b===1?"TEXTAREA":b===2?"GUTTER_GLYPH_MARGIN":b===3?"GUTTER_LINE_NUMBERS":b===4?"GUTTER_LINE_DECORATIONS":b===5?"GUTTER_VIEW_ZONE":b===6?"CONTENT_TEXT":b===7?"CONTENT_EMPTY":b===8?"CONTENT_VIEW_ZONE":b===9?"CONTENT_WIDGET":b===10?"OVERVIEW_RULER":b===11?"SCROLLBAR":b===12?"OVERLAY_WIDGET":"UNKNOWN"}static toString(b){return this._typeToString(b.type)+": "+b.position+" - "+b.range+" - "+b.detail}toString(){return u.toString(this)}}e.MouseTarget=u;class d{static isTextArea(b){return b.length===2&&b[0]===3&&b[1]===6}static isChildOfViewLines(b){return b.length>=4&&b[0]===3&&b[3]===7}static isStrictChildOfViewLines(b){return b.length>4&&b[0]===3&&b[3]===7}static isChildOfScrollableElement(b){return b.length>=2&&b[0]===3&&b[1]===5}static isChildOfMinimap(b){return b.length>=2&&b[0]===3&&b[1]===8}static isChildOfContentWidgets(b){return b.length>=4&&b[0]===3&&b[3]===1}static isChildOfOverflowingContentWidgets(b){return b.length>=1&&b[0]===2}static isChildOfOverlayWidgets(b){return b.length>=2&&b[0]===3&&b[1]===4}}class a{constructor(b,v,m){this.model=b.model;const E=b.configuration.options;this.layoutInfo=E.get(129),this.viewDomNode=v.viewDomNode,this.lineHeight=E.get(58),this.stickyTabStops=E.get(103),this.typicalHalfwidthCharacterWidth=E.get(43).typicalHalfwidthCharacterWidth,this.lastRenderData=m,this._context=b,this._viewHelper=v}getZoneAtCoord(b){return a.getZoneAtCoord(this._context,b)}static getZoneAtCoord(b,v){const m=b.viewLayout.getWhitespaceAtVerticalOffset(v);if(m){const E=m.verticalOffset+m.height/2,I=b.model.getLineCount();let k=null,M,P=null;return m.afterLineNumber!==I&&(P=new D.Position(m.afterLineNumber+1,1)),m.afterLineNumber>0&&(k=new D.Position(m.afterLineNumber,b.model.getLineMaxColumn(m.afterLineNumber))),P===null?M=k:k===null?M=P:v<E?M=k:M=P,{viewZoneId:m.id,afterLineNumber:m.afterLineNumber,positionBefore:k,positionAfter:P,position:M}}return null}getFullLineRangeAtCoord(b){if(this._context.viewLayout.isAfterLines(b)){const E=this._context.model.getLineCount(),I=this._context.model.getLineMaxColumn(E);return{range:new S.Range(E,I,E,I),isAfterLines:!0}}const v=this._context.viewLayout.getLineNumberAtVerticalOffset(b),m=this._context.model.getLineMaxColumn(v);return{range:new S.Range(v,1,v,m),isAfterLines:!1}}getLineNumberAtVerticalOffset(b){return this._context.viewLayout.getLineNumberAtVerticalOffset(b)}isAfterLines(b){return this._context.viewLayout.isAfterLines(b)}isInTopPadding(b){return this._context.viewLayout.isInTopPadding(b)}isInBottomPadding(b){return this._context.viewLayout.isInBottomPadding(b)}getVerticalOffsetForLineNumber(b){return this._context.viewLayout.getVerticalOffsetForLineNumber(b)}findAttribute(b,v){return a._findAttribute(b,v,this._viewHelper.viewDomNode)}static _findAttribute(b,v,m){for(;b&&b!==document.body;){if(b.hasAttribute&&b.hasAttribute(v))return b.getAttribute(v);if(b===m)return null;b=b.parentNode}return null}getLineWidth(b){return this._viewHelper.getLineWidth(b)}visibleRangeForPosition(b,v){return this._viewHelper.visibleRangeForPosition(b,v)}getPositionFromDOMInfo(b,v){return this._viewHelper.getPositionFromDOMInfo(b,v)}getCurrentScrollTop(){return this._context.viewLayout.getCurrentScrollTop()}getCurrentScrollLeft(){return this._context.viewLayout.getCurrentScrollLeft()}}e.HitTestContext=a;class r{constructor(b,v,m){this.editorPos=v,this.pos=m,this.mouseVerticalOffset=Math.max(0,b.getCurrentScrollTop()+m.y-v.y),this.mouseContentHorizontalOffset=b.getCurrentScrollLeft()+m.x-v.x-b.layoutInfo.contentLeft,this.isInMarginArea=m.x-v.x<b.layoutInfo.contentLeft&&m.x-v.x>=b.layoutInfo.glyphMarginLeft,this.isInContentArea=!this.isInMarginArea,this.mouseColumn=Math.max(0,h._getMouseColumn(this.mouseContentHorizontalOffset,b.typicalHalfwidthCharacterWidth))}}class o extends r{constructor(b,v,m,E){super(b,v,m);this._ctx=b,E?(this.target=E,this.targetPath=N.PartFingerprints.collect(E,b.viewDomNode)):(this.target=null,this.targetPath=new Uint8Array(0))}toString(){return`pos(${this.pos.x},${this.pos.y}), editorPos(${this.editorPos.x},${this.editorPos.y}), mouseVerticalOffset: ${this.mouseVerticalOffset}, mouseContentHorizontalOffset: ${this.mouseContentHorizontalOffset}
    target: ${this.target?this.target.outerHTML:null}`}fulfill(b,v=null,m=null,E=null){let I=this.mouseColumn;return v&&v.column<this._ctx.model.getLineMaxColumn(v.lineNumber)&&(I=p.CursorColumns.visibleColumnFromColumn(this._ctx.model.getLineContent(v.lineNumber),v.column,this._ctx.model.getTextModelOptions().tabSize)+1),new u(this.target,b,I,v,m,E)}withTarget(b){return new o(this._ctx,this.editorPos,this.pos,b)}}const i={isAfterLines:!0};function l(_){return{isAfterLines:!1,horizontalDistanceToText:_}}class h{constructor(b,v){this._context=b,this._viewHelper=v}mouseTargetIsWidget(b){const v=b.target,m=N.PartFingerprints.collect(v,this._viewHelper.viewDomNode);return!!(d.isChildOfContentWidgets(m)||d.isChildOfOverflowingContentWidgets(m)||d.isChildOfOverlayWidgets(m))}createMouseTarget(b,v,m,E){const I=new a(this._context,this._viewHelper,b),k=new o(I,v,m,E);try{return h._createMouseTarget(I,k,!1)}catch(M){return k.fulfill(0)}}static _createMouseTarget(b,v,m){if(v.target===null){if(m)return v.fulfill(0);const k=h._doHitTest(b,v);return k.type===1?h.createMouseTargetFromHitTestPosition(b,v,k.spanNode,k.position,k.injectedText):this._createMouseTarget(b,v.withTarget(k.hitTarget),!0)}const E=v;let I=null;return I=I||h._hitTestContentWidget(b,E),I=I||h._hitTestOverlayWidget(b,E),I=I||h._hitTestMinimap(b,E),I=I||h._hitTestScrollbarSlider(b,E),I=I||h._hitTestViewZone(b,E),I=I||h._hitTestMargin(b,E),I=I||h._hitTestViewCursor(b,E),I=I||h._hitTestTextArea(b,E),I=I||h._hitTestViewLines(b,E,m),I=I||h._hitTestScrollbar(b,E),I||v.fulfill(0)}static _hitTestContentWidget(b,v){if(d.isChildOfContentWidgets(v.targetPath)||d.isChildOfOverflowingContentWidgets(v.targetPath)){const m=b.findAttribute(v.target,"widgetId");return m?v.fulfill(9,null,null,m):v.fulfill(0)}return null}static _hitTestOverlayWidget(b,v){if(d.isChildOfOverlayWidgets(v.targetPath)){const m=b.findAttribute(v.target,"widgetId");return m?v.fulfill(12,null,null,m):v.fulfill(0)}return null}static _hitTestViewCursor(b,v){if(v.target){const m=b.lastRenderData.lastViewCursorsRenderData;for(const E of m)if(v.target===E.domNode)return v.fulfill(6,E.position,null,{mightBeForeignElement:!1})}if(v.isInContentArea){const m=b.lastRenderData.lastViewCursorsRenderData,E=v.mouseContentHorizontalOffset,I=v.mouseVerticalOffset;for(const k of m){if(E<k.contentLeft||E>k.contentLeft+k.width)continue;const M=b.getVerticalOffsetForLineNumber(k.position.lineNumber);if(M<=I&&I<=M+k.height)return v.fulfill(6,k.position,null,{mightBeForeignElement:!1})}}return null}static _hitTestViewZone(b,v){const m=b.getZoneAtCoord(v.mouseVerticalOffset);if(m){const E=v.isInContentArea?8:5;return v.fulfill(E,m.position,null,m)}return null}static _hitTestTextArea(b,v){return d.isTextArea(v.targetPath)?b.lastRenderData.lastTextareaPosition?v.fulfill(6,b.lastRenderData.lastTextareaPosition,null,{mightBeForeignElement:!1}):v.fulfill(1,b.lastRenderData.lastTextareaPosition):null}static _hitTestMargin(b,v){if(v.isInMarginArea){const m=b.getFullLineRangeAtCoord(v.mouseVerticalOffset),E=m.range.getStartPosition();let I=Math.abs(v.pos.x-v.editorPos.x);const k={isAfterLines:m.isAfterLines,glyphMarginLeft:b.layoutInfo.glyphMarginLeft,glyphMarginWidth:b.layoutInfo.glyphMarginWidth,lineNumbersWidth:b.layoutInfo.lineNumbersWidth,offsetX:I};return I-=b.layoutInfo.glyphMarginLeft,I<=b.layoutInfo.glyphMarginWidth?v.fulfill(2,E,m.range,k):(I-=b.layoutInfo.glyphMarginWidth,I<=b.layoutInfo.lineNumbersWidth?v.fulfill(3,E,m.range,k):(I-=b.layoutInfo.lineNumbersWidth,v.fulfill(4,E,m.range,k)))}return null}static _hitTestViewLines(b,v,m){if(!d.isChildOfViewLines(v.targetPath))return null;if(b.isInTopPadding(v.mouseVerticalOffset))return v.fulfill(7,new D.Position(1,1),null,i);if(b.isAfterLines(v.mouseVerticalOffset)||b.isInBottomPadding(v.mouseVerticalOffset)){const I=b.model.getLineCount(),k=b.model.getLineMaxColumn(I);return v.fulfill(7,new D.Position(I,k),null,i)}if(m){if(d.isStrictChildOfViewLines(v.targetPath)){const I=b.getLineNumberAtVerticalOffset(v.mouseVerticalOffset);if(b.model.getLineLength(I)===0){const M=b.getLineWidth(I),P=l(v.mouseContentHorizontalOffset-M);return v.fulfill(7,new D.Position(I,1),null,P)}const k=b.getLineWidth(I);if(v.mouseContentHorizontalOffset>=k){const M=l(v.mouseContentHorizontalOffset-k),P=new D.Position(I,b.model.getLineMaxColumn(I));return v.fulfill(7,P,null,M)}}return v.fulfill(0)}const E=h._doHitTest(b,v);return E.type===1?h.createMouseTargetFromHitTestPosition(b,v,E.spanNode,E.position,E.injectedText):this._createMouseTarget(b,v.withTarget(E.hitTarget),!0)}static _hitTestMinimap(b,v){if(d.isChildOfMinimap(v.targetPath)){const m=b.getLineNumberAtVerticalOffset(v.mouseVerticalOffset),E=b.model.getLineMaxColumn(m);return v.fulfill(11,new D.Position(m,E))}return null}static _hitTestScrollbarSlider(b,v){if(d.isChildOfScrollableElement(v.targetPath)&&v.target&&v.target.nodeType===1){const m=v.target.className;if(m&&/\b(slider|scrollbar)\b/.test(m)){const E=b.getLineNumberAtVerticalOffset(v.mouseVerticalOffset),I=b.model.getLineMaxColumn(E);return v.fulfill(11,new D.Position(E,I))}}return null}static _hitTestScrollbar(b,v){if(d.isChildOfScrollableElement(v.targetPath)){const m=b.getLineNumberAtVerticalOffset(v.mouseVerticalOffset),E=b.model.getLineMaxColumn(m);return v.fulfill(11,new D.Position(m,E))}return null}getMouseColumn(b,v){const m=this._context.configuration.options,E=m.get(129),I=this._context.viewLayout.getCurrentScrollLeft()+v.x-b.x-E.contentLeft;return h._getMouseColumn(I,m.get(43).typicalHalfwidthCharacterWidth)}static _getMouseColumn(b,v){return b<0?1:Math.round(b/v)+1}static createMouseTargetFromHitTestPosition(b,v,m,E,I){const k=E.lineNumber,M=E.column,P=b.getLineWidth(k);if(v.mouseContentHorizontalOffset>P){const K=l(v.mouseContentHorizontalOffset-P);return v.fulfill(7,E,null,K)}const F=b.visibleRangeForPosition(k,M);if(!F)return v.fulfill(0,E);const R=F.left;if(v.mouseContentHorizontalOffset===R)return v.fulfill(6,E,null,{mightBeForeignElement:!!I});const A=[];if(A.push({offset:F.left,column:M}),M>1){const K=b.visibleRangeForPosition(k,M-1);K&&A.push({offset:K.left,column:M-1})}const O=b.model.getLineMaxColumn(k);if(M<O){const K=b.visibleRangeForPosition(k,M+1);K&&A.push({offset:K.left,column:M+1})}A.sort((K,H)=>K.offset-H.offset);const L=v.pos.toClientCoordinates(),B=m.getBoundingClientRect(),W=B.left<=L.clientX&&L.clientX<=B.right;for(let K=1;K<A.length;K++){const H=A[K-1],Y=A[K];if(H.offset<=v.mouseContentHorizontalOffset&&v.mouseContentHorizontalOffset<=Y.offset){const X=new S.Range(k,H.column,k,Y.column);return v.fulfill(6,E,X,{mightBeForeignElement:!W||!!I})}}return v.fulfill(6,E,null,{mightBeForeignElement:!W||!!I})}static _doHitTestWithCaretRangeFromPoint(b,v){const m=b.getLineNumberAtVerticalOffset(v.mouseVerticalOffset),I=b.getVerticalOffsetForLineNumber(m)+Math.floor(b.lineHeight/2);let k=v.pos.y+(I-v.mouseVerticalOffset);k<=v.editorPos.y&&(k=v.editorPos.y+1),k>=v.editorPos.y+b.layoutInfo.height&&(k=v.editorPos.y+b.layoutInfo.height-1);const M=new w.PageCoordinates(v.pos.x,k),P=this._actualDoHitTestWithCaretRangeFromPoint(b,M.toClientCoordinates());return P.type===1?P:this._actualDoHitTestWithCaretRangeFromPoint(b,v.pos.toClientCoordinates())}static _actualDoHitTestWithCaretRangeFromPoint(b,v){const m=C.getShadowRoot(b.viewDomNode);let E;if(m?typeof m.caretRangeFromPoint=="undefined"?E=f(m,v.clientX,v.clientY):E=m.caretRangeFromPoint(v.clientX,v.clientY):E=document.caretRangeFromPoint(v.clientX,v.clientY),!E||!E.startContainer)return new g;const I=E.startContainer;if(I.nodeType===I.TEXT_NODE){const k=I.parentNode,M=k?k.parentNode:null,P=M?M.parentNode:null;return(P&&P.nodeType===P.ELEMENT_NODE?P.className:null)===T.ViewLine.CLASS_NAME?s.createFromDOMInfo(b,k,E.startOffset):new g(I.parentNode)}else if(I.nodeType===I.ELEMENT_NODE){const k=I.parentNode,M=k?k.parentNode:null;return(M&&M.nodeType===M.ELEMENT_NODE?M.className:null)===T.ViewLine.CLASS_NAME?s.createFromDOMInfo(b,I,I.textContent.length):new g(I)}return new g}static _doHitTestWithCaretPositionFromPoint(b,v){const m=document.caretPositionFromPoint(v.clientX,v.clientY);if(m.offsetNode.nodeType===m.offsetNode.TEXT_NODE){const E=m.offsetNode.parentNode,I=E?E.parentNode:null,k=I?I.parentNode:null;return(k&&k.nodeType===k.ELEMENT_NODE?k.className:null)===T.ViewLine.CLASS_NAME?s.createFromDOMInfo(b,m.offsetNode.parentNode,m.offset):new g(m.offsetNode.parentNode)}if(m.offsetNode.nodeType===m.offsetNode.ELEMENT_NODE){const E=m.offsetNode.parentNode,I=E&&E.nodeType===E.ELEMENT_NODE?E.className:null,k=E?E.parentNode:null,M=k&&k.nodeType===k.ELEMENT_NODE?k.className:null;if(I===T.ViewLine.CLASS_NAME){const P=m.offsetNode.childNodes[Math.min(m.offset,m.offsetNode.childNodes.length-1)];if(P)return s.createFromDOMInfo(b,P,0)}else if(M===T.ViewLine.CLASS_NAME)return s.createFromDOMInfo(b,m.offsetNode,0)}return new g(m.offsetNode)}static _snapToSoftTabBoundary(b,v){const m=v.getLineContent(b.lineNumber),{tabSize:E}=v.getTextModelOptions(),I=n.AtomicTabMoveOperations.atomicPosition(m,b.column-1,E,2);return I!==-1?new D.Position(b.lineNumber,I+1):b}static _doHitTest(b,v){let m=new g;if(typeof document.caretRangeFromPoint=="function"?m=this._doHitTestWithCaretRangeFromPoint(b,v):document.caretPositionFromPoint&&(m=this._doHitTestWithCaretPositionFromPoint(b,v.pos.toClientCoordinates())),m.type===1){const E=b.model.getInjectedTextAt(m.position),I=b.model.normalizePosition(m.position,2);(E||!I.equals(m.position))&&(m=new t(I,m.spanNode,E))}return m.type===1&&b.stickyTabStops&&(m=new t(this._snapToSoftTabBoundary(m.position,b.model),m.spanNode,m.injectedText)),m}}e.MouseTargetFactory=h;function f(_,b,v){const m=document.createRange();let E=_.elementFromPoint(b,v);if(E!==null){for(;E&&E.firstChild&&E.firstChild.nodeType!==E.firstChild.TEXT_NODE&&E.lastChild&&E.lastChild.firstChild;)E=E.lastChild;const I=E.getBoundingClientRect(),k=window.getComputedStyle(E,null).getPropertyValue("font"),M=E.innerText;let P=I.left,F=0,R;if(b>I.left+I.width)F=M.length;else{const A=y.getInstance();for(let O=0;O<M.length+1;O++){if(R=A.getCharWidth(M.charAt(O),k)/2,P+=R,b<P){F=O;break}P+=R}}m.setStart(E.firstChild,F),m.setEnd(E.firstChild,F)}return m}e.shadowCaretRangeFromPoint=f;class y{constructor(){this._cache={},this._canvas=document.createElement("canvas")}static getInstance(){return y._INSTANCE||(y._INSTANCE=new y),y._INSTANCE}getCharWidth(b,v){const m=b+v;if(this._cache[m])return this._cache[m];const E=this._canvas.getContext("2d");E.font=v;const k=E.measureText(b).width;return this._cache[m]=k,k}}y._INSTANCE=null}),define(J[660],ee([0,1,7,56,14,2,17,196,172,139,13,22,119]),function(j,e,w,N,T,D,S,p,C,n,g,t,s){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MouseHandler=e.createMouseMoveEventMerger=void 0;function c(r){return function(o,i){let l=!1;return r&&(l=r.mouseTargetIsWidget(i)),l||i.preventDefault(),i}}e.createMouseMoveEventMerger=c;class u extends s.ViewEventHandler{constructor(o,i,l){super();this._context=o,this.viewController=i,this.viewHelper=l,this.mouseTargetFactory=new p.MouseTargetFactory(this._context,l),this._mouseDownOperation=this._register(new d(this._context,this.viewController,this.viewHelper,(y,_)=>this._createMouseTarget(y,_),y=>this._getMouseColumn(y))),this.lastMouseLeaveTime=-1,this._height=this._context.configuration.options.get(129).height;const h=new C.EditorMouseEventFactory(this.viewHelper.viewDomNode);this._register(h.onContextMenu(this.viewHelper.viewDomNode,y=>this._onContextMenu(y,!0))),this._register(h.onMouseMoveThrottled(this.viewHelper.viewDomNode,y=>this._onMouseMove(y),c(this.mouseTargetFactory),u.MOUSE_MOVE_MINIMUM_TIME)),this._register(h.onMouseUp(this.viewHelper.viewDomNode,y=>this._onMouseUp(y))),this._register(h.onMouseLeave(this.viewHelper.viewDomNode,y=>this._onMouseLeave(y))),this._register(h.onMouseDown(this.viewHelper.viewDomNode,y=>this._onMouseDown(y)));const f=y=>{if(this.viewController.emitMouseWheel(y),!this._context.configuration.options.get(67))return;const _=new N.StandardWheelEvent(y);if(S.isMacintosh?(y.metaKey||y.ctrlKey)&&!y.shiftKey&&!y.altKey:y.ctrlKey&&!y.metaKey&&!y.shiftKey&&!y.altKey){const v=n.EditorZoom.getZoomLevel(),m=_.deltaY>0?1:-1;n.EditorZoom.setZoomLevel(v+m),_.preventDefault(),_.stopPropagation()}};this._register(w.addDisposableListener(this.viewHelper.viewDomNode,w.EventType.MOUSE_WHEEL,f,{capture:!0,passive:!1})),this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),super.dispose()}onConfigurationChanged(o){if(o.hasChanged(129)){const i=this._context.configuration.options.get(129).height;this._height!==i&&(this._height=i,this._mouseDownOperation.onHeightChanged())}return!1}onCursorStateChanged(o){return this._mouseDownOperation.onCursorStateChanged(o),!1}onFocusChanged(o){return!1}onScrollChanged(o){return this._mouseDownOperation.onScrollChanged(),!1}getTargetAtClientPoint(o,i){const h=new C.ClientCoordinates(o,i).toPageCoordinates(),f=(0,C.createEditorPagePosition)(this.viewHelper.viewDomNode);return h.y<f.y||h.y>f.y+f.height||h.x<f.x||h.x>f.x+f.width?null:this.mouseTargetFactory.createMouseTarget(this.viewHelper.getLastRenderData(),f,h,null)}_createMouseTarget(o,i){let l=o.target;if(!this.viewHelper.viewDomNode.contains(l)){const h=w.getShadowRoot(this.viewHelper.viewDomNode);h&&(l=h.elementsFromPoint(o.posx,o.posy).find(f=>this.viewHelper.viewDomNode.contains(f)))}return this.mouseTargetFactory.createMouseTarget(this.viewHelper.getLastRenderData(),o.editorPos,o.pos,i?l:null)}_getMouseColumn(o){return this.mouseTargetFactory.getMouseColumn(o.editorPos,o.pos)}_onContextMenu(o,i){this.viewController.emitContextMenu({event:o,target:this._createMouseTarget(o,i)})}_onMouseMove(o){this._mouseDownOperation.isActive()||o.timestamp<this.lastMouseLeaveTime||this.viewController.emitMouseMove({event:o,target:this._createMouseTarget(o,!0)})}_onMouseLeave(o){this.lastMouseLeaveTime=new Date().getTime(),this.viewController.emitMouseLeave({event:o,target:null})}_onMouseUp(o){this.viewController.emitMouseUp({event:o,target:this._createMouseTarget(o,!0)})}_onMouseDown(o){const i=this._createMouseTarget(o,!0),l=i.type===6||i.type===7,h=i.type===2||i.type===3||i.type===4,f=i.type===3,y=this._context.configuration.options.get(97),_=i.type===8||i.type===5,b=i.type===9;let v=o.leftButton||o.middleButton;S.isMacintosh&&o.leftButton&&o.ctrlKey&&(v=!1);const m=()=>{o.preventDefault(),this.viewHelper.focusTextArea()};if(v&&(l||f&&y))m(),this._mouseDownOperation.start(i.type,o);else if(h)o.preventDefault();else if(_){const E=i.detail;this.viewHelper.shouldSuppressMouseDownOnViewZone(E.viewZoneId)&&(m(),this._mouseDownOperation.start(i.type,o),o.preventDefault())}else b&&this.viewHelper.shouldSuppressMouseDownOnWidget(i.detail)&&(m(),o.preventDefault());this.viewController.emitMouseDown({event:o,target:i})}}e.MouseHandler=u,u.MOUSE_MOVE_MINIMUM_TIME=100;class d extends D.Disposable{constructor(o,i,l,h,f){super();this._context=o,this._viewController=i,this._viewHelper=l,this._createMouseTarget=h,this._getMouseColumn=f,this._mouseMoveMonitor=this._register(new C.GlobalEditorMouseMoveMonitor(this._viewHelper.viewDomNode)),this._onScrollTimeout=this._register(new T.TimeoutTimer),this._mouseState=new a,this._currentSelection=new t.Selection(1,1,1,1),this._isActive=!1,this._lastMouseEvent=null}dispose(){super.dispose()}isActive(){return this._isActive}_onMouseDownThenMove(o){this._lastMouseEvent=o,this._mouseState.setModifiers(o);const i=this._findMousePosition(o,!0);!i||(this._mouseState.isDragAndDrop?this._viewController.emitMouseDrag({event:o,target:i}):this._dispatchMouse(i,!0))}start(o,i){this._lastMouseEvent=i,this._mouseState.setStartedOnLineNumbers(o===3),this._mouseState.setStartButtons(i),this._mouseState.setModifiers(i);const l=this._findMousePosition(i,!0);if(!l||!l.position)return;this._mouseState.trySetCount(i.detail,l.position),i.detail=this._mouseState.count;const h=this._context.configuration.options;if(!h.get(80)&&h.get(31)&&!h.get(18)&&!this._mouseState.altKey&&i.detail<2&&!this._isActive&&!this._currentSelection.isEmpty()&&l.type===6&&l.position&&this._currentSelection.containsPosition(l.position)){this._mouseState.isDragAndDrop=!0,this._isActive=!0,this._mouseMoveMonitor.startMonitoring(i.target,i.buttons,c(null),f=>this._onMouseDownThenMove(f),f=>{const y=this._findMousePosition(this._lastMouseEvent,!0);f&&f instanceof KeyboardEvent?this._viewController.emitMouseDropCanceled():this._viewController.emitMouseDrop({event:this._lastMouseEvent,target:y?this._createMouseTarget(this._lastMouseEvent,!0):null}),this._stop()});return}this._mouseState.isDragAndDrop=!1,this._dispatchMouse(l,i.shiftKey),this._isActive||(this._isActive=!0,this._mouseMoveMonitor.startMonitoring(i.target,i.buttons,c(null),f=>this._onMouseDownThenMove(f),()=>this._stop()))}_stop(){this._isActive=!1,this._onScrollTimeout.cancel()}onHeightChanged(){this._mouseMoveMonitor.stopMonitoring()}onScrollChanged(){!this._isActive||this._onScrollTimeout.setIfNotSet(()=>{if(!this._lastMouseEvent)return;const o=this._findMousePosition(this._lastMouseEvent,!1);!o||this._mouseState.isDragAndDrop||this._dispatchMouse(o,!0)},10)}onCursorStateChanged(o){this._currentSelection=o.selections[0]}_getPositionOutsideEditor(o){const i=o.editorPos,l=this._context.model,h=this._context.viewLayout,f=this._getMouseColumn(o);if(o.posy<i.y){const _=Math.max(h.getCurrentScrollTop()-(i.y-o.posy),0),b=p.HitTestContext.getZoneAtCoord(this._context,_);if(b){const m=this._helpPositionJumpOverViewZone(b);if(m)return new p.MouseTarget(null,13,f,m)}const v=h.getLineNumberAtVerticalOffset(_);return new p.MouseTarget(null,13,f,new g.Position(v,1))}if(o.posy>i.y+i.height){const _=h.getCurrentScrollTop()+(o.posy-i.y),b=p.HitTestContext.getZoneAtCoord(this._context,_);if(b){const m=this._helpPositionJumpOverViewZone(b);if(m)return new p.MouseTarget(null,13,f,m)}const v=h.getLineNumberAtVerticalOffset(_);return new p.MouseTarget(null,13,f,new g.Position(v,l.getLineMaxColumn(v)))}const y=h.getLineNumberAtVerticalOffset(h.getCurrentScrollTop()+(o.posy-i.y));return o.posx<i.x?new p.MouseTarget(null,13,f,new g.Position(y,1)):o.posx>i.x+i.width?new p.MouseTarget(null,13,f,new g.Position(y,l.getLineMaxColumn(y))):null}_findMousePosition(o,i){const l=this._getPositionOutsideEditor(o);if(l)return l;const h=this._createMouseTarget(o,i);if(!h.position)return null;if(h.type===8||h.type===5){const y=this._helpPositionJumpOverViewZone(h.detail);if(y)return new p.MouseTarget(h.element,h.type,h.mouseColumn,y,null,h.detail)}return h}_helpPositionJumpOverViewZone(o){const i=new g.Position(this._currentSelection.selectionStartLineNumber,this._currentSelection.selectionStartColumn),l=o.positionBefore,h=o.positionAfter;return l&&h?l.isBefore(i)?l:h:null}_dispatchMouse(o,i){!o.position||this._viewController.dispatchMouse({position:o.position,mouseColumn:o.mouseColumn,startedOnLineNumbers:this._mouseState.startedOnLineNumbers,inSelectionMode:i,mouseDownCount:this._mouseState.count,altKey:this._mouseState.altKey,ctrlKey:this._mouseState.ctrlKey,metaKey:this._mouseState.metaKey,shiftKey:this._mouseState.shiftKey,leftButton:this._mouseState.leftButton,middleButton:this._mouseState.middleButton})}}class a{constructor(){this._altKey=!1,this._ctrlKey=!1,this._metaKey=!1,this._shiftKey=!1,this._leftButton=!1,this._middleButton=!1,this._startedOnLineNumbers=!1,this._lastMouseDownPosition=null,this._lastMouseDownPositionEqualCount=0,this._lastMouseDownCount=0,this._lastSetMouseDownCountTime=0,this.isDragAndDrop=!1}get altKey(){return this._altKey}get ctrlKey(){return this._ctrlKey}get metaKey(){return this._metaKey}get shiftKey(){return this._shiftKey}get leftButton(){return this._leftButton}get middleButton(){return this._middleButton}get startedOnLineNumbers(){return this._startedOnLineNumbers}get count(){return this._lastMouseDownCount}setModifiers(o){this._altKey=o.altKey,this._ctrlKey=o.ctrlKey,this._metaKey=o.metaKey,this._shiftKey=o.shiftKey}setStartButtons(o){this._leftButton=o.leftButton,this._middleButton=o.middleButton}setStartedOnLineNumbers(o){this._startedOnLineNumbers=o}trySetCount(o,i){const l=new Date().getTime();l-this._lastSetMouseDownCountTime>a.CLEAR_MOUSE_DOWN_COUNT_TIME&&(o=1),this._lastSetMouseDownCountTime=l,o>this._lastMouseDownCount+1&&(o=this._lastMouseDownCount+1),this._lastMouseDownPosition&&this._lastMouseDownPosition.equals(i)?this._lastMouseDownPositionEqualCount++:this._lastMouseDownPositionEqualCount=1,this._lastMouseDownPosition=i,this._lastMouseDownCount=Math.min(o,this._lastMouseDownPositionEqualCount)}}a.CLEAR_MOUSE_DOWN_COUNT_TIME=400}),define(J[661],ee([0,1,7,17,58,2,660,172,161,174]),function(j,e,w,N,T,D,S,p,C,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.PointerHandler=e.PointerEventHandler=void 0;class g extends S.MouseHandler{constructor(u,d,a){super(u,d,a);this._register(T.Gesture.addTarget(this.viewHelper.linesContentDomNode)),this._register(w.addDisposableListener(this.viewHelper.linesContentDomNode,T.EventType.Tap,o=>this.onTap(o))),this._register(w.addDisposableListener(this.viewHelper.linesContentDomNode,T.EventType.Change,o=>this.onChange(o))),this._register(w.addDisposableListener(this.viewHelper.linesContentDomNode,T.EventType.Contextmenu,o=>this._onContextMenu(new p.EditorMouseEvent(o,this.viewHelper.viewDomNode),!1))),this._lastPointerType="mouse",this._register(w.addDisposableListener(this.viewHelper.linesContentDomNode,"pointerdown",o=>{const i=o.pointerType;if(i==="mouse"){this._lastPointerType="mouse";return}else i==="touch"?this._lastPointerType="touch":this._lastPointerType="pen"}));const r=new p.EditorPointerEventFactory(this.viewHelper.viewDomNode);this._register(r.onPointerMoveThrottled(this.viewHelper.viewDomNode,o=>this._onMouseMove(o),(0,S.createMouseMoveEventMerger)(this.mouseTargetFactory),S.MouseHandler.MOUSE_MOVE_MINIMUM_TIME)),this._register(r.onPointerUp(this.viewHelper.viewDomNode,o=>this._onMouseUp(o))),this._register(r.onPointerLeave(this.viewHelper.viewDomNode,o=>this._onMouseLeave(o))),this._register(r.onPointerDown(this.viewHelper.viewDomNode,o=>this._onMouseDown(o)))}onTap(u){if(!u.initialTarget||!this.viewHelper.linesContentDomNode.contains(u.initialTarget))return;u.preventDefault(),this.viewHelper.focusTextArea();const d=this._createMouseTarget(new p.EditorMouseEvent(u,this.viewHelper.viewDomNode),!1);d.position&&this.viewController.dispatchMouse({position:d.position,mouseColumn:d.position.column,startedOnLineNumbers:!1,mouseDownCount:u.tapCount,inSelectionMode:!1,altKey:!1,ctrlKey:!1,metaKey:!1,shiftKey:!1,leftButton:!1,middleButton:!1})}onChange(u){this._lastPointerType==="touch"&&this._context.model.deltaScrollNow(-u.translationX,-u.translationY)}_onMouseDown(u){u.browserEvent.pointerType!=="touch"&&super._onMouseDown(u)}}e.PointerEventHandler=g;class t extends S.MouseHandler{constructor(u,d,a){super(u,d,a);this._register(T.Gesture.addTarget(this.viewHelper.linesContentDomNode)),this._register(w.addDisposableListener(this.viewHelper.linesContentDomNode,T.EventType.Tap,r=>this.onTap(r))),this._register(w.addDisposableListener(this.viewHelper.linesContentDomNode,T.EventType.Change,r=>this.onChange(r))),this._register(w.addDisposableListener(this.viewHelper.linesContentDomNode,T.EventType.Contextmenu,r=>this._onContextMenu(new p.EditorMouseEvent(r,this.viewHelper.viewDomNode),!1)))}onTap(u){u.preventDefault(),this.viewHelper.focusTextArea();const d=this._createMouseTarget(new p.EditorMouseEvent(u,this.viewHelper.viewDomNode),!1);if(d.position){const a=document.createEvent("CustomEvent");a.initEvent(n.TextAreaSyntethicEvents.Tap,!1,!0),this.viewHelper.dispatchTextAreaEvent(a),this.viewController.moveTo(d.position)}}onChange(u){this._context.model.deltaScrollNow(-u.translationX,-u.translationY)}}class s extends D.Disposable{constructor(u,d,a){super();N.isIOS&&C.BrowserFeatures.pointerEvents?this.handler=this._register(new g(u,d,a)):window.TouchEvent?this.handler=this._register(new t(u,d,a)):this.handler=this._register(new S.MouseHandler(u,d,a))}getTargetAtClientPoint(u,d){return this.handler.getTargetAtClientPoint(u,d)}}e.PointerHandler=s}),define(J[277],ee([0,1,196]),function(j,e,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ViewUserInputEvents=void 0;class N{constructor(S){this.onKeyDown=null,this.onKeyUp=null,this.onContextMenu=null,this.onMouseMove=null,this.onMouseLeave=null,this.onMouseDown=null,this.onMouseUp=null,this.onMouseDrag=null,this.onMouseDrop=null,this.onMouseDropCanceled=null,this.onMouseWheel=null,this._coordinatesConverter=S}emitKeyDown(S){this.onKeyDown&&this.onKeyDown(S)}emitKeyUp(S){this.onKeyUp&&this.onKeyUp(S)}emitContextMenu(S){this.onContextMenu&&this.onContextMenu(this._convertViewToModelMouseEvent(S))}emitMouseMove(S){this.onMouseMove&&this.onMouseMove(this._convertViewToModelMouseEvent(S))}emitMouseLeave(S){this.onMouseLeave&&this.onMouseLeave(this._convertViewToModelMouseEvent(S))}emitMouseDown(S){this.onMouseDown&&this.onMouseDown(this._convertViewToModelMouseEvent(S))}emitMouseUp(S){this.onMouseUp&&this.onMouseUp(this._convertViewToModelMouseEvent(S))}emitMouseDrag(S){this.onMouseDrag&&this.onMouseDrag(this._convertViewToModelMouseEvent(S))}emitMouseDrop(S){this.onMouseDrop&&this.onMouseDrop(this._convertViewToModelMouseEvent(S))}emitMouseDropCanceled(){this.onMouseDropCanceled&&this.onMouseDropCanceled()}emitMouseWheel(S){this.onMouseWheel&&this.onMouseWheel(S)}_convertViewToModelMouseEvent(S){return S.target?{event:S.event,target:this._convertViewToModelMouseTarget(S.target)}:S}_convertViewToModelMouseTarget(S){return N.convertViewToModelMouseTarget(S,this._coordinatesConverter)}static convertViewToModelMouseTarget(S,p){return new T(S.element,S.type,S.mouseColumn,S.position?p.convertViewPositionToModelPosition(S.position):null,S.range?p.convertViewRangeToModelRange(S.range):null,S.detail)}}e.ViewUserInputEvents=N;class T{constructor(S,p,C,n,g,t){this.element=S,this.type=p,this.mouseColumn=C,this.position=n,this.range=g,this.detail=t}toString(){return w.MouseTarget.toString(this)}}}),define(J[662],ee([0,1,43,13,3]),function(j,e,w,N,T){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ColumnSelection=void 0;class D{static columnSelect(p,C,n,g,t,s){let c=Math.abs(t-n)+1,u=n>t,d=g>s,a=g<s,r=[];for(let o=0;o<c;o++){let i=n+(u?-o:o),l=w.CursorColumns.columnFromVisibleColumn2(p,C,i,g),h=w.CursorColumns.columnFromVisibleColumn2(p,C,i,s),f=w.CursorColumns.visibleColumnFromColumn2(p,C,new N.Position(i,l)),y=w.CursorColumns.visibleColumnFromColumn2(p,C,new N.Position(i,h));a&&(f>s||y<g)||d&&(y>g||f<s)||r.push(new w.SingleCursorState(new T.Range(i,l,i,l),0,new N.Position(i,h),0))}if(r.length===0)for(let o=0;o<c;o++){const i=n+(u?-o:o),l=C.getLineMaxColumn(i);r.push(new w.SingleCursorState(new T.Range(i,l,i,l),0,new N.Position(i,l),0))}return{viewStates:r,reversed:u,fromLineNumber:n,fromVisualColumn:g,toLineNumber:t,toVisualColumn:s}}static columnSelectLeft(p,C,n){let g=n.toViewVisualColumn;return g>0&&g--,D.columnSelect(p,C,n.fromViewLineNumber,n.fromViewVisualColumn,n.toViewLineNumber,g)}static columnSelectRight(p,C,n){let g=0;const t=Math.min(n.fromViewLineNumber,n.toViewLineNumber),s=Math.max(n.fromViewLineNumber,n.toViewLineNumber);for(let u=t;u<=s;u++){const d=C.getLineMaxColumn(u),a=w.CursorColumns.visibleColumnFromColumn2(p,C,new N.Position(u,d));g=Math.max(g,a)}let c=n.toViewVisualColumn;return c<g&&c++,this.columnSelect(p,C,n.fromViewLineNumber,n.fromViewVisualColumn,n.toViewLineNumber,c)}static columnSelectUp(p,C,n,g){const t=g?p.pageSize:1,s=Math.max(1,n.toViewLineNumber-t);return this.columnSelect(p,C,n.fromViewLineNumber,n.fromViewVisualColumn,s,n.toViewVisualColumn)}static columnSelectDown(p,C,n,g){const t=g?p.pageSize:1,s=Math.min(C.getLineCount(),n.toViewLineNumber+t);return this.columnSelect(p,C,n.fromViewLineNumber,n.fromViewVisualColumn,s,n.toViewVisualColumn)}}e.ColumnSelection=D}),define(J[197],ee([0,1,43,13,3,8,276]),function(j,e,w,N,T,D,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MoveOperations=e.CursorPosition=void 0;class p{constructor(g,t,s){this._cursorPositionBrand=void 0,this.lineNumber=g,this.column=t,this.leftoverVisibleColumns=s}}e.CursorPosition=p;class C{static leftPosition(g,t){if(t.column>g.getLineMinColumn(t.lineNumber))return t.delta(void 0,-D.prevCharLength(g.getLineContent(t.lineNumber),t.column-1));if(t.lineNumber>1){const s=t.lineNumber-1;return new N.Position(s,g.getLineMaxColumn(s))}else return t}static leftPositionAtomicSoftTabs(g,t,s){if(t.column<=g.getLineIndentColumn(t.lineNumber)){const c=g.getLineMinColumn(t.lineNumber),u=g.getLineContent(t.lineNumber),d=S.AtomicTabMoveOperations.atomicPosition(u,t.column-1,s,0);if(d!==-1&&d+1>=c)return new N.Position(t.lineNumber,d+1)}return this.leftPosition(g,t)}static left(g,t,s){const c=g.stickyTabStops?C.leftPositionAtomicSoftTabs(t,s,g.tabSize):C.leftPosition(t,s);return new p(c.lineNumber,c.column,0)}static moveLeft(g,t,s,c,u){let d,a;if(s.hasSelection()&&!c)d=s.selection.startLineNumber,a=s.selection.startColumn;else{const r=s.position.delta(void 0,-(u-1)),o=t.normalizePosition(C.clipPositionColumn(r,t),0),i=C.left(g,t,o);d=i.lineNumber,a=i.column}return s.move(c,d,a,0)}static clipPositionColumn(g,t){return new N.Position(g.lineNumber,C.clipRange(g.column,t.getLineMinColumn(g.lineNumber),t.getLineMaxColumn(g.lineNumber)))}static clipRange(g,t,s){return g<t?t:g>s?s:g}static rightPosition(g,t,s){return s<g.getLineMaxColumn(t)?s=s+D.nextCharLength(g.getLineContent(t),s-1):t<g.getLineCount()&&(t=t+1,s=g.getLineMinColumn(t)),new N.Position(t,s)}static rightPositionAtomicSoftTabs(g,t,s,c,u){if(s<g.getLineIndentColumn(t)){const d=g.getLineContent(t),a=S.AtomicTabMoveOperations.atomicPosition(d,s-1,c,1);if(a!==-1)return new N.Position(t,a+1)}return this.rightPosition(g,t,s)}static right(g,t,s){const c=g.stickyTabStops?C.rightPositionAtomicSoftTabs(t,s.lineNumber,s.column,g.tabSize,g.indentSize):C.rightPosition(t,s.lineNumber,s.column);return new p(c.lineNumber,c.column,0)}static moveRight(g,t,s,c,u){let d,a;if(s.hasSelection()&&!c)d=s.selection.endLineNumber,a=s.selection.endColumn;else{const r=s.position.delta(void 0,u-1),o=t.normalizePosition(C.clipPositionColumn(r,t),1),i=C.right(g,t,o);d=i.lineNumber,a=i.column}return s.move(c,d,a,0)}static vertical(g,t,s,c,u,d,a){const r=w.CursorColumns.visibleColumnFromColumn(t.getLineContent(s),c,g.tabSize)+u,o=t.getLineCount(),i=s===1&&c===1,l=s===o&&c===t.getLineMaxColumn(s),h=d<s?i:l;return s=d,s<1?(s=1,a?c=t.getLineMinColumn(s):c=Math.min(t.getLineMaxColumn(s),c)):s>o?(s=o,a?c=t.getLineMaxColumn(s):c=Math.min(t.getLineMaxColumn(s),c)):c=w.CursorColumns.columnFromVisibleColumn2(g,t,s,r),h?u=0:u=r-w.CursorColumns.visibleColumnFromColumn(t.getLineContent(s),c,g.tabSize),new p(s,c,u)}static down(g,t,s,c,u,d,a){return this.vertical(g,t,s,c,u,s+d,a)}static moveDown(g,t,s,c,u){let d,a;s.hasSelection()&&!c?(d=s.selection.endLineNumber,a=s.selection.endColumn):(d=s.position.lineNumber,a=s.position.column);let r=C.down(g,t,d,a,s.leftoverVisibleColumns,u,!0);return s.move(c,r.lineNumber,r.column,r.leftoverVisibleColumns)}static translateDown(g,t,s){let c=s.selection,u=C.down(g,t,c.selectionStartLineNumber,c.selectionStartColumn,s.selectionStartLeftoverVisibleColumns,1,!1),d=C.down(g,t,c.positionLineNumber,c.positionColumn,s.leftoverVisibleColumns,1,!1);return new w.SingleCursorState(new T.Range(u.lineNumber,u.column,u.lineNumber,u.column),u.leftoverVisibleColumns,new N.Position(d.lineNumber,d.column),d.leftoverVisibleColumns)}static up(g,t,s,c,u,d,a){return this.vertical(g,t,s,c,u,s-d,a)}static moveUp(g,t,s,c,u){let d,a;s.hasSelection()&&!c?(d=s.selection.startLineNumber,a=s.selection.startColumn):(d=s.position.lineNumber,a=s.position.column);let r=C.up(g,t,d,a,s.leftoverVisibleColumns,u,!0);return s.move(c,r.lineNumber,r.column,r.leftoverVisibleColumns)}static translateUp(g,t,s){let c=s.selection,u=C.up(g,t,c.selectionStartLineNumber,c.selectionStartColumn,s.selectionStartLeftoverVisibleColumns,1,!1),d=C.up(g,t,c.positionLineNumber,c.positionColumn,s.leftoverVisibleColumns,1,!1);return new w.SingleCursorState(new T.Range(u.lineNumber,u.column,u.lineNumber,u.column),u.leftoverVisibleColumns,new N.Position(d.lineNumber,d.column),d.leftoverVisibleColumns)}static _isBlankLine(g,t){return g.getLineFirstNonWhitespaceColumn(t)===0}static moveToPrevBlankLine(g,t,s,c){let u=s.position.lineNumber;for(;u>1&&this._isBlankLine(t,u);)u--;for(;u>1&&!this._isBlankLine(t,u);)u--;return s.move(c,u,t.getLineMinColumn(u),0)}static moveToNextBlankLine(g,t,s,c){const u=t.getLineCount();let d=s.position.lineNumber;for(;d<u&&this._isBlankLine(t,d);)d++;for(;d<u&&!this._isBlankLine(t,d);)d++;return s.move(c,d,t.getLineMinColumn(d),0)}static moveToBeginningOfLine(g,t,s,c){let u=s.position.lineNumber,d=t.getLineMinColumn(u),a=t.getLineFirstNonWhitespaceColumn(u)||d,r;return s.position.column===a?r=d:r=a,s.move(c,u,r,0)}static moveToEndOfLine(g,t,s,c,u){let d=s.position.lineNumber,a=t.getLineMaxColumn(d);return s.move(c,d,a,u?1073741824-a:0)}static moveToBeginningOfBuffer(g,t,s,c){return s.move(c,1,1,0)}static moveToEndOfBuffer(g,t,s,c){let u=t.getLineCount(),d=t.getLineMaxColumn(u);return s.move(c,u,d,0)}}e.MoveOperations=C}),define(J[198],ee([0,1,8,98,43,197,3,13]),function(j,e,w,N,T,D,S,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DeleteOperations=void 0;class C{static deleteRight(g,t,s,c){let u=[],d=g!==3;for(let a=0,r=c.length;a<r;a++){const o=c[a];let i=o;if(i.isEmpty()){let l=o.getPosition(),h=D.MoveOperations.right(t,s,l);i=new S.Range(h.lineNumber,h.column,l.lineNumber,l.column)}if(i.isEmpty()){u[a]=null;continue}i.startLineNumber!==i.endLineNumber&&(d=!0),u[a]=new N.ReplaceCommand(i,"")}return[d,u]}static isAutoClosingPairDelete(g,t,s,c,u,d,a){if(t==="never"&&s==="never"||g==="never")return!1;for(let r=0,o=d.length;r<o;r++){const i=d[r],l=i.getPosition();if(!i.isEmpty())return!1;const h=u.getLineContent(l.lineNumber);if(l.column<2||l.column>=h.length+1)return!1;const f=h.charAt(l.column-2),y=c.get(f);if(!y)return!1;if((0,T.isQuote)(f)){if(s==="never")return!1}else if(t==="never")return!1;const _=h.charAt(l.column-1);let b=!1;for(const v of y)v.open===f&&v.close===_&&(b=!0);if(!b)return!1;if(g==="auto"){let v=!1;for(let m=0,E=a.length;m<E;m++){const I=a[m];if(l.lineNumber===I.startLineNumber&&l.column===I.startColumn){v=!0;break}}if(!v)return!1}}return!0}static _runAutoClosingPairDelete(g,t,s){let c=[];for(let u=0,d=s.length;u<d;u++){const a=s[u].getPosition(),r=new S.Range(a.lineNumber,a.column-1,a.lineNumber,a.column+1);c[u]=new N.ReplaceCommand(r,"")}return[!0,c]}static deleteLeft(g,t,s,c,u){if(this.isAutoClosingPairDelete(t.autoClosingDelete,t.autoClosingBrackets,t.autoClosingQuotes,t.autoClosingPairs.autoClosingPairsOpenByEnd,s,c,u))return this._runAutoClosingPairDelete(t,s,c);const d=[];let a=g!==2;for(let r=0,o=c.length;r<o;r++){let i=C.getDeleteRange(c[r],s,t);if(i.isEmpty()){d[r]=null;continue}i.startLineNumber!==i.endLineNumber&&(a=!0),d[r]=new N.ReplaceCommand(i,"")}return[a,d]}static getDeleteRange(g,t,s){if(!g.isEmpty())return g;const c=g.getPosition();if(s.useTabStops&&c.column>1){const u=t.getLineContent(c.lineNumber),d=w.firstNonWhitespaceIndex(u),a=d===-1?u.length+1:d+1;if(c.column<=a){const r=T.CursorColumns.visibleColumnFromColumn2(s,t,c),o=T.CursorColumns.prevIndentTabStop(r,s.indentSize),i=T.CursorColumns.columnFromVisibleColumn2(s,t,c.lineNumber,o);return new S.Range(c.lineNumber,i,c.lineNumber,c.column)}}return S.Range.fromPositions(C.getPositionAfterDeleteLeft(c,t),c)}static getPositionAfterDeleteLeft(g,t){if(g.column>1){const s=w.getLeftDeleteOffset(g.column-1,t.getLineContent(g.lineNumber));return g.with(void 0,s+1)}else if(g.lineNumber>1){const s=g.lineNumber-1;return new p.Position(s,t.getLineMaxColumn(s))}else return g}static cut(g,t,s){let c=[],u=null;s.sort((d,a)=>p.Position.compare(d.getStartPosition(),a.getEndPosition()));for(let d=0,a=s.length;d<a;d++){const r=s[d];if(r.isEmpty())if(g.emptySelectionClipboard){let o=r.getPosition(),i,l,h,f;o.lineNumber<t.getLineCount()?(i=o.lineNumber,l=1,h=o.lineNumber+1,f=1):o.lineNumber>1&&(u==null?void 0:u.endLineNumber)!==o.lineNumber?(i=o.lineNumber-1,l=t.getLineMaxColumn(o.lineNumber-1),h=o.lineNumber,f=t.getLineMaxColumn(o.lineNumber)):(i=o.lineNumber,l=1,h=o.lineNumber,f=t.getLineMaxColumn(o.lineNumber));let y=new S.Range(i,l,h,f);u=y,y.isEmpty()?c[d]=null:c[d]=new N.ReplaceCommand(y,"")}else c[d]=null;else c[d]=new N.ReplaceCommand(r,"")}return new T.EditOperationResult(0,c,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!0})}}e.DeleteOperations=C}),define(J[199],ee([0,1,11,8,98,195,386,43,112,3,22,116,37]),function(j,e,w,N,T,D,S,p,C,n,g,t,s){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TypeWithAutoClosingCommand=e.TypeOperations=void 0;class c{static indent(l,h,f){if(h===null||f===null)return[];let y=[];for(let _=0,b=f.length;_<b;_++)y[_]=new D.ShiftCommand(f[_],{isUnshift:!1,tabSize:l.tabSize,indentSize:l.indentSize,insertSpaces:l.insertSpaces,useTabStops:l.useTabStops,autoIndent:l.autoIndent});return y}static outdent(l,h,f){let y=[];for(let _=0,b=f.length;_<b;_++)y[_]=new D.ShiftCommand(f[_],{isUnshift:!0,tabSize:l.tabSize,indentSize:l.indentSize,insertSpaces:l.insertSpaces,useTabStops:l.useTabStops,autoIndent:l.autoIndent});return y}static shiftIndent(l,h,f){return f=f||1,D.ShiftCommand.shiftIndent(h,h.length+f,l.tabSize,l.indentSize,l.insertSpaces)}static unshiftIndent(l,h,f){return f=f||1,D.ShiftCommand.unshiftIndent(h,h.length+f,l.tabSize,l.indentSize,l.insertSpaces)}static _distributedPaste(l,h,f,y){let _=[];for(let b=0,v=f.length;b<v;b++)_[b]=new T.ReplaceCommand(f[b],y[b]);return new p.EditOperationResult(0,_,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!0})}static _simplePaste(l,h,f,y,_){let b=[];for(let v=0,m=f.length;v<m;v++){const E=f[v];let I=E.getPosition();if(_&&!E.isEmpty()&&(_=!1),_&&y.indexOf(`
`)!==y.length-1&&(_=!1),_){let k=new n.Range(I.lineNumber,1,I.lineNumber,1);b[v]=new T.ReplaceCommandThatPreservesSelection(k,y,E,!0)}else b[v]=new T.ReplaceCommand(E,y)}return new p.EditOperationResult(0,b,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!0})}static _distributePasteToCursors(l,h,f,y,_){if(y||h.length===1)return null;if(_&&_.length===h.length)return _;if(l.multiCursorPaste==="spread"){f.charCodeAt(f.length-1)===10&&(f=f.substr(0,f.length-1)),f.charCodeAt(f.length-1)===13&&(f=f.substr(0,f.length-1));let b=N.splitLines(f);if(b.length===h.length)return b}return null}static paste(l,h,f,y,_,b){const v=this._distributePasteToCursors(l,f,y,_,b);return v?(f=f.sort(n.Range.compareRangesUsingStarts),this._distributedPaste(l,h,f,v)):this._simplePaste(l,h,f,y,_)}static _goodIndentForLine(l,h,f){let y=null,_="";const b=s.LanguageConfigurationRegistry.getInheritIndentForLine(l.autoIndent,h,f,!1);if(b)y=b.action,_=b.indentation;else if(f>1){let v;for(v=f-1;v>=1;v--){const I=h.getLineContent(v);if(N.lastNonWhitespaceIndex(I)>=0)break}if(v<1)return null;const m=h.getLineMaxColumn(v),E=s.LanguageConfigurationRegistry.getEnterAction(l.autoIndent,h,new n.Range(v,m,v,m));E&&(_=E.indentation+E.appendText)}return y&&(y===t.IndentAction.Indent&&(_=c.shiftIndent(l,_)),y===t.IndentAction.Outdent&&(_=c.unshiftIndent(l,_)),_=l.normalizeIndentation(_)),_||null}static _replaceJumpToNextIndent(l,h,f,y){let _="",b=f.getStartPosition();if(l.insertSpaces){let v=p.CursorColumns.visibleColumnFromColumn2(l,h,b),m=l.indentSize,E=m-v%m;for(let I=0;I<E;I++)_+=" "}else _="    ";return new T.ReplaceCommand(f,_,y)}static tab(l,h,f){let y=[];for(let _=0,b=f.length;_<b;_++){const v=f[_];if(v.isEmpty()){let m=h.getLineContent(v.startLineNumber);if(/^\s*$/.test(m)&&h.isCheapToTokenize(v.startLineNumber)){let E=this._goodIndentForLine(l,h,v.startLineNumber);E=E||"    ";let I=l.normalizeIndentation(E);if(!m.startsWith(I)){y[_]=new T.ReplaceCommand(new n.Range(v.startLineNumber,1,v.startLineNumber,m.length+1),I,!0);continue}}y[_]=this._replaceJumpToNextIndent(l,h,v,!0)}else{if(v.startLineNumber===v.endLineNumber){let m=h.getLineMaxColumn(v.startLineNumber);if(v.startColumn!==1||v.endColumn!==m){y[_]=this._replaceJumpToNextIndent(l,h,v,!1);continue}}y[_]=new D.ShiftCommand(v,{isUnshift:!1,tabSize:l.tabSize,indentSize:l.indentSize,insertSpaces:l.insertSpaces,useTabStops:l.useTabStops,autoIndent:l.autoIndent})}}return y}static compositionType(l,h,f,y,_,b,v,m){const E=y.map(I=>this._compositionType(f,I,_,b,v,m));return new p.EditOperationResult(4,E,{shouldPushStackElementBefore:a(l,4),shouldPushStackElementAfter:!1})}static _compositionType(l,h,f,y,_,b){if(!h.isEmpty())return null;const v=h.getPosition(),m=Math.max(1,v.column-y),E=Math.min(l.getLineMaxColumn(v.lineNumber),v.column+_),I=new n.Range(v.lineNumber,m,v.lineNumber,E);return l.getValueInRange(I)===f&&b===0?null:new T.ReplaceCommandWithOffsetCursorState(I,f,0,b)}static _typeCommand(l,h,f){return f?new T.ReplaceCommandWithoutChangingPosition(l,h,!0):new T.ReplaceCommand(l,h,!0)}static _enter(l,h,f,y){if(l.autoIndent===0)return c._typeCommand(y,`
`,f);if(!h.isCheapToTokenize(y.getStartPosition().lineNumber)||l.autoIndent===1){let m=h.getLineContent(y.startLineNumber),E=N.getLeadingWhitespace(m).substring(0,y.startColumn-1);return c._typeCommand(y,`
`+l.normalizeIndentation(E),f)}const _=s.LanguageConfigurationRegistry.getEnterAction(l.autoIndent,h,y);if(_){if(_.indentAction===t.IndentAction.None)return c._typeCommand(y,`
`+l.normalizeIndentation(_.indentation+_.appendText),f);if(_.indentAction===t.IndentAction.Indent)return c._typeCommand(y,`
`+l.normalizeIndentation(_.indentation+_.appendText),f);if(_.indentAction===t.IndentAction.IndentOutdent){const m=l.normalizeIndentation(_.indentation),E=l.normalizeIndentation(_.indentation+_.appendText),I=`
`+E+`
`+m;return f?new T.ReplaceCommandWithoutChangingPosition(y,I,!0):new T.ReplaceCommandWithOffsetCursorState(y,I,-1,E.length-m.length,!0)}else if(_.indentAction===t.IndentAction.Outdent){const m=c.unshiftIndent(l,_.indentation);return c._typeCommand(y,`
`+l.normalizeIndentation(m+_.appendText),f)}}const b=h.getLineContent(y.startLineNumber),v=N.getLeadingWhitespace(b).substring(0,y.startColumn-1);if(l.autoIndent>=4){const m=s.LanguageConfigurationRegistry.getIndentForEnter(l.autoIndent,h,y,{unshiftIndent:E=>c.unshiftIndent(l,E),shiftIndent:E=>c.shiftIndent(l,E),normalizeIndentation:E=>l.normalizeIndentation(E)});if(m){let E=p.CursorColumns.visibleColumnFromColumn2(l,h,y.getEndPosition());const I=y.endColumn,k=h.getLineContent(y.endLineNumber),M=N.firstNonWhitespaceIndex(k);if(M>=0?y=y.setEndPosition(y.endLineNumber,Math.max(y.endColumn,M+1)):y=y.setEndPosition(y.endLineNumber,h.getLineMaxColumn(y.endLineNumber)),f)return new T.ReplaceCommandWithoutChangingPosition(y,`
`+l.normalizeIndentation(m.afterEnter),!0);{let P=0;return I<=M+1&&(l.insertSpaces||(E=Math.ceil(E/l.indentSize)),P=Math.min(E+1-l.normalizeIndentation(m.afterEnter).length-1,0)),new T.ReplaceCommandWithOffsetCursorState(y,`
`+l.normalizeIndentation(m.afterEnter),0,P,!0)}}}return c._typeCommand(y,`
`+l.normalizeIndentation(v),f)}static _isAutoIndentType(l,h,f){if(l.autoIndent<4)return!1;for(let y=0,_=f.length;y<_;y++)if(!h.isCheapToTokenize(f[y].getEndPosition().lineNumber))return!1;return!0}static _runAutoIndentType(l,h,f,y){const _=s.LanguageConfigurationRegistry.getIndentationAtPosition(h,f.startLineNumber,f.startColumn),b=s.LanguageConfigurationRegistry.getIndentActionForType(l.autoIndent,h,f,y,{shiftIndent:v=>c.shiftIndent(l,v),unshiftIndent:v=>c.unshiftIndent(l,v)});if(b===null)return null;if(b!==l.normalizeIndentation(_)){const v=h.getLineFirstNonWhitespaceColumn(f.startLineNumber);return v===0?c._typeCommand(new n.Range(f.startLineNumber,1,f.endLineNumber,f.endColumn),l.normalizeIndentation(b)+y,!1):c._typeCommand(new n.Range(f.startLineNumber,1,f.endLineNumber,f.endColumn),l.normalizeIndentation(b)+h.getLineContent(f.startLineNumber).substring(v-1,f.startColumn-1)+y,!1)}return null}static _isAutoClosingOvertype(l,h,f,y,_){if(l.autoClosingOvertype==="never"||!l.autoClosingPairs.autoClosingPairsCloseSingleChar.has(_))return!1;for(let b=0,v=f.length;b<v;b++){const m=f[b];if(!m.isEmpty())return!1;const E=m.getPosition(),I=h.getLineContent(E.lineNumber);if(I.charAt(E.column-1)!==_)return!1;const M=(0,p.isQuote)(_);if((E.column>2?I.charCodeAt(E.column-2):0)===92&&M)return!1;if(l.autoClosingOvertype==="auto"){let F=!1;for(let R=0,A=y.length;R<A;R++){const O=y[R];if(E.lineNumber===O.startLineNumber&&E.column===O.startColumn){F=!0;break}}if(!F)return!1}}return!0}static _runAutoClosingOvertype(l,h,f,y,_){let b=[];for(let v=0,m=y.length;v<m;v++){const I=y[v].getPosition(),k=new n.Range(I.lineNumber,I.column,I.lineNumber,I.column+1);b[v]=new T.ReplaceCommand(k,_)}return new p.EditOperationResult(4,b,{shouldPushStackElementBefore:a(l,4),shouldPushStackElementAfter:!1})}static _isBeforeClosingBrace(l,h){const f=h.charAt(0),y=l.autoClosingPairs.autoClosingPairsOpenByStart.get(f)||[],_=l.autoClosingPairs.autoClosingPairsCloseByStart.get(f)||[],b=y.some(m=>h.startsWith(m.open)),v=_.some(m=>h.startsWith(m.close));return!b&&v}static _findAutoClosingPairOpen(l,h,f,y){const _=l.autoClosingPairs.autoClosingPairsOpenByEnd.get(y);if(!_)return null;let b=null;for(const v of _)if(b===null||v.open.length>b.open.length){let m=!0;for(const E of f)if(h.getValueInRange(new n.Range(E.lineNumber,E.column-v.open.length+1,E.lineNumber,E.column))+y!==v.open){m=!1;break}m&&(b=v)}return b}static _findSubAutoClosingPairClose(l,h){if(h.open.length<=1)return"";const f=h.close.charAt(h.close.length-1),y=l.autoClosingPairs.autoClosingPairsCloseByEnd.get(f)||[];let _=null;for(const b of y)b.open!==h.open&&h.open.includes(b.open)&&h.close.endsWith(b.close)&&(!_||b.open.length>_.open.length)&&(_=b);return _?_.close:""}static _getAutoClosingPairClose(l,h,f,y,_){const b=(0,p.isQuote)(y),v=b?l.autoClosingQuotes:l.autoClosingBrackets;if(v==="never")return null;const m=this._findAutoClosingPairOpen(l,h,f.map(M=>M.getPosition()),y);if(!m)return null;const E=this._findSubAutoClosingPairClose(l,m);let I=!0;const k=b?l.shouldAutoCloseBefore.quote:l.shouldAutoCloseBefore.bracket;for(let M=0,P=f.length;M<P;M++){const F=f[M];if(!F.isEmpty())return null;const R=F.getPosition(),A=h.getLineContent(R.lineNumber),O=A.substring(R.column-1);if(O.startsWith(E)||(I=!1),A.length>R.column-1){const W=A.charAt(R.column-1);if(!c._isBeforeClosingBrace(l,O)&&!k(W))return null}if(!h.isCheapToTokenize(R.lineNumber))return null;if(m.open.length===1&&(y==="'"||y==='"')&&v!=="always"){const W=(0,C.getMapForWordSeparators)(l.wordSeparators);if(_&&R.column>1&&W.get(A.charCodeAt(R.column-2))===0||!_&&R.column>2&&W.get(A.charCodeAt(R.column-3))===0)return null}h.forceTokenization(R.lineNumber);const L=h.getLineTokens(R.lineNumber);let B=!1;try{B=s.LanguageConfigurationRegistry.shouldAutoClosePair(m,L,_?R.column:R.column-1)}catch(W){(0,w.onUnexpectedError)(W)}if(!B)return null}return I?m.close.substring(0,m.close.length-E.length):m.close}static _runAutoClosingOpenCharType(l,h,f,y,_,b,v){let m=[];for(let E=0,I=y.length;E<I;E++){const k=y[E];m[E]=new u(k,_,b,v)}return new p.EditOperationResult(4,m,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!1})}static _shouldSurroundChar(l,h){return(0,p.isQuote)(h)?l.autoSurround==="quotes"||l.autoSurround==="languageDefined":l.autoSurround==="brackets"||l.autoSurround==="languageDefined"}static _isSurroundSelectionType(l,h,f,y){if(!c._shouldSurroundChar(l,y)||!l.surroundingPairs.hasOwnProperty(y))return!1;const _=(0,p.isQuote)(y);for(let b=0,v=f.length;b<v;b++){const m=f[b];if(m.isEmpty())return!1;let E=!0;for(let I=m.startLineNumber;I<=m.endLineNumber;I++){const k=h.getLineContent(I),M=I===m.startLineNumber?m.startColumn-1:0,P=I===m.endLineNumber?m.endColumn-1:k.length,F=k.substring(M,P);if(/[^ \t]/.test(F)){E=!1;break}}if(E)return!1;if(_&&m.startLineNumber===m.endLineNumber&&m.startColumn+1===m.endColumn){const I=h.getValueInRange(m);if((0,p.isQuote)(I))return!1}}return!0}static _runSurroundSelectionType(l,h,f,y,_){let b=[];for(let v=0,m=y.length;v<m;v++){const E=y[v],I=h.surroundingPairs[_];b[v]=new S.SurroundSelectionCommand(E,_,I)}return new p.EditOperationResult(0,b,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!0})}static _isTypeInterceptorElectricChar(l,h,f){return!!(f.length===1&&h.isCheapToTokenize(f[0].getEndPosition().lineNumber))}static _typeInterceptorElectricChar(l,h,f,y,_){if(!h.electricChars.hasOwnProperty(_)||!y.isEmpty())return null;let b=y.getPosition();f.forceTokenization(b.lineNumber);let v=f.getLineTokens(b.lineNumber),m;try{m=s.LanguageConfigurationRegistry.onElectricCharacter(_,v,b.column)}catch(E){return(0,w.onUnexpectedError)(E),null}if(!m)return null;if(m.matchOpenBracket){let E=(v.getLineContent()+_).lastIndexOf(m.matchOpenBracket)+1,I=f.findMatchingBracketUp(m.matchOpenBracket,{lineNumber:b.lineNumber,column:E});if(I){if(I.startLineNumber===b.lineNumber)return null;let k=f.getLineContent(I.startLineNumber),M=N.getLeadingWhitespace(k),P=h.normalizeIndentation(M),F=f.getLineContent(b.lineNumber),R=f.getLineFirstNonWhitespaceColumn(b.lineNumber)||b.column,A=F.substring(R-1,b.column-1),O=P+A+_,L=new n.Range(b.lineNumber,1,b.lineNumber,b.column);const B=new T.ReplaceCommand(L,O);return new p.EditOperationResult(d(O,l),[B],{shouldPushStackElementBefore:!1,shouldPushStackElementAfter:!0})}}return null}static compositionEndWithInterceptors(l,h,f,y,_,b){if(!y||g.Selection.selectionsArrEqual(y,_))return null;let v=null;for(const E of _){if(!E.isEmpty())return null;const I=E.getPosition(),k=f.getValueInRange(new n.Range(I.lineNumber,I.column-1,I.lineNumber,I.column));if(v===null)v=k;else if(v!==k)return null}if(!v)return null;if(this._isAutoClosingOvertype(h,f,_,b,v)){const E=_.map(I=>new T.ReplaceCommand(new n.Range(I.positionLineNumber,I.positionColumn,I.positionLineNumber,I.positionColumn+1),"",!1));return new p.EditOperationResult(4,E,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!1})}const m=this._getAutoClosingPairClose(h,f,_,v,!1);return m!==null?this._runAutoClosingOpenCharType(l,h,f,_,v,!1,m):null}static typeWithInterceptors(l,h,f,y,_,b,v){if(!l&&v===`
`){let I=[];for(let k=0,M=_.length;k<M;k++)I[k]=c._enter(f,y,!1,_[k]);return new p.EditOperationResult(4,I,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!1})}if(!l&&this._isAutoIndentType(f,y,_)){let I=[],k=!1;for(let M=0,P=_.length;M<P;M++)if(I[M]=this._runAutoIndentType(f,y,_[M],v),!I[M]){k=!0;break}if(!k)return new p.EditOperationResult(4,I,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!1})}if(!l&&this._isAutoClosingOvertype(f,y,_,b,v))return this._runAutoClosingOvertype(h,f,y,_,v);if(!l){const I=this._getAutoClosingPairClose(f,y,_,v,!0);if(I)return this._runAutoClosingOpenCharType(h,f,y,_,v,!0,I)}if(this._isSurroundSelectionType(f,y,_,v))return this._runSurroundSelectionType(h,f,y,_,v);if(!l&&this._isTypeInterceptorElectricChar(f,y,_)){const I=this._typeInterceptorElectricChar(h,f,y,_[0],v);if(I)return I}let m=[];for(let I=0,k=_.length;I<k;I++)m[I]=new T.ReplaceCommand(_[I],v);const E=d(v,h);return new p.EditOperationResult(E,m,{shouldPushStackElementBefore:a(h,E),shouldPushStackElementAfter:!1})}static typeWithoutInterceptors(l,h,f,y,_){let b=[];for(let m=0,E=y.length;m<E;m++)b[m]=new T.ReplaceCommand(y[m],_);const v=d(_,l);return new p.EditOperationResult(v,b,{shouldPushStackElementBefore:a(l,v),shouldPushStackElementAfter:!1})}static lineInsertBefore(l,h,f){if(h===null||f===null)return[];let y=[];for(let _=0,b=f.length;_<b;_++){let v=f[_].positionLineNumber;if(v===1)y[_]=new T.ReplaceCommandWithoutChangingPosition(new n.Range(1,1,1,1),`
`);else{v--;let m=h.getLineMaxColumn(v);y[_]=this._enter(l,h,!1,new n.Range(v,m,v,m))}}return y}static lineInsertAfter(l,h,f){if(h===null||f===null)return[];let y=[];for(let _=0,b=f.length;_<b;_++){const v=f[_].positionLineNumber;let m=h.getLineMaxColumn(v);y[_]=this._enter(l,h,!1,new n.Range(v,m,v,m))}return y}static lineBreakInsert(l,h,f){let y=[];for(let _=0,b=f.length;_<b;_++)y[_]=this._enter(l,h,!0,f[_]);return y}}e.TypeOperations=c;class u extends T.ReplaceCommandWithOffsetCursorState{constructor(l,h,f,y){super(l,(f?h:"")+y,0,-y.length);this._openCharacter=h,this._closeCharacter=y,this.closeCharacterRange=null,this.enclosingRange=null}computeCursorState(l,h){let y=h.getInverseEditOperations()[0].range;return this.closeCharacterRange=new n.Range(y.startLineNumber,y.endColumn-this._closeCharacter.length,y.endLineNumber,y.endColumn),this.enclosingRange=new n.Range(y.startLineNumber,y.endColumn-this._openCharacter.length-this._closeCharacter.length,y.endLineNumber,y.endColumn),super.computeCursorState(l,h)}}e.TypeWithAutoClosingCommand=u;function d(i,l){return i===" "?l===5||l===6?6:5:4}function a(i,l){return o(i)&&!o(l)?!0:i===5?!1:r(i)!==r(l)}function r(i){return i===6||i===5?"space":i}function o(i){return i===4||i===5||i===6}}),define(J[155],ee([0,1,8,43,198,112,13,3]),function(j,e,w,N,T,D,S,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.WordPartOperations=e.WordOperations=void 0;class C{static _createWord(s,c,u,d,a){return{start:d,end:a,wordType:c,nextCharClass:u}}static _findPreviousWordOnLine(s,c,u){let d=c.getLineContent(u.lineNumber);return this._doFindPreviousWordOnLine(d,s,u)}static _doFindPreviousWordOnLine(s,c,u){let d=0;for(let a=u.column-2;a>=0;a--){let r=s.charCodeAt(a),o=c.get(r);if(o===0){if(d===2)return this._createWord(s,d,o,a+1,this._findEndOfWord(s,c,d,a+1));d=1}else if(o===2){if(d===1)return this._createWord(s,d,o,a+1,this._findEndOfWord(s,c,d,a+1));d=2}else if(o===1&&d!==0)return this._createWord(s,d,o,a+1,this._findEndOfWord(s,c,d,a+1))}return d!==0?this._createWord(s,d,1,0,this._findEndOfWord(s,c,d,0)):null}static _findEndOfWord(s,c,u,d){let a=s.length;for(let r=d;r<a;r++){let o=s.charCodeAt(r),i=c.get(o);if(i===1||u===1&&i===2||u===2&&i===0)return r}return a}static _findNextWordOnLine(s,c,u){let d=c.getLineContent(u.lineNumber);return this._doFindNextWordOnLine(d,s,u)}static _doFindNextWordOnLine(s,c,u){let d=0,a=s.length;for(let r=u.column-1;r<a;r++){let o=s.charCodeAt(r),i=c.get(o);if(i===0){if(d===2)return this._createWord(s,d,i,this._findStartOfWord(s,c,d,r-1),r);d=1}else if(i===2){if(d===1)return this._createWord(s,d,i,this._findStartOfWord(s,c,d,r-1),r);d=2}else if(i===1&&d!==0)return this._createWord(s,d,i,this._findStartOfWord(s,c,d,r-1),r)}return d!==0?this._createWord(s,d,1,this._findStartOfWord(s,c,d,a-1),a):null}static _findStartOfWord(s,c,u,d){for(let a=d;a>=0;a--){let r=s.charCodeAt(a),o=c.get(r);if(o===1||u===1&&o===2||u===2&&o===0)return a+1}return 0}static moveWordLeft(s,c,u,d){let a=u.lineNumber,r=u.column;r===1&&a>1&&(a=a-1,r=c.getLineMaxColumn(a));let o=C._findPreviousWordOnLine(s,c,new S.Position(a,r));if(d===0)return new S.Position(a,o?o.start+1:1);if(d===1)return o&&o.wordType===2&&o.end-o.start==1&&o.nextCharClass===0&&(o=C._findPreviousWordOnLine(s,c,new S.Position(a,o.start+1))),new S.Position(a,o?o.start+1:1);if(d===3){for(;o&&o.wordType===2;)o=C._findPreviousWordOnLine(s,c,new S.Position(a,o.start+1));return new S.Position(a,o?o.start+1:1)}return o&&r<=o.end+1&&(o=C._findPreviousWordOnLine(s,c,new S.Position(a,o.start+1))),new S.Position(a,o?o.end+1:1)}static _moveWordPartLeft(s,c){const u=c.lineNumber,d=s.getLineMaxColumn(u);if(c.column===1)return u>1?new S.Position(u-1,s.getLineMaxColumn(u-1)):c;const a=s.getLineContent(u);for(let r=c.column-1;r>1;r--){const o=a.charCodeAt(r-2),i=a.charCodeAt(r-1);if(o===95&&i!==95)return new S.Position(u,r);if(w.isLowerAsciiLetter(o)&&w.isUpperAsciiLetter(i))return new S.Position(u,r);if(w.isUpperAsciiLetter(o)&&w.isUpperAsciiLetter(i)&&r+1<d){const l=a.charCodeAt(r);if(w.isLowerAsciiLetter(l))return new S.Position(u,r)}}return new S.Position(u,1)}static moveWordRight(s,c,u,d){let a=u.lineNumber,r=u.column,o=!1;r===c.getLineMaxColumn(a)&&a<c.getLineCount()&&(o=!0,a=a+1,r=1);let i=C._findNextWordOnLine(s,c,new S.Position(a,r));if(d===2)i&&i.wordType===2&&i.end-i.start==1&&i.nextCharClass===0&&(i=C._findNextWordOnLine(s,c,new S.Position(a,i.end+1))),i?r=i.end+1:r=c.getLineMaxColumn(a);else if(d===3){for(o&&(r=0);i&&(i.wordType===2||i.start+1<=r);)i=C._findNextWordOnLine(s,c,new S.Position(a,i.end+1));i?r=i.start+1:r=c.getLineMaxColumn(a)}else i&&!o&&r>=i.start+1&&(i=C._findNextWordOnLine(s,c,new S.Position(a,i.end+1))),i?r=i.start+1:r=c.getLineMaxColumn(a);return new S.Position(a,r)}static _moveWordPartRight(s,c){const u=c.lineNumber,d=s.getLineMaxColumn(u);if(c.column===d)return u<s.getLineCount()?new S.Position(u+1,1):c;const a=s.getLineContent(u);for(let r=c.column+1;r<d;r++){const o=a.charCodeAt(r-2),i=a.charCodeAt(r-1);if(o!==95&&i===95)return new S.Position(u,r);if(w.isLowerAsciiLetter(o)&&w.isUpperAsciiLetter(i))return new S.Position(u,r);if(w.isUpperAsciiLetter(o)&&w.isUpperAsciiLetter(i)&&r+1<d){const l=a.charCodeAt(r);if(w.isLowerAsciiLetter(l))return new S.Position(u,r)}}return new S.Position(u,d)}static _deleteWordLeftWhitespace(s,c){const u=s.getLineContent(c.lineNumber),d=c.column-2,a=w.lastNonWhitespaceIndex(u,d);return a+1<d?new p.Range(c.lineNumber,a+2,c.lineNumber,c.column):null}static deleteWordLeft(s,c){const u=s.wordSeparators,d=s.model,a=s.selection,r=s.whitespaceHeuristics;if(!a.isEmpty())return a;if(T.DeleteOperations.isAutoClosingPairDelete(s.autoClosingDelete,s.autoClosingBrackets,s.autoClosingQuotes,s.autoClosingPairs.autoClosingPairsOpenByEnd,s.model,[s.selection],s.autoClosedCharacters)){const f=s.selection.getPosition();return new p.Range(f.lineNumber,f.column-1,f.lineNumber,f.column+1)}const o=new S.Position(a.positionLineNumber,a.positionColumn);let i=o.lineNumber,l=o.column;if(i===1&&l===1)return null;if(r){let f=this._deleteWordLeftWhitespace(d,o);if(f)return f}let h=C._findPreviousWordOnLine(u,d,o);return c===0?h?l=h.start+1:l>1?l=1:(i--,l=d.getLineMaxColumn(i)):(h&&l<=h.end+1&&(h=C._findPreviousWordOnLine(u,d,new S.Position(i,h.start+1))),h?l=h.end+1:l>1?l=1:(i--,l=d.getLineMaxColumn(i))),new p.Range(i,l,o.lineNumber,o.column)}static deleteInsideWord(s,c,u){if(!u.isEmpty())return u;const d=new S.Position(u.positionLineNumber,u.positionColumn);let a=this._deleteInsideWordWhitespace(c,d);return a||this._deleteInsideWordDetermineDeleteRange(s,c,d)}static _charAtIsWhitespace(s,c){const u=s.charCodeAt(c);return u===32||u===9}static _deleteInsideWordWhitespace(s,c){const u=s.getLineContent(c.lineNumber),d=u.length;if(d===0)return null;let a=Math.max(c.column-2,0);if(!this._charAtIsWhitespace(u,a))return null;let r=Math.min(c.column-1,d-1);if(!this._charAtIsWhitespace(u,r))return null;for(;a>0&&this._charAtIsWhitespace(u,a-1);)a--;for(;r+1<d&&this._charAtIsWhitespace(u,r+1);)r++;return new p.Range(c.lineNumber,a+1,c.lineNumber,r+2)}static _deleteInsideWordDetermineDeleteRange(s,c,u){const d=c.getLineContent(u.lineNumber),a=d.length;if(a===0)return u.lineNumber>1?new p.Range(u.lineNumber-1,c.getLineMaxColumn(u.lineNumber-1),u.lineNumber,1):u.lineNumber<c.getLineCount()?new p.Range(u.lineNumber,1,u.lineNumber+1,1):new p.Range(u.lineNumber,1,u.lineNumber,1);const r=f=>f.start+1<=u.column&&u.column<=f.end+1,o=(f,y)=>(f=Math.min(f,u.column),y=Math.max(y,u.column),new p.Range(u.lineNumber,f,u.lineNumber,y)),i=f=>{let y=f.start+1,_=f.end+1,b=!1;for(;_-1<a&&this._charAtIsWhitespace(d,_-1);)b=!0,_++;if(!b)for(;y>1&&this._charAtIsWhitespace(d,y-2);)y--;return o(y,_)},l=C._findPreviousWordOnLine(s,c,u);if(l&&r(l))return i(l);const h=C._findNextWordOnLine(s,c,u);return h&&r(h)?i(h):l&&h?o(l.end+1,h.start+1):l?o(l.start+1,l.end+1):h?o(h.start+1,h.end+1):o(1,a+1)}static _deleteWordPartLeft(s,c){if(!c.isEmpty())return c;const u=c.getPosition(),d=C._moveWordPartLeft(s,u);return new p.Range(u.lineNumber,u.column,d.lineNumber,d.column)}static _findFirstNonWhitespaceChar(s,c){let u=s.length;for(let d=c;d<u;d++){let a=s.charAt(d);if(a!==" "&&a!=="    ")return d}return u}static _deleteWordRightWhitespace(s,c){const u=s.getLineContent(c.lineNumber),d=c.column-1,a=this._findFirstNonWhitespaceChar(u,d);return d+1<a?new p.Range(c.lineNumber,c.column,c.lineNumber,a+1):null}static deleteWordRight(s,c){const u=s.wordSeparators,d=s.model,a=s.selection,r=s.whitespaceHeuristics;if(!a.isEmpty())return a;const o=new S.Position(a.positionLineNumber,a.positionColumn);let i=o.lineNumber,l=o.column;const h=d.getLineCount(),f=d.getLineMaxColumn(i);if(i===h&&l===f)return null;if(r){let _=this._deleteWordRightWhitespace(d,o);if(_)return _}let y=C._findNextWordOnLine(u,d,o);return c===2?y?l=y.end+1:l<f||i===h?l=f:(i++,y=C._findNextWordOnLine(u,d,new S.Position(i,1)),y?l=y.start+1:l=d.getLineMaxColumn(i)):(y&&l>=y.start+1&&(y=C._findNextWordOnLine(u,d,new S.Position(i,y.end+1))),y?l=y.start+1:l<f||i===h?l=f:(i++,y=C._findNextWordOnLine(u,d,new S.Position(i,1)),y?l=y.start+1:l=d.getLineMaxColumn(i))),new p.Range(i,l,o.lineNumber,o.column)}static _deleteWordPartRight(s,c){if(!c.isEmpty())return c;const u=c.getPosition(),d=C._moveWordPartRight(s,u);return new p.Range(u.lineNumber,u.column,d.lineNumber,d.column)}static _createWordAtPosition(s,c,u){const d=new p.Range(c,u.start+1,c,u.end+1);return{word:s.getValueInRange(d),startColumn:d.startColumn,endColumn:d.endColumn}}static getWordAtPosition(s,c,u){const d=(0,D.getMapForWordSeparators)(c),a=C._findPreviousWordOnLine(d,s,u);if(a&&a.wordType===1&&a.start<=u.column-1&&u.column-1<=a.end)return C._createWordAtPosition(s,u.lineNumber,a);const r=C._findNextWordOnLine(d,s,u);return r&&r.wordType===1&&r.start<=u.column-1&&u.column-1<=r.end?C._createWordAtPosition(s,u.lineNumber,r):null}static word(s,c,u,d,a){const r=(0,D.getMapForWordSeparators)(s.wordSeparators);let o=C._findPreviousWordOnLine(r,c,a),i=C._findNextWordOnLine(r,c,a);if(!d){let _,b;return o&&o.wordType===1&&o.start<=a.column-1&&a.column-1<=o.end?(_=o.start+1,b=o.end+1):i&&i.wordType===1&&i.start<=a.column-1&&a.column-1<=i.end?(_=i.start+1,b=i.end+1):(o?_=o.end+1:_=1,i?b=i.start+1:b=c.getLineMaxColumn(a.lineNumber)),new N.SingleCursorState(new p.Range(a.lineNumber,_,a.lineNumber,b),0,new S.Position(a.lineNumber,b),0)}let l,h;o&&o.wordType===1&&o.start<a.column-1&&a.column-1<o.end?(l=o.start+1,h=o.end+1):i&&i.wordType===1&&i.start<a.column-1&&a.column-1<i.end?(l=i.start+1,h=i.end+1):(l=a.column,h=a.column);let f=a.lineNumber,y;if(u.selectionStart.containsPosition(a))y=u.selectionStart.endColumn;else if(a.isBeforeOrEqual(u.selectionStart.getStartPosition())){y=l;let _=new S.Position(f,y);u.selectionStart.containsPosition(_)&&(y=u.selectionStart.endColumn)}else{y=h;let _=new S.Position(f,y);u.selectionStart.containsPosition(_)&&(y=u.selectionStart.startColumn)}return u.move(!0,f,y,0)}}e.WordOperations=C;class n extends C{static deleteWordPartLeft(s){const c=g([C.deleteWordLeft(s,0),C.deleteWordLeft(s,2),C._deleteWordPartLeft(s.model,s.selection)]);return c.sort(p.Range.compareRangesUsingEnds),c[2]}static deleteWordPartRight(s){const c=g([C.deleteWordRight(s,0),C.deleteWordRight(s,2),C._deleteWordPartRight(s.model,s.selection)]);return c.sort(p.Range.compareRangesUsingStarts),c[0]}static moveWordPartLeft(s,c,u){const d=g([C.moveWordLeft(s,c,u,0),C.moveWordLeft(s,c,u,2),C._moveWordPartLeft(c,u)]);return d.sort(S.Position.compare),d[2]}static moveWordPartRight(s,c,u){const d=g([C.moveWordRight(s,c,u,0),C.moveWordRight(s,c,u,2),C._moveWordPartRight(c,u)]);return d.sort(S.Position.compare),d[0]}}e.WordPartOperations=n;function g(t){return t.filter(s=>Boolean(s))}}),define(J[278],ee([0,1,20,43,197,155,13,3]),function(j,e,w,N,T,D,S,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CursorMove=e.CursorMoveCommands=void 0;class C{static addCursorDown(t,s,c){let u=[],d=0;for(let a=0,r=s.length;a<r;a++){const o=s[a];u[d++]=new N.CursorState(o.modelState,o.viewState),c?u[d++]=N.CursorState.fromModelState(T.MoveOperations.translateDown(t.cursorConfig,t.model,o.modelState)):u[d++]=N.CursorState.fromViewState(T.MoveOperations.translateDown(t.cursorConfig,t,o.viewState))}return u}static addCursorUp(t,s,c){let u=[],d=0;for(let a=0,r=s.length;a<r;a++){const o=s[a];u[d++]=new N.CursorState(o.modelState,o.viewState),c?u[d++]=N.CursorState.fromModelState(T.MoveOperations.translateUp(t.cursorConfig,t.model,o.modelState)):u[d++]=N.CursorState.fromViewState(T.MoveOperations.translateUp(t.cursorConfig,t,o.viewState))}return u}static moveToBeginningOfLine(t,s,c){let u=[];for(let d=0,a=s.length;d<a;d++){const r=s[d];u[d]=this._moveToLineStart(t,r,c)}return u}static _moveToLineStart(t,s,c){const u=s.viewState.position.column,d=s.modelState.position.column,a=u===d,r=s.viewState.position.lineNumber,o=t.getLineFirstNonWhitespaceColumn(r);return!a&&!(u===o)?this._moveToLineStartByView(t,s,c):this._moveToLineStartByModel(t,s,c)}static _moveToLineStartByView(t,s,c){return N.CursorState.fromViewState(T.MoveOperations.moveToBeginningOfLine(t.cursorConfig,t,s.viewState,c))}static _moveToLineStartByModel(t,s,c){return N.CursorState.fromModelState(T.MoveOperations.moveToBeginningOfLine(t.cursorConfig,t.model,s.modelState,c))}static moveToEndOfLine(t,s,c,u){let d=[];for(let a=0,r=s.length;a<r;a++){const o=s[a];d[a]=this._moveToLineEnd(t,o,c,u)}return d}static _moveToLineEnd(t,s,c,u){const d=s.viewState.position,a=t.getLineMaxColumn(d.lineNumber),r=d.column===a,o=s.modelState.position,i=t.model.getLineMaxColumn(o.lineNumber),l=a-d.column==i-o.column;return r||l?this._moveToLineEndByModel(t,s,c,u):this._moveToLineEndByView(t,s,c,u)}static _moveToLineEndByView(t,s,c,u){return N.CursorState.fromViewState(T.MoveOperations.moveToEndOfLine(t.cursorConfig,t,s.viewState,c,u))}static _moveToLineEndByModel(t,s,c,u){return N.CursorState.fromModelState(T.MoveOperations.moveToEndOfLine(t.cursorConfig,t.model,s.modelState,c,u))}static expandLineSelection(t,s){let c=[];for(let u=0,d=s.length;u<d;u++){const a=s[u],r=a.modelState.selection.startLineNumber,o=t.model.getLineCount();let i=a.modelState.selection.endLineNumber,l;i===o?l=t.model.getLineMaxColumn(o):(i++,l=1),c[u]=N.CursorState.fromModelState(new N.SingleCursorState(new p.Range(r,1,r,1),0,new S.Position(i,l),0))}return c}static moveToBeginningOfBuffer(t,s,c){let u=[];for(let d=0,a=s.length;d<a;d++){const r=s[d];u[d]=N.CursorState.fromModelState(T.MoveOperations.moveToBeginningOfBuffer(t.cursorConfig,t.model,r.modelState,c))}return u}static moveToEndOfBuffer(t,s,c){let u=[];for(let d=0,a=s.length;d<a;d++){const r=s[d];u[d]=N.CursorState.fromModelState(T.MoveOperations.moveToEndOfBuffer(t.cursorConfig,t.model,r.modelState,c))}return u}static selectAll(t,s){const c=t.model.getLineCount(),u=t.model.getLineMaxColumn(c);return N.CursorState.fromModelState(new N.SingleCursorState(new p.Range(1,1,1,1),0,new S.Position(c,u),0))}static line(t,s,c,u,d){const a=t.model.validatePosition(u),r=d?t.coordinatesConverter.validateViewPosition(new S.Position(d.lineNumber,d.column),a):t.coordinatesConverter.convertModelPositionToViewPosition(a);if(!c||!s.modelState.hasSelection()){const i=t.model.getLineCount();let l=a.lineNumber+1,h=1;return l>i&&(l=i,h=t.model.getLineMaxColumn(l)),N.CursorState.fromModelState(new N.SingleCursorState(new p.Range(a.lineNumber,1,l,h),0,new S.Position(l,h),0))}const o=s.modelState.selectionStart.getStartPosition().lineNumber;if(a.lineNumber<o)return N.CursorState.fromViewState(s.viewState.move(s.modelState.hasSelection(),r.lineNumber,1,0));if(a.lineNumber>o){const i=t.getLineCount();let l=r.lineNumber+1,h=1;return l>i&&(l=i,h=t.getLineMaxColumn(l)),N.CursorState.fromViewState(s.viewState.move(s.modelState.hasSelection(),l,h,0))}else{const i=s.modelState.selectionStart.getEndPosition();return N.CursorState.fromModelState(s.modelState.move(s.modelState.hasSelection(),i.lineNumber,i.column,0))}}static word(t,s,c,u){const d=t.model.validatePosition(u);return N.CursorState.fromModelState(D.WordOperations.word(t.cursorConfig,t.model,s.modelState,c,d))}static cancelSelection(t,s){if(!s.modelState.hasSelection())return new N.CursorState(s.modelState,s.viewState);const c=s.viewState.position.lineNumber,u=s.viewState.position.column;return N.CursorState.fromViewState(new N.SingleCursorState(new p.Range(c,u,c,u),0,new S.Position(c,u),0))}static moveTo(t,s,c,u,d){const a=t.model.validatePosition(u),r=d?t.coordinatesConverter.validateViewPosition(new S.Position(d.lineNumber,d.column),a):t.coordinatesConverter.convertModelPositionToViewPosition(a);return N.CursorState.fromViewState(s.viewState.move(c,r.lineNumber,r.column,0))}static simpleMove(t,s,c,u,d,a){switch(c){case 0:return a===4?this._moveHalfLineLeft(t,s,u):this._moveLeft(t,s,u,d);case 1:return a===4?this._moveHalfLineRight(t,s,u):this._moveRight(t,s,u,d);case 2:return a===2?this._moveUpByViewLines(t,s,u,d):this._moveUpByModelLines(t,s,u,d);case 3:return a===2?this._moveDownByViewLines(t,s,u,d):this._moveDownByModelLines(t,s,u,d);case 4:return a===2?s.map(r=>N.CursorState.fromViewState(T.MoveOperations.moveToPrevBlankLine(t.cursorConfig,t,r.viewState,u))):s.map(r=>N.CursorState.fromModelState(T.MoveOperations.moveToPrevBlankLine(t.cursorConfig,t.model,r.modelState,u)));case 5:return a===2?s.map(r=>N.CursorState.fromViewState(T.MoveOperations.moveToNextBlankLine(t.cursorConfig,t,r.viewState,u))):s.map(r=>N.CursorState.fromModelState(T.MoveOperations.moveToNextBlankLine(t.cursorConfig,t.model,r.modelState,u)));case 6:return this._moveToViewMinColumn(t,s,u);case 7:return this._moveToViewFirstNonWhitespaceColumn(t,s,u);case 8:return this._moveToViewCenterColumn(t,s,u);case 9:return this._moveToViewMaxColumn(t,s,u);case 10:return this._moveToViewLastNonWhitespaceColumn(t,s,u);default:return null}}static viewportMove(t,s,c,u,d){const a=t.getCompletelyVisibleViewRange(),r=t.coordinatesConverter.convertViewRangeToModelRange(a);switch(c){case 11:{const o=this._firstLineNumberInRange(t.model,r,d),i=t.model.getLineFirstNonWhitespaceColumn(o);return[this._moveToModelPosition(t,s[0],u,o,i)]}case 13:{const o=this._lastLineNumberInRange(t.model,r,d),i=t.model.getLineFirstNonWhitespaceColumn(o);return[this._moveToModelPosition(t,s[0],u,o,i)]}case 12:{const o=Math.round((r.startLineNumber+r.endLineNumber)/2),i=t.model.getLineFirstNonWhitespaceColumn(o);return[this._moveToModelPosition(t,s[0],u,o,i)]}case 14:{let o=[];for(let i=0,l=s.length;i<l;i++){const h=s[i];o[i]=this.findPositionInViewportIfOutside(t,h,a,u)}return o}default:return null}}static findPositionInViewportIfOutside(t,s,c,u){let d=s.viewState.position.lineNumber;if(c.startLineNumber<=d&&d<=c.endLineNumber-1)return new N.CursorState(s.modelState,s.viewState);{let a;d>c.endLineNumber-1?a=c.endLineNumber-1:d<c.startLineNumber?a=c.startLineNumber:a=d;const r=T.MoveOperations.vertical(t.cursorConfig,t,d,s.viewState.position.column,s.viewState.leftoverVisibleColumns,a,!1);return N.CursorState.fromViewState(s.viewState.move(u,r.lineNumber,r.column,r.leftoverVisibleColumns))}}static _firstLineNumberInRange(t,s,c){let u=s.startLineNumber;return s.startColumn!==t.getLineMinColumn(u)&&u++,Math.min(s.endLineNumber,u+c-1)}static _lastLineNumberInRange(t,s,c){let u=s.startLineNumber;return s.startColumn!==t.getLineMinColumn(u)&&u++,Math.max(u,s.endLineNumber-c+1)}static _moveLeft(t,s,c,u){return s.map(d=>N.CursorState.fromViewState(T.MoveOperations.moveLeft(t.cursorConfig,t,d.viewState,c,u)))}static _moveHalfLineLeft(t,s,c){let u=[];for(let d=0,a=s.length;d<a;d++){const r=s[d],o=r.viewState.position.lineNumber,i=Math.round(t.getLineContent(o).length/2);u[d]=N.CursorState.fromViewState(T.MoveOperations.moveLeft(t.cursorConfig,t,r.viewState,c,i))}return u}static _moveRight(t,s,c,u){return s.map(d=>N.CursorState.fromViewState(T.MoveOperations.moveRight(t.cursorConfig,t,d.viewState,c,u)))}static _moveHalfLineRight(t,s,c){let u=[];for(let d=0,a=s.length;d<a;d++){const r=s[d],o=r.viewState.position.lineNumber,i=Math.round(t.getLineContent(o).length/2);u[d]=N.CursorState.fromViewState(T.MoveOperations.moveRight(t.cursorConfig,t,r.viewState,c,i))}return u}static _moveDownByViewLines(t,s,c,u){let d=[];for(let a=0,r=s.length;a<r;a++){const o=s[a];d[a]=N.CursorState.fromViewState(T.MoveOperations.moveDown(t.cursorConfig,t,o.viewState,c,u))}return d}static _moveDownByModelLines(t,s,c,u){let d=[];for(let a=0,r=s.length;a<r;a++){const o=s[a];d[a]=N.CursorState.fromModelState(T.MoveOperations.moveDown(t.cursorConfig,t.model,o.modelState,c,u))}return d}static _moveUpByViewLines(t,s,c,u){let d=[];for(let a=0,r=s.length;a<r;a++){const o=s[a];d[a]=N.CursorState.fromViewState(T.MoveOperations.moveUp(t.cursorConfig,t,o.viewState,c,u))}return d}static _moveUpByModelLines(t,s,c,u){let d=[];for(let a=0,r=s.length;a<r;a++){const o=s[a];d[a]=N.CursorState.fromModelState(T.MoveOperations.moveUp(t.cursorConfig,t.model,o.modelState,c,u))}return d}static _moveToViewPosition(t,s,c,u,d){return N.CursorState.fromViewState(s.viewState.move(c,u,d,0))}static _moveToModelPosition(t,s,c,u,d){return N.CursorState.fromModelState(s.modelState.move(c,u,d,0))}static _moveToViewMinColumn(t,s,c){let u=[];for(let d=0,a=s.length;d<a;d++){const r=s[d],o=r.viewState.position.lineNumber,i=t.getLineMinColumn(o);u[d]=this._moveToViewPosition(t,r,c,o,i)}return u}static _moveToViewFirstNonWhitespaceColumn(t,s,c){let u=[];for(let d=0,a=s.length;d<a;d++){const r=s[d],o=r.viewState.position.lineNumber,i=t.getLineFirstNonWhitespaceColumn(o);u[d]=this._moveToViewPosition(t,r,c,o,i)}return u}static _moveToViewCenterColumn(t,s,c){let u=[];for(let d=0,a=s.length;d<a;d++){const r=s[d],o=r.viewState.position.lineNumber,i=Math.round((t.getLineMaxColumn(o)+t.getLineMinColumn(o))/2);u[d]=this._moveToViewPosition(t,r,c,o,i)}return u}static _moveToViewMaxColumn(t,s,c){let u=[];for(let d=0,a=s.length;d<a;d++){const r=s[d],o=r.viewState.position.lineNumber,i=t.getLineMaxColumn(o);u[d]=this._moveToViewPosition(t,r,c,o,i)}return u}static _moveToViewLastNonWhitespaceColumn(t,s,c){let u=[];for(let d=0,a=s.length;d<a;d++){const r=s[d],o=r.viewState.position.lineNumber,i=t.getLineLastNonWhitespaceColumn(o);u[d]=this._moveToViewPosition(t,r,c,o,i)}return u}}e.CursorMoveCommands=C;var n;(function(g){const t=function(c){if(!w.isObject(c))return!1;let u=c;return!(!w.isString(u.to)||!w.isUndefined(u.select)&&!w.isBoolean(u.select)||!w.isUndefined(u.by)&&!w.isString(u.by)||!w.isUndefined(u.value)&&!w.isNumber(u.value))};g.description={description:"Move cursor to a logical position in the view",args:[{name:"Cursor move argument object",description:`Property-value pairs that can be passed through this argument:
                    * 'to': A mandatory logical position value providing where to move the cursor.
                        \`\`\`
                        'left', 'right', 'up', 'down', 'prevBlankLine', 'nextBlankLine',
                        'wrappedLineStart', 'wrappedLineEnd', 'wrappedLineColumnCenter'
                        'wrappedLineFirstNonWhitespaceCharacter', 'wrappedLineLastNonWhitespaceCharacter'
                        'viewPortTop', 'viewPortCenter', 'viewPortBottom', 'viewPortIfOutside'
                        \`\`\`
                    * 'by': Unit to move. Default is computed based on 'to' value.
                        \`\`\`
                        'line', 'wrappedLine', 'character', 'halfLine'
                        \`\`\`
                    * 'value': Number of units to move. Default is '1'.
                    * 'select': If 'true' makes the selection. Default is 'false'.
                `,constraint:t,schema:{type:"object",required:["to"],properties:{to:{type:"string",enum:["left","right","up","down","prevBlankLine","nextBlankLine","wrappedLineStart","wrappedLineEnd","wrappedLineColumnCenter","wrappedLineFirstNonWhitespaceCharacter","wrappedLineLastNonWhitespaceCharacter","viewPortTop","viewPortCenter","viewPortBottom","viewPortIfOutside"]},by:{type:"string",enum:["line","wrappedLine","character","halfLine"]},value:{type:"number",default:1},select:{type:"boolean",default:!1}}}}]},g.RawDirection={Left:"left",Right:"right",Up:"up",Down:"down",PrevBlankLine:"prevBlankLine",NextBlankLine:"nextBlankLine",WrappedLineStart:"wrappedLineStart",WrappedLineFirstNonWhitespaceCharacter:"wrappedLineFirstNonWhitespaceCharacter",WrappedLineColumnCenter:"wrappedLineColumnCenter",WrappedLineEnd:"wrappedLineEnd",WrappedLineLastNonWhitespaceCharacter:"wrappedLineLastNonWhitespaceCharacter",ViewPortTop:"viewPortTop",ViewPortCenter:"viewPortCenter",ViewPortBottom:"viewPortBottom",ViewPortIfOutside:"viewPortIfOutside"},g.RawUnit={Line:"line",WrappedLine:"wrappedLine",Character:"character",HalfLine:"halfLine"};function s(c){if(!c.to)return null;let u;switch(c.to){case g.RawDirection.Left:u=0;break;case g.RawDirection.Right:u=1;break;case g.RawDirection.Up:u=2;break;case g.RawDirection.Down:u=3;break;case g.RawDirection.PrevBlankLine:u=4;break;case g.RawDirection.NextBlankLine:u=5;break;case g.RawDirection.WrappedLineStart:u=6;break;case g.RawDirection.WrappedLineFirstNonWhitespaceCharacter:u=7;break;case g.RawDirection.WrappedLineColumnCenter:u=8;break;case g.RawDirection.WrappedLineEnd:u=9;break;case g.RawDirection.WrappedLineLastNonWhitespaceCharacter:u=10;break;case g.RawDirection.ViewPortTop:u=11;break;case g.RawDirection.ViewPortBottom:u=13;break;case g.RawDirection.ViewPortCenter:u=12;break;case g.RawDirection.ViewPortIfOutside:u=14;break;default:return null}let d=0;switch(c.by){case g.RawUnit.Line:d=1;break;case g.RawUnit.WrappedLine:d=2;break;case g.RawUnit.Character:d=3;break;case g.RawUnit.HalfLine:d=4;break}return{direction:u,unit:d,select:!!c.select,value:c.value||1}}g.parse=s})(n=e.CursorMove||(e.CursorMove={}))}),define(J[156],ee([0,1,464,34,20,45,16,28,662,43,198,278,199,13,3,25,15,80]),function(j,e,w,N,T,D,S,p,C,n,g,t,s,c,u,d,a,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CoreEditingCommands=e.CoreNavigationCommands=e.RevealLine_=e.EditorScroll_=e.CoreEditorCommand=void 0;const o=0;class i extends S.EditorCommand{runEditorCommand(M,P,F){const R=P._getViewModel();!R||this.runCoreEditorCommand(R,F||{})}}e.CoreEditorCommand=i;var l;(function(k){const M=function(F){if(!T.isObject(F))return!1;const R=F;return!(!T.isString(R.to)||!T.isUndefined(R.by)&&!T.isString(R.by)||!T.isUndefined(R.value)&&!T.isNumber(R.value)||!T.isUndefined(R.revealCursor)&&!T.isBoolean(R.revealCursor))};k.description={description:"Scroll editor in the given direction",args:[{name:"Editor scroll argument object",description:"Property-value pairs that can be passed through this argument:\n                    * 'to': A mandatory direction value.\n                        ```\n                        'up', 'down'\n                        ```\n                    * 'by': Unit to move. Default is computed based on 'to' value.\n                        ```\n                        'line', 'wrappedLine', 'page', 'halfPage'\n                        ```\n                    * 'value': Number of units to move. Default is '1'.\n                    * 'revealCursor': If 'true' reveals the cursor if it is outside view port.\n                ",constraint:M,schema:{type:"object",required:["to"],properties:{to:{type:"string",enum:["up","down"]},by:{type:"string",enum:["line","wrappedLine","page","halfPage"]},value:{type:"number",default:1},revealCursor:{type:"boolean"}}}}]},k.RawDirection={Up:"up",Down:"down"},k.RawUnit={Line:"line",WrappedLine:"wrappedLine",Page:"page",HalfPage:"halfPage"};function P(F){let R;switch(F.to){case k.RawDirection.Up:R=1;break;case k.RawDirection.Down:R=2;break;default:return null}let A;switch(F.by){case k.RawUnit.Line:A=1;break;case k.RawUnit.WrappedLine:A=2;break;case k.RawUnit.Page:A=3;break;case k.RawUnit.HalfPage:A=4;break;default:A=2}const O=Math.floor(F.value||1),L=!!F.revealCursor;return{direction:R,unit:A,value:O,revealCursor:L,select:!!F.select}}k.parse=P})(l=e.EditorScroll_||(e.EditorScroll_={}));var h;(function(k){const M=function(P){if(!T.isObject(P))return!1;const F=P;return!(!T.isNumber(F.lineNumber)&&!T.isString(F.lineNumber)||!T.isUndefined(F.at)&&!T.isString(F.at))};k.description={description:"Reveal the given line at the given logical position",args:[{name:"Reveal line argument object",description:"Property-value pairs that can be passed through this argument:\n                    * 'lineNumber': A mandatory line number value.\n                    * 'at': Logical position at which line has to be revealed.\n                        ```\n                        'top', 'center', 'bottom'\n                        ```\n                ",constraint:M,schema:{type:"object",required:["lineNumber"],properties:{lineNumber:{type:["number","string"]},at:{type:"string",enum:["top","center","bottom"]}}}}]},k.RawAtArgument={Top:"top",Center:"center",Bottom:"bottom"}})(h=e.RevealLine_||(e.RevealLine_={}));class f{constructor(M){M.addImplementation(1e4,"code-editor",(P,F)=>{const R=P.get(p.ICodeEditorService).getFocusedCodeEditor();return R&&R.hasTextFocus()?this._runEditorCommand(P,R,F):!1}),M.addImplementation(1e3,"generic-dom-input-textarea",(P,F)=>{const R=document.activeElement;return R&&["input","textarea"].indexOf(R.tagName.toLowerCase())>=0?(this.runDOMCommand(),!0):!1}),M.addImplementation(0,"generic-dom",(P,F)=>{const R=P.get(p.ICodeEditorService).getActiveCodeEditor();return R?(R.focus(),this._runEditorCommand(P,R,F)):!1})}_runEditorCommand(M,P,F){const R=this.runEditorCommand(M,P,F);return R||!0}}var y;(function(k){class M extends i{constructor(x){super(x);this._inSelectionMode=x.inSelectionMode}runCoreEditorCommand(x,U){x.model.pushStackElement(),x.setCursorStates(U.source,3,[t.CursorMoveCommands.moveTo(x,x.getPrimaryCursorState(),this._inSelectionMode,U.position,U.viewPosition)]),x.revealPrimaryCursor(U.source,!0)}}k.MoveTo=(0,S.registerEditorCommand)(new M({id:"_moveTo",inSelectionMode:!1,precondition:void 0})),k.MoveToSelect=(0,S.registerEditorCommand)(new M({id:"_moveToSelect",inSelectionMode:!0,precondition:void 0}));class P extends i{runCoreEditorCommand(x,U){x.model.pushStackElement();const $=this._getColumnSelectResult(x,x.getPrimaryCursorState(),x.getCursorColumnSelectData(),U);x.setCursorStates(U.source,3,$.viewStates.map(V=>n.CursorState.fromViewState(V))),x.setCursorColumnSelectData({isReal:!0,fromViewLineNumber:$.fromLineNumber,fromViewVisualColumn:$.fromVisualColumn,toViewLineNumber:$.toLineNumber,toViewVisualColumn:$.toVisualColumn}),$.reversed?x.revealTopMostCursor(U.source):x.revealBottomMostCursor(U.source)}}k.ColumnSelect=(0,S.registerEditorCommand)(new class extends P{constructor(){super({id:"columnSelect",precondition:void 0})}_getColumnSelectResult(G,x,U,$){const V=G.model.validatePosition($.position),Q=G.coordinatesConverter.validateViewPosition(new c.Position($.viewPosition.lineNumber,$.viewPosition.column),V);let ue=$.doColumnSelect?U.fromViewLineNumber:Q.lineNumber,pe=$.doColumnSelect?U.fromViewVisualColumn:$.mouseColumn-1;return C.ColumnSelection.columnSelect(G.cursorConfig,G,ue,pe,Q.lineNumber,$.mouseColumn-1)}}),k.CursorColumnSelectLeft=(0,S.registerEditorCommand)(new class extends P{constructor(){super({id:"cursorColumnSelectLeft",precondition:void 0,kbOpts:{weight:o,kbExpr:d.EditorContextKeys.textInputFocus,primary:2048|1024|512|15,linux:{primary:0}}})}_getColumnSelectResult(G,x,U,$){return C.ColumnSelection.columnSelectLeft(G.cursorConfig,G,U)}}),k.CursorColumnSelectRight=(0,S.registerEditorCommand)(new class extends P{constructor(){super({id:"cursorColumnSelectRight",precondition:void 0,kbOpts:{weight:o,kbExpr:d.EditorContextKeys.textInputFocus,primary:2048|1024|512|17,linux:{primary:0}}})}_getColumnSelectResult(G,x,U,$){return C.ColumnSelection.columnSelectRight(G.cursorConfig,G,U)}});class F extends P{constructor(x){super(x);this._isPaged=x.isPaged}_getColumnSelectResult(x,U,$,V){return C.ColumnSelection.columnSelectUp(x.cursorConfig,x,$,this._isPaged)}}k.CursorColumnSelectUp=(0,S.registerEditorCommand)(new F({isPaged:!1,id:"cursorColumnSelectUp",precondition:void 0,kbOpts:{weight:o,kbExpr:d.EditorContextKeys.textInputFocus,primary:2048|1024|512|16,linux:{primary:0}}})),k.CursorColumnSelectPageUp=(0,S.registerEditorCommand)(new F({isPaged:!0,id:"cursorColumnSelectPageUp",precondition:void 0,kbOpts:{weight:o,kbExpr:d.EditorContextKeys.textInputFocus,primary:2048|1024|512|11,linux:{primary:0}}}));class R extends P{constructor(x){super(x);this._isPaged=x.isPaged}_getColumnSelectResult(x,U,$,V){return C.ColumnSelection.columnSelectDown(x.cursorConfig,x,$,this._isPaged)}}k.CursorColumnSelectDown=(0,S.registerEditorCommand)(new R({isPaged:!1,id:"cursorColumnSelectDown",precondition:void 0,kbOpts:{weight:o,kbExpr:d.EditorContextKeys.textInputFocus,primary:2048|1024|512|18,linux:{primary:0}}})),k.CursorColumnSelectPageDown=(0,S.registerEditorCommand)(new R({isPaged:!0,id:"cursorColumnSelectPageDown",precondition:void 0,kbOpts:{weight:o,kbExpr:d.EditorContextKeys.textInputFocus,primary:2048|1024|512|12,linux:{primary:0}}}));class A extends i{constructor(){super({id:"cursorMove",precondition:void 0,description:t.CursorMove.description})}runCoreEditorCommand(x,U){const $=t.CursorMove.parse(U);!$||this._runCursorMove(x,U.source,$)}_runCursorMove(x,U,$){x.model.pushStackElement(),x.setCursorStates(U,3,A._move(x,x.getCursorStates(),$)),x.revealPrimaryCursor(U,!0)}static _move(x,U,$){const V=$.select,Q=$.value;switch($.direction){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:case 8:case 9:case 10:return t.CursorMoveCommands.simpleMove(x,U,$.direction,V,Q,$.unit);case 11:case 13:case 12:case 14:return t.CursorMoveCommands.viewportMove(x,U,$.direction,V,Q);default:return null}}}k.CursorMoveImpl=A,k.CursorMove=(0,S.registerEditorCommand)(new A);class O extends i{constructor(x){super(x);this._staticArgs=x.args}runCoreEditorCommand(x,U){let $=this._staticArgs;this._staticArgs.value===-1&&($={direction:this._staticArgs.direction,unit:this._staticArgs.unit,select:this._staticArgs.select,value:x.cursorConfig.pageSize}),x.model.pushStackElement(),x.setCursorStates(U.source,3,t.CursorMoveCommands.simpleMove(x,x.getCursorStates(),$.direction,$.select,$.value,$.unit)),x.revealPrimaryCursor(U.source,!0)}}k.CursorLeft=(0,S.registerEditorCommand)(new O({args:{direction:0,unit:0,select:!1,value:1},id:"cursorLeft",precondition:void 0,kbOpts:{weight:o,kbExpr:d.EditorContextKeys.textInputFocus,primary:15,mac:{primary:15,secondary:[256|32]}}})),k.CursorLeftSelect=(0,S.registerEditorCommand)(new O({args:{direction:0,unit:0,select:!0,value:1},id:"cursorLeftSelect",precondition:void 0,kbOpts:{weight:o,kbExpr:d.EditorContextKeys.textInputFocus,primary:1024|15}})),k.CursorRight=(0,S.registerEditorCommand)(new O({args:{direction:1,unit:0,select:!1,value:1},id:"cursorRight",precondition:void 0,kbOpts:{weight:o,kbExpr:d.EditorContextKeys.textInputFocus,primary:17,mac:{primary:17,secondary:[256|36]}}})),k.CursorRightSelect=(0,S.registerEditorCommand)(new O({args:{direction:1,unit:0,select:!0,value:1},id:"cursorRightSelect",precondition:void 0,kbOpts:{weight:o,kbExpr:d.EditorContextKeys.textInputFocus,primary:1024|17}})),k.CursorUp=(0,S.registerEditorCommand)(new O({args:{direction:2,unit:2,select:!1,value:1},id:"cursorUp",precondition:void 0,kbOpts:{weight:o,kbExpr:d.EditorContextKeys.textInputFocus,primary:16,mac:{primary:16,secondary:[256|46]}}})),k.CursorUpSelect=(0,S.registerEditorCommand)(new O({args:{direction:2,unit:2,select:!0,value:1},id:"cursorUpSelect",precondition:void 0,kbOpts:{weight:o,kbExpr:d.EditorContextKeys.textInputFocus,primary:1024|16,secondary:[2048|1024|16],mac:{primary:1024|16},linux:{primary:1024|16}}})),k.CursorPageUp=(0,S.registerEditorCommand)(new O({args:{direction:2,unit:2,select:!1,value:-1},id:"cursorPageUp",precondition:void 0,kbOpts:{weight:o,kbExpr:d.EditorContextKeys.textInputFocus,primary:11}})),k.CursorPageUpSelect=(0,S.registerEditorCommand)(new O({args:{direction:2,unit:2,select:!0,value:-1},id:"cursorPageUpSelect",precondition:void 0,kbOpts:{weight:o,kbExpr:d.EditorContextKeys.textInputFocus,primary:1024|11}})),k.CursorDown=(0,S.registerEditorCommand)(new O({args:{direction:3,unit:2,select:!1,value:1},id:"cursorDown",precondition:void 0,kbOpts:{weight:o,kbExpr:d.EditorContextKeys.textInputFocus,primary:18,mac:{primary:18,secondary:[256|44]}}})),k.CursorDownSelect=(0,S.registerEditorCommand)(new O({args:{direction:3,unit:2,select:!0,value:1},id:"cursorDownSelect",precondition:void 0,kbOpts:{weight:o,kbExpr:d.EditorContextKeys.textInputFocus,primary:1024|18,secondary:[2048|1024|18],mac:{primary:1024|18},linux:{primary:1024|18}}})),k.CursorPageDown=(0,S.registerEditorCommand)(new O({args:{direction:3,unit:2,select:!1,value:-1},id:"cursorPageDown",precondition:void 0,kbOpts:{weight:o,kbExpr:d.EditorContextKeys.textInputFocus,primary:12}})),k.CursorPageDownSelect=(0,S.registerEditorCommand)(new O({args:{direction:3,unit:2,select:!0,value:-1},id:"cursorPageDownSelect",precondition:void 0,kbOpts:{weight:o,kbExpr:d.EditorContextKeys.textInputFocus,primary:1024|12}})),k.CreateCursor=(0,S.registerEditorCommand)(new class extends i{constructor(){super({id:"createCursor",precondition:void 0})}runCoreEditorCommand(G,x){let U;x.wholeLine?U=t.CursorMoveCommands.line(G,G.getPrimaryCursorState(),!1,x.position,x.viewPosition):U=t.CursorMoveCommands.moveTo(G,G.getPrimaryCursorState(),!1,x.position,x.viewPosition);const $=G.getCursorStates();if($.length>1){const V=U.modelState?U.modelState.position:null,Q=U.viewState?U.viewState.position:null;for(let ue=0,pe=$.length;ue<pe;ue++){const fe=$[ue];if(!(V&&!fe.modelState.selection.containsPosition(V))&&!(Q&&!fe.viewState.selection.containsPosition(Q))){$.splice(ue,1),G.model.pushStackElement(),G.setCursorStates(x.source,3,$);return}}}$.push(U),G.model.pushStackElement(),G.setCursorStates(x.source,3,$)}}),k.LastCursorMoveToSelect=(0,S.registerEditorCommand)(new class extends i{constructor(){super({id:"_lastCursorMoveToSelect",precondition:void 0})}runCoreEditorCommand(G,x){const U=G.getLastAddedCursorIndex(),$=G.getCursorStates(),V=$.slice(0);V[U]=t.CursorMoveCommands.moveTo(G,$[U],!0,x.position,x.viewPosition),G.model.pushStackElement(),G.setCursorStates(x.source,3,V)}});class L extends i{constructor(x){super(x);this._inSelectionMode=x.inSelectionMode}runCoreEditorCommand(x,U){x.model.pushStackElement(),x.setCursorStates(U.source,3,t.CursorMoveCommands.moveToBeginningOfLine(x,x.getCursorStates(),this._inSelectionMode)),x.revealPrimaryCursor(U.source,!0)}}k.CursorHome=(0,S.registerEditorCommand)(new L({inSelectionMode:!1,id:"cursorHome",precondition:void 0,kbOpts:{weight:o,kbExpr:d.EditorContextKeys.textInputFocus,primary:14,mac:{primary:14,secondary:[2048|15]}}})),k.CursorHomeSelect=(0,S.registerEditorCommand)(new L({inSelectionMode:!0,id:"cursorHomeSelect",precondition:void 0,kbOpts:{weight:o,kbExpr:d.EditorContextKeys.textInputFocus,primary:1024|14,mac:{primary:1024|14,secondary:[2048|1024|15]}}}));class B extends i{constructor(x){super(x);this._inSelectionMode=x.inSelectionMode}runCoreEditorCommand(x,U){x.model.pushStackElement(),x.setCursorStates(U.source,3,this._exec(x.getCursorStates())),x.revealPrimaryCursor(U.source,!0)}_exec(x){const U=[];for(let $=0,V=x.length;$<V;$++){const Q=x[$],ue=Q.modelState.position.lineNumber;U[$]=n.CursorState.fromModelState(Q.modelState.move(this._inSelectionMode,ue,1,0))}return U}}k.CursorLineStart=(0,S.registerEditorCommand)(new B({inSelectionMode:!1,id:"cursorLineStart",precondition:void 0,kbOpts:{weight:o,kbExpr:d.EditorContextKeys.textInputFocus,primary:0,mac:{primary:256|31}}})),k.CursorLineStartSelect=(0,S.registerEditorCommand)(new B({inSelectionMode:!0,id:"cursorLineStartSelect",precondition:void 0,kbOpts:{weight:o,kbExpr:d.EditorContextKeys.textInputFocus,primary:0,mac:{primary:256|1024|31}}}));class W extends i{constructor(x){super(x);this._inSelectionMode=x.inSelectionMode}runCoreEditorCommand(x,U){x.model.pushStackElement(),x.setCursorStates(U.source,3,t.CursorMoveCommands.moveToEndOfLine(x,x.getCursorStates(),this._inSelectionMode,U.sticky||!1)),x.revealPrimaryCursor(U.source,!0)}}k.CursorEnd=(0,S.registerEditorCommand)(new W({inSelectionMode:!1,id:"cursorEnd",precondition:void 0,kbOpts:{args:{sticky:!1},weight:o,kbExpr:d.EditorContextKeys.textInputFocus,primary:13,mac:{primary:13,secondary:[2048|17]}},description:{description:"Go to End",args:[{name:"args",schema:{type:"object",properties:{sticky:{description:w.localize(0,null),type:"boolean",default:!1}}}}]}})),k.CursorEndSelect=(0,S.registerEditorCommand)(new W({inSelectionMode:!0,id:"cursorEndSelect",precondition:void 0,kbOpts:{args:{sticky:!1},weight:o,kbExpr:d.EditorContextKeys.textInputFocus,primary:1024|13,mac:{primary:1024|13,secondary:[2048|1024|17]}},description:{description:"Select to End",args:[{name:"args",schema:{type:"object",properties:{sticky:{description:w.localize(1,null),type:"boolean",default:!1}}}}]}}));class K extends i{constructor(x){super(x);this._inSelectionMode=x.inSelectionMode}runCoreEditorCommand(x,U){x.model.pushStackElement(),x.setCursorStates(U.source,3,this._exec(x,x.getCursorStates())),x.revealPrimaryCursor(U.source,!0)}_exec(x,U){const $=[];for(let V=0,Q=U.length;V<Q;V++){const ue=U[V],pe=ue.modelState.position.lineNumber,fe=x.model.getLineMaxColumn(pe);$[V]=n.CursorState.fromModelState(ue.modelState.move(this._inSelectionMode,pe,fe,0))}return $}}k.CursorLineEnd=(0,S.registerEditorCommand)(new K({inSelectionMode:!1,id:"cursorLineEnd",precondition:void 0,kbOpts:{weight:o,kbExpr:d.EditorContextKeys.textInputFocus,primary:0,mac:{primary:256|35}}})),k.CursorLineEndSelect=(0,S.registerEditorCommand)(new K({inSelectionMode:!0,id:"cursorLineEndSelect",precondition:void 0,kbOpts:{weight:o,kbExpr:d.EditorContextKeys.textInputFocus,primary:0,mac:{primary:256|1024|35}}}));class H extends i{constructor(x){super(x);this._inSelectionMode=x.inSelectionMode}runCoreEditorCommand(x,U){x.model.pushStackElement(),x.setCursorStates(U.source,3,t.CursorMoveCommands.moveToBeginningOfBuffer(x,x.getCursorStates(),this._inSelectionMode)),x.revealPrimaryCursor(U.source,!0)}}k.CursorTop=(0,S.registerEditorCommand)(new H({inSelectionMode:!1,id:"cursorTop",precondition:void 0,kbOpts:{weight:o,kbExpr:d.EditorContextKeys.textInputFocus,primary:2048|14,mac:{primary:2048|16}}})),k.CursorTopSelect=(0,S.registerEditorCommand)(new H({inSelectionMode:!0,id:"cursorTopSelect",precondition:void 0,kbOpts:{weight:o,kbExpr:d.EditorContextKeys.textInputFocus,primary:2048|1024|14,mac:{primary:2048|1024|16}}}));class Y extends i{constructor(x){super(x);this._inSelectionMode=x.inSelectionMode}runCoreEditorCommand(x,U){x.model.pushStackElement(),x.setCursorStates(U.source,3,t.CursorMoveCommands.moveToEndOfBuffer(x,x.getCursorStates(),this._inSelectionMode)),x.revealPrimaryCursor(U.source,!0)}}k.CursorBottom=(0,S.registerEditorCommand)(new Y({inSelectionMode:!1,id:"cursorBottom",precondition:void 0,kbOpts:{weight:o,kbExpr:d.EditorContextKeys.textInputFocus,primary:2048|13,mac:{primary:2048|18}}})),k.CursorBottomSelect=(0,S.registerEditorCommand)(new Y({inSelectionMode:!0,id:"cursorBottomSelect",precondition:void 0,kbOpts:{weight:o,kbExpr:d.EditorContextKeys.textInputFocus,primary:2048|1024|13,mac:{primary:2048|1024|18}}}));class X extends i{constructor(){super({id:"editorScroll",precondition:void 0,description:l.description})}runCoreEditorCommand(x,U){const $=l.parse(U);!$||this._runEditorScroll(x,U.source,$)}_runEditorScroll(x,U,$){const V=this._computeDesiredScrollTop(x,$);if($.revealCursor){const Q=x.getCompletelyVisibleViewRangeAtScrollTop(V);x.setCursorStates(U,3,[t.CursorMoveCommands.findPositionInViewportIfOutside(x,x.getPrimaryCursorState(),Q,$.select)])}x.setScrollTop(V,0)}_computeDesiredScrollTop(x,U){if(U.unit===1){const Q=x.getCompletelyVisibleViewRange(),ue=x.coordinatesConverter.convertViewRangeToModelRange(Q);let pe;U.direction===1?pe=Math.max(1,ue.startLineNumber-U.value):pe=Math.min(x.model.getLineCount(),ue.startLineNumber+U.value);const fe=x.coordinatesConverter.convertModelPositionToViewPosition(new c.Position(pe,1));return x.getVerticalOffsetForLineNumber(fe.lineNumber)}let $;U.unit===3?$=x.cursorConfig.pageSize*U.value:U.unit===4?$=Math.round(x.cursorConfig.pageSize/2)*U.value:$=U.value;const V=(U.direction===1?-1:1)*$;return x.getScrollTop()+V*x.cursorConfig.lineHeight}}k.EditorScrollImpl=X,k.EditorScroll=(0,S.registerEditorCommand)(new X),k.ScrollLineUp=(0,S.registerEditorCommand)(new class extends i{constructor(){super({id:"scrollLineUp",precondition:void 0,kbOpts:{weight:o,kbExpr:d.EditorContextKeys.textInputFocus,primary:2048|16,mac:{primary:256|11}}})}runCoreEditorCommand(G,x){k.EditorScroll._runEditorScroll(G,x.source,{direction:1,unit:2,value:1,revealCursor:!1,select:!1})}}),k.ScrollPageUp=(0,S.registerEditorCommand)(new class extends i{constructor(){super({id:"scrollPageUp",precondition:void 0,kbOpts:{weight:o,kbExpr:d.EditorContextKeys.textInputFocus,primary:2048|11,win:{primary:512|11},linux:{primary:512|11}}})}runCoreEditorCommand(G,x){k.EditorScroll._runEditorScroll(G,x.source,{direction:1,unit:3,value:1,revealCursor:!1,select:!1})}}),k.ScrollLineDown=(0,S.registerEditorCommand)(new class extends i{constructor(){super({id:"scrollLineDown",precondition:void 0,kbOpts:{weight:o,kbExpr:d.EditorContextKeys.textInputFocus,primary:2048|18,mac:{primary:256|12}}})}runCoreEditorCommand(G,x){k.EditorScroll._runEditorScroll(G,x.source,{direction:2,unit:2,value:1,revealCursor:!1,select:!1})}}),k.ScrollPageDown=(0,S.registerEditorCommand)(new class extends i{constructor(){super({id:"scrollPageDown",precondition:void 0,kbOpts:{weight:o,kbExpr:d.EditorContextKeys.textInputFocus,primary:2048|12,win:{primary:512|12},linux:{primary:512|12}}})}runCoreEditorCommand(G,x){k.EditorScroll._runEditorScroll(G,x.source,{direction:2,unit:3,value:1,revealCursor:!1,select:!1})}});class Z extends i{constructor(x){super(x);this._inSelectionMode=x.inSelectionMode}runCoreEditorCommand(x,U){x.model.pushStackElement(),x.setCursorStates(U.source,3,[t.CursorMoveCommands.word(x,x.getPrimaryCursorState(),this._inSelectionMode,U.position)]),x.revealPrimaryCursor(U.source,!0)}}k.WordSelect=(0,S.registerEditorCommand)(new Z({inSelectionMode:!1,id:"_wordSelect",precondition:void 0})),k.WordSelectDrag=(0,S.registerEditorCommand)(new Z({inSelectionMode:!0,id:"_wordSelectDrag",precondition:void 0})),k.LastCursorWordSelect=(0,S.registerEditorCommand)(new class extends i{constructor(){super({id:"lastCursorWordSelect",precondition:void 0})}runCoreEditorCommand(G,x){const U=G.getLastAddedCursorIndex(),$=G.getCursorStates(),V=$.slice(0),Q=$[U];V[U]=t.CursorMoveCommands.word(G,Q,Q.modelState.hasSelection(),x.position),G.model.pushStackElement(),G.setCursorStates(x.source,3,V)}});class se extends i{constructor(x){super(x);this._inSelectionMode=x.inSelectionMode}runCoreEditorCommand(x,U){x.model.pushStackElement(),x.setCursorStates(U.source,3,[t.CursorMoveCommands.line(x,x.getPrimaryCursorState(),this._inSelectionMode,U.position,U.viewPosition)]),x.revealPrimaryCursor(U.source,!1)}}k.LineSelect=(0,S.registerEditorCommand)(new se({inSelectionMode:!1,id:"_lineSelect",precondition:void 0})),k.LineSelectDrag=(0,S.registerEditorCommand)(new se({inSelectionMode:!0,id:"_lineSelectDrag",precondition:void 0}));class oe extends i{constructor(x){super(x);this._inSelectionMode=x.inSelectionMode}runCoreEditorCommand(x,U){const $=x.getLastAddedCursorIndex(),V=x.getCursorStates(),Q=V.slice(0);Q[$]=t.CursorMoveCommands.line(x,V[$],this._inSelectionMode,U.position,U.viewPosition),x.model.pushStackElement(),x.setCursorStates(U.source,3,Q)}}k.LastCursorLineSelect=(0,S.registerEditorCommand)(new oe({inSelectionMode:!1,id:"lastCursorLineSelect",precondition:void 0})),k.LastCursorLineSelectDrag=(0,S.registerEditorCommand)(new oe({inSelectionMode:!0,id:"lastCursorLineSelectDrag",precondition:void 0})),k.ExpandLineSelection=(0,S.registerEditorCommand)(new class extends i{constructor(){super({id:"expandLineSelection",precondition:void 0,kbOpts:{weight:o,kbExpr:d.EditorContextKeys.textInputFocus,primary:2048|42}})}runCoreEditorCommand(G,x){G.model.pushStackElement(),G.setCursorStates(x.source,3,t.CursorMoveCommands.expandLineSelection(G,G.getCursorStates())),G.revealPrimaryCursor(x.source,!0)}}),k.CancelSelection=(0,S.registerEditorCommand)(new class extends i{constructor(){super({id:"cancelSelection",precondition:d.EditorContextKeys.hasNonEmptySelection,kbOpts:{weight:o,kbExpr:d.EditorContextKeys.textInputFocus,primary:9,secondary:[1024|9]}})}runCoreEditorCommand(G,x){G.model.pushStackElement(),G.setCursorStates(x.source,3,[t.CursorMoveCommands.cancelSelection(G,G.getPrimaryCursorState())]),G.revealPrimaryCursor(x.source,!0)}}),k.RemoveSecondaryCursors=(0,S.registerEditorCommand)(new class extends i{constructor(){super({id:"removeSecondaryCursors",precondition:d.EditorContextKeys.hasMultipleSelections,kbOpts:{weight:o+1,kbExpr:d.EditorContextKeys.textInputFocus,primary:9,secondary:[1024|9]}})}runCoreEditorCommand(G,x){G.model.pushStackElement(),G.setCursorStates(x.source,3,[G.getPrimaryCursorState()]),G.revealPrimaryCursor(x.source,!0),(0,D.status)(w.localize(2,null))}}),k.RevealLine=(0,S.registerEditorCommand)(new class extends i{constructor(){super({id:"revealLine",precondition:void 0,description:h.description})}runCoreEditorCommand(G,x){const U=x,$=U.lineNumber||0;let V=typeof $=="number"?$+1:parseInt($)+1;V<1&&(V=1);const Q=G.model.getLineCount();V>Q&&(V=Q);const ue=new u.Range(V,1,V,G.model.getLineMaxColumn(V));let pe=0;if(U.at)switch(U.at){case h.RawAtArgument.Top:pe=3;break;case h.RawAtArgument.Center:pe=1;break;case h.RawAtArgument.Bottom:pe=4;break;default:break}const fe=G.coordinatesConverter.convertModelRangeToViewRange(ue);G.revealRange(x.source,!1,fe,pe,0)}}),k.SelectAll=new class extends f{constructor(){super(S.SelectAllCommand)}runDOMCommand(){N.isFirefox&&(document.activeElement.focus(),document.activeElement.select()),document.execCommand("selectAll")}runEditorCommand(G,x,U){const $=x._getViewModel();!$||this.runCoreEditorCommand($,U)}runCoreEditorCommand(G,x){G.model.pushStackElement(),G.setCursorStates("keyboard",3,[t.CursorMoveCommands.selectAll(G,G.getPrimaryCursorState())])}},k.SetSelection=(0,S.registerEditorCommand)(new class extends i{constructor(){super({id:"setSelection",precondition:void 0})}runCoreEditorCommand(G,x){G.model.pushStackElement(),G.setCursorStates(x.source,3,[n.CursorState.fromModelSelection(x.selection)])}})})(y=e.CoreNavigationCommands||(e.CoreNavigationCommands={}));const _=a.ContextKeyExpr.and(d.EditorContextKeys.textInputFocus,d.EditorContextKeys.columnSelection);function b(k,M){r.KeybindingsRegistry.registerKeybindingRule({id:k,primary:M,when:_,weight:o+1})}b(y.CursorColumnSelectLeft.id,1024|15),b(y.CursorColumnSelectRight.id,1024|17),b(y.CursorColumnSelectUp.id,1024|16),b(y.CursorColumnSelectPageUp.id,1024|11),b(y.CursorColumnSelectDown.id,1024|18),b(y.CursorColumnSelectPageDown.id,1024|12);function v(k){return k.register(),k}var m;(function(k){class M extends S.EditorCommand{runEditorCommand(F,R,A){const O=R._getViewModel();!O||this.runCoreEditingCommand(R,O,A||{})}}k.CoreEditingCommand=M,k.LineBreakInsert=(0,S.registerEditorCommand)(new class extends M{constructor(){super({id:"lineBreakInsert",precondition:d.EditorContextKeys.writable,kbOpts:{weight:o,kbExpr:d.EditorContextKeys.textInputFocus,primary:0,mac:{primary:256|45}}})}runCoreEditingCommand(P,F,R){P.pushUndoStop(),P.executeCommands(this.id,s.TypeOperations.lineBreakInsert(F.cursorConfig,F.model,F.getCursorStates().map(A=>A.modelState.selection)))}}),k.Outdent=(0,S.registerEditorCommand)(new class extends M{constructor(){super({id:"outdent",precondition:d.EditorContextKeys.writable,kbOpts:{weight:o,kbExpr:a.ContextKeyExpr.and(d.EditorContextKeys.editorTextFocus,d.EditorContextKeys.tabDoesNotMoveFocus),primary:1024|2}})}runCoreEditingCommand(P,F,R){P.pushUndoStop(),P.executeCommands(this.id,s.TypeOperations.outdent(F.cursorConfig,F.model,F.getCursorStates().map(A=>A.modelState.selection))),P.pushUndoStop()}}),k.Tab=(0,S.registerEditorCommand)(new class extends M{constructor(){super({id:"tab",precondition:d.EditorContextKeys.writable,kbOpts:{weight:o,kbExpr:a.ContextKeyExpr.and(d.EditorContextKeys.editorTextFocus,d.EditorContextKeys.tabDoesNotMoveFocus),primary:2}})}runCoreEditingCommand(P,F,R){P.pushUndoStop(),P.executeCommands(this.id,s.TypeOperations.tab(F.cursorConfig,F.model,F.getCursorStates().map(A=>A.modelState.selection))),P.pushUndoStop()}}),k.DeleteLeft=(0,S.registerEditorCommand)(new class extends M{constructor(){super({id:"deleteLeft",precondition:void 0,kbOpts:{weight:o,kbExpr:d.EditorContextKeys.textInputFocus,primary:1,secondary:[1024|1],mac:{primary:1,secondary:[1024|1,256|38,256|1]}}})}runCoreEditingCommand(P,F,R){const[A,O]=g.DeleteOperations.deleteLeft(F.getPrevEditOperationType(),F.cursorConfig,F.model,F.getCursorStates().map(L=>L.modelState.selection),F.getCursorAutoClosedCharacters());A&&P.pushUndoStop(),P.executeCommands(this.id,O),F.setPrevEditOperationType(2)}}),k.DeleteRight=(0,S.registerEditorCommand)(new class extends M{constructor(){super({id:"deleteRight",precondition:void 0,kbOpts:{weight:o,kbExpr:d.EditorContextKeys.textInputFocus,primary:20,mac:{primary:20,secondary:[256|34,256|20]}}})}runCoreEditingCommand(P,F,R){const[A,O]=g.DeleteOperations.deleteRight(F.getPrevEditOperationType(),F.cursorConfig,F.model,F.getCursorStates().map(L=>L.modelState.selection));A&&P.pushUndoStop(),P.executeCommands(this.id,O),F.setPrevEditOperationType(3)}}),k.Undo=new class extends f{constructor(){super(S.UndoCommand)}runDOMCommand(){document.execCommand("undo")}runEditorCommand(P,F,R){if(!(!F.hasModel()||F.getOption(80)===!0))return F.getModel().undo()}},k.Redo=new class extends f{constructor(){super(S.RedoCommand)}runDOMCommand(){document.execCommand("redo")}runEditorCommand(P,F,R){if(!(!F.hasModel()||F.getOption(80)===!0))return F.getModel().redo()}}})(m=e.CoreEditingCommands||(e.CoreEditingCommands={}));class E extends S.Command{constructor(M,P,F){super({id:M,precondition:void 0,description:F});this._handlerId=P}runCommand(M,P){const F=M.get(p.ICodeEditorService).getFocusedCodeEditor();!F||F.trigger("keyboard",this._handlerId,P)}}function I(k,M){v(new E("default:"+k,k)),v(new E(k,k,M))}I("type",{description:"Type",args:[{name:"args",schema:{type:"object",required:["text"],properties:{text:{type:"string"}}}}]}),I("replacePreviousChar"),I("compositionType"),I("compositionStart"),I("compositionEnd"),I("paste"),I("cut")}),define(J[663],ee([0,1,156,13,17]),function(j,e,w,N,T){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ViewController=void 0;class D{constructor(p,C,n,g){this.configuration=p,this.viewModel=C,this.userInputEvents=n,this.commandDelegate=g}paste(p,C,n,g){this.commandDelegate.paste(p,C,n,g)}type(p){this.commandDelegate.type(p)}compositionType(p,C,n,g){this.commandDelegate.compositionType(p,C,n,g)}compositionStart(){this.commandDelegate.startComposition()}compositionEnd(){this.commandDelegate.endComposition()}cut(){this.commandDelegate.cut()}setSelection(p){w.CoreNavigationCommands.SetSelection.runCoreEditorCommand(this.viewModel,{source:"keyboard",selection:p})}_validateViewColumn(p){const C=this.viewModel.getLineMinColumn(p.lineNumber);return p.column<C?new N.Position(p.lineNumber,C):p}_hasMulticursorModifier(p){switch(this.configuration.options.get(69)){case"altKey":return p.altKey;case"ctrlKey":return p.ctrlKey;case"metaKey":return p.metaKey;default:return!1}}_hasNonMulticursorModifier(p){switch(this.configuration.options.get(69)){case"altKey":return p.ctrlKey||p.metaKey;case"ctrlKey":return p.altKey||p.metaKey;case"metaKey":return p.ctrlKey||p.altKey;default:return!1}}dispatchMouse(p){const C=this.configuration.options,n=T.isLinux&&C.get(95),g=C.get(18);p.middleButton&&!n?this._columnSelect(p.position,p.mouseColumn,p.inSelectionMode):p.startedOnLineNumbers?this._hasMulticursorModifier(p)?p.inSelectionMode?this._lastCursorLineSelect(p.position):this._createCursor(p.position,!0):p.inSelectionMode?this._lineSelectDrag(p.position):this._lineSelect(p.position):p.mouseDownCount>=4?this._selectAll():p.mouseDownCount===3?this._hasMulticursorModifier(p)?p.inSelectionMode?this._lastCursorLineSelectDrag(p.position):this._lastCursorLineSelect(p.position):p.inSelectionMode?this._lineSelectDrag(p.position):this._lineSelect(p.position):p.mouseDownCount===2?this._hasMulticursorModifier(p)?this._lastCursorWordSelect(p.position):p.inSelectionMode?this._wordSelectDrag(p.position):this._wordSelect(p.position):this._hasMulticursorModifier(p)?this._hasNonMulticursorModifier(p)||(p.shiftKey?this._columnSelect(p.position,p.mouseColumn,!0):p.inSelectionMode?this._lastCursorMoveToSelect(p.position):this._createCursor(p.position,!1)):p.inSelectionMode?p.altKey?this._columnSelect(p.position,p.mouseColumn,!0):g?this._columnSelect(p.position,p.mouseColumn,!0):this._moveToSelect(p.position):this.moveTo(p.position)}_usualArgs(p){return p=this._validateViewColumn(p),{source:"mouse",position:this._convertViewToModelPosition(p),viewPosition:p}}moveTo(p){w.CoreNavigationCommands.MoveTo.runCoreEditorCommand(this.viewModel,this._usualArgs(p))}_moveToSelect(p){w.CoreNavigationCommands.MoveToSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(p))}_columnSelect(p,C,n){p=this._validateViewColumn(p),w.CoreNavigationCommands.ColumnSelect.runCoreEditorCommand(this.viewModel,{source:"mouse",position:this._convertViewToModelPosition(p),viewPosition:p,mouseColumn:C,doColumnSelect:n})}_createCursor(p,C){p=this._validateViewColumn(p),w.CoreNavigationCommands.CreateCursor.runCoreEditorCommand(this.viewModel,{source:"mouse",position:this._convertViewToModelPosition(p),viewPosition:p,wholeLine:C})}_lastCursorMoveToSelect(p){w.CoreNavigationCommands.LastCursorMoveToSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(p))}_wordSelect(p){w.CoreNavigationCommands.WordSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(p))}_wordSelectDrag(p){w.CoreNavigationCommands.WordSelectDrag.runCoreEditorCommand(this.viewModel,this._usualArgs(p))}_lastCursorWordSelect(p){w.CoreNavigationCommands.LastCursorWordSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(p))}_lineSelect(p){w.CoreNavigationCommands.LineSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(p))}_lineSelectDrag(p){w.CoreNavigationCommands.LineSelectDrag.runCoreEditorCommand(this.viewModel,this._usualArgs(p))}_lastCursorLineSelect(p){w.CoreNavigationCommands.LastCursorLineSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(p))}_lastCursorLineSelectDrag(p){w.CoreNavigationCommands.LastCursorLineSelectDrag.runCoreEditorCommand(this.viewModel,this._usualArgs(p))}_selectAll(){w.CoreNavigationCommands.SelectAll.runCoreEditorCommand(this.viewModel,{source:"mouse"})}_convertViewToModelPosition(p){return this.viewModel.coordinatesConverter.convertViewPositionToModelPosition(p)}emitKeyDown(p){this.userInputEvents.emitKeyDown(p)}emitKeyUp(p){this.userInputEvents.emitKeyUp(p)}emitContextMenu(p){this.userInputEvents.emitContextMenu(p)}emitMouseMove(p){this.userInputEvents.emitMouseMove(p)}emitMouseLeave(p){this.userInputEvents.emitMouseLeave(p)}emitMouseUp(p){this.userInputEvents.emitMouseUp(p)}emitMouseDown(p){this.userInputEvents.emitMouseDown(p)}emitMouseDrag(p){this.userInputEvents.emitMouseDrag(p)}emitMouseDrop(p){this.userInputEvents.emitMouseDrop(p)}emitMouseDropCanceled(){this.userInputEvents.emitMouseDropCanceled()}emitMouseWheel(p){this.userInputEvents.emitMouseWheel(p)}}e.ViewController=D}),define(J[664],ee([0,1,7,34,22,30,11,661,607,663,277,581,50,411,606,412,602,181,659,269,600,413,235,414,603,415,608,416,609,604,605,610,417,13,3,117,406,408,119,10,196]),function(j,e,w,N,T,D,S,p,C,n,g,t,s,c,u,d,a,r,o,i,l,h,f,y,_,b,v,m,E,I,k,M,P,F,R,A,O,L,B,W,K){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.View=void 0;class H extends B.ViewEventHandler{constructor(Z,se,oe,G,x,U){super();this._selections=[new T.Selection(1,1,1,1)],this._renderAnimationFrame=null;const $=new n.ViewController(se,G,x,Z);this._context=new O.ViewContext(se,oe.getColorTheme(),G),this._configPixelRatio=this._context.configuration.options.get(127),this._context.addEventHandler(this),this._register(oe.onDidColorThemeChange(ae=>{this._context.theme.update(ae),this._context.model.onDidColorThemeChange(),this.render(!0,!1)})),this._viewParts=[],this._textAreaHandler=new C.TextAreaHandler(this._context,$,this._createTextAreaHandlerHelper()),this._viewParts.push(this._textAreaHandler),this._linesContent=(0,D.createFastDomNode)(document.createElement("div")),this._linesContent.setClassName("lines-content monaco-editor-background"),this._linesContent.setPosition("absolute"),this.domNode=(0,D.createFastDomNode)(document.createElement("div")),this.domNode.setClassName(this._getEditorClassName()),this.domNode.setAttribute("role","code"),this._overflowGuardContainer=(0,D.createFastDomNode)(document.createElement("div")),s.PartFingerprints.write(this._overflowGuardContainer,3),this._overflowGuardContainer.setClassName("overflow-guard"),this._scrollbar=new a.EditorScrollbar(this._context,this._linesContent,this.domNode,this._overflowGuardContainer),this._viewParts.push(this._scrollbar),this._viewLines=new l.ViewLines(this._context,this._linesContent),this._viewZones=new P.ViewZones(this._context),this._viewParts.push(this._viewZones);const V=new v.DecorationsOverviewRuler(this._context);this._viewParts.push(V);const Q=new I.ScrollDecorationViewPart(this._context);this._viewParts.push(Q);const ue=new t.ContentViewOverlays(this._context);this._viewParts.push(ue),ue.addDynamicOverlay(new u.CurrentLineHighlightOverlay(this._context)),ue.addDynamicOverlay(new k.SelectionsOverlay(this._context)),ue.addDynamicOverlay(new o.IndentGuidesOverlay(this._context)),ue.addDynamicOverlay(new d.DecorationsOverlay(this._context));const pe=new t.MarginViewOverlays(this._context);this._viewParts.push(pe),pe.addDynamicOverlay(new u.CurrentLineMarginHighlightOverlay(this._context)),pe.addDynamicOverlay(new r.GlyphMarginOverlay(this._context)),pe.addDynamicOverlay(new y.MarginViewLineDecorationsOverlay(this._context)),pe.addDynamicOverlay(new h.LinesDecorationsOverlay(this._context)),pe.addDynamicOverlay(new i.LineNumbersOverlay(this._context));const fe=new f.Margin(this._context);fe.getDomNode().appendChild(this._viewZones.marginDomNode),fe.getDomNode().appendChild(pe.getDomNode()),this._viewParts.push(fe),this._contentWidgets=new c.ViewContentWidgets(this._context,this.domNode),this._viewParts.push(this._contentWidgets),this._viewCursors=new M.ViewCursors(this._context),this._viewParts.push(this._viewCursors),this._overlayWidgets=new b.ViewOverlayWidgets(this._context),this._viewParts.push(this._overlayWidgets);const re=new E.Rulers(this._context);this._viewParts.push(re);const ie=new _.Minimap(this._context);if(this._viewParts.push(ie),V){const ae=this._scrollbar.getOverviewRulerLayoutInfo();ae.parent.insertBefore(V.getDomNode(),ae.insertBefore)}this._linesContent.appendChild(ue.getDomNode()),this._linesContent.appendChild(re.domNode),this._linesContent.appendChild(this._viewZones.domNode),this._linesContent.appendChild(this._viewLines.getDomNode()),this._linesContent.appendChild(this._contentWidgets.domNode),this._linesContent.appendChild(this._viewCursors.getDomNode()),this._overflowGuardContainer.appendChild(fe.getDomNode()),this._overflowGuardContainer.appendChild(this._scrollbar.getDomNode()),this._overflowGuardContainer.appendChild(Q.getDomNode()),this._overflowGuardContainer.appendChild(this._textAreaHandler.textArea),this._overflowGuardContainer.appendChild(this._textAreaHandler.textAreaCover),this._overflowGuardContainer.appendChild(this._overlayWidgets.getDomNode()),this._overflowGuardContainer.appendChild(ie.getDomNode()),this.domNode.appendChild(this._overflowGuardContainer),U?U.appendChild(this._contentWidgets.overflowingContentWidgetsDomNode.domNode):this.domNode.appendChild(this._contentWidgets.overflowingContentWidgetsDomNode),this._applyLayout(),this._pointerHandler=this._register(new p.PointerHandler(this._context,$,this._createPointerHandlerHelper()))}_flushAccumulatedAndRenderNow(){this._renderNow()}_createPointerHandlerHelper(){return{viewDomNode:this.domNode.domNode,linesContentDomNode:this._linesContent.domNode,focusTextArea:()=>{this.focus()},dispatchTextAreaEvent:Z=>{this._textAreaHandler.textArea.domNode.dispatchEvent(Z)},getLastRenderData:()=>{const Z=this._viewCursors.getLastRenderData()||[],se=this._textAreaHandler.getLastRenderData();return new K.PointerHandlerLastRenderData(Z,se)},shouldSuppressMouseDownOnViewZone:Z=>this._viewZones.shouldSuppressMouseDownOnViewZone(Z),shouldSuppressMouseDownOnWidget:Z=>this._contentWidgets.shouldSuppressMouseDownOnWidget(Z),getPositionFromDOMInfo:(Z,se)=>(this._flushAccumulatedAndRenderNow(),this._viewLines.getPositionFromDOMInfo(Z,se)),visibleRangeForPosition:(Z,se)=>(this._flushAccumulatedAndRenderNow(),this._viewLines.visibleRangeForPosition(new F.Position(Z,se))),getLineWidth:Z=>(this._flushAccumulatedAndRenderNow(),this._viewLines.getLineWidth(Z))}}_createTextAreaHandlerHelper(){return{visibleRangeForPositionRelativeToEditor:(Z,se)=>(this._flushAccumulatedAndRenderNow(),this._viewLines.visibleRangeForPosition(new F.Position(Z,se)))}}_applyLayout(){const se=this._context.configuration.options.get(129);this.domNode.setWidth(se.width),this.domNode.setHeight(se.height),this._overflowGuardContainer.setWidth(se.width),this._overflowGuardContainer.setHeight(se.height),this._linesContent.setWidth(1e6),this._linesContent.setHeight(1e6)}_getEditorClassName(){const Z=this._textAreaHandler.isFocused()?" focused":"";return this._context.configuration.options.get(126)+" "+(0,W.getThemeTypeSelector)(this._context.theme.type)+Z}handleEvents(Z){super.handleEvents(Z),this._scheduleRender()}onConfigurationChanged(Z){return this._configPixelRatio=this._context.configuration.options.get(127),this.domNode.setClassName(this._getEditorClassName()),this._applyLayout(),!1}onCursorStateChanged(Z){return this._selections=Z.selections,!1}onFocusChanged(Z){return this.domNode.setClassName(this._getEditorClassName()),!1}onThemeChanged(Z){return this.domNode.setClassName(this._getEditorClassName()),!1}dispose(){this._renderAnimationFrame!==null&&(this._renderAnimationFrame.dispose(),this._renderAnimationFrame=null),this._contentWidgets.overflowingContentWidgetsDomNode.domNode.remove(),this._context.removeEventHandler(this),this._viewLines.dispose();for(const Z of this._viewParts)Z.dispose();super.dispose()}_scheduleRender(){this._renderAnimationFrame===null&&(this._renderAnimationFrame=w.runAtThisOrScheduleAtNextAnimationFrame(this._onRenderScheduled.bind(this),100))}_onRenderScheduled(){this._renderAnimationFrame=null,this._flushAccumulatedAndRenderNow()}_renderNow(){Y(()=>this._actualRender())}_getViewPartsToRender(){let Z=[],se=0;for(const oe of this._viewParts)oe.shouldRender()&&(Z[se++]=oe);return Z}_actualRender(){if(!w.isInDOM(this.domNode.domNode))return;let Z=this._getViewPartsToRender();if(!this._viewLines.shouldRender()&&Z.length===0)return;const se=this._context.viewLayout.getLinesViewportData();this._context.model.setViewport(se.startLineNumber,se.endLineNumber,se.centeredLineNumber);const oe=new L.ViewportData(this._selections,se,this._context.viewLayout.getWhitespaceViewportData(),this._context.model);this._contentWidgets.shouldRender()&&this._contentWidgets.onBeforeRender(oe),this._viewLines.shouldRender()&&(this._viewLines.renderText(oe),this._viewLines.onDidRender(),Z=this._getViewPartsToRender());const G=new A.RenderingContext(this._context.viewLayout,oe,this._viewLines);for(const x of Z)x.prepareRender(G);for(const x of Z)x.render(G),x.onDidRender();Math.abs(N.getPixelRatio()-this._configPixelRatio)>.001&&this._context.configuration.updatePixelRatio()}delegateVerticalScrollbarMouseDown(Z){this._scrollbar.delegateVerticalScrollbarMouseDown(Z)}restoreState(Z){this._context.model.setScrollPosition({scrollTop:Z.scrollTop},1),this._context.model.tokenizeViewport(),this._renderNow(),this._viewLines.updateLineWidths(),this._context.model.setScrollPosition({scrollLeft:Z.scrollLeft},1)}getOffsetForColumn(Z,se){const oe=this._context.model.validateModelPosition({lineNumber:Z,column:se}),G=this._context.model.coordinatesConverter.convertModelPositionToViewPosition(oe);this._flushAccumulatedAndRenderNow();const x=this._viewLines.visibleRangeForPosition(new F.Position(G.lineNumber,G.column));return x?x.left:-1}getTargetAtClientPoint(Z,se){const oe=this._pointerHandler.getTargetAtClientPoint(Z,se);return oe?g.ViewUserInputEvents.convertViewToModelMouseTarget(oe,this._context.model.coordinatesConverter):null}createOverviewRuler(Z){return new m.OverviewRuler(this._context,Z)}change(Z){this._viewZones.changeViewZones(Z),this._scheduleRender()}render(Z,se){if(se){this._viewLines.forceShouldRender();for(const oe of this._viewParts)oe.forceShouldRender()}Z?this._flushAccumulatedAndRenderNow():this._scheduleRender()}focus(){this._textAreaHandler.focusTextArea()}isFocused(){return this._textAreaHandler.isFocused()}setAriaOptions(Z){this._textAreaHandler.setAriaOptions(Z)}addContentWidget(Z){this._contentWidgets.addWidget(Z.widget),this.layoutContentWidget(Z),this._scheduleRender()}layoutContentWidget(Z){let se=Z.position&&Z.position.range||null;if(se===null){const G=Z.position?Z.position.position:null;G!==null&&(se=new R.Range(G.lineNumber,G.column,G.lineNumber,G.column))}const oe=Z.position?Z.position.preference:null;this._contentWidgets.setWidgetPosition(Z.widget,se,oe),this._scheduleRender()}removeContentWidget(Z){this._contentWidgets.removeWidget(Z.widget),this._scheduleRender()}addOverlayWidget(Z){this._overlayWidgets.addWidget(Z.widget),this.layoutOverlayWidget(Z),this._scheduleRender()}layoutOverlayWidget(Z){const se=Z.position?Z.position.preference:null;this._overlayWidgets.setWidgetPosition(Z.widget,se)&&this._scheduleRender()}removeOverlayWidget(Z){this._overlayWidgets.removeWidget(Z.widget),this._scheduleRender()}}e.View=H;function Y(X){try{return X()}catch(Z){(0,S.onUnexpectedError)(Z)}}}),define(J[665],ee([0,1,43,13,3,22]),function(j,e,w,N,T,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Cursor=void 0;class S{constructor(C){this._selTrackedRange=null,this._trackSelection=!0,this._setState(C,new w.SingleCursorState(new T.Range(1,1,1,1),0,new N.Position(1,1),0),new w.SingleCursorState(new T.Range(1,1,1,1),0,new N.Position(1,1),0))}dispose(C){this._removeTrackedRange(C)}startTrackingSelection(C){this._trackSelection=!0,this._updateTrackedRange(C)}stopTrackingSelection(C){this._trackSelection=!1,this._removeTrackedRange(C)}_updateTrackedRange(C){!this._trackSelection||(this._selTrackedRange=C.model._setTrackedRange(this._selTrackedRange,this.modelState.selection,0))}_removeTrackedRange(C){this._selTrackedRange=C.model._setTrackedRange(this._selTrackedRange,null,0)}asCursorState(){return new w.CursorState(this.modelState,this.viewState)}readSelectionFromMarkers(C){const n=C.model._getTrackedRange(this._selTrackedRange);return this.modelState.selection.getDirection()===0?new D.Selection(n.startLineNumber,n.startColumn,n.endLineNumber,n.endColumn):new D.Selection(n.endLineNumber,n.endColumn,n.startLineNumber,n.startColumn)}ensureValidState(C){this._setState(C,this.modelState,this.viewState)}setState(C,n,g){this._setState(C,n,g)}static _validatePositionWithCache(C,n,g,t){return n.equals(g)?t:C.normalizePosition(n,2)}static _validateViewState(C,n){const g=n.position,t=n.selectionStart.getStartPosition(),s=n.selectionStart.getEndPosition(),c=C.normalizePosition(g,2),u=this._validatePositionWithCache(C,t,g,c),d=this._validatePositionWithCache(C,s,t,u);return g.equals(c)&&t.equals(u)&&s.equals(d)?n:new w.SingleCursorState(T.Range.fromPositions(u,d),n.selectionStartLeftoverVisibleColumns+t.column-u.column,c,n.leftoverVisibleColumns+g.column-c.column)}_setState(C,n,g){if(g&&(g=S._validateViewState(C.viewModel,g)),n){const t=C.model.validateRange(n.selectionStart),s=n.selectionStart.equalsRange(t)?n.selectionStartLeftoverVisibleColumns:0,c=C.model.validatePosition(n.position),u=n.position.equals(c)?n.leftoverVisibleColumns:0;n=new w.SingleCursorState(t,s,c,u)}else{if(!g)return;const t=C.model.validateRange(C.coordinatesConverter.convertViewRangeToModelRange(g.selectionStart)),s=C.model.validatePosition(C.coordinatesConverter.convertViewPositionToModelPosition(g.position));n=new w.SingleCursorState(t,g.selectionStartLeftoverVisibleColumns,s,g.leftoverVisibleColumns)}if(g){const t=C.coordinatesConverter.validateViewRange(g.selectionStart,n.selectionStart),s=C.coordinatesConverter.validateViewPosition(g.position,n.position);g=new w.SingleCursorState(t,n.selectionStartLeftoverVisibleColumns,s,n.leftoverVisibleColumns)}else{const t=C.coordinatesConverter.convertModelPositionToViewPosition(new N.Position(n.selectionStart.startLineNumber,n.selectionStart.startColumn)),s=C.coordinatesConverter.convertModelPositionToViewPosition(new N.Position(n.selectionStart.endLineNumber,n.selectionStart.endColumn)),c=new T.Range(t.lineNumber,t.column,s.lineNumber,s.column),u=C.coordinatesConverter.convertModelPositionToViewPosition(n.position);g=new w.SingleCursorState(c,n.selectionStartLeftoverVisibleColumns,u,n.leftoverVisibleColumns)}this.modelState=n,this.viewState=g,this._updateTrackedRange(C)}}e.Cursor=S}),define(J[666],ee([0,1,43,665,22]),function(j,e,w,N,T){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CursorCollection=void 0;class D{constructor(p){this.context=p,this.primaryCursor=new N.Cursor(p),this.secondaryCursors=[],this.lastAddedCursorIndex=0}dispose(){this.primaryCursor.dispose(this.context),this.killSecondaryCursors()}startTrackingSelections(){this.primaryCursor.startTrackingSelection(this.context);for(let p=0,C=this.secondaryCursors.length;p<C;p++)this.secondaryCursors[p].startTrackingSelection(this.context)}stopTrackingSelections(){this.primaryCursor.stopTrackingSelection(this.context);for(let p=0,C=this.secondaryCursors.length;p<C;p++)this.secondaryCursors[p].stopTrackingSelection(this.context)}updateContext(p){this.context=p}ensureValidState(){this.primaryCursor.ensureValidState(this.context);for(let p=0,C=this.secondaryCursors.length;p<C;p++)this.secondaryCursors[p].ensureValidState(this.context)}readSelectionFromMarkers(){let p=[];p[0]=this.primaryCursor.readSelectionFromMarkers(this.context);for(let C=0,n=this.secondaryCursors.length;C<n;C++)p[C+1]=this.secondaryCursors[C].readSelectionFromMarkers(this.context);return p}getAll(){let p=[];p[0]=this.primaryCursor.asCursorState();for(let C=0,n=this.secondaryCursors.length;C<n;C++)p[C+1]=this.secondaryCursors[C].asCursorState();return p}getViewPositions(){let p=[];p[0]=this.primaryCursor.viewState.position;for(let C=0,n=this.secondaryCursors.length;C<n;C++)p[C+1]=this.secondaryCursors[C].viewState.position;return p}getTopMostViewPosition(){let p=this.primaryCursor.viewState.position;for(let C=0,n=this.secondaryCursors.length;C<n;C++){const g=this.secondaryCursors[C].viewState.position;g.isBefore(p)&&(p=g)}return p}getBottomMostViewPosition(){let p=this.primaryCursor.viewState.position;for(let C=0,n=this.secondaryCursors.length;C<n;C++){const g=this.secondaryCursors[C].viewState.position;p.isBeforeOrEqual(g)&&(p=g)}return p}getSelections(){let p=[];p[0]=this.primaryCursor.modelState.selection;for(let C=0,n=this.secondaryCursors.length;C<n;C++)p[C+1]=this.secondaryCursors[C].modelState.selection;return p}getViewSelections(){let p=[];p[0]=this.primaryCursor.viewState.selection;for(let C=0,n=this.secondaryCursors.length;C<n;C++)p[C+1]=this.secondaryCursors[C].viewState.selection;return p}setSelections(p){this.setStates(w.CursorState.fromModelSelections(p))}getPrimaryCursor(){return this.primaryCursor.asCursorState()}setStates(p){p!==null&&(this.primaryCursor.setState(this.context,p[0].modelState,p[0].viewState),this._setSecondaryStates(p.slice(1)))}_setSecondaryStates(p){const C=this.secondaryCursors.length,n=p.length;if(C<n){let g=n-C;for(let t=0;t<g;t++)this._addSecondaryCursor()}else if(C>n){let g=C-n;for(let t=0;t<g;t++)this._removeSecondaryCursor(this.secondaryCursors.length-1)}for(let g=0;g<n;g++)this.secondaryCursors[g].setState(this.context,p[g].modelState,p[g].viewState)}killSecondaryCursors(){this._setSecondaryStates([])}_addSecondaryCursor(){this.secondaryCursors.push(new N.Cursor(this.context)),this.lastAddedCursorIndex=this.secondaryCursors.length}getLastAddedCursorIndex(){return this.secondaryCursors.length===0||this.lastAddedCursorIndex===0?0:this.lastAddedCursorIndex}_removeSecondaryCursor(p){this.lastAddedCursorIndex>=p+1&&this.lastAddedCursorIndex--,this.secondaryCursors[p].dispose(this.context),this.secondaryCursors.splice(p,1)}_getAll(){let p=[];p[0]=this.primaryCursor;for(let C=0,n=this.secondaryCursors.length;C<n;C++)p[C+1]=this.secondaryCursors[C];return p}normalize(){if(this.secondaryCursors.length===0)return;let p=this._getAll(),C=[];for(let n=0,g=p.length;n<g;n++)C.push({index:n,selection:p[n].modelState.selection});C.sort((n,g)=>n.selection.startLineNumber===g.selection.startLineNumber?n.selection.startColumn-g.selection.startColumn:n.selection.startLineNumber-g.selection.startLineNumber);for(let n=0;n<C.length-1;n++){const g=C[n],t=C[n+1],s=g.selection,c=t.selection;if(!this.context.cursorConfig.multiCursorMergeOverlapping)continue;let u;if(c.isEmpty()||s.isEmpty()?u=c.getStartPosition().isBeforeOrEqual(s.getEndPosition()):u=c.getStartPosition().isBefore(s.getEndPosition()),u){const d=g.index<t.index?n:n+1,a=g.index<t.index?n+1:n,r=C[a].index,o=C[d].index,i=C[a].selection,l=C[d].selection;if(!i.equalsSelection(l)){const h=i.plusRange(l),f=i.selectionStartLineNumber===i.startLineNumber&&i.selectionStartColumn===i.startColumn,y=l.selectionStartLineNumber===l.startLineNumber&&l.selectionStartColumn===l.startColumn;let _;r===this.lastAddedCursorIndex?(_=f,this.lastAddedCursorIndex=o):_=y;let b;_?b=new T.Selection(h.startLineNumber,h.startColumn,h.endLineNumber,h.endColumn):b=new T.Selection(h.endLineNumber,h.endColumn,h.startLineNumber,h.startColumn),C[d].selection=b;const v=w.CursorState.fromModelSelection(b);p[o].setState(this.context,v.modelState,v.viewState)}for(const h of C)h.index>r&&h.index--;p.splice(r,1),C.splice(a,1),this._removeSecondaryCursor(r-1),n--}}}}e.CursorCollection=D}),define(J[279],ee([0,1,11,8,666,43,198,199,3,22,99,180,2,182]),function(j,e,w,N,T,D,S,p,C,n,g,t,s,c){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CursorsController=e.CursorModelState=void 0;class u{constructor(i,l){this.modelVersionId=i.getVersionId(),this.cursorState=l.getCursorStates()}equals(i){if(!i||this.modelVersionId!==i.modelVersionId||this.cursorState.length!==i.cursorState.length)return!1;for(let l=0,h=this.cursorState.length;l<h;l++)if(!this.cursorState[l].equals(i.cursorState[l]))return!1;return!0}}e.CursorModelState=u;class d{constructor(i,l,h){this._model=i,this._autoClosedCharactersDecorations=l,this._autoClosedEnclosingDecorations=h}static getAllAutoClosedCharacters(i){let l=[];for(const h of i)l=l.concat(h.getAutoClosedCharactersRanges());return l}dispose(){this._autoClosedCharactersDecorations=this._model.deltaDecorations(this._autoClosedCharactersDecorations,[]),this._autoClosedEnclosingDecorations=this._model.deltaDecorations(this._autoClosedEnclosingDecorations,[])}getAutoClosedCharactersRanges(){let i=[];for(let l=0;l<this._autoClosedCharactersDecorations.length;l++){const h=this._model.getDecorationRange(this._autoClosedCharactersDecorations[l]);h&&i.push(h)}return i}isValid(i){let l=[];for(let h=0;h<this._autoClosedEnclosingDecorations.length;h++){const f=this._model.getDecorationRange(this._autoClosedEnclosingDecorations[h]);if(f&&(l.push(f),f.startLineNumber!==f.endLineNumber))return!1}l.sort(C.Range.compareRangesUsingStarts),i.sort(C.Range.compareRangesUsingStarts);for(let h=0;h<i.length;h++)if(h>=l.length||!l[h].strictContainsRange(i[h]))return!1;return!0}}class a extends s.Disposable{constructor(i,l,h,f){super();this._model=i,this._knownModelVersionId=this._model.getVersionId(),this._viewModel=l,this._coordinatesConverter=h,this.context=new D.CursorContext(this._model,this._viewModel,this._coordinatesConverter,f),this._cursors=new T.CursorCollection(this.context),this._hasFocus=!1,this._isHandling=!1,this._isDoingComposition=!1,this._selectionsWhenCompositionStarted=null,this._columnSelectData=null,this._autoClosedActions=[],this._prevEditOperationType=0}dispose(){this._cursors.dispose(),this._autoClosedActions=(0,s.dispose)(this._autoClosedActions),super.dispose()}updateConfiguration(i){this.context=new D.CursorContext(this._model,this._viewModel,this._coordinatesConverter,i),this._cursors.updateContext(this.context)}onLineMappingChanged(i){this._knownModelVersionId===this._model.getVersionId()&&this.setStates(i,"viewModel",0,this.getCursorStates())}setHasFocus(i){this._hasFocus=i}_validateAutoClosedActions(){if(this._autoClosedActions.length>0){let i=this._cursors.getSelections();for(let l=0;l<this._autoClosedActions.length;l++){const h=this._autoClosedActions[l];h.isValid(i)||(h.dispose(),this._autoClosedActions.splice(l,1),l--)}}}getPrimaryCursorState(){return this._cursors.getPrimaryCursor()}getLastAddedCursorIndex(){return this._cursors.getLastAddedCursorIndex()}getCursorStates(){return this._cursors.getAll()}setStates(i,l,h,f){let y=!1;f!==null&&f.length>a.MAX_CURSOR_COUNT&&(f=f.slice(0,a.MAX_CURSOR_COUNT),y=!0);const _=new u(this._model,this);return this._cursors.setStates(f),this._cursors.normalize(),this._columnSelectData=null,this._validateAutoClosedActions(),this._emitStateChangedIfNecessary(i,l,h,_,y)}setCursorColumnSelectData(i){this._columnSelectData=i}revealPrimary(i,l,h,f){const y=this._cursors.getViewPositions();if(y.length>1){this._emitCursorRevealRange(i,l,null,this._cursors.getViewSelections(),0,h,f);return}else{const _=y[0],b=new C.Range(_.lineNumber,_.column,_.lineNumber,_.column);this._emitCursorRevealRange(i,l,b,null,0,h,f)}}_revealPrimaryCursor(i,l,h,f,y){const _=this._cursors.getViewPositions();if(_.length>1)this._emitCursorRevealRange(i,l,null,this._cursors.getViewSelections(),h,f,y);else{const b=_[0],v=new C.Range(b.lineNumber,b.column,b.lineNumber,b.column);this._emitCursorRevealRange(i,l,v,null,h,f,y)}}_emitCursorRevealRange(i,l,h,f,y,_,b){i.emitViewEvent(new t.ViewRevealRangeRequestEvent(l,h,f,y,_,b))}saveState(){let i=[];const l=this._cursors.getSelections();for(let h=0,f=l.length;h<f;h++){const y=l[h];i.push({inSelectionMode:!y.isEmpty(),selectionStart:{lineNumber:y.selectionStartLineNumber,column:y.selectionStartColumn},position:{lineNumber:y.positionLineNumber,column:y.positionColumn}})}return i}restoreState(i,l){let h=[];for(let f=0,y=l.length;f<y;f++){const _=l[f];let b=1,v=1;_.position&&_.position.lineNumber&&(b=_.position.lineNumber),_.position&&_.position.column&&(v=_.position.column);let m=b,E=v;_.selectionStart&&_.selectionStart.lineNumber&&(m=_.selectionStart.lineNumber),_.selectionStart&&_.selectionStart.column&&(E=_.selectionStart.column),h.push({selectionStartLineNumber:m,selectionStartColumn:E,positionLineNumber:b,positionColumn:v})}this.setStates(i,"restoreState",0,D.CursorState.fromModelSelections(h)),this.revealPrimary(i,"restoreState",!0,1)}onModelContentChanged(i,l){if(l instanceof g.ModelInjectedTextChangedEvent){if(this._isHandling)return;this._isHandling=!0;try{this.setStates(i,"modelChange",0,this.getCursorStates())}finally{this._isHandling=!1}}else{if(this._knownModelVersionId=l.versionId,this._isHandling)return;const h=l.containsEvent(1);if(this._prevEditOperationType=0,h)this._cursors.dispose(),this._cursors=new T.CursorCollection(this.context),this._validateAutoClosedActions(),this._emitStateChangedIfNecessary(i,"model",1,null,!1);else if(this._hasFocus&&l.resultingSelection&&l.resultingSelection.length>0){const f=D.CursorState.fromModelSelections(l.resultingSelection);this.setStates(i,"modelChange",l.isUndoing?5:l.isRedoing?6:2,f)&&this._revealPrimaryCursor(i,"modelChange",0,!0,0)}else{const f=this._cursors.readSelectionFromMarkers();this.setStates(i,"modelChange",2,D.CursorState.fromModelSelections(f))}}}getSelection(){return this._cursors.getPrimaryCursor().modelState.selection}getTopMostViewPosition(){return this._cursors.getTopMostViewPosition()}getBottomMostViewPosition(){return this._cursors.getBottomMostViewPosition()}getCursorColumnSelectData(){if(this._columnSelectData)return this._columnSelectData;const i=this._cursors.getPrimaryCursor(),l=i.viewState.selectionStart.getStartPosition(),h=i.viewState.position;return{isReal:!1,fromViewLineNumber:l.lineNumber,fromViewVisualColumn:D.CursorColumns.visibleColumnFromColumn2(this.context.cursorConfig,this._viewModel,l),toViewLineNumber:h.lineNumber,toViewVisualColumn:D.CursorColumns.visibleColumnFromColumn2(this.context.cursorConfig,this._viewModel,h)}}getSelections(){return this._cursors.getSelections()}setSelections(i,l,h,f){this.setStates(i,l,f,D.CursorState.fromModelSelections(h))}getPrevEditOperationType(){return this._prevEditOperationType}setPrevEditOperationType(i){this._prevEditOperationType=i}_pushAutoClosedAction(i,l){let h=[],f=[];for(let b=0,v=i.length;b<v;b++)h.push({range:i[b],options:{description:"auto-closed-character",inlineClassName:"auto-closed-character",stickiness:1}}),f.push({range:l[b],options:{description:"auto-closed-enclosing",stickiness:1}});const y=this._model.deltaDecorations([],h),_=this._model.deltaDecorations([],f);this._autoClosedActions.push(new d(this._model,y,_))}_executeEditOperation(i){if(!i)return;i.shouldPushStackElementBefore&&this._model.pushStackElement();const l=r.executeCommands(this._model,this._cursors.getSelections(),i.commands);if(l){this._interpretCommandResult(l);let h=[],f=[];for(let y=0;y<i.commands.length;y++){const _=i.commands[y];_ instanceof p.TypeWithAutoClosingCommand&&_.enclosingRange&&_.closeCharacterRange&&(h.push(_.closeCharacterRange),f.push(_.enclosingRange))}h.length>0&&this._pushAutoClosedAction(h,f),this._prevEditOperationType=i.type}i.shouldPushStackElementAfter&&this._model.pushStackElement()}_interpretCommandResult(i){(!i||i.length===0)&&(i=this._cursors.readSelectionFromMarkers()),this._columnSelectData=null,this._cursors.setSelections(i),this._cursors.normalize()}_emitStateChangedIfNecessary(i,l,h,f,y){const _=new u(this._model,this);if(_.equals(f))return!1;const b=this._cursors.getSelections(),v=this._cursors.getViewSelections();if(i.emitViewEvent(new t.ViewCursorStateChangedEvent(v,b)),!f||f.cursorState.length!==_.cursorState.length||_.cursorState.some((m,E)=>!m.modelState.equals(f.cursorState[E].modelState))){const m=f?f.cursorState.map(I=>I.modelState.selection):null,E=f?f.modelVersionId:0;i.emitOutgoingEvent(new c.CursorStateChangedEvent(m,b,E,_.modelVersionId,l||"keyboard",h,y))}return!0}_findAutoClosingPairs(i){if(!i.length)return null;let l=[];for(let h=0,f=i.length;h<f;h++){const y=i[h];if(!y.text||y.text.indexOf(`
`)>=0)return null;const _=y.text.match(/([)\]}>'"`])([^)\]}>'"`]*)$/);if(!_)return null;const b=_[1],v=this.context.cursorConfig.autoClosingPairs.autoClosingPairsCloseSingleChar.get(b);if(!v||v.length!==1)return null;const m=v[0].open,E=y.text.length-_[2].length-1,I=y.text.lastIndexOf(m,E-1);if(I===-1)return null;l.push([I,E])}return l}executeEdits(i,l,h,f){let y=null;l==="snippet"&&(y=this._findAutoClosingPairs(h)),y&&(h[0]._isTracked=!0);let _=[],b=[];const v=this._model.pushEditOperations(this.getSelections(),h,m=>{if(y)for(let I=0,k=y.length;I<k;I++){const[M,P]=y[I],F=m[I],R=F.range.startLineNumber,A=F.range.startColumn-1+M,O=F.range.startColumn-1+P;_.push(new C.Range(R,O+1,R,O+2)),b.push(new C.Range(R,A+1,R,O+2))}const E=f(m);return E&&(this._isHandling=!0),E});v&&(this._isHandling=!1,this.setSelections(i,l,v,0)),_.length>0&&this._pushAutoClosedAction(_,b)}_executeEdit(i,l,h,f=0){if(this.context.cursorConfig.readOnly)return;const y=new u(this._model,this);this._cursors.stopTrackingSelections(),this._isHandling=!0;try{this._cursors.ensureValidState(),i()}catch(_){(0,w.onUnexpectedError)(_)}this._isHandling=!1,this._cursors.startTrackingSelections(),this._validateAutoClosedActions(),this._emitStateChangedIfNecessary(l,h,f,y,!1)&&this._revealPrimaryCursor(l,h,0,!0,0)}setIsDoingComposition(i){this._isDoingComposition=i}getAutoClosedCharacters(){return d.getAllAutoClosedCharacters(this._autoClosedActions)}startComposition(i){this._selectionsWhenCompositionStarted=this.getSelections().slice(0)}endComposition(i,l){this._executeEdit(()=>{l==="keyboard"&&(this._executeEditOperation(p.TypeOperations.compositionEndWithInterceptors(this._prevEditOperationType,this.context.cursorConfig,this._model,this._selectionsWhenCompositionStarted,this.getSelections(),this.getAutoClosedCharacters())),this._selectionsWhenCompositionStarted=null)},i,l)}type(i,l,h){this._executeEdit(()=>{if(h==="keyboard"){const f=l.length;let y=0;for(;y<f;){const _=N.nextCharLength(l,y),b=l.substr(y,_);this._executeEditOperation(p.TypeOperations.typeWithInterceptors(this._isDoingComposition,this._prevEditOperationType,this.context.cursorConfig,this._model,this.getSelections(),this.getAutoClosedCharacters(),b)),y+=_}}else this._executeEditOperation(p.TypeOperations.typeWithoutInterceptors(this._prevEditOperationType,this.context.cursorConfig,this._model,this.getSelections(),l))},i,h)}compositionType(i,l,h,f,y,_){if(l.length===0&&h===0&&f===0){if(y!==0){const b=this.getSelections().map(v=>{const m=v.getPosition();return new n.Selection(m.lineNumber,m.column+y,m.lineNumber,m.column+y)});this.setSelections(i,_,b,0)}return}this._executeEdit(()=>{this._executeEditOperation(p.TypeOperations.compositionType(this._prevEditOperationType,this.context.cursorConfig,this._model,this.getSelections(),l,h,f,y))},i,_)}paste(i,l,h,f,y){this._executeEdit(()=>{this._executeEditOperation(p.TypeOperations.paste(this.context.cursorConfig,this._model,this.getSelections(),l,h,f||[]))},i,y,4)}cut(i,l){this._executeEdit(()=>{this._executeEditOperation(S.DeleteOperations.cut(this.context.cursorConfig,this._model,this.getSelections()))},i,l)}executeCommand(i,l,h){this._executeEdit(()=>{this._cursors.killSecondaryCursors(),this._executeEditOperation(new D.EditOperationResult(0,[l],{shouldPushStackElementBefore:!1,shouldPushStackElementAfter:!1}))},i,h)}executeCommands(i,l,h){this._executeEdit(()=>{this._executeEditOperation(new D.EditOperationResult(0,l,{shouldPushStackElementBefore:!1,shouldPushStackElementAfter:!1}))},i,h)}}e.CursorsController=a,a.MAX_CURSOR_COUNT=1e4;class r{static executeCommands(i,l,h){const f={model:i,selectionsBefore:l,trackedRanges:[],trackedRangesDirection:[]},y=this._innerExecuteCommands(f,h);for(let _=0,b=f.trackedRanges.length;_<b;_++)f.model._setTrackedRange(f.trackedRanges[_],null,0);return y}static _innerExecuteCommands(i,l){if(this._arrayIsEmpty(l))return null;const h=this._getEditOperations(i,l);if(h.operations.length===0)return null;const f=h.operations,y=this._getLoserCursorMap(f);if(y.hasOwnProperty("0"))return console.warn("Ignoring commands"),null;let _=[];for(let m=0,E=f.length;m<E;m++)y.hasOwnProperty(f[m].identifier.major.toString())||_.push(f[m]);h.hadTrackedEditOperation&&_.length>0&&(_[0]._isTracked=!0);let b=i.model.pushEditOperations(i.selectionsBefore,_,m=>{let E=[];for(let M=0;M<i.selectionsBefore.length;M++)E[M]=[];for(const M of m)!M.identifier||E[M.identifier.major].push(M);const I=(M,P)=>M.identifier.minor-P.identifier.minor;let k=[];for(let M=0;M<i.selectionsBefore.length;M++)E[M].length>0?(E[M].sort(I),k[M]=l[M].computeCursorState(i.model,{getInverseEditOperations:()=>E[M],getTrackedSelection:P=>{const F=parseInt(P,10),R=i.model._getTrackedRange(i.trackedRanges[F]);return i.trackedRangesDirection[F]===0?new n.Selection(R.startLineNumber,R.startColumn,R.endLineNumber,R.endColumn):new n.Selection(R.endLineNumber,R.endColumn,R.startLineNumber,R.startColumn)}})):k[M]=i.selectionsBefore[M];return k});b||(b=i.selectionsBefore);let v=[];for(let m in y)y.hasOwnProperty(m)&&v.push(parseInt(m,10));v.sort((m,E)=>E-m);for(const m of v)b.splice(m,1);return b}static _arrayIsEmpty(i){for(let l=0,h=i.length;l<h;l++)if(i[l])return!1;return!0}static _getEditOperations(i,l){let h=[],f=!1;for(let y=0,_=l.length;y<_;y++){const b=l[y];if(b){const v=this._getEditOperationsFromCommand(i,y,b);h=h.concat(v.operations),f=f||v.hadTrackedEditOperation}}return{operations:h,hadTrackedEditOperation:f}}static _getEditOperationsFromCommand(i,l,h){let f=[],y=0;const _=(I,k,M=!1)=>{C.Range.isEmpty(I)&&k===""||f.push({identifier:{major:l,minor:y++},range:I,text:k,forceMoveMarkers:M,isAutoWhitespaceEdit:h.insertsAutoWhitespace})};let b=!1;const E={addEditOperation:_,addTrackedEditOperation:(I,k,M)=>{b=!0,_(I,k,M)},trackSelection:(I,k)=>{const M=n.Selection.liftSelection(I);let P;if(M.isEmpty())if(typeof k=="boolean")k?P=2:P=3;else{const A=i.model.getLineMaxColumn(M.startLineNumber);M.startColumn===A?P=2:P=3}else P=1;const F=i.trackedRanges.length,R=i.model._setTrackedRange(null,M,P);return i.trackedRanges[F]=R,i.trackedRangesDirection[F]=M.getDirection(),F.toString()}};try{h.getEditOperations(i.model,E)}catch(I){return(0,w.onUnexpectedError)(I),{operations:[],hadTrackedEditOperation:!1}}return{operations:f,hadTrackedEditOperation:b}}static _getLoserCursorMap(i){i=i.slice(0),i.sort((h,f)=>-C.Range.compareRangesUsingEnds(h.range,f.range));let l={};for(let h=1;h<i.length;h++){const f=i[h-1],y=i[h];if(C.Range.getStartPosition(f.range).isBefore(C.Range.getEndPosition(y.range))){let _;f.identifier.major>y.identifier.major?_=f.identifier.major:_=y.identifier.major,l[_.toString()]=!0;for(let b=0;b<i.length;b++)i[b].identifier.major===_&&(i.splice(b,1),b<h&&h--,b--);h>0&&h--}}return l}}}),define(J[280],ee([0,1,4,2,17,11,31,32,18,127,39,149,41,14,23,10,72,129,95,249,48,268,258,38,37]),function(j,e,w,N,T,D,S,p,C,n,g,t,s,c,u,d,a,r,o,i,l,h,f,y,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ModelSemanticColoring=e.isSemanticColoringEnabled=e.SEMANTIC_HIGHLIGHTING_SETTING_ID=e.ModelServiceImpl=void 0;function b(O){return O.toString()}function v(O){const L=new o.StringSHA1,B=O.createSnapshot();let W;for(;W=B.read();)L.update(W);return L.digest()}class m{constructor(L,B,W){this._modelEventListeners=new N.DisposableStore,this.model=L,this._languageSelection=null,this._languageSelectionListener=null,this._modelEventListeners.add(L.onWillDispose(()=>B(L))),this._modelEventListeners.add(L.onDidChangeLanguage(K=>W(L,K)))}_disposeLanguageSelection(){this._languageSelectionListener&&(this._languageSelectionListener.dispose(),this._languageSelectionListener=null)}dispose(){this._modelEventListeners.dispose(),this._disposeLanguageSelection()}setLanguage(L){this._disposeLanguageSelection(),this._languageSelection=L,this._languageSelectionListener=this._languageSelection.onDidChange(()=>this.model.setMode(L.languageId)),this.model.setMode(L.languageId)}}const E=T.isLinux||T.isMacintosh?1:2;class I{constructor(L,B,W,K,H,Y,X,Z){this.uri=L,this.initialUndoRedoSnapshot=B,this.time=W,this.sharesUndoRedoStack=K,this.heapSize=H,this.sha1=Y,this.versionId=X,this.alternativeVersionId=Z}}let k=class wt extends N.Disposable{constructor(L,B,W,K,H,Y,X){super();this._configurationService=L,this._resourcePropertiesService=B,this._themeService=W,this._logService=K,this._undoRedoService=H,this._modeService=Y,this._languageConfigurationService=X,this._onModelAdded=this._register(new w.Emitter),this.onModelAdded=this._onModelAdded.event,this._onModelRemoved=this._register(new w.Emitter),this.onModelRemoved=this._onModelRemoved.event,this._onModelModeChanged=this._register(new w.Emitter),this.onModelModeChanged=this._onModelModeChanged.event,this._modelCreationOptionsByLanguageAndResource=Object.create(null),this._models={},this._disposedModels=new Map,this._disposedModelsHeapSize=0,this._semanticStyling=this._register(new F(this._themeService,this._modeService,this._logService)),this._register(this._configurationService.onDidChangeConfiguration(()=>this._updateModelOptions())),this._updateModelOptions(),this._register(new P(this,this._themeService,this._configurationService,this._semanticStyling))}static _readModelOptions(L,B){var W;let K=S.EDITOR_MODEL_DEFAULTS.tabSize;if(L.editor&&typeof L.editor.tabSize!="undefined"){const U=parseInt(L.editor.tabSize,10);isNaN(U)||(K=U),K<1&&(K=1)}let H=K;if(L.editor&&typeof L.editor.indentSize!="undefined"&&L.editor.indentSize!=="tabSize"){const U=parseInt(L.editor.indentSize,10);isNaN(U)||(H=U),H<1&&(H=1)}let Y=S.EDITOR_MODEL_DEFAULTS.insertSpaces;L.editor&&typeof L.editor.insertSpaces!="undefined"&&(Y=L.editor.insertSpaces==="false"?!1:Boolean(L.editor.insertSpaces));let X=E;const Z=L.eol;Z===`\r
`?X=2:Z===`
`&&(X=1);let se=S.EDITOR_MODEL_DEFAULTS.trimAutoWhitespace;L.editor&&typeof L.editor.trimAutoWhitespace!="undefined"&&(se=L.editor.trimAutoWhitespace==="false"?!1:Boolean(L.editor.trimAutoWhitespace));let oe=S.EDITOR_MODEL_DEFAULTS.detectIndentation;L.editor&&typeof L.editor.detectIndentation!="undefined"&&(oe=L.editor.detectIndentation==="false"?!1:Boolean(L.editor.detectIndentation));let G=S.EDITOR_MODEL_DEFAULTS.largeFileOptimizations;L.editor&&typeof L.editor.largeFileOptimizations!="undefined"&&(G=L.editor.largeFileOptimizations==="false"?!1:Boolean(L.editor.largeFileOptimizations));let x=S.EDITOR_MODEL_DEFAULTS.bracketPairColorizationOptions;return((W=L.editor)===null||W===void 0?void 0:W.bracketPairColorization)&&typeof L.editor.bracketPairColorization=="object"&&(x={enabled:!!L.editor.bracketPairColorization.enabled}),{isForSimpleWidget:B,tabSize:K,indentSize:H,insertSpaces:Y,detectIndentation:oe,defaultEOL:X,trimAutoWhitespace:se,largeFileOptimizations:G,bracketPairColorizationOptions:x}}_getEOL(L,B){if(L)return this._resourcePropertiesService.getEOL(L,B);const W=this._configurationService.getValue("files.eol",{overrideIdentifier:B});return W&&typeof W=="string"&&W!=="auto"?W:T.OS===3||T.OS===2?`
`:`\r
`}_shouldRestoreUndoStack(){const L=this._configurationService.getValue("files.restoreUndoStack");return typeof L=="boolean"?L:!0}getCreationOptions(L,B,W){let K=this._modelCreationOptionsByLanguageAndResource[L+B];if(!K){const H=this._configurationService.getValue("editor",{overrideIdentifier:L,resource:B}),Y=this._getEOL(B,L);K=wt._readModelOptions({editor:H,eol:Y},W),this._modelCreationOptionsByLanguageAndResource[L+B]=K}return K}_updateModelOptions(){const L=this._modelCreationOptionsByLanguageAndResource;this._modelCreationOptionsByLanguageAndResource=Object.create(null);const B=Object.keys(this._models);for(let W=0,K=B.length;W<K;W++){const H=B[W],Y=this._models[H],X=Y.model.getLanguageId(),Z=Y.model.uri,se=L[X+Z],oe=this.getCreationOptions(X,Z,Y.model.isForSimpleWidget);wt._setModelOptionsForModel(Y.model,oe,se)}}static _setModelOptionsForModel(L,B,W){W&&W.defaultEOL!==B.defaultEOL&&L.getLineCount()===1&&L.setEOL(B.defaultEOL===1?0:1),!(W&&W.detectIndentation===B.detectIndentation&&W.insertSpaces===B.insertSpaces&&W.tabSize===B.tabSize&&W.indentSize===B.indentSize&&W.trimAutoWhitespace===B.trimAutoWhitespace&&(0,y.equals)(W.bracketPairColorizationOptions,B.bracketPairColorizationOptions))&&(B.detectIndentation?(L.detectIndentation(B.insertSpaces,B.tabSize),L.updateOptions({trimAutoWhitespace:B.trimAutoWhitespace,bracketColorizationOptions:B.bracketPairColorizationOptions})):L.updateOptions({insertSpaces:B.insertSpaces,tabSize:B.tabSize,indentSize:B.indentSize,trimAutoWhitespace:B.trimAutoWhitespace,bracketColorizationOptions:B.bracketPairColorizationOptions}))}_insertDisposedModel(L){this._disposedModels.set(b(L.uri),L),this._disposedModelsHeapSize+=L.heapSize}_removeDisposedModel(L){const B=this._disposedModels.get(b(L));return B&&(this._disposedModelsHeapSize-=B.heapSize),this._disposedModels.delete(b(L)),B}_ensureDisposedModelsHeapSize(L){if(this._disposedModelsHeapSize>L){const B=[];for(this._disposedModels.forEach(W=>{W.sharesUndoRedoStack||B.push(W)}),B.sort((W,K)=>W.time-K.time);B.length>0&&this._disposedModelsHeapSize>L;){const W=B.shift();this._removeDisposedModel(W.uri),W.initialUndoRedoSnapshot!==null&&this._undoRedoService.restoreSnapshot(W.initialUndoRedoSnapshot)}}}_createModelData(L,B,W,K){const H=this.getCreationOptions(B,W,K),Y=new p.TextModel(L,H,B,W,this._undoRedoService,this._modeService,this._languageConfigurationService);if(W&&this._disposedModels.has(b(W))){const se=this._removeDisposedModel(W),oe=this._undoRedoService.getElements(W),G=v(Y)===se.sha1;if(G||se.sharesUndoRedoStack){for(const x of oe.past)(0,i.isEditStackElement)(x)&&x.matchesResource(W)&&x.setModel(Y);for(const x of oe.future)(0,i.isEditStackElement)(x)&&x.matchesResource(W)&&x.setModel(Y);this._undoRedoService.setElementsValidFlag(W,!0,x=>(0,i.isEditStackElement)(x)&&x.matchesResource(W)),G&&(Y._overwriteVersionId(se.versionId),Y._overwriteAlternativeVersionId(se.alternativeVersionId),Y._overwriteInitialUndoRedoSnapshot(se.initialUndoRedoSnapshot))}else se.initialUndoRedoSnapshot!==null&&this._undoRedoService.restoreSnapshot(se.initialUndoRedoSnapshot)}const X=b(Y.uri);if(this._models[X])throw new Error("ModelService: Cannot add model because it already exists!");const Z=new m(Y,se=>this._onWillDispose(se),(se,oe)=>this._onDidChangeLanguage(se,oe));return this._models[X]=Z,Z}createModel(L,B,W,K=!1){let H;return B?(H=this._createModelData(L,B.languageId,W,K),this.setMode(H.model,B)):H=this._createModelData(L,n.PLAINTEXT_MODE_ID,W,K),this._onModelAdded.fire(H.model),H.model}setMode(L,B){if(!B)return;const W=this._models[b(L.uri)];!W||W.setLanguage(B)}getModels(){const L=[],B=Object.keys(this._models);for(let W=0,K=B.length;W<K;W++){const H=B[W];L.push(this._models[H].model)}return L}getModel(L){const B=b(L),W=this._models[B];return W?W.model:null}getSemanticTokensProviderStyling(L){return this._semanticStyling.get(L)}_schemaShouldMaintainUndoRedoElements(L){return L.scheme===l.Schemas.file||L.scheme===l.Schemas.vscodeRemote||L.scheme===l.Schemas.userData||L.scheme===l.Schemas.vscodeNotebookCell||L.scheme==="fake-fs"}_onWillDispose(L){const B=b(L.uri),W=this._models[B],K=this._undoRedoService.getUriComparisonKey(L.uri)!==L.uri.toString();let H=!1,Y=0;if(K||this._shouldRestoreUndoStack()&&this._schemaShouldMaintainUndoRedoElements(L.uri)){const Z=this._undoRedoService.getElements(L.uri);if(Z.past.length>0||Z.future.length>0){for(const se of Z.past)(0,i.isEditStackElement)(se)&&se.matchesResource(L.uri)&&(H=!0,Y+=se.heapSize(L.uri),se.setModel(L.uri));for(const se of Z.future)(0,i.isEditStackElement)(se)&&se.matchesResource(L.uri)&&(H=!0,Y+=se.heapSize(L.uri),se.setModel(L.uri))}}const X=wt.MAX_MEMORY_FOR_CLOSED_FILES_UNDO_STACK;if(H)if(!K&&Y>X){const Z=W.model.getInitialUndoRedoSnapshot();Z!==null&&this._undoRedoService.restoreSnapshot(Z)}else this._ensureDisposedModelsHeapSize(X-Y),this._undoRedoService.setElementsValidFlag(L.uri,!1,Z=>(0,i.isEditStackElement)(Z)&&Z.matchesResource(L.uri)),this._insertDisposedModel(new I(L.uri,W.model.getInitialUndoRedoSnapshot(),Date.now(),K,Y,v(L),L.getVersionId(),L.getAlternativeVersionId()));else if(!K){const Z=W.model.getInitialUndoRedoSnapshot();Z!==null&&this._undoRedoService.restoreSnapshot(Z)}delete this._models[B],W.dispose(),delete this._modelCreationOptionsByLanguageAndResource[L.getLanguageId()+L.uri],this._onModelRemoved.fire(L)}_onDidChangeLanguage(L,B){const W=B.oldLanguage,K=L.getLanguageId(),H=this.getCreationOptions(W,L.uri,L.isForSimpleWidget),Y=this.getCreationOptions(K,L.uri,L.isForSimpleWidget);wt._setModelOptionsForModel(L,Y,H),this._onModelModeChanged.fire({model:L,oldModeId:W})}};k.MAX_MEMORY_FOR_CLOSED_FILES_UNDO_STACK=20*1024*1024,k=Fe([Ce(0,s.IConfigurationService),Ce(1,t.ITextResourcePropertiesService),Ce(2,d.IThemeService),Ce(3,a.ILogService),Ce(4,r.IUndoRedoService),Ce(5,g.IModeService),Ce(6,_.ILanguageConfigurationService)],k),e.ModelServiceImpl=k,e.SEMANTIC_HIGHLIGHTING_SETTING_ID="editor.semanticHighlighting";function M(O,L,B){var W;const K=(W=B.getValue(e.SEMANTIC_HIGHLIGHTING_SETTING_ID,{overrideIdentifier:O.getLanguageId(),resource:O.uri}))===null||W===void 0?void 0:W.enabled;return typeof K=="boolean"?K:L.getColorTheme().semanticHighlighting}e.isSemanticColoringEnabled=M;class P extends N.Disposable{constructor(L,B,W,K){super();this._watchers=Object.create(null),this._semanticStyling=K;const H=Z=>{this._watchers[Z.uri.toString()]=new A(Z,B,this._semanticStyling)},Y=(Z,se)=>{se.dispose(),delete this._watchers[Z.uri.toString()]},X=()=>{for(let Z of L.getModels()){const se=this._watchers[Z.uri.toString()];M(Z,B,W)?se||H(Z):se&&Y(Z,se)}};this._register(L.onModelAdded(Z=>{M(Z,B,W)&&H(Z)})),this._register(L.onModelRemoved(Z=>{const se=this._watchers[Z.uri.toString()];se&&Y(Z,se)})),this._register(W.onDidChangeConfiguration(Z=>{Z.affectsConfiguration(e.SEMANTIC_HIGHLIGHTING_SETTING_ID)&&X()})),this._register(B.onDidColorThemeChange(X))}}class F extends N.Disposable{constructor(L,B,W){super();this._themeService=L,this._modeService=B,this._logService=W,this._caches=new WeakMap,this._register(this._themeService.onDidColorThemeChange(()=>{this._caches=new WeakMap}))}get(L){return this._caches.has(L)||this._caches.set(L,new h.SemanticTokensProviderStyling(L.getLegend(),this._themeService,this._modeService,this._logService)),this._caches.get(L)}}class R{constructor(L,B,W){this.provider=L,this.resultId=B,this.data=W}dispose(){this.provider.releaseDocumentSemanticTokens(this.resultId)}}class A extends N.Disposable{constructor(L,B,W){super();this._isDisposed=!1,this._model=L,this._semanticStyling=W,this._fetchDocumentSemanticTokens=this._register(new c.RunOnceScheduler(()=>this._fetchDocumentSemanticTokensNow(),A.FETCH_DOCUMENT_SEMANTIC_TOKENS_DELAY)),this._currentDocumentResponse=null,this._currentDocumentRequestCancellationTokenSource=null,this._documentProvidersChangeListeners=[],this._register(this._model.onDidChangeContent(()=>{this._fetchDocumentSemanticTokens.isScheduled()||this._fetchDocumentSemanticTokens.schedule()})),this._register(this._model.onDidChangeLanguage(()=>{this._currentDocumentResponse&&(this._currentDocumentResponse.dispose(),this._currentDocumentResponse=null),this._currentDocumentRequestCancellationTokenSource&&(this._currentDocumentRequestCancellationTokenSource.cancel(),this._currentDocumentRequestCancellationTokenSource=null),this._setDocumentSemanticTokens(null,null,null,[]),this._fetchDocumentSemanticTokens.schedule(0)}));const K=()=>{(0,N.dispose)(this._documentProvidersChangeListeners),this._documentProvidersChangeListeners=[];for(const H of C.DocumentSemanticTokensProviderRegistry.all(L))typeof H.onDidChange=="function"&&this._documentProvidersChangeListeners.push(H.onDidChange(()=>this._fetchDocumentSemanticTokens.schedule(0)))};K(),this._register(C.DocumentSemanticTokensProviderRegistry.onDidChange(()=>{K(),this._fetchDocumentSemanticTokens.schedule()})),this._register(B.onDidColorThemeChange(H=>{this._setDocumentSemanticTokens(null,null,null,[]),this._fetchDocumentSemanticTokens.schedule()})),this._fetchDocumentSemanticTokens.schedule(0)}dispose(){this._currentDocumentResponse&&(this._currentDocumentResponse.dispose(),this._currentDocumentResponse=null),this._currentDocumentRequestCancellationTokenSource&&(this._currentDocumentRequestCancellationTokenSource.cancel(),this._currentDocumentRequestCancellationTokenSource=null),this._setDocumentSemanticTokens(null,null,null,[]),this._isDisposed=!0,super.dispose()}_fetchDocumentSemanticTokensNow(){if(this._currentDocumentRequestCancellationTokenSource)return;if(!(0,f.hasDocumentSemanticTokensProvider)(this._model)){this._currentDocumentResponse&&this._model.setSemanticTokens(null,!1);return}const L=new u.CancellationTokenSource,B=this._currentDocumentResponse?this._currentDocumentResponse.provider:null,W=this._currentDocumentResponse&&this._currentDocumentResponse.resultId||null,K=(0,f.getDocumentSemanticTokens)(this._model,B,W,L.token);this._currentDocumentRequestCancellationTokenSource=L;const H=[],Y=this._model.onDidChangeContent(X=>{H.push(X)});K.then(X=>{if(this._currentDocumentRequestCancellationTokenSource=null,Y.dispose(),!X)this._setDocumentSemanticTokens(null,null,null,H);else{const{provider:Z,tokens:se}=X,oe=this._semanticStyling.get(Z);this._setDocumentSemanticTokens(Z,se||null,oe,H)}},X=>{X&&(D.isPromiseCanceledError(X)||typeof X.message=="string"&&X.message.indexOf("busy")!==-1)||D.onUnexpectedError(X),this._currentDocumentRequestCancellationTokenSource=null,Y.dispose(),H.length>0&&(this._fetchDocumentSemanticTokens.isScheduled()||this._fetchDocumentSemanticTokens.schedule())})}static _copy(L,B,W,K,H){for(let Y=0;Y<H;Y++)W[K+Y]=L[B+Y]}_setDocumentSemanticTokens(L,B,W,K){const H=this._currentDocumentResponse,Y=()=>{K.length>0&&!this._fetchDocumentSemanticTokens.isScheduled()&&this._fetchDocumentSemanticTokens.schedule()};if(this._currentDocumentResponse&&(this._currentDocumentResponse.dispose(),this._currentDocumentResponse=null),this._isDisposed){L&&B&&L.releaseDocumentSemanticTokens(B.resultId);return}if(!L||!W){this._model.setSemanticTokens(null,!1);return}if(!B){this._model.setSemanticTokens(null,!0),Y();return}if((0,f.isSemanticTokensEdits)(B)){if(!H){this._model.setSemanticTokens(null,!0);return}if(B.edits.length===0)B={resultId:B.resultId,data:H.data};else{let X=0;for(const x of B.edits)X+=(x.data?x.data.length:0)-x.deleteCount;const Z=H.data,se=new Uint32Array(Z.length+X);let oe=Z.length,G=se.length;for(let x=B.edits.length-1;x>=0;x--){const U=B.edits[x],$=oe-(U.start+U.deleteCount);$>0&&(A._copy(Z,oe-$,se,G-$,$),G-=$),U.data&&(A._copy(U.data,0,se,G-U.data.length,U.data.length),G-=U.data.length),oe=U.start}oe>0&&A._copy(Z,0,se,0,oe),B={resultId:B.resultId,data:se}}}if((0,f.isSemanticTokens)(B)){this._currentDocumentResponse=new R(L,B.resultId,B.data);const X=(0,h.toMultilineTokens2)(B,W,this._model.getLanguageId());if(K.length>0)for(const Z of K)for(const se of X)for(const oe of Z.changes)se.applyEdit(oe.range,oe.text);this._model.setSemanticTokens(X,!0)}else this._model.setSemanticTokens(null,!0);Y()}}e.ModelSemanticColoring=A,A.FETCH_DOCUMENT_SEMANTIC_TOKENS_DELAY=300}),define(J[667],ee([0,1,19,87,13,3,49,32,180,234,60,99]),function(j,e,w,N,T,D,S,p,C,n,g,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IdentityLinesCollection=e.IdentityCoordinatesConverter=e.SplitLine=e.SplitLinesCollection=e.CoordinatesConverter=void 0;class s{constructor(m){this._lines=m}convertViewPositionToModelPosition(m){return this._lines.convertViewPositionToModelPosition(m.lineNumber,m.column)}convertViewRangeToModelRange(m){return this._lines.convertViewRangeToModelRange(m)}validateViewPosition(m,E){return this._lines.validateViewPosition(m.lineNumber,m.column,E)}validateViewRange(m,E){return this._lines.validateViewRange(m,E)}convertModelPositionToViewPosition(m,E){return this._lines.convertModelPositionToViewPosition(m.lineNumber,m.column,E)}convertModelRangeToViewRange(m,E){return this._lines.convertModelRangeToViewRange(m,E)}modelPositionIsVisible(m){return this._lines.modelPositionIsVisible(m.lineNumber,m.column)}getModelLineViewLineCount(m){return this._lines.getModelLineViewLineCount(m)}getViewLineNumberOfModelPosition(m,E){return this._lines.getViewLineNumberOfModelPosition(m,E)}}e.CoordinatesConverter=s;class c{constructor(m){this._counts=m,this._isValid=!1,this._validEndIndex=-1,this._modelToView=[],this._viewToModel=[]}_invalidate(m){this._isValid=!1,this._validEndIndex=Math.min(this._validEndIndex,m-1)}_ensureValid(){if(!this._isValid){for(let m=this._validEndIndex+1,E=this._counts.length;m<E;m++){const I=this._counts[m],k=m>0?this._modelToView[m-1]:0;this._modelToView[m]=k+I;for(let M=0;M<I;M++)this._viewToModel[k+M]=m}this._modelToView.length=this._counts.length,this._viewToModel.length=this._modelToView[this._modelToView.length-1],this._isValid=!0,this._validEndIndex=this._counts.length-1}}changeValue(m,E){this._counts[m]!==E&&(this._counts[m]=E,this._invalidate(m))}removeValues(m,E){this._counts.splice(m,E),this._invalidate(m)}insertValues(m,E){this._counts=w.arrayInsert(this._counts,m,E),this._invalidate(m)}getTotalValue(){return this._ensureValid(),this._viewToModel.length}getAccumulatedValue(m){return this._ensureValid(),this._modelToView[m]}getIndexOf(m){this._ensureValid();const E=this._viewToModel[m],I=E>0?this._modelToView[E-1]:0;return new n.PrefixSumIndexOfResult(E,m-I)}}class u{constructor(m,E,I,k,M,P,F,R,A){this._editorId=m,this.model=E,this._validModelVersionId=-1,this._domLineBreaksComputerFactory=I,this._monospaceLineBreaksComputerFactory=k,this.fontInfo=M,this.tabSize=P,this.wrappingStrategy=F,this.wrappingColumn=R,this.wrappingIndent=A,this._constructLines(!0,null)}dispose(){this.hiddenAreasIds=this.model.deltaDecorations(this.hiddenAreasIds,[])}createCoordinatesConverter(){return new s(this)}_constructLines(m,E){this.lines=[],m&&(this.hiddenAreasIds=[]);const I=this.model.getLinesContent(),k=this.model.getInjectedTextDecorations(this._editorId),M=I.length,P=this.createLineBreaksComputer(),F=new w.ArrayQueue(t.LineInjectedText.fromDecorations(k));for(let H=0;H<M;H++){const Y=F.takeWhile(X=>X.lineNumber===H+1);P.addRequest(I[H],Y,E?E[H]:null)}const R=P.finalize();let A=[],O=this.hiddenAreasIds.map(H=>this.model.getDecorationRange(H)).sort(D.Range.compareRangesUsingStarts),L=1,B=0,W=-1,K=W+1<O.length?B+1:M+2;for(let H=0;H<M;H++){let Y=H+1;Y===K&&(W++,L=O[W].startLineNumber,B=O[W].endLineNumber,K=W+1<O.length?B+1:M+2);let X=Y>=L&&Y<=B,Z=y(R[H],!X);A[H]=Z.getViewLineCount(),this.lines[H]=Z}this._validModelVersionId=this.model.getVersionId(),this.prefixSumComputer=new c(A)}getHiddenAreas(){return this.hiddenAreasIds.map(m=>this.model.getDecorationRange(m))}_reduceRanges(m){if(m.length===0)return[];let E=m.map(P=>this.model.validateRange(P)).sort(D.Range.compareRangesUsingStarts),I=[],k=E[0].startLineNumber,M=E[0].endLineNumber;for(let P=1,F=E.length;P<F;P++){let R=E[P];R.startLineNumber>M+1?(I.push(new D.Range(k,1,M,1)),k=R.startLineNumber,M=R.endLineNumber):R.endLineNumber>M&&(M=R.endLineNumber)}return I.push(new D.Range(k,1,M,1)),I}setHiddenAreas(m){let E=this._reduceRanges(m),I=this.hiddenAreasIds.map(L=>this.model.getDecorationRange(L)).sort(D.Range.compareRangesUsingStarts);if(E.length===I.length){let L=!1;for(let B=0;B<E.length;B++)if(!E[B].equalsRange(I[B])){L=!0;break}if(!L)return!1}let k=[];for(const L of E)k.push({range:L,options:p.ModelDecorationOptions.EMPTY});this.hiddenAreasIds=this.model.deltaDecorations(this.hiddenAreasIds,k);let M=E,P=1,F=0,R=-1,A=R+1<M.length?F+1:this.lines.length+2,O=!1;for(let L=0;L<this.lines.length;L++){let B=L+1;B===A&&(R++,P=M[R].startLineNumber,F=M[R].endLineNumber,A=R+1<M.length?F+1:this.lines.length+2);let W=!1;if(B>=P&&B<=F?this.lines[L].isVisible()&&(this.lines[L]=this.lines[L].setVisible(!1),W=!0):(O=!0,this.lines[L].isVisible()||(this.lines[L]=this.lines[L].setVisible(!0),W=!0)),W){let K=this.lines[L].getViewLineCount();this.prefixSumComputer.changeValue(L,K)}}return O||this.setHiddenAreas([]),!0}modelPositionIsVisible(m,E){return m<1||m>this.lines.length?!1:this.lines[m-1].isVisible()}getModelLineViewLineCount(m){return m<1||m>this.lines.length?1:this.lines[m-1].getViewLineCount()}setTabSize(m){return this.tabSize===m?!1:(this.tabSize=m,this._constructLines(!1,null),!0)}setWrappingSettings(m,E,I,k){const M=this.fontInfo.equals(m),P=this.wrappingStrategy===E,F=this.wrappingColumn===I,R=this.wrappingIndent===k;if(M&&P&&F&&R)return!1;const A=M&&P&&!F&&R;this.fontInfo=m,this.wrappingStrategy=E,this.wrappingColumn=I,this.wrappingIndent=k;let O=null;if(A){O=[];for(let L=0,B=this.lines.length;L<B;L++)O[L]=this.lines[L].getLineBreakData()}return this._constructLines(!1,O),!0}createLineBreaksComputer(){return(this.wrappingStrategy==="advanced"?this._domLineBreaksComputerFactory:this._monospaceLineBreaksComputerFactory).createLineBreaksComputer(this.fontInfo,this.tabSize,this.wrappingColumn,this.wrappingIndent)}onModelFlushed(){this._constructLines(!0,null)}onModelLinesDeleted(m,E,I){if(!m||m<=this._validModelVersionId)return null;let k=E===1?1:this.prefixSumComputer.getAccumulatedValue(E-2)+1,M=this.prefixSumComputer.getAccumulatedValue(I-1);return this.lines.splice(E-1,I-E+1),this.prefixSumComputer.removeValues(E-1,I-E+1),new C.ViewLinesDeletedEvent(k,M)}onModelLinesInserted(m,E,I,k){if(!m||m<=this._validModelVersionId)return null;const M=E>2&&!this.lines[E-2].isVisible();let P=E===1?1:this.prefixSumComputer.getAccumulatedValue(E-2)+1,F=0,R=[],A=[];for(let O=0,L=k.length;O<L;O++){let B=y(k[O],!M);R.push(B);let W=B.getViewLineCount();F+=W,A[O]=W}return this.lines=this.lines.slice(0,E-1).concat(R).concat(this.lines.slice(E-1)),this.prefixSumComputer.insertValues(E-1,A),new C.ViewLinesInsertedEvent(P,P+F-1)}onModelLineChanged(m,E,I){if(m!==null&&m<=this._validModelVersionId)return[!1,null,null,null];let k=E-1,M=this.lines[k].getViewLineCount(),P=this.lines[k].isVisible(),F=y(I,P);this.lines[k]=F;let R=this.lines[k].getViewLineCount(),A=!1,O=0,L=-1,B=0,W=-1,K=0,H=-1;M>R?(O=E===1?1:this.prefixSumComputer.getAccumulatedValue(E-2)+1,L=O+R-1,K=L+1,H=K+(M-R)-1,A=!0):M<R?(O=E===1?1:this.prefixSumComputer.getAccumulatedValue(E-2)+1,L=O+M-1,B=L+1,W=B+(R-M)-1,A=!0):(O=E===1?1:this.prefixSumComputer.getAccumulatedValue(E-2)+1,L=O+R-1),this.prefixSumComputer.changeValue(k,R);const Y=O<=L?new C.ViewLinesChangedEvent(O,L):null,X=B<=W?new C.ViewLinesInsertedEvent(B,W):null,Z=K<=H?new C.ViewLinesDeletedEvent(K,H):null;return[A,Y,X,Z]}acceptVersionId(m){this._validModelVersionId=m,this.lines.length===1&&!this.lines[0].isVisible()&&this.setHiddenAreas([])}getViewLineCount(){return this.prefixSumComputer.getTotalValue()}_toValidViewLineNumber(m){if(m<1)return 1;const E=this.getViewLineCount();return m>E?E:m|0}getActiveIndentGuide(m,E,I){m=this._toValidViewLineNumber(m),E=this._toValidViewLineNumber(E),I=this._toValidViewLineNumber(I);const k=this.convertViewPositionToModelPosition(m,this.getViewLineMinColumn(m)),M=this.convertViewPositionToModelPosition(E,this.getViewLineMinColumn(E)),P=this.convertViewPositionToModelPosition(I,this.getViewLineMinColumn(I)),F=this.model.getActiveIndentGuide(k.lineNumber,M.lineNumber,P.lineNumber),R=this.convertModelPositionToViewPosition(F.startLineNumber,1),A=this.convertModelPositionToViewPosition(F.endLineNumber,this.model.getLineMaxColumn(F.endLineNumber));return{startLineNumber:R.lineNumber,endLineNumber:A.lineNumber,indent:F.indent}}getViewLineInfo(m){m=this._toValidViewLineNumber(m);let E=this.prefixSumComputer.getIndexOf(m-1),I=E.index,k=E.remainder;return new d(I+1,k)}getMinColumnOfViewLine(m){return this.lines[m.modelLineNumber-1].getViewLineMinColumn(this.model,m.modelLineNumber,m.modelLineWrappedLineIdx)}getModelStartPositionOfViewLine(m){const E=this.lines[m.modelLineNumber-1],I=E.getViewLineMinColumn(this.model,m.modelLineNumber,m.modelLineWrappedLineIdx),k=E.getModelColumnOfViewPosition(m.modelLineWrappedLineIdx,I);return new T.Position(m.modelLineNumber,k)}getModelEndPositionOfViewLine(m){const E=this.lines[m.modelLineNumber-1],I=E.getViewLineMaxColumn(this.model,m.modelLineNumber,m.modelLineWrappedLineIdx),k=E.getModelColumnOfViewPosition(m.modelLineWrappedLineIdx,I);return new T.Position(m.modelLineNumber,k)}getViewLineInfosGroupedByModelRanges(m,E){const I=this.getViewLineInfo(m),k=this.getViewLineInfo(E),M=new Array;let P=this.getModelStartPositionOfViewLine(I),F=new Array;for(let R=I.modelLineNumber;R<=k.modelLineNumber;R++){const A=this.lines[R-1];if(A.isVisible()){let O=R===I.modelLineNumber?I.modelLineWrappedLineIdx:0,L=R===k.modelLineNumber?k.modelLineWrappedLineIdx+1:A.getViewLineCount();for(let B=O;B<L;B++)F.push(new d(R,B))}if(!A.isVisible()&&P){const O=new T.Position(R-1,this.model.getLineMaxColumn(R-1)+1),L=D.Range.fromPositions(P,O);M.push(new a(L,F)),F=[],P=null}else A.isVisible()&&!P&&(P=new T.Position(R,1))}if(P){const R=D.Range.fromPositions(P,this.getModelEndPositionOfViewLine(k));M.push(new a(R,F))}return M}getViewLinesBracketGuides(m,E,I,k){const M=I?this.convertViewPositionToModelPosition(I.lineNumber,I.column):null,P=[];for(const F of this.getViewLineInfosGroupedByModelRanges(m,E)){const R=F.modelRange.startLineNumber,A=this.model.getLinesBracketGuides(R,F.modelRange.endLineNumber,M,k);for(const O of F.viewLines)if(O.isWrappedLineContinuation&&this.getMinColumnOfViewLine(O)===1)P.push([]);else{let L=A[O.modelLineNumber-R];L=L.map(B=>B.horizontalLine?new S.IndentGuide(B.visibleColumn,B.className,new S.IndentGuideHorizontalLine(B.horizontalLine.top,this.convertModelPositionToViewPosition(O.modelLineNumber,B.horizontalLine.endColumn).column)):B),P.push(L)}}return P}getViewLinesIndentGuides(m,E){m=this._toValidViewLineNumber(m),E=this._toValidViewLineNumber(E);const I=this.convertViewPositionToModelPosition(m,this.getViewLineMinColumn(m)),k=this.convertViewPositionToModelPosition(E,this.getViewLineMaxColumn(E));let M=[],P=[],F=[];const R=I.lineNumber-1,A=k.lineNumber-1;let O=null;for(let K=R;K<=A;K++){const H=this.lines[K];if(H.isVisible()){let Y=H.getViewLineNumberOfModelPosition(0,K===R?I.column:1),X=H.getViewLineNumberOfModelPosition(0,this.model.getLineMaxColumn(K+1)),Z=X-Y+1,se=0;Z>1&&H.getViewLineMinColumn(this.model,K+1,X)===1&&(se=Y===0?1:2),P.push(Z),F.push(se),O===null&&(O=new T.Position(K+1,0))}else O!==null&&(M=M.concat(this.model.getLinesIndentGuides(O.lineNumber,K)),O=null)}O!==null&&(M=M.concat(this.model.getLinesIndentGuides(O.lineNumber,k.lineNumber)),O=null);const L=E-m+1;let B=new Array(L),W=0;for(let K=0,H=M.length;K<H;K++){let Y=M[K],X=Math.min(L-W,P[K]),Z=F[K],se;Z===2?se=0:Z===1?se=1:se=X;for(let oe=0;oe<X;oe++)oe===se&&(Y=0),B[W++]=Y}return B}getViewLineContent(m){m=this._toValidViewLineNumber(m);let E=this.prefixSumComputer.getIndexOf(m-1),I=E.index,k=E.remainder;return this.lines[I].getViewLineContent(this.model,I+1,k)}getViewLineLength(m){m=this._toValidViewLineNumber(m);let E=this.prefixSumComputer.getIndexOf(m-1),I=E.index,k=E.remainder;return this.lines[I].getViewLineLength(this.model,I+1,k)}getViewLineMinColumn(m){m=this._toValidViewLineNumber(m);let E=this.prefixSumComputer.getIndexOf(m-1),I=E.index,k=E.remainder;return this.lines[I].getViewLineMinColumn(this.model,I+1,k)}getViewLineMaxColumn(m){m=this._toValidViewLineNumber(m);let E=this.prefixSumComputer.getIndexOf(m-1),I=E.index,k=E.remainder;return this.lines[I].getViewLineMaxColumn(this.model,I+1,k)}getViewLineData(m){m=this._toValidViewLineNumber(m);let E=this.prefixSumComputer.getIndexOf(m-1),I=E.index,k=E.remainder;return this.lines[I].getViewLineData(this.model,I+1,k)}getViewLinesData(m,E,I){m=this._toValidViewLineNumber(m),E=this._toValidViewLineNumber(E);let k=this.prefixSumComputer.getIndexOf(m-1),M=m,P=k.index,F=k.remainder,R=[];for(let A=P,O=this.model.getLineCount();A<O;A++){let L=this.lines[A];if(!L.isVisible())continue;let B=A===P?F:0,W=L.getViewLineCount()-B,K=!1;M+W>E&&(K=!0,W=E-M+1);let H=B+W;if(L.getViewLinesData(this.model,A+1,B,H,M-m,I,R),M+=W,K)break}return R}validateViewPosition(m,E,I){m=this._toValidViewLineNumber(m);let k=this.prefixSumComputer.getIndexOf(m-1),M=k.index,P=k.remainder,F=this.lines[M],R=F.getViewLineMinColumn(this.model,M+1,P),A=F.getViewLineMaxColumn(this.model,M+1,P);E<R&&(E=R),E>A&&(E=A);let O=F.getModelColumnOfViewPosition(P,E);return this.model.validatePosition(new T.Position(M+1,O)).equals(I)?new T.Position(m,E):this.convertModelPositionToViewPosition(I.lineNumber,I.column)}validateViewRange(m,E){const I=this.validateViewPosition(m.startLineNumber,m.startColumn,E.getStartPosition()),k=this.validateViewPosition(m.endLineNumber,m.endColumn,E.getEndPosition());return new D.Range(I.lineNumber,I.column,k.lineNumber,k.column)}convertViewPositionToModelPosition(m,E){m=this._toValidViewLineNumber(m);let I=this.prefixSumComputer.getIndexOf(m-1),k=I.index,M=I.remainder,P=this.lines[k].getModelColumnOfViewPosition(M,E);return this.model.validatePosition(new T.Position(k+1,P))}convertViewRangeToModelRange(m){const E=this.convertViewPositionToModelPosition(m.startLineNumber,m.startColumn),I=this.convertViewPositionToModelPosition(m.endLineNumber,m.endColumn);return new D.Range(E.lineNumber,E.column,I.lineNumber,I.column)}convertModelPositionToViewPosition(m,E,I=2){const k=this.model.validatePosition(new T.Position(m,E)),M=k.lineNumber,P=k.column;let F=M-1,R=!1;for(;F>0&&!this.lines[F].isVisible();)F--,R=!0;if(F===0&&!this.lines[F].isVisible())return new T.Position(1,1);const A=1+(F===0?0:this.prefixSumComputer.getAccumulatedValue(F-1));let O;return R?O=this.lines[F].getViewPositionOfModelPosition(A,this.model.getLineMaxColumn(F+1),I):O=this.lines[M-1].getViewPositionOfModelPosition(A,P,I),O}convertModelRangeToViewRange(m,E=0){if(m.isEmpty()){const I=this.convertModelPositionToViewPosition(m.startLineNumber,m.startColumn,E);return D.Range.fromPositions(I)}else{const I=this.convertModelPositionToViewPosition(m.startLineNumber,m.startColumn,1),k=this.convertModelPositionToViewPosition(m.endLineNumber,m.endColumn,0);return new D.Range(I.lineNumber,I.column,k.lineNumber,k.column)}}getViewLineNumberOfModelPosition(m,E){let I=m-1;if(this.lines[I].isVisible()){const M=1+(I===0?0:this.prefixSumComputer.getAccumulatedValue(I-1));return this.lines[I].getViewLineNumberOfModelPosition(M,E)}for(;I>0&&!this.lines[I].isVisible();)I--;if(I===0&&!this.lines[I].isVisible())return 1;const k=1+(I===0?0:this.prefixSumComputer.getAccumulatedValue(I-1));return this.lines[I].getViewLineNumberOfModelPosition(k,this.model.getLineMaxColumn(I+1))}getDecorationsInRange(m,E,I){const k=this.convertViewPositionToModelPosition(m.startLineNumber,m.startColumn),M=this.convertViewPositionToModelPosition(m.endLineNumber,m.endColumn);if(M.lineNumber-k.lineNumber<=m.endLineNumber-m.startLineNumber)return this.model.getDecorationsInRange(new D.Range(k.lineNumber,1,M.lineNumber,M.column),E,I);let P=[];const F=k.lineNumber-1,R=M.lineNumber-1;let A=null;for(let W=F;W<=R;W++)if(this.lines[W].isVisible())A===null&&(A=new T.Position(W+1,W===F?k.column:1));else if(A!==null){const H=this.model.getLineMaxColumn(W);P=P.concat(this.model.getDecorationsInRange(new D.Range(A.lineNumber,A.column,W,H),E,I)),A=null}A!==null&&(P=P.concat(this.model.getDecorationsInRange(new D.Range(A.lineNumber,A.column,M.lineNumber,M.column),E,I)),A=null),P.sort((W,K)=>{const H=D.Range.compareRangesUsingStarts(W.range,K.range);return H===0?W.id<K.id?-1:W.id>K.id?1:0:H});let O=[],L=0,B=null;for(const W of P){const K=W.id;B!==K&&(B=K,O[L++]=W)}return O}getInjectedTextAt(m){const E=this._toValidViewLineNumber(m.lineNumber),I=this.prefixSumComputer.getIndexOf(E-1),k=I.index,M=I.remainder;return this.lines[k].getInjectedTextAt(M,m.column)}normalizePosition(m,E){const I=this._toValidViewLineNumber(m.lineNumber),k=this.prefixSumComputer.getIndexOf(I-1),M=k.index,P=k.remainder;return this.lines[M].normalizePosition(this.model,M+1,P,m,E)}getLineIndentColumn(m){const E=this._toValidViewLineNumber(m),I=this.prefixSumComputer.getIndexOf(E-1),k=I.index;return I.remainder===0?this.model.getLineIndentColumn(k+1):0}}e.SplitLinesCollection=u;class d{constructor(m,E){this.modelLineNumber=m,this.modelLineWrappedLineIdx=E}get isWrappedLineContinuation(){return this.modelLineWrappedLineIdx>0}}class a{constructor(m,E){this.modelRange=m,this.viewLines=E}}class r{constructor(){}isVisible(){return!0}setVisible(m){return m?this:o.INSTANCE}getLineBreakData(){return null}getViewLineCount(){return 1}getViewLineContent(m,E,I){return m.getLineContent(E)}getViewLineLength(m,E,I){return m.getLineLength(E)}getViewLineMinColumn(m,E,I){return m.getLineMinColumn(E)}getViewLineMaxColumn(m,E,I){return m.getLineMaxColumn(E)}getViewLineData(m,E,I){let k=m.getLineTokens(E),M=k.getLineContent();return new g.ViewLineData(M,!1,1,M.length+1,0,k.inflate(),null)}getViewLinesData(m,E,I,k,M,P,F){if(!P[M]){F[M]=null;return}F[M]=this.getViewLineData(m,E,0)}getModelColumnOfViewPosition(m,E){return E}getViewPositionOfModelPosition(m,E){return new T.Position(m,E)}getViewLineNumberOfModelPosition(m,E){return m}normalizePosition(m,E,I,k,M){return k}getInjectedTextAt(m,E){return null}}r.INSTANCE=new r;class o{constructor(){}isVisible(){return!1}setVisible(m){return m?r.INSTANCE:this}getLineBreakData(){return null}getViewLineCount(){return 0}getViewLineContent(m,E,I){throw new Error("Not supported")}getViewLineLength(m,E,I){throw new Error("Not supported")}getViewLineMinColumn(m,E,I){throw new Error("Not supported")}getViewLineMaxColumn(m,E,I){throw new Error("Not supported")}getViewLineData(m,E,I){throw new Error("Not supported")}getViewLinesData(m,E,I,k,M,P,F){throw new Error("Not supported")}getModelColumnOfViewPosition(m,E){throw new Error("Not supported")}getViewPositionOfModelPosition(m,E){throw new Error("Not supported")}getViewLineNumberOfModelPosition(m,E){throw new Error("Not supported")}normalizePosition(m,E,I,k,M){throw new Error("Not supported")}getInjectedTextAt(m,E){throw new Error("Not supported")}}o.INSTANCE=new o;class i{constructor(m,E){this._lineBreakData=m,this._isVisible=E}isVisible(){return this._isVisible}setVisible(m){return this._isVisible=m,this}getLineBreakData(){return this._lineBreakData}getViewLineCount(){return this._isVisible?this._lineBreakData.breakOffsets.length:0}getInputStartOffsetOfOutputLineIndex(m){return this._lineBreakData.getInputOffsetOfOutputPosition(m,0)}getInputEndOffsetOfOutputLineIndex(m,E,I){return I+1===this._lineBreakData.breakOffsets.length?m.getLineMaxColumn(E)-1:this._lineBreakData.getInputOffsetOfOutputPosition(I+1,0)}getViewLineContent(m,E,I){if(!this._isVisible)throw new Error("Not supported");const k=I>0?this._lineBreakData.breakOffsets[I-1]:0,M=I<this._lineBreakData.breakOffsets.length?this._lineBreakData.breakOffsets[I]:this._lineBreakData.breakOffsets[this._lineBreakData.breakOffsets.length-1];let P;if(this._lineBreakData.injectionOffsets!==null){const F=this._lineBreakData.injectionOffsets.map((R,A)=>new t.LineInjectedText(0,0,R+1,this._lineBreakData.injectionOptions[A],0));P=t.LineInjectedText.applyInjectedText(m.getLineContent(E),F).substring(k,M)}else P=m.getValueInRange({startLineNumber:E,startColumn:k+1,endLineNumber:E,endColumn:M+1});return I>0&&(P=h(this._lineBreakData.wrappedTextIndentLength)+P),P}getViewLineLength(m,E,I){if(!this._isVisible)throw new Error("Not supported");const k=I>0?this._lineBreakData.breakOffsets[I-1]:0;let P=(I<this._lineBreakData.breakOffsets.length?this._lineBreakData.breakOffsets[I]:this._lineBreakData.breakOffsets[this._lineBreakData.breakOffsets.length-1])-k;return I>0&&(P=this._lineBreakData.wrappedTextIndentLength+P),P}getViewLineMinColumn(m,E,I){if(!this._isVisible)throw new Error("Not supported");return this._getViewLineMinColumn(I)}_getViewLineMinColumn(m){return m>0?this._lineBreakData.wrappedTextIndentLength+1:1}getViewLineMaxColumn(m,E,I){if(!this._isVisible)throw new Error("Not supported");return this.getViewLineLength(m,E,I)+1}getViewLineData(m,E,I){if(!this._isVisible)throw new Error("Not supported");const k=this._lineBreakData,M=I>0?k.wrappedTextIndentLength:0,P=k.injectionOffsets,F=k.injectionOptions;let R,A,O;if(P){const H=m.getLineTokens(E).withInserted(P.map((se,oe)=>({offset:se,text:F[oe].content,tokenMetadata:N.LineTokens.defaultTokenMetadata}))),Y=I>0?k.breakOffsets[I-1]:0,X=k.breakOffsets[I];R=H.getLineContent().substring(Y,X),A=H.sliceAndInflate(Y,X,M),O=new Array;let Z=0;for(let se=0;se<P.length;se++){const oe=F[se].content.length,G=P[se]+Z,x=P[se]+Z+oe;if(G>X)break;if(Y<x){const U=F[se];if(U.inlineClassName){const $=I>0?k.wrappedTextIndentLength:0,V=$+Math.max(G-Y,0),Q=$+Math.min(x-Y,X);V!==Q&&O.push(new g.SingleLineInlineDecoration(V,Q,U.inlineClassName,U.inlineClassNameAffectsLetterSpacing))}}Z+=oe}}else{const H=this.getInputStartOffsetOfOutputLineIndex(I),Y=this.getInputEndOffsetOfOutputLineIndex(m,E,I),X=m.getLineTokens(E);R=m.getValueInRange({startLineNumber:E,startColumn:H+1,endLineNumber:E,endColumn:Y+1}),A=X.sliceAndInflate(H,Y,M),O=null}I>0&&(R=h(k.wrappedTextIndentLength)+R);const L=I>0?k.wrappedTextIndentLength+1:1,B=R.length+1,W=I+1<this.getViewLineCount(),K=I===0?0:k.breakOffsetsVisibleColumn[I-1];return new g.ViewLineData(R,W,L,B,K,A,O)}getViewLinesData(m,E,I,k,M,P,F){if(!this._isVisible)throw new Error("Not supported");for(let R=I;R<k;R++){let A=M+R-I;if(!P[A]){F[A]=null;continue}F[A]=this.getViewLineData(m,E,R)}}getModelColumnOfViewPosition(m,E){if(!this._isVisible)throw new Error("Not supported");let I=E-1;return m>0&&(I<this._lineBreakData.wrappedTextIndentLength?I=0:I-=this._lineBreakData.wrappedTextIndentLength),this._lineBreakData.getInputOffsetOfOutputPosition(m,I)+1}getViewPositionOfModelPosition(m,E,I=2){if(!this._isVisible)throw new Error("Not supported");let k=this._lineBreakData.getOutputPositionOfInputOffset(E-1,I),M=k.outputLineIndex,P=k.outputOffset+1;return M>0&&(P+=this._lineBreakData.wrappedTextIndentLength),new T.Position(m+M,P)}getViewLineNumberOfModelPosition(m,E){if(!this._isVisible)throw new Error("Not supported");const I=this._lineBreakData.getOutputPositionOfInputOffset(E-1);return m+I.outputLineIndex}normalizePosition(m,E,I,k,M){if(this._lineBreakData.injectionOffsets!==null){const P=k.lineNumber-I,F=this._lineBreakData.outputPositionToOffsetInUnwrappedLine(I,k.column-1),R=this._lineBreakData.normalizeOffsetAroundInjections(F,M);if(R!==F)return this._lineBreakData.getOutputPositionOfOffsetInUnwrappedLine(R,M).toPosition(P,this._lineBreakData.wrappedTextIndentLength)}if(M===0){if(I>0&&k.column===this._getViewLineMinColumn(I))return new T.Position(k.lineNumber-1,this.getViewLineMaxColumn(m,E,I-1))}else if(M===1){const P=this.getViewLineCount()-1;if(I<P&&k.column===this.getViewLineMaxColumn(m,E,I))return new T.Position(k.lineNumber+1,this._getViewLineMinColumn(I+1))}return k}getInjectedTextAt(m,E){return this._lineBreakData.getInjectedText(m,E-1)}}e.SplitLine=i;let l=[""];function h(v){if(v>=l.length)for(let m=1;m<=v;m++)l[m]=f(m);return l[v]}function f(v){return new Array(v+1).join(" ")}function y(v,m){return v===null?m?r.INSTANCE:o.INSTANCE:new i(v,m)}class _{constructor(m){this._lines=m}_validPosition(m){return this._lines.model.validatePosition(m)}_validRange(m){return this._lines.model.validateRange(m)}convertViewPositionToModelPosition(m){return this._validPosition(m)}convertViewRangeToModelRange(m){return this._validRange(m)}validateViewPosition(m,E){return this._validPosition(E)}validateViewRange(m,E){return this._validRange(E)}convertModelPositionToViewPosition(m){return this._validPosition(m)}convertModelRangeToViewRange(m){return this._validRange(m)}modelPositionIsVisible(m){const E=this._lines.model.getLineCount();return!(m.lineNumber<1||m.lineNumber>E)}getModelLineViewLineCount(m){return 1}getViewLineNumberOfModelPosition(m,E){return m}}e.IdentityCoordinatesConverter=_;class b{constructor(m){this.model=m}dispose(){}createCoordinatesConverter(){return new _(this)}getHiddenAreas(){return[]}setHiddenAreas(m){return!1}setTabSize(m){return!1}setWrappingSettings(m,E,I,k){return!1}createLineBreaksComputer(){let m=[];return{addRequest:(E,I,k)=>{m.push(null)},finalize:()=>m}}onModelFlushed(){}onModelLinesDeleted(m,E,I){return new C.ViewLinesDeletedEvent(E,I)}onModelLinesInserted(m,E,I,k){return new C.ViewLinesInsertedEvent(E,I)}onModelLineChanged(m,E,I){return[!1,new C.ViewLinesChangedEvent(E,E),null,null]}acceptVersionId(m){}getViewLineCount(){return this.model.getLineCount()}getActiveIndentGuide(m,E,I){return{startLineNumber:m,endLineNumber:m,indent:0}}getViewLinesBracketGuides(m,E,I){return new Array(E-m+1).fill([])}getViewLinesIndentGuides(m,E){const I=E-m+1;let k=new Array(I);for(let M=0;M<I;M++)k[M]=0;return k}getViewLineContent(m){return this.model.getLineContent(m)}getViewLineLength(m){return this.model.getLineLength(m)}getViewLineMinColumn(m){return this.model.getLineMinColumn(m)}getViewLineMaxColumn(m){return this.model.getLineMaxColumn(m)}getViewLineData(m){let E=this.model.getLineTokens(m),I=E.getLineContent();return new g.ViewLineData(I,!1,1,I.length+1,0,E.inflate(),null)}getViewLinesData(m,E,I){const k=this.model.getLineCount();m=Math.min(Math.max(1,m),k),E=Math.min(Math.max(1,E),k);let M=[];for(let P=m;P<=E;P++){let F=P-m;I[F]||(M[F]=null),M[F]=this.getViewLineData(P)}return M}getDecorationsInRange(m,E,I){return this.model.getDecorationsInRange(m,E,I)}normalizePosition(m,E){return this.model.normalizePosition(m,E)}getLineIndentColumn(m){return this.model.getLineIndentColumn(m)}getInjectedTextAt(m){return null}}e.IdentityLinesCollection=b}),define(J[668],ee([0,1,29,2,8,31,13,3,99,18,254,255,180,419,667,60,476,14,17,279,43,182,127]),function(j,e,w,N,T,D,S,p,C,n,g,t,s,c,u,d,a,r,o,i,l,h,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ViewModel=void 0;const y=!0;class _ extends N.Disposable{constructor(m,E,I,k,M,P){super();if(this._editorId=m,this._configuration=E,this.model=I,this._eventDispatcher=new h.ViewModelEventDispatcher,this.onEvent=this._eventDispatcher.onEvent,this.cursorConfig=new l.CursorConfiguration(this.model.getLanguageId(),this.model.getOptions(),this._configuration),this._tokenizeViewportSoon=this._register(new r.RunOnceScheduler(()=>this.tokenizeViewport(),50)),this._updateConfigurationViewLineCount=this._register(new r.RunOnceScheduler(()=>this._updateConfigurationViewLineCountNow(),0)),this._hasFocus=!1,this._viewportStartLine=-1,this._viewportStartLineTrackedRange=null,this._viewportStartLineDelta=0,y&&this.model.isTooLargeForTokenization())this._lines=new u.IdentityLinesCollection(this.model);else{const F=this._configuration.options,R=F.get(43),A=F.get(123),O=F.get(130),L=F.get(122);this._lines=new u.SplitLinesCollection(this._editorId,this.model,k,M,R,this.model.getOptions().tabSize,A,O.wrappingColumn,L)}this.coordinatesConverter=this._lines.createCoordinatesConverter(),this._cursor=this._register(new i.CursorsController(I,this,this.coordinatesConverter,this.cursorConfig)),this.viewLayout=this._register(new c.ViewLayout(this._configuration,this.getLineCount(),P)),this._register(this.viewLayout.onDidScroll(F=>{F.scrollTopChanged&&this._tokenizeViewportSoon.schedule(),this._eventDispatcher.emitSingleViewEvent(new s.ViewScrollChangedEvent(F)),this._eventDispatcher.emitOutgoingEvent(new h.ScrollChangedEvent(F.oldScrollWidth,F.oldScrollLeft,F.oldScrollHeight,F.oldScrollTop,F.scrollWidth,F.scrollLeft,F.scrollHeight,F.scrollTop))})),this._register(this.viewLayout.onDidContentSizeChange(F=>{this._eventDispatcher.emitOutgoingEvent(F)})),this._decorations=new a.ViewModelDecorations(this._editorId,this.model,this._configuration,this._lines,this.coordinatesConverter),this._registerModelEvents(),this._register(this._configuration.onDidChangeFast(F=>{try{const R=this._eventDispatcher.beginEmitViewEvents();this._onConfigurationChanged(R,F)}finally{this._eventDispatcher.endEmitViewEvents()}})),this._register(t.MinimapTokensColorTracker.getInstance().onDidChange(()=>{this._eventDispatcher.emitSingleViewEvent(new s.ViewTokensColorsChangedEvent)})),this._updateConfigurationViewLineCountNow()}dispose(){super.dispose(),this._decorations.dispose(),this._lines.dispose(),this.invalidateMinimapColorCache(),this._viewportStartLineTrackedRange=this.model._setTrackedRange(this._viewportStartLineTrackedRange,null,1),this._eventDispatcher.dispose()}createLineBreaksComputer(){return this._lines.createLineBreaksComputer()}addViewEventHandler(m){this._eventDispatcher.addViewEventHandler(m)}removeViewEventHandler(m){this._eventDispatcher.removeViewEventHandler(m)}_updateConfigurationViewLineCountNow(){this._configuration.setViewLineCount(this._lines.getViewLineCount())}tokenizeViewport(){const m=this.viewLayout.getLinesViewportData(),E=new p.Range(m.startLineNumber,this.getLineMinColumn(m.startLineNumber),m.endLineNumber,this.getLineMaxColumn(m.endLineNumber)),I=this._toModelVisibleRanges(E);for(const k of I)this.model.tokenizeViewport(k.startLineNumber,k.endLineNumber)}setHasFocus(m){this._hasFocus=m,this._cursor.setHasFocus(m),this._eventDispatcher.emitSingleViewEvent(new s.ViewFocusChangedEvent(m)),this._eventDispatcher.emitOutgoingEvent(new h.FocusChangedEvent(!m,m))}onCompositionStart(){this._eventDispatcher.emitSingleViewEvent(new s.ViewCompositionStartEvent)}onCompositionEnd(){this._eventDispatcher.emitSingleViewEvent(new s.ViewCompositionEndEvent)}onDidColorThemeChange(){this._eventDispatcher.emitSingleViewEvent(new s.ViewThemeChangedEvent)}_onConfigurationChanged(m,E){let I=null;if(this._viewportStartLine!==-1){let O=new S.Position(this._viewportStartLine,this.getLineMinColumn(this._viewportStartLine));I=this.coordinatesConverter.convertViewPositionToModelPosition(O)}let k=!1;const M=this._configuration.options,P=M.get(43),F=M.get(123),R=M.get(130),A=M.get(122);if(this._lines.setWrappingSettings(P,F,R.wrappingColumn,A)&&(m.emitViewEvent(new s.ViewFlushedEvent),m.emitViewEvent(new s.ViewLineMappingChangedEvent),m.emitViewEvent(new s.ViewDecorationsChangedEvent(null)),this._cursor.onLineMappingChanged(m),this._decorations.onLineMappingChanged(),this.viewLayout.onFlushed(this.getLineCount()),this.viewLayout.getCurrentScrollTop()!==0&&(k=!0),this._updateConfigurationViewLineCount.schedule()),E.hasChanged(80)&&(this._decorations.reset(),m.emitViewEvent(new s.ViewDecorationsChangedEvent(null))),m.emitViewEvent(new s.ViewConfigurationChangedEvent(E)),this.viewLayout.onConfigurationChanged(E),k&&I){const O=this.coordinatesConverter.convertModelPositionToViewPosition(I),L=this.viewLayout.getVerticalOffsetForLineNumber(O.lineNumber);this.viewLayout.setScrollPosition({scrollTop:L+this._viewportStartLineDelta},1)}l.CursorConfiguration.shouldRecreate(E)&&(this.cursorConfig=new l.CursorConfiguration(this.model.getLanguageId(),this.model.getOptions(),this._configuration),this._cursor.updateConfiguration(this.cursorConfig))}_registerModelEvents(){this._register(this.model.onDidChangeContentOrInjectedText(m=>{try{const E=this._eventDispatcher.beginEmitViewEvents();let I=!1,k=!1;const M=m.changes,P=m instanceof C.ModelRawContentChangedEvent?m.versionId:null,F=this._lines.createLineBreaksComputer();for(const O of M)switch(O.changeType){case 4:{for(let L=0;L<O.detail.length;L++){const B=O.detail[L];let W=O.injectedTexts[L];W&&(W=W.filter(K=>!K.ownerId||K.ownerId===this._editorId)),F.addRequest(B,W,null)}break}case 2:{let L=null;O.injectedText&&(L=O.injectedText.filter(B=>!B.ownerId||B.ownerId===this._editorId)),F.addRequest(O.detail,L,null);break}}const R=F.finalize();let A=0;for(const O of M)switch(O.changeType){case 1:{this._lines.onModelFlushed(),E.emitViewEvent(new s.ViewFlushedEvent),this._decorations.reset(),this.viewLayout.onFlushed(this.getLineCount()),I=!0;break}case 3:{const L=this._lines.onModelLinesDeleted(P,O.fromLineNumber,O.toLineNumber);L!==null&&(E.emitViewEvent(L),this.viewLayout.onLinesDeleted(L.fromLineNumber,L.toLineNumber)),I=!0;break}case 4:{const L=R.slice(A,A+O.detail.length);A+=O.detail.length;const B=this._lines.onModelLinesInserted(P,O.fromLineNumber,O.toLineNumber,L);B!==null&&(E.emitViewEvent(B),this.viewLayout.onLinesInserted(B.fromLineNumber,B.toLineNumber)),I=!0;break}case 2:{const L=R[A];A++;const[B,W,K,H]=this._lines.onModelLineChanged(P,O.lineNumber,L);k=B,W&&E.emitViewEvent(W),K&&(E.emitViewEvent(K),this.viewLayout.onLinesInserted(K.fromLineNumber,K.toLineNumber)),H&&(E.emitViewEvent(H),this.viewLayout.onLinesDeleted(H.fromLineNumber,H.toLineNumber));break}case 5:break}P!==null&&this._lines.acceptVersionId(P),this.viewLayout.onHeightMaybeChanged(),!I&&k&&(E.emitViewEvent(new s.ViewLineMappingChangedEvent),E.emitViewEvent(new s.ViewDecorationsChangedEvent(null)),this._cursor.onLineMappingChanged(E),this._decorations.onLineMappingChanged())}finally{this._eventDispatcher.endEmitViewEvents()}if(this._viewportStartLine=-1,this._configuration.setMaxLineNumber(this.model.getLineCount()),this._updateConfigurationViewLineCountNow(),!this._hasFocus&&this.model.getAttachedEditorCount()>=2&&this._viewportStartLineTrackedRange){const E=this.model._getTrackedRange(this._viewportStartLineTrackedRange);if(E){const I=this.coordinatesConverter.convertModelPositionToViewPosition(E.getStartPosition()),k=this.viewLayout.getVerticalOffsetForLineNumber(I.lineNumber);this.viewLayout.setScrollPosition({scrollTop:k+this._viewportStartLineDelta},1)}}try{const E=this._eventDispatcher.beginEmitViewEvents();this._cursor.onModelContentChanged(E,m)}finally{this._eventDispatcher.endEmitViewEvents()}})),this._register(this.model.onDidChangeTokens(m=>{let E=[];for(let I=0,k=m.ranges.length;I<k;I++){const M=m.ranges[I],P=this.coordinatesConverter.convertModelPositionToViewPosition(new S.Position(M.fromLineNumber,1)).lineNumber,F=this.coordinatesConverter.convertModelPositionToViewPosition(new S.Position(M.toLineNumber,this.model.getLineMaxColumn(M.toLineNumber))).lineNumber;E[I]={fromLineNumber:P,toLineNumber:F}}this._eventDispatcher.emitSingleViewEvent(new s.ViewTokensChangedEvent(E)),m.tokenizationSupportChanged&&this._tokenizeViewportSoon.schedule()})),this._register(this.model.onDidChangeLanguageConfiguration(m=>{this._eventDispatcher.emitSingleViewEvent(new s.ViewLanguageConfigurationEvent),this.cursorConfig=new l.CursorConfiguration(this.model.getLanguageId(),this.model.getOptions(),this._configuration),this._cursor.updateConfiguration(this.cursorConfig)})),this._register(this.model.onDidChangeLanguage(m=>{this.cursorConfig=new l.CursorConfiguration(this.model.getLanguageId(),this.model.getOptions(),this._configuration),this._cursor.updateConfiguration(this.cursorConfig)})),this._register(this.model.onDidChangeOptions(m=>{if(this._lines.setTabSize(this.model.getOptions().tabSize)){try{const E=this._eventDispatcher.beginEmitViewEvents();E.emitViewEvent(new s.ViewFlushedEvent),E.emitViewEvent(new s.ViewLineMappingChangedEvent),E.emitViewEvent(new s.ViewDecorationsChangedEvent(null)),this._cursor.onLineMappingChanged(E),this._decorations.onLineMappingChanged(),this.viewLayout.onFlushed(this.getLineCount())}finally{this._eventDispatcher.endEmitViewEvents()}this._updateConfigurationViewLineCount.schedule()}this.cursorConfig=new l.CursorConfiguration(this.model.getLanguageId(),this.model.getOptions(),this._configuration),this._cursor.updateConfiguration(this.cursorConfig)})),this._register(this.model.onDidChangeDecorations(m=>{this._decorations.onModelDecorationsChanged(),this._eventDispatcher.emitSingleViewEvent(new s.ViewDecorationsChangedEvent(m))}))}setHiddenAreas(m){let E=!1;try{const I=this._eventDispatcher.beginEmitViewEvents();E=this._lines.setHiddenAreas(m),E&&(I.emitViewEvent(new s.ViewFlushedEvent),I.emitViewEvent(new s.ViewLineMappingChangedEvent),I.emitViewEvent(new s.ViewDecorationsChangedEvent(null)),this._cursor.onLineMappingChanged(I),this._decorations.onLineMappingChanged(),this.viewLayout.onFlushed(this.getLineCount()),this.viewLayout.onHeightMaybeChanged())}finally{this._eventDispatcher.endEmitViewEvents()}this._updateConfigurationViewLineCount.schedule(),E&&this._eventDispatcher.emitOutgoingEvent(new h.ViewZonesChangedEvent)}getVisibleRangesPlusViewportAboveBelow(){const m=this._configuration.options.get(129),E=this._configuration.options.get(58),I=Math.max(20,Math.round(m.height/E)),k=this.viewLayout.getLinesViewportData(),M=Math.max(1,k.completelyVisibleStartLineNumber-I),P=Math.min(this.getLineCount(),k.completelyVisibleEndLineNumber+I);return this._toModelVisibleRanges(new p.Range(M,this.getLineMinColumn(M),P,this.getLineMaxColumn(P)))}getVisibleRanges(){const m=this.getCompletelyVisibleViewRange();return this._toModelVisibleRanges(m)}_toModelVisibleRanges(m){const E=this.coordinatesConverter.convertViewRangeToModelRange(m),I=this._lines.getHiddenAreas();if(I.length===0)return[E];let k=[],M=0,P=E.startLineNumber,F=E.startColumn,R=E.endLineNumber,A=E.endColumn;for(let O=0,L=I.length;O<L;O++){const B=I[O].startLineNumber,W=I[O].endLineNumber;W<P||B>R||(P<B&&(k[M++]=new p.Range(P,F,B-1,this.model.getLineMaxColumn(B-1))),P=W+1,F=1)}return(P<R||P===R&&F<A)&&(k[M++]=new p.Range(P,F,R,A)),k}getCompletelyVisibleViewRange(){const m=this.viewLayout.getLinesViewportData(),E=m.completelyVisibleStartLineNumber,I=m.completelyVisibleEndLineNumber;return new p.Range(E,this.getLineMinColumn(E),I,this.getLineMaxColumn(I))}getCompletelyVisibleViewRangeAtScrollTop(m){const E=this.viewLayout.getLinesViewportDataAtScrollTop(m),I=E.completelyVisibleStartLineNumber,k=E.completelyVisibleEndLineNumber;return new p.Range(I,this.getLineMinColumn(I),k,this.getLineMaxColumn(k))}saveState(){const m=this.viewLayout.saveState(),E=m.scrollTop,I=this.viewLayout.getLineNumberAtVerticalOffset(E),k=this.coordinatesConverter.convertViewPositionToModelPosition(new S.Position(I,this.getLineMinColumn(I))),M=this.viewLayout.getVerticalOffsetForLineNumber(I)-E;return{scrollLeft:m.scrollLeft,firstPosition:k,firstPositionDeltaTop:M}}reduceRestoreState(m){if(typeof m.firstPosition=="undefined")return this._reduceRestoreStateCompatibility(m);const E=this.model.validatePosition(m.firstPosition),I=this.coordinatesConverter.convertModelPositionToViewPosition(E),k=this.viewLayout.getVerticalOffsetForLineNumber(I.lineNumber)-m.firstPositionDeltaTop;return{scrollLeft:m.scrollLeft,scrollTop:k}}_reduceRestoreStateCompatibility(m){return{scrollLeft:m.scrollLeft,scrollTop:m.scrollTopWithoutViewZones}}getTabSize(){return this.model.getOptions().tabSize}getTextModelOptions(){return this.model.getOptions()}getLineCount(){return this._lines.getViewLineCount()}setViewport(m,E,I){this._viewportStartLine=m;let k=this.coordinatesConverter.convertViewPositionToModelPosition(new S.Position(m,this.getLineMinColumn(m)));this._viewportStartLineTrackedRange=this.model._setTrackedRange(this._viewportStartLineTrackedRange,new p.Range(k.lineNumber,k.column,k.lineNumber,k.column),1);const M=this.viewLayout.getVerticalOffsetForLineNumber(m),P=this.viewLayout.getCurrentScrollTop();this._viewportStartLineDelta=P-M}getActiveIndentGuide(m,E,I){return this._lines.getActiveIndentGuide(m,E,I)}getLinesIndentGuides(m,E){return this._lines.getViewLinesIndentGuides(m,E)}getBracketGuidesInRangeByLine(m,E,I,k){return this._lines.getViewLinesBracketGuides(m,E,I,k)}getLineContent(m){return this._lines.getViewLineContent(m)}getLineLength(m){return this._lines.getViewLineLength(m)}getLineMinColumn(m){return this._lines.getViewLineMinColumn(m)}getLineMaxColumn(m){return this._lines.getViewLineMaxColumn(m)}getLineFirstNonWhitespaceColumn(m){const E=T.firstNonWhitespaceIndex(this.getLineContent(m));return E===-1?0:E+1}getLineLastNonWhitespaceColumn(m){const E=T.lastNonWhitespaceIndex(this.getLineContent(m));return E===-1?0:E+2}getDecorationsInViewport(m){return this._decorations.getDecorationsViewportData(m).decorations}getInjectedTextAt(m){return this._lines.getInjectedTextAt(m)}getViewLineRenderingData(m,E){let I=this.model.mightContainRTL(),k=this.model.mightContainNonBasicASCII(),M=this.getTabSize(),P=this._lines.getViewLineData(E),R=this._decorations.getDecorationsViewportData(m).inlineDecorations[E-m.startLineNumber];return P.inlineDecorations&&(R=[...R,...P.inlineDecorations.map(A=>A.toInlineDecoration(E))]),new d.ViewLineRenderingData(P.minColumn,P.maxColumn,P.content,P.continuesWithWrappedLine,I,k,P.tokens,R,M,P.startVisibleColumn)}getViewLineData(m){return this._lines.getViewLineData(m)}getMinimapLinesRenderingData(m,E,I){let k=this._lines.getViewLinesData(m,E,I);return new d.MinimapLinesRenderingData(this.getTabSize(),k)}getAllOverviewRulerDecorations(m){const E=this.model.getOverviewRulerDecorations(this._editorId,(0,D.filterValidationDecorations)(this._configuration.options)),I=new b;for(const k of E){const M=k.options,P=M.overviewRuler;if(!P)continue;const F=P.position;if(F===0)continue;const R=P.getColor(m),A=this.coordinatesConverter.getViewLineNumberOfModelPosition(k.range.startLineNumber,k.range.startColumn),O=this.coordinatesConverter.getViewLineNumberOfModelPosition(k.range.endLineNumber,k.range.endColumn);I.accept(R,M.zIndex,A,O,F)}return I.asArray}invalidateOverviewRulerColorCache(){const m=this.model.getOverviewRulerDecorations();for(const E of m){const I=E.options.overviewRuler;I&&I.invalidateCachedColor()}}invalidateMinimapColorCache(){const m=this.model.getAllDecorations();for(const E of m){const I=E.options.minimap;I&&I.invalidateCachedColor()}}getValueInRange(m,E){const I=this.coordinatesConverter.convertViewRangeToModelRange(m);return this.model.getValueInRange(I,E)}getModelLineMaxColumn(m){return this.model.getLineMaxColumn(m)}validateModelPosition(m){return this.model.validatePosition(m)}validateModelRange(m){return this.model.validateRange(m)}deduceModelPositionRelativeToViewPosition(m,E,I){const k=this.coordinatesConverter.convertViewPositionToModelPosition(m);this.model.getEOL().length===2&&(E<0?E-=I:E+=I);const P=this.model.getOffsetAt(k)+E;return this.model.getPositionAt(P)}getEOL(){return this.model.getEOL()}getPlainTextToCopy(m,E,I){const k=I?`\r
`:this.model.getEOL();m=m.slice(0),m.sort(p.Range.compareRangesUsingStarts);let M=!1,P=!1;for(const R of m)R.isEmpty()?M=!0:P=!0;if(!P){if(!E)return"";const R=m.map(O=>O.startLineNumber);let A="";for(let O=0;O<R.length;O++)O>0&&R[O-1]===R[O]||(A+=this.model.getLineContent(R[O])+k);return A}if(M&&E){let R=[],A=0;for(const O of m){const L=O.startLineNumber;O.isEmpty()?L!==A&&R.push(this.model.getLineContent(L)):R.push(this.model.getValueInRange(O,I?2:0)),A=L}return R.length===1?R[0]:R}let F=[];for(const R of m)R.isEmpty()||F.push(this.model.getValueInRange(R,I?2:0));return F.length===1?F[0]:F}getRichTextToCopy(m,E){const I=this.model.getLanguageId();if(I===f.PLAINTEXT_MODE_ID||m.length!==1)return null;let k=m[0];if(k.isEmpty()){if(!E)return null;const O=k.startLineNumber;k=new p.Range(O,this.model.getLineMinColumn(O),O,this.model.getLineMaxColumn(O))}const M=this._configuration.options.get(43),P=this._getColorMap(),R=/[:;\\\/<>]/.test(M.fontFamily)||M.fontFamily===D.EDITOR_FONT_DEFAULTS.fontFamily;let A;return R?A=D.EDITOR_FONT_DEFAULTS.fontFamily:(A=M.fontFamily,A=A.replace(/"/g,"'"),/[,']/.test(A)||/[+ ]/.test(A)&&(A=`'${A}'`),A=`${A}, ${D.EDITOR_FONT_DEFAULTS.fontFamily}`),{mode:I,html:`<div style="color: ${P[1]};background-color: ${P[2]};font-family: ${A};font-weight: ${M.fontWeight};font-size: ${M.fontSize}px;line-height: ${M.lineHeight}px;white-space: pre;">`+this._getHTMLToCopy(k,P)+"</div>"}}_getHTMLToCopy(m,E){const I=m.startLineNumber,k=m.startColumn,M=m.endLineNumber,P=m.endColumn,F=this.getTabSize();let R="";for(let A=I;A<=M;A++){const O=this.model.getLineTokens(A),L=O.getLineContent(),B=A===I?k-1:0,W=A===M?P-1:L.length;L===""?R+="<br>":R+=(0,g.tokenizeLineToHTML)(L,O.inflate(),E,B,W,F,o.isWindows)}return R}_getColorMap(){let m=n.TokenizationRegistry.getColorMap(),E=["#000000"];if(m)for(let I=1,k=m.length;I<k;I++)E[I]=w.Color.Format.CSS.formatHex(m[I]);return E}pushStackElement(){this.model.pushStackElement()}getPrimaryCursorState(){return this._cursor.getPrimaryCursorState()}getLastAddedCursorIndex(){return this._cursor.getLastAddedCursorIndex()}getCursorStates(){return this._cursor.getCursorStates()}setCursorStates(m,E,I){this._withViewEventsCollector(k=>this._cursor.setStates(k,m,E,I))}getCursorColumnSelectData(){return this._cursor.getCursorColumnSelectData()}getCursorAutoClosedCharacters(){return this._cursor.getAutoClosedCharacters()}setCursorColumnSelectData(m){this._cursor.setCursorColumnSelectData(m)}getPrevEditOperationType(){return this._cursor.getPrevEditOperationType()}setPrevEditOperationType(m){this._cursor.setPrevEditOperationType(m)}getSelection(){return this._cursor.getSelection()}getSelections(){return this._cursor.getSelections()}getPosition(){return this._cursor.getPrimaryCursorState().modelState.position}setSelections(m,E,I=0){this._withViewEventsCollector(k=>this._cursor.setSelections(k,m,E,I))}saveCursorState(){return this._cursor.saveState()}restoreCursorState(m){this._withViewEventsCollector(E=>this._cursor.restoreState(E,m))}_executeCursorEdit(m){if(this._cursor.context.cursorConfig.readOnly){this._eventDispatcher.emitOutgoingEvent(new h.ReadOnlyEditAttemptEvent);return}this._withViewEventsCollector(m)}executeEdits(m,E,I){this._executeCursorEdit(k=>this._cursor.executeEdits(k,m,E,I))}startComposition(){this._cursor.setIsDoingComposition(!0),this._executeCursorEdit(m=>this._cursor.startComposition(m))}endComposition(m){this._cursor.setIsDoingComposition(!1),this._executeCursorEdit(E=>this._cursor.endComposition(E,m))}type(m,E){this._executeCursorEdit(I=>this._cursor.type(I,m,E))}compositionType(m,E,I,k,M){this._executeCursorEdit(P=>this._cursor.compositionType(P,m,E,I,k,M))}paste(m,E,I,k){this._executeCursorEdit(M=>this._cursor.paste(M,m,E,I,k))}cut(m){this._executeCursorEdit(E=>this._cursor.cut(E,m))}executeCommand(m,E){this._executeCursorEdit(I=>this._cursor.executeCommand(I,m,E))}executeCommands(m,E){this._executeCursorEdit(I=>this._cursor.executeCommands(I,m,E))}revealPrimaryCursor(m,E){this._withViewEventsCollector(I=>this._cursor.revealPrimary(I,m,E,0))}revealTopMostCursor(m){const E=this._cursor.getTopMostViewPosition(),I=new p.Range(E.lineNumber,E.column,E.lineNumber,E.column);this._withViewEventsCollector(k=>k.emitViewEvent(new s.ViewRevealRangeRequestEvent(m,I,null,0,!0,0)))}revealBottomMostCursor(m){const E=this._cursor.getBottomMostViewPosition(),I=new p.Range(E.lineNumber,E.column,E.lineNumber,E.column);this._withViewEventsCollector(k=>k.emitViewEvent(new s.ViewRevealRangeRequestEvent(m,I,null,0,!0,0)))}revealRange(m,E,I,k,M){this._withViewEventsCollector(P=>P.emitViewEvent(new s.ViewRevealRangeRequestEvent(m,I,null,k,E,M)))}getVerticalOffsetForLineNumber(m){return this.viewLayout.getVerticalOffsetForLineNumber(m)}getScrollTop(){return this.viewLayout.getCurrentScrollTop()}setScrollTop(m,E){this.viewLayout.setScrollPosition({scrollTop:m},E)}setScrollPosition(m,E){this.viewLayout.setScrollPosition(m,E)}deltaScrollNow(m,E){this.viewLayout.deltaScrollNow(m,E)}changeWhitespace(m){this.viewLayout.changeWhitespace(m)&&(this._eventDispatcher.emitSingleViewEvent(new s.ViewZonesChangedEvent),this._eventDispatcher.emitOutgoingEvent(new h.ViewZonesChangedEvent))}setMaxLineWidth(m){this.viewLayout.setMaxLineWidth(m)}_withViewEventsCollector(m){try{const E=this._eventDispatcher.beginEmitViewEvents();m(E)}finally{this._eventDispatcher.endEmitViewEvents()}}normalizePosition(m,E){return this._lines.normalizePosition(m,E)}getLineIndentColumn(m){return this._lines.getLineIndentColumn(m)}}e.ViewModel=_;class b{constructor(){this._asMap=Object.create(null),this.asArray=[]}accept(m,E,I,k,M){const P=this._asMap[m];if(P){const F=P.data,R=F[F.length-3],A=F[F.length-1];if(R===M&&A+1>=I){k>A&&(F[F.length-1]=k);return}F.push(M,I,k)}else{const F=new d.OverviewRulerDecorationsGroup(m,E,[M,I,k]);this._asMap[m]=F,this.asArray.push(F)}}}}),define(J[157],ee([0,1,468,7,11,4,2,48,63,16,28,664,277,31,279,43,13,3,22,228,113,25,18,46,21,668,26,15,9,150,36,10,61,20,418,580,155,620,353]),function(j,e,w,N,T,D,S,p,C,n,g,t,s,c,u,d,a,r,o,i,l,h,f,y,_,b,v,m,E,I,k,M,P,F,R,A,O){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EditorModeContext=e.BooleanEventEmitter=e.CodeEditorWidget=void 0;let L=0;class B{constructor(V,Q,ue,pe,fe){this.model=V,this.viewModel=Q,this.view=ue,this.hasRealView=pe,this.listenersToRemove=fe}dispose(){(0,S.dispose)(this.listenersToRemove),this.model.onBeforeDetached(),this.hasRealView&&this.view.dispose(),this.viewModel.dispose()}}let W=class Pt extends S.Disposable{constructor(V,Q,ue,pe,fe,re,ie,ae,q,ne){super();this._onDidDispose=this._register(new D.Emitter),this.onDidDispose=this._onDidDispose.event,this._onDidChangeModelContent=this._register(new D.Emitter),this.onDidChangeModelContent=this._onDidChangeModelContent.event,this._onDidChangeModelLanguage=this._register(new D.Emitter),this.onDidChangeModelLanguage=this._onDidChangeModelLanguage.event,this._onDidChangeModelLanguageConfiguration=this._register(new D.Emitter),this.onDidChangeModelLanguageConfiguration=this._onDidChangeModelLanguageConfiguration.event,this._onDidChangeModelOptions=this._register(new D.Emitter),this.onDidChangeModelOptions=this._onDidChangeModelOptions.event,this._onDidChangeModelDecorations=this._register(new D.Emitter),this.onDidChangeModelDecorations=this._onDidChangeModelDecorations.event,this._onDidChangeConfiguration=this._register(new D.Emitter),this.onDidChangeConfiguration=this._onDidChangeConfiguration.event,this._onDidChangeModel=this._register(new D.Emitter),this.onDidChangeModel=this._onDidChangeModel.event,this._onDidChangeCursorPosition=this._register(new D.Emitter),this.onDidChangeCursorPosition=this._onDidChangeCursorPosition.event,this._onDidChangeCursorSelection=this._register(new D.Emitter),this.onDidChangeCursorSelection=this._onDidChangeCursorSelection.event,this._onDidAttemptReadOnlyEdit=this._register(new D.Emitter),this.onDidAttemptReadOnlyEdit=this._onDidAttemptReadOnlyEdit.event,this._onDidLayoutChange=this._register(new D.Emitter),this.onDidLayoutChange=this._onDidLayoutChange.event,this._editorTextFocus=this._register(new K),this.onDidFocusEditorText=this._editorTextFocus.onDidChangeToTrue,this.onDidBlurEditorText=this._editorTextFocus.onDidChangeToFalse,this._editorWidgetFocus=this._register(new K),this.onDidFocusEditorWidget=this._editorWidgetFocus.onDidChangeToTrue,this.onDidBlurEditorWidget=this._editorWidgetFocus.onDidChangeToFalse,this._onWillType=this._register(new D.Emitter),this.onWillType=this._onWillType.event,this._onDidType=this._register(new D.Emitter),this.onDidType=this._onDidType.event,this._onDidCompositionStart=this._register(new D.Emitter),this.onDidCompositionStart=this._onDidCompositionStart.event,this._onDidCompositionEnd=this._register(new D.Emitter),this.onDidCompositionEnd=this._onDidCompositionEnd.event,this._onDidPaste=this._register(new D.Emitter),this.onDidPaste=this._onDidPaste.event,this._onMouseUp=this._register(new D.Emitter),this.onMouseUp=this._onMouseUp.event,this._onMouseDown=this._register(new D.Emitter),this.onMouseDown=this._onMouseDown.event,this._onMouseDrag=this._register(new D.Emitter),this.onMouseDrag=this._onMouseDrag.event,this._onMouseDrop=this._register(new D.Emitter),this.onMouseDrop=this._onMouseDrop.event,this._onMouseDropCanceled=this._register(new D.Emitter),this.onMouseDropCanceled=this._onMouseDropCanceled.event,this._onContextMenu=this._register(new D.Emitter),this.onContextMenu=this._onContextMenu.event,this._onMouseMove=this._register(new D.Emitter),this.onMouseMove=this._onMouseMove.event,this._onMouseLeave=this._register(new D.Emitter),this.onMouseLeave=this._onMouseLeave.event,this._onMouseWheel=this._register(new D.Emitter),this.onMouseWheel=this._onMouseWheel.event,this._onKeyUp=this._register(new D.Emitter),this.onKeyUp=this._onKeyUp.event,this._onKeyDown=this._register(new D.Emitter),this.onKeyDown=this._onKeyDown.event,this._onDidContentSizeChange=this._register(new D.Emitter),this.onDidContentSizeChange=this._onDidContentSizeChange.event,this._onDidScrollChange=this._register(new D.Emitter),this.onDidScrollChange=this._onDidScrollChange.event,this._onDidChangeViewZones=this._register(new D.Emitter),this.onDidChangeViewZones=this._onDidChangeViewZones.event,this._onDidChangeHiddenAreas=this._register(new D.Emitter),this.onDidChangeHiddenAreas=this._onDidChangeHiddenAreas.event;const ce=Object.assign({},Q);this._domElement=V,this._overflowWidgetsDomNode=ce.overflowWidgetsDomNode,delete ce.overflowWidgetsDomNode,this._id=++L,this._decorationTypeKeysToIds={},this._decorationTypeSubtypes={},this.isSimpleWidget=ue.isSimpleWidget||!1,this._telemetryData=ue.telemetryData,this._configuration=this._register(this._createConfiguration(ce,ne)),this._register(this._configuration.onDidChange(de=>{this._onDidChangeConfiguration.fire(de);const z=this._configuration.options;if(de.hasChanged(129)){const te=z.get(129);this._onDidLayoutChange.fire(te)}})),this._contextKeyService=this._register(ie.createScoped(this._domElement)),this._notificationService=q,this._codeEditorService=fe,this._commandService=re,this._themeService=ae,this._register(new H(this,this._contextKeyService)),this._register(new Y(this,this._contextKeyService)),this._instantiationService=pe.createChild(new I.ServiceCollection([m.IContextKeyService,this._contextKeyService])),this._modelData=null,this._contributions={},this._actions={},this._focusTracker=new X(V),this._register(this._focusTracker.onChange(()=>{this._editorWidgetFocus.setValue(this._focusTracker.hasFocus())})),this._contentWidgets={},this._overlayWidgets={};let le;Array.isArray(ue.contributions)?le=ue.contributions:le=n.EditorExtensionsRegistry.getEditorContributions();for(const de of le){if(this._contributions[de.id]){(0,T.onUnexpectedError)(new Error(`Cannot have two contributions with the same id ${de.id}`));continue}try{const z=this._instantiationService.createInstance(de.ctor,this);this._contributions[de.id]=z}catch(z){(0,T.onUnexpectedError)(z)}}n.EditorExtensionsRegistry.getEditorActions().forEach(de=>{if(this._actions[de.id]){(0,T.onUnexpectedError)(new Error(`Cannot have two actions with the same id ${de.id}`));return}const z=new i.InternalEditorAction(de.id,de.label,de.alias,(0,F.withNullAsUndefined)(de.precondition),()=>this._instantiationService.invokeFunction(te=>Promise.resolve(de.runEditorCommand(te,this,null))),this._contextKeyService);this._actions[z.id]=z}),this._codeEditorService.addCodeEditor(this)}_createConfiguration(V,Q){return new C.Configuration(this.isSimpleWidget,V,this._domElement,Q)}getId(){return this.getEditorType()+":"+this._id}getEditorType(){return l.EditorType.ICodeEditor}dispose(){this._codeEditorService.removeCodeEditor(this),this._focusTracker.dispose();const V=Object.keys(this._contributions);for(let Q=0,ue=V.length;Q<ue;Q++){const pe=V[Q];this._contributions[pe].dispose()}this._contributions={},this._actions={},this._contentWidgets={},this._overlayWidgets={},this._removeDecorationTypes(),this._postDetachModelCleanup(this._detachModel()),this._onDidDispose.fire(),super.dispose()}invokeWithinContext(V){return this._instantiationService.invokeFunction(V)}updateOptions(V){this._configuration.updateOptions(V)}getOptions(){return this._configuration.options}getOption(V){return this._configuration.options.get(V)}getRawOptions(){return this._configuration.getRawOptions()}getOverflowWidgetsDomNode(){return this._overflowWidgetsDomNode}getConfiguredWordAtPosition(V){return this._modelData?O.WordOperations.getWordAtPosition(this._modelData.model,this._configuration.options.get(115),V):null}getValue(V=null){if(!this._modelData)return"";const Q=!!(V&&V.preserveBOM);let ue=0;return V&&V.lineEnding&&V.lineEnding===`
`?ue=1:V&&V.lineEnding&&V.lineEnding===`\r
`&&(ue=2),this._modelData.model.getValue(ue,Q)}setValue(V){!this._modelData||this._modelData.model.setValue(V)}getModel(){return this._modelData?this._modelData.model:null}setModel(V=null){const Q=V;if(this._modelData===null&&Q===null||this._modelData&&this._modelData.model===Q)return;const ue=this.hasTextFocus(),pe=this._detachModel();this._attachModel(Q),ue&&this.hasModel()&&this.focus();const fe={oldModelUrl:pe?pe.uri:null,newModelUrl:Q?Q.uri:null};this._removeDecorationTypes(),this._onDidChangeModel.fire(fe),this._postDetachModelCleanup(pe)}_removeDecorationTypes(){if(this._decorationTypeKeysToIds={},this._decorationTypeSubtypes){for(let V in this._decorationTypeSubtypes){const Q=this._decorationTypeSubtypes[V];for(let ue in Q)this._removeDecorationType(V+"-"+ue)}this._decorationTypeSubtypes={}}}getVisibleRanges(){return this._modelData?this._modelData.viewModel.getVisibleRanges():[]}getVisibleRangesPlusViewportAboveBelow(){return this._modelData?this._modelData.viewModel.getVisibleRangesPlusViewportAboveBelow():[]}getWhitespaces(){return this._modelData?this._modelData.viewModel.viewLayout.getWhitespaces():[]}static _getVerticalOffsetForPosition(V,Q,ue){const pe=V.model.validatePosition({lineNumber:Q,column:ue}),fe=V.viewModel.coordinatesConverter.convertModelPositionToViewPosition(pe);return V.viewModel.viewLayout.getVerticalOffsetForLineNumber(fe.lineNumber)}getTopForLineNumber(V){return this._modelData?Pt._getVerticalOffsetForPosition(this._modelData,V,1):-1}getTopForPosition(V,Q){return this._modelData?Pt._getVerticalOffsetForPosition(this._modelData,V,Q):-1}setHiddenAreas(V){this._modelData&&this._modelData.viewModel.setHiddenAreas(V.map(Q=>r.Range.lift(Q)))}getVisibleColumnFromPosition(V){if(!this._modelData)return V.column;const Q=this._modelData.model.validatePosition(V),ue=this._modelData.model.getOptions().tabSize;return d.CursorColumns.visibleColumnFromColumn(this._modelData.model.getLineContent(Q.lineNumber),Q.column,ue)+1}getPosition(){return this._modelData?this._modelData.viewModel.getPosition():null}setPosition(V){if(!!this._modelData){if(!a.Position.isIPosition(V))throw new Error("Invalid arguments");this._modelData.viewModel.setSelections("api",[{selectionStartLineNumber:V.lineNumber,selectionStartColumn:V.column,positionLineNumber:V.lineNumber,positionColumn:V.column}])}}_sendRevealRange(V,Q,ue,pe){if(!this._modelData)return;if(!r.Range.isIRange(V))throw new Error("Invalid arguments");const fe=this._modelData.model.validateRange(V),re=this._modelData.viewModel.coordinatesConverter.convertModelRangeToViewRange(fe);this._modelData.viewModel.revealRange("api",ue,re,Q,pe)}revealLine(V,Q=0){this._revealLine(V,0,Q)}revealLineInCenter(V,Q=0){this._revealLine(V,1,Q)}revealLineInCenterIfOutsideViewport(V,Q=0){this._revealLine(V,2,Q)}revealLineNearTop(V,Q=0){this._revealLine(V,5,Q)}_revealLine(V,Q,ue){if(typeof V!="number")throw new Error("Invalid arguments");this._sendRevealRange(new r.Range(V,1,V,1),Q,!1,ue)}revealPosition(V,Q=0){this._revealPosition(V,0,!0,Q)}revealPositionInCenter(V,Q=0){this._revealPosition(V,1,!0,Q)}revealPositionInCenterIfOutsideViewport(V,Q=0){this._revealPosition(V,2,!0,Q)}revealPositionNearTop(V,Q=0){this._revealPosition(V,5,!0,Q)}_revealPosition(V,Q,ue,pe){if(!a.Position.isIPosition(V))throw new Error("Invalid arguments");this._sendRevealRange(new r.Range(V.lineNumber,V.column,V.lineNumber,V.column),Q,ue,pe)}getSelection(){return this._modelData?this._modelData.viewModel.getSelection():null}getSelections(){return this._modelData?this._modelData.viewModel.getSelections():null}setSelection(V){const Q=o.Selection.isISelection(V),ue=r.Range.isIRange(V);if(!Q&&!ue)throw new Error("Invalid arguments");if(Q)this._setSelectionImpl(V);else if(ue){const pe={selectionStartLineNumber:V.startLineNumber,selectionStartColumn:V.startColumn,positionLineNumber:V.endLineNumber,positionColumn:V.endColumn};this._setSelectionImpl(pe)}}_setSelectionImpl(V){if(!this._modelData)return;const Q=new o.Selection(V.selectionStartLineNumber,V.selectionStartColumn,V.positionLineNumber,V.positionColumn);this._modelData.viewModel.setSelections("api",[Q])}revealLines(V,Q,ue=0){this._revealLines(V,Q,0,ue)}revealLinesInCenter(V,Q,ue=0){this._revealLines(V,Q,1,ue)}revealLinesInCenterIfOutsideViewport(V,Q,ue=0){this._revealLines(V,Q,2,ue)}revealLinesNearTop(V,Q,ue=0){this._revealLines(V,Q,5,ue)}_revealLines(V,Q,ue,pe){if(typeof V!="number"||typeof Q!="number")throw new Error("Invalid arguments");this._sendRevealRange(new r.Range(V,1,Q,1),ue,!1,pe)}revealRange(V,Q=0,ue=!1,pe=!0){this._revealRange(V,ue?1:0,pe,Q)}revealRangeInCenter(V,Q=0){this._revealRange(V,1,!0,Q)}revealRangeInCenterIfOutsideViewport(V,Q=0){this._revealRange(V,2,!0,Q)}revealRangeNearTop(V,Q=0){this._revealRange(V,5,!0,Q)}revealRangeNearTopIfOutsideViewport(V,Q=0){this._revealRange(V,6,!0,Q)}revealRangeAtTop(V,Q=0){this._revealRange(V,3,!0,Q)}_revealRange(V,Q,ue,pe){if(!r.Range.isIRange(V))throw new Error("Invalid arguments");this._sendRevealRange(r.Range.lift(V),Q,ue,pe)}setSelections(V,Q="api",ue=0){if(!!this._modelData){if(!V||V.length===0)throw new Error("Invalid arguments");for(let pe=0,fe=V.length;pe<fe;pe++)if(!o.Selection.isISelection(V[pe]))throw new Error("Invalid arguments");this._modelData.viewModel.setSelections(Q,V,ue)}}getContentWidth(){return this._modelData?this._modelData.viewModel.viewLayout.getContentWidth():-1}getScrollWidth(){return this._modelData?this._modelData.viewModel.viewLayout.getScrollWidth():-1}getScrollLeft(){return this._modelData?this._modelData.viewModel.viewLayout.getCurrentScrollLeft():-1}getContentHeight(){return this._modelData?this._modelData.viewModel.viewLayout.getContentHeight():-1}getScrollHeight(){return this._modelData?this._modelData.viewModel.viewLayout.getScrollHeight():-1}getScrollTop(){return this._modelData?this._modelData.viewModel.viewLayout.getCurrentScrollTop():-1}setScrollLeft(V,Q=1){if(!!this._modelData){if(typeof V!="number")throw new Error("Invalid arguments");this._modelData.viewModel.setScrollPosition({scrollLeft:V},Q)}}setScrollTop(V,Q=1){if(!!this._modelData){if(typeof V!="number")throw new Error("Invalid arguments");this._modelData.viewModel.setScrollPosition({scrollTop:V},Q)}}setScrollPosition(V,Q=1){!this._modelData||this._modelData.viewModel.setScrollPosition(V,Q)}saveViewState(){if(!this._modelData)return null;const V={},Q=Object.keys(this._contributions);for(const fe of Q){const re=this._contributions[fe];typeof re.saveViewState=="function"&&(V[fe]=re.saveViewState())}const ue=this._modelData.viewModel.saveCursorState(),pe=this._modelData.viewModel.saveState();return{cursorState:ue,viewState:pe,contributionsState:V}}restoreViewState(V){if(!this._modelData||!this._modelData.hasRealView)return;const Q=V;if(Q&&Q.cursorState&&Q.viewState){const ue=Q.cursorState;Array.isArray(ue)?this._modelData.viewModel.restoreCursorState(ue):this._modelData.viewModel.restoreCursorState([ue]);const pe=Q.contributionsState||{},fe=Object.keys(this._contributions);for(let ie=0,ae=fe.length;ie<ae;ie++){const q=fe[ie],ne=this._contributions[q];typeof ne.restoreViewState=="function"&&ne.restoreViewState(pe[q])}const re=this._modelData.viewModel.reduceRestoreState(Q.viewState);this._modelData.view.restoreState(re)}}getContribution(V){return this._contributions[V]||null}getActions(){const V=[],Q=Object.keys(this._actions);for(let ue=0,pe=Q.length;ue<pe;ue++){const fe=Q[ue];V.push(this._actions[fe])}return V}getSupportedActions(){let V=this.getActions();return V=V.filter(Q=>Q.isSupported()),V}getAction(V){return this._actions[V]||null}trigger(V,Q,ue){switch(ue=ue||{},Q){case"compositionStart":this._startComposition();return;case"compositionEnd":this._endComposition(V);return;case"type":{const fe=ue;this._type(V,fe.text||"");return}case"replacePreviousChar":{const fe=ue;this._compositionType(V,fe.text||"",fe.replaceCharCnt||0,0,0);return}case"compositionType":{const fe=ue;this._compositionType(V,fe.text||"",fe.replacePrevCharCnt||0,fe.replaceNextCharCnt||0,fe.positionDelta||0);return}case"paste":{const fe=ue;this._paste(V,fe.text||"",fe.pasteOnNewLine||!1,fe.multicursorText||null,fe.mode||null);return}case"cut":this._cut(V);return}const pe=this.getAction(Q);if(pe){Promise.resolve(pe.run()).then(void 0,T.onUnexpectedError);return}!this._modelData||this._triggerEditorCommand(V,Q,ue)||this._triggerCommand(Q,ue)}_triggerCommand(V,Q){this._commandService.executeCommand(V,Q)}_startComposition(){!this._modelData||(this._modelData.viewModel.startComposition(),this._onDidCompositionStart.fire())}_endComposition(V){!this._modelData||(this._modelData.viewModel.endComposition(V),this._onDidCompositionEnd.fire())}_type(V,Q){!this._modelData||Q.length===0||(V==="keyboard"&&this._onWillType.fire(Q),this._modelData.viewModel.type(Q,V),V==="keyboard"&&this._onDidType.fire(Q))}_compositionType(V,Q,ue,pe,fe){!this._modelData||this._modelData.viewModel.compositionType(Q,ue,pe,fe,V)}_paste(V,Q,ue,pe,fe){if(!this._modelData||Q.length===0)return;const re=this._modelData.viewModel.getSelection().getStartPosition();this._modelData.viewModel.paste(Q,ue,pe,V);const ie=this._modelData.viewModel.getSelection().getStartPosition();V==="keyboard"&&this._onDidPaste.fire({range:new r.Range(re.lineNumber,re.column,ie.lineNumber,ie.column),languageId:fe})}_cut(V){!this._modelData||this._modelData.viewModel.cut(V)}_triggerEditorCommand(V,Q,ue){const pe=n.EditorExtensionsRegistry.getEditorCommand(Q);return pe?(ue=ue||{},ue.source=V,this._instantiationService.invokeFunction(fe=>{Promise.resolve(pe.runEditorCommand(fe,this,ue)).then(void 0,T.onUnexpectedError)}),!0):!1}_getViewModel(){return this._modelData?this._modelData.viewModel:null}pushUndoStop(){return!this._modelData||this._configuration.options.get(80)?!1:(this._modelData.model.pushStackElement(),!0)}popUndoStop(){return!this._modelData||this._configuration.options.get(80)?!1:(this._modelData.model.popStackElement(),!0)}executeEdits(V,Q,ue){if(!this._modelData||this._configuration.options.get(80))return!1;let pe;return ue?Array.isArray(ue)?pe=()=>ue:pe=ue:pe=()=>null,this._modelData.viewModel.executeEdits(V,Q,pe),!0}executeCommand(V,Q){!this._modelData||this._modelData.viewModel.executeCommand(Q,V)}executeCommands(V,Q){!this._modelData||this._modelData.viewModel.executeCommands(Q,V)}changeDecorations(V){return this._modelData?this._modelData.model.changeDecorations(V,this._id):null}getLineDecorations(V){return this._modelData?this._modelData.model.getLineDecorations(V,this._id,(0,c.filterValidationDecorations)(this._configuration.options)):null}deltaDecorations(V,Q){return this._modelData?V.length===0&&Q.length===0?V:this._modelData.model.deltaDecorations(V,Q,this._id):[]}removeDecorations(V){const Q=this._decorationTypeKeysToIds[V];Q&&this.deltaDecorations(Q,[]),this._decorationTypeKeysToIds.hasOwnProperty(V)&&delete this._decorationTypeKeysToIds[V],this._decorationTypeSubtypes.hasOwnProperty(V)&&delete this._decorationTypeSubtypes[V]}getLayoutInfo(){return this._configuration.options.get(129)}createOverviewRuler(V){return!this._modelData||!this._modelData.hasRealView?null:this._modelData.view.createOverviewRuler(V)}getContainerDomNode(){return this._domElement}getDomNode(){return!this._modelData||!this._modelData.hasRealView?null:this._modelData.view.domNode.domNode}delegateVerticalScrollbarMouseDown(V){!this._modelData||!this._modelData.hasRealView||this._modelData.view.delegateVerticalScrollbarMouseDown(V)}layout(V){this._configuration.observeReferenceElement(V),this.render()}focus(){!this._modelData||!this._modelData.hasRealView||this._modelData.view.focus()}hasTextFocus(){return!this._modelData||!this._modelData.hasRealView?!1:this._modelData.view.isFocused()}hasWidgetFocus(){return this._focusTracker&&this._focusTracker.hasFocus()}addContentWidget(V){const Q={widget:V,position:V.getPosition()};this._contentWidgets.hasOwnProperty(V.getId())&&console.warn("Overwriting a content widget with the same id."),this._contentWidgets[V.getId()]=Q,this._modelData&&this._modelData.hasRealView&&this._modelData.view.addContentWidget(Q)}layoutContentWidget(V){const Q=V.getId();if(this._contentWidgets.hasOwnProperty(Q)){const ue=this._contentWidgets[Q];ue.position=V.getPosition(),this._modelData&&this._modelData.hasRealView&&this._modelData.view.layoutContentWidget(ue)}}removeContentWidget(V){const Q=V.getId();if(this._contentWidgets.hasOwnProperty(Q)){const ue=this._contentWidgets[Q];delete this._contentWidgets[Q],this._modelData&&this._modelData.hasRealView&&this._modelData.view.removeContentWidget(ue)}}addOverlayWidget(V){const Q={widget:V,position:V.getPosition()};this._overlayWidgets.hasOwnProperty(V.getId())&&console.warn("Overwriting an overlay widget with the same id."),this._overlayWidgets[V.getId()]=Q,this._modelData&&this._modelData.hasRealView&&this._modelData.view.addOverlayWidget(Q)}layoutOverlayWidget(V){const Q=V.getId();if(this._overlayWidgets.hasOwnProperty(Q)){const ue=this._overlayWidgets[Q];ue.position=V.getPosition(),this._modelData&&this._modelData.hasRealView&&this._modelData.view.layoutOverlayWidget(ue)}}removeOverlayWidget(V){const Q=V.getId();if(this._overlayWidgets.hasOwnProperty(Q)){const ue=this._overlayWidgets[Q];delete this._overlayWidgets[Q],this._modelData&&this._modelData.hasRealView&&this._modelData.view.removeOverlayWidget(ue)}}changeViewZones(V){!this._modelData||!this._modelData.hasRealView||this._modelData.view.change(V)}getTargetAtClientPoint(V,Q){return!this._modelData||!this._modelData.hasRealView?null:this._modelData.view.getTargetAtClientPoint(V,Q)}getScrolledVisiblePosition(V){if(!this._modelData||!this._modelData.hasRealView)return null;const Q=this._modelData.model.validatePosition(V),ue=this._configuration.options,pe=ue.get(129),fe=Pt._getVerticalOffsetForPosition(this._modelData,Q.lineNumber,Q.column)-this.getScrollTop(),re=this._modelData.view.getOffsetForColumn(Q.lineNumber,Q.column)+pe.glyphMarginWidth+pe.lineNumbersWidth+pe.decorationsWidth-this.getScrollLeft();return{top:fe,left:re,height:ue.get(58)}}getOffsetForColumn(V,Q){return!this._modelData||!this._modelData.hasRealView?-1:this._modelData.view.getOffsetForColumn(V,Q)}render(V=!1){!this._modelData||!this._modelData.hasRealView||this._modelData.view.render(!0,V)}setAriaOptions(V){!this._modelData||!this._modelData.hasRealView||this._modelData.view.setAriaOptions(V)}applyFontInfo(V){C.Configuration.applyFontInfoSlow(V,this._configuration.options.get(43))}_attachModel(V){if(!V){this._modelData=null;return}const Q=[];this._domElement.setAttribute("data-mode-id",V.getLanguageId()),this._configuration.setIsDominatedByLongLines(V.isDominatedByLongLines()),this._configuration.setMaxLineNumber(V.getLineCount()),V.onBeforeAttached();const ue=new b.ViewModel(this._id,this._configuration,V,A.DOMLineBreaksComputerFactory.create(),R.MonospaceLineBreaksComputerFactory.create(this._configuration.options),re=>N.scheduleAtNextAnimationFrame(re));Q.push(V.onDidChangeDecorations(re=>this._onDidChangeModelDecorations.fire(re))),Q.push(V.onDidChangeLanguage(re=>{this._domElement.setAttribute("data-mode-id",V.getLanguageId()),this._onDidChangeModelLanguage.fire(re)})),Q.push(V.onDidChangeLanguageConfiguration(re=>this._onDidChangeModelLanguageConfiguration.fire(re))),Q.push(V.onDidChangeContent(re=>this._onDidChangeModelContent.fire(re))),Q.push(V.onDidChangeOptions(re=>this._onDidChangeModelOptions.fire(re))),Q.push(V.onWillDispose(()=>this.setModel(null))),Q.push(ue.onEvent(re=>{switch(re.kind){case 0:this._onDidContentSizeChange.fire(re);break;case 1:this._editorTextFocus.setValue(re.hasFocus);break;case 2:this._onDidScrollChange.fire(re);break;case 3:this._onDidChangeViewZones.fire();break;case 4:this._onDidChangeHiddenAreas.fire();break;case 5:this._onDidAttemptReadOnlyEdit.fire();break;case 6:{re.reachedMaxCursorCount&&this._notificationService.warn(w.localize(0,null,u.CursorsController.MAX_CURSOR_COUNT));const ie=[];for(let ne=0,ce=re.selections.length;ne<ce;ne++)ie[ne]=re.selections[ne].getPosition();const ae={position:ie[0],secondaryPositions:ie.slice(1),reason:re.reason,source:re.source};this._onDidChangeCursorPosition.fire(ae);const q={selection:re.selections[0],secondarySelections:re.selections.slice(1),modelVersionId:re.modelVersionId,oldSelections:re.oldSelections,oldModelVersionId:re.oldModelVersionId,source:re.source,reason:re.reason};this._onDidChangeCursorSelection.fire(q);break}}}));const[pe,fe]=this._createView(ue);if(fe){this._domElement.appendChild(pe.domNode.domNode);let re=Object.keys(this._contentWidgets);for(let ie=0,ae=re.length;ie<ae;ie++){const q=re[ie];pe.addContentWidget(this._contentWidgets[q])}re=Object.keys(this._overlayWidgets);for(let ie=0,ae=re.length;ie<ae;ie++){const q=re[ie];pe.addOverlayWidget(this._overlayWidgets[q])}pe.render(!1,!0),pe.domNode.domNode.setAttribute("data-uri",V.uri.toString())}this._modelData=new B(V,ue,pe,fe,Q)}_createView(V){let Q;this.isSimpleWidget?Q={paste:(fe,re,ie,ae)=>{this._paste("keyboard",fe,re,ie,ae)},type:fe=>{this._type("keyboard",fe)},compositionType:(fe,re,ie,ae)=>{this._compositionType("keyboard",fe,re,ie,ae)},startComposition:()=>{this._startComposition()},endComposition:()=>{this._endComposition("keyboard")},cut:()=>{this._cut("keyboard")}}:Q={paste:(fe,re,ie,ae)=>{const q={text:fe,pasteOnNewLine:re,multicursorText:ie,mode:ae};this._commandService.executeCommand("paste",q)},type:fe=>{const re={text:fe};this._commandService.executeCommand("type",re)},compositionType:(fe,re,ie,ae)=>{if(ie||ae){const q={text:fe,replacePrevCharCnt:re,replaceNextCharCnt:ie,positionDelta:ae};this._commandService.executeCommand("compositionType",q)}else{const q={text:fe,replaceCharCnt:re};this._commandService.executeCommand("replacePreviousChar",q)}},startComposition:()=>{this._commandService.executeCommand("compositionStart",{})},endComposition:()=>{this._commandService.executeCommand("compositionEnd",{})},cut:()=>{this._commandService.executeCommand("cut",{})}};const ue=new s.ViewUserInputEvents(V.coordinatesConverter);return ue.onKeyDown=fe=>this._onKeyDown.fire(fe),ue.onKeyUp=fe=>this._onKeyUp.fire(fe),ue.onContextMenu=fe=>this._onContextMenu.fire(fe),ue.onMouseMove=fe=>this._onMouseMove.fire(fe),ue.onMouseLeave=fe=>this._onMouseLeave.fire(fe),ue.onMouseDown=fe=>this._onMouseDown.fire(fe),ue.onMouseUp=fe=>this._onMouseUp.fire(fe),ue.onMouseDrag=fe=>this._onMouseDrag.fire(fe),ue.onMouseDrop=fe=>this._onMouseDrop.fire(fe),ue.onMouseDropCanceled=fe=>this._onMouseDropCanceled.fire(fe),ue.onMouseWheel=fe=>this._onMouseWheel.fire(fe),[new t.View(Q,this._configuration,this._themeService,V,ue,this._overflowWidgetsDomNode),!0]}_postDetachModelCleanup(V){V&&V.removeAllDecorationsWithOwnerId(this._id)}_detachModel(){if(!this._modelData)return null;const V=this._modelData.model,Q=this._modelData.hasRealView?this._modelData.view.domNode.domNode:null;return this._modelData.dispose(),this._modelData=null,this._domElement.removeAttribute("data-mode-id"),Q&&this._domElement.contains(Q)&&this._domElement.removeChild(Q),V}_removeDecorationType(V){this._codeEditorService.removeDecorationType(V)}hasModel(){return this._modelData!==null}};W=Fe([Ce(3,E.IInstantiationService),Ce(4,g.ICodeEditorService),Ce(5,v.ICommandService),Ce(6,m.IContextKeyService),Ce(7,M.IThemeService),Ce(8,k.INotificationService),Ce(9,P.IAccessibilityService)],W),e.CodeEditorWidget=W;class K extends S.Disposable{constructor(){super();this._onDidChangeToTrue=this._register(new D.Emitter),this.onDidChangeToTrue=this._onDidChangeToTrue.event,this._onDidChangeToFalse=this._register(new D.Emitter),this.onDidChangeToFalse=this._onDidChangeToFalse.event,this._value=0}setValue(V){const Q=V?2:1;this._value!==Q&&(this._value=Q,this._value===2?this._onDidChangeToTrue.fire():this._value===1&&this._onDidChangeToFalse.fire())}}e.BooleanEventEmitter=K;class H extends S.Disposable{constructor(V,Q){super();this._editor=V,Q.createKey("editorId",V.getId()),this._editorSimpleInput=h.EditorContextKeys.editorSimpleInput.bindTo(Q),this._editorFocus=h.EditorContextKeys.focus.bindTo(Q),this._textInputFocus=h.EditorContextKeys.textInputFocus.bindTo(Q),this._editorTextFocus=h.EditorContextKeys.editorTextFocus.bindTo(Q),this._editorTabMovesFocus=h.EditorContextKeys.tabMovesFocus.bindTo(Q),this._editorReadonly=h.EditorContextKeys.readOnly.bindTo(Q),this._inDiffEditor=h.EditorContextKeys.inDiffEditor.bindTo(Q),this._editorColumnSelection=h.EditorContextKeys.columnSelection.bindTo(Q),this._hasMultipleSelections=h.EditorContextKeys.hasMultipleSelections.bindTo(Q),this._hasNonEmptySelection=h.EditorContextKeys.hasNonEmptySelection.bindTo(Q),this._canUndo=h.EditorContextKeys.canUndo.bindTo(Q),this._canRedo=h.EditorContextKeys.canRedo.bindTo(Q),this._register(this._editor.onDidChangeConfiguration(()=>this._updateFromConfig())),this._register(this._editor.onDidChangeCursorSelection(()=>this._updateFromSelection())),this._register(this._editor.onDidFocusEditorWidget(()=>this._updateFromFocus())),this._register(this._editor.onDidBlurEditorWidget(()=>this._updateFromFocus())),this._register(this._editor.onDidFocusEditorText(()=>this._updateFromFocus())),this._register(this._editor.onDidBlurEditorText(()=>this._updateFromFocus())),this._register(this._editor.onDidChangeModel(()=>this._updateFromModel())),this._register(this._editor.onDidChangeConfiguration(()=>this._updateFromModel())),this._updateFromConfig(),this._updateFromSelection(),this._updateFromFocus(),this._updateFromModel(),this._editorSimpleInput.set(this._editor.isSimpleWidget)}_updateFromConfig(){const V=this._editor.getOptions();this._editorTabMovesFocus.set(V.get(128)),this._editorReadonly.set(V.get(80)),this._inDiffEditor.set(V.get(53)),this._editorColumnSelection.set(V.get(18))}_updateFromSelection(){const V=this._editor.getSelections();V?(this._hasMultipleSelections.set(V.length>1),this._hasNonEmptySelection.set(V.some(Q=>!Q.isEmpty()))):(this._hasMultipleSelections.reset(),this._hasNonEmptySelection.reset())}_updateFromFocus(){this._editorFocus.set(this._editor.hasWidgetFocus()&&!this._editor.isSimpleWidget),this._editorTextFocus.set(this._editor.hasTextFocus()&&!this._editor.isSimpleWidget),this._textInputFocus.set(this._editor.hasTextFocus())}_updateFromModel(){const V=this._editor.getModel();this._canUndo.set(Boolean(V&&V.canUndo())),this._canRedo.set(Boolean(V&&V.canRedo()))}}class Y extends S.Disposable{constructor(V,Q){super();this._editor=V,this._contextKeyService=Q,this._langId=h.EditorContextKeys.languageId.bindTo(Q),this._hasCompletionItemProvider=h.EditorContextKeys.hasCompletionItemProvider.bindTo(Q),this._hasCodeActionsProvider=h.EditorContextKeys.hasCodeActionsProvider.bindTo(Q),this._hasCodeLensProvider=h.EditorContextKeys.hasCodeLensProvider.bindTo(Q),this._hasDefinitionProvider=h.EditorContextKeys.hasDefinitionProvider.bindTo(Q),this._hasDeclarationProvider=h.EditorContextKeys.hasDeclarationProvider.bindTo(Q),this._hasImplementationProvider=h.EditorContextKeys.hasImplementationProvider.bindTo(Q),this._hasTypeDefinitionProvider=h.EditorContextKeys.hasTypeDefinitionProvider.bindTo(Q),this._hasHoverProvider=h.EditorContextKeys.hasHoverProvider.bindTo(Q),this._hasDocumentHighlightProvider=h.EditorContextKeys.hasDocumentHighlightProvider.bindTo(Q),this._hasDocumentSymbolProvider=h.EditorContextKeys.hasDocumentSymbolProvider.bindTo(Q),this._hasReferenceProvider=h.EditorContextKeys.hasReferenceProvider.bindTo(Q),this._hasRenameProvider=h.EditorContextKeys.hasRenameProvider.bindTo(Q),this._hasSignatureHelpProvider=h.EditorContextKeys.hasSignatureHelpProvider.bindTo(Q),this._hasInlayHintsProvider=h.EditorContextKeys.hasInlayHintsProvider.bindTo(Q),this._hasDocumentFormattingProvider=h.EditorContextKeys.hasDocumentFormattingProvider.bindTo(Q),this._hasDocumentSelectionFormattingProvider=h.EditorContextKeys.hasDocumentSelectionFormattingProvider.bindTo(Q),this._hasMultipleDocumentFormattingProvider=h.EditorContextKeys.hasMultipleDocumentFormattingProvider.bindTo(Q),this._hasMultipleDocumentSelectionFormattingProvider=h.EditorContextKeys.hasMultipleDocumentSelectionFormattingProvider.bindTo(Q),this._isInWalkThrough=h.EditorContextKeys.isInWalkThroughSnippet.bindTo(Q);const ue=()=>this._update();this._register(V.onDidChangeModel(ue)),this._register(V.onDidChangeModelLanguage(ue)),this._register(f.CompletionProviderRegistry.onDidChange(ue)),this._register(f.CodeActionProviderRegistry.onDidChange(ue)),this._register(f.CodeLensProviderRegistry.onDidChange(ue)),this._register(f.DefinitionProviderRegistry.onDidChange(ue)),this._register(f.DeclarationProviderRegistry.onDidChange(ue)),this._register(f.ImplementationProviderRegistry.onDidChange(ue)),this._register(f.TypeDefinitionProviderRegistry.onDidChange(ue)),this._register(f.HoverProviderRegistry.onDidChange(ue)),this._register(f.DocumentHighlightProviderRegistry.onDidChange(ue)),this._register(f.DocumentSymbolProviderRegistry.onDidChange(ue)),this._register(f.ReferenceProviderRegistry.onDidChange(ue)),this._register(f.RenameProviderRegistry.onDidChange(ue)),this._register(f.DocumentFormattingEditProviderRegistry.onDidChange(ue)),this._register(f.DocumentRangeFormattingEditProviderRegistry.onDidChange(ue)),this._register(f.SignatureHelpProviderRegistry.onDidChange(ue)),this._register(f.InlayHintsProviderRegistry.onDidChange(ue)),ue()}dispose(){super.dispose()}reset(){this._contextKeyService.bufferChangeEvents(()=>{this._langId.reset(),this._hasCompletionItemProvider.reset(),this._hasCodeActionsProvider.reset(),this._hasCodeLensProvider.reset(),this._hasDefinitionProvider.reset(),this._hasDeclarationProvider.reset(),this._hasImplementationProvider.reset(),this._hasTypeDefinitionProvider.reset(),this._hasHoverProvider.reset(),this._hasDocumentHighlightProvider.reset(),this._hasDocumentSymbolProvider.reset(),this._hasReferenceProvider.reset(),this._hasRenameProvider.reset(),this._hasDocumentFormattingProvider.reset(),this._hasDocumentSelectionFormattingProvider.reset(),this._hasSignatureHelpProvider.reset(),this._isInWalkThrough.reset()})}_update(){const V=this._editor.getModel();if(!V){this.reset();return}this._contextKeyService.bufferChangeEvents(()=>{this._langId.set(V.getLanguageId()),this._hasCompletionItemProvider.set(f.CompletionProviderRegistry.has(V)),this._hasCodeActionsProvider.set(f.CodeActionProviderRegistry.has(V)),this._hasCodeLensProvider.set(f.CodeLensProviderRegistry.has(V)),this._hasDefinitionProvider.set(f.DefinitionProviderRegistry.has(V)),this._hasDeclarationProvider.set(f.DeclarationProviderRegistry.has(V)),this._hasImplementationProvider.set(f.ImplementationProviderRegistry.has(V)),this._hasTypeDefinitionProvider.set(f.TypeDefinitionProviderRegistry.has(V)),this._hasHoverProvider.set(f.HoverProviderRegistry.has(V)),this._hasDocumentHighlightProvider.set(f.DocumentHighlightProviderRegistry.has(V)),this._hasDocumentSymbolProvider.set(f.DocumentSymbolProviderRegistry.has(V)),this._hasReferenceProvider.set(f.ReferenceProviderRegistry.has(V)),this._hasRenameProvider.set(f.RenameProviderRegistry.has(V)),this._hasSignatureHelpProvider.set(f.SignatureHelpProviderRegistry.has(V)),this._hasInlayHintsProvider.set(f.InlayHintsProviderRegistry.has(V)),this._hasDocumentFormattingProvider.set(f.DocumentFormattingEditProviderRegistry.has(V)||f.DocumentRangeFormattingEditProviderRegistry.has(V)),this._hasDocumentSelectionFormattingProvider.set(f.DocumentRangeFormattingEditProviderRegistry.has(V)),this._hasMultipleDocumentFormattingProvider.set(f.DocumentFormattingEditProviderRegistry.all(V).length+f.DocumentRangeFormattingEditProviderRegistry.all(V).length>1),this._hasMultipleDocumentSelectionFormattingProvider.set(f.DocumentRangeFormattingEditProviderRegistry.all(V).length>1),this._isInWalkThrough.set(V.uri.scheme===p.Schemas.walkThroughSnippet)})}}e.EditorModeContext=Y;class X extends S.Disposable{constructor(V){super();this._onChange=this._register(new D.Emitter),this.onChange=this._onChange.event,this._hasFocus=!1,this._domFocusTracker=this._register(N.trackFocus(V)),this._register(this._domFocusTracker.onDidFocus(()=>{this._hasFocus=!0,this._onChange.fire(void 0)})),this._register(this._domFocusTracker.onDidBlur(()=>{this._hasFocus=!1,this._onChange.fire(void 0)}))}hasFocus(){return this._hasFocus}}const Z=encodeURIComponent("<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 6 3' enable-background='new 0 0 6 3' height='3' width='6'><g fill='"),se=encodeURIComponent("'><polygon points='5.5,0 2.5,3 1.1,3 4.1,0'/><polygon points='4,0 6,2 6,0.6 5.4,0'/><polygon points='0,2 1,3 2.4,3 0,0.6'/></g></svg>");function oe($){return Z+encodeURIComponent($.toString())+se}const G=encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" height="3" width="12"><g fill="'),x=encodeURIComponent('"><circle cx="1" cy="1" r="1"/><circle cx="5" cy="1" r="1"/><circle cx="9" cy="1" r="1"/></g></svg>');function U($){return G+encodeURIComponent($.toString())+x}(0,M.registerThemingParticipant)(($,V)=>{const Q=$.getColor(_.editorErrorBorder);Q&&V.addRule(`.monaco-editor .squiggly-error { border-bottom: 4px double ${Q}; }`);const ue=$.getColor(_.editorErrorForeground);ue&&V.addRule(`.monaco-editor .squiggly-error { background: url("data:image/svg+xml,${oe(ue)}") repeat-x bottom left; }`);const pe=$.getColor(_.editorErrorBackground);pe&&V.addRule(`.monaco-editor .squiggly-error::before { display: block; content: ''; width: 100%; height: 100%; background: ${pe}; }`);const fe=$.getColor(_.editorWarningBorder);fe&&V.addRule(`.monaco-editor .squiggly-warning { border-bottom: 4px double ${fe}; }`);const re=$.getColor(_.editorWarningForeground);re&&V.addRule(`.monaco-editor .squiggly-warning { background: url("data:image/svg+xml,${oe(re)}") repeat-x bottom left; }`);const ie=$.getColor(_.editorWarningBackground);ie&&V.addRule(`.monaco-editor .squiggly-warning::before { display: block; content: ''; width: 100%; height: 100%; background: ${ie}; }`);const ae=$.getColor(_.editorInfoBorder);ae&&V.addRule(`.monaco-editor .squiggly-info { border-bottom: 4px double ${ae}; }`);const q=$.getColor(_.editorInfoForeground);q&&V.addRule(`.monaco-editor .squiggly-info { background: url("data:image/svg+xml,${oe(q)}") repeat-x bottom left; }`);const ne=$.getColor(_.editorInfoBackground);ne&&V.addRule(`.monaco-editor .squiggly-info::before { display: block; content: ''; width: 100%; height: 100%; background: ${ne}; }`);const ce=$.getColor(_.editorHintBorder);ce&&V.addRule(`.monaco-editor .squiggly-hint { border-bottom: 2px dotted ${ce}; }`);const le=$.getColor(_.editorHintForeground);le&&V.addRule(`.monaco-editor .squiggly-hint { background: url("data:image/svg+xml,${U(le)}") no-repeat bottom left; }`);const de=$.getColor(y.editorUnnecessaryCodeOpacity);de&&V.addRule(`.monaco-editor.showUnused .squiggly-inline-unnecessary { opacity: ${de.rgba.a}; }`);const z=$.getColor(y.editorUnnecessaryCodeBorder);z&&V.addRule(`.monaco-editor.showUnused .squiggly-unnecessary { border-bottom: 2px dashed ${z}; }`);const te=$.getColor(_.editorForeground)||"inherit";V.addRule(`.monaco-editor.showDeprecated .squiggly-inline-deprecated { text-decoration: line-through; text-decoration-color: ${te}}`)})}),define(J[281],ee([0,1,469,7,30,110,14,4,2,63,67,28,157,653,31,3,84,113,32,78,233,144,118,60,15,9,150,36,21,10,71,472,88,16,11,62,223,27,137,81,351]),function(j,e,w,N,T,D,S,p,C,n,g,t,s,c,u,d,a,r,o,i,l,h,f,y,_,b,v,m,E,I,k,M,P,F,R,A,O,L,B,W){"use strict";var K;Object.defineProperty(e,"__esModule",{value:!0}),e.DiffEditorWidget=void 0;class H{constructor(z,te){this._contextMenuService=z,this._clipboardService=te,this._zones=[],this._inlineDiffMargins=[],this._zonesMap={},this._decorations=[]}getForeignViewZones(z){return z.filter(te=>!this._zonesMap[String(te.id)])}clean(z){this._zones.length>0&&z.changeViewZones(te=>{for(const he of this._zones)te.removeZone(he)}),this._zones=[],this._zonesMap={},this._decorations=z.deltaDecorations(this._decorations,[])}apply(z,te,he,ge){const ve=ge?g.StableEditorScrollState.capture(z):null;z.changeViewZones(Se=>{var Ee;for(const Ae of this._zones)Se.removeZone(Ae);for(const Ae of this._inlineDiffMargins)Ae.dispose();this._zones=[],this._zonesMap={},this._inlineDiffMargins=[];for(let Ae=0,Ne=he.zones.length;Ae<Ne;Ae++){const ze=he.zones[Ae];ze.suppressMouseDown=!0;const xe=Se.addZone(ze);this._zones.push(xe),this._zonesMap[String(xe)]=!0,he.zones[Ae].diff&&ze.marginDomNode&&(ze.suppressMouseDown=!1,((Ee=he.zones[Ae].diff)===null||Ee===void 0?void 0:Ee.originalModel.getValueLength())!==0&&this._inlineDiffMargins.push(new M.InlineDiffMargin(xe,ze.marginDomNode,z,he.zones[Ae].diff,this._contextMenuService,this._clipboardService)))}}),ve&&ve.restore(z),this._decorations=z.deltaDecorations(this._decorations,he.decorations),te&&te.setZones(he.overviewZones)}}let Y=0;const X=(0,W.registerIcon)("diff-insert",L.Codicon.add,w.localize(0,null)),Z=(0,W.registerIcon)("diff-remove",L.Codicon.remove,w.localize(1,null)),se=(K=window.trustedTypes)===null||K===void 0?void 0:K.createPolicy("diffEditorWidget",{createHTML:de=>de});let oe=class nt extends C.Disposable{constructor(z,te,he,ge,ve,Se,Ee,Ae,Ne,ze,xe,We){super();this._editorProgressService=We,this._onDidDispose=this._register(new p.Emitter),this.onDidDispose=this._onDidDispose.event,this._onDidUpdateDiff=this._register(new p.Emitter),this.onDidUpdateDiff=this._onDidUpdateDiff.event,this._onDidContentSizeChange=this._register(new p.Emitter),this._lastOriginalWarning=null,this._lastModifiedWarning=null,this._editorWorkerService=ve,this._codeEditorService=Ae,this._contextKeyService=this._register(Se.createScoped(z)),this._instantiationService=Ee.createChild(new v.ServiceCollection([_.IContextKeyService,this._contextKeyService])),this._contextKeyService.createKey("isInDiffEditor",!0),this._themeService=Ne,this._notificationService=ze,this._id=++Y,this._state=0,this._updatingDiffProgress=null,this._domElement=z,te=te||{},this._options=ce(te,{enableSplitViewResizing:!0,renderSideBySide:!0,maxComputationTime:5e3,maxFileSize:50,ignoreTrimWhitespace:!0,renderIndicators:!0,originalEditable:!1,diffCodeLens:!1,renderOverviewRuler:!0,diffWordWrap:"inherit"}),typeof te.isInEmbeddedEditor!="undefined"?this._contextKeyService.createKey("isInEmbeddedDiffEditor",te.isInEmbeddedEditor):this._contextKeyService.createKey("isInEmbeddedDiffEditor",!1),this._updateDecorationsRunner=this._register(new S.RunOnceScheduler(()=>this._updateDecorations(),0)),this._containerDomElement=document.createElement("div"),this._containerDomElement.className=nt._getClassName(this._themeService.getColorTheme(),this._options.renderSideBySide),this._containerDomElement.style.position="relative",this._containerDomElement.style.height="100%",this._domElement.appendChild(this._containerDomElement),this._overviewViewportDomElement=(0,T.createFastDomNode)(document.createElement("div")),this._overviewViewportDomElement.setClassName("diffViewport"),this._overviewViewportDomElement.setPosition("absolute"),this._overviewDomElement=document.createElement("div"),this._overviewDomElement.className="diffOverview",this._overviewDomElement.style.position="absolute",this._overviewDomElement.appendChild(this._overviewViewportDomElement.domNode),this._register(N.addStandardDisposableListener(this._overviewDomElement,"mousedown",Le=>{this._modifiedEditor.delegateVerticalScrollbarMouseDown(Le)})),this._options.renderOverviewRuler&&this._containerDomElement.appendChild(this._overviewDomElement),this._originalDomNode=document.createElement("div"),this._originalDomNode.className="editor original",this._originalDomNode.style.position="absolute",this._originalDomNode.style.height="100%",this._containerDomElement.appendChild(this._originalDomNode),this._modifiedDomNode=document.createElement("div"),this._modifiedDomNode.className="editor modified",this._modifiedDomNode.style.position="absolute",this._modifiedDomNode.style.height="100%",this._containerDomElement.appendChild(this._modifiedDomNode),this._beginUpdateDecorationsTimeout=-1,this._currentlyChangingViewZones=!1,this._diffComputationToken=0,this._originalEditorState=new H(xe,ge),this._modifiedEditorState=new H(xe,ge),this._isVisible=!0,this._isHandlingScrollEvent=!1,this._elementSizeObserver=this._register(new O.ElementSizeObserver(this._containerDomElement,te.dimension,()=>this._onDidContainerSizeChanged())),te.automaticLayout&&this._elementSizeObserver.startObserving(),this._diffComputationResult=null,this._originalEditor=this._createLeftHandSideEditor(te,he.originalEditor||{}),this._modifiedEditor=this._createRightHandSideEditor(te,he.modifiedEditor||{}),this._originalOverviewRuler=null,this._modifiedOverviewRuler=null,this._reviewPane=Ee.createInstance(c.DiffReview,this),this._containerDomElement.appendChild(this._reviewPane.domNode.domNode),this._containerDomElement.appendChild(this._reviewPane.shadow.domNode),this._containerDomElement.appendChild(this._reviewPane.actionBarContainer.domNode),this._options.renderSideBySide?this._setStrategy(new Q(this._createDataSource(),this._options.enableSplitViewResizing)):this._setStrategy(new pe(this._createDataSource(),this._options.enableSplitViewResizing)),this._register(Ne.onDidColorThemeChange(Le=>{this._strategy&&this._strategy.applyColors(Le)&&this._updateDecorationsRunner.schedule(),this._containerDomElement.className=nt._getClassName(this._themeService.getColorTheme(),this._options.renderSideBySide)}));const Ue=F.EditorExtensionsRegistry.getDiffEditorContributions();for(const Le of Ue)try{this._register(Ee.createInstance(Le.ctor,this))}catch(ye){(0,R.onUnexpectedError)(ye)}this._codeEditorService.addDiffEditor(this)}_setState(z){this._state!==z&&(this._state=z,this._updatingDiffProgress&&(this._updatingDiffProgress.done(),this._updatingDiffProgress=null),this._state===1&&(this._updatingDiffProgress=this._editorProgressService.show(!0,1e3)))}diffReviewNext(){this._reviewPane.next()}diffReviewPrev(){this._reviewPane.prev()}static _getClassName(z,te){let he="monaco-diff-editor monaco-editor-background ";return te&&(he+="side-by-side "),he+=(0,I.getThemeTypeSelector)(z.type),he}_recreateOverviewRulers(){!this._options.renderOverviewRuler||(this._originalOverviewRuler&&(this._overviewDomElement.removeChild(this._originalOverviewRuler.getDomNode()),this._originalOverviewRuler.dispose()),this._originalEditor.hasModel()&&(this._originalOverviewRuler=this._originalEditor.createOverviewRuler("original diffOverviewRuler"),this._overviewDomElement.appendChild(this._originalOverviewRuler.getDomNode())),this._modifiedOverviewRuler&&(this._overviewDomElement.removeChild(this._modifiedOverviewRuler.getDomNode()),this._modifiedOverviewRuler.dispose()),this._modifiedEditor.hasModel()&&(this._modifiedOverviewRuler=this._modifiedEditor.createOverviewRuler("modified diffOverviewRuler"),this._overviewDomElement.appendChild(this._modifiedOverviewRuler.getDomNode())),this._layoutOverviewRulers())}_createLeftHandSideEditor(z,te){const he=this._createInnerEditor(this._instantiationService,this._originalDomNode,this._adjustOptionsForLeftHandSide(z),te);this._register(he.onDidScrollChange(ve=>{this._isHandlingScrollEvent||!ve.scrollTopChanged&&!ve.scrollLeftChanged&&!ve.scrollHeightChanged||(this._isHandlingScrollEvent=!0,this._modifiedEditor.setScrollPosition({scrollLeft:ve.scrollLeft,scrollTop:ve.scrollTop}),this._isHandlingScrollEvent=!1,this._layoutOverviewViewport())})),this._register(he.onDidChangeViewZones(()=>{this._onViewZonesChanged()})),this._register(he.onDidChangeConfiguration(ve=>{!he.getModel()||(ve.hasChanged(43)&&this._updateDecorationsRunner.schedule(),ve.hasChanged(130)&&(this._updateDecorationsRunner.cancel(),this._updateDecorations()))})),this._register(he.onDidChangeHiddenAreas(()=>{this._updateDecorationsRunner.cancel(),this._updateDecorations()})),this._register(he.onDidChangeModelContent(()=>{this._isVisible&&this._beginUpdateDecorationsSoon()}));const ge=this._contextKeyService.createKey("isInDiffLeftEditor",he.hasWidgetFocus());return this._register(he.onDidFocusEditorWidget(()=>ge.set(!0))),this._register(he.onDidBlurEditorWidget(()=>ge.set(!1))),this._register(he.onDidContentSizeChange(ve=>{const Se=this._originalEditor.getContentWidth()+this._modifiedEditor.getContentWidth()+nt.ONE_OVERVIEW_WIDTH,Ee=Math.max(this._modifiedEditor.getContentHeight(),this._originalEditor.getContentHeight());this._onDidContentSizeChange.fire({contentHeight:Ee,contentWidth:Se,contentHeightChanged:ve.contentHeightChanged,contentWidthChanged:ve.contentWidthChanged})})),he}_createRightHandSideEditor(z,te){const he=this._createInnerEditor(this._instantiationService,this._modifiedDomNode,this._adjustOptionsForRightHandSide(z),te);this._register(he.onDidScrollChange(ve=>{this._isHandlingScrollEvent||!ve.scrollTopChanged&&!ve.scrollLeftChanged&&!ve.scrollHeightChanged||(this._isHandlingScrollEvent=!0,this._originalEditor.setScrollPosition({scrollLeft:ve.scrollLeft,scrollTop:ve.scrollTop}),this._isHandlingScrollEvent=!1,this._layoutOverviewViewport())})),this._register(he.onDidChangeViewZones(()=>{this._onViewZonesChanged()})),this._register(he.onDidChangeConfiguration(ve=>{!he.getModel()||(ve.hasChanged(43)&&this._updateDecorationsRunner.schedule(),ve.hasChanged(130)&&(this._updateDecorationsRunner.cancel(),this._updateDecorations()))})),this._register(he.onDidChangeHiddenAreas(()=>{this._updateDecorationsRunner.cancel(),this._updateDecorations()})),this._register(he.onDidChangeModelContent(()=>{this._isVisible&&this._beginUpdateDecorationsSoon()})),this._register(he.onDidChangeModelOptions(ve=>{ve.tabSize&&this._updateDecorationsRunner.schedule()}));const ge=this._contextKeyService.createKey("isInDiffRightEditor",he.hasWidgetFocus());return this._register(he.onDidFocusEditorWidget(()=>ge.set(!0))),this._register(he.onDidBlurEditorWidget(()=>ge.set(!1))),this._register(he.onDidContentSizeChange(ve=>{const Se=this._originalEditor.getContentWidth()+this._modifiedEditor.getContentWidth()+nt.ONE_OVERVIEW_WIDTH,Ee=Math.max(this._modifiedEditor.getContentHeight(),this._originalEditor.getContentHeight());this._onDidContentSizeChange.fire({contentHeight:Ee,contentWidth:Se,contentHeightChanged:ve.contentHeightChanged,contentWidthChanged:ve.contentWidthChanged})})),he}_createInnerEditor(z,te,he,ge){return z.createInstance(s.CodeEditorWidget,te,he,ge)}dispose(){this._codeEditorService.removeDiffEditor(this),this._beginUpdateDecorationsTimeout!==-1&&(window.clearTimeout(this._beginUpdateDecorationsTimeout),this._beginUpdateDecorationsTimeout=-1),this._cleanViewZonesAndDecorations(),this._originalOverviewRuler&&(this._overviewDomElement.removeChild(this._originalOverviewRuler.getDomNode()),this._originalOverviewRuler.dispose()),this._modifiedOverviewRuler&&(this._overviewDomElement.removeChild(this._modifiedOverviewRuler.getDomNode()),this._modifiedOverviewRuler.dispose()),this._overviewDomElement.removeChild(this._overviewViewportDomElement.domNode),this._options.renderOverviewRuler&&this._containerDomElement.removeChild(this._overviewDomElement),this._containerDomElement.removeChild(this._originalDomNode),this._originalEditor.dispose(),this._containerDomElement.removeChild(this._modifiedDomNode),this._modifiedEditor.dispose(),this._strategy.dispose(),this._containerDomElement.removeChild(this._reviewPane.domNode.domNode),this._containerDomElement.removeChild(this._reviewPane.shadow.domNode),this._containerDomElement.removeChild(this._reviewPane.actionBarContainer.domNode),this._reviewPane.dispose(),this._domElement.removeChild(this._containerDomElement),this._onDidDispose.fire(),super.dispose()}getId(){return this.getEditorType()+":"+this._id}getEditorType(){return r.EditorType.IDiffEditor}getLineChanges(){return this._diffComputationResult?this._diffComputationResult.changes:null}getOriginalEditor(){return this._originalEditor}getModifiedEditor(){return this._modifiedEditor}updateOptions(z){const te=ce(z,this._options),he=le(this._options,te);this._options=te;const ge=he.ignoreTrimWhitespace||he.renderIndicators,ve=this._isVisible&&(he.maxComputationTime||he.maxFileSize);ge?this._beginUpdateDecorations():ve&&this._beginUpdateDecorationsSoon(),this._modifiedEditor.updateOptions(this._adjustOptionsForRightHandSide(z)),this._originalEditor.updateOptions(this._adjustOptionsForLeftHandSide(z)),this._strategy.setEnableSplitViewResizing(this._options.enableSplitViewResizing),he.renderSideBySide&&(this._options.renderSideBySide?this._setStrategy(new Q(this._createDataSource(),this._options.enableSplitViewResizing)):this._setStrategy(new pe(this._createDataSource(),this._options.enableSplitViewResizing)),this._containerDomElement.className=nt._getClassName(this._themeService.getColorTheme(),this._options.renderSideBySide)),he.renderOverviewRuler&&(this._options.renderOverviewRuler?this._containerDomElement.appendChild(this._overviewDomElement):this._containerDomElement.removeChild(this._overviewDomElement))}getModel(){return{original:this._originalEditor.getModel(),modified:this._modifiedEditor.getModel()}}setModel(z){if(z&&(!z.original||!z.modified))throw new Error(z.original?"DiffEditorWidget.setModel: Modified model is null":"DiffEditorWidget.setModel: Original model is null");this._cleanViewZonesAndDecorations(),this._originalEditor.setModel(z?z.original:null),this._modifiedEditor.setModel(z?z.modified:null),this._updateDecorationsRunner.cancel(),z&&(this._originalEditor.setScrollTop(0),this._modifiedEditor.setScrollTop(0)),this._diffComputationResult=null,this._diffComputationToken++,this._setState(0),z&&(this._recreateOverviewRulers(),this._beginUpdateDecorations()),this._layoutOverviewViewport()}getDomNode(){return this._domElement}getVisibleColumnFromPosition(z){return this._modifiedEditor.getVisibleColumnFromPosition(z)}getPosition(){return this._modifiedEditor.getPosition()}setPosition(z){this._modifiedEditor.setPosition(z)}revealLine(z,te=0){this._modifiedEditor.revealLine(z,te)}revealLineInCenter(z,te=0){this._modifiedEditor.revealLineInCenter(z,te)}revealLineInCenterIfOutsideViewport(z,te=0){this._modifiedEditor.revealLineInCenterIfOutsideViewport(z,te)}revealLineNearTop(z,te=0){this._modifiedEditor.revealLineNearTop(z,te)}revealPosition(z,te=0){this._modifiedEditor.revealPosition(z,te)}revealPositionInCenter(z,te=0){this._modifiedEditor.revealPositionInCenter(z,te)}revealPositionInCenterIfOutsideViewport(z,te=0){this._modifiedEditor.revealPositionInCenterIfOutsideViewport(z,te)}revealPositionNearTop(z,te=0){this._modifiedEditor.revealPositionNearTop(z,te)}getSelection(){return this._modifiedEditor.getSelection()}getSelections(){return this._modifiedEditor.getSelections()}setSelection(z){this._modifiedEditor.setSelection(z)}setSelections(z){this._modifiedEditor.setSelections(z)}revealLines(z,te,he=0){this._modifiedEditor.revealLines(z,te,he)}revealLinesInCenter(z,te,he=0){this._modifiedEditor.revealLinesInCenter(z,te,he)}revealLinesInCenterIfOutsideViewport(z,te,he=0){this._modifiedEditor.revealLinesInCenterIfOutsideViewport(z,te,he)}revealLinesNearTop(z,te,he=0){this._modifiedEditor.revealLinesNearTop(z,te,he)}revealRange(z,te=0,he=!1,ge=!0){this._modifiedEditor.revealRange(z,te,he,ge)}revealRangeInCenter(z,te=0){this._modifiedEditor.revealRangeInCenter(z,te)}revealRangeInCenterIfOutsideViewport(z,te=0){this._modifiedEditor.revealRangeInCenterIfOutsideViewport(z,te)}revealRangeNearTop(z,te=0){this._modifiedEditor.revealRangeNearTop(z,te)}revealRangeNearTopIfOutsideViewport(z,te=0){this._modifiedEditor.revealRangeNearTopIfOutsideViewport(z,te)}revealRangeAtTop(z,te=0){this._modifiedEditor.revealRangeAtTop(z,te)}getSupportedActions(){return this._modifiedEditor.getSupportedActions()}saveViewState(){const z=this._originalEditor.saveViewState(),te=this._modifiedEditor.saveViewState();return{original:z,modified:te}}restoreViewState(z){if(z&&z.original&&z.modified){const te=z;this._originalEditor.restoreViewState(te.original),this._modifiedEditor.restoreViewState(te.modified)}}layout(z){this._elementSizeObserver.observe(z)}focus(){this._modifiedEditor.focus()}hasTextFocus(){return this._originalEditor.hasTextFocus()||this._modifiedEditor.hasTextFocus()}trigger(z,te,he){this._modifiedEditor.trigger(z,te,he)}changeDecorations(z){return this._modifiedEditor.changeDecorations(z)}_onDidContainerSizeChanged(){this._doLayout()}_getReviewHeight(){return this._reviewPane.isVisible()?this._elementSizeObserver.getHeight():0}_layoutOverviewRulers(){if(!this._options.renderOverviewRuler||!this._originalOverviewRuler||!this._modifiedOverviewRuler)return;const z=this._elementSizeObserver.getHeight(),te=this._getReviewHeight(),he=nt.ENTIRE_DIFF_OVERVIEW_WIDTH-2*nt.ONE_OVERVIEW_WIDTH;this._modifiedEditor.getLayoutInfo()&&(this._originalOverviewRuler.setLayout({top:0,width:nt.ONE_OVERVIEW_WIDTH,right:he+nt.ONE_OVERVIEW_WIDTH,height:z-te}),this._modifiedOverviewRuler.setLayout({top:0,right:0,width:nt.ONE_OVERVIEW_WIDTH,height:z-te}))}_onViewZonesChanged(){this._currentlyChangingViewZones||this._updateDecorationsRunner.schedule()}_beginUpdateDecorationsSoon(){this._beginUpdateDecorationsTimeout!==-1&&(window.clearTimeout(this._beginUpdateDecorationsTimeout),this._beginUpdateDecorationsTimeout=-1),this._beginUpdateDecorationsTimeout=window.setTimeout(()=>this._beginUpdateDecorations(),nt.UPDATE_DIFF_DECORATIONS_DELAY)}static _equals(z,te){return!z&&!te?!0:!z||!te?!1:z.toString()===te.toString()}_beginUpdateDecorations(){this._beginUpdateDecorationsTimeout=-1;const z=this._originalEditor.getModel(),te=this._modifiedEditor.getModel();if(!z||!te)return;this._diffComputationToken++;const he=this._diffComputationToken,ge=this._options.maxFileSize*1024*1024,ve=Se=>{const Ee=Se.getValueLength();return ge===0||Ee<=ge};if(!ve(z)||!ve(te)){(!nt._equals(z.uri,this._lastOriginalWarning)||!nt._equals(te.uri,this._lastModifiedWarning))&&(this._lastOriginalWarning=z.uri,this._lastModifiedWarning=te.uri,this._notificationService.warn(w.localize(2,null)));return}this._setState(1),this._editorWorkerService.computeDiff(z.uri,te.uri,this._options.ignoreTrimWhitespace,this._options.maxComputationTime).then(Se=>{he===this._diffComputationToken&&z===this._originalEditor.getModel()&&te===this._modifiedEditor.getModel()&&(this._setState(2),this._diffComputationResult=Se,this._updateDecorationsRunner.schedule(),this._onDidUpdateDiff.fire())},Se=>{he===this._diffComputationToken&&z===this._originalEditor.getModel()&&te===this._modifiedEditor.getModel()&&(this._setState(2),this._diffComputationResult=null,this._updateDecorationsRunner.schedule())})}_cleanViewZonesAndDecorations(){this._originalEditorState.clean(this._originalEditor),this._modifiedEditorState.clean(this._modifiedEditor)}_updateDecorations(){if(!this._originalEditor.getModel()||!this._modifiedEditor.getModel())return;const z=this._diffComputationResult?this._diffComputationResult.changes:[],te=this._originalEditorState.getForeignViewZones(this._originalEditor.getWhitespaces()),he=this._modifiedEditorState.getForeignViewZones(this._modifiedEditor.getWhitespaces()),ge=this._strategy.getEditorsDiffDecorations(z,this._options.ignoreTrimWhitespace,this._options.renderIndicators,te,he);try{this._currentlyChangingViewZones=!0,this._originalEditorState.apply(this._originalEditor,this._originalOverviewRuler,ge.original,!1),this._modifiedEditorState.apply(this._modifiedEditor,this._modifiedOverviewRuler,ge.modified,!0)}finally{this._currentlyChangingViewZones=!1}}_adjustOptionsForSubEditor(z){const te=Object.assign({},z);return te.inDiffEditor=!0,te.automaticLayout=!1,te.scrollbar=Object.assign({},te.scrollbar||{}),te.scrollbar.vertical="visible",te.folding=!1,te.codeLens=this._options.diffCodeLens,te.fixedOverflowWidgets=!0,te.minimap=Object.assign({},te.minimap||{}),te.minimap.enabled=!1,te}_adjustOptionsForLeftHandSide(z){const te=this._adjustOptionsForSubEditor(z);return this._options.renderSideBySide?te.wordWrapOverride1=this._options.diffWordWrap:te.wordWrapOverride1="off",z.originalAriaLabel&&(te.ariaLabel=z.originalAriaLabel),te.readOnly=!this._options.originalEditable,te.extraEditorClassName="original-in-monaco-diff-editor",Object.assign(Object.assign({},te),{dimension:{height:0,width:0}})}_adjustOptionsForRightHandSide(z){const te=this._adjustOptionsForSubEditor(z);return z.modifiedAriaLabel&&(te.ariaLabel=z.modifiedAriaLabel),te.wordWrapOverride1=this._options.diffWordWrap,te.revealHorizontalRightPadding=u.EditorOptions.revealHorizontalRightPadding.defaultValue+nt.ENTIRE_DIFF_OVERVIEW_WIDTH,te.scrollbar.verticalHasArrows=!1,te.extraEditorClassName="modified-in-monaco-diff-editor",Object.assign(Object.assign({},te),{dimension:{height:0,width:0}})}doLayout(){this._elementSizeObserver.observe(),this._doLayout()}_doLayout(){const z=this._elementSizeObserver.getWidth(),te=this._elementSizeObserver.getHeight(),he=this._getReviewHeight(),ge=this._strategy.layout();this._originalDomNode.style.width=ge+"px",this._originalDomNode.style.left="0px",this._modifiedDomNode.style.width=z-ge+"px",this._modifiedDomNode.style.left=ge+"px",this._overviewDomElement.style.top="0px",this._overviewDomElement.style.height=te-he+"px",this._overviewDomElement.style.width=nt.ENTIRE_DIFF_OVERVIEW_WIDTH+"px",this._overviewDomElement.style.left=z-nt.ENTIRE_DIFF_OVERVIEW_WIDTH+"px",this._overviewViewportDomElement.setWidth(nt.ENTIRE_DIFF_OVERVIEW_WIDTH),this._overviewViewportDomElement.setHeight(30),this._originalEditor.layout({width:ge,height:te-he}),this._modifiedEditor.layout({width:z-ge-(this._options.renderOverviewRuler?nt.ENTIRE_DIFF_OVERVIEW_WIDTH:0),height:te-he}),(this._originalOverviewRuler||this._modifiedOverviewRuler)&&this._layoutOverviewRulers(),this._reviewPane.layout(te-he,z,he),this._layoutOverviewViewport()}_layoutOverviewViewport(){const z=this._computeOverviewViewport();z?(this._overviewViewportDomElement.setTop(z.top),this._overviewViewportDomElement.setHeight(z.height)):(this._overviewViewportDomElement.setTop(0),this._overviewViewportDomElement.setHeight(0))}_computeOverviewViewport(){const z=this._modifiedEditor.getLayoutInfo();if(!z)return null;const te=this._modifiedEditor.getScrollTop(),he=this._modifiedEditor.getScrollHeight(),ge=Math.max(0,z.height),ve=Math.max(0,ge-2*0),Se=he>0?ve/he:0,Ee=Math.max(0,Math.floor(z.height*Se)),Ae=Math.floor(te*Se);return{height:Ee,top:Ae}}_createDataSource(){return{getWidth:()=>this._elementSizeObserver.getWidth(),getHeight:()=>this._elementSizeObserver.getHeight()-this._getReviewHeight(),getOptions:()=>({renderOverviewRuler:this._options.renderOverviewRuler}),getContainerDomNode:()=>this._containerDomElement,relayoutEditors:()=>{this._doLayout()},getOriginalEditor:()=>this._originalEditor,getModifiedEditor:()=>this._modifiedEditor}}_setStrategy(z){this._strategy&&this._strategy.dispose(),this._strategy=z,z.applyColors(this._themeService.getColorTheme()),this._diffComputationResult&&this._updateDecorations(),this._doLayout()}_getLineChangeAtOrBeforeLineNumber(z,te){const he=this._diffComputationResult?this._diffComputationResult.changes:[];if(he.length===0||z<te(he[0]))return null;let ge=0,ve=he.length-1;for(;ge<ve;){const Se=Math.floor((ge+ve)/2),Ee=te(he[Se]),Ae=Se+1<=ve?te(he[Se+1]):1073741824;z<Ee?ve=Se-1:z>=Ae?ge=Se+1:(ge=Se,ve=Se)}return he[ge]}_getEquivalentLineForOriginalLineNumber(z){const te=this._getLineChangeAtOrBeforeLineNumber(z,Ae=>Ae.originalStartLineNumber);if(!te)return z;const he=te.originalStartLineNumber+(te.originalEndLineNumber>0?-1:0),ge=te.modifiedStartLineNumber+(te.modifiedEndLineNumber>0?-1:0),ve=te.originalEndLineNumber>0?te.originalEndLineNumber-te.originalStartLineNumber+1:0,Se=te.modifiedEndLineNumber>0?te.modifiedEndLineNumber-te.modifiedStartLineNumber+1:0,Ee=z-he;return Ee<=ve?ge+Math.min(Ee,Se):ge+Se-ve+Ee}_getEquivalentLineForModifiedLineNumber(z){const te=this._getLineChangeAtOrBeforeLineNumber(z,Ae=>Ae.modifiedStartLineNumber);if(!te)return z;const he=te.originalStartLineNumber+(te.originalEndLineNumber>0?-1:0),ge=te.modifiedStartLineNumber+(te.modifiedEndLineNumber>0?-1:0),ve=te.originalEndLineNumber>0?te.originalEndLineNumber-te.originalStartLineNumber+1:0,Se=te.modifiedEndLineNumber>0?te.modifiedEndLineNumber-te.modifiedStartLineNumber+1:0,Ee=z-ge;return Ee<=Se?he+Math.min(Ee,ve):he+ve-Se+Ee}getDiffLineInformationForOriginal(z){return this._diffComputationResult?{equivalentLineNumber:this._getEquivalentLineForOriginalLineNumber(z)}:null}getDiffLineInformationForModified(z){return this._diffComputationResult?{equivalentLineNumber:this._getEquivalentLineForModifiedLineNumber(z)}:null}};oe.ONE_OVERVIEW_WIDTH=15,oe.ENTIRE_DIFF_OVERVIEW_WIDTH=30,oe.UPDATE_DIFF_DECORATIONS_DELAY=200,oe=Fe([Ce(3,P.IClipboardService),Ce(4,i.IEditorWorkerService),Ce(5,_.IContextKeyService),Ce(6,b.IInstantiationService),Ce(7,t.ICodeEditorService),Ce(8,I.IThemeService),Ce(9,m.INotificationService),Ce(10,k.IContextMenuService),Ce(11,A.IEditorProgressService)],oe),e.DiffEditorWidget=oe;class G extends C.Disposable{constructor(z){super();this._dataSource=z,this._insertColor=null,this._removeColor=null}applyColors(z){const te=(z.getColor(E.diffInserted)||E.defaultInsertColor).transparent(2),he=(z.getColor(E.diffRemoved)||E.defaultRemoveColor).transparent(2),ge=!te.equals(this._insertColor)||!he.equals(this._removeColor);return this._insertColor=te,this._removeColor=he,ge}getEditorsDiffDecorations(z,te,he,ge,ve){ve=ve.sort((Ne,ze)=>Ne.afterLineNumber-ze.afterLineNumber),ge=ge.sort((Ne,ze)=>Ne.afterLineNumber-ze.afterLineNumber);const Se=this._getViewZones(z,ge,ve,he),Ee=this._getOriginalEditorDecorations(z,te,he),Ae=this._getModifiedEditorDecorations(z,te,he);return{original:{decorations:Ee.decorations,overviewZones:Ee.overviewZones,zones:Se.original},modified:{decorations:Ae.decorations,overviewZones:Ae.overviewZones,zones:Se.modified}}}}class x{constructor(z){this._source=z,this._index=-1,this.current=null,this.advance()}advance(){this._index++,this._index<this._source.length?this.current=this._source[this._index]:this.current=null}}class U{constructor(z,te,he,ge,ve){this._lineChanges=z,this._originalForeignVZ=te,this._modifiedForeignVZ=he,this._originalEditor=ge,this._modifiedEditor=ve}static _getViewLineCount(z,te,he){const ge=z.getModel(),ve=z._getViewModel();if(ge&&ve){const Se=ne(ge,ve,te,he);return Se.endLineNumber-Se.startLineNumber+1}return he-te+1}getViewZones(){const z=this._originalEditor.getOption(58),te=this._modifiedEditor.getOption(58),he=this._originalEditor.getOption(130).wrappingColumn!==-1,ge=this._modifiedEditor.getOption(130).wrappingColumn!==-1,ve=he||ge,Se=this._originalEditor.getModel(),Ee=this._originalEditor._getViewModel().coordinatesConverter,Ae=this._modifiedEditor._getViewModel().coordinatesConverter,Ne={original:[],modified:[]};let ze=0,xe=0,We=0,Ue=0,Le=0,ye=0;const Oe=(Me,me)=>Me.afterLineNumber-me.afterLineNumber,He=(Me,me)=>{if(me.domNode===null&&Me.length>0){const be=Me[Me.length-1];if(be.afterLineNumber===me.afterLineNumber&&be.domNode===null){be.heightInLines+=me.heightInLines;return}}Me.push(me)},Be=new x(this._modifiedForeignVZ),Ke=new x(this._originalForeignVZ);let ke=1,Ie=1;for(let Me=0,me=this._lineChanges.length;Me<=me;Me++){const be=Me<me?this._lineChanges[Me]:null;be!==null?(We=be.originalStartLineNumber+(be.originalEndLineNumber>0?-1:0),Ue=be.modifiedStartLineNumber+(be.modifiedEndLineNumber>0?-1:0),xe=be.originalEndLineNumber>0?U._getViewLineCount(this._originalEditor,be.originalStartLineNumber,be.originalEndLineNumber):0,ze=be.modifiedEndLineNumber>0?U._getViewLineCount(this._modifiedEditor,be.modifiedStartLineNumber,be.modifiedEndLineNumber):0,Le=Math.max(be.originalStartLineNumber,be.originalEndLineNumber),ye=Math.max(be.modifiedStartLineNumber,be.modifiedEndLineNumber)):(We+=1e7+xe,Ue+=1e7+ze,Le=We,ye=Ue);let De=[],we=[];if(ve){let Te;be?be.originalEndLineNumber>0?Te=be.originalStartLineNumber-ke:Te=be.modifiedStartLineNumber-Ie:Te=Se.getLineCount()-ke;for(let Ve=0;Ve<Te;Ve++){const je=ke+Ve,qe=Ie+Ve,Ge=Ee.getModelLineViewLineCount(je),Ze=Ae.getModelLineViewLineCount(qe);Ge<Ze?De.push({afterLineNumber:je,heightInLines:Ze-Ge,domNode:null,marginDomNode:null}):Ge>Ze&&we.push({afterLineNumber:qe,heightInLines:Ge-Ze,domNode:null,marginDomNode:null})}be&&(ke=(be.originalEndLineNumber>0?be.originalEndLineNumber:be.originalStartLineNumber)+1,Ie=(be.modifiedEndLineNumber>0?be.modifiedEndLineNumber:be.modifiedStartLineNumber)+1)}for(;Be.current&&Be.current.afterLineNumber<=ye;){let Te;Be.current.afterLineNumber<=Ue?Te=We-Ue+Be.current.afterLineNumber:Te=Le;let Ve=null;be&&be.modifiedStartLineNumber<=Be.current.afterLineNumber&&Be.current.afterLineNumber<=be.modifiedEndLineNumber&&(Ve=this._createOriginalMarginDomNodeForModifiedForeignViewZoneInAddedRegion()),De.push({afterLineNumber:Te,heightInLines:Be.current.height/te,domNode:null,marginDomNode:Ve}),Be.advance()}for(;Ke.current&&Ke.current.afterLineNumber<=Le;){let Te;Ke.current.afterLineNumber<=We?Te=Ue-We+Ke.current.afterLineNumber:Te=ye,we.push({afterLineNumber:Te,heightInLines:Ke.current.height/z,domNode:null}),Ke.advance()}if(be!==null&&ie(be)){const Te=this._produceOriginalFromDiff(be,xe,ze);Te&&De.push(Te)}if(be!==null&&ae(be)){const Te=this._produceModifiedFromDiff(be,xe,ze);Te&&we.push(Te)}let _e=0,Pe=0;for(De=De.sort(Oe),we=we.sort(Oe);_e<De.length&&Pe<we.length;){const Te=De[_e],Ve=we[Pe],je=Te.afterLineNumber-We,qe=Ve.afterLineNumber-Ue;je<qe?(He(Ne.original,Te),_e++):qe<je?(He(Ne.modified,Ve),Pe++):Te.shouldNotShrink?(He(Ne.original,Te),_e++):Ve.shouldNotShrink?(He(Ne.modified,Ve),Pe++):Te.heightInLines>=Ve.heightInLines?(Te.heightInLines-=Ve.heightInLines,Pe++):(Ve.heightInLines-=Te.heightInLines,_e++)}for(;_e<De.length;)He(Ne.original,De[_e]),_e++;for(;Pe<we.length;)He(Ne.modified,we[Pe]),Pe++}return{original:U._ensureDomNodes(Ne.original),modified:U._ensureDomNodes(Ne.modified)}}static _ensureDomNodes(z){return z.map(te=>(te.domNode||(te.domNode=q()),te))}}function $(de,z,te,he,ge){return{range:new d.Range(de,z,te,he),options:ge}}const V={charDelete:o.ModelDecorationOptions.register({description:"diff-editor-char-delete",className:"char-delete"}),charDeleteWholeLine:o.ModelDecorationOptions.register({description:"diff-editor-char-delete-whole-line",className:"char-delete",isWholeLine:!0}),charInsert:o.ModelDecorationOptions.register({description:"diff-editor-char-insert",className:"char-insert"}),charInsertWholeLine:o.ModelDecorationOptions.register({description:"diff-editor-char-insert-whole-line",className:"char-insert",isWholeLine:!0}),lineInsert:o.ModelDecorationOptions.register({description:"diff-editor-line-insert",className:"line-insert",marginClassName:"line-insert",isWholeLine:!0}),lineInsertWithSign:o.ModelDecorationOptions.register({description:"diff-editor-line-insert-with-sign",className:"line-insert",linesDecorationsClassName:"insert-sign "+I.ThemeIcon.asClassName(X),marginClassName:"line-insert",isWholeLine:!0}),lineDelete:o.ModelDecorationOptions.register({description:"diff-editor-line-delete",className:"line-delete",marginClassName:"line-delete",isWholeLine:!0}),lineDeleteWithSign:o.ModelDecorationOptions.register({description:"diff-editor-line-delete-with-sign",className:"line-delete",linesDecorationsClassName:"delete-sign "+I.ThemeIcon.asClassName(Z),marginClassName:"line-delete",isWholeLine:!0}),lineDeleteMargin:o.ModelDecorationOptions.register({description:"diff-editor-line-delete-margin",marginClassName:"line-delete"})};class Q extends G{constructor(z,te){super(z);this._disableSash=te===!1,this._sashRatio=null,this._sashPosition=null,this._startSashPosition=null,this._sash=this._register(new D.Sash(this._dataSource.getContainerDomNode(),this,{orientation:0})),this._disableSash&&(this._sash.state=0),this._sash.onDidStart(()=>this._onSashDragStart()),this._sash.onDidChange(he=>this._onSashDrag(he)),this._sash.onDidEnd(()=>this._onSashDragEnd()),this._sash.onDidReset(()=>this._onSashReset())}setEnableSplitViewResizing(z){const te=z===!1;this._disableSash!==te&&(this._disableSash=te,this._sash.state=this._disableSash?0:3)}layout(z=this._sashRatio){const he=this._dataSource.getWidth()-(this._dataSource.getOptions().renderOverviewRuler?oe.ENTIRE_DIFF_OVERVIEW_WIDTH:0);let ge=Math.floor((z||.5)*he);const ve=Math.floor(.5*he);return ge=this._disableSash?ve:ge||ve,he>Q.MINIMUM_EDITOR_WIDTH*2?(ge<Q.MINIMUM_EDITOR_WIDTH&&(ge=Q.MINIMUM_EDITOR_WIDTH),ge>he-Q.MINIMUM_EDITOR_WIDTH&&(ge=he-Q.MINIMUM_EDITOR_WIDTH)):ge=ve,this._sashPosition!==ge&&(this._sashPosition=ge,this._sash.layout()),this._sashPosition}_onSashDragStart(){this._startSashPosition=this._sashPosition}_onSashDrag(z){const he=this._dataSource.getWidth()-(this._dataSource.getOptions().renderOverviewRuler?oe.ENTIRE_DIFF_OVERVIEW_WIDTH:0),ge=this.layout((this._startSashPosition+(z.currentX-z.startX))/he);this._sashRatio=ge/he,this._dataSource.relayoutEditors()}_onSashDragEnd(){this._sash.layout()}_onSashReset(){this._sashRatio=.5,this._dataSource.relayoutEditors(),this._sash.layout()}getVerticalSashTop(z){return 0}getVerticalSashLeft(z){return this._sashPosition}getVerticalSashHeight(z){return this._dataSource.getHeight()}_getViewZones(z,te,he){const ge=this._dataSource.getOriginalEditor(),ve=this._dataSource.getModifiedEditor();return new ue(z,te,he,ge,ve).getViewZones()}_getOriginalEditorDecorations(z,te,he){const ge=this._dataSource.getOriginalEditor(),ve=String(this._removeColor),Se={decorations:[],overviewZones:[]},Ee=ge.getModel(),Ae=ge._getViewModel();for(const Ne of z)if(ae(Ne)){Se.decorations.push({range:new d.Range(Ne.originalStartLineNumber,1,Ne.originalEndLineNumber,1073741824),options:he?V.lineDeleteWithSign:V.lineDelete}),(!ie(Ne)||!Ne.charChanges)&&Se.decorations.push($(Ne.originalStartLineNumber,1,Ne.originalEndLineNumber,1073741824,V.charDeleteWholeLine));const ze=ne(Ee,Ae,Ne.originalStartLineNumber,Ne.originalEndLineNumber);if(Se.overviewZones.push(new l.OverviewRulerZone(ze.startLineNumber,ze.endLineNumber,ve)),Ne.charChanges){for(const xe of Ne.charChanges)if(ae(xe))if(te)for(let We=xe.originalStartLineNumber;We<=xe.originalEndLineNumber;We++){let Ue,Le;We===xe.originalStartLineNumber?Ue=xe.originalStartColumn:Ue=Ee.getLineFirstNonWhitespaceColumn(We),We===xe.originalEndLineNumber?Le=xe.originalEndColumn:Le=Ee.getLineLastNonWhitespaceColumn(We),Se.decorations.push($(We,Ue,We,Le,V.charDelete))}else Se.decorations.push($(xe.originalStartLineNumber,xe.originalStartColumn,xe.originalEndLineNumber,xe.originalEndColumn,V.charDelete))}}return Se}_getModifiedEditorDecorations(z,te,he){const ge=this._dataSource.getModifiedEditor(),ve=String(this._insertColor),Se={decorations:[],overviewZones:[]},Ee=ge.getModel(),Ae=ge._getViewModel();for(const Ne of z)if(ie(Ne)){Se.decorations.push({range:new d.Range(Ne.modifiedStartLineNumber,1,Ne.modifiedEndLineNumber,1073741824),options:he?V.lineInsertWithSign:V.lineInsert}),(!ae(Ne)||!Ne.charChanges)&&Se.decorations.push($(Ne.modifiedStartLineNumber,1,Ne.modifiedEndLineNumber,1073741824,V.charInsertWholeLine));const ze=ne(Ee,Ae,Ne.modifiedStartLineNumber,Ne.modifiedEndLineNumber);if(Se.overviewZones.push(new l.OverviewRulerZone(ze.startLineNumber,ze.endLineNumber,ve)),Ne.charChanges){for(const xe of Ne.charChanges)if(ie(xe))if(te)for(let We=xe.modifiedStartLineNumber;We<=xe.modifiedEndLineNumber;We++){let Ue,Le;We===xe.modifiedStartLineNumber?Ue=xe.modifiedStartColumn:Ue=Ee.getLineFirstNonWhitespaceColumn(We),We===xe.modifiedEndLineNumber?Le=xe.modifiedEndColumn:Le=Ee.getLineLastNonWhitespaceColumn(We),Se.decorations.push($(We,Ue,We,Le,V.charInsert))}else Se.decorations.push($(xe.modifiedStartLineNumber,xe.modifiedStartColumn,xe.modifiedEndLineNumber,xe.modifiedEndColumn,V.charInsert))}}return Se}}Q.MINIMUM_EDITOR_WIDTH=100;class ue extends U{constructor(z,te,he,ge,ve){super(z,te,he,ge,ve)}_createOriginalMarginDomNodeForModifiedForeignViewZoneInAddedRegion(){return null}_produceOriginalFromDiff(z,te,he){return he>te?{afterLineNumber:Math.max(z.originalStartLineNumber,z.originalEndLineNumber),heightInLines:he-te,domNode:null}:null}_produceModifiedFromDiff(z,te,he){return te>he?{afterLineNumber:Math.max(z.modifiedStartLineNumber,z.modifiedEndLineNumber),heightInLines:te-he,domNode:null}:null}}class pe extends G{constructor(z,te){super(z);this._decorationsLeft=z.getOriginalEditor().getLayoutInfo().decorationsLeft,this._register(z.getOriginalEditor().onDidLayoutChange(he=>{this._decorationsLeft!==he.decorationsLeft&&(this._decorationsLeft=he.decorationsLeft,z.relayoutEditors())}))}setEnableSplitViewResizing(z){}_getViewZones(z,te,he,ge){const ve=this._dataSource.getOriginalEditor(),Se=this._dataSource.getModifiedEditor();return new fe(z,te,he,ve,Se,ge).getViewZones()}_getOriginalEditorDecorations(z,te,he){const ge=String(this._removeColor),ve={decorations:[],overviewZones:[]},Se=this._dataSource.getOriginalEditor(),Ee=Se.getModel(),Ae=Se._getViewModel();for(const Ne of z)if(ae(Ne)){ve.decorations.push({range:new d.Range(Ne.originalStartLineNumber,1,Ne.originalEndLineNumber,1073741824),options:V.lineDeleteMargin});const ze=ne(Ee,Ae,Ne.originalStartLineNumber,Ne.originalEndLineNumber);ve.overviewZones.push(new l.OverviewRulerZone(ze.startLineNumber,ze.endLineNumber,ge))}return ve}_getModifiedEditorDecorations(z,te,he){const ge=this._dataSource.getModifiedEditor(),ve=String(this._insertColor),Se={decorations:[],overviewZones:[]},Ee=ge.getModel(),Ae=ge._getViewModel();for(const Ne of z)if(ie(Ne)){Se.decorations.push({range:new d.Range(Ne.modifiedStartLineNumber,1,Ne.modifiedEndLineNumber,1073741824),options:he?V.lineInsertWithSign:V.lineInsert});const ze=ne(Ee,Ae,Ne.modifiedStartLineNumber,Ne.modifiedEndLineNumber);if(Se.overviewZones.push(new l.OverviewRulerZone(ze.startLineNumber,ze.endLineNumber,ve)),Ne.charChanges){for(const xe of Ne.charChanges)if(ie(xe))if(te)for(let We=xe.modifiedStartLineNumber;We<=xe.modifiedEndLineNumber;We++){let Ue,Le;We===xe.modifiedStartLineNumber?Ue=xe.modifiedStartColumn:Ue=Ee.getLineFirstNonWhitespaceColumn(We),We===xe.modifiedEndLineNumber?Le=xe.modifiedEndColumn:Le=Ee.getLineLastNonWhitespaceColumn(We),Se.decorations.push($(We,Ue,We,Le,V.charInsert))}else Se.decorations.push($(xe.modifiedStartLineNumber,xe.modifiedStartColumn,xe.modifiedEndLineNumber,xe.modifiedEndColumn,V.charInsert))}else Se.decorations.push($(Ne.modifiedStartLineNumber,1,Ne.modifiedEndLineNumber,1073741824,V.charInsertWholeLine))}return Se}layout(){return Math.max(5,this._decorationsLeft)}}class fe extends U{constructor(z,te,he,ge,ve,Se){super(z,te,he,ge,ve);this._originalModel=ge.getModel(),this._renderIndicators=Se,this._pendingLineChange=[],this._pendingViewZones=[],this._lineBreaksComputer=this._modifiedEditor._getViewModel().createLineBreaksComputer()}getViewZones(){const z=super.getViewZones();return this._finalize(z),z}_createOriginalMarginDomNodeForModifiedForeignViewZoneInAddedRegion(){const z=document.createElement("div");return z.className="inline-added-margin-view-zone",z}_produceOriginalFromDiff(z,te,he){const ge=document.createElement("div");return ge.className="inline-added-margin-view-zone",{afterLineNumber:Math.max(z.originalStartLineNumber,z.originalEndLineNumber),heightInLines:he,domNode:document.createElement("div"),marginDomNode:ge}}_produceModifiedFromDiff(z,te,he){const ge=document.createElement("div");ge.className=`view-lines line-delete ${B.MOUSE_CURSOR_TEXT_CSS_CLASS_NAME}`;const ve=document.createElement("div");ve.className="inline-deleted-margin-view-zone";const Se={shouldNotShrink:!0,afterLineNumber:z.modifiedEndLineNumber===0?z.modifiedStartLineNumber:z.modifiedStartLineNumber-1,heightInLines:te,minWidthInPx:0,domNode:ge,marginDomNode:ve,diff:{originalStartLineNumber:z.originalStartLineNumber,originalEndLineNumber:z.originalEndLineNumber,modifiedStartLineNumber:z.modifiedStartLineNumber,modifiedEndLineNumber:z.modifiedEndLineNumber,originalModel:this._originalModel,viewLineCounts:null}};for(let Ee=z.originalStartLineNumber;Ee<=z.originalEndLineNumber;Ee++)this._lineBreaksComputer.addRequest(this._originalModel.getLineContent(Ee),null,null);return this._pendingLineChange.push(z),this._pendingViewZones.push(Se),Se}_finalize(z){const te=this._modifiedEditor.getOptions(),he=this._modifiedEditor.getModel().getOptions().tabSize,ge=te.get(43),ve=te.get(29),Se=ge.typicalHalfwidthCharacterWidth,Ee=te.get(92),Ae=this._originalModel.mightContainNonBasicASCII(),Ne=this._originalModel.mightContainRTL(),ze=te.get(58),We=te.get(129).decorationsWidth,Ue=te.get(104),Le=te.get(87),ye=te.get(82),Oe=te.get(44),He=this._lineBreaksComputer.finalize();let Be=0;for(let Ke=0;Ke<this._pendingLineChange.length;Ke++){const ke=this._pendingLineChange[Ke],Ie=this._pendingViewZones[Ke],Me=Ie.domNode;n.Configuration.applyFontInfoSlow(Me,ge);const me=Ie.marginDomNode;n.Configuration.applyFontInfoSlow(me,ge);const be=[];if(ke.charChanges)for(const qe of ke.charChanges)ae(qe)&&be.push(new y.InlineDecoration(new d.Range(qe.originalStartLineNumber,qe.originalStartColumn,qe.originalEndLineNumber,qe.originalEndColumn),"char-delete",0));const De=be.length>0,we=(0,a.createStringBuilder)(1e4);let _e=0,Pe=0,Te=null;for(let qe=ke.originalStartLineNumber;qe<=ke.originalEndLineNumber;qe++){const Ge=qe-ke.originalStartLineNumber,Ze=this._originalModel.getLineTokens(qe),$e=Ze.getLineContent(),Je=He[Be++],Ye=h.LineDecoration.filter(be,qe,1,$e.length+1);if(Je){let et=0;for(const Qe of Je.breakOffsets){const rt=Ze.sliceAndInflate(et,Qe,0),mt=$e.substring(et,Qe);_e=Math.max(_e,this._renderOriginalLine(Pe++,mt,rt,h.LineDecoration.extractWrapped(Ye,et,Qe),De,Ae,Ne,ge,ve,ze,We,Ue,Le,ye,Oe,he,we,me)),et=Qe}for(Te||(Te=[]);Te.length<Ge;)Te[Te.length]=1;Te[Ge]=Je.breakOffsets.length,Ie.heightInLines+=Je.breakOffsets.length-1;const it=document.createElement("div");it.className="line-delete",z.original.push({afterLineNumber:qe,afterColumn:0,heightInLines:Je.breakOffsets.length-1,domNode:q(),marginDomNode:it})}else _e=Math.max(_e,this._renderOriginalLine(Pe++,$e,Ze,Ye,De,Ae,Ne,ge,ve,ze,We,Ue,Le,ye,Oe,he,we,me))}_e+=Ee;const Ve=we.build(),je=se?se.createHTML(Ve):Ve;if(Me.innerHTML=je,Ie.minWidthInPx=_e*Se,Te){const qe=ke.originalEndLineNumber-ke.originalStartLineNumber;for(;Te.length<=qe;)Te[Te.length]=1}Ie.diff.viewLineCounts=Te}z.original.sort((Ke,ke)=>Ke.afterLineNumber-ke.afterLineNumber)}_renderOriginalLine(z,te,he,ge,ve,Se,Ee,Ae,Ne,ze,xe,We,Ue,Le,ye,Oe,He,Be){He.appendASCIIString('<div class="view-line'),ve||He.appendASCIIString(" char-delete"),He.appendASCIIString('" style="top:'),He.appendASCIIString(String(z*ze)),He.appendASCIIString('px;width:1000000px;">');const Ke=y.ViewLineRenderingData.isBasicASCII(te,Se),ke=y.ViewLineRenderingData.containsRTL(te,Ke,Ee),Ie=(0,f.renderViewLine)(new f.RenderLineInput(Ae.isMonospace&&!Ne,Ae.canUseHalfwidthRightwardsArrow,te,!1,Ke,ke,0,he,ge,Oe,0,Ae.spaceWidth,Ae.middotWidth,Ae.wsmiddotWidth,We,Ue,Le,ye!==u.EditorFontLigatures.OFF,null),He);if(He.appendASCIIString("</div>"),this._renderIndicators){const Me=document.createElement("div");Me.className=`delete-sign ${I.ThemeIcon.asClassName(Z)}`,Me.setAttribute("style",`position:absolute;top:${z*ze}px;width:${xe}px;height:${ze}px;right:0;`),Be.appendChild(Me)}return Ie.characterMapping.getAbsoluteOffset(Ie.characterMapping.length)}}function re(de,z){return(0,u.stringSet)(de,z,["off","on","inherit"])}function ie(de){return de.modifiedEndLineNumber>0}function ae(de){return de.originalEndLineNumber>0}function q(){const de=document.createElement("div");return de.className="diagonal-fill",de}function ne(de,z,te,he){const ge=de.getLineCount();return te=Math.min(ge,Math.max(1,te)),he=Math.min(ge,Math.max(1,he)),z.coordinatesConverter.convertModelRangeToViewRange(new d.Range(te,de.getLineMinColumn(te),he,de.getLineMaxColumn(he)))}function ce(de,z){return{enableSplitViewResizing:(0,u.boolean)(de.enableSplitViewResizing,z.enableSplitViewResizing),renderSideBySide:(0,u.boolean)(de.renderSideBySide,z.renderSideBySide),maxComputationTime:(0,u.clampedInt)(de.maxComputationTime,z.maxComputationTime,0,1073741824),maxFileSize:(0,u.clampedInt)(de.maxFileSize,z.maxFileSize,0,1073741824),ignoreTrimWhitespace:(0,u.boolean)(de.ignoreTrimWhitespace,z.ignoreTrimWhitespace),renderIndicators:(0,u.boolean)(de.renderIndicators,z.renderIndicators),originalEditable:(0,u.boolean)(de.originalEditable,z.originalEditable),diffCodeLens:(0,u.boolean)(de.diffCodeLens,z.diffCodeLens),renderOverviewRuler:(0,u.boolean)(de.renderOverviewRuler,z.renderOverviewRuler),diffWordWrap:re(de.diffWordWrap,z.diffWordWrap)}}function le(de,z){return{enableSplitViewResizing:de.enableSplitViewResizing!==z.enableSplitViewResizing,renderSideBySide:de.renderSideBySide!==z.renderSideBySide,maxComputationTime:de.maxComputationTime!==z.maxComputationTime,maxFileSize:de.maxFileSize!==z.maxFileSize,ignoreTrimWhitespace:de.ignoreTrimWhitespace!==z.ignoreTrimWhitespace,renderIndicators:de.renderIndicators!==z.renderIndicators,originalEditable:de.originalEditable!==z.originalEditable,diffCodeLens:de.diffCodeLens!==z.diffCodeLens,renderOverviewRuler:de.renderOverviewRuler!==z.renderOverviewRuler,diffWordWrap:de.diffWordWrap!==z.diffWordWrap}}(0,I.registerThemingParticipant)((de,z)=>{const te=de.getColor(E.diffInserted);te&&(z.addRule(`.monaco-editor .line-insert, .monaco-editor .char-insert { background-color: ${te}; }`),z.addRule(`.monaco-diff-editor .line-insert, .monaco-diff-editor .char-insert { background-color: ${te}; }`),z.addRule(`.monaco-editor .inline-added-margin-view-zone { background-color: ${te}; }`));const he=de.getColor(E.diffRemoved);he&&(z.addRule(`.monaco-editor .line-delete, .monaco-editor .char-delete { background-color: ${he}; }`),z.addRule(`.monaco-diff-editor .line-delete, .monaco-diff-editor .char-delete { background-color: ${he}; }`),z.addRule(`.monaco-editor .inline-deleted-margin-view-zone { background-color: ${he}; }`));const ge=de.getColor(E.diffInsertedOutline);ge&&z.addRule(`.monaco-editor .line-insert, .monaco-editor .char-insert { border: 1px ${de.type==="hc"?"dashed":"solid"} ${ge}; }`);const ve=de.getColor(E.diffRemovedOutline);ve&&z.addRule(`.monaco-editor .line-delete, .monaco-editor .char-delete { border: 1px ${de.type==="hc"?"dashed":"solid"} ${ve}; }`);const Se=de.getColor(E.scrollbarShadow);Se&&z.addRule(`.monaco-diff-editor.side-by-side .editor.modified { box-shadow: -6px 0 5px -5px ${Se}; }`);const Ee=de.getColor(E.diffBorder);Ee&&z.addRule(`.monaco-diff-editor.side-by-side .editor.modified { border-left: 1px solid ${Ee}; }`);const Ae=de.getColor(E.scrollbarSliderBackground);Ae&&z.addRule(`
            .monaco-diff-editor .diffViewport {
                background: ${Ae};
            }
        `);const Ne=de.getColor(E.scrollbarSliderHoverBackground);Ne&&z.addRule(`
            .monaco-diff-editor .diffViewport:hover {
                background: ${Ne};
            }
        `);const ze=de.getColor(E.scrollbarSliderActiveBackground);ze&&z.addRule(`
            .monaco-diff-editor .diffViewport:active {
                background: ${ze};
            }
        `);const xe=de.getColor(E.diffDiagonalFill);z.addRule(`
    .monaco-editor .diagonal-fill {
        background-image: linear-gradient(
            -45deg,
            ${xe} 12.5%,
            #0000 12.5%, #0000 50%,
            ${xe} 50%, ${xe} 62.5%,
            #0000 62.5%, #0000 100%
        );
        background-size: 8px 8px;
    }
    `)})}),define(J[158],ee([0,1,38,28,157,26,15,9,36,10,61]),function(j,e,w,N,T,D,S,p,C,n,g){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EmbeddedCodeEditorWidget=void 0;let t=class extends T.CodeEditorWidget{constructor(c,u,d,a,r,o,i,l,h,f){super(c,Object.assign(Object.assign({},d.getRawOptions()),{overflowWidgetsDomNode:d.getOverflowWidgetsDomNode()}),{},a,r,o,i,l,h,f);this._parentEditor=d,this._overwriteOptions=u,super.updateOptions(this._overwriteOptions),this._register(d.onDidChangeConfiguration(y=>this._onParentConfigurationChanged(y)))}getParentEditor(){return this._parentEditor}_onParentConfigurationChanged(c){super.updateOptions(this._parentEditor.getRawOptions()),super.updateOptions(this._overwriteOptions)}updateOptions(c){w.mixin(this._overwriteOptions,c,!0),super.updateOptions(this._overwriteOptions)}};t=Fe([Ce(3,p.IInstantiationService),Ce(4,N.ICodeEditorService),Ce(5,D.ICommandService),Ce(6,S.IContextKeyService),Ce(7,n.IThemeService),Ce(8,C.INotificationService),Ce(9,g.IAccessibilityService)],t),e.EmbeddedCodeEditorWidget=t}),define(J[669],ee([0,1,14,2,16,13,3,22,25,49,32,46,483,35,21,10,355]),function(j,e,w,N,T,D,S,p,C,n,g,t,s,c,u,d){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BracketMatchingController=void 0;const a=(0,u.registerColor)("editorOverviewRuler.bracketMatchForeground",{dark:"#A0A0A0",light:"#A0A0A0",hc:"#A0A0A0"},s.localize(0,null));class r extends T.EditorAction{constructor(){super({id:"editor.action.jumpToBracket",label:s.localize(1,null),alias:"Go to Bracket",precondition:void 0,kbOpts:{kbExpr:C.EditorContextKeys.editorTextFocus,primary:2048|1024|88,weight:100}})}run(f,y){let _=l.get(y);!_||_.jumpToBracket()}}class o extends T.EditorAction{constructor(){super({id:"editor.action.selectToBracket",label:s.localize(2,null),alias:"Select to Bracket",precondition:void 0,description:{description:"Select to Bracket",args:[{name:"args",schema:{type:"object",properties:{selectBrackets:{type:"boolean",default:!0}}}}]}})}run(f,y,_){const b=l.get(y);if(!b)return;let v=!0;_&&_.selectBrackets===!1&&(v=!1),b.selectToBracket(v)}}class i{constructor(f,y,_){this.position=f,this.brackets=y,this.options=_}}class l extends N.Disposable{constructor(f){super();this._editor=f,this._lastBracketsData=[],this._lastVersionId=0,this._decorations=[],this._updateBracketsSoon=this._register(new w.RunOnceScheduler(()=>this._updateBrackets(),50)),this._matchBrackets=this._editor.getOption(63),this._updateBracketsSoon.schedule(),this._register(f.onDidChangeCursorPosition(y=>{this._matchBrackets!=="never"&&this._updateBracketsSoon.schedule()})),this._register(f.onDidChangeModelContent(y=>{this._updateBracketsSoon.schedule()})),this._register(f.onDidChangeModel(y=>{this._lastBracketsData=[],this._decorations=[],this._updateBracketsSoon.schedule()})),this._register(f.onDidChangeModelLanguageConfiguration(y=>{this._lastBracketsData=[],this._updateBracketsSoon.schedule()})),this._register(f.onDidChangeConfiguration(y=>{y.hasChanged(63)&&(this._matchBrackets=this._editor.getOption(63),this._decorations=this._editor.deltaDecorations(this._decorations,[]),this._lastBracketsData=[],this._lastVersionId=0,this._updateBracketsSoon.schedule())})),this._register(f.onDidBlurEditorWidget(()=>{this._updateBracketsSoon.schedule()})),this._register(f.onDidFocusEditorWidget(()=>{this._updateBracketsSoon.schedule()}))}static get(f){return f.getContribution(l.ID)}jumpToBracket(){if(!this._editor.hasModel())return;const f=this._editor.getModel(),y=this._editor.getSelections().map(_=>{const b=_.getStartPosition(),v=f.matchBracket(b);let m=null;if(v)v[0].containsPosition(b)?m=v[1].getStartPosition():v[1].containsPosition(b)&&(m=v[0].getStartPosition());else{const E=f.findEnclosingBrackets(b);if(E)m=E[0].getStartPosition();else{const I=f.findNextBracket(b);I&&I.range&&(m=I.range.getStartPosition())}}return m?new p.Selection(m.lineNumber,m.column,m.lineNumber,m.column):new p.Selection(b.lineNumber,b.column,b.lineNumber,b.column)});this._editor.setSelections(y),this._editor.revealRange(y[0])}selectToBracket(f){if(!this._editor.hasModel())return;const y=this._editor.getModel(),_=[];this._editor.getSelections().forEach(b=>{const v=b.getStartPosition();let m=y.matchBracket(v);if(!m&&(m=y.findEnclosingBrackets(v),!m)){const k=y.findNextBracket(v);k&&k.range&&(m=y.matchBracket(k.range.getStartPosition()))}let E=null,I=null;if(m){m.sort(S.Range.compareRangesUsingStarts);const[k,M]=m;if(E=f?k.getStartPosition():k.getEndPosition(),I=f?M.getEndPosition():M.getStartPosition(),M.containsPosition(v)){const P=E;E=I,I=P}}E&&I&&_.push(new p.Selection(E.lineNumber,E.column,I.lineNumber,I.column))}),_.length>0&&(this._editor.setSelections(_),this._editor.revealRange(_[0]))}_updateBrackets(){if(this._matchBrackets==="never")return;this._recomputeBrackets();let f=[],y=0;for(const _ of this._lastBracketsData){let b=_.brackets;b&&(f[y++]={range:b[0],options:_.options},f[y++]={range:b[1],options:_.options})}this._decorations=this._editor.deltaDecorations(this._decorations,f)}_recomputeBrackets(){if(!this._editor.hasModel()||!this._editor.hasWidgetFocus()){this._lastBracketsData=[],this._lastVersionId=0;return}const f=this._editor.getSelections();if(f.length>100){this._lastBracketsData=[],this._lastVersionId=0;return}const y=this._editor.getModel(),_=y.getVersionId();let b=[];this._lastVersionId===_&&(b=this._lastBracketsData);let v=[],m=0;for(let P=0,F=f.length;P<F;P++){let R=f[P];R.isEmpty()&&(v[m++]=R.getStartPosition())}v.length>1&&v.sort(D.Position.compare);let E=[],I=0,k=0,M=b.length;for(let P=0,F=v.length;P<F;P++){let R=v[P];for(;k<M&&b[k].position.isBefore(R);)k++;if(k<M&&b[k].position.equals(R))E[I++]=b[k];else{let A=y.matchBracket(R),O=l._DECORATION_OPTIONS_WITH_OVERVIEW_RULER;!A&&this._matchBrackets==="always"&&(A=y.findEnclosingBrackets(R,20),O=l._DECORATION_OPTIONS_WITHOUT_OVERVIEW_RULER),E[I++]=new i(R,A,O)}}this._lastBracketsData=E,this._lastVersionId=_}}e.BracketMatchingController=l,l.ID="editor.contrib.bracketMatchingController",l._DECORATION_OPTIONS_WITH_OVERVIEW_RULER=g.ModelDecorationOptions.register({description:"bracket-match-overview",stickiness:1,className:"bracket-match",overviewRuler:{color:(0,d.themeColorFromId)(a),position:n.OverviewRulerLane.Center}}),l._DECORATION_OPTIONS_WITHOUT_OVERVIEW_RULER=g.ModelDecorationOptions.register({description:"bracket-match-no-overview",stickiness:1,className:"bracket-match"}),(0,T.registerEditorContribution)(l.ID,l),(0,T.registerEditorAction)(o),(0,T.registerEditorAction)(r),(0,d.registerThemingParticipant)((h,f)=>{const y=h.getColor(t.editorBracketMatchBackground);y&&f.addRule(`.monaco-editor .bracket-match { background-color: ${y}; }`);const _=h.getColor(t.editorBracketMatchBorder);_&&f.addRule(`.monaco-editor .bracket-match { border: 1px solid ${_}; }`)}),c.MenuRegistry.appendMenuItem(c.MenuId.MenubarGoMenu,{group:"5_infile_nav",command:{id:"editor.action.jumpToBracket",title:s.localize(3,null)},order:2})}),define(J[670],ee([0,1,16,98,197,3,25,485]),function(j,e,w,N,T,D,S,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0});class C extends w.EditorAction{constructor(){super({id:"editor.action.transposeLetters",label:p.localize(0,null),alias:"Transpose Letters",precondition:S.EditorContextKeys.writable,kbOpts:{kbExpr:S.EditorContextKeys.textInputFocus,primary:0,mac:{primary:256|50},weight:100}})}run(g,t){if(!t.hasModel())return;let s=t.getModel(),c=[],u=t.getSelections();for(let d of u){if(!d.isEmpty())continue;let a=d.startLineNumber,r=d.startColumn,o=s.getLineMaxColumn(a);if(a===1&&(r===1||r===2&&o===2))continue;let i=r===o?d.getPosition():T.MoveOperations.rightPosition(s,d.getPosition().lineNumber,d.getPosition().column),l=T.MoveOperations.leftPosition(s,i),h=T.MoveOperations.leftPosition(s,l),f=s.getValueInRange(D.Range.fromPositions(h,l)),y=s.getValueInRange(D.Range.fromPositions(l,i)),_=D.Range.fromPositions(h,i);c.push(new N.ReplaceCommand(_,y+f))}c.length>0&&(t.pushUndoStop(),t.executeCommands(this.id,c),t.pushUndoStop())}}(0,w.registerEditorAction)(C)}),define(J[671],ee([0,1,7,96,58,27,4,2,32,488,40,21,10,356]),function(j,e,w,N,T,D,S,p,C,n,g,t,s){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LightBulbWidget=void 0;var c;(function(d){d.Hidden={type:0};class a{constructor(o,i,l,h){this.actions=o,this.trigger=i,this.editorPosition=l,this.widgetPosition=h,this.type=1}}d.Showing=a})(c||(c={}));let u=class Ii extends p.Disposable{constructor(a,r,o,i){super();this._editor=a,this._quickFixActionId=r,this._preferredFixActionId=o,this._keybindingService=i,this._onClick=this._register(new S.Emitter),this.onClick=this._onClick.event,this._state=c.Hidden,this._domNode=document.createElement("div"),this._domNode.className=D.Codicon.lightBulb.classNames,this._editor.addContentWidget(this),this._register(this._editor.onDidChangeModelContent(l=>{const h=this._editor.getModel();(this.state.type!==1||!h||this.state.editorPosition.lineNumber>=h.getLineCount())&&this.hide()})),T.Gesture.ignoreTarget(this._domNode),this._register(w.addStandardDisposableGenericMouseDownListner(this._domNode,l=>{if(this.state.type!==1)return;this._editor.focus(),l.preventDefault();const{top:h,height:f}=w.getDomNodePagePosition(this._domNode),y=this._editor.getOption(58);let _=Math.floor(y/3);this.state.widgetPosition.position!==null&&this.state.widgetPosition.position.lineNumber<this.state.editorPosition.lineNumber&&(_+=y),this._onClick.fire({x:l.posx,y:h+f+_,actions:this.state.actions,trigger:this.state.trigger})})),this._register(w.addDisposableListener(this._domNode,"mouseenter",l=>{if((l.buttons&1)!=1)return;this.hide();const h=new N.GlobalMouseMoveMonitor;h.startMonitoring(l.target,l.buttons,N.standardMouseMoveMerger,()=>{},()=>{h.dispose()})})),this._register(this._editor.onDidChangeConfiguration(l=>{l.hasChanged(56)&&!this._editor.getOption(56).enabled&&this.hide()})),this._updateLightBulbTitleAndIcon(),this._register(this._keybindingService.onDidUpdateKeybindings(this._updateLightBulbTitleAndIcon,this))}dispose(){super.dispose(),this._editor.removeContentWidget(this)}getId(){return"LightBulbWidget"}getDomNode(){return this._domNode}getPosition(){return this._state.type===1?this._state.widgetPosition:null}update(a,r,o){if(a.validActions.length<=0)return this.hide();const i=this._editor.getOptions();if(!i.get(56).enabled)return this.hide();const l=this._editor.getModel();if(!l)return this.hide();const{lineNumber:h,column:f}=l.validatePosition(o),y=l.getOptions().tabSize,_=i.get(43),b=l.getLineContent(h),v=C.TextModel.computeIndentLevel(b,y),m=_.spaceWidth*v>22,E=k=>k>2&&this._editor.getTopForLineNumber(k)===this._editor.getTopForLineNumber(k-1);let I=h;if(!m){if(h>1&&!E(h-1))I-=1;else if(!E(h+1))I+=1;else if(f*_.spaceWidth<22)return this.hide()}this.state=new c.Showing(a,r,o,{position:{lineNumber:I,column:1},preference:Ii._posPref}),this._editor.layoutContentWidget(this)}hide(){this.state=c.Hidden,this._editor.layoutContentWidget(this)}get state(){return this._state}set state(a){this._state=a,this._updateLightBulbTitleAndIcon()}_updateLightBulbTitleAndIcon(){if(this.state.type===1&&this.state.actions.hasAutoFix){this._domNode.classList.remove(...D.Codicon.lightBulb.classNamesArray),this._domNode.classList.add(...D.Codicon.lightbulbAutofix.classNamesArray);const r=this._keybindingService.lookupKeybinding(this._preferredFixActionId);if(r){this.title=n.localize(0,null,r.getLabel());return}}this._domNode.classList.remove(...D.Codicon.lightbulbAutofix.classNamesArray),this._domNode.classList.add(...D.Codicon.lightBulb.classNamesArray);const a=this._keybindingService.lookupKeybinding(this._quickFixActionId);a?this.title=n.localize(1,null,a.getLabel()):this.title=n.localize(2,null)}set title(a){this._domNode.title=a}};u._posPref=[0],u=Fe([Ce(3,g.IKeybindingService)],u),e.LightBulbWidget=u,(0,s.registerThemingParticipant)((d,a)=>{var r;const o=(r=d.getColor(t.editorBackground))===null||r===void 0?void 0:r.transparent(.7),i=d.getColor(t.editorLightBulbForeground);i&&a.addRule(`
        .monaco-editor .contentWidgets ${D.Codicon.lightBulb.cssSelector} {
            color: ${i};
            background-color: ${o};
        }`);const l=d.getColor(t.editorLightBulbAutoFixForeground);l&&a.addRule(`
        .monaco-editor .contentWidgets ${D.Codicon.lightbulbAutofix.cssSelector} {
            color: ${l};
            background-color: ${o};
        }`)})});var Ut=this&&this.__classPrivateFieldSet||function(j,e,w,N,T){if(N==="m")throw new TypeError("Private method is not writable");if(N==="a"&&!T)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?j!==e||!T:!e.has(j))throw new TypeError("Cannot write private member to an object whose class did not declare it");return N==="a"?T.call(j,w):T?T.value=w:e.set(j,w),w},St=this&&this.__classPrivateFieldGet||function(j,e,w,N){if(w==="a"&&!N)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?j!==e||!N:!e.has(j))throw new TypeError("Cannot read private member from an object whose class did not declare it");return w==="m"?N:w==="a"?N.call(j):N?N.value:e.get(j)};define(J[672],ee([0,1,11,160,2,153,9,624,671]),function(j,e,w,N,T,D,S,p,C){"use strict";var n;Object.defineProperty(e,"__esModule",{value:!0}),e.CodeActionUi=void 0;let g=class extends T.Disposable{constructor(s,c,u,d,a){super();this._editor=s,this.delegate=d,this._activeCodeActions=this._register(new T.MutableDisposable),n.set(this,!1),this._codeActionWidget=new N.Lazy(()=>this._register(a.createInstance(p.CodeActionMenu,this._editor,{onSelectCodeAction:r=>Re(this,void 0,void 0,function*(){this.delegate.applyCodeAction(r,!0)})}))),this._lightBulbWidget=new N.Lazy(()=>{const r=this._register(a.createInstance(C.LightBulbWidget,this._editor,c,u));return this._register(r.onClick(o=>this.showCodeActionList(o.trigger,o.actions,o,{includeDisabledActions:!1}))),r})}dispose(){Ut(this,n,!0,"f"),super.dispose()}update(s){var c,u,d;return Re(this,void 0,void 0,function*(){if(s.type!==1){(c=this._lightBulbWidget.rawValue)===null||c===void 0||c.hide();return}let a;try{a=yield s.actions}catch(r){(0,w.onUnexpectedError)(r);return}if(!St(this,n,"f"))if(this._lightBulbWidget.getValue().update(a,s.trigger,s.position),s.trigger.type===1){if((u=s.trigger.filter)===null||u===void 0?void 0:u.include){const o=this.tryGetValidActionToApply(s.trigger,a);if(o){try{this._lightBulbWidget.getValue().hide(),yield this.delegate.applyCodeAction(o,!1)}finally{a.dispose()}return}if(s.trigger.context){const i=this.getInvalidActionThatWouldHaveBeenApplied(s.trigger,a);if(i&&i.action.disabled){D.MessageController.get(this._editor).showMessage(i.action.disabled,s.trigger.context.position),a.dispose();return}}}const r=!!((d=s.trigger.filter)===null||d===void 0?void 0:d.include);if(s.trigger.context&&(!a.allActions.length||!r&&!a.validActions.length)){D.MessageController.get(this._editor).showMessage(s.trigger.context.notAvailableMessage,s.trigger.context.position),this._activeCodeActions.value=a,a.dispose();return}this._activeCodeActions.value=a,this._codeActionWidget.getValue().show(s.trigger,a,s.position,{includeDisabledActions:r})}else this._codeActionWidget.getValue().isVisible?a.dispose():this._activeCodeActions.value=a})}getInvalidActionThatWouldHaveBeenApplied(s,c){if(!!c.allActions.length&&(s.autoApply==="first"&&c.validActions.length===0||s.autoApply==="ifSingle"&&c.allActions.length===1))return c.allActions.find(({action:u})=>u.disabled)}tryGetValidActionToApply(s,c){if(!!c.validActions.length&&(s.autoApply==="first"&&c.validActions.length>0||s.autoApply==="ifSingle"&&c.validActions.length===1))return c.validActions[0]}showCodeActionList(s,c,u,d){return Re(this,void 0,void 0,function*(){this._codeActionWidget.getValue().show(s,c,u,d)})}};n=new WeakMap,g=Fe([Ce(4,S.IInstantiationService)],g),e.CodeActionUi=g}),define(J[282],ee([0,1,23,160,2,8,16,146,25,152,672,153,487,26,15,9,89,36,62,90,625,145]),function(j,e,w,N,T,D,S,p,C,n,g,t,s,c,u,d,a,r,o,i,l,h){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AutoFixAction=e.FixAllAction=e.OrganizeImportsAction=e.SourceAction=e.RefactorAction=e.CodeActionCommand=e.QuickFixAction=e.applyCodeAction=e.QuickFixController=void 0;function f(A){return u.ContextKeyExpr.regex(l.SUPPORTED_CODE_ACTIONS.keys()[0],new RegExp("(\\s|^)"+(0,D.escapeRegExpCharacters)(A.value)+"\\b"))}const y={type:"object",defaultSnippets:[{body:{kind:""}}],properties:{kind:{type:"string",description:s.localize(0,null)},apply:{type:"string",description:s.localize(1,null),default:"ifSingle",enum:["first","ifSingle","never"],enumDescriptions:[s.localize(2,null),s.localize(3,null),s.localize(4,null)]},preferred:{type:"boolean",default:!1,description:s.localize(5,null)}}};let _=class ki extends T.Disposable{constructor(O,L,B,W,K){super();this._instantiationService=K,this._editor=O,this._model=this._register(new l.CodeActionModel(this._editor,L,B,W)),this._register(this._model.onDidChangeState(H=>this.update(H))),this._ui=new N.Lazy(()=>this._register(new g.CodeActionUi(O,E.Id,R.Id,{applyCodeAction:(H,Y)=>Re(this,void 0,void 0,function*(){try{yield this._applyCodeAction(H)}finally{Y&&this._trigger({type:2,filter:{}})}})},this._instantiationService)))}static get(O){return O.getContribution(ki.ID)}update(O){this._ui.getValue().update(O)}showCodeActions(O,L,B){return this._ui.getValue().showCodeActionList(O,L,B,{includeDisabledActions:!1})}manualTriggerAtCurrentPosition(O,L,B){if(!this._editor.hasModel())return;t.MessageController.get(this._editor).closeMessage();const W=this._editor.getPosition();this._trigger({type:1,filter:L,autoApply:B,context:{notAvailableMessage:O,position:W}})}_trigger(O){return this._model.trigger(O)}_applyCodeAction(O){return this._instantiationService.invokeFunction(b,O,this._editor)}};_.ID="editor.contrib.quickFixController",_=Fe([Ce(1,a.IMarkerService),Ce(2,u.IContextKeyService),Ce(3,o.IEditorProgressService),Ce(4,d.IInstantiationService)],_),e.QuickFixController=_;function b(A,O,L){return Re(this,void 0,void 0,function*(){const B=A.get(p.IBulkEditService),W=A.get(c.ICommandService),K=A.get(i.ITelemetryService),H=A.get(r.INotificationService);if(K.publicLog2("codeAction.applyCodeAction",{codeActionTitle:O.action.title,codeActionKind:O.action.kind,codeActionIsPreferred:!!O.action.isPreferred}),yield O.resolve(w.CancellationToken.None),O.action.edit&&(yield B.apply(p.ResourceEdit.convert(O.action.edit),{editor:L,label:O.action.title})),O.action.command)try{yield W.executeCommand(O.action.command.id,...O.action.command.arguments||[])}catch(Y){const X=v(Y);H.error(typeof X=="string"?X:s.localize(6,null))}})}e.applyCodeAction=b;function v(A){return typeof A=="string"?A:A instanceof Error&&typeof A.message=="string"?A.message:void 0}function m(A,O,L,B){if(A.hasModel()){const W=_.get(A);W&&W.manualTriggerAtCurrentPosition(O,L,B)}}class E extends S.EditorAction{constructor(){super({id:E.Id,label:s.localize(7,null),alias:"Quick Fix...",precondition:u.ContextKeyExpr.and(C.EditorContextKeys.writable,C.EditorContextKeys.hasCodeActionsProvider),kbOpts:{kbExpr:C.EditorContextKeys.editorTextFocus,primary:2048|84,weight:100}})}run(O,L){return m(L,s.localize(8,null),void 0,void 0)}}e.QuickFixAction=E,E.Id="editor.action.quickFix";class I extends S.EditorCommand{constructor(){super({id:n.codeActionCommandId,precondition:u.ContextKeyExpr.and(C.EditorContextKeys.writable,C.EditorContextKeys.hasCodeActionsProvider),description:{description:"Trigger a code action",args:[{name:"args",schema:y}]}})}runEditorCommand(O,L,B){const W=h.CodeActionCommandArgs.fromUser(B,{kind:h.CodeActionKind.Empty,apply:"ifSingle"});return m(L,typeof(B==null?void 0:B.kind)=="string"?W.preferred?s.localize(9,null,B.kind):s.localize(10,null,B.kind):W.preferred?s.localize(11,null):s.localize(12,null),{include:W.kind,includeSourceActions:!0,onlyIncludePreferredActions:W.preferred},W.apply)}}e.CodeActionCommand=I;class k extends S.EditorAction{constructor(){super({id:n.refactorCommandId,label:s.localize(13,null),alias:"Refactor...",precondition:u.ContextKeyExpr.and(C.EditorContextKeys.writable,C.EditorContextKeys.hasCodeActionsProvider),kbOpts:{kbExpr:C.EditorContextKeys.editorTextFocus,primary:2048|1024|48,mac:{primary:256|1024|48},weight:100},contextMenuOpts:{group:"1_modification",order:2,when:u.ContextKeyExpr.and(C.EditorContextKeys.writable,f(h.CodeActionKind.Refactor))},description:{description:"Refactor...",args:[{name:"args",schema:y}]}})}run(O,L,B){const W=h.CodeActionCommandArgs.fromUser(B,{kind:h.CodeActionKind.Refactor,apply:"never"});return m(L,typeof(B==null?void 0:B.kind)=="string"?W.preferred?s.localize(14,null,B.kind):s.localize(15,null,B.kind):W.preferred?s.localize(16,null):s.localize(17,null),{include:h.CodeActionKind.Refactor.contains(W.kind)?W.kind:h.CodeActionKind.None,onlyIncludePreferredActions:W.preferred},W.apply)}}e.RefactorAction=k;class M extends S.EditorAction{constructor(){super({id:n.sourceActionCommandId,label:s.localize(18,null),alias:"Source Action...",precondition:u.ContextKeyExpr.and(C.EditorContextKeys.writable,C.EditorContextKeys.hasCodeActionsProvider),contextMenuOpts:{group:"1_modification",order:2.1,when:u.ContextKeyExpr.and(C.EditorContextKeys.writable,f(h.CodeActionKind.Source))},description:{description:"Source Action...",args:[{name:"args",schema:y}]}})}run(O,L,B){const W=h.CodeActionCommandArgs.fromUser(B,{kind:h.CodeActionKind.Source,apply:"never"});return m(L,typeof(B==null?void 0:B.kind)=="string"?W.preferred?s.localize(19,null,B.kind):s.localize(20,null,B.kind):W.preferred?s.localize(21,null):s.localize(22,null),{include:h.CodeActionKind.Source.contains(W.kind)?W.kind:h.CodeActionKind.None,includeSourceActions:!0,onlyIncludePreferredActions:W.preferred},W.apply)}}e.SourceAction=M;class P extends S.EditorAction{constructor(){super({id:n.organizeImportsCommandId,label:s.localize(23,null),alias:"Organize Imports",precondition:u.ContextKeyExpr.and(C.EditorContextKeys.writable,f(h.CodeActionKind.SourceOrganizeImports)),kbOpts:{kbExpr:C.EditorContextKeys.editorTextFocus,primary:1024|512|45,weight:100}})}run(O,L){return m(L,s.localize(24,null),{include:h.CodeActionKind.SourceOrganizeImports,includeSourceActions:!0},"ifSingle")}}e.OrganizeImportsAction=P;class F extends S.EditorAction{constructor(){super({id:n.fixAllCommandId,label:s.localize(25,null),alias:"Fix All",precondition:u.ContextKeyExpr.and(C.EditorContextKeys.writable,f(h.CodeActionKind.SourceFixAll))})}run(O,L){return m(L,s.localize(26,null),{include:h.CodeActionKind.SourceFixAll,includeSourceActions:!0},"ifSingle")}}e.FixAllAction=F;class R extends S.EditorAction{constructor(){super({id:R.Id,label:s.localize(27,null),alias:"Auto Fix...",precondition:u.ContextKeyExpr.and(C.EditorContextKeys.writable,f(h.CodeActionKind.QuickFix)),kbOpts:{kbExpr:C.EditorContextKeys.editorTextFocus,primary:512|1024|84,mac:{primary:2048|512|84},weight:100}})}run(O,L){return m(L,s.localize(28,null),{include:h.CodeActionKind.QuickFix,onlyIncludePreferredActions:!0},"ifSingle")}}e.AutoFixAction=R,R.Id="editor.action.autoFix"}),define(J[673],ee([0,1,16,282]),function(j,e,w,N){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),(0,w.registerEditorContribution)(N.QuickFixController.ID,N.QuickFixController),(0,w.registerEditorAction)(N.QuickFixAction),(0,w.registerEditorAction)(N.RefactorAction),(0,w.registerEditorAction)(N.SourceAction),(0,w.registerEditorAction)(N.OrganizeImportsAction),(0,w.registerEditorAction)(N.AutoFixAction),(0,w.registerEditorAction)(N.FixAllAction),(0,w.registerEditorCommand)(new N.CodeActionCommand)}),define(J[674],ee([0,1,7,108,3,32,46,21,10,357]),function(j,e,w,N,T,D,S,p,C){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CodeLensWidget=e.CodeLensHelper=void 0;class n{constructor(u,d,a){this.afterLineNumber=u,this.heightInPx=d,this._onHeight=a,this.suppressMouseDown=!0,this.domNode=document.createElement("div")}onComputedHeight(u){this._lastHeight===void 0?this._lastHeight=u:this._lastHeight!==u&&(this._lastHeight=u,this._onHeight())}isVisible(){return this._lastHeight!==0&&this.domNode.hasAttribute("monaco-visible-view-zone")}}class g{constructor(u,d,a){this.allowEditorOverflow=!1,this.suppressMouseDown=!0,this._commands=new Map,this._isEmpty=!0,this._editor=u,this._id=`codelens.widget-${g._idPool++}`,this.updatePosition(a),this._domNode=document.createElement("span"),this._domNode.className=`codelens-decoration ${d}`}withCommands(u,d){this._commands.clear();let a=[],r=!1;for(let o=0;o<u.length;o++){const i=u[o];if(!!i&&(r=!0,i.command)){const l=(0,N.renderLabelWithIcons)(i.command.title.trim());i.command.id?(a.push(w.$("a",{id:String(o),title:i.command.tooltip},...l)),this._commands.set(String(o),i.command)):a.push(w.$("span",{title:i.command.tooltip},...l)),o+1<u.length&&a.push(w.$("span",void 0,"\xA0|\xA0"))}}r?(w.reset(this._domNode,...a),this._isEmpty&&d&&this._domNode.classList.add("fadein"),this._isEmpty=!1):w.reset(this._domNode,w.$("span",void 0,"no commands"))}getCommand(u){return u.parentElement===this._domNode?this._commands.get(u.id):void 0}getId(){return this._id}getDomNode(){return this._domNode}updatePosition(u){const d=this._editor.getModel().getLineFirstNonWhitespaceColumn(u);this._widgetPosition={position:{lineNumber:u,column:d},preference:[1]}}getPosition(){return this._widgetPosition||null}}g._idPool=0;class t{constructor(){this._removeDecorations=[],this._addDecorations=[],this._addDecorationsCallbacks=[]}addDecoration(u,d){this._addDecorations.push(u),this._addDecorationsCallbacks.push(d)}removeDecoration(u){this._removeDecorations.push(u)}commit(u){let d=u.deltaDecorations(this._removeDecorations,this._addDecorations);for(let a=0,r=d.length;a<r;a++)this._addDecorationsCallbacks[a](d[a])}}e.CodeLensHelper=t;class s{constructor(u,d,a,r,o,i,l){this._isDisposed=!1,this._editor=d,this._className=a,this._data=u,this._decorationIds=[];let h,f=[];this._data.forEach((y,_)=>{y.symbol.command&&f.push(y.symbol),r.addDecoration({range:y.symbol.range,options:D.ModelDecorationOptions.EMPTY},b=>this._decorationIds[_]=b),h?h=T.Range.plusRange(h,y.symbol.range):h=T.Range.lift(y.symbol.range)}),this._viewZone=new n(h.startLineNumber-1,i,l),this._viewZoneId=o.addZone(this._viewZone),f.length>0&&(this._createContentWidgetIfNecessary(),this._contentWidget.withCommands(f,!1))}_createContentWidgetIfNecessary(){this._contentWidget?this._editor.layoutContentWidget(this._contentWidget):(this._contentWidget=new g(this._editor,this._className,this._viewZone.afterLineNumber+1),this._editor.addContentWidget(this._contentWidget))}dispose(u,d){this._decorationIds.forEach(u.removeDecoration,u),this._decorationIds=[],d&&d.removeZone(this._viewZoneId),this._contentWidget&&(this._editor.removeContentWidget(this._contentWidget),this._contentWidget=void 0),this._isDisposed=!0}isDisposed(){return this._isDisposed}isValid(){return this._decorationIds.some((u,d)=>{const a=this._editor.getModel().getDecorationRange(u),r=this._data[d].symbol;return!!(a&&T.Range.isEmpty(r.range)===a.isEmpty())})}updateCodeLensSymbols(u,d){this._decorationIds.forEach(d.removeDecoration,d),this._decorationIds=[],this._data=u,this._data.forEach((a,r)=>{d.addDecoration({range:a.symbol.range,options:D.ModelDecorationOptions.EMPTY},o=>this._decorationIds[r]=o)})}updateHeight(u,d){this._viewZone.heightInPx=u,d.layoutZone(this._viewZoneId),this._contentWidget&&this._editor.layoutContentWidget(this._contentWidget)}computeIfNecessary(u){if(!this._viewZone.isVisible())return null;for(let d=0;d<this._decorationIds.length;d++){const a=u.getDecorationRange(this._decorationIds[d]);a&&(this._data[d].symbol.range=a)}return this._data}updateCommands(u){this._createContentWidgetIfNecessary(),this._contentWidget.withCommands(u,!0);for(let d=0;d<this._data.length;d++){const a=u[d];if(a){const{symbol:r}=this._data[d];r.command=a.command||r.command}}}getCommand(u){var d;return(d=this._contentWidget)===null||d===void 0?void 0:d.getCommand(u)}getLineNumber(){const u=this._editor.getModel().getDecorationRange(this._decorationIds[0]);return u?u.startLineNumber:-1}update(u){if(this.isValid()){const d=this._editor.getModel().getDecorationRange(this._decorationIds[0]);d&&(this._viewZone.afterLineNumber=d.startLineNumber-1,u.layoutZone(this._viewZoneId),this._contentWidget&&(this._contentWidget.updatePosition(d.startLineNumber),this._editor.layoutContentWidget(this._contentWidget)))}}getItems(){return this._data}}e.CodeLensWidget=s,(0,C.registerThemingParticipant)((c,u)=>{const d=c.getColor(S.editorCodeLensForeground);d&&(u.addRule(`.monaco-editor .codelens-decoration { color: ${d}; }`),u.addRule(`.monaco-editor .codelens-decoration .codicon { color: ${d}; }`));const a=c.getColor(p.editorActiveLinkForeground);a&&(u.addRule(`.monaco-editor .codelens-decoration > a:hover { color: ${a} !important; }`),u.addRule(`.monaco-editor .codelens-decoration > a:hover .codicon { color: ${a} !important; }`))})}),define(J[675],ee([0,1,7,14,11,95,2,67,16,31,25,18,147,259,595,674,489,26,36,79]),function(j,e,w,N,T,D,S,p,C,n,g,t,s,c,u,d,a,r,o,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CodeLensContribution=void 0;let l=class{constructor(f,y,_,b){this._editor=f,this._commandService=y,this._notificationService=_,this._codeLensCache=b,this._disposables=new S.DisposableStore,this._localToDispose=new S.DisposableStore,this._lenses=[],this._getCodeLensModelDelays=new s.LanguageFeatureRequestDelays(t.CodeLensProviderRegistry,250,2500),this._oldCodeLensModels=new S.DisposableStore,this._resolveCodeLensesDelays=new s.LanguageFeatureRequestDelays(t.CodeLensProviderRegistry,250,2500),this._resolveCodeLensesScheduler=new N.RunOnceScheduler(()=>this._resolveCodeLensesInViewport(),this._resolveCodeLensesDelays.min),this._disposables.add(this._editor.onDidChangeModel(()=>this._onModelChange())),this._disposables.add(this._editor.onDidChangeModelLanguage(()=>this._onModelChange())),this._disposables.add(this._editor.onDidChangeConfiguration(v=>{(v.hasChanged(43)||v.hasChanged(16)||v.hasChanged(15))&&this._updateLensStyle(),v.hasChanged(14)&&this._onModelChange()})),this._disposables.add(t.CodeLensProviderRegistry.onDidChange(this._onModelChange,this)),this._onModelChange(),this._styleClassName="_"+(0,D.hash)(this._editor.getId()).toString(16),this._styleElement=w.createStyleSheet(w.isInShadowDOM(this._editor.getContainerDomNode())?this._editor.getContainerDomNode():void 0),this._updateLensStyle()}dispose(){var f;this._localDispose(),this._disposables.dispose(),this._oldCodeLensModels.dispose(),(f=this._currentCodeLensModel)===null||f===void 0||f.dispose(),this._styleElement.remove()}_getLayoutInfo(){let f=this._editor.getOption(16),y;return!f||f<5?(f=this._editor.getOption(45)*.9|0,y=this._editor.getOption(58)):y=f*Math.max(1.3,this._editor.getOption(58)/this._editor.getOption(45))|0,{codeLensHeight:y,fontSize:f}}_updateLensStyle(){const{codeLensHeight:f,fontSize:y}=this._getLayoutInfo(),_=this._editor.getOption(15),b=this._editor.getOption(43),v=`--codelens-font-family${this._styleClassName}`,m=`--codelens-font-features${this._styleClassName}`;let E=`
        .monaco-editor .codelens-decoration.${this._styleClassName} { line-height: ${f}px; font-size: ${y}px; padding-right: ${Math.round(y*.5)}px; font-feature-settings: var(${m}) }
        .monaco-editor .codelens-decoration.${this._styleClassName} span.codicon { line-height: ${f}px; font-size: ${y}px; }
        `;_&&(E+=`.monaco-editor .codelens-decoration.${this._styleClassName} { font-family: var(${v}), ${n.EDITOR_FONT_DEFAULTS.fontFamily}}`),this._styleElement.textContent=E,this._editor.getContainerDomNode().style.setProperty(v,_??"inherit"),this._editor.getContainerDomNode().style.setProperty(m,b.fontFeatureSettings),this._editor.changeViewZones(I=>{for(let k of this._lenses)k.updateHeight(f,I)})}_localDispose(){var f,y,_;(f=this._getCodeLensModelPromise)===null||f===void 0||f.cancel(),this._getCodeLensModelPromise=void 0,(y=this._resolveCodeLensesPromise)===null||y===void 0||y.cancel(),this._resolveCodeLensesPromise=void 0,this._localToDispose.clear(),this._oldCodeLensModels.clear(),(_=this._currentCodeLensModel)===null||_===void 0||_.dispose()}_onModelChange(){this._localDispose();const f=this._editor.getModel();if(!f||!this._editor.getOption(14))return;const y=this._codeLensCache.get(f);if(y&&this._renderCodeLensSymbols(y),!t.CodeLensProviderRegistry.has(f)){y&&this._localToDispose.add((0,N.disposableTimeout)(()=>{const b=this._codeLensCache.get(f);y===b&&(this._codeLensCache.delete(f),this._onModelChange())},30*1e3));return}for(const b of t.CodeLensProviderRegistry.all(f))if(typeof b.onDidChange=="function"){let v=b.onDidChange(()=>_.schedule());this._localToDispose.add(v)}const _=new N.RunOnceScheduler(()=>{var b;const v=Date.now();(b=this._getCodeLensModelPromise)===null||b===void 0||b.cancel(),this._getCodeLensModelPromise=(0,N.createCancelablePromise)(m=>(0,c.getCodeLensModel)(f,m)),this._getCodeLensModelPromise.then(m=>{this._currentCodeLensModel&&this._oldCodeLensModels.add(this._currentCodeLensModel),this._currentCodeLensModel=m,this._codeLensCache.put(f,m);const E=this._getCodeLensModelDelays.update(f,Date.now()-v);_.delay=E,this._renderCodeLensSymbols(m),this._resolveCodeLensesInViewportSoon()},T.onUnexpectedError)},this._getCodeLensModelDelays.get(f));this._localToDispose.add(_),this._localToDispose.add((0,S.toDisposable)(()=>this._resolveCodeLensesScheduler.cancel())),this._localToDispose.add(this._editor.onDidChangeModelContent(()=>{this._editor.changeDecorations(b=>{this._editor.changeViewZones(v=>{let m=[],E=-1;this._lenses.forEach(k=>{!k.isValid()||E===k.getLineNumber()?m.push(k):(k.update(v),E=k.getLineNumber())});let I=new d.CodeLensHelper;m.forEach(k=>{k.dispose(I,v),this._lenses.splice(this._lenses.indexOf(k),1)}),I.commit(b)})}),_.schedule()})),this._localToDispose.add(this._editor.onDidFocusEditorWidget(()=>{_.schedule()})),this._localToDispose.add(this._editor.onDidScrollChange(b=>{b.scrollTopChanged&&this._lenses.length>0&&this._resolveCodeLensesInViewportSoon()})),this._localToDispose.add(this._editor.onDidLayoutChange(()=>{this._resolveCodeLensesInViewportSoon()})),this._localToDispose.add((0,S.toDisposable)(()=>{if(this._editor.getModel()){const b=p.StableEditorScrollState.capture(this._editor);this._editor.changeDecorations(v=>{this._editor.changeViewZones(m=>{this._disposeAllLenses(v,m)})}),b.restore(this._editor)}else this._disposeAllLenses(void 0,void 0)})),this._localToDispose.add(this._editor.onMouseDown(b=>{if(b.target.type!==9)return;let v=b.target.element;if((v==null?void 0:v.tagName)==="SPAN"&&(v=v.parentElement),(v==null?void 0:v.tagName)==="A")for(const m of this._lenses){let E=m.getCommand(v);if(E){this._commandService.executeCommand(E.id,...E.arguments||[]).catch(I=>this._notificationService.error(I));break}}})),_.schedule()}_disposeAllLenses(f,y){const _=new d.CodeLensHelper;for(const b of this._lenses)b.dispose(_,y);f&&_.commit(f),this._lenses.length=0}_renderCodeLensSymbols(f){if(!this._editor.hasModel())return;let y=this._editor.getModel().getLineCount(),_=[],b;for(let E of f.lenses){let I=E.symbol.range.startLineNumber;I<1||I>y||(b&&b[b.length-1].symbol.range.startLineNumber===I?b.push(E):(b=[E],_.push(b)))}const v=p.StableEditorScrollState.capture(this._editor),m=this._getLayoutInfo();this._editor.changeDecorations(E=>{this._editor.changeViewZones(I=>{const k=new d.CodeLensHelper;let M=0,P=0;for(;P<_.length&&M<this._lenses.length;){let F=_[P][0].symbol.range.startLineNumber,R=this._lenses[M].getLineNumber();R<F?(this._lenses[M].dispose(k,I),this._lenses.splice(M,1)):R===F?(this._lenses[M].updateCodeLensSymbols(_[P],k),P++,M++):(this._lenses.splice(M,0,new d.CodeLensWidget(_[P],this._editor,this._styleClassName,k,I,m.codeLensHeight,()=>this._resolveCodeLensesInViewportSoon())),M++,P++)}for(;M<this._lenses.length;)this._lenses[M].dispose(k,I),this._lenses.splice(M,1);for(;P<_.length;)this._lenses.push(new d.CodeLensWidget(_[P],this._editor,this._styleClassName,k,I,m.codeLensHeight,()=>this._resolveCodeLensesInViewportSoon())),P++;k.commit(E)})}),v.restore(this._editor)}_resolveCodeLensesInViewportSoon(){this._editor.getModel()&&this._resolveCodeLensesScheduler.schedule()}_resolveCodeLensesInViewport(){var f;(f=this._resolveCodeLensesPromise)===null||f===void 0||f.cancel(),this._resolveCodeLensesPromise=void 0;const y=this._editor.getModel();if(!y)return;const _=[],b=[];if(this._lenses.forEach(E=>{const I=E.computeIfNecessary(y);I&&(_.push(I),b.push(E))}),_.length===0)return;const v=Date.now(),m=(0,N.createCancelablePromise)(E=>{const I=_.map((k,M)=>{const P=new Array(k.length),F=k.map((R,A)=>!R.symbol.command&&typeof R.provider.resolveCodeLens=="function"?Promise.resolve(R.provider.resolveCodeLens(y,R.symbol,E)).then(O=>{P[A]=O},T.onUnexpectedExternalError):(P[A]=R.symbol,Promise.resolve(void 0)));return Promise.all(F).then(()=>{!E.isCancellationRequested&&!b[M].isDisposed()&&b[M].updateCommands(P)})});return Promise.all(I)});this._resolveCodeLensesPromise=m,this._resolveCodeLensesPromise.then(()=>{const E=this._resolveCodeLensesDelays.update(y,Date.now()-v);this._resolveCodeLensesScheduler.delay=E,this._currentCodeLensModel&&this._codeLensCache.put(y,this._currentCodeLensModel),this._oldCodeLensModels.clear(),m===this._resolveCodeLensesPromise&&(this._resolveCodeLensesPromise=void 0)},E=>{(0,T.onUnexpectedError)(E),m===this._resolveCodeLensesPromise&&(this._resolveCodeLensesPromise=void 0)})}getLenses(){return this._lenses}};l.ID="css.editor.codeLens",l=Fe([Ce(1,r.ICommandService),Ce(2,o.INotificationService),Ce(3,u.ICodeLensCache)],l),e.CodeLensContribution=l,(0,C.registerEditorContribution)(l.ID,l),(0,C.registerEditorAction)(class extends C.EditorAction{constructor(){super({id:"codelens.showLensesInCurrentLine",precondition:g.EditorContextKeys.hasCodeLensProvider,label:(0,a.localize)(0,null),alias:"Show CodeLens Commands For Current Line"})}run(f,y){return Re(this,void 0,void 0,function*(){if(!y.hasModel())return;const _=f.get(i.IQuickInputService),b=f.get(r.ICommandService),v=f.get(o.INotificationService),m=y.getSelection().positionLineNumber,E=y.getContribution(l.ID),I=[];for(let M of E.getLenses())if(M.getLineNumber()===m)for(let P of M.getItems()){const{command:F}=P.symbol;F&&I.push({label:F.title,command:F})}if(I.length===0)return;const k=yield _.pick(I,{canPickMany:!1});if(!!k)try{yield b.executeCommand(k.command.id,...k.command.arguments||[])}catch(M){v.error(M)}})}})}),define(J[283],ee([0,1,14,29,11,95,2,16,28,3,32,18,260,41]),function(j,e,w,N,T,D,S,p,C,n,g,t,s,c){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ColorDetector=void 0;const u=500;let d=class Ni extends S.Disposable{constructor(r,o,i){super();this._editor=r,this._codeEditorService=o,this._configurationService=i,this._localToDispose=this._register(new S.DisposableStore),this._decorationsIds=[],this._colorDatas=new Map,this._colorDecoratorIds=[],this._decorationsTypes=new Set,this._register(r.onDidChangeModel(()=>{this._isEnabled=this.isEnabled(),this.onModelChanged()})),this._register(r.onDidChangeModelLanguage(()=>this.onModelChanged())),this._register(t.ColorProviderRegistry.onDidChange(()=>this.onModelChanged())),this._register(r.onDidChangeConfiguration(()=>{let l=this._isEnabled;this._isEnabled=this.isEnabled(),l!==this._isEnabled&&(this._isEnabled?this.onModelChanged():this.removeAllDecorations())})),this._timeoutTimer=null,this._computePromise=null,this._isEnabled=this.isEnabled(),this.onModelChanged()}isEnabled(){const r=this._editor.getModel();if(!r)return!1;const o=r.getLanguageId(),i=this._configurationService.getValue(o);if(i&&typeof i=="object"){const l=i.colorDecorators;if(l&&l.enable!==void 0&&!l.enable)return l.enable}return this._editor.getOption(17)}static get(r){return r.getContribution(this.ID)}dispose(){this.stop(),this.removeAllDecorations(),super.dispose()}onModelChanged(){if(this.stop(),!this._isEnabled)return;const r=this._editor.getModel();!r||!t.ColorProviderRegistry.has(r)||(this._localToDispose.add(this._editor.onDidChangeModelContent(()=>{this._timeoutTimer||(this._timeoutTimer=new w.TimeoutTimer,this._timeoutTimer.cancelAndSet(()=>{this._timeoutTimer=null,this.beginCompute()},Ni.RECOMPUTE_TIME))})),this.beginCompute())}beginCompute(){this._computePromise=(0,w.createCancelablePromise)(r=>{const o=this._editor.getModel();return o?(0,s.getColors)(o,r):Promise.resolve([])}),this._computePromise.then(r=>{this.updateDecorations(r),this.updateColorDecorators(r),this._computePromise=null},T.onUnexpectedError)}stop(){this._timeoutTimer&&(this._timeoutTimer.cancel(),this._timeoutTimer=null),this._computePromise&&(this._computePromise.cancel(),this._computePromise=null),this._localToDispose.clear()}updateDecorations(r){const o=r.map(i=>({range:{startLineNumber:i.colorInfo.range.startLineNumber,startColumn:i.colorInfo.range.startColumn,endLineNumber:i.colorInfo.range.endLineNumber,endColumn:i.colorInfo.range.endColumn},options:g.ModelDecorationOptions.EMPTY}));this._decorationsIds=this._editor.deltaDecorations(this._decorationsIds,o),this._colorDatas=new Map,this._decorationsIds.forEach((i,l)=>this._colorDatas.set(i,r[l]))}updateColorDecorators(r){let o=[],i={};for(let l=0;l<r.length&&o.length<u;l++){const{red:h,green:f,blue:y,alpha:_}=r[l].colorInfo.color,b=new N.RGBA(Math.round(h*255),Math.round(f*255),Math.round(y*255),_);let v=(0,D.hash)(`rgba(${b.r},${b.g},${b.b},${b.a})`).toString(16),m=`rgba(${b.r}, ${b.g}, ${b.b}, ${b.a})`,E="colorBox-"+v;!this._decorationsTypes.has(E)&&!i[E]&&this._codeEditorService.registerDecorationType("color-detector-color",E,{before:{contentText:" ",border:"solid 0.1em #000",margin:"0.1em 0.2em 0 0.2em",width:"0.8em",height:"0.8em",backgroundColor:m},dark:{before:{border:"solid 0.1em #eee"}}},void 0,this._editor),i[E]=!0,o.push({range:{startLineNumber:r[l].colorInfo.range.startLineNumber,startColumn:r[l].colorInfo.range.startColumn,endLineNumber:r[l].colorInfo.range.endLineNumber,endColumn:r[l].colorInfo.range.endColumn},options:this._codeEditorService.resolveDecorationOptions(E,!0)})}this._decorationsTypes.forEach(l=>{i[l]||this._codeEditorService.removeDecorationType(l)}),this._colorDecoratorIds=this._editor.deltaDecorations(this._colorDecoratorIds,o)}removeAllDecorations(){this._decorationsIds=this._editor.deltaDecorations(this._decorationsIds,[]),this._colorDecoratorIds=this._editor.deltaDecorations(this._colorDecoratorIds,[]),this._decorationsTypes.forEach(r=>{this._codeEditorService.removeDecorationType(r)})}getColorData(r){const o=this._editor.getModel();if(!o)return null;const i=o.getDecorationsInRange(n.Range.fromPositions(r,r)).filter(l=>this._colorDatas.has(l.id));return i.length===0?null:this._colorDatas.get(i[0].id)}};d.ID="editor.contrib.colorDetector",d.RECOMPUTE_TIME=1e3,d=Fe([Ce(1,C.ICodeEditorService),Ce(2,c.IConfigurationService)],d),e.ColorDetector=d,(0,p.registerEditorContribution)(d.ID,d)}),define(J[676],ee([0,1,2,17,16,13,3,22,32,422,359]),function(j,e,w,N,T,D,S,p,C,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DragAndDropController=void 0;function g(s){return N.isMacintosh?s.altKey:s.ctrlKey}class t extends w.Disposable{constructor(c){super();this._editor=c,this._register(this._editor.onMouseDown(u=>this._onEditorMouseDown(u))),this._register(this._editor.onMouseUp(u=>this._onEditorMouseUp(u))),this._register(this._editor.onMouseDrag(u=>this._onEditorMouseDrag(u))),this._register(this._editor.onMouseDrop(u=>this._onEditorMouseDrop(u))),this._register(this._editor.onMouseDropCanceled(()=>this._onEditorMouseDropCanceled())),this._register(this._editor.onKeyDown(u=>this.onEditorKeyDown(u))),this._register(this._editor.onKeyUp(u=>this.onEditorKeyUp(u))),this._register(this._editor.onDidBlurEditorWidget(()=>this.onEditorBlur())),this._register(this._editor.onDidBlurEditorText(()=>this.onEditorBlur())),this._dndDecorationIds=[],this._mouseDown=!1,this._modifierPressed=!1,this._dragSelection=null}onEditorBlur(){this._removeDecoration(),this._dragSelection=null,this._mouseDown=!1,this._modifierPressed=!1}onEditorKeyDown(c){!this._editor.getOption(31)||this._editor.getOption(18)||(g(c)&&(this._modifierPressed=!0),this._mouseDown&&g(c)&&this._editor.updateOptions({mouseStyle:"copy"}))}onEditorKeyUp(c){!this._editor.getOption(31)||this._editor.getOption(18)||(g(c)&&(this._modifierPressed=!1),this._mouseDown&&c.keyCode===t.TRIGGER_KEY_VALUE&&this._editor.updateOptions({mouseStyle:"default"}))}_onEditorMouseDown(c){this._mouseDown=!0}_onEditorMouseUp(c){this._mouseDown=!1,this._editor.updateOptions({mouseStyle:"text"})}_onEditorMouseDrag(c){let u=c.target;if(this._dragSelection===null){let a=(this._editor.getSelections()||[]).filter(r=>u.position&&r.containsPosition(u.position));if(a.length===1)this._dragSelection=a[0];else return}g(c.event)?this._editor.updateOptions({mouseStyle:"copy"}):this._editor.updateOptions({mouseStyle:"default"}),u.position&&(this._dragSelection.containsPosition(u.position)?this._removeDecoration():this.showAt(u.position))}_onEditorMouseDropCanceled(){this._editor.updateOptions({mouseStyle:"text"}),this._removeDecoration(),this._dragSelection=null,this._mouseDown=!1}_onEditorMouseDrop(c){if(c.target&&(this._hitContent(c.target)||this._hitMargin(c.target))&&c.target.position){let u=new D.Position(c.target.position.lineNumber,c.target.position.column);if(this._dragSelection===null){let d=null;if(c.event.shiftKey){let a=this._editor.getSelection();if(a){const{selectionStartLineNumber:r,selectionStartColumn:o}=a;d=[new p.Selection(r,o,u.lineNumber,u.column)]}}else d=(this._editor.getSelections()||[]).map(a=>a.containsPosition(u)?new p.Selection(u.lineNumber,u.column,u.lineNumber,u.column):a);this._editor.setSelections(d||[],"mouse",3)}else(!this._dragSelection.containsPosition(u)||(g(c.event)||this._modifierPressed)&&(this._dragSelection.getEndPosition().equals(u)||this._dragSelection.getStartPosition().equals(u)))&&(this._editor.pushUndoStop(),this._editor.executeCommand(t.ID,new n.DragAndDropCommand(this._dragSelection,u,g(c.event)||this._modifierPressed)),this._editor.pushUndoStop())}this._editor.updateOptions({mouseStyle:"text"}),this._removeDecoration(),this._dragSelection=null,this._mouseDown=!1}showAt(c){let u=[{range:new S.Range(c.lineNumber,c.column,c.lineNumber,c.column),options:t._DECORATION_OPTIONS}];this._dndDecorationIds=this._editor.deltaDecorations(this._dndDecorationIds,u),this._editor.revealPosition(c,1)}_removeDecoration(){this._dndDecorationIds=this._editor.deltaDecorations(this._dndDecorationIds,[])}_hitContent(c){return c.type===6||c.type===7}_hitMargin(c){return c.type===2||c.type===3||c.type===4}dispose(){this._removeDecoration(),this._dragSelection=null,this._mouseDown=!1,this._modifierPressed=!1,super.dispose()}}e.DragAndDropController=t,t.ID="editor.contrib.dragAndDrop",t.TRIGGER_KEY_VALUE=N.isMacintosh?6:5,t._DECORATION_OPTIONS=C.ModelDecorationOptions.register({description:"dnd-target",className:"dnd-target"}),(0,T.registerEditorContribution)(t.ID,t)}),define(J[677],ee([0,1,3,49,32,21,10]),function(j,e,w,N,T,D,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.FindDecorations=void 0;class p{constructor(n){this._editor=n,this._decorations=[],this._overviewRulerApproximateDecorations=[],this._findScopeDecorationIds=[],this._rangeHighlightDecorationId=null,this._highlightedDecorationId=null,this._startPosition=this._editor.getPosition()}dispose(){this._editor.deltaDecorations(this._allDecorations(),[]),this._decorations=[],this._overviewRulerApproximateDecorations=[],this._findScopeDecorationIds=[],this._rangeHighlightDecorationId=null,this._highlightedDecorationId=null}reset(){this._decorations=[],this._overviewRulerApproximateDecorations=[],this._findScopeDecorationIds=[],this._rangeHighlightDecorationId=null,this._highlightedDecorationId=null}getCount(){return this._decorations.length}getFindScope(){return this._findScopeDecorationIds[0]?this._editor.getModel().getDecorationRange(this._findScopeDecorationIds[0]):null}getFindScopes(){if(this._findScopeDecorationIds.length){const n=this._findScopeDecorationIds.map(g=>this._editor.getModel().getDecorationRange(g)).filter(g=>!!g);if(n.length)return n}return null}getStartPosition(){return this._startPosition}setStartPosition(n){this._startPosition=n,this.setCurrentFindMatch(null)}_getDecorationIndex(n){const g=this._decorations.indexOf(n);return g>=0?g+1:1}getCurrentMatchesPosition(n){let g=this._editor.getModel().getDecorationsInRange(n);for(const t of g){const s=t.options;if(s===p._FIND_MATCH_DECORATION||s===p._CURRENT_FIND_MATCH_DECORATION)return this._getDecorationIndex(t.id)}return 0}setCurrentFindMatch(n){let g=null,t=0;if(n)for(let s=0,c=this._decorations.length;s<c;s++){let u=this._editor.getModel().getDecorationRange(this._decorations[s]);if(n.equalsRange(u)){g=this._decorations[s],t=s+1;break}}return(this._highlightedDecorationId!==null||g!==null)&&this._editor.changeDecorations(s=>{if(this._highlightedDecorationId!==null&&(s.changeDecorationOptions(this._highlightedDecorationId,p._FIND_MATCH_DECORATION),this._highlightedDecorationId=null),g!==null&&(this._highlightedDecorationId=g,s.changeDecorationOptions(this._highlightedDecorationId,p._CURRENT_FIND_MATCH_DECORATION)),this._rangeHighlightDecorationId!==null&&(s.removeDecoration(this._rangeHighlightDecorationId),this._rangeHighlightDecorationId=null),g!==null){let c=this._editor.getModel().getDecorationRange(g);if(c.startLineNumber!==c.endLineNumber&&c.endColumn===1){let u=c.endLineNumber-1,d=this._editor.getModel().getLineMaxColumn(u);c=new w.Range(c.startLineNumber,c.startColumn,u,d)}this._rangeHighlightDecorationId=s.addDecoration(c,p._RANGE_HIGHLIGHT_DECORATION)}}),t}set(n,g){this._editor.changeDecorations(t=>{let s=p._FIND_MATCH_DECORATION,c=[];if(n.length>1e3){s=p._FIND_MATCH_NO_OVERVIEW_DECORATION;const d=this._editor.getModel().getLineCount(),r=this._editor.getLayoutInfo().height/d,o=Math.max(2,Math.ceil(3/r));let i=n[0].range.startLineNumber,l=n[0].range.endLineNumber;for(let h=1,f=n.length;h<f;h++){const y=n[h].range;l+o>=y.startLineNumber?y.endLineNumber>l&&(l=y.endLineNumber):(c.push({range:new w.Range(i,1,l,1),options:p._FIND_MATCH_ONLY_OVERVIEW_DECORATION}),i=y.startLineNumber,l=y.endLineNumber)}c.push({range:new w.Range(i,1,l,1),options:p._FIND_MATCH_ONLY_OVERVIEW_DECORATION})}let u=new Array(n.length);for(let d=0,a=n.length;d<a;d++)u[d]={range:n[d].range,options:s};this._decorations=t.deltaDecorations(this._decorations,u),this._overviewRulerApproximateDecorations=t.deltaDecorations(this._overviewRulerApproximateDecorations,c),this._rangeHighlightDecorationId&&(t.removeDecoration(this._rangeHighlightDecorationId),this._rangeHighlightDecorationId=null),this._findScopeDecorationIds.length&&(this._findScopeDecorationIds.forEach(d=>t.removeDecoration(d)),this._findScopeDecorationIds=[]),(g==null?void 0:g.length)&&(this._findScopeDecorationIds=g.map(d=>t.addDecoration(d,p._FIND_SCOPE_DECORATION)))})}matchBeforePosition(n){if(this._decorations.length===0)return null;for(let g=this._decorations.length-1;g>=0;g--){let t=this._decorations[g],s=this._editor.getModel().getDecorationRange(t);if(!(!s||s.endLineNumber>n.lineNumber)){if(s.endLineNumber<n.lineNumber)return s;if(!(s.endColumn>n.column))return s}}return this._editor.getModel().getDecorationRange(this._decorations[this._decorations.length-1])}matchAfterPosition(n){if(this._decorations.length===0)return null;for(let g=0,t=this._decorations.length;g<t;g++){let s=this._decorations[g],c=this._editor.getModel().getDecorationRange(s);if(!(!c||c.startLineNumber<n.lineNumber)){if(c.startLineNumber>n.lineNumber)return c;if(!(c.startColumn<n.column))return c}}return this._editor.getModel().getDecorationRange(this._decorations[0])}_allDecorations(){let n=[];return n=n.concat(this._decorations),n=n.concat(this._overviewRulerApproximateDecorations),this._findScopeDecorationIds.length&&n.push(...this._findScopeDecorationIds),this._rangeHighlightDecorationId&&n.push(this._rangeHighlightDecorationId),n}}e.FindDecorations=p,p._CURRENT_FIND_MATCH_DECORATION=T.ModelDecorationOptions.register({description:"current-find-match",stickiness:1,zIndex:13,className:"currentFindMatch",showIfCollapsed:!0,overviewRuler:{color:(0,S.themeColorFromId)(D.overviewRulerFindMatchForeground),position:N.OverviewRulerLane.Center},minimap:{color:(0,S.themeColorFromId)(D.minimapFindMatch),position:N.MinimapPosition.Inline}}),p._FIND_MATCH_DECORATION=T.ModelDecorationOptions.register({description:"find-match",stickiness:1,zIndex:10,className:"findMatch",showIfCollapsed:!0,overviewRuler:{color:(0,S.themeColorFromId)(D.overviewRulerFindMatchForeground),position:N.OverviewRulerLane.Center},minimap:{color:(0,S.themeColorFromId)(D.minimapFindMatch),position:N.MinimapPosition.Inline}}),p._FIND_MATCH_NO_OVERVIEW_DECORATION=T.ModelDecorationOptions.register({description:"find-match-no-overview",stickiness:1,className:"findMatch",showIfCollapsed:!0}),p._FIND_MATCH_ONLY_OVERVIEW_DECORATION=T.ModelDecorationOptions.register({description:"find-match-only-overview",stickiness:1,overviewRuler:{color:(0,S.themeColorFromId)(D.overviewRulerFindMatchForeground),position:N.OverviewRulerLane.Center}}),p._RANGE_HIGHLIGHT_DECORATION=T.ModelDecorationOptions.register({description:"find-range-highlight",stickiness:1,className:"rangeHighlight",isWholeLine:!0}),p._FIND_SCOPE_DECORATION=T.ModelDecorationOptions.register({description:"find-scope",className:"findScope",isWholeLine:!0})}),define(J[159],ee([0,1,19,14,2,98,13,3,22,176,677,423,424,15]),function(j,e,w,N,T,D,S,p,C,n,g,t,s,c){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.FindModelBoundToEditorModel=e.MATCHES_LIMIT=e.FIND_IDS=e.TogglePreserveCaseKeybinding=e.ToggleSearchScopeKeybinding=e.ToggleRegexKeybinding=e.ToggleWholeWordKeybinding=e.ToggleCaseSensitiveKeybinding=e.CONTEXT_REPLACE_INPUT_FOCUSED=e.CONTEXT_FIND_INPUT_FOCUSED=e.CONTEXT_FIND_WIDGET_VISIBLE=void 0,e.CONTEXT_FIND_WIDGET_VISIBLE=new c.RawContextKey("findWidgetVisible",!1),e.CONTEXT_FIND_INPUT_FOCUSED=new c.RawContextKey("findInputFocussed",!1),e.CONTEXT_REPLACE_INPUT_FOCUSED=new c.RawContextKey("replaceInputFocussed",!1),e.ToggleCaseSensitiveKeybinding={primary:512|33,mac:{primary:2048|512|33}},e.ToggleWholeWordKeybinding={primary:512|53,mac:{primary:2048|512|53}},e.ToggleRegexKeybinding={primary:512|48,mac:{primary:2048|512|48}},e.ToggleSearchScopeKeybinding={primary:512|42,mac:{primary:2048|512|42}},e.TogglePreserveCaseKeybinding={primary:512|46,mac:{primary:2048|512|46}},e.FIND_IDS={StartFindAction:"actions.find",StartFindWithSelection:"actions.findWithSelection",NextMatchFindAction:"editor.action.nextMatchFindAction",PreviousMatchFindAction:"editor.action.previousMatchFindAction",NextSelectionMatchFindAction:"editor.action.nextSelectionMatchFindAction",PreviousSelectionMatchFindAction:"editor.action.previousSelectionMatchFindAction",StartFindReplaceAction:"editor.action.startFindReplaceAction",CloseFindWidgetCommand:"closeFindWidget",ToggleCaseSensitiveCommand:"toggleFindCaseSensitive",ToggleWholeWordCommand:"toggleFindWholeWord",ToggleRegexCommand:"toggleFindRegex",ToggleSearchScopeCommand:"toggleFindInSelection",TogglePreserveCaseCommand:"togglePreserveCase",ReplaceOneAction:"editor.action.replaceOne",ReplaceAllAction:"editor.action.replaceAll",SelectAllMatchesAction:"editor.action.selectAllMatches"},e.MATCHES_LIMIT=19999;const u=240;class d{constructor(r,o){this._toDispose=new T.DisposableStore,this._editor=r,this._state=o,this._isDisposed=!1,this._startSearchingTimer=new N.TimeoutTimer,this._decorations=new g.FindDecorations(r),this._toDispose.add(this._decorations),this._updateDecorationsScheduler=new N.RunOnceScheduler(()=>this.research(!1),100),this._toDispose.add(this._updateDecorationsScheduler),this._toDispose.add(this._editor.onDidChangeCursorPosition(i=>{(i.reason===3||i.reason===5||i.reason===6)&&this._decorations.setStartPosition(this._editor.getPosition())})),this._ignoreModelContentChanged=!1,this._toDispose.add(this._editor.onDidChangeModelContent(i=>{this._ignoreModelContentChanged||(i.isFlush&&this._decorations.reset(),this._decorations.setStartPosition(this._editor.getPosition()),this._updateDecorationsScheduler.schedule())})),this._toDispose.add(this._state.onFindReplaceStateChange(i=>this._onStateChanged(i))),this.research(!1,this._state.searchScope)}dispose(){this._isDisposed=!0,(0,T.dispose)(this._startSearchingTimer),this._toDispose.dispose()}_onStateChanged(r){this._isDisposed||!this._editor.hasModel()||(r.searchString||r.isReplaceRevealed||r.isRegex||r.wholeWord||r.matchCase||r.searchScope)&&(this._editor.getModel().isTooLargeForSyncing()?(this._startSearchingTimer.cancel(),this._startSearchingTimer.setIfNotSet(()=>{r.searchScope?this.research(r.moveCursor,this._state.searchScope):this.research(r.moveCursor)},u)):r.searchScope?this.research(r.moveCursor,this._state.searchScope):this.research(r.moveCursor))}static _getSearchRange(r,o){return o||r.getFullModelRange()}research(r,o){let i=null;typeof o!="undefined"?o!==null&&(Array.isArray(o)?i=o:i=[o]):i=this._decorations.getFindScopes(),i!==null&&(i=i.map(y=>{if(y.startLineNumber!==y.endLineNumber){let _=y.endLineNumber;return y.endColumn===1&&(_=_-1),new p.Range(y.startLineNumber,1,_,this._editor.getModel().getLineMaxColumn(_))}return y}));let l=this._findMatches(i,!1,e.MATCHES_LIMIT);this._decorations.set(l,i);const h=this._editor.getSelection();let f=this._decorations.getCurrentMatchesPosition(h);if(f===0&&l.length>0){const y=(0,w.findFirstInSorted)(l.map(_=>_.range),_=>p.Range.compareRangesUsingStarts(_,h)>=0);f=y>0?y-1+1:f}this._state.changeMatchInfo(f,this._decorations.getCount(),void 0),r&&this._editor.getOption(35).cursorMoveOnType&&this._moveToNextMatch(this._decorations.getStartPosition())}_hasMatches(){return this._state.matchesCount>0}_cannotFind(){if(!this._hasMatches()){let r=this._decorations.getFindScope();return r&&this._editor.revealRangeInCenterIfOutsideViewport(r,0),!0}return!1}_setCurrentFindMatch(r){let o=this._decorations.setCurrentFindMatch(r);this._state.changeMatchInfo(o,this._decorations.getCount(),r),this._editor.setSelection(r),this._editor.revealRangeInCenterIfOutsideViewport(r,0)}_prevSearchPosition(r){let o=this._state.isRegex&&(this._state.searchString.indexOf("^")>=0||this._state.searchString.indexOf("$")>=0),{lineNumber:i,column:l}=r,h=this._editor.getModel();return o||l===1?(i===1?i=h.getLineCount():i--,l=h.getLineMaxColumn(i)):l--,new S.Position(i,l)}_moveToPrevMatch(r,o=!1){if(!this._state.canNavigateBack()){const v=this._decorations.matchAfterPosition(r);v&&this._setCurrentFindMatch(v);return}if(this._decorations.getCount()<e.MATCHES_LIMIT){let v=this._decorations.matchBeforePosition(r);v&&v.isEmpty()&&v.getStartPosition().equals(r)&&(r=this._prevSearchPosition(r),v=this._decorations.matchBeforePosition(r)),v&&this._setCurrentFindMatch(v);return}if(this._cannotFind())return;let i=this._decorations.getFindScope(),l=d._getSearchRange(this._editor.getModel(),i);l.getEndPosition().isBefore(r)&&(r=l.getEndPosition()),r.isBefore(l.getStartPosition())&&(r=l.getEndPosition());let{lineNumber:h,column:f}=r,y=this._editor.getModel(),_=new S.Position(h,f),b=y.findPreviousMatch(this._state.searchString,_,this._state.isRegex,this._state.matchCase,this._state.wholeWord?this._editor.getOption(115):null,!1);if(b&&b.range.isEmpty()&&b.range.getStartPosition().equals(_)&&(_=this._prevSearchPosition(_),b=y.findPreviousMatch(this._state.searchString,_,this._state.isRegex,this._state.matchCase,this._state.wholeWord?this._editor.getOption(115):null,!1)),!!b){if(!o&&!l.containsRange(b.range))return this._moveToPrevMatch(b.range.getStartPosition(),!0);this._setCurrentFindMatch(b.range)}}moveToPrevMatch(){this._moveToPrevMatch(this._editor.getSelection().getStartPosition())}_nextSearchPosition(r){let o=this._state.isRegex&&(this._state.searchString.indexOf("^")>=0||this._state.searchString.indexOf("$")>=0),{lineNumber:i,column:l}=r,h=this._editor.getModel();return o||l===h.getLineMaxColumn(i)?(i===h.getLineCount()?i=1:i++,l=1):l++,new S.Position(i,l)}_moveToNextMatch(r){if(!this._state.canNavigateForward()){const i=this._decorations.matchBeforePosition(r);i&&this._setCurrentFindMatch(i);return}if(this._decorations.getCount()<e.MATCHES_LIMIT){let i=this._decorations.matchAfterPosition(r);i&&i.isEmpty()&&i.getStartPosition().equals(r)&&(r=this._nextSearchPosition(r),i=this._decorations.matchAfterPosition(r)),i&&this._setCurrentFindMatch(i);return}let o=this._getNextMatch(r,!1,!0);o&&this._setCurrentFindMatch(o.range)}_getNextMatch(r,o,i,l=!1){if(this._cannotFind())return null;let h=this._decorations.getFindScope(),f=d._getSearchRange(this._editor.getModel(),h);f.getEndPosition().isBefore(r)&&(r=f.getStartPosition()),r.isBefore(f.getStartPosition())&&(r=f.getStartPosition());let{lineNumber:y,column:_}=r,b=this._editor.getModel(),v=new S.Position(y,_),m=b.findNextMatch(this._state.searchString,v,this._state.isRegex,this._state.matchCase,this._state.wholeWord?this._editor.getOption(115):null,o);return i&&m&&m.range.isEmpty()&&m.range.getStartPosition().equals(v)&&(v=this._nextSearchPosition(v),m=b.findNextMatch(this._state.searchString,v,this._state.isRegex,this._state.matchCase,this._state.wholeWord?this._editor.getOption(115):null,o)),m?!l&&!f.containsRange(m.range)?this._getNextMatch(m.range.getEndPosition(),o,i,!0):m:null}moveToNextMatch(){this._moveToNextMatch(this._editor.getSelection().getEndPosition())}_getReplacePattern(){return this._state.isRegex?(0,s.parseReplaceString)(this._state.replaceString):s.ReplacePattern.fromStaticValue(this._state.replaceString)}replace(){if(!this._hasMatches())return;let r=this._getReplacePattern(),o=this._editor.getSelection(),i=this._getNextMatch(o.getStartPosition(),!0,!1);if(i)if(o.equalsRange(i.range)){let l=r.buildReplaceString(i.matches,this._state.preserveCase),h=new D.ReplaceCommand(o,l);this._executeEditorCommand("replace",h),this._decorations.setStartPosition(new S.Position(o.startLineNumber,o.startColumn+l.length)),this.research(!0)}else this._decorations.setStartPosition(this._editor.getPosition()),this._setCurrentFindMatch(i.range)}_findMatches(r,o,i){const l=(r||[null]).map(h=>d._getSearchRange(this._editor.getModel(),h));return this._editor.getModel().findMatches(this._state.searchString,l,this._state.isRegex,this._state.matchCase,this._state.wholeWord?this._editor.getOption(115):null,o,i)}replaceAll(){if(!this._hasMatches())return;const r=this._decorations.getFindScopes();r===null&&this._state.matchesCount>=e.MATCHES_LIMIT?this._largeReplaceAll():this._regularReplaceAll(r),this.research(!1)}_largeReplaceAll(){const o=new n.SearchParams(this._state.searchString,this._state.isRegex,this._state.matchCase,this._state.wholeWord?this._editor.getOption(115):null).parseSearchRequest();if(!o)return;let i=o.regex;if(!i.multiline){let m="mu";i.ignoreCase&&(m+="i"),i.global&&(m+="g"),i=new RegExp(i.source,m)}const l=this._editor.getModel(),h=l.getValue(1),f=l.getFullModelRange(),y=this._getReplacePattern();let _;const b=this._state.preserveCase;y.hasReplacementPatterns||b?_=h.replace(i,function(){return y.buildReplaceString(arguments,b)}):_=h.replace(i,y.buildReplaceString(null,b));let v=new D.ReplaceCommandThatPreservesSelection(f,_,this._editor.getSelection());this._executeEditorCommand("replaceAll",v)}_regularReplaceAll(r){const o=this._getReplacePattern();let i=this._findMatches(r,o.hasReplacementPatterns||this._state.preserveCase,1073741824),l=[];for(let f=0,y=i.length;f<y;f++)l[f]=o.buildReplaceString(i[f].matches,this._state.preserveCase);let h=new t.ReplaceAllCommand(this._editor.getSelection(),i.map(f=>f.range),l);this._executeEditorCommand("replaceAll",h)}selectAllMatches(){if(!this._hasMatches())return;let r=this._decorations.getFindScopes(),i=this._findMatches(r,!1,1073741824).map(h=>new C.Selection(h.range.startLineNumber,h.range.startColumn,h.range.endLineNumber,h.range.endColumn)),l=this._editor.getSelection();for(let h=0,f=i.length;h<f;h++)if(i[h].equalsRange(l)){i=[l].concat(i.slice(0,h)).concat(i.slice(h+1));break}this._editor.setSelections(i)}_executeEditorCommand(r,o){try{this._ignoreModelContentChanged=!0,this._editor.pushUndoStop(),this._editor.executeCommand(r,o),this._editor.pushUndoStop()}finally{this._ignoreModelContentChanged=!1}}}e.FindModelBoundToEditorModel=d}),define(J[678],ee([0,1,7,247,53,14,159,21,10]),function(j,e,w,N,T,D,S,p,C){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.FindOptionsWidget=void 0;class n extends T.Widget{constructor(t,s,c,u){super();this._hideSoon=this._register(new D.RunOnceScheduler(()=>this._hide(),2e3)),this._isVisible=!1,this._editor=t,this._state=s,this._keybindingService=c,this._domNode=document.createElement("div"),this._domNode.className="findOptionsWidget",this._domNode.style.display="none",this._domNode.style.top="10px",this._domNode.setAttribute("role","presentation"),this._domNode.setAttribute("aria-hidden","true");const d=u.getColorTheme().getColor(p.inputActiveOptionBorder),a=u.getColorTheme().getColor(p.inputActiveOptionForeground),r=u.getColorTheme().getColor(p.inputActiveOptionBackground);this.caseSensitive=this._register(new N.CaseSensitiveCheckbox({appendTitle:this._keybindingLabelFor(S.FIND_IDS.ToggleCaseSensitiveCommand),isChecked:this._state.matchCase,inputActiveOptionBorder:d,inputActiveOptionForeground:a,inputActiveOptionBackground:r})),this._domNode.appendChild(this.caseSensitive.domNode),this._register(this.caseSensitive.onChange(()=>{this._state.change({matchCase:this.caseSensitive.checked},!1)})),this.wholeWords=this._register(new N.WholeWordsCheckbox({appendTitle:this._keybindingLabelFor(S.FIND_IDS.ToggleWholeWordCommand),isChecked:this._state.wholeWord,inputActiveOptionBorder:d,inputActiveOptionForeground:a,inputActiveOptionBackground:r})),this._domNode.appendChild(this.wholeWords.domNode),this._register(this.wholeWords.onChange(()=>{this._state.change({wholeWord:this.wholeWords.checked},!1)})),this.regex=this._register(new N.RegexCheckbox({appendTitle:this._keybindingLabelFor(S.FIND_IDS.ToggleRegexCommand),isChecked:this._state.isRegex,inputActiveOptionBorder:d,inputActiveOptionForeground:a,inputActiveOptionBackground:r})),this._domNode.appendChild(this.regex.domNode),this._register(this.regex.onChange(()=>{this._state.change({isRegex:this.regex.checked},!1)})),this._editor.addOverlayWidget(this),this._register(this._state.onFindReplaceStateChange(o=>{let i=!1;o.isRegex&&(this.regex.checked=this._state.isRegex,i=!0),o.wholeWord&&(this.wholeWords.checked=this._state.wholeWord,i=!0),o.matchCase&&(this.caseSensitive.checked=this._state.matchCase,i=!0),!this._state.isRevealed&&i&&this._revealTemporarily()})),this._register(w.addDisposableNonBubblingMouseOutListener(this._domNode,o=>this._onMouseOut())),this._register(w.addDisposableListener(this._domNode,"mouseover",o=>this._onMouseOver())),this._applyTheme(u.getColorTheme()),this._register(u.onDidColorThemeChange(this._applyTheme.bind(this)))}_keybindingLabelFor(t){let s=this._keybindingService.lookupKeybinding(t);return s?` (${s.getLabel()})`:""}dispose(){this._editor.removeOverlayWidget(this),super.dispose()}getId(){return n.ID}getDomNode(){return this._domNode}getPosition(){return{preference:0}}highlightFindOptions(){this._revealTemporarily()}_revealTemporarily(){this._show(),this._hideSoon.schedule()}_onMouseOut(){this._hideSoon.schedule()}_onMouseOver(){this._hideSoon.cancel()}_show(){this._isVisible||(this._isVisible=!0,this._domNode.style.display="block")}_hide(){!this._isVisible||(this._isVisible=!1,this._domNode.style.display="none")}_applyTheme(t){let s={inputActiveOptionBorder:t.getColor(p.inputActiveOptionBorder),inputActiveOptionForeground:t.getColor(p.inputActiveOptionForeground),inputActiveOptionBackground:t.getColor(p.inputActiveOptionBackground)};this.caseSensitive.style(s),this.wholeWords.style(s),this.regex.style(s)}}e.FindOptionsWidget=n,n.ID="editor.contrib.findOptionsWidget",(0,C.registerThemingParticipant)((g,t)=>{const s=g.getColor(p.editorWidgetBackground);s&&t.addRule(`.monaco-editor .findOptionsWidget { background-color: ${s}; }`);const c=g.getColor(p.editorWidgetForeground);c&&t.addRule(`.monaco-editor .findOptionsWidget { color: ${c}; }`);const u=g.getColor(p.widgetShadow);u&&t.addRule(`.monaco-editor .findOptionsWidget { box-shadow: 0 0 8px 2px ${u}; }`);const d=g.getColor(p.contrastBorder);d&&t.addRule(`.monaco-editor .findOptionsWidget { border: 2px solid ${d}; }`)})}),define(J[679],ee([0,1,4,2,3,159]),function(j,e,w,N,T,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.FindReplaceState=void 0;function S(C,n){return C===1?!0:C===2?!1:n}class p extends N.Disposable{constructor(){super();this._onFindReplaceStateChange=this._register(new w.Emitter),this.onFindReplaceStateChange=this._onFindReplaceStateChange.event,this._searchString="",this._replaceString="",this._isRevealed=!1,this._isReplaceRevealed=!1,this._isRegex=!1,this._isRegexOverride=0,this._wholeWord=!1,this._wholeWordOverride=0,this._matchCase=!1,this._matchCaseOverride=0,this._preserveCase=!1,this._preserveCaseOverride=0,this._searchScope=null,this._matchesPosition=0,this._matchesCount=0,this._currentMatch=null,this._loop=!0}get searchString(){return this._searchString}get replaceString(){return this._replaceString}get isRevealed(){return this._isRevealed}get isReplaceRevealed(){return this._isReplaceRevealed}get isRegex(){return S(this._isRegexOverride,this._isRegex)}get wholeWord(){return S(this._wholeWordOverride,this._wholeWord)}get matchCase(){return S(this._matchCaseOverride,this._matchCase)}get preserveCase(){return S(this._preserveCaseOverride,this._preserveCase)}get actualIsRegex(){return this._isRegex}get actualWholeWord(){return this._wholeWord}get actualMatchCase(){return this._matchCase}get actualPreserveCase(){return this._preserveCase}get searchScope(){return this._searchScope}get matchesPosition(){return this._matchesPosition}get matchesCount(){return this._matchesCount}get currentMatch(){return this._currentMatch}changeMatchInfo(n,g,t){let s={moveCursor:!1,updateHistory:!1,searchString:!1,replaceString:!1,isRevealed:!1,isReplaceRevealed:!1,isRegex:!1,wholeWord:!1,matchCase:!1,preserveCase:!1,searchScope:!1,matchesPosition:!1,matchesCount:!1,currentMatch:!1,loop:!1},c=!1;g===0&&(n=0),n>g&&(n=g),this._matchesPosition!==n&&(this._matchesPosition=n,s.matchesPosition=!0,c=!0),this._matchesCount!==g&&(this._matchesCount=g,s.matchesCount=!0,c=!0),typeof t!="undefined"&&(T.Range.equalsRange(this._currentMatch,t)||(this._currentMatch=t,s.currentMatch=!0,c=!0)),c&&this._onFindReplaceStateChange.fire(s)}change(n,g,t=!0){var s;let c={moveCursor:g,updateHistory:t,searchString:!1,replaceString:!1,isRevealed:!1,isReplaceRevealed:!1,isRegex:!1,wholeWord:!1,matchCase:!1,preserveCase:!1,searchScope:!1,matchesPosition:!1,matchesCount:!1,currentMatch:!1,loop:!1},u=!1;const d=this.isRegex,a=this.wholeWord,r=this.matchCase,o=this.preserveCase;typeof n.searchString!="undefined"&&this._searchString!==n.searchString&&(this._searchString=n.searchString,c.searchString=!0,u=!0),typeof n.replaceString!="undefined"&&this._replaceString!==n.replaceString&&(this._replaceString=n.replaceString,c.replaceString=!0,u=!0),typeof n.isRevealed!="undefined"&&this._isRevealed!==n.isRevealed&&(this._isRevealed=n.isRevealed,c.isRevealed=!0,u=!0),typeof n.isReplaceRevealed!="undefined"&&this._isReplaceRevealed!==n.isReplaceRevealed&&(this._isReplaceRevealed=n.isReplaceRevealed,c.isReplaceRevealed=!0,u=!0),typeof n.isRegex!="undefined"&&(this._isRegex=n.isRegex),typeof n.wholeWord!="undefined"&&(this._wholeWord=n.wholeWord),typeof n.matchCase!="undefined"&&(this._matchCase=n.matchCase),typeof n.preserveCase!="undefined"&&(this._preserveCase=n.preserveCase),typeof n.searchScope!="undefined"&&(((s=n.searchScope)===null||s===void 0?void 0:s.every(i=>{var l;return(l=this._searchScope)===null||l===void 0?void 0:l.some(h=>!T.Range.equalsRange(h,i))}))||(this._searchScope=n.searchScope,c.searchScope=!0,u=!0)),typeof n.loop!="undefined"&&this._loop!==n.loop&&(this._loop=n.loop,c.loop=!0,u=!0),this._isRegexOverride=typeof n.isRegexOverride!="undefined"?n.isRegexOverride:0,this._wholeWordOverride=typeof n.wholeWordOverride!="undefined"?n.wholeWordOverride:0,this._matchCaseOverride=typeof n.matchCaseOverride!="undefined"?n.matchCaseOverride:0,this._preserveCaseOverride=typeof n.preserveCaseOverride!="undefined"?n.preserveCaseOverride:0,d!==this.isRegex&&(u=!0,c.isRegex=!0),a!==this.wholeWord&&(u=!0,c.wholeWord=!0),r!==this.matchCase&&(u=!0,c.matchCase=!0),o!==this.preserveCase&&(u=!0,c.preserveCase=!0),u&&this._onFindReplaceStateChange.fire(c)}canNavigateBack(){return this.canNavigateInLoop()||this.matchesPosition!==1}canNavigateForward(){return this.canNavigateInLoop()||this.matchesPosition<this.matchesCount}canNavigateInLoop(){return this._loop||this.matchesCount>=D.MATCHES_LIMIT}}e.FindReplaceState=p}),define(J[680],ee([0,1,7,45,170,110,53,14,27,11,2,17,8,3,159,495,648,556,21,81,10,360]),function(j,e,w,N,T,D,S,p,C,n,g,t,s,c,u,d,a,r,o,i,l){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SimpleButton=e.FindWidget=e.FindWidgetViewZone=e.NLS_NO_RESULTS=e.NLS_MATCHES_LOCATION=e.findNextMatchIcon=e.findPreviousMatchIcon=e.findReplaceAllIcon=e.findReplaceIcon=void 0;const h=(0,i.registerIcon)("find-selection",C.Codicon.selection,d.localize(0,null)),f=(0,i.registerIcon)("find-collapsed",C.Codicon.chevronRight,d.localize(1,null)),y=(0,i.registerIcon)("find-expanded",C.Codicon.chevronDown,d.localize(2,null));e.findReplaceIcon=(0,i.registerIcon)("find-replace",C.Codicon.replace,d.localize(3,null)),e.findReplaceAllIcon=(0,i.registerIcon)("find-replace-all",C.Codicon.replaceAll,d.localize(4,null)),e.findPreviousMatchIcon=(0,i.registerIcon)("find-previous-match",C.Codicon.arrowUp,d.localize(5,null)),e.findNextMatchIcon=(0,i.registerIcon)("find-next-match",C.Codicon.arrowDown,d.localize(6,null));const _=d.localize(7,null),b=d.localize(8,null),v=d.localize(9,null),m=d.localize(10,null),E=d.localize(11,null),I=d.localize(12,null),k=d.localize(13,null),M=d.localize(14,null),P=d.localize(15,null),F=d.localize(16,null),R=d.localize(17,null),A=d.localize(18,null,u.MATCHES_LIMIT);e.NLS_MATCHES_LOCATION=d.localize(19,null),e.NLS_NO_RESULTS=d.localize(20,null);const O=419,B=275-54;let W=69;const K=33,H="ctrlEnterReplaceAll.windows.donotask",Y=t.isMacintosh?256:2048;class X{constructor(U){this.afterLineNumber=U,this.heightInPx=K,this.suppressMouseDown=!1,this.domNode=document.createElement("div"),this.domNode.className="dock-find-viewzone"}}e.FindWidgetViewZone=X;function Z(x,U,$){const V=!!U.match(/\n/);if($&&V&&$.selectionStart>0){x.stopPropagation();return}}function se(x,U,$){const V=!!U.match(/\n/);if($&&V&&$.selectionEnd<$.value.length){x.stopPropagation();return}}class oe extends S.Widget{constructor(U,$,V,Q,ue,pe,fe,re,ie){super();this._cachedHeight=null,this._revealTimeouts=[],this._codeEditor=U,this._controller=$,this._state=V,this._contextViewProvider=Q,this._keybindingService=ue,this._contextKeyService=pe,this._storageService=re,this._notificationService=ie,this._ctrlEnterReplaceAllWarningPrompted=!!re.getBoolean(H,0),this._isVisible=!1,this._isReplaceVisible=!1,this._ignoreChangeEvent=!1,this._updateHistoryDelayer=new p.Delayer(500),this._register((0,g.toDisposable)(()=>this._updateHistoryDelayer.cancel())),this._register(this._state.onFindReplaceStateChange(ae=>this._onStateChanged(ae))),this._buildDomNode(),this._updateButtons(),this._tryUpdateWidgetWidth(),this._findInput.inputBox.layout(),this._register(this._codeEditor.onDidChangeConfiguration(ae=>{if(ae.hasChanged(80)&&(this._codeEditor.getOption(80)&&this._state.change({isReplaceRevealed:!1},!1),this._updateButtons()),ae.hasChanged(129)&&this._tryUpdateWidgetWidth(),ae.hasChanged(2)&&this.updateAccessibilitySupport(),ae.hasChanged(35)){const q=this._codeEditor.getOption(35).addExtraSpaceOnTop;q&&!this._viewZone&&(this._viewZone=new X(0),this._showViewZone()),!q&&this._viewZone&&this._removeViewZone()}})),this.updateAccessibilitySupport(),this._register(this._codeEditor.onDidChangeCursorSelection(()=>{this._isVisible&&this._updateToggleSelectionFindButton()})),this._register(this._codeEditor.onDidFocusEditorWidget(()=>Re(this,void 0,void 0,function*(){if(this._isVisible){let ae=yield this._controller.getGlobalBufferTerm();ae&&ae!==this._state.searchString&&(this._state.change({searchString:ae},!1),this._findInput.select())}}))),this._findInputFocused=u.CONTEXT_FIND_INPUT_FOCUSED.bindTo(pe),this._findFocusTracker=this._register(w.trackFocus(this._findInput.inputBox.inputElement)),this._register(this._findFocusTracker.onDidFocus(()=>{this._findInputFocused.set(!0),this._updateSearchScope()})),this._register(this._findFocusTracker.onDidBlur(()=>{this._findInputFocused.set(!1)})),this._replaceInputFocused=u.CONTEXT_REPLACE_INPUT_FOCUSED.bindTo(pe),this._replaceFocusTracker=this._register(w.trackFocus(this._replaceInput.inputBox.inputElement)),this._register(this._replaceFocusTracker.onDidFocus(()=>{this._replaceInputFocused.set(!0),this._updateSearchScope()})),this._register(this._replaceFocusTracker.onDidBlur(()=>{this._replaceInputFocused.set(!1)})),this._codeEditor.addOverlayWidget(this),this._codeEditor.getOption(35).addExtraSpaceOnTop&&(this._viewZone=new X(0)),this._applyTheme(fe.getColorTheme()),this._register(fe.onDidColorThemeChange(this._applyTheme.bind(this))),this._register(this._codeEditor.onDidChangeModel(()=>{!this._isVisible||(this._viewZoneId=void 0)})),this._register(this._codeEditor.onDidScrollChange(ae=>{if(ae.scrollTopChanged){this._layoutViewZone();return}setTimeout(()=>{this._layoutViewZone()},0)}))}getId(){return oe.ID}getDomNode(){return this._domNode}getPosition(){return this._isVisible?{preference:0}:null}_onStateChanged(U){if(U.searchString){try{this._ignoreChangeEvent=!0,this._findInput.setValue(this._state.searchString)}finally{this._ignoreChangeEvent=!1}this._updateButtons()}if(U.replaceString&&(this._replaceInput.inputBox.value=this._state.replaceString),U.isRevealed&&(this._state.isRevealed?this._reveal():this._hide(!0)),U.isReplaceRevealed&&(this._state.isReplaceRevealed?!this._codeEditor.getOption(80)&&!this._isReplaceVisible&&(this._isReplaceVisible=!0,this._replaceInput.width=w.getTotalWidth(this._findInput.domNode),this._updateButtons(),this._replaceInput.inputBox.layout()):this._isReplaceVisible&&(this._isReplaceVisible=!1,this._updateButtons())),(U.isRevealed||U.isReplaceRevealed)&&(this._state.isRevealed||this._state.isReplaceRevealed)&&this._tryUpdateHeight()&&this._showViewZone(),U.isRegex&&this._findInput.setRegex(this._state.isRegex),U.wholeWord&&this._findInput.setWholeWords(this._state.wholeWord),U.matchCase&&this._findInput.setCaseSensitive(this._state.matchCase),U.preserveCase&&this._replaceInput.setPreserveCase(this._state.preserveCase),U.searchScope&&(this._state.searchScope?this._toggleSelectionFind.checked=!0:this._toggleSelectionFind.checked=!1,this._updateToggleSelectionFindButton()),U.searchString||U.matchesCount||U.matchesPosition){let $=this._state.searchString.length>0&&this._state.matchesCount===0;this._domNode.classList.toggle("no-results",$),this._updateMatchesCount(),this._updateButtons()}(U.searchString||U.currentMatch)&&this._layoutViewZone(),U.updateHistory&&this._delayedUpdateHistory(),U.loop&&this._updateButtons()}_delayedUpdateHistory(){this._updateHistoryDelayer.trigger(this._updateHistory.bind(this)).then(void 0,n.onUnexpectedError)}_updateHistory(){this._state.searchString&&this._findInput.inputBox.addToHistory(),this._state.replaceString&&this._replaceInput.inputBox.addToHistory()}_updateMatchesCount(){this._matchesCount.style.minWidth=W+"px",this._state.matchesCount>=u.MATCHES_LIMIT?this._matchesCount.title=A:this._matchesCount.title="",this._matchesCount.firstChild&&this._matchesCount.removeChild(this._matchesCount.firstChild);let U;if(this._state.matchesCount>0){let $=String(this._state.matchesCount);this._state.matchesCount>=u.MATCHES_LIMIT&&($+="+");let V=String(this._state.matchesPosition);V==="0"&&(V="?"),U=s.format(e.NLS_MATCHES_LOCATION,V,$)}else U=e.NLS_NO_RESULTS;this._matchesCount.appendChild(document.createTextNode(U)),(0,N.alert)(this._getAriaLabel(U,this._state.currentMatch,this._state.searchString)),W=Math.max(W,this._matchesCount.clientWidth)}_getAriaLabel(U,$,V){if(U===e.NLS_NO_RESULTS)return V===""?d.localize(21,null,U):d.localize(22,null,U,V);if($){const Q=d.localize(23,null,U,V,$.startLineNumber+":"+$.startColumn),ue=this._codeEditor.getModel();return ue&&$.startLineNumber<=ue.getLineCount()&&$.startLineNumber>=1?`${ue.getLineContent($.startLineNumber)}, ${Q}`:Q}return d.localize(24,null,U,V)}_updateToggleSelectionFindButton(){let U=this._codeEditor.getSelection(),$=U?U.startLineNumber!==U.endLineNumber||U.startColumn!==U.endColumn:!1,V=this._toggleSelectionFind.checked;this._isVisible&&(V||$)?this._toggleSelectionFind.enable():this._toggleSelectionFind.disable()}_updateButtons(){this._findInput.setEnabled(this._isVisible),this._replaceInput.setEnabled(this._isVisible&&this._isReplaceVisible),this._updateToggleSelectionFindButton(),this._closeBtn.setEnabled(this._isVisible);let U=this._state.searchString.length>0,$=!!this._state.matchesCount;this._prevBtn.setEnabled(this._isVisible&&U&&$&&this._state.canNavigateBack()),this._nextBtn.setEnabled(this._isVisible&&U&&$&&this._state.canNavigateForward()),this._replaceBtn.setEnabled(this._isVisible&&this._isReplaceVisible&&U),this._replaceAllBtn.setEnabled(this._isVisible&&this._isReplaceVisible&&U),this._domNode.classList.toggle("replaceToggled",this._isReplaceVisible),this._toggleReplaceBtn.setExpanded(this._isReplaceVisible);let V=!this._codeEditor.getOption(80);this._toggleReplaceBtn.setEnabled(this._isVisible&&V)}_reveal(){if(this._revealTimeouts.forEach(U=>{clearTimeout(U)}),this._revealTimeouts=[],!this._isVisible){this._isVisible=!0;const U=this._codeEditor.getSelection();switch(this._codeEditor.getOption(35).autoFindInSelection){case"always":this._toggleSelectionFind.checked=!0;break;case"never":this._toggleSelectionFind.checked=!1;break;case"multiline":const V=!!U&&U.startLineNumber!==U.endLineNumber;this._toggleSelectionFind.checked=V;break;default:break}this._tryUpdateWidgetWidth(),this._updateButtons(),this._revealTimeouts.push(setTimeout(()=>{this._domNode.classList.add("visible"),this._domNode.setAttribute("aria-hidden","false")},0)),this._revealTimeouts.push(setTimeout(()=>{this._findInput.validate()},200)),this._codeEditor.layoutOverlayWidget(this);let $=!0;if(this._codeEditor.getOption(35).seedSearchStringFromSelection&&U){const V=this._codeEditor.getDomNode();if(V){const Q=w.getDomNodePagePosition(V),ue=this._codeEditor.getScrolledVisiblePosition(U.getStartPosition()),pe=Q.left+(ue?ue.left:0),fe=ue?ue.top:0;if(this._viewZone&&fe<this._viewZone.heightInPx){U.endLineNumber>U.startLineNumber&&($=!1);const re=w.getTopLeftOffset(this._domNode).left;pe>re&&($=!1);const ie=this._codeEditor.getScrolledVisiblePosition(U.getEndPosition());Q.left+(ie?ie.left:0)>re&&($=!1)}}}this._showViewZone($)}}_hide(U){this._revealTimeouts.forEach($=>{clearTimeout($)}),this._revealTimeouts=[],this._isVisible&&(this._isVisible=!1,this._updateButtons(),this._domNode.classList.remove("visible"),this._domNode.setAttribute("aria-hidden","true"),this._findInput.clearMessage(),U&&this._codeEditor.focus(),this._codeEditor.layoutOverlayWidget(this),this._removeViewZone())}_layoutViewZone(U){if(!this._codeEditor.getOption(35).addExtraSpaceOnTop){this._removeViewZone();return}if(!this._isVisible)return;const V=this._viewZone;this._viewZoneId!==void 0||!V||this._codeEditor.changeViewZones(Q=>{V.heightInPx=this._getHeight(),this._viewZoneId=Q.addZone(V),this._codeEditor.setScrollTop(U||this._codeEditor.getScrollTop()+V.heightInPx)})}_showViewZone(U=!0){if(!this._isVisible||!this._codeEditor.getOption(35).addExtraSpaceOnTop)return;this._viewZone===void 0&&(this._viewZone=new X(0));const V=this._viewZone;this._codeEditor.changeViewZones(Q=>{if(this._viewZoneId!==void 0){const ue=this._getHeight();if(ue===V.heightInPx)return;let pe=ue-V.heightInPx;V.heightInPx=ue,Q.layoutZone(this._viewZoneId),U&&this._codeEditor.setScrollTop(this._codeEditor.getScrollTop()+pe);return}else{let ue=this._getHeight();if(ue-=this._codeEditor.getOption(74).top,ue<=0)return;V.heightInPx=ue,this._viewZoneId=Q.addZone(V),U&&this._codeEditor.setScrollTop(this._codeEditor.getScrollTop()+ue)}})}_removeViewZone(){this._codeEditor.changeViewZones(U=>{this._viewZoneId!==void 0&&(U.removeZone(this._viewZoneId),this._viewZoneId=void 0,this._viewZone&&(this._codeEditor.setScrollTop(this._codeEditor.getScrollTop()-this._viewZone.heightInPx),this._viewZone=void 0))})}_applyTheme(U){let $={inputActiveOptionBorder:U.getColor(o.inputActiveOptionBorder),inputActiveOptionBackground:U.getColor(o.inputActiveOptionBackground),inputActiveOptionForeground:U.getColor(o.inputActiveOptionForeground),inputBackground:U.getColor(o.inputBackground),inputForeground:U.getColor(o.inputForeground),inputBorder:U.getColor(o.inputBorder),inputValidationInfoBackground:U.getColor(o.inputValidationInfoBackground),inputValidationInfoForeground:U.getColor(o.inputValidationInfoForeground),inputValidationInfoBorder:U.getColor(o.inputValidationInfoBorder),inputValidationWarningBackground:U.getColor(o.inputValidationWarningBackground),inputValidationWarningForeground:U.getColor(o.inputValidationWarningForeground),inputValidationWarningBorder:U.getColor(o.inputValidationWarningBorder),inputValidationErrorBackground:U.getColor(o.inputValidationErrorBackground),inputValidationErrorForeground:U.getColor(o.inputValidationErrorForeground),inputValidationErrorBorder:U.getColor(o.inputValidationErrorBorder)};this._findInput.style($),this._replaceInput.style($),this._toggleSelectionFind.style($)}_tryUpdateWidgetWidth(){if(!this._isVisible||!w.isInDOM(this._domNode))return;const U=this._codeEditor.getLayoutInfo();if(U.contentWidth<=0){this._domNode.classList.add("hiddenEditor");return}else this._domNode.classList.contains("hiddenEditor")&&this._domNode.classList.remove("hiddenEditor");const V=U.width,Q=U.minimap.minimapWidth;let ue=!1,pe=!1,fe=!1;if(this._resized&&w.getTotalWidth(this._domNode)>O){this._domNode.style.maxWidth=`${V-28-Q-15}px`,this._replaceInput.width=w.getTotalWidth(this._findInput.domNode);return}if(O+28+Q>=V&&(pe=!0),O+28+Q-W>=V&&(fe=!0),O+28+Q-W>=V+50&&(ue=!0),this._domNode.classList.toggle("collapsed-find-widget",ue),this._domNode.classList.toggle("narrow-find-widget",fe),this._domNode.classList.toggle("reduced-find-widget",pe),!fe&&!ue&&(this._domNode.style.maxWidth=`${V-28-Q-15}px`),this._resized){this._findInput.inputBox.layout();let re=this._findInput.inputBox.element.clientWidth;re>0&&(this._replaceInput.width=re)}else this._isReplaceVisible&&(this._replaceInput.width=w.getTotalWidth(this._findInput.domNode))}_getHeight(){let U=0;return U+=4,U+=this._findInput.inputBox.height+2,this._isReplaceVisible&&(U+=4,U+=this._replaceInput.inputBox.height+2),U+=4,U}_tryUpdateHeight(){const U=this._getHeight();return this._cachedHeight!==null&&this._cachedHeight===U?!1:(this._cachedHeight=U,this._domNode.style.height=`${U}px`,!0)}focusFindInput(){this._findInput.select(),this._findInput.focus()}focusReplaceInput(){this._replaceInput.select(),this._replaceInput.focus()}highlightFindOptions(){this._findInput.highlightFindOptions()}_updateSearchScope(){if(!!this._codeEditor.hasModel()&&this._toggleSelectionFind.checked){let U=this._codeEditor.getSelections();U.map($=>{$.endColumn===1&&$.endLineNumber>$.startLineNumber&&($=$.setEndPosition($.endLineNumber-1,this._codeEditor.getModel().getLineMaxColumn($.endLineNumber-1)));const V=this._state.currentMatch;return $.startLineNumber!==$.endLineNumber&&!c.Range.equalsRange($,V)?$:null}).filter($=>!!$),U.length&&this._state.change({searchScope:U},!0)}}_onFindInputMouseDown(U){U.middleButton&&U.stopPropagation()}_onFindInputKeyDown(U){if(U.equals(Y|3))if(this._keybindingService.dispatchEvent(U,U.target)){U.preventDefault();return}else{this._findInput.inputBox.insertAtCursor(`
`),U.preventDefault();return}if(U.equals(2)){this._isReplaceVisible?this._replaceInput.focus():this._findInput.focusOnCaseSensitive(),U.preventDefault();return}if(U.equals(2048|18)){this._codeEditor.focus(),U.preventDefault();return}if(U.equals(16))return Z(U,this._findInput.getValue(),this._findInput.domNode.querySelector("textarea"));if(U.equals(18))return se(U,this._findInput.getValue(),this._findInput.domNode.querySelector("textarea"))}_onReplaceInputKeyDown(U){if(U.equals(Y|3))if(this._keybindingService.dispatchEvent(U,U.target)){U.preventDefault();return}else{t.isWindows&&t.isNative&&!this._ctrlEnterReplaceAllWarningPrompted&&(this._notificationService.info(d.localize(25,null)),this._ctrlEnterReplaceAllWarningPrompted=!0,this._storageService.store(H,!0,0,0)),this._replaceInput.inputBox.insertAtCursor(`
`),U.preventDefault();return}if(U.equals(2)){this._findInput.focusOnCaseSensitive(),U.preventDefault();return}if(U.equals(1024|2)){this._findInput.focus(),U.preventDefault();return}if(U.equals(2048|18)){this._codeEditor.focus(),U.preventDefault();return}if(U.equals(16))return Z(U,this._replaceInput.inputBox.value,this._replaceInput.inputBox.element.querySelector("textarea"));if(U.equals(18))return se(U,this._replaceInput.inputBox.value,this._replaceInput.inputBox.element.querySelector("textarea"))}getVerticalSashLeft(U){return 0}_keybindingLabelFor(U){let $=this._keybindingService.lookupKeybinding(U);return $?` (${$.getLabel()})`:""}_buildDomNode(){const U=!0,$=!0;this._findInput=this._register(new a.ContextScopedFindInput(null,this._contextViewProvider,{width:B,label:_,placeholder:b,appendCaseSensitiveLabel:this._keybindingLabelFor(u.FIND_IDS.ToggleCaseSensitiveCommand),appendWholeWordsLabel:this._keybindingLabelFor(u.FIND_IDS.ToggleWholeWordCommand),appendRegexLabel:this._keybindingLabelFor(u.FIND_IDS.ToggleRegexCommand),validation:re=>{if(re.length===0||!this._findInput.getRegex())return null;try{return new RegExp(re,"gu"),null}catch(ie){return{content:ie.message}}},flexibleHeight:U,flexibleWidth:$,flexibleMaxHeight:118,showHistoryHint:()=>(0,r.showHistoryKeybindingHint)(this._keybindingService)},this._contextKeyService,!0)),this._findInput.setRegex(!!this._state.isRegex),this._findInput.setCaseSensitive(!!this._state.matchCase),this._findInput.setWholeWords(!!this._state.wholeWord),this._register(this._findInput.onKeyDown(re=>this._onFindInputKeyDown(re))),this._register(this._findInput.inputBox.onDidChange(()=>{this._ignoreChangeEvent||this._state.change({searchString:this._findInput.getValue()},!0)})),this._register(this._findInput.onDidOptionChange(()=>{this._state.change({isRegex:this._findInput.getRegex(),wholeWord:this._findInput.getWholeWords(),matchCase:this._findInput.getCaseSensitive()},!0)})),this._register(this._findInput.onCaseSensitiveKeyDown(re=>{re.equals(1024|2)&&this._isReplaceVisible&&(this._replaceInput.focus(),re.preventDefault())})),this._register(this._findInput.onRegexKeyDown(re=>{re.equals(2)&&this._isReplaceVisible&&(this._replaceInput.focusOnPreserve(),re.preventDefault())})),this._register(this._findInput.inputBox.onDidHeightChange(re=>{this._tryUpdateHeight()&&this._showViewZone()})),t.isLinux&&this._register(this._findInput.onMouseDown(re=>this._onFindInputMouseDown(re))),this._matchesCount=document.createElement("div"),this._matchesCount.className="matchesCount",this._updateMatchesCount(),this._prevBtn=this._register(new G({label:v+this._keybindingLabelFor(u.FIND_IDS.PreviousMatchFindAction),icon:e.findPreviousMatchIcon,onTrigger:()=>{this._codeEditor.getAction(u.FIND_IDS.PreviousMatchFindAction).run().then(void 0,n.onUnexpectedError)}})),this._nextBtn=this._register(new G({label:m+this._keybindingLabelFor(u.FIND_IDS.NextMatchFindAction),icon:e.findNextMatchIcon,onTrigger:()=>{this._codeEditor.getAction(u.FIND_IDS.NextMatchFindAction).run().then(void 0,n.onUnexpectedError)}}));let V=document.createElement("div");V.className="find-part",V.appendChild(this._findInput.domNode);const Q=document.createElement("div");Q.className="find-actions",V.appendChild(Q),Q.appendChild(this._matchesCount),Q.appendChild(this._prevBtn.domNode),Q.appendChild(this._nextBtn.domNode),this._toggleSelectionFind=this._register(new T.Checkbox({icon:h,title:E+this._keybindingLabelFor(u.FIND_IDS.ToggleSearchScopeCommand),isChecked:!1})),this._register(this._toggleSelectionFind.onChange(()=>{if(this._toggleSelectionFind.checked){if(this._codeEditor.hasModel()){let re=this._codeEditor.getSelections();re.map(ie=>(ie.endColumn===1&&ie.endLineNumber>ie.startLineNumber&&(ie=ie.setEndPosition(ie.endLineNumber-1,this._codeEditor.getModel().getLineMaxColumn(ie.endLineNumber-1))),ie.isEmpty()?null:ie)).filter(ie=>!!ie),re.length&&this._state.change({searchScope:re},!0)}}else this._state.change({searchScope:null},!0)})),Q.appendChild(this._toggleSelectionFind.domNode),this._closeBtn=this._register(new G({label:I+this._keybindingLabelFor(u.FIND_IDS.CloseFindWidgetCommand),icon:i.widgetClose,onTrigger:()=>{this._state.change({isRevealed:!1,searchScope:null},!1)},onKeyDown:re=>{re.equals(2)&&this._isReplaceVisible&&(this._replaceBtn.isEnabled()?this._replaceBtn.focus():this._codeEditor.focus(),re.preventDefault())}})),Q.appendChild(this._closeBtn.domNode),this._replaceInput=this._register(new a.ContextScopedReplaceInput(null,void 0,{label:k,placeholder:M,appendPreserveCaseLabel:this._keybindingLabelFor(u.FIND_IDS.TogglePreserveCaseCommand),history:[],flexibleHeight:U,flexibleWidth:$,flexibleMaxHeight:118,showHistoryHint:()=>(0,r.showHistoryKeybindingHint)(this._keybindingService)},this._contextKeyService,!0)),this._replaceInput.setPreserveCase(!!this._state.preserveCase),this._register(this._replaceInput.onKeyDown(re=>this._onReplaceInputKeyDown(re))),this._register(this._replaceInput.inputBox.onDidChange(()=>{this._state.change({replaceString:this._replaceInput.inputBox.value},!1)})),this._register(this._replaceInput.inputBox.onDidHeightChange(re=>{this._isReplaceVisible&&this._tryUpdateHeight()&&this._showViewZone()})),this._register(this._replaceInput.onDidOptionChange(()=>{this._state.change({preserveCase:this._replaceInput.getPreserveCase()},!0)})),this._register(this._replaceInput.onPreserveCaseKeyDown(re=>{re.equals(2)&&(this._prevBtn.isEnabled()?this._prevBtn.focus():this._nextBtn.isEnabled()?this._nextBtn.focus():this._toggleSelectionFind.enabled?this._toggleSelectionFind.focus():this._closeBtn.isEnabled()&&this._closeBtn.focus(),re.preventDefault())})),this._replaceBtn=this._register(new G({label:P+this._keybindingLabelFor(u.FIND_IDS.ReplaceOneAction),icon:e.findReplaceIcon,onTrigger:()=>{this._controller.replace()},onKeyDown:re=>{re.equals(1024|2)&&(this._closeBtn.focus(),re.preventDefault())}})),this._replaceAllBtn=this._register(new G({label:F+this._keybindingLabelFor(u.FIND_IDS.ReplaceAllAction),icon:e.findReplaceAllIcon,onTrigger:()=>{this._controller.replaceAll()}}));let ue=document.createElement("div");ue.className="replace-part",ue.appendChild(this._replaceInput.domNode);const pe=document.createElement("div");pe.className="replace-actions",ue.appendChild(pe),pe.appendChild(this._replaceBtn.domNode),pe.appendChild(this._replaceAllBtn.domNode),this._toggleReplaceBtn=this._register(new G({label:R,className:"codicon toggle left",onTrigger:()=>{this._state.change({isReplaceRevealed:!this._isReplaceVisible},!1),this._isReplaceVisible&&(this._replaceInput.width=w.getTotalWidth(this._findInput.domNode),this._replaceInput.inputBox.layout()),this._showViewZone()}})),this._toggleReplaceBtn.setExpanded(this._isReplaceVisible),this._domNode=document.createElement("div"),this._domNode.className="editor-widget find-widget",this._domNode.setAttribute("aria-hidden","true"),this._domNode.style.width=`${O}px`,this._domNode.appendChild(this._toggleReplaceBtn.domNode),this._domNode.appendChild(V),this._domNode.appendChild(ue),this._resizeSash=new D.Sash(this._domNode,this,{orientation:0,size:2}),this._resized=!1;let fe=O;this._register(this._resizeSash.onDidStart(()=>{fe=w.getTotalWidth(this._domNode)})),this._register(this._resizeSash.onDidChange(re=>{this._resized=!0;let ie=fe+re.startX-re.currentX;if(ie<O)return;const ae=parseFloat(w.getComputedStyle(this._domNode).maxWidth)||0;ie>ae||(this._domNode.style.width=`${ie}px`,this._isReplaceVisible&&(this._replaceInput.width=w.getTotalWidth(this._findInput.domNode)),this._findInput.inputBox.layout(),this._tryUpdateHeight())})),this._register(this._resizeSash.onDidReset(()=>{const re=w.getTotalWidth(this._domNode);if(re<O)return;let ie=O;if(!this._resized||re===O){const ae=this._codeEditor.getLayoutInfo();ie=ae.width-28-ae.minimap.minimapWidth-15,this._resized=!0}this._domNode.style.width=`${ie}px`,this._isReplaceVisible&&(this._replaceInput.width=w.getTotalWidth(this._findInput.domNode)),this._findInput.inputBox.layout()}))}updateAccessibilitySupport(){const U=this._codeEditor.getOption(2);this._findInput.setFocusInputOnOptionClick(U!==2)}}e.FindWidget=oe,oe.ID="editor.contrib.findWidget";class G extends S.Widget{constructor(U){super();this._opts=U;let $="button";this._opts.className&&($=$+" "+this._opts.className),this._opts.icon&&($=$+" "+l.ThemeIcon.asClassName(this._opts.icon)),this._domNode=document.createElement("div"),this._domNode.title=this._opts.label,this._domNode.tabIndex=0,this._domNode.className=$,this._domNode.setAttribute("role","button"),this._domNode.setAttribute("aria-label",this._opts.label),this.onclick(this._domNode,V=>{this._opts.onTrigger(),V.preventDefault()}),this.onkeydown(this._domNode,V=>{if(V.equals(10)||V.equals(3)){this._opts.onTrigger(),V.preventDefault();return}this._opts.onKeyDown&&this._opts.onKeyDown(V)})}get domNode(){return this._domNode}isEnabled(){return this._domNode.tabIndex>=0}focus(){this._domNode.focus()}setEnabled(U){this._domNode.classList.toggle("disabled",!U),this._domNode.setAttribute("aria-disabled",String(!U)),this._domNode.tabIndex=U?0:-1}setExpanded(U){this._domNode.setAttribute("aria-expanded",String(!!U)),U?(this._domNode.classList.remove(...l.ThemeIcon.asClassNameArray(f)),this._domNode.classList.add(...l.ThemeIcon.asClassNameArray(y))):(this._domNode.classList.remove(...l.ThemeIcon.asClassNameArray(y)),this._domNode.classList.add(...l.ThemeIcon.asClassNameArray(f)))}}e.SimpleButton=G,(0,l.registerThemingParticipant)((x,U)=>{const $=(le,de)=>{de&&U.addRule(`.monaco-editor ${le} { background-color: ${de}; }`)};$(".findMatch",x.getColor(o.editorFindMatchHighlight)),$(".currentFindMatch",x.getColor(o.editorFindMatch)),$(".findScope",x.getColor(o.editorFindRangeHighlight));const V=x.getColor(o.editorWidgetBackground);$(".find-widget",V);const Q=x.getColor(o.widgetShadow);Q&&U.addRule(`.monaco-editor .find-widget { box-shadow: 0 0 8px 2px ${Q}; }`);const ue=x.getColor(o.editorFindMatchHighlightBorder);ue&&U.addRule(`.monaco-editor .findMatch { border: 1px ${x.type==="hc"?"dotted":"solid"} ${ue}; box-sizing: border-box; }`);const pe=x.getColor(o.editorFindMatchBorder);pe&&U.addRule(`.monaco-editor .currentFindMatch { border: 2px solid ${pe}; padding: 1px; box-sizing: border-box; }`);const fe=x.getColor(o.editorFindRangeHighlightBorder);fe&&U.addRule(`.monaco-editor .findScope { border: 1px ${x.type==="hc"?"dashed":"solid"} ${fe}; }`);const re=x.getColor(o.contrastBorder);re&&U.addRule(`.monaco-editor .find-widget { border: 1px solid ${re}; }`);const ie=x.getColor(o.editorWidgetForeground);ie&&U.addRule(`.monaco-editor .find-widget { color: ${ie}; }`);const ae=x.getColor(o.errorForeground);ae&&U.addRule(`.monaco-editor .find-widget.no-results .matchesCount { color: ${ae}; }`);const q=x.getColor(o.editorWidgetResizeBorder);if(q)U.addRule(`.monaco-editor .find-widget .monaco-sash { background-color: ${q}; }`);else{const le=x.getColor(o.editorWidgetBorder);le&&U.addRule(`.monaco-editor .find-widget .monaco-sash { background-color: ${le}; }`)}const ne=x.getColor(o.toolbarHoverBackground);ne&&U.addRule(`
        .monaco-editor .find-widget .button:not(.disabled):hover,
        .monaco-editor .find-widget .codicon-find-selection:hover {
            background-color: ${ne} !important;
        }
    `);const ce=x.getColor(o.focusBorder);ce&&U.addRule(`.monaco-editor .find-widget .monaco-inputbox.synthetic-focus { outline-color: ${ce}; }`)})}),define(J[284],ee([0,1,14,2,8,16,25,159,678,679,680,494,35,88,15,71,40,36,73,10]),function(j,e,w,N,T,D,S,p,C,n,g,t,s,c,u,d,a,r,o,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.StartFindReplaceAction=e.PreviousSelectionMatchFindAction=e.NextSelectionMatchFindAction=e.SelectionMatchFindAction=e.PreviousMatchFindAction=e.NextMatchFindAction=e.MatchFindAction=e.StartFindWithSelectionAction=e.StartFindAction=e.FindController=e.CommonFindController=e.getSelectionSearchString=void 0;const l=524288;function h(P,F="single",R=!1){if(!P.hasModel())return null;const A=P.getSelection();if(F==="single"&&A.startLineNumber===A.endLineNumber||F==="multiple"){if(A.isEmpty()){const O=P.getConfiguredWordAtPosition(A.getStartPosition());if(O&&R===!1)return O.word}else if(P.getModel().getValueLengthInRange(A)<l)return P.getModel().getValueInRange(A)}return null}e.getSelectionSearchString=h;let f=class Ti extends N.Disposable{constructor(F,R,A,O){super();this._editor=F,this._findWidgetVisible=p.CONTEXT_FIND_WIDGET_VISIBLE.bindTo(R),this._contextKeyService=R,this._storageService=A,this._clipboardService=O,this._updateHistoryDelayer=new w.Delayer(500),this._state=this._register(new n.FindReplaceState),this.loadQueryState(),this._register(this._state.onFindReplaceStateChange(L=>this._onStateChanged(L))),this._model=null,this._register(this._editor.onDidChangeModel(()=>{let L=this._editor.getModel()&&this._state.isRevealed;this.disposeModel(),this._state.change({searchScope:null,matchCase:this._storageService.getBoolean("editor.matchCase",1,!1),wholeWord:this._storageService.getBoolean("editor.wholeWord",1,!1),isRegex:this._storageService.getBoolean("editor.isRegex",1,!1),preserveCase:this._storageService.getBoolean("editor.preserveCase",1,!1)},!1),L&&this._start({forceRevealReplace:!1,seedSearchStringFromSelection:"none",seedSearchStringFromNonEmptySelection:!1,seedSearchStringFromGlobalClipboard:!1,shouldFocus:0,shouldAnimate:!1,updateSearchScope:!1,loop:this._editor.getOption(35).loop})}))}get editor(){return this._editor}static get(F){return F.getContribution(Ti.ID)}dispose(){this.disposeModel(),super.dispose()}disposeModel(){this._model&&(this._model.dispose(),this._model=null)}_onStateChanged(F){this.saveQueryState(F),F.isRevealed&&(this._state.isRevealed?this._findWidgetVisible.set(!0):(this._findWidgetVisible.reset(),this.disposeModel())),F.searchString&&this.setGlobalBufferTerm(this._state.searchString)}saveQueryState(F){F.isRegex&&this._storageService.store("editor.isRegex",this._state.actualIsRegex,1,0),F.wholeWord&&this._storageService.store("editor.wholeWord",this._state.actualWholeWord,1,0),F.matchCase&&this._storageService.store("editor.matchCase",this._state.actualMatchCase,1,0),F.preserveCase&&this._storageService.store("editor.preserveCase",this._state.actualPreserveCase,1,0)}loadQueryState(){this._state.change({matchCase:this._storageService.getBoolean("editor.matchCase",1,this._state.matchCase),wholeWord:this._storageService.getBoolean("editor.wholeWord",1,this._state.wholeWord),isRegex:this._storageService.getBoolean("editor.isRegex",1,this._state.isRegex),preserveCase:this._storageService.getBoolean("editor.preserveCase",1,this._state.preserveCase)},!1)}isFindInputFocused(){return!!p.CONTEXT_FIND_INPUT_FOCUSED.getValue(this._contextKeyService)}getState(){return this._state}closeFindWidget(){this._state.change({isRevealed:!1,searchScope:null},!1),this._editor.focus()}toggleCaseSensitive(){this._state.change({matchCase:!this._state.matchCase},!1),this._state.isRevealed||this.highlightFindOptions()}toggleWholeWords(){this._state.change({wholeWord:!this._state.wholeWord},!1),this._state.isRevealed||this.highlightFindOptions()}toggleRegex(){this._state.change({isRegex:!this._state.isRegex},!1),this._state.isRevealed||this.highlightFindOptions()}togglePreserveCase(){this._state.change({preserveCase:!this._state.preserveCase},!1),this._state.isRevealed||this.highlightFindOptions()}toggleSearchScope(){if(this._state.searchScope)this._state.change({searchScope:null},!0);else if(this._editor.hasModel()){let F=this._editor.getSelections();F.map(R=>(R.endColumn===1&&R.endLineNumber>R.startLineNumber&&(R=R.setEndPosition(R.endLineNumber-1,this._editor.getModel().getLineMaxColumn(R.endLineNumber-1))),R.isEmpty()?null:R)).filter(R=>!!R),F.length&&this._state.change({searchScope:F},!0)}}setSearchString(F){this._state.isRegex&&(F=T.escapeRegExpCharacters(F)),this._state.change({searchString:F},!1)}highlightFindOptions(F=!1){}_start(F){return Re(this,void 0,void 0,function*(){if(this.disposeModel(),!this._editor.hasModel())return;let R={isRevealed:!0};if(F.seedSearchStringFromSelection==="single"){let A=h(this._editor,F.seedSearchStringFromSelection,F.seedSearchStringFromNonEmptySelection);A&&(this._state.isRegex?R.searchString=T.escapeRegExpCharacters(A):R.searchString=A)}else if(F.seedSearchStringFromSelection==="multiple"&&!F.updateSearchScope){let A=h(this._editor,F.seedSearchStringFromSelection);A&&(R.searchString=A)}if(!R.searchString&&F.seedSearchStringFromGlobalClipboard){let A=yield this.getGlobalBufferTerm();if(!this._editor.hasModel())return;A&&(R.searchString=A)}if(F.forceRevealReplace?R.isReplaceRevealed=!0:this._findWidgetVisible.get()||(R.isReplaceRevealed=!1),F.updateSearchScope){let A=this._editor.getSelections();A.some(O=>!O.isEmpty())&&(R.searchScope=A)}R.loop=F.loop,this._state.change(R,!1),this._model||(this._model=new p.FindModelBoundToEditorModel(this._editor,this._state))})}start(F){return this._start(F)}moveToNextMatch(){return this._model?(this._model.moveToNextMatch(),!0):!1}moveToPrevMatch(){return this._model?(this._model.moveToPrevMatch(),!0):!1}replace(){return this._model?(this._model.replace(),!0):!1}replaceAll(){return this._model?(this._model.replaceAll(),!0):!1}selectAllMatches(){return this._model?(this._model.selectAllMatches(),this._editor.focus(),!0):!1}getGlobalBufferTerm(){return Re(this,void 0,void 0,function*(){return this._editor.getOption(35).globalFindClipboard&&this._editor.hasModel()&&!this._editor.getModel().isTooLargeForSyncing()?this._clipboardService.readFindText():""})}setGlobalBufferTerm(F){this._editor.getOption(35).globalFindClipboard&&this._editor.hasModel()&&!this._editor.getModel().isTooLargeForSyncing()&&this._clipboardService.writeFindText(F)}};f.ID="editor.contrib.findController",f=Fe([Ce(1,u.IContextKeyService),Ce(2,o.IStorageService),Ce(3,c.IClipboardService)],f),e.CommonFindController=f;let y=class extends f{constructor(F,R,A,O,L,B,W,K){super(F,A,W,K);this._contextViewService=R,this._keybindingService=O,this._themeService=L,this._notificationService=B,this._widget=null,this._findOptionsWidget=null}_start(F){const R=Object.create(null,{_start:{get:()=>super._start}});return Re(this,void 0,void 0,function*(){this._widget||this._createFindWidget();const A=this._editor.getSelection();let O=!1;switch(this._editor.getOption(35).autoFindInSelection){case"always":O=!0;break;case"never":O=!1;break;case"multiline":O=!!A&&A.startLineNumber!==A.endLineNumber;break;default:break}F.updateSearchScope=O,yield R._start.call(this,F),this._widget&&(F.shouldFocus===2?this._widget.focusReplaceInput():F.shouldFocus===1&&this._widget.focusFindInput())})}highlightFindOptions(F=!1){this._widget||this._createFindWidget(),this._state.isRevealed&&!F?this._widget.highlightFindOptions():this._findOptionsWidget.highlightFindOptions()}_createFindWidget(){this._widget=this._register(new g.FindWidget(this._editor,this,this._state,this._contextViewService,this._keybindingService,this._contextKeyService,this._themeService,this._storageService,this._notificationService)),this._findOptionsWidget=this._register(new C.FindOptionsWidget(this._editor,this._state,this._keybindingService,this._themeService))}};y=Fe([Ce(1,d.IContextViewService),Ce(2,u.IContextKeyService),Ce(3,a.IKeybindingService),Ce(4,i.IThemeService),Ce(5,r.INotificationService),Ce(6,o.IStorageService),Ce(7,c.IClipboardService)],y),e.FindController=y,e.StartFindAction=(0,D.registerMultiEditorAction)(new D.MultiEditorAction({id:p.FIND_IDS.StartFindAction,label:t.localize(0,null),alias:"Find",precondition:u.ContextKeyExpr.or(S.EditorContextKeys.focus,u.ContextKeyExpr.has("editorIsOpen")),kbOpts:{kbExpr:null,primary:2048|36,weight:100},menuOpts:{menuId:s.MenuId.MenubarEditMenu,group:"3_find",title:t.localize(1,null),order:1}})),e.StartFindAction.addImplementation(0,(P,F,R)=>{const A=f.get(F);return A?A.start({forceRevealReplace:!1,seedSearchStringFromSelection:F.getOption(35).seedSearchStringFromSelection!=="never"?"single":"none",seedSearchStringFromNonEmptySelection:F.getOption(35).seedSearchStringFromSelection==="selection",seedSearchStringFromGlobalClipboard:F.getOption(35).globalFindClipboard,shouldFocus:1,shouldAnimate:!0,updateSearchScope:!1,loop:F.getOption(35).loop}):!1});class _ extends D.EditorAction{constructor(){super({id:p.FIND_IDS.StartFindWithSelection,label:t.localize(2,null),alias:"Find With Selection",precondition:void 0,kbOpts:{kbExpr:null,primary:0,mac:{primary:2048|35},weight:100}})}run(F,R){return Re(this,void 0,void 0,function*(){let A=f.get(R);A&&(yield A.start({forceRevealReplace:!1,seedSearchStringFromSelection:"multiple",seedSearchStringFromNonEmptySelection:!1,seedSearchStringFromGlobalClipboard:!1,shouldFocus:0,shouldAnimate:!0,updateSearchScope:!1,loop:R.getOption(35).loop}),A.setGlobalBufferTerm(A.getState().searchString))})}}e.StartFindWithSelectionAction=_;class b extends D.EditorAction{run(F,R){return Re(this,void 0,void 0,function*(){let A=f.get(R);A&&!this._run(A)&&(yield A.start({forceRevealReplace:!1,seedSearchStringFromSelection:A.getState().searchString.length===0&&R.getOption(35).seedSearchStringFromSelection!=="never"?"single":"none",seedSearchStringFromNonEmptySelection:R.getOption(35).seedSearchStringFromSelection==="selection",seedSearchStringFromGlobalClipboard:!0,shouldFocus:0,shouldAnimate:!0,updateSearchScope:!1,loop:R.getOption(35).loop}),this._run(A))})}}e.MatchFindAction=b;class v extends b{constructor(){super({id:p.FIND_IDS.NextMatchFindAction,label:t.localize(3,null),alias:"Find Next",precondition:void 0,kbOpts:[{kbExpr:S.EditorContextKeys.focus,primary:61,mac:{primary:2048|37,secondary:[61]},weight:100},{kbExpr:u.ContextKeyExpr.and(S.EditorContextKeys.focus,p.CONTEXT_FIND_INPUT_FOCUSED),primary:3,weight:100}]})}_run(F){return F.moveToNextMatch()?(F.editor.pushUndoStop(),!0):!1}}e.NextMatchFindAction=v;class m extends b{constructor(){super({id:p.FIND_IDS.PreviousMatchFindAction,label:t.localize(4,null),alias:"Find Previous",precondition:void 0,kbOpts:[{kbExpr:S.EditorContextKeys.focus,primary:1024|61,mac:{primary:2048|1024|37,secondary:[1024|61]},weight:100},{kbExpr:u.ContextKeyExpr.and(S.EditorContextKeys.focus,p.CONTEXT_FIND_INPUT_FOCUSED),primary:1024|3,weight:100}]})}_run(F){return F.moveToPrevMatch()}}e.PreviousMatchFindAction=m;class E extends D.EditorAction{run(F,R){return Re(this,void 0,void 0,function*(){let A=f.get(R);if(!A)return;const O=R.getOption(35).seedSearchStringFromSelection==="selection";let L=null;R.getOption(35).seedSearchStringFromSelection!=="never"&&(L=h(R,"single",O)),L&&A.setSearchString(L),this._run(A)||(yield A.start({forceRevealReplace:!1,seedSearchStringFromSelection:R.getOption(35).seedSearchStringFromSelection!=="never"?"single":"none",seedSearchStringFromNonEmptySelection:O,seedSearchStringFromGlobalClipboard:!1,shouldFocus:0,shouldAnimate:!0,updateSearchScope:!1,loop:R.getOption(35).loop}),this._run(A))})}}e.SelectionMatchFindAction=E;class I extends E{constructor(){super({id:p.FIND_IDS.NextSelectionMatchFindAction,label:t.localize(5,null),alias:"Find Next Selection",precondition:void 0,kbOpts:{kbExpr:S.EditorContextKeys.focus,primary:2048|61,weight:100}})}_run(F){return F.moveToNextMatch()}}e.NextSelectionMatchFindAction=I;class k extends E{constructor(){super({id:p.FIND_IDS.PreviousSelectionMatchFindAction,label:t.localize(6,null),alias:"Find Previous Selection",precondition:void 0,kbOpts:{kbExpr:S.EditorContextKeys.focus,primary:2048|1024|61,weight:100}})}_run(F){return F.moveToPrevMatch()}}e.PreviousSelectionMatchFindAction=k,e.StartFindReplaceAction=(0,D.registerMultiEditorAction)(new D.MultiEditorAction({id:p.FIND_IDS.StartFindReplaceAction,label:t.localize(7,null),alias:"Replace",precondition:u.ContextKeyExpr.or(S.EditorContextKeys.focus,u.ContextKeyExpr.has("editorIsOpen")),kbOpts:{kbExpr:null,primary:2048|38,mac:{primary:2048|512|36},weight:100},menuOpts:{menuId:s.MenuId.MenubarEditMenu,group:"3_find",title:t.localize(8,null),order:2}})),e.StartFindReplaceAction.addImplementation(0,(P,F,R)=>{if(!F.hasModel()||F.getOption(80))return!1;const A=f.get(F);if(!A)return!1;const O=F.getSelection(),L=A.isFindInputFocused(),B=!O.isEmpty()&&O.startLineNumber===O.endLineNumber&&F.getOption(35).seedSearchStringFromSelection!=="never"&&!L,W=L||B?2:1;return A.start({forceRevealReplace:!0,seedSearchStringFromSelection:B?"single":"none",seedSearchStringFromNonEmptySelection:F.getOption(35).seedSearchStringFromSelection==="selection",seedSearchStringFromGlobalClipboard:F.getOption(35).seedSearchStringFromSelection!=="never",shouldFocus:W,shouldAnimate:!0,updateSearchScope:!1,loop:F.getOption(35).loop})}),(0,D.registerEditorContribution)(f.ID,y),(0,D.registerEditorAction)(_),(0,D.registerEditorAction)(v),(0,D.registerEditorAction)(m),(0,D.registerEditorAction)(I),(0,D.registerEditorAction)(k);const M=D.EditorCommand.bindToContribution(f.get);(0,D.registerEditorCommand)(new M({id:p.FIND_IDS.CloseFindWidgetCommand,precondition:p.CONTEXT_FIND_WIDGET_VISIBLE,handler:P=>P.closeFindWidget(),kbOpts:{weight:100+5,kbExpr:u.ContextKeyExpr.and(S.EditorContextKeys.focus,u.ContextKeyExpr.not("isComposing")),primary:9,secondary:[1024|9]}})),(0,D.registerEditorCommand)(new M({id:p.FIND_IDS.ToggleCaseSensitiveCommand,precondition:void 0,handler:P=>P.toggleCaseSensitive(),kbOpts:{weight:100+5,kbExpr:S.EditorContextKeys.focus,primary:p.ToggleCaseSensitiveKeybinding.primary,mac:p.ToggleCaseSensitiveKeybinding.mac,win:p.ToggleCaseSensitiveKeybinding.win,linux:p.ToggleCaseSensitiveKeybinding.linux}})),(0,D.registerEditorCommand)(new M({id:p.FIND_IDS.ToggleWholeWordCommand,precondition:void 0,handler:P=>P.toggleWholeWords(),kbOpts:{weight:100+5,kbExpr:S.EditorContextKeys.focus,primary:p.ToggleWholeWordKeybinding.primary,mac:p.ToggleWholeWordKeybinding.mac,win:p.ToggleWholeWordKeybinding.win,linux:p.ToggleWholeWordKeybinding.linux}})),(0,D.registerEditorCommand)(new M({id:p.FIND_IDS.ToggleRegexCommand,precondition:void 0,handler:P=>P.toggleRegex(),kbOpts:{weight:100+5,kbExpr:S.EditorContextKeys.focus,primary:p.ToggleRegexKeybinding.primary,mac:p.ToggleRegexKeybinding.mac,win:p.ToggleRegexKeybinding.win,linux:p.ToggleRegexKeybinding.linux}})),(0,D.registerEditorCommand)(new M({id:p.FIND_IDS.ToggleSearchScopeCommand,precondition:void 0,handler:P=>P.toggleSearchScope(),kbOpts:{weight:100+5,kbExpr:S.EditorContextKeys.focus,primary:p.ToggleSearchScopeKeybinding.primary,mac:p.ToggleSearchScopeKeybinding.mac,win:p.ToggleSearchScopeKeybinding.win,linux:p.ToggleSearchScopeKeybinding.linux}})),(0,D.registerEditorCommand)(new M({id:p.FIND_IDS.TogglePreserveCaseCommand,precondition:void 0,handler:P=>P.togglePreserveCase(),kbOpts:{weight:100+5,kbExpr:S.EditorContextKeys.focus,primary:p.TogglePreserveCaseKeybinding.primary,mac:p.TogglePreserveCaseKeybinding.mac,win:p.TogglePreserveCaseKeybinding.win,linux:p.TogglePreserveCaseKeybinding.linux}})),(0,D.registerEditorCommand)(new M({id:p.FIND_IDS.ReplaceOneAction,precondition:p.CONTEXT_FIND_WIDGET_VISIBLE,handler:P=>P.replace(),kbOpts:{weight:100+5,kbExpr:S.EditorContextKeys.focus,primary:2048|1024|22}})),(0,D.registerEditorCommand)(new M({id:p.FIND_IDS.ReplaceOneAction,precondition:p.CONTEXT_FIND_WIDGET_VISIBLE,handler:P=>P.replace(),kbOpts:{weight:100+5,kbExpr:u.ContextKeyExpr.and(S.EditorContextKeys.focus,p.CONTEXT_REPLACE_INPUT_FOCUSED),primary:3}})),(0,D.registerEditorCommand)(new M({id:p.FIND_IDS.ReplaceAllAction,precondition:p.CONTEXT_FIND_WIDGET_VISIBLE,handler:P=>P.replaceAll(),kbOpts:{weight:100+5,kbExpr:S.EditorContextKeys.focus,primary:2048|512|3}})),(0,D.registerEditorCommand)(new M({id:p.FIND_IDS.ReplaceAllAction,precondition:p.CONTEXT_FIND_WIDGET_VISIBLE,handler:P=>P.replaceAll(),kbOpts:{weight:100+5,kbExpr:u.ContextKeyExpr.and(S.EditorContextKeys.focus,p.CONTEXT_REPLACE_INPUT_FOCUSED),primary:void 0,mac:{primary:2048|3}}})),(0,D.registerEditorCommand)(new M({id:p.FIND_IDS.SelectAllMatchesAction,precondition:p.CONTEXT_FIND_WIDGET_VISIBLE,handler:P=>P.selectAllMatches(),kbOpts:{weight:100+5,kbExpr:S.EditorContextKeys.focus,primary:512|3}}))}),define(J[681],ee([0,1,27,32,497,81,10]),function(j,e,w,N,T,D,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.FoldingDecorationProvider=e.foldingCollapsedIcon=e.foldingExpandedIcon=void 0,e.foldingExpandedIcon=(0,D.registerIcon)("folding-expanded",w.Codicon.chevronDown,(0,T.localize)(0,null)),e.foldingCollapsedIcon=(0,D.registerIcon)("folding-collapsed",w.Codicon.chevronRight,(0,T.localize)(1,null));class p{constructor(n){this.editor=n,this.autoHideFoldingControls=!0,this.showFoldingHighlights=!0}getDecorationOption(n,g){return g?p.HIDDEN_RANGE_DECORATION:n?this.showFoldingHighlights?p.COLLAPSED_HIGHLIGHTED_VISUAL_DECORATION:p.COLLAPSED_VISUAL_DECORATION:this.autoHideFoldingControls?p.EXPANDED_AUTO_HIDE_VISUAL_DECORATION:p.EXPANDED_VISUAL_DECORATION}deltaDecorations(n,g){return this.editor.deltaDecorations(n,g)}changeDecorations(n){return this.editor.changeDecorations(n)}}e.FoldingDecorationProvider=p,p.COLLAPSED_VISUAL_DECORATION=N.ModelDecorationOptions.register({description:"folding-collapsed-visual-decoration",stickiness:1,afterContentClassName:"inline-folded",isWholeLine:!0,firstLineDecorationClassName:S.ThemeIcon.asClassName(e.foldingCollapsedIcon)}),p.COLLAPSED_HIGHLIGHTED_VISUAL_DECORATION=N.ModelDecorationOptions.register({description:"folding-collapsed-highlighted-visual-decoration",stickiness:1,afterContentClassName:"inline-folded",className:"folded-background",isWholeLine:!0,firstLineDecorationClassName:S.ThemeIcon.asClassName(e.foldingCollapsedIcon)}),p.EXPANDED_AUTO_HIDE_VISUAL_DECORATION=N.ModelDecorationOptions.register({description:"folding-expanded-auto-hide-visual-decoration",stickiness:1,isWholeLine:!0,firstLineDecorationClassName:S.ThemeIcon.asClassName(e.foldingExpandedIcon)}),p.EXPANDED_VISUAL_DECORATION=N.ModelDecorationOptions.register({description:"folding-expanded-visual-decoration",stickiness:1,isWholeLine:!0,firstLineDecorationClassName:"alwaysShowFoldIcons "+S.ThemeIcon.asClassName(e.foldingExpandedIcon)}),p.HIDDEN_RANGE_DECORATION=N.ModelDecorationOptions.register({description:"folding-hidden-range-decoration",stickiness:1})}),define(J[682],ee([0,1,32,37,183]),function(j,e,w,N,T){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.computeRanges=e.RangesCollector=e.IndentRangeProvider=e.ID_INDENT_PROVIDER=void 0;const D=5e3;e.ID_INDENT_PROVIDER="indent";class S{constructor(g){this.editorModel=g,this.id=e.ID_INDENT_PROVIDER}dispose(){}compute(g){let t=N.LanguageConfigurationRegistry.getFoldingRules(this.editorModel.getLanguageId()),s=t&&!!t.offSide,c=t&&t.markers;return Promise.resolve(C(this.editorModel,s,c))}}e.IndentRangeProvider=S;class p{constructor(g){this._startIndexes=[],this._endIndexes=[],this._indentOccurrences=[],this._length=0,this._foldingRangesLimit=g}insertFirst(g,t,s){if(g>T.MAX_LINE_NUMBER||t>T.MAX_LINE_NUMBER)return;let c=this._length;this._startIndexes[c]=g,this._endIndexes[c]=t,this._length++,s<1e3&&(this._indentOccurrences[s]=(this._indentOccurrences[s]||0)+1)}toIndentRanges(g){if(this._length<=this._foldingRangesLimit){let t=new Uint32Array(this._length),s=new Uint32Array(this._length);for(let c=this._length-1,u=0;c>=0;c--,u++)t[u]=this._startIndexes[c],s[u]=this._endIndexes[c];return new T.FoldingRegions(t,s)}else{let t=0,s=this._indentOccurrences.length;for(let a=0;a<this._indentOccurrences.length;a++){let r=this._indentOccurrences[a];if(r){if(r+t>this._foldingRangesLimit){s=a;break}t+=r}}const c=g.getOptions().tabSize;let u=new Uint32Array(this._foldingRangesLimit),d=new Uint32Array(this._foldingRangesLimit);for(let a=this._length-1,r=0;a>=0;a--){let o=this._startIndexes[a],i=g.getLineContent(o),l=w.TextModel.computeIndentLevel(i,c);(l<s||l===s&&t++<this._foldingRangesLimit)&&(u[r]=o,d[r]=this._endIndexes[a],r++)}return new T.FoldingRegions(u,d)}}}e.RangesCollector=p;function C(n,g,t,s=D){const c=n.getOptions().tabSize;let u=new p(s),d;t&&(d=new RegExp(`(${t.start.source})|(?:${t.end.source})`));let a=[],r=n.getLineCount()+1;a.push({indent:-1,endAbove:r,line:r});for(let o=n.getLineCount();o>0;o--){let i=n.getLineContent(o),l=w.TextModel.computeIndentLevel(i,c),h=a[a.length-1];if(l===-1){g&&(h.endAbove=o);continue}let f;if(d&&(f=i.match(d)))if(f[1]){let y=a.length-1;for(;y>0&&a[y].indent!==-2;)y--;if(y>0){a.length=y+1,h=a[y],u.insertFirst(o,h.line,l),h.line=o,h.indent=l,h.endAbove=o;continue}}else{a.push({indent:-2,endAbove:o,line:o});continue}if(h.indent>l){do a.pop(),h=a[a.length-1];while(h.indent>l);let y=h.endAbove-1;y-o>=1&&u.insertFirst(o,y,l)}h.indent===l?h.endAbove=o:a.push({indent:l,endAbove:o,line:o})}return u.toIndentRanges(n)}e.computeRanges=C}),define(J[683],ee([0,1,14,11,55,2,8,20,67,16,25,18,37,425,426,682,427,496,15,21,10,681,236,361]),function(j,e,w,N,T,D,S,p,C,n,g,t,s,c,u,d,a,r,o,i,l,h,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.editorFoldForeground=e.foldBackgroundBackground=e.FoldingController=void 0;const y=new o.RawContextKey("foldingEnabled",!1);let _=class Mi extends D.Disposable{constructor(Z,se){super();this.contextKeyService=se,this.localToDispose=this._register(new D.DisposableStore),this.editor=Z;const oe=this.editor.getOptions();this._isEnabled=oe.get(37),this._useFoldingProviders=oe.get(38)!=="indentation",this._unfoldOnClickAfterEndOfLine=oe.get(41),this._restoringViewState=!1,this._currentModelHasFoldedImports=!1,this._foldingImportsByDefault=oe.get(40),this.foldingModel=null,this.hiddenRangeModel=null,this.rangeProvider=null,this.foldingRegionPromise=null,this.foldingStateMemento=null,this.foldingModelPromise=null,this.updateScheduler=null,this.cursorChangedScheduler=null,this.mouseDownInfo=null,this.foldingDecorationProvider=new h.FoldingDecorationProvider(Z),this.foldingDecorationProvider.autoHideFoldingControls=oe.get(98)==="mouseover",this.foldingDecorationProvider.showFoldingHighlights=oe.get(39),this.foldingEnabled=y.bindTo(this.contextKeyService),this.foldingEnabled.set(this._isEnabled),this._register(this.editor.onDidChangeModel(()=>this.onModelChanged())),this._register(this.editor.onDidChangeConfiguration(G=>{if(G.hasChanged(37)&&(this._isEnabled=this.editor.getOptions().get(37),this.foldingEnabled.set(this._isEnabled),this.onModelChanged()),G.hasChanged(98)||G.hasChanged(39)){const x=this.editor.getOptions();this.foldingDecorationProvider.autoHideFoldingControls=x.get(98)==="mouseover",this.foldingDecorationProvider.showFoldingHighlights=x.get(39),this.onModelContentChanged()}G.hasChanged(38)&&(this._useFoldingProviders=this.editor.getOptions().get(38)!=="indentation",this.onFoldingStrategyChanged()),G.hasChanged(41)&&(this._unfoldOnClickAfterEndOfLine=this.editor.getOptions().get(41)),G.hasChanged(40)&&(this._foldingImportsByDefault=this.editor.getOptions().get(40))})),this.onModelChanged()}static get(Z){return Z.getContribution(Mi.ID)}saveViewState(){let Z=this.editor.getModel();if(!Z||!this._isEnabled||Z.isTooLargeForTokenization())return{};if(this.foldingModel){let se=this.foldingModel.isInitialized?this.foldingModel.getMemento():this.hiddenRangeModel.getMemento(),oe=this.rangeProvider?this.rangeProvider.id:void 0;return{collapsedRegions:se,lineCount:Z.getLineCount(),provider:oe,foldedImports:this._currentModelHasFoldedImports}}}restoreViewState(Z){let se=this.editor.getModel();if(!se||!this._isEnabled||se.isTooLargeForTokenization()||!this.hiddenRangeModel||!Z||Z.lineCount!==se.getLineCount()||(this._currentModelHasFoldedImports=!!Z.foldedImports,!Z.collapsedRegions))return;(Z.provider===f.ID_SYNTAX_PROVIDER||Z.provider===a.ID_INIT_PROVIDER)&&(this.foldingStateMemento=Z);const oe=Z.collapsedRegions;if(this.hiddenRangeModel.applyMemento(oe)){const G=this.getFoldingModel();G&&G.then(x=>{if(x){this._restoringViewState=!0;try{x.applyMemento(oe)}finally{this._restoringViewState=!1}}}).then(void 0,N.onUnexpectedError)}}onModelChanged(){this.localToDispose.clear();let Z=this.editor.getModel();!this._isEnabled||!Z||Z.isTooLargeForTokenization()||(this._currentModelHasFoldedImports=!1,this.foldingModel=new c.FoldingModel(Z,this.foldingDecorationProvider),this.localToDispose.add(this.foldingModel),this.hiddenRangeModel=new u.HiddenRangeModel(this.foldingModel),this.localToDispose.add(this.hiddenRangeModel),this.localToDispose.add(this.hiddenRangeModel.onDidChange(se=>this.onHiddenRangesChanges(se))),this.updateScheduler=new w.Delayer(200),this.cursorChangedScheduler=new w.RunOnceScheduler(()=>this.revealCursor(),200),this.localToDispose.add(this.cursorChangedScheduler),this.localToDispose.add(t.FoldingRangeProviderRegistry.onDidChange(()=>this.onFoldingStrategyChanged())),this.localToDispose.add(this.editor.onDidChangeModelLanguageConfiguration(()=>this.onFoldingStrategyChanged())),this.localToDispose.add(this.editor.onDidChangeModelContent(()=>this.onModelContentChanged())),this.localToDispose.add(this.editor.onDidChangeCursorPosition(()=>this.onCursorPositionChanged())),this.localToDispose.add(this.editor.onMouseDown(se=>this.onEditorMouseDown(se))),this.localToDispose.add(this.editor.onMouseUp(se=>this.onEditorMouseUp(se))),this.localToDispose.add({dispose:()=>{this.foldingRegionPromise&&(this.foldingRegionPromise.cancel(),this.foldingRegionPromise=null),this.updateScheduler&&this.updateScheduler.cancel(),this.updateScheduler=null,this.foldingModel=null,this.foldingModelPromise=null,this.hiddenRangeModel=null,this.cursorChangedScheduler=null,this.foldingStateMemento=null,this.rangeProvider&&this.rangeProvider.dispose(),this.rangeProvider=null}}),this.onModelContentChanged())}onFoldingStrategyChanged(){this.rangeProvider&&this.rangeProvider.dispose(),this.rangeProvider=null,this.onModelContentChanged()}getRangeProvider(Z){if(this.rangeProvider)return this.rangeProvider;if(this.rangeProvider=new d.IndentRangeProvider(Z),this._useFoldingProviders&&this.foldingModel){let se=t.FoldingRangeProviderRegistry.ordered(this.foldingModel.textModel);if(se.length===0&&this.foldingStateMemento&&this.foldingStateMemento.collapsedRegions)return this.rangeProvider=new a.InitializingRangeProvider(Z,this.foldingStateMemento.collapsedRegions,()=>{this.foldingStateMemento=null,this.onFoldingStrategyChanged()},3e4);se.length>0&&(this.rangeProvider=new f.SyntaxRangeProvider(Z,se,()=>this.onModelContentChanged()))}return this.foldingStateMemento=null,this.rangeProvider}getFoldingModel(){return this.foldingModelPromise}onModelContentChanged(){this.updateScheduler&&(this.foldingRegionPromise&&(this.foldingRegionPromise.cancel(),this.foldingRegionPromise=null),this.foldingModelPromise=this.updateScheduler.trigger(()=>{const Z=this.foldingModel;if(!Z)return null;const se=this.getRangeProvider(Z.textModel);let oe=this.foldingRegionPromise=(0,w.createCancelablePromise)(G=>se.compute(G));return oe.then(G=>{if(G&&oe===this.foldingRegionPromise){let x;if(this._foldingImportsByDefault&&!this._currentModelHasFoldedImports){const V=G.setCollapsedAllOfType(t.FoldingRangeKind.Imports.value,!0);V&&(x=C.StableEditorScrollState.capture(this.editor),this._currentModelHasFoldedImports=V)}let U=this.editor.getSelections(),$=U?U.map(V=>V.startLineNumber):[];Z.update(G,$),x&&x.restore(this.editor)}return Z})}).then(void 0,Z=>((0,N.onUnexpectedError)(Z),null)))}onHiddenRangesChanges(Z){if(this.hiddenRangeModel&&Z.length&&!this._restoringViewState){let se=this.editor.getSelections();se&&this.hiddenRangeModel.adjustSelections(se)&&this.editor.setSelections(se)}this.editor.setHiddenAreas(Z)}onCursorPositionChanged(){this.hiddenRangeModel&&this.hiddenRangeModel.hasRanges()&&this.cursorChangedScheduler.schedule()}revealCursor(){const Z=this.getFoldingModel();!Z||Z.then(se=>{if(se){let oe=this.editor.getSelections();if(oe&&oe.length>0){let G=[];for(let x of oe){let U=x.selectionStartLineNumber;this.hiddenRangeModel&&this.hiddenRangeModel.isHidden(U)&&G.push(...se.getAllRegionsAtLine(U,$=>$.isCollapsed&&U>$.startLineNumber))}G.length&&(se.toggleCollapseState(G),this.reveal(oe[0].getPosition()))}}}).then(void 0,N.onUnexpectedError)}onEditorMouseDown(Z){if(this.mouseDownInfo=null,!this.hiddenRangeModel||!Z.target||!Z.target.range||!Z.event.leftButton&&!Z.event.middleButton)return;const se=Z.target.range;let oe=!1;switch(Z.target.type){case 4:const G=Z.target.detail,x=Z.target.element.offsetLeft;if(G.offsetX-x<5)return;oe=!0;break;case 7:{if(this._unfoldOnClickAfterEndOfLine&&this.hiddenRangeModel.hasRanges()&&!Z.target.detail.isAfterLines)break;return}case 6:{if(this.hiddenRangeModel.hasRanges()){let $=this.editor.getModel();if($&&se.startColumn===$.getLineMaxColumn(se.startLineNumber))break}return}default:return}this.mouseDownInfo={lineNumber:se.startLineNumber,iconClicked:oe}}onEditorMouseUp(Z){const se=this.getFoldingModel();if(!se||!this.mouseDownInfo||!Z.target)return;let oe=this.mouseDownInfo.lineNumber,G=this.mouseDownInfo.iconClicked,x=Z.target.range;if(!(!x||x.startLineNumber!==oe)){if(G){if(Z.target.type!==4)return}else{let U=this.editor.getModel();if(!U||x.startColumn!==U.getLineMaxColumn(oe))return}se.then(U=>{if(U){let $=U.getRegionAtLine(oe);if($&&$.startLineNumber===oe){let V=$.isCollapsed;if(G||V){let Q=Z.event.altKey,ue=[];if(Q){let pe=re=>!re.containedBy($)&&!$.containedBy(re),fe=U.getRegionsInside(null,pe);for(const re of fe)re.isCollapsed&&ue.push(re);ue.length===0&&(ue=fe)}else{let pe=Z.event.middleButton||Z.event.shiftKey;if(pe)for(const fe of U.getRegionsInside($))fe.isCollapsed===V&&ue.push(fe);(V||!pe||ue.length===0)&&ue.push($)}U.toggleCollapseState(ue),this.reveal({lineNumber:oe,column:1})}}}}).then(void 0,N.onUnexpectedError)}}reveal(Z){this.editor.revealPositionInCenterIfOutsideViewport(Z,0)}};_.ID="editor.contrib.folding",_=Fe([Ce(1,o.IContextKeyService)],_),e.FoldingController=_;class b extends n.EditorAction{runEditorCommand(Z,se,oe){let G=_.get(se);if(!G)return;let x=G.getFoldingModel();if(x)return this.reportTelemetry(Z,se),x.then(U=>{if(U){this.invoke(G,U,se,oe);const $=se.getSelection();$&&G.reveal($.getStartPosition())}})}getSelectedLines(Z){let se=Z.getSelections();return se?se.map(oe=>oe.startLineNumber):[]}getLineNumbers(Z,se){return Z&&Z.selectionLines?Z.selectionLines.map(oe=>oe+1):this.getSelectedLines(se)}run(Z,se){}}function v(X){if(!p.isUndefined(X)){if(!p.isObject(X))return!1;const Z=X;if(!p.isUndefined(Z.levels)&&!p.isNumber(Z.levels)||!p.isUndefined(Z.direction)&&!p.isString(Z.direction)||!p.isUndefined(Z.selectionLines)&&(!p.isArray(Z.selectionLines)||!Z.selectionLines.every(p.isNumber)))return!1}return!0}class m extends b{constructor(){super({id:"editor.unfold",label:r.localize(0,null),alias:"Unfold",precondition:y,kbOpts:{kbExpr:g.EditorContextKeys.editorTextFocus,primary:2048|1024|89,mac:{primary:2048|512|89},weight:100},description:{description:"Unfold the content in the editor",args:[{name:"Unfold editor argument",description:`Property-value pairs that can be passed through this argument:
                        * 'levels': Number of levels to unfold. If not set, defaults to 1.
                        * 'direction': If 'up', unfold given number of levels up otherwise unfolds down.
                        * 'selectionLines': The start lines (0-based) of the editor selections to apply the unfold action to. If not set, the active selection(s) will be used.
                        `,constraint:v,schema:{type:"object",properties:{levels:{type:"number",default:1},direction:{type:"string",enum:["up","down"],default:"down"},selectionLines:{type:"array",items:{type:"number"}}}}}]}})}invoke(Z,se,oe,G){let x=G&&G.levels||1,U=this.getLineNumbers(G,oe);G&&G.direction==="up"?(0,c.setCollapseStateLevelsUp)(se,!1,x,U):(0,c.setCollapseStateLevelsDown)(se,!1,x,U)}}class E extends b{constructor(){super({id:"editor.unfoldRecursively",label:r.localize(1,null),alias:"Unfold Recursively",precondition:y,kbOpts:{kbExpr:g.EditorContextKeys.editorTextFocus,primary:(0,T.KeyChord)(2048|41,2048|89),weight:100}})}invoke(Z,se,oe,G){(0,c.setCollapseStateLevelsDown)(se,!1,Number.MAX_VALUE,this.getSelectedLines(oe))}}class I extends b{constructor(){super({id:"editor.fold",label:r.localize(2,null),alias:"Fold",precondition:y,kbOpts:{kbExpr:g.EditorContextKeys.editorTextFocus,primary:2048|1024|87,mac:{primary:2048|512|87},weight:100},description:{description:"Fold the content in the editor",args:[{name:"Fold editor argument",description:`Property-value pairs that can be passed through this argument:
                            * 'levels': Number of levels to fold.
                            * 'direction': If 'up', folds given number of levels up otherwise folds down.
                            * 'selectionLines': The start lines (0-based) of the editor selections to apply the fold action to. If not set, the active selection(s) will be used.
                            If no levels or direction is set, folds the region at the locations or if already collapsed, the first uncollapsed parent instead.
                        `,constraint:v,schema:{type:"object",properties:{levels:{type:"number"},direction:{type:"string",enum:["up","down"]},selectionLines:{type:"array",items:{type:"number"}}}}}]}})}invoke(Z,se,oe,G){let x=this.getLineNumbers(G,oe);const U=G&&G.levels,$=G&&G.direction;typeof U!="number"&&typeof $!="string"?(0,c.setCollapseStateUp)(se,!0,x):$==="up"?(0,c.setCollapseStateLevelsUp)(se,!0,U||1,x):(0,c.setCollapseStateLevelsDown)(se,!0,U||1,x)}}class k extends b{constructor(){super({id:"editor.toggleFold",label:r.localize(3,null),alias:"Toggle Fold",precondition:y,kbOpts:{kbExpr:g.EditorContextKeys.editorTextFocus,primary:(0,T.KeyChord)(2048|41,2048|42),weight:100}})}invoke(Z,se,oe){let G=this.getSelectedLines(oe);(0,c.toggleCollapseState)(se,1,G)}}class M extends b{constructor(){super({id:"editor.foldRecursively",label:r.localize(4,null),alias:"Fold Recursively",precondition:y,kbOpts:{kbExpr:g.EditorContextKeys.editorTextFocus,primary:(0,T.KeyChord)(2048|41,2048|87),weight:100}})}invoke(Z,se,oe){let G=this.getSelectedLines(oe);(0,c.setCollapseStateLevelsDown)(se,!0,Number.MAX_VALUE,G)}}class P extends b{constructor(){super({id:"editor.foldAllBlockComments",label:r.localize(5,null),alias:"Fold All Block Comments",precondition:y,kbOpts:{kbExpr:g.EditorContextKeys.editorTextFocus,primary:(0,T.KeyChord)(2048|41,2048|85),weight:100}})}invoke(Z,se,oe){if(se.regions.hasTypes())(0,c.setCollapseStateForType)(se,t.FoldingRangeKind.Comment.value,!0);else{const G=oe.getModel();if(!G)return;const x=s.LanguageConfigurationRegistry.getComments(G.getLanguageId());if(x&&x.blockCommentStartToken){let U=new RegExp("^\\s*"+(0,S.escapeRegExpCharacters)(x.blockCommentStartToken));(0,c.setCollapseStateForMatchingLines)(se,U,!0)}}}}class F extends b{constructor(){super({id:"editor.foldAllMarkerRegions",label:r.localize(6,null),alias:"Fold All Regions",precondition:y,kbOpts:{kbExpr:g.EditorContextKeys.editorTextFocus,primary:(0,T.KeyChord)(2048|41,2048|29),weight:100}})}invoke(Z,se,oe){if(se.regions.hasTypes())(0,c.setCollapseStateForType)(se,t.FoldingRangeKind.Region.value,!0);else{const G=oe.getModel();if(!G)return;const x=s.LanguageConfigurationRegistry.getFoldingRules(G.getLanguageId());if(x&&x.markers&&x.markers.start){let U=new RegExp(x.markers.start);(0,c.setCollapseStateForMatchingLines)(se,U,!0)}}}}class R extends b{constructor(){super({id:"editor.unfoldAllMarkerRegions",label:r.localize(7,null),alias:"Unfold All Regions",precondition:y,kbOpts:{kbExpr:g.EditorContextKeys.editorTextFocus,primary:(0,T.KeyChord)(2048|41,2048|30),weight:100}})}invoke(Z,se,oe){if(se.regions.hasTypes())(0,c.setCollapseStateForType)(se,t.FoldingRangeKind.Region.value,!1);else{const G=oe.getModel();if(!G)return;const x=s.LanguageConfigurationRegistry.getFoldingRules(G.getLanguageId());if(x&&x.markers&&x.markers.start){let U=new RegExp(x.markers.start);(0,c.setCollapseStateForMatchingLines)(se,U,!1)}}}}class A extends b{constructor(){super({id:"editor.foldAllExcept",label:r.localize(8,null),alias:"Fold All Regions Except Selected",precondition:y,kbOpts:{kbExpr:g.EditorContextKeys.editorTextFocus,primary:(0,T.KeyChord)(2048|41,2048|83),weight:100}})}invoke(Z,se,oe){let G=this.getSelectedLines(oe);(0,c.setCollapseStateForRest)(se,!0,G)}}class O extends b{constructor(){super({id:"editor.unfoldAllExcept",label:r.localize(9,null),alias:"Unfold All Regions Except Selected",precondition:y,kbOpts:{kbExpr:g.EditorContextKeys.editorTextFocus,primary:(0,T.KeyChord)(2048|41,2048|81),weight:100}})}invoke(Z,se,oe){let G=this.getSelectedLines(oe);(0,c.setCollapseStateForRest)(se,!1,G)}}class L extends b{constructor(){super({id:"editor.foldAll",label:r.localize(10,null),alias:"Fold All",precondition:y,kbOpts:{kbExpr:g.EditorContextKeys.editorTextFocus,primary:(0,T.KeyChord)(2048|41,2048|21),weight:100}})}invoke(Z,se,oe){(0,c.setCollapseStateLevelsDown)(se,!0)}}class B extends b{constructor(){super({id:"editor.unfoldAll",label:r.localize(11,null),alias:"Unfold All",precondition:y,kbOpts:{kbExpr:g.EditorContextKeys.editorTextFocus,primary:(0,T.KeyChord)(2048|41,2048|40),weight:100}})}invoke(Z,se,oe){(0,c.setCollapseStateLevelsDown)(se,!1)}}class W extends b{getFoldingLevel(){return parseInt(this.id.substr(W.ID_PREFIX.length))}invoke(Z,se,oe){(0,c.setCollapseStateAtLevel)(se,this.getFoldingLevel(),!0,this.getSelectedLines(oe))}}W.ID_PREFIX="editor.foldLevel",W.ID=X=>W.ID_PREFIX+X;class K extends b{constructor(){super({id:"editor.gotoParentFold",label:r.localize(12,null),alias:"Go to Parent Fold",precondition:y,kbOpts:{kbExpr:g.EditorContextKeys.editorTextFocus,weight:100}})}invoke(Z,se,oe){let G=this.getSelectedLines(oe);if(G.length>0){let x=(0,c.getParentFoldLine)(G[0],se);x!==null&&oe.setSelection({startLineNumber:x,startColumn:1,endLineNumber:x,endColumn:1})}}}class H extends b{constructor(){super({id:"editor.gotoPreviousFold",label:r.localize(13,null),alias:"Go to Previous Folding Range",precondition:y,kbOpts:{kbExpr:g.EditorContextKeys.editorTextFocus,weight:100}})}invoke(Z,se,oe){let G=this.getSelectedLines(oe);if(G.length>0){let x=(0,c.getPreviousFoldLine)(G[0],se);x!==null&&oe.setSelection({startLineNumber:x,startColumn:1,endLineNumber:x,endColumn:1})}}}class Y extends b{constructor(){super({id:"editor.gotoNextFold",label:r.localize(14,null),alias:"Go to Next Folding Range",precondition:y,kbOpts:{kbExpr:g.EditorContextKeys.editorTextFocus,weight:100}})}invoke(Z,se,oe){let G=this.getSelectedLines(oe);if(G.length>0){let x=(0,c.getNextFoldLine)(G[0],se);x!==null&&oe.setSelection({startLineNumber:x,startColumn:1,endLineNumber:x,endColumn:1})}}}(0,n.registerEditorContribution)(_.ID,_),(0,n.registerEditorAction)(m),(0,n.registerEditorAction)(E),(0,n.registerEditorAction)(I),(0,n.registerEditorAction)(M),(0,n.registerEditorAction)(L),(0,n.registerEditorAction)(B),(0,n.registerEditorAction)(P),(0,n.registerEditorAction)(F),(0,n.registerEditorAction)(R),(0,n.registerEditorAction)(A),(0,n.registerEditorAction)(O),(0,n.registerEditorAction)(k),(0,n.registerEditorAction)(K),(0,n.registerEditorAction)(H),(0,n.registerEditorAction)(Y);for(let X=1;X<=7;X++)(0,n.registerInstantiatedEditorAction)(new W({id:W.ID(X),label:r.localize(15,null,X),alias:`Fold Level ${X}`,precondition:y,kbOpts:{kbExpr:g.EditorContextKeys.editorTextFocus,primary:(0,T.KeyChord)(2048|41,2048|21+X),weight:100}}));e.foldBackgroundBackground=(0,i.registerColor)("editor.foldBackground",{light:(0,i.transparent)(i.editorSelectionBackground,.3),dark:(0,i.transparent)(i.editorSelectionBackground,.3),hc:null},r.localize(16,null),!0),e.editorFoldForeground=(0,i.registerColor)("editorGutter.foldingControlForeground",{dark:i.iconForeground,light:i.iconForeground,hc:i.iconForeground},r.localize(17,null)),(0,l.registerThemingParticipant)((X,Z)=>{const se=X.getColor(e.foldBackgroundBackground);se&&Z.addRule(`.monaco-editor .folded-background { background-color: ${se}; }`);const oe=X.getColor(e.editorFoldForeground);oe&&Z.addRule(`
        .monaco-editor .cldr${l.ThemeIcon.asCSSSelector(h.foldingExpandedIcon)},
        .monaco-editor .cldr${l.ThemeIcon.asCSSSelector(h.foldingCollapsedIcon)} {
            color: ${oe} !important;
        }
        `)})}),define(J[684],ee([0,1,23,29,2,3,260,283,421,613,10]),function(j,e,w,N,T,D,S,p,C,n,g){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ColorHoverParticipant=e.ColorHover=void 0;class t{constructor(u,d,a,r){this.owner=u,this.range=d,this.model=a,this.provider=r,this.forceShowAtRange=!0}isValidForHoverAnchor(u){return u.type===1&&this.range.startColumn<=u.range.startColumn&&this.range.endColumn>=u.range.endColumn}}e.ColorHover=t;let s=class{constructor(u,d,a){this._editor=u,this._hover=d,this._themeService=a}computeSync(u,d){return[]}computeAsync(u,d,a){return Re(this,void 0,void 0,function*(){if(!this._editor.hasModel())return[];const r=p.ColorDetector.get(this._editor);for(const o of d){if(o.options.description!=="color-detector-color")continue;const i=r.getColorData(o.range.getStartPosition());if(i)return[yield this._createColorHover(this._editor.getModel(),i.colorInfo,i.provider)]}return[]})}_createColorHover(u,d,a){return Re(this,void 0,void 0,function*(){const r=u.getValueInRange(d.range),{red:o,green:i,blue:l,alpha:h}=d.color,f=new N.RGBA(Math.round(o*255),Math.round(i*255),Math.round(l*255),h),y=new N.Color(f),_=yield(0,S.getColorPresentations)(u,d,a,w.CancellationToken.None),b=new C.ColorPickerModel(y,[],0);return b.colorPresentations=_||[],b.guessColorPresentation(y,r),new t(this,D.Range.lift(d.range),b,a)})}renderHoverParts(u,d,a){if(u.length===0||!this._editor.hasModel())return T.Disposable.None;const r=new T.DisposableStore,o=u[0],i=this._editor.getModel(),l=o.model,h=r.add(new n.ColorPickerWidget(d,l,this._editor.getOption(127),this._themeService));let f=new D.Range(o.range.startLineNumber,o.range.startColumn,o.range.endLineNumber,o.range.endColumn);const y=()=>{let b,v;if(l.presentation.textEdit){b=[l.presentation.textEdit],v=new D.Range(l.presentation.textEdit.range.startLineNumber,l.presentation.textEdit.range.startColumn,l.presentation.textEdit.range.endLineNumber,l.presentation.textEdit.range.endColumn);const m=this._editor.getModel()._setTrackedRange(null,v,3);this._editor.pushUndoStop(),this._editor.executeEdits("colorpicker",b),v=this._editor.getModel()._getTrackedRange(m)||v}else b=[{identifier:null,range:f,text:l.presentation.label,forceMoveMarkers:!1}],v=f.setEndPosition(f.endLineNumber,f.startColumn+l.presentation.label.length),this._editor.pushUndoStop(),this._editor.executeEdits("colorpicker",b);l.presentation.additionalTextEdits&&(b=[...l.presentation.additionalTextEdits],this._editor.executeEdits("colorpicker",b),this._hover.hide()),this._editor.pushUndoStop(),f=v},_=b=>(0,S.getColorPresentations)(i,{range:f,color:{red:b.rgba.r/255,green:b.rgba.g/255,blue:b.rgba.b/255,alpha:b.rgba.a}},o.provider,w.CancellationToken.None).then(v=>{l.colorPresentations=v||[]});return r.add(l.onColorFlushed(b=>{_(b).then(y)})),r.add(l.onDidChangeColor(_)),this._hover.setColorPicker(h),r}};s=Fe([Ce(2,g.IThemeService)],s),e.ColorHoverParticipant=s}),define(J[685],ee([0,1,14,11,67,16,3,22,25,32,78,46,513,10,428]),function(j,e,w,N,T,D,S,p,C,n,g,t,s,c,u){"use strict";Object.defineProperty(e,"__esModule",{value:!0});let d=class qt{constructor(i,l){this.decorationIds=[],this.editor=i,this.editorWorkerService=l}static get(i){return i.getContribution(qt.ID)}dispose(){}run(i,l){this.currentRequest&&this.currentRequest.cancel();const h=this.editor.getSelection(),f=this.editor.getModel();if(!f||!h)return;let y=h;if(y.startLineNumber!==y.endLineNumber)return;const _=new T.EditorState(this.editor,1|4),b=f.uri;return this.editorWorkerService.canNavigateValueSet(b)?(this.currentRequest=(0,w.createCancelablePromise)(v=>this.editorWorkerService.navigateValueSet(b,y,l)),this.currentRequest.then(v=>{if(!v||!v.range||!v.value||!_.validate(this.editor))return;let m=S.Range.lift(v.range),E=v.range,I=v.value.length-(y.endColumn-y.startColumn);E={startLineNumber:E.startLineNumber,startColumn:E.startColumn,endLineNumber:E.endLineNumber,endColumn:E.startColumn+v.value.length},I>1&&(y=new p.Selection(y.startLineNumber,y.startColumn,y.endLineNumber,y.endColumn+I-1));const k=new u.InPlaceReplaceCommand(m,y,v.value);this.editor.pushUndoStop(),this.editor.executeCommand(i,k),this.editor.pushUndoStop(),this.decorationIds=this.editor.deltaDecorations(this.decorationIds,[{range:E,options:qt.DECORATION}]),this.decorationRemover&&this.decorationRemover.cancel(),this.decorationRemover=(0,w.timeout)(350),this.decorationRemover.then(()=>this.decorationIds=this.editor.deltaDecorations(this.decorationIds,[])).catch(N.onUnexpectedError)}).catch(N.onUnexpectedError)):Promise.resolve(void 0)}};d.ID="editor.contrib.inPlaceReplaceController",d.DECORATION=n.ModelDecorationOptions.register({description:"in-place-replace",className:"valueSetReplacement"}),d=Fe([Ce(1,g.IEditorWorkerService)],d);class a extends D.EditorAction{constructor(){super({id:"editor.action.inPlaceReplace.up",label:s.localize(0,null),alias:"Replace with Previous Value",precondition:C.EditorContextKeys.writable,kbOpts:{kbExpr:C.EditorContextKeys.editorTextFocus,primary:2048|1024|82,weight:100}})}run(i,l){const h=d.get(l);return h?h.run(this.id,!0):Promise.resolve(void 0)}}class r extends D.EditorAction{constructor(){super({id:"editor.action.inPlaceReplace.down",label:s.localize(1,null),alias:"Replace with Next Value",precondition:C.EditorContextKeys.writable,kbOpts:{kbExpr:C.EditorContextKeys.editorTextFocus,primary:2048|1024|84,weight:100}})}run(i,l){const h=d.get(l);return h?h.run(this.id,!1):Promise.resolve(void 0)}}(0,D.registerEditorContribution)(d.ID,d),(0,D.registerEditorAction)(a),(0,D.registerEditorAction)(r),(0,c.registerThemingParticipant)((o,i)=>{const l=o.getColor(t.editorBracketMatchBorder);l&&i.addRule(`.monaco-editor.vs .valueSetReplacement { outline: solid 2px ${l}; }`)})}),define(J[686],ee([0,1,2,8,16,195,59,3,22,25,32,37,42,241,514,79]),function(j,e,w,N,T,D,S,p,C,n,g,t,s,c,u,d){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IndentationToTabsCommand=e.IndentationToSpacesCommand=e.AutoIndentOnPaste=e.AutoIndentOnPasteCommand=e.ReindentSelectedLinesAction=e.ReindentLinesAction=e.DetectIndentation=e.IndentUsingSpaces=e.IndentUsingTabs=e.ChangeIndentationSizeAction=e.IndentationToTabsAction=e.IndentationToSpacesAction=e.getReindentEditOperations=void 0;function a(k,M,P,F){if(k.getLineCount()===1&&k.getLineMaxColumn(1)===1)return[];const R=t.LanguageConfigurationRegistry.getIndentationRules(k.getLanguageId());if(!R)return[];for(P=Math.min(P,k.getLineCount());M<=P&&R.unIndentedLinePattern;){let se=k.getLineContent(M);if(!R.unIndentedLinePattern.test(se))break;M++}if(M>P-1)return[];const{tabSize:A,indentSize:O,insertSpaces:L}=k.getOptions(),B=(se,oe)=>(oe=oe||1,D.ShiftCommand.shiftIndent(se,se.length+oe,A,O,L)),W=(se,oe)=>(oe=oe||1,D.ShiftCommand.unshiftIndent(se,se.length+oe,A,O,L));let K=[],H,Y=k.getLineContent(M),X=Y;if(F!=null){H=F;let se=N.getLeadingWhitespace(Y);X=H+Y.substring(se.length),R.decreaseIndentPattern&&R.decreaseIndentPattern.test(X)&&(H=W(H),X=H+Y.substring(se.length)),Y!==X&&K.push(S.EditOperation.replaceMove(new C.Selection(M,1,M,se.length+1),g.TextModel.normalizeIndentation(H,O,L)))}else H=N.getLeadingWhitespace(Y);let Z=H;R.increaseIndentPattern&&R.increaseIndentPattern.test(X)?(Z=B(Z),H=B(H)):R.indentNextLinePattern&&R.indentNextLinePattern.test(X)&&(Z=B(Z)),M++;for(let se=M;se<=P;se++){let oe=k.getLineContent(se),G=N.getLeadingWhitespace(oe),x=Z+oe.substring(G.length);R.decreaseIndentPattern&&R.decreaseIndentPattern.test(x)&&(Z=W(Z),H=W(H)),G!==Z&&K.push(S.EditOperation.replaceMove(new C.Selection(se,1,se,G.length+1),g.TextModel.normalizeIndentation(Z,O,L))),!(R.unIndentedLinePattern&&R.unIndentedLinePattern.test(oe))&&(R.increaseIndentPattern&&R.increaseIndentPattern.test(x)?(H=B(H),Z=H):R.indentNextLinePattern&&R.indentNextLinePattern.test(x)?Z=B(Z):Z=H)}return K}e.getReindentEditOperations=a;class r extends T.EditorAction{constructor(){super({id:r.ID,label:u.localize(0,null),alias:"Convert Indentation to Spaces",precondition:n.EditorContextKeys.writable})}run(M,P){let F=P.getModel();if(!F)return;let R=F.getOptions(),A=P.getSelection();if(!A)return;const O=new E(A,R.tabSize);P.pushUndoStop(),P.executeCommands(this.id,[O]),P.pushUndoStop(),F.updateOptions({insertSpaces:!0})}}e.IndentationToSpacesAction=r,r.ID="editor.action.indentationToSpaces";class o extends T.EditorAction{constructor(){super({id:o.ID,label:u.localize(1,null),alias:"Convert Indentation to Tabs",precondition:n.EditorContextKeys.writable})}run(M,P){let F=P.getModel();if(!F)return;let R=F.getOptions(),A=P.getSelection();if(!A)return;const O=new I(A,R.tabSize);P.pushUndoStop(),P.executeCommands(this.id,[O]),P.pushUndoStop(),F.updateOptions({insertSpaces:!1})}}e.IndentationToTabsAction=o,o.ID="editor.action.indentationToTabs";class i extends T.EditorAction{constructor(M,P){super(P);this.insertSpaces=M}run(M,P){const F=M.get(d.IQuickInputService),R=M.get(s.IModelService);let A=P.getModel();if(!A)return;const O=R.getCreationOptions(A.getLanguageId(),A.uri,A.isForSimpleWidget),L=[1,2,3,4,5,6,7,8].map(W=>({id:W.toString(),label:W.toString(),description:W===O.tabSize?u.localize(2,null):void 0})),B=Math.min(A.getOptions().tabSize-1,7);setTimeout(()=>{F.pick(L,{placeHolder:u.localize(3,null),activeItem:L[B]}).then(W=>{W&&A&&!A.isDisposed()&&A.updateOptions({tabSize:parseInt(W.label,10),insertSpaces:this.insertSpaces})})},50)}}e.ChangeIndentationSizeAction=i;class l extends i{constructor(){super(!1,{id:l.ID,label:u.localize(4,null),alias:"Indent Using Tabs",precondition:void 0})}}e.IndentUsingTabs=l,l.ID="editor.action.indentUsingTabs";class h extends i{constructor(){super(!0,{id:h.ID,label:u.localize(5,null),alias:"Indent Using Spaces",precondition:void 0})}}e.IndentUsingSpaces=h,h.ID="editor.action.indentUsingSpaces";class f extends T.EditorAction{constructor(){super({id:f.ID,label:u.localize(6,null),alias:"Detect Indentation from Content",precondition:void 0})}run(M,P){const F=M.get(s.IModelService);let R=P.getModel();if(!R)return;const A=F.getCreationOptions(R.getLanguageId(),R.uri,R.isForSimpleWidget);R.detectIndentation(A.insertSpaces,A.tabSize)}}e.DetectIndentation=f,f.ID="editor.action.detectIndentation";class y extends T.EditorAction{constructor(){super({id:"editor.action.reindentlines",label:u.localize(7,null),alias:"Reindent Lines",precondition:n.EditorContextKeys.writable})}run(M,P){let F=P.getModel();if(!F)return;let R=a(F,1,F.getLineCount());R.length>0&&(P.pushUndoStop(),P.executeEdits(this.id,R),P.pushUndoStop())}}e.ReindentLinesAction=y;class _ extends T.EditorAction{constructor(){super({id:"editor.action.reindentselectedlines",label:u.localize(8,null),alias:"Reindent Selected Lines",precondition:n.EditorContextKeys.writable})}run(M,P){let F=P.getModel();if(!F)return;let R=P.getSelections();if(R===null)return;let A=[];for(let O of R){let L=O.startLineNumber,B=O.endLineNumber;if(L!==B&&O.endColumn===1&&B--,L===1){if(L===B)continue}else L--;let W=a(F,L,B);A.push(...W)}A.length>0&&(P.pushUndoStop(),P.executeEdits(this.id,A),P.pushUndoStop())}}e.ReindentSelectedLinesAction=_;class b{constructor(M,P){this._initialSelection=P,this._edits=[],this._selectionId=null;for(let F of M)F.range&&typeof F.text=="string"&&this._edits.push(F)}getEditOperations(M,P){for(let R of this._edits)P.addEditOperation(p.Range.lift(R.range),R.text);let F=!1;Array.isArray(this._edits)&&this._edits.length===1&&this._initialSelection.isEmpty()&&(this._edits[0].range.startColumn===this._initialSelection.endColumn&&this._edits[0].range.startLineNumber===this._initialSelection.endLineNumber?(F=!0,this._selectionId=P.trackSelection(this._initialSelection,!0)):this._edits[0].range.endColumn===this._initialSelection.startColumn&&this._edits[0].range.endLineNumber===this._initialSelection.startLineNumber&&(F=!0,this._selectionId=P.trackSelection(this._initialSelection,!1))),F||(this._selectionId=P.trackSelection(this._initialSelection))}computeCursorState(M,P){return P.getTrackedSelection(this._selectionId)}}e.AutoIndentOnPasteCommand=b;class v{constructor(M){this.callOnDispose=new w.DisposableStore,this.callOnModel=new w.DisposableStore,this.editor=M,this.callOnDispose.add(M.onDidChangeConfiguration(()=>this.update())),this.callOnDispose.add(M.onDidChangeModel(()=>this.update())),this.callOnDispose.add(M.onDidChangeModelLanguage(()=>this.update()))}update(){this.callOnModel.clear(),!(this.editor.getOption(9)<4||this.editor.getOption(47))&&(!this.editor.hasModel()||this.callOnModel.add(this.editor.onDidPaste(({range:M})=>{this.trigger(M)})))}trigger(M){let P=this.editor.getSelections();if(P===null||P.length>1)return;const F=this.editor.getModel();if(!F||!F.isCheapToTokenize(M.getStartPosition().lineNumber))return;const R=this.editor.getOption(9),{tabSize:A,indentSize:O,insertSpaces:L}=F.getOptions();let B=[],W={shiftIndent:X=>D.ShiftCommand.shiftIndent(X,X.length+1,A,O,L),unshiftIndent:X=>D.ShiftCommand.unshiftIndent(X,X.length+1,A,O,L)},K=M.startLineNumber;for(;K<=M.endLineNumber;){if(this.shouldIgnoreLine(F,K)){K++;continue}break}if(K>M.endLineNumber)return;let H=F.getLineContent(K);if(!/\S/.test(H.substring(0,M.startColumn-1))){const X=t.LanguageConfigurationRegistry.getGoodIndentForLine(R,F,F.getLanguageId(),K,W);if(X!==null){let Z=N.getLeadingWhitespace(H),se=c.getSpaceCnt(X,A),oe=c.getSpaceCnt(Z,A);if(se!==oe){let G=c.generateIndent(se,A,L);B.push({range:new p.Range(K,1,K,Z.length+1),text:G}),H=G+H.substr(Z.length)}else{let G=t.LanguageConfigurationRegistry.getIndentMetadata(F,K);if(G===0||G===8)return}}}const Y=K;for(;K<M.endLineNumber;){if(!/\S/.test(F.getLineContent(K+1))){K++;continue}break}if(K!==M.endLineNumber){let X={getLineTokens:se=>F.getLineTokens(se),getLanguageId:()=>F.getLanguageId(),getLanguageIdAtPosition:(se,oe)=>F.getLanguageIdAtPosition(se,oe),getLineContent:se=>se===Y?H:F.getLineContent(se)},Z=t.LanguageConfigurationRegistry.getGoodIndentForLine(R,X,F.getLanguageId(),K+1,W);if(Z!==null){let se=c.getSpaceCnt(Z,A),oe=c.getSpaceCnt(N.getLeadingWhitespace(F.getLineContent(K+1)),A);if(se!==oe){let G=se-oe;for(let x=K+1;x<=M.endLineNumber;x++){let U=F.getLineContent(x),$=N.getLeadingWhitespace(U),Q=c.getSpaceCnt($,A)+G,ue=c.generateIndent(Q,A,L);ue!==$&&B.push({range:new p.Range(x,1,x,$.length+1),text:ue})}}}}if(B.length>0){this.editor.pushUndoStop();let X=new b(B,this.editor.getSelection());this.editor.executeCommand("autoIndentOnPaste",X),this.editor.pushUndoStop()}}shouldIgnoreLine(M,P){M.forceTokenization(P);let F=M.getLineFirstNonWhitespaceColumn(P);if(F===0)return!0;let R=M.getLineTokens(P);if(R.getCount()>0){let A=R.findTokenIndexAtOffset(F);if(A>=0&&R.getStandardTokenType(A)===1)return!0}return!1}dispose(){this.callOnDispose.dispose(),this.callOnModel.dispose()}}e.AutoIndentOnPaste=v,v.ID="editor.contrib.autoIndentOnPaste";function m(k,M,P,F){if(k.getLineCount()===1&&k.getLineMaxColumn(1)===1)return;let R="";for(let O=0;O<P;O++)R+=" ";let A=new RegExp(R,"gi");for(let O=1,L=k.getLineCount();O<=L;O++){let B=k.getLineFirstNonWhitespaceColumn(O);if(B===0&&(B=k.getLineMaxColumn(O)),B===1)continue;const W=new p.Range(O,1,O,B),K=k.getValueInRange(W),H=F?K.replace(/\t/ig,R):K.replace(A,"    ");M.addEditOperation(W,H)}}class E{constructor(M,P){this.selection=M,this.tabSize=P,this.selectionId=null}getEditOperations(M,P){this.selectionId=P.trackSelection(this.selection),m(M,P,this.tabSize,!0)}computeCursorState(M,P){return P.getTrackedSelection(this.selectionId)}}e.IndentationToSpacesCommand=E;class I{constructor(M,P){this.selection=M,this.tabSize=P,this.selectionId=null}getEditOperations(M,P){this.selectionId=P.trackSelection(this.selection),m(M,P,this.tabSize,!1)}computeCursorState(M,P){return P.getTrackedSelection(this.selectionId)}}e.IndentationToTabsCommand=I,(0,T.registerEditorContribution)(v.ID,v),(0,T.registerEditorAction)(r),(0,T.registerEditorAction)(o),(0,T.registerEditorAction)(l),(0,T.registerEditorAction)(h),(0,T.registerEditorAction)(f),(0,T.registerEditorAction)(y),(0,T.registerEditorAction)(_)}),define(J[687],ee([0,1,7,29,2,8,63,28,31,43,87,13,3,84,39,46,144,118,15,9,10,365]),function(j,e,w,N,T,D,S,p,C,n,g,t,s,c,u,d,a,r,o,i,l){"use strict";var h;Object.defineProperty(e,"__esModule",{value:!0}),e.GhostTextWidget=void 0;const f=(h=window.trustedTypes)===null||h===void 0?void 0:h.createPolicy("editorGhostText",{createHTML:M=>M});let y=class extends T.Disposable{constructor(P,F,R,A){super();this.editor=P,this.model=F,this.instantiationService=R,this.modeService=A,this.disposed=!1,this.partsWidget=this._register(this.instantiationService.createInstance(_,this.editor)),this.additionalLinesWidget=this._register(new v(this.editor,this.modeService.languageIdCodec)),this.viewMoreContentWidget=void 0,this._register(this.editor.onDidChangeConfiguration(O=>{(O.hasChanged(29)||O.hasChanged(104)||O.hasChanged(87)||O.hasChanged(82)||O.hasChanged(44)||O.hasChanged(43)||O.hasChanged(58))&&this.update()})),this._register((0,T.toDisposable)(()=>{var O;this.disposed=!0,this.update(),(O=this.viewMoreContentWidget)===null||O===void 0||O.dispose(),this.viewMoreContentWidget=void 0})),this._register(F.onDidChange(()=>{this.update()})),this.update()}shouldShowHoverAtViewZone(P){return this.additionalLinesWidget.viewZoneId===P}update(){var P;const F=this.model.ghostText;if(!this.editor.hasModel()||!F||this.disposed){this.partsWidget.clear(),this.additionalLinesWidget.clear();return}const R=new Array,A=new Array;function O(K,H){if(A.length>0){const Y=A[A.length-1];H&&Y.decorations.push(new a.LineDecoration(Y.content.length+1,Y.content.length+1+K[0].length,H,0)),Y.content+=K[0],K=K.slice(1)}for(const Y of K)A.push({content:Y,decorations:H?[new a.LineDecoration(1,Y.length+1,H,0)]:[]})}const L=this.editor.getModel().getLineContent(F.lineNumber);this.editor.getModel().getLineTokens(F.lineNumber);let B,W=0;for(const K of F.parts){let H=K.lines;B===void 0?(R.push({column:K.column,text:H[0],preview:K.preview}),H=H.slice(1)):O([L.substring(W,K.column-1)],void 0),H.length>0&&(O(H,"ghost-text"),B===void 0&&K.column<=L.length&&(B=K.column)),W=K.column-1}B!==void 0&&O([L.substring(W)],void 0),this.partsWidget.setParts(F.lineNumber,R,B!==void 0?{column:B,length:L.length+1-B}:void 0),this.additionalLinesWidget.updateLines(F.lineNumber,A,F.additionalReservedLineCount),F.parts.some(K=>K.lines.length<0)?this.viewMoreContentWidget=this.renderViewMoreLines(new t.Position(F.lineNumber,this.editor.getModel().getLineMaxColumn(F.lineNumber)),"",0):((P=this.viewMoreContentWidget)===null||P===void 0||P.dispose(),this.viewMoreContentWidget=void 0)}renderViewMoreLines(P,F,R){const A=this.editor.getOption(43),O=document.createElement("div");O.className="suggest-preview-additional-widget",S.Configuration.applyFontInfoSlow(O,A);const L=document.createElement("span");L.className="content-spacer",L.append(F),O.append(L);const B=document.createElement("span");B.className="content-newline suggest-preview-text",B.append("\u23CE  "),O.append(B);const W=new T.DisposableStore,K=document.createElement("div");return K.className="button suggest-preview-text",K.append(`+${R} lines\u2026`),W.add(w.addStandardDisposableListener(K,"mousedown",H=>{var Y;(Y=this.model)===null||Y===void 0||Y.setExpanded(!0),H.preventDefault(),this.editor.focus()})),O.append(K),new k(this.editor,P,O,W)}};y=Fe([Ce(2,i.IInstantiationService),Ce(3,u.IModeService)],y),e.GhostTextWidget=y;let _=class{constructor(P,F,R,A){this.editor=P,this.codeEditorService=F,this.themeService=R,this.contextKeyService=A,this.decorationIds=[],this.disposableStore=new T.DisposableStore}dispose(){this.clear(),this.disposableStore.dispose()}clear(){this.editor.deltaDecorations(this.decorationIds,[]),this.disposableStore.clear()}setParts(P,F,R){this.disposableStore.clear();const A=this.themeService.getColorTheme(),O=A.getColor(d.ghostTextForeground);let L,B;O&&(L=String(O.rgba.a),B=N.Color.Format.CSS.format(b(O)));const W=A.getColor(d.ghostTextBorder);let K;W&&(K=`2px dashed ${W}`);const H=this.editor.getModel();if(!H)return;const{tabSize:Y}=H.getOptions(),X=H.getLineContent(P)||"";let Z=0,se="";const oe=new Array;R&&oe.push({range:s.Range.fromPositions(new t.Position(P,R.column),new t.Position(P,R.column+R.length)),options:{inlineClassName:"ghost-text-hidden",description:"ghost-text-hidden"}});const G=this.contextKeyService.getContextKeyValue("config.editor.useInjectedText"),x=G===void 0?!0:!!G;this.decorationIds=this.editor.deltaDecorations(this.decorationIds,F.map(U=>{se+=X.substring(Z,U.column-1),Z=U.column-1;const $=x?U.text:this.renderSingleLineText(U.text,se,Y,!1),V=this.disposableStore.add(I(this.codeEditorService,"ghost-text","0-ghost-text-",{after:{contentText:$,opacity:L,color:B,border:K,fontWeight:U.preview?"bold":"normal"}}));return{range:s.Range.fromPositions(new t.Position(P,U.column)),options:x?{description:"ghost-text",after:{content:$,inlineClassName:U.preview?"ghost-text-decoration-preview":"ghost-text-decoration"},showIfCollapsed:!0}:Object.assign({},V.resolve())}}).concat(oe))}renderSingleLineText(P,F,R,A){const O=F+P,L=n.CursorColumns.visibleColumnsByColumns(O,R);let B="",W=F.length+1;for(const K of P){if(K==="    "){const H=L[W+1]-L[W];if(A){B+="\u2192";for(let Y=1;Y<H;Y++)B+="\xA0"}else for(let Y=0;Y<H;Y++)B+="\xA0"}else K===" "?A?B+="\xB7":B+="\xA0":B+=K;W+=1}return B}};_=Fe([Ce(1,p.ICodeEditorService),Ce(2,l.IThemeService),Ce(3,o.IContextKeyService)],_);function b(M){const{r:P,b:F,g:R}=M.rgba;return new N.Color(new N.RGBA(P,R,F,255))}class v{constructor(P,F){this.editor=P,this.languageIdCodec=F,this._viewZoneId=void 0}get viewZoneId(){return this._viewZoneId}dispose(){this.clear()}clear(){this.editor.changeViewZones(P=>{this._viewZoneId&&(P.removeZone(this._viewZoneId),this._viewZoneId=void 0)})}updateLines(P,F,R){const A=this.editor.getModel();if(!A)return;const{tabSize:O}=A.getOptions();this.editor.changeViewZones(L=>{this._viewZoneId&&(L.removeZone(this._viewZoneId),this._viewZoneId=void 0);const B=Math.max(F.length,R);if(B>0){const W=document.createElement("div");m(W,O,F,this.editor.getOptions(),this.languageIdCodec),this._viewZoneId=L.addZone({afterLineNumber:P,heightInLines:B,domNode:W})}})}}function m(M,P,F,R,A){const O=R.get(29),L=R.get(104),B="none",W=R.get(82),K=R.get(44),H=R.get(43),Y=R.get(58),X=(0,c.createStringBuilder)(1e4);X.appendASCIIString('<div class="suggest-preview-text">');for(let oe=0,G=F.length;oe<G;oe++){const x=F[oe],U=x.content;X.appendASCIIString('<div class="view-line'),X.appendASCIIString('" style="top:'),X.appendASCIIString(String(oe*Y)),X.appendASCIIString('px;width:1000000px;">');const $=D.isBasicASCII(U),V=D.containsRTL(U),Q=g.LineTokens.createEmpty(U,A);(0,r.renderViewLine)(new r.RenderLineInput(H.isMonospace&&!O,H.canUseHalfwidthRightwardsArrow,U,!1,$,V,0,Q,x.decorations,P,0,H.spaceWidth,H.middotWidth,H.wsmiddotWidth,L,B,W,K!==C.EditorFontLigatures.OFF,null),X),X.appendASCIIString("</div>")}X.appendASCIIString("</div>"),S.Configuration.applyFontInfoSlow(M,H);const Z=X.build(),se=f?f.createHTML(Z):Z;M.innerHTML=se}let E=0;function I(M,P,F,R){const A=F+E++;return M.registerDecorationType(P,A,R),{dispose(){M.removeDecorationType(A)},resolve(){return M.resolveDecorationOptions(A,!0)}}}class k extends T.Disposable{constructor(P,F,R,A){super();this.editor=P,this.position=F,this.domNode=R,this.allowEditorOverflow=!1,this.suppressMouseDown=!1,this._register(A),this._register((0,T.toDisposable)(()=>{this.editor.removeContentWidget(this)})),this.editor.addContentWidget(this)}getId(){return"editor.widget.viewMoreLinesWidget"}getDomNode(){return this.domNode}getPosition(){return{position:this.position,preference:[0]}}}(0,l.registerThemingParticipant)((M,P)=>{const F=M.getColor(d.ghostTextForeground);if(F){const A=String(F.rgba.a),O=N.Color.Format.CSS.format(b(F));P.addRule(`.monaco-editor .ghost-text-decoration { opacity: ${A} !important; color: ${O} !important; }`),P.addRule(`.monaco-editor .ghost-text-decoration-preview { color: ${F.toString()} !important; }`),P.addRule(`.monaco-editor .suggest-preview-text .ghost-text { opacity: ${A} !important; color: ${O} !important; }`)}const R=M.getColor(d.ghostTextBorder);R&&(P.addRule(`.monaco-editor .suggest-preview-text .ghost-text { border: 1px solid ${R}; }`),P.addRule(`.monaco-editor .ghost-text-decoration { border: 1px solid ${R}; }`),P.addRule(`.monaco-editor .ghost-text-decoration-preview { border: 1px solid ${R}; }`))})}),define(J[200],ee([0,1,14,23,11,4,2,8,156,16,59,3,18,184,26,242,185]),function(j,e,w,N,T,D,S,p,C,n,g,t,s,c,u,d,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.minimizeInlineCompletion=e.provideInlineCompletions=e.SynchronizedInlineCompletionsCache=e.UpdateOperation=e.InlineCompletionsSession=e.InlineCompletionsModel=void 0;let r=class extends S.Disposable{constructor(v,m,E){super();this.editor=v,this.cache=m,this.commandService=E,this.onDidChangeEmitter=new D.Emitter,this.onDidChange=this.onDidChangeEmitter.event,this.completionSession=this._register(new S.MutableDisposable),this.active=!1,this.disposed=!1,this._register(E.onDidExecuteCommand(I=>{new Set([n.UndoCommand.id,n.RedoCommand.id,C.CoreEditingCommands.Tab.id,C.CoreEditingCommands.DeleteLeft.id,C.CoreEditingCommands.DeleteRight.id,d.inlineSuggestCommitId,"acceptSelectedSuggestion"]).has(I.commandId)&&v.hasTextFocus()&&this.handleUserInput()})),this._register(this.editor.onDidType(I=>{this.handleUserInput()})),this._register(this.editor.onDidChangeCursorPosition(I=>{this.session&&!this.session.isValid&&this.hide()})),this._register((0,S.toDisposable)(()=>{this.disposed=!0})),this._register(this.editor.onDidBlurEditorWidget(()=>{this.hide()}))}handleUserInput(){this.session&&!this.session.isValid&&this.hide(),setTimeout(()=>{this.disposed||this.startSessionIfTriggered()},0)}get session(){return this.completionSession.value}get ghostText(){var v;return(v=this.session)===null||v===void 0?void 0:v.ghostText}get minReservedLineCount(){return this.session?this.session.minReservedLineCount:0}setExpanded(v){var m;(m=this.session)===null||m===void 0||m.setExpanded(v)}setActive(v){var m;this.active=v,v&&((m=this.session)===null||m===void 0||m.scheduleAutomaticUpdate())}startSessionIfTriggered(){!this.editor.getOption(54).enabled||this.session&&this.session.isValid||this.trigger(s.InlineCompletionTriggerKind.Automatic)}trigger(v){if(this.completionSession.value){v===s.InlineCompletionTriggerKind.Explicit&&this.completionSession.value.ensureUpdateWithExplicitContext();return}this.completionSession.value=new o(this.editor,this.editor.getPosition(),()=>this.active,this.commandService,this.cache,v),this.completionSession.value.takeOwnership(this.completionSession.value.onDidChange(()=>{this.onDidChangeEmitter.fire()}))}hide(){this.completionSession.clear(),this.onDidChangeEmitter.fire()}commitCurrentSuggestion(){var v;(v=this.session)===null||v===void 0||v.commitCurrentCompletion()}showNext(){var v;(v=this.session)===null||v===void 0||v.showNextInlineCompletion()}showPrevious(){var v;(v=this.session)===null||v===void 0||v.showPreviousInlineCompletion()}hasMultipleInlineCompletions(){var v;return Re(this,void 0,void 0,function*(){const m=yield(v=this.session)===null||v===void 0?void 0:v.hasMultipleInlineCompletions();return m!==void 0?m:!1})}};r=Fe([Ce(2,u.ICommandService)],r),e.InlineCompletionsModel=r;class o extends c.BaseGhostTextWidgetModel{constructor(v,m,E,I,k,M){super(v);this.triggerPosition=m,this.shouldUpdate=E,this.commandService=I,this.cache=k,this.initialTriggerKind=M,this.minReservedLineCount=0,this.updateOperation=this._register(new S.MutableDisposable),this.updateSoon=this._register(new w.RunOnceScheduler(()=>{let F=this.initialTriggerKind;return this.initialTriggerKind=s.InlineCompletionTriggerKind.Automatic,this.update(F)},50)),this.currentlySelectedCompletionId=void 0;let P;this._register(this.onDidChange(()=>{const F=this.currentCompletion;if(F&&F.sourceInlineCompletion!==P){P=F.sourceInlineCompletion;const R=F.sourceProvider;R.handleItemDidShow&&R.handleItemDidShow(F.sourceInlineCompletions,P)}})),this._register((0,S.toDisposable)(()=>{this.cache.clear()})),this._register(this.editor.onDidChangeCursorPosition(F=>{this.cache.value&&this.onDidChangeEmitter.fire()})),this._register(this.editor.onDidChangeModelContent(F=>{this.scheduleAutomaticUpdate()})),this._register(s.InlineCompletionsProviderRegistry.onDidChange(()=>{this.updateSoon.schedule()})),this.scheduleAutomaticUpdate()}fixAndGetIndexOfCurrentSelection(){if(!this.currentlySelectedCompletionId||!this.cache.value||this.cache.value.completions.length===0)return 0;const v=this.cache.value.completions.findIndex(m=>m.semanticId===this.currentlySelectedCompletionId);return v===-1?(this.currentlySelectedCompletionId=void 0,0):v}get currentCachedCompletion(){if(!!this.cache.value)return this.cache.value.completions[this.fixAndGetIndexOfCurrentSelection()]}showNextInlineCompletion(){var v;return Re(this,void 0,void 0,function*(){yield this.ensureUpdateWithExplicitContext();const m=((v=this.cache.value)===null||v===void 0?void 0:v.completions)||[];if(m.length>0){const E=(this.fixAndGetIndexOfCurrentSelection()+1)%m.length;this.currentlySelectedCompletionId=m[E].semanticId}else this.currentlySelectedCompletionId=void 0;this.onDidChangeEmitter.fire()})}showPreviousInlineCompletion(){var v;return Re(this,void 0,void 0,function*(){yield this.ensureUpdateWithExplicitContext();const m=((v=this.cache.value)===null||v===void 0?void 0:v.completions)||[];if(m.length>0){const E=(this.fixAndGetIndexOfCurrentSelection()+m.length-1)%m.length;this.currentlySelectedCompletionId=m[E].semanticId}else this.currentlySelectedCompletionId=void 0;this.onDidChangeEmitter.fire()})}ensureUpdateWithExplicitContext(){var v;return Re(this,void 0,void 0,function*(){this.updateOperation.value?this.updateOperation.value.triggerKind===s.InlineCompletionTriggerKind.Explicit?yield this.updateOperation.value.promise:yield this.update(s.InlineCompletionTriggerKind.Explicit):((v=this.cache.value)===null||v===void 0?void 0:v.triggerKind)!==s.InlineCompletionTriggerKind.Explicit&&(yield this.update(s.InlineCompletionTriggerKind.Explicit))})}hasMultipleInlineCompletions(){var v;return Re(this,void 0,void 0,function*(){return yield this.ensureUpdateWithExplicitContext(),(((v=this.cache.value)===null||v===void 0?void 0:v.completions.length)||0)>1})}get ghostText(){const v=this.currentCompletion,m=this.editor.getOptions().get(54).mode;return v?(0,a.inlineCompletionToGhostText)(v,this.editor.getModel(),m,this.editor.getPosition()):void 0}get currentCompletion(){const v=this.currentCachedCompletion;if(!!v)return v.toLiveInlineCompletion()}get isValid(){return this.editor.getPosition().lineNumber===this.triggerPosition.lineNumber}scheduleAutomaticUpdate(){this.updateOperation.clear(),this.updateSoon.schedule()}update(v){return Re(this,void 0,void 0,function*(){if(!this.shouldUpdate())return;const m=this.editor.getPosition(),E=(0,w.createCancelablePromise)(k=>Re(this,void 0,void 0,function*(){let M;try{M=yield y(m,this.editor.getModel(),{triggerKind:v,selectedSuggestionInfo:void 0},k)}catch(P){(0,T.onUnexpectedError)(P);return}k.isCancellationRequested||(this.cache.setValue(this.editor,M,v),this.onDidChangeEmitter.fire())})),I=new i(E,v);this.updateOperation.value=I,yield E,this.updateOperation.value===I&&this.updateOperation.clear()})}takeOwnership(v){this._register(v)}commitCurrentCompletion(){if(!this.ghostText)return;const v=this.currentCompletion;v&&this.commit(v)}commit(v){const m=this.cache.clearAndLeak();this.editor.executeEdits("inlineSuggestion.accept",[g.EditOperation.replaceMove(v.range,v.text)]),v.command?this.commandService.executeCommand(v.command.id,...v.command.arguments||[]).finally(()=>{m==null||m.dispose()}).then(void 0,T.onUnexpectedExternalError):m==null||m.dispose(),this.onDidChangeEmitter.fire()}}e.InlineCompletionsSession=o;class i{constructor(v,m){this.promise=v,this.triggerKind=m}dispose(){this.promise.cancel()}}e.UpdateOperation=i;class l extends S.Disposable{constructor(v,m,E,I){super();this.triggerKind=I;const k=v.deltaDecorations([],m.items.map(M=>({range:M.range,options:{description:"inline-completion-tracking-range"}})));this._register((0,S.toDisposable)(()=>{v.deltaDecorations(k,[])})),this.completions=m.items.map((M,P)=>new h(M,k[P])),this._register(v.onDidChangeModelContent(()=>{let M=!1;const P=v.getModel();for(const F of this.completions){const R=P.getDecorationRange(F.decorationId);if(!R){(0,T.onUnexpectedError)(new Error("Decoration has no range"));continue}F.synchronizedRange.equalsRange(R)||(M=!0,F.synchronizedRange=R)}M&&E()})),this._register(m)}}e.SynchronizedInlineCompletionsCache=l;class h{constructor(v,m){this.inlineCompletion=v,this.decorationId=m,this.semanticId=JSON.stringify({text:this.inlineCompletion.text,startLine:this.inlineCompletion.range.startLineNumber,startColumn:this.inlineCompletion.range.startColumn,command:this.inlineCompletion.command}),this.synchronizedRange=v.range}toLiveInlineCompletion(){return{text:this.inlineCompletion.text,range:this.synchronizedRange,command:this.inlineCompletion.command,sourceProvider:this.inlineCompletion.sourceProvider,sourceInlineCompletions:this.inlineCompletion.sourceInlineCompletions,sourceInlineCompletion:this.inlineCompletion.sourceInlineCompletion}}}function f(b,v){const m=v.getWordAtPosition(b),E=v.getLineMaxColumn(b.lineNumber);return m?new t.Range(b.lineNumber,m.startColumn,b.lineNumber,E):t.Range.fromPositions(b,b.with(void 0,E))}function y(b,v,m,E=N.CancellationToken.None){return Re(this,void 0,void 0,function*(){const I=f(b,v),k=s.InlineCompletionsProviderRegistry.all(v),M=yield Promise.all(k.map(F=>Re(this,void 0,void 0,function*(){const R=yield F.provideInlineCompletions(v,b,m,E);return{completions:R,provider:F,dispose:()=>{R&&F.freeInlineCompletions(R)}}}))),P=new Map;for(const F of M){const R=F.completions;if(R)for(const A of R.items.map(O=>({text:O.text,range:O.range?t.Range.lift(O.range):I,command:O.command,sourceProvider:F.provider,sourceInlineCompletions:R,sourceInlineCompletion:O})))A.range.startLineNumber===A.range.endLineNumber&&P.set(JSON.stringify({text:A.text,range:A.range}),A)}return{items:[...P.values()],dispose:()=>{for(const F of M)F.dispose()}}})}e.provideInlineCompletions=y;function _(b,v){if(!v)return v;const m=b.getValueInRange(v.range),E=(0,p.commonPrefixLength)(m,v.text),I=b.getOffsetAt(v.range.getStartPosition())+E,k=b.getPositionAt(I),M=m.substr(E),P=(0,p.commonSuffixLength)(M,v.text),F=b.getPositionAt(Math.max(I,b.getOffsetAt(v.range.getEndPosition())-P));return{range:t.Range.fromPositions(k,F),text:v.text.substr(E,v.text.length-E-P)}}e.minimizeInlineCompletion=_}),define(J[688],ee([0,1,8,195,3,22,116,37,241]),function(j,e,w,N,T,D,S,p,C){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MoveLinesCommand=void 0;class n{constructor(t,s,c){this._selection=t,this._isMovingDown=s,this._autoIndent=c,this._selectionId=null,this._moveEndLineSelectionShrink=!1}getEditOperations(t,s){let c=t.getLineCount();if(this._isMovingDown&&this._selection.endLineNumber===c){this._selectionId=s.trackSelection(this._selection);return}if(!this._isMovingDown&&this._selection.startLineNumber===1){this._selectionId=s.trackSelection(this._selection);return}this._moveEndPositionDown=!1;let u=this._selection;u.startLineNumber<u.endLineNumber&&u.endColumn===1&&(this._moveEndPositionDown=!0,u=u.setEndPosition(u.endLineNumber-1,t.getLineMaxColumn(u.endLineNumber-1)));const{tabSize:d,indentSize:a,insertSpaces:r}=t.getOptions();let o=this.buildIndentConverter(d,a,r),i={getLineTokens:l=>t.getLineTokens(l),getLanguageId:()=>t.getLanguageId(),getLanguageIdAtPosition:(l,h)=>t.getLanguageIdAtPosition(l,h),getLineContent:null};if(u.startLineNumber===u.endLineNumber&&t.getLineMaxColumn(u.startLineNumber)===1){let l=u.startLineNumber,h=this._isMovingDown?l+1:l-1;t.getLineMaxColumn(h)===1?s.addEditOperation(new T.Range(1,1,1,1),null):(s.addEditOperation(new T.Range(l,1,l,1),t.getLineContent(h)),s.addEditOperation(new T.Range(h,1,h,t.getLineMaxColumn(h)),null)),u=new D.Selection(h,1,h,1)}else{let l,h;if(this._isMovingDown){l=u.endLineNumber+1,h=t.getLineContent(l),s.addEditOperation(new T.Range(l-1,t.getLineMaxColumn(l-1),l,t.getLineMaxColumn(l)),null);let f=h;if(this.shouldAutoIndent(t,u)){let y=this.matchEnterRule(t,o,d,l,u.startLineNumber-1);if(y!==null){let b=w.getLeadingWhitespace(t.getLineContent(l)),v=y+C.getSpaceCnt(b,d);f=C.generateIndent(v,d,r)+this.trimLeft(h)}else{i.getLineContent=v=>v===u.startLineNumber?t.getLineContent(l):t.getLineContent(v);let b=p.LanguageConfigurationRegistry.getGoodIndentForLine(this._autoIndent,i,t.getLanguageIdAtPosition(l,1),u.startLineNumber,o);if(b!==null){let v=w.getLeadingWhitespace(t.getLineContent(l)),m=C.getSpaceCnt(b,d),E=C.getSpaceCnt(v,d);m!==E&&(f=C.generateIndent(m,d,r)+this.trimLeft(h))}}s.addEditOperation(new T.Range(u.startLineNumber,1,u.startLineNumber,1),f+`
`);let _=this.matchEnterRuleMovingDown(t,o,d,u.startLineNumber,l,f);if(_!==null)_!==0&&this.getIndentEditsOfMovingBlock(t,s,u,d,r,_);else{i.getLineContent=v=>v===u.startLineNumber?f:v>=u.startLineNumber+1&&v<=u.endLineNumber+1?t.getLineContent(v-1):t.getLineContent(v);let b=p.LanguageConfigurationRegistry.getGoodIndentForLine(this._autoIndent,i,t.getLanguageIdAtPosition(l,1),u.startLineNumber+1,o);if(b!==null){const v=w.getLeadingWhitespace(t.getLineContent(u.startLineNumber)),m=C.getSpaceCnt(b,d),E=C.getSpaceCnt(v,d);if(m!==E){const I=m-E;this.getIndentEditsOfMovingBlock(t,s,u,d,r,I)}}}}else s.addEditOperation(new T.Range(u.startLineNumber,1,u.startLineNumber,1),f+`
`)}else if(l=u.startLineNumber-1,h=t.getLineContent(l),s.addEditOperation(new T.Range(l,1,l+1,1),null),s.addEditOperation(new T.Range(u.endLineNumber,t.getLineMaxColumn(u.endLineNumber),u.endLineNumber,t.getLineMaxColumn(u.endLineNumber)),`
`+h),this.shouldAutoIndent(t,u)){i.getLineContent=y=>y===l?t.getLineContent(u.startLineNumber):t.getLineContent(y);let f=this.matchEnterRule(t,o,d,u.startLineNumber,u.startLineNumber-2);if(f!==null)f!==0&&this.getIndentEditsOfMovingBlock(t,s,u,d,r,f);else{let y=p.LanguageConfigurationRegistry.getGoodIndentForLine(this._autoIndent,i,t.getLanguageIdAtPosition(u.startLineNumber,1),l,o);if(y!==null){let _=w.getLeadingWhitespace(t.getLineContent(u.startLineNumber)),b=C.getSpaceCnt(y,d),v=C.getSpaceCnt(_,d);if(b!==v){let m=b-v;this.getIndentEditsOfMovingBlock(t,s,u,d,r,m)}}}}}this._selectionId=s.trackSelection(u)}buildIndentConverter(t,s,c){return{shiftIndent:u=>N.ShiftCommand.shiftIndent(u,u.length+1,t,s,c),unshiftIndent:u=>N.ShiftCommand.unshiftIndent(u,u.length+1,t,s,c)}}parseEnterResult(t,s,c,u,d){if(d){let a=d.indentation;d.indentAction===S.IndentAction.None||d.indentAction===S.IndentAction.Indent?a=d.indentation+d.appendText:d.indentAction===S.IndentAction.IndentOutdent?a=d.indentation:d.indentAction===S.IndentAction.Outdent&&(a=s.unshiftIndent(d.indentation)+d.appendText);let r=t.getLineContent(u);if(this.trimLeft(r).indexOf(this.trimLeft(a))>=0){let o=w.getLeadingWhitespace(t.getLineContent(u)),i=w.getLeadingWhitespace(a),l=p.LanguageConfigurationRegistry.getIndentMetadata(t,u);l!==null&&l&2&&(i=s.unshiftIndent(i));let h=C.getSpaceCnt(i,c),f=C.getSpaceCnt(o,c);return h-f}}return null}matchEnterRuleMovingDown(t,s,c,u,d,a){if(w.lastNonWhitespaceIndex(a)>=0){let r=t.getLineMaxColumn(d),o=p.LanguageConfigurationRegistry.getEnterAction(this._autoIndent,t,new T.Range(d,r,d,r));return this.parseEnterResult(t,s,c,u,o)}else{let r=u-1;for(;r>=1;){let l=t.getLineContent(r);if(w.lastNonWhitespaceIndex(l)>=0)break;r--}if(r<1||u>t.getLineCount())return null;let o=t.getLineMaxColumn(r),i=p.LanguageConfigurationRegistry.getEnterAction(this._autoIndent,t,new T.Range(r,o,r,o));return this.parseEnterResult(t,s,c,u,i)}}matchEnterRule(t,s,c,u,d,a){let r=d;for(;r>=1;){let l;if(r===d&&a!==void 0?l=a:l=t.getLineContent(r),w.lastNonWhitespaceIndex(l)>=0)break;r--}if(r<1||u>t.getLineCount())return null;let o=t.getLineMaxColumn(r),i=p.LanguageConfigurationRegistry.getEnterAction(this._autoIndent,t,new T.Range(r,o,r,o));return this.parseEnterResult(t,s,c,u,i)}trimLeft(t){return t.replace(/^\s+/,"")}shouldAutoIndent(t,s){if(this._autoIndent<4||!t.isCheapToTokenize(s.startLineNumber))return!1;let c=t.getLanguageIdAtPosition(s.startLineNumber,1),u=t.getLanguageIdAtPosition(s.endLineNumber,1);return!(c!==u||p.LanguageConfigurationRegistry.getIndentRulesSupport(c)===null)}getIndentEditsOfMovingBlock(t,s,c,u,d,a){for(let r=c.startLineNumber;r<=c.endLineNumber;r++){let o=t.getLineContent(r),i=w.getLeadingWhitespace(o),h=C.getSpaceCnt(i,u)+a,f=C.generateIndent(h,u,d);f!==i&&(s.addEditOperation(new T.Range(r,1,r,i.length+1),f),r===c.endLineNumber&&c.endColumn<=i.length+1&&f===""&&(this._moveEndLineSelectionShrink=!0))}}computeCursorState(t,s){let c=s.getTrackedSelection(this._selectionId);return this._moveEndPositionDown&&(c=c.setEndPosition(c.endLineNumber+1,1)),this._moveEndLineSelectionShrink&&c.startLineNumber<c.endLineNumber&&(c=c.setEndPosition(c.endLineNumber,2)),c}}e.MoveLinesCommand=n}),define(J[689],ee([0,1,55,156,16,98,385,199,59,13,3,22,25,429,688,430,517,35]),function(j,e,w,N,T,D,S,p,C,n,g,t,s,c,u,d,a,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SnakeCaseAction=e.TitleCaseAction=e.LowerCaseAction=e.UpperCaseAction=e.AbstractCaseAction=e.TransposeAction=e.JoinLinesAction=e.DeleteAllRightAction=e.DeleteAllLeftAction=e.AbstractDeleteAllToBoundaryAction=e.InsertLineAfterAction=e.InsertLineBeforeAction=e.IndentLinesAction=e.DeleteLinesAction=e.TrimTrailingWhitespaceAction=e.DeleteDuplicateLinesAction=e.SortLinesDescendingAction=e.SortLinesAscendingAction=e.AbstractSortLinesAction=e.DuplicateSelectionAction=void 0;class o extends T.EditorAction{constructor(G,x){super(x);this.down=G}run(G,x){if(!x.hasModel())return;const U=x.getSelections().map((Q,ue)=>({selection:Q,index:ue,ignore:!1}));U.sort((Q,ue)=>g.Range.compareRangesUsingStarts(Q.selection,ue.selection));let $=U[0];for(let Q=1;Q<U.length;Q++){const ue=U[Q];$.selection.endLineNumber===ue.selection.startLineNumber&&($.index<ue.index?ue.ignore=!0:($.ignore=!0,$=ue))}const V=[];for(const Q of U)V.push(new c.CopyLinesCommand(Q.selection,this.down,Q.ignore));x.pushUndoStop(),x.executeCommands(this.id,V),x.pushUndoStop()}}class i extends o{constructor(){super(!1,{id:"editor.action.copyLinesUpAction",label:a.localize(0,null),alias:"Copy Line Up",precondition:s.EditorContextKeys.writable,kbOpts:{kbExpr:s.EditorContextKeys.editorTextFocus,primary:512|1024|16,linux:{primary:2048|512|1024|16},weight:100},menuOpts:{menuId:r.MenuId.MenubarSelectionMenu,group:"2_line",title:a.localize(1,null),order:1}})}}class l extends o{constructor(){super(!0,{id:"editor.action.copyLinesDownAction",label:a.localize(2,null),alias:"Copy Line Down",precondition:s.EditorContextKeys.writable,kbOpts:{kbExpr:s.EditorContextKeys.editorTextFocus,primary:512|1024|18,linux:{primary:2048|512|1024|18},weight:100},menuOpts:{menuId:r.MenuId.MenubarSelectionMenu,group:"2_line",title:a.localize(3,null),order:2}})}}class h extends T.EditorAction{constructor(){super({id:"editor.action.duplicateSelection",label:a.localize(4,null),alias:"Duplicate Selection",precondition:s.EditorContextKeys.writable,menuOpts:{menuId:r.MenuId.MenubarSelectionMenu,group:"2_line",title:a.localize(5,null),order:5}})}run(G,x,U){if(!x.hasModel())return;const $=[],V=x.getSelections(),Q=x.getModel();for(const ue of V)if(ue.isEmpty())$.push(new c.CopyLinesCommand(ue,!0));else{const pe=new t.Selection(ue.endLineNumber,ue.endColumn,ue.endLineNumber,ue.endColumn);$.push(new D.ReplaceCommandThatSelectsText(pe,Q.getValueInRange(ue)))}x.pushUndoStop(),x.executeCommands(this.id,$),x.pushUndoStop()}}e.DuplicateSelectionAction=h;class f extends T.EditorAction{constructor(G,x){super(x);this.down=G}run(G,x){let U=[],$=x.getSelections()||[];const V=x.getOption(9);for(const Q of $)U.push(new u.MoveLinesCommand(Q,this.down,V));x.pushUndoStop(),x.executeCommands(this.id,U),x.pushUndoStop()}}class y extends f{constructor(){super(!1,{id:"editor.action.moveLinesUpAction",label:a.localize(6,null),alias:"Move Line Up",precondition:s.EditorContextKeys.writable,kbOpts:{kbExpr:s.EditorContextKeys.editorTextFocus,primary:512|16,linux:{primary:512|16},weight:100},menuOpts:{menuId:r.MenuId.MenubarSelectionMenu,group:"2_line",title:a.localize(7,null),order:3}})}}class _ extends f{constructor(){super(!0,{id:"editor.action.moveLinesDownAction",label:a.localize(8,null),alias:"Move Line Down",precondition:s.EditorContextKeys.writable,kbOpts:{kbExpr:s.EditorContextKeys.editorTextFocus,primary:512|18,linux:{primary:512|18},weight:100},menuOpts:{menuId:r.MenuId.MenubarSelectionMenu,group:"2_line",title:a.localize(9,null),order:4}})}}class b extends T.EditorAction{constructor(G,x){super(x);this.descending=G}run(G,x){const U=x.getSelections()||[];for(const V of U)if(!d.SortLinesCommand.canRun(x.getModel(),V,this.descending))return;let $=[];for(let V=0,Q=U.length;V<Q;V++)$[V]=new d.SortLinesCommand(U[V],this.descending);x.pushUndoStop(),x.executeCommands(this.id,$),x.pushUndoStop()}}e.AbstractSortLinesAction=b;class v extends b{constructor(){super(!1,{id:"editor.action.sortLinesAscending",label:a.localize(10,null),alias:"Sort Lines Ascending",precondition:s.EditorContextKeys.writable})}}e.SortLinesAscendingAction=v;class m extends b{constructor(){super(!0,{id:"editor.action.sortLinesDescending",label:a.localize(11,null),alias:"Sort Lines Descending",precondition:s.EditorContextKeys.writable})}}e.SortLinesDescendingAction=m;class E extends T.EditorAction{constructor(){super({id:"editor.action.removeDuplicateLines",label:a.localize(12,null),alias:"Delete Duplicate Lines",precondition:s.EditorContextKeys.writable})}run(G,x){if(!x.hasModel())return;let U=x.getModel();if(U.getLineCount()===1&&U.getLineMaxColumn(1)===1)return;let $=[],V=[],Q=0;for(let ue of x.getSelections()){let pe=new Set,fe=[];for(let q=ue.startLineNumber;q<=ue.endLineNumber;q++){let ne=U.getLineContent(q);pe.has(ne)||(fe.push(ne),pe.add(ne))}let re=new t.Selection(ue.startLineNumber,1,ue.endLineNumber,U.getLineMaxColumn(ue.endLineNumber)),ie=ue.startLineNumber-Q,ae=new t.Selection(ie,1,ie+fe.length-1,fe[fe.length-1].length);$.push(C.EditOperation.replace(re,fe.join(`
`))),V.push(ae),Q+=ue.endLineNumber-ue.startLineNumber+1-fe.length}x.pushUndoStop(),x.executeEdits(this.id,$,V),x.pushUndoStop()}}e.DeleteDuplicateLinesAction=E;class I extends T.EditorAction{constructor(){super({id:I.ID,label:a.localize(13,null),alias:"Trim Trailing Whitespace",precondition:s.EditorContextKeys.writable,kbOpts:{kbExpr:s.EditorContextKeys.editorTextFocus,primary:(0,w.KeyChord)(2048|41,2048|54),weight:100}})}run(G,x,U){let $=[];U.reason==="auto-save"&&($=(x.getSelections()||[]).map(ue=>new n.Position(ue.positionLineNumber,ue.positionColumn)));let V=x.getSelection();if(V===null)return;let Q=new S.TrimTrailingWhitespaceCommand(V,$);x.pushUndoStop(),x.executeCommands(this.id,[Q]),x.pushUndoStop()}}e.TrimTrailingWhitespaceAction=I,I.ID="editor.action.trimTrailingWhitespace";class k extends T.EditorAction{constructor(){super({id:"editor.action.deleteLines",label:a.localize(14,null),alias:"Delete Line",precondition:s.EditorContextKeys.writable,kbOpts:{kbExpr:s.EditorContextKeys.textInputFocus,primary:2048|1024|41,weight:100}})}run(G,x){if(!x.hasModel())return;let U=this._getLinesToRemove(x),$=x.getModel();if($.getLineCount()===1&&$.getLineMaxColumn(1)===1)return;let V=0,Q=[],ue=[];for(let pe=0,fe=U.length;pe<fe;pe++){const re=U[pe];let ie=re.startLineNumber,ae=re.endLineNumber,q=1,ne=$.getLineMaxColumn(ae);ae<$.getLineCount()?(ae+=1,ne=1):ie>1&&(ie-=1,q=$.getLineMaxColumn(ie)),Q.push(C.EditOperation.replace(new t.Selection(ie,q,ae,ne),"")),ue.push(new t.Selection(ie-V,re.positionColumn,ie-V,re.positionColumn)),V+=re.endLineNumber-re.startLineNumber+1}x.pushUndoStop(),x.executeEdits(this.id,Q,ue),x.pushUndoStop()}_getLinesToRemove(G){let x=G.getSelections().map(V=>{let Q=V.endLineNumber;return V.startLineNumber<V.endLineNumber&&V.endColumn===1&&(Q-=1),{startLineNumber:V.startLineNumber,selectionStartColumn:V.selectionStartColumn,endLineNumber:Q,positionColumn:V.positionColumn}});x.sort((V,Q)=>V.startLineNumber===Q.startLineNumber?V.endLineNumber-Q.endLineNumber:V.startLineNumber-Q.startLineNumber);let U=[],$=x[0];for(let V=1;V<x.length;V++)$.endLineNumber+1>=x[V].startLineNumber?$.endLineNumber=x[V].endLineNumber:(U.push($),$=x[V]);return U.push($),U}}e.DeleteLinesAction=k;class M extends T.EditorAction{constructor(){super({id:"editor.action.indentLines",label:a.localize(15,null),alias:"Indent Line",precondition:s.EditorContextKeys.writable,kbOpts:{kbExpr:s.EditorContextKeys.editorTextFocus,primary:2048|89,weight:100}})}run(G,x){const U=x._getViewModel();!U||(x.pushUndoStop(),x.executeCommands(this.id,p.TypeOperations.indent(U.cursorConfig,x.getModel(),x.getSelections())),x.pushUndoStop())}}e.IndentLinesAction=M;class P extends T.EditorAction{constructor(){super({id:"editor.action.outdentLines",label:a.localize(16,null),alias:"Outdent Line",precondition:s.EditorContextKeys.writable,kbOpts:{kbExpr:s.EditorContextKeys.editorTextFocus,primary:2048|87,weight:100}})}run(G,x){N.CoreEditingCommands.Outdent.runEditorCommand(G,x,null)}}class F extends T.EditorAction{constructor(){super({id:"editor.action.insertLineBefore",label:a.localize(17,null),alias:"Insert Line Above",precondition:s.EditorContextKeys.writable,kbOpts:{kbExpr:s.EditorContextKeys.editorTextFocus,primary:2048|1024|3,weight:100}})}run(G,x){const U=x._getViewModel();!U||(x.pushUndoStop(),x.executeCommands(this.id,p.TypeOperations.lineInsertBefore(U.cursorConfig,x.getModel(),x.getSelections())))}}e.InsertLineBeforeAction=F;class R extends T.EditorAction{constructor(){super({id:"editor.action.insertLineAfter",label:a.localize(18,null),alias:"Insert Line Below",precondition:s.EditorContextKeys.writable,kbOpts:{kbExpr:s.EditorContextKeys.editorTextFocus,primary:2048|3,weight:100}})}run(G,x){const U=x._getViewModel();!U||(x.pushUndoStop(),x.executeCommands(this.id,p.TypeOperations.lineInsertAfter(U.cursorConfig,x.getModel(),x.getSelections())))}}e.InsertLineAfterAction=R;class A extends T.EditorAction{run(G,x){if(!x.hasModel())return;const U=x.getSelection();let $=this._getRangesToDelete(x),V=[];for(let pe=0,fe=$.length-1;pe<fe;pe++){let re=$[pe],ie=$[pe+1];g.Range.intersectRanges(re,ie)===null?V.push(re):$[pe+1]=g.Range.plusRange(re,ie)}V.push($[$.length-1]);let Q=this._getEndCursorState(U,V),ue=V.map(pe=>C.EditOperation.replace(pe,""));x.pushUndoStop(),x.executeEdits(this.id,ue,Q),x.pushUndoStop()}}e.AbstractDeleteAllToBoundaryAction=A;class O extends A{constructor(){super({id:"deleteAllLeft",label:a.localize(19,null),alias:"Delete All Left",precondition:s.EditorContextKeys.writable,kbOpts:{kbExpr:s.EditorContextKeys.textInputFocus,primary:0,mac:{primary:2048|1},weight:100}})}_getEndCursorState(G,x){let U=null,$=[],V=0;return x.forEach(Q=>{let ue;if(Q.endColumn===1&&V>0){let pe=Q.startLineNumber-V;ue=new t.Selection(pe,Q.startColumn,pe,Q.startColumn)}else ue=new t.Selection(Q.startLineNumber,Q.startColumn,Q.startLineNumber,Q.startColumn);V+=Q.endLineNumber-Q.startLineNumber,Q.intersectRanges(G)?U=ue:$.push(ue)}),U&&$.unshift(U),$}_getRangesToDelete(G){let x=G.getSelections();if(x===null)return[];let U=x,$=G.getModel();return $===null?[]:(U.sort(g.Range.compareRangesUsingStarts),U=U.map(V=>{if(V.isEmpty())if(V.startColumn===1){let Q=Math.max(1,V.startLineNumber-1),ue=V.startLineNumber===1?1:$.getLineContent(Q).length+1;return new g.Range(Q,ue,V.startLineNumber,1)}else return new g.Range(V.startLineNumber,1,V.startLineNumber,V.startColumn);else return new g.Range(V.startLineNumber,1,V.endLineNumber,V.endColumn)}),U)}}e.DeleteAllLeftAction=O;class L extends A{constructor(){super({id:"deleteAllRight",label:a.localize(20,null),alias:"Delete All Right",precondition:s.EditorContextKeys.writable,kbOpts:{kbExpr:s.EditorContextKeys.textInputFocus,primary:0,mac:{primary:256|41,secondary:[2048|20]},weight:100}})}_getEndCursorState(G,x){let U=null,$=[];for(let V=0,Q=x.length,ue=0;V<Q;V++){let pe=x[V],fe=new t.Selection(pe.startLineNumber-ue,pe.startColumn,pe.startLineNumber-ue,pe.startColumn);pe.intersectRanges(G)?U=fe:$.push(fe)}return U&&$.unshift(U),$}_getRangesToDelete(G){let x=G.getModel();if(x===null)return[];let U=G.getSelections();if(U===null)return[];let $=U.map(V=>{if(V.isEmpty()){const Q=x.getLineMaxColumn(V.startLineNumber);return V.startColumn===Q?new g.Range(V.startLineNumber,V.startColumn,V.startLineNumber+1,1):new g.Range(V.startLineNumber,V.startColumn,V.startLineNumber,Q)}return V});return $.sort(g.Range.compareRangesUsingStarts),$}}e.DeleteAllRightAction=L;class B extends T.EditorAction{constructor(){super({id:"editor.action.joinLines",label:a.localize(21,null),alias:"Join Lines",precondition:s.EditorContextKeys.writable,kbOpts:{kbExpr:s.EditorContextKeys.editorTextFocus,primary:0,mac:{primary:256|40},weight:100}})}run(G,x){let U=x.getSelections();if(U===null)return;let $=x.getSelection();if($===null)return;U.sort(g.Range.compareRangesUsingStarts);let V=[],Q=U.reduce((ae,q)=>ae.isEmpty()?ae.endLineNumber===q.startLineNumber?($.equalsSelection(ae)&&($=q),q):q.startLineNumber>ae.endLineNumber+1?(V.push(ae),q):new t.Selection(ae.startLineNumber,ae.startColumn,q.endLineNumber,q.endColumn):q.startLineNumber>ae.endLineNumber?(V.push(ae),q):new t.Selection(ae.startLineNumber,ae.startColumn,q.endLineNumber,q.endColumn));V.push(Q);let ue=x.getModel();if(ue===null)return;let pe=[],fe=[],re=$,ie=0;for(let ae=0,q=V.length;ae<q;ae++){let ne=V[ae],ce=ne.startLineNumber,le=1,de=0,z,te,he=ue.getLineContent(ne.endLineNumber).length-ne.endColumn;if(ne.isEmpty()||ne.startLineNumber===ne.endLineNumber){let Se=ne.getStartPosition();Se.lineNumber<ue.getLineCount()?(z=ce+1,te=ue.getLineMaxColumn(z)):(z=Se.lineNumber,te=ue.getLineMaxColumn(Se.lineNumber))}else z=ne.endLineNumber,te=ue.getLineMaxColumn(z);let ge=ue.getLineContent(ce);for(let Se=ce+1;Se<=z;Se++){let Ee=ue.getLineContent(Se),Ae=ue.getLineFirstNonWhitespaceColumn(Se);if(Ae>=1){let Ne=!0;ge===""&&(Ne=!1),Ne&&(ge.charAt(ge.length-1)===" "||ge.charAt(ge.length-1)==="    ")&&(Ne=!1,ge=ge.replace(/[\s\uFEFF\xA0]+$/g," "));let ze=Ee.substr(Ae-1);ge+=(Ne?" ":"")+ze,Ne?de=ze.length+1:de=ze.length}else de=0}let ve=new g.Range(ce,le,z,te);if(!ve.isEmpty()){let Se;ne.isEmpty()?(pe.push(C.EditOperation.replace(ve,ge)),Se=new t.Selection(ve.startLineNumber-ie,ge.length-de+1,ce-ie,ge.length-de+1)):ne.startLineNumber===ne.endLineNumber?(pe.push(C.EditOperation.replace(ve,ge)),Se=new t.Selection(ne.startLineNumber-ie,ne.startColumn,ne.endLineNumber-ie,ne.endColumn)):(pe.push(C.EditOperation.replace(ve,ge)),Se=new t.Selection(ne.startLineNumber-ie,ne.startColumn,ne.startLineNumber-ie,ge.length-he)),g.Range.intersectRanges(ve,$)!==null?re=Se:fe.push(Se)}ie+=ve.endLineNumber-ve.startLineNumber}fe.unshift(re),x.pushUndoStop(),x.executeEdits(this.id,pe,fe),x.pushUndoStop()}}e.JoinLinesAction=B;class W extends T.EditorAction{constructor(){super({id:"editor.action.transpose",label:a.localize(22,null),alias:"Transpose characters around the cursor",precondition:s.EditorContextKeys.writable})}run(G,x){let U=x.getSelections();if(U===null)return;let $=x.getModel();if($===null)return;let V=[];for(let Q=0,ue=U.length;Q<ue;Q++){let pe=U[Q];if(!pe.isEmpty())continue;let fe=pe.getStartPosition(),re=$.getLineMaxColumn(fe.lineNumber);if(fe.column>=re){if(fe.lineNumber===$.getLineCount())continue;let ie=new g.Range(fe.lineNumber,Math.max(1,fe.column-1),fe.lineNumber+1,1),ae=$.getValueInRange(ie).split("").reverse().join("");V.push(new D.ReplaceCommand(new t.Selection(fe.lineNumber,Math.max(1,fe.column-1),fe.lineNumber+1,1),ae))}else{let ie=new g.Range(fe.lineNumber,Math.max(1,fe.column-1),fe.lineNumber,fe.column+1),ae=$.getValueInRange(ie).split("").reverse().join("");V.push(new D.ReplaceCommandThatPreservesSelection(ie,ae,new t.Selection(fe.lineNumber,fe.column+1,fe.lineNumber,fe.column+1)))}}x.pushUndoStop(),x.executeCommands(this.id,V),x.pushUndoStop()}}e.TransposeAction=W;class K extends T.EditorAction{run(G,x){const U=x.getSelections();if(U===null)return;const $=x.getModel();if($===null)return;const V=x.getOption(115),Q=[];for(const ue of U)if(ue.isEmpty()){const pe=ue.getStartPosition(),fe=x.getConfiguredWordAtPosition(pe);if(!fe)continue;const re=new g.Range(pe.lineNumber,fe.startColumn,pe.lineNumber,fe.endColumn),ie=$.getValueInRange(re);Q.push(C.EditOperation.replace(re,this._modifyText(ie,V)))}else{const pe=$.getValueInRange(ue);Q.push(C.EditOperation.replace(ue,this._modifyText(pe,V)))}x.pushUndoStop(),x.executeEdits(this.id,Q),x.pushUndoStop()}}e.AbstractCaseAction=K;class H extends K{constructor(){super({id:"editor.action.transformToUppercase",label:a.localize(23,null),alias:"Transform to Uppercase",precondition:s.EditorContextKeys.writable})}_modifyText(G,x){return G.toLocaleUpperCase()}}e.UpperCaseAction=H;class Y extends K{constructor(){super({id:"editor.action.transformToLowercase",label:a.localize(24,null),alias:"Transform to Lowercase",precondition:s.EditorContextKeys.writable})}_modifyText(G,x){return G.toLocaleLowerCase()}}e.LowerCaseAction=Y;class X{constructor(G,x){this._pattern=G,this._flags=x,this._actual=null,this._evaluated=!1}get(){if(!this._evaluated){this._evaluated=!0;try{this._actual=new RegExp(this._pattern,this._flags)}catch(G){}}return this._actual}isSupported(){return this.get()!==null}}class Z extends K{constructor(){super({id:"editor.action.transformToTitlecase",label:a.localize(25,null),alias:"Transform to Title Case",precondition:s.EditorContextKeys.writable})}_modifyText(G,x){const U=Z.titleBoundary.get();return U?G.toLocaleLowerCase().replace(U,$=>$.toLocaleUpperCase()):G}}e.TitleCaseAction=Z,Z.titleBoundary=new X("(^|[^\\p{L}\\p{N}']|((^|\\P{L})'))\\p{L}","gmu");class se extends K{constructor(){super({id:"editor.action.transformToSnakecase",label:a.localize(26,null),alias:"Transform to Snake Case",precondition:s.EditorContextKeys.writable})}_modifyText(G,x){const U=se.caseBoundary.get(),$=se.singleLetters.get();return!U||!$?G:G.replace(U,"$1_$2").replace($,"$1_$2$3").toLocaleLowerCase()}}e.SnakeCaseAction=se,se.caseBoundary=new X("(\\p{Ll})(\\p{Lu})","gmu"),se.singleLetters=new X("(\\p{Lu}|\\p{N})(\\p{Lu})(\\p{Ll})","gmu"),(0,T.registerEditorAction)(i),(0,T.registerEditorAction)(l),(0,T.registerEditorAction)(h),(0,T.registerEditorAction)(y),(0,T.registerEditorAction)(_),(0,T.registerEditorAction)(v),(0,T.registerEditorAction)(m),(0,T.registerEditorAction)(E),(0,T.registerEditorAction)(I),(0,T.registerEditorAction)(k),(0,T.registerEditorAction)(M),(0,T.registerEditorAction)(P),(0,T.registerEditorAction)(F),(0,T.registerEditorAction)(R),(0,T.registerEditorAction)(O),(0,T.registerEditorAction)(L),(0,T.registerEditorAction)(B),(0,T.registerEditorAction)(W),(0,T.registerEditorAction)(H),(0,T.registerEditorAction)(Y),se.caseBoundary.isSupported()&&se.singleLetters.isSupported()&&(0,T.registerEditorAction)(se),Z.titleBoundary.isSupported()&&(0,T.registerEditorAction)(Z)}),define(J[690],ee([0,1,19,14,23,29,11,2,8,24,16,28,13,3,25,32,18,37,518,15,21,10]),function(j,e,w,N,T,D,S,p,C,n,g,t,s,c,u,d,a,r,o,i,l,h){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.editorLinkedEditingBackground=e.LinkedEditingAction=e.LinkedEditingContribution=e.CONTEXT_ONTYPE_RENAME_INPUT_VISIBLE=void 0,e.CONTEXT_ONTYPE_RENAME_INPUT_VISIBLE=new i.RawContextKey("LinkedEditingInputVisible",!1);const f="linked-editing-decoration";let y=class $t extends p.Disposable{constructor(E,I){super();this._debounceDuration=200,this._localToDispose=this._register(new p.DisposableStore),this._editor=E,this._enabled=!1,this._visibleContextKey=e.CONTEXT_ONTYPE_RENAME_INPUT_VISIBLE.bindTo(I),this._currentDecorations=[],this._languageWordPattern=null,this._currentWordPattern=null,this._ignoreChangeEvent=!1,this._localToDispose=this._register(new p.DisposableStore),this._rangeUpdateTriggerPromise=null,this._rangeSyncTriggerPromise=null,this._currentRequest=null,this._currentRequestPosition=null,this._currentRequestModelVersion=null,this._register(this._editor.onDidChangeModel(()=>this.reinitialize(!0))),this._register(this._editor.onDidChangeConfiguration(k=>{(k.hasChanged(61)||k.hasChanged(81))&&this.reinitialize(!1)})),this._register(a.LinkedEditingRangeProviderRegistry.onDidChange(()=>this.reinitialize(!1))),this._register(this._editor.onDidChangeModelLanguage(()=>this.reinitialize(!0))),this.reinitialize(!0)}static get(E){return E.getContribution($t.ID)}reinitialize(E){const I=this._editor.getModel(),k=I!==null&&(this._editor.getOption(61)||this._editor.getOption(81))&&a.LinkedEditingRangeProviderRegistry.has(I);if(k===this._enabled&&!E||(this._enabled=k,this.clearRanges(),this._localToDispose.clear(),!k||I===null))return;this._languageWordPattern=r.LanguageConfigurationRegistry.getWordDefinition(I.getLanguageId()),this._localToDispose.add(I.onDidChangeLanguageConfiguration(()=>{this._languageWordPattern=r.LanguageConfigurationRegistry.getWordDefinition(I.getLanguageId())}));const M=new N.Delayer(this._debounceDuration),P=()=>{this._rangeUpdateTriggerPromise=M.trigger(()=>this.updateRanges(),this._debounceDuration)},F=new N.Delayer(0),R=A=>{this._rangeSyncTriggerPromise=F.trigger(()=>this._syncRanges(A))};this._localToDispose.add(this._editor.onDidChangeCursorPosition(()=>{P()})),this._localToDispose.add(this._editor.onDidChangeModelContent(A=>{if(!this._ignoreChangeEvent&&this._currentDecorations.length>0){const O=I.getDecorationRange(this._currentDecorations[0]);if(O&&A.changes.every(L=>O.intersectRanges(L.range))){R(this._currentDecorations);return}}P()})),this._localToDispose.add({dispose:()=>{M.cancel(),F.cancel()}}),this.updateRanges()}_syncRanges(E){if(!this._editor.hasModel()||E!==this._currentDecorations||E.length===0)return;const I=this._editor.getModel(),k=I.getDecorationRange(E[0]);if(!k||k.startLineNumber!==k.endLineNumber)return this.clearRanges();const M=I.getValueInRange(k);if(this._currentWordPattern){const F=M.match(this._currentWordPattern);if((F?F[0].length:0)!==M.length)return this.clearRanges()}let P=[];for(let F=1,R=E.length;F<R;F++){const A=I.getDecorationRange(E[F]);if(!!A)if(A.startLineNumber!==A.endLineNumber)P.push({range:A,text:M});else{let O=I.getValueInRange(A),L=M,B=A.startColumn,W=A.endColumn;const K=C.commonPrefixLength(O,L);B+=K,O=O.substr(K),L=L.substr(K);const H=C.commonSuffixLength(O,L);W-=H,O=O.substr(0,O.length-H),L=L.substr(0,L.length-H),(B!==W||L.length!==0)&&P.push({range:new c.Range(A.startLineNumber,B,A.endLineNumber,W),text:L})}}if(P.length!==0)try{this._editor.popUndoStop(),this._ignoreChangeEvent=!0;const F=this._editor._getViewModel().getPrevEditOperationType();this._editor.executeEdits("linkedEditing",P),this._editor._getViewModel().setPrevEditOperationType(F)}finally{this._ignoreChangeEvent=!1}}dispose(){this.clearRanges(),super.dispose()}clearRanges(){this._visibleContextKey.set(!1),this._currentDecorations=this._editor.deltaDecorations(this._currentDecorations,[]),this._currentRequest&&(this._currentRequest.cancel(),this._currentRequest=null,this._currentRequestPosition=null)}updateRanges(E=!1){return Re(this,void 0,void 0,function*(){if(!this._editor.hasModel()){this.clearRanges();return}const I=this._editor.getPosition();if(!this._enabled&&!E||this._editor.getSelections().length>1){this.clearRanges();return}const k=this._editor.getModel(),M=k.getVersionId();if(this._currentRequestPosition&&this._currentRequestModelVersion===M){if(I.equals(this._currentRequestPosition))return;if(this._currentDecorations&&this._currentDecorations.length>0){const F=k.getDecorationRange(this._currentDecorations[0]);if(F&&F.containsPosition(I))return}}this._currentRequestPosition=I,this._currentRequestModelVersion=M;const P=(0,N.createCancelablePromise)(F=>Re(this,void 0,void 0,function*(){try{const R=yield v(k,I,F);if(P!==this._currentRequest||(this._currentRequest=null,M!==k.getVersionId()))return;let A=[];(R==null?void 0:R.ranges)&&(A=R.ranges),this._currentWordPattern=(R==null?void 0:R.wordPattern)||this._languageWordPattern;let O=!1;for(let B=0,W=A.length;B<W;B++)if(c.Range.containsPosition(A[B],I)){if(O=!0,B!==0){const K=A[B];A.splice(B,1),A.unshift(K)}break}if(!O){this.clearRanges();return}const L=A.map(B=>({range:B,options:$t.DECORATION}));this._visibleContextKey.set(!0),this._currentDecorations=this._editor.deltaDecorations(this._currentDecorations,L)}catch(R){(0,S.isPromiseCanceledError)(R)||(0,S.onUnexpectedError)(R),(this._currentRequest===P||!this._currentRequest)&&this.clearRanges()}}));return this._currentRequest=P,P})}};y.ID="editor.contrib.linkedEditing",y.DECORATION=d.ModelDecorationOptions.register({description:"linked-editing",stickiness:0,className:f}),y=Fe([Ce(1,i.IContextKeyService)],y),e.LinkedEditingContribution=y;class _ extends g.EditorAction{constructor(){super({id:"editor.action.linkedEditing",label:o.localize(0,null),alias:"Start Linked Editing",precondition:i.ContextKeyExpr.and(u.EditorContextKeys.writable,u.EditorContextKeys.hasRenameProvider),kbOpts:{kbExpr:u.EditorContextKeys.editorTextFocus,primary:2048|1024|60,weight:100}})}runCommand(E,I){const k=E.get(t.ICodeEditorService),[M,P]=Array.isArray(I)&&I||[void 0,void 0];return n.URI.isUri(M)&&s.Position.isIPosition(P)?k.openCodeEditor({resource:M},k.getActiveCodeEditor()).then(F=>{!F||(F.setPosition(P),F.invokeWithinContext(R=>(this.reportTelemetry(R,F),this.run(R,F))))},S.onUnexpectedError):super.runCommand(E,I)}run(E,I){const k=y.get(I);return k?Promise.resolve(k.updateRanges(!0)):Promise.resolve()}}e.LinkedEditingAction=_;const b=g.EditorCommand.bindToContribution(y.get);(0,g.registerEditorCommand)(new b({id:"cancelLinkedEditingInput",precondition:e.CONTEXT_ONTYPE_RENAME_INPUT_VISIBLE,handler:m=>m.clearRanges(),kbOpts:{kbExpr:u.EditorContextKeys.editorTextFocus,weight:100+99,primary:9,secondary:[1024|9]}}));function v(m,E,I){const k=a.LinkedEditingRangeProviderRegistry.ordered(m);return(0,N.first)(k.map(M=>()=>Re(this,void 0,void 0,function*(){try{return yield M.provideLinkedEditingRanges(m,E,I)}catch(P){(0,S.onUnexpectedExternalError)(P);return}})),M=>!!M&&w.isNonEmptyArray(M==null?void 0:M.ranges))}e.editorLinkedEditingBackground=(0,l.registerColor)("editor.linkedEditingBackground",{dark:D.Color.fromHex("#f00").transparent(.3),light:D.Color.fromHex("#f00").transparent(.3),hc:D.Color.fromHex("#f00").transparent(.3)},o.localize(1,null)),(0,h.registerThemingParticipant)((m,E)=>{const I=m.getColor(e.editorLinkedEditingBackground);I&&E.addRule(`.monaco-editor .${f} { background: ${I}; border-left-color: ${I}; }`)}),(0,g.registerModelAndPositionCommand)("_executeLinkedEditingProvider",(m,E)=>v(m,E,T.CancellationToken.None)),(0,g.registerEditorContribution)(y.ID,y),(0,g.registerEditorAction)(_)}),define(J[691],ee([0,1,14,23,11,69,2,48,17,44,24,16,32,18,238,567,519,36,57,21,10,366]),function(j,e,w,N,T,D,S,p,C,n,g,t,s,c,u,d,a,r,o,i,l){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LinkDetector=void 0;function h(v,m){const E=v.url&&/^command:/i.test(v.url.toString()),I=v.tooltip?v.tooltip:E?a.localize(0,null):a.localize(1,null),k=m?C.isMacintosh?a.localize(2,null):a.localize(3,null):C.isMacintosh?a.localize(4,null):a.localize(5,null);if(v.url){let M="";if(/^command:/i.test(v.url.toString())){const F=v.url.toString().match(/^command:([^?#]+)/);if(F){const R=F[1];M=` "${a.localize(6,null,R)}"`}}return new D.MarkdownString("",!0).appendMarkdown(`[${I}](${v.url.toString(!0).replace(/ /g,"%20")}${M}) (${k})`)}else return new D.MarkdownString().appendText(`${I} (${k})`)}const f={general:s.ModelDecorationOptions.register({description:"detected-link",stickiness:1,collapseOnReplaceEdit:!0,inlineClassName:"detected-link"}),active:s.ModelDecorationOptions.register({description:"detected-link-active",stickiness:1,collapseOnReplaceEdit:!0,inlineClassName:"detected-link-active"})};class y{constructor(m,E){this.link=m,this.decorationId=E}static decoration(m,E){return{range:m.range,options:y._getOptions(m,E,!1)}}static _getOptions(m,E,I){const k=Object.assign({},I?f.active:f.general);return k.hoverMessage=h(m,E),k}activate(m,E){m.changeDecorationOptions(this.decorationId,y._getOptions(this.link,E,!0))}deactivate(m,E){m.changeDecorationOptions(this.decorationId,y._getOptions(this.link,E,!1))}}let _=class jt{constructor(m,E,I){this.listenersToRemove=new S.DisposableStore,this.editor=m,this.openerService=E,this.notificationService=I;let k=new u.ClickLinkGesture(m);this.listenersToRemove.add(k),this.listenersToRemove.add(k.onMouseMoveOrRelevantKeyDown(([M,P])=>{this._onEditorMouseMove(M,P)})),this.listenersToRemove.add(k.onExecute(M=>{this.onEditorMouseUp(M)})),this.listenersToRemove.add(k.onCancel(M=>{this.cleanUpActiveLinkDecoration()})),this.enabled=m.getOption(62),this.listenersToRemove.add(m.onDidChangeConfiguration(M=>{const P=m.getOption(62);this.enabled!==P&&(this.enabled=P,this.updateDecorations([]),this.stop(),this.beginCompute())})),this.listenersToRemove.add(m.onDidChangeModelContent(M=>this.onChange())),this.listenersToRemove.add(m.onDidChangeModel(M=>this.onModelChanged())),this.listenersToRemove.add(m.onDidChangeModelLanguage(M=>this.onModelModeChanged())),this.listenersToRemove.add(c.LinkProviderRegistry.onDidChange(M=>this.onModelModeChanged())),this.timeout=new w.TimeoutTimer,this.computePromise=null,this.activeLinksList=null,this.currentOccurrences={},this.activeLinkDecorationId=null,this.beginCompute()}static get(m){return m.getContribution(jt.ID)}onModelChanged(){this.currentOccurrences={},this.activeLinkDecorationId=null,this.stop(),this.beginCompute()}onModelModeChanged(){this.stop(),this.beginCompute()}onChange(){this.timeout.setIfNotSet(()=>this.beginCompute(),jt.RECOMPUTE_TIME)}beginCompute(){return Re(this,void 0,void 0,function*(){if(!this.editor.hasModel()||!this.enabled)return;const m=this.editor.getModel();if(!!c.LinkProviderRegistry.has(m)){this.activeLinksList&&(this.activeLinksList.dispose(),this.activeLinksList=null),this.computePromise=w.createCancelablePromise(E=>(0,d.getLinks)(m,E));try{this.activeLinksList=yield this.computePromise,this.updateDecorations(this.activeLinksList.links)}catch(E){(0,T.onUnexpectedError)(E)}finally{this.computePromise=null}}})}updateDecorations(m){const E=this.editor.getOption(69)==="altKey";let I=[],k=Object.keys(this.currentOccurrences);for(let F=0,R=k.length;F<R;F++){let A=k[F],O=this.currentOccurrences[A];I.push(O.decorationId)}let M=[];if(m)for(const F of m)M.push(y.decoration(F,E));let P=this.editor.deltaDecorations(I,M);this.currentOccurrences={},this.activeLinkDecorationId=null;for(let F=0,R=P.length;F<R;F++){let A=new y(m[F],P[F]);this.currentOccurrences[A.decorationId]=A}}_onEditorMouseMove(m,E){const I=this.editor.getOption(69)==="altKey";if(this.isEnabled(m,E)){this.cleanUpActiveLinkDecoration();const k=this.getLinkOccurrence(m.target.position);k&&this.editor.changeDecorations(M=>{k.activate(M,I),this.activeLinkDecorationId=k.decorationId})}else this.cleanUpActiveLinkDecoration()}cleanUpActiveLinkDecoration(){const m=this.editor.getOption(69)==="altKey";if(this.activeLinkDecorationId){const E=this.currentOccurrences[this.activeLinkDecorationId];E&&this.editor.changeDecorations(I=>{E.deactivate(I,m)}),this.activeLinkDecorationId=null}}onEditorMouseUp(m){if(!this.isEnabled(m))return;const E=this.getLinkOccurrence(m.target.position);!E||this.openLinkOccurrence(E,m.hasSideBySideModifier,!0)}openLinkOccurrence(m,E,I=!1){if(!this.openerService)return;const{link:k}=m;k.resolve(N.CancellationToken.None).then(M=>{if(typeof M=="string"&&this.editor.hasModel()){const P=this.editor.getModel().uri;if(P.scheme===p.Schemas.file&&M.startsWith(`${p.Schemas.file}:`)){const F=g.URI.parse(M);if(F.scheme===p.Schemas.file){const R=n.originalFSPath(F);let A=null;R.startsWith("/./")?A=`.${R.substr(1)}`:R.startsWith("//./")&&(A=`.${R.substr(2)}`),A&&(M=n.joinPath(P,A))}}}return this.openerService.open(M,{openToSide:E,fromUserGesture:I,allowContributedOpeners:!0,allowCommands:!0})},M=>{const P=M instanceof Error?M.message:M;P==="invalid"?this.notificationService.warn(a.localize(7,null,k.url.toString())):P==="missing"?this.notificationService.warn(a.localize(8,null)):(0,T.onUnexpectedError)(M)})}getLinkOccurrence(m){if(!this.editor.hasModel()||!m)return null;const E=this.editor.getModel().getDecorationsInRange({startLineNumber:m.lineNumber,startColumn:m.column,endLineNumber:m.lineNumber,endColumn:m.column},0,!0);for(const I of E){const k=this.currentOccurrences[I.id];if(k)return k}return null}isEnabled(m,E){return Boolean(m.target.type===6&&(m.hasTriggerModifier||E&&E.keyCodeIsTriggerKey))}stop(){var m;this.timeout.cancel(),this.activeLinksList&&((m=this.activeLinksList)===null||m===void 0||m.dispose(),this.activeLinksList=null),this.computePromise&&(this.computePromise.cancel(),this.computePromise=null)}dispose(){this.listenersToRemove.dispose(),this.stop(),this.timeout.dispose()}};_.ID="editor.linkDetector",_.RECOMPUTE_TIME=1e3,_=Fe([Ce(1,o.IOpenerService),Ce(2,r.INotificationService)],_),e.LinkDetector=_;class b extends t.EditorAction{constructor(){super({id:"editor.action.openLink",label:a.localize(9,null),alias:"Open Link",precondition:void 0})}run(m,E){let I=_.get(E);if(!I||!E.hasModel())return;let k=E.getSelections();for(let M of k){let P=I.getLinkOccurrence(M.getEndPosition());P&&I.openLinkOccurrence(P,!1)}}}(0,t.registerEditorContribution)(_.ID,_),(0,t.registerEditorAction)(b),(0,l.registerThemingParticipant)((v,m)=>{const E=v.getColor(i.editorActiveLinkForeground);E&&m.addRule(`.monaco-editor .detected-link-active { color: ${E} !important; }`)})}),define(J[692],ee([0,1,45,14,55,2,16,278,3,22,25,49,32,18,284,521,35,15,21,10]),function(j,e,w,N,T,D,S,p,C,n,g,t,s,c,u,d,a,r,o,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SelectionHighlighter=e.CompatChangeAll=e.SelectHighlightsAction=e.MoveSelectionToPreviousFindMatchAction=e.MoveSelectionToNextFindMatchAction=e.AddSelectionToPreviousFindMatchAction=e.AddSelectionToNextFindMatchAction=e.MultiCursorSelectionControllerAction=e.MultiCursorSelectionController=e.MultiCursorSession=e.MultiCursorSessionResult=e.InsertCursorBelow=e.InsertCursorAbove=void 0;function l(K,H){const Y=H.filter(X=>!K.find(Z=>Z.equals(X)));if(Y.length>=1){const X=Y.map(se=>`line ${se.viewState.position.lineNumber} column ${se.viewState.position.column}`).join(", "),Z=Y.length===1?d.localize(0,null,X):d.localize(1,null,X);(0,w.status)(Z)}}class h extends S.EditorAction{constructor(){super({id:"editor.action.insertCursorAbove",label:d.localize(2,null),alias:"Add Cursor Above",precondition:void 0,kbOpts:{kbExpr:g.EditorContextKeys.editorTextFocus,primary:2048|512|16,linux:{primary:1024|512|16,secondary:[2048|1024|16]},weight:100},menuOpts:{menuId:a.MenuId.MenubarSelectionMenu,group:"3_multi",title:d.localize(3,null),order:2}})}run(H,Y,X){if(!Y.hasModel())return;let Z=!0;X&&X.logicalLine===!1&&(Z=!1);const se=Y._getViewModel();if(se.cursorConfig.readOnly)return;se.pushStackElement();const oe=se.getCursorStates();se.setCursorStates(X.source,3,p.CursorMoveCommands.addCursorUp(se,oe,Z)),se.revealTopMostCursor(X.source),l(oe,se.getCursorStates())}}e.InsertCursorAbove=h;class f extends S.EditorAction{constructor(){super({id:"editor.action.insertCursorBelow",label:d.localize(4,null),alias:"Add Cursor Below",precondition:void 0,kbOpts:{kbExpr:g.EditorContextKeys.editorTextFocus,primary:2048|512|18,linux:{primary:1024|512|18,secondary:[2048|1024|18]},weight:100},menuOpts:{menuId:a.MenuId.MenubarSelectionMenu,group:"3_multi",title:d.localize(5,null),order:3}})}run(H,Y,X){if(!Y.hasModel())return;let Z=!0;X&&X.logicalLine===!1&&(Z=!1);const se=Y._getViewModel();if(se.cursorConfig.readOnly)return;se.pushStackElement();const oe=se.getCursorStates();se.setCursorStates(X.source,3,p.CursorMoveCommands.addCursorDown(se,oe,Z)),se.revealBottomMostCursor(X.source),l(oe,se.getCursorStates())}}e.InsertCursorBelow=f;class y extends S.EditorAction{constructor(){super({id:"editor.action.insertCursorAtEndOfEachLineSelected",label:d.localize(6,null),alias:"Add Cursors to Line Ends",precondition:void 0,kbOpts:{kbExpr:g.EditorContextKeys.editorTextFocus,primary:1024|512|39,weight:100},menuOpts:{menuId:a.MenuId.MenubarSelectionMenu,group:"3_multi",title:d.localize(7,null),order:4}})}getCursorsForSelection(H,Y,X){if(!H.isEmpty()){for(let Z=H.startLineNumber;Z<H.endLineNumber;Z++){let se=Y.getLineMaxColumn(Z);X.push(new n.Selection(Z,se,Z,se))}H.endColumn>1&&X.push(new n.Selection(H.endLineNumber,H.endColumn,H.endLineNumber,H.endColumn))}}run(H,Y){if(!Y.hasModel())return;const X=Y.getModel(),Z=Y.getSelections(),se=Y._getViewModel(),oe=se.getCursorStates();let G=[];Z.forEach(x=>this.getCursorsForSelection(x,X,G)),G.length>0&&Y.setSelections(G),l(oe,se.getCursorStates())}}class _ extends S.EditorAction{constructor(){super({id:"editor.action.addCursorsToBottom",label:d.localize(8,null),alias:"Add Cursors To Bottom",precondition:void 0})}run(H,Y){if(!Y.hasModel())return;const X=Y.getSelections(),Z=Y.getModel().getLineCount();let se=[];for(let x=X[0].startLineNumber;x<=Z;x++)se.push(new n.Selection(x,X[0].startColumn,x,X[0].endColumn));const oe=Y._getViewModel(),G=oe.getCursorStates();se.length>0&&Y.setSelections(se),l(G,oe.getCursorStates())}}class b extends S.EditorAction{constructor(){super({id:"editor.action.addCursorsToTop",label:d.localize(9,null),alias:"Add Cursors To Top",precondition:void 0})}run(H,Y){if(!Y.hasModel())return;const X=Y.getSelections();let Z=[];for(let G=X[0].startLineNumber;G>=1;G--)Z.push(new n.Selection(G,X[0].startColumn,G,X[0].endColumn));const se=Y._getViewModel(),oe=se.getCursorStates();Z.length>0&&Y.setSelections(Z),l(oe,se.getCursorStates())}}class v{constructor(H,Y,X){this.selections=H,this.revealRange=Y,this.revealScrollType=X}}e.MultiCursorSessionResult=v;class m{constructor(H,Y,X,Z,se,oe,G){this._editor=H,this.findController=Y,this.isDisconnectedFromFindController=X,this.searchText=Z,this.wholeWord=se,this.matchCase=oe,this.currentMatch=G}static create(H,Y){if(!H.hasModel())return null;const X=Y.getState();if(!H.hasTextFocus()&&X.isRevealed&&X.searchString.length>0)return new m(H,Y,!1,X.searchString,X.wholeWord,X.matchCase,null);let Z=!1,se,oe;const G=H.getSelections();G.length===1&&G[0].isEmpty()?(Z=!0,se=!0,oe=!0):(se=X.wholeWord,oe=X.matchCase);const x=H.getSelection();let U,$=null;if(x.isEmpty()){const V=H.getConfiguredWordAtPosition(x.getStartPosition());if(!V)return null;U=V.word,$=new n.Selection(x.startLineNumber,V.startColumn,x.startLineNumber,V.endColumn)}else U=H.getModel().getValueInRange(x).replace(/\r\n/g,`
`);return new m(H,Y,Z,U,se,oe,$)}addSelectionToNextFindMatch(){if(!this._editor.hasModel())return null;const H=this._getNextMatch();if(!H)return null;const Y=this._editor.getSelections();return new v(Y.concat(H),H,0)}moveSelectionToNextFindMatch(){if(!this._editor.hasModel())return null;const H=this._getNextMatch();if(!H)return null;const Y=this._editor.getSelections();return new v(Y.slice(0,Y.length-1).concat(H),H,0)}_getNextMatch(){if(!this._editor.hasModel())return null;if(this.currentMatch){const Z=this.currentMatch;return this.currentMatch=null,Z}this.findController.highlightFindOptions();const H=this._editor.getSelections(),Y=H[H.length-1],X=this._editor.getModel().findNextMatch(this.searchText,Y.getEndPosition(),!1,this.matchCase,this.wholeWord?this._editor.getOption(115):null,!1);return X?new n.Selection(X.range.startLineNumber,X.range.startColumn,X.range.endLineNumber,X.range.endColumn):null}addSelectionToPreviousFindMatch(){if(!this._editor.hasModel())return null;const H=this._getPreviousMatch();if(!H)return null;const Y=this._editor.getSelections();return new v(Y.concat(H),H,0)}moveSelectionToPreviousFindMatch(){if(!this._editor.hasModel())return null;const H=this._getPreviousMatch();if(!H)return null;const Y=this._editor.getSelections();return new v(Y.slice(0,Y.length-1).concat(H),H,0)}_getPreviousMatch(){if(!this._editor.hasModel())return null;if(this.currentMatch){const Z=this.currentMatch;return this.currentMatch=null,Z}this.findController.highlightFindOptions();const H=this._editor.getSelections(),Y=H[H.length-1],X=this._editor.getModel().findPreviousMatch(this.searchText,Y.getStartPosition(),!1,this.matchCase,this.wholeWord?this._editor.getOption(115):null,!1);return X?new n.Selection(X.range.startLineNumber,X.range.startColumn,X.range.endLineNumber,X.range.endColumn):null}selectAll(){return this._editor.hasModel()?(this.findController.highlightFindOptions(),this._editor.getModel().findMatches(this.searchText,!0,!1,this.matchCase,this.wholeWord?this._editor.getOption(115):null,!1,1073741824)):[]}}e.MultiCursorSession=m;class E extends D.Disposable{constructor(H){super();this._sessionDispose=this._register(new D.DisposableStore),this._editor=H,this._ignoreSelectionChange=!1,this._session=null}static get(H){return H.getContribution(E.ID)}dispose(){this._endSession(),super.dispose()}_beginSessionIfNeeded(H){if(!this._session){const Y=m.create(this._editor,H);if(!Y)return;this._session=Y;const X={searchString:this._session.searchText};this._session.isDisconnectedFromFindController&&(X.wholeWordOverride=1,X.matchCaseOverride=1,X.isRegexOverride=2),H.getState().change(X,!1),this._sessionDispose.add(this._editor.onDidChangeCursorSelection(Z=>{this._ignoreSelectionChange||this._endSession()})),this._sessionDispose.add(this._editor.onDidBlurEditorText(()=>{this._endSession()})),this._sessionDispose.add(H.getState().onFindReplaceStateChange(Z=>{(Z.matchCase||Z.wholeWord)&&this._endSession()}))}}_endSession(){if(this._sessionDispose.clear(),this._session&&this._session.isDisconnectedFromFindController){const H={wholeWordOverride:0,matchCaseOverride:0,isRegexOverride:0};this._session.findController.getState().change(H,!1)}this._session=null}_setSelections(H){this._ignoreSelectionChange=!0,this._editor.setSelections(H),this._ignoreSelectionChange=!1}_expandEmptyToWord(H,Y){if(!Y.isEmpty())return Y;const X=this._editor.getConfiguredWordAtPosition(Y.getStartPosition());return X?new n.Selection(Y.startLineNumber,X.startColumn,Y.startLineNumber,X.endColumn):Y}_applySessionResult(H){!H||(this._setSelections(H.selections),H.revealRange&&this._editor.revealRangeInCenterIfOutsideViewport(H.revealRange,H.revealScrollType))}getSession(H){return this._session}addSelectionToNextFindMatch(H){if(!!this._editor.hasModel()){if(!this._session){const Y=this._editor.getSelections();if(Y.length>1){const Z=H.getState().matchCase;if(!B(this._editor.getModel(),Y,Z)){const oe=this._editor.getModel();let G=[];for(let x=0,U=Y.length;x<U;x++)G[x]=this._expandEmptyToWord(oe,Y[x]);this._editor.setSelections(G);return}}}this._beginSessionIfNeeded(H),this._session&&this._applySessionResult(this._session.addSelectionToNextFindMatch())}}addSelectionToPreviousFindMatch(H){this._beginSessionIfNeeded(H),this._session&&this._applySessionResult(this._session.addSelectionToPreviousFindMatch())}moveSelectionToNextFindMatch(H){this._beginSessionIfNeeded(H),this._session&&this._applySessionResult(this._session.moveSelectionToNextFindMatch())}moveSelectionToPreviousFindMatch(H){this._beginSessionIfNeeded(H),this._session&&this._applySessionResult(this._session.moveSelectionToPreviousFindMatch())}selectAll(H){if(!this._editor.hasModel())return;let Y=null;const X=H.getState();if(X.isRevealed&&X.searchString.length>0&&X.isRegex)Y=this._editor.getModel().findMatches(X.searchString,!0,X.isRegex,X.matchCase,X.wholeWord?this._editor.getOption(115):null,!1,1073741824);else{if(this._beginSessionIfNeeded(H),!this._session)return;Y=this._session.selectAll()}if(X.searchScope){const Z=X.searchScope;let se=[];Y.forEach(oe=>{Z.forEach(G=>{oe.range.endLineNumber<=G.endLineNumber&&oe.range.startLineNumber>=G.startLineNumber&&se.push(oe)})}),Y=se}if(Y.length>0){const Z=this._editor.getSelection();for(let se=0,oe=Y.length;se<oe;se++){const G=Y[se];if(G.range.intersectRanges(Z)){Y[se]=Y[0],Y[0]=G;break}}this._setSelections(Y.map(se=>new n.Selection(se.range.startLineNumber,se.range.startColumn,se.range.endLineNumber,se.range.endColumn)))}}}e.MultiCursorSelectionController=E,E.ID="editor.contrib.multiCursorController";class I extends S.EditorAction{run(H,Y){const X=E.get(Y);if(!X)return;const Z=u.CommonFindController.get(Y);if(!Z)return;const se=Y._getViewModel();if(se){const oe=se.getCursorStates();this._run(X,Z),l(oe,se.getCursorStates())}}}e.MultiCursorSelectionControllerAction=I;class k extends I{constructor(){super({id:"editor.action.addSelectionToNextFindMatch",label:d.localize(10,null),alias:"Add Selection To Next Find Match",precondition:void 0,kbOpts:{kbExpr:g.EditorContextKeys.focus,primary:2048|34,weight:100},menuOpts:{menuId:a.MenuId.MenubarSelectionMenu,group:"3_multi",title:d.localize(11,null),order:5}})}_run(H,Y){H.addSelectionToNextFindMatch(Y)}}e.AddSelectionToNextFindMatchAction=k;class M extends I{constructor(){super({id:"editor.action.addSelectionToPreviousFindMatch",label:d.localize(12,null),alias:"Add Selection To Previous Find Match",precondition:void 0,menuOpts:{menuId:a.MenuId.MenubarSelectionMenu,group:"3_multi",title:d.localize(13,null),order:6}})}_run(H,Y){H.addSelectionToPreviousFindMatch(Y)}}e.AddSelectionToPreviousFindMatchAction=M;class P extends I{constructor(){super({id:"editor.action.moveSelectionToNextFindMatch",label:d.localize(14,null),alias:"Move Last Selection To Next Find Match",precondition:void 0,kbOpts:{kbExpr:g.EditorContextKeys.focus,primary:(0,T.KeyChord)(2048|41,2048|34),weight:100}})}_run(H,Y){H.moveSelectionToNextFindMatch(Y)}}e.MoveSelectionToNextFindMatchAction=P;class F extends I{constructor(){super({id:"editor.action.moveSelectionToPreviousFindMatch",label:d.localize(15,null),alias:"Move Last Selection To Previous Find Match",precondition:void 0})}_run(H,Y){H.moveSelectionToPreviousFindMatch(Y)}}e.MoveSelectionToPreviousFindMatchAction=F;class R extends I{constructor(){super({id:"editor.action.selectHighlights",label:d.localize(16,null),alias:"Select All Occurrences of Find Match",precondition:void 0,kbOpts:{kbExpr:g.EditorContextKeys.focus,primary:2048|1024|42,weight:100},menuOpts:{menuId:a.MenuId.MenubarSelectionMenu,group:"3_multi",title:d.localize(17,null),order:7}})}_run(H,Y){H.selectAll(Y)}}e.SelectHighlightsAction=R;class A extends I{constructor(){super({id:"editor.action.changeAll",label:d.localize(18,null),alias:"Change All Occurrences",precondition:r.ContextKeyExpr.and(g.EditorContextKeys.writable,g.EditorContextKeys.editorTextFocus),kbOpts:{kbExpr:g.EditorContextKeys.editorTextFocus,primary:2048|60,weight:100},contextMenuOpts:{group:"1_modification",order:1.2}})}_run(H,Y){H.selectAll(Y)}}e.CompatChangeAll=A;class O{constructor(H,Y,X,Z){this.searchText=H,this.matchCase=Y,this.wordSeparators=X,this.modelVersionId=Z}static softEquals(H,Y){return!H&&!Y?!0:!H||!Y?!1:H.searchText===Y.searchText&&H.matchCase===Y.matchCase&&H.wordSeparators===Y.wordSeparators&&H.modelVersionId===Y.modelVersionId}}class L extends D.Disposable{constructor(H){super();this.editor=H,this._isEnabled=H.getOption(96),this.decorations=[],this.updateSoon=this._register(new N.RunOnceScheduler(()=>this._update(),300)),this.state=null,this._register(H.onDidChangeConfiguration(Y=>{this._isEnabled=H.getOption(96)})),this._register(H.onDidChangeCursorSelection(Y=>{!this._isEnabled||(Y.selection.isEmpty()?Y.reason===3?(this.state&&this._setState(null),this.updateSoon.schedule()):this._setState(null):this._update())})),this._register(H.onDidChangeModel(Y=>{this._setState(null)})),this._register(H.onDidChangeModelContent(Y=>{this._isEnabled&&this.updateSoon.schedule()})),this._register(u.CommonFindController.get(H).getState().onFindReplaceStateChange(Y=>{this._update()}))}_update(){this._setState(L._createState(this._isEnabled,this.editor))}static _createState(H,Y){if(!H||!Y.hasModel())return null;const X=Y.getSelection();if(X.startLineNumber!==X.endLineNumber)return null;const Z=E.get(Y);if(!Z)return null;const se=u.CommonFindController.get(Y);if(!se)return null;let oe=Z.getSession(se);if(!oe){const U=Y.getSelections();if(U.length>1){const V=se.getState().matchCase;if(!B(Y.getModel(),U,V))return null}oe=m.create(Y,se)}if(!oe||oe.currentMatch||/^[ \t]+$/.test(oe.searchText)||oe.searchText.length>200)return null;const G=se.getState(),x=G.matchCase;if(G.isRevealed){let U=G.searchString;x||(U=U.toLowerCase());let $=oe.searchText;if(x||($=$.toLowerCase()),U===$&&oe.matchCase===G.matchCase&&oe.wholeWord===G.wholeWord&&!G.isRegex)return null}return new O(oe.searchText,oe.matchCase,oe.wholeWord?Y.getOption(115):null,Y.getModel().getVersionId())}_setState(H){if(O.softEquals(this.state,H)){this.state=H;return}if(this.state=H,!this.state){this.decorations=this.editor.deltaDecorations(this.decorations,[]);return}if(!this.editor.hasModel())return;const Y=this.editor.getModel();if(Y.isTooLargeForTokenization())return;const X=c.DocumentHighlightProviderRegistry.has(Y)&&this.editor.getOption(71);let Z=Y.findMatches(this.state.searchText,!0,!1,this.state.matchCase,this.state.wordSeparators,!1).map(x=>x.range);Z.sort(C.Range.compareRangesUsingStarts);let se=this.editor.getSelections();se.sort(C.Range.compareRangesUsingStarts);let oe=[];for(let x=0,U=0,$=Z.length,V=se.length;x<$;){const Q=Z[x];if(U>=V)oe.push(Q),x++;else{const ue=C.Range.compareRangesUsingStarts(Q,se[U]);ue<0?((se[U].isEmpty()||!C.Range.areIntersecting(Q,se[U]))&&oe.push(Q),x++):(ue>0||x++,U++)}}const G=oe.map(x=>({range:x,options:X?L._SELECTION_HIGHLIGHT:L._SELECTION_HIGHLIGHT_OVERVIEW}));this.decorations=this.editor.deltaDecorations(this.decorations,G)}dispose(){this._setState(null),super.dispose()}}e.SelectionHighlighter=L,L.ID="editor.contrib.selectionHighlighter",L._SELECTION_HIGHLIGHT_OVERVIEW=s.ModelDecorationOptions.register({description:"selection-highlight-overview",stickiness:1,className:"selectionHighlight",minimap:{color:(0,i.themeColorFromId)(o.minimapSelectionOccurrenceHighlight),position:t.MinimapPosition.Inline},overviewRuler:{color:(0,i.themeColorFromId)(o.overviewRulerSelectionHighlightForeground),position:t.OverviewRulerLane.Center}}),L._SELECTION_HIGHLIGHT=s.ModelDecorationOptions.register({description:"selection-highlight",stickiness:1,className:"selectionHighlight"});function B(K,H,Y){const X=W(K,H[0],!Y);for(let Z=1,se=H.length;Z<se;Z++){const oe=H[Z];if(oe.isEmpty())return!1;const G=W(K,oe,!Y);if(X!==G)return!1}return!0}function W(K,H,Y){const X=K.getValueInRange(H);return Y?X.toLowerCase():X}(0,S.registerEditorContribution)(E.ID,E),(0,S.registerEditorContribution)(L.ID,L),(0,S.registerEditorAction)(h),(0,S.registerEditorAction)(f),(0,S.registerEditorAction)(y),(0,S.registerEditorAction)(k),(0,S.registerEditorAction)(M),(0,S.registerEditorAction)(P),(0,S.registerEditorAction)(F),(0,S.registerEditorAction)(R),(0,S.registerEditorAction)(A),(0,S.registerEditorAction)(_),(0,S.registerEditorAction)(b)}),define(J[693],ee([0,1,7,111,14,11,4,2,106,8,158,646,534,15,9,73,21,128,10,245,91,264,656,136,372,271]),function(j,e,w,N,T,D,S,p,C,n,g,t,s,c,u,d,a,r,o,i,l,h,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SuggestContentWidget=e.SuggestWidget=e.editorSuggestWidgetHighlightFocusForeground=e.editorSuggestWidgetHighlightForeground=e.editorSuggestWidgetSelectedBackground=e.editorSuggestWidgetSelectedIconForeground=e.editorSuggestWidgetSelectedForeground=e.editorSuggestWidgetForeground=e.editorSuggestWidgetBorder=e.editorSuggestWidgetBackground=void 0,e.editorSuggestWidgetBackground=(0,a.registerColor)("editorSuggestWidget.background",{dark:a.editorWidgetBackground,light:a.editorWidgetBackground,hc:a.editorWidgetBackground},s.localize(0,null)),e.editorSuggestWidgetBorder=(0,a.registerColor)("editorSuggestWidget.border",{dark:a.editorWidgetBorder,light:a.editorWidgetBorder,hc:a.editorWidgetBorder},s.localize(1,null)),e.editorSuggestWidgetForeground=(0,a.registerColor)("editorSuggestWidget.foreground",{dark:a.editorForeground,light:a.editorForeground,hc:a.editorForeground},s.localize(2,null)),e.editorSuggestWidgetSelectedForeground=(0,a.registerColor)("editorSuggestWidget.selectedForeground",{dark:a.quickInputListFocusForeground,light:a.quickInputListFocusForeground,hc:a.quickInputListFocusForeground},s.localize(3,null)),e.editorSuggestWidgetSelectedIconForeground=(0,a.registerColor)("editorSuggestWidget.selectedIconForeground",{dark:a.quickInputListFocusIconForeground,light:a.quickInputListFocusIconForeground,hc:a.quickInputListFocusIconForeground},s.localize(4,null)),e.editorSuggestWidgetSelectedBackground=(0,a.registerColor)("editorSuggestWidget.selectedBackground",{dark:a.quickInputListFocusBackground,light:a.quickInputListFocusBackground,hc:a.quickInputListFocusBackground},s.localize(5,null)),e.editorSuggestWidgetHighlightForeground=(0,a.registerColor)("editorSuggestWidget.highlightForeground",{dark:a.listHighlightForeground,light:a.listHighlightForeground,hc:a.listHighlightForeground},s.localize(6,null)),e.editorSuggestWidgetHighlightFocusForeground=(0,a.registerColor)("editorSuggestWidget.focusHighlightForeground",{dark:a.listFocusHighlightForeground,light:a.listFocusHighlightForeground,hc:a.listFocusHighlightForeground},s.localize(7,null));class y{constructor(m,E){this._service=m,this._key=`suggestWidget.size/${E.getEditorType()}/${E instanceof g.EmbeddedCodeEditorWidget}`}restore(){var m;const E=(m=this._service.get(this._key,0))!==null&&m!==void 0?m:"";try{const I=JSON.parse(E);if(w.Dimension.is(I))return w.Dimension.lift(I)}catch(I){}}store(m){this._service.store(this._key,JSON.stringify(m),0,1)}reset(){this._service.remove(this._key,0)}}let _=class Gt{constructor(m,E,I,k,M){this.editor=m,this._storageService=E,this._state=0,this._isAuto=!1,this._ignoreFocusEvents=!1,this._forceRenderingAbove=!1,this._explainMode=!1,this._showTimeout=new T.TimeoutTimer,this._disposables=new p.DisposableStore,this._onDidSelect=new S.Emitter,this._onDidFocus=new S.Emitter,this._onDidHide=new S.Emitter,this._onDidShow=new S.Emitter,this.onDidSelect=this._onDidSelect.event,this.onDidFocus=this._onDidFocus.event,this.onDidHide=this._onDidHide.event,this.onDidShow=this._onDidShow.event,this._onDetailsKeydown=new S.Emitter,this.onDetailsKeyDown=this._onDetailsKeydown.event,this.element=new i.ResizableHTMLElement,this.element.domNode.classList.add("editor-widget","suggest-widget"),this._contentWidget=new b(this,m),this._persistedSize=new y(E,m);class P{constructor(W,K,H=!1,Y=!1){this.persistedSize=W,this.currentSize=K,this.persistHeight=H,this.persistWidth=Y}}let F;this._disposables.add(this.element.onDidWillResize(()=>{this._contentWidget.lockPreference(),F=new P(this._persistedSize.restore(),this.element.size)})),this._disposables.add(this.element.onDidResize(B=>{var W,K,H,Y;if(this._resize(B.dimension.width,B.dimension.height),F&&(F.persistHeight=F.persistHeight||!!B.north||!!B.south,F.persistWidth=F.persistWidth||!!B.east||!!B.west),!!B.done){if(F){const{itemHeight:X,defaultSize:Z}=this.getLayoutInfo(),se=Math.round(X/2);let{width:oe,height:G}=this.element.size;(!F.persistHeight||Math.abs(F.currentSize.height-G)<=se)&&(G=(K=(W=F.persistedSize)===null||W===void 0?void 0:W.height)!==null&&K!==void 0?K:Z.height),(!F.persistWidth||Math.abs(F.currentSize.width-oe)<=se)&&(oe=(Y=(H=F.persistedSize)===null||H===void 0?void 0:H.width)!==null&&Y!==void 0?Y:Z.width),this._persistedSize.store(new w.Dimension(oe,G))}this._contentWidget.unlockPreference(),F=void 0}})),this._messageElement=w.append(this.element.domNode,w.$(".message")),this._listElement=w.append(this.element.domNode,w.$(".tree"));const R=M.createInstance(h.SuggestDetailsWidget,this.editor);R.onDidClose(this.toggleDetails,this,this._disposables),this._details=new h.SuggestDetailsOverlay(R,this.editor);const A=()=>this.element.domNode.classList.toggle("no-icons",!this.editor.getOption(105).showIcons);A();const O=M.createInstance(f.ItemRenderer,this.editor);this._disposables.add(O),this._disposables.add(O.onDidToggleDetails(()=>this.toggleDetails())),this._list=new N.List("SuggestWidget",this._listElement,{getHeight:B=>this.getLayoutInfo().itemHeight,getTemplateId:B=>"suggestion"},[O],{alwaysConsumeMouseWheel:!0,useShadows:!1,mouseSupport:!1,accessibilityProvider:{getRole:()=>"option",getAriaLabel:B=>{if(B.isResolved&&this._isDetailsVisible()){const{documentation:W,detail:K}=B.completion,H=n.format("{0}{1}",K||"",W?typeof W=="string"?W:W.value:"");return s.localize(10,null,B.textLabel,H)}else return B.textLabel},getWidgetAriaLabel:()=>s.localize(11,null),getWidgetRole:()=>"listbox"}}),this._status=M.createInstance(t.SuggestWidgetStatus,this.element.domNode);const L=()=>this.element.domNode.classList.toggle("with-status-bar",this.editor.getOption(105).showStatusBar);L(),this._disposables.add((0,r.attachListStyler)(this._list,k,{listInactiveFocusBackground:e.editorSuggestWidgetSelectedBackground,listInactiveFocusOutline:a.activeContrastBorder})),this._disposables.add(k.onDidColorThemeChange(B=>this._onThemeChange(B))),this._onThemeChange(k.getColorTheme()),this._disposables.add(this._list.onMouseDown(B=>this._onListMouseDownOrTap(B))),this._disposables.add(this._list.onTap(B=>this._onListMouseDownOrTap(B))),this._disposables.add(this._list.onDidChangeSelection(B=>this._onListSelection(B))),this._disposables.add(this._list.onDidChangeFocus(B=>this._onListFocus(B))),this._disposables.add(this.editor.onDidChangeCursorSelection(()=>this._onCursorSelectionChanged())),this._disposables.add(this.editor.onDidChangeConfiguration(B=>{B.hasChanged(105)&&(L(),A())})),this._ctxSuggestWidgetVisible=l.Context.Visible.bindTo(I),this._ctxSuggestWidgetDetailsVisible=l.Context.DetailsVisible.bindTo(I),this._ctxSuggestWidgetMultipleSuggestions=l.Context.MultipleSuggestions.bindTo(I),this._disposables.add(w.addStandardDisposableListener(this._details.widget.domNode,"keydown",B=>{this._onDetailsKeydown.fire(B)})),this._disposables.add(this.editor.onMouseDown(B=>this._onEditorMouseDown(B)))}dispose(){var m;this._details.widget.dispose(),this._details.dispose(),this._list.dispose(),this._status.dispose(),this._disposables.dispose(),(m=this._loadingTimeout)===null||m===void 0||m.dispose(),this._showTimeout.dispose(),this._contentWidget.dispose(),this.element.dispose()}_onEditorMouseDown(m){this._details.widget.domNode.contains(m.target.element)?this._details.widget.domNode.focus():this.element.domNode.contains(m.target.element)&&this.editor.focus()}_onCursorSelectionChanged(){this._state!==0&&this._contentWidget.layout()}_onListMouseDownOrTap(m){typeof m.element=="undefined"||typeof m.index=="undefined"||(m.browserEvent.preventDefault(),m.browserEvent.stopPropagation(),this._select(m.element,m.index))}_onListSelection(m){m.elements.length&&this._select(m.elements[0],m.indexes[0])}_select(m,E){const I=this._completionModel;I&&(this._onDidSelect.fire({item:m,index:E,model:I}),this.editor.focus())}_onThemeChange(m){const E=m.getColor(e.editorSuggestWidgetBackground);E&&(this.element.domNode.style.backgroundColor=E.toString(),this._messageElement.style.backgroundColor=E.toString(),this._details.widget.domNode.style.backgroundColor=E.toString());const I=m.getColor(e.editorSuggestWidgetBorder);I&&(this.element.domNode.style.borderColor=I.toString(),this._messageElement.style.borderColor=I.toString(),this._status.element.style.borderTopColor=I.toString(),this._details.widget.domNode.style.borderColor=I.toString(),this._detailsBorderColor=I.toString());const k=m.getColor(a.focusBorder);k&&(this._detailsFocusBorderColor=k.toString()),this._details.widget.borderWidth=m.type==="hc"?2:1}_onListFocus(m){var E;if(this._ignoreFocusEvents)return;if(!m.elements.length){this._currentSuggestionDetails&&(this._currentSuggestionDetails.cancel(),this._currentSuggestionDetails=void 0,this._focusedItem=void 0),this.editor.setAriaOptions({activeDescendant:void 0});return}if(!this._completionModel)return;const I=m.elements[0],k=m.indexes[0];I!==this._focusedItem&&((E=this._currentSuggestionDetails)===null||E===void 0||E.cancel(),this._currentSuggestionDetails=void 0,this._focusedItem=I,this._list.reveal(k),this._currentSuggestionDetails=(0,T.createCancelablePromise)(M=>Re(this,void 0,void 0,function*(){const P=(0,T.disposableTimeout)(()=>{this._isDetailsVisible()&&this.showDetails(!0)},250);M.onCancellationRequested(()=>P.dispose());const F=yield I.resolve(M);return P.dispose(),F})),this._currentSuggestionDetails.then(()=>{k>=this._list.length||I!==this._list.element(k)||(this._ignoreFocusEvents=!0,this._list.splice(k,1,[I]),this._list.setFocus([k]),this._ignoreFocusEvents=!1,this._isDetailsVisible()?this.showDetails(!1):this.element.domNode.classList.remove("docs-side"),this.editor.setAriaOptions({activeDescendant:(0,f.getAriaId)(k)}))}).catch(D.onUnexpectedError)),this._onDidFocus.fire({item:I,index:k,model:this._completionModel})}_setState(m){if(this._state!==m)switch(this._state=m,this.element.domNode.classList.toggle("frozen",m===4),this.element.domNode.classList.remove("message"),m){case 0:w.hide(this._messageElement,this._listElement,this._status.element),this._details.hide(!0),this._status.hide(),this._contentWidget.hide(),this._ctxSuggestWidgetVisible.reset(),this._ctxSuggestWidgetMultipleSuggestions.reset(),this._showTimeout.cancel(),this.element.domNode.classList.remove("visible"),this._list.splice(0,this._list.length),this._focusedItem=void 0,this._cappedHeight=void 0,this._explainMode=!1;break;case 1:this.element.domNode.classList.add("message"),this._messageElement.textContent=Gt.LOADING_MESSAGE,w.hide(this._listElement,this._status.element),w.show(this._messageElement),this._details.hide(),this._show(),this._focusedItem=void 0;break;case 2:this.element.domNode.classList.add("message"),this._messageElement.textContent=Gt.NO_SUGGESTIONS_MESSAGE,w.hide(this._listElement,this._status.element),w.show(this._messageElement),this._details.hide(),this._show(),this._focusedItem=void 0;break;case 3:w.hide(this._messageElement),w.show(this._listElement,this._status.element),this._show();break;case 4:w.hide(this._messageElement),w.show(this._listElement,this._status.element),this._show();break;case 5:w.hide(this._messageElement),w.show(this._listElement,this._status.element),this._details.show(),this._show();break}}_show(){this._status.show(),this._contentWidget.show(),this._layout(this._persistedSize.restore()),this._ctxSuggestWidgetVisible.set(!0),this._showTimeout.cancelAndSet(()=>{this.element.domNode.classList.add("visible"),this._onDidShow.fire(this)},100)}showTriggered(m,E){this._state===0&&(this._contentWidget.setPosition(this.editor.getPosition()),this._isAuto=!!m,this._isAuto||(this._loadingTimeout=(0,T.disposableTimeout)(()=>this._setState(1),E)))}showSuggestions(m,E,I,k){var M,P;if(this._contentWidget.setPosition(this.editor.getPosition()),(M=this._loadingTimeout)===null||M===void 0||M.dispose(),(P=this._currentSuggestionDetails)===null||P===void 0||P.cancel(),this._currentSuggestionDetails=void 0,this._completionModel!==m&&(this._completionModel=m),I&&this._state!==2&&this._state!==0){this._setState(4);return}const F=this._completionModel.items.length,R=F===0;if(this._ctxSuggestWidgetMultipleSuggestions.set(F>1),R){this._setState(k?0:2),this._completionModel=void 0;return}this._focusedItem=void 0,this._list.splice(0,this._list.length,this._completionModel.items),this._setState(I?4:3),this._list.reveal(E,0),this._list.setFocus([E]),this._layout(this.element.size),this._detailsBorderColor&&(this._details.widget.domNode.style.borderColor=this._detailsBorderColor)}selectNextPage(){switch(this._state){case 0:return!1;case 5:return this._details.widget.pageDown(),!0;case 1:return!this._isAuto;default:return this._list.focusNextPage(),!0}}selectNext(){switch(this._state){case 0:return!1;case 1:return!this._isAuto;default:return this._list.focusNext(1,!0),!0}}selectLast(){switch(this._state){case 0:return!1;case 5:return this._details.widget.scrollBottom(),!0;case 1:return!this._isAuto;default:return this._list.focusLast(),!0}}selectPreviousPage(){switch(this._state){case 0:return!1;case 5:return this._details.widget.pageUp(),!0;case 1:return!this._isAuto;default:return this._list.focusPreviousPage(),!0}}selectPrevious(){switch(this._state){case 0:return!1;case 1:return!this._isAuto;default:return this._list.focusPrevious(1,!0),!1}}selectFirst(){switch(this._state){case 0:return!1;case 5:return this._details.widget.scrollTop(),!0;case 1:return!this._isAuto;default:return this._list.focusFirst(),!0}}getFocusedItem(){if(this._state!==0&&this._state!==2&&this._state!==1&&this._completionModel)return{item:this._list.getFocusedElements()[0],index:this._list.getFocus()[0],model:this._completionModel}}toggleDetailsFocus(){this._state===5?(this._setState(3),this._detailsBorderColor&&(this._details.widget.domNode.style.borderColor=this._detailsBorderColor)):this._state===3&&this._isDetailsVisible()&&(this._setState(5),this._detailsFocusBorderColor&&(this._details.widget.domNode.style.borderColor=this._detailsFocusBorderColor))}toggleDetails(){this._isDetailsVisible()?(this._ctxSuggestWidgetDetailsVisible.set(!1),this._setDetailsVisible(!1),this._details.hide(),this.element.domNode.classList.remove("shows-details")):((0,h.canExpandCompletionItem)(this._list.getFocusedElements()[0])||this._explainMode)&&(this._state===3||this._state===5||this._state===4)&&(this._ctxSuggestWidgetDetailsVisible.set(!0),this._setDetailsVisible(!0),this.showDetails(!1))}showDetails(m){this._details.show(),m?this._details.widget.renderLoading():this._details.widget.renderItem(this._list.getFocusedElements()[0],this._explainMode),this._positionDetails(),this.editor.focus(),this.element.domNode.classList.add("shows-details")}toggleExplainMode(){this._list.getFocusedElements()[0]&&(this._explainMode=!this._explainMode,this._isDetailsVisible()?this.showDetails(!1):this.toggleDetails())}resetPersistedSize(){this._persistedSize.reset()}hideWidget(){var m;(m=this._loadingTimeout)===null||m===void 0||m.dispose(),this._setState(0),this._onDidHide.fire(this),this.element.clearSashHoverState();const E=this._persistedSize.restore(),I=Math.ceil(this.getLayoutInfo().itemHeight*4.3);E&&E.height<I&&this._persistedSize.store(E.with(void 0,I))}isFrozen(){return this._state===4}_afterRender(m){if(m===null){this._isDetailsVisible()&&this._details.hide();return}this._state===2||this._state===1||(this._isDetailsVisible()&&this._details.show(),this._positionDetails())}_layout(m){var E,I,k;if(!this.editor.hasModel()||!this.editor.getDomNode())return;const M=w.getClientArea(document.body),P=this.getLayoutInfo();m||(m=P.defaultSize);let F=m.height,R=m.width;if(this._status.element.style.lineHeight=`${P.itemHeight}px`,this._state===2||this._state===1)F=P.itemHeight+P.borderHeight,R=P.defaultSize.width/2,this.element.enableSashes(!1,!1,!1,!1),this.element.minSize=this.element.maxSize=new w.Dimension(R,F),this._contentWidget.setPreference(2);else{const A=M.width-P.borderHeight-2*P.horizontalPadding;R>A&&(R=A);const O=this._completionModel?this._completionModel.stats.pLabelLen*P.typicalHalfwidthCharacterWidth:R,L=P.statusBarHeight+this._list.contentHeight+P.borderHeight,B=P.itemHeight+P.statusBarHeight,W=w.getDomNodePagePosition(this.editor.getDomNode()),K=this.editor.getScrolledVisiblePosition(this.editor.getPosition()),H=W.top+K.top+K.height,Y=Math.min(M.height-H-P.verticalPadding,L),X=W.top+K.top-P.verticalPadding,Z=Math.min(X,L);let se=Math.min(Math.max(Z,Y)+P.borderHeight,L);F===((E=this._cappedHeight)===null||E===void 0?void 0:E.capped)&&(F=this._cappedHeight.wanted),F<B&&(F=B),F>se&&(F=se);const oe=150;F>Y||this._forceRenderingAbove&&X>oe?(this._contentWidget.setPreference(1),this.element.enableSashes(!0,!0,!1,!1),se=Z):(this._contentWidget.setPreference(2),this.element.enableSashes(!1,!0,!0,!1),se=Y),this.element.preferredSize=new w.Dimension(O,P.defaultSize.height),this.element.maxSize=new w.Dimension(A,se),this.element.minSize=new w.Dimension(220,B),this._cappedHeight=F===L?{wanted:(k=(I=this._cappedHeight)===null||I===void 0?void 0:I.wanted)!==null&&k!==void 0?k:m.height,capped:F}:void 0}this._resize(R,F)}_resize(m,E){const{width:I,height:k}=this.element.maxSize;m=Math.min(I,m),E=Math.min(k,E);const{statusBarHeight:M}=this.getLayoutInfo();this._list.layout(E-M,m),this._listElement.style.height=`${E-M}px`,this.element.layout(E,m),this._contentWidget.layout(),this._positionDetails()}_positionDetails(){this._isDetailsVisible()&&this._details.placeAtAnchor(this.element.domNode)}getLayoutInfo(){const m=this.editor.getOption(43),E=(0,C.clamp)(this.editor.getOption(107)||m.lineHeight,8,1e3),I=!this.editor.getOption(105).showStatusBar||this._state===2||this._state===1?0:E,k=this._details.widget.borderWidth,M=2*k;return{itemHeight:E,statusBarHeight:I,borderWidth:k,borderHeight:M,typicalHalfwidthCharacterWidth:m.typicalHalfwidthCharacterWidth,verticalPadding:22,horizontalPadding:14,defaultSize:new w.Dimension(430,I+12*E+M)}}_isDetailsVisible(){return this._storageService.getBoolean("expandSuggestionDocs",0,!1)}_setDetailsVisible(m){this._storageService.store("expandSuggestionDocs",m,0,0)}forceRenderingAbove(){this._forceRenderingAbove||(this._forceRenderingAbove=!0,this._layout(this._persistedSize.restore()))}stopForceRenderingAbove(){this._forceRenderingAbove=!1}};_.LOADING_MESSAGE=s.localize(8,null),_.NO_SUGGESTIONS_MESSAGE=s.localize(9,null),_=Fe([Ce(1,d.IStorageService),Ce(2,c.IContextKeyService),Ce(3,o.IThemeService),Ce(4,u.IInstantiationService)],_),e.SuggestWidget=_;class b{constructor(m,E){this._widget=m,this._editor=E,this.allowEditorOverflow=!0,this.suppressMouseDown=!1,this._preferenceLocked=!1,this._added=!1,this._hidden=!1}dispose(){this._added&&(this._added=!1,this._editor.removeContentWidget(this))}getId(){return"editor.widget.suggestWidget"}getDomNode(){return this._widget.element.domNode}show(){this._hidden=!1,this._added||(this._added=!0,this._editor.addContentWidget(this))}hide(){this._hidden||(this._hidden=!0,this.layout())}layout(){this._editor.layoutContentWidget(this)}getPosition(){return this._hidden||!this._position||!this._preference?null:{position:this._position,preference:[this._preference]}}beforeRender(){const{height:m,width:E}=this._widget.element.size,{borderWidth:I,horizontalPadding:k}=this._widget.getLayoutInfo();return new w.Dimension(E+2*I+k,m+2*I)}afterRender(m){this._widget._afterRender(m)}setPreference(m){this._preferenceLocked||(this._preference=m)}lockPreference(){this._preferenceLocked=!0}unlockPreference(){this._preferenceLocked=!1}setPosition(m){this._position=m}}e.SuggestContentWidget=b,(0,o.registerThemingParticipant)((v,m)=>{const E=v.getColor(e.editorSuggestWidgetHighlightForeground);E&&m.addRule(`.monaco-editor .suggest-widget .monaco-list .monaco-list-row .monaco-highlighted-label .highlight { color: ${E}; }`);const I=v.getColor(e.editorSuggestWidgetHighlightFocusForeground);E&&m.addRule(`.monaco-editor .suggest-widget .monaco-list .monaco-list-row.focused .monaco-highlighted-label .highlight { color: ${I}; }`);const k=v.getColor(e.editorSuggestWidgetForeground);k&&m.addRule(`.monaco-editor .suggest-widget, .monaco-editor .suggest-details { color: ${k}; }`);const M=v.getColor(e.editorSuggestWidgetSelectedForeground);M&&m.addRule(`.monaco-editor .suggest-widget .monaco-list .monaco-list-row.focused { color: ${M}; }`);const P=v.getColor(e.editorSuggestWidgetSelectedIconForeground);P&&m.addRule(`.monaco-editor .suggest-widget .monaco-list .monaco-list-row.focused .codicon { color: ${P}; }`);const F=v.getColor(a.textLinkForeground);F&&m.addRule(`.monaco-editor .suggest-details a { color: ${F}; }`);const R=v.getColor(a.textLinkActiveForeground);R&&m.addRule(`.monaco-editor .suggest-details a:hover { color: ${R}; }`);const A=v.getColor(a.textCodeBlockBackground);A&&m.addRule(`.monaco-editor .suggest-details code { background-color: ${A}; }`)})}),define(J[694],ee([0,1,14,2,16,18,258,42,280,268,41,10]),function(j,e,w,N,T,D,S,p,C,n,g,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0});let s=class extends N.Disposable{constructor(u,d,a,r){super();this._modelService=d,this._themeService=a,this._configurationService=r,this._editor=u,this._tokenizeViewport=new w.RunOnceScheduler(()=>this._tokenizeViewportNow(),100),this._outstandingRequests=[],this._register(this._editor.onDidScrollChange(()=>{this._tokenizeViewport.schedule()})),this._register(this._editor.onDidChangeModel(()=>{this._cancelAll(),this._tokenizeViewport.schedule()})),this._register(this._editor.onDidChangeModelContent(o=>{this._cancelAll(),this._tokenizeViewport.schedule()})),this._register(D.DocumentRangeSemanticTokensProviderRegistry.onDidChange(()=>{this._cancelAll(),this._tokenizeViewport.schedule()})),this._register(this._configurationService.onDidChangeConfiguration(o=>{o.affectsConfiguration(C.SEMANTIC_HIGHLIGHTING_SETTING_ID)&&(this._cancelAll(),this._tokenizeViewport.schedule())})),this._register(this._themeService.onDidColorThemeChange(()=>{this._cancelAll(),this._tokenizeViewport.schedule()}))}_cancelAll(){for(const u of this._outstandingRequests)u.cancel();this._outstandingRequests=[]}_removeOutstandingRequest(u){for(let d=0,a=this._outstandingRequests.length;d<a;d++)if(this._outstandingRequests[d]===u){this._outstandingRequests.splice(d,1);return}}_tokenizeViewportNow(){if(!this._editor.hasModel())return;const u=this._editor.getModel();if(u.hasCompleteSemanticTokens())return;if(!(0,C.isSemanticColoringEnabled)(u,this._themeService,this._configurationService)){u.hasSomeSemanticTokens()&&u.setSemanticTokens(null,!1);return}if(!(0,S.hasDocumentRangeSemanticTokensProvider)(u)){u.hasSomeSemanticTokens()&&u.setSemanticTokens(null,!1);return}const d=this._editor.getVisibleRangesPlusViewportAboveBelow();this._outstandingRequests=this._outstandingRequests.concat(d.map(a=>this._requestRange(u,a)))}_requestRange(u,d){const a=u.getVersionId(),r=(0,w.createCancelablePromise)(o=>Promise.resolve((0,S.getDocumentRangeSemanticTokens)(u,d,o)));return r.then(o=>{if(!o||!o.tokens||u.isDisposed()||u.getVersionId()!==a)return;const{provider:i,tokens:l}=o,h=this._modelService.getSemanticTokensProviderStyling(i);u.setPartialSemanticTokens(d,(0,n.toMultilineTokens2)(l,h,u.getLanguageId()))}).then(()=>this._removeOutstandingRequest(r),()=>this._removeOutstandingRequest(r)),r}};s.ID="editor.contrib.viewportSemanticTokens",s=Fe([Ce(1,p.IModelService),Ce(2,t.IThemeService),Ce(3,g.IConfigurationService)],s),(0,T.registerEditorContribution)(s.ID,s)}),define(J[695],ee([0,1,45,19,14,23,11,2,16,3,25,49,32,18,542,15,21,10]),function(j,e,w,N,T,D,S,p,C,n,g,t,s,c,u,d,a,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getOccurrencesAtPosition=void 0;const o=(0,a.registerColor)("editor.wordHighlightBackground",{dark:"#575757B8",light:"#57575740",hc:null},u.localize(0,null),!0),i=(0,a.registerColor)("editor.wordHighlightStrongBackground",{dark:"#004972B8",light:"#0e639c40",hc:null},u.localize(1,null),!0),l=(0,a.registerColor)("editor.wordHighlightBorder",{light:null,dark:null,hc:a.activeContrastBorder},u.localize(2,null)),h=(0,a.registerColor)("editor.wordHighlightStrongBorder",{light:null,dark:null,hc:a.activeContrastBorder},u.localize(3,null)),f=(0,a.registerColor)("editorOverviewRuler.wordHighlightForeground",{dark:"#A0A0A0CC",light:"#A0A0A0CC",hc:"#A0A0A0CC"},u.localize(4,null),!0),y=(0,a.registerColor)("editorOverviewRuler.wordHighlightStrongForeground",{dark:"#C0A0C0CC",light:"#C0A0C0CC",hc:"#C0A0C0CC"},u.localize(5,null),!0),_=new d.RawContextKey("hasWordHighlights",!1);function b(O,L,B){const W=c.DocumentHighlightProviderRegistry.ordered(O);return(0,T.first)(W.map(K=>()=>Promise.resolve(K.provideDocumentHighlights(O,L,B)).then(void 0,S.onUnexpectedExternalError)),N.isNonEmptyArray)}e.getOccurrencesAtPosition=b;class v{constructor(L,B,W){this._wordRange=this._getCurrentWordRange(L,B),this.result=(0,T.createCancelablePromise)(K=>this._compute(L,B,W,K))}_getCurrentWordRange(L,B){const W=L.getWordAtPosition(B.getPosition());return W?new n.Range(B.startLineNumber,W.startColumn,B.startLineNumber,W.endColumn):null}isValid(L,B,W){const K=B.startLineNumber,H=B.startColumn,Y=B.endColumn,X=this._getCurrentWordRange(L,B);let Z=Boolean(this._wordRange&&this._wordRange.equalsRange(X));for(let se=0,oe=W.length;!Z&&se<oe;se++){let G=L.getDecorationRange(W[se]);G&&G.startLineNumber===K&&G.startColumn<=H&&G.endColumn>=Y&&(Z=!0)}return Z}cancel(){this.result.cancel()}}class m extends v{_compute(L,B,W,K){return b(L,B.getPosition(),K).then(H=>H||[])}}class E extends v{constructor(L,B,W){super(L,B,W);this._selectionIsEmpty=B.isEmpty()}_compute(L,B,W,K){return(0,T.timeout)(250,K).then(()=>{if(!B.isEmpty())return[];const H=L.getWordAtPosition(B.getPosition());return!H||H.word.length>1e3?[]:L.findMatches(H.word,!0,!1,!0,W,!1).map(X=>({range:X.range,kind:c.DocumentHighlightKind.Text}))})}isValid(L,B,W){const K=B.isEmpty();return this._selectionIsEmpty!==K?!1:super.isValid(L,B,W)}}function I(O,L,B){return c.DocumentHighlightProviderRegistry.has(O)?new m(O,L,B):new E(O,L,B)}(0,C.registerModelAndPositionCommand)("_executeDocumentHighlights",(O,L)=>b(O,L,D.CancellationToken.None));class k{constructor(L,B){this.toUnhook=new p.DisposableStore,this.workerRequestTokenId=0,this.workerRequestCompleted=!1,this.workerRequestValue=[],this.lastCursorPositionChangeTime=0,this.renderDecorationsTimer=-1,this.editor=L,this._hasWordHighlights=_.bindTo(B),this._ignorePositionChangeEvent=!1,this.occurrencesHighlight=this.editor.getOption(71),this.model=this.editor.getModel(),this.toUnhook.add(L.onDidChangeCursorPosition(W=>{this._ignorePositionChangeEvent||!this.occurrencesHighlight||this._onPositionChanged(W)})),this.toUnhook.add(L.onDidChangeModelContent(W=>{this._stopAll()})),this.toUnhook.add(L.onDidChangeConfiguration(W=>{let K=this.editor.getOption(71);this.occurrencesHighlight!==K&&(this.occurrencesHighlight=K,this._stopAll())})),this._decorationIds=[],this.workerRequestTokenId=0,this.workerRequest=null,this.workerRequestCompleted=!1,this.lastCursorPositionChangeTime=0,this.renderDecorationsTimer=-1}hasDecorations(){return this._decorationIds.length>0}restore(){!this.occurrencesHighlight||this._run()}_getSortedHighlights(){return N.coalesce(this._decorationIds.map(L=>this.model.getDecorationRange(L)).sort(n.Range.compareRangesUsingStarts))}moveNext(){let L=this._getSortedHighlights(),W=(L.findIndex(H=>H.containsPosition(this.editor.getPosition()))+1)%L.length,K=L[W];try{this._ignorePositionChangeEvent=!0,this.editor.setPosition(K.getStartPosition()),this.editor.revealRangeInCenterIfOutsideViewport(K);const H=this._getWord();if(H){const Y=this.editor.getModel().getLineContent(K.startLineNumber);(0,w.alert)(`${Y}, ${W+1} of ${L.length} for '${H.word}'`)}}finally{this._ignorePositionChangeEvent=!1}}moveBack(){let L=this._getSortedHighlights(),W=(L.findIndex(H=>H.containsPosition(this.editor.getPosition()))-1+L.length)%L.length,K=L[W];try{this._ignorePositionChangeEvent=!0,this.editor.setPosition(K.getStartPosition()),this.editor.revealRangeInCenterIfOutsideViewport(K);const H=this._getWord();if(H){const Y=this.editor.getModel().getLineContent(K.startLineNumber);(0,w.alert)(`${Y}, ${W+1} of ${L.length} for '${H.word}'`)}}finally{this._ignorePositionChangeEvent=!1}}_removeDecorations(){this._decorationIds.length>0&&(this._decorationIds=this.editor.deltaDecorations(this._decorationIds,[]),this._hasWordHighlights.set(!1))}_stopAll(){this._removeDecorations(),this.renderDecorationsTimer!==-1&&(clearTimeout(this.renderDecorationsTimer),this.renderDecorationsTimer=-1),this.workerRequest!==null&&(this.workerRequest.cancel(),this.workerRequest=null),this.workerRequestCompleted||(this.workerRequestTokenId++,this.workerRequestCompleted=!0)}_onPositionChanged(L){if(!this.occurrencesHighlight){this._stopAll();return}if(L.reason!==3){this._stopAll();return}this._run()}_getWord(){let L=this.editor.getSelection(),B=L.startLineNumber,W=L.startColumn;return this.model.getWordAtPosition({lineNumber:B,column:W})}_run(){let L=this.editor.getSelection();if(L.startLineNumber!==L.endLineNumber){this._stopAll();return}let B=L.startColumn,W=L.endColumn;const K=this._getWord();if(!K||K.startColumn>B||K.endColumn<W){this._stopAll();return}const H=this.workerRequest&&this.workerRequest.isValid(this.model,L,this._decorationIds);if(this.lastCursorPositionChangeTime=new Date().getTime(),H)this.workerRequestCompleted&&this.renderDecorationsTimer!==-1&&(clearTimeout(this.renderDecorationsTimer),this.renderDecorationsTimer=-1,this._beginRenderDecorations());else{this._stopAll();let Y=++this.workerRequestTokenId;this.workerRequestCompleted=!1,this.workerRequest=I(this.model,this.editor.getSelection(),this.editor.getOption(115)),this.workerRequest.result.then(X=>{Y===this.workerRequestTokenId&&(this.workerRequestCompleted=!0,this.workerRequestValue=X||[],this._beginRenderDecorations())},S.onUnexpectedError)}}_beginRenderDecorations(){let L=new Date().getTime(),B=this.lastCursorPositionChangeTime+250;L>=B?(this.renderDecorationsTimer=-1,this.renderDecorations()):this.renderDecorationsTimer=setTimeout(()=>{this.renderDecorations()},B-L)}renderDecorations(){this.renderDecorationsTimer=-1;let L=[];for(const B of this.workerRequestValue)B.range&&L.push({range:B.range,options:k._getDecorationOptions(B.kind)});this._decorationIds=this.editor.deltaDecorations(this._decorationIds,L),this._hasWordHighlights.set(this.hasDecorations())}static _getDecorationOptions(L){return L===c.DocumentHighlightKind.Write?this._WRITE_OPTIONS:L===c.DocumentHighlightKind.Text?this._TEXT_OPTIONS:this._REGULAR_OPTIONS}dispose(){this._stopAll(),this.toUnhook.dispose()}}k._WRITE_OPTIONS=s.ModelDecorationOptions.register({description:"word-highlight-strong",stickiness:1,className:"wordHighlightStrong",overviewRuler:{color:(0,r.themeColorFromId)(y),position:t.OverviewRulerLane.Center},minimap:{color:(0,r.themeColorFromId)(a.minimapSelectionOccurrenceHighlight),position:t.MinimapPosition.Inline}}),k._TEXT_OPTIONS=s.ModelDecorationOptions.register({description:"selection-highlight",stickiness:1,className:"selectionHighlight",overviewRuler:{color:(0,r.themeColorFromId)(a.overviewRulerSelectionHighlightForeground),position:t.OverviewRulerLane.Center},minimap:{color:(0,r.themeColorFromId)(a.minimapSelectionOccurrenceHighlight),position:t.MinimapPosition.Inline}}),k._REGULAR_OPTIONS=s.ModelDecorationOptions.register({description:"word-highlight",stickiness:1,className:"wordHighlight",overviewRuler:{color:(0,r.themeColorFromId)(f),position:t.OverviewRulerLane.Center},minimap:{color:(0,r.themeColorFromId)(a.minimapSelectionOccurrenceHighlight),position:t.MinimapPosition.Inline}});let M=class Ai extends p.Disposable{constructor(L,B){super();this.wordHighlighter=null;const W=()=>{L.hasModel()&&(this.wordHighlighter=new k(L,B))};this._register(L.onDidChangeModel(K=>{this.wordHighlighter&&(this.wordHighlighter.dispose(),this.wordHighlighter=null),W()})),W()}static get(L){return L.getContribution(Ai.ID)}saveViewState(){return!!(this.wordHighlighter&&this.wordHighlighter.hasDecorations())}moveNext(){this.wordHighlighter&&this.wordHighlighter.moveNext()}moveBack(){this.wordHighlighter&&this.wordHighlighter.moveBack()}restoreViewState(L){this.wordHighlighter&&L&&this.wordHighlighter.restore()}dispose(){this.wordHighlighter&&(this.wordHighlighter.dispose(),this.wordHighlighter=null),super.dispose()}};M.ID="editor.contrib.wordHighlighter",M=Fe([Ce(1,d.IContextKeyService)],M);class P extends C.EditorAction{constructor(L,B){super(B);this._isNext=L}run(L,B){const W=M.get(B);!W||(this._isNext?W.moveNext():W.moveBack())}}class F extends P{constructor(){super(!0,{id:"editor.action.wordHighlight.next",label:u.localize(6,null),alias:"Go to Next Symbol Highlight",precondition:_,kbOpts:{kbExpr:g.EditorContextKeys.editorTextFocus,primary:65,weight:100}})}}class R extends P{constructor(){super(!1,{id:"editor.action.wordHighlight.prev",label:u.localize(7,null),alias:"Go to Previous Symbol Highlight",precondition:_,kbOpts:{kbExpr:g.EditorContextKeys.editorTextFocus,primary:1024|65,weight:100}})}}class A extends C.EditorAction{constructor(){super({id:"editor.action.wordHighlight.trigger",label:u.localize(8,null),alias:"Trigger Symbol Highlight",precondition:_.toNegated(),kbOpts:{kbExpr:g.EditorContextKeys.editorTextFocus,primary:0,weight:100}})}run(L,B,W){const K=M.get(B);!K||K.restoreViewState(!0)}}(0,C.registerEditorContribution)(M.ID,M),(0,C.registerEditorAction)(F),(0,C.registerEditorAction)(R),(0,C.registerEditorAction)(A),(0,r.registerThemingParticipant)((O,L)=>{const B=O.getColor(a.editorSelectionHighlight);B&&(L.addRule(`.monaco-editor .focused .selectionHighlight { background-color: ${B}; }`),L.addRule(`.monaco-editor .selectionHighlight { background-color: ${B.transparent(.5)}; }`));const W=O.getColor(o);W&&L.addRule(`.monaco-editor .wordHighlight { background-color: ${W}; }`);const K=O.getColor(i);K&&L.addRule(`.monaco-editor .wordHighlightStrong { background-color: ${K}; }`);const H=O.getColor(a.editorSelectionHighlightBorder);H&&L.addRule(`.monaco-editor .selectionHighlight { border: 1px ${O.type==="hc"?"dotted":"solid"} ${H}; box-sizing: border-box; }`);const Y=O.getColor(l);Y&&L.addRule(`.monaco-editor .wordHighlight { border: 1px ${O.type==="hc"?"dashed":"solid"} ${Y}; box-sizing: border-box; }`);const X=O.getColor(h);X&&L.addRule(`.monaco-editor .wordHighlightStrong { border: 1px ${O.type==="hc"?"dashed":"solid"} ${X}; box-sizing: border-box; }`)})}),define(J[285],ee([0,1,16,98,31,43,155,112,13,3,22,25,37,543,61,15,261]),function(j,e,w,N,T,D,S,p,C,n,g,t,s,c,u,d,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DeleteInsideWord=e.DeleteWordRight=e.DeleteWordEndRight=e.DeleteWordStartRight=e.DeleteWordLeft=e.DeleteWordEndLeft=e.DeleteWordStartLeft=e.DeleteWordRightCommand=e.DeleteWordLeftCommand=e.DeleteWordCommand=e.CursorWordAccessibilityRightSelect=e.CursorWordAccessibilityRight=e.CursorWordRightSelect=e.CursorWordEndRightSelect=e.CursorWordStartRightSelect=e.CursorWordRight=e.CursorWordEndRight=e.CursorWordStartRight=e.CursorWordAccessibilityLeftSelect=e.CursorWordAccessibilityLeft=e.CursorWordLeftSelect=e.CursorWordEndLeftSelect=e.CursorWordStartLeftSelect=e.CursorWordLeft=e.CursorWordEndLeft=e.CursorWordStartLeft=e.WordRightCommand=e.WordLeftCommand=e.MoveWordCommand=void 0;class r extends w.EditorCommand{constructor(G){super(G);this._inSelectionMode=G.inSelectionMode,this._wordNavigationType=G.wordNavigationType}runEditorCommand(G,x,U){if(!x.hasModel())return;const $=(0,p.getMapForWordSeparators)(x.getOption(115)),V=x.getModel(),ue=x.getSelections().map(pe=>{const fe=new C.Position(pe.positionLineNumber,pe.positionColumn),re=this._move($,V,fe,this._wordNavigationType);return this._moveTo(pe,re,this._inSelectionMode)});if(V.pushStackElement(),x._getViewModel().setCursorStates("moveWordCommand",3,ue.map(pe=>D.CursorState.fromModelSelection(pe))),ue.length===1){const pe=new C.Position(ue[0].positionLineNumber,ue[0].positionColumn);x.revealPosition(pe,0)}}_moveTo(G,x,U){return U?new g.Selection(G.selectionStartLineNumber,G.selectionStartColumn,x.lineNumber,x.column):new g.Selection(x.lineNumber,x.column,x.lineNumber,x.column)}}e.MoveWordCommand=r;class o extends r{_move(G,x,U,$){return S.WordOperations.moveWordLeft(G,x,U,$)}}e.WordLeftCommand=o;class i extends r{_move(G,x,U,$){return S.WordOperations.moveWordRight(G,x,U,$)}}e.WordRightCommand=i;class l extends o{constructor(){super({inSelectionMode:!1,wordNavigationType:0,id:"cursorWordStartLeft",precondition:void 0})}}e.CursorWordStartLeft=l;class h extends o{constructor(){super({inSelectionMode:!1,wordNavigationType:2,id:"cursorWordEndLeft",precondition:void 0})}}e.CursorWordEndLeft=h;class f extends o{constructor(){var G;super({inSelectionMode:!1,wordNavigationType:1,id:"cursorWordLeft",precondition:void 0,kbOpts:{kbExpr:d.ContextKeyExpr.and(t.EditorContextKeys.textInputFocus,(G=d.ContextKeyExpr.and(u.CONTEXT_ACCESSIBILITY_MODE_ENABLED,a.IsWindowsContext))===null||G===void 0?void 0:G.negate()),primary:2048|15,mac:{primary:512|15},weight:100}})}}e.CursorWordLeft=f;class y extends o{constructor(){super({inSelectionMode:!0,wordNavigationType:0,id:"cursorWordStartLeftSelect",precondition:void 0})}}e.CursorWordStartLeftSelect=y;class _ extends o{constructor(){super({inSelectionMode:!0,wordNavigationType:2,id:"cursorWordEndLeftSelect",precondition:void 0})}}e.CursorWordEndLeftSelect=_;class b extends o{constructor(){var G;super({inSelectionMode:!0,wordNavigationType:1,id:"cursorWordLeftSelect",precondition:void 0,kbOpts:{kbExpr:d.ContextKeyExpr.and(t.EditorContextKeys.textInputFocus,(G=d.ContextKeyExpr.and(u.CONTEXT_ACCESSIBILITY_MODE_ENABLED,a.IsWindowsContext))===null||G===void 0?void 0:G.negate()),primary:2048|1024|15,mac:{primary:512|1024|15},weight:100}})}}e.CursorWordLeftSelect=b;class v extends o{constructor(){super({inSelectionMode:!1,wordNavigationType:3,id:"cursorWordAccessibilityLeft",precondition:void 0})}_move(G,x,U,$){return super._move((0,p.getMapForWordSeparators)(T.EditorOptions.wordSeparators.defaultValue),x,U,$)}}e.CursorWordAccessibilityLeft=v;class m extends o{constructor(){super({inSelectionMode:!0,wordNavigationType:3,id:"cursorWordAccessibilityLeftSelect",precondition:void 0})}_move(G,x,U,$){return super._move((0,p.getMapForWordSeparators)(T.EditorOptions.wordSeparators.defaultValue),x,U,$)}}e.CursorWordAccessibilityLeftSelect=m;class E extends i{constructor(){super({inSelectionMode:!1,wordNavigationType:0,id:"cursorWordStartRight",precondition:void 0})}}e.CursorWordStartRight=E;class I extends i{constructor(){var G;super({inSelectionMode:!1,wordNavigationType:2,id:"cursorWordEndRight",precondition:void 0,kbOpts:{kbExpr:d.ContextKeyExpr.and(t.EditorContextKeys.textInputFocus,(G=d.ContextKeyExpr.and(u.CONTEXT_ACCESSIBILITY_MODE_ENABLED,a.IsWindowsContext))===null||G===void 0?void 0:G.negate()),primary:2048|17,mac:{primary:512|17},weight:100}})}}e.CursorWordEndRight=I;class k extends i{constructor(){super({inSelectionMode:!1,wordNavigationType:2,id:"cursorWordRight",precondition:void 0})}}e.CursorWordRight=k;class M extends i{constructor(){super({inSelectionMode:!0,wordNavigationType:0,id:"cursorWordStartRightSelect",precondition:void 0})}}e.CursorWordStartRightSelect=M;class P extends i{constructor(){var G;super({inSelectionMode:!0,wordNavigationType:2,id:"cursorWordEndRightSelect",precondition:void 0,kbOpts:{kbExpr:d.ContextKeyExpr.and(t.EditorContextKeys.textInputFocus,(G=d.ContextKeyExpr.and(u.CONTEXT_ACCESSIBILITY_MODE_ENABLED,a.IsWindowsContext))===null||G===void 0?void 0:G.negate()),primary:2048|1024|17,mac:{primary:512|1024|17},weight:100}})}}e.CursorWordEndRightSelect=P;class F extends i{constructor(){super({inSelectionMode:!0,wordNavigationType:2,id:"cursorWordRightSelect",precondition:void 0})}}e.CursorWordRightSelect=F;class R extends i{constructor(){super({inSelectionMode:!1,wordNavigationType:3,id:"cursorWordAccessibilityRight",precondition:void 0})}_move(G,x,U,$){return super._move((0,p.getMapForWordSeparators)(T.EditorOptions.wordSeparators.defaultValue),x,U,$)}}e.CursorWordAccessibilityRight=R;class A extends i{constructor(){super({inSelectionMode:!0,wordNavigationType:3,id:"cursorWordAccessibilityRightSelect",precondition:void 0})}_move(G,x,U,$){return super._move((0,p.getMapForWordSeparators)(T.EditorOptions.wordSeparators.defaultValue),x,U,$)}}e.CursorWordAccessibilityRightSelect=A;class O extends w.EditorCommand{constructor(G){super(G);this._whitespaceHeuristics=G.whitespaceHeuristics,this._wordNavigationType=G.wordNavigationType}runEditorCommand(G,x,U){if(!x.hasModel())return;const $=(0,p.getMapForWordSeparators)(x.getOption(115)),V=x.getModel(),Q=x.getSelections(),ue=x.getOption(5),pe=x.getOption(8),fe=s.LanguageConfigurationRegistry.getAutoClosingPairs(V.getLanguageId()),re=x._getViewModel(),ie=Q.map(ae=>{const q=this._delete({wordSeparators:$,model:V,selection:ae,whitespaceHeuristics:this._whitespaceHeuristics,autoClosingDelete:x.getOption(6),autoClosingBrackets:ue,autoClosingQuotes:pe,autoClosingPairs:fe,autoClosedCharacters:re.getCursorAutoClosedCharacters()},this._wordNavigationType);return new N.ReplaceCommand(q,"")});x.pushUndoStop(),x.executeCommands(this.id,ie),x.pushUndoStop()}}e.DeleteWordCommand=O;class L extends O{_delete(G,x){let U=S.WordOperations.deleteWordLeft(G,x);return U||new n.Range(1,1,1,1)}}e.DeleteWordLeftCommand=L;class B extends O{_delete(G,x){let U=S.WordOperations.deleteWordRight(G,x);if(U)return U;const $=G.model.getLineCount(),V=G.model.getLineMaxColumn($);return new n.Range($,V,$,V)}}e.DeleteWordRightCommand=B;class W extends L{constructor(){super({whitespaceHeuristics:!1,wordNavigationType:0,id:"deleteWordStartLeft",precondition:t.EditorContextKeys.writable})}}e.DeleteWordStartLeft=W;class K extends L{constructor(){super({whitespaceHeuristics:!1,wordNavigationType:2,id:"deleteWordEndLeft",precondition:t.EditorContextKeys.writable})}}e.DeleteWordEndLeft=K;class H extends L{constructor(){super({whitespaceHeuristics:!0,wordNavigationType:0,id:"deleteWordLeft",precondition:t.EditorContextKeys.writable,kbOpts:{kbExpr:t.EditorContextKeys.textInputFocus,primary:2048|1,mac:{primary:512|1},weight:100}})}}e.DeleteWordLeft=H;class Y extends B{constructor(){super({whitespaceHeuristics:!1,wordNavigationType:0,id:"deleteWordStartRight",precondition:t.EditorContextKeys.writable})}}e.DeleteWordStartRight=Y;class X extends B{constructor(){super({whitespaceHeuristics:!1,wordNavigationType:2,id:"deleteWordEndRight",precondition:t.EditorContextKeys.writable})}}e.DeleteWordEndRight=X;class Z extends B{constructor(){super({whitespaceHeuristics:!0,wordNavigationType:2,id:"deleteWordRight",precondition:t.EditorContextKeys.writable,kbOpts:{kbExpr:t.EditorContextKeys.textInputFocus,primary:2048|20,mac:{primary:512|20},weight:100}})}}e.DeleteWordRight=Z;class se extends w.EditorAction{constructor(){super({id:"deleteInsideWord",precondition:t.EditorContextKeys.writable,label:c.localize(0,null),alias:"Delete Word"})}run(G,x,U){if(!x.hasModel())return;const $=(0,p.getMapForWordSeparators)(x.getOption(115)),V=x.getModel(),ue=x.getSelections().map(pe=>{const fe=S.WordOperations.deleteInsideWord($,V,pe);return new N.ReplaceCommand(fe,"")});x.pushUndoStop(),x.executeCommands(this.id,ue),x.pushUndoStop()}}e.DeleteInsideWord=se,(0,w.registerEditorCommand)(new l),(0,w.registerEditorCommand)(new h),(0,w.registerEditorCommand)(new f),(0,w.registerEditorCommand)(new y),(0,w.registerEditorCommand)(new _),(0,w.registerEditorCommand)(new b),(0,w.registerEditorCommand)(new E),(0,w.registerEditorCommand)(new I),(0,w.registerEditorCommand)(new k),(0,w.registerEditorCommand)(new M),(0,w.registerEditorCommand)(new P),(0,w.registerEditorCommand)(new F),(0,w.registerEditorCommand)(new v),(0,w.registerEditorCommand)(new m),(0,w.registerEditorCommand)(new R),(0,w.registerEditorCommand)(new A),(0,w.registerEditorCommand)(new W),(0,w.registerEditorCommand)(new K),(0,w.registerEditorCommand)(new H),(0,w.registerEditorCommand)(new Y),(0,w.registerEditorCommand)(new X),(0,w.registerEditorCommand)(new Z),(0,w.registerEditorAction)(se)}),define(J[696],ee([0,1,16,155,3,25,285,26]),function(j,e,w,N,T,D,S,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CursorWordPartRightSelect=e.CursorWordPartRight=e.WordPartRightCommand=e.CursorWordPartLeftSelect=e.CursorWordPartLeft=e.WordPartLeftCommand=e.DeleteWordPartRight=e.DeleteWordPartLeft=void 0;class C extends S.DeleteWordCommand{constructor(){super({whitespaceHeuristics:!0,wordNavigationType:0,id:"deleteWordPartLeft",precondition:D.EditorContextKeys.writable,kbOpts:{kbExpr:D.EditorContextKeys.textInputFocus,primary:0,mac:{primary:256|512|1},weight:100}})}_delete(r,o){let i=N.WordPartOperations.deleteWordPartLeft(r);return i||new T.Range(1,1,1,1)}}e.DeleteWordPartLeft=C;class n extends S.DeleteWordCommand{constructor(){super({whitespaceHeuristics:!0,wordNavigationType:2,id:"deleteWordPartRight",precondition:D.EditorContextKeys.writable,kbOpts:{kbExpr:D.EditorContextKeys.textInputFocus,primary:0,mac:{primary:256|512|20},weight:100}})}_delete(r,o){let i=N.WordPartOperations.deleteWordPartRight(r);if(i)return i;const l=r.model.getLineCount(),h=r.model.getLineMaxColumn(l);return new T.Range(l,h,l,h)}}e.DeleteWordPartRight=n;class g extends S.MoveWordCommand{_move(r,o,i,l){return N.WordPartOperations.moveWordPartLeft(r,o,i)}}e.WordPartLeftCommand=g;class t extends g{constructor(){super({inSelectionMode:!1,wordNavigationType:0,id:"cursorWordPartLeft",precondition:void 0,kbOpts:{kbExpr:D.EditorContextKeys.textInputFocus,primary:0,mac:{primary:256|512|15},weight:100}})}}e.CursorWordPartLeft=t,p.CommandsRegistry.registerCommandAlias("cursorWordPartStartLeft","cursorWordPartLeft");class s extends g{constructor(){super({inSelectionMode:!0,wordNavigationType:0,id:"cursorWordPartLeftSelect",precondition:void 0,kbOpts:{kbExpr:D.EditorContextKeys.textInputFocus,primary:0,mac:{primary:256|512|1024|15},weight:100}})}}e.CursorWordPartLeftSelect=s,p.CommandsRegistry.registerCommandAlias("cursorWordPartStartLeftSelect","cursorWordPartLeftSelect");class c extends S.MoveWordCommand{_move(r,o,i,l){return N.WordPartOperations.moveWordPartRight(r,o,i)}}e.WordPartRightCommand=c;class u extends c{constructor(){super({inSelectionMode:!1,wordNavigationType:2,id:"cursorWordPartRight",precondition:void 0,kbOpts:{kbExpr:D.EditorContextKeys.textInputFocus,primary:0,mac:{primary:256|512|17},weight:100}})}}e.CursorWordPartRight=u;class d extends c{constructor(){super({inSelectionMode:!0,wordNavigationType:2,id:"cursorWordPartRightSelect",precondition:void 0,kbOpts:{kbExpr:D.EditorContextKeys.textInputFocus,primary:0,mac:{primary:256|512|1024|17},weight:100}})}}e.CursorWordPartRightSelect=d,(0,w.registerEditorCommand)(new C),(0,w.registerEditorCommand)(new n),(0,w.registerEditorCommand)(new t),(0,w.registerEditorCommand)(new s),(0,w.registerEditorCommand)(new u),(0,w.registerEditorCommand)(new d)}),define(J[697],ee([0,1,7,110,29,131,2,38,3,32,373]),function(j,e,w,N,T,D,S,p,C,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ZoneWidget=e.OverlayWidgetDelegate=e.ViewZoneDelegate=void 0;const g=new T.Color(new T.RGBA(0,122,204)),t={showArrow:!0,showFrame:!0,className:"",frameColor:g,arrowColor:g,keepEditorSelection:!1},s="vs.editor.contrib.zoneWidget";class c{constructor(o,i,l,h,f,y){this.id="",this.domNode=o,this.afterLineNumber=i,this.afterColumn=l,this.heightInLines=h,this._onDomNodeTop=f,this._onComputedHeight=y}onDomNodeTop(o){this._onDomNodeTop(o)}onComputedHeight(o){this._onComputedHeight(o)}}e.ViewZoneDelegate=c;class u{constructor(o,i){this._id=o,this._domNode=i}getId(){return this._id}getDomNode(){return this._domNode}getPosition(){return null}}e.OverlayWidgetDelegate=u;class d{constructor(o){this._editor=o,this._ruleName=d._IdGenerator.nextId(),this._decorations=[],this._color=null,this._height=-1}dispose(){this.hide(),w.removeCSSRulesContainingSelector(this._ruleName)}set color(o){this._color!==o&&(this._color=o,this._updateStyle())}set height(o){this._height!==o&&(this._height=o,this._updateStyle())}_updateStyle(){w.removeCSSRulesContainingSelector(this._ruleName),w.createCSSRule(`.monaco-editor ${this._ruleName}`,`border-style: solid; border-color: transparent; border-bottom-color: ${this._color}; border-width: ${this._height}px; bottom: -${this._height}px; margin-left: -${this._height}px; `)}show(o){this._decorations=this._editor.deltaDecorations(this._decorations,[{range:C.Range.fromPositions(o),options:{description:"zone-widget-arrow",className:this._ruleName,stickiness:1}}])}hide(){this._editor.deltaDecorations(this._decorations,[])}}d._IdGenerator=new D.IdGenerator(".arrow-decoration-");class a{constructor(o,i={}){this._arrow=null,this._overlayWidget=null,this._resizeSash=null,this._positionMarkerId=[],this._viewZone=null,this._disposables=new S.DisposableStore,this.container=null,this._isShowing=!1,this.editor=o,this.options=p.deepClone(i),p.mixin(this.options,t,!1),this.domNode=document.createElement("div"),this.options.isAccessible||(this.domNode.setAttribute("aria-hidden","true"),this.domNode.setAttribute("role","presentation")),this._disposables.add(this.editor.onDidLayoutChange(l=>{const h=this._getWidth(l);this.domNode.style.width=h+"px",this.domNode.style.left=this._getLeft(l)+"px",this._onWidth(h)}))}dispose(){this._overlayWidget&&(this.editor.removeOverlayWidget(this._overlayWidget),this._overlayWidget=null),this._viewZone&&this.editor.changeViewZones(o=>{this._viewZone&&o.removeZone(this._viewZone.id),this._viewZone=null}),this.editor.deltaDecorations(this._positionMarkerId,[]),this._positionMarkerId=[],this._disposables.dispose()}create(){this.domNode.classList.add("zone-widget"),this.options.className&&this.domNode.classList.add(this.options.className),this.container=document.createElement("div"),this.container.classList.add("zone-widget-container"),this.domNode.appendChild(this.container),this.options.showArrow&&(this._arrow=new d(this.editor),this._disposables.add(this._arrow)),this._fillContainer(this.container),this._initSash(),this._applyStyles()}style(o){o.frameColor&&(this.options.frameColor=o.frameColor),o.arrowColor&&(this.options.arrowColor=o.arrowColor),this._applyStyles()}_applyStyles(){if(this.container&&this.options.frameColor){let o=this.options.frameColor.toString();this.container.style.borderTopColor=o,this.container.style.borderBottomColor=o}if(this._arrow&&this.options.arrowColor){let o=this.options.arrowColor.toString();this._arrow.color=o}}_getWidth(o){return o.width-o.minimap.minimapWidth-o.verticalScrollbarWidth}_getLeft(o){return o.minimap.minimapWidth>0&&o.minimap.minimapLeft===0?o.minimap.minimapWidth:0}_onViewZoneTop(o){this.domNode.style.top=o+"px"}_onViewZoneHeight(o){if(this.domNode.style.height=`${o}px`,this.container){let i=o-this._decoratingElementsHeight();this.container.style.height=`${i}px`;const l=this.editor.getLayoutInfo();this._doLayout(i,this._getWidth(l))}this._resizeSash&&this._resizeSash.layout()}get position(){const[o]=this._positionMarkerId;if(!o)return;const i=this.editor.getModel();if(!i)return;const l=i.getDecorationRange(o);if(!!l)return l.getStartPosition()}show(o,i){const l=C.Range.isIRange(o)?C.Range.lift(o):C.Range.fromPositions(o);this._isShowing=!0,this._showImpl(l,i),this._isShowing=!1,this._positionMarkerId=this.editor.deltaDecorations(this._positionMarkerId,[{range:l,options:n.ModelDecorationOptions.EMPTY}])}hide(){this._viewZone&&(this.editor.changeViewZones(o=>{this._viewZone&&o.removeZone(this._viewZone.id)}),this._viewZone=null),this._overlayWidget&&(this.editor.removeOverlayWidget(this._overlayWidget),this._overlayWidget=null),this._arrow&&this._arrow.hide()}_decoratingElementsHeight(){let o=this.editor.getOption(58),i=0;if(this.options.showArrow){let l=Math.round(o/3);i+=2*l}if(this.options.showFrame){let l=Math.round(o/9);i+=2*l}return i}_showImpl(o,i){const l=o.getStartPosition(),h=this.editor.getLayoutInfo(),f=this._getWidth(h);this.domNode.style.width=`${f}px`,this.domNode.style.left=this._getLeft(h)+"px";const y=document.createElement("div");y.style.overflow="hidden";const _=this.editor.getOption(58),b=Math.max(12,this.editor.getLayoutInfo().height/_*.8);i=Math.min(i,b);let v=0,m=0;if(this._arrow&&this.options.showArrow&&(v=Math.round(_/3),this._arrow.height=v,this._arrow.show(l)),this.options.showFrame&&(m=Math.round(_/9)),this.editor.changeViewZones(k=>{this._viewZone&&k.removeZone(this._viewZone.id),this._overlayWidget&&(this.editor.removeOverlayWidget(this._overlayWidget),this._overlayWidget=null),this.domNode.style.top="-1000px",this._viewZone=new c(y,l.lineNumber,l.column,i,M=>this._onViewZoneTop(M),M=>this._onViewZoneHeight(M)),this._viewZone.id=k.addZone(this._viewZone),this._overlayWidget=new u(s+this._viewZone.id,this.domNode),this.editor.addOverlayWidget(this._overlayWidget)}),this.container&&this.options.showFrame){const k=this.options.frameWidth?this.options.frameWidth:m;this.container.style.borderTopWidth=k+"px",this.container.style.borderBottomWidth=k+"px"}let E=i*_-this._decoratingElementsHeight();this.container&&(this.container.style.top=v+"px",this.container.style.height=E+"px",this.container.style.overflow="hidden"),this._doLayout(E,f),this.options.keepEditorSelection||this.editor.setSelection(o);const I=this.editor.getModel();if(I){const k=o.endLineNumber+1;k<=I.getLineCount()?this.revealLine(k,!1):this.revealLine(I.getLineCount(),!0)}}revealLine(o,i){i?this.editor.revealLineInCenter(o,0):this.editor.revealLine(o,0)}setCssClass(o,i){!this.container||(i&&this.container.classList.remove(i),this.container.classList.add(o))}_onWidth(o){}_doLayout(o,i){}_relayout(o){this._viewZone&&this._viewZone.heightInLines!==o&&this.editor.changeViewZones(i=>{this._viewZone&&(this._viewZone.heightInLines=o,i.layoutZone(this._viewZone.id))})}_initSash(){if(this._resizeSash)return;this._resizeSash=this._disposables.add(new N.Sash(this.domNode,this,{orientation:1})),this.options.isResizeable||(this._resizeSash.hide(),this._resizeSash.state=0);let o;this._disposables.add(this._resizeSash.onDidStart(i=>{this._viewZone&&(o={startY:i.startY,heightInLines:this._viewZone.heightInLines})})),this._disposables.add(this._resizeSash.onDidEnd(()=>{o=void 0})),this._disposables.add(this._resizeSash.onDidChange(i=>{if(o){let l=(i.currentY-o.startY)/this.editor.getOption(58),h=l<0?Math.ceil(l):Math.floor(l),f=o.heightInLines+h;f>5&&f<35&&this._relayout(f)}}))}getHorizontalSashLeft(){return 0}getHorizontalSashTop(){return(this.domNode.style.height===null?0:parseInt(this.domNode.style.height))-this._decoratingElementsHeight()/2}getHorizontalSashWidth(){const o=this.editor.getLayoutInfo();return o.width-o.minimap.minimapWidth}}e.ZoneWidget=a}),define(J[130],ee([0,1,7,86,51,27,29,4,38,16,28,158,697,524,194,15,70,9,21,369]),function(j,e,w,N,T,D,S,p,C,n,g,t,s,c,u,d,a,r,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.peekViewEditorMatchHighlightBorder=e.peekViewEditorMatchHighlight=e.peekViewResultsMatchHighlight=e.peekViewEditorGutterBackground=e.peekViewEditorBackground=e.peekViewResultsSelectionForeground=e.peekViewResultsSelectionBackground=e.peekViewResultsFileForeground=e.peekViewResultsMatchForeground=e.peekViewResultsBackground=e.peekViewBorder=e.peekViewTitleInfoForeground=e.peekViewTitleForeground=e.peekViewTitleBackground=e.PeekViewWidget=e.getOuterEditor=e.PeekContext=e.IPeekViewService=void 0,e.IPeekViewService=(0,r.createDecorator)("IPeekViewService"),(0,a.registerSingleton)(e.IPeekViewService,class{constructor(){this._widgets=new Map}addExclusiveWidget(_,b){const v=this._widgets.get(_);v&&(v.listener.dispose(),v.widget.dispose());const m=()=>{const E=this._widgets.get(_);E&&E.widget===b&&(E.listener.dispose(),this._widgets.delete(_))};this._widgets.set(_,{widget:b,listener:b.onDidClose(m)})}});var i;(function(_){_.inPeekEditor=new d.RawContextKey("inReferenceSearchEditor",!0,c.localize(0,null)),_.notInPeekEditor=_.inPeekEditor.toNegated()})(i=e.PeekContext||(e.PeekContext={}));let l=class{constructor(b,v){b instanceof t.EmbeddedCodeEditorWidget&&i.inPeekEditor.bindTo(v)}dispose(){}};l.ID="editor.contrib.referenceController",l=Fe([Ce(1,d.IContextKeyService)],l),(0,n.registerEditorContribution)(l.ID,l);function h(_){let b=_.get(g.ICodeEditorService).getFocusedCodeEditor();return b instanceof t.EmbeddedCodeEditorWidget?b.getParentEditor():b}e.getOuterEditor=h;const f={headerBackgroundColor:S.Color.white,primaryHeadingColor:S.Color.fromHex("#333333"),secondaryHeadingColor:S.Color.fromHex("#6c6c6cb3")};let y=class extends s.ZoneWidget{constructor(b,v,m){super(b,v);this.instantiationService=m,this._onDidClose=new p.Emitter,this.onDidClose=this._onDidClose.event,C.mixin(this.options,f,!1)}dispose(){this.disposed||(this.disposed=!0,super.dispose(),this._onDidClose.fire(this))}style(b){let v=this.options;b.headerBackgroundColor&&(v.headerBackgroundColor=b.headerBackgroundColor),b.primaryHeadingColor&&(v.primaryHeadingColor=b.primaryHeadingColor),b.secondaryHeadingColor&&(v.secondaryHeadingColor=b.secondaryHeadingColor),super.style(b)}_applyStyles(){super._applyStyles();let b=this.options;this._headElement&&b.headerBackgroundColor&&(this._headElement.style.backgroundColor=b.headerBackgroundColor.toString()),this._primaryHeading&&b.primaryHeadingColor&&(this._primaryHeading.style.color=b.primaryHeadingColor.toString()),this._secondaryHeading&&b.secondaryHeadingColor&&(this._secondaryHeading.style.color=b.secondaryHeadingColor.toString()),this._bodyElement&&b.frameColor&&(this._bodyElement.style.borderColor=b.frameColor.toString())}_fillContainer(b){this.setCssClass("peekview-widget"),this._headElement=w.$(".head"),this._bodyElement=w.$(".body"),this._fillHead(this._headElement),this._fillBody(this._bodyElement),b.appendChild(this._headElement),b.appendChild(this._bodyElement)}_fillHead(b,v){const m=w.$(".peekview-title");this.options.supportOnTitleClick&&(m.classList.add("clickable"),w.addStandardDisposableListener(m,"click",k=>this._onTitleClick(k))),w.append(this._headElement,m),this._fillTitleIcon(m),this._primaryHeading=w.$("span.filename"),this._secondaryHeading=w.$("span.dirname"),this._metaHeading=w.$("span.meta"),w.append(m,this._primaryHeading,this._secondaryHeading,this._metaHeading);const E=w.$(".peekview-actions");w.append(this._headElement,E);const I=this._getActionBarOptions();this._actionbarWidget=new N.ActionBar(E,I),this._disposables.add(this._actionbarWidget),v||this._actionbarWidget.push(new T.Action("peekview.close",c.localize(1,null),D.Codicon.close.classNames,!0,()=>(this.dispose(),Promise.resolve())),{label:!1,icon:!0})}_fillTitleIcon(b){}_getActionBarOptions(){return{actionViewItemProvider:u.createActionViewItem.bind(void 0,this.instantiationService),orientation:0}}_onTitleClick(b){}setTitle(b,v){this._primaryHeading&&this._secondaryHeading&&(this._primaryHeading.innerText=b,this._primaryHeading.setAttribute("title",b),v?this._secondaryHeading.innerText=v:w.clearNode(this._secondaryHeading))}setMetaTitle(b){this._metaHeading&&(b?(this._metaHeading.innerText=b,w.show(this._metaHeading)):w.hide(this._metaHeading))}_doLayout(b,v){if(!this._isShowing&&b<0){this.dispose();return}const m=Math.ceil(this.editor.getOption(58)*1.2),E=Math.round(b-(m+2));this._doLayoutHead(m,v),this._doLayoutBody(E,v)}_doLayoutHead(b,v){this._headElement&&(this._headElement.style.height=`${b}px`,this._headElement.style.lineHeight=this._headElement.style.height)}_doLayoutBody(b,v){this._bodyElement&&(this._bodyElement.style.height=`${b}px`)}};y=Fe([Ce(2,r.IInstantiationService)],y),e.PeekViewWidget=y,e.peekViewTitleBackground=(0,o.registerColor)("peekViewTitle.background",{dark:(0,o.transparent)(o.editorInfoForeground,.1),light:(0,o.transparent)(o.editorInfoForeground,.1),hc:null},c.localize(2,null)),e.peekViewTitleForeground=(0,o.registerColor)("peekViewTitleLabel.foreground",{dark:S.Color.white,light:S.Color.black,hc:S.Color.white},c.localize(3,null)),e.peekViewTitleInfoForeground=(0,o.registerColor)("peekViewTitleDescription.foreground",{dark:"#ccccccb3",light:"#616161",hc:"#FFFFFF99"},c.localize(4,null)),e.peekViewBorder=(0,o.registerColor)("peekView.border",{dark:o.editorInfoForeground,light:o.editorInfoForeground,hc:o.contrastBorder},c.localize(5,null)),e.peekViewResultsBackground=(0,o.registerColor)("peekViewResult.background",{dark:"#252526",light:"#F3F3F3",hc:S.Color.black},c.localize(6,null)),e.peekViewResultsMatchForeground=(0,o.registerColor)("peekViewResult.lineForeground",{dark:"#bbbbbb",light:"#646465",hc:S.Color.white},c.localize(7,null)),e.peekViewResultsFileForeground=(0,o.registerColor)("peekViewResult.fileForeground",{dark:S.Color.white,light:"#1E1E1E",hc:S.Color.white},c.localize(8,null)),e.peekViewResultsSelectionBackground=(0,o.registerColor)("peekViewResult.selectionBackground",{dark:"#3399ff33",light:"#3399ff33",hc:null},c.localize(9,null)),e.peekViewResultsSelectionForeground=(0,o.registerColor)("peekViewResult.selectionForeground",{dark:S.Color.white,light:"#6C6C6C",hc:S.Color.white},c.localize(10,null)),e.peekViewEditorBackground=(0,o.registerColor)("peekViewEditor.background",{dark:"#001F33",light:"#F2F8FC",hc:S.Color.black},c.localize(11,null)),e.peekViewEditorGutterBackground=(0,o.registerColor)("peekViewEditorGutter.background",{dark:e.peekViewEditorBackground,light:e.peekViewEditorBackground,hc:e.peekViewEditorBackground},c.localize(12,null)),e.peekViewResultsMatchHighlight=(0,o.registerColor)("peekViewResult.matchHighlightBackground",{dark:"#ea5c004d",light:"#ea5c004d",hc:null},c.localize(13,null)),e.peekViewEditorMatchHighlight=(0,o.registerColor)("peekViewEditor.matchHighlightBackground",{dark:"#ff8f0099",light:"#f5d802de",hc:null},c.localize(14,null)),e.peekViewEditorMatchHighlightBorder=(0,o.registerColor)("peekViewEditor.matchHighlightBorder",{dark:null,light:null,hc:o.activeContrastBorder},c.localize(15,null))}),define(J[698],ee([0,1,7,64,19,29,4,168,2,44,8,3,130,502,194,35,15,9,125,89,57,652,21,10,362]),function(j,e,w,N,T,D,S,p,C,n,g,t,s,c,u,d,a,r,o,i,l,h,f,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.editorMarkerNavigationBackground=e.editorMarkerNavigationInfoHeader=e.editorMarkerNavigationInfo=e.editorMarkerNavigationWarningHeader=e.editorMarkerNavigationWarning=e.editorMarkerNavigationErrorHeader=e.editorMarkerNavigationError=e.MarkerNavigationWidget=void 0;class _{constructor(k,M,P,F,R){this._openerService=F,this._labelService=R,this._lines=0,this._longestLineLength=0,this._relatedDiagnostics=new WeakMap,this._disposables=new C.DisposableStore,this._editor=M;const A=document.createElement("div");A.className="descriptioncontainer",this._messageBlock=document.createElement("div"),this._messageBlock.classList.add("message"),this._messageBlock.setAttribute("aria-live","assertive"),this._messageBlock.setAttribute("role","alert"),A.appendChild(this._messageBlock),this._relatedBlock=document.createElement("div"),A.appendChild(this._relatedBlock),this._disposables.add(w.addStandardDisposableListener(this._relatedBlock,"click",O=>{O.preventDefault();const L=this._relatedDiagnostics.get(O.target);L&&P(L)})),this._scrollable=new N.ScrollableElement(A,{horizontal:1,vertical:1,useShadows:!1,horizontalScrollbarSize:3,verticalScrollbarSize:3}),k.appendChild(this._scrollable.getDomNode()),this._disposables.add(this._scrollable.onScroll(O=>{A.style.left=`-${O.scrollLeft}px`,A.style.top=`-${O.scrollTop}px`})),this._disposables.add(this._scrollable)}dispose(){(0,C.dispose)(this._disposables)}update(k){const{source:M,message:P,relatedInformation:F,code:R}=k;let A=((M==null?void 0:M.length)||0)+"()".length;R&&(typeof R=="string"?A+=R.length:A+=R.value.length);const O=(0,g.splitLines)(P);this._lines=O.length,this._longestLineLength=0;for(const H of O)this._longestLineLength=Math.max(H.length+A,this._longestLineLength);w.clearNode(this._messageBlock),this._messageBlock.setAttribute("aria-label",this.getAriaLabel(k)),this._editor.applyFontInfo(this._messageBlock);let L=this._messageBlock;for(const H of O)L=document.createElement("div"),L.innerText=H,H===""&&(L.style.height=this._messageBlock.style.lineHeight),this._messageBlock.appendChild(L);if(M||R){const H=document.createElement("span");if(H.classList.add("details"),L.appendChild(H),M){const Y=document.createElement("span");Y.innerText=M,Y.classList.add("source"),H.appendChild(Y)}if(R)if(typeof R=="string"){const Y=document.createElement("span");Y.innerText=`(${R})`,Y.classList.add("code"),H.appendChild(Y)}else{this._codeLink=w.$("a.code-link"),this._codeLink.setAttribute("href",`${R.target.toString()}`),this._codeLink.onclick=X=>{this._openerService.open(R.target,{allowCommands:!0}),X.preventDefault(),X.stopPropagation()};const Y=w.append(this._codeLink,w.$("span"));Y.innerText=R.value,H.appendChild(this._codeLink)}}if(w.clearNode(this._relatedBlock),this._editor.applyFontInfo(this._relatedBlock),(0,T.isNonEmptyArray)(F)){const H=this._relatedBlock.appendChild(document.createElement("div"));H.style.paddingTop=`${Math.floor(this._editor.getOption(58)*.66)}px`,this._lines+=1;for(const Y of F){let X=document.createElement("div"),Z=document.createElement("a");Z.classList.add("filename"),Z.innerText=`${(0,p.getBaseLabel)(Y.resource)}(${Y.startLineNumber}, ${Y.startColumn}): `,Z.title=this._labelService.getUriLabel(Y.resource),this._relatedDiagnostics.set(Z,Y);let se=document.createElement("span");se.innerText=Y.message,X.appendChild(Z),X.appendChild(se),this._lines+=1,H.appendChild(X)}}const B=this._editor.getOption(43),W=Math.ceil(B.typicalFullwidthCharacterWidth*this._longestLineLength*.75),K=B.lineHeight*this._lines;this._scrollable.setScrollDimensions({scrollWidth:W,scrollHeight:K})}layout(k,M){this._scrollable.getDomNode().style.height=`${k}px`,this._scrollable.getDomNode().style.width=`${M}px`,this._scrollable.setScrollDimensions({width:M,height:k})}getHeightInLines(){return Math.min(17,this._lines)}getAriaLabel(k){let M="";switch(k.severity){case i.MarkerSeverity.Error:M=c.localize(0,null);break;case i.MarkerSeverity.Warning:M=c.localize(1,null);break;case i.MarkerSeverity.Info:M=c.localize(2,null);break;case i.MarkerSeverity.Hint:M=c.localize(3,null);break}let P=c.localize(4,null,M,k.startLineNumber+":"+k.startColumn);const F=this._editor.getModel();return F&&k.startLineNumber<=F.getLineCount()&&k.startLineNumber>=1&&(P=`${F.getLineContent(k.startLineNumber)}, ${P}`),P}}let b=class Ri extends s.PeekViewWidget{constructor(k,M,P,F,R,A,O){super(k,{showArrow:!0,showFrame:!0,isAccessible:!0,frameWidth:1},R);this._themeService=M,this._openerService=P,this._menuService=F,this._contextKeyService=A,this._labelService=O,this._callOnDispose=new C.DisposableStore,this._onDidSelectRelatedInformation=new S.Emitter,this.onDidSelectRelatedInformation=this._onDidSelectRelatedInformation.event,this._severity=i.MarkerSeverity.Warning,this._backgroundColor=D.Color.white,this._applyTheme(M.getColorTheme()),this._callOnDispose.add(M.onDidColorThemeChange(this._applyTheme.bind(this))),this.create()}_applyTheme(k){this._backgroundColor=k.getColor(e.editorMarkerNavigationBackground);let M=e.editorMarkerNavigationError,P=e.editorMarkerNavigationErrorHeader;this._severity===i.MarkerSeverity.Warning?(M=e.editorMarkerNavigationWarning,P=e.editorMarkerNavigationWarningHeader):this._severity===i.MarkerSeverity.Info&&(M=e.editorMarkerNavigationInfo,P=e.editorMarkerNavigationInfoHeader);const F=k.getColor(M),R=k.getColor(P);this.style({arrowColor:F,frameColor:F,headerBackgroundColor:R,primaryHeadingColor:k.getColor(s.peekViewTitleForeground),secondaryHeadingColor:k.getColor(s.peekViewTitleInfoForeground)})}_applyStyles(){this._parentContainer&&(this._parentContainer.style.backgroundColor=this._backgroundColor?this._backgroundColor.toString():""),super._applyStyles()}dispose(){this._callOnDispose.dispose(),super.dispose()}_fillHead(k){super._fillHead(k),this._disposables.add(this._actionbarWidget.actionRunner.onBeforeRun(F=>this.editor.focus()));const M=[],P=this._menuService.createMenu(Ri.TitleMenu,this._contextKeyService);(0,u.createAndFillInActionBarActions)(P,void 0,M),this._actionbarWidget.push(M,{label:!1,icon:!0,index:0}),P.dispose()}_fillTitleIcon(k){this._icon=w.append(k,w.$(""))}_fillBody(k){this._parentContainer=k,k.classList.add("marker-widget"),this._parentContainer.tabIndex=0,this._parentContainer.setAttribute("role","tooltip"),this._container=document.createElement("div"),k.appendChild(this._container),this._message=new _(this._container,this.editor,M=>this._onDidSelectRelatedInformation.fire(M),this._openerService,this._labelService),this._disposables.add(this._message)}show(){throw new Error("call showAtMarker")}showAtMarker(k,M,P){this._container.classList.remove("stale"),this._message.update(k),this._severity=k.severity,this._applyTheme(this._themeService.getColorTheme());let F=t.Range.lift(k);const R=this.editor.getPosition();let A=R&&F.containsPosition(R)?R:F.getStartPosition();super.show(A,this.computeRequiredHeight());const O=this.editor.getModel();if(O){const L=P>1?c.localize(5,null,M,P):c.localize(6,null,M,P);this.setTitle((0,n.basename)(O.uri),L)}this._icon.className=`codicon ${h.SeverityIcon.className(i.MarkerSeverity.toSeverity(this._severity))}`,this.editor.revealPositionNearTop(A,0),this.editor.focus()}updateMarker(k){this._container.classList.remove("stale"),this._message.update(k)}showStale(){this._container.classList.add("stale"),this._relayout()}_doLayoutBody(k,M){super._doLayoutBody(k,M),this._heightInPixel=k,this._message.layout(k,M),this._container.style.height=`${k}px`}_onWidth(k){this._message.layout(this._heightInPixel,k)}_relayout(){super._relayout(this.computeRequiredHeight())}computeRequiredHeight(){return 3+this._message.getHeightInLines()}};b.TitleMenu=new d.MenuId("gotoErrorTitleMenu"),b=Fe([Ce(1,y.IThemeService),Ce(2,l.IOpenerService),Ce(3,d.IMenuService),Ce(4,r.IInstantiationService),Ce(5,a.IContextKeyService),Ce(6,o.ILabelService)],b),e.MarkerNavigationWidget=b;let v=(0,f.oneOf)(f.editorErrorForeground,f.editorErrorBorder),m=(0,f.oneOf)(f.editorWarningForeground,f.editorWarningBorder),E=(0,f.oneOf)(f.editorInfoForeground,f.editorInfoBorder);e.editorMarkerNavigationError=(0,f.registerColor)("editorMarkerNavigationError.background",{dark:v,light:v,hc:f.contrastBorder},c.localize(7,null)),e.editorMarkerNavigationErrorHeader=(0,f.registerColor)("editorMarkerNavigationError.headerBackground",{dark:(0,f.transparent)(e.editorMarkerNavigationError,.1),light:(0,f.transparent)(e.editorMarkerNavigationError,.1),hc:null},c.localize(8,null)),e.editorMarkerNavigationWarning=(0,f.registerColor)("editorMarkerNavigationWarning.background",{dark:m,light:m,hc:f.contrastBorder},c.localize(9,null)),e.editorMarkerNavigationWarningHeader=(0,f.registerColor)("editorMarkerNavigationWarning.headerBackground",{dark:(0,f.transparent)(e.editorMarkerNavigationWarning,.1),light:(0,f.transparent)(e.editorMarkerNavigationWarning,.1),hc:"#0C141F"},c.localize(10,null)),e.editorMarkerNavigationInfo=(0,f.registerColor)("editorMarkerNavigationInfo.background",{dark:E,light:E,hc:f.contrastBorder},c.localize(11,null)),e.editorMarkerNavigationInfoHeader=(0,f.registerColor)("editorMarkerNavigationInfo.headerBackground",{dark:(0,f.transparent)(e.editorMarkerNavigationInfo,.1),light:(0,f.transparent)(e.editorMarkerNavigationInfo,.1),hc:null},c.localize(12,null)),e.editorMarkerNavigationBackground=(0,f.registerColor)("editorMarkerNavigation.background",{dark:f.editorBackground,light:f.editorBackground,hc:f.editorBackground},c.localize(13,null)),(0,y.registerThemingParticipant)((I,k)=>{const M=I.getColor(f.textLinkForeground);M&&k.addRule(`.monaco-editor .marker-widget a.code-link span { color: ${M}; }`);const P=I.getColor(f.textLinkActiveForeground);P&&k.addRule(`.monaco-editor .marker-widget a.code-link span:hover { color: ${P}; }`)})}),define(J[286],ee([0,1,27,2,16,28,13,3,25,576,501,35,15,9,81,698]),function(j,e,w,N,T,D,S,p,C,n,g,t,s,c,u,d){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NextMarkerAction=e.MarkerController=void 0;let a=class Ot{constructor(b,v,m,E,I){this._markerNavigationService=v,this._contextKeyService=m,this._editorService=E,this._instantiationService=I,this._sessionDispoables=new N.DisposableStore,this._editor=b,this._widgetVisible=f.bindTo(this._contextKeyService)}static get(b){return b.getContribution(Ot.ID)}dispose(){this._cleanUp(),this._sessionDispoables.dispose()}_cleanUp(){this._widgetVisible.reset(),this._sessionDispoables.clear(),this._widget=void 0,this._model=void 0}_getOrCreateModel(b){if(this._model&&this._model.matches(b))return this._model;let v=!1;return this._model&&(v=!0,this._cleanUp()),this._model=this._markerNavigationService.getMarkerList(b),v&&this._model.move(!0,this._editor.getModel(),this._editor.getPosition()),this._widget=this._instantiationService.createInstance(d.MarkerNavigationWidget,this._editor),this._widget.onDidClose(()=>this.close(),this,this._sessionDispoables),this._widgetVisible.set(!0),this._sessionDispoables.add(this._model),this._sessionDispoables.add(this._widget),this._sessionDispoables.add(this._editor.onDidChangeCursorPosition(m=>{var E,I,k;(!((E=this._model)===null||E===void 0?void 0:E.selected)||!p.Range.containsPosition((I=this._model)===null||I===void 0?void 0:I.selected.marker,m.position))&&((k=this._model)===null||k===void 0||k.resetIndex())})),this._sessionDispoables.add(this._model.onDidChange(()=>{if(!this._widget||!this._widget.position||!this._model)return;const m=this._model.find(this._editor.getModel().uri,this._widget.position);m?this._widget.updateMarker(m.marker):this._widget.showStale()})),this._sessionDispoables.add(this._widget.onDidSelectRelatedInformation(m=>{this._editorService.openCodeEditor({resource:m.resource,options:{pinned:!0,revealIfOpened:!0,selection:p.Range.lift(m).collapseToStart()}},this._editor),this.close(!1)})),this._sessionDispoables.add(this._editor.onDidChangeModel(()=>this._cleanUp())),this._model}close(b=!0){this._cleanUp(),b&&this._editor.focus()}showAtMarker(b){if(this._editor.hasModel()){const v=this._getOrCreateModel(this._editor.getModel().uri);v.resetIndex(),v.move(!0,this._editor.getModel(),new S.Position(b.startLineNumber,b.startColumn)),v.selected&&this._widget.showAtMarker(v.selected.marker,v.selected.index,v.selected.total)}}nagivate(b,v){return Re(this,void 0,void 0,function*(){if(this._editor.hasModel()){const m=this._getOrCreateModel(v?void 0:this._editor.getModel().uri);if(m.move(b,this._editor.getModel(),this._editor.getPosition()),!m.selected)return;if(m.selected.marker.resource.toString()!==this._editor.getModel().uri.toString()){this._cleanUp();const E=yield this._editorService.openCodeEditor({resource:m.selected.marker.resource,options:{pinned:!1,revealIfOpened:!0,selectionRevealType:2,selection:m.selected.marker}},this._editor);E&&(Ot.get(E).close(),Ot.get(E).nagivate(b,v))}else this._widget.showAtMarker(m.selected.marker,m.selected.index,m.selected.total)}})}};a.ID="editor.contrib.markerController",a=Fe([Ce(1,n.IMarkerNavigationService),Ce(2,s.IContextKeyService),Ce(3,D.ICodeEditorService),Ce(4,c.IInstantiationService)],a),e.MarkerController=a;class r extends T.EditorAction{constructor(b,v,m){super(m);this._next=b,this._multiFile=v}run(b,v){return Re(this,void 0,void 0,function*(){v.hasModel()&&a.get(v).nagivate(this._next,this._multiFile)})}}class o extends r{constructor(){super(!0,!1,{id:o.ID,label:o.LABEL,alias:"Go to Next Problem (Error, Warning, Info)",precondition:void 0,kbOpts:{kbExpr:C.EditorContextKeys.focus,primary:512|66,weight:100},menuOpts:{menuId:d.MarkerNavigationWidget.TitleMenu,title:o.LABEL,icon:(0,u.registerIcon)("marker-navigation-next",w.Codicon.arrowDown,g.localize(1,null)),group:"navigation",order:1}})}}e.NextMarkerAction=o,o.ID="editor.action.marker.next",o.LABEL=g.localize(0,null);class i extends r{constructor(){super(!1,!1,{id:i.ID,label:i.LABEL,alias:"Go to Previous Problem (Error, Warning, Info)",precondition:void 0,kbOpts:{kbExpr:C.EditorContextKeys.focus,primary:1024|512|66,weight:100},menuOpts:{menuId:d.MarkerNavigationWidget.TitleMenu,title:o.LABEL,icon:(0,u.registerIcon)("marker-navigation-previous",w.Codicon.arrowUp,g.localize(3,null)),group:"navigation",order:2}})}}i.ID="editor.action.marker.prev",i.LABEL=g.localize(2,null);class l extends r{constructor(){super(!0,!0,{id:"editor.action.marker.nextInFiles",label:g.localize(4,null),alias:"Go to Next Problem in Files (Error, Warning, Info)",precondition:void 0,kbOpts:{kbExpr:C.EditorContextKeys.focus,primary:66,weight:100},menuOpts:{menuId:t.MenuId.MenubarGoMenu,title:g.localize(5,null),group:"6_problem_nav",order:1}})}}class h extends r{constructor(){super(!1,!0,{id:"editor.action.marker.prevInFiles",label:g.localize(6,null),alias:"Go to Previous Problem in Files (Error, Warning, Info)",precondition:void 0,kbOpts:{kbExpr:C.EditorContextKeys.focus,primary:1024|66,weight:100},menuOpts:{menuId:t.MenuId.MenubarGoMenu,title:g.localize(7,null),group:"6_problem_nav",order:2}})}}(0,T.registerEditorContribution)(a.ID,a),(0,T.registerEditorAction)(o),(0,T.registerEditorAction)(i),(0,T.registerEditorAction)(l),(0,T.registerEditorAction)(h);const f=new s.RawContextKey("markersNavigationVisible",!1),y=T.EditorCommand.bindToContribution(a.get);(0,T.registerEditorCommand)(new y({id:"closeMarkersNavigation",precondition:f,handler:_=>_.close(),kbOpts:{weight:100+50,kbExpr:C.EditorContextKeys.focus,primary:9,secondary:[1024|9]}}))}),define(J[699],ee([0,1,7,221,29,4,2,48,44,158,3,32,37,39,66,614,130,507,9,40,125,154,21,10,129,122,364]),function(j,e,w,N,T,D,S,p,C,n,g,t,s,c,u,d,a,r,o,i,l,h,f,y,_,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ReferenceWidget=e.LayoutData=void 0;class v{constructor(M,P){this._editor=M,this._model=P,this._decorations=new Map,this._decorationIgnoreSet=new Set,this._callOnDispose=new S.DisposableStore,this._callOnModelChange=new S.DisposableStore,this._callOnDispose.add(this._editor.onDidChangeModel(()=>this._onModelChanged())),this._onModelChanged()}dispose(){this._callOnModelChange.dispose(),this._callOnDispose.dispose(),this.removeDecorations()}_onModelChanged(){this._callOnModelChange.clear();const M=this._editor.getModel();if(!!M){for(let P of this._model.references)if(P.uri.toString()===M.uri.toString()){this._addDecorations(P.parent);return}}}_addDecorations(M){if(!this._editor.hasModel())return;this._callOnModelChange.add(this._editor.getModel().onDidChangeDecorations(()=>this._onDecorationChanged()));const P=[],F=[];for(let A=0,O=M.children.length;A<O;A++){let L=M.children[A];this._decorationIgnoreSet.has(L.id)||L.uri.toString()===this._editor.getModel().uri.toString()&&(P.push({range:L.range,options:v.DecorationOptions}),F.push(A))}const R=this._editor.deltaDecorations([],P);for(let A=0;A<R.length;A++)this._decorations.set(R[A],M.children[F[A]])}_onDecorationChanged(){const M=[],P=this._editor.getModel();if(!!P){for(let[F,R]of this._decorations){const A=P.getDecorationRange(F);if(!A)continue;let O=!1;if(!g.Range.equalsRange(A,R.range)){if(g.Range.spansMultipleLines(A))O=!0;else{const L=R.range.endColumn-R.range.startColumn,B=A.endColumn-A.startColumn;L!==B&&(O=!0)}O?(this._decorationIgnoreSet.add(R.id),M.push(F)):R.range=A}}for(let F=0,R=M.length;F<R;F++)this._decorations.delete(M[F]);this._editor.deltaDecorations(M,[])}}removeDecorations(){this._editor.deltaDecorations([...this._decorations.keys()],[]),this._decorations.clear()}}v.DecorationOptions=t.ModelDecorationOptions.register({description:"reference-decoration",stickiness:1,className:"reference-decoration"});class m{constructor(){this.ratio=.7,this.heightInLines=18}static fromJSON(M){let P,F;try{const R=JSON.parse(M);P=R.ratio,F=R.heightInLines}catch(R){}return{ratio:P||.7,heightInLines:F||18}}}e.LayoutData=m;class E extends h.WorkbenchAsyncDataTree{}let I=class extends a.PeekViewWidget{constructor(M,P,F,R,A,O,L,B,W,K,H,Y){super(M,{showFrame:!1,showArrow:!0,isResizeable:!0,isAccessible:!0,supportOnTitleClick:!0},O);this._defaultTreeKeyboardSupport=P,this.layoutData=F,this._textModelResolverService=A,this._instantiationService=O,this._peekViewService=L,this._uriLabel=B,this._undoRedoService=W,this._keybindingService=K,this._modeService=H,this._languageConfigurationService=Y,this._disposeOnNewModel=new S.DisposableStore,this._callOnDispose=new S.DisposableStore,this._onDidSelectReference=new D.Emitter,this.onDidSelectReference=this._onDidSelectReference.event,this._dim=new w.Dimension(0,0),this._applyTheme(R.getColorTheme()),this._callOnDispose.add(R.onDidColorThemeChange(this._applyTheme.bind(this))),this._peekViewService.addExclusiveWidget(M,this),this.create()}dispose(){this.setModel(void 0),this._callOnDispose.dispose(),this._disposeOnNewModel.dispose(),(0,S.dispose)(this._preview),(0,S.dispose)(this._previewNotAvailableMessage),(0,S.dispose)(this._tree),(0,S.dispose)(this._previewModelReference),this._splitView.dispose(),super.dispose()}_applyTheme(M){const P=M.getColor(a.peekViewBorder)||T.Color.transparent;this.style({arrowColor:P,frameColor:P,headerBackgroundColor:M.getColor(a.peekViewTitleBackground)||T.Color.transparent,primaryHeadingColor:M.getColor(a.peekViewTitleForeground),secondaryHeadingColor:M.getColor(a.peekViewTitleInfoForeground)})}show(M){this.editor.revealRangeInCenterIfOutsideViewport(M,0),super.show(M,this.layoutData.heightInLines||18)}focusOnReferenceTree(){this._tree.domFocus()}focusOnPreviewEditor(){this._preview.focus()}isPreviewEditorFocused(){return this._preview.hasTextFocus()}_onTitleClick(M){this._preview&&this._preview.getModel()&&this._onDidSelectReference.fire({element:this._getFocusedReference(),kind:M.ctrlKey||M.metaKey||M.altKey?"side":"open",source:"title"})}_fillBody(M){this.setCssClass("reference-zone-widget"),this._messageContainer=w.append(M,w.$("div.messages")),w.hide(this._messageContainer),this._splitView=new N.SplitView(M,{orientation:1}),this._previewContainer=w.append(M,w.$("div.preview.inline"));let P={scrollBeyondLastLine:!1,scrollbar:{verticalScrollbarSize:14,horizontal:"auto",useShadows:!0,verticalHasArrows:!1,horizontalHasArrows:!1,alwaysConsumeMouseWheel:!1},overviewRulerLanes:2,fixedOverflowWidgets:!0,minimap:{enabled:!1}};this._preview=this._instantiationService.createInstance(n.EmbeddedCodeEditorWidget,this._previewContainer,P,this.editor),w.hide(this._previewContainer),this._previewNotAvailableMessage=new t.TextModel(r.localize(0,null),t.TextModel.DEFAULT_CREATION_OPTIONS,null,null,this._undoRedoService,this._modeService,this._languageConfigurationService),this._treeContainer=w.append(M,w.$("div.ref-tree.inline"));const F={keyboardSupport:this._defaultTreeKeyboardSupport,accessibilityProvider:new d.AccessibilityProvider,keyboardNavigationLabelProvider:this._instantiationService.createInstance(d.StringRepresentationProvider),identityProvider:new d.IdentityProvider,openOnSingleClick:!0,selectionNavigation:!0,overrideStyles:{listBackground:a.peekViewResultsBackground}};this._defaultTreeKeyboardSupport&&this._callOnDispose.add(w.addStandardDisposableListener(this._treeContainer,"keydown",A=>{A.equals(9)&&(this._keybindingService.dispatchEvent(A,A.target),A.stopPropagation())},!0)),this._tree=this._instantiationService.createInstance(E,"ReferencesWidget",this._treeContainer,new d.Delegate,[this._instantiationService.createInstance(d.FileReferencesRenderer),this._instantiationService.createInstance(d.OneReferenceRenderer)],this._instantiationService.createInstance(d.DataSource),F),this._splitView.addView({onDidChange:D.Event.None,element:this._previewContainer,minimumSize:200,maximumSize:Number.MAX_VALUE,layout:A=>{this._preview.layout({height:this._dim.height,width:A})}},N.Sizing.Distribute),this._splitView.addView({onDidChange:D.Event.None,element:this._treeContainer,minimumSize:100,maximumSize:Number.MAX_VALUE,layout:A=>{this._treeContainer.style.height=`${this._dim.height}px`,this._treeContainer.style.width=`${A}px`,this._tree.layout(this._dim.height,A)}},N.Sizing.Distribute),this._disposables.add(this._splitView.onDidSashChange(()=>{this._dim.width&&(this.layoutData.ratio=this._splitView.getViewSize(0)/this._dim.width)},void 0));let R=(A,O)=>{A instanceof b.OneReference&&(O==="show"&&this._revealReference(A,!1),this._onDidSelectReference.fire({element:A,kind:O,source:"tree"}))};this._tree.onDidOpen(A=>{A.sideBySide?R(A.element,"side"):A.editorOptions.pinned?R(A.element,"goto"):R(A.element,"show")}),w.hide(this._treeContainer)}_onWidth(M){this._dim&&this._doLayoutBody(this._dim.height,M)}_doLayoutBody(M,P){super._doLayoutBody(M,P),this._dim=new w.Dimension(P,M),this.layoutData.heightInLines=this._viewZone?this._viewZone.heightInLines:this.layoutData.heightInLines,this._splitView.layout(P),this._splitView.resizeView(0,P*this.layoutData.ratio)}setSelection(M){return this._revealReference(M,!0).then(()=>{!this._model||(this._tree.setSelection([M]),this._tree.setFocus([M]))})}setModel(M){return this._disposeOnNewModel.clear(),this._model=M,this._model?this._onNewModel():Promise.resolve()}_onNewModel(){return this._model?this._model.isEmpty?(this.setTitle(""),this._messageContainer.innerText=r.localize(1,null),w.show(this._messageContainer),Promise.resolve(void 0)):(w.hide(this._messageContainer),this._decorationsManager=new v(this._preview,this._model),this._disposeOnNewModel.add(this._decorationsManager),this._disposeOnNewModel.add(this._model.onDidChangeReferenceRange(M=>this._tree.rerender(M))),this._disposeOnNewModel.add(this._preview.onMouseDown(M=>{const{event:P,target:F}=M;if(P.detail!==2)return;const R=this._getFocusedReference();!R||this._onDidSelectReference.fire({element:{uri:R.uri,range:F.range},kind:P.ctrlKey||P.metaKey||P.altKey?"side":"open",source:"editor"})})),this.container.classList.add("results-loaded"),w.show(this._treeContainer),w.show(this._previewContainer),this._splitView.layout(this._dim.width),this.focusOnReferenceTree(),this._tree.setInput(this._model.groups.length===1?this._model.groups[0]:this._model)):Promise.resolve(void 0)}_getFocusedReference(){const[M]=this._tree.getFocus();if(M instanceof b.OneReference)return M;if(M instanceof b.FileReferences&&M.children.length>0)return M.children[0]}revealReference(M){return Re(this,void 0,void 0,function*(){yield this._revealReference(M,!1),this._onDidSelectReference.fire({element:M,kind:"goto",source:"tree"})})}_revealReference(M,P){return Re(this,void 0,void 0,function*(){if(this._revealedReference===M)return;this._revealedReference=M,M.uri.scheme!==p.Schemas.inMemory?this.setTitle((0,C.basenameOrAuthority)(M.uri),this._uriLabel.getUriLabel((0,C.dirname)(M.uri))):this.setTitle(r.localize(2,null));const F=this._textModelResolverService.createModelReference(M.uri);this._tree.getInput()===M.parent?this._tree.reveal(M):(P&&this._tree.reveal(M.parent),yield this._tree.expand(M.parent),this._tree.reveal(M));const R=yield F;if(!this._model){R.dispose();return}(0,S.dispose)(this._previewModelReference);const A=R.object;if(A){const O=this._preview.getModel()===A.textEditorModel?0:1,L=g.Range.lift(M.range).collapseToStart();this._previewModelReference=R,this._preview.setModel(A.textEditorModel),this._preview.setSelection(L),this._preview.revealRangeInCenter(L,O)}else this._preview.setModel(this._previewNotAvailableMessage),R.dispose()})}};I=Fe([Ce(3,y.IThemeService),Ce(4,u.ITextModelService),Ce(5,o.IInstantiationService),Ce(6,a.IPeekViewService),Ce(7,l.ILabelService),Ce(8,_.IUndoRedoService),Ce(9,i.IKeybindingService),Ce(10,c.IModeService),Ce(11,s.ILanguageConfigurationService)],I),e.ReferenceWidget=I,(0,y.registerThemingParticipant)((k,M)=>{const P=k.getColor(a.peekViewResultsMatchHighlight);P&&M.addRule(`.monaco-editor .reference-zone-widget .ref-tree .referenceMatch .highlight { background-color: ${P}; }`);const F=k.getColor(a.peekViewEditorMatchHighlight);F&&M.addRule(`.monaco-editor .reference-zone-widget .preview .reference-decoration { background-color: ${F}; }`);const R=k.getColor(a.peekViewEditorMatchHighlightBorder);R&&M.addRule(`.monaco-editor .reference-zone-widget .preview .reference-decoration { border: 2px solid ${R}; box-sizing: border-box; }`);const A=k.getColor(f.activeContrastBorder);A&&M.addRule(`.monaco-editor .reference-zone-widget .ref-tree .referenceMatch .highlight { border: 1px dotted ${A}; box-sizing: border-box; }`);const O=k.getColor(a.peekViewResultsBackground);O&&M.addRule(`.monaco-editor .reference-zone-widget .ref-tree { background-color: ${O}; }`);const L=k.getColor(a.peekViewResultsMatchForeground);L&&M.addRule(`.monaco-editor .reference-zone-widget .ref-tree { color: ${L}; }`);const B=k.getColor(a.peekViewResultsFileForeground);B&&M.addRule(`.monaco-editor .reference-zone-widget .ref-tree .reference-file { color: ${B}; }`);const W=k.getColor(a.peekViewResultsSelectionBackground);W&&M.addRule(`.monaco-editor .reference-zone-widget .ref-tree .monaco-list:focus .monaco-list-rows > .monaco-list-row.selected:not(.highlighted) { background-color: ${W}; }`);const K=k.getColor(a.peekViewResultsSelectionForeground);K&&M.addRule(`.monaco-editor .reference-zone-widget .ref-tree .monaco-list:focus .monaco-list-rows > .monaco-list-row.selected:not(.highlighted) { color: ${K} !important; }`);const H=k.getColor(a.peekViewEditorBackground);H&&M.addRule(`.monaco-editor .reference-zone-widget .preview .monaco-editor .monaco-editor-background,.monaco-editor .reference-zone-widget .preview .monaco-editor .inputarea.ime-input {    background-color: ${H};}`);const Y=k.getColor(a.peekViewEditorGutterBackground);Y&&M.addRule(`.monaco-editor .reference-zone-widget .preview .monaco-editor .margin {    background-color: ${Y};}`)})}),define(J[287],ee([0,1,14,11,55,2,28,13,3,130,505,26,41,15,9,80,154,36,73,122,699]),function(j,e,w,N,T,D,S,p,C,n,g,t,s,c,u,d,a,r,o,i,l){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ReferencesController=e.ctxReferenceSearchVisible=void 0,e.ctxReferenceSearchVisible=new c.RawContextKey("referenceSearchVisible",!1,g.localize(0,null));let h=class Zt{constructor(_,b,v,m,E,I,k,M){this._defaultTreeKeyboardSupport=_,this._editor=b,this._editorService=m,this._notificationService=E,this._instantiationService=I,this._storageService=k,this._configurationService=M,this._disposables=new D.DisposableStore,this._requestIdPool=0,this._ignoreModelChangeEvent=!1,this._referenceSearchVisible=e.ctxReferenceSearchVisible.bindTo(v)}static get(_){return _.getContribution(Zt.ID)}dispose(){var _,b;this._referenceSearchVisible.reset(),this._disposables.dispose(),(_=this._widget)===null||_===void 0||_.dispose(),(b=this._model)===null||b===void 0||b.dispose(),this._widget=void 0,this._model=void 0}toggleWidget(_,b,v){let m;if(this._widget&&(m=this._widget.position),this.closeWidget(),!!m&&_.containsPosition(m))return;this._peekMode=v,this._referenceSearchVisible.set(!0),this._disposables.add(this._editor.onDidChangeModelLanguage(()=>{this.closeWidget()})),this._disposables.add(this._editor.onDidChangeModel(()=>{this._ignoreModelChangeEvent||this.closeWidget()}));const E="peekViewLayout",I=l.LayoutData.fromJSON(this._storageService.get(E,0,"{}"));this._widget=this._instantiationService.createInstance(l.ReferenceWidget,this._editor,this._defaultTreeKeyboardSupport,I),this._widget.setTitle(g.localize(1,null)),this._widget.show(_),this._disposables.add(this._widget.onDidClose(()=>{b.cancel(),this._widget&&(this._storageService.store(E,JSON.stringify(this._widget.layoutData),0,1),this._widget=void 0),this.closeWidget()})),this._disposables.add(this._widget.onDidSelectReference(M=>{let{element:P,kind:F}=M;if(!!P)switch(F){case"open":(M.source!=="editor"||!this._configurationService.getValue("editor.stablePeek"))&&this.openReference(P,!1,!1);break;case"side":this.openReference(P,!0,!1);break;case"goto":v?this._gotoReference(P):this.openReference(P,!1,!0);break}}));const k=++this._requestIdPool;b.then(M=>{var P;if(k!==this._requestIdPool||!this._widget){M.dispose();return}return(P=this._model)===null||P===void 0||P.dispose(),this._model=M,this._widget.setModel(this._model).then(()=>{if(this._widget&&this._model&&this._editor.hasModel()){this._model.isEmpty?this._widget.setMetaTitle(""):this._widget.setMetaTitle(g.localize(2,null,this._model.title,this._model.references.length));let F=this._editor.getModel().uri,R=new p.Position(_.startLineNumber,_.startColumn),A=this._model.nearestReference(F,R);if(A)return this._widget.setSelection(A).then(()=>{this._widget&&this._editor.getOption(76)==="editor"&&this._widget.focusOnPreviewEditor()})}})},M=>{this._notificationService.error(M)})}changeFocusBetweenPreviewAndReferences(){!this._widget||(this._widget.isPreviewEditorFocused()?this._widget.focusOnReferenceTree():this._widget.focusOnPreviewEditor())}goToNextOrPreviousReference(_){return Re(this,void 0,void 0,function*(){if(!this._editor.hasModel()||!this._model||!this._widget)return;const b=this._widget.position;if(!b)return;const v=this._model.nearestReference(this._editor.getModel().uri,b);if(!v)return;const m=this._model.nextOrPreviousReference(v,_),E=this._editor.hasTextFocus(),I=this._widget.isPreviewEditorFocused();yield this._widget.setSelection(m),yield this._gotoReference(m),E?this._editor.focus():this._widget&&I&&this._widget.focusOnPreviewEditor()})}revealReference(_){return Re(this,void 0,void 0,function*(){!this._editor.hasModel()||!this._model||!this._widget||(yield this._widget.revealReference(_))})}closeWidget(_=!0){var b,v;(b=this._widget)===null||b===void 0||b.dispose(),(v=this._model)===null||v===void 0||v.dispose(),this._referenceSearchVisible.reset(),this._disposables.clear(),this._widget=void 0,this._model=void 0,_&&this._editor.focus(),this._requestIdPool+=1}_gotoReference(_){this._widget&&this._widget.hide(),this._ignoreModelChangeEvent=!0;const b=C.Range.lift(_.range).collapseToStart();return this._editorService.openCodeEditor({resource:_.uri,options:{selection:b}},this._editor).then(v=>{var m;if(this._ignoreModelChangeEvent=!1,!v||!this._widget){this.closeWidget();return}if(this._editor===v)this._widget.show(b),this._widget.focusOnReferenceTree();else{const E=Zt.get(v),I=this._model.clone();this.closeWidget(),v.focus(),E.toggleWidget(b,(0,w.createCancelablePromise)(k=>Promise.resolve(I)),(m=this._peekMode)!==null&&m!==void 0?m:!1)}},v=>{this._ignoreModelChangeEvent=!1,(0,N.onUnexpectedError)(v)})}openReference(_,b,v){b||this.closeWidget();const{uri:m,range:E}=_;this._editorService.openCodeEditor({resource:m,options:{selection:E,pinned:v}},this._editor,b)}};h.ID="editor.contrib.referencesController",h=Fe([Ce(2,c.IContextKeyService),Ce(3,S.ICodeEditorService),Ce(4,r.INotificationService),Ce(5,u.IInstantiationService),Ce(6,o.IStorageService),Ce(7,s.IConfigurationService)],h),e.ReferencesController=h;function f(y,_){const b=(0,n.getOuterEditor)(y);if(!b)return;let v=h.get(b);v&&_(v)}d.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"togglePeekWidgetFocus",weight:100,primary:(0,T.KeyChord)(2048|41,60),when:c.ContextKeyExpr.or(e.ctxReferenceSearchVisible,n.PeekContext.inPeekEditor),handler(y){f(y,_=>{_.changeFocusBetweenPreviewAndReferences()})}}),d.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"goToNextReference",weight:100-10,primary:62,secondary:[70],when:c.ContextKeyExpr.or(e.ctxReferenceSearchVisible,n.PeekContext.inPeekEditor),handler(y){f(y,_=>{_.goToNextOrPreviousReference(!0)})}}),d.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"goToPreviousReference",weight:100-10,primary:1024|62,secondary:[1024|70],when:c.ContextKeyExpr.or(e.ctxReferenceSearchVisible,n.PeekContext.inPeekEditor),handler(y){f(y,_=>{_.goToNextOrPreviousReference(!1)})}}),t.CommandsRegistry.registerCommandAlias("goToNextReferenceFromEmbeddedEditor","goToNextReference"),t.CommandsRegistry.registerCommandAlias("goToPreviousReferenceFromEmbeddedEditor","goToPreviousReference"),t.CommandsRegistry.registerCommandAlias("closeReferenceSearchEditor","closeReferenceSearch"),t.CommandsRegistry.registerCommand("closeReferenceSearch",y=>f(y,_=>_.closeWidget())),d.KeybindingsRegistry.registerKeybindingRule({id:"closeReferenceSearch",weight:100-101,primary:9,secondary:[1024|9],when:c.ContextKeyExpr.and(n.PeekContext.inPeekEditor,c.ContextKeyExpr.not("config.editor.stablePeek"))}),d.KeybindingsRegistry.registerKeybindingRule({id:"closeReferenceSearch",weight:200+50,primary:9,secondary:[1024|9],when:c.ContextKeyExpr.and(e.ctxReferenceSearchVisible,c.ContextKeyExpr.not("config.editor.stablePeek"))}),d.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"revealReference",weight:200,primary:3,mac:{primary:3,secondary:[2048|18]},when:c.ContextKeyExpr.and(e.ctxReferenceSearchVisible,a.WorkbenchListFocusContextKey),handler(y){var _;const v=(_=y.get(a.IListService).lastFocusedList)===null||_===void 0?void 0:_.getFocus();Array.isArray(v)&&v[0]instanceof i.OneReference&&f(y,m=>m.revealReference(v[0]))}}),d.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"openReferenceToSide",weight:100,primary:2048|3,mac:{primary:256|3},when:c.ContextKeyExpr.and(e.ctxReferenceSearchVisible,a.WorkbenchListFocusContextKey),handler(y){var _;const v=(_=y.get(a.IListService).lastFocusedList)===null||_===void 0?void 0:_.getFocus();Array.isArray(v)&&v[0]instanceof i.OneReference&&f(y,m=>m.openReference(v[0],!0,!0))}}),t.CommandsRegistry.registerCommand("openReference",y=>{var _;const v=(_=y.get(a.IListService).lastFocusedList)===null||_===void 0?void 0:_.getFocus();Array.isArray(v)&&v[0]instanceof i.OneReference&&f(y,m=>m.openReference(v[0],!1,!0))})}),define(J[288],ee([0,1,34,45,14,55,17,20,24,67,114,16,28,158,13,3,25,18,287,122,631,153,130,503,35,26,15,9,36,62,274]),function(j,e,w,N,T,D,S,p,C,n,g,t,s,c,u,d,a,r,o,i,l,h,f,y,_,b,v,m,E,I,k){"use strict";var M,P,F,R,A,O,L,B;Object.defineProperty(e,"__esModule",{value:!0}),e.DefinitionAction=void 0,_.MenuRegistry.appendMenuItem(_.MenuId.EditorContext,{submenu:_.MenuId.EditorContextPeek,title:y.localize(0,null),group:"navigation",order:100});const W=new Set;function K(U){const $=new U;return(0,t.registerInstantiatedEditorAction)($),W.add($.id),$}class H extends t.EditorAction{constructor($,V){super(V);this._configuration=$}run($,V){if(!V.hasModel())return Promise.resolve(void 0);const Q=$.get(E.INotificationService),ue=$.get(s.ICodeEditorService),pe=$.get(I.IEditorProgressService),fe=$.get(l.ISymbolNavigationService),re=V.getModel(),ie=V.getPosition(),ae=new n.EditorStateCancellationTokenSource(V,1|4),q=(0,T.raceCancellation)(this._getLocationModel(re,ie,ae.token),ae.token).then(ne=>Re(this,void 0,void 0,function*(){if(!ne||ae.token.isCancellationRequested)return;(0,N.alert)(ne.ariaMessage);let ce;if(ne.referenceAt(re.uri,ie)){const de=this._getAlternativeCommand(V);de!==this.id&&W.has(de)&&(ce=V.getAction(de))}const le=ne.references.length;if(le===0){if(!this._configuration.muteMessage){const de=re.getWordAtPosition(ie);h.MessageController.get(V).showMessage(this._getNoResultFoundMessage(de),ie)}}else if(le===1&&ce)ce.run();else return this._onResult(ue,fe,V,ne)}),ne=>{Q.error(ne)}).finally(()=>{ae.dispose()});return pe.showWhile(q,250),q}_onResult($,V,Q,ue){return Re(this,void 0,void 0,function*(){const pe=this._getGoToPreference(Q);if(!(Q instanceof c.EmbeddedCodeEditorWidget)&&(this._configuration.openInPeek||pe==="peek"&&ue.references.length>1))this._openInPeek(Q,ue);else{const fe=ue.firstReference(),re=ue.references.length>1&&pe==="gotoAndPeek",ie=yield this._openReference(Q,$,fe,this._configuration.openToSide,!re);re&&ie?this._openInPeek(ie,ue):ue.dispose(),pe==="goto"&&V.put(fe)}})}_openReference($,V,Q,ue,pe){return Re(this,void 0,void 0,function*(){let fe;if((0,r.isLocationLink)(Q)&&(fe=Q.targetSelectionRange),fe||(fe=Q.range),!fe)return;const re=yield V.openCodeEditor({resource:Q.uri,options:{selection:d.Range.collapseToStart(fe),selectionRevealType:3}},$,ue);if(!!re){if(pe){const ie=re.getModel(),ae=re.deltaDecorations([],[{range:fe,options:{description:"symbol-navigate-action-highlight",className:"symbolHighlight"}}]);setTimeout(()=>{re.getModel()===ie&&re.deltaDecorations(ae,[])},350)}return re}})}_openInPeek($,V){let Q=o.ReferencesController.get($);Q&&$.hasModel()?Q.toggleWidget($.getSelection(),(0,T.createCancelablePromise)(ue=>Promise.resolve(V)),this._configuration.openInPeek):V.dispose()}}class Y extends H{_getLocationModel($,V,Q){return Re(this,void 0,void 0,function*(){return new i.ReferencesModel(yield(0,k.getDefinitionsAtPosition)($,V,Q),y.localize(1,null))})}_getNoResultFoundMessage($){return $&&$.word?y.localize(2,null,$.word):y.localize(3,null)}_getAlternativeCommand($){return $.getOption(50).alternativeDefinitionCommand}_getGoToPreference($){return $.getOption(50).multipleDefinitions}}e.DefinitionAction=Y;const X=S.isWeb&&!w.isStandalone?2048|70:70;K((M=class Yt extends Y{constructor(){super({openToSide:!1,openInPeek:!1,muteMessage:!1},{id:Yt.id,label:y.localize(4,null),alias:"Go to Definition",precondition:v.ContextKeyExpr.and(a.EditorContextKeys.hasDefinitionProvider,a.EditorContextKeys.isInWalkThroughSnippet.toNegated()),kbOpts:{kbExpr:a.EditorContextKeys.editorTextFocus,primary:X,weight:100},contextMenuOpts:{group:"navigation",order:1.1}});b.CommandsRegistry.registerCommandAlias("editor.action.goToDeclaration",Yt.id)}},M.id="editor.action.revealDefinition",M)),K((P=class Xt extends Y{constructor(){super({openToSide:!0,openInPeek:!1,muteMessage:!1},{id:Xt.id,label:y.localize(5,null),alias:"Open Definition to the Side",precondition:v.ContextKeyExpr.and(a.EditorContextKeys.hasDefinitionProvider,a.EditorContextKeys.isInWalkThroughSnippet.toNegated()),kbOpts:{kbExpr:a.EditorContextKeys.editorTextFocus,primary:(0,D.KeyChord)(2048|41,X),weight:100}});b.CommandsRegistry.registerCommandAlias("editor.action.openDeclarationToTheSide",Xt.id)}},P.id="editor.action.revealDefinitionAside",P)),K((F=class Qt extends Y{constructor(){super({openToSide:!1,openInPeek:!0,muteMessage:!1},{id:Qt.id,label:y.localize(6,null),alias:"Peek Definition",precondition:v.ContextKeyExpr.and(a.EditorContextKeys.hasDefinitionProvider,f.PeekContext.notInPeekEditor,a.EditorContextKeys.isInWalkThroughSnippet.toNegated()),kbOpts:{kbExpr:a.EditorContextKeys.editorTextFocus,primary:512|70,linux:{primary:2048|1024|68},weight:100},contextMenuOpts:{menuId:_.MenuId.EditorContextPeek,group:"peek",order:2}});b.CommandsRegistry.registerCommandAlias("editor.action.previewDeclaration",Qt.id)}},F.id="editor.action.peekDefinition",F));class Z extends H{_getLocationModel($,V,Q){return Re(this,void 0,void 0,function*(){return new i.ReferencesModel(yield(0,k.getDeclarationsAtPosition)($,V,Q),y.localize(7,null))})}_getNoResultFoundMessage($){return $&&$.word?y.localize(8,null,$.word):y.localize(9,null)}_getAlternativeCommand($){return $.getOption(50).alternativeDeclarationCommand}_getGoToPreference($){return $.getOption(50).multipleDeclarations}}K((R=class Pi extends Z{constructor(){super({openToSide:!1,openInPeek:!1,muteMessage:!1},{id:Pi.id,label:y.localize(10,null),alias:"Go to Declaration",precondition:v.ContextKeyExpr.and(a.EditorContextKeys.hasDeclarationProvider,a.EditorContextKeys.isInWalkThroughSnippet.toNegated()),contextMenuOpts:{group:"navigation",order:1.3}})}_getNoResultFoundMessage($){return $&&$.word?y.localize(11,null,$.word):y.localize(12,null)}},R.id="editor.action.revealDeclaration",R)),K(class extends Z{constructor(){super({openToSide:!1,openInPeek:!0,muteMessage:!1},{id:"editor.action.peekDeclaration",label:y.localize(13,null),alias:"Peek Declaration",precondition:v.ContextKeyExpr.and(a.EditorContextKeys.hasDeclarationProvider,f.PeekContext.notInPeekEditor,a.EditorContextKeys.isInWalkThroughSnippet.toNegated()),contextMenuOpts:{menuId:_.MenuId.EditorContextPeek,group:"peek",order:3}})}});class se extends H{_getLocationModel($,V,Q){return Re(this,void 0,void 0,function*(){return new i.ReferencesModel(yield(0,k.getTypeDefinitionsAtPosition)($,V,Q),y.localize(14,null))})}_getNoResultFoundMessage($){return $&&$.word?y.localize(15,null,$.word):y.localize(16,null)}_getAlternativeCommand($){return $.getOption(50).alternativeTypeDefinitionCommand}_getGoToPreference($){return $.getOption(50).multipleTypeDefinitions}}K((A=class Oi extends se{constructor(){super({openToSide:!1,openInPeek:!1,muteMessage:!1},{id:Oi.ID,label:y.localize(17,null),alias:"Go to Type Definition",precondition:v.ContextKeyExpr.and(a.EditorContextKeys.hasTypeDefinitionProvider,a.EditorContextKeys.isInWalkThroughSnippet.toNegated()),kbOpts:{kbExpr:a.EditorContextKeys.editorTextFocus,primary:0,weight:100},contextMenuOpts:{group:"navigation",order:1.4}})}},A.ID="editor.action.goToTypeDefinition",A)),K((O=class Fi extends se{constructor(){super({openToSide:!1,openInPeek:!0,muteMessage:!1},{id:Fi.ID,label:y.localize(18,null),alias:"Peek Type Definition",precondition:v.ContextKeyExpr.and(a.EditorContextKeys.hasTypeDefinitionProvider,f.PeekContext.notInPeekEditor,a.EditorContextKeys.isInWalkThroughSnippet.toNegated()),contextMenuOpts:{menuId:_.MenuId.EditorContextPeek,group:"peek",order:4}})}},O.ID="editor.action.peekTypeDefinition",O));class oe extends H{_getLocationModel($,V,Q){return Re(this,void 0,void 0,function*(){return new i.ReferencesModel(yield(0,k.getImplementationsAtPosition)($,V,Q),y.localize(19,null))})}_getNoResultFoundMessage($){return $&&$.word?y.localize(20,null,$.word):y.localize(21,null)}_getAlternativeCommand($){return $.getOption(50).alternativeImplementationCommand}_getGoToPreference($){return $.getOption(50).multipleImplementations}}K((L=class Bi extends oe{constructor(){super({openToSide:!1,openInPeek:!1,muteMessage:!1},{id:Bi.ID,label:y.localize(22,null),alias:"Go to Implementations",precondition:v.ContextKeyExpr.and(a.EditorContextKeys.hasImplementationProvider,a.EditorContextKeys.isInWalkThroughSnippet.toNegated()),kbOpts:{kbExpr:a.EditorContextKeys.editorTextFocus,primary:2048|70,weight:100},contextMenuOpts:{group:"navigation",order:1.45}})}},L.ID="editor.action.goToImplementation",L)),K((B=class xi extends oe{constructor(){super({openToSide:!1,openInPeek:!0,muteMessage:!1},{id:xi.ID,label:y.localize(23,null),alias:"Peek Implementations",precondition:v.ContextKeyExpr.and(a.EditorContextKeys.hasImplementationProvider,f.PeekContext.notInPeekEditor,a.EditorContextKeys.isInWalkThroughSnippet.toNegated()),kbOpts:{kbExpr:a.EditorContextKeys.editorTextFocus,primary:2048|1024|70,weight:100},contextMenuOpts:{menuId:_.MenuId.EditorContextPeek,group:"peek",order:5}})}},B.ID="editor.action.peekImplementation",B));class G extends H{_getNoResultFoundMessage($){return $?y.localize(24,null,$.word):y.localize(25,null)}_getAlternativeCommand($){return $.getOption(50).alternativeReferenceCommand}_getGoToPreference($){return $.getOption(50).multipleReferences}}K(class extends G{constructor(){super({openToSide:!1,openInPeek:!1,muteMessage:!1},{id:"editor.action.goToReferences",label:y.localize(26,null),alias:"Go to References",precondition:v.ContextKeyExpr.and(a.EditorContextKeys.hasReferenceProvider,f.PeekContext.notInPeekEditor,a.EditorContextKeys.isInWalkThroughSnippet.toNegated()),kbOpts:{kbExpr:a.EditorContextKeys.editorTextFocus,primary:1024|70,weight:100},contextMenuOpts:{group:"navigation",order:1.45}})}_getLocationModel($,V,Q){return Re(this,void 0,void 0,function*(){return new i.ReferencesModel(yield(0,k.getReferencesAtPosition)($,V,!0,Q),y.localize(27,null))})}}),K(class extends G{constructor(){super({openToSide:!1,openInPeek:!0,muteMessage:!1},{id:"editor.action.referenceSearch.trigger",label:y.localize(28,null),alias:"Peek References",precondition:v.ContextKeyExpr.and(a.EditorContextKeys.hasReferenceProvider,f.PeekContext.notInPeekEditor,a.EditorContextKeys.isInWalkThroughSnippet.toNegated()),contextMenuOpts:{menuId:_.MenuId.EditorContextPeek,group:"peek",order:6}})}_getLocationModel($,V,Q){return Re(this,void 0,void 0,function*(){return new i.ReferencesModel(yield(0,k.getReferencesAtPosition)($,V,!1,Q),y.localize(29,null))})}});class x extends H{constructor($,V,Q){super($,{id:"editor.action.goToLocation",label:y.localize(30,null),alias:"Go to Any Symbol",precondition:v.ContextKeyExpr.and(f.PeekContext.notInPeekEditor,a.EditorContextKeys.isInWalkThroughSnippet.toNegated())});this._references=V,this._gotoMultipleBehaviour=Q}_getLocationModel($,V,Q){return Re(this,void 0,void 0,function*(){return new i.ReferencesModel(this._references,y.localize(31,null))})}_getNoResultFoundMessage($){return $&&y.localize(32,null,$.word)||""}_getGoToPreference($){var V;return(V=this._gotoMultipleBehaviour)!==null&&V!==void 0?V:$.getOption(50).multipleReferences}_getAlternativeCommand(){return""}}b.CommandsRegistry.registerCommand({id:"editor.action.goToLocations",description:{description:"Go to locations from a position in a file",args:[{name:"uri",description:"The text document in which to start",constraint:C.URI},{name:"position",description:"The position at which to start",constraint:u.Position.isIPosition},{name:"locations",description:"An array of locations.",constraint:Array},{name:"multiple",description:"Define what to do when having multiple results, either `peek`, `gotoAndPeek`, or `goto"},{name:"noResultsMessage",description:"Human readable message that shows when locations is empty."}]},handler:(U,$,V,Q,ue,pe,fe)=>Re(void 0,void 0,void 0,function*(){(0,p.assertType)(C.URI.isUri($)),(0,p.assertType)(u.Position.isIPosition(V)),(0,p.assertType)(Array.isArray(Q)),(0,p.assertType)(typeof ue=="undefined"||typeof ue=="string"),(0,p.assertType)(typeof fe=="undefined"||typeof fe=="boolean");const re=U.get(s.ICodeEditorService),ie=yield re.openCodeEditor({resource:$},re.getFocusedCodeEditor());if((0,g.isCodeEditor)(ie))return ie.setPosition(V),ie.revealPositionInCenterIfOutsideViewport(V,0),ie.invokeWithinContext(ae=>{const q=new class extends x{_getNoResultFoundMessage(ne){return pe||super._getNoResultFoundMessage(ne)}}({muteMessage:!Boolean(pe),openInPeek:Boolean(fe),openToSide:!1},Q,ue);ae.get(m.IInstantiationService).invokeFunction(q.run.bind(q),ie)})})}),b.CommandsRegistry.registerCommand({id:"editor.action.peekLocations",description:{description:"Peek locations from a position in a file",args:[{name:"uri",description:"The text document in which to start",constraint:C.URI},{name:"position",description:"The position at which to start",constraint:u.Position.isIPosition},{name:"locations",description:"An array of locations.",constraint:Array},{name:"multiple",description:"Define what to do when having multiple results, either `peek`, `gotoAndPeek`, or `goto"}]},handler:(U,$,V,Q,ue)=>Re(void 0,void 0,void 0,function*(){U.get(b.ICommandService).executeCommand("editor.action.goToLocations",$,V,Q,ue,void 0,!0)})}),b.CommandsRegistry.registerCommand({id:"editor.action.findReferences",handler:(U,$,V)=>{(0,p.assertType)(C.URI.isUri($)),(0,p.assertType)(u.Position.isIPosition(V));const Q=U.get(s.ICodeEditorService);return Q.openCodeEditor({resource:$},Q.getFocusedCodeEditor()).then(ue=>{if(!(0,g.isCodeEditor)(ue)||!ue.hasModel())return;const pe=o.ReferencesController.get(ue);if(!pe)return;const fe=(0,T.createCancelablePromise)(ie=>(0,k.getReferencesAtPosition)(ue.getModel(),u.Position.lift(V),!1,ie).then(ae=>new i.ReferencesModel(ae,y.localize(33,null)))),re=new d.Range(V.lineNumber,V.column,V.lineNumber,V.column);return Promise.resolve(pe.toggleWidget(re,fe,!1))})}}),b.CommandsRegistry.registerCommandAlias("editor.action.showReferences","editor.action.peekLocations"),_.MenuRegistry.appendMenuItems([{id:_.MenuId.MenubarGoMenu,item:{command:{id:"editor.action.revealDefinition",title:y.localize(34,null)},group:"4_symbol_nav",order:2}},{id:_.MenuId.MenubarGoMenu,item:{command:{id:"editor.action.revealDeclaration",title:y.localize(35,null)},group:"4_symbol_nav",order:3}},{id:_.MenuId.MenubarGoMenu,item:{command:{id:"editor.action.goToTypeDefinition",title:y.localize(36,null)},group:"4_symbol_nav",order:3}},{id:_.MenuId.MenubarGoMenu,item:{command:{id:"editor.action.goToImplementation",title:y.localize(37,null)},group:"4_symbol_nav",order:4}},{id:_.MenuId.MenubarGoMenu,item:{command:{id:"editor.action.goToReferences",title:y.localize(38,null)},group:"4_symbol_nav",order:5}}])}),define(J[289],ee([0,1,14,11,69,2,20,67,16,13,3,18,39,66,238,130,504,15,21,10,288,274,363]),function(j,e,w,N,T,D,S,p,C,n,g,t,s,c,u,d,a,r,o,i,l,h){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.GotoDefinitionAtPositionEditorContribution=void 0;let f=class yt{constructor(_,b,v){this.textModelResolverService=b,this.modeService=v,this.toUnhook=new D.DisposableStore,this.toUnhookForKeyboard=new D.DisposableStore,this.linkDecorations=[],this.currentWordAtPosition=null,this.previousPromise=null,this.editor=_;let m=new u.ClickLinkGesture(_);this.toUnhook.add(m),this.toUnhook.add(m.onMouseMoveOrRelevantKeyDown(([E,I])=>{this.startFindDefinitionFromMouse(E,(0,S.withNullAsUndefined)(I))})),this.toUnhook.add(m.onExecute(E=>{this.isEnabled(E)&&this.gotoDefinition(E.target.position,E.hasSideBySideModifier).then(()=>{this.removeLinkDecorations()},I=>{this.removeLinkDecorations(),(0,N.onUnexpectedError)(I)})})),this.toUnhook.add(m.onCancel(()=>{this.removeLinkDecorations(),this.currentWordAtPosition=null}))}static get(_){return _.getContribution(yt.ID)}startFindDefinitionFromCursor(_){return this.startFindDefinition(_).then(()=>{this.toUnhookForKeyboard.add(this.editor.onDidChangeCursorPosition(()=>{this.currentWordAtPosition=null,this.removeLinkDecorations(),this.toUnhookForKeyboard.clear()})),this.toUnhookForKeyboard.add(this.editor.onKeyDown(b=>{b&&(this.currentWordAtPosition=null,this.removeLinkDecorations(),this.toUnhookForKeyboard.clear())}))})}startFindDefinitionFromMouse(_,b){if(_.target.type===9&&this.linkDecorations.length>0)return;if(!this.editor.hasModel()||!this.isEnabled(_,b)){this.currentWordAtPosition=null,this.removeLinkDecorations();return}const v=_.target.position;this.startFindDefinition(v)}startFindDefinition(_){var b;this.toUnhookForKeyboard.clear();const v=_?(b=this.editor.getModel())===null||b===void 0?void 0:b.getWordAtPosition(_):null;if(!v)return this.currentWordAtPosition=null,this.removeLinkDecorations(),Promise.resolve(0);if(this.currentWordAtPosition&&this.currentWordAtPosition.startColumn===v.startColumn&&this.currentWordAtPosition.endColumn===v.endColumn&&this.currentWordAtPosition.word===v.word)return Promise.resolve(0);this.currentWordAtPosition=v;let m=new p.EditorState(this.editor,4|1|2|8);return this.previousPromise&&(this.previousPromise.cancel(),this.previousPromise=null),this.previousPromise=(0,w.createCancelablePromise)(E=>this.findDefinition(_,E)),this.previousPromise.then(E=>{if(!E||!E.length||!m.validate(this.editor)){this.removeLinkDecorations();return}if(E.length>1)this.addDecoration(new g.Range(_.lineNumber,v.startColumn,_.lineNumber,v.endColumn),new T.MarkdownString().appendText(a.localize(0,null,E.length)));else{let I=E[0];if(!I.uri)return;this.textModelResolverService.createModelReference(I.uri).then(k=>{if(!k.object||!k.object.textEditorModel){k.dispose();return}const{object:{textEditorModel:M}}=k,{startLineNumber:P}=I.range;if(P<1||P>M.getLineCount()){k.dispose();return}const F=this.getPreviewValue(M,P,I);let R;I.originSelectionRange?R=g.Range.lift(I.originSelectionRange):R=new g.Range(_.lineNumber,v.startColumn,_.lineNumber,v.endColumn);const A=this.modeService.getModeIdByFilepathOrFirstLine(M.uri);this.addDecoration(R,new T.MarkdownString().appendCodeblock(A||"",F)),k.dispose()})}}).then(void 0,N.onUnexpectedError)}getPreviewValue(_,b,v){let m=v.targetSelectionRange?v.range:this.getPreviewRangeBasedOnBrackets(_,b);return m.endLineNumber-m.startLineNumber>=yt.MAX_SOURCE_PREVIEW_LINES&&(m=this.getPreviewRangeBasedOnIndentation(_,b)),this.stripIndentationFromPreviewRange(_,b,m)}stripIndentationFromPreviewRange(_,b,v){let E=_.getLineFirstNonWhitespaceColumn(b);for(let k=b+1;k<v.endLineNumber;k++){const M=_.getLineFirstNonWhitespaceColumn(k);E=Math.min(E,M)}return _.getValueInRange(v).replace(new RegExp(`^\\s{${E-1}}`,"gm"),"").trim()}getPreviewRangeBasedOnIndentation(_,b){const v=_.getLineFirstNonWhitespaceColumn(b),m=Math.min(_.getLineCount(),b+yt.MAX_SOURCE_PREVIEW_LINES);let E=b+1;for(;E<m;E++){let I=_.getLineFirstNonWhitespaceColumn(E);if(v===I)break}return new g.Range(b,1,E+1,1)}getPreviewRangeBasedOnBrackets(_,b){const v=Math.min(_.getLineCount(),b+yt.MAX_SOURCE_PREVIEW_LINES),m=[];let E=!0,I=_.findNextBracket(new n.Position(b,1));for(;I!==null;){if(m.length===0)m.push(I);else{const F=m[m.length-1];if(F.open[0]===I.open[0]&&F.isOpen&&!I.isOpen?m.pop():m.push(I),m.length===0)if(E)E=!1;else return new g.Range(b,1,I.range.endLineNumber+1,1)}const k=_.getLineMaxColumn(b);let M=I.range.endLineNumber,P=I.range.endColumn;if(k===I.range.endColumn&&(M++,P=1),M>v)return new g.Range(b,1,v+1,1);I=_.findNextBracket(new n.Position(M,P))}return new g.Range(b,1,v+1,1)}addDecoration(_,b){const v={range:_,options:{description:"goto-definition-link",inlineClassName:"goto-definition-link",hoverMessage:b}};this.linkDecorations=this.editor.deltaDecorations(this.linkDecorations,[v])}removeLinkDecorations(){this.linkDecorations.length>0&&(this.linkDecorations=this.editor.deltaDecorations(this.linkDecorations,[]))}isEnabled(_,b){return this.editor.hasModel()&&_.isNoneOrSingleMouseDown&&_.target.type===6&&(_.hasTriggerModifier||(b?b.keyCodeIsTriggerKey:!1))&&t.DefinitionProviderRegistry.has(this.editor.getModel())}findDefinition(_,b){const v=this.editor.getModel();return v?(0,h.getDefinitionsAtPosition)(v,_,b):Promise.resolve(null)}gotoDefinition(_,b){return this.editor.setPosition(_),this.editor.invokeWithinContext(v=>{const m=!b&&this.editor.getOption(77)&&!this.isInPeekEditor(v);return new l.DefinitionAction({openToSide:b,openInPeek:m,muteMessage:!0},{alias:"",label:"",id:"",precondition:void 0}).run(v,this.editor)})}isInPeekEditor(_){const b=_.get(r.IContextKeyService);return d.PeekContext.inPeekEditor.getValue(b)}dispose(){this.toUnhook.dispose()}};f.ID="editor.contrib.gotodefinitionatposition",f.MAX_SOURCE_PREVIEW_LINES=8,f=Fe([Ce(1,c.ITextModelService),Ce(2,s.IModeService)],f),e.GotoDefinitionAtPositionEditorContribution=f,(0,C.registerEditorContribution)(f.ID,f),(0,i.registerThemingParticipant)((y,_)=>{const b=y.getColor(o.editorActiveLinkForeground);b&&_.addRule(`.monaco-editor .goto-definition-link { color: ${b} !important; }`)})}),define(J[700],ee([0,1,7,19,14,11,2,44,3,190,152,282,145,286,512,89,57,62,21,10]),function(j,e,w,N,T,D,S,p,C,n,g,t,s,c,u,d,a,r,o,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MarkerHoverParticipant=e.MarkerHover=void 0;const l=w.$;class h{constructor(b,v,m){this.owner=b,this.range=v,this.marker=m}isValidForHoverAnchor(b){return b.type===1&&this.range.startColumn<=b.range.startColumn&&this.range.endColumn>=b.range.endColumn}}e.MarkerHover=h;const f={type:1,filter:{include:s.CodeActionKind.QuickFix}};let y=class{constructor(b,v,m,E){this._editor=b,this._hover=v,this._markerDecorationsService=m,this._openerService=E,this.recentMarkerCodeActionsInfo=void 0}computeSync(b,v){if(!this._editor.hasModel()||b.type!==1)return[];const m=this._editor.getModel(),E=b.range.startLineNumber,I=m.getLineMaxColumn(E),k=[];for(const M of v){const P=M.range.startLineNumber===E?M.range.startColumn:1,F=M.range.endLineNumber===E?M.range.endColumn:I,R=this._markerDecorationsService.getMarker(m.uri,M);if(!R)continue;const A=new C.Range(b.range.startLineNumber,P,b.range.startLineNumber,F);k.push(new h(this,A,R))}return k}renderHoverParts(b,v,m){if(!b.length)return S.Disposable.None;const E=new S.DisposableStore;b.forEach(k=>v.appendChild(this.renderMarkerHover(k,E)));const I=b.length===1?b[0]:b.sort((k,M)=>d.MarkerSeverity.compare(k.marker.severity,M.marker.severity))[0];return this.renderMarkerStatusbar(I,m,E),E}renderMarkerHover(b,v){const m=l("div.hover-row"),E=w.append(m,l("div.marker.hover-contents")),{source:I,message:k,code:M,relatedInformation:P}=b.marker;this._editor.applyFontInfo(E);const F=w.append(E,l("span"));if(F.style.whiteSpace="pre-wrap",F.innerText=k,I||M)if(M&&typeof M!="string"){const R=l("span");if(I){const B=w.append(R,l("span"));B.innerText=I}const A=w.append(R,l("a.code-link"));A.setAttribute("href",M.target.toString()),v.add(w.addDisposableListener(A,"click",B=>{this._openerService.open(M.target,{allowCommands:!0}),B.preventDefault(),B.stopPropagation()}));const O=w.append(A,l("span"));O.innerText=M.value;const L=w.append(E,R);L.style.opacity="0.6",L.style.paddingLeft="6px"}else{const R=w.append(E,l("span"));R.style.opacity="0.6",R.style.paddingLeft="6px",R.innerText=I&&M?`${I}(${M})`:I||`(${M})`}if((0,N.isNonEmptyArray)(P))for(const{message:R,resource:A,startLineNumber:O,startColumn:L}of P){const B=w.append(E,l("div"));B.style.marginTop="8px";const W=w.append(B,l("a"));W.innerText=`${(0,p.basename)(A)}(${O}, ${L}): `,W.style.cursor="pointer",v.add(w.addDisposableListener(W,"click",H=>{H.stopPropagation(),H.preventDefault(),this._openerService&&this._openerService.open(A,{fromUserGesture:!0,editorOptions:{selection:{startLineNumber:O,startColumn:L}}}).catch(D.onUnexpectedError)}));const K=w.append(B,l("span"));K.innerText=R,this._editor.applyFontInfo(K)}return m}renderMarkerStatusbar(b,v,m){if((b.marker.severity===d.MarkerSeverity.Error||b.marker.severity===d.MarkerSeverity.Warning||b.marker.severity===d.MarkerSeverity.Info)&&v.addAction({label:u.localize(0,null),commandId:c.NextMarkerAction.ID,run:()=>{this._hover.hide(),c.MarkerController.get(this._editor).showAtMarker(b.marker),this._editor.focus()}}),!this._editor.getOption(80)){const E=v.append(l("div"));this.recentMarkerCodeActionsInfo&&(d.IMarkerData.makeKey(this.recentMarkerCodeActionsInfo.marker)===d.IMarkerData.makeKey(b.marker)?this.recentMarkerCodeActionsInfo.hasCodeActions||(E.textContent=u.localize(1,null)):this.recentMarkerCodeActionsInfo=void 0);const I=this.recentMarkerCodeActionsInfo&&!this.recentMarkerCodeActionsInfo.hasCodeActions?S.Disposable.None:m.add((0,T.disposableTimeout)(()=>E.textContent=u.localize(2,null),200));E.textContent||(E.textContent=String.fromCharCode(160));const k=this.getCodeActions(b.marker);m.add((0,S.toDisposable)(()=>k.cancel())),k.then(M=>{if(I.dispose(),this.recentMarkerCodeActionsInfo={marker:b.marker,hasCodeActions:M.validActions.length>0},!this.recentMarkerCodeActionsInfo.hasCodeActions){M.dispose(),E.textContent=u.localize(3,null);return}E.style.display="none";let P=!1;m.add((0,S.toDisposable)(()=>{P||M.dispose()})),v.addAction({label:u.localize(4,null),commandId:t.QuickFixAction.Id,run:F=>{P=!0;const R=t.QuickFixController.get(this._editor),A=w.getDomNodePagePosition(F);this._hover.hide(),R.showCodeActions(f,M,{x:A.left+6,y:A.top+A.height+6})}})},D.onUnexpectedError)}}getCodeActions(b){return(0,T.createCancelablePromise)(v=>(0,g.getCodeActions)(this._editor.getModel(),new C.Range(b.startLineNumber,b.startColumn,b.endLineNumber,b.endColumn),f,r.Progress.None,v))}};y=Fe([Ce(2,n.IMarkerDecorationsService),Ce(3,a.IOpenerService)],y),e.MarkerHoverParticipant=y,(0,i.registerThemingParticipant)((_,b)=>{const v=_.getColor(o.textLinkForeground);v&&b.addRule(`.monaco-hover .hover-contents a.code-link span { color: ${v}; }`);const m=_.getColor(o.textLinkActiveForeground);m&&b.addRule(`.monaco-hover .hover-contents a.code-link span:hover { color: ${m}; }`)})}),define(J[701],ee([0,1,16,28,287,41,15,9,36,73]),function(j,e,w,N,T,D,S,p,C,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.StandaloneReferencesController=void 0;let g=class extends T.ReferencesController{constructor(s,c,u,d,a,r,o){super(!0,s,c,u,d,a,r,o)}};g=Fe([Ce(1,S.IContextKeyService),Ce(2,N.ICodeEditorService),Ce(3,C.INotificationService),Ce(4,p.IInstantiationService),Ce(5,n.IStorageService),Ce(6,D.IConfigurationService)],g),e.StandaloneReferencesController=g,(0,w.registerEditorContribution)(T.ReferencesController.ID,g)}),define(J[702],ee([0,1,11,2,48,76,555,124,70,36,129]),function(j,e,w,N,T,D,S,p,C,n,g){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.UndoRedoService=void 0;const t=!1;function s(y){return y.scheme===T.Schemas.file?y.fsPath:y.path}let c=0;class u{constructor(_,b,v,m,E,I,k){this.id=++c,this.type=0,this.actual=_,this.label=_.label,this.confirmBeforeUndo=_.confirmBeforeUndo||!1,this.resourceLabel=b,this.strResource=v,this.resourceLabels=[this.resourceLabel],this.strResources=[this.strResource],this.groupId=m,this.groupOrder=E,this.sourceId=I,this.sourceOrder=k,this.isValid=!0}setValid(_){this.isValid=_}toString(){return`[id:${this.id}] [group:${this.groupId}] [${this.isValid?"  VALID":"INVALID"}] ${this.actual.constructor.name} - ${this.actual}`}}class d{constructor(_,b){this.resourceLabel=_,this.reason=b}}class a{constructor(){this.elements=new Map}createMessage(){const _=[],b=[];for(const[,m]of this.elements)(m.reason===0?_:b).push(m.resourceLabel);let v=[];return _.length>0&&v.push(S.localize(0,null,_.join(", "))),b.length>0&&v.push(S.localize(1,null,b.join(", "))),v.join(`
`)}get size(){return this.elements.size}has(_){return this.elements.has(_)}set(_,b){this.elements.set(_,b)}delete(_){return this.elements.delete(_)}}class r{constructor(_,b,v,m,E,I,k){this.id=++c,this.type=1,this.actual=_,this.label=_.label,this.confirmBeforeUndo=_.confirmBeforeUndo||!1,this.resourceLabels=b,this.strResources=v,this.groupId=m,this.groupOrder=E,this.sourceId=I,this.sourceOrder=k,this.removedResources=null,this.invalidatedResources=null}canSplit(){return typeof this.actual.split=="function"}removeResource(_,b,v){this.removedResources||(this.removedResources=new a),this.removedResources.has(b)||this.removedResources.set(b,new d(_,v))}setValid(_,b,v){v?this.invalidatedResources&&(this.invalidatedResources.delete(b),this.invalidatedResources.size===0&&(this.invalidatedResources=null)):(this.invalidatedResources||(this.invalidatedResources=new a),this.invalidatedResources.has(b)||this.invalidatedResources.set(b,new d(_,0)))}toString(){return`[id:${this.id}] [group:${this.groupId}] [${this.invalidatedResources?"INVALID":"  VALID"}] ${this.actual.constructor.name} - ${this.actual}`}}class o{constructor(_,b){this.resourceLabel=_,this.strResource=b,this._past=[],this._future=[],this.locked=!1,this.versionId=1}dispose(){for(const _ of this._past)_.type===1&&_.removeResource(this.resourceLabel,this.strResource,0);for(const _ of this._future)_.type===1&&_.removeResource(this.resourceLabel,this.strResource,0);this.versionId++}toString(){let _=[];_.push(`* ${this.strResource}:`);for(let b=0;b<this._past.length;b++)_.push(`   * [UNDO] ${this._past[b]}`);for(let b=this._future.length-1;b>=0;b--)_.push(`   * [REDO] ${this._future[b]}`);return _.join(`
`)}flushAllElements(){this._past=[],this._future=[],this.versionId++}_setElementValidFlag(_,b){_.type===1?_.setValid(this.resourceLabel,this.strResource,b):_.setValid(b)}setElementsValidFlag(_,b){for(const v of this._past)b(v.actual)&&this._setElementValidFlag(v,_);for(const v of this._future)b(v.actual)&&this._setElementValidFlag(v,_)}pushElement(_){for(const b of this._future)b.type===1&&b.removeResource(this.resourceLabel,this.strResource,1);this._future=[],this._past.push(_),this.versionId++}createSnapshot(_){const b=[];for(let v=0,m=this._past.length;v<m;v++)b.push(this._past[v].id);for(let v=this._future.length-1;v>=0;v--)b.push(this._future[v].id);return new g.ResourceEditStackSnapshot(_,b)}restoreSnapshot(_){const b=_.elements.length;let v=!0,m=0,E=-1;for(let k=0,M=this._past.length;k<M;k++,m++){const P=this._past[k];v&&(m>=b||P.id!==_.elements[m])&&(v=!1,E=0),!v&&P.type===1&&P.removeResource(this.resourceLabel,this.strResource,0)}let I=-1;for(let k=this._future.length-1;k>=0;k--,m++){const M=this._future[k];v&&(m>=b||M.id!==_.elements[m])&&(v=!1,I=k),!v&&M.type===1&&M.removeResource(this.resourceLabel,this.strResource,0)}E!==-1&&(this._past=this._past.slice(0,E)),I!==-1&&(this._future=this._future.slice(I+1)),this.versionId++}getElements(){const _=[],b=[];for(const v of this._past)_.push(v.actual);for(const v of this._future)b.push(v.actual);return{past:_,future:b}}getClosestPastElement(){return this._past.length===0?null:this._past[this._past.length-1]}getSecondClosestPastElement(){return this._past.length<2?null:this._past[this._past.length-2]}getClosestFutureElement(){return this._future.length===0?null:this._future[this._future.length-1]}hasPastElements(){return this._past.length>0}hasFutureElements(){return this._future.length>0}splitPastWorkspaceElement(_,b){for(let v=this._past.length-1;v>=0;v--)if(this._past[v]===_){b.has(this.strResource)?this._past[v]=b.get(this.strResource):this._past.splice(v,1);break}this.versionId++}splitFutureWorkspaceElement(_,b){for(let v=this._future.length-1;v>=0;v--)if(this._future[v]===_){b.has(this.strResource)?this._future[v]=b.get(this.strResource):this._future.splice(v,1);break}this.versionId++}moveBackward(_){this._past.pop(),this._future.push(_),this.versionId++}moveForward(_){this._future.pop(),this._past.push(_),this.versionId++}}class i{constructor(_){this.editStacks=_,this._versionIds=[];for(let b=0,v=this.editStacks.length;b<v;b++)this._versionIds[b]=this.editStacks[b].versionId}isValid(){for(let _=0,b=this.editStacks.length;_<b;_++)if(this._versionIds[_]!==this.editStacks[_].versionId)return!1;return!0}}const l=new o("","");l.locked=!0;let h=class{constructor(_,b){this._dialogService=_,this._notificationService=b,this._editStacks=new Map,this._uriComparisonKeyComputers=[]}getUriComparisonKey(_){for(const b of this._uriComparisonKeyComputers)if(b[0]===_.scheme)return b[1].getComparisonKey(_);return _.toString()}_print(_){console.log("------------------------------------"),console.log(`AFTER ${_}: `);let b=[];for(const v of this._editStacks)b.push(v[1].toString());console.log(b.join(`
`))}pushElement(_,b=g.UndoRedoGroup.None,v=g.UndoRedoSource.None){if(_.type===0){const m=s(_.resource),E=this.getUriComparisonKey(_.resource);this._pushElement(new u(_,m,E,b.id,b.nextOrder(),v.id,v.nextOrder()))}else{const m=new Set,E=[],I=[];for(const k of _.resources){const M=s(k),P=this.getUriComparisonKey(k);m.has(P)||(m.add(P),E.push(M),I.push(P))}E.length===1?this._pushElement(new u(_,E[0],I[0],b.id,b.nextOrder(),v.id,v.nextOrder())):this._pushElement(new r(_,E,I,b.id,b.nextOrder(),v.id,v.nextOrder()))}t&&this._print("pushElement")}_pushElement(_){for(let b=0,v=_.strResources.length;b<v;b++){const m=_.resourceLabels[b],E=_.strResources[b];let I;this._editStacks.has(E)?I=this._editStacks.get(E):(I=new o(m,E),this._editStacks.set(E,I)),I.pushElement(_)}}getLastElement(_){const b=this.getUriComparisonKey(_);if(this._editStacks.has(b)){const v=this._editStacks.get(b);if(v.hasFutureElements())return null;const m=v.getClosestPastElement();return m?m.actual:null}return null}_splitPastWorkspaceElement(_,b){const v=_.actual.split(),m=new Map;for(const E of v){const I=s(E.resource),k=this.getUriComparisonKey(E.resource),M=new u(E,I,k,0,0,0,0);m.set(M.strResource,M)}for(const E of _.strResources){if(b&&b.has(E))continue;this._editStacks.get(E).splitPastWorkspaceElement(_,m)}}_splitFutureWorkspaceElement(_,b){const v=_.actual.split(),m=new Map;for(const E of v){const I=s(E.resource),k=this.getUriComparisonKey(E.resource),M=new u(E,I,k,0,0,0,0);m.set(M.strResource,M)}for(const E of _.strResources){if(b&&b.has(E))continue;this._editStacks.get(E).splitFutureWorkspaceElement(_,m)}}removeElements(_){const b=typeof _=="string"?_:this.getUriComparisonKey(_);this._editStacks.has(b)&&(this._editStacks.get(b).dispose(),this._editStacks.delete(b)),t&&this._print("removeElements")}setElementsValidFlag(_,b,v){const m=this.getUriComparisonKey(_);this._editStacks.has(m)&&this._editStacks.get(m).setElementsValidFlag(b,v),t&&this._print("setElementsValidFlag")}createSnapshot(_){const b=this.getUriComparisonKey(_);return this._editStacks.has(b)?this._editStacks.get(b).createSnapshot(_):new g.ResourceEditStackSnapshot(_,[])}restoreSnapshot(_){const b=this.getUriComparisonKey(_.resource);if(this._editStacks.has(b)){const v=this._editStacks.get(b);v.restoreSnapshot(_),!v.hasPastElements()&&!v.hasFutureElements()&&(v.dispose(),this._editStacks.delete(b))}t&&this._print("restoreSnapshot")}getElements(_){const b=this.getUriComparisonKey(_);return this._editStacks.has(b)?this._editStacks.get(b).getElements():{past:[],future:[]}}_findClosestUndoElementWithSource(_){if(!_)return[null,null];let b=null,v=null;for(const[m,E]of this._editStacks){const I=E.getClosestPastElement();!I||I.sourceId===_&&(!b||I.sourceOrder>b.sourceOrder)&&(b=I,v=m)}return[b,v]}canUndo(_){if(_ instanceof g.UndoRedoSource){const[,v]=this._findClosestUndoElementWithSource(_.id);return!!v}const b=this.getUriComparisonKey(_);return this._editStacks.has(b)?this._editStacks.get(b).hasPastElements():!1}_onError(_,b){(0,w.onUnexpectedError)(_);for(const v of b.strResources)this.removeElements(v);this._notificationService.error(_)}_acquireLocks(_){for(const b of _.editStacks)if(b.locked)throw new Error("Cannot acquire edit stack lock");for(const b of _.editStacks)b.locked=!0;return()=>{for(const b of _.editStacks)b.locked=!1}}_safeInvokeWithLocks(_,b,v,m,E){const I=this._acquireLocks(v);let k;try{k=b()}catch(M){return I(),m.dispose(),this._onError(M,_)}return k?k.then(()=>(I(),m.dispose(),E()),M=>(I(),m.dispose(),this._onError(M,_))):(I(),m.dispose(),E())}_invokeWorkspacePrepare(_){return Re(this,void 0,void 0,function*(){if(typeof _.actual.prepareUndoRedo=="undefined")return N.Disposable.None;const b=_.actual.prepareUndoRedo();return typeof b=="undefined"?N.Disposable.None:b})}_invokeResourcePrepare(_,b){if(_.actual.type!==1||typeof _.actual.prepareUndoRedo=="undefined")return b(N.Disposable.None);const v=_.actual.prepareUndoRedo();return v?(0,N.isDisposable)(v)?b(v):v.then(m=>b(m)):b(N.Disposable.None)}_getAffectedEditStacks(_){const b=[];for(const v of _.strResources)b.push(this._editStacks.get(v)||l);return new i(b)}_tryToSplitAndUndo(_,b,v,m){if(b.canSplit())return this._splitPastWorkspaceElement(b,v),this._notificationService.warn(m),new f(this._undo(_,0,!0));for(const E of b.strResources)this.removeElements(E);return this._notificationService.warn(m),new f}_checkWorkspaceUndo(_,b,v,m){if(b.removedResources)return this._tryToSplitAndUndo(_,b,b.removedResources,S.localize(2,null,b.label,b.removedResources.createMessage()));if(m&&b.invalidatedResources)return this._tryToSplitAndUndo(_,b,b.invalidatedResources,S.localize(3,null,b.label,b.invalidatedResources.createMessage()));const E=[];for(const k of v.editStacks)k.getClosestPastElement()!==b&&E.push(k.resourceLabel);if(E.length>0)return this._tryToSplitAndUndo(_,b,null,S.localize(4,null,b.label,E.join(", ")));const I=[];for(const k of v.editStacks)k.locked&&I.push(k.resourceLabel);return I.length>0?this._tryToSplitAndUndo(_,b,null,S.localize(5,null,b.label,I.join(", "))):v.isValid()?null:this._tryToSplitAndUndo(_,b,null,S.localize(6,null,b.label))}_workspaceUndo(_,b,v){const m=this._getAffectedEditStacks(b),E=this._checkWorkspaceUndo(_,b,m,!1);return E?E.returnValue:this._confirmAndExecuteWorkspaceUndo(_,b,m,v)}_isPartOfUndoGroup(_){if(!_.groupId)return!1;for(const[,b]of this._editStacks){const v=b.getClosestPastElement();if(!!v){if(v===_){const m=b.getSecondClosestPastElement();if(m&&m.groupId===_.groupId)return!0}if(v.groupId===_.groupId)return!0}}return!1}_confirmAndExecuteWorkspaceUndo(_,b,v,m){return Re(this,void 0,void 0,function*(){if(b.canSplit()&&!this._isPartOfUndoGroup(b)){const k=yield this._dialogService.show(D.default.Info,S.localize(7,null,b.label),[S.localize(8,null,v.editStacks.length),S.localize(9,null),S.localize(10,null)],{cancelId:2});if(k.choice===2)return;if(k.choice===1)return this._splitPastWorkspaceElement(b,null),this._undo(_,0,!0);const M=this._checkWorkspaceUndo(_,b,v,!1);if(M)return M.returnValue;m=!0}let E;try{E=yield this._invokeWorkspacePrepare(b)}catch(k){return this._onError(k,b)}const I=this._checkWorkspaceUndo(_,b,v,!0);if(I)return E.dispose(),I.returnValue;for(const k of v.editStacks)k.moveBackward(b);return this._safeInvokeWithLocks(b,()=>b.actual.undo(),v,E,()=>this._continueUndoInGroup(b.groupId,m))})}_resourceUndo(_,b,v){if(!b.isValid){_.flushAllElements();return}if(_.locked){const m=S.localize(11,null,b.label);this._notificationService.warn(m);return}return this._invokeResourcePrepare(b,m=>(_.moveBackward(b),this._safeInvokeWithLocks(b,()=>b.actual.undo(),new i([_]),m,()=>this._continueUndoInGroup(b.groupId,v))))}_findClosestUndoElementInGroup(_){if(!_)return[null,null];let b=null,v=null;for(const[m,E]of this._editStacks){const I=E.getClosestPastElement();!I||I.groupId===_&&(!b||I.groupOrder>b.groupOrder)&&(b=I,v=m)}return[b,v]}_continueUndoInGroup(_,b){if(!_)return;const[,v]=this._findClosestUndoElementInGroup(_);if(v)return this._undo(v,0,b)}undo(_){if(_ instanceof g.UndoRedoSource){const[,b]=this._findClosestUndoElementWithSource(_.id);return b?this._undo(b,_.id,!1):void 0}return typeof _=="string"?this._undo(_,0,!1):this._undo(this.getUriComparisonKey(_),0,!1)}_undo(_,b=0,v){if(!this._editStacks.has(_))return;const m=this._editStacks.get(_),E=m.getClosestPastElement();if(!E)return;if(E.groupId){const[k,M]=this._findClosestUndoElementInGroup(E.groupId);if(E!==k&&M)return this._undo(M,b,v)}if((E.sourceId!==b||E.confirmBeforeUndo)&&!v)return this._confirmAndContinueUndo(_,b,E);try{return E.type===1?this._workspaceUndo(_,E,v):this._resourceUndo(m,E,v)}finally{t&&this._print("undo")}}_confirmAndContinueUndo(_,b,v){return Re(this,void 0,void 0,function*(){if((yield this._dialogService.show(D.default.Info,S.localize(12,null,v.label),[S.localize(13,null),S.localize(14,null)],{cancelId:1})).choice!==1)return this._undo(_,b,!0)})}_findClosestRedoElementWithSource(_){if(!_)return[null,null];let b=null,v=null;for(const[m,E]of this._editStacks){const I=E.getClosestFutureElement();!I||I.sourceId===_&&(!b||I.sourceOrder<b.sourceOrder)&&(b=I,v=m)}return[b,v]}canRedo(_){if(_ instanceof g.UndoRedoSource){const[,v]=this._findClosestRedoElementWithSource(_.id);return!!v}const b=this.getUriComparisonKey(_);return this._editStacks.has(b)?this._editStacks.get(b).hasFutureElements():!1}_tryToSplitAndRedo(_,b,v,m){if(b.canSplit())return this._splitFutureWorkspaceElement(b,v),this._notificationService.warn(m),new f(this._redo(_));for(const E of b.strResources)this.removeElements(E);return this._notificationService.warn(m),new f}_checkWorkspaceRedo(_,b,v,m){if(b.removedResources)return this._tryToSplitAndRedo(_,b,b.removedResources,S.localize(15,null,b.label,b.removedResources.createMessage()));if(m&&b.invalidatedResources)return this._tryToSplitAndRedo(_,b,b.invalidatedResources,S.localize(16,null,b.label,b.invalidatedResources.createMessage()));const E=[];for(const k of v.editStacks)k.getClosestFutureElement()!==b&&E.push(k.resourceLabel);if(E.length>0)return this._tryToSplitAndRedo(_,b,null,S.localize(17,null,b.label,E.join(", ")));const I=[];for(const k of v.editStacks)k.locked&&I.push(k.resourceLabel);return I.length>0?this._tryToSplitAndRedo(_,b,null,S.localize(18,null,b.label,I.join(", "))):v.isValid()?null:this._tryToSplitAndRedo(_,b,null,S.localize(19,null,b.label))}_workspaceRedo(_,b){const v=this._getAffectedEditStacks(b),m=this._checkWorkspaceRedo(_,b,v,!1);return m?m.returnValue:this._executeWorkspaceRedo(_,b,v)}_executeWorkspaceRedo(_,b,v){return Re(this,void 0,void 0,function*(){let m;try{m=yield this._invokeWorkspacePrepare(b)}catch(I){return this._onError(I,b)}const E=this._checkWorkspaceRedo(_,b,v,!0);if(E)return m.dispose(),E.returnValue;for(const I of v.editStacks)I.moveForward(b);return this._safeInvokeWithLocks(b,()=>b.actual.redo(),v,m,()=>this._continueRedoInGroup(b.groupId))})}_resourceRedo(_,b){if(!b.isValid){_.flushAllElements();return}if(_.locked){const v=S.localize(20,null,b.label);this._notificationService.warn(v);return}return this._invokeResourcePrepare(b,v=>(_.moveForward(b),this._safeInvokeWithLocks(b,()=>b.actual.redo(),new i([_]),v,()=>this._continueRedoInGroup(b.groupId))))}_findClosestRedoElementInGroup(_){if(!_)return[null,null];let b=null,v=null;for(const[m,E]of this._editStacks){const I=E.getClosestFutureElement();!I||I.groupId===_&&(!b||I.groupOrder<b.groupOrder)&&(b=I,v=m)}return[b,v]}_continueRedoInGroup(_){if(!_)return;const[,b]=this._findClosestRedoElementInGroup(_);if(b)return this._redo(b)}redo(_){if(_ instanceof g.UndoRedoSource){const[,b]=this._findClosestRedoElementWithSource(_.id);return b?this._redo(b):void 0}return typeof _=="string"?this._redo(_):this._redo(this.getUriComparisonKey(_))}_redo(_){if(!this._editStacks.has(_))return;const b=this._editStacks.get(_),v=b.getClosestFutureElement();if(!!v){if(v.groupId){const[m,E]=this._findClosestRedoElementInGroup(v.groupId);if(v!==m&&E)return this._redo(E)}try{return v.type===1?this._workspaceRedo(_,v):this._resourceRedo(b,v)}finally{t&&this._print("redo")}}}};h=Fe([Ce(0,p.IDialogService),Ce(1,n.INotificationService)],h),e.UndoRedoService=h;class f{constructor(_){this.returnValue=_}}(0,C.registerSingleton)(g.IUndoRedoService,h)}),define(J[201],ee([0,1,47,9]),function(j,e,w,N){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.WorkspaceFolder=e.Workspace=e.IWorkspaceContextService=void 0,e.IWorkspaceContextService=(0,N.createDecorator)("contextService");class T{constructor(p,C,n,g,t){this._id=p,this._transient=n,this._configuration=g,this._ignorePathCasing=t,this._foldersMap=w.TernarySearchTree.forUris(this._ignorePathCasing),this.folders=C}get folders(){return this._folders}set folders(p){this._folders=p,this.updateFoldersMap()}get id(){return this._id}get transient(){return this._transient}get configuration(){return this._configuration}set configuration(p){this._configuration=p}getFolder(p){return p&&this._foldersMap.findSubstr(p.with({scheme:p.scheme,authority:p.authority,path:p.path}))||null}updateFoldersMap(){this._foldersMap=w.TernarySearchTree.forUris(this._ignorePathCasing);for(const p of this.folders)this._foldersMap.set(p.uri,p)}toJSON(){return{id:this.id,folders:this.folders,transient:this.transient,configuration:this.configuration}}}e.Workspace=T;class D{constructor(p,C){this.raw=C,this.uri=p.uri,this.index=p.index,this.name=p.name}toJSON(){return{uri:this.uri,name:this.name,index:this.index}}}e.WorkspaceFolder=D}),define(J[202],ee([0,1,8,7,52,4,93,2,17,76,24,114,146,193,59,13,3,42,26,41,590,572,262,80,263,574,36,201,65]),function(j,e,w,N,T,D,S,p,C,n,g,t,s,c,u,d,a,r,o,i,l,h,f,y,_,b,v,m,E){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SimpleLayoutService=e.SimpleUriLabelService=e.SimpleBulkEditService=e.updateConfigurationService=e.SimpleWorkspaceContextService=e.StandaloneTelemetryService=e.SimpleResourcePropertiesService=e.SimpleResourceConfigurationService=e.SimpleConfigurationService=e.StandaloneKeybindingService=e.StandaloneCommandService=e.SimpleNotificationService=e.SimpleDialogService=e.SimpleEditorProgressService=e.SimpleEditorModelResolverService=e.SimpleModel=void 0;class I{constructor(x){this.disposed=!1,this.model=x,this._onWillDispose=new D.Emitter}get textEditorModel(){return this.model}dispose(){this.disposed=!0,this._onWillDispose.fire()}}e.SimpleModel=I;function k(G,x,U){return(0,t.isCodeEditor)(G)?x(G):U(G)}let M=class{constructor(x){this.modelService=x}setEditor(x){this.editor=x}createModelReference(x){let U=null;return this.editor&&(U=k(this.editor,$=>this.findModel($,x),$=>this.findModel($.getOriginalEditor(),x)||this.findModel($.getModifiedEditor(),x))),U?Promise.resolve(new p.ImmortalReference(new I(U))):Promise.reject(new Error("Model not found"))}findModel(x,U){let $=this.modelService.getModel(U);return $&&$.uri.toString()!==U.toString()?null:$}};M=Fe([Ce(0,r.IModelService)],M),e.SimpleEditorModelResolverService=M;class P{show(){return P.NULL_PROGRESS_RUNNER}showWhile(x,U){return Re(this,void 0,void 0,function*(){yield x})}}e.SimpleEditorProgressService=P,P.NULL_PROGRESS_RUNNER={done:()=>{},total:()=>{},worked:()=>{}};class F{confirm(x){return this.doConfirm(x).then(U=>({confirmed:U,checkboxChecked:!1}))}doConfirm(x){let U=x.message;return x.detail&&(U=U+`
 
`+x.detail),Promise.resolve(window.confirm(U))}show(x,U,$,V){return Promise.resolve({choice:0})}}e.SimpleDialogService=F;class R{info(x){return this.notify({severity:n.default.Info,message:x})}warn(x){return this.notify({severity:n.default.Warning,message:x})}error(x){return this.notify({severity:n.default.Error,message:x})}notify(x){switch(x.severity){case n.default.Error:console.error(x.message);break;case n.default.Warning:console.warn(x.message);break;default:console.log(x.message);break}return R.NO_OP}status(x,U){return p.Disposable.None}}e.SimpleNotificationService=R,R.NO_OP=new v.NoOpNotification;class A{constructor(x){this._onWillExecuteCommand=new D.Emitter,this._onDidExecuteCommand=new D.Emitter,this.onDidExecuteCommand=this._onDidExecuteCommand.event,this._instantiationService=x}executeCommand(x,...U){const $=o.CommandsRegistry.getCommand(x);if(!$)return Promise.reject(new Error(`command '${x}' not found`));try{this._onWillExecuteCommand.fire({commandId:x,args:U});const V=this._instantiationService.invokeFunction.apply(this._instantiationService,[$.handler,...U]);return this._onDidExecuteCommand.fire({commandId:x,args:U}),Promise.resolve(V)}catch(V){return Promise.reject(V)}}}e.StandaloneCommandService=A;class O extends h.AbstractKeybindingService{constructor(x,U,$,V,Q,ue){super(x,U,$,V,Q);this._cachedResolver=null,this._dynamicKeybindings=[],this._register(N.addDisposableListener(ue,N.EventType.KEY_DOWN,pe=>{const fe=new T.StandardKeyboardEvent(pe);this._dispatch(fe,fe.target)&&(fe.preventDefault(),fe.stopPropagation())})),this._register(N.addDisposableListener(window,N.EventType.KEY_UP,pe=>{const fe=new T.StandardKeyboardEvent(pe);this._singleModifierDispatch(fe,fe.target)&&fe.preventDefault()}))}addDynamicKeybinding(x,U,$,V){const Q=(0,S.createKeybinding)(U,C.OS),ue=new p.DisposableStore;return Q&&(this._dynamicKeybindings.push({keybinding:Q.parts,command:x,when:V,weight1:1e3,weight2:0,extensionId:null,isBuiltinExtension:!1}),ue.add((0,p.toDisposable)(()=>{for(let pe=0;pe<this._dynamicKeybindings.length;pe++)if(this._dynamicKeybindings[pe].command===x){this._dynamicKeybindings.splice(pe,1),this.updateResolver({source:1});return}}))),ue.add(o.CommandsRegistry.registerCommand(x,$)),this.updateResolver({source:1}),ue}updateResolver(x){this._cachedResolver=null,this._onDidUpdateKeybindings.fire(x)}_getResolver(){if(!this._cachedResolver){const x=this._toNormalizedKeybindingItems(y.KeybindingsRegistry.getDefaultKeybindings(),!0),U=this._toNormalizedKeybindingItems(this._dynamicKeybindings,!1);this._cachedResolver=new f.KeybindingResolver(x,U,$=>this._log($))}return this._cachedResolver}_documentHasFocus(){return document.hasFocus()}_toNormalizedKeybindingItems(x,U){let $=[],V=0;for(const Q of x){const ue=Q.when||void 0,pe=Q.keybinding;if(!pe)$[V++]=new _.ResolvedKeybindingItem(void 0,Q.command,Q.commandArgs,ue,U,null,!1);else{const fe=b.USLayoutResolvedKeybinding.resolveUserBinding(pe,C.OS);for(const re of fe)$[V++]=new _.ResolvedKeybindingItem(re,Q.command,Q.commandArgs,ue,U,null,!1)}}return $}resolveKeyboardEvent(x){let U=new S.SimpleKeybinding(x.ctrlKey,x.shiftKey,x.altKey,x.metaKey,x.keyCode).toChord();return new b.USLayoutResolvedKeybinding(U,C.OS)}}e.StandaloneKeybindingService=O;function L(G){return G&&typeof G=="object"&&(!G.overrideIdentifier||typeof G.overrideIdentifier=="string")&&(!G.resource||G.resource instanceof g.URI)}class B{constructor(){this._onDidChangeConfiguration=new D.Emitter,this.onDidChangeConfiguration=this._onDidChangeConfiguration.event,this._configuration=new l.Configuration(new l.DefaultConfigurationModel,new l.ConfigurationModel)}getValue(x,U){const $=typeof x=="string"?x:void 0,V=L(x)?x:L(U)?U:{};return this._configuration.getValue($,V,void 0)}updateValues(x){const U={data:this._configuration.toData()};let $=[];for(const V of x){const[Q,ue]=V;this.getValue(Q)!==ue&&(this._configuration.updateValue(Q,ue),$.push(Q))}if($.length>0){const V=new l.ConfigurationChangeEvent({keys:$,overrides:[]},U,this._configuration);V.source=7,V.sourceConfig=null,this._onDidChangeConfiguration.fire(V)}return Promise.resolve()}}e.SimpleConfigurationService=B;class W{constructor(x){this.configurationService=x,this._onDidChangeConfiguration=new D.Emitter,this.configurationService.onDidChangeConfiguration(U=>{this._onDidChangeConfiguration.fire({affectedKeys:U.affectedKeys,affectsConfiguration:($,V)=>U.affectsConfiguration(V)})})}getValue(x,U,$){const Q=(d.Position.isIPosition(U)?U:null)?typeof $=="string"?$:void 0:typeof U=="string"?U:void 0;return typeof Q=="undefined"?this.configurationService.getValue():this.configurationService.getValue(Q)}}e.SimpleResourceConfigurationService=W;let K=class{constructor(x){this.configurationService=x}getEOL(x,U){const $=this.configurationService.getValue("files.eol",{overrideIdentifier:U,resource:x});return $&&typeof $=="string"&&$!=="auto"?$:C.isLinux||C.isMacintosh?`
`:`\r
`}};K=Fe([Ce(0,i.IConfigurationService)],K),e.SimpleResourcePropertiesService=K;class H{publicLog(x,U){return Promise.resolve(void 0)}publicLog2(x,U){return this.publicLog(x,U)}}e.StandaloneTelemetryService=H;class Y{constructor(){const x=g.URI.from({scheme:Y.SCHEME,authority:"model",path:"/"});this.workspace={id:"4064f6ec-cb38-4ad0-af64-ee6467e63c82",folders:[new m.WorkspaceFolder({uri:x,name:"",index:0})]}}getWorkspace(){return this.workspace}}e.SimpleWorkspaceContextService=Y,Y.SCHEME="inmemory";function X(G,x,U){if(!x||!(G instanceof B))return;let $=[];Object.keys(x).forEach(V=>{(0,c.isEditorConfigurationKey)(V)&&$.push([`editor.${V}`,x[V]]),U&&(0,c.isDiffEditorConfigurationKey)(V)&&$.push([`diffEditor.${V}`,x[V]])}),$.length>0&&G.updateValues($)}e.updateConfigurationService=X;class Z{constructor(x){this._modelService=x}hasPreviewHandler(){return!1}apply(x,U){return Re(this,void 0,void 0,function*(){const $=new Map;for(let ue of x){if(!(ue instanceof s.ResourceTextEdit))throw new Error("bad edit - only text edits are supported");const pe=this._modelService.getModel(ue.resource);if(!pe)throw new Error("bad edit - model not found");if(typeof ue.versionId=="number"&&pe.getVersionId()!==ue.versionId)throw new Error("bad state - model changed in the meantime");let fe=$.get(pe);fe||(fe=[],$.set(pe,fe)),fe.push(u.EditOperation.replaceMove(a.Range.lift(ue.textEdit.range),ue.textEdit.text))}let V=0,Q=0;for(const[ue,pe]of $)ue.pushStackElement(),ue.pushEditOperations([],pe,()=>[]),ue.pushStackElement(),Q+=1,V+=pe.length;return{ariaSummary:w.format(E.SimpleServicesNLS.bulkEditServiceSummary,V,Q)}})}}e.SimpleBulkEditService=Z;class se{getUriLabel(x,U){return x.scheme==="file"?x.fsPath:x.path}}e.SimpleUriLabelService=se;class oe{constructor(x,U){this._codeEditorService=x,this._container=U,this.onDidLayout=D.Event.None}get dimension(){return this._dimension||(this._dimension=N.getClientArea(window.document.body)),this._dimension}get container(){return this._container}focus(){var x;(x=this._codeEditorService.getFocusedCodeEditor())===null||x===void 0||x.focus()}}e.SimpleLayoutService=oe}),define(J[703],ee([0,1,45,2,28,157,281,228,78,202,123,35,26,41,15,71,9,40,36,10,61,65,88,62,42,39,272,109]),function(j,e,w,N,T,D,S,p,C,n,g,t,s,c,u,d,a,r,o,i,l,h,f,y,_,b,v,m){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.createTextModel=e.StandaloneDiffEditor=e.StandaloneEditor=e.StandaloneCodeEditor=void 0;let E=0,I=!1;function k(O){if(!O){if(I)return;I=!0}w.setARIAContainer(O||document.body)}let M=class extends D.CodeEditorWidget{constructor(L,B,W,K,H,Y,X,Z,se,oe){const G=Object.assign({},B);G.ariaLabel=G.ariaLabel||h.StandaloneCodeEditorNLS.editorViewAccessibleLabel,G.ariaLabel=G.ariaLabel+";"+h.StandaloneCodeEditorNLS.accessibilityHelpMessage,super(L,G,{},W,K,H,Y,Z,se,oe),X instanceof n.StandaloneKeybindingService?this._standaloneKeybindingService=X:this._standaloneKeybindingService=null,k(G.ariaContainerElement)}addCommand(L,B,W){if(!this._standaloneKeybindingService)return console.warn("Cannot add command because the editor is configured with an unrecognized KeybindingService"),null;let K="DYNAMIC_"+ ++E,H=u.ContextKeyExpr.deserialize(W);return this._standaloneKeybindingService.addDynamicKeybinding(K,L,B,H),K}createContextKey(L,B){return this._contextKeyService.createKey(L,B)}addAction(L){if(typeof L.id!="string"||typeof L.label!="string"||typeof L.run!="function")throw new Error("Invalid action descriptor, `id`, `label` and `run` are required properties!");if(!this._standaloneKeybindingService)return console.warn("Cannot add keybinding because the editor is configured with an unrecognized KeybindingService"),N.Disposable.None;const B=L.id,W=L.label,K=u.ContextKeyExpr.and(u.ContextKeyExpr.equals("editorId",this.getId()),u.ContextKeyExpr.deserialize(L.precondition)),H=L.keybindings,Y=u.ContextKeyExpr.and(K,u.ContextKeyExpr.deserialize(L.keybindingContext)),X=L.contextMenuGroupId||null,Z=L.contextMenuOrder||0,se=(U,...$)=>Promise.resolve(L.run(this,...$)),oe=new N.DisposableStore,G=this.getId()+":"+B;if(oe.add(s.CommandsRegistry.registerCommand(G,se)),X){let U={command:{id:G,title:W},when:K,group:X,order:Z};oe.add(t.MenuRegistry.appendMenuItem(t.MenuId.EditorContext,U))}if(Array.isArray(H))for(const U of H)oe.add(this._standaloneKeybindingService.addDynamicKeybinding(G,U,se,Y));let x=new p.InternalEditorAction(G,W,W,K,se,this._contextKeyService);return this._actions[B]=x,oe.add((0,N.toDisposable)(()=>{delete this._actions[B]})),oe}_triggerCommand(L,B){if(this._codeEditorService instanceof v.StandaloneCodeEditorServiceImpl)try{this._codeEditorService.setActiveCodeEditor(this),super._triggerCommand(L,B)}finally{this._codeEditorService.setActiveCodeEditor(null)}else super._triggerCommand(L,B)}};M=Fe([Ce(2,a.IInstantiationService),Ce(3,T.ICodeEditorService),Ce(4,s.ICommandService),Ce(5,u.IContextKeyService),Ce(6,r.IKeybindingService),Ce(7,i.IThemeService),Ce(8,o.INotificationService),Ce(9,l.IAccessibilityService)],M),e.StandaloneCodeEditor=M;let P=class extends M{constructor(L,B,W,K,H,Y,X,Z,se,oe,G,x,U,$,V){const Q=Object.assign({},B);(0,n.updateConfigurationService)(x,Q,!1);const ue=oe.registerEditorContainer(L);typeof Q.theme=="string"&&oe.setTheme(Q.theme),typeof Q.autoDetectHighContrast!="undefined"&&oe.setAutoDetectHighContrast(Boolean(Q.autoDetectHighContrast));let pe=Q.model;delete Q.model,super(L,Q,K,H,Y,X,Z,oe,G,U),this._contextViewService=se,this._configurationService=x,this._standaloneThemeService=oe,this._register(W),this._register(ue);let fe;if(typeof pe=="undefined"?(fe=R($,V,Q.value||"",Q.language||m.Mimes.text,void 0),this._ownsModel=!0):(fe=pe,this._ownsModel=!1),this._attachModel(fe),fe){let re={oldModelUrl:null,newModelUrl:fe.uri};this._onDidChangeModel.fire(re)}}dispose(){super.dispose()}updateOptions(L){(0,n.updateConfigurationService)(this._configurationService,L,!1),typeof L.theme=="string"&&this._standaloneThemeService.setTheme(L.theme),typeof L.autoDetectHighContrast!="undefined"&&this._standaloneThemeService.setAutoDetectHighContrast(Boolean(L.autoDetectHighContrast)),super.updateOptions(L)}_attachModel(L){super._attachModel(L),this._modelData&&this._contextViewService.setContainer(this._modelData.view.domNode.domNode)}_postDetachModelCleanup(L){super._postDetachModelCleanup(L),L&&this._ownsModel&&(L.dispose(),this._ownsModel=!1)}};P=Fe([Ce(3,a.IInstantiationService),Ce(4,T.ICodeEditorService),Ce(5,s.ICommandService),Ce(6,u.IContextKeyService),Ce(7,r.IKeybindingService),Ce(8,d.IContextViewService),Ce(9,g.IStandaloneThemeService),Ce(10,o.INotificationService),Ce(11,c.IConfigurationService),Ce(12,l.IAccessibilityService),Ce(13,_.IModelService),Ce(14,b.IModeService)],P),e.StandaloneEditor=P;let F=class extends S.DiffEditorWidget{constructor(L,B,W,K,H,Y,X,Z,se,oe,G,x,U,$,V){const Q=Object.assign({},B);(0,n.updateConfigurationService)(x,Q,!0);const ue=oe.registerEditorContainer(L);typeof Q.theme=="string"&&oe.setTheme(Q.theme),typeof Q.autoDetectHighContrast!="undefined"&&oe.setAutoDetectHighContrast(Boolean(Q.autoDetectHighContrast)),super(L,Q,{},V,Z,H,K,se,oe,G,U,$),this._contextViewService=X,this._configurationService=x,this._standaloneThemeService=oe,this._register(W),this._register(ue),this._contextViewService.setContainer(this._containerDomElement)}dispose(){super.dispose()}updateOptions(L){(0,n.updateConfigurationService)(this._configurationService,L,!0),typeof L.theme=="string"&&this._standaloneThemeService.setTheme(L.theme),typeof L.autoDetectHighContrast!="undefined"&&this._standaloneThemeService.setAutoDetectHighContrast(Boolean(L.autoDetectHighContrast)),super.updateOptions(L)}_createInnerEditor(L,B,W){return L.createInstance(M,B,W)}getOriginalEditor(){return super.getOriginalEditor()}getModifiedEditor(){return super.getModifiedEditor()}addCommand(L,B,W){return this.getModifiedEditor().addCommand(L,B,W)}createContextKey(L,B){return this.getModifiedEditor().createContextKey(L,B)}addAction(L){return this.getModifiedEditor().addAction(L)}};F=Fe([Ce(3,a.IInstantiationService),Ce(4,u.IContextKeyService),Ce(5,r.IKeybindingService),Ce(6,d.IContextViewService),Ce(7,C.IEditorWorkerService),Ce(8,T.ICodeEditorService),Ce(9,g.IStandaloneThemeService),Ce(10,o.INotificationService),Ce(11,c.IConfigurationService),Ce(12,d.IContextMenuService),Ce(13,y.IEditorProgressService),Ce(14,f.IClipboardService)],F),e.StandaloneDiffEditor=F;function R(O,L,B,W,K){if(B=B||"",!W){const H=B.indexOf(`
`);let Y=B;return H!==-1&&(Y=B.substring(0,H)),A(O,B,L.createByFilepathOrFirstLine(K||null,Y),K)}return A(O,B,L.create(W),K)}e.createTextModel=R;function A(O,L,B,W){return O.createModel(L,B,W)}}),define(J[290],ee([0,1,2,146,28,78,265,39,586,42,280,149,202,272,658,123,35,26,41,591,15,649,71,575,124,9,571,150,40,125,154,72,577,89,36,62,73,90,10,201,647,190,612,61,151,70,589,88,557,129,702,651,79,37]),function(j,e,w,N,T,D,S,p,C,n,g,t,s,c,u,d,a,r,o,i,l,h,f,y,_,b,v,m,E,I,k,M,P,F,R,A,O,L,B,W,K,H,Y,X,Z,se,oe,G,x,U,$,V,Q,ue){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DynamicStandaloneServices=e.StaticServices=void 0;var pe;(function(re){const ie=new m.ServiceCollection;class ae{constructor(z,te){this._serviceId=z,this._factory=te,this._value=null}get id(){return this._serviceId}get(z){if(!this._value){if(z&&(this._value=z[this._serviceId.toString()]),this._value||(this._value=this._factory(z)),!this._value)throw new Error("Service "+this._serviceId+" is missing!");ie.set(this._serviceId,this._value)}return this._value}}re.LazyStaticService=ae;let q=[];function ne(de,z){let te=new ae(de,z);return q.push(te),te}function ce(de){let z=new m.ServiceCollection;for(const[he,ge]of(0,se.getSingletonServiceDescriptors)())z.set(he,ge);for(let he in de)de.hasOwnProperty(he)&&z.set((0,b.createDecorator)(he),de[he]);q.forEach(he=>z.set(he.id,he.get(de)));let te=new v.InstantiationService(z,!0);return z.set(b.IInstantiationService,te),[z,te]}re.init=ce,re.instantiationService=ne(b.IInstantiationService,()=>new v.InstantiationService(ie,!0));const le=new s.SimpleConfigurationService;re.configurationService=ne(o.IConfigurationService,()=>le),re.resourceConfigurationService=ne(t.ITextResourceConfigurationService,()=>new s.SimpleResourceConfigurationService(le)),re.resourcePropertiesService=ne(t.ITextResourcePropertiesService,()=>new s.SimpleResourcePropertiesService(le)),re.contextService=ne(W.IWorkspaceContextService,()=>new s.SimpleWorkspaceContextService),re.labelService=ne(I.ILabelService,()=>new s.SimpleUriLabelService),re.telemetryService=ne(L.ITelemetryService,()=>new s.StandaloneTelemetryService),re.dialogService=ne(_.IDialogService,()=>new s.SimpleDialogService),re.notificationService=ne(R.INotificationService,()=>new s.SimpleNotificationService),re.markerService=ne(F.IMarkerService,()=>new P.MarkerService),re.modeService=ne(p.IModeService,de=>new C.ModeServiceImpl),re.standaloneThemeService=ne(d.IStandaloneThemeService,()=>new u.StandaloneThemeServiceImpl),re.logService=ne(M.ILogService,()=>new M.LogService(new M.ConsoleLogger)),re.undoRedoService=ne(U.IUndoRedoService,de=>new $.UndoRedoService(re.dialogService.get(de),re.notificationService.get(de))),re.languageConfigurationService=ne(ue.ILanguageConfigurationService,de=>new ue.LanguageConfigurationService(re.configurationService.get(de),re.modeService.get(de))),re.modelService=ne(n.IModelService,de=>new g.ModelServiceImpl(re.configurationService.get(de),re.resourcePropertiesService.get(de),re.standaloneThemeService.get(de),re.logService.get(de),re.undoRedoService.get(de),re.modeService.get(de),re.languageConfigurationService.get(de))),re.markerDecorationsService=ne(H.IMarkerDecorationsService,de=>new Y.MarkerDecorationsService(re.modelService.get(de),re.markerService.get(de))),re.contextKeyService=ne(l.IContextKeyService,de=>new i.ContextKeyService(re.configurationService.get(de))),re.codeEditorService=ne(T.ICodeEditorService,de=>new c.StandaloneCodeEditorServiceImpl(null,re.contextKeyService.get(de),re.standaloneThemeService.get(de))),re.editorProgressService=ne(A.IEditorProgressService,()=>new s.SimpleEditorProgressService),re.storageService=ne(O.IStorageService,()=>new O.InMemoryStorageService),re.editorWorkerService=ne(D.IEditorWorkerService,de=>new S.EditorWorkerServiceImpl(re.modelService.get(de),re.resourceConfigurationService.get(de),re.logService.get(de)))})(pe=e.StaticServices||(e.StaticServices={}));class fe extends w.Disposable{constructor(ie,ae){super();const[q,ne]=pe.init(ae);this._serviceCollection=q,this._instantiationService=ne;const ce=this.get(o.IConfigurationService),le=this.get(R.INotificationService),de=this.get(L.ITelemetryService),z=this.get(B.IThemeService),te=this.get(M.ILogService),he=this.get(l.IContextKeyService);let ge=(Ne,ze)=>{let xe=null;return ae&&(xe=ae[Ne.toString()]),xe||(xe=ze()),this._serviceCollection.set(Ne,xe),xe};ge(X.IAccessibilityService,()=>new oe.AccessibilityService(he,ce)),ge(k.IListService,()=>new k.ListService(z));let ve=ge(r.ICommandService,()=>new s.StandaloneCommandService(this._instantiationService)),Se=ge(E.IKeybindingService,()=>this._register(new s.StandaloneKeybindingService(he,ve,de,le,te,ie))),Ee=ge(Z.ILayoutService,()=>new s.SimpleLayoutService(pe.codeEditorService.get(T.ICodeEditorService),ie));ge(Q.IQuickInputService,()=>new V.StandaloneQuickInputServiceImpl(ne,pe.codeEditorService.get(T.ICodeEditorService)));let Ae=ge(f.IContextViewService,()=>this._register(new y.ContextViewService(Ee)));ge(G.IClipboardService,()=>new x.BrowserClipboardService),ge(f.IContextMenuService,()=>{const Ne=new h.ContextMenuService(de,le,Ae,Se,z);return Ne.configure({blockMouse:!1}),this._register(Ne)}),ge(a.IMenuService,()=>new K.MenuService(ve)),ge(N.IBulkEditService,()=>new s.SimpleBulkEditService(pe.modelService.get(n.IModelService)))}get(ie){let ae=this._serviceCollection.get(ie);if(!ae)throw new Error("Missing service "+ie);return ae}set(ie,ae){this._serviceCollection.set(ie,ae)}has(ie){return this._serviceCollection.has(ie)}}e.DynamicStandaloneServices=fe}),define(J[704],ee([0,1,28,578,226,31,173,113,49,18,77,78,39,66,587,179,565,202,703,290,123,26,41,15,71,9,40,36,57,61,63,62,88,8,42,378]),function(j,e,w,N,T,D,S,p,C,n,g,t,s,c,u,d,a,r,o,i,l,h,f,y,_,b,v,m,E,I,k,M,P,F,R){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.createMonacoEditorAPI=e.registerCommand=e.remeasureFonts=e.setTheme=e.defineTheme=e.tokenize=e.colorizeModelLine=e.colorize=e.colorizeElement=e.createWebWorker=e.onDidChangeModelLanguage=e.onWillDisposeModel=e.onDidCreateModel=e.getModels=e.getModel=e.onDidChangeMarkers=e.getModelMarkers=e.setModelMarkers=e.setModelLanguage=e.createModel=e.createDiffNavigator=e.createDiffEditor=e.onDidCreateEditor=e.create=void 0;function A(ce,le,de){let z=new i.DynamicStandaloneServices(ce,le),te=null;z.has(c.ITextModelService)||(te=new r.SimpleEditorModelResolverService(i.StaticServices.modelService.get()),z.set(c.ITextModelService,te)),z.has(E.IOpenerService)||z.set(E.IOpenerService,new N.OpenerService(z.get(w.ICodeEditorService),z.get(h.ICommandService)));let he=de(z);return te&&te.setEditor(he),he}function O(ce,le,de){return A(ce,de||{},z=>new o.StandaloneEditor(ce,le,z,z.get(b.IInstantiationService),z.get(w.ICodeEditorService),z.get(h.ICommandService),z.get(y.IContextKeyService),z.get(v.IKeybindingService),z.get(_.IContextViewService),z.get(l.IStandaloneThemeService),z.get(m.INotificationService),z.get(f.IConfigurationService),z.get(I.IAccessibilityService),z.get(R.IModelService),z.get(s.IModeService)))}e.create=O;function L(ce){return i.StaticServices.codeEditorService.get().onCodeEditorAdd(le=>{ce(le)})}e.onDidCreateEditor=L;function B(ce,le,de){return A(ce,de||{},z=>new o.StandaloneDiffEditor(ce,le,z,z.get(b.IInstantiationService),z.get(y.IContextKeyService),z.get(v.IKeybindingService),z.get(_.IContextViewService),z.get(t.IEditorWorkerService),z.get(w.ICodeEditorService),z.get(l.IStandaloneThemeService),z.get(m.INotificationService),z.get(f.IConfigurationService),z.get(_.IContextMenuService),z.get(M.IEditorProgressService),z.get(P.IClipboardService)))}e.createDiffEditor=B;function W(ce,le){return new T.DiffNavigator(ce,le)}e.createDiffNavigator=W;function K(ce,le,de){return(0,o.createTextModel)(i.StaticServices.modelService.get(),i.StaticServices.modeService.get(),ce,le,de)}e.createModel=K;function H(ce,le){i.StaticServices.modelService.get().setMode(ce,i.StaticServices.modeService.get().create(le))}e.setModelLanguage=H;function Y(ce,le,de){ce&&i.StaticServices.markerService.get().changeOne(le,ce.uri,de)}e.setModelMarkers=Y;function X(ce){return i.StaticServices.markerService.get().read(ce)}e.getModelMarkers=X;function Z(ce){return i.StaticServices.markerService.get().onMarkerChanged(ce)}e.onDidChangeMarkers=Z;function se(ce){return i.StaticServices.modelService.get().getModel(ce)}e.getModel=se;function oe(){return i.StaticServices.modelService.get().getModels()}e.getModels=oe;function G(ce){return i.StaticServices.modelService.get().onModelAdded(ce)}e.onDidCreateModel=G;function x(ce){return i.StaticServices.modelService.get().onModelRemoved(ce)}e.onWillDisposeModel=x;function U(ce){return i.StaticServices.modelService.get().onModelModeChanged(le=>{ce({model:le.model,oldLanguage:le.oldModeId})})}e.onDidChangeModelLanguage=U;function $(ce){return(0,u.createWebWorker)(i.StaticServices.modelService.get(),ce)}e.createWebWorker=$;function V(ce,le){const de=i.StaticServices.standaloneThemeService.get();return de.registerEditorContainer(ce),a.Colorizer.colorizeElement(de,i.StaticServices.modeService.get(),ce,le)}e.colorizeElement=V;function Q(ce,le,de){return i.StaticServices.standaloneThemeService.get().registerEditorContainer(document.body),a.Colorizer.colorize(i.StaticServices.modeService.get(),ce,le,de)}e.colorize=Q;function ue(ce,le,de=4){return i.StaticServices.standaloneThemeService.get().registerEditorContainer(document.body),a.Colorizer.colorizeModelLine(ce,le,de)}e.colorizeModelLine=ue;function pe(ce){let le=n.TokenizationRegistry.get(ce);return le||{getInitialState:()=>g.NULL_STATE,tokenize:(de,z,te,he)=>(0,g.nullTokenize)(ce,de,te,he)}}function fe(ce,le){i.StaticServices.modeService.get().triggerMode(le);let z=pe(le),te=(0,F.splitLines)(ce),he=[],ge=z.getInitialState();for(let ve=0,Se=te.length;ve<Se;ve++){let Ee=te[ve],Ae=z.tokenize(Ee,!0,ge,0);he[ve]=Ae.tokens,ge=Ae.endState}return he}e.tokenize=fe;function re(ce,le){i.StaticServices.standaloneThemeService.get().defineTheme(ce,le)}e.defineTheme=re;function ie(ce){i.StaticServices.standaloneThemeService.get().setTheme(ce)}e.setTheme=ie;function ae(){(0,k.clearAllFontInfos)()}e.remeasureFonts=ae;function q(ce,le){return h.CommandsRegistry.registerCommand({id:ce,handler:le})}e.registerCommand=q;function ne(){return{create:O,onDidCreateEditor:L,createDiffEditor:B,createDiffNavigator:W,createModel:K,setModelLanguage:H,setModelMarkers:Y,getModelMarkers:X,onDidChangeMarkers:Z,getModels:oe,getModel:se,onDidCreateModel:G,onWillDisposeModel:x,onDidChangeModelLanguage:U,createWebWorker:$,colorizeElement:V,colorize:Q,colorizeModelLine:ue,tokenize:fe,defineTheme:re,setTheme:ie,remeasureFonts:ae,registerCommand:q,AccessibilitySupport:d.AccessibilitySupport,ContentWidgetPositionPreference:d.ContentWidgetPositionPreference,CursorChangeReason:d.CursorChangeReason,DefaultEndOfLine:d.DefaultEndOfLine,EditorAutoIndentStrategy:d.EditorAutoIndentStrategy,EditorOption:d.EditorOption,EndOfLinePreference:d.EndOfLinePreference,EndOfLineSequence:d.EndOfLineSequence,MinimapPosition:d.MinimapPosition,MouseTargetType:d.MouseTargetType,OverlayWidgetPositionPreference:d.OverlayWidgetPositionPreference,OverviewRulerLane:d.OverviewRulerLane,RenderLineNumbersType:d.RenderLineNumbersType,RenderMinimap:d.RenderMinimap,ScrollbarVisibility:d.ScrollbarVisibility,ScrollType:d.ScrollType,TextEditorCursorBlinkingStyle:d.TextEditorCursorBlinkingStyle,TextEditorCursorStyle:d.TextEditorCursorStyle,TrackedRangeStickiness:d.TrackedRangeStickiness,WrappingIndent:d.WrappingIndent,ConfigurationChangedEvent:D.ConfigurationChangedEvent,BareFontInfo:S.BareFontInfo,FontInfo:S.FontInfo,TextModelResolvedOptions:C.TextModelResolvedOptions,FindMatch:C.FindMatch,EditorType:p.EditorType,EditorOptions:D.EditorOptions}}e.createMonacoEditorAPI=ne}),define(J[705],ee([0,1,29,3,141,18,37,127,179,290,436,257]),function(j,e,w,N,T,D,S,p,C,n,g,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.createMonacoLanguagesAPI=e.registerInlayHintsProvider=e.registerInlineCompletionsProvider=e.registerDocumentRangeSemanticTokensProvider=e.registerDocumentSemanticTokensProvider=e.registerSelectionRangeProvider=e.registerDeclarationProvider=e.registerFoldingRangeProvider=e.registerColorProvider=e.registerCompletionItemProvider=e.registerLinkProvider=e.registerOnTypeFormattingEditProvider=e.registerDocumentRangeFormattingEditProvider=e.registerDocumentFormattingEditProvider=e.registerCodeActionProvider=e.registerCodeLensProvider=e.registerTypeDefinitionProvider=e.registerImplementationProvider=e.registerDefinitionProvider=e.registerLinkedEditingRangeProvider=e.registerDocumentHighlightProvider=e.registerDocumentSymbolProvider=e.registerHoverProvider=e.registerSignatureHelpProvider=e.registerRenameProvider=e.registerReferenceProvider=e.setMonarchTokensProvider=e.setTokensProvider=e.setColorMap=e.TokenizationSupport2Adapter=e.EncodedTokenizationSupport2Adapter=e.setLanguageConfiguration=e.onLanguage=e.getEncodedLanguageId=e.getLanguages=e.register=void 0;function s($){p.ModesRegistry.registerLanguage($)}e.register=s;function c(){let $=[];return $=$.concat(p.ModesRegistry.getLanguages()),$}e.getLanguages=c;function u($){return n.StaticServices.modeService.get().languageIdCodec.encodeLanguageId($)}e.getEncodedLanguageId=u;function d($,V){let Q=n.StaticServices.modeService.get().onDidEncounterLanguage(ue=>{ue===$&&(Q.dispose(),V())});return Q}e.onLanguage=d;function a($,V){const Q=n.StaticServices.modeService.get().validateLanguageId($);if(!Q)throw new Error(`Cannot set configuration for unknown language ${$}`);return S.LanguageConfigurationRegistry.register(Q,V,100)}e.setLanguageConfiguration=a;class r{constructor(V,Q){this._languageId=V,this._actual=Q}getInitialState(){return this._actual.getInitialState()}tokenize(V,Q,ue,pe){if(typeof this._actual.tokenize=="function")return o.adaptTokenize(this._languageId,this._actual,V,ue,pe);throw new Error("Not supported!")}tokenize2(V,Q,ue){let pe=this._actual.tokenizeEncoded(V,ue);return new T.TokenizationResult2(pe.tokens,pe.endState)}}e.EncodedTokenizationSupport2Adapter=r;class o{constructor(V,Q,ue,pe){this._languageId=V,this._actual=Q,this._modeService=ue,this._standaloneThemeService=pe}getInitialState(){return this._actual.getInitialState()}static _toClassicTokens(V,Q,ue){let pe=[],fe=0;for(let re=0,ie=V.length;re<ie;re++){const ae=V[re];let q=ae.startIndex;re===0?q=0:q<fe&&(q=fe),pe[re]=new T.Token(q+ue,ae.scopes,Q),fe=q}return pe}static adaptTokenize(V,Q,ue,pe,fe){let re=Q.tokenize(ue,pe),ie=o._toClassicTokens(re.tokens,V,fe),ae;return re.endState.equals(pe)?ae=pe:ae=re.endState,new T.TokenizationResult(ie,ae)}tokenize(V,Q,ue,pe){return o.adaptTokenize(this._languageId,this._actual,V,ue,pe)}_toBinaryTokens(V,Q,ue){const pe=V.encodeLanguageId(this._languageId),fe=this._standaloneThemeService.getColorTheme().tokenTheme;let re=[],ie=0,ae=0;for(let ne=0,ce=Q.length;ne<ce;ne++){const le=Q[ne],de=fe.match(pe,le.scopes);if(ie>0&&re[ie-1]===de)continue;let z=le.startIndex;ne===0?z=0:z<ae&&(z=ae),re[ie++]=z+ue,re[ie++]=de,ae=z}let q=new Uint32Array(ie);for(let ne=0;ne<ie;ne++)q[ne]=re[ne];return q}tokenize2(V,Q,ue,pe){let fe=this._actual.tokenize(V,ue),re=this._toBinaryTokens(this._modeService.languageIdCodec,fe.tokens,pe),ie;return fe.endState.equals(ue)?ie=ue:ie=fe.endState,new T.TokenizationResult2(re,ie)}}e.TokenizationSupport2Adapter=o;function i($){return"tokenizeEncoded"in $}function l($){return $&&typeof $.then=="function"}function h($){if($){const V=[null];for(let Q=1,ue=$.length;Q<ue;Q++)V[Q]=w.Color.fromHex($[Q]);n.StaticServices.standaloneThemeService.get().setColorMapOverride(V)}else n.StaticServices.standaloneThemeService.get().setColorMapOverride(null)}e.setColorMap=h;function f($,V){const Q=n.StaticServices.modeService.get().validateLanguageId($);if(!Q)throw new Error(`Cannot set tokens provider for unknown language ${$}`);const ue=pe=>i(pe)?new r(Q,pe):new o(Q,pe,n.StaticServices.modeService.get(),n.StaticServices.standaloneThemeService.get());return l(V)?D.TokenizationRegistry.registerPromise($,V.then(pe=>ue(pe))):D.TokenizationRegistry.register($,ue(V))}e.setTokensProvider=f;function y($,V){const Q=ue=>(0,t.createTokenizationSupport)(n.StaticServices.modeService.get(),n.StaticServices.standaloneThemeService.get(),$,(0,g.compile)($,ue));return l(V)?D.TokenizationRegistry.registerPromise($,V.then(ue=>Q(ue))):D.TokenizationRegistry.register($,Q(V))}e.setMonarchTokensProvider=y;function _($,V){return D.ReferenceProviderRegistry.register($,V)}e.registerReferenceProvider=_;function b($,V){return D.RenameProviderRegistry.register($,V)}e.registerRenameProvider=b;function v($,V){return D.SignatureHelpProviderRegistry.register($,V)}e.registerSignatureHelpProvider=v;function m($,V){return D.HoverProviderRegistry.register($,{provideHover:(Q,ue,pe)=>{let fe=Q.getWordAtPosition(ue);return Promise.resolve(V.provideHover(Q,ue,pe)).then(re=>{if(!!re)return!re.range&&fe&&(re.range=new N.Range(ue.lineNumber,fe.startColumn,ue.lineNumber,fe.endColumn)),re.range||(re.range=new N.Range(ue.lineNumber,ue.column,ue.lineNumber,ue.column)),re})}})}e.registerHoverProvider=m;function E($,V){return D.DocumentSymbolProviderRegistry.register($,V)}e.registerDocumentSymbolProvider=E;function I($,V){return D.DocumentHighlightProviderRegistry.register($,V)}e.registerDocumentHighlightProvider=I;function k($,V){return D.LinkedEditingRangeProviderRegistry.register($,V)}e.registerLinkedEditingRangeProvider=k;function M($,V){return D.DefinitionProviderRegistry.register($,V)}e.registerDefinitionProvider=M;function P($,V){return D.ImplementationProviderRegistry.register($,V)}e.registerImplementationProvider=P;function F($,V){return D.TypeDefinitionProviderRegistry.register($,V)}e.registerTypeDefinitionProvider=F;function R($,V){return D.CodeLensProviderRegistry.register($,V)}e.registerCodeLensProvider=R;function A($,V,Q){return D.CodeActionProviderRegistry.register($,{providedCodeActionKinds:Q==null?void 0:Q.providedCodeActionKinds,provideCodeActions:(ue,pe,fe,re)=>{let ie=n.StaticServices.markerService.get().read({resource:ue.uri}).filter(ae=>N.Range.areIntersectingOrTouching(ae,pe));return V.provideCodeActions(ue,pe,{markers:ie,only:fe.only},re)},resolveCodeAction:V.resolveCodeAction})}e.registerCodeActionProvider=A;function O($,V){return D.DocumentFormattingEditProviderRegistry.register($,V)}e.registerDocumentFormattingEditProvider=O;function L($,V){return D.DocumentRangeFormattingEditProviderRegistry.register($,V)}e.registerDocumentRangeFormattingEditProvider=L;function B($,V){return D.OnTypeFormattingEditProviderRegistry.register($,V)}e.registerOnTypeFormattingEditProvider=B;function W($,V){return D.LinkProviderRegistry.register($,V)}e.registerLinkProvider=W;function K($,V){return D.CompletionProviderRegistry.register($,V)}e.registerCompletionItemProvider=K;function H($,V){return D.ColorProviderRegistry.register($,V)}e.registerColorProvider=H;function Y($,V){return D.FoldingRangeProviderRegistry.register($,V)}e.registerFoldingRangeProvider=Y;function X($,V){return D.DeclarationProviderRegistry.register($,V)}e.registerDeclarationProvider=X;function Z($,V){return D.SelectionRangeRegistry.register($,V)}e.registerSelectionRangeProvider=Z;function se($,V){return D.DocumentSemanticTokensProviderRegistry.register($,V)}e.registerDocumentSemanticTokensProvider=se;function oe($,V){return D.DocumentRangeSemanticTokensProviderRegistry.register($,V)}e.registerDocumentRangeSemanticTokensProvider=oe;function G($,V){return D.InlineCompletionsProviderRegistry.register($,V)}e.registerInlineCompletionsProvider=G;function x($,V){return D.InlayHintsProviderRegistry.register($,V)}e.registerInlayHintsProvider=x;function U(){return{register:s,getLanguages:c,onLanguage:d,getEncodedLanguageId:u,setLanguageConfiguration:a,setColorMap:h,setTokensProvider:f,setMonarchTokensProvider:y,registerReferenceProvider:_,registerRenameProvider:b,registerCompletionItemProvider:K,registerSignatureHelpProvider:v,registerHoverProvider:m,registerDocumentSymbolProvider:E,registerDocumentHighlightProvider:I,registerLinkedEditingRangeProvider:k,registerDefinitionProvider:M,registerImplementationProvider:P,registerTypeDefinitionProvider:F,registerCodeLensProvider:R,registerCodeActionProvider:A,registerDocumentFormattingEditProvider:O,registerDocumentRangeFormattingEditProvider:L,registerOnTypeFormattingEditProvider:B,registerLinkProvider:W,registerColorProvider:H,registerFoldingRangeProvider:Y,registerDeclarationProvider:X,registerSelectionRangeProvider:Z,registerDocumentSemanticTokensProvider:se,registerDocumentRangeSemanticTokensProvider:oe,registerInlineCompletionsProvider:G,registerInlayHintsProvider:x,DocumentHighlightKind:C.DocumentHighlightKind,CompletionItemKind:C.CompletionItemKind,CompletionItemTag:C.CompletionItemTag,CompletionItemInsertTextRule:C.CompletionItemInsertTextRule,SymbolKind:C.SymbolKind,SymbolTag:C.SymbolTag,IndentAction:C.IndentAction,CompletionTriggerKind:C.CompletionTriggerKind,SignatureHelpTriggerKind:C.SignatureHelpTriggerKind,InlayHintKind:C.InlayHintKind,InlineCompletionTriggerKind:C.InlineCompletionTriggerKind,FoldingRangeKind:D.FoldingRangeKind}}e.createMonacoLanguagesAPI=U}),define(J[706],ee([0,1,31,232,704,705,17,273]),function(j,e,w,N,T,D,S,p){"use strict";var C;Object.defineProperty(e,"__esModule",{value:!0}),e.languages=e.editor=e.Token=e.Uri=e.MarkerTag=e.MarkerSeverity=e.SelectionDirection=e.Selection=e.Range=e.Position=e.KeyMod=e.KeyCode=e.Emitter=e.CancellationTokenSource=void 0,w.EditorOptions.wrappingIndent.defaultValue=0,w.EditorOptions.glyphMargin.defaultValue=!1,w.EditorOptions.autoIndent.defaultValue=3,w.EditorOptions.overviewRulerLanes.defaultValue=2,p.FormattingConflicts.setFormatterSelector((g,t,s)=>Promise.resolve(g[0]));const n=(0,N.createMonacoBaseAPI)();n.editor=(0,T.createMonacoEditorAPI)(),n.languages=(0,D.createMonacoLanguagesAPI)(),e.CancellationTokenSource=n.CancellationTokenSource,e.Emitter=n.Emitter,e.KeyCode=n.KeyCode,e.KeyMod=n.KeyMod,e.Position=n.Position,e.Range=n.Range,e.Selection=n.Selection,e.SelectionDirection=n.SelectionDirection,e.MarkerSeverity=n.MarkerSeverity,e.MarkerTag=n.MarkerTag,e.Uri=n.Uri,e.Token=n.Token,e.editor=n.editor,e.languages=n.languages,(((C=S.globals.MonacoEnvironment)===null||C===void 0?void 0:C.globalAPI)||typeof define=="function"&&define.amd)&&(self.monaco=n),typeof self.require!="undefined"&&typeof self.require.config=="function"&&self.require.config({ignoreDuplicateModules:["vscode-languageserver-types","vscode-languageserver-types/main","vscode-languageserver-textdocument","vscode-languageserver-textdocument/main","vscode-nls","vscode-nls/vscode-nls","jsonc-parser","jsonc-parser/main","vscode-uri","vscode-uri/index","vs/basic-languages/typescript/typescript"]})}),define(J[707],ee([0,1,24]),function(j,e,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.toWorkspaceIdentifier=e.isSingleFolderWorkspaceIdentifier=e.WORKSPACE_EXTENSION=void 0,e.WORKSPACE_EXTENSION="code-workspace";function N(D){const S=D;return typeof(S==null?void 0:S.id)=="string"&&w.URI.isUri(S.uri)}e.isSingleFolderWorkspaceIdentifier=N;function T(D){if(D.configuration)return{id:D.id,configPath:D.configuration};if(D.folders.length===1)return{id:D.id,uri:D.folders[0].uri}}e.toWorkspaceIdentifier=T}),define(J[708],ee([0,1,168,75,44,8,311,37,120,531,707]),function(j,e,w,N,T,D,S,p,C,n,g){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.RandomBasedVariableResolver=e.WorkspaceBasedVariableResolver=e.TimeBasedVariableResolver=e.CommentBasedVariableResolver=e.ClipboardBasedVariableResolver=e.ModelBasedVariableResolver=e.SelectionBasedVariableResolver=e.CompositeSnippetVariableResolver=void 0;class t{constructor(l){this._delegates=l}resolve(l){for(const h of this._delegates){let f=h.resolve(l);if(f!==void 0)return f}}}e.CompositeSnippetVariableResolver=t;class s{constructor(l,h,f,y){this._model=l,this._selection=h,this._selectionIdx=f,this._overtypingCapturer=y}resolve(l){const{name:h}=l;if(h==="SELECTION"||h==="TM_SELECTED_TEXT"){let f=this._model.getValueInRange(this._selection)||void 0,y=this._selection.startLineNumber!==this._selection.endLineNumber;if(!f&&this._overtypingCapturer){const _=this._overtypingCapturer.getLastOvertypedInfo(this._selectionIdx);_&&(f=_.value,y=_.multiline)}if(f&&y&&l.snippet){const _=this._model.getLineContent(this._selection.startLineNumber),b=(0,D.getLeadingWhitespace)(_,0,this._selection.startColumn-1);let v=b;l.snippet.walk(E=>E===l?!1:(E instanceof C.Text&&(v=(0,D.getLeadingWhitespace)((0,D.splitLines)(E.value).pop())),!0));const m=(0,D.commonPrefixLength)(v,b);f=f.replace(/(\r\n|\r|\n)(.*)/g,(E,I,k)=>`${I}${v.substr(m)}${k}`)}return f}else{if(h==="TM_CURRENT_LINE")return this._model.getLineContent(this._selection.positionLineNumber);if(h==="TM_CURRENT_WORD"){const f=this._model.getWordAtPosition({lineNumber:this._selection.positionLineNumber,column:this._selection.positionColumn});return f&&f.word||void 0}else{if(h==="TM_LINE_INDEX")return String(this._selection.positionLineNumber-1);if(h==="TM_LINE_NUMBER")return String(this._selection.positionLineNumber)}}}}e.SelectionBasedVariableResolver=s;class c{constructor(l,h){this._labelService=l,this._model=h}resolve(l){const{name:h}=l;if(h==="TM_FILENAME")return N.basename(this._model.uri.fsPath);if(h==="TM_FILENAME_BASE"){const f=N.basename(this._model.uri.fsPath),y=f.lastIndexOf(".");return y<=0?f:f.slice(0,y)}else{if(h==="TM_DIRECTORY")return N.dirname(this._model.uri.fsPath)==="."?"":this._labelService.getUriLabel((0,T.dirname)(this._model.uri));if(h==="TM_FILEPATH")return this._labelService.getUriLabel(this._model.uri);if(h==="RELATIVE_FILEPATH")return this._labelService.getUriLabel(this._model.uri,{relative:!0,noPrefix:!0})}}}e.ModelBasedVariableResolver=c;class u{constructor(l,h,f,y){this._readClipboardText=l,this._selectionIdx=h,this._selectionCount=f,this._spread=y}resolve(l){if(l.name!=="CLIPBOARD")return;const h=this._readClipboardText();if(!!h){if(this._spread){const f=h.split(/\r\n|\n|\r/).filter(y=>!(0,D.isFalsyOrWhitespace)(y));if(f.length===this._selectionCount)return f[this._selectionIdx]}return h}}}e.ClipboardBasedVariableResolver=u;class d{constructor(l,h){this._model=l,this._selection=h}resolve(l){const{name:h}=l,f=this._model.getLanguageIdAtPosition(this._selection.selectionStartLineNumber,this._selection.selectionStartColumn),y=p.LanguageConfigurationRegistry.getComments(f);if(!!y){if(h==="LINE_COMMENT")return y.lineCommentToken||void 0;if(h==="BLOCK_COMMENT_START")return y.blockCommentStartToken||void 0;if(h==="BLOCK_COMMENT_END")return y.blockCommentEndToken||void 0}}}e.CommentBasedVariableResolver=d;class a{constructor(){this._date=new Date}resolve(l){const{name:h}=l;if(h==="CURRENT_YEAR")return String(this._date.getFullYear());if(h==="CURRENT_YEAR_SHORT")return String(this._date.getFullYear()).slice(-2);if(h==="CURRENT_MONTH")return String(this._date.getMonth().valueOf()+1).padStart(2,"0");if(h==="CURRENT_DATE")return String(this._date.getDate().valueOf()).padStart(2,"0");if(h==="CURRENT_HOUR")return String(this._date.getHours().valueOf()).padStart(2,"0");if(h==="CURRENT_MINUTE")return String(this._date.getMinutes().valueOf()).padStart(2,"0");if(h==="CURRENT_SECOND")return String(this._date.getSeconds().valueOf()).padStart(2,"0");if(h==="CURRENT_DAY_NAME")return a.dayNames[this._date.getDay()];if(h==="CURRENT_DAY_NAME_SHORT")return a.dayNamesShort[this._date.getDay()];if(h==="CURRENT_MONTH_NAME")return a.monthNames[this._date.getMonth()];if(h==="CURRENT_MONTH_NAME_SHORT")return a.monthNamesShort[this._date.getMonth()];if(h==="CURRENT_SECONDS_UNIX")return String(Math.floor(this._date.getTime()/1e3))}}e.TimeBasedVariableResolver=a,a.dayNames=[n.localize(0,null),n.localize(1,null),n.localize(2,null),n.localize(3,null),n.localize(4,null),n.localize(5,null),n.localize(6,null)],a.dayNamesShort=[n.localize(7,null),n.localize(8,null),n.localize(9,null),n.localize(10,null),n.localize(11,null),n.localize(12,null),n.localize(13,null)],a.monthNames=[n.localize(14,null),n.localize(15,null),n.localize(16,null),n.localize(17,null),n.localize(18,null),n.localize(19,null),n.localize(20,null),n.localize(21,null),n.localize(22,null),n.localize(23,null),n.localize(24,null),n.localize(25,null)],a.monthNamesShort=[n.localize(26,null),n.localize(27,null),n.localize(28,null),n.localize(29,null),n.localize(30,null),n.localize(31,null),n.localize(32,null),n.localize(33,null),n.localize(34,null),n.localize(35,null),n.localize(36,null),n.localize(37,null)];class r{constructor(l){this._workspaceService=l}resolve(l){if(!this._workspaceService)return;const h=(0,g.toWorkspaceIdentifier)(this._workspaceService.getWorkspace());if(!!h){if(l.name==="WORKSPACE_NAME")return this._resolveWorkspaceName(h);if(l.name==="WORKSPACE_FOLDER")return this._resoveWorkspacePath(h)}}_resolveWorkspaceName(l){if((0,g.isSingleFolderWorkspaceIdentifier)(l))return N.basename(l.uri.path);let h=N.basename(l.configPath.path);return h.endsWith(g.WORKSPACE_EXTENSION)&&(h=h.substr(0,h.length-g.WORKSPACE_EXTENSION.length-1)),h}_resoveWorkspacePath(l){if((0,g.isSingleFolderWorkspaceIdentifier)(l))return(0,w.normalizeDriveLetter)(l.uri.fsPath);let h=N.basename(l.configPath.path),f=l.configPath.fsPath;return f.endsWith(h)&&(f=f.substr(0,f.length-h.length-1)),f?(0,w.normalizeDriveLetter)(f):"/"}}e.WorkspaceBasedVariableResolver=r;class o{resolve(l){const{name:h}=l;if(h==="RANDOM")return Math.random().toString().slice(-6);if(h==="RANDOM_HEX")return Math.random().toString(16).slice(-6);if(h==="UUID")return(0,S.generateUuid)()}}e.RandomBasedVariableResolver=o}),define(J[291],ee([0,1,19,2,8,59,3,22,32,125,21,10,201,120,708,371]),function(j,e,w,N,T,D,S,p,C,n,g,t,s,c,u){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SnippetSession=e.OneSnippet=void 0,(0,t.registerThemingParticipant)((o,i)=>{function l(h){const f=o.getColor(h);return f?f.toString():"transparent"}i.addRule(`.monaco-editor .snippet-placeholder { background-color: ${l(g.snippetTabstopHighlightBackground)}; outline-color: ${l(g.snippetTabstopHighlightBorder)}; }`),i.addRule(`.monaco-editor .finish-snippet-placeholder { background-color: ${l(g.snippetFinalTabstopHighlightBackground)}; outline-color: ${l(g.snippetFinalTabstopHighlightBorder)}; }`)});class d{constructor(i,l,h,f){this._editor=i,this._snippet=l,this._offset=h,this._snippetLineLeadingWhitespace=f,this._nestingLevel=1,this._placeholderGroups=(0,w.groupBy)(l.placeholders,c.Placeholder.compareByIndex),this._placeholderGroupsIdx=-1}dispose(){this._placeholderDecorations&&this._editor.deltaDecorations([...this._placeholderDecorations.values()],[]),this._placeholderGroups.length=0}_initDecorations(){if(this._placeholderDecorations)return;this._placeholderDecorations=new Map;const i=this._editor.getModel();this._editor.changeDecorations(l=>{for(const h of this._snippet.placeholders){const f=this._snippet.offset(h),y=this._snippet.fullLen(h),_=S.Range.fromPositions(i.getPositionAt(this._offset+f),i.getPositionAt(this._offset+f+y)),b=h.isFinalTabstop?d._decor.inactiveFinal:d._decor.inactive,v=l.addDecoration(_,b);this._placeholderDecorations.set(h,v)}})}move(i){if(!this._editor.hasModel())return[];if(this._initDecorations(),this._placeholderGroupsIdx>=0){let f=[];for(const y of this._placeholderGroups[this._placeholderGroupsIdx])if(y.transform){const _=this._placeholderDecorations.get(y),b=this._editor.getModel().getDecorationRange(_),v=this._editor.getModel().getValueInRange(b),m=y.transform.resolve(v).split(/\r\n|\r|\n/);for(let E=1;E<m.length;E++)m[E]=this._editor.getModel().normalizeIndentation(this._snippetLineLeadingWhitespace+m[E]);f.push(D.EditOperation.replace(b,m.join(this._editor.getModel().getEOL())))}f.length>0&&this._editor.executeEdits("snippet.placeholderTransform",f)}let l=!1;i===!0&&this._placeholderGroupsIdx<this._placeholderGroups.length-1?(this._placeholderGroupsIdx+=1,l=!0):i===!1&&this._placeholderGroupsIdx>0&&(this._placeholderGroupsIdx-=1,l=!0);const h=this._editor.getModel().changeDecorations(f=>{const y=new Set,_=[];for(const b of this._placeholderGroups[this._placeholderGroupsIdx]){const v=this._placeholderDecorations.get(b),m=this._editor.getModel().getDecorationRange(v);_.push(new p.Selection(m.startLineNumber,m.startColumn,m.endLineNumber,m.endColumn)),l=l&&this._hasPlaceholderBeenCollapsed(b),f.changeDecorationOptions(v,b.isFinalTabstop?d._decor.activeFinal:d._decor.active),y.add(b);for(const E of this._snippet.enclosingPlaceholders(b)){const I=this._placeholderDecorations.get(E);f.changeDecorationOptions(I,E.isFinalTabstop?d._decor.activeFinal:d._decor.active),y.add(E)}}for(const[b,v]of this._placeholderDecorations)y.has(b)||f.changeDecorationOptions(v,b.isFinalTabstop?d._decor.inactiveFinal:d._decor.inactive);return _});return l?this.move(i):h??[]}_hasPlaceholderBeenCollapsed(i){let l=i;for(;l;){if(l instanceof c.Placeholder){const h=this._placeholderDecorations.get(l);if(this._editor.getModel().getDecorationRange(h).isEmpty()&&l.toString().length>0)return!0}l=l.parent}return!1}get isAtFirstPlaceholder(){return this._placeholderGroupsIdx<=0||this._placeholderGroups.length===0}get isAtLastPlaceholder(){return this._placeholderGroupsIdx===this._placeholderGroups.length-1}get hasPlaceholder(){return this._snippet.placeholders.length>0}computePossibleSelections(){const i=new Map;for(const l of this._placeholderGroups){let h;for(const f of l){if(f.isFinalTabstop)break;h||(h=[],i.set(f.index,h));const y=this._placeholderDecorations.get(f),_=this._editor.getModel().getDecorationRange(y);if(!_){i.delete(f.index);break}h.push(_)}}return i}get choice(){return this._placeholderGroups[this._placeholderGroupsIdx][0].choice}merge(i){const l=this._editor.getModel();this._nestingLevel*=10,this._editor.changeDecorations(h=>{for(const f of this._placeholderGroups[this._placeholderGroupsIdx]){const y=i.shift();console.assert(!y._placeholderDecorations);const _=y._snippet.placeholderInfo.last.index;for(const v of y._snippet.placeholderInfo.all)v.isFinalTabstop?v.index=f.index+(_+1)/this._nestingLevel:v.index=f.index+v.index/this._nestingLevel;this._snippet.replace(f,y._snippet.children);const b=this._placeholderDecorations.get(f);h.removeDecoration(b),this._placeholderDecorations.delete(f);for(const v of y._snippet.placeholders){const m=y._snippet.offset(v),E=y._snippet.fullLen(v),I=S.Range.fromPositions(l.getPositionAt(y._offset+m),l.getPositionAt(y._offset+m+E)),k=h.addDecoration(I,d._decor.inactive);this._placeholderDecorations.set(v,k)}}this._placeholderGroups=(0,w.groupBy)(this._snippet.placeholders,c.Placeholder.compareByIndex)})}}e.OneSnippet=d,d._decor={active:C.ModelDecorationOptions.register({description:"snippet-placeholder-1",stickiness:0,className:"snippet-placeholder"}),inactive:C.ModelDecorationOptions.register({description:"snippet-placeholder-2",stickiness:1,className:"snippet-placeholder"}),activeFinal:C.ModelDecorationOptions.register({description:"snippet-placeholder-3",stickiness:1,className:"finish-snippet-placeholder"}),inactiveFinal:C.ModelDecorationOptions.register({description:"snippet-placeholder-4",stickiness:1,className:"finish-snippet-placeholder"})};const a={overwriteBefore:0,overwriteAfter:0,adjustWhitespace:!0,clipboardText:void 0,overtypingCapturer:void 0};class r{constructor(i,l,h=a){this._templateMerges=[],this._snippets=[],this._editor=i,this._template=l,this._options=h}static adjustWhitespace(i,l,h,f,y){const _=i.getLineContent(l.lineNumber),b=(0,T.getLeadingWhitespace)(_,0,l.column-1);let v;return h.walk(m=>{if(!(m instanceof c.Text)||m.parent instanceof c.Choice)return!0;const E=m.value.split(/\r\n|\r|\n/);if(f){const k=h.offset(m);if(k===0)E[0]=i.normalizeIndentation(E[0]);else{v=v??h.toString();let M=v.charCodeAt(k-1);(M===10||M===13)&&(E[0]=i.normalizeIndentation(b+E[0]))}for(let M=1;M<E.length;M++)E[M]=i.normalizeIndentation(b+E[M])}const I=E.join(i.getEOL());return I!==m.value&&(m.parent.replace(m,[new c.Text(I)]),v=void 0),!0}),b}static adjustSelection(i,l,h,f){if(h!==0||f!==0){const{positionLineNumber:y,positionColumn:_}=l,b=_-h,v=_+f,m=i.validateRange({startLineNumber:y,startColumn:b,endLineNumber:y,endColumn:v});l=p.Selection.createWithDirection(m.startLineNumber,m.startColumn,m.endLineNumber,m.endColumn,l.getDirection())}return l}static createEditsAndSnippets(i,l,h,f,y,_,b,v){const m=[],E=[];if(!i.hasModel())return{edits:m,snippets:E};const I=i.getModel(),k=i.invokeWithinContext(B=>B.get(s.IWorkspaceContextService)),M=i.invokeWithinContext(B=>new u.ModelBasedVariableResolver(B.get(n.ILabelService),I)),P=()=>b;let F=0,R=I.getValueInRange(r.adjustSelection(I,i.getSelection(),h,0)),A=I.getValueInRange(r.adjustSelection(I,i.getSelection(),0,f)),O=I.getLineFirstNonWhitespaceColumn(i.getSelection().positionLineNumber);const L=i.getSelections().map((B,W)=>({selection:B,idx:W})).sort((B,W)=>S.Range.compareRangesUsingStarts(B.selection,W.selection));for(const{selection:B,idx:W}of L){let K=r.adjustSelection(I,B,h,0),H=r.adjustSelection(I,B,0,f);R!==I.getValueInRange(K)&&(K=B),A!==I.getValueInRange(H)&&(H=B);const Y=B.setStartPosition(K.startLineNumber,K.startColumn).setEndPosition(H.endLineNumber,H.endColumn),X=new c.SnippetParser().parse(l,!0,y),Z=Y.getStartPosition(),se=r.adjustWhitespace(I,Z,X,_||W>0&&O!==I.getLineFirstNonWhitespaceColumn(B.positionLineNumber),!0);X.resolveVariables(new u.CompositeSnippetVariableResolver([M,new u.ClipboardBasedVariableResolver(P,W,L.length,i.getOption(70)==="spread"),new u.SelectionBasedVariableResolver(I,B,W,v),new u.CommentBasedVariableResolver(I,B),new u.TimeBasedVariableResolver,new u.WorkspaceBasedVariableResolver(k),new u.RandomBasedVariableResolver]));const oe=I.getOffsetAt(Z)+F;F+=X.toString().length-I.getValueLengthInRange(Y),m[W]=D.EditOperation.replace(Y,X.toString()),m[W].identifier={major:W,minor:0},E[W]=new d(i,X,oe,se)}return{edits:m,snippets:E}}dispose(){(0,N.dispose)(this._snippets)}_logInfo(){return`template="${this._template}", merged_templates="${this._templateMerges.join(" -> ")}"`}insert(){if(!this._editor.hasModel())return;const{edits:i,snippets:l}=r.createEditsAndSnippets(this._editor,this._template,this._options.overwriteBefore,this._options.overwriteAfter,!1,this._options.adjustWhitespace,this._options.clipboardText,this._options.overtypingCapturer);this._snippets=l,this._editor.executeEdits("snippet",i,h=>this._snippets[0].hasPlaceholder?this._move(!0):h.filter(f=>!!f.identifier).map(f=>p.Selection.fromPositions(f.range.getEndPosition()))),this._editor.revealRange(this._editor.getSelections()[0])}merge(i,l=a){if(!this._editor.hasModel())return;this._templateMerges.push([this._snippets[0]._nestingLevel,this._snippets[0]._placeholderGroupsIdx,i]);const{edits:h,snippets:f}=r.createEditsAndSnippets(this._editor,i,l.overwriteBefore,l.overwriteAfter,!0,l.adjustWhitespace,l.clipboardText,l.overtypingCapturer);this._editor.executeEdits("snippet",h,y=>{for(const _ of this._snippets)_.merge(f);return console.assert(f.length===0),this._snippets[0].hasPlaceholder?this._move(void 0):y.filter(_=>!!_.identifier).map(_=>p.Selection.fromPositions(_.range.getEndPosition()))})}next(){const i=this._move(!0);this._editor.setSelections(i),this._editor.revealPositionInCenterIfOutsideViewport(i[0].getPosition())}prev(){const i=this._move(!1);this._editor.setSelections(i),this._editor.revealPositionInCenterIfOutsideViewport(i[0].getPosition())}_move(i){const l=[];for(const h of this._snippets){const f=h.move(i);l.push(...f)}return l}get isAtFirstPlaceholder(){return this._snippets[0].isAtFirstPlaceholder}get isAtLastPlaceholder(){return this._snippets[0].isAtLastPlaceholder}get hasPlaceholder(){return this._snippets[0].hasPlaceholder}get choice(){return this._snippets[0].choice}isSelectionWithinPlaceholders(){if(!this.hasPlaceholder)return!1;const i=this._editor.getSelections();if(i.length<this._snippets.length)return!1;let l=new Map;for(const h of this._snippets){const f=h.computePossibleSelections();if(l.size===0)for(const[y,_]of f){_.sort(S.Range.compareRangesUsingStarts);for(const b of i)if(_[0].containsRange(b)){l.set(y,[]);break}}if(l.size===0)return!1;l.forEach((y,_)=>{y.push(...f.get(_))})}i.sort(S.Range.compareRangesUsingStarts);for(let[h,f]of l){if(f.length!==i.length){l.delete(h);continue}f.sort(S.Range.compareRangesUsingStarts);for(let y=0;y<f.length;y++)if(!f[y].containsRange(i[y])){l.delete(h);continue}}return l.size>0}}e.SnippetSession=r}),define(J[203],ee([0,1,2,16,3,22,25,91,530,15,72,291]),function(j,e,w,N,T,D,S,p,C,n,g,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SnippetController2=void 0;const s={overwriteBefore:0,overwriteAfter:0,undoStopBefore:!0,undoStopAfter:!0,adjustWhitespace:!0,clipboardText:void 0,overtypingCapturer:void 0};let c=class Lt{constructor(a,r,o){this._editor=a,this._logService=r,this._snippetListener=new w.DisposableStore,this._modelVersionId=-1,this._inSnippet=Lt.InSnippetMode.bindTo(o),this._hasNextTabstop=Lt.HasNextTabstop.bindTo(o),this._hasPrevTabstop=Lt.HasPrevTabstop.bindTo(o)}static get(a){return a.getContribution(Lt.ID)}dispose(){var a;this._inSnippet.reset(),this._hasPrevTabstop.reset(),this._hasNextTabstop.reset(),(a=this._session)===null||a===void 0||a.dispose(),this._snippetListener.dispose()}insert(a,r){try{this._doInsert(a,typeof r=="undefined"?s:Object.assign(Object.assign({},s),r))}catch(o){this.cancel(),this._logService.error(o),this._logService.error("snippet_error"),this._logService.error("insert_template=",a),this._logService.error("existing_template=",this._session?this._session._logInfo():"<no_session>")}}_doInsert(a,r){!this._editor.hasModel()||(this._snippetListener.clear(),r.undoStopBefore&&this._editor.getModel().pushStackElement(),this._session?this._session.merge(a,r):(this._modelVersionId=this._editor.getModel().getAlternativeVersionId(),this._session=new t.SnippetSession(this._editor,a,r),this._session.insert()),r.undoStopAfter&&this._editor.getModel().pushStackElement(),this._updateState(),this._snippetListener.add(this._editor.onDidChangeModelContent(o=>o.isFlush&&this.cancel())),this._snippetListener.add(this._editor.onDidChangeModel(()=>this.cancel())),this._snippetListener.add(this._editor.onDidChangeCursorSelection(()=>this._updateState())))}_updateState(){if(!(!this._session||!this._editor.hasModel())){if(this._modelVersionId===this._editor.getModel().getAlternativeVersionId())return this.cancel();if(!this._session.hasPlaceholder)return this.cancel();if(this._session.isAtLastPlaceholder||!this._session.isSelectionWithinPlaceholders())return this.cancel();this._inSnippet.set(!0),this._hasPrevTabstop.set(!this._session.isAtFirstPlaceholder),this._hasNextTabstop.set(!this._session.isAtLastPlaceholder),this._handleChoice()}}_handleChoice(){if(!this._session||!this._editor.hasModel()){this._currentChoice=void 0;return}const{choice:a}=this._session;if(!a){this._currentChoice=void 0;return}if(this._currentChoice!==a){this._currentChoice=a,this._editor.setSelections(this._editor.getSelections().map(o=>D.Selection.fromPositions(o.getStartPosition())));const[r]=a.options;(0,p.showSimpleSuggestions)(this._editor,a.options.map((o,i)=>({kind:13,label:o.value,insertText:o.value,sortText:"a".repeat(i+1),range:T.Range.fromPositions(this._editor.getPosition(),this._editor.getPosition().delta(0,r.value.length))})))}}finish(){for(;this._inSnippet.get();)this.next()}cancel(a=!1){var r;this._inSnippet.reset(),this._hasPrevTabstop.reset(),this._hasNextTabstop.reset(),this._snippetListener.clear(),(r=this._session)===null||r===void 0||r.dispose(),this._session=void 0,this._modelVersionId=-1,a&&this._editor.setSelections([this._editor.getSelection()])}prev(){this._session&&this._session.prev(),this._updateState()}next(){this._session&&this._session.next(),this._updateState()}isInSnippet(){return Boolean(this._inSnippet.get())}};c.ID="snippetController2",c.InSnippetMode=new n.RawContextKey("inSnippetMode",!1,(0,C.localize)(0,null)),c.HasNextTabstop=new n.RawContextKey("hasNextTabstop",!1,(0,C.localize)(1,null)),c.HasPrevTabstop=new n.RawContextKey("hasPrevTabstop",!1,(0,C.localize)(2,null)),c=Fe([Ce(1,g.ILogService),Ce(2,n.IContextKeyService)],c),e.SnippetController2=c,(0,N.registerEditorContribution)(c.ID,c);const u=N.EditorCommand.bindToContribution(c.get);(0,N.registerEditorCommand)(new u({id:"jumpToNextSnippetPlaceholder",precondition:n.ContextKeyExpr.and(c.InSnippetMode,c.HasNextTabstop),handler:d=>d.next(),kbOpts:{weight:100+30,kbExpr:S.EditorContextKeys.editorTextFocus,primary:2}})),(0,N.registerEditorCommand)(new u({id:"jumpToPrevSnippetPlaceholder",precondition:n.ContextKeyExpr.and(c.InSnippetMode,c.HasPrevTabstop),handler:d=>d.prev(),kbOpts:{weight:100+30,kbExpr:S.EditorContextKeys.editorTextFocus,primary:1024|2}})),(0,N.registerEditorCommand)(new u({id:"leaveSnippet",precondition:c.InSnippetMode,handler:d=>d.cancel(!0),kbOpts:{weight:100+30,kbExpr:S.EditorContextKeys.editorTextFocus,primary:9,secondary:[1024|9]}})),(0,N.registerEditorCommand)(new u({id:"acceptSnippet",precondition:c.InSnippetMode,handler:d=>d.finish()}))}),define(J[709],ee([0,1,14,23,11,4,2,8,22,18,78,203,435,88,41,15,72,90,432,91]),function(j,e,w,N,T,D,S,p,C,n,g,t,s,c,u,d,a,r,o,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SuggestModel=e.LineContext=void 0;class l{constructor(v,m,E,I){this.leadingLineContent=v.getLineContent(m.lineNumber).substr(0,m.column-1),this.leadingWord=v.getWordUntilPosition(m),this.lineNumber=m.lineNumber,this.column=m.column,this.auto=E,this.shy=I}static shouldAutoTrigger(v){if(!v.hasModel())return!1;const m=v.getModel(),E=v.getPosition();m.tokenizeIfCheap(E.lineNumber);const I=m.getWordAtPosition(E);return!(!I||I.endColumn!==E.column||!isNaN(Number(I.word)))}}e.LineContext=l;function h(b){return b.getOption(105).preview}function f(b,v,m){if(!Boolean(v.getContextKeyValue("inlineSuggestionVisible")))return!0;const E=m.getValue("editor.inlineSuggest.allowQuickSuggestions");return E!==void 0?Boolean(E):!1}function y(b,v,m){if(!Boolean(v.getContextKeyValue("inlineSuggestionVisible")))return!0;const E=m.getValue("editor.inlineSuggest.allowSuggestOnTriggerCharacters");return E!==void 0?Boolean(E):!1}let _=class Wi{constructor(v,m,E,I,k,M,P){this._editor=v,this._editorWorkerService=m,this._clipboardService=E,this._telemetryService=I,this._logService=k,this._contextKeyService=M,this._configurationService=P,this._toDispose=new S.DisposableStore,this._quickSuggestDelay=10,this._triggerCharacterListener=new S.DisposableStore,this._triggerQuickSuggest=new w.TimeoutTimer,this._state=0,this._completionDisposables=new S.DisposableStore,this._onDidCancel=new D.Emitter,this._onDidTrigger=new D.Emitter,this._onDidSuggest=new D.Emitter,this.onDidCancel=this._onDidCancel.event,this.onDidTrigger=this._onDidTrigger.event,this.onDidSuggest=this._onDidSuggest.event,this._telemetryGate=0,this._currentSelection=this._editor.getSelection()||new C.Selection(1,1,1,1),this._toDispose.add(this._editor.onDidChangeModel(()=>{this._updateTriggerCharacters(),this.cancel()})),this._toDispose.add(this._editor.onDidChangeModelLanguage(()=>{this._updateTriggerCharacters(),this.cancel()})),this._toDispose.add(this._editor.onDidChangeConfiguration(()=>{this._updateTriggerCharacters(),this._updateQuickSuggest()})),this._toDispose.add(n.CompletionProviderRegistry.onDidChange(()=>{this._updateTriggerCharacters(),this._updateActiveSuggestSession()})),this._toDispose.add(this._editor.onDidChangeCursorSelection(R=>{this._onCursorChange(R)}));let F=!1;this._toDispose.add(this._editor.onDidCompositionStart(()=>{F=!0})),this._toDispose.add(this._editor.onDidCompositionEnd(()=>{F=!1,this._onCompositionEnd()})),this._toDispose.add(this._editor.onDidChangeModelContent(()=>{F||this._refilterCompletionItems()})),this._updateTriggerCharacters(),this._updateQuickSuggest()}dispose(){(0,S.dispose)(this._triggerCharacterListener),(0,S.dispose)([this._onDidCancel,this._onDidSuggest,this._onDidTrigger,this._triggerQuickSuggest]),this._toDispose.dispose(),this._completionDisposables.dispose(),this.cancel()}_updateQuickSuggest(){this._quickSuggestDelay=this._editor.getOption(79),(isNaN(this._quickSuggestDelay)||!this._quickSuggestDelay&&this._quickSuggestDelay!==0||this._quickSuggestDelay<0)&&(this._quickSuggestDelay=10)}_updateTriggerCharacters(){if(this._triggerCharacterListener.clear(),this._editor.getOption(80)||!this._editor.hasModel()||!this._editor.getOption(108))return;const v=new Map;for(const E of n.CompletionProviderRegistry.all(this._editor.getModel()))for(const I of E.triggerCharacters||[]){let k=v.get(I);k||(k=new Set,k.add((0,i.getSnippetSuggestSupport)()),v.set(I,k)),k.add(E)}const m=E=>{if(!y(this._editor,this._contextKeyService,this._configurationService)||l.shouldAutoTrigger(this._editor))return;if(!E){const M=this._editor.getPosition();E=this._editor.getModel().getLineContent(M.lineNumber).substr(0,M.column-1)}let I="";(0,p.isLowSurrogate)(E.charCodeAt(E.length-1))?(0,p.isHighSurrogate)(E.charCodeAt(E.length-2))&&(I=E.substr(E.length-2)):I=E.charAt(E.length-1);const k=v.get(I);if(k){const M=this._completionModel?{items:this._completionModel.adopt(k),clipboardText:this._completionModel.clipboardText}:void 0;this.trigger({auto:!0,shy:!1,triggerCharacter:I},Boolean(this._completionModel),k,M)}};this._triggerCharacterListener.add(this._editor.onDidType(m)),this._triggerCharacterListener.add(this._editor.onDidCompositionEnd(m))}get state(){return this._state}cancel(v=!1){var m;this._state!==0&&(this._triggerQuickSuggest.cancel(),(m=this._requestToken)===null||m===void 0||m.cancel(),this._requestToken=void 0,this._state=0,this._completionModel=void 0,this._context=void 0,this._onDidCancel.fire({retrigger:v}))}clear(){this._completionDisposables.clear()}_updateActiveSuggestSession(){this._state!==0&&(!this._editor.hasModel()||!n.CompletionProviderRegistry.has(this._editor.getModel())?this.cancel():this.trigger({auto:this._state===2,shy:!1},!0))}_onCursorChange(v){if(!this._editor.hasModel())return;const m=this._currentSelection;if(this._currentSelection=this._editor.getSelection(),!v.selection.isEmpty()||v.reason!==0&&v.reason!==3||v.source!=="keyboard"&&v.source!=="deleteLeft"){this.cancel();return}this._state===0&&v.reason===0?(m.containsRange(this._currentSelection)||m.getEndPosition().isBeforeOrEqual(this._currentSelection.getPosition()))&&this._doTriggerQuickSuggest():this._state!==0&&v.reason===3&&this._refilterCompletionItems()}_onCompositionEnd(){this._state===0?this._doTriggerQuickSuggest():this._refilterCompletionItems()}_doTriggerQuickSuggest(){this._editor.getOption(78)!==!1&&(this._editor.getOption(105).snippetsPreventQuickSuggestions&&t.SnippetController2.get(this._editor).isInSnippet()||(this.cancel(),this._triggerQuickSuggest.cancelAndSet(()=>{if(this._state!==0||!l.shouldAutoTrigger(this._editor)||!this._editor.hasModel())return;const v=this._editor.getModel(),m=this._editor.getPosition(),E=this._editor.getOption(78);if(E!==!1){if(E!==!0){v.tokenizeIfCheap(m.lineNumber);const I=v.getLineTokens(m.lineNumber),k=I.getStandardTokenType(I.findTokenIndexAtOffset(Math.max(m.column-1-1,0)));if(!(E.other&&k===0||E.comments&&k===1||E.strings&&k===2))return}!f(this._editor,this._contextKeyService,this._configurationService)||!n.CompletionProviderRegistry.has(v)||this.trigger({auto:!0,shy:!1})}},this._quickSuggestDelay)))}_refilterCompletionItems(){Promise.resolve().then(()=>{if(this._state===0||!this._editor.hasModel())return;const v=this._editor.getModel(),m=this._editor.getPosition(),E=new l(v,m,this._state===2,!1);this._onNewContext(E)})}trigger(v,m=!1,E,I){var k;if(!this._editor.hasModel())return;const M=this._editor.getModel(),P=v.auto,F=new l(M,this._editor.getPosition(),P,v.shy);this.cancel(m),this._state=P?2:1,this._onDidTrigger.fire({auto:P,shy:v.shy,position:this._editor.getPosition()}),this._context=F;let R={triggerKind:(k=v.triggerKind)!==null&&k!==void 0?k:0};v.triggerCharacter&&(R={triggerKind:1,triggerCharacter:v.triggerCharacter}),this._requestToken=new N.CancellationTokenSource;const A=this._editor.getOption(100);let O=1;switch(A){case"top":O=0;break;case"bottom":O=2;break}const{itemKind:L,showDeprecated:B}=Wi._createSuggestFilter(this._editor),W=s.WordDistance.create(this._editorWorkerService,this._editor),K=(0,i.provideSuggestionItems)(M,this._editor.getPosition(),new i.CompletionOptions(O,L,E,B),R,this._requestToken.token);Promise.all([K,W]).then(([H,Y])=>Re(this,void 0,void 0,function*(){var X;if((X=this._requestToken)===null||X===void 0||X.dispose(),!this._editor.hasModel())return;let Z=I==null?void 0:I.clipboardText;if(!Z&&H.needsClipboard&&(Z=yield this._clipboardService.readText()),this._state===0)return;const se=this._editor.getModel();let oe=H.items;if(I){const x=(0,i.getSuggestionComparator)(O);oe=oe.concat(I.items).sort(x)}const G=new l(se,this._editor.getPosition(),P,v.shy);this._completionModel=new o.CompletionModel(oe,this._context.column,{leadingLineContent:G.leadingLineContent,characterCountDelta:G.column-this._context.column},Y,this._editor.getOption(105),this._editor.getOption(100),Z),this._completionDisposables.add(H.disposable),this._onNewContext(G),this._reportDurationsTelemetry(H.durations)})).catch(T.onUnexpectedError)}_reportDurationsTelemetry(v){this._telemetryGate++%230==0&&setTimeout(()=>{this._telemetryService.publicLog2("suggest.durations.json",{data:JSON.stringify(v)}),this._logService.debug("suggest.durations.json",v)})}static _createSuggestFilter(v){const m=new Set;v.getOption(100)==="none"&&m.add(27);const I=v.getOption(105);return I.showMethods||m.add(0),I.showFunctions||m.add(1),I.showConstructors||m.add(2),I.showFields||m.add(3),I.showVariables||m.add(4),I.showClasses||m.add(5),I.showStructs||m.add(6),I.showInterfaces||m.add(7),I.showModules||m.add(8),I.showProperties||m.add(9),I.showEvents||m.add(10),I.showOperators||m.add(11),I.showUnits||m.add(12),I.showValues||m.add(13),I.showConstants||m.add(14),I.showEnums||m.add(15),I.showEnumMembers||m.add(16),I.showKeywords||m.add(17),I.showWords||m.add(18),I.showColors||m.add(19),I.showFiles||m.add(20),I.showReferences||m.add(21),I.showColors||m.add(22),I.showFolders||m.add(23),I.showTypeParameters||m.add(24),I.showSnippets||m.add(27),I.showUsers||m.add(25),I.showIssues||m.add(26),{itemKind:m,showDeprecated:I.showDeprecated}}_onNewContext(v){if(!!this._context){if(v.lineNumber!==this._context.lineNumber){this.cancel();return}if((0,p.getLeadingWhitespace)(v.leadingLineContent)!==(0,p.getLeadingWhitespace)(this._context.leadingLineContent)){this.cancel();return}if(v.column<this._context.column){v.leadingWord.word?this.trigger({auto:this._context.auto,shy:!1},!0):this.cancel();return}if(!!this._completionModel){if(v.leadingWord.word.length!==0&&v.leadingWord.startColumn>this._context.leadingWord.startColumn){const m=new Set(n.CompletionProviderRegistry.all(this._editor.getModel()));for(let I of this._completionModel.allProvider)m.delete(I);const E=this._completionModel.adopt(new Set);this.trigger({auto:this._context.auto,shy:!1},!0,m,{items:E,clipboardText:this._completionModel.clipboardText});return}if(v.column>this._context.column&&this._completionModel.incomplete.size>0&&v.leadingWord.word.length!==0){const{incomplete:m}=this._completionModel,E=this._completionModel.adopt(m);this.trigger({auto:this._state===2,shy:!1,triggerKind:2},!0,m,{items:E,clipboardText:this._completionModel.clipboardText})}else{let m=this._completionModel.lineContext,E=!1;if(this._completionModel.lineContext={leadingLineContent:v.leadingLineContent,characterCountDelta:v.column-this._context.column},this._completionModel.items.length===0){if(l.shouldAutoTrigger(this._editor)&&this._context.leadingWord.endColumn<v.leadingWord.startColumn){this.trigger({auto:this._context.auto,shy:!1},!0);return}if(this._context.auto){this.cancel();return}else if(this._completionModel.lineContext=m,E=this._completionModel.items.length>0,E&&v.leadingWord.word.length===0){this.cancel();return}}this._onDidSuggest.fire({completionModel:this._completionModel,auto:this._context.auto,shy:this._context.shy,isFrozen:E})}}}}};_=Fe([Ce(1,g.IEditorWorkerService),Ce(2,c.IClipboardService),Ce(3,r.ITelemetryService),Ce(4,a.ILogService),Ce(5,d.IContextKeyService),Ce(6,u.IConfigurationService)],_),e.SuggestModel=_}),define(J[292],ee([0,1,45,19,14,23,11,4,93,2,17,83,20,67,16,59,13,3,25,203,120,596,570,533,35,26,15,9,80,72,91,569,433,709,434,693]),function(j,e,w,N,T,D,S,p,C,n,g,t,s,c,u,d,a,r,o,i,l,h,f,y,_,b,v,m,E,I,k,M,P,F,R,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TriggerSuggestAction=e.SuggestController=void 0;let O=!1;class L{constructor(Z,se){if(this._model=Z,this._position=se,Z.getLineMaxColumn(se.lineNumber)!==se.column){const G=Z.getOffsetAt(se),x=Z.getPositionAt(G+1);this._marker=Z.deltaDecorations([],[{range:r.Range.fromPositions(se,x),options:{description:"suggest-line-suffix",stickiness:1}}])}}dispose(){this._marker&&!this._model.isDisposed()&&this._model.deltaDecorations(this._marker,[])}delta(Z){if(this._model.isDisposed()||this._position.lineNumber!==Z.lineNumber)return 0;if(this._marker){const se=this._model.getDecorationRange(this._marker[0]);return this._model.getOffsetAt(se.getStartPosition())-this._model.getOffsetAt(Z)}else return this._model.getLineMaxColumn(Z.lineNumber)-Z.column}}let B=class Vi{constructor(Z,se,oe,G,x,U){this._memoryService=se,this._commandService=oe,this._contextKeyService=G,this._instantiationService=x,this._logService=U,this._lineSuffix=new n.MutableDisposable,this._toDispose=new n.DisposableStore,this._selectors=new W(ue=>ue.priority),this.editor=Z,this.model=x.createInstance(F.SuggestModel,this.editor);const $=k.Context.InsertMode.bindTo(G);$.set(Z.getOption(105).insertMode),this.model.onDidTrigger(()=>$.set(Z.getOption(105).insertMode)),this.widget=this._toDispose.add(new T.IdleValue(()=>{const ue=this._instantiationService.createInstance(A.SuggestWidget,this.editor);this._toDispose.add(ue),this._toDispose.add(ue.onDidSelect(ae=>this._insertSuggestion(ae,0),this));const pe=new P.CommitCharacterController(this.editor,ue,ae=>this._insertSuggestion(ae,2));this._toDispose.add(pe),this._toDispose.add(this.model.onDidSuggest(ae=>{ae.completionModel.items.length===0&&pe.reset()}));const fe=k.Context.MakesTextEdit.bindTo(this._contextKeyService),re=k.Context.HasInsertAndReplaceRange.bindTo(this._contextKeyService),ie=k.Context.CanResolve.bindTo(this._contextKeyService);return this._toDispose.add((0,n.toDisposable)(()=>{fe.reset(),re.reset(),ie.reset()})),this._toDispose.add(ue.onDidFocus(({item:ae})=>{const q=this.editor.getPosition(),ne=ae.editStart.column,ce=q.column;let le=!0;this.editor.getOption(1)==="smart"&&this.model.state===2&&!ae.completion.additionalTextEdits&&!(ae.completion.insertTextRules&4)&&ce-ne===ae.completion.insertText.length&&(le=this.editor.getModel().getValueInRange({startLineNumber:q.lineNumber,startColumn:ne,endLineNumber:q.lineNumber,endColumn:ce})!==ae.completion.insertText),fe.set(le),re.set(!a.Position.equals(ae.editInsertEnd,ae.editReplaceEnd)),ie.set(Boolean(ae.provider.resolveCompletionItem)||Boolean(ae.completion.documentation)||ae.completion.detail!==ae.completion.label)})),this._toDispose.add(ue.onDetailsKeyDown(ae=>{if(ae.toKeybinding().equals(new C.SimpleKeybinding(!0,!1,!1,!1,33))||g.isMacintosh&&ae.toKeybinding().equals(new C.SimpleKeybinding(!1,!1,!1,!0,33))){ae.stopPropagation();return}ae.toKeybinding().isModifierKey()||this.editor.focus()})),ue})),this._overtypingCapturer=this._toDispose.add(new T.IdleValue(()=>this._toDispose.add(new R.OvertypingCapturer(this.editor,this.model)))),this._alternatives=this._toDispose.add(new T.IdleValue(()=>this._toDispose.add(new M.SuggestAlternatives(this.editor,this._contextKeyService)))),this._toDispose.add(x.createInstance(f.WordContextKey,Z)),this._toDispose.add(this.model.onDidTrigger(ue=>{this.widget.value.showTriggered(ue.auto,ue.shy?250:50),this._lineSuffix.value=new L(this.editor.getModel(),ue.position)})),this._toDispose.add(this.model.onDidSuggest(ue=>{if(!ue.shy){let pe=-1;for(const fe of this._selectors.itemsOrderedByPriorityDesc)if(pe=fe.select(this.editor.getModel(),this.editor.getPosition(),ue.completionModel.items),pe!==-1)break;pe===-1&&(pe=this._memoryService.select(this.editor.getModel(),this.editor.getPosition(),ue.completionModel.items)),this.widget.value.showSuggestions(ue.completionModel,pe,ue.isFrozen,ue.auto)}})),this._toDispose.add(this.model.onDidCancel(ue=>{ue.retrigger||this.widget.value.hideWidget()})),this._toDispose.add(this.editor.onDidBlurEditorWidget(()=>{O||(this.model.cancel(),this.model.clear())}));let V=k.Context.AcceptSuggestionsOnEnter.bindTo(G),Q=()=>{const ue=this.editor.getOption(1);V.set(ue==="on"||ue==="smart")};this._toDispose.add(this.editor.onDidChangeConfiguration(()=>Q())),Q()}static get(Z){return Z.getContribution(Vi.ID)}dispose(){this._alternatives.dispose(),this._toDispose.dispose(),this.widget.dispose(),this.model.dispose(),this._lineSuffix.dispose()}_insertSuggestion(Z,se){if(!Z||!Z.item){this._alternatives.value.reset(),this.model.cancel(),this.model.clear();return}if(!this.editor.hasModel())return;const oe=this.editor.getModel(),G=oe.getAlternativeVersionId(),{item:x}=Z,U=[],$=new D.CancellationTokenSource;se&1||this.editor.pushUndoStop();const V=this.getOverwriteInfo(x,Boolean(se&8));if(this._memoryService.memorize(oe,this.editor.getPosition(),x),Array.isArray(x.completion.additionalTextEdits)){const ue=c.StableEditorScrollState.capture(this.editor);this.editor.executeEdits("suggestController.additionalTextEdits.sync",x.completion.additionalTextEdits.map(pe=>d.EditOperation.replace(r.Range.lift(pe.range),pe.text))),ue.restoreRelativeVerticalPositionOfCursor(this.editor)}else if(!x.isResolved){const ue=new t.StopWatch(!0);let pe;const fe=oe.onDidChangeContent(q=>{if(q.isFlush){$.cancel(),fe.dispose();return}for(let ne of q.changes){const ce=r.Range.getEndPosition(ne.range);(!pe||a.Position.isBefore(ce,pe))&&(pe=ce)}});let re=se;se|=2;let ie=!1,ae=this.editor.onWillType(()=>{ae.dispose(),ie=!0,re&2||this.editor.pushUndoStop()});U.push(x.resolve($.token).then(()=>{if(!x.completion.additionalTextEdits||$.token.isCancellationRequested||pe&&x.completion.additionalTextEdits.some(ne=>a.Position.isBefore(pe,r.Range.getStartPosition(ne.range))))return!1;ie&&this.editor.pushUndoStop();const q=c.StableEditorScrollState.capture(this.editor);return this.editor.executeEdits("suggestController.additionalTextEdits.async",x.completion.additionalTextEdits.map(ne=>d.EditOperation.replace(r.Range.lift(ne.range),ne.text))),q.restoreRelativeVerticalPositionOfCursor(this.editor),(ie||!(re&2))&&this.editor.pushUndoStop(),!0}).then(q=>{this._logService.trace("[suggest] async resolving of edits DONE (ms, applied?)",ue.elapsed(),q),fe.dispose(),ae.dispose()}))}let{insertText:Q}=x.completion;x.completion.insertTextRules&4||(Q=l.SnippetParser.escape(Q)),i.SnippetController2.get(this.editor).insert(Q,{overwriteBefore:V.overwriteBefore,overwriteAfter:V.overwriteAfter,undoStopBefore:!1,undoStopAfter:!1,adjustWhitespace:!(x.completion.insertTextRules&1),clipboardText:Z.model.clipboardText,overtypingCapturer:this._overtypingCapturer.value}),se&2||this.editor.pushUndoStop(),x.completion.command?x.completion.command.id===K.id?this.model.trigger({auto:!0,shy:!1},!0):(U.push(this._commandService.executeCommand(x.completion.command.id,...x.completion.command.arguments?[...x.completion.command.arguments]:[]).catch(S.onUnexpectedError)),this.model.cancel()):this.model.cancel(),se&4&&this._alternatives.value.set(Z,ue=>{for($.cancel();oe.canUndo();){G!==oe.getAlternativeVersionId()&&oe.undo(),this._insertSuggestion(ue,1|2|(se&8?8:0));break}}),this._alertCompletionItem(x),Promise.all(U).finally(()=>{this.model.clear(),$.dispose()})}getOverwriteInfo(Z,se){(0,s.assertType)(this.editor.hasModel());let oe=this.editor.getOption(105).insertMode==="replace";se&&(oe=!oe);const G=Z.position.column-Z.editStart.column,x=(oe?Z.editReplaceEnd.column:Z.editInsertEnd.column)-Z.position.column,U=this.editor.getPosition().column-Z.position.column,$=this._lineSuffix.value?this._lineSuffix.value.delta(this.editor.getPosition()):0;return{overwriteBefore:G+U,overwriteAfter:x+$}}_alertCompletionItem(Z){if((0,N.isNonEmptyArray)(Z.completion.additionalTextEdits)){let se=y.localize(0,null,Z.textLabel,Z.completion.additionalTextEdits.length);(0,w.alert)(se)}}triggerSuggest(Z){this.editor.hasModel()&&(this.model.trigger({auto:!1,shy:!1},!1,Z),this.editor.revealPosition(this.editor.getPosition(),0),this.editor.focus())}triggerSuggestAndAcceptBest(Z){if(!this.editor.hasModel())return;const se=this.editor.getPosition(),oe=()=>{se.equals(this.editor.getPosition())&&this._commandService.executeCommand(Z.fallback)},G=x=>{if(x.completion.insertTextRules&4||x.completion.additionalTextEdits)return!0;const U=this.editor.getPosition(),$=x.editStart.column,V=U.column;return V-$!==x.completion.insertText.length?!0:this.editor.getModel().getValueInRange({startLineNumber:U.lineNumber,startColumn:$,endLineNumber:U.lineNumber,endColumn:V})!==x.completion.insertText};p.Event.once(this.model.onDidTrigger)(x=>{let U=[];p.Event.any(this.model.onDidTrigger,this.model.onDidCancel)(()=>{(0,n.dispose)(U),oe()},void 0,U),this.model.onDidSuggest(({completionModel:$})=>{if((0,n.dispose)(U),$.items.length===0){oe();return}const V=this._memoryService.select(this.editor.getModel(),this.editor.getPosition(),$.items),Q=$.items[V];if(!G(Q)){oe();return}this.editor.pushUndoStop(),this._insertSuggestion({index:V,item:Q,model:$},4|1|2)},void 0,U)}),this.model.trigger({auto:!1,shy:!0}),this.editor.revealPosition(se,0),this.editor.focus()}acceptSelectedSuggestion(Z,se){const oe=this.widget.value.getFocusedItem();let G=0;Z&&(G|=4),se&&(G|=8),this._insertSuggestion(oe,G)}acceptNextSuggestion(){this._alternatives.value.next()}acceptPrevSuggestion(){this._alternatives.value.prev()}cancelSuggestWidget(){this.model.cancel(),this.model.clear(),this.widget.value.hideWidget()}selectNextSuggestion(){this.widget.value.selectNext()}selectNextPageSuggestion(){this.widget.value.selectNextPage()}selectLastSuggestion(){this.widget.value.selectLast()}selectPrevSuggestion(){this.widget.value.selectPrevious()}selectPrevPageSuggestion(){this.widget.value.selectPreviousPage()}selectFirstSuggestion(){this.widget.value.selectFirst()}toggleSuggestionDetails(){this.widget.value.toggleDetails()}toggleExplainMode(){this.widget.value.toggleExplainMode()}toggleSuggestionFocus(){this.widget.value.toggleDetailsFocus()}resetWidgetSize(){this.widget.value.resetPersistedSize()}forceRenderingAbove(){this.widget.value.forceRenderingAbove()}stopForceRenderingAbove(){!this.widget.isInitialized||this.widget.value.stopForceRenderingAbove()}registerSelector(Z){return this._selectors.register(Z)}};B.ID="editor.contrib.suggestController",B=Fe([Ce(1,h.ISuggestMemoryService),Ce(2,b.ICommandService),Ce(3,v.IContextKeyService),Ce(4,m.IInstantiationService),Ce(5,I.ILogService)],B),e.SuggestController=B;class W{constructor(Z){this.prioritySelector=Z,this._items=new Array}register(Z){if(this._items.indexOf(Z)!==-1)throw new Error("Value is already registered");return this._items.push(Z),this._items.sort((se,oe)=>this.prioritySelector(oe)-this.prioritySelector(se)),{dispose:()=>{const se=this._items.indexOf(Z);se>=0&&this._items.splice(se,1)}}}get itemsOrderedByPriorityDesc(){return this._items}}class K extends u.EditorAction{constructor(){super({id:K.id,label:y.localize(1,null),alias:"Trigger Suggest",precondition:v.ContextKeyExpr.and(o.EditorContextKeys.writable,o.EditorContextKeys.hasCompletionItemProvider),kbOpts:{kbExpr:o.EditorContextKeys.textInputFocus,primary:2048|10,secondary:[2048|39],mac:{primary:256|10,secondary:[512|9,2048|39]},weight:100}})}run(Z,se){const oe=B.get(se);!oe||oe.triggerSuggest()}}e.TriggerSuggestAction=K,K.id="editor.action.triggerSuggest",(0,u.registerEditorContribution)(B.ID,B),(0,u.registerEditorAction)(K);const H=100+90,Y=u.EditorCommand.bindToContribution(B.get);(0,u.registerEditorCommand)(new Y({id:"acceptSelectedSuggestion",precondition:k.Context.Visible,handler(X){X.acceptSelectedSuggestion(!0,!1)}})),E.KeybindingsRegistry.registerKeybindingRule({id:"acceptSelectedSuggestion",when:v.ContextKeyExpr.and(k.Context.Visible,o.EditorContextKeys.textInputFocus),primary:2,weight:H}),E.KeybindingsRegistry.registerKeybindingRule({id:"acceptSelectedSuggestion",when:v.ContextKeyExpr.and(k.Context.Visible,o.EditorContextKeys.textInputFocus,k.Context.AcceptSuggestionsOnEnter,k.Context.MakesTextEdit),primary:3,weight:H}),_.MenuRegistry.appendMenuItem(k.suggestWidgetStatusbarMenu,{command:{id:"acceptSelectedSuggestion",title:y.localize(2,null)},group:"left",order:1,when:k.Context.HasInsertAndReplaceRange.toNegated()}),_.MenuRegistry.appendMenuItem(k.suggestWidgetStatusbarMenu,{command:{id:"acceptSelectedSuggestion",title:y.localize(3,null)},group:"left",order:1,when:v.ContextKeyExpr.and(k.Context.HasInsertAndReplaceRange,k.Context.InsertMode.isEqualTo("insert"))}),_.MenuRegistry.appendMenuItem(k.suggestWidgetStatusbarMenu,{command:{id:"acceptSelectedSuggestion",title:y.localize(4,null)},group:"left",order:1,when:v.ContextKeyExpr.and(k.Context.HasInsertAndReplaceRange,k.Context.InsertMode.isEqualTo("replace"))}),(0,u.registerEditorCommand)(new Y({id:"acceptAlternativeSelectedSuggestion",precondition:v.ContextKeyExpr.and(k.Context.Visible,o.EditorContextKeys.textInputFocus),kbOpts:{weight:H,kbExpr:o.EditorContextKeys.textInputFocus,primary:1024|3,secondary:[1024|2]},handler(X){X.acceptSelectedSuggestion(!1,!0)},menuOpts:[{menuId:k.suggestWidgetStatusbarMenu,group:"left",order:2,when:v.ContextKeyExpr.and(k.Context.HasInsertAndReplaceRange,k.Context.InsertMode.isEqualTo("insert")),title:y.localize(5,null)},{menuId:k.suggestWidgetStatusbarMenu,group:"left",order:2,when:v.ContextKeyExpr.and(k.Context.HasInsertAndReplaceRange,k.Context.InsertMode.isEqualTo("replace")),title:y.localize(6,null)}]})),b.CommandsRegistry.registerCommandAlias("acceptSelectedSuggestionOnEnter","acceptSelectedSuggestion"),(0,u.registerEditorCommand)(new Y({id:"hideSuggestWidget",precondition:k.Context.Visible,handler:X=>X.cancelSuggestWidget(),kbOpts:{weight:H,kbExpr:o.EditorContextKeys.textInputFocus,primary:9,secondary:[1024|9]}})),(0,u.registerEditorCommand)(new Y({id:"selectNextSuggestion",precondition:v.ContextKeyExpr.and(k.Context.Visible,k.Context.MultipleSuggestions),handler:X=>X.selectNextSuggestion(),kbOpts:{weight:H,kbExpr:o.EditorContextKeys.textInputFocus,primary:18,secondary:[2048|18],mac:{primary:18,secondary:[2048|18,256|44]}}})),(0,u.registerEditorCommand)(new Y({id:"selectNextPageSuggestion",precondition:v.ContextKeyExpr.and(k.Context.Visible,k.Context.MultipleSuggestions),handler:X=>X.selectNextPageSuggestion(),kbOpts:{weight:H,kbExpr:o.EditorContextKeys.textInputFocus,primary:12,secondary:[2048|12]}})),(0,u.registerEditorCommand)(new Y({id:"selectLastSuggestion",precondition:v.ContextKeyExpr.and(k.Context.Visible,k.Context.MultipleSuggestions),handler:X=>X.selectLastSuggestion()})),(0,u.registerEditorCommand)(new Y({id:"selectPrevSuggestion",precondition:v.ContextKeyExpr.and(k.Context.Visible,k.Context.MultipleSuggestions),handler:X=>X.selectPrevSuggestion(),kbOpts:{weight:H,kbExpr:o.EditorContextKeys.textInputFocus,primary:16,secondary:[2048|16],mac:{primary:16,secondary:[2048|16,256|46]}}})),(0,u.registerEditorCommand)(new Y({id:"selectPrevPageSuggestion",precondition:v.ContextKeyExpr.and(k.Context.Visible,k.Context.MultipleSuggestions),handler:X=>X.selectPrevPageSuggestion(),kbOpts:{weight:H,kbExpr:o.EditorContextKeys.textInputFocus,primary:11,secondary:[2048|11]}})),(0,u.registerEditorCommand)(new Y({id:"selectFirstSuggestion",precondition:v.ContextKeyExpr.and(k.Context.Visible,k.Context.MultipleSuggestions),handler:X=>X.selectFirstSuggestion()})),(0,u.registerEditorCommand)(new Y({id:"toggleSuggestionDetails",precondition:k.Context.Visible,handler:X=>X.toggleSuggestionDetails(),kbOpts:{weight:H,kbExpr:o.EditorContextKeys.textInputFocus,primary:2048|10,secondary:[2048|39],mac:{primary:256|10,secondary:[2048|39]}},menuOpts:[{menuId:k.suggestWidgetStatusbarMenu,group:"right",order:1,when:v.ContextKeyExpr.and(k.Context.DetailsVisible,k.Context.CanResolve),title:y.localize(7,null)},{menuId:k.suggestWidgetStatusbarMenu,group:"right",order:1,when:v.ContextKeyExpr.and(k.Context.DetailsVisible.toNegated(),k.Context.CanResolve),title:y.localize(8,null)}]})),(0,u.registerEditorCommand)(new Y({id:"toggleExplainMode",precondition:k.Context.Visible,handler:X=>X.toggleExplainMode(),kbOpts:{weight:100,primary:2048|85}})),(0,u.registerEditorCommand)(new Y({id:"toggleSuggestionFocus",precondition:k.Context.Visible,handler:X=>X.toggleSuggestionFocus(),kbOpts:{weight:H,kbExpr:o.EditorContextKeys.textInputFocus,primary:2048|512|10,mac:{primary:256|512|10}}})),(0,u.registerEditorCommand)(new Y({id:"insertBestCompletion",precondition:v.ContextKeyExpr.and(o.EditorContextKeys.textInputFocus,v.ContextKeyExpr.equals("config.editor.tabCompletion","on"),f.WordContextKey.AtEnd,k.Context.Visible.toNegated(),M.SuggestAlternatives.OtherSuggestions.toNegated(),i.SnippetController2.InSnippetMode.toNegated()),handler:(X,Z)=>{X.triggerSuggestAndAcceptBest((0,s.isObject)(Z)?Object.assign({fallback:"tab"},Z):{fallback:"tab"})},kbOpts:{weight:H,primary:2}})),(0,u.registerEditorCommand)(new Y({id:"insertNextSuggestion",precondition:v.ContextKeyExpr.and(o.EditorContextKeys.textInputFocus,v.ContextKeyExpr.equals("config.editor.tabCompletion","on"),M.SuggestAlternatives.OtherSuggestions,k.Context.Visible.toNegated(),i.SnippetController2.InSnippetMode.toNegated()),handler:X=>X.acceptNextSuggestion(),kbOpts:{weight:H,kbExpr:o.EditorContextKeys.textInputFocus,primary:2}})),(0,u.registerEditorCommand)(new Y({id:"insertPrevSuggestion",precondition:v.ContextKeyExpr.and(o.EditorContextKeys.textInputFocus,v.ContextKeyExpr.equals("config.editor.tabCompletion","on"),M.SuggestAlternatives.OtherSuggestions,k.Context.Visible.toNegated(),i.SnippetController2.InSnippetMode.toNegated()),handler:X=>X.acceptPrevSuggestion(),kbOpts:{weight:H,kbExpr:o.EditorContextKeys.textInputFocus,primary:1024|2}})),(0,u.registerEditorAction)(class extends u.EditorAction{constructor(){super({id:"editor.action.resetSuggestSize",label:y.localize(9,null),alias:"Reset Suggest Widget Size",precondition:void 0})}run(X,Z){B.get(Z).resetWidgetSize()}})}),define(J[710],ee([0,1,14,4,2,13,3,120,291,292,200,185,243]),function(j,e,w,N,T,D,S,p,C,n,g,t,s){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SuggestWidgetInlineCompletionProvider=void 0;class c extends T.Disposable{constructor(r,o){super();this.editor=r,this.suggestControllerPreselector=o,this.isSuggestWidgetVisible=!1,this.isShiftKeyPressed=!1,this._isActive=!1,this._currentInlineCompletion=void 0,this.onDidChangeEmitter=new N.Emitter,this.onDidChange=this.onDidChangeEmitter.event,this.setInactiveDelayed=this._register(new w.RunOnceScheduler(()=>{this.isSuggestWidgetVisible||this._isActive&&(this._isActive=!1,this.onDidChangeEmitter.fire())},100)),this._register(r.onKeyDown(l=>{l.shiftKey&&!this.isShiftKeyPressed&&(this.isShiftKeyPressed=!0,this.update(this._isActive))})),this._register(r.onKeyUp(l=>{l.shiftKey&&this.isShiftKeyPressed&&(this.isShiftKeyPressed=!1,this.update(this._isActive))}));const i=n.SuggestController.get(this.editor);if(i){this._register(i.registerSelector({priority:100,select:(f,y,_)=>{const b=this.editor.getModel(),v=(0,g.minimizeInlineCompletion)(b,this.suggestControllerPreselector());if(!v)return-1;const m=D.Position.lift(y),E=_.map((k,M)=>{const P=d(i,m,k,this.isShiftKeyPressed),F=(0,g.minimizeInlineCompletion)(b,P);if(!F)return;const R=u(v.range,F.range)&&v.text.startsWith(F.text);return{index:M,valid:R,prefixLength:F.text.length,suggestItem:k}}).filter(k=>k&&k.valid),I=(0,s.findMaxBy)(E,(0,s.compareBy)(k=>k.prefixLength,(0,s.compareByNumber)()));return I?I.index:-1}}));let l=!1;const h=()=>{l||(l=!0,this._register(i.widget.value.onDidShow(()=>{this.isSuggestWidgetVisible=!0,this.update(!0)})),this._register(i.widget.value.onDidHide(()=>{this.isSuggestWidgetVisible=!1,this.setInactiveDelayed.schedule(),this.update(this._isActive)})),this._register(i.widget.value.onDidFocus(()=>{this.isSuggestWidgetVisible=!0,this.update(!0)})))};this._register(N.Event.once(i.model.onDidTrigger)(f=>{h()}))}this.update(this._isActive)}get state(){if(!!this._isActive)return{selectedItemAsInlineCompletion:this._currentInlineCompletion}}update(r){const o=this.getInlineCompletion();let i=!1;(0,t.normalizedInlineCompletionsEquals)(this._currentInlineCompletion,o)||(this._currentInlineCompletion=o,i=!0),this._isActive!==r&&(this._isActive=r,i=!0),i&&this.onDidChangeEmitter.fire()}getInlineCompletion(){const r=n.SuggestController.get(this.editor);if(!r||!this.isSuggestWidgetVisible)return;const o=r.widget.value.getFocusedItem();if(!!o)return d(r,this.editor.getPosition(),o.item,this.isShiftKeyPressed)}stopForceRenderingAbove(){const r=n.SuggestController.get(this.editor);r&&r.stopForceRenderingAbove()}forceRenderingAbove(){const r=n.SuggestController.get(this.editor);r&&r.forceRenderingAbove()}}e.SuggestWidgetInlineCompletionProvider=c;function u(a,r){return a.startLineNumber===r.startLineNumber&&a.startColumn===r.startColumn&&(a.endLineNumber<r.endLineNumber||a.endLineNumber===r.endLineNumber&&a.endColumn<=r.endColumn)}function d(a,r,o,i){if(Array.isArray(o.completion.additionalTextEdits)&&o.completion.additionalTextEdits.length>0)return{text:"",range:S.Range.fromPositions(r,r)};let{insertText:l}=o.completion;if(o.completion.insertTextRules&4){const f=new p.SnippetParser().parse(l),y=a.editor.getModel();if(f.children.length>100)return;C.SnippetSession.adjustWhitespace(y,r,f,!0,!0),l=f.toString()}const h=a.getOverwriteInfo(o,i);return{text:l,range:S.Range.fromPositions(r.delta(0,-h.overwriteBefore),r.delta(0,Math.max(h.overwriteAfter,0)))}}}),define(J[711],ee([0,1,14,11,2,18,184,200,185,710]),function(j,e,w,N,T,D,S,p,C,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SuggestWidgetPreviewModel=void 0;class g extends S.BaseGhostTextWidgetModel{constructor(c,u){super(c);this.cache=u,this.suggestionInlineCompletionSource=this._register(new n.SuggestWidgetInlineCompletionProvider(this.editor,()=>{var d,a;return(a=(d=this.cache.value)===null||d===void 0?void 0:d.completions[0])===null||a===void 0?void 0:a.toLiveInlineCompletion()})),this.updateOperation=this._register(new T.MutableDisposable),this.updateCacheSoon=this._register(new w.RunOnceScheduler(()=>this.updateCache(),50)),this.minReservedLineCount=0,this._register(this.suggestionInlineCompletionSource.onDidChange(()=>{this.updateCacheSoon.schedule(),this.suggestionInlineCompletionSource.state||(this.minReservedLineCount=0);const a=this.ghostText;a&&(this.minReservedLineCount=Math.max(this.minReservedLineCount,t(a.parts.map(r=>r.lines.length-1)))),this.minReservedLineCount>=1&&this.isSuggestionPreviewEnabled()?this.suggestionInlineCompletionSource.forceRenderingAbove():this.suggestionInlineCompletionSource.stopForceRenderingAbove(),this.onDidChangeEmitter.fire()})),this._register(this.cache.onDidChange(()=>{this.onDidChangeEmitter.fire()})),this._register(this.editor.onDidChangeCursorPosition(d=>{this.isSuggestionPreviewEnabled()&&(this.minReservedLineCount=0,this.updateCacheSoon.schedule(),this.onDidChangeEmitter.fire())})),this._register((0,T.toDisposable)(()=>this.suggestionInlineCompletionSource.stopForceRenderingAbove()))}get isActive(){return this.suggestionInlineCompletionSource.state!==void 0}isSuggestionPreviewEnabled(){return this.editor.getOption(105).preview}updateCache(){return Re(this,void 0,void 0,function*(){const c=this.suggestionInlineCompletionSource.state;if(!c||!c.selectedItemAsInlineCompletion)return;const u={text:c.selectedItemAsInlineCompletion.text,range:c.selectedItemAsInlineCompletion.range},d=this.editor.getPosition(),a=(0,w.createCancelablePromise)(o=>Re(this,void 0,void 0,function*(){let i;try{i=yield(0,p.provideInlineCompletions)(d,this.editor.getModel(),{triggerKind:D.InlineCompletionTriggerKind.Automatic,selectedSuggestionInfo:u},o)}catch(l){(0,N.onUnexpectedError)(l);return}o.isCancellationRequested||(this.cache.setValue(this.editor,i,D.InlineCompletionTriggerKind.Automatic),this.onDidChangeEmitter.fire())})),r=new p.UpdateOperation(a,D.InlineCompletionTriggerKind.Automatic);this.updateOperation.value=r,yield a,this.updateOperation.value===r&&this.updateOperation.clear()})}get ghostText(){var c,u;if(!this.isSuggestionPreviewEnabled())return;const d=this.suggestionInlineCompletionSource.state,a=(0,p.minimizeInlineCompletion)(this.editor.getModel(),d==null?void 0:d.selectedItemAsInlineCompletion),r=(0,p.minimizeInlineCompletion)(this.editor.getModel(),(u=(c=this.cache.value)===null||c===void 0?void 0:c.completions[0])===null||u===void 0?void 0:u.toLiveInlineCompletion()),o=r&&a&&r.text.startsWith(a.text)&&r.range.equalsRange(a.range)?r:a||r,i=a?((o==null?void 0:o.text.length)||0)-a.text.length:0;return(f=>{const y=this.editor.getOptions().get(105).previewMode;return f?(0,C.inlineCompletionToGhostText)(f,this.editor.getModel(),y,this.editor.getPosition(),i)||new S.GhostText(f.range.endLineNumber,[],this.minReservedLineCount):void 0})(o)}}e.SuggestWidgetPreviewModel=g;function t(s){return s.reduce((c,u)=>c+u,0)}}),define(J[712],ee([0,1,4,2,13,18,200,711,243,26]),function(j,e,w,N,T,D,S,p,C,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SharedInlineCompletionCache=e.GhostTextModel=e.DelegatingModel=void 0;class g extends N.Disposable{constructor(){super(...arguments);this.onDidChangeEmitter=new w.Emitter,this.onDidChange=this.onDidChangeEmitter.event,this.hasCachedGhostText=!1,this.currentModelRef=this._register(new N.MutableDisposable)}get targetModel(){var u;return(u=this.currentModelRef.value)===null||u===void 0?void 0:u.object}setTargetModel(u){var d;((d=this.currentModelRef.value)===null||d===void 0?void 0:d.object)!==u&&(this.currentModelRef.clear(),this.currentModelRef.value=u?(0,C.createDisposableRef)(u,u.onDidChange(()=>{this.hasCachedGhostText=!1,this.onDidChangeEmitter.fire()})):void 0,this.hasCachedGhostText=!1,this.onDidChangeEmitter.fire())}get ghostText(){var u,d;return this.hasCachedGhostText||(this.cachedGhostText=(d=(u=this.currentModelRef.value)===null||u===void 0?void 0:u.object)===null||d===void 0?void 0:d.ghostText,this.hasCachedGhostText=!0),this.cachedGhostText}setExpanded(u){var d;(d=this.targetModel)===null||d===void 0||d.setExpanded(u)}get minReservedLineCount(){return this.targetModel?this.targetModel.minReservedLineCount:0}}e.DelegatingModel=g;let t=class extends g{constructor(u,d){super();this.editor=u,this.commandService=d,this.sharedCache=this._register(new s),this.suggestWidgetAdapterModel=this._register(new p.SuggestWidgetPreviewModel(this.editor,this.sharedCache)),this.inlineCompletionsModel=this._register(new S.InlineCompletionsModel(this.editor,this.sharedCache,this.commandService)),this._register(this.suggestWidgetAdapterModel.onDidChange(()=>{this.updateModel()})),this.updateModel()}get activeInlineCompletionsModel(){if(this.targetModel===this.inlineCompletionsModel)return this.inlineCompletionsModel}updateModel(){this.setTargetModel(this.suggestWidgetAdapterModel.isActive?this.suggestWidgetAdapterModel:this.inlineCompletionsModel),this.inlineCompletionsModel.setActive(this.targetModel===this.inlineCompletionsModel)}shouldShowHoverAt(u){var d;const a=(d=this.activeInlineCompletionsModel)===null||d===void 0?void 0:d.ghostText;return a?a.parts.some(r=>u.containsPosition(new T.Position(a.lineNumber,r.column))):!1}triggerInlineCompletion(){var u;(u=this.activeInlineCompletionsModel)===null||u===void 0||u.trigger(D.InlineCompletionTriggerKind.Explicit)}commitInlineCompletion(){var u;(u=this.activeInlineCompletionsModel)===null||u===void 0||u.commitCurrentSuggestion()}hideInlineCompletion(){var u;(u=this.activeInlineCompletionsModel)===null||u===void 0||u.hide()}showNextInlineCompletion(){var u;(u=this.activeInlineCompletionsModel)===null||u===void 0||u.showNext()}showPreviousInlineCompletion(){var u;(u=this.activeInlineCompletionsModel)===null||u===void 0||u.showPrevious()}hasMultipleInlineCompletions(){var u;return Re(this,void 0,void 0,function*(){const d=yield(u=this.activeInlineCompletionsModel)===null||u===void 0?void 0:u.hasMultipleInlineCompletions();return d!==void 0?d:!1})}};t=Fe([Ce(1,n.ICommandService)],t),e.GhostTextModel=t;class s extends N.Disposable{constructor(){super(...arguments);this.onDidChangeEmitter=new w.Emitter,this.onDidChange=this.onDidChangeEmitter.event,this.cache=this._register(new N.MutableDisposable)}get value(){return this.cache.value}setValue(u,d,a){this.cache.value=new S.SynchronizedInlineCompletionsCache(u,d,()=>this.onDidChangeEmitter.fire(),a)}clearAndLeak(){return this.cache.clearAndLeak()}clear(){this.cache.clear()}}e.SharedInlineCompletionCache=s}),define(J[293],ee([0,1,2,8,16,140,25,242,712,687,515,15,9,80]),function(j,e,w,N,T,D,S,p,C,n,g,t,s,c){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TriggerInlineSuggestionAction=e.ShowPreviousInlineSuggestionAction=e.ShowNextInlineSuggestionAction=e.commitInlineSuggestionAction=e.ActiveGhostTextController=e.GhostTextController=void 0;let u=class zi extends w.Disposable{constructor(f,y){super();this.editor=f,this.instantiationService=y,this.triggeredExplicitly=!1,this.activeController=this._register(new w.MutableDisposable),this._register(this.editor.onDidChangeModel(()=>{this.updateModelController()})),this._register(this.editor.onDidChangeConfiguration(_=>{_.hasChanged(105)&&this.updateModelController(),_.hasChanged(54)&&this.updateModelController()})),this.updateModelController()}static get(f){return f.getContribution(zi.ID)}get activeModel(){var f;return(f=this.activeController.value)===null||f===void 0?void 0:f.model}updateModelController(){const f=this.editor.getOption(105),y=this.editor.getOption(54);this.activeController.value=void 0,this.activeController.value=this.editor.hasModel()&&(f.preview||y.enabled||this.triggeredExplicitly)?this.instantiationService.createInstance(a,this.editor):void 0}shouldShowHoverAt(f){var y;return((y=this.activeModel)===null||y===void 0?void 0:y.shouldShowHoverAt(f))||!1}shouldShowHoverAtViewZone(f){var y,_;return((_=(y=this.activeController.value)===null||y===void 0?void 0:y.widget)===null||_===void 0?void 0:_.shouldShowHoverAtViewZone(f))||!1}trigger(){var f;this.triggeredExplicitly=!0,this.activeController.value||this.updateModelController(),(f=this.activeModel)===null||f===void 0||f.triggerInlineCompletion()}commit(){var f;(f=this.activeModel)===null||f===void 0||f.commitInlineCompletion()}hide(){var f;(f=this.activeModel)===null||f===void 0||f.hideInlineCompletion()}showNextInlineCompletion(){var f;(f=this.activeModel)===null||f===void 0||f.showNextInlineCompletion()}showPreviousInlineCompletion(){var f;(f=this.activeModel)===null||f===void 0||f.showPreviousInlineCompletion()}hasMultipleInlineCompletions(){var f;return Re(this,void 0,void 0,function*(){const y=yield(f=this.activeModel)===null||f===void 0?void 0:f.hasMultipleInlineCompletions();return y!==void 0?y:!1})}};u.inlineSuggestionVisible=new t.RawContextKey("inlineSuggestionVisible",!1,g.localize(0,null)),u.inlineSuggestionHasIndentation=new t.RawContextKey("inlineSuggestionHasIndentation",!1,g.localize(1,null)),u.inlineSuggestionHasIndentationLessThanTabSize=new t.RawContextKey("inlineSuggestionHasIndentationLessThanTabSize",!0,g.localize(2,null)),u.ID="editor.contrib.ghostTextController",u=Fe([Ce(1,s.IInstantiationService)],u),e.GhostTextController=u;class d{constructor(f){this.contextKeyService=f,this.inlineCompletionVisible=u.inlineSuggestionVisible.bindTo(this.contextKeyService),this.inlineCompletionSuggestsIndentation=u.inlineSuggestionHasIndentation.bindTo(this.contextKeyService),this.inlineCompletionSuggestsIndentationLessThanTabSize=u.inlineSuggestionHasIndentationLessThanTabSize.bindTo(this.contextKeyService)}}let a=class extends w.Disposable{constructor(f,y,_){super();this.editor=f,this.instantiationService=y,this.contextKeyService=_,this.contextKeys=new d(this.contextKeyService),this.model=this._register(this.instantiationService.createInstance(C.GhostTextModel,this.editor)),this.widget=this._register(this.instantiationService.createInstance(n.GhostTextWidget,this.editor,this.model)),this._register((0,w.toDisposable)(()=>{this.contextKeys.inlineCompletionVisible.set(!1),this.contextKeys.inlineCompletionSuggestsIndentation.set(!1),this.contextKeys.inlineCompletionSuggestsIndentationLessThanTabSize.set(!0)})),this._register(this.model.onDidChange(()=>{this.updateContextKeys()})),this.updateContextKeys()}updateContextKeys(){var f;this.contextKeys.inlineCompletionVisible.set(((f=this.model.activeInlineCompletionsModel)===null||f===void 0?void 0:f.ghostText)!==void 0);let y=!1,_=!0;const b=this.model.inlineCompletionsModel.ghostText;if(!!this.model.activeInlineCompletionsModel&&b&&b.parts.length>0){const{column:v,lines:m}=b.parts[0],E=m[0],I=this.editor.getModel().getLineIndentColumn(b.lineNumber);if(v<=I){let M=(0,N.firstNonWhitespaceIndex)(E);M===-1&&(M=E.length-1),y=M>0;const P=this.editor.getModel().getOptions().tabSize;_=D.CursorColumns.visibleColumnFromColumn(E,M+1,P)<P}}this.contextKeys.inlineCompletionSuggestsIndentation.set(y),this.contextKeys.inlineCompletionSuggestsIndentationLessThanTabSize.set(_)}};a=Fe([Ce(1,s.IInstantiationService),Ce(2,t.IContextKeyService)],a),e.ActiveGhostTextController=a;const r=T.EditorCommand.bindToContribution(u.get);e.commitInlineSuggestionAction=new r({id:p.inlineSuggestCommitId,precondition:u.inlineSuggestionVisible,handler(h){h.commit(),h.editor.focus()}}),(0,T.registerEditorCommand)(e.commitInlineSuggestionAction),c.KeybindingsRegistry.registerKeybindingRule({primary:2,weight:200,id:e.commitInlineSuggestionAction.id,when:t.ContextKeyExpr.and(e.commitInlineSuggestionAction.precondition,S.EditorContextKeys.tabMovesFocus.toNegated(),u.inlineSuggestionHasIndentationLessThanTabSize)}),(0,T.registerEditorCommand)(new r({id:"editor.action.inlineSuggest.hide",precondition:u.inlineSuggestionVisible,kbOpts:{weight:100,primary:9},handler(h){h.hide()}}));class o extends T.EditorAction{constructor(){super({id:o.ID,label:g.localize(3,null),alias:"Show Next Inline Suggestion",precondition:t.ContextKeyExpr.and(S.EditorContextKeys.writable,u.inlineSuggestionVisible),kbOpts:{weight:100,primary:512|89}})}run(f,y){return Re(this,void 0,void 0,function*(){const _=u.get(y);_&&(_.showNextInlineCompletion(),y.focus())})}}e.ShowNextInlineSuggestionAction=o,o.ID="editor.action.inlineSuggest.showNext";class i extends T.EditorAction{constructor(){super({id:i.ID,label:g.localize(4,null),alias:"Show Previous Inline Suggestion",precondition:t.ContextKeyExpr.and(S.EditorContextKeys.writable,u.inlineSuggestionVisible),kbOpts:{weight:100,primary:512|87}})}run(f,y){return Re(this,void 0,void 0,function*(){const _=u.get(y);_&&(_.showPreviousInlineCompletion(),y.focus())})}}e.ShowPreviousInlineSuggestionAction=i,i.ID="editor.action.inlineSuggest.showPrevious";class l extends T.EditorAction{constructor(){super({id:"editor.action.inlineSuggest.trigger",label:g.localize(5,null),alias:"Trigger Inline Suggestion",precondition:S.EditorContextKeys.writable})}run(f,y){return Re(this,void 0,void 0,function*(){const _=u.get(y);_&&_.trigger()})}}e.TriggerInlineSuggestionAction=l,(0,T.registerEditorContribution)(u.ID,u),(0,T.registerEditorAction)(l),(0,T.registerEditorAction)(o),(0,T.registerEditorAction)(i)}),define(J[713],ee([0,1,7,69,2,126,3,39,240,293,516,61,35,26,15,57]),function(j,e,w,N,T,D,S,p,C,n,g,t,s,c,u,d){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.InlineCompletionsHoverParticipant=e.InlineCompletionsHover=void 0;class a{constructor(i,l,h){this.owner=i,this.range=l,this.controller=h}isValidForHoverAnchor(i){return i.type===1&&this.range.startColumn<=i.range.startColumn&&this.range.endColumn>=i.range.endColumn}hasMultipleSuggestions(){return this.controller.hasMultipleInlineCompletions()}}e.InlineCompletionsHover=a;let r=class{constructor(i,l,h,f,y,_,b,v){this._editor=i,this._hover=l,this._commandService=h,this._menuService=f,this._contextKeyService=y,this._modeService=_,this._openerService=b,this.accessibilityService=v}suggestHoverAnchor(i){const l=n.GhostTextController.get(this._editor);if(!l)return null;if(i.target.type===8){const h=i.target.detail;if(l.shouldShowHoverAtViewZone(h.viewZoneId))return new C.HoverForeignElementAnchor(1e3,this,S.Range.fromPositions(h.positionBefore||h.position,h.positionBefore||h.position))}return i.target.type===7&&i.target.range&&l.shouldShowHoverAt(i.target.range)?new C.HoverForeignElementAnchor(1e3,this,i.target.range):i.target.type===6&&i.target.range&&i.target.detail&&i.target.detail.mightBeForeignElement&&l.shouldShowHoverAt(i.target.range)?new C.HoverForeignElementAnchor(1e3,this,i.target.range):null}computeSync(i,l){const h=n.GhostTextController.get(this._editor);return h&&h.shouldShowHoverAt(i.range)?[new a(this,i.range,h)]:[]}renderHoverParts(i,l,h){const f=new T.DisposableStore,y=i[0];this.accessibilityService.isScreenReaderOptimized()&&this.renderScreenReaderText(y,l,f);const _=f.add(this._menuService.createMenu(s.MenuId.InlineCompletionsActions,this._contextKeyService)),b=h.addAction({label:g.localize(0,null),commandId:n.ShowNextInlineSuggestionAction.ID,run:()=>this._commandService.executeCommand(n.ShowNextInlineSuggestionAction.ID)}),v=h.addAction({label:g.localize(1,null),commandId:n.ShowPreviousInlineSuggestionAction.ID,run:()=>this._commandService.executeCommand(n.ShowPreviousInlineSuggestionAction.ID)});h.addAction({label:g.localize(2,null),commandId:n.commitInlineSuggestionAction.id,run:()=>this._commandService.executeCommand(n.commitInlineSuggestionAction.id)});const m=[b,v];for(const E of m)E.setEnabled(!1);y.hasMultipleSuggestions().then(E=>{for(const I of m)I.setEnabled(E)});for(const[E,I]of _.getActions())for(const k of I)k instanceof s.MenuItemAction&&h.addAction({label:k.label,commandId:k.item.id,run:()=>this._commandService.executeCommand(k.item.id)});return f}renderScreenReaderText(i,l,h){var f,y;const _=w.$,b=_("div.hover-row.markdown-hover"),v=w.append(b,_("div.hover-contents")),m=h.add(new D.MarkdownRenderer({editor:this._editor},this._modeService,this._openerService)),E=k=>{h.add(m.onDidRenderAsync(()=>{v.className="hover-contents code-hover-contents",this._hover.onContentsChanged()}));const M=g.localize(3,null),P=h.add(m.render(new N.MarkdownString().appendText(M).appendCodeblock("text",k)));v.replaceChildren(P.element)},I=(y=(f=i.controller.activeModel)===null||f===void 0?void 0:f.inlineCompletionsModel)===null||y===void 0?void 0:y.ghostText;if(I){const k=this._editor.getModel().getLineContent(I.lineNumber);E(I.renderForScreenReader(k))}l.appendChild(b)}};r=Fe([Ce(2,c.ICommandService),Ce(3,s.IMenuService),Ce(4,u.IContextKeyService),Ce(5,p.IModeService),Ce(6,d.IOpenerService),Ce(7,t.IAccessibilityService)],r),e.InlineCompletionsHoverParticipant=r}),define(J[714],ee([0,1,7,220,53,19,2,13,3,32,18,684,239,240,633,700,713,15,9,40,91]),function(j,e,w,N,T,D,S,p,C,n,g,t,s,c,u,d,a,r,o,i,l){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ModesContentHoverWidget=void 0;const h=w.$;let f=class extends S.Disposable{constructor(v){super();this._keybindingService=v,this._hasContent=!1,this.hoverElement=h("div.hover-row.status-bar"),this.actionsElement=w.append(this.hoverElement,h("div.actions"))}get hasContent(){return this._hasContent}addAction(v){const m=this._keybindingService.lookupKeybinding(v.commandId),E=m?m.getLabel():null;return this._hasContent=!0,this._register(N.HoverAction.render(this.actionsElement,v,E))}append(v){const m=w.append(this.actionsElement,v);return this._hasContent=!0,m}};f=Fe([Ce(0,i.IKeybindingService)],f);class y{constructor(v,m){this._participants=m,this._editor=v,this._result=[],this._anchor=null}setAnchor(v){this._anchor=v,this._result=[]}clearResult(){this._result=[]}static _getLineDecorations(v,m){if(m.type!==1)return[];const E=v.getModel(),I=m.range.startLineNumber,k=E.getLineMaxColumn(I);return v.getLineDecorations(I).filter(M=>{if(M.options.isWholeLine)return!0;const P=M.range.startLineNumber===I?M.range.startColumn:1,F=M.range.endLineNumber===I?M.range.endColumn:k;return!(P>m.range.startColumn||m.range.endColumn>F)})}computeAsync(v){return Re(this,void 0,void 0,function*(){const m=this._anchor;if(!this._editor.hasModel()||!m)return Promise.resolve([]);const E=y._getLineDecorations(this._editor,m),I=yield Promise.all(this._participants.map(k=>this._computeAsync(k,E,m,v)));return(0,D.flatten)(I)})}_computeAsync(v,m,E,I){return Re(this,void 0,void 0,function*(){return v.computeAsync?v.computeAsync(E,m,I):[]})}computeSync(){if(!this._editor.hasModel()||!this._anchor)return[];const v=y._getLineDecorations(this._editor,this._anchor);let m=[];for(const E of this._participants)m=m.concat(E.computeSync(this._anchor,v));return(0,D.coalesce)(m)}onResult(v,m){m?this._result=v.concat(this._result):this._result=this._result.concat(v)}getResult(){return this._result.slice(0)}getResultWithLoadingMessage(){if(this._anchor){for(const v of this._participants)if(v.createLoadingMessage){const m=v.createLoadingMessage(this._anchor);if(m)return this._result.slice(0).concat([m])}}return this._result.slice(0)}}let _=class Jt extends T.Widget{constructor(v,m,E,I,k){super();this._hoverVisibleKey=m,this._keybindingService=I,this._contextKeyService=k,this.allowEditorOverflow=!0,this._participants=[E.createInstance(t.ColorHoverParticipant,v,this),E.createInstance(u.MarkdownHoverParticipant,v,this),E.createInstance(a.InlineCompletionsHoverParticipant,v,this),E.createInstance(d.MarkerHoverParticipant,v,this)],this._editor=v,this._isVisible=!1,this._stoleFocus=!1,this._renderDisposable=null,this._hover=this._register(new N.HoverWidget),this._hover.containerDomNode.classList.toggle("hidden",!this._isVisible),this.onkeydown(this._hover.containerDomNode,M=>{M.equals(9)&&this.hide()}),this._register(this._editor.onDidChangeConfiguration(M=>{M.hasChanged(43)&&this._updateFont()})),this._editor.onDidLayoutChange(()=>this.layout()),this.layout(),this._editor.addContentWidget(this),this._showAtPosition=null,this._showAtRange=null,this._stoleFocus=!1,this._messages=[],this._lastAnchor=null,this._computer=new y(this._editor,this._participants),this._highlightDecorations=[],this._isChangingDecorations=!1,this._shouldFocus=!1,this._colorPicker=null,this._preferAbove=this._editor.getOption(52).above,this._hoverOperation=new s.HoverOperation(this._computer,M=>this._withResult(M,!0),null,M=>this._withResult(M,!1),this._editor.getOption(52).delay),this._register(w.addStandardDisposableListener(this.getDomNode(),w.EventType.FOCUS,()=>{this._colorPicker&&this.getDomNode().classList.add("colorpicker-hover")})),this._register(w.addStandardDisposableListener(this.getDomNode(),w.EventType.BLUR,()=>{this.getDomNode().classList.remove("colorpicker-hover")})),this._register(v.onDidChangeConfiguration(()=>{this._hoverOperation.setHoverTime(this._editor.getOption(52).delay),this._preferAbove=this._editor.getOption(52).above})),this._register(g.TokenizationRegistry.onDidChange(()=>{this._isVisible&&this._lastAnchor&&this._messages.length>0&&(this._hover.contentsDomNode.textContent="",this._renderMessages(this._lastAnchor,this._messages))}))}dispose(){this._hoverOperation.cancel(),this._editor.removeContentWidget(this),super.dispose()}getId(){return Jt.ID}getDomNode(){return this._hover.containerDomNode}_shouldShowAt(v){const m=v.target.type;if(m===6)return!0;if(m===7){const E=this._editor.getOption(43).typicalHalfwidthCharacterWidth/2,I=v.target.detail;if(I&&!I.isAfterLines&&typeof I.horizontalDistanceToText=="number"&&I.horizontalDistanceToText<E)return!0}return!1}maybeShowAt(v){var m;const E=[];for(const I of this._participants)if(typeof I.suggestHoverAnchor=="function"){const k=I.suggestHoverAnchor(v);k&&E.push(k)}if(this._shouldShowAt(v)&&v.target.range){const k=[...((m=v.target.element)===null||m===void 0?void 0:m.classList.values())||[]].find(M=>M.startsWith("ced-colorBox"))&&v.target.range.endColumn-v.target.range.startColumn==1?new C.Range(v.target.range.startLineNumber,v.target.range.startColumn+1,v.target.range.endLineNumber,v.target.range.endColumn+1):v.target.range;E.push(new c.HoverRangeAnchor(0,k))}return E.length===0?!1:(E.sort((I,k)=>k.priority-I.priority),this._startShowingAt(E[0],0,!1),!0)}_showAt(v,m,E){this._showAtPosition=v,this._showAtRange=m,this._hoverVisibleKey.set(!0),this._isVisible=!0,this._hover.containerDomNode.classList.toggle("hidden",!this._isVisible),this._editor.layoutContentWidget(this),this._editor.render(),this._stoleFocus=E,E&&this._hover.containerDomNode.focus()}getPosition(){if(this._isVisible){let v=this._preferAbove;return!v&&this._contextKeyService.getContextKeyValue(l.Context.Visible.key)&&(v=!0),{position:this._showAtPosition,range:this._showAtRange,preference:v?[1,2]:[2,1]}}return null}_updateFont(){Array.prototype.slice.call(this._hover.contentsDomNode.getElementsByClassName("code")).forEach(m=>this._editor.applyFontInfo(m))}_updateContents(v){this._hover.contentsDomNode.textContent="",this._hover.contentsDomNode.appendChild(v),this._updateFont(),this._editor.layoutContentWidget(this),this._hover.onContentsChanged()}layout(){const v=Math.max(this._editor.getLayoutInfo().height/4,250),{fontSize:m,lineHeight:E}=this._editor.getOption(43);this._hover.contentsDomNode.style.fontSize=`${m}px`,this._hover.contentsDomNode.style.lineHeight=`${E/m}`,this._hover.contentsDomNode.style.maxHeight=`${v}px`,this._hover.contentsDomNode.style.maxWidth=`${Math.max(this._editor.getLayoutInfo().width*.66,500)}px`}onModelDecorationsChanged(){this._isChangingDecorations||this._isVisible&&(this._hoverOperation.cancel(),this._computer.clearResult(),this._colorPicker||this._hoverOperation.start(0))}startShowingAtRange(v,m,E){this._startShowingAt(new c.HoverRangeAnchor(0,v),m,E)}_startShowingAt(v,m,E){if(!(this._lastAnchor&&this._lastAnchor.equals(v))){if(this._hoverOperation.cancel(),this._isVisible)if(!this._showAtPosition||!this._lastAnchor||!v.canAdoptVisibleHover(this._lastAnchor,this._showAtPosition))this.hide();else{const I=this._messages.filter(k=>k.isValidForHoverAnchor(v));if(I.length===0)this.hide();else{if(I.length===this._messages.length)return;this._renderMessages(v,I)}}this._lastAnchor=v,this._computer.setAnchor(v),this._shouldFocus=E,this._hoverOperation.start(m)}}hide(){this._lastAnchor=null,this._hoverOperation.cancel(),this._isVisible&&(setTimeout(()=>{this._isVisible||this._hoverVisibleKey.set(!1)},0),this._isVisible=!1,this._hover.containerDomNode.classList.toggle("hidden",!this._isVisible),this._editor.layoutContentWidget(this),this._stoleFocus&&this._editor.focus()),this._isChangingDecorations=!0,this._highlightDecorations=this._editor.deltaDecorations(this._highlightDecorations,[]),this._isChangingDecorations=!1,this._renderDisposable&&(this._renderDisposable.dispose(),this._renderDisposable=null),this._colorPicker=null}isColorPickerVisible(){return!!this._colorPicker}setColorPicker(v){this._colorPicker=v}onContentsChanged(){this._hover.onContentsChanged()}_withResult(v,m){this._messages=v,this._lastAnchor&&this._messages.length>0?this._renderMessages(this._lastAnchor,this._messages):m&&this.hide()}_renderMessages(v,m){this._renderDisposable&&(this._renderDisposable.dispose(),this._renderDisposable=null),this._colorPicker=null;let E=1073741824,I=m[0].range,k=null,M=document.createDocumentFragment();const P=new S.DisposableStore,F=new Map;for(const A of m)E=Math.min(E,A.range.startColumn),I=C.Range.plusRange(I,A.range),A.forceShowAtRange&&(k=A.range),F.has(A.owner)||F.set(A.owner,[]),F.get(A.owner).push(A);const R=P.add(new f(this._keybindingService));for(const[A,O]of F)P.add(A.renderHoverParts(O,M,R));R.hasContent&&M.appendChild(R.hoverElement),this._renderDisposable=P,M.hasChildNodes()&&(k?this._showAt(k.getStartPosition(),k,this._shouldFocus):this._showAt(new p.Position(v.range.startLineNumber,E),I,this._shouldFocus),this._updateContents(M)),this._colorPicker&&this._colorPicker.layout(),this._isChangingDecorations=!0,this._highlightDecorations=this._editor.deltaDecorations(this._highlightDecorations,I?[{range:I,options:Jt._DECORATION_OPTIONS}]:[]),this._isChangingDecorations=!1}};_.ID="editor.contrib.modesContentHoverWidget",_._DECORATION_OPTIONS=n.ModelDecorationOptions.register({description:"content-hover-highlight",className:"hoverHighlight"}),_=Fe([Ce(2,o.IInstantiationService),Ce(3,i.IKeybindingService),Ce(4,r.IContextKeyService)],_),e.ModesContentHoverWidget=_}),define(J[294],ee([0,1,55,2,16,3,25,39,289,714,583,510,15,9,57,21,10]),function(j,e,w,N,T,D,S,p,C,n,g,t,s,c,u,d,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ModesHoverController=void 0;let r=class Hi{constructor(h,f,y,_,b){this._editor=h,this._instantiationService=f,this._openerService=y,this._modeService=_,this._toUnhook=new N.DisposableStore,this._isMouseDown=!1,this._hoverClicked=!1,this._contentWidget=null,this._glyphWidget=null,this._hookEvents(),this._didChangeConfigurationHandler=this._editor.onDidChangeConfiguration(v=>{v.hasChanged(52)&&(this._unhookEvents(),this._hookEvents())}),this._hoverVisibleKey=S.EditorContextKeys.hoverVisible.bindTo(b)}static get(h){return h.getContribution(Hi.ID)}_hookEvents(){const h=()=>this._hideWidgets(),f=this._editor.getOption(52);this._isHoverEnabled=f.enabled,this._isHoverSticky=f.sticky,this._isHoverEnabled?(this._toUnhook.add(this._editor.onMouseDown(y=>this._onEditorMouseDown(y))),this._toUnhook.add(this._editor.onMouseUp(y=>this._onEditorMouseUp(y))),this._toUnhook.add(this._editor.onMouseMove(y=>this._onEditorMouseMove(y))),this._toUnhook.add(this._editor.onKeyDown(y=>this._onKeyDown(y))),this._toUnhook.add(this._editor.onDidChangeModelDecorations(()=>this._onModelDecorationsChanged()))):(this._toUnhook.add(this._editor.onMouseMove(y=>this._onEditorMouseMove(y))),this._toUnhook.add(this._editor.onKeyDown(y=>this._onKeyDown(y)))),this._toUnhook.add(this._editor.onMouseLeave(h)),this._toUnhook.add(this._editor.onDidChangeModel(h)),this._toUnhook.add(this._editor.onDidScrollChange(y=>this._onEditorScrollChanged(y)))}_unhookEvents(){this._toUnhook.clear()}_onModelDecorationsChanged(){var h,f;(h=this._contentWidget)===null||h===void 0||h.onModelDecorationsChanged(),(f=this._glyphWidget)===null||f===void 0||f.onModelDecorationsChanged()}_onEditorScrollChanged(h){(h.scrollTopChanged||h.scrollLeftChanged)&&this._hideWidgets()}_onEditorMouseDown(h){this._isMouseDown=!0;const f=h.target.type;if(f===9&&h.target.detail===n.ModesContentHoverWidget.ID){this._hoverClicked=!0;return}f===12&&h.target.detail===g.ModesGlyphHoverWidget.ID||(f!==12&&h.target.detail!==g.ModesGlyphHoverWidget.ID&&(this._hoverClicked=!1),this._hideWidgets())}_onEditorMouseUp(h){this._isMouseDown=!1}_onEditorMouseMove(h){var f,y,_,b,v;let m=h.target.type;if(this._isMouseDown&&this._hoverClicked||this._isHoverSticky&&m===9&&h.target.detail===n.ModesContentHoverWidget.ID||this._isHoverSticky&&!((y=(f=h.event.browserEvent.view)===null||f===void 0?void 0:f.getSelection())===null||y===void 0?void 0:y.isCollapsed)||!this._isHoverSticky&&m===9&&h.target.detail===n.ModesContentHoverWidget.ID&&((_=this._contentWidget)===null||_===void 0?void 0:_.isColorPickerVisible())||this._isHoverSticky&&m===12&&h.target.detail===g.ModesGlyphHoverWidget.ID)return;if(!this._isHoverEnabled){this._hideWidgets();return}if(this._getOrCreateContentWidget().maybeShowAt(h)){(b=this._glyphWidget)===null||b===void 0||b.hide();return}if(m===2&&h.target.position){(v=this._contentWidget)===null||v===void 0||v.hide(),this._glyphWidget||(this._glyphWidget=new g.ModesGlyphHoverWidget(this._editor,this._modeService,this._openerService)),this._glyphWidget.startShowingAt(h.target.position.lineNumber);return}this._hideWidgets()}_onKeyDown(h){h.keyCode!==5&&h.keyCode!==6&&h.keyCode!==57&&h.keyCode!==4&&this._hideWidgets()}_hideWidgets(){var h,f,y;this._isMouseDown&&this._hoverClicked&&((h=this._contentWidget)===null||h===void 0?void 0:h.isColorPickerVisible())||(this._hoverClicked=!1,(f=this._glyphWidget)===null||f===void 0||f.hide(),(y=this._contentWidget)===null||y===void 0||y.hide())}_getOrCreateContentWidget(){return this._contentWidget||(this._contentWidget=this._instantiationService.createInstance(n.ModesContentHoverWidget,this._editor,this._hoverVisibleKey)),this._contentWidget}isColorPickerVisible(){var h;return((h=this._contentWidget)===null||h===void 0?void 0:h.isColorPickerVisible())||!1}showContentHover(h,f,y){this._getOrCreateContentWidget().startShowingAtRange(h,f,y)}dispose(){var h,f;this._unhookEvents(),this._toUnhook.dispose(),this._didChangeConfigurationHandler.dispose(),(h=this._glyphWidget)===null||h===void 0||h.dispose(),(f=this._contentWidget)===null||f===void 0||f.dispose()}};r.ID="editor.contrib.hover",r=Fe([Ce(1,c.IInstantiationService),Ce(2,u.IOpenerService),Ce(3,p.IModeService),Ce(4,s.IContextKeyService)],r),e.ModesHoverController=r;class o extends T.EditorAction{constructor(){super({id:"editor.action.showHover",label:t.localize(0,null),alias:"Show Hover",precondition:void 0,kbOpts:{kbExpr:S.EditorContextKeys.editorTextFocus,primary:(0,w.KeyChord)(2048|41,2048|39),weight:100}})}run(h,f){if(!f.hasModel())return;let y=r.get(f);if(!y)return;const _=f.getPosition(),b=new D.Range(_.lineNumber,_.column,_.lineNumber,_.column),v=f.getOption(2)===2;y.showContentHover(b,1,v)}}class i extends T.EditorAction{constructor(){super({id:"editor.action.showDefinitionPreviewHover",label:t.localize(1,null),alias:"Show Definition Preview Hover",precondition:void 0})}run(h,f){let y=r.get(f);if(!y)return;const _=f.getPosition();if(!_)return;const b=new D.Range(_.lineNumber,_.column,_.lineNumber,_.column);C.GotoDefinitionAtPositionEditorContribution.get(f).startFindDefinitionFromCursor(_).then(()=>{y.showContentHover(b,1,!0)})}}(0,T.registerEditorContribution)(r.ID,r),(0,T.registerEditorAction)(o),(0,T.registerEditorAction)(i),(0,a.registerThemingParticipant)((l,h)=>{const f=l.getColor(d.editorHoverHighlight);f&&h.addRule(`.monaco-editor .hoverHighlight { background-color: ${f}; }`);const y=l.getColor(d.editorHoverBackground);y&&h.addRule(`.monaco-editor .monaco-hover { background-color: ${y}; }`);const _=l.getColor(d.editorHoverBorder);_&&(h.addRule(`.monaco-editor .monaco-hover { border: 1px solid ${_}; }`),h.addRule(`.monaco-editor .monaco-hover .hover-row:not(:first-child):not(:empty) { border-top: 1px solid ${_.transparent(.5)}; }`),h.addRule(`.monaco-editor .monaco-hover hr { border-top: 1px solid ${_.transparent(.5)}; }`),h.addRule(`.monaco-editor .monaco-hover hr { border-bottom: 0px solid ${_.transparent(.5)}; }`));const b=l.getColor(d.textLinkForeground);b&&h.addRule(`.monaco-editor .monaco-hover a { color: ${b}; }`);const v=l.getColor(d.textLinkActiveForeground);v&&h.addRule(`.monaco-editor .monaco-hover a:hover { color: ${v}; }`);const m=l.getColor(d.editorHoverForeground);m&&h.addRule(`.monaco-editor .monaco-hover { color: ${m}; }`);const E=l.getColor(d.editorHoverStatusBarBackground);E&&h.addRule(`.monaco-editor .monaco-hover .hover-row .actions { background-color: ${E}; }`);const I=l.getColor(d.textCodeBlockBackground);I&&h.addRule(`.monaco-editor .monaco-hover code { background-color: ${I}; }`)})}),define(J[715],ee([0,1,2,16,3,294,283]),function(j,e,w,N,T,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ColorContribution=void 0;class S extends w.Disposable{constructor(C){super();this._editor=C,this._register(C.onMouseDown(n=>this.onMouseDown(n)))}dispose(){super.dispose()}onMouseDown(C){var n;if(C.target.type!==6||![...((n=C.target.element)===null||n===void 0?void 0:n.classList.values())||[]].find(c=>c.startsWith("ced-colorBox"))||!C.target.range)return;const s=this._editor.getContribution(D.ModesHoverController.ID);if(!s.isColorPickerVisible()){const c=new T.Range(C.target.range.startLineNumber,C.target.range.startColumn+1,C.target.range.endLineNumber,C.target.range.endColumn+1);s.showContentHover(c,0,!1)}}}e.ColorContribution=S,S.ID="editor.contrib.colorContribution",(0,N.registerEditorContribution)(S.ID,S)}),define(J[716],ee([0,1,156,157,281,226,621,669,622,670,623,673,675,715,626,627,628,676,284,683,629,630,566,293,288,289,286,294,686,634,685,689,690,691,692,655,635,636,203,292,637,275,638,694,695,285,696,65,136]),function(j,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0})});var zt=this&&this.__createBinding||(Object.create?function(j,e,w,N){N===void 0&&(N=w),Object.defineProperty(j,N,{enumerable:!0,get:function(){return e[w]}})}:function(j,e,w,N){N===void 0&&(N=w),j[N]=e[w]}),Ht=this&&this.__exportStar||function(j,e){for(var w in j)w!=="default"&&!Object.prototype.hasOwnProperty.call(e,w)&&zt(e,j,w)};define(J[719],ee([0,1,706,716,639,640,641,593,643,644,642,701,645]),function(j,e,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),Ht(w,e)})}).call(this);
 
 
/*!-----------------------------------------------------------------------------
 * Copyright (c) Microsoft Corporation. All rights reserved.
 * monaco-typescript version: 0.30.1(5a7ba61be909ae9e4889768a3453ebb0dec392e2)
 * Released under the MIT license
 * https://github.com/Microsoft/monaco-typescript/blob/master/LICENSE.md
 *-----------------------------------------------------------------------------*/
define("vs/language/typescript/lib/typescriptServicesMetadata",["require","exports"],(function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.typescriptVersion=void 0,e.typescriptVersion="4.4.4"})),define("vs/language/typescript/fillers/monaco-editor-core",['vs/editor/editor.api'],(function(){return self.monaco})),define("vs/language/typescript/monaco.contribution",["require","exports","./lib/typescriptServicesMetadata","./fillers/monaco-editor-core"],(function(t,e,i,n){"use strict";var r,o,s,a,c;Object.defineProperty(e,"__esModule",{value:!0}),e.getJavaScriptWorker=e.getTypeScriptWorker=e.javascriptDefaults=e.typescriptDefaults=e.typescriptVersion=e.ModuleResolutionKind=e.ScriptTarget=e.NewLineKind=e.JsxEmit=e.ModuleKind=void 0,function(t){t[t.None=0]="None",t[t.CommonJS=1]="CommonJS",t[t.AMD=2]="AMD",t[t.UMD=3]="UMD",t[t.System=4]="System",t[t.ES2015=5]="ES2015",t[t.ESNext=99]="ESNext"}(r=e.ModuleKind||(e.ModuleKind={})),function(t){t[t.None=0]="None",t[t.Preserve=1]="Preserve",t[t.React=2]="React",t[t.ReactNative=3]="ReactNative",t[t.ReactJSX=4]="ReactJSX",t[t.ReactJSXDev=5]="ReactJSXDev"}(o=e.JsxEmit||(e.JsxEmit={})),function(t){t[t.CarriageReturnLineFeed=0]="CarriageReturnLineFeed",t[t.LineFeed=1]="LineFeed"}(s=e.NewLineKind||(e.NewLineKind={})),function(t){t[t.ES3=0]="ES3",t[t.ES5=1]="ES5",t[t.ES2015=2]="ES2015",t[t.ES2016=3]="ES2016",t[t.ES2017=4]="ES2017",t[t.ES2018=5]="ES2018",t[t.ES2019=6]="ES2019",t[t.ES2020=7]="ES2020",t[t.ESNext=99]="ESNext",t[t.JSON=100]="JSON",t[t.Latest=99]="Latest"}(a=e.ScriptTarget||(e.ScriptTarget={})),function(t){t[t.Classic=1]="Classic",t[t.NodeJs=2]="NodeJs"}(c=e.ModuleResolutionKind||(e.ModuleResolutionKind={}));var p=function(){function t(t,e,i,r){this._onDidChange=new n.Emitter,this._onDidExtraLibsChange=new n.Emitter,this._extraLibs=Object.create(null),this._removedExtraLibs=Object.create(null),this._eagerModelSync=!1,this.setCompilerOptions(t),this.setDiagnosticsOptions(e),this.setWorkerOptions(i),this.setInlayHintsOptions(r),this._onDidExtraLibsChangeTimeout=-1}return Object.defineProperty(t.prototype,"onDidChange",{get:function(){return this._onDidChange.event},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"onDidExtraLibsChange",{get:function(){return this._onDidExtraLibsChange.event},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"workerOptions",{get:function(){return this._workerOptions},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"inlayHintsOptions",{get:function(){return this._inlayHintsOptions},enumerable:!1,configurable:!0}),t.prototype.getExtraLibs=function(){return this._extraLibs},t.prototype.addExtraLib=function(t,e){var i,n=this;if(i=void 0===e?"ts:extralib-"+Math.random().toString(36).substring(2,15):e,this._extraLibs[i]&&this._extraLibs[i].content===t)return{dispose:function(){}};var r=1;return this._removedExtraLibs[i]&&(r=this._removedExtraLibs[i]+1),this._extraLibs[i]&&(r=this._extraLibs[i].version+1),this._extraLibs[i]={content:t,version:r},this._fireOnDidExtraLibsChangeSoon(),{dispose:function(){var t=n._extraLibs[i];t&&t.version===r&&(delete n._extraLibs[i],n._removedExtraLibs[i]=r,n._fireOnDidExtraLibsChangeSoon())}}},t.prototype.setExtraLibs=function(t){for(var e in this._extraLibs)this._removedExtraLibs[e]=this._extraLibs[e].version;if(this._extraLibs=Object.create(null),t&&t.length>0)for(var i=0,n=t;i<n.length;i++){var r=n[i],o=(e=r.filePath||"ts:extralib-"+Math.random().toString(36).substring(2,15),r.content),s=1;this._removedExtraLibs[e]&&(s=this._removedExtraLibs[e]+1),this._extraLibs[e]={content:o,version:s}}this._fireOnDidExtraLibsChangeSoon()},t.prototype._fireOnDidExtraLibsChangeSoon=function(){var t=this;-1===this._onDidExtraLibsChangeTimeout&&(this._onDidExtraLibsChangeTimeout=window.setTimeout((function(){t._onDidExtraLibsChangeTimeout=-1,t._onDidExtraLibsChange.fire(void 0)}),0))},t.prototype.getCompilerOptions=function(){return this._compilerOptions},t.prototype.setCompilerOptions=function(t){this._compilerOptions=t||Object.create(null),this._onDidChange.fire(void 0)},t.prototype.getDiagnosticsOptions=function(){return this._diagnosticsOptions},t.prototype.setDiagnosticsOptions=function(t){this._diagnosticsOptions=t||Object.create(null),this._onDidChange.fire(void 0)},t.prototype.setWorkerOptions=function(t){this._workerOptions=t||Object.create(null),this._onDidChange.fire(void 0)},t.prototype.setInlayHintsOptions=function(t){this._inlayHintsOptions=t||Object.create(null),this._onDidChange.fire(void 0)},t.prototype.setMaximumWorkerIdleTime=function(t){},t.prototype.setEagerModelSync=function(t){this._eagerModelSync=t},t.prototype.getEagerModelSync=function(){return this._eagerModelSync},t}();e.typescriptVersion=i.typescriptVersion,e.typescriptDefaults=new p({allowNonTsExtensions:!0,target:a.Latest},{noSemanticValidation:!1,noSyntaxValidation:!1,onlyVisible:!1},{},{}),e.javascriptDefaults=new p({allowNonTsExtensions:!0,allowJs:!0,target:a.Latest},{noSemanticValidation:!0,noSyntaxValidation:!1,onlyVisible:!1},{},{});e.getTypeScriptWorker=function(){return u().then((function(t){return t.getTypeScriptWorker()}))};function u(){return new Promise((function(e,i){t(["./tsMode"],e,i)}))}e.getJavaScriptWorker=function(){return u().then((function(t){return t.getJavaScriptWorker()}))},n.languages.typescript={ModuleKind:r,JsxEmit:o,NewLineKind:s,ScriptTarget:a,ModuleResolutionKind:c,typescriptVersion:e.typescriptVersion,typescriptDefaults:e.typescriptDefaults,javascriptDefaults:e.javascriptDefaults,getTypeScriptWorker:e.getTypeScriptWorker,getJavaScriptWorker:e.getJavaScriptWorker},n.languages.onLanguage("typescript",(function(){return u().then((function(t){return t.setupTypeScript(e.typescriptDefaults)}))})),n.languages.onLanguage("javascript",(function(){return u().then((function(t){return t.setupJavaScript(e.javascriptDefaults)}))}))}));
/*!-----------------------------------------------------------------------------
 * Copyright (c) Microsoft Corporation. All rights reserved.
 * monaco-css version: 0.30.1(5a7ba61be909ae9e4889768a3453ebb0dec392e2)
 * Released under the MIT license
 * https://github.com/Microsoft/monaco-css/blob/master/LICENSE.md
 *-----------------------------------------------------------------------------*/
define("vs/language/css/fillers/monaco-editor-core",['vs/editor/editor.api'],(function(){return self.monaco})),define("vs/language/css/monaco.contribution",["require","exports","./fillers/monaco-editor-core"],(function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.lessDefaults=n.scssDefaults=n.cssDefaults=void 0;var o=function(){function e(e,n,o){this._onDidChange=new t.Emitter,this._languageId=e,this.setOptions(n),this.setModeConfiguration(o)}return Object.defineProperty(e.prototype,"onDidChange",{get:function(){return this._onDidChange.event},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"languageId",{get:function(){return this._languageId},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"modeConfiguration",{get:function(){return this._modeConfiguration},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"diagnosticsOptions",{get:function(){return this.options},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"options",{get:function(){return this._options},enumerable:!1,configurable:!0}),e.prototype.setOptions=function(e){this._options=e||Object.create(null),this._onDidChange.fire(this)},e.prototype.setDiagnosticsOptions=function(e){this.setOptions(e)},e.prototype.setModeConfiguration=function(e){this._modeConfiguration=e||Object.create(null),this._onDidChange.fire(this)},e}(),s={validate:!0,lint:{compatibleVendorPrefixes:"ignore",vendorPrefix:"warning",duplicateProperties:"warning",emptyRules:"warning",importStatement:"ignore",boxModel:"ignore",universalSelector:"ignore",zeroUnits:"ignore",fontFaceProperties:"warning",hexColorLength:"error",argumentsInColorFunction:"error",unknownProperties:"warning",ieHack:"ignore",unknownVendorSpecificProperties:"ignore",propertyIgnoredDueToDisplay:"warning",important:"ignore",float:"ignore",idSelector:"ignore"},data:{useDefaultDataProvider:!0}},i={completionItems:!0,hovers:!0,documentSymbols:!0,definitions:!0,references:!0,documentHighlights:!0,rename:!0,colors:!0,foldingRanges:!0,diagnostics:!0,selectionRanges:!0};function r(){return new Promise((function(n,t){e(["./cssMode"],n,t)}))}n.cssDefaults=new o("css",s,i),n.scssDefaults=new o("scss",s,i),n.lessDefaults=new o("less",s,i),t.languages.css={cssDefaults:n.cssDefaults,lessDefaults:n.lessDefaults,scssDefaults:n.scssDefaults},t.languages.onLanguage("less",(function(){r().then((function(e){return e.setupMode(n.lessDefaults)}))})),t.languages.onLanguage("scss",(function(){r().then((function(e){return e.setupMode(n.scssDefaults)}))})),t.languages.onLanguage("css",(function(){r().then((function(e){return e.setupMode(n.cssDefaults)}))}))}));
/*!-----------------------------------------------------------------------------
 * Copyright (c) Microsoft Corporation. All rights reserved.
 * monaco-json version: 0.30.1(5a7ba61be909ae9e4889768a3453ebb0dec392e2)
 * Released under the MIT license
 * https://github.com/Microsoft/monaco-json/blob/master/LICENSE.md
 *-----------------------------------------------------------------------------*/
define("vs/language/json/fillers/monaco-editor-core",['vs/editor/editor.api'],(function(){return self.monaco})),define("vs/language/json/monaco.contribution",["require","exports","./fillers/monaco-editor-core"],(function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.jsonDefaults=void 0;var o=function(){function e(e,n,o){this._onDidChange=new t.Emitter,this._languageId=e,this.setDiagnosticsOptions(n),this.setModeConfiguration(o)}return Object.defineProperty(e.prototype,"onDidChange",{get:function(){return this._onDidChange.event},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"languageId",{get:function(){return this._languageId},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"modeConfiguration",{get:function(){return this._modeConfiguration},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"diagnosticsOptions",{get:function(){return this._diagnosticsOptions},enumerable:!1,configurable:!0}),e.prototype.setDiagnosticsOptions=function(e){this._diagnosticsOptions=e||Object.create(null),this._onDidChange.fire(this)},e.prototype.setModeConfiguration=function(e){this._modeConfiguration=e||Object.create(null),this._onDidChange.fire(this)},e}();n.jsonDefaults=new o("json",{validate:!0,allowComments:!0,schemas:[],enableSchemaRequest:!1,schemaRequest:"warning",schemaValidation:"warning",comments:"error",trailingCommas:"error"},{documentFormattingEdits:!0,documentRangeFormattingEdits:!0,completionItems:!0,hovers:!0,documentSymbols:!0,tokens:!0,colors:!0,foldingRanges:!0,diagnostics:!0,selectionRanges:!0}),t.languages.json={jsonDefaults:n.jsonDefaults},t.languages.register({id:"json",extensions:[".json",".bowerrc",".jshintrc",".jscsrc",".eslintrc",".babelrc",".har"],aliases:["JSON","json"],mimetypes:["application/json"]}),t.languages.onLanguage("json",(function(){new Promise((function(n,t){e(["./jsonMode"],n,t)})).then((function(e){return e.setupMode(n.jsonDefaults)}))}))}));
/*!-----------------------------------------------------------------------------
 * Copyright (c) Microsoft Corporation. All rights reserved.
 * monaco-html version: 0.30.1(5a7ba61be909ae9e4889768a3453ebb0dec392e2)
 * Released under the MIT license
 * https://github.com/Microsoft/monaco-html/blob/master/LICENSE.md
 *-----------------------------------------------------------------------------*/
define("vs/language/html/fillers/monaco-editor-core",['vs/editor/editor.api'],(function(){return self.monaco}));var __awaiter=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(a,o){function i(e){try{l(r.next(e))}catch(e){o(e)}}function u(e){try{l(r.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?a(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(i,u)}l((r=r.apply(e,t||[])).next())}))},__generator=this&&this.__generator||function(e,t){var n,r,a,o,i={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return o={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function u(o){return function(u){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;i;)try{if(n=1,r&&(a=2&o[0]?r.return:o[0]?r.throw||((a=r.return)&&a.call(r),0):r.next)&&!(a=a.call(r,o[1])).done)return a;switch(r=0,a&&(o=[2&o[0],a.value]),o[0]){case 0:case 1:a=o;break;case 4:return i.label++,{value:o[1],done:!1};case 5:i.label++,r=o[1],o=[0];continue;case 7:o=i.ops.pop(),i.trys.pop();continue;default:if(!(a=i.trys,(a=a.length>0&&a[a.length-1])||6!==o[0]&&2!==o[0])){i=0;continue}if(3===o[0]&&(!a||o[1]>a[0]&&o[1]<a[3])){i.label=o[1];break}if(6===o[0]&&i.label<a[1]){i.label=a[1],a=o;break}if(a&&i.label<a[2]){i.label=a[2],i.ops.push(o);break}a[2]&&i.ops.pop(),i.trys.pop();continue}o=t.call(e,i)}catch(e){o=[6,e],r=0}finally{n=a=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,u])}}};define("vs/language/html/monaco.contribution",["require","exports","./fillers/monaco-editor-core"],(function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.registerHTMLLanguageService=t.razorDefaults=t.razorLanguageService=t.handlebarDefaults=t.handlebarLanguageService=t.htmlDefaults=t.htmlLanguageService=void 0;var r=function(){function e(e,t,r){this._onDidChange=new n.Emitter,this._languageId=e,this.setOptions(t),this.setModeConfiguration(r)}return Object.defineProperty(e.prototype,"onDidChange",{get:function(){return this._onDidChange.event},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"languageId",{get:function(){return this._languageId},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"options",{get:function(){return this._options},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"modeConfiguration",{get:function(){return this._modeConfiguration},enumerable:!1,configurable:!0}),e.prototype.setOptions=function(e){this._options=e||Object.create(null),this._onDidChange.fire(this)},e.prototype.setModeConfiguration=function(e){this._modeConfiguration=e||Object.create(null),this._onDidChange.fire(this)},e}(),a={format:{tabSize:4,insertSpaces:!1,wrapLineLength:120,unformatted:'default": "a, abbr, acronym, b, bdo, big, br, button, cite, code, dfn, em, i, img, input, kbd, label, map, object, q, samp, select, small, span, strong, sub, sup, textarea, tt, var',contentUnformatted:"pre",indentInnerHtml:!1,preserveNewLines:!0,maxPreserveNewLines:null,indentHandlebars:!1,endWithNewline:!1,extraLiners:"head, body, /html",wrapAttributes:"auto"},suggest:{},data:{useDefaultDataProvider:!0}};function o(e){return{completionItems:!0,hovers:!0,documentSymbols:!0,links:!0,documentHighlights:!0,rename:!0,colors:!0,foldingRanges:!0,selectionRanges:!0,diagnostics:e===i,documentFormattingEdits:e===i,documentRangeFormattingEdits:e===i}}var i="html",u="handlebars",l="razor";function s(t,i,u){var l=this;void 0===i&&(i=a),void 0===u&&(u=o(t));var s,c=new r(t,i,u),g=n.languages.onLanguage(t,(function(){return __awaiter(l,void 0,void 0,(function(){return __generator(this,(function(t){switch(t.label){case 0:return[4,new Promise((function(t,n){e(["./htmlMode"],t,n)}))];case 1:return s=t.sent().setupMode(c),[2]}}))}))}));return{defaults:c,dispose:function(){g.dispose(),null==s||s.dispose(),s=void 0}}}t.htmlLanguageService=s(i,a,o(i)),t.htmlDefaults=t.htmlLanguageService.defaults,t.handlebarLanguageService=s(u,a,o(u)),t.handlebarDefaults=t.handlebarLanguageService.defaults,t.razorLanguageService=s(l,a,o(l)),t.razorDefaults=t.razorLanguageService.defaults,n.languages.html={htmlDefaults:t.htmlDefaults,razorDefaults:t.razorDefaults,handlebarDefaults:t.handlebarDefaults,htmlLanguageService:t.htmlLanguageService,handlebarLanguageService:t.handlebarLanguageService,razorLanguageService:t.razorLanguageService,registerHTMLLanguageService:s},t.registerHTMLLanguageService=s}));
/*!-----------------------------------------------------------------------------
 * Copyright (c) Microsoft Corporation. All rights reserved.
 * monaco-languages version: 0.30.1(5a7ba61be909ae9e4889768a3453ebb0dec392e2)
 * Released under the MIT license
 * https://github.com/Microsoft/monaco-languages/blob/master/LICENSE.md
 *-----------------------------------------------------------------------------*/
define("vs/basic-languages/fillers/monaco-editor-core",['vs/editor/editor.api'],(function(){return self.monaco})),define("vs/basic-languages/_.contribution",["require","exports","./fillers/monaco-editor-core"],(function(e,i,t){"use strict";Object.defineProperty(i,"__esModule",{value:!0}),i.registerLanguage=i.loadLanguage=void 0;var n={},r={},s=function(){function e(e){var i=this;this._languageId=e,this._loadingTriggered=!1,this._lazyLoadPromise=new Promise((function(e,t){i._lazyLoadPromiseResolve=e,i._lazyLoadPromiseReject=t}))}return e.getOrCreate=function(i){return r[i]||(r[i]=new e(i)),r[i]},e.prototype.whenLoaded=function(){return this._lazyLoadPromise},e.prototype.load=function(){var e=this;return this._loadingTriggered||(this._loadingTriggered=!0,n[this._languageId].loader().then((function(i){return e._lazyLoadPromiseResolve(i)}),(function(i){return e._lazyLoadPromiseReject(i)}))),this._lazyLoadPromise},e}();i.loadLanguage=function(e){return s.getOrCreate(e).load()},i.registerLanguage=function(e){var i=e.id;n[i]=e,t.languages.register(e);var r=s.getOrCreate(i);t.languages.setMonarchTokensProvider(i,r.whenLoaded().then((function(e){return e.language}))),t.languages.onLanguage(i,(function(){r.load().then((function(e){t.languages.setLanguageConfiguration(i,e.conf)}))}))}})),define("vs/basic-languages/abap/abap.contribution",["require","exports","../_.contribution"],(function(e,i,t){"use strict";Object.defineProperty(i,"__esModule",{value:!0}),(0,t.registerLanguage)({id:"abap",extensions:[".abap"],aliases:["abap","ABAP"],loader:function(){return new Promise((function(i,t){e(["./abap"],i,t)}))}})})),define("vs/basic-languages/apex/apex.contribution",["require","exports","../_.contribution"],(function(e,i,t){"use strict";Object.defineProperty(i,"__esModule",{value:!0}),(0,t.registerLanguage)({id:"apex",extensions:[".cls"],aliases:["Apex","apex"],mimetypes:["text/x-apex-source","text/x-apex"],loader:function(){return new Promise((function(i,t){e(["./apex"],i,t)}))}})})),define("vs/basic-languages/azcli/azcli.contribution",["require","exports","../_.contribution"],(function(e,i,t){"use strict";Object.defineProperty(i,"__esModule",{value:!0}),(0,t.registerLanguage)({id:"azcli",extensions:[".azcli"],aliases:["Azure CLI","azcli"],loader:function(){return new Promise((function(i,t){e(["./azcli"],i,t)}))}})})),define("vs/basic-languages/bat/bat.contribution",["require","exports","../_.contribution"],(function(e,i,t){"use strict";Object.defineProperty(i,"__esModule",{value:!0}),(0,t.registerLanguage)({id:"bat",extensions:[".bat",".cmd"],aliases:["Batch","bat"],loader:function(){return new Promise((function(i,t){e(["./bat"],i,t)}))}})})),define("vs/basic-languages/bicep/bicep.contribution",["require","exports","../_.contribution"],(function(e,i,t){"use strict";Object.defineProperty(i,"__esModule",{value:!0}),(0,t.registerLanguage)({id:"bicep",extensions:[".bicep"],aliases:["Bicep"],loader:function(){return new Promise((function(i,t){e(["./bicep"],i,t)}))}})})),define("vs/basic-languages/cameligo/cameligo.contribution",["require","exports","../_.contribution"],(function(e,i,t){"use strict";Object.defineProperty(i,"__esModule",{value:!0}),(0,t.registerLanguage)({id:"cameligo",extensions:[".mligo"],aliases:["Cameligo"],loader:function(){return new Promise((function(i,t){e(["./cameligo"],i,t)}))}})})),define("vs/basic-languages/clojure/clojure.contribution",["require","exports","../_.contribution"],(function(e,i,t){"use strict";Object.defineProperty(i,"__esModule",{value:!0}),(0,t.registerLanguage)({id:"clojure",extensions:[".clj",".cljs",".cljc",".edn"],aliases:["clojure","Clojure"],loader:function(){return new Promise((function(i,t){e(["./clojure"],i,t)}))}})})),define("vs/basic-languages/coffee/coffee.contribution",["require","exports","../_.contribution"],(function(e,i,t){"use strict";Object.defineProperty(i,"__esModule",{value:!0}),(0,t.registerLanguage)({id:"coffeescript",extensions:[".coffee"],aliases:["CoffeeScript","coffeescript","coffee"],mimetypes:["text/x-coffeescript","text/coffeescript"],loader:function(){return new Promise((function(i,t){e(["./coffee"],i,t)}))}})})),define("vs/basic-languages/cpp/cpp.contribution",["require","exports","../_.contribution"],(function(e,i,t){"use strict";Object.defineProperty(i,"__esModule",{value:!0}),(0,t.registerLanguage)({id:"c",extensions:[".c",".h"],aliases:["C","c"],loader:function(){return new Promise((function(i,t){e(["./cpp"],i,t)}))}}),(0,t.registerLanguage)({id:"cpp",extensions:[".cpp",".cc",".cxx",".hpp",".hh",".hxx"],aliases:["C++","Cpp","cpp"],loader:function(){return new Promise((function(i,t){e(["./cpp"],i,t)}))}})})),define("vs/basic-languages/csharp/csharp.contribution",["require","exports","../_.contribution"],(function(e,i,t){"use strict";Object.defineProperty(i,"__esModule",{value:!0}),(0,t.registerLanguage)({id:"csharp",extensions:[".cs",".csx",".cake"],aliases:["C#","csharp"],loader:function(){return new Promise((function(i,t){e(["./csharp"],i,t)}))}})})),define("vs/basic-languages/csp/csp.contribution",["require","exports","../_.contribution"],(function(e,i,t){"use strict";Object.defineProperty(i,"__esModule",{value:!0}),(0,t.registerLanguage)({id:"csp",extensions:[],aliases:["CSP","csp"],loader:function(){return new Promise((function(i,t){e(["./csp"],i,t)}))}})})),define("vs/basic-languages/css/css.contribution",["require","exports","../_.contribution"],(function(e,i,t){"use strict";Object.defineProperty(i,"__esModule",{value:!0}),(0,t.registerLanguage)({id:"css",extensions:[".css"],aliases:["CSS","css"],mimetypes:["text/css"],loader:function(){return new Promise((function(i,t){e(["./css"],i,t)}))}})})),define("vs/basic-languages/dart/dart.contribution",["require","exports","../_.contribution"],(function(e,i,t){"use strict";Object.defineProperty(i,"__esModule",{value:!0}),(0,t.registerLanguage)({id:"dart",extensions:[".dart"],aliases:["Dart","dart"],mimetypes:["text/x-dart-source","text/x-dart"],loader:function(){return new Promise((function(i,t){e(["./dart"],i,t)}))}})})),define("vs/basic-languages/dockerfile/dockerfile.contribution",["require","exports","../_.contribution"],(function(e,i,t){"use strict";Object.defineProperty(i,"__esModule",{value:!0}),(0,t.registerLanguage)({id:"dockerfile",extensions:[".dockerfile"],filenames:["Dockerfile"],aliases:["Dockerfile"],loader:function(){return new Promise((function(i,t){e(["./dockerfile"],i,t)}))}})})),define("vs/basic-languages/ecl/ecl.contribution",["require","exports","../_.contribution"],(function(e,i,t){"use strict";Object.defineProperty(i,"__esModule",{value:!0}),(0,t.registerLanguage)({id:"ecl",extensions:[".ecl"],aliases:["ECL","Ecl","ecl"],loader:function(){return new Promise((function(i,t){e(["./ecl"],i,t)}))}})})),define("vs/basic-languages/elixir/elixir.contribution",["require","exports","../_.contribution"],(function(e,i,t){"use strict";Object.defineProperty(i,"__esModule",{value:!0}),(0,t.registerLanguage)({id:"elixir",extensions:[".ex",".exs"],aliases:["Elixir","elixir","ex"],loader:function(){return new Promise((function(i,t){e(["./elixir"],i,t)}))}})})),define("vs/basic-languages/flow9/flow9.contribution",["require","exports","../_.contribution"],(function(e,i,t){"use strict";Object.defineProperty(i,"__esModule",{value:!0}),(0,t.registerLanguage)({id:"flow9",extensions:[".flow"],aliases:["Flow9","Flow","flow9","flow"],loader:function(){return new Promise((function(i,t){e(["./flow9"],i,t)}))}})})),define("vs/basic-languages/fsharp/fsharp.contribution",["require","exports","../_.contribution"],(function(e,i,t){"use strict";Object.defineProperty(i,"__esModule",{value:!0}),(0,t.registerLanguage)({id:"fsharp",extensions:[".fs",".fsi",".ml",".mli",".fsx",".fsscript"],aliases:["F#","FSharp","fsharp"],loader:function(){return new Promise((function(i,t){e(["./fsharp"],i,t)}))}})})),define("vs/basic-languages/go/go.contribution",["require","exports","../_.contribution"],(function(e,i,t){"use strict";Object.defineProperty(i,"__esModule",{value:!0}),(0,t.registerLanguage)({id:"go",extensions:[".go"],aliases:["Go"],loader:function(){return new Promise((function(i,t){e(["./go"],i,t)}))}})})),define("vs/basic-languages/graphql/graphql.contribution",["require","exports","../_.contribution"],(function(e,i,t){"use strict";Object.defineProperty(i,"__esModule",{value:!0}),(0,t.registerLanguage)({id:"graphql",extensions:[".graphql",".gql"],aliases:["GraphQL","graphql","gql"],mimetypes:["application/graphql"],loader:function(){return new Promise((function(i,t){e(["./graphql"],i,t)}))}})})),define("vs/basic-languages/handlebars/handlebars.contribution",["require","exports","../_.contribution"],(function(e,i,t){"use strict";Object.defineProperty(i,"__esModule",{value:!0}),(0,t.registerLanguage)({id:"handlebars",extensions:[".handlebars",".hbs"],aliases:["Handlebars","handlebars","hbs"],mimetypes:["text/x-handlebars-template"],loader:function(){return new Promise((function(i,t){e(["./handlebars"],i,t)}))}})})),define("vs/basic-languages/hcl/hcl.contribution",["require","exports","../_.contribution"],(function(e,i,t){"use strict";Object.defineProperty(i,"__esModule",{value:!0}),(0,t.registerLanguage)({id:"hcl",extensions:[".tf",".tfvars",".hcl"],aliases:["Terraform","tf","HCL","hcl"],loader:function(){return new Promise((function(i,t){e(["./hcl"],i,t)}))}})})),define("vs/basic-languages/html/html.contribution",["require","exports","../_.contribution"],(function(e,i,t){"use strict";Object.defineProperty(i,"__esModule",{value:!0}),(0,t.registerLanguage)({id:"html",extensions:[".html",".htm",".shtml",".xhtml",".mdoc",".jsp",".asp",".aspx",".jshtm"],aliases:["HTML","htm","html","xhtml"],mimetypes:["text/html","text/x-jshtm","text/template","text/ng-template"],loader:function(){return new Promise((function(i,t){e(["./html"],i,t)}))}})})),define("vs/basic-languages/ini/ini.contribution",["require","exports","../_.contribution"],(function(e,i,t){"use strict";Object.defineProperty(i,"__esModule",{value:!0}),(0,t.registerLanguage)({id:"ini",extensions:[".ini",".properties",".gitconfig"],filenames:["config",".gitattributes",".gitconfig",".editorconfig"],aliases:["Ini","ini"],loader:function(){return new Promise((function(i,t){e(["./ini"],i,t)}))}})})),define("vs/basic-languages/java/java.contribution",["require","exports","../_.contribution"],(function(e,i,t){"use strict";Object.defineProperty(i,"__esModule",{value:!0}),(0,t.registerLanguage)({id:"java",extensions:[".java",".jav"],aliases:["Java","java"],mimetypes:["text/x-java-source","text/x-java"],loader:function(){return new Promise((function(i,t){e(["./java"],i,t)}))}})})),define("vs/basic-languages/javascript/javascript.contribution",["require","exports","../_.contribution"],(function(e,i,t){"use strict";Object.defineProperty(i,"__esModule",{value:!0}),(0,t.registerLanguage)({id:"javascript",extensions:[".js",".es6",".jsx",".mjs"],firstLine:"^#!.*\\bnode",filenames:["jakefile"],aliases:["JavaScript","javascript","js"],mimetypes:["text/javascript"],loader:function(){return new Promise((function(i,t){e(["./javascript"],i,t)}))}})})),define("vs/basic-languages/julia/julia.contribution",["require","exports","../_.contribution"],(function(e,i,t){"use strict";Object.defineProperty(i,"__esModule",{value:!0}),(0,t.registerLanguage)({id:"julia",extensions:[".jl"],aliases:["julia","Julia"],loader:function(){return new Promise((function(i,t){e(["./julia"],i,t)}))}})})),define("vs/basic-languages/kotlin/kotlin.contribution",["require","exports","../_.contribution"],(function(e,i,t){"use strict";Object.defineProperty(i,"__esModule",{value:!0}),(0,t.registerLanguage)({id:"kotlin",extensions:[".kt"],aliases:["Kotlin","kotlin"],mimetypes:["text/x-kotlin-source","text/x-kotlin"],loader:function(){return new Promise((function(i,t){e(["./kotlin"],i,t)}))}})})),define("vs/basic-languages/less/less.contribution",["require","exports","../_.contribution"],(function(e,i,t){"use strict";Object.defineProperty(i,"__esModule",{value:!0}),(0,t.registerLanguage)({id:"less",extensions:[".less"],aliases:["Less","less"],mimetypes:["text/x-less","text/less"],loader:function(){return new Promise((function(i,t){e(["./less"],i,t)}))}})})),define("vs/basic-languages/lexon/lexon.contribution",["require","exports","../_.contribution"],(function(e,i,t){"use strict";Object.defineProperty(i,"__esModule",{value:!0}),(0,t.registerLanguage)({id:"lexon",extensions:[".lex"],aliases:["Lexon"],loader:function(){return new Promise((function(i,t){e(["./lexon"],i,t)}))}})})),define("vs/basic-languages/lua/lua.contribution",["require","exports","../_.contribution"],(function(e,i,t){"use strict";Object.defineProperty(i,"__esModule",{value:!0}),(0,t.registerLanguage)({id:"lua",extensions:[".lua"],aliases:["Lua","lua"],loader:function(){return new Promise((function(i,t){e(["./lua"],i,t)}))}})})),define("vs/basic-languages/liquid/liquid.contribution",["require","exports","../_.contribution"],(function(e,i,t){"use strict";Object.defineProperty(i,"__esModule",{value:!0}),(0,t.registerLanguage)({id:"liquid",extensions:[".liquid",".html.liquid"],aliases:["Liquid","liquid"],mimetypes:["application/liquid"],loader:function(){return new Promise((function(i,t){e(["./liquid"],i,t)}))}})})),define("vs/basic-languages/m3/m3.contribution",["require","exports","../_.contribution"],(function(e,i,t){"use strict";Object.defineProperty(i,"__esModule",{value:!0}),(0,t.registerLanguage)({id:"m3",extensions:[".m3",".i3",".mg",".ig"],aliases:["Modula-3","Modula3","modula3","m3"],loader:function(){return new Promise((function(i,t){e(["./m3"],i,t)}))}})})),define("vs/basic-languages/markdown/markdown.contribution",["require","exports","../_.contribution"],(function(e,i,t){"use strict";Object.defineProperty(i,"__esModule",{value:!0}),(0,t.registerLanguage)({id:"markdown",extensions:[".md",".markdown",".mdown",".mkdn",".mkd",".mdwn",".mdtxt",".mdtext"],aliases:["Markdown","markdown"],loader:function(){return new Promise((function(i,t){e(["./markdown"],i,t)}))}})})),define("vs/basic-languages/mips/mips.contribution",["require","exports","../_.contribution"],(function(e,i,t){"use strict";Object.defineProperty(i,"__esModule",{value:!0}),(0,t.registerLanguage)({id:"mips",extensions:[".s"],aliases:["MIPS","MIPS-V"],mimetypes:["text/x-mips","text/mips","text/plaintext"],loader:function(){return new Promise((function(i,t){e(["./mips"],i,t)}))}})})),define("vs/basic-languages/msdax/msdax.contribution",["require","exports","../_.contribution"],(function(e,i,t){"use strict";Object.defineProperty(i,"__esModule",{value:!0}),(0,t.registerLanguage)({id:"msdax",extensions:[".dax",".msdax"],aliases:["DAX","MSDAX"],loader:function(){return new Promise((function(i,t){e(["./msdax"],i,t)}))}})})),define("vs/basic-languages/mysql/mysql.contribution",["require","exports","../_.contribution"],(function(e,i,t){"use strict";Object.defineProperty(i,"__esModule",{value:!0}),(0,t.registerLanguage)({id:"mysql",extensions:[],aliases:["MySQL","mysql"],loader:function(){return new Promise((function(i,t){e(["./mysql"],i,t)}))}})})),define("vs/basic-languages/objective-c/objective-c.contribution",["require","exports","../_.contribution"],(function(e,i,t){"use strict";Object.defineProperty(i,"__esModule",{value:!0}),(0,t.registerLanguage)({id:"objective-c",extensions:[".m"],aliases:["Objective-C"],loader:function(){return new Promise((function(i,t){e(["./objective-c"],i,t)}))}})})),define("vs/basic-languages/pascal/pascal.contribution",["require","exports","../_.contribution"],(function(e,i,t){"use strict";Object.defineProperty(i,"__esModule",{value:!0}),(0,t.registerLanguage)({id:"pascal",extensions:[".pas",".p",".pp"],aliases:["Pascal","pas"],mimetypes:["text/x-pascal-source","text/x-pascal"],loader:function(){return new Promise((function(i,t){e(["./pascal"],i,t)}))}})})),define("vs/basic-languages/pascaligo/pascaligo.contribution",["require","exports","../_.contribution"],(function(e,i,t){"use strict";Object.defineProperty(i,"__esModule",{value:!0}),(0,t.registerLanguage)({id:"pascaligo",extensions:[".ligo"],aliases:["Pascaligo","ligo"],loader:function(){return new Promise((function(i,t){e(["./pascaligo"],i,t)}))}})})),define("vs/basic-languages/perl/perl.contribution",["require","exports","../_.contribution"],(function(e,i,t){"use strict";Object.defineProperty(i,"__esModule",{value:!0}),(0,t.registerLanguage)({id:"perl",extensions:[".pl"],aliases:["Perl","pl"],loader:function(){return new Promise((function(i,t){e(["./perl"],i,t)}))}})})),define("vs/basic-languages/pgsql/pgsql.contribution",["require","exports","../_.contribution"],(function(e,i,t){"use strict";Object.defineProperty(i,"__esModule",{value:!0}),(0,t.registerLanguage)({id:"pgsql",extensions:[],aliases:["PostgreSQL","postgres","pg","postgre"],loader:function(){return new Promise((function(i,t){e(["./pgsql"],i,t)}))}})})),define("vs/basic-languages/php/php.contribution",["require","exports","../_.contribution"],(function(e,i,t){"use strict";Object.defineProperty(i,"__esModule",{value:!0}),(0,t.registerLanguage)({id:"php",extensions:[".php",".php4",".php5",".phtml",".ctp"],aliases:["PHP","php"],mimetypes:["application/x-php"],loader:function(){return new Promise((function(i,t){e(["./php"],i,t)}))}})})),define("vs/basic-languages/pla/pla.contribution",["require","exports","../_.contribution"],(function(e,i,t){"use strict";Object.defineProperty(i,"__esModule",{value:!0}),(0,t.registerLanguage)({id:"pla",extensions:[".pla"],loader:function(){return new Promise((function(i,t){e(["./pla"],i,t)}))}})})),define("vs/basic-languages/postiats/postiats.contribution",["require","exports","../_.contribution"],(function(e,i,t){"use strict";Object.defineProperty(i,"__esModule",{value:!0}),(0,t.registerLanguage)({id:"postiats",extensions:[".dats",".sats",".hats"],aliases:["ATS","ATS/Postiats"],loader:function(){return new Promise((function(i,t){e(["./postiats"],i,t)}))}})})),define("vs/basic-languages/powerquery/powerquery.contribution",["require","exports","../_.contribution"],(function(e,i,t){"use strict";Object.defineProperty(i,"__esModule",{value:!0}),(0,t.registerLanguage)({id:"powerquery",extensions:[".pq",".pqm"],aliases:["PQ","M","Power Query","Power Query M"],loader:function(){return new Promise((function(i,t){e(["./powerquery"],i,t)}))}})})),define("vs/basic-languages/powershell/powershell.contribution",["require","exports","../_.contribution"],(function(e,i,t){"use strict";Object.defineProperty(i,"__esModule",{value:!0}),(0,t.registerLanguage)({id:"powershell",extensions:[".ps1",".psm1",".psd1"],aliases:["PowerShell","powershell","ps","ps1"],loader:function(){return new Promise((function(i,t){e(["./powershell"],i,t)}))}})})),define("vs/basic-languages/protobuf/protobuf.contribution",["require","exports","../_.contribution"],(function(e,i,t){"use strict";Object.defineProperty(i,"__esModule",{value:!0}),(0,t.registerLanguage)({id:"proto",extensions:[".proto"],aliases:["protobuf","Protocol Buffers"],loader:function(){return new Promise((function(i,t){e(["./protobuf"],i,t)}))}})})),define("vs/basic-languages/pug/pug.contribution",["require","exports","../_.contribution"],(function(e,i,t){"use strict";Object.defineProperty(i,"__esModule",{value:!0}),(0,t.registerLanguage)({id:"pug",extensions:[".jade",".pug"],aliases:["Pug","Jade","jade"],loader:function(){return new Promise((function(i,t){e(["./pug"],i,t)}))}})})),define("vs/basic-languages/python/python.contribution",["require","exports","../_.contribution"],(function(e,i,t){"use strict";Object.defineProperty(i,"__esModule",{value:!0}),(0,t.registerLanguage)({id:"python",extensions:[".py",".rpy",".pyw",".cpy",".gyp",".gypi"],aliases:["Python","py"],firstLine:"^#!/.*\\bpython[0-9.-]*\\b",loader:function(){return new Promise((function(i,t){e(["./python"],i,t)}))}})})),define("vs/basic-languages/qsharp/qsharp.contribution",["require","exports","../_.contribution"],(function(e,i,t){"use strict";Object.defineProperty(i,"__esModule",{value:!0}),(0,t.registerLanguage)({id:"qsharp",extensions:[".qs"],aliases:["Q#","qsharp"],loader:function(){return new Promise((function(i,t){e(["./qsharp"],i,t)}))}})})),define("vs/basic-languages/r/r.contribution",["require","exports","../_.contribution"],(function(e,i,t){"use strict";Object.defineProperty(i,"__esModule",{value:!0}),(0,t.registerLanguage)({id:"r",extensions:[".r",".rhistory",".rmd",".rprofile",".rt"],aliases:["R","r"],loader:function(){return new Promise((function(i,t){e(["./r"],i,t)}))}})})),define("vs/basic-languages/razor/razor.contribution",["require","exports","../_.contribution"],(function(e,i,t){"use strict";Object.defineProperty(i,"__esModule",{value:!0}),(0,t.registerLanguage)({id:"razor",extensions:[".cshtml"],aliases:["Razor","razor"],mimetypes:["text/x-cshtml"],loader:function(){return new Promise((function(i,t){e(["./razor"],i,t)}))}})})),define("vs/basic-languages/redis/redis.contribution",["require","exports","../_.contribution"],(function(e,i,t){"use strict";Object.defineProperty(i,"__esModule",{value:!0}),(0,t.registerLanguage)({id:"redis",extensions:[".redis"],aliases:["redis"],loader:function(){return new Promise((function(i,t){e(["./redis"],i,t)}))}})})),define("vs/basic-languages/redshift/redshift.contribution",["require","exports","../_.contribution"],(function(e,i,t){"use strict";Object.defineProperty(i,"__esModule",{value:!0}),(0,t.registerLanguage)({id:"redshift",extensions:[],aliases:["Redshift","redshift"],loader:function(){return new Promise((function(i,t){e(["./redshift"],i,t)}))}})})),define("vs/basic-languages/restructuredtext/restructuredtext.contribution",["require","exports","../_.contribution"],(function(e,i,t){"use strict";Object.defineProperty(i,"__esModule",{value:!0}),(0,t.registerLanguage)({id:"restructuredtext",extensions:[".rst"],aliases:["reStructuredText","restructuredtext"],loader:function(){return new Promise((function(i,t){e(["./restructuredtext"],i,t)}))}})})),define("vs/basic-languages/ruby/ruby.contribution",["require","exports","../_.contribution"],(function(e,i,t){"use strict";Object.defineProperty(i,"__esModule",{value:!0}),(0,t.registerLanguage)({id:"ruby",extensions:[".rb",".rbx",".rjs",".gemspec",".pp"],filenames:["rakefile","Gemfile"],aliases:["Ruby","rb"],loader:function(){return new Promise((function(i,t){e(["./ruby"],i,t)}))}})})),define("vs/basic-languages/rust/rust.contribution",["require","exports","../_.contribution"],(function(e,i,t){"use strict";Object.defineProperty(i,"__esModule",{value:!0}),(0,t.registerLanguage)({id:"rust",extensions:[".rs",".rlib"],aliases:["Rust","rust"],loader:function(){return new Promise((function(i,t){e(["./rust"],i,t)}))}})})),define("vs/basic-languages/sb/sb.contribution",["require","exports","../_.contribution"],(function(e,i,t){"use strict";Object.defineProperty(i,"__esModule",{value:!0}),(0,t.registerLanguage)({id:"sb",extensions:[".sb"],aliases:["Small Basic","sb"],loader:function(){return new Promise((function(i,t){e(["./sb"],i,t)}))}})})),define("vs/basic-languages/scala/scala.contribution",["require","exports","../_.contribution"],(function(e,i,t){"use strict";Object.defineProperty(i,"__esModule",{value:!0}),(0,t.registerLanguage)({id:"scala",extensions:[".scala",".sc",".sbt"],aliases:["Scala","scala","SBT","Sbt","sbt","Dotty","dotty"],mimetypes:["text/x-scala-source","text/x-scala","text/x-sbt","text/x-dotty"],loader:function(){return new Promise((function(i,t){e(["./scala"],i,t)}))}})})),define("vs/basic-languages/scheme/scheme.contribution",["require","exports","../_.contribution"],(function(e,i,t){"use strict";Object.defineProperty(i,"__esModule",{value:!0}),(0,t.registerLanguage)({id:"scheme",extensions:[".scm",".ss",".sch",".rkt"],aliases:["scheme","Scheme"],loader:function(){return new Promise((function(i,t){e(["./scheme"],i,t)}))}})})),define("vs/basic-languages/scss/scss.contribution",["require","exports","../_.contribution"],(function(e,i,t){"use strict";Object.defineProperty(i,"__esModule",{value:!0}),(0,t.registerLanguage)({id:"scss",extensions:[".scss"],aliases:["Sass","sass","scss"],mimetypes:["text/x-scss","text/scss"],loader:function(){return new Promise((function(i,t){e(["./scss"],i,t)}))}})})),define("vs/basic-languages/shell/shell.contribution",["require","exports","../_.contribution"],(function(e,i,t){"use strict";Object.defineProperty(i,"__esModule",{value:!0}),(0,t.registerLanguage)({id:"shell",extensions:[".sh",".bash"],aliases:["Shell","sh"],loader:function(){return new Promise((function(i,t){e(["./shell"],i,t)}))}})})),define("vs/basic-languages/solidity/solidity.contribution",["require","exports","../_.contribution"],(function(e,i,t){"use strict";Object.defineProperty(i,"__esModule",{value:!0}),(0,t.registerLanguage)({id:"sol",extensions:[".sol"],aliases:["sol","solidity","Solidity"],loader:function(){return new Promise((function(i,t){e(["./solidity"],i,t)}))}})})),define("vs/basic-languages/sophia/sophia.contribution",["require","exports","../_.contribution"],(function(e,i,t){"use strict";Object.defineProperty(i,"__esModule",{value:!0}),(0,t.registerLanguage)({id:"aes",extensions:[".aes"],aliases:["aes","sophia","Sophia"],loader:function(){return new Promise((function(i,t){e(["./sophia"],i,t)}))}})})),define("vs/basic-languages/sparql/sparql.contribution",["require","exports","../_.contribution"],(function(e,i,t){"use strict";Object.defineProperty(i,"__esModule",{value:!0}),(0,t.registerLanguage)({id:"sparql",extensions:[".rq"],aliases:["sparql","SPARQL"],loader:function(){return new Promise((function(i,t){e(["./sparql"],i,t)}))}})})),define("vs/basic-languages/sql/sql.contribution",["require","exports","../_.contribution"],(function(e,i,t){"use strict";Object.defineProperty(i,"__esModule",{value:!0}),(0,t.registerLanguage)({id:"sql",extensions:[".sql"],aliases:["SQL"],loader:function(){return new Promise((function(i,t){e(["./sql"],i,t)}))}})})),define("vs/basic-languages/st/st.contribution",["require","exports","../_.contribution"],(function(e,i,t){"use strict";Object.defineProperty(i,"__esModule",{value:!0}),(0,t.registerLanguage)({id:"st",extensions:[".st",".iecst",".iecplc",".lc3lib"],aliases:["StructuredText","scl","stl"],loader:function(){return new Promise((function(i,t){e(["./st"],i,t)}))}})})),define("vs/basic-languages/swift/swift.contribution",["require","exports","../_.contribution"],(function(e,i,t){"use strict";Object.defineProperty(i,"__esModule",{value:!0}),(0,t.registerLanguage)({id:"swift",aliases:["Swift","swift"],extensions:[".swift"],mimetypes:["text/swift"],loader:function(){return new Promise((function(i,t){e(["./swift"],i,t)}))}})})),define("vs/basic-languages/systemverilog/systemverilog.contribution",["require","exports","../_.contribution"],(function(e,i,t){"use strict";Object.defineProperty(i,"__esModule",{value:!0}),(0,t.registerLanguage)({id:"systemverilog",extensions:[".sv",".svh"],aliases:["SV","sv","SystemVerilog","systemverilog"],loader:function(){return new Promise((function(i,t){e(["./systemverilog"],i,t)}))}}),(0,t.registerLanguage)({id:"verilog",extensions:[".v",".vh"],aliases:["V","v","Verilog","verilog"],loader:function(){return new Promise((function(i,t){e(["./systemverilog"],i,t)}))}})})),define("vs/basic-languages/tcl/tcl.contribution",["require","exports","../_.contribution"],(function(e,i,t){"use strict";Object.defineProperty(i,"__esModule",{value:!0}),(0,t.registerLanguage)({id:"tcl",extensions:[".tcl"],aliases:["tcl","Tcl","tcltk","TclTk","tcl/tk","Tcl/Tk"],loader:function(){return new Promise((function(i,t){e(["./tcl"],i,t)}))}})})),define("vs/basic-languages/twig/twig.contribution",["require","exports","../_.contribution"],(function(e,i,t){"use strict";Object.defineProperty(i,"__esModule",{value:!0}),(0,t.registerLanguage)({id:"twig",extensions:[".twig"],aliases:["Twig","twig"],mimetypes:["text/x-twig"],loader:function(){return new Promise((function(i,t){e(["./twig"],i,t)}))}})})),define("vs/basic-languages/typescript/typescript.contribution",["require","exports","../_.contribution"],(function(e,i,t){"use strict";Object.defineProperty(i,"__esModule",{value:!0}),(0,t.registerLanguage)({id:"typescript",extensions:[".ts",".tsx"],aliases:["TypeScript","ts","typescript"],mimetypes:["text/typescript"],loader:function(){return new Promise((function(i,t){e(["./typescript"],i,t)}))}})})),define("vs/basic-languages/vb/vb.contribution",["require","exports","../_.contribution"],(function(e,i,t){"use strict";Object.defineProperty(i,"__esModule",{value:!0}),(0,t.registerLanguage)({id:"vb",extensions:[".vb"],aliases:["Visual Basic","vb"],loader:function(){return new Promise((function(i,t){e(["./vb"],i,t)}))}})})),define("vs/basic-languages/xml/xml.contribution",["require","exports","../_.contribution"],(function(e,i,t){"use strict";Object.defineProperty(i,"__esModule",{value:!0}),(0,t.registerLanguage)({id:"xml",extensions:[".xml",".dtd",".ascx",".csproj",".config",".wxi",".wxl",".wxs",".xaml",".svg",".svgz",".opf",".xsl"],firstLine:"(\\<\\?xml.*)|(\\<svg)|(\\<\\!doctype\\s+svg)",aliases:["XML","xml"],mimetypes:["text/xml","application/xml","application/xaml+xml","application/xml-dtd"],loader:function(){return new Promise((function(i,t){e(["./xml"],i,t)}))}})})),define("vs/basic-languages/yaml/yaml.contribution",["require","exports","../_.contribution"],(function(e,i,t){"use strict";Object.defineProperty(i,"__esModule",{value:!0}),(0,t.registerLanguage)({id:"yaml",extensions:[".yaml",".yml"],aliases:["YAML","yaml","YML","yml"],mimetypes:["application/x-yaml","text/x-yaml"],loader:function(){return new Promise((function(i,t){e(["./yaml"],i,t)}))}})})),define("vs/basic-languages/monaco.contribution",["require","exports","./abap/abap.contribution","./apex/apex.contribution","./azcli/azcli.contribution","./bat/bat.contribution","./bicep/bicep.contribution","./cameligo/cameligo.contribution","./clojure/clojure.contribution","./coffee/coffee.contribution","./cpp/cpp.contribution","./csharp/csharp.contribution","./csp/csp.contribution","./css/css.contribution","./dart/dart.contribution","./dockerfile/dockerfile.contribution","./ecl/ecl.contribution","./elixir/elixir.contribution","./flow9/flow9.contribution","./fsharp/fsharp.contribution","./go/go.contribution","./graphql/graphql.contribution","./handlebars/handlebars.contribution","./hcl/hcl.contribution","./html/html.contribution","./ini/ini.contribution","./java/java.contribution","./javascript/javascript.contribution","./julia/julia.contribution","./kotlin/kotlin.contribution","./less/less.contribution","./lexon/lexon.contribution","./lua/lua.contribution","./liquid/liquid.contribution","./m3/m3.contribution","./markdown/markdown.contribution","./mips/mips.contribution","./msdax/msdax.contribution","./mysql/mysql.contribution","./objective-c/objective-c.contribution","./pascal/pascal.contribution","./pascaligo/pascaligo.contribution","./perl/perl.contribution","./pgsql/pgsql.contribution","./php/php.contribution","./pla/pla.contribution","./postiats/postiats.contribution","./powerquery/powerquery.contribution","./powershell/powershell.contribution","./protobuf/protobuf.contribution","./pug/pug.contribution","./python/python.contribution","./qsharp/qsharp.contribution","./r/r.contribution","./razor/razor.contribution","./redis/redis.contribution","./redshift/redshift.contribution","./restructuredtext/restructuredtext.contribution","./ruby/ruby.contribution","./rust/rust.contribution","./sb/sb.contribution","./scala/scala.contribution","./scheme/scheme.contribution","./scss/scss.contribution","./shell/shell.contribution","./solidity/solidity.contribution","./sophia/sophia.contribution","./sparql/sparql.contribution","./sql/sql.contribution","./st/st.contribution","./swift/swift.contribution","./systemverilog/systemverilog.contribution","./tcl/tcl.contribution","./twig/twig.contribution","./typescript/typescript.contribution","./vb/vb.contribution","./xml/xml.contribution","./yaml/yaml.contribution"],(function(e,i){"use strict";Object.defineProperty(i,"__esModule",{value:!0})}));
define("vs/editor/editor.main", ["vs/editor/edcore.main","vs/language/typescript/monaco.contribution","vs/language/css/monaco.contribution","vs/language/json/monaco.contribution","vs/language/html/monaco.contribution","vs/basic-languages/monaco.contribution"], function(api) { return api; });
//# sourceMappingURL=./thirds/monaco-editor/min-maps/vs/editor/editor.main.js.map