monaco-editor11 1.1.1 → 1.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (1068) hide show
  1. package/dist/index.d.ts +0 -7
  2. package/dist/monaco-editor11.es.js +0 -49
  3. package/dist/monaco-editor11.umd.js +1 -1
  4. package/dist/workers/_.contribution.js +120 -0
  5. package/dist/workers/abap.contribution.js +8 -0
  6. package/dist/workers/abap.js +1397 -0
  7. package/dist/workers/abstractCodeEditorService.js +129 -0
  8. package/dist/workers/abstractKeybindingService.js +286 -0
  9. package/dist/workers/abstractScrollbar.js +214 -0
  10. package/dist/workers/abstractSyntaxTokenBackend.js +128 -0
  11. package/dist/workers/abstractText.js +89 -0
  12. package/dist/workers/abstractTree.js +2027 -0
  13. package/dist/workers/accessibility.js +11 -0
  14. package/dist/workers/accessibilityService.js +111 -0
  15. package/dist/workers/accessibilitySignalService.js +331 -0
  16. package/dist/workers/accessibleDiffViewer.js +588 -0
  17. package/dist/workers/accessibleViewRegistry.js +25 -0
  18. package/dist/workers/action.js +15 -0
  19. package/dist/workers/actionCommonCategories.js +16 -0
  20. package/dist/workers/actionList.js +344 -0
  21. package/dist/workers/actionViewItemService.js +29 -0
  22. package/dist/workers/actionViewItems.js +376 -0
  23. package/dist/workers/actionWidget.js +236 -0
  24. package/dist/workers/actionbar.js +462 -0
  25. package/dist/workers/actions.js +483 -0
  26. package/dist/workers/anchorSelect.js +160 -0
  27. package/dist/workers/animation.js +74 -0
  28. package/dist/workers/apex.contribution.js +9 -0
  29. package/dist/workers/apex.js +329 -0
  30. package/dist/workers/aria.js +84 -0
  31. package/dist/workers/arrays.js +529 -0
  32. package/dist/workers/arraysFind.js +177 -0
  33. package/dist/workers/assert.js +79 -0
  34. package/dist/workers/ast.js +485 -0
  35. package/dist/workers/async.js +938 -0
  36. package/dist/workers/asyncDataTree.js +946 -0
  37. package/dist/workers/autoIndent.js +390 -0
  38. package/dist/workers/autorun.js +89 -0
  39. package/dist/workers/autorunImpl.js +215 -0
  40. package/dist/workers/azcli.contribution.js +8 -0
  41. package/dist/workers/azcli.js +67 -0
  42. package/dist/workers/bannerController.js +118 -0
  43. package/dist/workers/base.js +19 -0
  44. package/dist/workers/baseColors.js +31 -0
  45. package/dist/workers/baseObservable.js +106 -0
  46. package/dist/workers/baseRenderStrategy.js +19 -0
  47. package/dist/workers/baseResolvedKeybinding.js +56 -0
  48. package/dist/workers/bat.contribution.js +8 -0
  49. package/dist/workers/bat.js +99 -0
  50. package/dist/workers/beforeEditPositionMapper.js +110 -0
  51. package/dist/workers/bicep.contribution.js +8 -0
  52. package/dist/workers/bicep.js +108 -0
  53. package/dist/workers/blockCommentCommand.js +149 -0
  54. package/dist/workers/blockDecorations.js +97 -0
  55. package/dist/workers/bracketMatching.js +359 -0
  56. package/dist/workers/bracketPairsImpl.js +717 -0
  57. package/dist/workers/bracketPairsTree.js +343 -0
  58. package/dist/workers/bracketSelections.js +149 -0
  59. package/dist/workers/brackets.js +108 -0
  60. package/dist/workers/browser.js +57 -0
  61. package/dist/workers/buffer.js +81 -0
  62. package/dist/workers/bufferDirtyTracker.js +45 -0
  63. package/dist/workers/bulkEditService.js +76 -0
  64. package/dist/workers/button.js +226 -0
  65. package/dist/workers/cache.js +61 -0
  66. package/dist/workers/cameligo.contribution.js +8 -0
  67. package/dist/workers/cameligo.js +173 -0
  68. package/dist/workers/canIUse.js +23 -0
  69. package/dist/workers/cancellation.js +116 -0
  70. package/dist/workers/caretOperations.js +48 -0
  71. package/dist/workers/changeRecorder.js +78 -0
  72. package/dist/workers/changeTracker.js +80 -0
  73. package/dist/workers/charWidthReader.js +104 -0
  74. package/dist/workers/characterClassifier.js +59 -0
  75. package/dist/workers/characterPair.js +40 -0
  76. package/dist/workers/chartsColors.js +18 -0
  77. package/dist/workers/clickLinkGesture.js +161 -0
  78. package/dist/workers/clipboard.js +308 -0
  79. package/dist/workers/clipboardService.js +9 -0
  80. package/dist/workers/clipboardUtils.js +85 -0
  81. package/dist/workers/clojure.contribution.js +8 -0
  82. package/dist/workers/clojure.js +760 -0
  83. package/dist/workers/codeAction.js +306 -0
  84. package/dist/workers/codeActionCommands.js +230 -0
  85. package/dist/workers/codeActionContributions.js +55 -0
  86. package/dist/workers/codeActionController.js +372 -0
  87. package/dist/workers/codeActionKeybindingResolver.js +90 -0
  88. package/dist/workers/codeActionMenu.js +68 -0
  89. package/dist/workers/codeActionModel.js +334 -0
  90. package/dist/workers/codeEditorContributions.js +132 -0
  91. package/dist/workers/codeEditorService.js +9 -0
  92. package/dist/workers/codeEditorWidget.js +1856 -0
  93. package/dist/workers/codeLensCache.js +112 -0
  94. package/dist/workers/codelens.js +114 -0
  95. package/dist/workers/codelensController.js +469 -0
  96. package/dist/workers/codelensWidget.js +265 -0
  97. package/dist/workers/codicons.js +50 -0
  98. package/dist/workers/codiconsLibrary.js +642 -0
  99. package/dist/workers/codiconsUtil.js +22 -0
  100. package/dist/workers/coffee.contribution.js +9 -0
  101. package/dist/workers/coffee.js +231 -0
  102. package/dist/workers/collections.js +98 -0
  103. package/dist/workers/color.js +94 -0
  104. package/dist/workers/colorDetector.js +245 -0
  105. package/dist/workers/colorPickerBody.js +71 -0
  106. package/dist/workers/colorPickerCloseButton.js +34 -0
  107. package/dist/workers/colorPickerContribution.js +50 -0
  108. package/dist/workers/colorPickerHeader.js +79 -0
  109. package/dist/workers/colorPickerInsertButton.js +27 -0
  110. package/dist/workers/colorPickerModel.js +74 -0
  111. package/dist/workers/colorPickerParticipantUtils.js +52 -0
  112. package/dist/workers/colorPickerSaturationBox.js +106 -0
  113. package/dist/workers/colorPickerStrip.js +98 -0
  114. package/dist/workers/colorPickerWidget.js +32 -0
  115. package/dist/workers/colorUtils.js +199 -0
  116. package/dist/workers/colorizedBracketPairsDecorationProvider.js +97 -0
  117. package/dist/workers/colorizer.js +120 -0
  118. package/dist/workers/colors.js +20 -0
  119. package/dist/workers/columnRange.js +35 -0
  120. package/dist/workers/combineTextEditInfos.js +124 -0
  121. package/dist/workers/commandIds.js +12 -0
  122. package/dist/workers/commands.js +329 -0
  123. package/dist/workers/commandsQuickAccess.js +40 -0
  124. package/dist/workers/comment.js +147 -0
  125. package/dist/workers/common.js +20 -0
  126. package/dist/workers/comparers.js +87 -0
  127. package/dist/workers/completionModel.js +227 -0
  128. package/dist/workers/compressedObjectTreeModel.js +385 -0
  129. package/dist/workers/computeGhostText.js +182 -0
  130. package/dist/workers/computeMovedLines.js +249 -0
  131. package/dist/workers/concat23Trees.js +192 -0
  132. package/dist/workers/configuration.js +92 -0
  133. package/dist/workers/configurationModels.js +614 -0
  134. package/dist/workers/configurationRegistry.js +400 -0
  135. package/dist/workers/configurations.js +46 -0
  136. package/dist/workers/consoleObservableLogger.js +83 -0
  137. package/dist/workers/constObservable.js +35 -0
  138. package/dist/workers/contentHoverComputer.js +71 -0
  139. package/dist/workers/contentHoverController.js +320 -0
  140. package/dist/workers/contentHoverRendered.js +336 -0
  141. package/dist/workers/contentHoverStatusBar.js +52 -0
  142. package/dist/workers/contentHoverTypes.js +29 -0
  143. package/dist/workers/contentHoverWidget.js +394 -0
  144. package/dist/workers/contentHoverWidgetWrapper.js +362 -0
  145. package/dist/workers/contentSegmenter.js +52 -0
  146. package/dist/workers/contentWidgets.js +495 -0
  147. package/dist/workers/contextKeyService.js +468 -0
  148. package/dist/workers/contextMenuHandler.js +126 -0
  149. package/dist/workers/contextMenuService.js +103 -0
  150. package/dist/workers/contextScopedHistoryWidget.js +106 -0
  151. package/dist/workers/contextViewService.js +73 -0
  152. package/dist/workers/contextkey.js +1551 -0
  153. package/dist/workers/contextkeys.js +21 -0
  154. package/dist/workers/contextmenu.js +334 -0
  155. package/dist/workers/contextview.js +298 -0
  156. package/dist/workers/contiguousMultilineTokens.js +32 -0
  157. package/dist/workers/contiguousMultilineTokensBuilder.js +23 -0
  158. package/dist/workers/contiguousTokensEditing.js +128 -0
  159. package/dist/workers/contiguousTokensStore.js +207 -0
  160. package/dist/workers/contribution.js +36 -0
  161. package/dist/workers/coordinatesConverter.js +51 -0
  162. package/dist/workers/copyLinesCommand.js +73 -0
  163. package/dist/workers/copyPasteContribution.js +114 -0
  164. package/dist/workers/copyPasteController.js +585 -0
  165. package/dist/workers/copySelection.js +47 -0
  166. package/dist/workers/coreCommands.js +1731 -0
  167. package/dist/workers/countBadge.js +52 -0
  168. package/dist/workers/cpp.contribution.js +14 -0
  169. package/dist/workers/cpp.js +388 -0
  170. package/dist/workers/csharp.contribution.js +8 -0
  171. package/dist/workers/csharp.js +325 -0
  172. package/dist/workers/csp.contribution.js +8 -0
  173. package/dist/workers/csp.js +52 -0
  174. package/dist/workers/css.contribution.js +9 -0
  175. package/dist/workers/css.js +184 -0
  176. package/dist/workers/cssMode.js +198 -0
  177. package/dist/workers/cssValue.js +69 -0
  178. package/dist/workers/cssWorker.js +183 -0
  179. package/dist/workers/currentLineHighlight.js +205 -0
  180. package/dist/workers/cursor.js +899 -0
  181. package/dist/workers/cursorAtomicMoveOperations.js +145 -0
  182. package/dist/workers/cursorCollection.js +194 -0
  183. package/dist/workers/cursorColumnSelection.js +93 -0
  184. package/dist/workers/cursorColumns.js +112 -0
  185. package/dist/workers/cursorCommon.js +250 -0
  186. package/dist/workers/cursorContext.js +15 -0
  187. package/dist/workers/cursorDeleteOperations.js +231 -0
  188. package/dist/workers/cursorMoveCommands.js +676 -0
  189. package/dist/workers/cursorMoveOperations.js +290 -0
  190. package/dist/workers/cursorTypeEditOperations.js +968 -0
  191. package/dist/workers/cursorTypeOperations.js +173 -0
  192. package/dist/workers/cursorUndo.js +133 -0
  193. package/dist/workers/cursorUtils.js +75 -0
  194. package/dist/workers/cursorWordOperations.js +720 -0
  195. package/dist/workers/cypher.contribution.js +8 -0
  196. package/dist/workers/cypher.js +262 -0
  197. package/dist/workers/dart.contribution.js +9 -0
  198. package/dist/workers/dart.js +280 -0
  199. package/dist/workers/dataChannel.js +12 -0
  200. package/dist/workers/dataTransfer.js +80 -0
  201. package/dist/workers/dataTree.js +20 -0
  202. package/dist/workers/date.js +57 -0
  203. package/dist/workers/debugLocation.js +66 -0
  204. package/dist/workers/debugName.js +110 -0
  205. package/dist/workers/debuggerRpc.js +67 -0
  206. package/dist/workers/decorationCssRuleExtractor.js +73 -0
  207. package/dist/workers/decorationStyleCache.js +40 -0
  208. package/dist/workers/decorations.js +196 -0
  209. package/dist/workers/decorationsOverviewRuler.js +416 -0
  210. package/dist/workers/decorators.js +33 -0
  211. package/dist/workers/defaultDocumentColorProvider.js +55 -0
  212. package/dist/workers/defaultDocumentColorsComputer.js +138 -0
  213. package/dist/workers/defaultLinesDiffComputer.js +188 -0
  214. package/dist/workers/defaultProviders.js +230 -0
  215. package/dist/workers/defaultStyles.js +194 -0
  216. package/dist/workers/delegatingEditorImpl.js +111 -0
  217. package/dist/workers/derived.js +80 -0
  218. package/dist/workers/derivedImpl.js +353 -0
  219. package/dist/workers/descriptors.js +13 -0
  220. package/dist/workers/devToolsLogger.js +442 -0
  221. package/dist/workers/dialogs.js +5 -0
  222. package/dist/workers/diff.js +902 -0
  223. package/dist/workers/diffAlgorithm.js +139 -0
  224. package/dist/workers/diffChange.js +34 -0
  225. package/dist/workers/diffEditor.contribution.js +83 -0
  226. package/dist/workers/diffEditor.js +38 -0
  227. package/dist/workers/diffEditorDecorations.js +115 -0
  228. package/dist/workers/diffEditorEditors.js +190 -0
  229. package/dist/workers/diffEditorItemTemplate.js +272 -0
  230. package/dist/workers/diffEditorOptions.js +152 -0
  231. package/dist/workers/diffEditorSash.js +86 -0
  232. package/dist/workers/diffEditorViewModel.js +608 -0
  233. package/dist/workers/diffEditorViewZones.js +525 -0
  234. package/dist/workers/diffEditorWidget.js +590 -0
  235. package/dist/workers/diffProviderFactoryService.js +142 -0
  236. package/dist/workers/dnd.js +198 -0
  237. package/dist/workers/dockerfile.contribution.js +9 -0
  238. package/dist/workers/dockerfile.js +129 -0
  239. package/dist/workers/documentSemanticTokens.js +362 -0
  240. package/dist/workers/documentSymbols.js +24 -0
  241. package/dist/workers/dom.js +1454 -0
  242. package/dist/workers/domFontInfo.js +28 -0
  243. package/dist/workers/domLineBreaksComputer.js +301 -0
  244. package/dist/workers/domReadingContext.js +43 -0
  245. package/dist/workers/domSanitize.js +312 -0
  246. package/dist/workers/domStylesheets.js +145 -0
  247. package/dist/workers/dompurify.js +1347 -0
  248. package/dist/workers/dragAndDropCommand.js +65 -0
  249. package/dist/workers/dragScrolling.js +174 -0
  250. package/dist/workers/dropIntoEditorContribution.js +41 -0
  251. package/dist/workers/dropIntoEditorController.js +173 -0
  252. package/dist/workers/dropdown.js +141 -0
  253. package/dist/workers/dropdownActionViewItem.js +109 -0
  254. package/dist/workers/dynamicProgrammingDiffing.js +101 -0
  255. package/dist/workers/dynamicViewOverlay.js +10 -0
  256. package/dist/workers/ecl.contribution.js +8 -0
  257. package/dist/workers/ecl.js +455 -0
  258. package/dist/workers/edcore.main.js +74 -0
  259. package/dist/workers/edit.js +83 -0
  260. package/dist/workers/editContext.js +10 -0
  261. package/dist/workers/editContextFactory.js +16 -0
  262. package/dist/workers/editOperation.js +36 -0
  263. package/dist/workers/editStack.js +363 -0
  264. package/dist/workers/editor.all.js +65 -0
  265. package/dist/workers/editor.api.js +2 -0
  266. package/dist/workers/editor.api2.js +60 -0
  267. package/dist/workers/editor.js +15 -0
  268. package/dist/workers/editor.main.js +170 -0
  269. package/dist/workers/editor.worker.start.js +44 -0
  270. package/dist/workers/editorAction.js +26 -0
  271. package/dist/workers/editorBaseApi.js +43 -0
  272. package/dist/workers/editorBrowser.js +53 -0
  273. package/dist/workers/editorColorRegistry.js +102 -0
  274. package/dist/workers/editorColors.js +128 -0
  275. package/dist/workers/editorCommon.js +13 -0
  276. package/dist/workers/editorConfiguration.js +292 -0
  277. package/dist/workers/editorConfigurationSchema.js +338 -0
  278. package/dist/workers/editorContextKeys.js +84 -0
  279. package/dist/workers/editorDom.js +299 -0
  280. package/dist/workers/editorExtensions.js +489 -0
  281. package/dist/workers/editorFeatures.js +17 -0
  282. package/dist/workers/editorGutter.js +117 -0
  283. package/dist/workers/editorMarkdownCodeBlockRenderer.js +85 -0
  284. package/dist/workers/editorNavigationQuickAccess.js +152 -0
  285. package/dist/workers/editorOptions.js +3440 -0
  286. package/dist/workers/editorScrollbar.js +151 -0
  287. package/dist/workers/editorState.js +115 -0
  288. package/dist/workers/editorTheme.js +23 -0
  289. package/dist/workers/editorWebWorker.js +299 -0
  290. package/dist/workers/editorWorker.js +9 -0
  291. package/dist/workers/editorWorkerHost.js +15 -0
  292. package/dist/workers/editorWorkerService.js +366 -0
  293. package/dist/workers/editorZoom.js +26 -0
  294. package/dist/workers/electricCharacter.js +55 -0
  295. package/dist/workers/elementSizeObserver.js +107 -0
  296. package/dist/workers/elixir.contribution.js +8 -0
  297. package/dist/workers/elixir.js +568 -0
  298. package/dist/workers/embeddedCodeEditorWidget.js +66 -0
  299. package/dist/workers/encodedTokenAttributes.js +79 -0
  300. package/dist/workers/enterAction.js +53 -0
  301. package/dist/workers/environment.js +5 -0
  302. package/dist/workers/eolCounter.js +44 -0
  303. package/dist/workers/equals.js +84 -0
  304. package/dist/workers/errorMessage.js +71 -0
  305. package/dist/workers/errors.js +163 -0
  306. package/dist/workers/event.js +1197 -0
  307. package/dist/workers/extensions.js +18 -0
  308. package/dist/workers/extpath.js +147 -0
  309. package/dist/workers/fastDomNode.js +255 -0
  310. package/dist/workers/files.js +19 -0
  311. package/dist/workers/filters.js +742 -0
  312. package/dist/workers/findController.js +970 -0
  313. package/dist/workers/findDecorations.js +311 -0
  314. package/dist/workers/findInput.js +294 -0
  315. package/dist/workers/findInputToggles.js +52 -0
  316. package/dist/workers/findModel.js +497 -0
  317. package/dist/workers/findOptionsWidget.js +155 -0
  318. package/dist/workers/findSectionHeaders.js +128 -0
  319. package/dist/workers/findState.js +244 -0
  320. package/dist/workers/findWidget.js +1168 -0
  321. package/dist/workers/findWidgetSearchHistory.js +85 -0
  322. package/dist/workers/fixBrackets.js +67 -0
  323. package/dist/workers/fixedArray.js +70 -0
  324. package/dist/workers/floatingMenu.contribution.js +9 -0
  325. package/dist/workers/floatingMenu.js +94 -0
  326. package/dist/workers/flow9.contribution.js +8 -0
  327. package/dist/workers/flow9.js +141 -0
  328. package/dist/workers/folding.js +1136 -0
  329. package/dist/workers/foldingDecorations.js +158 -0
  330. package/dist/workers/foldingModel.js +532 -0
  331. package/dist/workers/foldingRanges.js +354 -0
  332. package/dist/workers/fontInfo.js +172 -0
  333. package/dist/workers/fontInfoFromSettings.js +29 -0
  334. package/dist/workers/fontMeasurements.js +206 -0
  335. package/dist/workers/fontZoom.js +47 -0
  336. package/dist/workers/fonts.js +17 -0
  337. package/dist/workers/format.js +367 -0
  338. package/dist/workers/formatActions.js +263 -0
  339. package/dist/workers/formattedTextRenderer.js +160 -0
  340. package/dist/workers/formattingEdit.js +57 -0
  341. package/dist/workers/forwardingTelemetryService.js +60 -0
  342. package/dist/workers/freemarker2.contribution.js +52 -0
  343. package/dist/workers/freemarker2.js +1062 -0
  344. package/dist/workers/fsharp.contribution.js +8 -0
  345. package/dist/workers/fsharp.js +216 -0
  346. package/dist/workers/fullFileRenderStrategy.js +414 -0
  347. package/dist/workers/fullFileRenderStrategy.wgsl.js +93 -0
  348. package/dist/workers/functional.js +24 -0
  349. package/dist/workers/fuzzyScorer.js +143 -0
  350. package/dist/workers/getHover.js +56 -0
  351. package/dist/workers/getIconClasses.js +106 -0
  352. package/dist/workers/getLinks.js +157 -0
  353. package/dist/workers/getPositionOffsetTransformerFromTextModel.js +24 -0
  354. package/dist/workers/getSemanticTokens.js +211 -0
  355. package/dist/workers/ghostText.js +111 -0
  356. package/dist/workers/ghostTextView.js +449 -0
  357. package/dist/workers/glob.js +581 -0
  358. package/dist/workers/globalPointerMoveMonitor.js +83 -0
  359. package/dist/workers/glyphHoverComputer.js +40 -0
  360. package/dist/workers/glyphHoverController.js +171 -0
  361. package/dist/workers/glyphHoverWidget.js +184 -0
  362. package/dist/workers/glyphLanesModel.js +61 -0
  363. package/dist/workers/glyphMargin.js +403 -0
  364. package/dist/workers/glyphRasterizer.js +276 -0
  365. package/dist/workers/go.contribution.js +8 -0
  366. package/dist/workers/go.js +217 -0
  367. package/dist/workers/goToCommands.js +694 -0
  368. package/dist/workers/goToDefinitionAtPosition.js +267 -0
  369. package/dist/workers/goToSymbol.js +128 -0
  370. package/dist/workers/gotoError.js +272 -0
  371. package/dist/workers/gotoErrorWidget.js +352 -0
  372. package/dist/workers/gotoLineQuickAccess.js +183 -0
  373. package/dist/workers/gotoSymbolQuickAccess.js +395 -0
  374. package/dist/workers/gpuActions.js +126 -0
  375. package/dist/workers/gpuDisposable.js +48 -0
  376. package/dist/workers/gpuMark.js +80 -0
  377. package/dist/workers/gpuUtils.js +58 -0
  378. package/dist/workers/graph.js +74 -0
  379. package/dist/workers/graphql.contribution.js +9 -0
  380. package/dist/workers/graphql.js +150 -0
  381. package/dist/workers/guidesTextModelPart.js +405 -0
  382. package/dist/workers/gutterFeature.js +238 -0
  383. package/dist/workers/gutterIndicatorMenu.js +252 -0
  384. package/dist/workers/gutterIndicatorView.js +456 -0
  385. package/dist/workers/handlebars.contribution.js +9 -0
  386. package/dist/workers/handlebars.js +485 -0
  387. package/dist/workers/hash.js +256 -0
  388. package/dist/workers/hcl.contribution.js +8 -0
  389. package/dist/workers/hcl.js +182 -0
  390. package/dist/workers/helpQuickAccess.js +77 -0
  391. package/dist/workers/heuristicSequenceOptimizations.js +374 -0
  392. package/dist/workers/hiddenRangeModel.js +126 -0
  393. package/dist/workers/hideUnchangedRegionsFeature.js +433 -0
  394. package/dist/workers/hierarchicalKind.js +26 -0
  395. package/dist/workers/highlightDecorations.js +111 -0
  396. package/dist/workers/highlightedLabel.js +129 -0
  397. package/dist/workers/history.js +85 -0
  398. package/dist/workers/historyWidgetKeybindingHint.js +9 -0
  399. package/dist/workers/horizontalScrollbar.js +91 -0
  400. package/dist/workers/hotReloadHelpers.js +17 -0
  401. package/dist/workers/hover.js +11 -0
  402. package/dist/workers/hoverAccessibleViews.js +8 -0
  403. package/dist/workers/hoverActionIds.js +23 -0
  404. package/dist/workers/hoverActions.js +424 -0
  405. package/dist/workers/hoverColorPicker.js +14 -0
  406. package/dist/workers/hoverColorPickerContribution.js +44 -0
  407. package/dist/workers/hoverColorPickerParticipant.js +151 -0
  408. package/dist/workers/hoverContribution.js +56 -0
  409. package/dist/workers/hoverCopyButton.js +54 -0
  410. package/dist/workers/hoverDelegate2.js +39 -0
  411. package/dist/workers/hoverDelegateFactory.js +34 -0
  412. package/dist/workers/hoverOperation.js +168 -0
  413. package/dist/workers/hoverParticipant.js +161 -0
  414. package/dist/workers/hoverService.js +542 -0
  415. package/dist/workers/hoverTypes.js +64 -0
  416. package/dist/workers/hoverUtils.js +18 -0
  417. package/dist/workers/hoverWidget.js +93 -0
  418. package/dist/workers/html.contribution.js +9 -0
  419. package/dist/workers/html.js +374 -0
  420. package/dist/workers/htmlContent.js +164 -0
  421. package/dist/workers/htmlMode.js +213 -0
  422. package/dist/workers/htmlWorker.js +126 -0
  423. package/dist/workers/iPadShowKeyboard.js +74 -0
  424. package/dist/workers/iconLabel.js +291 -0
  425. package/dist/workers/iconLabels.js +33 -0
  426. package/dist/workers/iconRegistry.js +183 -0
  427. package/dist/workers/iconsStyleSheet.js +75 -0
  428. package/dist/workers/idGenerator.js +16 -0
  429. package/dist/workers/iframe.js +87 -0
  430. package/dist/workers/ime.js +33 -0
  431. package/dist/workers/inPlaceReplace.js +151 -0
  432. package/dist/workers/inPlaceReplaceCommand.js +27 -0
  433. package/dist/workers/indentGuides.js +254 -0
  434. package/dist/workers/indentRangeProvider.js +166 -0
  435. package/dist/workers/indentRules.js +63 -0
  436. package/dist/workers/indentUtils.js +33 -0
  437. package/dist/workers/indentation.js +100 -0
  438. package/dist/workers/indentationGuesser.js +178 -0
  439. package/dist/workers/indentationLineProcessor.js +193 -0
  440. package/dist/workers/index.js +21 -0
  441. package/dist/workers/indexTreeModel.js +538 -0
  442. package/dist/workers/ini.contribution.js +9 -0
  443. package/dist/workers/ini.js +70 -0
  444. package/dist/workers/initialize.js +11 -0
  445. package/dist/workers/inlayHints.js +147 -0
  446. package/dist/workers/inlayHintsContribution.js +11 -0
  447. package/dist/workers/inlayHintsController.js +686 -0
  448. package/dist/workers/inlayHintsHover.js +162 -0
  449. package/dist/workers/inlayHintsLocations.js +96 -0
  450. package/dist/workers/inlineCompletionContextKeys.js +23 -0
  451. package/dist/workers/inlineCompletions.contribution.js +31 -0
  452. package/dist/workers/inlineCompletionsAccessibleView.js +4 -0
  453. package/dist/workers/inlineCompletionsController.js +427 -0
  454. package/dist/workers/inlineCompletionsHintsWidget.js +356 -0
  455. package/dist/workers/inlineCompletionsModel.js +1048 -0
  456. package/dist/workers/inlineCompletionsService.js +170 -0
  457. package/dist/workers/inlineCompletionsSource.js +548 -0
  458. package/dist/workers/inlineCompletionsView.js +86 -0
  459. package/dist/workers/inlineDecorations.js +26 -0
  460. package/dist/workers/inlineDiffDeletedCodeMargin.js +138 -0
  461. package/dist/workers/inlineEdit.js +17 -0
  462. package/dist/workers/inlineEditWithChanges.js +30 -0
  463. package/dist/workers/inlineEditsCollapsedView.js +132 -0
  464. package/dist/workers/inlineEditsCustomView.js +256 -0
  465. package/dist/workers/inlineEditsDeletionView.js +178 -0
  466. package/dist/workers/inlineEditsInsertionView.js +267 -0
  467. package/dist/workers/inlineEditsLineReplacementView.js +329 -0
  468. package/dist/workers/inlineEditsModel.js +59 -0
  469. package/dist/workers/inlineEditsNewUsers.js +174 -0
  470. package/dist/workers/inlineEditsSideBySideView.js +517 -0
  471. package/dist/workers/inlineEditsView.js +561 -0
  472. package/dist/workers/inlineEditsViewInterface.js +21 -0
  473. package/dist/workers/inlineEditsViewProducer.js +119 -0
  474. package/dist/workers/inlineEditsWordReplacementView.js +211 -0
  475. package/dist/workers/inlineProgress.js +139 -0
  476. package/dist/workers/inlineSuggestionItem.js +497 -0
  477. package/dist/workers/inplaceReplaceSupport.js +87 -0
  478. package/dist/workers/inputBox.js +510 -0
  479. package/dist/workers/inputColors.js +66 -0
  480. package/dist/workers/inputMode.js +22 -0
  481. package/dist/workers/insertFinalNewLine.js +32 -0
  482. package/dist/workers/insertFinalNewLineCommand.js +39 -0
  483. package/dist/workers/inspectTokens.js +240 -0
  484. package/dist/workers/instantiation.js +44 -0
  485. package/dist/workers/instantiationService.js +403 -0
  486. package/dist/workers/intervalTree.js +1002 -0
  487. package/dist/workers/iterator.js +186 -0
  488. package/dist/workers/java.contribution.js +9 -0
  489. package/dist/workers/java.js +231 -0
  490. package/dist/workers/javascript.contribution.js +11 -0
  491. package/dist/workers/javascript.js +70 -0
  492. package/dist/workers/jsonContributionRegistry.js +42 -0
  493. package/dist/workers/jsonMode.js +224 -0
  494. package/dist/workers/jsonWorker.js +187 -0
  495. package/dist/workers/julia.contribution.js +8 -0
  496. package/dist/workers/julia.js +510 -0
  497. package/dist/workers/keyCodes.js +351 -0
  498. package/dist/workers/keybinding.js +9 -0
  499. package/dist/workers/keybindingCancellation.js +81 -0
  500. package/dist/workers/keybindingLabel.js +122 -0
  501. package/dist/workers/keybindingLabels.js +139 -0
  502. package/dist/workers/keybindingResolver.js +304 -0
  503. package/dist/workers/keybindings.js +104 -0
  504. package/dist/workers/keybindingsRegistry.js +111 -0
  505. package/dist/workers/keyboardEvent.js +125 -0
  506. package/dist/workers/korean.js +321 -0
  507. package/dist/workers/kotlin.contribution.js +9 -0
  508. package/dist/workers/kotlin.js +251 -0
  509. package/dist/workers/label.js +5 -0
  510. package/dist/workers/labels.js +15 -0
  511. package/dist/workers/language.js +9 -0
  512. package/dist/workers/languageBracketsConfiguration.js +133 -0
  513. package/dist/workers/languageConfiguration.js +138 -0
  514. package/dist/workers/languageConfigurationRegistry.js +361 -0
  515. package/dist/workers/languageFeatureDebounce.js +137 -0
  516. package/dist/workers/languageFeatureRegistry.js +180 -0
  517. package/dist/workers/languageFeatures.js +9 -0
  518. package/dist/workers/languageFeaturesService.js +47 -0
  519. package/dist/workers/languageSelector.js +112 -0
  520. package/dist/workers/languageService.js +92 -0
  521. package/dist/workers/languages.js +522 -0
  522. package/dist/workers/languagesAssociations.js +193 -0
  523. package/dist/workers/languagesRegistry.js +237 -0
  524. package/dist/workers/layoutService.js +9 -0
  525. package/dist/workers/lazy.js +49 -0
  526. package/dist/workers/lazyObservableValue.js +125 -0
  527. package/dist/workers/legacyLinesDiffComputer.js +468 -0
  528. package/dist/workers/length.js +129 -0
  529. package/dist/workers/less.contribution.js +9 -0
  530. package/dist/workers/less.js +160 -0
  531. package/dist/workers/lexon.contribution.js +8 -0
  532. package/dist/workers/lexon.js +156 -0
  533. package/dist/workers/lib.index.js +103 -0
  534. package/dist/workers/lib.js +1107 -0
  535. package/dist/workers/lifecycle.js +311 -0
  536. package/dist/workers/lightBulbWidget.js +427 -0
  537. package/dist/workers/lineCommentCommand.js +328 -0
  538. package/dist/workers/lineDecorations.js +208 -0
  539. package/dist/workers/lineEdit.js +75 -0
  540. package/dist/workers/lineHeights.js +370 -0
  541. package/dist/workers/lineNumbers.js +184 -0
  542. package/dist/workers/linePart.js +25 -0
  543. package/dist/workers/lineRange.js +312 -0
  544. package/dist/workers/lineSelection.js +36 -0
  545. package/dist/workers/lineSequence.js +36 -0
  546. package/dist/workers/lineTokens.js +405 -0
  547. package/dist/workers/linesDecorations.js +104 -0
  548. package/dist/workers/linesDiffComputer.js +29 -0
  549. package/dist/workers/linesDiffComputers.js +13 -0
  550. package/dist/workers/linesLayout.js +765 -0
  551. package/dist/workers/linesOperations.js +1187 -0
  552. package/dist/workers/linesSliceCharSequence.js +205 -0
  553. package/dist/workers/link.js +95 -0
  554. package/dist/workers/linkComputer.js +269 -0
  555. package/dist/workers/linkedEditing.js +381 -0
  556. package/dist/workers/linkedList.js +126 -0
  557. package/dist/workers/linkedText.js +48 -0
  558. package/dist/workers/links.js +376 -0
  559. package/dist/workers/liquid.contribution.js +9 -0
  560. package/dist/workers/liquid.js +306 -0
  561. package/dist/workers/list.js +11 -0
  562. package/dist/workers/listColors.js +51 -0
  563. package/dist/workers/listPaging.js +128 -0
  564. package/dist/workers/listService.js +1025 -0
  565. package/dist/workers/listView.js +1173 -0
  566. package/dist/workers/listWidget.js +1535 -0
  567. package/dist/workers/log.js +271 -0
  568. package/dist/workers/logService.js +40 -0
  569. package/dist/workers/logging.js +86 -0
  570. package/dist/workers/longLinesHelper.js +23 -0
  571. package/dist/workers/lspLanguageFeatures.js +716 -0
  572. package/dist/workers/lua.contribution.js +8 -0
  573. package/dist/workers/lua.js +161 -0
  574. package/dist/workers/m3.contribution.js +8 -0
  575. package/dist/workers/m3.js +209 -0
  576. package/dist/workers/map.js +670 -0
  577. package/dist/workers/margin.js +71 -0
  578. package/dist/workers/marginDecorations.js +84 -0
  579. package/dist/workers/markdown.contribution.js +8 -0
  580. package/dist/workers/markdown.js +228 -0
  581. package/dist/workers/markdownHoverParticipant.js +419 -0
  582. package/dist/workers/markdownRenderer.js +73 -0
  583. package/dist/workers/marked.js +2478 -0
  584. package/dist/workers/markerDecorations.js +9 -0
  585. package/dist/workers/markerDecorationsService.js +248 -0
  586. package/dist/workers/markerHoverParticipant.js +270 -0
  587. package/dist/workers/markerNavigationService.js +223 -0
  588. package/dist/workers/markerService.js +330 -0
  589. package/dist/workers/markers.js +127 -0
  590. package/dist/workers/marshalling.js +62 -0
  591. package/dist/workers/mdx.contribution.js +8 -0
  592. package/dist/workers/mdx.js +230 -0
  593. package/dist/workers/menu.js +1147 -0
  594. package/dist/workers/menuColors.js +19 -0
  595. package/dist/workers/menuEntryActionViewItem.js +519 -0
  596. package/dist/workers/menuService.js +436 -0
  597. package/dist/workers/messageController.js +186 -0
  598. package/dist/workers/middleScroll.contribution.js +8 -0
  599. package/dist/workers/middleScrollController.js +128 -0
  600. package/dist/workers/migrateOptions.js +220 -0
  601. package/dist/workers/mime.js +11 -0
  602. package/dist/workers/minimap.js +1662 -0
  603. package/dist/workers/minimapCharRenderer.js +90 -0
  604. package/dist/workers/minimapCharRendererFactory.js +136 -0
  605. package/dist/workers/minimapCharSheet.js +25 -0
  606. package/dist/workers/minimapColors.js +23 -0
  607. package/dist/workers/minimapPreBaked.js +52 -0
  608. package/dist/workers/minimapTokensColorTracker.js +58 -0
  609. package/dist/workers/mips.contribution.js +9 -0
  610. package/dist/workers/mips.js +197 -0
  611. package/dist/workers/mirrorTextModel.js +117 -0
  612. package/dist/workers/miscColors.js +32 -0
  613. package/dist/workers/model.js +9 -0
  614. package/dist/workers/modelLineProjection.js +350 -0
  615. package/dist/workers/modelLineProjectionData.js +297 -0
  616. package/dist/workers/modelService.js +413 -0
  617. package/dist/workers/modesRegistry.js +75 -0
  618. package/dist/workers/monaco.contribution.js +302 -0
  619. package/dist/workers/monarchCommon.js +147 -0
  620. package/dist/workers/monarchCompile.js +546 -0
  621. package/dist/workers/monarchLexer.js +764 -0
  622. package/dist/workers/monospaceLineBreaksComputer.js +473 -0
  623. package/dist/workers/mouseCursor.js +9 -0
  624. package/dist/workers/mouseEvent.js +153 -0
  625. package/dist/workers/mouseHandler.js +539 -0
  626. package/dist/workers/mouseTarget.js +978 -0
  627. package/dist/workers/moveCaretCommand.js +49 -0
  628. package/dist/workers/moveLinesCommand.js +394 -0
  629. package/dist/workers/movedBlocksLinesFeature.js +277 -0
  630. package/dist/workers/msdax.contribution.js +8 -0
  631. package/dist/workers/msdax.js +374 -0
  632. package/dist/workers/multiDiffEditorWidget.js +43 -0
  633. package/dist/workers/multiDiffEditorWidgetImpl.js +427 -0
  634. package/dist/workers/multicursor.js +1004 -0
  635. package/dist/workers/myersDiffAlgorithm.js +159 -0
  636. package/dist/workers/mysql.contribution.js +8 -0
  637. package/dist/workers/mysql.js +877 -0
  638. package/dist/workers/nativeEditContext.js +518 -0
  639. package/dist/workers/nativeEditContextRegistry.js +23 -0
  640. package/dist/workers/nativeEditContextUtils.js +85 -0
  641. package/dist/workers/navigator.js +36 -0
  642. package/dist/workers/network.js +267 -0
  643. package/dist/workers/nls.js +76 -0
  644. package/dist/workers/nls.messages.js +18 -0
  645. package/dist/workers/nodeReader.js +127 -0
  646. package/dist/workers/normalization.js +41 -0
  647. package/dist/workers/notification.js +9 -0
  648. package/dist/workers/nullTokenize.js +29 -0
  649. package/dist/workers/numbers.js +45 -0
  650. package/dist/workers/objectCollectionBuffer.js +102 -0
  651. package/dist/workers/objectPool.js +47 -0
  652. package/dist/workers/objectTree.js +204 -0
  653. package/dist/workers/objectTreeModel.js +220 -0
  654. package/dist/workers/objective-c.contribution.js +8 -0
  655. package/dist/workers/objective-c.js +182 -0
  656. package/dist/workers/objects.js +152 -0
  657. package/dist/workers/observableCodeEditor.js +373 -0
  658. package/dist/workers/observableFromEvent.js +123 -0
  659. package/dist/workers/observableSignal.js +47 -0
  660. package/dist/workers/observableSignalFromEvent.js +41 -0
  661. package/dist/workers/observableValue.js +105 -0
  662. package/dist/workers/observableValueOpts.js +20 -0
  663. package/dist/workers/offsetRange.js +225 -0
  664. package/dist/workers/onEnter.js +109 -0
  665. package/dist/workers/oneCursor.js +117 -0
  666. package/dist/workers/opener.js +43 -0
  667. package/dist/workers/openerService.js +222 -0
  668. package/dist/workers/originalEditorInlineDiffView.js +215 -0
  669. package/dist/workers/outlineModel.js +265 -0
  670. package/dist/workers/overlayWidgets.js +181 -0
  671. package/dist/workers/overviewRuler.js +134 -0
  672. package/dist/workers/overviewRulerFeature.js +168 -0
  673. package/dist/workers/overviewZoneManager.js +176 -0
  674. package/dist/workers/parameterHints.js +126 -0
  675. package/dist/workers/parameterHintsModel.js +258 -0
  676. package/dist/workers/parameterHintsWidget.js +318 -0
  677. package/dist/workers/parser.js +121 -0
  678. package/dist/workers/pascal.contribution.js +9 -0
  679. package/dist/workers/pascal.js +250 -0
  680. package/dist/workers/pascaligo.contribution.js +8 -0
  681. package/dist/workers/pascaligo.js +163 -0
  682. package/dist/workers/path.js +1451 -0
  683. package/dist/workers/peekView.js +246 -0
  684. package/dist/workers/performance.js +222 -0
  685. package/dist/workers/perl.contribution.js +8 -0
  686. package/dist/workers/perl.js +625 -0
  687. package/dist/workers/pgsql.contribution.js +8 -0
  688. package/dist/workers/pgsql.js +850 -0
  689. package/dist/workers/php.contribution.js +9 -0
  690. package/dist/workers/php.js +499 -0
  691. package/dist/workers/pickerQuickAccess.js +271 -0
  692. package/dist/workers/pieceTreeBase.js +1473 -0
  693. package/dist/workers/pieceTreeTextBuffer.js +461 -0
  694. package/dist/workers/pieceTreeTextBufferBuilder.js +140 -0
  695. package/dist/workers/pixelRatio.js +88 -0
  696. package/dist/workers/pla.contribution.js +7 -0
  697. package/dist/workers/pla.js +136 -0
  698. package/dist/workers/placeholderText.contribution.js +14 -0
  699. package/dist/workers/placeholderTextContribution.js +77 -0
  700. package/dist/workers/platform.js +32 -0
  701. package/dist/workers/platformObservableUtils.js +31 -0
  702. package/dist/workers/point.js +50 -0
  703. package/dist/workers/pointerHandler.js +132 -0
  704. package/dist/workers/position.js +142 -0
  705. package/dist/workers/positionToOffset.js +17 -0
  706. package/dist/workers/positionToOffsetImpl.js +98 -0
  707. package/dist/workers/postEditWidget.js +220 -0
  708. package/dist/workers/postiats.contribution.js +8 -0
  709. package/dist/workers/postiats.js +906 -0
  710. package/dist/workers/powerquery.contribution.js +8 -0
  711. package/dist/workers/powerquery.js +889 -0
  712. package/dist/workers/powershell.contribution.js +8 -0
  713. package/dist/workers/powershell.js +238 -0
  714. package/dist/workers/prefixSumComputer.js +226 -0
  715. package/dist/workers/process.js +61 -0
  716. package/dist/workers/product.js +70 -0
  717. package/dist/workers/productService.js +9 -0
  718. package/dist/workers/progress.js +16 -0
  719. package/dist/workers/progressbar.js +105 -0
  720. package/dist/workers/promise.js +56 -0
  721. package/dist/workers/protobuf.contribution.js +8 -0
  722. package/dist/workers/protobuf.js +419 -0
  723. package/dist/workers/provideInlineCompletions.js +372 -0
  724. package/dist/workers/provideSignatureHelp.js +59 -0
  725. package/dist/workers/pug.contribution.js +8 -0
  726. package/dist/workers/pug.js +401 -0
  727. package/dist/workers/python.contribution.js +9 -0
  728. package/dist/workers/python.js +366 -0
  729. package/dist/workers/qsharp.contribution.js +8 -0
  730. package/dist/workers/qsharp.js +300 -0
  731. package/dist/workers/quickAccess.js +56 -0
  732. package/dist/workers/quickInput.js +108 -0
  733. package/dist/workers/quickInputActions.js +189 -0
  734. package/dist/workers/quickInputBox.js +104 -0
  735. package/dist/workers/quickInputController.js +901 -0
  736. package/dist/workers/quickInputDelegate.js +19 -0
  737. package/dist/workers/quickInputList.js +1391 -0
  738. package/dist/workers/quickInputService.js +197 -0
  739. package/dist/workers/quickInputTree.js +37 -0
  740. package/dist/workers/quickInputTreeAccessibilityProvider.js +39 -0
  741. package/dist/workers/quickInputTreeController.js +181 -0
  742. package/dist/workers/quickInputTreeFilter.js +42 -0
  743. package/dist/workers/quickInputTreeRenderer.js +141 -0
  744. package/dist/workers/quickInputTreeSorter.js +48 -0
  745. package/dist/workers/quickInputUtils.js +89 -0
  746. package/dist/workers/quickpickColors.js +21 -0
  747. package/dist/workers/r.contribution.js +8 -0
  748. package/dist/workers/r.js +242 -0
  749. package/dist/workers/range.js +421 -0
  750. package/dist/workers/rangeMap.js +161 -0
  751. package/dist/workers/rangeMapping.js +229 -0
  752. package/dist/workers/rangeSingleLine.js +17 -0
  753. package/dist/workers/rangeUtil.js +117 -0
  754. package/dist/workers/razor.contribution.js +9 -0
  755. package/dist/workers/razor.js +616 -0
  756. package/dist/workers/rbTreeBase.js +362 -0
  757. package/dist/workers/rect.js +163 -0
  758. package/dist/workers/rectangleRenderer.js +214 -0
  759. package/dist/workers/rectangleRenderer.wgsl.js +68 -0
  760. package/dist/workers/redis.contribution.js +8 -0
  761. package/dist/workers/redis.js +301 -0
  762. package/dist/workers/redshift.contribution.js +8 -0
  763. package/dist/workers/redshift.js +808 -0
  764. package/dist/workers/reducer.js +46 -0
  765. package/dist/workers/referencesController.js +382 -0
  766. package/dist/workers/referencesModel.js +241 -0
  767. package/dist/workers/referencesTree.js +200 -0
  768. package/dist/workers/referencesWidget.js +525 -0
  769. package/dist/workers/registrations.contribution.js +82 -0
  770. package/dist/workers/rename.js +458 -0
  771. package/dist/workers/renameWidget.js +741 -0
  772. package/dist/workers/renderLines.js +185 -0
  773. package/dist/workers/renderingContext.js +118 -0
  774. package/dist/workers/replaceAllCommand.js +54 -0
  775. package/dist/workers/replaceCommand.js +158 -0
  776. package/dist/workers/replaceInput.js +176 -0
  777. package/dist/workers/replacePattern.js +289 -0
  778. package/dist/workers/replaceWidgetHistory.js +85 -0
  779. package/dist/workers/resizable.js +150 -0
  780. package/dist/workers/resizableContentWidget.js +92 -0
  781. package/dist/workers/resolvedKeybindingItem.js +35 -0
  782. package/dist/workers/resolverService.js +5 -0
  783. package/dist/workers/resources.js +231 -0
  784. package/dist/workers/restructuredtext.contribution.js +8 -0
  785. package/dist/workers/restructuredtext.js +173 -0
  786. package/dist/workers/revertButtonsFeature.js +149 -0
  787. package/dist/workers/rgba.js +35 -0
  788. package/dist/workers/richEditBrackets.js +356 -0
  789. package/dist/workers/rowCache.js +110 -0
  790. package/dist/workers/rpc.js +57 -0
  791. package/dist/workers/ruby.contribution.js +9 -0
  792. package/dist/workers/ruby.js +510 -0
  793. package/dist/workers/rulers.js +82 -0
  794. package/dist/workers/rulersGpu.js +66 -0
  795. package/dist/workers/runOnChange.js +61 -0
  796. package/dist/workers/rust.contribution.js +8 -0
  797. package/dist/workers/rust.js +342 -0
  798. package/dist/workers/sash.js +451 -0
  799. package/dist/workers/sb.contribution.js +8 -0
  800. package/dist/workers/sb.js +114 -0
  801. package/dist/workers/scala.contribution.js +9 -0
  802. package/dist/workers/scala.js +369 -0
  803. package/dist/workers/scanner.js +287 -0
  804. package/dist/workers/scheme.contribution.js +8 -0
  805. package/dist/workers/scheme.js +107 -0
  806. package/dist/workers/screenReaderContentRich.js +337 -0
  807. package/dist/workers/screenReaderContentSimple.js +194 -0
  808. package/dist/workers/screenReaderSupport.js +175 -0
  809. package/dist/workers/screenReaderUtils.js +111 -0
  810. package/dist/workers/scrollDecoration.js +70 -0
  811. package/dist/workers/scrollable.js +323 -0
  812. package/dist/workers/scrollableElement.js +603 -0
  813. package/dist/workers/scrollbarArrow.js +78 -0
  814. package/dist/workers/scrollbarState.js +163 -0
  815. package/dist/workers/scrollbarVisibilityController.js +93 -0
  816. package/dist/workers/scss.contribution.js +9 -0
  817. package/dist/workers/scss.js +259 -0
  818. package/dist/workers/search.js +52 -0
  819. package/dist/workers/searchColors.js +13 -0
  820. package/dist/workers/sectionHeaders.js +179 -0
  821. package/dist/workers/selectBox.js +47 -0
  822. package/dist/workers/selectBoxCustom.js +858 -0
  823. package/dist/workers/selectBoxNative.js +142 -0
  824. package/dist/workers/selection.js +145 -0
  825. package/dist/workers/selections.js +338 -0
  826. package/dist/workers/semanticTokensConfig.js +14 -0
  827. package/dist/workers/semanticTokensDto.js +82 -0
  828. package/dist/workers/semanticTokensProviderStyling.js +263 -0
  829. package/dist/workers/semanticTokensStyling.js +9 -0
  830. package/dist/workers/semanticTokensStylingService.js +47 -0
  831. package/dist/workers/serviceCollection.js +22 -0
  832. package/dist/workers/severity.js +52 -0
  833. package/dist/workers/severityIcon.js +29 -0
  834. package/dist/workers/shell.contribution.js +8 -0
  835. package/dist/workers/shell.js +220 -0
  836. package/dist/workers/shiftCommand.js +241 -0
  837. package/dist/workers/singleTextEditHelpers.js +32 -0
  838. package/dist/workers/smallImmutableSet.js +108 -0
  839. package/dist/workers/smartSelect.js +281 -0
  840. package/dist/workers/snippetController2.js +297 -0
  841. package/dist/workers/snippetParser.js +890 -0
  842. package/dist/workers/snippetSession.js +650 -0
  843. package/dist/workers/snippetVariables.js +323 -0
  844. package/dist/workers/solidity.contribution.js +8 -0
  845. package/dist/workers/solidity.js +1366 -0
  846. package/dist/workers/sophia.contribution.js +8 -0
  847. package/dist/workers/sophia.js +198 -0
  848. package/dist/workers/sortLinesCommand.js +81 -0
  849. package/dist/workers/sparql.contribution.js +8 -0
  850. package/dist/workers/sparql.js +200 -0
  851. package/dist/workers/sparseMultilineTokens.js +548 -0
  852. package/dist/workers/sparseTokensStore.js +210 -0
  853. package/dist/workers/splice.js +14 -0
  854. package/dist/workers/splitview.js +829 -0
  855. package/dist/workers/sql.contribution.js +8 -0
  856. package/dist/workers/sql.js +852 -0
  857. package/dist/workers/st.contribution.js +8 -0
  858. package/dist/workers/st.js +415 -0
  859. package/dist/workers/stableEditorScroll.js +52 -0
  860. package/dist/workers/standaloneCodeEditor.js +335 -0
  861. package/dist/workers/standaloneCodeEditorService.js +96 -0
  862. package/dist/workers/standaloneColorPickerActions.js +81 -0
  863. package/dist/workers/standaloneColorPickerController.js +62 -0
  864. package/dist/workers/standaloneColorPickerParticipant.js +117 -0
  865. package/dist/workers/standaloneColorPickerWidget.js +215 -0
  866. package/dist/workers/standaloneCommandsQuickAccess.js +82 -0
  867. package/dist/workers/standaloneEditor.js +519 -0
  868. package/dist/workers/standaloneEnums.js +1017 -0
  869. package/dist/workers/standaloneGotoLineQuickAccess.js +67 -0
  870. package/dist/workers/standaloneGotoSymbolQuickAccess.js +77 -0
  871. package/dist/workers/standaloneHelpQuickAccess.js +14 -0
  872. package/dist/workers/standaloneLanguages.js +621 -0
  873. package/dist/workers/standaloneLayoutService.js +74 -0
  874. package/dist/workers/standaloneQuickInputService.js +150 -0
  875. package/dist/workers/standaloneReferenceSearch.js +38 -0
  876. package/dist/workers/standaloneServices.js +787 -0
  877. package/dist/workers/standaloneStrings.js +42 -0
  878. package/dist/workers/standaloneTheme.js +9 -0
  879. package/dist/workers/standaloneThemeService.js +367 -0
  880. package/dist/workers/standaloneTreeSitterLibraryService.js +23 -0
  881. package/dist/workers/standaloneWebWorker.js +55 -0
  882. package/dist/workers/stickyScrollActions.js +132 -0
  883. package/dist/workers/stickyScrollContribution.js +16 -0
  884. package/dist/workers/stickyScrollController.js +566 -0
  885. package/dist/workers/stickyScrollElement.js +39 -0
  886. package/dist/workers/stickyScrollModelProvider.js +338 -0
  887. package/dist/workers/stickyScrollProvider.js +197 -0
  888. package/dist/workers/stickyScrollWidget.js +474 -0
  889. package/dist/workers/stopwatch.js +30 -0
  890. package/dist/workers/storage.js +200 -0
  891. package/dist/workers/stringBuilder.js +122 -0
  892. package/dist/workers/stringEdit.js +165 -0
  893. package/dist/workers/strings.js +834 -0
  894. package/dist/workers/structuredLogger.js +56 -0
  895. package/dist/workers/suggest.js +322 -0
  896. package/dist/workers/suggestAlternatives.js +95 -0
  897. package/dist/workers/suggestCommitCharacters.js +59 -0
  898. package/dist/workers/suggestController.js +941 -0
  899. package/dist/workers/suggestInlineCompletions.js +193 -0
  900. package/dist/workers/suggestMemory.js +254 -0
  901. package/dist/workers/suggestModel.js +667 -0
  902. package/dist/workers/suggestOvertypingCapturer.js +62 -0
  903. package/dist/workers/suggestWidget.js +890 -0
  904. package/dist/workers/suggestWidgetAdapter.js +210 -0
  905. package/dist/workers/suggestWidgetDetails.js +393 -0
  906. package/dist/workers/suggestWidgetRenderer.js +208 -0
  907. package/dist/workers/suggestWidgetStatus.js +74 -0
  908. package/dist/workers/supports.js +58 -0
  909. package/dist/workers/surroundSelectionCommand.js +44 -0
  910. package/dist/workers/swift.contribution.js +9 -0
  911. package/dist/workers/swift.js +311 -0
  912. package/dist/workers/symbolIcons.js +101 -0
  913. package/dist/workers/symbolNavigation.js +178 -0
  914. package/dist/workers/symbols.js +10 -0
  915. package/dist/workers/syntaxRangeProvider.js +177 -0
  916. package/dist/workers/systemverilog.contribution.js +14 -0
  917. package/dist/workers/systemverilog.js +575 -0
  918. package/dist/workers/tabFocus.js +29 -0
  919. package/dist/workers/tableWidget.js +181 -0
  920. package/dist/workers/taskQueue.js +116 -0
  921. package/dist/workers/tcl.contribution.js +8 -0
  922. package/dist/workers/tcl.js +231 -0
  923. package/dist/workers/telemetry.js +9 -0
  924. package/dist/workers/ternarySearchTree.js +674 -0
  925. package/dist/workers/textAreaEditContext.js +720 -0
  926. package/dist/workers/textAreaEditContextInput.js +588 -0
  927. package/dist/workers/textAreaEditContextState.js +160 -0
  928. package/dist/workers/textChange.js +248 -0
  929. package/dist/workers/textEdit.js +269 -0
  930. package/dist/workers/textLength.js +87 -0
  931. package/dist/workers/textModel.js +2031 -0
  932. package/dist/workers/textModelBracketPairs.js +45 -0
  933. package/dist/workers/textModelDefaults.js +18 -0
  934. package/dist/workers/textModelEditSource.js +166 -0
  935. package/dist/workers/textModelEvents.js +216 -0
  936. package/dist/workers/textModelGuides.js +40 -0
  937. package/dist/workers/textModelPart.js +23 -0
  938. package/dist/workers/textModelSearch.js +455 -0
  939. package/dist/workers/textModelStringEdit.js +11 -0
  940. package/dist/workers/textModelSync.impl.js +307 -0
  941. package/dist/workers/textModelText.js +26 -0
  942. package/dist/workers/textModelTokens.js +436 -0
  943. package/dist/workers/textResourceConfiguration.js +6 -0
  944. package/dist/workers/textToHtmlTokenizer.js +139 -0
  945. package/dist/workers/textualHighlightProvider.js +78 -0
  946. package/dist/workers/textureAtlas.js +179 -0
  947. package/dist/workers/textureAtlasPage.js +110 -0
  948. package/dist/workers/textureAtlasShelfAllocator.js +129 -0
  949. package/dist/workers/textureAtlasSlabAllocator.js +346 -0
  950. package/dist/workers/tfIdf.js +179 -0
  951. package/dist/workers/themables.js +100 -0
  952. package/dist/workers/theme.js +110 -0
  953. package/dist/workers/themeService.js +67 -0
  954. package/dist/workers/themes.js +242 -0
  955. package/dist/workers/toggle.js +242 -0
  956. package/dist/workers/toggleHighContrast.js +35 -0
  957. package/dist/workers/toggleTabFocusMode.js +42 -0
  958. package/dist/workers/tokenStore.js +407 -0
  959. package/dist/workers/tokenWithTextArray.js +73 -0
  960. package/dist/workers/tokenization.js +29 -0
  961. package/dist/workers/tokenizationRegistry.js +123 -0
  962. package/dist/workers/tokenizationTextModelPart.js +275 -0
  963. package/dist/workers/tokenizer.js +301 -0
  964. package/dist/workers/tokenizerSyntaxTokenBackend.js +261 -0
  965. package/dist/workers/toolbar.js +244 -0
  966. package/dist/workers/touch.js +270 -0
  967. package/dist/workers/transaction.js +109 -0
  968. package/dist/workers/transpose.js +65 -0
  969. package/dist/workers/tree.js +45 -0
  970. package/dist/workers/treeSitterLibraryService.js +9 -0
  971. package/dist/workers/treeSitterSyntaxTokenBackend.js +167 -0
  972. package/dist/workers/treeSitterThemeService.js +9 -0
  973. package/dist/workers/treeSitterTokenizationImpl.js +713 -0
  974. package/dist/workers/treeSitterTree.js +395 -0
  975. package/dist/workers/treeViewsDnd.js +24 -0
  976. package/dist/workers/treeViewsDndService.js +12 -0
  977. package/dist/workers/triggerInlineEditCommandsRegistry.js +18 -0
  978. package/dist/workers/trimTrailingWhitespaceCommand.js +98 -0
  979. package/dist/workers/trustedTypes.js +29 -0
  980. package/dist/workers/tsMode.js +212 -0
  981. package/dist/workers/tsWorker.js +352 -0
  982. package/dist/workers/twig.contribution.js +9 -0
  983. package/dist/workers/twig.js +391 -0
  984. package/dist/workers/types.js +144 -0
  985. package/dist/workers/typescript.contribution.js +11 -0
  986. package/dist/workers/typescript.js +408 -0
  987. package/dist/workers/typescriptServices.js +210154 -0
  988. package/dist/workers/typescriptServicesMetadata.js +3 -0
  989. package/dist/workers/typespec.contribution.js +8 -0
  990. package/dist/workers/typespec.js +126 -0
  991. package/dist/workers/typingSpeed.js +165 -0
  992. package/dist/workers/uint.js +24 -0
  993. package/dist/workers/undoRedo.js +43 -0
  994. package/dist/workers/undoRedoService.js +1076 -0
  995. package/dist/workers/unicodeHighlighter.js +673 -0
  996. package/dist/workers/unicodeTextModelHighlighter.js +188 -0
  997. package/dist/workers/unusualLineTerminators.js +113 -0
  998. package/dist/workers/updatableHoverWidget.js +107 -0
  999. package/dist/workers/uri.js +606 -0
  1000. package/dist/workers/usLayoutResolvedKeybinding.js +175 -0
  1001. package/dist/workers/utils.js +209 -0
  1002. package/dist/workers/utilsCancellation.js +63 -0
  1003. package/dist/workers/uuid.js +53 -0
  1004. package/dist/workers/validation.js +159 -0
  1005. package/dist/workers/vb.contribution.js +8 -0
  1006. package/dist/workers/vb.js +371 -0
  1007. package/dist/workers/verticalScrollbar.js +94 -0
  1008. package/dist/workers/view.js +720 -0
  1009. package/dist/workers/viewContext.js +22 -0
  1010. package/dist/workers/viewController.js +274 -0
  1011. package/dist/workers/viewCursor.js +218 -0
  1012. package/dist/workers/viewCursors.js +339 -0
  1013. package/dist/workers/viewEventHandler.js +186 -0
  1014. package/dist/workers/viewEvents.js +180 -0
  1015. package/dist/workers/viewGpuContext.js +241 -0
  1016. package/dist/workers/viewLayer.js +478 -0
  1017. package/dist/workers/viewLayout.js +368 -0
  1018. package/dist/workers/viewLine.js +544 -0
  1019. package/dist/workers/viewLineOptions.js +43 -0
  1020. package/dist/workers/viewLineRenderer.js +948 -0
  1021. package/dist/workers/viewLines.js +721 -0
  1022. package/dist/workers/viewLinesGpu.js +571 -0
  1023. package/dist/workers/viewLinesViewportData.js +30 -0
  1024. package/dist/workers/viewModel.js +98 -0
  1025. package/dist/workers/viewModelDecoration.js +55 -0
  1026. package/dist/workers/viewModelDecorations.js +132 -0
  1027. package/dist/workers/viewModelEventDispatcher.js +398 -0
  1028. package/dist/workers/viewModelImpl.js +1163 -0
  1029. package/dist/workers/viewModelLines.js +938 -0
  1030. package/dist/workers/viewOverlays.js +204 -0
  1031. package/dist/workers/viewPart.js +49 -0
  1032. package/dist/workers/viewUserInputEvents.js +91 -0
  1033. package/dist/workers/viewZones.js +335 -0
  1034. package/dist/workers/viewportRenderStrategy.js +316 -0
  1035. package/dist/workers/viewportSemanticTokens.js +166 -0
  1036. package/dist/workers/webWorker.js +396 -0
  1037. package/dist/workers/webWorkerBootstrap.js +20 -0
  1038. package/dist/workers/webWorkerFactory.js +171 -0
  1039. package/dist/workers/wgsl.contribution.js +8 -0
  1040. package/dist/workers/wgsl.js +452 -0
  1041. package/dist/workers/whitespace.js +277 -0
  1042. package/dist/workers/widget.js +44 -0
  1043. package/dist/workers/window.js +60 -0
  1044. package/dist/workers/wordCharacterClassifier.js +87 -0
  1045. package/dist/workers/wordContextKey.js +69 -0
  1046. package/dist/workers/wordDistance.js +64 -0
  1047. package/dist/workers/wordHelper.js +127 -0
  1048. package/dist/workers/wordHighlighter.js +796 -0
  1049. package/dist/workers/wordOperations.js +442 -0
  1050. package/dist/workers/wordPartOperations.js +145 -0
  1051. package/dist/workers/wordSelections.js +82 -0
  1052. package/dist/workers/workerManager.js +147 -0
  1053. package/dist/workers/workers.js +141 -0
  1054. package/dist/workers/workspace.js +84 -0
  1055. package/dist/workers/workspaceTrust.js +9 -0
  1056. package/dist/workers/wrapInHotClass.js +41 -0
  1057. package/dist/workers/wrapInReloadableClass.js +35 -0
  1058. package/dist/workers/xml.contribution.js +28 -0
  1059. package/dist/workers/xml.js +160 -0
  1060. package/dist/workers/yaml.contribution.js +9 -0
  1061. package/dist/workers/yaml.js +271 -0
  1062. package/dist/workers/zoneWidget.js +406 -0
  1063. package/package.json +2 -2
  1064. package/dist/assets/css.worker-C7FogG4G.js +0 -93
  1065. package/dist/assets/editor.worker-iXcRX1Tq.js +0 -26
  1066. package/dist/assets/html.worker-C8VxctEJ.js +0 -470
  1067. package/dist/assets/json.worker-CMC9kgPL.js +0 -58
  1068. package/dist/assets/ts.worker-CtTJ3hNN.js +0 -67731
