monaco-editor-core 0.54.0 → 0.55.0-dev-20251008

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 (264) hide show
  1. package/esm/nls.messages.de.js +1 -1
  2. package/esm/nls.messages.es.js +1 -1
  3. package/esm/nls.messages.fr.js +1 -1
  4. package/esm/nls.messages.it.js +1 -1
  5. package/esm/nls.messages.ja.js +1 -1
  6. package/esm/nls.messages.ko.js +1 -1
  7. package/esm/nls.messages.ru.js +1 -1
  8. package/esm/nls.messages.zh-cn.js +1 -1
  9. package/esm/nls.messages.zh-tw.js +1 -1
  10. package/esm/vs/base/browser/canIUse.js +1 -0
  11. package/esm/vs/base/browser/canIUse.js.map +1 -1
  12. package/esm/vs/base/browser/dom.js +9 -0
  13. package/esm/vs/base/browser/dom.js.map +1 -1
  14. package/esm/vs/base/browser/fastDomNode.js.map +1 -1
  15. package/esm/vs/base/browser/mouseEvent.js +3 -0
  16. package/esm/vs/base/browser/mouseEvent.js.map +1 -1
  17. package/esm/vs/base/browser/trustedTypes.js +2 -0
  18. package/esm/vs/base/browser/trustedTypes.js.map +1 -1
  19. package/esm/vs/base/browser/ui/list/listWidget.js +5 -5
  20. package/esm/vs/base/browser/ui/list/listWidget.js.map +1 -1
  21. package/esm/vs/base/browser/ui/sash/sash.css +1 -1
  22. package/esm/vs/base/browser/ui/sash/sash.js +4 -0
  23. package/esm/vs/base/browser/ui/sash/sash.js.map +1 -1
  24. package/esm/vs/base/browser/ui/scrollbar/scrollableElement.js +1 -1
  25. package/esm/vs/base/browser/ui/scrollbar/scrollableElement.js.map +1 -1
  26. package/esm/vs/base/browser/ui/table/table.css +2 -2
  27. package/esm/vs/base/browser/ui/tree/abstractTree.js +5 -4
  28. package/esm/vs/base/browser/ui/tree/abstractTree.js.map +1 -1
  29. package/esm/vs/base/browser/ui/tree/asyncDataTree.js +6 -4
  30. package/esm/vs/base/browser/ui/tree/asyncDataTree.js.map +1 -1
  31. package/esm/vs/base/browser/ui/tree/dataTree.js.map +1 -1
  32. package/esm/vs/base/browser/ui/tree/indexTreeModel.js +1 -1
  33. package/esm/vs/base/browser/ui/tree/indexTreeModel.js.map +1 -1
  34. package/esm/vs/base/browser/ui/tree/media/tree.css +2 -2
  35. package/esm/vs/base/browser/ui/tree/objectTree.js.map +1 -1
  36. package/esm/vs/base/browser/webWorkerFactory.js +3 -0
  37. package/esm/vs/base/browser/webWorkerFactory.js.map +1 -1
  38. package/esm/vs/base/common/buffer.js.map +1 -1
  39. package/esm/vs/base/common/decorators.js +1 -0
  40. package/esm/vs/base/common/decorators.js.map +1 -1
  41. package/esm/vs/base/common/errors.js +1 -0
  42. package/esm/vs/base/common/errors.js.map +1 -1
  43. package/esm/vs/base/common/glob.js +1 -1
  44. package/esm/vs/base/common/glob.js.map +1 -1
  45. package/esm/vs/base/common/hash.js.map +1 -1
  46. package/esm/vs/base/common/hotReload.js +2 -0
  47. package/esm/vs/base/common/hotReload.js.map +1 -1
  48. package/esm/vs/base/common/hotReloadHelpers.js +1 -0
  49. package/esm/vs/base/common/hotReloadHelpers.js.map +1 -1
  50. package/esm/vs/base/common/lifecycle.js +19 -0
  51. package/esm/vs/base/common/lifecycle.js.map +1 -1
  52. package/esm/vs/base/common/map.js.map +1 -1
  53. package/esm/vs/base/common/marshalling.js +4 -0
  54. package/esm/vs/base/common/marshalling.js.map +1 -1
  55. package/esm/vs/base/common/network.js +1 -0
  56. package/esm/vs/base/common/network.js.map +1 -1
  57. package/esm/vs/base/common/normalization.js +39 -0
  58. package/esm/vs/base/common/normalization.js.map +1 -0
  59. package/esm/vs/base/common/objects.js +1 -0
  60. package/esm/vs/base/common/objects.js.map +1 -1
  61. package/esm/vs/base/common/observableInternal/changeTracker.js +4 -0
  62. package/esm/vs/base/common/observableInternal/changeTracker.js.map +1 -1
  63. package/esm/vs/base/common/observableInternal/debugLocation.js +1 -0
  64. package/esm/vs/base/common/observableInternal/debugLocation.js.map +1 -1
  65. package/esm/vs/base/common/observableInternal/debugName.js +1 -0
  66. package/esm/vs/base/common/observableInternal/debugName.js.map +1 -1
  67. package/esm/vs/base/common/observableInternal/logging/consoleObservableLogger.js +1 -0
  68. package/esm/vs/base/common/observableInternal/logging/consoleObservableLogger.js.map +1 -1
  69. package/esm/vs/base/common/observableInternal/logging/debugger/debuggerRpc.js +1 -0
  70. package/esm/vs/base/common/observableInternal/logging/debugger/debuggerRpc.js.map +1 -1
  71. package/esm/vs/base/common/observableInternal/logging/debugger/rpc.js +1 -0
  72. package/esm/vs/base/common/observableInternal/logging/debugger/rpc.js.map +1 -1
  73. package/esm/vs/base/common/observableInternal/observables/derived.js +7 -1
  74. package/esm/vs/base/common/observableInternal/observables/derived.js.map +1 -1
  75. package/esm/vs/base/common/observableInternal/observables/derivedImpl.js +2 -0
  76. package/esm/vs/base/common/observableInternal/observables/derivedImpl.js.map +1 -1
  77. package/esm/vs/base/common/observableInternal/observables/observableFromEvent.js +1 -0
  78. package/esm/vs/base/common/observableInternal/observables/observableFromEvent.js.map +1 -1
  79. package/esm/vs/base/common/observableInternal/reactions/autorunImpl.js +1 -0
  80. package/esm/vs/base/common/observableInternal/reactions/autorunImpl.js.map +1 -1
  81. package/esm/vs/base/common/process.js.map +1 -1
  82. package/esm/vs/base/common/product.js.map +1 -1
  83. package/esm/vs/base/common/types.js +2 -0
  84. package/esm/vs/base/common/types.js.map +1 -1
  85. package/esm/vs/base/common/worker/webWorker.js +26 -14
  86. package/esm/vs/base/common/worker/webWorker.js.map +1 -1
  87. package/esm/vs/base/parts/sandbox/common/sandboxTypes.js +2 -0
  88. package/esm/vs/base/parts/sandbox/common/sandboxTypes.js.map +1 -0
  89. package/esm/vs/editor/browser/config/editorConfiguration.js +3 -2
  90. package/esm/vs/editor/browser/config/editorConfiguration.js.map +1 -1
  91. package/esm/vs/editor/browser/config/migrateOptions.js +1 -1
  92. package/esm/vs/editor/browser/config/migrateOptions.js.map +1 -1
  93. package/esm/vs/editor/browser/controller/editContext/native/editContextFactory.js.map +1 -1
  94. package/esm/vs/editor/browser/controller/editContext/native/nativeEditContextUtils.js +2 -0
  95. package/esm/vs/editor/browser/controller/editContext/native/nativeEditContextUtils.js.map +1 -1
  96. package/esm/vs/editor/browser/controller/mouseHandler.js +2 -1
  97. package/esm/vs/editor/browser/controller/mouseHandler.js.map +1 -1
  98. package/esm/vs/editor/browser/controller/mouseTarget.js +7 -0
  99. package/esm/vs/editor/browser/controller/mouseTarget.js.map +1 -1
  100. package/esm/vs/editor/browser/controller/pointerHandler.js.map +1 -1
  101. package/esm/vs/editor/browser/coreCommands.js.map +1 -1
  102. package/esm/vs/editor/browser/editorBrowser.js.map +1 -1
  103. package/esm/vs/editor/browser/editorDom.js.map +1 -1
  104. package/esm/vs/editor/browser/editorExtensions.js.map +1 -1
  105. package/esm/vs/editor/browser/gpu/gpuUtils.js +1 -0
  106. package/esm/vs/editor/browser/gpu/gpuUtils.js.map +1 -1
  107. package/esm/vs/editor/browser/gpu/viewGpuContext.js +1 -0
  108. package/esm/vs/editor/browser/gpu/viewGpuContext.js.map +1 -1
  109. package/esm/vs/editor/browser/services/abstractCodeEditorService.js.map +1 -1
  110. package/esm/vs/editor/browser/services/bulkEditService.js.map +1 -1
  111. package/esm/vs/editor/browser/services/codeEditorService.js.map +1 -1
  112. package/esm/vs/editor/browser/services/editorWorkerService.js.map +1 -1
  113. package/esm/vs/editor/browser/services/hoverService/hover.css +2 -0
  114. package/esm/vs/editor/browser/services/hoverService/hoverService.js.map +1 -1
  115. package/esm/vs/editor/browser/services/hoverService/hoverWidget.js +1 -1
  116. package/esm/vs/editor/browser/services/hoverService/hoverWidget.js.map +1 -1
  117. package/esm/vs/editor/browser/services/inlineCompletionsService.js +8 -8
  118. package/esm/vs/editor/browser/services/inlineCompletionsService.js.map +1 -1
  119. package/esm/vs/editor/browser/services/openerService.js.map +1 -1
  120. package/esm/vs/editor/browser/view/viewLayer.js +1 -1
  121. package/esm/vs/editor/browser/view/viewLayer.js.map +1 -1
  122. package/esm/vs/editor/browser/view.js.map +1 -1
  123. package/esm/vs/editor/browser/viewParts/contentWidgets/contentWidgets.js +1 -0
  124. package/esm/vs/editor/browser/viewParts/contentWidgets/contentWidgets.js.map +1 -1
  125. package/esm/vs/editor/browser/viewParts/viewZones/viewZones.js +1 -0
  126. package/esm/vs/editor/browser/viewParts/viewZones/viewZones.js.map +1 -1
  127. package/esm/vs/editor/browser/widget/codeEditor/codeEditorContributions.js.map +1 -1
  128. package/esm/vs/editor/browser/widget/codeEditor/codeEditorWidget.js +4 -1
  129. package/esm/vs/editor/browser/widget/codeEditor/codeEditorWidget.js.map +1 -1
  130. package/esm/vs/editor/browser/widget/diffEditor/components/diffEditorEditors.js +1 -0
  131. package/esm/vs/editor/browser/widget/diffEditor/components/diffEditorEditors.js.map +1 -1
  132. package/esm/vs/editor/browser/widget/diffEditor/delegatingEditorImpl.js.map +1 -1
  133. package/esm/vs/editor/browser/widget/diffEditor/diffEditorOptions.js +1 -0
  134. package/esm/vs/editor/browser/widget/diffEditor/diffEditorOptions.js.map +1 -1
  135. package/esm/vs/editor/browser/widget/diffEditor/diffEditorWidget.js +1 -0
  136. package/esm/vs/editor/browser/widget/diffEditor/diffEditorWidget.js.map +1 -1
  137. package/esm/vs/editor/browser/widget/diffEditor/utils.js +2 -0
  138. package/esm/vs/editor/browser/widget/diffEditor/utils.js.map +1 -1
  139. package/esm/vs/editor/browser/widget/multiDiffEditor/diffEditorItemTemplate.js +2 -0
  140. package/esm/vs/editor/browser/widget/multiDiffEditor/diffEditorItemTemplate.js.map +1 -1
  141. package/esm/vs/editor/common/config/editorOptions.js +122 -68
  142. package/esm/vs/editor/common/config/editorOptions.js.map +1 -1
  143. package/esm/vs/editor/common/config/fontInfo.js +32 -16
  144. package/esm/vs/editor/common/config/fontInfo.js.map +1 -1
  145. package/esm/vs/editor/common/config/fontInfoFromSettings.js +16 -0
  146. package/esm/vs/editor/common/config/fontInfoFromSettings.js.map +1 -0
  147. package/esm/vs/editor/common/core/edits/edit.js +1 -0
  148. package/esm/vs/editor/common/core/edits/edit.js.map +1 -1
  149. package/esm/vs/editor/common/core/edits/stringEdit.js +2 -0
  150. package/esm/vs/editor/common/core/edits/stringEdit.js.map +1 -1
  151. package/esm/vs/editor/common/core/position.js +1 -1
  152. package/esm/vs/editor/common/core/position.js.map +1 -1
  153. package/esm/vs/editor/common/core/range.js +1 -1
  154. package/esm/vs/editor/common/core/range.js.map +1 -1
  155. package/esm/vs/editor/common/core/selection.js +1 -1
  156. package/esm/vs/editor/common/core/selection.js.map +1 -1
  157. package/esm/vs/editor/common/cursor/cursorMoveCommands.js.map +1 -1
  158. package/esm/vs/editor/common/editorCommon.js.map +1 -1
  159. package/esm/vs/editor/common/languages.js +1 -1
  160. package/esm/vs/editor/common/languages.js.map +1 -1
  161. package/esm/vs/editor/common/model/bracketPairsTextModelPart/bracketPairsTree/length.js +14 -0
  162. package/esm/vs/editor/common/model/bracketPairsTextModelPart/bracketPairsTree/length.js.map +1 -1
  163. package/esm/vs/editor/common/model/bracketPairsTextModelPart/bracketPairsTree/smallImmutableSet.js +2 -0
  164. package/esm/vs/editor/common/model/bracketPairsTextModelPart/bracketPairsTree/smallImmutableSet.js.map +1 -1
  165. package/esm/vs/editor/common/model/textModel.js +1 -1
  166. package/esm/vs/editor/common/model/textModel.js.map +1 -1
  167. package/esm/vs/editor/common/model.js +1 -1
  168. package/esm/vs/editor/common/model.js.map +1 -1
  169. package/esm/vs/editor/common/services/editorBaseApi.js.map +1 -1
  170. package/esm/vs/editor/common/services/editorWebWorker.js +1 -0
  171. package/esm/vs/editor/common/services/editorWebWorker.js.map +1 -1
  172. package/esm/vs/editor/common/services/editorWorkerHost.js.map +1 -1
  173. package/esm/vs/editor/common/services/modelService.js +14 -21
  174. package/esm/vs/editor/common/services/modelService.js.map +1 -1
  175. package/esm/vs/editor/common/textModelEditSource.js +2 -0
  176. package/esm/vs/editor/common/textModelEditSource.js.map +1 -1
  177. package/esm/vs/editor/common/viewLayout/viewLineRenderer.js +40 -1
  178. package/esm/vs/editor/common/viewLayout/viewLineRenderer.js.map +1 -1
  179. package/esm/vs/editor/common/viewModel/viewModelImpl.js +2 -1
  180. package/esm/vs/editor/common/viewModel/viewModelImpl.js.map +1 -1
  181. package/esm/vs/editor/contrib/codeAction/browser/codeActionController.js +1 -1
  182. package/esm/vs/editor/contrib/codeAction/browser/codeActionController.js.map +1 -1
  183. package/esm/vs/editor/contrib/codelens/browser/codelensController.js +1 -1
  184. package/esm/vs/editor/contrib/codelens/browser/codelensController.js.map +1 -1
  185. package/esm/vs/editor/contrib/colorPicker/browser/colorDetector.js +1 -0
  186. package/esm/vs/editor/contrib/colorPicker/browser/colorDetector.js.map +1 -1
  187. package/esm/vs/editor/contrib/contextmenu/browser/contextmenu.js +1 -0
  188. package/esm/vs/editor/contrib/contextmenu/browser/contextmenu.js.map +1 -1
  189. package/esm/vs/editor/contrib/find/browser/findModel.js +1 -0
  190. package/esm/vs/editor/contrib/find/browser/findModel.js.map +1 -1
  191. package/esm/vs/editor/contrib/find/browser/findWidget.css +5 -5
  192. package/esm/vs/editor/contrib/folding/browser/folding.css +4 -4
  193. package/esm/vs/editor/contrib/folding/browser/foldingDecorations.js.map +1 -1
  194. package/esm/vs/editor/contrib/gotoSymbol/browser/link/goToDefinitionAtPosition.js +1 -1
  195. package/esm/vs/editor/contrib/gotoSymbol/browser/link/goToDefinitionAtPosition.js.map +1 -1
  196. package/esm/vs/editor/contrib/inlayHints/browser/inlayHintsController.js +30 -14
  197. package/esm/vs/editor/contrib/inlayHints/browser/inlayHintsController.js.map +1 -1
  198. package/esm/vs/editor/contrib/inlineCompletions/browser/model/inlineCompletionsModel.js +5 -3
  199. package/esm/vs/editor/contrib/inlineCompletions/browser/model/inlineCompletionsModel.js.map +1 -1
  200. package/esm/vs/editor/contrib/inlineCompletions/browser/model/inlineCompletionsSource.js +56 -7
  201. package/esm/vs/editor/contrib/inlineCompletions/browser/model/inlineCompletionsSource.js.map +1 -1
  202. package/esm/vs/editor/contrib/inlineCompletions/browser/structuredLogger.js +1 -0
  203. package/esm/vs/editor/contrib/inlineCompletions/browser/structuredLogger.js.map +1 -1
  204. package/esm/vs/editor/contrib/inlineCompletions/browser/view/ghostText/ghostTextView.js +2 -0
  205. package/esm/vs/editor/contrib/inlineCompletions/browser/view/ghostText/ghostTextView.js.map +1 -1
  206. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/components/gutterIndicatorView.js +1 -0
  207. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/components/gutterIndicatorView.js.map +1 -1
  208. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditWithChanges.js +2 -1
  209. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditWithChanges.js.map +1 -1
  210. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsModel.js +1 -1
  211. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsModel.js.map +1 -1
  212. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsView.js +27 -1
  213. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsView.js.map +1 -1
  214. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViewProducer.js +1 -1
  215. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViewProducer.js.map +1 -1
  216. package/esm/vs/editor/contrib/parameterHints/browser/parameterHintsWidget.js +1 -1
  217. package/esm/vs/editor/contrib/parameterHints/browser/parameterHintsWidget.js.map +1 -1
  218. package/esm/vs/editor/contrib/rename/browser/renameWidget.js.map +1 -1
  219. package/esm/vs/editor/contrib/symbolIcons/browser/symbolIcons.css +2 -0
  220. package/esm/vs/editor/contrib/unicodeHighlighter/browser/unicodeHighlighter.js +2 -0
  221. package/esm/vs/editor/contrib/unicodeHighlighter/browser/unicodeHighlighter.js.map +1 -1
  222. package/esm/vs/editor/contrib/unusualLineTerminators/browser/unusualLineTerminators.js.map +1 -1
  223. package/esm/vs/editor/editor.api.d.ts +8 -8
  224. package/esm/vs/editor/editor.api.js +4 -0
  225. package/esm/vs/editor/editor.api.js.map +1 -1
  226. package/esm/vs/editor/standalone/browser/standaloneCodeEditor.js.map +1 -1
  227. package/esm/vs/editor/standalone/browser/standaloneEditor.js +37 -0
  228. package/esm/vs/editor/standalone/browser/standaloneEditor.js.map +1 -1
  229. package/esm/vs/editor/standalone/browser/standaloneLanguages.js +37 -0
  230. package/esm/vs/editor/standalone/browser/standaloneLanguages.js.map +1 -1
  231. package/esm/vs/editor/standalone/browser/standaloneServices.js.map +1 -1
  232. package/esm/vs/editor/standalone/browser/standaloneWebWorker.js.map +1 -1
  233. package/esm/vs/editor/standalone/common/monarch/monarchCompile.js +3 -0
  234. package/esm/vs/editor/standalone/common/monarch/monarchCompile.js.map +1 -1
  235. package/esm/vs/platform/accessibility/browser/accessibilityService.js +2 -2
  236. package/esm/vs/platform/accessibility/browser/accessibilityService.js.map +1 -1
  237. package/esm/vs/platform/actions/common/actions.js.map +1 -1
  238. package/esm/vs/platform/commands/common/commands.js.map +1 -1
  239. package/esm/vs/platform/contextkey/common/contextkey.js +5 -0
  240. package/esm/vs/platform/contextkey/common/contextkey.js.map +1 -1
  241. package/esm/vs/platform/dataChannel/browser/forwardingTelemetryService.js +1 -1
  242. package/esm/vs/platform/dataChannel/browser/forwardingTelemetryService.js.map +1 -1
  243. package/esm/vs/platform/dnd/browser/dnd.js +1 -1
  244. package/esm/vs/platform/dnd/browser/dnd.js.map +1 -1
  245. package/esm/vs/platform/instantiation/common/descriptors.js.map +1 -1
  246. package/esm/vs/platform/instantiation/common/instantiation.js.map +1 -1
  247. package/esm/vs/platform/instantiation/common/instantiationService.js +1 -0
  248. package/esm/vs/platform/instantiation/common/instantiationService.js.map +1 -1
  249. package/esm/vs/platform/list/browser/listService.js +5 -0
  250. package/esm/vs/platform/list/browser/listService.js.map +1 -1
  251. package/esm/vs/platform/log/common/log.js.map +1 -1
  252. package/esm/vs/platform/log/common/logService.js.map +1 -1
  253. package/esm/vs/platform/observable/common/wrapInHotClass.js +2 -0
  254. package/esm/vs/platform/observable/common/wrapInHotClass.js.map +1 -1
  255. package/esm/vs/platform/observable/common/wrapInReloadableClass.js +3 -0
  256. package/esm/vs/platform/observable/common/wrapInReloadableClass.js.map +1 -1
  257. package/esm/vs/platform/product/common/product.js +68 -0
  258. package/esm/vs/platform/product/common/product.js.map +1 -0
  259. package/esm/vs/platform/quickinput/browser/commandsQuickAccess.js +26 -2
  260. package/esm/vs/platform/quickinput/browser/commandsQuickAccess.js.map +1 -1
  261. package/esm/vs/platform/quickinput/browser/quickInput.js +1 -1
  262. package/esm/vs/platform/quickinput/browser/quickInput.js.map +1 -1
  263. package/monaco.d.ts +8 -8
  264. package/package.json +2 -2
@@ -1 +1 @@
1
- {"version":3,"sources":["file:///mnt/vss/_work/1/s/dependencies/vscode/out-editor-src/vs/base/common/marshalling.ts","vs/base/common/marshalling.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;AAEhG,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,OAAO,EAAE,GAAG,EAAiB,MAAM,UAAU,CAAC;AAG9C,MAAM,UAAU,SAAS,CAAC,GAAY;IACrC,OAAO,IAAI,CAAC,SAAS,CAAC,GAAG,EAAE,QAAQ,CAAC,CAAC;AACtC,CAAC;AAED,MAAM,UAAU,KAAK,CAAC,IAAY;IACjC,IAAI,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;IAC5B,IAAI,GAAG,MAAM,CAAC,IAAI,CAAC,CAAC;IACpB,OAAO,IAAI,CAAC;AACb,CAAC;AAMD,SAAS,QAAQ,CAAC,GAAW,EAAE,KAAU;IACxC,gCAAgC;IAChC,IAAI,KAAK,YAAY,MAAM,EAAE,CAAC;QAC7B,OAAO;YACN,IAAI,6BAAqB;YACzB,MAAM,EAAE,K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,GAAG,CAAC,GAAG,CAAC,EAAE,KAAK,GAAG,CAAC,CAAC,CAAC;gBACxC,CAAC;YACF,CAAC;QACF,CAAC;IACF,CAAC;IAED,OAAO,GAAG,CAAC;AACZ,CAAC","file":"marshalling.js","sourceRoot":"file:///mnt/vss/_work/1/s/dependencies/vscode/out-editor-src","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\nimport { VSBuffer } from './buffer.js';\nimport { URI, UriComponents } from './uri.js';\nimport { MarshalledId } from './marshallingIds.js';\n\nexport function stringify(obj: unknown): string {\n\treturn JSON.stringify(obj, replacer);\n}\n\nexport function parse(text: string): any {\n\tlet data = JSON.parse(text);\n\tdata = revive(data);\n\treturn data;\n}\n\nexport interface MarshalledObject {\n\t$mid: MarshalledId;\n}\n\nfunction replacer(key: string, value: any): any {\n\t// URI is done via toJSON-member\n\tif (value instanceof RegExp) {\n\t\treturn {\n\t\t\t$mid: MarshalledId.Regexp,\n\t\t\tsource: value.source,\n\t\t\tflags: value.flags,\n\t\t};\n\t}\n\treturn value;\n}\n\n\ntype Deserialize<T> = T extends UriComponents ? URI\n\t: T extends VSBuffer ? VSBuffer\n\t: T extends object\n\t? Revived<T>\n\t: T;\n\nexport type Revived<T> = { [K in keyof T]: Deserialize<T[K]> };\n\nexport function revive<T = any>(obj: any, depth = 0): Revived<T> {\n\tif (!obj || depth > 200) {\n\t\treturn obj;\n\t}\n\n\tif (typeof obj === 'object') {\n\n\t\tswitch ((<MarshalledObject>obj).$mid) {\n\t\t\tcase MarshalledId.Uri: return <any>URI.revive(obj);\n\t\t\tcase MarshalledId.Regexp: return <any>new RegExp(obj.source, obj.flags);\n\t\t\tcase MarshalledId.Date: return <any>new Date(obj.source);\n\t\t}\n\n\t\tif (\n\t\t\tobj instanceof VSBuffer\n\t\t\t|| obj instanceof Uint8Array\n\t\t) {\n\t\t\treturn <any>obj;\n\t\t}\n\n\t\tif (Array.isArray(obj)) {\n\t\t\tfor (let i = 0; i < obj.length; ++i) {\n\t\t\t\tobj[i] = revive(obj[i], depth + 1);\n\t\t\t}\n\t\t} else {\n\t\t\t// walk object\n\t\t\tfor (const key in obj) {\n\t\t\t\tif (Object.hasOwnProperty.call(obj, key)) {\n\t\t\t\t\tobj[key] = revive(obj[key], depth + 1);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn obj;\n}\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\nimport { VSBuffer } from './buffer.js';\nimport { URI, UriComponents } from './uri.js';\nimport { MarshalledId } from './marshallingIds.js';\n\nexport function stringify(obj: unknown): string {\n\treturn JSON.stringify(obj, replacer);\n}\n\nexport function parse(text: string): any {\n\tlet data = JSON.parse(text);\n\tdata = revive(data);\n\treturn data;\n}\n\nexport interface MarshalledObject {\n\t$mid: MarshalledId;\n}\n\nfunction replacer(key: string, value: any): any {\n\t// URI is done via toJSON-member\n\tif (value instanceof RegExp) {\n\t\treturn {\n\t\t\t$mid: MarshalledId.Regexp,\n\t\t\tsource: value.source,\n\t\t\tflags: value.flags,\n\t\t};\n\t}\n\treturn value;\n}\n\n\ntype Deserialize<T> = T extends UriComponents ? URI\n\t: T extends VSBuffer ? VSBuffer\n\t: T extends object\n\t? Revived<T>\n\t: T;\n\nexport type Revived<T> = { [K in keyof T]: Deserialize<T[K]> };\n\nexport function revive<T = any>(obj: any, depth = 0): Revived<T> {\n\tif (!obj || depth > 200) {\n\t\treturn obj;\n\t}\n\n\tif (typeof obj === 'object') {\n\n\t\tswitch ((<MarshalledObject>obj).$mid) {\n\t\t\tcase MarshalledId.Uri: return <any>URI.revive(obj);\n\t\t\tcase MarshalledId.Regexp: return <any>new RegExp(obj.source, obj.flags);\n\t\t\tcase MarshalledId.Date: return <any>new Date(obj.source);\n\t\t}\n\n\t\tif (\n\t\t\tobj instanceof VSBuffer\n\t\t\t|| obj instanceof Uint8Array\n\t\t) {\n\t\t\treturn <any>obj;\n\t\t}\n\n\t\tif (Array.isArray(obj)) {\n\t\t\tfor (let i = 0; i < obj.length; ++i) {\n\t\t\t\tobj[i] = revive(obj[i], depth + 1);\n\t\t\t}\n\t\t} else {\n\t\t\t// walk object\n\t\t\tfor (const key in obj) {\n\t\t\t\tif (Object.hasOwnProperty.call(obj, key)) {\n\t\t\t\t\tobj[key] = revive(obj[key], depth + 1);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn obj;\n}\n"]}
1
+ {"version":3,"sources":["file:///mnt/vss/_work/1/s/dependencies/vscode/out-editor-src/vs/base/common/marshalling.ts","vs/base/common/marshalling.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;AAEhG,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,OAAO,EAAE,GAAG,EAAiB,MAAM,UAAU,CAAC;AAG9C,MAAM,UAAU,SAAS,CAAC,GAAY;IACrC,OAAO,IAAI,CAAC,SAAS,CAAC,GAAG,EAAE,QAAQ,CAAC,CAAC;AACtC,CAAC;AAED,MAAM,UAAU,KAAK,CAAC,IAAY;IACjC,IAAI,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;IAC5B,IAAI,GAAG,MAAM,CAAC,IAAI,CAAC,CAAC;IACpB,OAAO,IAAI,CAAC;AACb,CAAC;AAMD,SAAS,QAAQ,CAAC,GAAW,EAAE,KAAU;IACxC,gCAAgC;IAChC,IAAI,KAAK,YAAY,MAAM,EAAE,CAAC;QAC7B,OAAO;YACN,IAAI,6BAAqB;YACzB,MAAM,EAAE,KAAK,CAAC,MAAM;YACpB,KAAK,EAAE,KAAK,CAAC,KAAK;SAClB,CAAC;IACH,CAAC;IACD,OAAO,KAAK,CAAC;AACd,CAAC;AAWD,MAAM,UAAU,MAAM,CAAU,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AC;QACF,CAAC;IACF,CAAC;IAED,OAAO,GAAG,CAAC;AACZ,CAAC","file":"marshalling.js","sourceRoot":"file:///mnt/vss/_work/1/s/dependencies/vscode/out-editor-src","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\nimport { VSBuffer } from './buffer.js';\nimport { URI, UriComponents } from './uri.js';\nimport { MarshalledId } from './marshallingIds.js';\n\nexport function stringify(obj: unknown): string {\n\treturn JSON.stringify(obj, replacer);\n}\n\nexport function parse(text: string): any {\n\tlet data = JSON.parse(text);\n\tdata = revive(data);\n\treturn data;\n}\n\nexport interface MarshalledObject {\n\t$mid: MarshalledId;\n}\n\nfunction replacer(key: string, value: any): any {\n\t// URI is done via toJSON-member\n\tif (value instanceof RegExp) {\n\t\treturn {\n\t\t\t$mid: MarshalledId.Regexp,\n\t\t\tsource: value.source,\n\t\t\tflags: value.flags,\n\t\t};\n\t}\n\treturn value;\n}\n\n\ntype Deserialize<T> = T extends UriComponents ? URI\n\t: T extends VSBuffer ? VSBuffer\n\t: T extends object\n\t? Revived<T>\n\t: T;\n\nexport type Revived<T> = { [K in keyof T]: Deserialize<T[K]> };\n\nexport function revive<T = any>(obj: any, depth = 0): Revived<T> {\n\tif (!obj || depth > 200) {\n\t\treturn obj;\n\t}\n\n\tif (typeof obj === 'object') {\n\n\t\tswitch ((<MarshalledObject>obj).$mid) {\n\t\t\t// eslint-disable-next-line local/code-no-any-casts\n\t\t\tcase MarshalledId.Uri: return <any>URI.revive(obj);\n\t\t\t// eslint-disable-next-line local/code-no-any-casts\n\t\t\tcase MarshalledId.Regexp: return <any>new RegExp(obj.source, obj.flags);\n\t\t\t// eslint-disable-next-line local/code-no-any-casts\n\t\t\tcase MarshalledId.Date: return <any>new Date(obj.source);\n\t\t}\n\n\t\tif (\n\t\t\tobj instanceof VSBuffer\n\t\t\t|| obj instanceof Uint8Array\n\t\t) {\n\t\t\t// eslint-disable-next-line local/code-no-any-casts\n\t\t\treturn <any>obj;\n\t\t}\n\n\t\tif (Array.isArray(obj)) {\n\t\t\tfor (let i = 0; i < obj.length; ++i) {\n\t\t\t\tobj[i] = revive(obj[i], depth + 1);\n\t\t\t}\n\t\t} else {\n\t\t\t// walk object\n\t\t\tfor (const key in obj) {\n\t\t\t\tif (Object.hasOwnProperty.call(obj, key)) {\n\t\t\t\t\tobj[key] = revive(obj[key], depth + 1);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn obj;\n}\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\nimport { VSBuffer } from './buffer.js';\nimport { URI, UriComponents } from './uri.js';\nimport { MarshalledId } from './marshallingIds.js';\n\nexport function stringify(obj: unknown): string {\n\treturn JSON.stringify(obj, replacer);\n}\n\nexport function parse(text: string): any {\n\tlet data = JSON.parse(text);\n\tdata = revive(data);\n\treturn data;\n}\n\nexport interface MarshalledObject {\n\t$mid: MarshalledId;\n}\n\nfunction replacer(key: string, value: any): any {\n\t// URI is done via toJSON-member\n\tif (value instanceof RegExp) {\n\t\treturn {\n\t\t\t$mid: MarshalledId.Regexp,\n\t\t\tsource: value.source,\n\t\t\tflags: value.flags,\n\t\t};\n\t}\n\treturn value;\n}\n\n\ntype Deserialize<T> = T extends UriComponents ? URI\n\t: T extends VSBuffer ? VSBuffer\n\t: T extends object\n\t? Revived<T>\n\t: T;\n\nexport type Revived<T> = { [K in keyof T]: Deserialize<T[K]> };\n\nexport function revive<T = any>(obj: any, depth = 0): Revived<T> {\n\tif (!obj || depth > 200) {\n\t\treturn obj;\n\t}\n\n\tif (typeof obj === 'object') {\n\n\t\tswitch ((<MarshalledObject>obj).$mid) {\n\t\t\t// eslint-disable-next-line local/code-no-any-casts\n\t\t\tcase MarshalledId.Uri: return <any>URI.revive(obj);\n\t\t\t// eslint-disable-next-line local/code-no-any-casts\n\t\t\tcase MarshalledId.Regexp: return <any>new RegExp(obj.source, obj.flags);\n\t\t\t// eslint-disable-next-line local/code-no-any-casts\n\t\t\tcase MarshalledId.Date: return <any>new Date(obj.source);\n\t\t}\n\n\t\tif (\n\t\t\tobj instanceof VSBuffer\n\t\t\t|| obj instanceof Uint8Array\n\t\t) {\n\t\t\t// eslint-disable-next-line local/code-no-any-casts\n\t\t\treturn <any>obj;\n\t\t}\n\n\t\tif (Array.isArray(obj)) {\n\t\t\tfor (let i = 0; i < obj.length; ++i) {\n\t\t\t\tobj[i] = revive(obj[i], depth + 1);\n\t\t\t}\n\t\t} else {\n\t\t\t// walk object\n\t\t\tfor (const key in obj) {\n\t\t\t\tif (Object.hasOwnProperty.call(obj, key)) {\n\t\t\t\t\tobj[key] = revive(obj[key], depth + 1);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn obj;\n}\n"]}
@@ -249,6 +249,7 @@ export var COI;
249
249
  * isn't enabled the current context
250
250
  */