@@ -0,0 +1,1451 @@
1
+ import { cwd, env, platform } from './process.js';
2
+
3
+ /*---------------------------------------------------------------------------------------------
4
+ * Copyright (c) Microsoft Corporation. All rights reserved.
5
+ * Licensed under the MIT License. See License.txt in the project root for license information.
6
+ *--------------------------------------------------------------------------------------------*/
7
+ // NOTE: VSCode's copy of nodejs path library to be usable in common (non-node) namespace
8
+ // Copied from: https://github.com/nodejs/node/commits/v22.15.0/lib/path.js
9
+ // Excluding: the change that adds primordials
10
+ // (https://github.com/nodejs/node/commit/187a862d221dec42fa9a5c4214e7034d9092792f and others)
11
+ // Excluding: the change that adds glob matching
12
+ // (https://github.com/nodejs/node/commit/57b8b8e18e5e2007114c63b71bf0baedc01936a6)
13
+ /**
14
+ * Copyright Joyent, Inc. and other Node contributors.
15
+ *
16
+ * Permission is hereby granted, free of charge, to any person obtaining a
17
+ * copy of this software and associated documentation files (the
18
+ * "Software"), to deal in the Software without restriction, including
19
+ * without limitation the rights to use, copy, modify, merge, publish,
20
+ * distribute, sublicense, and/or sell copies of the Software, and to permit
21
+ * persons to whom the Software is furnished to do so, subject to the
22
+ * following conditions:
23
+ *
24
+ * The above copyright notice and this permission notice shall be included
25
+ * in all copies or substantial portions of the Software.
26
+ *
27
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
28
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
29
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
30
+ * NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
31
+ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
32
+ * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
33
+ * USE OR OTHER DEALINGS IN THE SOFTWARE.
34
+ */
35
+ const CHAR_UPPERCASE_A = 65; /* A */
36
+ const CHAR_LOWERCASE_A = 97; /* a */
37
+ const CHAR_UPPERCASE_Z = 90; /* Z */
38
+ const CHAR_LOWERCASE_Z = 122; /* z */
39
+ const CHAR_DOT = 46; /* . */
40
+ const CHAR_FORWARD_SLASH = 47; /* / */
41
+ const CHAR_BACKWARD_SLASH = 92; /* \ */
42
+ const CHAR_COLON = 58; /* : */
43
+ const CHAR_QUESTION_MARK = 63; /* ? */
44
+ class ErrorInvalidArgType extends Error {
45
+ constructor(name, expected, actual) {
46
+ // determiner: 'must be' or 'must not be'
47
+ let determiner;
48
+ if (typeof expected === 'string' && expected.indexOf('not ') === 0) {
49
+ determiner = 'must not be';
50
+ expected = expected.replace(/^not /, '');
51
+ }
52
+ else {
53
+ determiner = 'must be';
54
+ }
55
+ const type = name.indexOf('.') !== -1 ? 'property' : 'argument';
56
+ let msg = `The "${name}" ${type} ${determiner} of type ${expected}`;
57
+ msg += `. Received type ${typeof actual}`;
58
+ super(msg);
59
+ this.code = 'ERR_INVALID_ARG_TYPE';
60
+ }
61
+ }
62
+ function validateObject(pathObject, name) {
63
+ if (pathObject === null || typeof pathObject !== 'object') {
64
+ throw new ErrorInvalidArgType(name, 'Object', pathObject);
65
+ }
66
+ }
67
+ function validateString(value, name) {
68
+ if (typeof value !== 'string') {
69
+ throw new ErrorInvalidArgType(name, 'string', value);
70
+ }
71
+ }
72
+ const platformIsWin32 = (platform === 'win32');
73
+ function isPathSeparator(code) {
74
+ return code === CHAR_FORWARD_SLASH || code === CHAR_BACKWARD_SLASH;
75
+ }
76
+ function isPosixPathSeparator(code) {
77
+ return code === CHAR_FORWARD_SLASH;
78
+ }
79
+ function isWindowsDeviceRoot(code) {
80
+ return (code >= CHAR_UPPERCASE_A && code <= CHAR_UPPERCASE_Z) ||
81
+ (code >= CHAR_LOWERCASE_A && code <= CHAR_LOWERCASE_Z);
82
+ }
83
+ // Resolves . and .. elements in a path with directory names
84
+ function normalizeString(path, allowAboveRoot, separator, isPathSeparator) {
85
+ let res = '';
86
+ let lastSegmentLength = 0;
87
+ let lastSlash = -1;
88
+ let dots = 0;
89
+ let code = 0;
90
+ for (let i = 0; i <= path.length; ++i) {
91
+ if (i < path.length) {
92
+ code = path.charCodeAt(i);
93
+ }
94
+ else if (isPathSeparator(code)) {
95
+ break;
96
+ }
97
+ else {
98
+ code = CHAR_FORWARD_SLASH;
99
+ }
100
+ if (isPathSeparator(code)) {
101
+ if (lastSlash === i - 1 || dots === 1) ;
102
+ else if (dots === 2) {
103
+ if (res.length < 2 || lastSegmentLength !== 2 ||
104
+ res.charCodeAt(res.length - 1) !== CHAR_DOT ||
105
+ res.charCodeAt(res.length - 2) !== CHAR_DOT) {
106
+ if (res.length > 2) {
107
+ const lastSlashIndex = res.lastIndexOf(separator);
108
+ if (lastSlashIndex === -1) {
109
+ res = '';
110
+ lastSegmentLength = 0;
111
+ }
112
+ else {
113
+ res = res.slice(0, lastSlashIndex);
114
+ lastSegmentLength = res.length - 1 - res.lastIndexOf(separator);
115
+ }
116
+ lastSlash = i;
117
+ dots = 0;
118
+ continue;
119
+ }
120
+ else if (res.length !== 0) {
121
+ res = '';
122
+ lastSegmentLength = 0;
123
+ lastSlash = i;
124
+ dots = 0;
125
+ continue;
126
+ }
127
+ }
128
+ if (allowAboveRoot) {
129
+ res += res.length > 0 ? `${separator}..` : '..';
130
+ lastSegmentLength = 2;
131
+ }
132
+ }
133
+ else {
134
+ if (res.length > 0) {
135
+ res += `${separator}${path.slice(lastSlash + 1, i)}`;
136
+ }
137
+ else {
138
+ res = path.slice(lastSlash + 1, i);
139
+ }
140
+ lastSegmentLength = i - lastSlash - 1;
141
+ }
142
+ lastSlash = i;
143
+ dots = 0;
144
+ }
145
+ else if (code === CHAR_DOT && dots !== -1) {
146
+ ++dots;
147
+ }
148
+ else {
149
+ dots = -1;
150
+ }
151
+ }
152
+ return res;
153
+ }
154
+ function formatExt(ext) {
155
+ return ext ? `${ext[0] === '.' ? '' : '.'}${ext}` : '';
156
+ }
157
+ function _format(sep, pathObject) {
158
+ validateObject(pathObject, 'pathObject');
159
+ const dir = pathObject.dir || pathObject.root;
160
+ const base = pathObject.base ||
161
+ `${pathObject.name || ''}${formatExt(pathObject.ext)}`;
162
+ if (!dir) {
163
+ return base;
164
+ }
165
+ return dir === pathObject.root ? `${dir}${base}` : `${dir}${sep}${base}`;
166
+ }
167
+ const win32 = {
168
+ // path.resolve([from ...], to)
169
+ resolve(...pathSegments) {
170
+ let resolvedDevice = '';
171
+ let resolvedTail = '';
172
+ let resolvedAbsolute = false;
173
+ for (let i = pathSegments.length - 1; i >= -1; i--) {
174
+ let path;
175
+ if (i >= 0) {
176
+ path = pathSegments[i];
177
+ validateString(path, `paths[${i}]`);
178
+ // Skip empty entries
179
+ if (path.length === 0) {
180
+ continue;
181
+ }
182
+ }
183
+ else if (resolvedDevice.length === 0) {
184
+ path = cwd();
185
+ }
186
+ else {
187
+ // Windows has the concept of drive-specific current working
188
+ // directories. If we've resolved a drive letter but not yet an
189
+ // absolute path, get cwd for that drive, or the process cwd if
190
+ // the drive cwd is not available. We're sure the device is not
191
+ // a UNC path at this points, because UNC paths are always absolute.
192
+ path = env[`=${resolvedDevice}`] || cwd();
193
+ // Verify that a cwd was found and that it actually points
194
+ // to our drive. If not, default to the drive's root.
195
+ if (path === undefined ||
196
+ (path.slice(0, 2).toLowerCase() !== resolvedDevice.toLowerCase() &&
197
+ path.charCodeAt(2) === CHAR_BACKWARD_SLASH)) {
198
+ path = `${resolvedDevice}\\`;
199
+ }
200
+ }
201
+ const len = path.length;
202
+ let rootEnd = 0;
203
+ let device = '';
204
+ let isAbsolute = false;
205
+ const code = path.charCodeAt(0);
206
+ // Try to match a root
207
+ if (len === 1) {
208
+ if (isPathSeparator(code)) {
209
+ // `path` contains just a path separator
210
+ rootEnd = 1;
211
+ isAbsolute = true;
212
+ }
213
+ }
214
+ else if (isPathSeparator(code)) {
215
+ // Possible UNC root
216
+ // If we started with a separator, we know we at least have an
217
+ // absolute path of some kind (UNC or otherwise)
218
+ isAbsolute = true;
219
+ if (isPathSeparator(path.charCodeAt(1))) {
220
+ // Matched double path separator at beginning
221
+ let j = 2;
222
+ let last = j;
223
+ // Match 1 or more non-path separators
224
+ while (j < len && !isPathSeparator(path.charCodeAt(j))) {
225
+ j++;
226
+ }
227
+ if (j < len && j !== last) {
228
+ const firstPart = path.slice(last, j);
229
+ // Matched!
230
+ last = j;
231
+ // Match 1 or more path separators
232
+ while (j < len && isPathSeparator(path.charCodeAt(j))) {
233
+ j++;
234
+ }
235
+ if (j < len && j !== last) {
236
+ // Matched!
237
+ last = j;
238
+ // Match 1 or more non-path separators
239
+ while (j < len && !isPathSeparator(path.charCodeAt(j))) {
240
+ j++;
241
+ }
242
+ if (j === len || j !== last) {
243
+ // We matched a UNC root
244
+ device = `\\\\${firstPart}\\${path.slice(last, j)}`;
245
+ rootEnd = j;
246
+ }
247
+ }
248
+ }
249
+ }
250
+ else {
251
+ rootEnd = 1;
252
+ }
253
+ }
254
+ else if (isWindowsDeviceRoot(code) &&
255
+ path.charCodeAt(1) === CHAR_COLON) {
256
+ // Possible device root
257
+ device = path.slice(0, 2);
258
+ rootEnd = 2;
259
+ if (len > 2 && isPathSeparator(path.charCodeAt(2))) {
260
+ // Treat separator following drive name as an absolute path
261
+ // indicator
262
+ isAbsolute = true;
263
+ rootEnd = 3;
264
+ }
265
+ }
266
+ if (device.length > 0) {
267
+ if (resolvedDevice.length > 0) {
268
+ if (device.toLowerCase() !== resolvedDevice.toLowerCase()) {
269
+ // This path points to another device so it is not applicable
270
+ continue;
271
+ }
272
+ }
273
+ else {
274
+ resolvedDevice = device;
275
+ }
276
+ }
277
+ if (resolvedAbsolute) {
278
+ if (resolvedDevice.length > 0) {
279
+ break;
280
+ }
281
+ }
282
+ else {
283
+ resolvedTail = `${path.slice(rootEnd)}\\${resolvedTail}`;
284
+ resolvedAbsolute = isAbsolute;
285
+ if (isAbsolute && resolvedDevice.length > 0) {
286
+ break;
287
+ }
288
+ }
289
+ }
290
+ // At this point the path should be resolved to a full absolute path,
291
+ // but handle relative paths to be safe (might happen when process.cwd()
292
+ // fails)
293
+ // Normalize the tail path
294
+ resolvedTail = normalizeString(resolvedTail, !resolvedAbsolute, '\\', isPathSeparator);
295
+ return resolvedAbsolute ?
296
+ `${resolvedDevice}\\${resolvedTail}` :
297
+ `${resolvedDevice}${resolvedTail}` || '.';
298
+ },
299
+ normalize(path) {
300
+ validateString(path, 'path');
301
+ const len = path.length;
302
+ if (len === 0) {
303
+ return '.';
304
+ }
305
+ let rootEnd = 0;
306
+ let device;
307
+ let isAbsolute = false;
308
+ const code = path.charCodeAt(0);
309
+ // Try to match a root
310
+ if (len === 1) {
311
+ // `path` contains just a single char, exit early to avoid
312
+ // unnecessary work
313
+ return isPosixPathSeparator(code) ? '\\' : path;
314
+ }
315
+ if (isPathSeparator(code)) {
316
+ // Possible UNC root
317
+ // If we started with a separator, we know we at least have an absolute
318
+ // path of some kind (UNC or otherwise)
319
+ isAbsolute = true;
320
+ if (isPathSeparator(path.charCodeAt(1))) {
321
+ // Matched double path separator at beginning
322
+ let j = 2;
323
+ let last = j;
324
+ // Match 1 or more non-path separators
325
+ while (j < len && !isPathSeparator(path.charCodeAt(j))) {
326
+ j++;
327
+ }
328
+ if (j < len && j !== last) {
329
+ const firstPart = path.slice(last, j);
330
+ // Matched!
331
+ last = j;
332
+ // Match 1 or more path separators
333
+ while (j < len && isPathSeparator(path.charCodeAt(j))) {
334
+ j++;
335
+ }
336
+ if (j < len && j !== last) {
337
+ // Matched!
338
+ last = j;
339
+ // Match 1 or more non-path separators
340
+ while (j < len && !isPathSeparator(path.charCodeAt(j))) {
341
+ j++;
342
+ }
343
+ if (j === len) {
344
+ // We matched a UNC root only
345
+ // Return the normalized version of the UNC root since there
346
+ // is nothing left to process
347
+ return `\\\\${firstPart}\\${path.slice(last)}\\`;
348
+ }
349
+ if (j !== last) {
350
+ // We matched a UNC root with leftovers
351
+ device = `\\\\${firstPart}\\${path.slice(last, j)}`;
352
+ rootEnd = j;
353
+ }
354
+ }
355
+ }
356
+ }
357
+ else {
358
+ rootEnd = 1;
359
+ }
360
+ }
361
+ else if (isWindowsDeviceRoot(code) && path.charCodeAt(1) === CHAR_COLON) {
362
+ // Possible device root
363
+ device = path.slice(0, 2);
364
+ rootEnd = 2;
365
+ if (len > 2 && isPathSeparator(path.charCodeAt(2))) {
366
+ // Treat separator following drive name as an absolute path
367
+ // indicator
368
+ isAbsolute = true;
369
+ rootEnd = 3;
370
+ }
371
+ }
372
+ let tail = rootEnd < len ?
373
+ normalizeString(path.slice(rootEnd), !isAbsolute, '\\', isPathSeparator) :
374
+ '';
375
+ if (tail.length === 0 && !isAbsolute) {
376
+ tail = '.';
377
+ }
378
+ if (tail.length > 0 && isPathSeparator(path.charCodeAt(len - 1))) {
379
+ tail += '\\';
380
+ }
381
+ if (!isAbsolute && device === undefined && path.includes(':')) {
382
+ // If the original path was not absolute and if we have not been able to
383
+ // resolve it relative to a particular device, we need to ensure that the
384
+ // `tail` has not become something that Windows might interpret as an
385
+ // absolute path. See CVE-2024-36139.
386
+ if (tail.length >= 2 &&
387
+ isWindowsDeviceRoot(tail.charCodeAt(0)) &&
388
+ tail.charCodeAt(1) === CHAR_COLON) {
389
+ return `.\\${tail}`;
390
+ }
391
+ let index = path.indexOf(':');
392
+ do {
393
+ if (index === len - 1 || isPathSeparator(path.charCodeAt(index + 1))) {
394
+ return `.\\${tail}`;
395
+ }
396
+ } while ((index = path.indexOf(':', index + 1)) !== -1);
397
+ }
398
+ if (device === undefined) {
399
+ return isAbsolute ? `\\${tail}` : tail;
400
+ }
401
+ return isAbsolute ? `${device}\\${tail}` : `${device}${tail}`;
402
+ },
403
+ isAbsolute(path) {
404
+ validateString(path, 'path');
405
+ const len = path.length;
406
+ if (len === 0) {
407
+ return false;
408
+ }
409
+ const code = path.charCodeAt(0);
410
+ return isPathSeparator(code) ||
411
+ // Possible device root
412
+ (len > 2 &&
413
+ isWindowsDeviceRoot(code) &&
414
+ path.charCodeAt(1) === CHAR_COLON &&
415
+ isPathSeparator(path.charCodeAt(2)));
416
+ },
417
+ join(...paths) {
418
+ if (paths.length === 0) {
419
+ return '.';
420
+ }
421
+ let joined;
422
+ let firstPart;
423
+ for (let i = 0; i < paths.length; ++i) {
424
+ const arg = paths[i];
425
+ validateString(arg, 'path');
426
+ if (arg.length > 0) {
427
+ if (joined === undefined) {
428
+ joined = firstPart = arg;
429
+ }
430
+ else {
431
+ joined += `\\${arg}`;
432
+ }
433
+ }
434
+ }
435
+ if (joined === undefined) {
436
+ return '.';
437
+ }
438
+ // Make sure that the joined path doesn't start with two slashes, because
439
+ // normalize() will mistake it for a UNC path then.
440
+ //
441
+ // This step is skipped when it is very clear that the user actually
442
+ // intended to point at a UNC path. This is assumed when the first
443
+ // non-empty string arguments starts with exactly two slashes followed by
444
+ // at least one more non-slash character.
445
+ //
446
+ // Note that for normalize() to treat a path as a UNC path it needs to
447
+ // have at least 2 components, so we don't filter for that here.
448
+ // This means that the user can use join to construct UNC paths from
449
+ // a server name and a share name; for example:
450
+ // path.join('//server', 'share') -> '\\\\server\\share\\')
451
+ let needsReplace = true;
452
+ let slashCount = 0;
453
+ if (typeof firstPart === 'string' && isPathSeparator(firstPart.charCodeAt(0))) {
454
+ ++slashCount;
455
+ const firstLen = firstPart.length;
456
+ if (firstLen > 1 && isPathSeparator(firstPart.charCodeAt(1))) {
457
+ ++slashCount;
458
+ if (firstLen > 2) {
459
+ if (isPathSeparator(firstPart.charCodeAt(2))) {
460
+ ++slashCount;
461
+ }
462
+ else {
463
+ // We matched a UNC path in the first part
464
+ needsReplace = false;
465
+ }
466
+ }
467
+ }
468
+ }
469
+ if (needsReplace) {
470
+ // Find any more consecutive slashes we need to replace
471
+ while (slashCount < joined.length &&
472
+ isPathSeparator(joined.charCodeAt(slashCount))) {
473
+ slashCount++;
474
+ }
475
+ // Replace the slashes if needed
476
+ if (slashCount >= 2) {
477
+ joined = `\\${joined.slice(slashCount)}`;
478
+ }
479
+ }
480
+ return win32.normalize(joined);
481
+ },
482
+ // It will solve the relative path from `from` to `to`, for instance:
483
+ // from = 'C:\\orandea\\test\\aaa'
484
+ // to = 'C:\\orandea\\impl\\bbb'
485
+ // The output of the function should be: '..\\..\\impl\\bbb'
486
+ relative(from, to) {
487
+ validateString(from, 'from');
488
+ validateString(to, 'to');
489
+ if (from === to) {
490
+ return '';
491
+ }
492
+ const fromOrig = win32.resolve(from);
493
+ const toOrig = win32.resolve(to);
494
+ if (fromOrig === toOrig) {
495
+ return '';
496
+ }
497
+ from = fromOrig.toLowerCase();
498
+ to = toOrig.toLowerCase();
499
+ if (from === to) {
500
+ return '';
501
+ }
502
+ if (fromOrig.length !== from.length || toOrig.length !== to.length) {
503
+ const fromSplit = fromOrig.split('\\');
504
+ const toSplit = toOrig.split('\\');
505
+ if (fromSplit[fromSplit.length - 1] === '') {
506
+ fromSplit.pop();
507
+ }
508
+ if (toSplit[toSplit.length - 1] === '') {
509
+ toSplit.pop();
510
+ }
511
+ const fromLen = fromSplit.length;
512
+ const toLen = toSplit.length;
513
+ const length = fromLen < toLen ? fromLen : toLen;
514
+ let i;
515
+ for (i = 0; i < length; i++) {
516
+ if (fromSplit[i].toLowerCase() !== toSplit[i].toLowerCase()) {
517
+ break;
518
+ }
519
+ }
520
+ if (i === 0) {
521
+ return toOrig;
522
+ }
523
+ else if (i === length) {
524
+ if (toLen > length) {
525
+ return toSplit.slice(i).join('\\');
526
+ }
527
+ if (fromLen > length) {
528
+ return '..\\'.repeat(fromLen - 1 - i) + '..';
529
+ }
530
+ return '';
531
+ }
532
+ return '..\\'.repeat(fromLen - i) + toSplit.slice(i).join('\\');
533
+ }
534
+ // Trim any leading backslashes
535
+ let fromStart = 0;
536
+ while (fromStart < from.length &&
537
+ from.charCodeAt(fromStart) === CHAR_BACKWARD_SLASH) {
538
+ fromStart++;
539
+ }
540
+ // Trim trailing backslashes (applicable to UNC paths only)
541
+ let fromEnd = from.length;
542
+ while (fromEnd - 1 > fromStart &&
543
+ from.charCodeAt(fromEnd - 1) === CHAR_BACKWARD_SLASH) {
544
+ fromEnd--;
545
+ }
546
+ const fromLen = fromEnd - fromStart;
547
+ // Trim any leading backslashes
548
+ let toStart = 0;
549
+ while (toStart < to.length &&
550
+ to.charCodeAt(toStart) === CHAR_BACKWARD_SLASH) {
551
+ toStart++;
552
+ }
553
+ // Trim trailing backslashes (applicable to UNC paths only)
554
+ let toEnd = to.length;
555
+ while (toEnd - 1 > toStart &&
556
+ to.charCodeAt(toEnd - 1) === CHAR_BACKWARD_SLASH) {
557
+ toEnd--;
558
+ }
559
+ const toLen = toEnd - toStart;
560
+ // Compare paths to find the longest common path from root
561
+ const length = fromLen < toLen ? fromLen : toLen;
562
+ let lastCommonSep = -1;
563
+ let i = 0;
564
+ for (; i < length; i++) {
565
+ const fromCode = from.charCodeAt(fromStart + i);
566
+ if (fromCode !== to.charCodeAt(toStart + i)) {
567
+ break;
568
+ }
569
+ else if (fromCode === CHAR_BACKWARD_SLASH) {
570
+ lastCommonSep = i;
571
+ }
572
+ }
573
+ // We found a mismatch before the first common path separator was seen, so
574
+ // return the original `to`.
575
+ if (i !== length) {
576
+ if (lastCommonSep === -1) {
577
+ return toOrig;
578
+ }
579
+ }
580
+ else {
581
+ if (toLen > length) {
582
+ if (to.charCodeAt(toStart + i) === CHAR_BACKWARD_SLASH) {
583
+ // We get here if `from` is the exact base path for `to`.
584
+ // For example: from='C:\\foo\\bar'; to='C:\\foo\\bar\\baz'
585
+ return toOrig.slice(toStart + i + 1);
586
+ }
587
+ if (i === 2) {
588
+ // We get here if `from` is the device root.
589
+ // For example: from='C:\\'; to='C:\\foo'
590
+ return toOrig.slice(toStart + i);
591
+ }
592
+ }
593
+ if (fromLen > length) {
594
+ if (from.charCodeAt(fromStart + i) === CHAR_BACKWARD_SLASH) {
595
+ // We get here if `to` is the exact base path for `from`.
596
+ // For example: from='C:\\foo\\bar'; to='C:\\foo'
597
+ lastCommonSep = i;
598
+ }
599
+ else if (i === 2) {
600
+ // We get here if `to` is the device root.
601
+ // For example: from='C:\\foo\\bar'; to='C:\\'
602
+ lastCommonSep = 3;
603
+ }
604
+ }
605
+ if (lastCommonSep === -1) {
606
+ lastCommonSep = 0;
607
+ }
608
+ }
609
+ let out = '';
610
+ // Generate the relative path based on the path difference between `to` and
611
+ // `from`
612
+ for (i = fromStart + lastCommonSep + 1; i <= fromEnd; ++i) {
613
+ if (i === fromEnd || from.charCodeAt(i) === CHAR_BACKWARD_SLASH) {
614
+ out += out.length === 0 ? '..' : '\\..';
615
+ }
616
+ }
617
+ toStart += lastCommonSep;
618
+ // Lastly, append the rest of the destination (`to`) path that comes after
619
+ // the common path parts
620
+ if (out.length > 0) {
621
+ return `${out}${toOrig.slice(toStart, toEnd)}`;
622
+ }
623
+ if (toOrig.charCodeAt(toStart) === CHAR_BACKWARD_SLASH) {
624
+ ++toStart;
625
+ }
626
+ return toOrig.slice(toStart, toEnd);
627
+ },
628
+ toNamespacedPath(path) {
629
+ // Note: this will *probably* throw somewhere.
630
+ if (typeof path !== 'string' || path.length === 0) {
631
+ return path;
632
+ }
633
+ const resolvedPath = win32.resolve(path);
634
+ if (resolvedPath.length <= 2) {
635
+ return path;
636
+ }
637
+ if (resolvedPath.charCodeAt(0) === CHAR_BACKWARD_SLASH) {
638
+ // Possible UNC root
639
+ if (resolvedPath.charCodeAt(1) === CHAR_BACKWARD_SLASH) {
640
+ const code = resolvedPath.charCodeAt(2);
641
+ if (code !== CHAR_QUESTION_MARK && code !== CHAR_DOT) {
642
+ // Matched non-long UNC root, convert the path to a long UNC path
643
+ return `\\\\?\\UNC\\${resolvedPath.slice(2)}`;
644
+ }
645
+ }
646
+ }
647
+ else if (isWindowsDeviceRoot(resolvedPath.charCodeAt(0)) &&
648
+ resolvedPath.charCodeAt(1) === CHAR_COLON &&
649
+ resolvedPath.charCodeAt(2) === CHAR_BACKWARD_SLASH) {
650
+ // Matched device root, convert the path to a long UNC path
651
+ return `\\\\?\\${resolvedPath}`;
652
+ }
653
+ return resolvedPath;
654
+ },
655
+ dirname(path) {
656
+ validateString(path, 'path');
657
+ const len = path.length;
658
+ if (len === 0) {
659
+ return '.';
660
+ }
661
+ let rootEnd = -1;
662
+ let offset = 0;
663
+ const code = path.charCodeAt(0);
664
+ if (len === 1) {
665
+ // `path` contains just a path separator, exit early to avoid
666
+ // unnecessary work or a dot.
667
+ return isPathSeparator(code) ? path : '.';
668
+ }
669
+ // Try to match a root
670
+ if (isPathSeparator(code)) {
671
+ // Possible UNC root
672
+ rootEnd = offset = 1;
673
+ if (isPathSeparator(path.charCodeAt(1))) {
674
+ // Matched double path separator at beginning
675
+ let j = 2;
676
+ let last = j;
677
+ // Match 1 or more non-path separators
678
+ while (j < len && !isPathSeparator(path.charCodeAt(j))) {
679
+ j++;
680
+ }
681
+ if (j < len && j !== last) {
682
+ // Matched!
683
+ last = j;
684
+ // Match 1 or more path separators
685
+ while (j < len && isPathSeparator(path.charCodeAt(j))) {
686
+ j++;
687
+ }
688
+ if (j < len && j !== last) {
689
+ // Matched!
690
+ last = j;
691
+ // Match 1 or more non-path separators
692
+ while (j < len && !isPathSeparator(path.charCodeAt(j))) {
693
+ j++;
694
+ }
695
+ if (j === len) {
696
+ // We matched a UNC root only
697
+ return path;
698
+ }
699
+ if (j !== last) {
700
+ // We matched a UNC root with leftovers
701
+ // Offset by 1 to include the separator after the UNC root to
702
+ // treat it as a "normal root" on top of a (UNC) root
703
+ rootEnd = offset = j + 1;
704
+ }
705
+ }
706
+ }
707
+ }
708
+ // Possible device root
709
+ }
710
+ else if (isWindowsDeviceRoot(code) && path.charCodeAt(1) === CHAR_COLON) {
711
+ rootEnd = len > 2 && isPathSeparator(path.charCodeAt(2)) ? 3 : 2;
712
+ offset = rootEnd;
713
+ }
714
+ let end = -1;
715
+ let matchedSlash = true;
716
+ for (let i = len - 1; i >= offset; --i) {
717
+ if (isPathSeparator(path.charCodeAt(i))) {
718
+ if (!matchedSlash) {
719
+ end = i;
720
+ break;
721
+ }
722
+ }
723
+ else {
724
+ // We saw the first non-path separator
725
+ matchedSlash = false;
726
+ }
727
+ }
728
+ if (end === -1) {
729
+ if (rootEnd === -1) {
730
+ return '.';
731
+ }
732
+ end = rootEnd;
733
+ }
734
+ return path.slice(0, end);
735
+ },
736
+ basename(path, suffix) {
737
+ if (suffix !== undefined) {
738
+ validateString(suffix, 'suffix');
739
+ }
740
+ validateString(path, 'path');
741
+ let start = 0;
742
+ let end = -1;
743
+ let matchedSlash = true;
744
+ let i;
745
+ // Check for a drive letter prefix so as not to mistake the following
746
+ // path separator as an extra separator at the end of the path that can be
747
+ // disregarded
748
+ if (path.length >= 2 &&
749
+ isWindowsDeviceRoot(path.charCodeAt(0)) &&
750
+ path.charCodeAt(1) === CHAR_COLON) {
751
+ start = 2;
752
+ }
753
+ if (suffix !== undefined && suffix.length > 0 && suffix.length <= path.length) {
754
+ if (suffix === path) {
755
+ return '';
756
+ }
757
+ let extIdx = suffix.length - 1;
758
+ let firstNonSlashEnd = -1;
759
+ for (i = path.length - 1; i >= start; --i) {
760
+ const code = path.charCodeAt(i);
761
+ if (isPathSeparator(code)) {
762
+ // If we reached a path separator that was not part of a set of path
763
+ // separators at the end of the string, stop now
764
+ if (!matchedSlash) {
765
+ start = i + 1;
766
+ break;
767
+ }
768
+ }
769
+ else {
770
+ if (firstNonSlashEnd === -1) {
771
+ // We saw the first non-path separator, remember this index in case
772
+ // we need it if the extension ends up not matching
773
+ matchedSlash = false;
774
+ firstNonSlashEnd = i + 1;
775
+ }
776
+ if (extIdx >= 0) {
777
+ // Try to match the explicit extension
778
+ if (code === suffix.charCodeAt(extIdx)) {
779
+ if (--extIdx === -1) {
780
+ // We matched the extension, so mark this as the end of our path
781
+ // component
782
+ end = i;
783
+ }
784
+ }
785
+ else {
786
+ // Extension does not match, so our result is the entire path
787
+ // component
788
+ extIdx = -1;
789
+ end = firstNonSlashEnd;
790
+ }
791
+ }
792
+ }
793
+ }
794
+ if (start === end) {
795
+ end = firstNonSlashEnd;
796
+ }
797
+ else if (end === -1) {
798
+ end = path.length;
799
+ }
800
+ return path.slice(start, end);
801
+ }
802
+ for (i = path.length - 1; i >= start; --i) {
803
+ if (isPathSeparator(path.charCodeAt(i))) {
804
+ // If we reached a path separator that was not part of a set of path
805
+ // separators at the end of the string, stop now
806
+ if (!matchedSlash) {
807
+ start = i + 1;
808
+ break;
809
+ }
810
+ }
811
+ else if (end === -1) {
812
+ // We saw the first non-path separator, mark this as the end of our
813
+ // path component
814
+ matchedSlash = false;
815
+ end = i + 1;
816
+ }
817
+ }
818
+ if (end === -1) {
819
+ return '';
820
+ }
821
+ return path.slice(start, end);
822
+ },
823
+ extname(path) {
824
+ validateString(path, 'path');
825
+ let start = 0;
826
+ let startDot = -1;
827
+ let startPart = 0;
828
+ let end = -1;
829
+ let matchedSlash = true;
830
+ // Track the state of characters (if any) we see before our first dot and
831
+ // after any path separator we find
832
+ let preDotState = 0;
833
+ // Check for a drive letter prefix so as not to mistake the following
834
+ // path separator as an extra separator at the end of the path that can be
835
+ // disregarded
836
+ if (path.length >= 2 &&
837
+ path.charCodeAt(1) === CHAR_COLON &&
838
+ isWindowsDeviceRoot(path.charCodeAt(0))) {
839
+ start = startPart = 2;
840
+ }
841
+ for (let i = path.length - 1; i >= start; --i) {
842
+ const code = path.charCodeAt(i);
843
+ if (isPathSeparator(code)) {
844
+ // If we reached a path separator that was not part of a set of path
845
+ // separators at the end of the string, stop now
846
+ if (!matchedSlash) {
847
+ startPart = i + 1;
848
+ break;
849
+ }
850
+ continue;
851
+ }
852
+ if (end === -1) {
853
+ // We saw the first non-path separator, mark this as the end of our
854
+ // extension
855
+ matchedSlash = false;
856
+ end = i + 1;
857
+ }
858
+ if (code === CHAR_DOT) {
859
+ // If this is our first dot, mark it as the start of our extension
860
+ if (startDot === -1) {
861
+ startDot = i;
862
+ }
863
+ else if (preDotState !== 1) {
864
+ preDotState = 1;
865
+ }
866
+ }
867
+ else if (startDot !== -1) {
868
+ // We saw a non-dot and non-path separator before our dot, so we should
869
+ // have a good chance at having a non-empty extension
870
+ preDotState = -1;
871
+ }
872
+ }
873
+ if (startDot === -1 ||
874
+ end === -1 ||
875
+ // We saw a non-dot character immediately before the dot
876
+ preDotState === 0 ||
877
+ // The (right-most) trimmed path component is exactly '..'
878
+ (preDotState === 1 &&
879
+ startDot === end - 1 &&
880
+ startDot === startPart + 1)) {
881
+ return '';
882
+ }
883
+ return path.slice(startDot, end);
884
+ },
885
+ format: _format.bind(null, '\\'),
886
+ parse(path) {
887
+ validateString(path, 'path');
888
+ const ret = { root: '', dir: '', base: '', ext: '', name: '' };
889
+ if (path.length === 0) {
890
+ return ret;
891
+ }
892
+ const len = path.length;
893
+ let rootEnd = 0;
894
+ let code = path.charCodeAt(0);
895
+ if (len === 1) {
896
+ if (isPathSeparator(code)) {
897
+ // `path` contains just a path separator, exit early to avoid
898
+ // unnecessary work
899
+ ret.root = ret.dir = path;
900
+ return ret;
901
+ }
902
+ ret.base = ret.name = path;
903
+ return ret;
904
+ }
905
+ // Try to match a root
906
+ if (isPathSeparator(code)) {
907
+ // Possible UNC root
908
+ rootEnd = 1;
909
+ if (isPathSeparator(path.charCodeAt(1))) {
910
+ // Matched double path separator at beginning
911
+ let j = 2;
912
+ let last = j;
913
+ // Match 1 or more non-path separators
914
+ while (j < len && !isPathSeparator(path.charCodeAt(j))) {
915
+ j++;
916
+ }
917
+ if (j < len && j !== last) {
918
+ // Matched!
919
+ last = j;
920
+ // Match 1 or more path separators
921
+ while (j < len && isPathSeparator(path.charCodeAt(j))) {
922
+ j++;
923
+ }
924
+ if (j < len && j !== last) {
925
+ // Matched!
926
+ last = j;
927
+ // Match 1 or more non-path separators
928
+ while (j < len && !isPathSeparator(path.charCodeAt(j))) {
929
+ j++;
930
+ }
931
+ if (j === len) {
932
+ // We matched a UNC root only
933
+ rootEnd = j;
934
+ }
935
+ else if (j !== last) {
936
+ // We matched a UNC root with leftovers
937
+ rootEnd = j + 1;
938
+ }
939
+ }
940
+ }
941
+ }
942
+ }
943
+ else if (isWindowsDeviceRoot(code) && path.charCodeAt(1) === CHAR_COLON) {
944
+ // Possible device root
945
+ if (len <= 2) {
946
+ // `path` contains just a drive root, exit early to avoid
947
+ // unnecessary work
948
+ ret.root = ret.dir = path;
949
+ return ret;
950
+ }
951
+ rootEnd = 2;
952
+ if (isPathSeparator(path.charCodeAt(2))) {
953
+ if (len === 3) {
954
+ // `path` contains just a drive root, exit early to avoid
955
+ // unnecessary work
956
+ ret.root = ret.dir = path;
957
+ return ret;
958
+ }
959
+ rootEnd = 3;
960
+ }
961
+ }
962
+ if (rootEnd > 0) {
963
+ ret.root = path.slice(0, rootEnd);
964
+ }
965
+ let startDot = -1;
966
+ let startPart = rootEnd;
967
+ let end = -1;
968
+ let matchedSlash = true;
969
+ let i = path.length - 1;
970
+ // Track the state of characters (if any) we see before our first dot and
971
+ // after any path separator we find
972
+ let preDotState = 0;
973
+ // Get non-dir info
974
+ for (; i >= rootEnd; --i) {
975
+ code = path.charCodeAt(i);
976
+ if (isPathSeparator(code)) {
977
+ // If we reached a path separator that was not part of a set of path
978
+ // separators at the end of the string, stop now
979
+ if (!matchedSlash) {
980
+ startPart = i + 1;
981
+ break;
982
+ }
983
+ continue;
984
+ }
985
+ if (end === -1) {
986
+ // We saw the first non-path separator, mark this as the end of our
987
+ // extension
988
+ matchedSlash = false;
989
+ end = i + 1;
990
+ }
991
+ if (code === CHAR_DOT) {
992
+ // If this is our first dot, mark it as the start of our extension
993
+ if (startDot === -1) {
994
+ startDot = i;
995
+ }
996
+ else if (preDotState !== 1) {
997
+ preDotState = 1;
998
+ }
999
+ }
1000
+ else if (startDot !== -1) {
1001
+ // We saw a non-dot and non-path separator before our dot, so we should
1002
+ // have a good chance at having a non-empty extension
1003
+ preDotState = -1;
1004
+ }
1005
+ }
1006
+ if (end !== -1) {
1007
+ if (startDot === -1 ||
1008
+ // We saw a non-dot character immediately before the dot
1009
+ preDotState === 0 ||
1010
+ // The (right-most) trimmed path component is exactly '..'
1011
+ (preDotState === 1 &&
1012
+ startDot === end - 1 &&
1013
+ startDot === startPart + 1)) {
1014
+ ret.base = ret.name = path.slice(startPart, end);
1015
+ }
1016
+ else {
1017
+ ret.name = path.slice(startPart, startDot);
1018
+ ret.base = path.slice(startPart, end);
1019
+ ret.ext = path.slice(startDot, end);
1020
+ }
1021
+ }
1022
+ // If the directory is the root, use the entire root as the `dir` including
1023
+ // the trailing slash if any (`C:\abc` -> `C:\`). Otherwise, strip out the
1024
+ // trailing slash (`C:\abc\def` -> `C:\abc`).
1025
+ if (startPart > 0 && startPart !== rootEnd) {
1026
+ ret.dir = path.slice(0, startPart - 1);
1027
+ }
1028
+ else {
1029
+ ret.dir = ret.root;
1030
+ }
1031
+ return ret;
1032
+ },
1033
+ sep: '\\',
1034
+ delimiter: ';',
1035
+ win32: null,
1036
+ posix: null
1037
+ };
1038
+ const posixCwd = (() => {
1039
+ if (platformIsWin32) {
1040
+ // Converts Windows' backslash path separators to POSIX forward slashes
1041
+ // and truncates any drive indicator
1042
+ const regexp = /\\/g;
1043
+ return () => {
1044
+ const cwd$1 = cwd().replace(regexp, '/');
1045
+ return cwd$1.slice(cwd$1.indexOf('/'));
1046
+ };
1047
+ }
1048
+ // We're already on POSIX, no need for any transformations
1049
+ return () => cwd();
1050
+ })();
1051
+ const posix = {
1052
+ // path.resolve([from ...], to)
1053
+ resolve(...pathSegments) {
1054
+ let resolvedPath = '';
1055
+ let resolvedAbsolute = false;
1056
+ for (let i = pathSegments.length - 1; i >= 0 && !resolvedAbsolute; i--) {
1057
+ const path = pathSegments[i];
1058
+ validateString(path, `paths[${i}]`);
1059
+ // Skip empty entries
1060
+ if (path.length === 0) {
1061
+ continue;
1062
+ }
1063
+ resolvedPath = `${path}/${resolvedPath}`;
1064
+ resolvedAbsolute = path.charCodeAt(0) === CHAR_FORWARD_SLASH;
1065
+ }
1066
+ if (!resolvedAbsolute) {
1067
+ const cwd = posixCwd();
1068
+ resolvedPath = `${cwd}/${resolvedPath}`;
1069
+ resolvedAbsolute =
1070
+ cwd.charCodeAt(0) === CHAR_FORWARD_SLASH;
1071
+ }
1072
+ // At this point the path should be resolved to a full absolute path, but
1073
+ // handle relative paths to be safe (might happen when process.cwd() fails)
1074
+ // Normalize the path
1075
+ resolvedPath = normalizeString(resolvedPath, !resolvedAbsolute, '/', isPosixPathSeparator);
1076
+ if (resolvedAbsolute) {
1077
+ return `/${resolvedPath}`;
1078
+ }
1079
+ return resolvedPath.length > 0 ? resolvedPath : '.';
1080
+ },
1081
+ normalize(path) {
1082
+ validateString(path, 'path');
1083
+ if (path.length === 0) {
1084
+ return '.';
1085
+ }
1086
+ const isAbsolute = path.charCodeAt(0) === CHAR_FORWARD_SLASH;
1087
+ const trailingSeparator = path.charCodeAt(path.length - 1) === CHAR_FORWARD_SLASH;
1088
+ // Normalize the path
1089
+ path = normalizeString(path, !isAbsolute, '/', isPosixPathSeparator);
1090
+ if (path.length === 0) {
1091
+ if (isAbsolute) {
1092
+ return '/';
1093
+ }
1094
+ return trailingSeparator ? './' : '.';
1095
+ }
1096
+ if (trailingSeparator) {
1097
+ path += '/';
1098
+ }
1099
+ return isAbsolute ? `/${path}` : path;
1100
+ },
1101
+ isAbsolute(path) {
1102
+ validateString(path, 'path');
1103
+ return path.length > 0 && path.charCodeAt(0) === CHAR_FORWARD_SLASH;
1104
+ },
1105
+ join(...paths) {
1106
+ if (paths.length === 0) {
1107
+ return '.';
1108
+ }
1109
+ const path = [];
1110
+ for (let i = 0; i < paths.length; ++i) {
1111
+ const arg = paths[i];
1112
+ validateString(arg, 'path');
1113
+ if (arg.length > 0) {
1114
+ path.push(arg);
1115
+ }
1116
+ }
1117
+ if (path.length === 0) {
1118
+ return '.';
1119
+ }
1120
+ return posix.normalize(path.join('/'));
1121
+ },
1122
+ relative(from, to) {
1123
+ validateString(from, 'from');
1124
+ validateString(to, 'to');
1125
+ if (from === to) {
1126
+ return '';
1127
+ }
1128
+ // Trim leading forward slashes.
1129
+ from = posix.resolve(from);
1130
+ to = posix.resolve(to);
1131
+ if (from === to) {
1132
+ return '';
1133
+ }
1134
+ const fromStart = 1;
1135
+ const fromEnd = from.length;
1136
+ const fromLen = fromEnd - fromStart;
1137
+ const toStart = 1;
1138
+ const toLen = to.length - toStart;
1139
+ // Compare paths to find the longest common path from root
1140
+ const length = (fromLen < toLen ? fromLen : toLen);
1141
+ let lastCommonSep = -1;
1142
+ let i = 0;
1143
+ for (; i < length; i++) {
1144
+ const fromCode = from.charCodeAt(fromStart + i);
1145
+ if (fromCode !== to.charCodeAt(toStart + i)) {
1146
+ break;
1147
+ }
1148
+ else if (fromCode === CHAR_FORWARD_SLASH) {
1149
+ lastCommonSep = i;
1150
+ }
1151
+ }
1152
+ if (i === length) {
1153
+ if (toLen > length) {
1154
+ if (to.charCodeAt(toStart + i) === CHAR_FORWARD_SLASH) {
1155
+ // We get here if `from` is the exact base path for `to`.
1156
+ // For example: from='/foo/bar'; to='/foo/bar/baz'
1157
+ return to.slice(toStart + i + 1);
1158
+ }
1159
+ if (i === 0) {
1160
+ // We get here if `from` is the root
1161
+ // For example: from='/'; to='/foo'
1162
+ return to.slice(toStart + i);
1163
+ }
1164
+ }
1165
+ else if (fromLen > length) {
1166
+ if (from.charCodeAt(fromStart + i) === CHAR_FORWARD_SLASH) {
1167
+ // We get here if `to` is the exact base path for `from`.
1168
+ // For example: from='/foo/bar/baz'; to='/foo/bar'
1169
+ lastCommonSep = i;
1170
+ }
1171
+ else if (i === 0) {
1172
+ // We get here if `to` is the root.
1173
+ // For example: from='/foo/bar'; to='/'
1174
+ lastCommonSep = 0;
1175
+ }
1176
+ }
1177
+ }
1178
+ let out = '';
1179
+ // Generate the relative path based on the path difference between `to`
1180
+ // and `from`.
1181
+ for (i = fromStart + lastCommonSep + 1; i <= fromEnd; ++i) {
1182
+ if (i === fromEnd || from.charCodeAt(i) === CHAR_FORWARD_SLASH) {
1183
+ out += out.length === 0 ? '..' : '/..';
1184
+ }
1185
+ }
1186
+ // Lastly, append the rest of the destination (`to`) path that comes after
1187
+ // the common path parts.
1188
+ return `${out}${to.slice(toStart + lastCommonSep)}`;
1189
+ },
1190
+ toNamespacedPath(path) {
1191
+ // Non-op on posix systems
1192
+ return path;
1193
+ },
1194
+ dirname(path) {
1195
+ validateString(path, 'path');
1196
+ if (path.length === 0) {
1197
+ return '.';
1198
+ }
1199
+ const hasRoot = path.charCodeAt(0) === CHAR_FORWARD_SLASH;
1200
+ let end = -1;
1201
+ let matchedSlash = true;
1202
+ for (let i = path.length - 1; i >= 1; --i) {
1203
+ if (path.charCodeAt(i) === CHAR_FORWARD_SLASH) {
1204
+ if (!matchedSlash) {
1205
+ end = i;
1206
+ break;
1207
+ }
1208
+ }
1209
+ else {
1210
+ // We saw the first non-path separator
1211
+ matchedSlash = false;
1212
+ }
1213
+ }
1214
+ if (end === -1) {
1215
+ return hasRoot ? '/' : '.';
1216
+ }
1217
+ if (hasRoot && end === 1) {
1218
+ return '//';
1219
+ }
1220
+ return path.slice(0, end);
1221
+ },
1222
+ basename(path, suffix) {
1223
+ if (suffix !== undefined) {
1224
+ validateString(suffix, 'suffix');
1225
+ }
1226
+ validateString(path, 'path');
1227
+ let start = 0;
1228
+ let end = -1;
1229
+ let matchedSlash = true;
1230
+ let i;
1231
+ if (suffix !== undefined && suffix.length > 0 && suffix.length <= path.length) {
1232
+ if (suffix === path) {
1233
+ return '';
1234
+ }
1235
+ let extIdx = suffix.length - 1;
1236
+ let firstNonSlashEnd = -1;
1237
+ for (i = path.length - 1; i >= 0; --i) {
1238
+ const code = path.charCodeAt(i);
1239
+ if (code === CHAR_FORWARD_SLASH) {
1240
+ // If we reached a path separator that was not part of a set of path
1241
+ // separators at the end of the string, stop now
1242
+ if (!matchedSlash) {
1243
+ start = i + 1;
1244
+ break;
1245
+ }
1246
+ }
1247
+ else {
1248
+ if (firstNonSlashEnd === -1) {
1249
+ // We saw the first non-path separator, remember this index in case
1250
+ // we need it if the extension ends up not matching
1251
+ matchedSlash = false;
1252
+ firstNonSlashEnd = i + 1;
1253
+ }
1254
+ if (extIdx >= 0) {
1255
+ // Try to match the explicit extension
1256
+ if (code === suffix.charCodeAt(extIdx)) {
1257
+ if (--extIdx === -1) {
1258
+ // We matched the extension, so mark this as the end of our path
1259
+ // component
1260
+ end = i;
1261
+ }
1262
+ }
1263
+ else {
1264
+ // Extension does not match, so our result is the entire path
1265
+ // component
1266
+ extIdx = -1;
1267
+ end = firstNonSlashEnd;
1268
+ }
1269
+ }
1270
+ }
1271
+ }
1272
+ if (start === end) {
1273
+ end = firstNonSlashEnd;
1274
+ }
1275
+ else if (end === -1) {
1276
+ end = path.length;
1277
+ }
1278
+ return path.slice(start, end);
1279
+ }
1280
+ for (i = path.length - 1; i >= 0; --i) {
1281
+ if (path.charCodeAt(i) === CHAR_FORWARD_SLASH) {
1282
+ // If we reached a path separator that was not part of a set of path
1283
+ // separators at the end of the string, stop now
1284
+ if (!matchedSlash) {
1285
+ start = i + 1;
1286
+ break;
1287
+ }
1288
+ }
1289
+ else if (end === -1) {
1290
+ // We saw the first non-path separator, mark this as the end of our
1291
+ // path component
1292
+ matchedSlash = false;
1293
+ end = i + 1;
1294
+ }
1295
+ }
1296
+ if (end === -1) {
1297
+ return '';
1298
+ }
1299
+ return path.slice(start, end);
1300
+ },
1301
+ extname(path) {
1302
+ validateString(path, 'path');
1303
+ let startDot = -1;
1304
+ let startPart = 0;
1305
+ let end = -1;
1306
+ let matchedSlash = true;
1307
+ // Track the state of characters (if any) we see before our first dot and
1308
+ // after any path separator we find
1309
+ let preDotState = 0;
1310
+ for (let i = path.length - 1; i >= 0; --i) {
1311
+ const char = path[i];
1312
+ if (char === '/') {
1313
+ // If we reached a path separator that was not part of a set of path
1314
+ // separators at the end of the string, stop now
1315
+ if (!matchedSlash) {
1316
+ startPart = i + 1;
1317
+ break;
1318
+ }
1319
+ continue;
1320
+ }
1321
+ if (end === -1) {
1322
+ // We saw the first non-path separator, mark this as the end of our
1323
+ // extension
1324
+ matchedSlash = false;
1325
+ end = i + 1;
1326
+ }
1327
+ if (char === '.') {
1328
+ // If this is our first dot, mark it as the start of our extension
1329
+ if (startDot === -1) {
1330
+ startDot = i;
1331
+ }
1332
+ else if (preDotState !== 1) {
1333
+ preDotState = 1;
1334
+ }
1335
+ }
1336
+ else if (startDot !== -1) {
1337
+ // We saw a non-dot and non-path separator before our dot, so we should
1338
+ // have a good chance at having a non-empty extension
1339
+ preDotState = -1;
1340
+ }
1341
+ }
1342
+ if (startDot === -1 ||
1343
+ end === -1 ||
1344
+ // We saw a non-dot character immediately before the dot
1345
+ preDotState === 0 ||
1346
+ // The (right-most) trimmed path component is exactly '..'
1347
+ (preDotState === 1 &&
1348
+ startDot === end - 1 &&
1349
+ startDot === startPart + 1)) {
1350
+ return '';
1351
+ }
1352
+ return path.slice(startDot, end);
1353
+ },
1354
+ format: _format.bind(null, '/'),
1355
+ parse(path) {
1356
+ validateString(path, 'path');
1357
+ const ret = { root: '', dir: '', base: '', ext: '', name: '' };
1358
+ if (path.length === 0) {
1359
+ return ret;
1360
+ }
1361
+ const isAbsolute = path.charCodeAt(0) === CHAR_FORWARD_SLASH;
1362
+ let start;
1363
+ if (isAbsolute) {
1364
+ ret.root = '/';
1365
+ start = 1;
1366
+ }
1367
+ else {
1368
+ start = 0;
1369
+ }
1370
+ let startDot = -1;
1371
+ let startPart = 0;
1372
+ let end = -1;
1373
+ let matchedSlash = true;
1374
+ let i = path.length - 1;
1375
+ // Track the state of characters (if any) we see before our first dot and
1376
+ // after any path separator we find
1377
+ let preDotState = 0;
1378
+ // Get non-dir info
1379
+ for (; i >= start; --i) {
1380
+ const code = path.charCodeAt(i);
1381
+ if (code === CHAR_FORWARD_SLASH) {
1382
+ // If we reached a path separator that was not part of a set of path
1383
+ // separators at the end of the string, stop now
1384
+ if (!matchedSlash) {
1385
+ startPart = i + 1;
1386
+ break;
1387
+ }
1388
+ continue;
1389
+ }
1390
+ if (end === -1) {
1391
+ // We saw the first non-path separator, mark this as the end of our
1392
+ // extension
1393
+ matchedSlash = false;
1394
+ end = i + 1;
1395
+ }
1396
+ if (code === CHAR_DOT) {
1397
+ // If this is our first dot, mark it as the start of our extension
1398
+ if (startDot === -1) {
1399
+ startDot = i;
1400
+ }
1401
+ else if (preDotState !== 1) {
1402
+ preDotState = 1;
1403
+ }
1404
+ }
1405
+ else if (startDot !== -1) {
1406
+ // We saw a non-dot and non-path separator before our dot, so we should
1407
+ // have a good chance at having a non-empty extension
1408
+ preDotState = -1;
1409
+ }
1410
+ }
1411
+ if (end !== -1) {
1412
+ const start = startPart === 0 && isAbsolute ? 1 : startPart;
1413
+ if (startDot === -1 ||
1414
+ // We saw a non-dot character immediately before the dot
1415
+ preDotState === 0 ||
1416
+ // The (right-most) trimmed path component is exactly '..'
1417
+ (preDotState === 1 &&
1418
+ startDot === end - 1 &&
1419
+ startDot === startPart + 1)) {
1420
+ ret.base = ret.name = path.slice(start, end);
1421
+ }
1422
+ else {
1423
+ ret.name = path.slice(start, startDot);
1424
+ ret.base = path.slice(start, end);
1425
+ ret.ext = path.slice(startDot, end);
1426
+ }
1427
+ }
1428
+ if (startPart > 0) {
1429
+ ret.dir = path.slice(0, startPart - 1);
1430
+ }
1431
+ else if (isAbsolute) {
1432
+ ret.dir = '/';
1433
+ }
1434
+ return ret;
1435
+ },
1436
+ sep: '/',
1437
+ delimiter: ':',
1438
+ win32: null,
1439
+ posix: null
1440
+ };
1441
+ posix.win32 = win32.win32 = win32;
1442
+ posix.posix = win32.posix = posix;
1443
+ const normalize = (platformIsWin32 ? win32.normalize : posix.normalize);
1444
+ const resolve = (platformIsWin32 ? win32.resolve : posix.resolve);
1445
+ const relative = (platformIsWin32 ? win32.relative : posix.relative);
1446
+ const dirname = (platformIsWin32 ? win32.dirname : posix.dirname);
1447
+ const basename = (platformIsWin32 ? win32.basename : posix.basename);
1448
+ const extname = (platformIsWin32 ? win32.extname : posix.extname);
1449
+ const sep = (platformIsWin32 ? win32.sep : posix.sep);
1450
+
1451
+ export { basename, dirname, extname, normalize, posix, relative, resolve, sep, win32 };