251
251
  function addSearchParam(urlOrSearch, coop, coep) {
252
+ // eslint-disable-next-line local/code-no-any-casts
252
253
  if (!globalThis.crossOriginIsolated) {
253
254
  // depends on the current context being COI
254
255
  return;
@@ -1 +1 @@
1
- {"version":3,"sources":["file:///mnt/vss/_work/1/s/dependencies/vscode/out-editor-src/vs/base/common/network.ts","vs/base/common/network.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;AAEhG,OAAO,KAAK,MAAM,MAAM,aAAa,CAAC;AACtC,OAAO,KAAK,QAAQ,MAAM,eAAe,CAAC;AAC1C,OAAO,EAAE,gBAAgB,EAAE,oBAAoB,EAAE,MAAM,cAAc,CAAC;AACtE,OAAO,EAAE,GAAG,EAAE,MAAM,UAAU,CAAC;AAC/B,OAAO,KAAK,KAAK,MAAM,WAAW,CAAC;AAEnC,MAAM,KAAW,OAAO,CA8IvB;AA9ID,WAAiB,OAAO;IAEvB;;;OA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CAAC,KAAK,CAAC,GAAG,CAAC,EAAE,CAAC;YAC3B,MAAM,GAAG,IAAI,GAAG,CAAC,GAAG,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,YAAY,CAAC;QACnD,CAAC;QACD,MAAM,KAAK,GAAG,MAAM,EAAE,GAAG,CAAC,kBAAkB,CAAC,CAAC;QAC9C,IAAI,CAAC,KAAK,EAAE,CAAC;YACZ,OAAO,SAAS,CAAC;QAClB,CAAC;QACD,OAAO,UAAU,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;IAC9B,CAAC;IAde,uBAAmB,sBAclC,CAAA;IAED;;;OAGG;IACH,SAAgB,cAAc,CAAC,WAAqD,EAAE,IAAa,EAAE,IAAa;QACjH,IAAI,CAAO,UAAW,CAAC,mBAAmB,EAAE,CAAC;YAC5C,2CAA2C;YAC3C,OAAO;QACR,CAAC;QACD,MAAM,KAAK,GAAG,IAAI,IAAI,IAAI,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC;QACpD,IAAI,WAAW,YAAY,eAAe,EAAE,CAAC;YAC5C,WAAW,CAAC,GAAG,CAAC,kBAAkB,EAAE,KAAK,CAAC,CAAC;QAC5C,CAAC;aAAM,CAAC;YACkB,WAAY,CAAC,kBAAkB,CAAC,GAAG,KAAK,CAAC;QACnE,CAAC;IACF,CAAC;IAXe,kBAAc,iBAW7B,CAAA;AACF,CAAC,EA/CgB,GAAG,KAAH,GAAG,QA+CnB","file":"network.js","sourceRoot":"file:///mnt/vss/_work/1/s/dependencies/vscode/out-editor-src","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\nimport * as errors from './errors.js';\nimport * as platform from './platform.js';\nimport { equalsIgnoreCase, startsWithIgnoreCase } from './strings.js';\nimport { URI } from './uri.js';\nimport * as paths from './path.js';\n\nexport namespace Schemas {\n\n\t/**\n\t * A schema that is used for models that exist in memory\n\t * only and that have no correspondence on a server or such.\n\t */\n\texport const inMemory = 'inmemory';\n\n\t/**\n\t * A schema that is used for setting files\n\t */\n\texport const vscode = 'vscode';\n\n\t/**\n\t * A schema that is used for internal private files\n\t */\n\texport const internal = 'private';\n\n\t/**\n\t * A walk-through document.\n\t */\n\texport const walkThrough = 'walkThrough';\n\n\t/**\n\t * An embedded code snippet.\n\t */\n\texport const walkThroughSnippet = 'walkThroughSnippet';\n\n\texport const http = 'http';\n\n\texport const https = 'https';\n\n\texport const file = 'file';\n\n\texport const mailto = 'mailto';\n\n\texport const untitled = 'untitled';\n\n\texport const data = 'data';\n\n\texport const command = 'command';\n\n\texport const vscodeRemote = 'vscode-remote';\n\n\texport const vscodeRemoteResource = 'vscode-remote-resource';\n\n\texport const vscodeManagedRemoteResource = 'vscode-managed-remote-resource';\n\n\texport const vscodeUserData = 'vscode-userdata';\n\n\texport const vscodeCustomEditor = 'vscode-custom-editor';\n\n\texport const vscodeNotebookCell = 'vscode-notebook-cell';\n\texport const vscodeNotebookCellMetadata = 'vscode-notebook-cell-metadata';\n\texport const vscodeNotebookCellMetadataDiff = 'vscode-notebook-cell-metadata-diff';\n\texport const vscodeNotebookCellOutput = 'vscode-notebook-cell-output';\n\texport const vscodeNotebookCellOutputDiff = 'vscode-notebook-cell-output-diff';\n\texport const vscodeNotebookMetadata = 'vscode-notebook-metadata';\n\texport const vscodeInteractiveInput = 'vscode-interactive-input';\n\n\texport const vscodeSettings = 'vscode-settings';\n\n\texport const vscodeWorkspaceTrust = 'vscode-workspace-trust';\n\n\texport const vscodeTerminal = 'vscode-terminal';\n\n\t/** Scheme used for code blocks in chat. */\n\texport const vscodeChatCodeBlock = 'vscode-chat-code-block';\n\n\t/** Scheme used for LHS of code compare (aka diff) blocks in chat. */\n\texport const vscodeChatCodeCompareBlock = 'vscode-chat-code-compare-block';\n\n\t/** Scheme used for the chat input editor. */\n\texport const vscodeChatEditor = 'vscode-chat-editor';\n\n\t/** Scheme used for the chat input part */\n\texport const vscodeChatInput = 'chatSessionInput';\n\n\t/** Scheme for chat session content */\n\texport const vscodeChatSession = 'vscode-chat-session';\n\n\t/**\n\t * Scheme used internally for webviews that aren't linked to a resource (i.e. not custom editors)\n\t */\n\texport const webviewPanel = 'webview-panel';\n\n\t/**\n\t * Scheme used for loading the wrapper html and script in webviews.\n\t */\n\texport const vscodeWebview = 'vscode-webview';\n\n\t/**\n\t * Scheme used for extension pages\n\t */\n\texport const extension = 'extension';\n\n\t/**\n\t * Scheme used as a replacement of `file` scheme to load\n\t * files with our custom protocol handler (desktop only).\n\t */\n\texport const vscodeFileResource = 'vscode-file';\n\n\t/**\n\t * Scheme used for temporary resources\n\t */\n\texport const tmp = 'tmp';\n\n\t/**\n\t * Scheme used vs live share\n\t */\n\texport const vsls = 'vsls';\n\n\t/**\n\t * Scheme used for the Source Control commit input's text document\n\t */\n\texport const vscodeSourceControl = 'vscode-scm';\n\n\t/**\n\t * Scheme used for input box for creating comments.\n\t */\n\texport const commentsInput = 'comment';\n\n\t/**\n\t * Scheme used for special rendering of settings in the release notes\n\t */\n\texport const codeSetting = 'code-setting';\n\n\t/**\n\t * Scheme used for output panel resources\n\t */\n\texport const outputChannel = 'output';\n\n\t/**\n\t * Scheme used for the accessible view\n\t */\n\texport const accessibleView = 'accessible-view';\n\n\t/**\n\t * Used for snapshots of chat edits\n\t */\n\texport const chatEditingSnapshotScheme = 'chat-editing-snapshot-text-model';\n\texport const chatEditingModel = 'chat-editing-text-model';\n}\n\nexport function matchesScheme(target: URI | string, scheme: string): boolean {\n\tif (URI.isUri(target)) {\n\t\treturn equalsIgnoreCase(target.scheme, scheme);\n\t} else {\n\t\treturn startsWithIgnoreCase(target, scheme + ':');\n\t}\n}\n\nexport function matchesSomeScheme(target: URI | string, ...schemes: string[]): boolean {\n\treturn schemes.some(scheme => matchesScheme(target, scheme));\n}\nexport const connectionTokenQueryName = 'tkn';\n\nclass RemoteAuthoritiesImpl {\n\tprivate readonly _hosts: { [authority: string]: string | undefined } = Object.create(null);\n\tprivate readonly _ports: { [authority: string]: number | undefined } = Object.create(null);\n\tprivate readonly _connectionTokens: { [authority: string]: string | undefined } = Object.create(null);\n\tprivate _preferredWebSchema: 'http' | 'https' = 'http';\n\tprivate _delegate: ((uri: URI) => URI) | null = null;\n\tprivate _serverRootPath: string = '/';\n\n\tsetPreferredWebSchema(schema: 'http' | 'https') {\n\t\tthis._preferredWebSchema = schema;\n\t}\n\n\tprivate get _remoteResourcesPath(): string {\n\t\treturn paths.posix.join(this._serverRootPath, Schemas.vscodeRemoteResource);\n\t}\n\n\trewrite(uri: URI): URI {\n\t\tif (this._delegate) {\n\t\t\ttry {\n\t\t\t\treturn this._delegate(uri);\n\t\t\t} catch (err) {\n\t\t\t\terrors.onUnexpectedError(err);\n\t\t\t\treturn uri;\n\t\t\t}\n\t\t}\n\t\tconst authority = uri.authority;\n\t\tlet host = this._hosts[authority];\n\t\tif (host && host.indexOf(':') !== -1 && host.indexOf('[') === -1) {\n\t\t\thost = `[${host}]`;\n\t\t}\n\t\tconst port = this._ports[authority];\n\t\tconst connectionToken = this._connectionTokens[authority];\n\t\tlet query = `path=${encodeURIComponent(uri.path)}`;\n\t\tif (typeof connectionToken === 'string') {\n\t\t\tquery += `&${connectionTokenQueryName}=${encodeURIComponent(connectionToken)}`;\n\t\t}\n\t\treturn URI.from({\n\t\t\tscheme: platform.isWeb ? this._preferredWebSchema : Schemas.vscodeRemoteResource,\n\t\t\tauthority: `${host}:${port}`,\n\t\t\tpath: this._remoteResourcesPath,\n\t\t\tquery\n\t\t});\n\t}\n}\n\nexport const RemoteAuthorities = new RemoteAuthoritiesImpl();\n\nexport const VSCODE_AUTHORITY = 'vscode-app';\n\nclass FileAccessImpl {\n\n\tprivate static readonly FALLBACK_AUTHORITY = VSCODE_AUTHORITY;\n\n\t/**\n\t * Returns a URI to use in contexts where the browser is responsible\n\t * for loading (e.g. fetch()) or when used within the DOM.\n\t *\n\t * **Note:** use `dom.ts#asCSSUrl` whenever the URL is to be used in CSS context.\n\t */\n\turiToBrowserUri(uri: URI): URI {\n\t\t// Handle remote URIs via `RemoteAuthorities`\n\t\tif (uri.scheme === Schemas.vscodeRemote) {\n\t\t\treturn RemoteAuthorities.rewrite(uri);\n\t\t}\n\n\t\t// Convert to `vscode-file` resource..\n\t\tif (\n\t\t\t// ...only ever for `file` resources\n\t\t\turi.scheme === Schemas.file &&\n\t\t\t(\n\t\t\t\t// ...and we run in native environments\n\t\t\t\tplatform.isNative ||\n\t\t\t\t// ...or web worker extensions on desktop\n\t\t\t\t(platform.webWorkerOrigin === `${Schemas.vscodeFileResource}://${FileAccessImpl.FALLBACK_AUTHORITY}`)\n\t\t\t)\n\t\t) {\n\t\t\treturn uri.with({\n\t\t\t\tscheme: Schemas.vscodeFileResource,\n\t\t\t\t// We need to provide an authority here so that it can serve\n\t\t\t\t// as origin for network and loading matters in chromium.\n\t\t\t\t// If the URI is not coming with an authority already, we\n\t\t\t\t// add our own\n\t\t\t\tauthority: uri.authority || FileAccessImpl.FALLBACK_AUTHORITY,\n\t\t\t\tquery: null,\n\t\t\t\tfragment: null\n\t\t\t});\n\t\t}\n\n\t\treturn uri;\n\t}\n}\n\nexport const FileAccess = new FileAccessImpl();\n\nexport const CacheControlheaders: Record<string, string> = Object.freeze({\n\t'Cache-Control': 'no-cache, no-store'\n});\n\nexport const DocumentPolicyheaders: Record<string, string> = Object.freeze({\n\t'Document-Policy': 'include-js-call-stacks-in-crash-reports'\n});\n\nexport namespace COI {\n\n\tconst coiHeaders = new Map<'3' | '2' | '1' | string, Record<string, string>>([\n\t\t['1', { 'Cross-Origin-Opener-Policy': 'same-origin' }],\n\t\t['2', { 'Cross-Origin-Embedder-Policy': 'require-corp' }],\n\t\t['3', { 'Cross-Origin-Opener-Policy': 'same-origin', 'Cross-Origin-Embedder-Policy': 'require-corp' }],\n\t]);\n\n\texport const CoopAndCoep = Object.freeze(coiHeaders.get('3'));\n\n\tconst coiSearchParamName = 'vscode-coi';\n\n\t/**\n\t * Extract desired headers from `vscode-coi` invocation\n\t */\n\texport function getHeadersFromQuery(url: string | URI | URL): Record<string, string> | undefined {\n\t\tlet params: URLSearchParams | undefined;\n\t\tif (typeof url === 'string') {\n\t\t\tparams = new URL(url).searchParams;\n\t\t} else if (url instanceof URL) {\n\t\t\tparams = url.searchParams;\n\t\t} else if (URI.isUri(url)) {\n\t\t\tparams = new URL(url.toString(true)).searchParams;\n\t\t}\n\t\tconst value = params?.get(coiSearchParamName);\n\t\tif (!value) {\n\t\t\treturn undefined;\n\t\t}\n\t\treturn coiHeaders.get(value);\n\t}\n\n\t/**\n\t * Add the `vscode-coi` query attribute based on wanting `COOP` and `COEP`. Will be a noop when `crossOriginIsolated`\n\t * isn't enabled the current context\n\t */\n\texport function addSearchParam(urlOrSearch: URLSearchParams | Record<string, string>, coop: boolean, coep: boolean): void {\n\t\tif (!(<any>globalThis).crossOriginIsolated) {\n\t\t\t// depends on the current context being COI\n\t\t\treturn;\n\t\t}\n\t\tconst value = coop && coep ? '3' : coep ? '2' : '1';\n\t\tif (urlOrSearch instanceof URLSearchParams) {\n\t\t\turlOrSearch.set(coiSearchParamName, value);\n\t\t} else {\n\t\t\t(<Record<string, string>>urlOrSearch)[coiSearchParamName] = value;\n\t\t}\n\t}\n}\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\nimport * as errors from './errors.js';\nimport * as platform from './platform.js';\nimport { equalsIgnoreCase, startsWithIgnoreCase } from './strings.js';\nimport { URI } from './uri.js';\nimport * as paths from './path.js';\n\nexport namespace Schemas {\n\n\t/**\n\t * A schema that is used for models that exist in memory\n\t * only and that have no correspondence on a server or such.\n\t */\n\texport const inMemory = 'inmemory';\n\n\t/**\n\t * A schema that is used for setting files\n\t */\n\texport const vscode = 'vscode';\n\n\t/**\n\t * A schema that is used for internal private files\n\t */\n\texport const internal = 'private';\n\n\t/**\n\t * A walk-through document.\n\t */\n\texport const walkThrough = 'walkThrough';\n\n\t/**\n\t * An embedded code snippet.\n\t */\n\texport const walkThroughSnippet = 'walkThroughSnippet';\n\n\texport const http = 'http';\n\n\texport const https = 'https';\n\n\texport const file = 'file';\n\n\texport const mailto = 'mailto';\n\n\texport const untitled = 'untitled';\n\n\texport const data = 'data';\n\n\texport const command = 'command';\n\n\texport const vscodeRemote = 'vscode-remote';\n\n\texport const vscodeRemoteResource = 'vscode-remote-resource';\n\n\texport const vscodeManagedRemoteResource = 'vscode-managed-remote-resource';\n\n\texport const vscodeUserData = 'vscode-userdata';\n\n\texport const vscodeCustomEditor = 'vscode-custom-editor';\n\n\texport const vscodeNotebookCell = 'vscode-notebook-cell';\n\texport const vscodeNotebookCellMetadata = 'vscode-notebook-cell-metadata';\n\texport const vscodeNotebookCellMetadataDiff = 'vscode-notebook-cell-metadata-diff';\n\texport const vscodeNotebookCellOutput = 'vscode-notebook-cell-output';\n\texport const vscodeNotebookCellOutputDiff = 'vscode-notebook-cell-output-diff';\n\texport const vscodeNotebookMetadata = 'vscode-notebook-metadata';\n\texport const vscodeInteractiveInput = 'vscode-interactive-input';\n\n\texport const vscodeSettings = 'vscode-settings';\n\n\texport const vscodeWorkspaceTrust = 'vscode-workspace-trust';\n\n\texport const vscodeTerminal = 'vscode-terminal';\n\n\t/** Scheme used for code blocks in chat. */\n\texport const vscodeChatCodeBlock = 'vscode-chat-code-block';\n\n\t/** Scheme used for LHS of code compare (aka diff) blocks in chat. */\n\texport const vscodeChatCodeCompareBlock = 'vscode-chat-code-compare-block';\n\n\t/** Scheme used for the chat input editor. */\n\texport const vscodeChatEditor = 'vscode-chat-editor';\n\n\t/** Scheme used for the chat input part */\n\texport const vscodeChatInput = 'chatSessionInput';\n\n\t/** Scheme for chat session content */\n\texport const vscodeChatSession = 'vscode-chat-session';\n\n\t/**\n\t * Scheme used internally for webviews that aren't linked to a resource (i.e. not custom editors)\n\t */\n\texport const webviewPanel = 'webview-panel';\n\n\t/**\n\t * Scheme used for loading the wrapper html and script in webviews.\n\t */\n\texport const vscodeWebview = 'vscode-webview';\n\n\t/**\n\t * Scheme used for extension pages\n\t */\n\texport const extension = 'extension';\n\n\t/**\n\t * Scheme used as a replacement of `file` scheme to load\n\t * files with our custom protocol handler (desktop only).\n\t */\n\texport const vscodeFileResource = 'vscode-file';\n\n\t/**\n\t * Scheme used for temporary resources\n\t */\n\texport const tmp = 'tmp';\n\n\t/**\n\t * Scheme used vs live share\n\t */\n\texport const vsls = 'vsls';\n\n\t/**\n\t * Scheme used for the Source Control commit input's text document\n\t */\n\texport const vscodeSourceControl = 'vscode-scm';\n\n\t/**\n\t * Scheme used for input box for creating comments.\n\t */\n\texport const commentsInput = 'comment';\n\n\t/**\n\t * Scheme used for special rendering of settings in the release notes\n\t */\n\texport const codeSetting = 'code-setting';\n\n\t/**\n\t * Scheme used for output panel resources\n\t */\n\texport const outputChannel = 'output';\n\n\t/**\n\t * Scheme used for the accessible view\n\t */\n\texport const accessibleView = 'accessible-view';\n\n\t/**\n\t * Used for snapshots of chat edits\n\t */\n\texport const chatEditingSnapshotScheme = 'chat-editing-snapshot-text-model';\n\texport const chatEditingModel = 'chat-editing-text-model';\n}\n\nexport function matchesScheme(target: URI | string, scheme: string): boolean {\n\tif (URI.isUri(target)) {\n\t\treturn equalsIgnoreCase(target.scheme, scheme);\n\t} else {\n\t\treturn startsWithIgnoreCase(target, scheme + ':');\n\t}\n}\n\nexport function matchesSomeScheme(target: URI | string, ...schemes: string[]): boolean {\n\treturn schemes.some(scheme => matchesScheme(target, scheme));\n}\nexport const connectionTokenQueryName = 'tkn';\n\nclass RemoteAuthoritiesImpl {\n\tprivate readonly _hosts: { [authority: string]: string | undefined } = Object.create(null);\n\tprivate readonly _ports: { [authority: string]: number | undefined } = Object.create(null);\n\tprivate readonly _connectionTokens: { [authority: string]: string | undefined } = Object.create(null);\n\tprivate _preferredWebSchema: 'http' | 'https' = 'http';\n\tprivate _delegate: ((uri: URI) => URI) | null = null;\n\tprivate _serverRootPath: string = '/';\n\n\tsetPreferredWebSchema(schema: 'http' | 'https') {\n\t\tthis._preferredWebSchema = schema;\n\t}\n\n\tprivate get _remoteResourcesPath(): string {\n\t\treturn paths.posix.join(this._serverRootPath, Schemas.vscodeRemoteResource);\n\t}\n\n\trewrite(uri: URI): URI {\n\t\tif (this._delegate) {\n\t\t\ttry {\n\t\t\t\treturn this._delegate(uri);\n\t\t\t} catch (err) {\n\t\t\t\terrors.onUnexpectedError(err);\n\t\t\t\treturn uri;\n\t\t\t}\n\t\t}\n\t\tconst authority = uri.authority;\n\t\tlet host = this._hosts[authority];\n\t\tif (host && host.indexOf(':') !== -1 && host.indexOf('[') === -1) {\n\t\t\thost = `[${host}]`;\n\t\t}\n\t\tconst port = this._ports[authority];\n\t\tconst connectionToken = this._connectionTokens[authority];\n\t\tlet query = `path=${encodeURIComponent(uri.path)}`;\n\t\tif (typeof connectionToken === 'string') {\n\t\t\tquery += `&${connectionTokenQueryName}=${encodeURIComponent(connectionToken)}`;\n\t\t}\n\t\treturn URI.from({\n\t\t\tscheme: platform.isWeb ? this._preferredWebSchema : Schemas.vscodeRemoteResource,\n\t\t\tauthority: `${host}:${port}`,\n\t\t\tpath: this._remoteResourcesPath,\n\t\t\tquery\n\t\t});\n\t}\n}\n\nexport const RemoteAuthorities = new RemoteAuthoritiesImpl();\n\nexport const VSCODE_AUTHORITY = 'vscode-app';\n\nclass FileAccessImpl {\n\n\tprivate static readonly FALLBACK_AUTHORITY = VSCODE_AUTHORITY;\n\n\t/**\n\t * Returns a URI to use in contexts where the browser is responsible\n\t * for loading (e.g. fetch()) or when used within the DOM.\n\t *\n\t * **Note:** use `dom.ts#asCSSUrl` whenever the URL is to be used in CSS context.\n\t */\n\turiToBrowserUri(uri: URI): URI {\n\t\t// Handle remote URIs via `RemoteAuthorities`\n\t\tif (uri.scheme === Schemas.vscodeRemote) {\n\t\t\treturn RemoteAuthorities.rewrite(uri);\n\t\t}\n\n\t\t// Convert to `vscode-file` resource..\n\t\tif (\n\t\t\t// ...only ever for `file` resources\n\t\t\turi.scheme === Schemas.file &&\n\t\t\t(\n\t\t\t\t// ...and we run in native environments\n\t\t\t\tplatform.isNative ||\n\t\t\t\t// ...or web worker extensions on desktop\n\t\t\t\t(platform.webWorkerOrigin === `${Schemas.vscodeFileResource}://${FileAccessImpl.FALLBACK_AUTHORITY}`)\n\t\t\t)\n\t\t) {\n\t\t\treturn uri.with({\n\t\t\t\tscheme: Schemas.vscodeFileResource,\n\t\t\t\t// We need to provide an authority here so that it can serve\n\t\t\t\t// as origin for network and loading matters in chromium.\n\t\t\t\t// If the URI is not coming with an authority already, we\n\t\t\t\t// add our own\n\t\t\t\tauthority: uri.authority || FileAccessImpl.FALLBACK_AUTHORITY,\n\t\t\t\tquery: null,\n\t\t\t\tfragment: null\n\t\t\t});\n\t\t}\n\n\t\treturn uri;\n\t}\n}\n\nexport const FileAccess = new FileAccessImpl();\n\nexport const CacheControlheaders: Record<string, string> = Object.freeze({\n\t'Cache-Control': 'no-cache, no-store'\n});\n\nexport const DocumentPolicyheaders: Record<string, string> = Object.freeze({\n\t'Document-Policy': 'include-js-call-stacks-in-crash-reports'\n});\n\nexport namespace COI {\n\n\tconst coiHeaders = new Map<'3' | '2' | '1' | string, Record<string, string>>([\n\t\t['1', { 'Cross-Origin-Opener-Policy': 'same-origin' }],\n\t\t['2', { 'Cross-Origin-Embedder-Policy': 'require-corp' }],\n\t\t['3', { 'Cross-Origin-Opener-Policy': 'same-origin', 'Cross-Origin-Embedder-Policy': 'require-corp' }],\n\t]);\n\n\texport const CoopAndCoep = Object.freeze(coiHeaders.get('3'));\n\n\tconst coiSearchParamName = 'vscode-coi';\n\n\t/**\n\t * Extract desired headers from `vscode-coi` invocation\n\t */\n\texport function getHeadersFromQuery(url: string | URI | URL): Record<string, string> | undefined {\n\t\tlet params: URLSearchParams | undefined;\n\t\tif (typeof url === 'string') {\n\t\t\tparams = new URL(url).searchParams;\n\t\t} else if (url instanceof URL) {\n\t\t\tparams = url.searchParams;\n\t\t} else if (URI.isUri(url)) {\n\t\t\tparams = new URL(url.toString(true)).searchParams;\n\t\t}\n\t\tconst value = params?.get(coiSearchParamName);\n\t\tif (!value) {\n\t\t\treturn undefined;\n\t\t}\n\t\treturn coiHeaders.get(value);\n\t}\n\n\t/**\n\t * Add the `vscode-coi` query attribute based on wanting `COOP` and `COEP`. Will be a noop when `crossOriginIsolated`\n\t * isn't enabled the current context\n\t */\n\texport function addSearchParam(urlOrSearch: URLSearchParams | Record<string, string>, coop: boolean, coep: boolean): void {\n\t\tif (!(<any>globalThis).crossOriginIsolated) {\n\t\t\t// depends on the current context being COI\n\t\t\treturn;\n\t\t}\n\t\tconst value = coop && coep ? '3' : coep ? '2' : '1';\n\t\tif (urlOrSearch instanceof URLSearchParams) {\n\t\t\turlOrSearch.set(coiSearchParamName, value);\n\t\t} else {\n\t\t\t(<Record<string, string>>urlOrSearch)[coiSearchParamName] = value;\n\t\t}\n\t}\n}\n"]}
1
+ {"version":3,"sources":["file:///mnt/vss/_work/1/s/dependencies/vscode/out-editor-src/vs/base/common/network.ts","vs/base/common/network.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;AAEhG,OAAO,KAAK,MAAM,MAAM,aAAa,CAAC;AACtC,OAAO,KAAK,QAAQ,MAAM,eAAe,CAAC;AAC1C,OAAO,EAAE,gBAAgB,EAAE,oBAAoB,EAAE,MAAM,cAAc,CAAC;AACtE,OAAO,EAAE,GAAG,EAAE,MAAM,UAAU,CAAC;AAC/B,OAAO,KAAK,KAAK,MAAM,WAAW,CAAC;AAEnC,MAAM,KAAW,OAAO,CA8IvB;AA9ID,WAAiB,OAAO;IAEvB;;;OAGG;IACU,gBAAQ,GAAG,UAAU,CAAC;IAEnC;;OAEG;IACU,cAAM,GAAG,QAAQ,CAAC;IAE/B;;OAE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QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,YAAY,CAAC;QACnD,CAAC;QACD,MAAM,KAAK,GAAG,MAAM,EAAE,GAAG,CAAC,kBAAkB,CAAC,CAAC;QAC9C,IAAI,CAAC,KAAK,EAAE,CAAC;YACZ,OAAO,SAAS,CAAC;QAClB,CAAC;QACD,OAAO,UAAU,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;IAC9B,CAAC;IAde,uBAAmB,sBAclC,CAAA;IAED;;;OAGG;IACH,SAAgB,cAAc,CAAC,WAAqD,EAAE,IAAa,EAAE,IAAa;QACjH,mDAAmD;QACnD,IAAI,CAAO,UAAW,CAAC,mBAAmB,EAAE,CAAC;YAC5C,2CAA2C;YAC3C,OAAO;QACR,CAAC;QACD,MAAM,KAAK,GAAG,IAAI,IAAI,IAAI,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC;QACpD,IAAI,WAAW,YAAY,eAAe,EAAE,CAAC;YAC5C,WAAW,CAAC,GAAG,CAAC,kBAAkB,EAAE,KAAK,CAAC,CAAC;QAC5C,CAAC;aAAM,CAAC;YACkB,WAAY,CAAC,kBAAkB,CAAC,GAAG,KAAK,CAAC;QACnE,CAAC;IACF,CAAC;IAZe,kBAAc,iBAY7B,CAAA;AACF,CAAC,EAhDgB,GAAG,KAAH,GAAG,QAgDnB","file":"network.js","sourceRoot":"file:///mnt/vss/_work/1/s/dependencies/vscode/out-editor-src","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\nimport * as errors from './errors.js';\nimport * as platform from './platform.js';\nimport { equalsIgnoreCase, startsWithIgnoreCase } from './strings.js';\nimport { URI } from './uri.js';\nimport * as paths from './path.js';\n\nexport namespace Schemas {\n\n\t/**\n\t * A schema that is used for models that exist in memory\n\t * only and that have no correspondence on a server or such.\n\t */\n\texport const inMemory = 'inmemory';\n\n\t/**\n\t * A schema that is used for setting files\n\t */\n\texport const vscode = 'vscode';\n\n\t/**\n\t * A schema that is used for internal private files\n\t */\n\texport const internal = 'private';\n\n\t/**\n\t * A walk-through document.\n\t */\n\texport const walkThrough = 'walkThrough';\n\n\t/**\n\t * An embedded code snippet.\n\t */\n\texport const walkThroughSnippet = 'walkThroughSnippet';\n\n\texport const http = 'http';\n\n\texport const https = 'https';\n\n\texport const file = 'file';\n\n\texport const mailto = 'mailto';\n\n\texport const untitled = 'untitled';\n\n\texport const data = 'data';\n\n\texport const command = 'command';\n\n\texport const vscodeRemote = 'vscode-remote';\n\n\texport const vscodeRemoteResource = 'vscode-remote-resource';\n\n\texport const vscodeManagedRemoteResource = 'vscode-managed-remote-resource';\n\n\texport const vscodeUserData = 'vscode-userdata';\n\n\texport const vscodeCustomEditor = 'vscode-custom-editor';\n\n\texport const vscodeNotebookCell = 'vscode-notebook-cell';\n\texport const vscodeNotebookCellMetadata = 'vscode-notebook-cell-metadata';\n\texport const vscodeNotebookCellMetadataDiff = 'vscode-notebook-cell-metadata-diff';\n\texport const vscodeNotebookCellOutput = 'vscode-notebook-cell-output';\n\texport const vscodeNotebookCellOutputDiff = 'vscode-notebook-cell-output-diff';\n\texport const vscodeNotebookMetadata = 'vscode-notebook-metadata';\n\texport const vscodeInteractiveInput = 'vscode-interactive-input';\n\n\texport const vscodeSettings = 'vscode-settings';\n\n\texport const vscodeWorkspaceTrust = 'vscode-workspace-trust';\n\n\texport const vscodeTerminal = 'vscode-terminal';\n\n\t/** Scheme used for code blocks in chat. */\n\texport const vscodeChatCodeBlock = 'vscode-chat-code-block';\n\n\t/** Scheme used for LHS of code compare (aka diff) blocks in chat. */\n\texport const vscodeChatCodeCompareBlock = 'vscode-chat-code-compare-block';\n\n\t/** Scheme used for the chat input editor. */\n\texport const vscodeChatEditor = 'vscode-chat-editor';\n\n\t/** Scheme used for the chat input part */\n\texport const vscodeChatInput = 'chatSessionInput';\n\n\t/** Scheme for chat session content */\n\texport const vscodeChatSession = 'vscode-chat-session';\n\n\t/**\n\t * Scheme used internally for webviews that aren't linked to a resource (i.e. not custom editors)\n\t */\n\texport const webviewPanel = 'webview-panel';\n\n\t/**\n\t * Scheme used for loading the wrapper html and script in webviews.\n\t */\n\texport const vscodeWebview = 'vscode-webview';\n\n\t/**\n\t * Scheme used for extension pages\n\t */\n\texport const extension = 'extension';\n\n\t/**\n\t * Scheme used as a replacement of `file` scheme to load\n\t * files with our custom protocol handler (desktop only).\n\t */\n\texport const vscodeFileResource = 'vscode-file';\n\n\t/**\n\t * Scheme used for temporary resources\n\t */\n\texport const tmp = 'tmp';\n\n\t/**\n\t * Scheme used vs live share\n\t */\n\texport const vsls = 'vsls';\n\n\t/**\n\t * Scheme used for the Source Control commit input's text document\n\t */\n\texport const vscodeSourceControl = 'vscode-scm';\n\n\t/**\n\t * Scheme used for input box for creating comments.\n\t */\n\texport const commentsInput = 'comment';\n\n\t/**\n\t * Scheme used for special rendering of settings in the release notes\n\t */\n\texport const codeSetting = 'code-setting';\n\n\t/**\n\t * Scheme used for output panel resources\n\t */\n\texport const outputChannel = 'output';\n\n\t/**\n\t * Scheme used for the accessible view\n\t */\n\texport const accessibleView = 'accessible-view';\n\n\t/**\n\t * Used for snapshots of chat edits\n\t */\n\texport const chatEditingSnapshotScheme = 'chat-editing-snapshot-text-model';\n\texport const chatEditingModel = 'chat-editing-text-model';\n}\n\nexport function matchesScheme(target: URI | string, scheme: string): boolean {\n\tif (URI.isUri(target)) {\n\t\treturn equalsIgnoreCase(target.scheme, scheme);\n\t} else {\n\t\treturn startsWithIgnoreCase(target, scheme + ':');\n\t}\n}\n\nexport function matchesSomeScheme(target: URI | string, ...schemes: string[]): boolean {\n\treturn schemes.some(scheme => matchesScheme(target, scheme));\n}\nexport const connectionTokenQueryName = 'tkn';\n\nclass RemoteAuthoritiesImpl {\n\tprivate readonly _hosts: { [authority: string]: string | undefined } = Object.create(null);\n\tprivate readonly _ports: { [authority: string]: number | undefined } = Object.create(null);\n\tprivate readonly _connectionTokens: { [authority: string]: string | undefined } = Object.create(null);\n\tprivate _preferredWebSchema: 'http' | 'https' = 'http';\n\tprivate _delegate: ((uri: URI) => URI) | null = null;\n\tprivate _serverRootPath: string = '/';\n\n\tsetPreferredWebSchema(schema: 'http' | 'https') {\n\t\tthis._preferredWebSchema = schema;\n\t}\n\n\tprivate get _remoteResourcesPath(): string {\n\t\treturn paths.posix.join(this._serverRootPath, Schemas.vscodeRemoteResource);\n\t}\n\n\trewrite(uri: URI): URI {\n\t\tif (this._delegate) {\n\t\t\ttry {\n\t\t\t\treturn this._delegate(uri);\n\t\t\t} catch (err) {\n\t\t\t\terrors.onUnexpectedError(err);\n\t\t\t\treturn uri;\n\t\t\t}\n\t\t}\n\t\tconst authority = uri.authority;\n\t\tlet host = this._hosts[authority];\n\t\tif (host && host.indexOf(':') !== -1 && host.indexOf('[') === -1) {\n\t\t\thost = `[${host}]`;\n\t\t}\n\t\tconst port = this._ports[authority];\n\t\tconst connectionToken = this._connectionTokens[authority];\n\t\tlet query = `path=${encodeURIComponent(uri.path)}`;\n\t\tif (typeof connectionToken === 'string') {\n\t\t\tquery += `&${connectionTokenQueryName}=${encodeURIComponent(connectionToken)}`;\n\t\t}\n\t\treturn URI.from({\n\t\t\tscheme: platform.isWeb ? this._preferredWebSchema : Schemas.vscodeRemoteResource,\n\t\t\tauthority: `${host}:${port}`,\n\t\t\tpath: this._remoteResourcesPath,\n\t\t\tquery\n\t\t});\n\t}\n}\n\nexport const RemoteAuthorities = new RemoteAuthoritiesImpl();\n\nexport const VSCODE_AUTHORITY = 'vscode-app';\n\nclass FileAccessImpl {\n\n\tprivate static readonly FALLBACK_AUTHORITY = VSCODE_AUTHORITY;\n\n\t/**\n\t * Returns a URI to use in contexts where the browser is responsible\n\t * for loading (e.g. fetch()) or when used within the DOM.\n\t *\n\t * **Note:** use `dom.ts#asCSSUrl` whenever the URL is to be used in CSS context.\n\t */\n\turiToBrowserUri(uri: URI): URI {\n\t\t// Handle remote URIs via `RemoteAuthorities`\n\t\tif (uri.scheme === Schemas.vscodeRemote) {\n\t\t\treturn RemoteAuthorities.rewrite(uri);\n\t\t}\n\n\t\t// Convert to `vscode-file` resource..\n\t\tif (\n\t\t\t// ...only ever for `file` resources\n\t\t\turi.scheme === Schemas.file &&\n\t\t\t(\n\t\t\t\t// ...and we run in native environments\n\t\t\t\tplatform.isNative ||\n\t\t\t\t// ...or web worker extensions on desktop\n\t\t\t\t(platform.webWorkerOrigin === `${Schemas.vscodeFileResource}://${FileAccessImpl.FALLBACK_AUTHORITY}`)\n\t\t\t)\n\t\t) {\n\t\t\treturn uri.with({\n\t\t\t\tscheme: Schemas.vscodeFileResource,\n\t\t\t\t// We need to provide an authority here so that it can serve\n\t\t\t\t// as origin for network and loading matters in chromium.\n\t\t\t\t// If the URI is not coming with an authority already, we\n\t\t\t\t// add our own\n\t\t\t\tauthority: uri.authority || FileAccessImpl.FALLBACK_AUTHORITY,\n\t\t\t\tquery: null,\n\t\t\t\tfragment: null\n\t\t\t});\n\t\t}\n\n\t\treturn uri;\n\t}\n}\n\nexport const FileAccess = new FileAccessImpl();\n\nexport const CacheControlheaders: Record<string, string> = Object.freeze({\n\t'Cache-Control': 'no-cache, no-store'\n});\n\nexport const DocumentPolicyheaders: Record<string, string> = Object.freeze({\n\t'Document-Policy': 'include-js-call-stacks-in-crash-reports'\n});\n\nexport namespace COI {\n\n\tconst coiHeaders = new Map<'3' | '2' | '1' | string, Record<string, string>>([\n\t\t['1', { 'Cross-Origin-Opener-Policy': 'same-origin' }],\n\t\t['2', { 'Cross-Origin-Embedder-Policy': 'require-corp' }],\n\t\t['3', { 'Cross-Origin-Opener-Policy': 'same-origin', 'Cross-Origin-Embedder-Policy': 'require-corp' }],\n\t]);\n\n\texport const CoopAndCoep = Object.freeze(coiHeaders.get('3'));\n\n\tconst coiSearchParamName = 'vscode-coi';\n\n\t/**\n\t * Extract desired headers from `vscode-coi` invocation\n\t */\n\texport function getHeadersFromQuery(url: string | URI | URL): Record<string, string> | undefined {\n\t\tlet params: URLSearchParams | undefined;\n\t\tif (typeof url === 'string') {\n\t\t\tparams = new URL(url).searchParams;\n\t\t} else if (url instanceof URL) {\n\t\t\tparams = url.searchParams;\n\t\t} else if (URI.isUri(url)) {\n\t\t\tparams = new URL(url.toString(true)).searchParams;\n\t\t}\n\t\tconst value = params?.get(coiSearchParamName);\n\t\tif (!value) {\n\t\t\treturn undefined;\n\t\t}\n\t\treturn coiHeaders.get(value);\n\t}\n\n\t/**\n\t * Add the `vscode-coi` query attribute based on wanting `COOP` and `COEP`. Will be a noop when `crossOriginIsolated`\n\t * isn't enabled the current context\n\t */\n\texport function addSearchParam(urlOrSearch: URLSearchParams | Record<string, string>, coop: boolean, coep: boolean): void {\n\t\t// eslint-disable-next-line local/code-no-any-casts\n\t\tif (!(<any>globalThis).crossOriginIsolated) {\n\t\t\t// depends on the current context being COI\n\t\t\treturn;\n\t\t}\n\t\tconst value = coop && coep ? '3' : coep ? '2' : '1';\n\t\tif (urlOrSearch instanceof URLSearchParams) {\n\t\t\turlOrSearch.set(coiSearchParamName, value);\n\t\t} else {\n\t\t\t(<Record<string, string>>urlOrSearch)[coiSearchParamName] = value;\n\t\t}\n\t}\n}\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\nimport * as errors from './errors.js';\nimport * as platform from './platform.js';\nimport { equalsIgnoreCase, startsWithIgnoreCase } from './strings.js';\nimport { URI } from './uri.js';\nimport * as paths from './path.js';\n\nexport namespace Schemas {\n\n\t/**\n\t * A schema that is used for models that exist in memory\n\t * only and that have no correspondence on a server or such.\n\t */\n\texport const inMemory = 'inmemory';\n\n\t/**\n\t * A schema that is used for setting files\n\t */\n\texport const vscode = 'vscode';\n\n\t/**\n\t * A schema that is used for internal private files\n\t */\n\texport const internal = 'private';\n\n\t/**\n\t * A walk-through document.\n\t */\n\texport const walkThrough = 'walkThrough';\n\n\t/**\n\t * An embedded code snippet.\n\t */\n\texport const walkThroughSnippet = 'walkThroughSnippet';\n\n\texport const http = 'http';\n\n\texport const https = 'https';\n\n\texport const file = 'file';\n\n\texport const mailto = 'mailto';\n\n\texport const untitled = 'untitled';\n\n\texport const data = 'data';\n\n\texport const command = 'command';\n\n\texport const vscodeRemote = 'vscode-remote';\n\n\texport const vscodeRemoteResource = 'vscode-remote-resource';\n\n\texport const vscodeManagedRemoteResource = 'vscode-managed-remote-resource';\n\n\texport const vscodeUserData = 'vscode-userdata';\n\n\texport const vscodeCustomEditor = 'vscode-custom-editor';\n\n\texport const vscodeNotebookCell = 'vscode-notebook-cell';\n\texport const vscodeNotebookCellMetadata = 'vscode-notebook-cell-metadata';\n\texport const vscodeNotebookCellMetadataDiff = 'vscode-notebook-cell-metadata-diff';\n\texport const vscodeNotebookCellOutput = 'vscode-notebook-cell-output';\n\texport const vscodeNotebookCellOutputDiff = 'vscode-notebook-cell-output-diff';\n\texport const vscodeNotebookMetadata = 'vscode-notebook-metadata';\n\texport const vscodeInteractiveInput = 'vscode-interactive-input';\n\n\texport const vscodeSettings = 'vscode-settings';\n\n\texport const vscodeWorkspaceTrust = 'vscode-workspace-trust';\n\n\texport const vscodeTerminal = 'vscode-terminal';\n\n\t/** Scheme used for code blocks in chat. */\n\texport const vscodeChatCodeBlock = 'vscode-chat-code-block';\n\n\t/** Scheme used for LHS of code compare (aka diff) blocks in chat. */\n\texport const vscodeChatCodeCompareBlock = 'vscode-chat-code-compare-block';\n\n\t/** Scheme used for the chat input editor. */\n\texport const vscodeChatEditor = 'vscode-chat-editor';\n\n\t/** Scheme used for the chat input part */\n\texport const vscodeChatInput = 'chatSessionInput';\n\n\t/** Scheme for chat session content */\n\texport const vscodeChatSession = 'vscode-chat-session';\n\n\t/**\n\t * Scheme used internally for webviews that aren't linked to a resource (i.e. not custom editors)\n\t */\n\texport const webviewPanel = 'webview-panel';\n\n\t/**\n\t * Scheme used for loading the wrapper html and script in webviews.\n\t */\n\texport const vscodeWebview = 'vscode-webview';\n\n\t/**\n\t * Scheme used for extension pages\n\t */\n\texport const extension = 'extension';\n\n\t/**\n\t * Scheme used as a replacement of `file` scheme to load\n\t * files with our custom protocol handler (desktop only).\n\t */\n\texport const vscodeFileResource = 'vscode-file';\n\n\t/**\n\t * Scheme used for temporary resources\n\t */\n\texport const tmp = 'tmp';\n\n\t/**\n\t * Scheme used vs live share\n\t */\n\texport const vsls = 'vsls';\n\n\t/**\n\t * Scheme used for the Source Control commit input's text document\n\t */\n\texport const vscodeSourceControl = 'vscode-scm';\n\n\t/**\n\t * Scheme used for input box for creating comments.\n\t */\n\texport const commentsInput = 'comment';\n\n\t/**\n\t * Scheme used for special rendering of settings in the release notes\n\t */\n\texport const codeSetting = 'code-setting';\n\n\t/**\n\t * Scheme used for output panel resources\n\t */\n\texport const outputChannel = 'output';\n\n\t/**\n\t * Scheme used for the accessible view\n\t */\n\texport const accessibleView = 'accessible-view';\n\n\t/**\n\t * Used for snapshots of chat edits\n\t */\n\texport const chatEditingSnapshotScheme = 'chat-editing-snapshot-text-model';\n\texport const chatEditingModel = 'chat-editing-text-model';\n}\n\nexport function matchesScheme(target: URI | string, scheme: string): boolean {\n\tif (URI.isUri(target)) {\n\t\treturn equalsIgnoreCase(target.scheme, scheme);\n\t} else {\n\t\treturn startsWithIgnoreCase(target, scheme + ':');\n\t}\n}\n\nexport function matchesSomeScheme(target: URI | string, ...schemes: string[]): boolean {\n\treturn schemes.some(scheme => matchesScheme(target, scheme));\n}\nexport const connectionTokenQueryName = 'tkn';\n\nclass RemoteAuthoritiesImpl {\n\tprivate readonly _hosts: { [authority: string]: string | undefined } = Object.create(null);\n\tprivate readonly _ports: { [authority: string]: number | undefined } = Object.create(null);\n\tprivate readonly _connectionTokens: { [authority: string]: string | undefined } = Object.create(null);\n\tprivate _preferredWebSchema: 'http' | 'https' = 'http';\n\tprivate _delegate: ((uri: URI) => URI) | null = null;\n\tprivate _serverRootPath: string = '/';\n\n\tsetPreferredWebSchema(schema: 'http' | 'https') {\n\t\tthis._preferredWebSchema = schema;\n\t}\n\n\tprivate get _remoteResourcesPath(): string {\n\t\treturn paths.posix.join(this._serverRootPath, Schemas.vscodeRemoteResource);\n\t}\n\n\trewrite(uri: URI): URI {\n\t\tif (this._delegate) {\n\t\t\ttry {\n\t\t\t\treturn this._delegate(uri);\n\t\t\t} catch (err) {\n\t\t\t\terrors.onUnexpectedError(err);\n\t\t\t\treturn uri;\n\t\t\t}\n\t\t}\n\t\tconst authority = uri.authority;\n\t\tlet host = this._hosts[authority];\n\t\tif (host && host.indexOf(':') !== -1 && host.indexOf('[') === -1) {\n\t\t\thost = `[${host}]`;\n\t\t}\n\t\tconst port = this._ports[authority];\n\t\tconst connectionToken = this._connectionTokens[authority];\n\t\tlet query = `path=${encodeURIComponent(uri.path)}`;\n\t\tif (typeof connectionToken === 'string') {\n\t\t\tquery += `&${connectionTokenQueryName}=${encodeURIComponent(connectionToken)}`;\n\t\t}\n\t\treturn URI.from({\n\t\t\tscheme: platform.isWeb ? this._preferredWebSchema : Schemas.vscodeRemoteResource,\n\t\t\tauthority: `${host}:${port}`,\n\t\t\tpath: this._remoteResourcesPath,\n\t\t\tquery\n\t\t});\n\t}\n}\n\nexport const RemoteAuthorities = new RemoteAuthoritiesImpl();\n\nexport const VSCODE_AUTHORITY = 'vscode-app';\n\nclass FileAccessImpl {\n\n\tprivate static readonly FALLBACK_AUTHORITY = VSCODE_AUTHORITY;\n\n\t/**\n\t * Returns a URI to use in contexts where the browser is responsible\n\t * for loading (e.g. fetch()) or when used within the DOM.\n\t *\n\t * **Note:** use `dom.ts#asCSSUrl` whenever the URL is to be used in CSS context.\n\t */\n\turiToBrowserUri(uri: URI): URI {\n\t\t// Handle remote URIs via `RemoteAuthorities`\n\t\tif (uri.scheme === Schemas.vscodeRemote) {\n\t\t\treturn RemoteAuthorities.rewrite(uri);\n\t\t}\n\n\t\t// Convert to `vscode-file` resource..\n\t\tif (\n\t\t\t// ...only ever for `file` resources\n\t\t\turi.scheme === Schemas.file &&\n\t\t\t(\n\t\t\t\t// ...and we run in native environments\n\t\t\t\tplatform.isNative ||\n\t\t\t\t// ...or web worker extensions on desktop\n\t\t\t\t(platform.webWorkerOrigin === `${Schemas.vscodeFileResource}://${FileAccessImpl.FALLBACK_AUTHORITY}`)\n\t\t\t)\n\t\t) {\n\t\t\treturn uri.with({\n\t\t\t\tscheme: Schemas.vscodeFileResource,\n\t\t\t\t// We need to provide an authority here so that it can serve\n\t\t\t\t// as origin for network and loading matters in chromium.\n\t\t\t\t// If the URI is not coming with an authority already, we\n\t\t\t\t// add our own\n\t\t\t\tauthority: uri.authority || FileAccessImpl.FALLBACK_AUTHORITY,\n\t\t\t\tquery: null,\n\t\t\t\tfragment: null\n\t\t\t});\n\t\t}\n\n\t\treturn uri;\n\t}\n}\n\nexport const FileAccess = new FileAccessImpl();\n\nexport const CacheControlheaders: Record<string, string> = Object.freeze({\n\t'Cache-Control': 'no-cache, no-store'\n});\n\nexport const DocumentPolicyheaders: Record<string, string> = Object.freeze({\n\t'Document-Policy': 'include-js-call-stacks-in-crash-reports'\n});\n\nexport namespace COI {\n\n\tconst coiHeaders = new Map<'3' | '2' | '1' | string, Record<string, string>>([\n\t\t['1', { 'Cross-Origin-Opener-Policy': 'same-origin' }],\n\t\t['2', { 'Cross-Origin-Embedder-Policy': 'require-corp' }],\n\t\t['3', { 'Cross-Origin-Opener-Policy': 'same-origin', 'Cross-Origin-Embedder-Policy': 'require-corp' }],\n\t]);\n\n\texport const CoopAndCoep = Object.freeze(coiHeaders.get('3'));\n\n\tconst coiSearchParamName = 'vscode-coi';\n\n\t/**\n\t * Extract desired headers from `vscode-coi` invocation\n\t */\n\texport function getHeadersFromQuery(url: string | URI | URL): Record<string, string> | undefined {\n\t\tlet params: URLSearchParams | undefined;\n\t\tif (typeof url === 'string') {\n\t\t\tparams = new URL(url).searchParams;\n\t\t} else if (url instanceof URL) {\n\t\t\tparams = url.searchParams;\n\t\t} else if (URI.isUri(url)) {\n\t\t\tparams = new URL(url.toString(true)).searchParams;\n\t\t}\n\t\tconst value = params?.get(coiSearchParamName);\n\t\tif (!value) {\n\t\t\treturn undefined;\n\t\t}\n\t\treturn coiHeaders.get(value);\n\t}\n\n\t/**\n\t * Add the `vscode-coi` query attribute based on wanting `COOP` and `COEP`. Will be a noop when `crossOriginIsolated`\n\t * isn't enabled the current context\n\t */\n\texport function addSearchParam(urlOrSearch: URLSearchParams | Record<string, string>, coop: boolean, coep: boolean): void {\n\t\t// eslint-disable-next-line local/code-no-any-casts\n\t\tif (!(<any>globalThis).crossOriginIsolated) {\n\t\t\t// depends on the current context being COI\n\t\t\treturn;\n\t\t}\n\t\tconst value = coop && coep ? '3' : coep ? '2' : '1';\n\t\tif (urlOrSearch instanceof URLSearchParams) {\n\t\t\turlOrSearch.set(coiSearchParamName, value);\n\t\t} else {\n\t\t\t(<Record<string, string>>urlOrSearch)[coiSearchParamName] = value;\n\t\t}\n\t}\n}\n"]}
@@ -0,0 +1,39 @@
1
+ /*---------------------------------------------------------------------------------------------
2
+ * Copyright (c) Microsoft Corporation. All rights reserved.
3
+ * Licensed under the MIT License. See License.txt in the project root for license information.
4
+ *--------------------------------------------------------------------------------------------*/
5
+ import { LRUCache } from './map.js';
6
+ const nfcCache = new LRUCache(10000);
7
+ const nfdCache = new LRUCache(10000); // bounded to 10000 elements
8
+ export function normalizeNFD(str) {
9
+ return normalize(str, 'NFD', nfdCache);
10
+ }
11
+ const nonAsciiCharactersPattern = /[^\u0000-\u0080]/;
12
+ function normalize(str, form, normalizedCache) {
13
+ if (!str) {
14
+ return str;
15
+ }
16
+ const cached = normalizedCache.get(str);
17
+ if (cached) {
18
+ return cached;
19
+ }
20
+ let res;
21
+ if (nonAsciiCharactersPattern.test(str)) {
22
+ res = str.normalize(form);
23
+ }
24
+ else {
25
+ res = str;
26
+ }
27
+ // Use the cache for fast lookup
28
+ normalizedCache.set(str, res);
29
+ return res;
30
+ }
31
+ export const removeAccents = (function () {
32
+ // transform into NFD form and remove accents
33
+ // see: https://stackoverflow.com/questions/990904/remove-accents-diacritics-in-a-string-in-javascript/37511463#37511463
34
+ const regex = /[\u0300-\u036f]/g;
35
+ return function (str) {
36
+ return normalizeNFD(str).replace(regex, '');
37
+ };
38
+ })();
39
+ //# sourceMappingURL=normalization.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["file:///mnt/vss/_work/1/s/dependencies/vscode/out-editor-src/vs/base/common/normalization.ts","vs/base/common/normalization.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;AAEhG,OAAO,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AAEpC,MAAM,QAAQ,GAAG,IAAI,QAAQ,CAAiB,KAAK,CAAC,CAAC;AAErD,MAAM,QAAQ,GAAG,IAAI,QAAQ,CAAiB,KAAK,CAAC,CAAC,CAAC,4BAA4B;AAClF,MAAM,UAAU,YAAY,CAAC,GAAW;IACvC,OAAO,SAAS,CAAC,GAAG,EAAE,KAAK,EAAE,QAAQ,CAAC,CAAC;AACxC,CAAC;AAED,MAAM,yBAAyB,GAAG,kBAAkB,CAAC;AACrD,SAAS,SAAS,CAAC,GAAW,EAAE,IAAY,EAAE,eAAyC;IACtF,IAAI,CAAC,GAAG,EAAE,CAAC;QACV,OAAO,GAAG,CAAC;IACZ,CAAC;IAED,MAAM,MAAM,GAAG,eAAe,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;IACxC,IAAI,MAAM,EAAE,CAAC;QACZ,OAAO,MAAM,CAAC;IACf,CAAC;IAED,IAAI,GAAW,CAAC;IAChB,IAAI,yBAAyB,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC;QACzC,GAAG,GAAG,GAAG,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;IAC3B,CAAC;SAAM,CAAC;QACP,GAAG,GAAG,GAAG,CAAC;IACX,CAAC;IAED,gCAAgC;IAChC,eAAe,CAAC,GAAG,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC;IAE9B,OAAO,GAAG,CAAC;AACZ,CAAC;AAED,MAAM,CAAC,MAAM,aAAa,GAA4B,CAAC;IACtD,6CAA6C;IAC7C,wHAAwH;IACxH,MAAM,KAAK,GAAG,kBAAkB,CAAC;IACjC,OAAO,UAAU,GAAW;QAC3B,OAAO,YAAY,CAAC,GAAG,CAAC,CAAC,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;IAC7C,CAAC,CAAC;AACH,CAAC,CAAC,EAAE,CAAC","file":"normalization.js","sourceRoot":"file:///mnt/vss/_work/1/s/dependencies/vscode/out-editor-src","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\nimport { LRUCache } from './map.js';\n\nconst nfcCache = new LRUCache<string, string>(10000);\n\nconst nfdCache = new LRUCache<string, string>(10000); // bounded to 10000 elements\nexport function normalizeNFD(str: string): string {\n\treturn normalize(str, 'NFD', nfdCache);\n}\n\nconst nonAsciiCharactersPattern = /[^\\u0000-\\u0080]/;\nfunction normalize(str: string, form: string, normalizedCache: LRUCache<string, string>): string {\n\tif (!str) {\n\t\treturn str;\n\t}\n\n\tconst cached = normalizedCache.get(str);\n\tif (cached) {\n\t\treturn cached;\n\t}\n\n\tlet res: string;\n\tif (nonAsciiCharactersPattern.test(str)) {\n\t\tres = str.normalize(form);\n\t} else {\n\t\tres = str;\n\t}\n\n\t// Use the cache for fast lookup\n\tnormalizedCache.set(str, res);\n\n\treturn res;\n}\n\nexport const removeAccents: (str: string) => string = (function () {\n\t// transform into NFD form and remove accents\n\t// see: https://stackoverflow.com/questions/990904/remove-accents-diacritics-in-a-string-in-javascript/37511463#37511463\n\tconst regex = /[\\u0300-\\u036f]/g;\n\treturn function (str: string) {\n\t\treturn normalizeNFD(str).replace(regex, '');\n\t};\n})();\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\nimport { LRUCache } from './map.js';\n\nconst nfcCache = new LRUCache<string, string>(10000);\n\nconst nfdCache = new LRUCache<string, string>(10000); // bounded to 10000 elements\nexport function normalizeNFD(str: string): string {\n\treturn normalize(str, 'NFD', nfdCache);\n}\n\nconst nonAsciiCharactersPattern = /[^\\u0000-\\u0080]/;\nfunction normalize(str: string, form: string, normalizedCache: LRUCache<string, string>): string {\n\tif (!str) {\n\t\treturn str;\n\t}\n\n\tconst cached = normalizedCache.get(str);\n\tif (cached) {\n\t\treturn cached;\n\t}\n\n\tlet res: string;\n\tif (nonAsciiCharactersPattern.test(str)) {\n\t\tres = str.normalize(form);\n\t} else {\n\t\tres = str;\n\t}\n\n\t// Use the cache for fast lookup\n\tnormalizedCache.set(str, res);\n\n\treturn res;\n}\n\nexport const removeAccents: (str: string) => string = (function () {\n\t// transform into NFD form and remove accents\n\t// see: https://stackoverflow.com/questions/990904/remove-accents-diacritics-in-a-string-in-javascript/37511463#37511463\n\tconst regex = /[\\u0300-\\u036f]/g;\n\treturn function (str: string) {\n\t\treturn normalizeNFD(str).replace(regex, '');\n\t};\n})();\n"]}
@@ -62,6 +62,7 @@ function _cloneAndChange(obj, changer, seen) {
62
62
  const r2 = {};
63
63
  for (const i2 in obj) {
64
64
  if (_hasOwnProperty.call(obj, i2)) {
65
+ // eslint-disable-next-line local/code-no-any-casts
65
66
  r2[i2] = _cloneAndChange(obj[i2], changer, seen);
66
67
  }
67
68
  }
@@ -1 +1 @@
1
- {"version":3,"sources":["file:///mnt/vss/_work/1/s/dependencies/vscode/out-editor-src/vs/base/common/objects.ts","vs/base/common/objects.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;AAEhG,OAAO,EAAE,YAAY,EAAE,QAAQ,EAAE,iBAAiB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AAC;QACnB,CAAC;QACD,OAAO,CAAC,IAAI,EAAE,CAAC;QACf,MAAM,SAAS,GAAa,EAAE,CAAC;QAC/B,KAAK,GAAG,IAAI,KAAK,EAAE,CAAC;YACnB,SAAS,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QACrB,CAAC;QACD,SAAS,CAAC,IAAI,EAAE,CAAC;QACjB,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE,SAAS,CAAC,EAAE,CAAC;YACjC,OAAO,KAAK,CAAC;QACd,CAAC;QACD,KAAK,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;YACrC,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;gBACjD,OAAO,KAAK,CAAC;YACd,CAAC;QACF,CAAC;IACF,CAAC;IACD,OAAO,IAAI,CAAC;AACb,CAAC","file":"objects.js","sourceRoot":"file:///mnt/vss/_work/1/s/dependencies/vscode/out-editor-src","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\nimport { isTypedArray, isObject, isUndefinedOrNull } from './types.js';\n\nexport function deepClone<T>(obj: T): T {\n\tif (!obj || typeof obj !== 'object') {\n\t\treturn obj;\n\t}\n\tif (obj instanceof RegExp) {\n\t\treturn obj;\n\t}\n\tconst result: any = Array.isArray(obj) ? [] : {};\n\tObject.entries(obj).forEach(([key, value]) => {\n\t\tresult[key] = value && typeof value === 'object' ? deepClone(value) : value;\n\t});\n\treturn result;\n}\n\nexport function deepFreeze<T>(obj: T): T {\n\tif (!obj || typeof obj !== 'object') {\n\t\treturn obj;\n\t}\n\tconst stack: any[] = [obj];\n\twhile (stack.length > 0) {\n\t\tconst obj = stack.shift();\n\t\tObject.freeze(obj);\n\t\tfor (const key in obj) {\n\t\t\tif (_hasOwnProperty.call(obj, key)) {\n\t\t\t\tconst prop = obj[key];\n\t\t\t\tif (typeof prop === 'object' && !Object.isFrozen(prop) && !isTypedArray(prop)) {\n\t\t\t\t\tstack.push(prop);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\treturn obj;\n}\n\nconst _hasOwnProperty = Object.prototype.hasOwnProperty;\n\n\nexport function cloneAndChange(obj: any, changer: (orig: any) => any): any {\n\treturn _cloneAndChange(obj, changer, new Set());\n}\n\nfunction _cloneAndChange(obj: any, changer: (orig: any) => any, seen: Set<any>): any {\n\tif (isUndefinedOrNull(obj)) {\n\t\treturn obj;\n\t}\n\n\tconst changed = changer(obj);\n\tif (typeof changed !== 'undefined') {\n\t\treturn changed;\n\t}\n\n\tif (Array.isArray(obj)) {\n\t\tconst r1: any[] = [];\n\t\tfor (const e of obj) {\n\t\t\tr1.push(_cloneAndChange(e, changer, seen));\n\t\t}\n\t\treturn r1;\n\t}\n\n\tif (isObject(obj)) {\n\t\tif (seen.has(obj)) {\n\t\t\tthrow new Error('Cannot clone recursive data-structure');\n\t\t}\n\t\tseen.add(obj);\n\t\tconst r2 = {};\n\t\tfor (const i2 in obj) {\n\t\t\tif (_hasOwnProperty.call(obj, i2)) {\n\t\t\t\t(r2 as any)[i2] = _cloneAndChange(obj[i2], changer, seen);\n\t\t\t}\n\t\t}\n\t\tseen.delete(obj);\n\t\treturn r2;\n\t}\n\n\treturn obj;\n}\n\n/**\n * Copies all properties of source into destination. The optional parameter \"overwrite\" allows to control\n * if existing properties on the destination should be overwritten or not. Defaults to true (overwrite).\n */\nexport function mixin(destination: any, source: any, overwrite: boolean = true): any {\n\tif (!isObject(destination)) {\n\t\treturn source;\n\t}\n\n\tif (isObject(source)) {\n\t\tObject.keys(source).forEach(key => {\n\t\t\tif (key in destination) {\n\t\t\t\tif (overwrite) {\n\t\t\t\t\tif (isObject(destination[key]) && isObject(source[key])) {\n\t\t\t\t\t\tmixin(destination[key], source[key], overwrite);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tdestination[key] = source[key];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tdestination[key] = source[key];\n\t\t\t}\n\t\t});\n\t}\n\treturn destination;\n}\n\nexport function equals(one: any, other: any): boolean {\n\tif (one === other) {\n\t\treturn true;\n\t}\n\tif (one === null || one === undefined || other === null || other === undefined) {\n\t\treturn false;\n\t}\n\tif (typeof one !== typeof other) {\n\t\treturn false;\n\t}\n\tif (typeof one !== 'object') {\n\t\treturn false;\n\t}\n\tif ((Array.isArray(one)) !== (Array.isArray(other))) {\n\t\treturn false;\n\t}\n\n\tlet i: number;\n\tlet key: string;\n\n\tif (Array.isArray(one)) {\n\t\tif (one.length !== other.length) {\n\t\t\treturn false;\n\t\t}\n\t\tfor (i = 0; i < one.length; i++) {\n\t\t\tif (!equals(one[i], other[i])) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t} else {\n\t\tconst oneKeys: string[] = [];\n\n\t\tfor (key in one) {\n\t\t\toneKeys.push(key);\n\t\t}\n\t\toneKeys.sort();\n\t\tconst otherKeys: string[] = [];\n\t\tfor (key in other) {\n\t\t\totherKeys.push(key);\n\t\t}\n\t\totherKeys.sort();\n\t\tif (!equals(oneKeys, otherKeys)) {\n\t\t\treturn false;\n\t\t}\n\t\tfor (i = 0; i < oneKeys.length; i++) {\n\t\t\tif (!equals(one[oneKeys[i]], other[oneKeys[i]])) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t}\n\treturn true;\n}\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\nimport { isTypedArray, isObject, isUndefinedOrNull } from './types.js';\n\nexport function deepClone<T>(obj: T): T {\n\tif (!obj || typeof obj !== 'object') {\n\t\treturn obj;\n\t}\n\tif (obj instanceof RegExp) {\n\t\treturn obj;\n\t}\n\tconst result: any = Array.isArray(obj) ? [] : {};\n\tObject.entries(obj).forEach(([key, value]) => {\n\t\tresult[key] = value && typeof value === 'object' ? deepClone(value) : value;\n\t});\n\treturn result;\n}\n\nexport function deepFreeze<T>(obj: T): T {\n\tif (!obj || typeof obj !== 'object') {\n\t\treturn obj;\n\t}\n\tconst stack: any[] = [obj];\n\twhile (stack.length > 0) {\n\t\tconst obj = stack.shift();\n\t\tObject.freeze(obj);\n\t\tfor (const key in obj) {\n\t\t\tif (_hasOwnProperty.call(obj, key)) {\n\t\t\t\tconst prop = obj[key];\n\t\t\t\tif (typeof prop === 'object' && !Object.isFrozen(prop) && !isTypedArray(prop)) {\n\t\t\t\t\tstack.push(prop);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\treturn obj;\n}\n\nconst _hasOwnProperty = Object.prototype.hasOwnProperty;\n\n\nexport function cloneAndChange(obj: any, changer: (orig: any) => any): any {\n\treturn _cloneAndChange(obj, changer, new Set());\n}\n\nfunction _cloneAndChange(obj: any, changer: (orig: any) => any, seen: Set<any>): any {\n\tif (isUndefinedOrNull(obj)) {\n\t\treturn obj;\n\t}\n\n\tconst changed = changer(obj);\n\tif (typeof changed !== 'undefined') {\n\t\treturn changed;\n\t}\n\n\tif (Array.isArray(obj)) {\n\t\tconst r1: any[] = [];\n\t\tfor (const e of obj) {\n\t\t\tr1.push(_cloneAndChange(e, changer, seen));\n\t\t}\n\t\treturn r1;\n\t}\n\n\tif (isObject(obj)) {\n\t\tif (seen.has(obj)) {\n\t\t\tthrow new Error('Cannot clone recursive data-structure');\n\t\t}\n\t\tseen.add(obj);\n\t\tconst r2 = {};\n\t\tfor (const i2 in obj) {\n\t\t\tif (_hasOwnProperty.call(obj, i2)) {\n\t\t\t\t(r2 as any)[i2] = _cloneAndChange(obj[i2], changer, seen);\n\t\t\t}\n\t\t}\n\t\tseen.delete(obj);\n\t\treturn r2;\n\t}\n\n\treturn obj;\n}\n\n/**\n * Copies all properties of source into destination. The optional parameter \"overwrite\" allows to control\n * if existing properties on the destination should be overwritten or not. Defaults to true (overwrite).\n */\nexport function mixin(destination: any, source: any, overwrite: boolean = true): any {\n\tif (!isObject(destination)) {\n\t\treturn source;\n\t}\n\n\tif (isObject(source)) {\n\t\tObject.keys(source).forEach(key => {\n\t\t\tif (key in destination) {\n\t\t\t\tif (overwrite) {\n\t\t\t\t\tif (isObject(destination[key]) && isObject(source[key])) {\n\t\t\t\t\t\tmixin(destination[key], source[key], overwrite);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tdestination[key] = source[key];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tdestination[key] = source[key];\n\t\t\t}\n\t\t});\n\t}\n\treturn destination;\n}\n\nexport function equals(one: any, other: any): boolean {\n\tif (one === other) {\n\t\treturn true;\n\t}\n\tif (one === null || one === undefined || other === null || other === undefined) {\n\t\treturn false;\n\t}\n\tif (typeof one !== typeof other) {\n\t\treturn false;\n\t}\n\tif (typeof one !== 'object') {\n\t\treturn false;\n\t}\n\tif ((Array.isArray(one)) !== (Array.isArray(other))) {\n\t\treturn false;\n\t}\n\n\tlet i: number;\n\tlet key: string;\n\n\tif (Array.isArray(one)) {\n\t\tif (one.length !== other.length) {\n\t\t\treturn false;\n\t\t}\n\t\tfor (i = 0; i < one.length; i++) {\n\t\t\tif (!equals(one[i], other[i])) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t} else {\n\t\tconst oneKeys: string[] = [];\n\n\t\tfor (key in one) {\n\t\t\toneKeys.push(key);\n\t\t}\n\t\toneKeys.sort();\n\t\tconst otherKeys: string[] = [];\n\t\tfor (key in other) {\n\t\t\totherKeys.push(key);\n\t\t}\n\t\totherKeys.sort();\n\t\tif (!equals(oneKeys, otherKeys)) {\n\t\t\treturn false;\n\t\t}\n\t\tfor (i = 0; i < oneKeys.length; i++) {\n\t\t\tif (!equals(one[oneKeys[i]], other[oneKeys[i]])) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t}\n\treturn true;\n}\n"]}
1
+ {"version":3,"sources":["file:///mnt/vss/_work/1/s/dependencies/vscode/out-editor-src/vs/base/common/objects.ts","vs/base/common/objects.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;AAEhG,OAAO,EAAE,YAAY,EAAE,QAAQ,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAEvE,MAAM,UAAU,SAAS,CAAI,GAAM;IAClC,IAAI,CAAC,GAAG,IAAI,OAAO,GAAG,KAAK,QAAQ,EAAE,CAAC;QACrC,OAAO,GAAG,CAAC;IACZ,CAAC;IACD,IAAI,GAAG,YAAY,MAAM,EAAE,CAAC;QAC3B,OAAO,GAAG,CAAC;IACZ,CAAC;IACD,MAAM,MAAM,GAAQ,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;IACjD,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,GAAG,EAAE,KAAK,CAAC,EAAE,EAAE;QAC5C,MAAM,CAAC,GAAG,CAAC,GAAG,KAAK,IAAI,OAAO,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC;IAC7E,CAAC,CAAC,CAAC;IACH,OAAO,MAAM,CAAC;AACf,CAAC;AAED,MAAM,UAAU,UAAU,CAAI,GAAM;IACnC,IAAI,CAAC,GAAG,IAAI,OAAO,GAAG,KAAK,QAAQ,EAAE,CAAC;QACrC,OAAO,GAAG,CAAC;IACZ,CAAC;IACD,MAAM,KAAK,GAAU,CAAC,GAAG,CAAC,CAAC;IAC3B,OAAO,KAAK,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QACzB,MAAM,GAAG,GAAG,KAAK,CAAC,KAAK,EAAE,CAAC;QAC1B,MA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CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;gBAC/B,OAAO,KAAK,CAAC;YACd,CAAC;QACF,CAAC;IACF,CAAC;SAAM,CAAC;QACP,MAAM,OAAO,GAAa,EAAE,CAAC;QAE7B,KAAK,GAAG,IAAI,GAAG,EAAE,CAAC;YACjB,OAAO,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QACnB,CAAC;QACD,OAAO,CAAC,IAAI,EAAE,CAAC;QACf,MAAM,SAAS,GAAa,EAAE,CAAC;QAC/B,KAAK,GAAG,IAAI,KAAK,EAAE,CAAC;YACnB,SAAS,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QACrB,CAAC;QACD,SAAS,CAAC,IAAI,EAAE,CAAC;QACjB,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE,SAAS,CAAC,EAAE,CAAC;YACjC,OAAO,KAAK,CAAC;QACd,CAAC;QACD,KAAK,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;YACrC,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;gBACjD,OAAO,KAAK,CAAC;YACd,CAAC;QACF,CAAC;IACF,CAAC;IACD,OAAO,IAAI,CAAC;AACb,CAAC","file":"objects.js","sourceRoot":"file:///mnt/vss/_work/1/s/dependencies/vscode/out-editor-src","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\nimport { isTypedArray, isObject, isUndefinedOrNull } from './types.js';\n\nexport function deepClone<T>(obj: T): T {\n\tif (!obj || typeof obj !== 'object') {\n\t\treturn obj;\n\t}\n\tif (obj instanceof RegExp) {\n\t\treturn obj;\n\t}\n\tconst result: any = Array.isArray(obj) ? [] : {};\n\tObject.entries(obj).forEach(([key, value]) => {\n\t\tresult[key] = value && typeof value === 'object' ? deepClone(value) : value;\n\t});\n\treturn result;\n}\n\nexport function deepFreeze<T>(obj: T): T {\n\tif (!obj || typeof obj !== 'object') {\n\t\treturn obj;\n\t}\n\tconst stack: any[] = [obj];\n\twhile (stack.length > 0) {\n\t\tconst obj = stack.shift();\n\t\tObject.freeze(obj);\n\t\tfor (const key in obj) {\n\t\t\tif (_hasOwnProperty.call(obj, key)) {\n\t\t\t\tconst prop = obj[key];\n\t\t\t\tif (typeof prop === 'object' && !Object.isFrozen(prop) && !isTypedArray(prop)) {\n\t\t\t\t\tstack.push(prop);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\treturn obj;\n}\n\nconst _hasOwnProperty = Object.prototype.hasOwnProperty;\n\n\nexport function cloneAndChange(obj: any, changer: (orig: any) => any): any {\n\treturn _cloneAndChange(obj, changer, new Set());\n}\n\nfunction _cloneAndChange(obj: any, changer: (orig: any) => any, seen: Set<any>): any {\n\tif (isUndefinedOrNull(obj)) {\n\t\treturn obj;\n\t}\n\n\tconst changed = changer(obj);\n\tif (typeof changed !== 'undefined') {\n\t\treturn changed;\n\t}\n\n\tif (Array.isArray(obj)) {\n\t\tconst r1: any[] = [];\n\t\tfor (const e of obj) {\n\t\t\tr1.push(_cloneAndChange(e, changer, seen));\n\t\t}\n\t\treturn r1;\n\t}\n\n\tif (isObject(obj)) {\n\t\tif (seen.has(obj)) {\n\t\t\tthrow new Error('Cannot clone recursive data-structure');\n\t\t}\n\t\tseen.add(obj);\n\t\tconst r2 = {};\n\t\tfor (const i2 in obj) {\n\t\t\tif (_hasOwnProperty.call(obj, i2)) {\n\t\t\t\t// eslint-disable-next-line local/code-no-any-casts\n\t\t\t\t(r2 as any)[i2] = _cloneAndChange(obj[i2], changer, seen);\n\t\t\t}\n\t\t}\n\t\tseen.delete(obj);\n\t\treturn r2;\n\t}\n\n\treturn obj;\n}\n\n/**\n * Copies all properties of source into destination. The optional parameter \"overwrite\" allows to control\n * if existing properties on the destination should be overwritten or not. Defaults to true (overwrite).\n */\nexport function mixin(destination: any, source: any, overwrite: boolean = true): any {\n\tif (!isObject(destination)) {\n\t\treturn source;\n\t}\n\n\tif (isObject(source)) {\n\t\tObject.keys(source).forEach(key => {\n\t\t\tif (key in destination) {\n\t\t\t\tif (overwrite) {\n\t\t\t\t\tif (isObject(destination[key]) && isObject(source[key])) {\n\t\t\t\t\t\tmixin(destination[key], source[key], overwrite);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tdestination[key] = source[key];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tdestination[key] = source[key];\n\t\t\t}\n\t\t});\n\t}\n\treturn destination;\n}\n\nexport function equals(one: any, other: any): boolean {\n\tif (one === other) {\n\t\treturn true;\n\t}\n\tif (one === null || one === undefined || other === null || other === undefined) {\n\t\treturn false;\n\t}\n\tif (typeof one !== typeof other) {\n\t\treturn false;\n\t}\n\tif (typeof one !== 'object') {\n\t\treturn false;\n\t}\n\tif ((Array.isArray(one)) !== (Array.isArray(other))) {\n\t\treturn false;\n\t}\n\n\tlet i: number;\n\tlet key: string;\n\n\tif (Array.isArray(one)) {\n\t\tif (one.length !== other.length) {\n\t\t\treturn false;\n\t\t}\n\t\tfor (i = 0; i < one.length; i++) {\n\t\t\tif (!equals(one[i], other[i])) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t} else {\n\t\tconst oneKeys: string[] = [];\n\n\t\tfor (key in one) {\n\t\t\toneKeys.push(key);\n\t\t}\n\t\toneKeys.sort();\n\t\tconst otherKeys: string[] = [];\n\t\tfor (key in other) {\n\t\t\totherKeys.push(key);\n\t\t}\n\t\totherKeys.sort();\n\t\tif (!equals(oneKeys, otherKeys)) {\n\t\t\treturn false;\n\t\t}\n\t\tfor (i = 0; i < oneKeys.length; i++) {\n\t\t\tif (!equals(one[oneKeys[i]], other[oneKeys[i]])) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t}\n\treturn true;\n}\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\nimport { isTypedArray, isObject, isUndefinedOrNull } from './types.js';\n\nexport function deepClone<T>(obj: T): T {\n\tif (!obj || typeof obj !== 'object') {\n\t\treturn obj;\n\t}\n\tif (obj instanceof RegExp) {\n\t\treturn obj;\n\t}\n\tconst result: any = Array.isArray(obj) ? [] : {};\n\tObject.entries(obj).forEach(([key, value]) => {\n\t\tresult[key] = value && typeof value === 'object' ? deepClone(value) : value;\n\t});\n\treturn result;\n}\n\nexport function deepFreeze<T>(obj: T): T {\n\tif (!obj || typeof obj !== 'object') {\n\t\treturn obj;\n\t}\n\tconst stack: any[] = [obj];\n\twhile (stack.length > 0) {\n\t\tconst obj = stack.shift();\n\t\tObject.freeze(obj);\n\t\tfor (const key in obj) {\n\t\t\tif (_hasOwnProperty.call(obj, key)) {\n\t\t\t\tconst prop = obj[key];\n\t\t\t\tif (typeof prop === 'object' && !Object.isFrozen(prop) && !isTypedArray(prop)) {\n\t\t\t\t\tstack.push(prop);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\treturn obj;\n}\n\nconst _hasOwnProperty = Object.prototype.hasOwnProperty;\n\n\nexport function cloneAndChange(obj: any, changer: (orig: any) => any): any {\n\treturn _cloneAndChange(obj, changer, new Set());\n}\n\nfunction _cloneAndChange(obj: any, changer: (orig: any) => any, seen: Set<any>): any {\n\tif (isUndefinedOrNull(obj)) {\n\t\treturn obj;\n\t}\n\n\tconst changed = changer(obj);\n\tif (typeof changed !== 'undefined') {\n\t\treturn changed;\n\t}\n\n\tif (Array.isArray(obj)) {\n\t\tconst r1: any[] = [];\n\t\tfor (const e of obj) {\n\t\t\tr1.push(_cloneAndChange(e, changer, seen));\n\t\t}\n\t\treturn r1;\n\t}\n\n\tif (isObject(obj)) {\n\t\tif (seen.has(obj)) {\n\t\t\tthrow new Error('Cannot clone recursive data-structure');\n\t\t}\n\t\tseen.add(obj);\n\t\tconst r2 = {};\n\t\tfor (const i2 in obj) {\n\t\t\tif (_hasOwnProperty.call(obj, i2)) {\n\t\t\t\t// eslint-disable-next-line local/code-no-any-casts\n\t\t\t\t(r2 as any)[i2] = _cloneAndChange(obj[i2], changer, seen);\n\t\t\t}\n\t\t}\n\t\tseen.delete(obj);\n\t\treturn r2;\n\t}\n\n\treturn obj;\n}\n\n/**\n * Copies all properties of source into destination. The optional parameter \"overwrite\" allows to control\n * if existing properties on the destination should be overwritten or not. Defaults to true (overwrite).\n */\nexport function mixin(destination: any, source: any, overwrite: boolean = true): any {\n\tif (!isObject(destination)) {\n\t\treturn source;\n\t}\n\n\tif (isObject(source)) {\n\t\tObject.keys(source).forEach(key => {\n\t\t\tif (key in destination) {\n\t\t\t\tif (overwrite) {\n\t\t\t\t\tif (isObject(destination[key]) && isObject(source[key])) {\n\t\t\t\t\t\tmixin(destination[key], source[key], overwrite);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tdestination[key] = source[key];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tdestination[key] = source[key];\n\t\t\t}\n\t\t});\n\t}\n\treturn destination;\n}\n\nexport function equals(one: any, other: any): boolean {\n\tif (one === other) {\n\t\treturn true;\n\t}\n\tif (one === null || one === undefined || other === null || other === undefined) {\n\t\treturn false;\n\t}\n\tif (typeof one !== typeof other) {\n\t\treturn false;\n\t}\n\tif (typeof one !== 'object') {\n\t\treturn false;\n\t}\n\tif ((Array.isArray(one)) !== (Array.isArray(other))) {\n\t\treturn false;\n\t}\n\n\tlet i: number;\n\tlet key: string;\n\n\tif (Array.isArray(one)) {\n\t\tif (one.length !== other.length) {\n\t\t\treturn false;\n\t\t}\n\t\tfor (i = 0; i < one.length; i++) {\n\t\t\tif (!equals(one[i], other[i])) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t} else {\n\t\tconst oneKeys: string[] = [];\n\n\t\tfor (key in one) {\n\t\t\toneKeys.push(key);\n\t\t}\n\t\toneKeys.sort();\n\t\tconst otherKeys: string[] = [];\n\t\tfor (key in other) {\n\t\t\totherKeys.push(key);\n\t\t}\n\t\totherKeys.sort();\n\t\tif (!equals(oneKeys, otherKeys)) {\n\t\t\treturn false;\n\t\t}\n\t\tfor (i = 0; i < oneKeys.length; i++) {\n\t\t\tif (!equals(one[oneKeys[i]], other[oneKeys[i]])) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t}\n\treturn true;\n}\n"]}
@@ -10,6 +10,7 @@ import { BugIndicatingError } from './commonFacade/deps.js';
10
10
  export function recordChanges(obs) {
11
11
  return {
12
12
  createChangeSummary: (_previousChangeSummary) => {
13
+ // eslint-disable-next-line local/code-no-any-casts
13
14
  return {
14
15
  changes: [],
15
16
  };
@@ -17,6 +18,7 @@ export function recordChanges(obs) {
17
18
  handleChange(ctx, changeSummary) {
18
19
  for (const key in obs) {
19
20
  if (ctx.didChange(obs[key])) {
21
+ // eslint-disable-next-line local/code-no-any-casts
20
22
  changeSummary.changes.push({ key, change: ctx.change });
21
23
  }
22
24
  }
@@ -40,6 +42,7 @@ export function recordChangesLazy(getObs) {
40
42
  let obs = undefined;
41
43
  return {
42
44
  createChangeSummary: (_previousChangeSummary) => {
45
+ // eslint-disable-next-line local/code-no-any-casts
43
46
  return {
44
47
  changes: [],
45
48
  };
@@ -50,6 +53,7 @@ export function recordChangesLazy(getObs) {
50
53
  }
51
54
  for (const key in obs) {
52
55
  if (ctx.didChange(obs[key])) {
56
+ // eslint-disable-next-line local/code-no-any-casts
53
57
  changeSummary.changes.push({ key, change: ctx.change });
54
58
  }
55
59
  }
@@ -1 +1 @@
1
- {"version":3,"sources":["file:///mnt/vss/_work/1/s/dependencies/vscode/out-editor-src/vs/base/common/observableInternal/changeTracker.ts","vs/base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V,GAAG,GAAG,MAAM,EAAE,CAAC;YAChB,CAAC;YACD,KAAK,MAAM,GAAG,IAAI,GAAG,EAAE,CAAC;gBACvB,IAAI,GAAG,CAAC,SAAS,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC;oBAC5B,aAAa,CAAC,OAAe,CAAC,IAAI,CAAC,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,CAAC,MAAM,EAAE,CAAC,CAAC;gBAClE,CAAC;YACF,CAAC;YACD,OAAO,IAAI,CAAC;QACb,CAAC;QACD,YAAY,CAAC,MAAM,EAAE,aAAa;YACjC,IAAI,CAAC,GAAG,EAAE,CAAC;gBACV,GAAG,GAAG,MAAM,EAAE,CAAC;YAChB,CAAC;YACD,KAAK,MAAM,GAAG,IAAI,GAAG,EAAE,CAAC;gBACvB,IAAI,GAAG,KAAK,SAAS,EAAE,CAAC;oBACvB,MAAM,IAAI,kBAAkB,CAAC,yDAAyD,CAAC,CAAC;gBACzF,CAAC;gBACD,aAAa,CAAC,GAAG,CAAC,GAAG,GAAG,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;YAC5C,CAAC;QACF,CAAC;KACD,CAAC;AACH,CAAC","file":"changeTracker.js","sourceRoot":"file:///mnt/vss/_work/1/s/dependencies/vscode/out-editor-src","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\nimport { BugIndicatingError } from './commonFacade/deps.js';\nimport { IObservableWithChange, IReader } from './base.js';\n\nexport interface IChangeTracker<TChangeSummary> {\n\tcreateChangeSummary(previousChangeSummary: TChangeSummary | undefined): TChangeSummary;\n\thandleChange(ctx: IChangeContext, change: TChangeSummary): boolean;\n\tbeforeUpdate?(reader: IReader, change: TChangeSummary): void;\n}\n\nexport interface IChangeContext {\n\treadonly changedObservable: IObservableWithChange<any, any>;\n\treadonly change: unknown;\n\n\t/**\n\t * Returns if the given observable caused the change.\n\t */\n\tdidChange<T, TChange>(observable: IObservableWithChange<T, TChange>): this is { change: TChange };\n}\n\n/**\n * Subscribes to and records changes and the last value of the given observables.\n * Don't use the key \"changes\", as it is reserved for the changes array!\n*/\nexport function recordChanges<TObs extends Record<any, IObservableWithChange<any, any>>>(obs: TObs):\n\tIChangeTracker<{ [TKey in keyof TObs]: ReturnType<TObs[TKey]['get']> }\n\t\t& { changes: readonly ({ [TKey in keyof TObs]: { key: TKey; change: TObs[TKey]['TChange'] } }[keyof TObs])[] }> {\n\treturn {\n\t\tcreateChangeSummary: (_previousChangeSummary) => {\n\t\t\treturn {\n\t\t\t\tchanges: [],\n\t\t\t} as any;\n\t\t},\n\t\thandleChange(ctx, changeSummary) {\n\t\t\tfor (const key in obs) {\n\t\t\t\tif (ctx.didChange(obs[key])) {\n\t\t\t\t\t(changeSummary.changes as any).push({ key, change: ctx.change });\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn true;\n\t\t},\n\t\tbeforeUpdate(reader, changeSummary) {\n\t\t\tfor (const key in obs) {\n\t\t\t\tif (key === 'changes') {\n\t\t\t\t\tthrow new BugIndicatingError('property name \"changes\" is reserved for change tracking');\n\t\t\t\t}\n\t\t\t\tchangeSummary[key] = obs[key].read(reader);\n\t\t\t}\n\t\t}\n\t};\n}\n\n/**\n * Subscribes to and records changes and the last value of the given observables.\n * Don't use the key \"changes\", as it is reserved for the changes array!\n*/\nexport function recordChangesLazy<TObs extends Record<any, IObservableWithChange<any, any>>>(getObs: () => TObs):\n\tIChangeTracker<{ [TKey in keyof TObs]: ReturnType<TObs[TKey]['get']> }\n\t\t& { changes: readonly ({ [TKey in keyof TObs]: { key: TKey; change: TObs[TKey]['TChange'] } }[keyof TObs])[] }> {\n\tlet obs: TObs | undefined = undefined;\n\treturn {\n\t\tcreateChangeSummary: (_previousChangeSummary) => {\n\t\t\treturn {\n\t\t\t\tchanges: [],\n\t\t\t} as any;\n\t\t},\n\t\thandleChange(ctx, changeSummary) {\n\t\t\tif (!obs) {\n\t\t\t\tobs = getObs();\n\t\t\t}\n\t\t\tfor (const key in obs) {\n\t\t\t\tif (ctx.didChange(obs[key])) {\n\t\t\t\t\t(changeSummary.changes as any).push({ key, change: ctx.change });\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn true;\n\t\t},\n\t\tbeforeUpdate(reader, changeSummary) {\n\t\t\tif (!obs) {\n\t\t\t\tobs = getObs();\n\t\t\t}\n\t\t\tfor (const key in obs) {\n\t\t\t\tif (key === 'changes') {\n\t\t\t\t\tthrow new BugIndicatingError('property name \"changes\" is reserved for change tracking');\n\t\t\t\t}\n\t\t\t\tchangeSummary[key] = obs[key].read(reader);\n\t\t\t}\n\t\t}\n\t};\n}\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\nimport { BugIndicatingError } from './commonFacade/deps.js';\nimport { IObservableWithChange, IReader } from './base.js';\n\nexport interface IChangeTracker<TChangeSummary> {\n\tcreateChangeSummary(previousChangeSummary: TChangeSummary | undefined): TChangeSummary;\n\thandleChange(ctx: IChangeContext, change: TChangeSummary): boolean;\n\tbeforeUpdate?(reader: IReader, change: TChangeSummary): void;\n}\n\nexport interface IChangeContext {\n\treadonly changedObservable: IObservableWithChange<any, any>;\n\treadonly change: unknown;\n\n\t/**\n\t * Returns if the given observable caused the change.\n\t */\n\tdidChange<T, TChange>(observable: IObservableWithChange<T, TChange>): this is { change: TChange };\n}\n\n/**\n * Subscribes to and records changes and the last value of the given observables.\n * Don't use the key \"changes\", as it is reserved for the changes array!\n*/\nexport function recordChanges<TObs extends Record<any, IObservableWithChange<any, any>>>(obs: TObs):\n\tIChangeTracker<{ [TKey in keyof TObs]: ReturnType<TObs[TKey]['get']> }\n\t\t& { changes: readonly ({ [TKey in keyof TObs]: { key: TKey; change: TObs[TKey]['TChange'] } }[keyof TObs])[] }> {\n\treturn {\n\t\tcreateChangeSummary: (_previousChangeSummary) => {\n\t\t\treturn {\n\t\t\t\tchanges: [],\n\t\t\t} as any;\n\t\t},\n\t\thandleChange(ctx, changeSummary) {\n\t\t\tfor (const key in obs) {\n\t\t\t\tif (ctx.didChange(obs[key])) {\n\t\t\t\t\t(changeSummary.changes as any).push({ key, change: ctx.change });\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn true;\n\t\t},\n\t\tbeforeUpdate(reader, changeSummary) {\n\t\t\tfor (const key in obs) {\n\t\t\t\tif (key === 'changes') {\n\t\t\t\t\tthrow new BugIndicatingError('property name \"changes\" is reserved for change tracking');\n\t\t\t\t}\n\t\t\t\tchangeSummary[key] = obs[key].read(reader);\n\t\t\t}\n\t\t}\n\t};\n}\n\n/**\n * Subscribes to and records changes and the last value of the given observables.\n * Don't use the key \"changes\", as it is reserved for the changes array!\n*/\nexport function recordChangesLazy<TObs extends Record<any, IObservableWithChange<any, any>>>(getObs: () => TObs):\n\tIChangeTracker<{ [TKey in keyof TObs]: ReturnType<TObs[TKey]['get']> }\n\t\t& { changes: readonly ({ [TKey in keyof TObs]: { key: TKey; change: TObs[TKey]['TChange'] } }[keyof TObs])[] }> {\n\tlet obs: TObs | undefined = undefined;\n\treturn {\n\t\tcreateChangeSummary: (_previousChangeSummary) => {\n\t\t\treturn {\n\t\t\t\tchanges: [],\n\t\t\t} as any;\n\t\t},\n\t\thandleChange(ctx, changeSummary) {\n\t\t\tif (!obs) {\n\t\t\t\tobs = getObs();\n\t\t\t}\n\t\t\tfor (const key in obs) {\n\t\t\t\tif (ctx.didChange(obs[key])) {\n\t\t\t\t\t(changeSummary.changes as any).push({ key, change: ctx.change });\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn true;\n\t\t},\n\t\tbeforeUpdate(reader, changeSummary) {\n\t\t\tif (!obs) {\n\t\t\t\tobs = getObs();\n\t\t\t}\n\t\t\tfor (const key in obs) {\n\t\t\t\tif (key === 'changes') {\n\t\t\t\t\tthrow new BugIndicatingError('property name \"changes\" is reserved for change tracking');\n\t\t\t\t}\n\t\t\t\tchangeSummary[key] = obs[key].read(reader);\n\t\t\t}\n\t\t}\n\t};\n}\n"]}
1
+ {"version":3,"sources":["file:///mnt/vss/_work/1/s/dependencies/vscode/out-editor-src/vs/base/common/observableInternal/changeTracker.ts","vs/base/common/observableInternal/changeTracker.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;AAEhG,OAAO,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAmB5D;;;EAGE;AACF,MAAM,UAAU,aAAa,CAA4D,GAAS;IAGjG,OAAO;QACN,mBAAmB,EAAE,CAAC,sBAAsB,EAAE,EAAE;YAC/C,mDAAmD;YACnD,OAAO;gBACN,OAAO,EAAE,EAAE;aACJ,CAAC;QACV,CAAC;QACD,YAAY,CAAC,GAAG,EAAE,aAAa;YAC9B,KAAK,MAAM,GAAG,IAAI,GAAG,EAAE,CAAC;gBACvB,IAAI,GAAG,CAAC,SAAS,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC;oBAC7B,mDAAmD;oBAClD,aAAa,CAAC,OAAe,CAAC,IAAI,CAAC,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,CAAC,MAAM,EAAE,CAAC,CAAC;gBAClE,CAAC;YACF,CAAC;YACD,OAAO,IAAI,CAAC;QACb,CAAC;QACD,YAAY,CAAC,MAAM,EAAE,aAAa;YACjC,KAAK,MAAM,GAAG,IAAI,GAAG,EAAE,CAAC;gBACvB,IAAI,GAAG,KAAK,SAAS,EAAE,CAAC;oBACvB,MAAM,IAAI,kBAAkB,CAAC,yDAAyD,CAAC,CAAC;gBACzF,CAAC;gBACD,aAAa,CAAC,GAAG,CAAC,GAAG,GAAG,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;YAC5C,CAAC;QACF,CAAC;KACD,CAAC;AACH,CAAC;AAED;;;EAGE;AACF,MAAM,UAAU,iBAAiB,CAA4D,MAAkB;IAG9G,IAAI,GAAG,GAAqB,SAAS,CAAC;IACtC,OAAO;QACN,mBAAmB,EAAE,CAAC,sBAAsB,EAAE,EAAE;YAC/C,mDAAmD;YACnD,OAAO;gBACN,OAAO,EAAE,EAAE;aACJ,CAAC;QACV,CAAC;QACD,YAAY,CAAC,GAAG,EAAE,aAAa;YAC9B,IAAI,CAAC,GAAG,EAAE,CAAC;gBACV,GAAG,GAAG,MAAM,EAAE,CAAC;YAChB,CAAC;YACD,KAAK,MAAM,GAAG,IAAI,GAAG,EAAE,CAAC;gBACvB,IAAI,GAAG,CAAC,SAAS,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC;oBAC7B,mDAAmD;oBAClD,aAAa,CAAC,OAAe,CAAC,IAAI,CAAC,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,CAAC,MAAM,EAAE,CAAC,CAAC;gBAClE,CAAC;YACF,CAAC;YACD,OAAO,IAAI,CAAC;QACb,CAAC;QACD,YAAY,CAAC,MAAM,EAAE,aAAa;YACjC,IAAI,CAAC,GAAG,EAAE,CAAC;gBACV,GAAG,GAAG,MAAM,EAAE,CAAC;YAChB,CAAC;YACD,KAAK,MAAM,GAAG,IAAI,GAAG,EAAE,CAAC;gBACvB,IAAI,GAAG,KAAK,SAAS,EAAE,CAAC;oBACvB,MAAM,IAAI,kBAAkB,CAAC,yDAAyD,CAAC,CAAC;gBACzF,CAAC;gBACD,aAAa,CAAC,GAAG,CAAC,GAAG,GAAG,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;YAC5C,CAAC;QACF,CAAC;KACD,CAAC;AACH,CAAC","file":"changeTracker.js","sourceRoot":"file:///mnt/vss/_work/1/s/dependencies/vscode/out-editor-src","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\nimport { BugIndicatingError } from './commonFacade/deps.js';\nimport { IObservableWithChange, IReader } from './base.js';\n\nexport interface IChangeTracker<TChangeSummary> {\n\tcreateChangeSummary(previousChangeSummary: TChangeSummary | undefined): TChangeSummary;\n\thandleChange(ctx: IChangeContext, change: TChangeSummary): boolean;\n\tbeforeUpdate?(reader: IReader, change: TChangeSummary): void;\n}\n\nexport interface IChangeContext {\n\treadonly changedObservable: IObservableWithChange<any, any>;\n\treadonly change: unknown;\n\n\t/**\n\t * Returns if the given observable caused the change.\n\t */\n\tdidChange<T, TChange>(observable: IObservableWithChange<T, TChange>): this is { change: TChange };\n}\n\n/**\n * Subscribes to and records changes and the last value of the given observables.\n * Don't use the key \"changes\", as it is reserved for the changes array!\n*/\nexport function recordChanges<TObs extends Record<any, IObservableWithChange<any, any>>>(obs: TObs):\n\tIChangeTracker<{ [TKey in keyof TObs]: ReturnType<TObs[TKey]['get']> }\n\t\t& { changes: readonly ({ [TKey in keyof TObs]: { key: TKey; change: TObs[TKey]['TChange'] } }[keyof TObs])[] }> {\n\treturn {\n\t\tcreateChangeSummary: (_previousChangeSummary) => {\n\t\t\t// eslint-disable-next-line local/code-no-any-casts\n\t\t\treturn {\n\t\t\t\tchanges: [],\n\t\t\t} as any;\n\t\t},\n\t\thandleChange(ctx, changeSummary) {\n\t\t\tfor (const key in obs) {\n\t\t\t\tif (ctx.didChange(obs[key])) {\n\t\t\t\t\t// eslint-disable-next-line local/code-no-any-casts\n\t\t\t\t\t(changeSummary.changes as any).push({ key, change: ctx.change });\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn true;\n\t\t},\n\t\tbeforeUpdate(reader, changeSummary) {\n\t\t\tfor (const key in obs) {\n\t\t\t\tif (key === 'changes') {\n\t\t\t\t\tthrow new BugIndicatingError('property name \"changes\" is reserved for change tracking');\n\t\t\t\t}\n\t\t\t\tchangeSummary[key] = obs[key].read(reader);\n\t\t\t}\n\t\t}\n\t};\n}\n\n/**\n * Subscribes to and records changes and the last value of the given observables.\n * Don't use the key \"changes\", as it is reserved for the changes array!\n*/\nexport function recordChangesLazy<TObs extends Record<any, IObservableWithChange<any, any>>>(getObs: () => TObs):\n\tIChangeTracker<{ [TKey in keyof TObs]: ReturnType<TObs[TKey]['get']> }\n\t\t& { changes: readonly ({ [TKey in keyof TObs]: { key: TKey; change: TObs[TKey]['TChange'] } }[keyof TObs])[] }> {\n\tlet obs: TObs | undefined = undefined;\n\treturn {\n\t\tcreateChangeSummary: (_previousChangeSummary) => {\n\t\t\t// eslint-disable-next-line local/code-no-any-casts\n\t\t\treturn {\n\t\t\t\tchanges: [],\n\t\t\t} as any;\n\t\t},\n\t\thandleChange(ctx, changeSummary) {\n\t\t\tif (!obs) {\n\t\t\t\tobs = getObs();\n\t\t\t}\n\t\t\tfor (const key in obs) {\n\t\t\t\tif (ctx.didChange(obs[key])) {\n\t\t\t\t\t// eslint-disable-next-line local/code-no-any-casts\n\t\t\t\t\t(changeSummary.changes as any).push({ key, change: ctx.change });\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn true;\n\t\t},\n\t\tbeforeUpdate(reader, changeSummary) {\n\t\t\tif (!obs) {\n\t\t\t\tobs = getObs();\n\t\t\t}\n\t\t\tfor (const key in obs) {\n\t\t\t\tif (key === 'changes') {\n\t\t\t\t\tthrow new BugIndicatingError('property name \"changes\" is reserved for change tracking');\n\t\t\t\t}\n\t\t\t\tchangeSummary[key] = obs[key].read(reader);\n\t\t\t}\n\t\t}\n\t};\n}\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\nimport { BugIndicatingError } from './commonFacade/deps.js';\nimport { IObservableWithChange, IReader } from './base.js';\n\nexport interface IChangeTracker<TChangeSummary> {\n\tcreateChangeSummary(previousChangeSummary: TChangeSummary | undefined): TChangeSummary;\n\thandleChange(ctx: IChangeContext, change: TChangeSummary): boolean;\n\tbeforeUpdate?(reader: IReader, change: TChangeSummary): void;\n}\n\nexport interface IChangeContext {\n\treadonly changedObservable: IObservableWithChange<any, any>;\n\treadonly change: unknown;\n\n\t/**\n\t * Returns if the given observable caused the change.\n\t */\n\tdidChange<T, TChange>(observable: IObservableWithChange<T, TChange>): this is { change: TChange };\n}\n\n/**\n * Subscribes to and records changes and the last value of the given observables.\n * Don't use the key \"changes\", as it is reserved for the changes array!\n*/\nexport function recordChanges<TObs extends Record<any, IObservableWithChange<any, any>>>(obs: TObs):\n\tIChangeTracker<{ [TKey in keyof TObs]: ReturnType<TObs[TKey]['get']> }\n\t\t& { changes: readonly ({ [TKey in keyof TObs]: { key: TKey; change: TObs[TKey]['TChange'] } }[keyof TObs])[] }> {\n\treturn {\n\t\tcreateChangeSummary: (_previousChangeSummary) => {\n\t\t\t// eslint-disable-next-line local/code-no-any-casts\n\t\t\treturn {\n\t\t\t\tchanges: [],\n\t\t\t} as any;\n\t\t},\n\t\thandleChange(ctx, changeSummary) {\n\t\t\tfor (const key in obs) {\n\t\t\t\tif (ctx.didChange(obs[key])) {\n\t\t\t\t\t// eslint-disable-next-line local/code-no-any-casts\n\t\t\t\t\t(changeSummary.changes as any).push({ key, change: ctx.change });\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn true;\n\t\t},\n\t\tbeforeUpdate(reader, changeSummary) {\n\t\t\tfor (const key in obs) {\n\t\t\t\tif (key === 'changes') {\n\t\t\t\t\tthrow new BugIndicatingError('property name \"changes\" is reserved for change tracking');\n\t\t\t\t}\n\t\t\t\tchangeSummary[key] = obs[key].read(reader);\n\t\t\t}\n\t\t}\n\t};\n}\n\n/**\n * Subscribes to and records changes and the last value of the given observables.\n * Don't use the key \"changes\", as it is reserved for the changes array!\n*/\nexport function recordChangesLazy<TObs extends Record<any, IObservableWithChange<any, any>>>(getObs: () => TObs):\n\tIChangeTracker<{ [TKey in keyof TObs]: ReturnType<TObs[TKey]['get']> }\n\t\t& { changes: readonly ({ [TKey in keyof TObs]: { key: TKey; change: TObs[TKey]['TChange'] } }[keyof TObs])[] }> {\n\tlet obs: TObs | undefined = undefined;\n\treturn {\n\t\tcreateChangeSummary: (_previousChangeSummary) => {\n\t\t\t// eslint-disable-next-line local/code-no-any-casts\n\t\t\treturn {\n\t\t\t\tchanges: [],\n\t\t\t} as any;\n\t\t},\n\t\thandleChange(ctx, changeSummary) {\n\t\t\tif (!obs) {\n\t\t\t\tobs = getObs();\n\t\t\t}\n\t\t\tfor (const key in obs) {\n\t\t\t\tif (ctx.didChange(obs[key])) {\n\t\t\t\t\t// eslint-disable-next-line local/code-no-any-casts\n\t\t\t\t\t(changeSummary.changes as any).push({ key, change: ctx.change });\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn true;\n\t\t},\n\t\tbeforeUpdate(reader, changeSummary) {\n\t\t\tif (!obs) {\n\t\t\t\tobs = getObs();\n\t\t\t}\n\t\t\tfor (const key in obs) {\n\t\t\t\tif (key === 'changes') {\n\t\t\t\t\tthrow new BugIndicatingError('property name \"changes\" is reserved for change tracking');\n\t\t\t\t}\n\t\t\t\tchangeSummary[key] = obs[key].read(reader);\n\t\t\t}\n\t\t}\n\t};\n}\n"]}
@@ -13,6 +13,7 @@ export var DebugLocation;
13
13
  if (!enabled) {
14
14
  return undefined;
15
15
  }
16
+ // eslint-disable-next-line local/code-no-any-casts
16
17
  const Err = Error; // For the monaco editor checks, which don't have the nodejs types.
17
18
  const l = Err.stackTraceLimit;
18
19
  Err.stackTraceLimit = 3;
@@ -1 +1 @@
1
- {"version":3,"sources":["file:///mnt/vss/_work/1/s/dependencies/vscode/out-editor-src/vs/base/common/observableInternal/debugLocation.ts","vs/base/common/observableInternal/debugLocation.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;AAIhG,MAAM,KAAW,aAAa,CAoB7B;AApBD,WAAiB,aAAa;IAC7B,IAAI,OAAO,GAAG,KAAK,CAAC;IAEpB,SAAgB,MAAM;QACrB,OAAO,GAAG,IAAI,CAAC;IAChB,CAAC;IAFe,oBAAM,SA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,sBAAsB,CAAC,CAAC;IACtD,IAAI,KAAK,EAAE,CAAC;QACX,OAAO;YACN,QAAQ,EAAE,KAAK,CAAC,CAAC,CAAC;YAClB,IAAI,EAAE,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;YACxB,MAAM,EAAE,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;YAC1B,EAAE,EAAE,SAAS;SACb,CAAC;IACH,CAAC;IAED,MAAM,MAAM,GAAG,SAAS,CAAC,KAAK,CAAC,2BAA2B,CAAC,CAAC;IAE5D,IAAI,MAAM,EAAE,CAAC;QACZ,OAAO;YACN,QAAQ,EAAE,MAAM,CAAC,CAAC,CAAC;YACnB,IAAI,EAAE,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;YACzB,MAAM,EAAE,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;YAC3B,EAAE,EAAE,SAAS;SACb,CAAC;IACH,CAAC;IAED,OAAO,SAAS,CAAC;AAClB,CAAC","file":"debugLocation.js","sourceRoot":"file:///mnt/vss/_work/1/s/dependencies/vscode/out-editor-src","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\nexport type DebugLocation = DebugLocationImpl | undefined;\n\nexport namespace DebugLocation {\n\tlet enabled = false;\n\n\texport function enable(): void {\n\t\tenabled = true;\n\t}\n\n\texport function ofCaller(): DebugLocation {\n\t\tif (!enabled) {\n\t\t\treturn undefined;\n\t\t}\n\t\tconst Err = Error as any as { stackTraceLimit: number }; // For the monaco editor checks, which don't have the nodejs types.\n\n\t\tconst l = Err.stackTraceLimit;\n\t\tErr.stackTraceLimit = 3;\n\t\tconst stack = new Error().stack!;\n\t\tErr.stackTraceLimit = l;\n\n\t\treturn DebugLocationImpl.fromStack(stack, 2);\n\t}\n}\n\nclass DebugLocationImpl implements ILocation {\n\tpublic static fromStack(stack: string, parentIdx: number): DebugLocationImpl | undefined {\n\t\tconst lines = stack.split('\\n');\n\t\tconst location = parseLine(lines[parentIdx + 1]);\n\t\tif (location) {\n\t\t\treturn new DebugLocationImpl(\n\t\t\t\tlocation.fileName,\n\t\t\t\tlocation.line,\n\t\t\t\tlocation.column,\n\t\t\t\tlocation.id\n\t\t\t);\n\t\t} else {\n\t\t\treturn undefined;\n\t\t}\n\t}\n\n\tconstructor(\n\t\tpublic readonly fileName: string,\n\t\tpublic readonly line: number,\n\t\tpublic readonly column: number,\n\t\tpublic readonly id: string,\n\t) {\n\t}\n}\n\n\nexport interface ILocation {\n\tfileName: string;\n\tline: number;\n\tcolumn: number;\n\tid: string;\n}\n\nfunction parseLine(stackLine: string): ILocation | undefined {\n\tconst match = stackLine.match(/\\((.*):(\\d+):(\\d+)\\)/);\n\tif (match) {\n\t\treturn {\n\t\t\tfileName: match[1],\n\t\t\tline: parseInt(match[2]),\n\t\t\tcolumn: parseInt(match[3]),\n\t\t\tid: stackLine,\n\t\t};\n\t}\n\n\tconst match2 = stackLine.match(/at ([^\\(\\)]*):(\\d+):(\\d+)/);\n\n\tif (match2) {\n\t\treturn {\n\t\t\tfileName: match2[1],\n\t\t\tline: parseInt(match2[2]),\n\t\t\tcolumn: parseInt(match2[3]),\n\t\t\tid: stackLine,\n\t\t};\n\t}\n\n\treturn undefined;\n}\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\nexport type DebugLocation = DebugLocationImpl | undefined;\n\nexport namespace DebugLocation {\n\tlet enabled = false;\n\n\texport function enable(): void {\n\t\tenabled = true;\n\t}\n\n\texport function ofCaller(): DebugLocation {\n\t\tif (!enabled) {\n\t\t\treturn undefined;\n\t\t}\n\t\tconst Err = Error as any as { stackTraceLimit: number }; // For the monaco editor checks, which don't have the nodejs types.\n\n\t\tconst l = Err.stackTraceLimit;\n\t\tErr.stackTraceLimit = 3;\n\t\tconst stack = new Error().stack!;\n\t\tErr.stackTraceLimit = l;\n\n\t\treturn DebugLocationImpl.fromStack(stack, 2);\n\t}\n}\n\nclass DebugLocationImpl implements ILocation {\n\tpublic static fromStack(stack: string, parentIdx: number): DebugLocationImpl | undefined {\n\t\tconst lines = stack.split('\\n');\n\t\tconst location = parseLine(lines[parentIdx + 1]);\n\t\tif (location) {\n\t\t\treturn new DebugLocationImpl(\n\t\t\t\tlocation.fileName,\n\t\t\t\tlocation.line,\n\t\t\t\tlocation.column,\n\t\t\t\tlocation.id\n\t\t\t);\n\t\t} else {\n\t\t\treturn undefined;\n\t\t}\n\t}\n\n\tconstructor(\n\t\tpublic readonly fileName: string,\n\t\tpublic readonly line: number,\n\t\tpublic readonly column: number,\n\t\tpublic readonly id: string,\n\t) {\n\t}\n}\n\n\nexport interface ILocation {\n\tfileName: string;\n\tline: number;\n\tcolumn: number;\n\tid: string;\n}\n\nfunction parseLine(stackLine: string): ILocation | undefined {\n\tconst match = stackLine.match(/\\((.*):(\\d+):(\\d+)\\)/);\n\tif (match) {\n\t\treturn {\n\t\t\tfileName: match[1],\n\t\t\tline: parseInt(match[2]),\n\t\t\tcolumn: parseInt(match[3]),\n\t\t\tid: stackLine,\n\t\t};\n\t}\n\n\tconst match2 = stackLine.match(/at ([^\\(\\)]*):(\\d+):(\\d+)/);\n\n\tif (match2) {\n\t\treturn {\n\t\t\tfileName: match2[1],\n\t\t\tline: parseInt(match2[2]),\n\t\t\tcolumn: parseInt(match2[3]),\n\t\t\tid: stackLine,\n\t\t};\n\t}\n\n\treturn undefined;\n}\n"]}
1
+ {"version":3,"sources":["file:///mnt/vss/_work/1/s/dependencies/vscode/out-editor-src/vs/base/common/observableInternal/debugLocation.ts","vs/base/common/observableInternal/debugLocation.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;AAIhG,MAAM,KAAW,aAAa,CAqB7B;AArBD,WAAiB,aAAa;IAC7B,IAAI,OAA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F,EAAE,CAAQ;IAE3B,CAAC;CACD;AAUD,SAAS,SAAS,CAAC,SAAiB;IACnC,MAAM,KAAK,GAAG,SAAS,CAAC,KAAK,CAAC,sBAAsB,CAAC,CAAC;IACtD,IAAI,KAAK,EAAE,CAAC;QACX,OAAO;YACN,QAAQ,EAAE,KAAK,CAAC,CAAC,CAAC;YAClB,IAAI,EAAE,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;YACxB,MAAM,EAAE,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;YAC1B,EAAE,EAAE,SAAS;SACb,CAAC;IACH,CAAC;IAED,MAAM,MAAM,GAAG,SAAS,CAAC,KAAK,CAAC,2BAA2B,CAAC,CAAC;IAE5D,IAAI,MAAM,EAAE,CAAC;QACZ,OAAO;YACN,QAAQ,EAAE,MAAM,CAAC,CAAC,CAAC;YACnB,IAAI,EAAE,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;YACzB,MAAM,EAAE,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;YAC3B,EAAE,EAAE,SAAS;SACb,CAAC;IACH,CAAC;IAED,OAAO,SAAS,CAAC;AAClB,CAAC","file":"debugLocation.js","sourceRoot":"file:///mnt/vss/_work/1/s/dependencies/vscode/out-editor-src","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\nexport type DebugLocation = DebugLocationImpl | undefined;\n\nexport namespace DebugLocation {\n\tlet enabled = false;\n\n\texport function enable(): void {\n\t\tenabled = true;\n\t}\n\n\texport function ofCaller(): DebugLocation {\n\t\tif (!enabled) {\n\t\t\treturn undefined;\n\t\t}\n\t\t// eslint-disable-next-line local/code-no-any-casts\n\t\tconst Err = Error as any as { stackTraceLimit: number }; // For the monaco editor checks, which don't have the nodejs types.\n\n\t\tconst l = Err.stackTraceLimit;\n\t\tErr.stackTraceLimit = 3;\n\t\tconst stack = new Error().stack!;\n\t\tErr.stackTraceLimit = l;\n\n\t\treturn DebugLocationImpl.fromStack(stack, 2);\n\t}\n}\n\nclass DebugLocationImpl implements ILocation {\n\tpublic static fromStack(stack: string, parentIdx: number): DebugLocationImpl | undefined {\n\t\tconst lines = stack.split('\\n');\n\t\tconst location = parseLine(lines[parentIdx + 1]);\n\t\tif (location) {\n\t\t\treturn new DebugLocationImpl(\n\t\t\t\tlocation.fileName,\n\t\t\t\tlocation.line,\n\t\t\t\tlocation.column,\n\t\t\t\tlocation.id\n\t\t\t);\n\t\t} else {\n\t\t\treturn undefined;\n\t\t}\n\t}\n\n\tconstructor(\n\t\tpublic readonly fileName: string,\n\t\tpublic readonly line: number,\n\t\tpublic readonly column: number,\n\t\tpublic readonly id: string,\n\t) {\n\t}\n}\n\n\nexport interface ILocation {\n\tfileName: string;\n\tline: number;\n\tcolumn: number;\n\tid: string;\n}\n\nfunction parseLine(stackLine: string): ILocation | undefined {\n\tconst match = stackLine.match(/\\((.*):(\\d+):(\\d+)\\)/);\n\tif (match) {\n\t\treturn {\n\t\t\tfileName: match[1],\n\t\t\tline: parseInt(match[2]),\n\t\t\tcolumn: parseInt(match[3]),\n\t\t\tid: stackLine,\n\t\t};\n\t}\n\n\tconst match2 = stackLine.match(/at ([^\\(\\)]*):(\\d+):(\\d+)/);\n\n\tif (match2) {\n\t\treturn {\n\t\t\tfileName: match2[1],\n\t\t\tline: parseInt(match2[2]),\n\t\t\tcolumn: parseInt(match2[3]),\n\t\t\tid: stackLine,\n\t\t};\n\t}\n\n\treturn undefined;\n}\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\nexport type DebugLocation = DebugLocationImpl | undefined;\n\nexport namespace DebugLocation {\n\tlet enabled = false;\n\n\texport function enable(): void {\n\t\tenabled = true;\n\t}\n\n\texport function ofCaller(): DebugLocation {\n\t\tif (!enabled) {\n\t\t\treturn undefined;\n\t\t}\n\t\t// eslint-disable-next-line local/code-no-any-casts\n\t\tconst Err = Error as any as { stackTraceLimit: number }; // For the monaco editor checks, which don't have the nodejs types.\n\n\t\tconst l = Err.stackTraceLimit;\n\t\tErr.stackTraceLimit = 3;\n\t\tconst stack = new Error().stack!;\n\t\tErr.stackTraceLimit = l;\n\n\t\treturn DebugLocationImpl.fromStack(stack, 2);\n\t}\n}\n\nclass DebugLocationImpl implements ILocation {\n\tpublic static fromStack(stack: string, parentIdx: number): DebugLocationImpl | undefined {\n\t\tconst lines = stack.split('\\n');\n\t\tconst location = parseLine(lines[parentIdx + 1]);\n\t\tif (location) {\n\t\t\treturn new DebugLocationImpl(\n\t\t\t\tlocation.fileName,\n\t\t\t\tlocation.line,\n\t\t\t\tlocation.column,\n\t\t\t\tlocation.id\n\t\t\t);\n\t\t} else {\n\t\t\treturn undefined;\n\t\t}\n\t}\n\n\tconstructor(\n\t\tpublic readonly fileName: string,\n\t\tpublic readonly line: number,\n\t\tpublic readonly column: number,\n\t\tpublic readonly id: string,\n\t) {\n\t}\n}\n\n\nexport interface ILocation {\n\tfileName: string;\n\tline: number;\n\tcolumn: number;\n\tid: string;\n}\n\nfunction parseLine(stackLine: string): ILocation | undefined {\n\tconst match = stackLine.match(/\\((.*):(\\d+):(\\d+)\\)/);\n\tif (match) {\n\t\treturn {\n\t\t\tfileName: match[1],\n\t\t\tline: parseInt(match[2]),\n\t\t\tcolumn: parseInt(match[3]),\n\t\t\tid: stackLine,\n\t\t};\n\t}\n\n\tconst match2 = stackLine.match(/at ([^\\(\\)]*):(\\d+):(\\d+)/);\n\n\tif (match2) {\n\t\treturn {\n\t\t\tfileName: match2[1],\n\t\t\tline: parseInt(match2[2]),\n\t\t\tcolumn: parseInt(match2[3]),\n\t\t\tid: stackLine,\n\t\t};\n\t}\n\n\treturn undefined;\n}\n"]}
@@ -66,6 +66,7 @@ function computeDebugName(self, data) {
66
66
  }
67
67
  function findKey(obj, value) {
68
68
  for (const key in obj) {
69
+ // eslint-disable-next-line local/code-no-any-casts
69
70
  if (obj[key] === value) {
70
71
  return key;
71
72
  }
@@ -1 +1 @@
1
- {"version":3,"sources":["file:///mnt/vss/_work/1/s/dependencies/vscode/out-editor-src/vs/base/common/observableInternal/debugName.ts","vs/base/common/observableInternal/debugName.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;AAsBhG,MAAM,OAAO,aAAa;IACzB,YACiB,KAA6B,EAC7B,eAA4C,EAC5C,WAAiC;QAFjC,UAAK,GAAL,KAAK,CAAwB;QAC7B,oBAAe,GAAf,eAAe,CAA6B;QAC5C,gBAAW,GAAX,WAAW,CAAsB;IAC9C,CAAC;IAEE,YAAY,CAAC,MAAc;QACjC,OAAO,YAAY,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC;IACnC,CAAC;CACD;AASD,MAAM,YAAY,GAAG,IAAI,GAAG,EAAkB,CAAC;AAC/C,MAAM,eAAe,GAAG,IAAI,OAAO,EAAkB,CAAC;AAEtD,MAAM,UAAU,YAAY,CAAC,MAAc,EAAE,IAAmB;IAC/D,MAAM,MAAM,GAAG,eAAe,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;IAC3C,IAAI,MAAM,EAAE,CAAC;QACZ,OAAO,MAAM,CAAC;IACf,CAAC;IAED,MAAM,OAAO,GAAG,gBAAgB,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC;IAC/C,IAAI,OAAO,EAAE,CAAC;QACb,IAAI,KAAK,GAAG,YAAY,CAAC,GAAG,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;QAC3C,KAAK,EAAE,CAAC;QACR,YAAY,CAAC,GAAG,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC;QACjC,MAAM,MAAM,GAAG,KAAK,KAAK,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,GAAG,OAAO,IAAI,KAAK,EAAE,CAAC;QAC7D,eAAe,CAA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ClB,CAAC;QACD,OAAO,IAAI,CAAC,IAAI,CAAC;IAClB,CAAC;IACD,OAAO,SAAS,CAAC;AAClB,CAAC;AAED,MAAM,UAAU,eAAe,CAAC,EAAY;IAC3C,MAAM,KAAK,GAAG,EAAE,CAAC,QAAQ,EAAE,CAAC;IAC5B,mCAAmC;IACnC,MAAM,MAAM,GAAG,qCAAqC,CAAC;IACrD,MAAM,KAAK,GAAG,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IACjC,MAAM,MAAM,GAAG,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;IAC5C,OAAO,MAAM,EAAE,IAAI,EAAE,CAAC;AACvB,CAAC","file":"debugName.js","sourceRoot":"file:///mnt/vss/_work/1/s/dependencies/vscode/out-editor-src","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\nexport interface IDebugNameData {\n\t/**\n\t * The owner object of an observable.\n\t * Used for debugging only, such as computing a name for the observable by iterating over the fields of the owner.\n\t */\n\treadonly owner?: DebugOwner | undefined;\n\n\t/**\n\t * A string or function that returns a string that represents the name of the observable.\n\t * Used for debugging only.\n\t */\n\treadonly debugName?: DebugNameSource | undefined;\n\n\t/**\n\t * A function that points to the defining function of the object.\n\t * Used for debugging only.\n\t */\n\treadonly debugReferenceFn?: Function | undefined;\n}\n\nexport class DebugNameData {\n\tconstructor(\n\t\tpublic readonly owner: DebugOwner | undefined,\n\t\tpublic readonly debugNameSource: DebugNameSource | undefined,\n\t\tpublic readonly referenceFn: Function | undefined,\n\t) { }\n\n\tpublic getDebugName(target: object): string | undefined {\n\t\treturn getDebugName(target, this);\n\t}\n}\n\n/**\n * The owning object of an observable.\n * Is only used for debugging purposes, such as computing a name for the observable by iterating over the fields of the owner.\n */\nexport type DebugOwner = object | undefined;\nexport type DebugNameSource = string | (() => string | undefined);\n\nconst countPerName = new Map<string, number>();\nconst cachedDebugName = new WeakMap<object, string>();\n\nexport function getDebugName(target: object, data: DebugNameData): string | undefined {\n\tconst cached = cachedDebugName.get(target);\n\tif (cached) {\n\t\treturn cached;\n\t}\n\n\tconst dbgName = computeDebugName(target, data);\n\tif (dbgName) {\n\t\tlet count = countPerName.get(dbgName) ?? 0;\n\t\tcount++;\n\t\tcountPerName.set(dbgName, count);\n\t\tconst result = count === 1 ? dbgName : `${dbgName}#${count}`;\n\t\tcachedDebugName.set(target, result);\n\t\treturn result;\n\t}\n\treturn undefined;\n}\n\nfunction computeDebugName(self: object, data: DebugNameData): string | undefined {\n\tconst cached = cachedDebugName.get(self);\n\tif (cached) {\n\t\treturn cached;\n\t}\n\n\tconst ownerStr = data.owner ? formatOwner(data.owner) + `.` : '';\n\n\tlet result: string | undefined;\n\tconst debugNameSource = data.debugNameSource;\n\tif (debugNameSource !== undefined) {\n\t\tif (typeof debugNameSource === 'function') {\n\t\t\tresult = debugNameSource();\n\t\t\tif (result !== undefined) {\n\t\t\t\treturn ownerStr + result;\n\t\t\t}\n\t\t} else {\n\t\t\treturn ownerStr + debugNameSource;\n\t\t}\n\t}\n\n\tconst referenceFn = data.referenceFn;\n\tif (referenceFn !== undefined) {\n\t\tresult = getFunctionName(referenceFn);\n\t\tif (result !== undefined) {\n\t\t\treturn ownerStr + result;\n\t\t}\n\t}\n\n\tif (data.owner !== undefined) {\n\t\tconst key = findKey(data.owner, self);\n\t\tif (key !== undefined) {\n\t\t\treturn ownerStr + key;\n\t\t}\n\t}\n\treturn undefined;\n}\n\nfunction findKey(obj: object, value: object): string | undefined {\n\tfor (const key in obj) {\n\t\tif ((obj as any)[key] === value) {\n\t\t\treturn key;\n\t\t}\n\t}\n\treturn undefined;\n}\n\nconst countPerClassName = new Map<string, number>();\nconst ownerId = new WeakMap<object, string>();\n\nfunction formatOwner(owner: object): string {\n\tconst id = ownerId.get(owner);\n\tif (id) {\n\t\treturn id;\n\t}\n\tconst className = getClassName(owner) ?? 'Object';\n\tlet count = countPerClassName.get(className) ?? 0;\n\tcount++;\n\tcountPerClassName.set(className, count);\n\tconst result = count === 1 ? className : `${className}#${count}`;\n\townerId.set(owner, result);\n\treturn result;\n}\n\nexport function getClassName(obj: object): string | undefined {\n\tconst ctor = obj.constructor;\n\tif (ctor) {\n\t\tif (ctor.name === 'Object') {\n\t\t\treturn undefined;\n\t\t}\n\t\treturn ctor.name;\n\t}\n\treturn undefined;\n}\n\nexport function getFunctionName(fn: Function): string | undefined {\n\tconst fnSrc = fn.toString();\n\t// Pattern: /** @description ... */\n\tconst regexp = /\\/\\*\\*\\s*@description\\s*([^*]*)\\*\\//;\n\tconst match = regexp.exec(fnSrc);\n\tconst result = match ? match[1] : undefined;\n\treturn result?.trim();\n}\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\nexport interface IDebugNameData {\n\t/**\n\t * The owner object of an observable.\n\t * Used for debugging only, such as computing a name for the observable by iterating over the fields of the owner.\n\t */\n\treadonly owner?: DebugOwner | undefined;\n\n\t/**\n\t * A string or function that returns a string that represents the name of the observable.\n\t * Used for debugging only.\n\t */\n\treadonly debugName?: DebugNameSource | undefined;\n\n\t/**\n\t * A function that points to the defining function of the object.\n\t * Used for debugging only.\n\t */\n\treadonly debugReferenceFn?: Function | undefined;\n}\n\nexport class DebugNameData {\n\tconstructor(\n\t\tpublic readonly owner: DebugOwner | undefined,\n\t\tpublic readonly debugNameSource: DebugNameSource | undefined,\n\t\tpublic readonly referenceFn: Function | undefined,\n\t) { }\n\n\tpublic getDebugName(target: object): string | undefined {\n\t\treturn getDebugName(target, this);\n\t}\n}\n\n/**\n * The owning object of an observable.\n * Is only used for debugging purposes, such as computing a name for the observable by iterating over the fields of the owner.\n */\nexport type DebugOwner = object | undefined;\nexport type DebugNameSource = string | (() => string | undefined);\n\nconst countPerName = new Map<string, number>();\nconst cachedDebugName = new WeakMap<object, string>();\n\nexport function getDebugName(target: object, data: DebugNameData): string | undefined {\n\tconst cached = cachedDebugName.get(target);\n\tif (cached) {\n\t\treturn cached;\n\t}\n\n\tconst dbgName = computeDebugName(target, data);\n\tif (dbgName) {\n\t\tlet count = countPerName.get(dbgName) ?? 0;\n\t\tcount++;\n\t\tcountPerName.set(dbgName, count);\n\t\tconst result = count === 1 ? dbgName : `${dbgName}#${count}`;\n\t\tcachedDebugName.set(target, result);\n\t\treturn result;\n\t}\n\treturn undefined;\n}\n\nfunction computeDebugName(self: object, data: DebugNameData): string | undefined {\n\tconst cached = cachedDebugName.get(self);\n\tif (cached) {\n\t\treturn cached;\n\t}\n\n\tconst ownerStr = data.owner ? formatOwner(data.owner) + `.` : '';\n\n\tlet result: string | undefined;\n\tconst debugNameSource = data.debugNameSource;\n\tif (debugNameSource !== undefined) {\n\t\tif (typeof debugNameSource === 'function') {\n\t\t\tresult = debugNameSource();\n\t\t\tif (result !== undefined) {\n\t\t\t\treturn ownerStr + result;\n\t\t\t}\n\t\t} else {\n\t\t\treturn ownerStr + debugNameSource;\n\t\t}\n\t}\n\n\tconst referenceFn = data.referenceFn;\n\tif (referenceFn !== undefined) {\n\t\tresult = getFunctionName(referenceFn);\n\t\tif (result !== undefined) {\n\t\t\treturn ownerStr + result;\n\t\t}\n\t}\n\n\tif (data.owner !== undefined) {\n\t\tconst key = findKey(data.owner, self);\n\t\tif (key !== undefined) {\n\t\t\treturn ownerStr + key;\n\t\t}\n\t}\n\treturn undefined;\n}\n\nfunction findKey(obj: object, value: object): string | undefined {\n\tfor (const key in obj) {\n\t\tif ((obj as any)[key] === value) {\n\t\t\treturn key;\n\t\t}\n\t}\n\treturn undefined;\n}\n\nconst countPerClassName = new Map<string, number>();\nconst ownerId = new WeakMap<object, string>();\n\nfunction formatOwner(owner: object): string {\n\tconst id = ownerId.get(owner);\n\tif (id) {\n\t\treturn id;\n\t}\n\tconst className = getClassName(owner) ?? 'Object';\n\tlet count = countPerClassName.get(className) ?? 0;\n\tcount++;\n\tcountPerClassName.set(className, count);\n\tconst result = count === 1 ? className : `${className}#${count}`;\n\townerId.set(owner, result);\n\treturn result;\n}\n\nexport function getClassName(obj: object): string | undefined {\n\tconst ctor = obj.constructor;\n\tif (ctor) {\n\t\tif (ctor.name === 'Object') {\n\t\t\treturn undefined;\n\t\t}\n\t\treturn ctor.name;\n\t}\n\treturn undefined;\n}\n\nexport function getFunctionName(fn: Function): string | undefined {\n\tconst fnSrc = fn.toString();\n\t// Pattern: /** @description ... */\n\tconst regexp = /\\/\\*\\*\\s*@description\\s*([^*]*)\\*\\//;\n\tconst match = regexp.exec(fnSrc);\n\tconst result = match ? match[1] : undefined;\n\treturn result?.trim();\n}\n"]}
1
+ {"version":3,"sources":["file:///mnt/vss/_work/1/s/dependencies/vscode/out-editor-src/vs/base/common/observableInternal/debugName.ts","vs/base/common/observableInternal/debugName.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;AAsBhG,MAAM,OAAO,aAAa;IACzB,YACiB,KAA6B,EAC7B,eAA4C,EAC5C,WAAiC;QAFjC,UAAK,GAAL,KAAK,CAAwB;QAC7B,oBAAe,GAAf,eAAe,CAA6B;QAC5C,gBAAW,GAAX,WAAW,CAAsB;IAC9C,CAAC;IAEE,YAAY,CAAC,MAAc;QACjC,OAAO,YAAY,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC;IACnC,CAAC;CACD;AASD,MAAM,YAAY,GAAG,IAAI,GAAG,EAAkB,CAAC;AAC/C,MAAM,eAAe,GAAG,IAAI,OAAO,EAAkB,CAAC;AAEtD,MAAM,UAAU,YAAY,CAAC,MAAc,EAAE,IAAmB;IAC/D,MAAM,MAAM,GAAG,eAAe,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;IAC3C,IAAI,MAAM,EAAE,CAAC;QACZ,OAAO,MAAM,CAAC;IACf,CAAC;IAED,MAAM,OAAO,GAAG,gBAAgB,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AK,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,GAAG,SAAS,IAAI,KAAK,EAAE,CAAC;IACjE,OAAO,CAAC,GAAG,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC;IAC3B,OAAO,MAAM,CAAC;AACf,CAAC;AAED,MAAM,UAAU,YAAY,CAAC,GAAW;IACvC,MAAM,IAAI,GAAG,GAAG,CAAC,WAAW,CAAC;IAC7B,IAAI,IAAI,EAAE,CAAC;QACV,IAAI,IAAI,CAAC,IAAI,KAAK,QAAQ,EAAE,CAAC;YAC5B,OAAO,SAAS,CAAC;QAClB,CAAC;QACD,OAAO,IAAI,CAAC,IAAI,CAAC;IAClB,CAAC;IACD,OAAO,SAAS,CAAC;AAClB,CAAC;AAED,MAAM,UAAU,eAAe,CAAC,EAAY;IAC3C,MAAM,KAAK,GAAG,EAAE,CAAC,QAAQ,EAAE,CAAC;IAC5B,mCAAmC;IACnC,MAAM,MAAM,GAAG,qCAAqC,CAAC;IACrD,MAAM,KAAK,GAAG,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IACjC,MAAM,MAAM,GAAG,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;IAC5C,OAAO,MAAM,EAAE,IAAI,EAAE,CAAC;AACvB,CAAC","file":"debugName.js","sourceRoot":"file:///mnt/vss/_work/1/s/dependencies/vscode/out-editor-src","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\nexport interface IDebugNameData {\n\t/**\n\t * The owner object of an observable.\n\t * Used for debugging only, such as computing a name for the observable by iterating over the fields of the owner.\n\t */\n\treadonly owner?: DebugOwner | undefined;\n\n\t/**\n\t * A string or function that returns a string that represents the name of the observable.\n\t * Used for debugging only.\n\t */\n\treadonly debugName?: DebugNameSource | undefined;\n\n\t/**\n\t * A function that points to the defining function of the object.\n\t * Used for debugging only.\n\t */\n\treadonly debugReferenceFn?: Function | undefined;\n}\n\nexport class DebugNameData {\n\tconstructor(\n\t\tpublic readonly owner: DebugOwner | undefined,\n\t\tpublic readonly debugNameSource: DebugNameSource | undefined,\n\t\tpublic readonly referenceFn: Function | undefined,\n\t) { }\n\n\tpublic getDebugName(target: object): string | undefined {\n\t\treturn getDebugName(target, this);\n\t}\n}\n\n/**\n * The owning object of an observable.\n * Is only used for debugging purposes, such as computing a name for the observable by iterating over the fields of the owner.\n */\nexport type DebugOwner = object | undefined;\nexport type DebugNameSource = string | (() => string | undefined);\n\nconst countPerName = new Map<string, number>();\nconst cachedDebugName = new WeakMap<object, string>();\n\nexport function getDebugName(target: object, data: DebugNameData): string | undefined {\n\tconst cached = cachedDebugName.get(target);\n\tif (cached) {\n\t\treturn cached;\n\t}\n\n\tconst dbgName = computeDebugName(target, data);\n\tif (dbgName) {\n\t\tlet count = countPerName.get(dbgName) ?? 0;\n\t\tcount++;\n\t\tcountPerName.set(dbgName, count);\n\t\tconst result = count === 1 ? dbgName : `${dbgName}#${count}`;\n\t\tcachedDebugName.set(target, result);\n\t\treturn result;\n\t}\n\treturn undefined;\n}\n\nfunction computeDebugName(self: object, data: DebugNameData): string | undefined {\n\tconst cached = cachedDebugName.get(self);\n\tif (cached) {\n\t\treturn cached;\n\t}\n\n\tconst ownerStr = data.owner ? formatOwner(data.owner) + `.` : '';\n\n\tlet result: string | undefined;\n\tconst debugNameSource = data.debugNameSource;\n\tif (debugNameSource !== undefined) {\n\t\tif (typeof debugNameSource === 'function') {\n\t\t\tresult = debugNameSource();\n\t\t\tif (result !== undefined) {\n\t\t\t\treturn ownerStr + result;\n\t\t\t}\n\t\t} else {\n\t\t\treturn ownerStr + debugNameSource;\n\t\t}\n\t}\n\n\tconst referenceFn = data.referenceFn;\n\tif (referenceFn !== undefined) {\n\t\tresult = getFunctionName(referenceFn);\n\t\tif (result !== undefined) {\n\t\t\treturn ownerStr + result;\n\t\t}\n\t}\n\n\tif (data.owner !== undefined) {\n\t\tconst key = findKey(data.owner, self);\n\t\tif (key !== undefined) {\n\t\t\treturn ownerStr + key;\n\t\t}\n\t}\n\treturn undefined;\n}\n\nfunction findKey(obj: object, value: object): string | undefined {\n\tfor (const key in obj) {\n\t\t// eslint-disable-next-line local/code-no-any-casts\n\t\tif ((obj as any)[key] === value) {\n\t\t\treturn key;\n\t\t}\n\t}\n\treturn undefined;\n}\n\nconst countPerClassName = new Map<string, number>();\nconst ownerId = new WeakMap<object, string>();\n\nfunction formatOwner(owner: object): string {\n\tconst id = ownerId.get(owner);\n\tif (id) {\n\t\treturn id;\n\t}\n\tconst className = getClassName(owner) ?? 'Object';\n\tlet count = countPerClassName.get(className) ?? 0;\n\tcount++;\n\tcountPerClassName.set(className, count);\n\tconst result = count === 1 ? className : `${className}#${count}`;\n\townerId.set(owner, result);\n\treturn result;\n}\n\nexport function getClassName(obj: object): string | undefined {\n\tconst ctor = obj.constructor;\n\tif (ctor) {\n\t\tif (ctor.name === 'Object') {\n\t\t\treturn undefined;\n\t\t}\n\t\treturn ctor.name;\n\t}\n\treturn undefined;\n}\n\nexport function getFunctionName(fn: Function): string | undefined {\n\tconst fnSrc = fn.toString();\n\t// Pattern: /** @description ... */\n\tconst regexp = /\\/\\*\\*\\s*@description\\s*([^*]*)\\*\\//;\n\tconst match = regexp.exec(fnSrc);\n\tconst result = match ? match[1] : undefined;\n\treturn result?.trim();\n}\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\nexport interface IDebugNameData {\n\t/**\n\t * The owner object of an observable.\n\t * Used for debugging only, such as computing a name for the observable by iterating over the fields of the owner.\n\t */\n\treadonly owner?: DebugOwner | undefined;\n\n\t/**\n\t * A string or function that returns a string that represents the name of the observable.\n\t * Used for debugging only.\n\t */\n\treadonly debugName?: DebugNameSource | undefined;\n\n\t/**\n\t * A function that points to the defining function of the object.\n\t * Used for debugging only.\n\t */\n\treadonly debugReferenceFn?: Function | undefined;\n}\n\nexport class DebugNameData {\n\tconstructor(\n\t\tpublic readonly owner: DebugOwner | undefined,\n\t\tpublic readonly debugNameSource: DebugNameSource | undefined,\n\t\tpublic readonly referenceFn: Function | undefined,\n\t) { }\n\n\tpublic getDebugName(target: object): string | undefined {\n\t\treturn getDebugName(target, this);\n\t}\n}\n\n/**\n * The owning object of an observable.\n * Is only used for debugging purposes, such as computing a name for the observable by iterating over the fields of the owner.\n */\nexport type DebugOwner = object | undefined;\nexport type DebugNameSource = string | (() => string | undefined);\n\nconst countPerName = new Map<string, number>();\nconst cachedDebugName = new WeakMap<object, string>();\n\nexport function getDebugName(target: object, data: DebugNameData): string | undefined {\n\tconst cached = cachedDebugName.get(target);\n\tif (cached) {\n\t\treturn cached;\n\t}\n\n\tconst dbgName = computeDebugName(target, data);\n\tif (dbgName) {\n\t\tlet count = countPerName.get(dbgName) ?? 0;\n\t\tcount++;\n\t\tcountPerName.set(dbgName, count);\n\t\tconst result = count === 1 ? dbgName : `${dbgName}#${count}`;\n\t\tcachedDebugName.set(target, result);\n\t\treturn result;\n\t}\n\treturn undefined;\n}\n\nfunction computeDebugName(self: object, data: DebugNameData): string | undefined {\n\tconst cached = cachedDebugName.get(self);\n\tif (cached) {\n\t\treturn cached;\n\t}\n\n\tconst ownerStr = data.owner ? formatOwner(data.owner) + `.` : '';\n\n\tlet result: string | undefined;\n\tconst debugNameSource = data.debugNameSource;\n\tif (debugNameSource !== undefined) {\n\t\tif (typeof debugNameSource === 'function') {\n\t\t\tresult = debugNameSource();\n\t\t\tif (result !== undefined) {\n\t\t\t\treturn ownerStr + result;\n\t\t\t}\n\t\t} else {\n\t\t\treturn ownerStr + debugNameSource;\n\t\t}\n\t}\n\n\tconst referenceFn = data.referenceFn;\n\tif (referenceFn !== undefined) {\n\t\tresult = getFunctionName(referenceFn);\n\t\tif (result !== undefined) {\n\t\t\treturn ownerStr + result;\n\t\t}\n\t}\n\n\tif (data.owner !== undefined) {\n\t\tconst key = findKey(data.owner, self);\n\t\tif (key !== undefined) {\n\t\t\treturn ownerStr + key;\n\t\t}\n\t}\n\treturn undefined;\n}\n\nfunction findKey(obj: object, value: object): string | undefined {\n\tfor (const key in obj) {\n\t\t// eslint-disable-next-line local/code-no-any-casts\n\t\tif ((obj as any)[key] === value) {\n\t\t\treturn key;\n\t\t}\n\t}\n\treturn undefined;\n}\n\nconst countPerClassName = new Map<string, number>();\nconst ownerId = new WeakMap<object, string>();\n\nfunction formatOwner(owner: object): string {\n\tconst id = ownerId.get(owner);\n\tif (id) {\n\t\treturn id;\n\t}\n\tconst className = getClassName(owner) ?? 'Object';\n\tlet count = countPerClassName.get(className) ?? 0;\n\tcount++;\n\tcountPerClassName.set(className, count);\n\tconst result = count === 1 ? className : `${className}#${count}`;\n\townerId.set(owner, result);\n\treturn result;\n}\n\nexport function getClassName(obj: object): string | undefined {\n\tconst ctor = obj.constructor;\n\tif (ctor) {\n\t\tif (ctor.name === 'Object') {\n\t\t\treturn undefined;\n\t\t}\n\t\treturn ctor.name;\n\t}\n\treturn undefined;\n}\n\nexport function getFunctionName(fn: Function): string | undefined {\n\tconst fnSrc = fn.toString();\n\t// Pattern: /** @description ... */\n\tconst regexp = /\\/\\*\\*\\s*@description\\s*([^*]*)\\*\\//;\n\tconst match = regexp.exec(fnSrc);\n\tconst result = match ? match[1] : undefined;\n\treturn result?.trim();\n}\n"]}
@@ -64,6 +64,7 @@ export class ConsoleObservableLogger {
64
64
  const debugTrackUpdating = false;
65
65
  if (debugTrackUpdating) {
66
66
  const updating = [];
67
+ // eslint-disable-next-line local/code-no-any-casts
67
68
  derived.__debugUpdating = updating;
68
69
  const existingBeginUpdate = derived.beginUpdate;
69
70
  derived.beginUpdate = (obs) => {