chrome-devtools-frontend 1.0.1616061 → 1.0.1621064

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 (318) hide show
  1. package/AUTHORS +1 -0
  2. package/docs/checklist/README.md +8 -7
  3. package/eslint.config.mjs +7 -0
  4. package/front_end/core/common/Object.ts +11 -2
  5. package/front_end/core/dom_extension/DOMExtension.ts +11 -8
  6. package/front_end/core/host/AidaClient.ts +8 -0
  7. package/front_end/core/host/AidaGcaTranslation.ts +1 -0
  8. package/front_end/core/host/UserMetrics.ts +0 -1
  9. package/front_end/core/platform/api/HostRuntime.ts +2 -2
  10. package/front_end/core/platform/browser/HostRuntime.ts +4 -2
  11. package/front_end/core/platform/node/HostRuntime.ts +2 -2
  12. package/front_end/core/root/ExperimentNames.ts +0 -1
  13. package/front_end/core/sdk/NetworkManager.ts +30 -4
  14. package/front_end/core/sdk/NetworkRequest.ts +2 -10
  15. package/front_end/core/sdk/Resource.ts +2 -1
  16. package/front_end/core/sdk/ServerSentEventsProtocol.ts +1 -1
  17. package/front_end/core/sdk/TraceObject.ts +7 -2
  18. package/front_end/entrypoint_template.html +1 -2
  19. package/front_end/entrypoints/greendev_floaty/FloatyEntrypoint.ts +119 -15
  20. package/front_end/entrypoints/greendev_floaty/greendev_floaty.ts +0 -2
  21. package/front_end/entrypoints/heap_snapshot_worker/HeapSnapshot.ts +43 -33
  22. package/front_end/entrypoints/heap_snapshot_worker/HeapSnapshotLoader.ts +2 -1
  23. package/front_end/entrypoints/heap_snapshot_worker/HeapSnapshotWorkerDispatcher.ts +9 -6
  24. package/front_end/entrypoints/main/MainImpl.ts +0 -2
  25. package/front_end/generated/InspectorBackendCommands.ts +8 -7
  26. package/front_end/generated/SupportedCSSProperties.js +119 -100
  27. package/front_end/generated/protocol-mapping.d.ts +1 -9
  28. package/front_end/generated/protocol-proxy-api.d.ts +1 -9
  29. package/front_end/generated/protocol.ts +24 -1
  30. package/front_end/legacy/legacy-defs.d.ts +1 -1
  31. package/front_end/models/ai_assistance/AiConversation.ts +1 -0
  32. package/front_end/models/ai_assistance/AiHistoryStorage.ts +39 -0
  33. package/front_end/models/ai_assistance/agents/AiAgent.ts +2 -0
  34. package/front_end/models/ai_assistance/agents/ConversationSummaryAgent.ts +28 -16
  35. package/front_end/models/ai_assistance/agents/GreenDevAgent.ts +512 -0
  36. package/front_end/models/ai_assistance/agents/PerformanceAgent.ts +112 -145
  37. package/front_end/models/ai_assistance/agents/README.md +0 -5
  38. package/front_end/models/ai_assistance/agents/StylingAgent.ts +9 -16
  39. package/front_end/models/ai_assistance/ai_assistance.ts +2 -0
  40. package/front_end/models/ai_code_completion/AiCodeCompletion.ts +19 -1
  41. package/front_end/models/bindings/DebuggerWorkspaceBinding.ts +48 -13
  42. package/front_end/models/bindings/SymbolizedError.ts +95 -8
  43. package/front_end/models/emulation/DeviceModeModel.ts +42 -13
  44. package/front_end/models/emulation/EmulatedDevices.ts +1 -1
  45. package/front_end/models/issues_manager/IssuesManager.ts +13 -6
  46. package/front_end/models/issues_manager/IssuesManagerEvents.ts +1 -0
  47. package/front_end/models/javascript_metadata/NativeFunctions.js +2 -2
  48. package/front_end/models/live-metrics/web-vitals-injected/web-vitals-injected.ts +1 -0
  49. package/front_end/models/stack_trace/DetailedErrorStackParser.ts +49 -10
  50. package/front_end/models/stack_trace/ErrorStackParser.ts +18 -0
  51. package/front_end/models/stack_trace/StackTraceModel.ts +5 -1
  52. package/front_end/models/text_utils/ContentData.ts +71 -10
  53. package/front_end/models/trace/types/File.ts +8 -1
  54. package/front_end/models/web_mcp/WebMCPModel.ts +22 -0
  55. package/front_end/models/workspace/UISourceCode.ts +4 -4
  56. package/front_end/panels/accessibility/ARIAAttributesView.ts +4 -4
  57. package/front_end/panels/accessibility/AccessibilitySubPane.ts +3 -2
  58. package/front_end/panels/accessibility/SourceOrderView.ts +4 -4
  59. package/front_end/panels/ai_assistance/ai_assistance.ts +1 -0
  60. package/front_end/panels/ai_assistance/components/ChatInput.ts +66 -0
  61. package/front_end/panels/ai_assistance/components/ChatMessage.ts +144 -21
  62. package/front_end/panels/ai_assistance/components/ChatView.ts +43 -8
  63. package/front_end/panels/ai_assistance/components/ExportForAgentsDialog.ts +1 -0
  64. package/front_end/panels/ai_assistance/components/WalkthroughUtils.ts +74 -0
  65. package/front_end/panels/ai_assistance/components/WalkthroughView.ts +34 -5
  66. package/front_end/panels/ai_assistance/components/chatMessage.css +11 -0
  67. package/front_end/panels/ai_assistance/components/walkthroughView.css +7 -0
  68. package/front_end/panels/application/ApplicationPanelTreeElement.ts +1 -1
  69. package/front_end/panels/application/CookieItemsView.ts +8 -9
  70. package/front_end/panels/application/DOMStorageItemsView.ts +3 -3
  71. package/front_end/panels/application/DeviceBoundSessionsModel.ts +7 -0
  72. package/front_end/panels/application/DeviceBoundSessionsTreeElement.ts +21 -0
  73. package/front_end/panels/application/DeviceBoundSessionsView.ts +2 -2
  74. package/front_end/panels/application/ExtensionStorageItemsView.ts +1 -1
  75. package/front_end/panels/application/KeyValueStorageItemsView.ts +32 -14
  76. package/front_end/panels/application/ResourcesPanel.ts +5 -5
  77. package/front_end/panels/application/StorageItemsToolbar.ts +0 -19
  78. package/front_end/panels/application/WebMCPView.ts +285 -86
  79. package/front_end/panels/application/components/BounceTrackingMitigationsView.ts +4 -4
  80. package/front_end/panels/application/preloading/components/MismatchedPreloadingGrid.ts +4 -4
  81. package/front_end/panels/application/webMCPView.css +261 -182
  82. package/front_end/panels/browser_debugger/CategorizedBreakpointsSidebarPane.ts +9 -5
  83. package/front_end/panels/changes/ChangesSidebar.ts +2 -2
  84. package/front_end/panels/changes/ChangesView.ts +9 -14
  85. package/front_end/panels/console/ConsolePanel.ts +10 -3
  86. package/front_end/panels/console/ConsoleSidebar.ts +5 -5
  87. package/front_end/panels/console/ConsoleView.ts +11 -4
  88. package/front_end/panels/console/ConsoleViewMessage.ts +1 -19
  89. package/front_end/panels/coverage/CoverageView.ts +4 -5
  90. package/front_end/panels/elements/ElementsPanel.ts +9 -12
  91. package/front_end/panels/elements/ElementsSidebarPane.ts +4 -5
  92. package/front_end/panels/elements/ElementsTreeElement.ts +61 -0
  93. package/front_end/panels/elements/ElementsTreeOutline.ts +46 -0
  94. package/front_end/panels/elements/LayersWidget.ts +2 -2
  95. package/front_end/panels/elements/MetricsSidebarPane.ts +5 -4
  96. package/front_end/panels/elements/StylePropertiesSection.ts +1 -1
  97. package/front_end/panels/elements/StylePropertyTreeElement.ts +11 -6
  98. package/front_end/panels/elements/StylesSidebarPane.ts +4 -1
  99. package/front_end/panels/elements/components/ElementsBreadcrumbs.ts +19 -20
  100. package/front_end/panels/elements/components/ElementsBreadcrumbsUtils.ts +29 -29
  101. package/front_end/panels/elements/components/QueryContainer.ts +5 -6
  102. package/front_end/panels/elements/components/components.ts +0 -2
  103. package/front_end/panels/emulation/MediaQueryInspector.ts +4 -7
  104. package/front_end/panels/layer_viewer/LayerDetailsView.ts +4 -7
  105. package/front_end/panels/layer_viewer/Layers3DView.ts +2 -2
  106. package/front_end/panels/lighthouse/LighthouseStartView.ts +2 -2
  107. package/front_end/panels/mobile_throttling/NetworkThrottlingSelector.ts +47 -66
  108. package/front_end/panels/network/NetworkConfigView.ts +11 -11
  109. package/front_end/panels/network/RequestConditionsDrawer.ts +6 -4
  110. package/front_end/panels/network/RequestCookiesView.ts +2 -2
  111. package/front_end/panels/network/RequestDeviceBoundSessionsView.ts +2 -2
  112. package/front_end/panels/network/RequestHeadersView.ts +2 -2
  113. package/front_end/panels/network/components/DirectSocketConnectionView.ts +4 -5
  114. package/front_end/panels/performance_monitor/PerformanceMonitor.ts +6 -9
  115. package/front_end/panels/profiler/HeapProfileView.ts +29 -4
  116. package/front_end/panels/profiler/ProfilesPanel.ts +1 -1
  117. package/front_end/panels/protocol_monitor/JSONEditor.css +8 -1
  118. package/front_end/panels/protocol_monitor/JSONEditor.ts +7 -2
  119. package/front_end/panels/protocol_monitor/ProtocolMonitor.ts +6 -4
  120. package/front_end/panels/recorder/components/ControlButton.ts +4 -4
  121. package/front_end/panels/recorder/components/StepView.ts +6 -6
  122. package/front_end/panels/search/SearchView.ts +4 -7
  123. package/front_end/panels/sources/DebuggerPausedMessage.ts +18 -22
  124. package/front_end/panels/sources/SourcesView.ts +1 -1
  125. package/front_end/panels/sources/TabbedEditorContainer.ts +2 -2
  126. package/front_end/panels/sources/ThreadsSidebarPane.ts +2 -4
  127. package/front_end/panels/sources/WatchExpressionsSidebarPane.ts +24 -20
  128. package/front_end/panels/timeline/StatusDialog.ts +5 -8
  129. package/front_end/panels/timeline/ThirdPartyTreeView.ts +10 -0
  130. package/front_end/panels/timeline/TimelineLoader.ts +3 -4
  131. package/front_end/panels/timeline/TimelineSelectorStatsView.ts +2 -2
  132. package/front_end/panels/timeline/components/TimelineRangeSummaryView.ts +2 -0
  133. package/front_end/panels/timeline/components/TimelineSummary.ts +9 -1
  134. package/front_end/panels/timeline/components/timelineSummary.css +4 -0
  135. package/front_end/panels/timeline/overlays/components/TimespanBreakdownOverlay.ts +2 -2
  136. package/front_end/panels/timeline/thirdPartyTreeView.css +8 -1
  137. package/front_end/panels/web_audio/WebAudioView.ts +5 -4
  138. package/front_end/panels/whats_new/ReleaseNoteText.ts +9 -9
  139. package/front_end/panels/whats_new/resources/WNDT.md +9 -6
  140. package/front_end/third_party/chromium/README.chromium +1 -1
  141. package/front_end/third_party/puppeteer/README.chromium +2 -2
  142. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/ElementHandle.d.ts +41 -2
  143. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/ElementHandle.d.ts.map +1 -1
  144. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/ElementHandle.js.map +1 -1
  145. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Extension.d.ts +13 -1
  146. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Extension.d.ts.map +1 -1
  147. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Extension.js +21 -1
  148. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Extension.js.map +1 -1
  149. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/ElementHandle.d.ts.map +1 -1
  150. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/ElementHandle.js +1 -0
  151. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/ElementHandle.js.map +1 -1
  152. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Browser.d.ts +2 -2
  153. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Browser.d.ts.map +1 -1
  154. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Browser.js +5 -5
  155. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Browser.js.map +1 -1
  156. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/BrowserConnector.d.ts.map +1 -1
  157. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/BrowserConnector.js +2 -2
  158. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/BrowserConnector.js.map +1 -1
  159. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/ElementHandle.d.ts.map +1 -1
  160. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/ElementHandle.js +1 -0
  161. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/ElementHandle.js.map +1 -1
  162. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Extension.d.ts +1 -1
  163. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Extension.d.ts.map +1 -1
  164. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Extension.js +2 -2
  165. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Extension.js.map +1 -1
  166. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/TargetManager.d.ts +1 -1
  167. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/TargetManager.d.ts.map +1 -1
  168. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/TargetManager.js +52 -1
  169. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/TargetManager.js.map +1 -1
  170. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/WebMCP.d.ts.map +1 -1
  171. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/WebMCP.js.map +1 -1
  172. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/ConnectOptions.d.ts +25 -0
  173. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/ConnectOptions.d.ts.map +1 -1
  174. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/injected/injected.d.ts +1 -1
  175. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/BrowserLauncher.d.ts.map +1 -1
  176. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/BrowserLauncher.js +2 -2
  177. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/BrowserLauncher.js.map +1 -1
  178. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/ChromeLauncher.d.ts.map +1 -1
  179. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/ChromeLauncher.js +0 -1
  180. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/ChromeLauncher.js.map +1 -1
  181. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/revisions.d.ts +2 -2
  182. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/revisions.js +2 -2
  183. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/util/Mutex.d.ts +2 -2
  184. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/util/version.d.ts +1 -1
  185. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/util/version.js +1 -1
  186. package/front_end/third_party/puppeteer/package/lib/cjs/third_party/urlpattern-polyfill/urlpattern-polyfill.d.ts +1 -0
  187. package/front_end/third_party/puppeteer/package/lib/cjs/third_party/urlpattern-polyfill/urlpattern-polyfill.js +853 -0
  188. package/front_end/third_party/puppeteer/package/lib/es5-iife/puppeteer-core-browser.d.ts +91 -11
  189. package/front_end/third_party/puppeteer/package/lib/es5-iife/puppeteer-core-browser.js +1046 -33
  190. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/ElementHandle.d.ts +41 -2
  191. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/ElementHandle.d.ts.map +1 -1
  192. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/ElementHandle.js.map +1 -1
  193. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Extension.d.ts +13 -1
  194. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Extension.d.ts.map +1 -1
  195. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Extension.js +21 -1
  196. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Extension.js.map +1 -1
  197. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/ElementHandle.d.ts.map +1 -1
  198. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/ElementHandle.js +1 -0
  199. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/ElementHandle.js.map +1 -1
  200. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Browser.d.ts +2 -2
  201. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Browser.d.ts.map +1 -1
  202. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Browser.js +5 -5
  203. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Browser.js.map +1 -1
  204. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/BrowserConnector.d.ts.map +1 -1
  205. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/BrowserConnector.js +2 -2
  206. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/BrowserConnector.js.map +1 -1
  207. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/ElementHandle.d.ts.map +1 -1
  208. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/ElementHandle.js +1 -0
  209. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/ElementHandle.js.map +1 -1
  210. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Extension.d.ts +1 -1
  211. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Extension.d.ts.map +1 -1
  212. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Extension.js +2 -2
  213. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Extension.js.map +1 -1
  214. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/TargetManager.d.ts +1 -1
  215. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/TargetManager.d.ts.map +1 -1
  216. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/TargetManager.js +52 -1
  217. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/TargetManager.js.map +1 -1
  218. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/WebMCP.d.ts.map +1 -1
  219. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/WebMCP.js.map +1 -1
  220. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/ConnectOptions.d.ts +25 -0
  221. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/ConnectOptions.d.ts.map +1 -1
  222. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/injected/injected.d.ts +1 -1
  223. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/BrowserLauncher.d.ts.map +1 -1
  224. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/BrowserLauncher.js +2 -2
  225. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/BrowserLauncher.js.map +1 -1
  226. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/ChromeLauncher.d.ts.map +1 -1
  227. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/ChromeLauncher.js +0 -1
  228. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/ChromeLauncher.js.map +1 -1
  229. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/revisions.d.ts +2 -2
  230. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/revisions.js +2 -2
  231. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/util/Mutex.d.ts +2 -2
  232. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/util/version.d.ts +1 -1
  233. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/util/version.js +1 -1
  234. package/front_end/third_party/puppeteer/package/lib/esm/third_party/urlpattern-polyfill/urlpattern-polyfill.d.ts +1 -0
  235. package/front_end/third_party/puppeteer/package/lib/esm/third_party/urlpattern-polyfill/urlpattern-polyfill.js +805 -0
  236. package/front_end/third_party/puppeteer/package/lib/types.d.ts +91 -11
  237. package/front_end/third_party/puppeteer/package/package.json +3 -2
  238. package/front_end/third_party/puppeteer/package/src/api/ElementHandle.ts +53 -11
  239. package/front_end/third_party/puppeteer/package/src/api/Extension.ts +29 -1
  240. package/front_end/third_party/puppeteer/package/src/bidi/ElementHandle.ts +1 -0
  241. package/front_end/third_party/puppeteer/package/src/cdp/Browser.ts +6 -0
  242. package/front_end/third_party/puppeteer/package/src/cdp/BrowserConnector.ts +2 -0
  243. package/front_end/third_party/puppeteer/package/src/cdp/ElementHandle.ts +1 -0
  244. package/front_end/third_party/puppeteer/package/src/cdp/Extension.ts +9 -2
  245. package/front_end/third_party/puppeteer/package/src/cdp/TargetManager.ts +59 -0
  246. package/front_end/third_party/puppeteer/package/src/cdp/WebMCP.ts +6 -1
  247. package/front_end/third_party/puppeteer/package/src/common/ConnectOptions.ts +26 -0
  248. package/front_end/third_party/puppeteer/package/src/node/BrowserLauncher.ts +2 -0
  249. package/front_end/third_party/puppeteer/package/src/node/ChromeLauncher.ts +0 -1
  250. package/front_end/third_party/puppeteer/package/src/revisions.ts +2 -2
  251. package/front_end/third_party/puppeteer/package/src/util/version.ts +1 -1
  252. package/front_end/third_party/puppeteer/puppeteer-tsconfig.json +2 -1
  253. package/front_end/third_party/web-vitals/README.chromium +2 -2
  254. package/front_end/third_party/web-vitals/package/README.md +21 -10
  255. package/front_end/third_party/web-vitals/package/dist/modules/attribution/onCLS.js +2 -4
  256. package/front_end/third_party/web-vitals/package/dist/modules/attribution/onFCP.js +1 -2
  257. package/front_end/third_party/web-vitals/package/dist/modules/attribution/onINP.d.ts +4 -0
  258. package/front_end/third_party/web-vitals/package/dist/modules/attribution/onINP.js +44 -39
  259. package/front_end/third_party/web-vitals/package/dist/modules/attribution/onLCP.js +25 -19
  260. package/front_end/third_party/web-vitals/package/dist/modules/attribution/onTTFB.js +1 -2
  261. package/front_end/third_party/web-vitals/package/dist/modules/lib/doubleRAF.js +1 -1
  262. package/front_end/third_party/web-vitals/package/dist/modules/lib/getActivationStart.js +1 -2
  263. package/front_end/third_party/web-vitals/package/dist/modules/lib/getLoadState.js +16 -18
  264. package/front_end/third_party/web-vitals/package/dist/modules/lib/getVisibilityWatcher.js +2 -1
  265. package/front_end/third_party/web-vitals/package/dist/modules/lib/initMetric.d.ts +1 -1
  266. package/front_end/third_party/web-vitals/package/dist/modules/lib/observe.js +1 -1
  267. package/front_end/third_party/web-vitals/package/dist/modules/lib/polyfills/interactionCountPolyfill.d.ts +1 -1
  268. package/front_end/third_party/web-vitals/package/dist/modules/lib/polyfills/interactionCountPolyfill.js +1 -3
  269. package/front_end/third_party/web-vitals/package/dist/modules/lib/whenActivated.js +1 -1
  270. package/front_end/third_party/web-vitals/package/dist/modules/lib/whenIdleOrHidden.js +11 -7
  271. package/front_end/third_party/web-vitals/package/dist/modules/onCLS.js +1 -1
  272. package/front_end/third_party/web-vitals/package/dist/modules/types/inp.d.ts +4 -0
  273. package/front_end/third_party/web-vitals/package/dist/modules/types.d.ts +1 -2
  274. package/front_end/third_party/web-vitals/package/dist/modules/types.js +0 -1
  275. package/front_end/third_party/web-vitals/package/package.json +24 -27
  276. package/front_end/third_party/web-vitals/package/src/attribution/onCLS.ts +2 -7
  277. package/front_end/third_party/web-vitals/package/src/attribution/onFCP.ts +1 -2
  278. package/front_end/third_party/web-vitals/package/src/attribution/onINP.ts +49 -43
  279. package/front_end/third_party/web-vitals/package/src/attribution/onLCP.ts +27 -24
  280. package/front_end/third_party/web-vitals/package/src/attribution/onTTFB.ts +1 -2
  281. package/front_end/third_party/web-vitals/package/src/lib/doubleRAF.ts +1 -1
  282. package/front_end/third_party/web-vitals/package/src/lib/getActivationStart.ts +1 -2
  283. package/front_end/third_party/web-vitals/package/src/lib/getLoadState.ts +21 -20
  284. package/front_end/third_party/web-vitals/package/src/lib/getVisibilityWatcher.ts +2 -3
  285. package/front_end/third_party/web-vitals/package/src/lib/observe.ts +1 -1
  286. package/front_end/third_party/web-vitals/package/src/lib/polyfills/interactionCountPolyfill.ts +2 -4
  287. package/front_end/third_party/web-vitals/package/src/lib/whenActivated.ts +1 -1
  288. package/front_end/third_party/web-vitals/package/src/lib/whenIdleOrHidden.ts +13 -7
  289. package/front_end/third_party/web-vitals/package/src/onCLS.ts +1 -1
  290. package/front_end/third_party/web-vitals/package/src/types/inp.ts +4 -0
  291. package/front_end/third_party/web-vitals/package/src/types.ts +1 -2
  292. package/front_end/third_party/web-vitals/patches/0001-Add-onEachInteraction-to-onINP-options.patch +13 -74
  293. package/front_end/third_party/web-vitals/rebuild.sh +3 -3
  294. package/front_end/third_party/web-vitals/web-vitals-tsconfig.json +0 -1
  295. package/front_end/ui/components/icon_button/iconButton.css +1 -0
  296. package/front_end/ui/components/legacy_wrapper/LegacyWrapper.ts +6 -6
  297. package/front_end/ui/components/lists/list.css +4 -0
  298. package/front_end/ui/legacy/Dialog.ts +21 -2
  299. package/front_end/ui/legacy/SoftContextMenu.ts +3 -3
  300. package/front_end/ui/legacy/SplitWidget.ts +9 -9
  301. package/front_end/ui/legacy/TabbedPane.ts +12 -12
  302. package/front_end/ui/legacy/View.ts +24 -22
  303. package/front_end/ui/legacy/ViewManager.ts +12 -12
  304. package/front_end/ui/legacy/ViewRegistration.ts +2 -2
  305. package/front_end/ui/legacy/Widget.ts +165 -119
  306. package/front_end/ui/legacy/components/source_frame/ImageView.ts +10 -5
  307. package/front_end/ui/legacy/components/utils/JSPresentationUtils.ts +9 -6
  308. package/front_end/ui/legacy/components/utils/Linkifier.ts +37 -11
  309. package/front_end/ui/legacy/components/utils/jsUtils.css +1 -0
  310. package/front_end/ui/legacy/inspectorCommon.css +0 -6
  311. package/front_end/ui/lit/render.ts +11 -9
  312. package/front_end/ui/visual_logging/KnownContextValues.ts +36 -0
  313. package/package.json +1 -1
  314. package/front_end/Images/src/dots-circle.svg +0 -10
  315. package/front_end/panels/elements/components/Helper.ts +0 -35
  316. package/front_end/third_party/web-vitals/package/dist/modules/types/polyfills.d.ts +0 -4
  317. package/front_end/third_party/web-vitals/package/dist/modules/types/polyfills.js +0 -16
  318. package/front_end/third_party/web-vitals/package/src/types/polyfills.ts +0 -24
@@ -10,7 +10,7 @@ function _checkPrivateRedeclaration(e, t) { if (t.has(e)) throw new TypeError("C
10
10
  function _classPrivateFieldSet(s, a, r) { return s.set(_assertClassBrand(s, a), r), r; }
11
11
  function _classPrivateFieldGet(s, a) { return s.get(_assertClassBrand(s, a)); }
12
12
  function _assertClassBrand(e, t, n) { if ("function" == typeof e ? e === t : e.has(t)) return arguments.length < 3 ? t : n; throw new TypeError("Private element is not present on this object"); }
13
- var Puppeteer = function (exports, _PuppeteerURL, _LazyArg, _ARIAQueryHandler, _mutex2, _onRelease) {
13
+ var Puppeteer = function (exports, _PuppeteerURL, _LazyArg, _ARIAQueryHandler, _i2, _n, _t, _e, _s, _l, _o, _d, _p, _g, _Class4_brand, _i3, _n2, _t3, _e2, _s2, _l2, _mutex2, _onRelease) {
14
14
  'use strict';
15
15
 
16
16
  /**
@@ -3049,7 +3049,7 @@ var Puppeteer = function (exports, _PuppeteerURL, _LazyArg, _ARIAQueryHandler, _
3049
3049
  */
3050
3050
  // If moved update release-please config
3051
3051
  // x-release-please-start-version
3052
- const packageVersion = '24.41.0';
3052
+ const packageVersion = '24.42.0';
3053
3053
  // x-release-please-end
3054
3054
 
3055
3055
  /**
@@ -8754,20 +8754,42 @@ var Puppeteer = function (exports, _PuppeteerURL, _LazyArg, _ARIAQueryHandler, _
8754
8754
  var _id2 = /*#__PURE__*/new WeakMap();
8755
8755
  var _version = /*#__PURE__*/new WeakMap();
8756
8756
  var _name = /*#__PURE__*/new WeakMap();
8757
+ var _path = /*#__PURE__*/new WeakMap();
8758
+ var _enabled = /*#__PURE__*/new WeakMap();
8757
8759
  class Extension {
8758
8760
  /**
8759
8761
  * @internal
8760
8762
  */
8761
- constructor(id, version, name) {
8763
+ constructor(id, version, name, path, enabled) {
8762
8764
  _classPrivateFieldInitSpec(this, _id2, void 0);
8763
8765
  _classPrivateFieldInitSpec(this, _version, void 0);
8764
8766
  _classPrivateFieldInitSpec(this, _name, void 0);
8767
+ _classPrivateFieldInitSpec(this, _path, void 0);
8768
+ _classPrivateFieldInitSpec(this, _enabled, void 0);
8765
8769
  if (!id || !version) {
8766
8770
  throw new Error('Extension ID and version are required');
8767
8771
  }
8768
8772
  _classPrivateFieldSet(_id2, this, id);
8769
8773
  _classPrivateFieldSet(_version, this, version);
8770
8774
  _classPrivateFieldSet(_name, this, name);
8775
+ _classPrivateFieldSet(_path, this, path);
8776
+ _classPrivateFieldSet(_enabled, this, enabled);
8777
+ }
8778
+ /**
8779
+ * Whether the extension is enabled.
8780
+ *
8781
+ * @public
8782
+ */
8783
+ get enabled() {
8784
+ return _classPrivateFieldGet(_enabled, this);
8785
+ }
8786
+ /**
8787
+ * The path in the file system where the extension is located.
8788
+ *
8789
+ * @public
8790
+ */
8791
+ get path() {
8792
+ return _classPrivateFieldGet(_path, this);
8771
8793
  }
8772
8794
  /**
8773
8795
  * The version of the extension as specified in its manifest.
@@ -14314,7 +14336,7 @@ var Puppeteer = function (exports, _PuppeteerURL, _LazyArg, _ARIAQueryHandler, _
14314
14336
  * @public
14315
14337
  */
14316
14338
  var _client2 = /*#__PURE__*/new WeakMap();
14317
- var _enabled = /*#__PURE__*/new WeakMap();
14339
+ var _enabled2 = /*#__PURE__*/new WeakMap();
14318
14340
  var _scriptURLs = /*#__PURE__*/new WeakMap();
14319
14341
  var _scriptSources = /*#__PURE__*/new WeakMap();
14320
14342
  var _subscriptions = /*#__PURE__*/new WeakMap();
@@ -14329,7 +14351,7 @@ var Puppeteer = function (exports, _PuppeteerURL, _LazyArg, _ARIAQueryHandler, _
14329
14351
  constructor(client) {
14330
14352
  _classPrivateMethodInitSpec(this, _JSCoverage_brand);
14331
14353
  _classPrivateFieldInitSpec(this, _client2, void 0);
14332
- _classPrivateFieldInitSpec(this, _enabled, false);
14354
+ _classPrivateFieldInitSpec(this, _enabled2, false);
14333
14355
  _classPrivateFieldInitSpec(this, _scriptURLs, new Map());
14334
14356
  _classPrivateFieldInitSpec(this, _scriptSources, new Map());
14335
14357
  _classPrivateFieldInitSpec(this, _subscriptions, void 0);
@@ -14345,7 +14367,7 @@ var Puppeteer = function (exports, _PuppeteerURL, _LazyArg, _ARIAQueryHandler, _
14345
14367
  _classPrivateFieldSet(_client2, this, client);
14346
14368
  }
14347
14369
  async start(options = {}) {
14348
- assert(!_classPrivateFieldGet(_enabled, this), 'JSCoverage is already enabled');
14370
+ assert(!_classPrivateFieldGet(_enabled2, this), 'JSCoverage is already enabled');
14349
14371
  const {
14350
14372
  resetOnNavigation = true,
14351
14373
  reportAnonymousScripts = false,
@@ -14355,7 +14377,7 @@ var Puppeteer = function (exports, _PuppeteerURL, _LazyArg, _ARIAQueryHandler, _
14355
14377
  _classPrivateFieldSet(_resetOnNavigation, this, resetOnNavigation);
14356
14378
  _classPrivateFieldSet(_reportAnonymousScripts, this, reportAnonymousScripts);
14357
14379
  _classPrivateFieldSet(_includeRawScriptCoverage, this, includeRawScriptCoverage);
14358
- _classPrivateFieldSet(_enabled, this, true);
14380
+ _classPrivateFieldSet(_enabled2, this, true);
14359
14381
  _classPrivateFieldGet(_scriptURLs, this).clear();
14360
14382
  _classPrivateFieldGet(_scriptSources, this).clear();
14361
14383
  _classPrivateFieldSet(_subscriptions, this, new DisposableStack());
@@ -14370,8 +14392,8 @@ var Puppeteer = function (exports, _PuppeteerURL, _LazyArg, _ARIAQueryHandler, _
14370
14392
  })]);
14371
14393
  }
14372
14394
  async stop() {
14373
- assert(_classPrivateFieldGet(_enabled, this), 'JSCoverage is not enabled');
14374
- _classPrivateFieldSet(_enabled, this, false);
14395
+ assert(_classPrivateFieldGet(_enabled2, this), 'JSCoverage is not enabled');
14396
+ _classPrivateFieldSet(_enabled2, this, false);
14375
14397
  const result = await Promise.all([_classPrivateFieldGet(_client2, this).send('Profiler.takePreciseCoverage'), _classPrivateFieldGet(_client2, this).send('Profiler.stopPreciseCoverage'), _classPrivateFieldGet(_client2, this).send('Profiler.disable'), _classPrivateFieldGet(_client2, this).send('Debugger.disable')]);
14376
14398
  _classPrivateFieldGet(_subscriptions, this)?.dispose();
14377
14399
  const coverage = [];
@@ -14439,7 +14461,7 @@ var Puppeteer = function (exports, _PuppeteerURL, _LazyArg, _ARIAQueryHandler, _
14439
14461
  }
14440
14462
  }
14441
14463
  var _client3 = /*#__PURE__*/new WeakMap();
14442
- var _enabled2 = /*#__PURE__*/new WeakMap();
14464
+ var _enabled3 = /*#__PURE__*/new WeakMap();
14443
14465
  var _stylesheetURLs = /*#__PURE__*/new WeakMap();
14444
14466
  var _stylesheetSources = /*#__PURE__*/new WeakMap();
14445
14467
  var _eventListeners = /*#__PURE__*/new WeakMap();
@@ -14449,7 +14471,7 @@ var Puppeteer = function (exports, _PuppeteerURL, _LazyArg, _ARIAQueryHandler, _
14449
14471
  constructor(client) {
14450
14472
  _classPrivateMethodInitSpec(this, _CSSCoverage_brand);
14451
14473
  _classPrivateFieldInitSpec(this, _client3, void 0);
14452
- _classPrivateFieldInitSpec(this, _enabled2, false);
14474
+ _classPrivateFieldInitSpec(this, _enabled3, false);
14453
14475
  _classPrivateFieldInitSpec(this, _stylesheetURLs, new Map());
14454
14476
  _classPrivateFieldInitSpec(this, _stylesheetSources, new Map());
14455
14477
  _classPrivateFieldInitSpec(this, _eventListeners, void 0);
@@ -14463,12 +14485,12 @@ var Puppeteer = function (exports, _PuppeteerURL, _LazyArg, _ARIAQueryHandler, _
14463
14485
  _classPrivateFieldSet(_client3, this, client);
14464
14486
  }
14465
14487
  async start(options = {}) {
14466
- assert(!_classPrivateFieldGet(_enabled2, this), 'CSSCoverage is already enabled');
14488
+ assert(!_classPrivateFieldGet(_enabled3, this), 'CSSCoverage is already enabled');
14467
14489
  const {
14468
14490
  resetOnNavigation = true
14469
14491
  } = options;
14470
14492
  _classPrivateFieldSet(_resetOnNavigation2, this, resetOnNavigation);
14471
- _classPrivateFieldSet(_enabled2, this, true);
14493
+ _classPrivateFieldSet(_enabled3, this, true);
14472
14494
  _classPrivateFieldGet(_stylesheetURLs, this).clear();
14473
14495
  _classPrivateFieldGet(_stylesheetSources, this).clear();
14474
14496
  _classPrivateFieldSet(_eventListeners, this, new DisposableStack());
@@ -14478,8 +14500,8 @@ var Puppeteer = function (exports, _PuppeteerURL, _LazyArg, _ARIAQueryHandler, _
14478
14500
  await Promise.all([_classPrivateFieldGet(_client3, this).send('DOM.enable'), _classPrivateFieldGet(_client3, this).send('CSS.enable'), _classPrivateFieldGet(_client3, this).send('CSS.startRuleUsageTracking')]);
14479
14501
  }
14480
14502
  async stop() {
14481
- assert(_classPrivateFieldGet(_enabled2, this), 'CSSCoverage is not enabled');
14482
- _classPrivateFieldSet(_enabled2, this, false);
14503
+ assert(_classPrivateFieldGet(_enabled3, this), 'CSSCoverage is not enabled');
14504
+ _classPrivateFieldSet(_enabled3, this, false);
14483
14505
  const ruleTrackingResponse = await _classPrivateFieldGet(_client3, this).send('CSS.stopRuleUsageTracking');
14484
14506
  await Promise.all([_classPrivateFieldGet(_client3, this).send('CSS.disable'), _classPrivateFieldGet(_client3, this).send('DOM.disable')]);
14485
14507
  _classPrivateFieldGet(_eventListeners, this)?.dispose();
@@ -15977,7 +15999,8 @@ var Puppeteer = function (exports, _PuppeteerURL, _LazyArg, _ARIAQueryHandler, _
15977
15999
  await this.client.send('Autofill.trigger', {
15978
16000
  fieldId,
15979
16001
  frameId,
15980
- card: data.creditCard
16002
+ card: data.creditCard,
16003
+ address: data.address
15981
16004
  });
15982
16005
  }
15983
16006
  async *queryAXTree(name, role) {
@@ -21128,7 +21151,7 @@ var Puppeteer = function (exports, _PuppeteerURL, _LazyArg, _ARIAQueryHandler, _
21128
21151
  */
21129
21152
  var _client15 = /*#__PURE__*/new WeakMap();
21130
21153
  var _recording = /*#__PURE__*/new WeakMap();
21131
- var _path = /*#__PURE__*/new WeakMap();
21154
+ var _path2 = /*#__PURE__*/new WeakMap();
21132
21155
  class Tracing {
21133
21156
  /**
21134
21157
  * @internal
@@ -21136,7 +21159,7 @@ var Puppeteer = function (exports, _PuppeteerURL, _LazyArg, _ARIAQueryHandler, _
21136
21159
  constructor(client) {
21137
21160
  _classPrivateFieldInitSpec(this, _client15, void 0);
21138
21161
  _classPrivateFieldInitSpec(this, _recording, false);
21139
- _classPrivateFieldInitSpec(this, _path, void 0);
21162
+ _classPrivateFieldInitSpec(this, _path2, void 0);
21140
21163
  _classPrivateFieldSet(_client15, this, client);
21141
21164
  }
21142
21165
  /**
@@ -21171,7 +21194,7 @@ var Puppeteer = function (exports, _PuppeteerURL, _LazyArg, _ARIAQueryHandler, _
21171
21194
  const includedCategories = categories.filter(cat => {
21172
21195
  return !cat.startsWith('-');
21173
21196
  });
21174
- _classPrivateFieldSet(_path, this, path);
21197
+ _classPrivateFieldSet(_path2, this, path);
21175
21198
  _classPrivateFieldSet(_recording, this, true);
21176
21199
  await _classPrivateFieldGet(_client15, this).send('Tracing.start', {
21177
21200
  transferMode: 'ReturnAsStream',
@@ -21191,7 +21214,7 @@ var Puppeteer = function (exports, _PuppeteerURL, _LazyArg, _ARIAQueryHandler, _
21191
21214
  try {
21192
21215
  assert(event.stream, 'Missing "stream"');
21193
21216
  const readable = await getReadableFromProtocolStream(_classPrivateFieldGet(_client15, this), event.stream);
21194
- const typedArray = await getReadableAsTypedArray(readable, _classPrivateFieldGet(_path, this));
21217
+ const typedArray = await getReadableAsTypedArray(readable, _classPrivateFieldGet(_path2, this));
21195
21218
  contentDeferred.resolve(typedArray ?? undefined);
21196
21219
  } catch (error) {
21197
21220
  if (isErrorLike(error)) {
@@ -22773,8 +22796,8 @@ var Puppeteer = function (exports, _PuppeteerURL, _LazyArg, _ARIAQueryHandler, _
22773
22796
  /*
22774
22797
  * @internal
22775
22798
  */
22776
- constructor(id, version, name, browser) {
22777
- super(id, version, name);
22799
+ constructor(id, version, name, path, enabled, browser) {
22800
+ super(id, version, name, path, enabled);
22778
22801
  _classPrivateMethodInitSpec(this, _CdpExtension_brand);
22779
22802
  // needed to access the CDPSession to trigger an extension action.
22780
22803
  _classPrivateFieldInitSpec(this, _browser2, void 0);
@@ -23082,6 +23105,944 @@ var Puppeteer = function (exports, _PuppeteerURL, _LazyArg, _ARIAQueryHandler, _
23082
23105
  */
23083
23106
  class OtherTarget extends CdpTarget {}
23084
23107
 
23108
+ /**
23109
+ Copyright 2020 Intel Corporation
23110
+ Permission is hereby granted, free of charge, to any person obtaining a copy
23111
+ of this software and associated documentation files (the "Software"), to deal
23112
+ in the Software without restriction, including without limitation the rights
23113
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
23114
+ copies of the Software, and to permit persons to whom the Software is
23115
+ furnished to do so, subject to the following conditions:
23116
+ The above copyright notice and this permission notice shall be included in
23117
+ all copies or substantial portions of the Software.
23118
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
23119
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
23120
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
23121
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
23122
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
23123
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
23124
+ THE SOFTWARE.
23125
+ */
23126
+ // node_modules/urlpattern-polyfill/dist/urlpattern.js
23127
+ var Pe = Object.defineProperty;
23128
+ var a = (e, t) => Pe(e, "name", {
23129
+ value: t,
23130
+ configurable: true
23131
+ });
23132
+ var P = class P {
23133
+ constructor(t, r, n, c, l, f) {
23134
+ _defineProperty(this, "type", 3);
23135
+ _defineProperty(this, "name", "");
23136
+ _defineProperty(this, "prefix", "");
23137
+ _defineProperty(this, "value", "");
23138
+ _defineProperty(this, "suffix", "");
23139
+ _defineProperty(this, "modifier", 3);
23140
+ this.type = t, this.name = r, this.prefix = n, this.value = c, this.suffix = l, this.modifier = f;
23141
+ }
23142
+ hasCustomName() {
23143
+ return this.name !== "" && typeof this.name != "number";
23144
+ }
23145
+ };
23146
+ a(P, "Part");
23147
+ var Re = /[$_\p{ID_Start}]/u;
23148
+ var Ee = /[$_\u200C\u200D\p{ID_Continue}]/u;
23149
+ var v = ".*";
23150
+ function Oe(e, t) {
23151
+ return (t ? /^[\x00-\xFF]*$/ : /^[\x00-\x7F]*$/).test(e);
23152
+ }
23153
+ a(Oe, "isASCII");
23154
+ function D(e, t = false) {
23155
+ let r = [],
23156
+ n = 0;
23157
+ for (; n < e.length;) {
23158
+ let c = e[n],
23159
+ l = a(function (f) {
23160
+ if (!t) throw new TypeError(f);
23161
+ r.push({
23162
+ type: "INVALID_CHAR",
23163
+ index: n,
23164
+ value: e[n++]
23165
+ });
23166
+ }, "ErrorOrInvalid");
23167
+ if (c === "*") {
23168
+ r.push({
23169
+ type: "ASTERISK",
23170
+ index: n,
23171
+ value: e[n++]
23172
+ });
23173
+ continue;
23174
+ }
23175
+ if (c === "+" || c === "?") {
23176
+ r.push({
23177
+ type: "OTHER_MODIFIER",
23178
+ index: n,
23179
+ value: e[n++]
23180
+ });
23181
+ continue;
23182
+ }
23183
+ if (c === "\\") {
23184
+ r.push({
23185
+ type: "ESCAPED_CHAR",
23186
+ index: n++,
23187
+ value: e[n++]
23188
+ });
23189
+ continue;
23190
+ }
23191
+ if (c === "{") {
23192
+ r.push({
23193
+ type: "OPEN",
23194
+ index: n,
23195
+ value: e[n++]
23196
+ });
23197
+ continue;
23198
+ }
23199
+ if (c === "}") {
23200
+ r.push({
23201
+ type: "CLOSE",
23202
+ index: n,
23203
+ value: e[n++]
23204
+ });
23205
+ continue;
23206
+ }
23207
+ if (c === ":") {
23208
+ let f = "",
23209
+ s = n + 1;
23210
+ for (; s < e.length;) {
23211
+ let i = e.substr(s, 1);
23212
+ if (s === n + 1 && Re.test(i) || s !== n + 1 && Ee.test(i)) {
23213
+ f += e[s++];
23214
+ continue;
23215
+ }
23216
+ break;
23217
+ }
23218
+ if (!f) {
23219
+ l(`Missing parameter name at ${n}`);
23220
+ continue;
23221
+ }
23222
+ r.push({
23223
+ type: "NAME",
23224
+ index: n,
23225
+ value: f
23226
+ }), n = s;
23227
+ continue;
23228
+ }
23229
+ if (c === "(") {
23230
+ let f = 1,
23231
+ s = "",
23232
+ i = n + 1,
23233
+ o = false;
23234
+ if (e[i] === "?") {
23235
+ l(`Pattern cannot start with "?" at ${i}`);
23236
+ continue;
23237
+ }
23238
+ for (; i < e.length;) {
23239
+ if (!Oe(e[i], false)) {
23240
+ l(`Invalid character '${e[i]}' at ${i}.`), o = true;
23241
+ break;
23242
+ }
23243
+ if (e[i] === "\\") {
23244
+ s += e[i++] + e[i++];
23245
+ continue;
23246
+ }
23247
+ if (e[i] === ")") {
23248
+ if (f--, f === 0) {
23249
+ i++;
23250
+ break;
23251
+ }
23252
+ } else if (e[i] === "(" && (f++, e[i + 1] !== "?")) {
23253
+ l(`Capturing groups are not allowed at ${i}`), o = true;
23254
+ break;
23255
+ }
23256
+ s += e[i++];
23257
+ }
23258
+ if (o) continue;
23259
+ if (f) {
23260
+ l(`Unbalanced pattern at ${n}`);
23261
+ continue;
23262
+ }
23263
+ if (!s) {
23264
+ l(`Missing pattern at ${n}`);
23265
+ continue;
23266
+ }
23267
+ r.push({
23268
+ type: "REGEX",
23269
+ index: n,
23270
+ value: s
23271
+ }), n = i;
23272
+ continue;
23273
+ }
23274
+ r.push({
23275
+ type: "CHAR",
23276
+ index: n,
23277
+ value: e[n++]
23278
+ });
23279
+ }
23280
+ return r.push({
23281
+ type: "END",
23282
+ index: n,
23283
+ value: ""
23284
+ }), r;
23285
+ }
23286
+ a(D, "lexer");
23287
+ function F(e, t = {}) {
23288
+ let r = D(e);
23289
+ t.delimiter ??= "/#?", t.prefixes ??= "./";
23290
+ let n = `[^${x(t.delimiter)}]+?`,
23291
+ c = [],
23292
+ l = 0,
23293
+ f = 0,
23294
+ i = /* @__PURE__ */new Set(),
23295
+ o = a(u => {
23296
+ if (f < r.length && r[f].type === u) return r[f++].value;
23297
+ }, "tryConsume"),
23298
+ h = a(() => o("OTHER_MODIFIER") ?? o("ASTERISK"), "tryConsumeModifier"),
23299
+ p = a(u => {
23300
+ let d = o(u);
23301
+ if (d !== void 0) return d;
23302
+ let {
23303
+ type: g,
23304
+ index: y
23305
+ } = r[f];
23306
+ throw new TypeError(`Unexpected ${g} at ${y}, expected ${u}`);
23307
+ }, "mustConsume"),
23308
+ A = a(() => {
23309
+ let u = "",
23310
+ d;
23311
+ for (; d = o("CHAR") ?? o("ESCAPED_CHAR");) u += d;
23312
+ return u;
23313
+ }, "consumeText"),
23314
+ xe = a(u => u, "DefaultEncodePart"),
23315
+ N = t.encodePart || xe,
23316
+ H = "",
23317
+ $ = a(u => {
23318
+ H += u;
23319
+ }, "appendToPendingFixedValue"),
23320
+ M = a(() => {
23321
+ H.length && (c.push(new P(3, "", "", N(H), "", 3)), H = "");
23322
+ }, "maybeAddPartFromPendingFixedValue"),
23323
+ X = a((u, d, g, y, Z) => {
23324
+ let m = 3;
23325
+ switch (Z) {
23326
+ case "?":
23327
+ m = 1;
23328
+ break;
23329
+ case "*":
23330
+ m = 0;
23331
+ break;
23332
+ case "+":
23333
+ m = 2;
23334
+ break;
23335
+ }
23336
+ if (!d && !g && m === 3) {
23337
+ $(u);
23338
+ return;
23339
+ }
23340
+ if (M(), !d && !g) {
23341
+ if (!u) return;
23342
+ c.push(new P(3, "", "", N(u), "", m));
23343
+ return;
23344
+ }
23345
+ let S;
23346
+ g ? g === "*" ? S = v : S = g : S = n;
23347
+ let k = 2;
23348
+ S === n ? (k = 1, S = "") : S === v && (k = 0, S = "");
23349
+ let E;
23350
+ if (d ? E = d : g && (E = l++), i.has(E)) throw new TypeError(`Duplicate name '${E}'.`);
23351
+ i.add(E), c.push(new P(k, E, N(u), S, N(y), m));
23352
+ }, "addPart");
23353
+ for (; f < r.length;) {
23354
+ let u = o("CHAR"),
23355
+ d = o("NAME"),
23356
+ g = o("REGEX");
23357
+ if (!d && !g && (g = o("ASTERISK")), d || g) {
23358
+ let m = u ?? "";
23359
+ t.prefixes.indexOf(m) === -1 && ($(m), m = ""), M();
23360
+ let S = h();
23361
+ X(m, d, g, "", S);
23362
+ continue;
23363
+ }
23364
+ let y = u ?? o("ESCAPED_CHAR");
23365
+ if (y) {
23366
+ $(y);
23367
+ continue;
23368
+ }
23369
+ if (o("OPEN")) {
23370
+ let m = A(),
23371
+ S = o("NAME"),
23372
+ k = o("REGEX");
23373
+ !S && !k && (k = o("ASTERISK"));
23374
+ let E = A();
23375
+ p("CLOSE");
23376
+ let be = h();
23377
+ X(m, S, k, E, be);
23378
+ continue;
23379
+ }
23380
+ M(), p("END");
23381
+ }
23382
+ return c;
23383
+ }
23384
+ a(F, "parse");
23385
+ function x(e) {
23386
+ return e.replace(/([.+*?^${}()[\]|/\\])/g, "\\$1");
23387
+ }
23388
+ a(x, "escapeString");
23389
+ function B(e) {
23390
+ return e && e.ignoreCase ? "ui" : "u";
23391
+ }
23392
+ a(B, "flags");
23393
+ function q(e, t, r) {
23394
+ return W(F(e, r), t, r);
23395
+ }
23396
+ a(q, "stringToRegexp");
23397
+ function T(e) {
23398
+ switch (e) {
23399
+ case 0:
23400
+ return "*";
23401
+ case 1:
23402
+ return "?";
23403
+ case 2:
23404
+ return "+";
23405
+ case 3:
23406
+ return "";
23407
+ }
23408
+ }
23409
+ a(T, "modifierToString");
23410
+ function W(e, t, r = {}) {
23411
+ r.delimiter ??= "/#?", r.prefixes ??= "./", r.sensitive ??= false, r.strict ??= false, r.end ??= true, r.start ??= true, r.endsWith = "";
23412
+ let n = r.start ? "^" : "";
23413
+ for (let s of e) {
23414
+ if (s.type === 3) {
23415
+ s.modifier === 3 ? n += x(s.value) : n += `(?:${x(s.value)})${T(s.modifier)}`;
23416
+ continue;
23417
+ }
23418
+ t && t.push(s.name);
23419
+ let i = `[^${x(r.delimiter)}]+?`,
23420
+ o = s.value;
23421
+ if (s.type === 1 ? o = i : s.type === 0 && (o = v), !s.prefix.length && !s.suffix.length) {
23422
+ s.modifier === 3 || s.modifier === 1 ? n += `(${o})${T(s.modifier)}` : n += `((?:${o})${T(s.modifier)})`;
23423
+ continue;
23424
+ }
23425
+ if (s.modifier === 3 || s.modifier === 1) {
23426
+ n += `(?:${x(s.prefix)}(${o})${x(s.suffix)})`, n += T(s.modifier);
23427
+ continue;
23428
+ }
23429
+ n += `(?:${x(s.prefix)}`, n += `((?:${o})(?:`, n += x(s.suffix), n += x(s.prefix), n += `(?:${o}))*)${x(s.suffix)})`, s.modifier === 0 && (n += "?");
23430
+ }
23431
+ let c = `[${x(r.endsWith)}]|$`,
23432
+ l = `[${x(r.delimiter)}]`;
23433
+ if (r.end) return r.strict || (n += `${l}?`), r.endsWith.length ? n += `(?=${c})` : n += "$", new RegExp(n, B(r));
23434
+ r.strict || (n += `(?:${l}(?=${c}))?`);
23435
+ let f = false;
23436
+ if (e.length) {
23437
+ let s = e[e.length - 1];
23438
+ s.type === 3 && s.modifier === 3 && (f = r.delimiter.indexOf(s) > -1);
23439
+ }
23440
+ return f || (n += `(?=${l}|${c})`), new RegExp(n, B(r));
23441
+ }
23442
+ a(W, "partsToRegexp");
23443
+ var b = {
23444
+ delimiter: "",
23445
+ prefixes: "",
23446
+ sensitive: true,
23447
+ strict: true
23448
+ };
23449
+ var J = {
23450
+ delimiter: ".",
23451
+ prefixes: "",
23452
+ sensitive: true,
23453
+ strict: true
23454
+ };
23455
+ var Q = {
23456
+ delimiter: "/",
23457
+ prefixes: "/",
23458
+ sensitive: true,
23459
+ strict: true
23460
+ };
23461
+ function ee(e, t) {
23462
+ return e.length ? e[0] === "/" ? true : !t || e.length < 2 ? false : (e[0] == "\\" || e[0] == "{") && e[1] == "/" : false;
23463
+ }
23464
+ a(ee, "isAbsolutePathname");
23465
+ function te(e, t) {
23466
+ return e.startsWith(t) ? e.substring(t.length, e.length) : e;
23467
+ }
23468
+ a(te, "maybeStripPrefix");
23469
+ function ke(e, t) {
23470
+ return e.endsWith(t) ? e.substr(0, e.length - t.length) : e;
23471
+ }
23472
+ a(ke, "maybeStripSuffix");
23473
+ function _(e) {
23474
+ return !e || e.length < 2 ? false : e[0] === "[" || (e[0] === "\\" || e[0] === "{") && e[1] === "[";
23475
+ }
23476
+ a(_, "treatAsIPv6Hostname");
23477
+ var re = ["ftp", "file", "http", "https", "ws", "wss"];
23478
+ function U(e) {
23479
+ if (!e) return true;
23480
+ for (let t of re) if (e.test(t)) return true;
23481
+ return false;
23482
+ }
23483
+ a(U, "isSpecialScheme");
23484
+ function ne(e, t) {
23485
+ if (e = te(e, "#"), t || e === "") return e;
23486
+ let r = new URL("https://example.com");
23487
+ return r.hash = e, r.hash ? r.hash.substring(1, r.hash.length) : "";
23488
+ }
23489
+ a(ne, "canonicalizeHash");
23490
+ function se(e, t) {
23491
+ if (e = te(e, "?"), t || e === "") return e;
23492
+ let r = new URL("https://example.com");
23493
+ return r.search = e, r.search ? r.search.substring(1, r.search.length) : "";
23494
+ }
23495
+ a(se, "canonicalizeSearch");
23496
+ function ie(e, t) {
23497
+ return t || e === "" ? e : _(e) ? K(e) : j(e);
23498
+ }
23499
+ a(ie, "canonicalizeHostname");
23500
+ function ae(e, t) {
23501
+ if (t || e === "") return e;
23502
+ let r = new URL("https://example.com");
23503
+ return r.password = e, r.password;
23504
+ }
23505
+ a(ae, "canonicalizePassword");
23506
+ function oe(e, t) {
23507
+ if (t || e === "") return e;
23508
+ let r = new URL("https://example.com");
23509
+ return r.username = e, r.username;
23510
+ }
23511
+ a(oe, "canonicalizeUsername");
23512
+ function ce(e, t, r) {
23513
+ if (r || e === "") return e;
23514
+ if (t && !re.includes(t)) return new URL(`${t}:${e}`).pathname;
23515
+ let n = e[0] == "/";
23516
+ return e = new URL(n ? e : "/-" + e, "https://example.com").pathname, n || (e = e.substring(2, e.length)), e;
23517
+ }
23518
+ a(ce, "canonicalizePathname");
23519
+ function le(e, t, r) {
23520
+ return z(t) === e && (e = ""), r || e === "" ? e : G(e);
23521
+ }
23522
+ a(le, "canonicalizePort");
23523
+ function fe(e, t) {
23524
+ return e = ke(e, ":"), t || e === "" ? e : w(e);
23525
+ }
23526
+ a(fe, "canonicalizeProtocol");
23527
+ function z(e) {
23528
+ switch (e) {
23529
+ case "ws":
23530
+ case "http":
23531
+ return "80";
23532
+ case "wws":
23533
+ case "https":
23534
+ return "443";
23535
+ case "ftp":
23536
+ return "21";
23537
+ default:
23538
+ return "";
23539
+ }
23540
+ }
23541
+ a(z, "defaultPortForProtocol");
23542
+ function w(e) {
23543
+ if (e === "") return e;
23544
+ if (/^[-+.A-Za-z0-9]*$/.test(e)) return e.toLowerCase();
23545
+ throw new TypeError(`Invalid protocol '${e}'.`);
23546
+ }
23547
+ a(w, "protocolEncodeCallback");
23548
+ function he(e) {
23549
+ if (e === "") return e;
23550
+ let t = new URL("https://example.com");
23551
+ return t.username = e, t.username;
23552
+ }
23553
+ a(he, "usernameEncodeCallback");
23554
+ function ue(e) {
23555
+ if (e === "") return e;
23556
+ let t = new URL("https://example.com");
23557
+ return t.password = e, t.password;
23558
+ }
23559
+ a(ue, "passwordEncodeCallback");
23560
+ function j(e) {
23561
+ if (e === "") return e;
23562
+ if (/[\t\n\r #%/:<>?@[\]^\\|]/g.test(e)) throw new TypeError(`Invalid hostname '${e}'`);
23563
+ let t = new URL("https://example.com");
23564
+ return t.hostname = e, t.hostname;
23565
+ }
23566
+ a(j, "hostnameEncodeCallback");
23567
+ function K(e) {
23568
+ if (e === "") return e;
23569
+ if (/[^0-9a-fA-F[\]:]/g.test(e)) throw new TypeError(`Invalid IPv6 hostname '${e}'`);
23570
+ return e.toLowerCase();
23571
+ }
23572
+ a(K, "ipv6HostnameEncodeCallback");
23573
+ function G(e) {
23574
+ if (e === "" || /^[0-9]*$/.test(e) && parseInt(e) <= 65535) return e;
23575
+ throw new TypeError(`Invalid port '${e}'.`);
23576
+ }
23577
+ a(G, "portEncodeCallback");
23578
+ function de(e) {
23579
+ if (e === "") return e;
23580
+ let t = new URL("https://example.com");
23581
+ return t.pathname = e[0] !== "/" ? "/-" + e : e, e[0] !== "/" ? t.pathname.substring(2, t.pathname.length) : t.pathname;
23582
+ }
23583
+ a(de, "standardURLPathnameEncodeCallback");
23584
+ function pe(e) {
23585
+ return e === "" ? e : new URL(`data:${e}`).pathname;
23586
+ }
23587
+ a(pe, "pathURLPathnameEncodeCallback");
23588
+ function ge(e) {
23589
+ if (e === "") return e;
23590
+ let t = new URL("https://example.com");
23591
+ return t.search = e, t.search.substring(1, t.search.length);
23592
+ }
23593
+ a(ge, "searchEncodeCallback");
23594
+ function me(e) {
23595
+ if (e === "") return e;
23596
+ let t = new URL("https://example.com");
23597
+ return t.hash = e, t.hash.substring(1, t.hash.length);
23598
+ }
23599
+ a(me, "hashEncodeCallback");
23600
+ var C = (_i2 = /*#__PURE__*/new WeakMap(), _n = /*#__PURE__*/new WeakMap(), _t = /*#__PURE__*/new WeakMap(), _e = /*#__PURE__*/new WeakMap(), _s = /*#__PURE__*/new WeakMap(), _l = /*#__PURE__*/new WeakMap(), _o = /*#__PURE__*/new WeakMap(), _d = /*#__PURE__*/new WeakMap(), _p = /*#__PURE__*/new WeakMap(), _g = /*#__PURE__*/new WeakMap(), _Class4_brand = /*#__PURE__*/new WeakSet(), class C {
23601
+ constructor(_t2) {
23602
+ _classPrivateMethodInitSpec(this, _Class4_brand);
23603
+ _classPrivateFieldInitSpec(this, _i2, void 0);
23604
+ _classPrivateFieldInitSpec(this, _n, []);
23605
+ _classPrivateFieldInitSpec(this, _t, {});
23606
+ _classPrivateFieldInitSpec(this, _e, 0);
23607
+ _classPrivateFieldInitSpec(this, _s, 1);
23608
+ _classPrivateFieldInitSpec(this, _l, 0);
23609
+ _classPrivateFieldInitSpec(this, _o, 0);
23610
+ _classPrivateFieldInitSpec(this, _d, 0);
23611
+ _classPrivateFieldInitSpec(this, _p, 0);
23612
+ _classPrivateFieldInitSpec(this, _g, false);
23613
+ _classPrivateFieldSet(_i2, this, _t2);
23614
+ }
23615
+ get result() {
23616
+ return _classPrivateFieldGet(_t, this);
23617
+ }
23618
+ parse() {
23619
+ for (_classPrivateFieldSet(_n, this, D(_classPrivateFieldGet(_i2, this), true)); _classPrivateFieldGet(_e, this) < _classPrivateFieldGet(_n, this).length; _classPrivateFieldSet(_e, this, _classPrivateFieldGet(_e, this) + _classPrivateFieldGet(_s, this))) {
23620
+ if (_classPrivateFieldSet(_s, this, 1), _classPrivateFieldGet(_n, this)[_classPrivateFieldGet(_e, this)].type === "END") {
23621
+ if (_classPrivateFieldGet(_o, this) === 0) {
23622
+ _assertClassBrand(_Class4_brand, this, _b2).call(this), _assertClassBrand(_Class4_brand, this, _f).call(this) ? _assertClassBrand(_Class4_brand, this, _r).call(this, 9, 1) : _assertClassBrand(_Class4_brand, this, _h).call(this) ? _assertClassBrand(_Class4_brand, this, _r).call(this, 8, 1) : _assertClassBrand(_Class4_brand, this, _r).call(this, 7, 0);
23623
+ continue;
23624
+ } else if (_classPrivateFieldGet(_o, this) === 2) {
23625
+ _assertClassBrand(_Class4_brand, this, _u).call(this, 5);
23626
+ continue;
23627
+ }
23628
+ _assertClassBrand(_Class4_brand, this, _r).call(this, 10, 0);
23629
+ break;
23630
+ }
23631
+ if (_classPrivateFieldGet(_d, this) > 0) if (_assertClassBrand(_Class4_brand, this, _A).call(this)) _classPrivateFieldSet(_d, this, _classPrivateFieldGet(_d, this) - 1);else continue;
23632
+ if (_assertClassBrand(_Class4_brand, this, _T).call(this)) {
23633
+ _classPrivateFieldSet(_d, this, _classPrivateFieldGet(_d, this) + 1);
23634
+ continue;
23635
+ }
23636
+ switch (_classPrivateFieldGet(_o, this)) {
23637
+ case 0:
23638
+ _assertClassBrand(_Class4_brand, this, _P).call(this) && _assertClassBrand(_Class4_brand, this, _u).call(this, 1);
23639
+ break;
23640
+ case 1:
23641
+ if (_assertClassBrand(_Class4_brand, this, _P).call(this)) {
23642
+ _assertClassBrand(_Class4_brand, this, _C).call(this);
23643
+ let t = 7,
23644
+ r = 1;
23645
+ _assertClassBrand(_Class4_brand, this, _E).call(this) ? (t = 2, r = 3) : _classPrivateFieldGet(_g, this) && (t = 2), _assertClassBrand(_Class4_brand, this, _r).call(this, t, r);
23646
+ }
23647
+ break;
23648
+ case 2:
23649
+ _assertClassBrand(_Class4_brand, this, _S).call(this) ? _assertClassBrand(_Class4_brand, this, _u).call(this, 3) : (_assertClassBrand(_Class4_brand, this, _x).call(this) || _assertClassBrand(_Class4_brand, this, _h).call(this) || _assertClassBrand(_Class4_brand, this, _f).call(this)) && _assertClassBrand(_Class4_brand, this, _u).call(this, 5);
23650
+ break;
23651
+ case 3:
23652
+ _assertClassBrand(_Class4_brand, this, _O).call(this) ? _assertClassBrand(_Class4_brand, this, _r).call(this, 4, 1) : _assertClassBrand(_Class4_brand, this, _S).call(this) && _assertClassBrand(_Class4_brand, this, _r).call(this, 5, 1);
23653
+ break;
23654
+ case 4:
23655
+ _assertClassBrand(_Class4_brand, this, _S).call(this) && _assertClassBrand(_Class4_brand, this, _r).call(this, 5, 1);
23656
+ break;
23657
+ case 5:
23658
+ _assertClassBrand(_Class4_brand, this, _y).call(this) ? _classPrivateFieldSet(_p, this, _classPrivateFieldGet(_p, this) + 1) : _assertClassBrand(_Class4_brand, this, _w).call(this) && _classPrivateFieldSet(_p, this, _classPrivateFieldGet(_p, this) - 1), _assertClassBrand(_Class4_brand, this, _k).call(this) && !_classPrivateFieldGet(_p, this) ? _assertClassBrand(_Class4_brand, this, _r).call(this, 6, 1) : _assertClassBrand(_Class4_brand, this, _x).call(this) ? _assertClassBrand(_Class4_brand, this, _r).call(this, 7, 0) : _assertClassBrand(_Class4_brand, this, _h).call(this) ? _assertClassBrand(_Class4_brand, this, _r).call(this, 8, 1) : _assertClassBrand(_Class4_brand, this, _f).call(this) && _assertClassBrand(_Class4_brand, this, _r).call(this, 9, 1);
23659
+ break;
23660
+ case 6:
23661
+ _assertClassBrand(_Class4_brand, this, _x).call(this) ? _assertClassBrand(_Class4_brand, this, _r).call(this, 7, 0) : _assertClassBrand(_Class4_brand, this, _h).call(this) ? _assertClassBrand(_Class4_brand, this, _r).call(this, 8, 1) : _assertClassBrand(_Class4_brand, this, _f).call(this) && _assertClassBrand(_Class4_brand, this, _r).call(this, 9, 1);
23662
+ break;
23663
+ case 7:
23664
+ _assertClassBrand(_Class4_brand, this, _h).call(this) ? _assertClassBrand(_Class4_brand, this, _r).call(this, 8, 1) : _assertClassBrand(_Class4_brand, this, _f).call(this) && _assertClassBrand(_Class4_brand, this, _r).call(this, 9, 1);
23665
+ break;
23666
+ case 8:
23667
+ _assertClassBrand(_Class4_brand, this, _f).call(this) && _assertClassBrand(_Class4_brand, this, _r).call(this, 9, 1);
23668
+ break;
23669
+ }
23670
+ }
23671
+ _classPrivateFieldGet(_t, this).hostname !== void 0 && _classPrivateFieldGet(_t, this).port === void 0 && (_classPrivateFieldGet(_t, this).port = "");
23672
+ }
23673
+ });
23674
+ function _r(t, r) {
23675
+ switch (_classPrivateFieldGet(_o, this)) {
23676
+ case 0:
23677
+ break;
23678
+ case 1:
23679
+ _classPrivateFieldGet(_t, this).protocol = _assertClassBrand(_Class4_brand, this, _c2).call(this);
23680
+ break;
23681
+ case 2:
23682
+ break;
23683
+ case 3:
23684
+ _classPrivateFieldGet(_t, this).username = _assertClassBrand(_Class4_brand, this, _c2).call(this);
23685
+ break;
23686
+ case 4:
23687
+ _classPrivateFieldGet(_t, this).password = _assertClassBrand(_Class4_brand, this, _c2).call(this);
23688
+ break;
23689
+ case 5:
23690
+ _classPrivateFieldGet(_t, this).hostname = _assertClassBrand(_Class4_brand, this, _c2).call(this);
23691
+ break;
23692
+ case 6:
23693
+ _classPrivateFieldGet(_t, this).port = _assertClassBrand(_Class4_brand, this, _c2).call(this);
23694
+ break;
23695
+ case 7:
23696
+ _classPrivateFieldGet(_t, this).pathname = _assertClassBrand(_Class4_brand, this, _c2).call(this);
23697
+ break;
23698
+ case 8:
23699
+ _classPrivateFieldGet(_t, this).search = _assertClassBrand(_Class4_brand, this, _c2).call(this);
23700
+ break;
23701
+ case 9:
23702
+ _classPrivateFieldGet(_t, this).hash = _assertClassBrand(_Class4_brand, this, _c2).call(this);
23703
+ break;
23704
+ }
23705
+ _classPrivateFieldGet(_o, this) !== 0 && t !== 10 && ([1, 2, 3, 4].includes(_classPrivateFieldGet(_o, this)) && [6, 7, 8, 9].includes(t) && (_classPrivateFieldGet(_t, this).hostname ??= ""), [1, 2, 3, 4, 5, 6].includes(_classPrivateFieldGet(_o, this)) && [8, 9].includes(t) && (_classPrivateFieldGet(_t, this).pathname ??= _classPrivateFieldGet(_g, this) ? "/" : ""), [1, 2, 3, 4, 5, 6, 7].includes(_classPrivateFieldGet(_o, this)) && t === 9 && (_classPrivateFieldGet(_t, this).search ??= "")), _assertClassBrand(_Class4_brand, this, _R).call(this, t, r);
23706
+ }
23707
+ function _R(t, r) {
23708
+ _classPrivateFieldSet(_o, this, t), _classPrivateFieldSet(_l, this, _classPrivateFieldGet(_e, this) + r), _classPrivateFieldSet(_e, this, _classPrivateFieldGet(_e, this) + r), _classPrivateFieldSet(_s, this, 0);
23709
+ }
23710
+ function _b2() {
23711
+ _classPrivateFieldSet(_e, this, _classPrivateFieldGet(_l, this)), _classPrivateFieldSet(_s, this, 0);
23712
+ }
23713
+ function _u(t) {
23714
+ _assertClassBrand(_Class4_brand, this, _b2).call(this), _classPrivateFieldSet(_o, this, t);
23715
+ }
23716
+ function _m(t) {
23717
+ return t < 0 && (t = _classPrivateFieldGet(_n, this).length - t), t < _classPrivateFieldGet(_n, this).length ? _classPrivateFieldGet(_n, this)[t] : _classPrivateFieldGet(_n, this)[_classPrivateFieldGet(_n, this).length - 1];
23718
+ }
23719
+ function _a3(t, r) {
23720
+ let n = _assertClassBrand(_Class4_brand, this, _m).call(this, t);
23721
+ return n.value === r && (n.type === "CHAR" || n.type === "ESCAPED_CHAR" || n.type === "INVALID_CHAR");
23722
+ }
23723
+ function _P() {
23724
+ return _assertClassBrand(_Class4_brand, this, _a3).call(this, _classPrivateFieldGet(_e, this), ":");
23725
+ }
23726
+ function _E() {
23727
+ return _assertClassBrand(_Class4_brand, this, _a3).call(this, _classPrivateFieldGet(_e, this) + 1, "/") && _assertClassBrand(_Class4_brand, this, _a3).call(this, _classPrivateFieldGet(_e, this) + 2, "/");
23728
+ }
23729
+ function _S() {
23730
+ return _assertClassBrand(_Class4_brand, this, _a3).call(this, _classPrivateFieldGet(_e, this), "@");
23731
+ }
23732
+ function _O() {
23733
+ return _assertClassBrand(_Class4_brand, this, _a3).call(this, _classPrivateFieldGet(_e, this), ":");
23734
+ }
23735
+ function _k() {
23736
+ return _assertClassBrand(_Class4_brand, this, _a3).call(this, _classPrivateFieldGet(_e, this), ":");
23737
+ }
23738
+ function _x() {
23739
+ return _assertClassBrand(_Class4_brand, this, _a3).call(this, _classPrivateFieldGet(_e, this), "/");
23740
+ }
23741
+ function _h() {
23742
+ if (_assertClassBrand(_Class4_brand, this, _a3).call(this, _classPrivateFieldGet(_e, this), "?")) return true;
23743
+ if (_classPrivateFieldGet(_n, this)[_classPrivateFieldGet(_e, this)].value !== "?") return false;
23744
+ let t = _assertClassBrand(_Class4_brand, this, _m).call(this, _classPrivateFieldGet(_e, this) - 1);
23745
+ return t.type !== "NAME" && t.type !== "REGEX" && t.type !== "CLOSE" && t.type !== "ASTERISK";
23746
+ }
23747
+ function _f() {
23748
+ return _assertClassBrand(_Class4_brand, this, _a3).call(this, _classPrivateFieldGet(_e, this), "#");
23749
+ }
23750
+ function _T() {
23751
+ return _classPrivateFieldGet(_n, this)[_classPrivateFieldGet(_e, this)].type == "OPEN";
23752
+ }
23753
+ function _A() {
23754
+ return _classPrivateFieldGet(_n, this)[_classPrivateFieldGet(_e, this)].type == "CLOSE";
23755
+ }
23756
+ function _y() {
23757
+ return _assertClassBrand(_Class4_brand, this, _a3).call(this, _classPrivateFieldGet(_e, this), "[");
23758
+ }
23759
+ function _w() {
23760
+ return _assertClassBrand(_Class4_brand, this, _a3).call(this, _classPrivateFieldGet(_e, this), "]");
23761
+ }
23762
+ function _c2() {
23763
+ let t = _classPrivateFieldGet(_n, this)[_classPrivateFieldGet(_e, this)],
23764
+ r = _assertClassBrand(_Class4_brand, this, _m).call(this, _classPrivateFieldGet(_l, this)).index;
23765
+ return _classPrivateFieldGet(_i2, this).substring(r, t.index);
23766
+ }
23767
+ function _C() {
23768
+ let t = {};
23769
+ Object.assign(t, b), t.encodePart = w;
23770
+ let r = q(_assertClassBrand(_Class4_brand, this, _c2).call(this), void 0, t);
23771
+ _classPrivateFieldSet(_g, this, U(r));
23772
+ }
23773
+ a(C, "Parser");
23774
+ var V = ["protocol", "username", "password", "hostname", "port", "pathname", "search", "hash"];
23775
+ var O = "*";
23776
+ function Se(e, t) {
23777
+ if (typeof e != "string") throw new TypeError("parameter 1 is not of type 'string'.");
23778
+ let r = new URL(e, t);
23779
+ return {
23780
+ protocol: r.protocol.substring(0, r.protocol.length - 1),
23781
+ username: r.username,
23782
+ password: r.password,
23783
+ hostname: r.hostname,
23784
+ port: r.port,
23785
+ pathname: r.pathname,
23786
+ search: r.search !== "" ? r.search.substring(1, r.search.length) : void 0,
23787
+ hash: r.hash !== "" ? r.hash.substring(1, r.hash.length) : void 0
23788
+ };
23789
+ }
23790
+ a(Se, "extractValues");
23791
+ function R(e, t) {
23792
+ return t ? I(e) : e;
23793
+ }
23794
+ a(R, "processBaseURLString");
23795
+ function L(e, t, r) {
23796
+ let n;
23797
+ if (typeof t.baseURL == "string") try {
23798
+ n = new URL(t.baseURL), t.protocol === void 0 && (e.protocol = R(n.protocol.substring(0, n.protocol.length - 1), r)), !r && t.protocol === void 0 && t.hostname === void 0 && t.port === void 0 && t.username === void 0 && (e.username = R(n.username, r)), !r && t.protocol === void 0 && t.hostname === void 0 && t.port === void 0 && t.username === void 0 && t.password === void 0 && (e.password = R(n.password, r)), t.protocol === void 0 && t.hostname === void 0 && (e.hostname = R(n.hostname, r)), t.protocol === void 0 && t.hostname === void 0 && t.port === void 0 && (e.port = R(n.port, r)), t.protocol === void 0 && t.hostname === void 0 && t.port === void 0 && t.pathname === void 0 && (e.pathname = R(n.pathname, r)), t.protocol === void 0 && t.hostname === void 0 && t.port === void 0 && t.pathname === void 0 && t.search === void 0 && (e.search = R(n.search.substring(1, n.search.length), r)), t.protocol === void 0 && t.hostname === void 0 && t.port === void 0 && t.pathname === void 0 && t.search === void 0 && t.hash === void 0 && (e.hash = R(n.hash.substring(1, n.hash.length), r));
23799
+ } catch {
23800
+ throw new TypeError(`invalid baseURL '${t.baseURL}'.`);
23801
+ }
23802
+ if (typeof t.protocol == "string" && (e.protocol = fe(t.protocol, r)), typeof t.username == "string" && (e.username = oe(t.username, r)), typeof t.password == "string" && (e.password = ae(t.password, r)), typeof t.hostname == "string" && (e.hostname = ie(t.hostname, r)), typeof t.port == "string" && (e.port = le(t.port, e.protocol, r)), typeof t.pathname == "string") {
23803
+ if (e.pathname = t.pathname, n && !ee(e.pathname, r)) {
23804
+ let c = n.pathname.lastIndexOf("/");
23805
+ c >= 0 && (e.pathname = R(n.pathname.substring(0, c + 1), r) + e.pathname);
23806
+ }
23807
+ e.pathname = ce(e.pathname, e.protocol, r);
23808
+ }
23809
+ return typeof t.search == "string" && (e.search = se(t.search, r)), typeof t.hash == "string" && (e.hash = ne(t.hash, r)), e;
23810
+ }
23811
+ a(L, "applyInit");
23812
+ function I(e) {
23813
+ return e.replace(/([+*?:{}()\\])/g, "\\$1");
23814
+ }
23815
+ a(I, "escapePatternString");
23816
+ function Te(e) {
23817
+ return e.replace(/([.+*?^${}()[\]|/\\])/g, "\\$1");
23818
+ }
23819
+ a(Te, "escapeRegexpString");
23820
+ function Ae(e, t) {
23821
+ t.delimiter ??= "/#?", t.prefixes ??= "./", t.sensitive ??= false, t.strict ??= false, t.end ??= true, t.start ??= true, t.endsWith = "";
23822
+ let r = ".*",
23823
+ n = `[^${Te(t.delimiter)}]+?`,
23824
+ c = /[$_\u200C\u200D\p{ID_Continue}]/u,
23825
+ l = "";
23826
+ for (let f = 0; f < e.length; ++f) {
23827
+ let s = e[f];
23828
+ if (s.type === 3) {
23829
+ if (s.modifier === 3) {
23830
+ l += I(s.value);
23831
+ continue;
23832
+ }
23833
+ l += `{${I(s.value)}}${T(s.modifier)}`;
23834
+ continue;
23835
+ }
23836
+ let i = s.hasCustomName(),
23837
+ o = !!s.suffix.length || !!s.prefix.length && (s.prefix.length !== 1 || !t.prefixes.includes(s.prefix)),
23838
+ h = f > 0 ? e[f - 1] : null,
23839
+ p = f < e.length - 1 ? e[f + 1] : null;
23840
+ if (!o && i && s.type === 1 && s.modifier === 3 && p && !p.prefix.length && !p.suffix.length) if (p.type === 3) {
23841
+ let A = p.value.length > 0 ? p.value[0] : "";
23842
+ o = c.test(A);
23843
+ } else o = !p.hasCustomName();
23844
+ if (!o && !s.prefix.length && h && h.type === 3) {
23845
+ let A = h.value[h.value.length - 1];
23846
+ o = t.prefixes.includes(A);
23847
+ }
23848
+ o && (l += "{"), l += I(s.prefix), i && (l += `:${s.name}`), s.type === 2 ? l += `(${s.value})` : s.type === 1 ? i || (l += `(${n})`) : s.type === 0 && (!i && (!h || h.type === 3 || h.modifier !== 3 || o || s.prefix !== "") ? l += "*" : l += `(${r})`), s.type === 1 && i && s.suffix.length && c.test(s.suffix[0]) && (l += "\\"), l += I(s.suffix), o && (l += "}"), s.modifier !== 3 && (l += T(s.modifier));
23849
+ }
23850
+ return l;
23851
+ }
23852
+ a(Ae, "partsToPattern");
23853
+ var Y = (_i3 = /*#__PURE__*/new WeakMap(), _n2 = /*#__PURE__*/new WeakMap(), _t3 = /*#__PURE__*/new WeakMap(), _e2 = /*#__PURE__*/new WeakMap(), _s2 = /*#__PURE__*/new WeakMap(), _l2 = /*#__PURE__*/new WeakMap(), class Y {
23854
+ constructor(t = {}, r, n) {
23855
+ _classPrivateFieldInitSpec(this, _i3, void 0);
23856
+ _classPrivateFieldInitSpec(this, _n2, {});
23857
+ _classPrivateFieldInitSpec(this, _t3, {});
23858
+ _classPrivateFieldInitSpec(this, _e2, {});
23859
+ _classPrivateFieldInitSpec(this, _s2, {});
23860
+ _classPrivateFieldInitSpec(this, _l2, false);
23861
+ try {
23862
+ let c;
23863
+ if (typeof r == "string" ? c = r : n = r, typeof t == "string") {
23864
+ let i = new C(t);
23865
+ if (i.parse(), t = i.result, c === void 0 && typeof t.protocol != "string") throw new TypeError("A base URL must be provided for a relative constructor string.");
23866
+ t.baseURL = c;
23867
+ } else {
23868
+ if (!t || typeof t != "object") throw new TypeError("parameter 1 is not of type 'string' and cannot convert to dictionary.");
23869
+ if (c) throw new TypeError("parameter 1 is not of type 'string'.");
23870
+ }
23871
+ typeof n > "u" && (n = {
23872
+ ignoreCase: false
23873
+ });
23874
+ let l = {
23875
+ ignoreCase: n.ignoreCase === true
23876
+ },
23877
+ f = {
23878
+ pathname: O,
23879
+ protocol: O,
23880
+ username: O,
23881
+ password: O,
23882
+ hostname: O,
23883
+ port: O,
23884
+ search: O,
23885
+ hash: O
23886
+ };
23887
+ _classPrivateFieldSet(_i3, this, L(f, t, true)), z(_classPrivateFieldGet(_i3, this).protocol) === _classPrivateFieldGet(_i3, this).port && (_classPrivateFieldGet(_i3, this).port = "");
23888
+ let s;
23889
+ for (s of V) {
23890
+ if (!(s in _classPrivateFieldGet(_i3, this))) continue;
23891
+ let i = {},
23892
+ o = _classPrivateFieldGet(_i3, this)[s];
23893
+ switch (_classPrivateFieldGet(_t3, this)[s] = [], s) {
23894
+ case "protocol":
23895
+ Object.assign(i, b), i.encodePart = w;
23896
+ break;
23897
+ case "username":
23898
+ Object.assign(i, b), i.encodePart = he;
23899
+ break;
23900
+ case "password":
23901
+ Object.assign(i, b), i.encodePart = ue;
23902
+ break;
23903
+ case "hostname":
23904
+ Object.assign(i, J), _(o) ? i.encodePart = K : i.encodePart = j;
23905
+ break;
23906
+ case "port":
23907
+ Object.assign(i, b), i.encodePart = G;
23908
+ break;
23909
+ case "pathname":
23910
+ U(_classPrivateFieldGet(_n2, this).protocol) ? (Object.assign(i, Q, l), i.encodePart = de) : (Object.assign(i, b, l), i.encodePart = pe);
23911
+ break;
23912
+ case "search":
23913
+ Object.assign(i, b, l), i.encodePart = ge;
23914
+ break;
23915
+ case "hash":
23916
+ Object.assign(i, b, l), i.encodePart = me;
23917
+ break;
23918
+ }
23919
+ try {
23920
+ _classPrivateFieldGet(_s2, this)[s] = F(o, i), _classPrivateFieldGet(_n2, this)[s] = W(_classPrivateFieldGet(_s2, this)[s], _classPrivateFieldGet(_t3, this)[s], i), _classPrivateFieldGet(_e2, this)[s] = Ae(_classPrivateFieldGet(_s2, this)[s], i), _classPrivateFieldSet(_l2, this, _classPrivateFieldGet(_l2, this) || _classPrivateFieldGet(_s2, this)[s].some(h => h.type === 2));
23921
+ } catch {
23922
+ throw new TypeError(`invalid ${s} pattern '${_classPrivateFieldGet(_i3, this)[s]}'.`);
23923
+ }
23924
+ }
23925
+ } catch (c) {
23926
+ throw new TypeError(`Failed to construct 'URLPattern': ${c.message}`);
23927
+ }
23928
+ }
23929
+ get [Symbol.toStringTag]() {
23930
+ return "URLPattern";
23931
+ }
23932
+ test(t = {}, r) {
23933
+ let n = {
23934
+ pathname: "",
23935
+ protocol: "",
23936
+ username: "",
23937
+ password: "",
23938
+ hostname: "",
23939
+ port: "",
23940
+ search: "",
23941
+ hash: ""
23942
+ };
23943
+ if (typeof t != "string" && r) throw new TypeError("parameter 1 is not of type 'string'.");
23944
+ if (typeof t > "u") return false;
23945
+ try {
23946
+ typeof t == "object" ? n = L(n, t, false) : n = L(n, Se(t, r), false);
23947
+ } catch {
23948
+ return false;
23949
+ }
23950
+ let c;
23951
+ for (c of V) if (!_classPrivateFieldGet(_n2, this)[c].exec(n[c])) return false;
23952
+ return true;
23953
+ }
23954
+ exec(t = {}, r) {
23955
+ let n = {
23956
+ pathname: "",
23957
+ protocol: "",
23958
+ username: "",
23959
+ password: "",
23960
+ hostname: "",
23961
+ port: "",
23962
+ search: "",
23963
+ hash: ""
23964
+ };
23965
+ if (typeof t != "string" && r) throw new TypeError("parameter 1 is not of type 'string'.");
23966
+ if (typeof t > "u") return;
23967
+ try {
23968
+ typeof t == "object" ? n = L(n, t, false) : n = L(n, Se(t, r), false);
23969
+ } catch {
23970
+ return null;
23971
+ }
23972
+ let c = {};
23973
+ r ? c.inputs = [t, r] : c.inputs = [t];
23974
+ let l;
23975
+ for (l of V) {
23976
+ let f = _classPrivateFieldGet(_n2, this)[l].exec(n[l]);
23977
+ if (!f) return null;
23978
+ let s = {};
23979
+ for (let [i, o] of _classPrivateFieldGet(_t3, this)[l].entries()) if (typeof o == "string" || typeof o == "number") {
23980
+ let h = f[i + 1];
23981
+ s[o] = h;
23982
+ }
23983
+ c[l] = {
23984
+ input: n[l] ?? "",
23985
+ groups: s
23986
+ };
23987
+ }
23988
+ return c;
23989
+ }
23990
+ static compareComponent(t, r, n) {
23991
+ let c = a((i, o) => {
23992
+ for (let h of ["type", "modifier", "prefix", "value", "suffix"]) {
23993
+ if (i[h] < o[h]) return -1;
23994
+ if (i[h] === o[h]) continue;
23995
+ return 1;
23996
+ }
23997
+ return 0;
23998
+ }, "comparePart"),
23999
+ l = new P(3, "", "", "", "", 3),
24000
+ f = new P(0, "", "", "", "", 3),
24001
+ s = a((i, o) => {
24002
+ let h = 0;
24003
+ for (; h < Math.min(i.length, o.length); ++h) {
24004
+ let p = c(i[h], o[h]);
24005
+ if (p) return p;
24006
+ }
24007
+ return i.length === o.length ? 0 : c(i[h] ?? l, o[h] ?? l);
24008
+ }, "comparePartList");
24009
+ return !_classPrivateFieldGet(_e2, r)[t] && !_classPrivateFieldGet(_e2, n)[t] ? 0 : _classPrivateFieldGet(_e2, r)[t] && !_classPrivateFieldGet(_e2, n)[t] ? s(_classPrivateFieldGet(_s2, r)[t], [f]) : !_classPrivateFieldGet(_e2, r)[t] && _classPrivateFieldGet(_e2, n)[t] ? s([f], _classPrivateFieldGet(_s2, n)[t]) : s(_classPrivateFieldGet(_s2, r)[t], _classPrivateFieldGet(_s2, n)[t]);
24010
+ }
24011
+ get protocol() {
24012
+ return _classPrivateFieldGet(_e2, this).protocol;
24013
+ }
24014
+ get username() {
24015
+ return _classPrivateFieldGet(_e2, this).username;
24016
+ }
24017
+ get password() {
24018
+ return _classPrivateFieldGet(_e2, this).password;
24019
+ }
24020
+ get hostname() {
24021
+ return _classPrivateFieldGet(_e2, this).hostname;
24022
+ }
24023
+ get port() {
24024
+ return _classPrivateFieldGet(_e2, this).port;
24025
+ }
24026
+ get pathname() {
24027
+ return _classPrivateFieldGet(_e2, this).pathname;
24028
+ }
24029
+ get search() {
24030
+ return _classPrivateFieldGet(_e2, this).search;
24031
+ }
24032
+ get hash() {
24033
+ return _classPrivateFieldGet(_e2, this).hash;
24034
+ }
24035
+ get hasRegExpGroups() {
24036
+ return _classPrivateFieldGet(_l2, this);
24037
+ }
24038
+ });
24039
+ a(Y, "URLPattern");
24040
+
24041
+ // node_modules/urlpattern-polyfill/index.js
24042
+ if (!globalThis.URLPattern) {
24043
+ globalThis.URLPattern = Y;
24044
+ }
24045
+
23085
24046
  /**
23086
24047
  * @license
23087
24048
  * Copyright 2022 Google Inc.
@@ -23116,6 +24077,7 @@ var Puppeteer = function (exports, _PuppeteerURL, _LazyArg, _ARIAQueryHandler, _
23116
24077
  var _discoveryFilter = /*#__PURE__*/new WeakMap();
23117
24078
  var _targetsIdsForInit = /*#__PURE__*/new WeakMap();
23118
24079
  var _initialAttachDone = /*#__PURE__*/new WeakMap();
24080
+ var _blockList = /*#__PURE__*/new WeakMap();
23119
24081
  var _TargetManager_brand = /*#__PURE__*/new WeakSet();
23120
24082
  var _silentDetach = /*#__PURE__*/new WeakMap();
23121
24083
  var _getParentTarget = /*#__PURE__*/new WeakMap();
@@ -23125,8 +24087,10 @@ var Puppeteer = function (exports, _PuppeteerURL, _LazyArg, _ARIAQueryHandler, _
23125
24087
  var _onTargetInfoChanged = /*#__PURE__*/new WeakMap();
23126
24088
  var _onAttachedToTarget2 = /*#__PURE__*/new WeakMap();
23127
24089
  var _onDetachedFromTarget2 = /*#__PURE__*/new WeakMap();
24090
+ var _isUrlAllowed = /*#__PURE__*/new WeakMap();
24091
+ var _maybeSetupNetworkConditions = /*#__PURE__*/new WeakMap();
23128
24092
  class TargetManager extends EventEmitter {
23129
- constructor(connection, targetFactory, targetFilterCallback, waitForInitiallyDiscoveredTargets = true) {
24093
+ constructor(connection, targetFactory, targetFilterCallback, waitForInitiallyDiscoveredTargets = true, networkConditions) {
23130
24094
  super();
23131
24095
  _classPrivateMethodInitSpec(this, _TargetManager_brand);
23132
24096
  _classPrivateFieldInitSpec(this, _connection4, void 0);
@@ -23173,6 +24137,7 @@ var Puppeteer = function (exports, _PuppeteerURL, _LazyArg, _ARIAQueryHandler, _
23173
24137
  // done. It indicates whethere we are running the initial auto-attach step or
23174
24138
  // if we are handling targets after that.
23175
24139
  _classPrivateFieldInitSpec(this, _initialAttachDone, false);
24140
+ _classPrivateFieldInitSpec(this, _blockList, void 0);
23176
24141
  _classPrivateFieldInitSpec(this, _silentDetach, async (session, parentSession) => {
23177
24142
  await session.send('Runtime.runIfWaitingForDebugger').catch(debugError);
23178
24143
  // We don't use `session.detach()` because that dispatches all commands on
@@ -23250,6 +24215,12 @@ var Puppeteer = function (exports, _PuppeteerURL, _LazyArg, _ARIAQueryHandler, _
23250
24215
  if (!_classPrivateFieldGet(_connection4, this).isAutoAttached(targetInfo.targetId)) {
23251
24216
  return;
23252
24217
  }
24218
+ // If we connect to a browser that is already open,
24219
+ // immediately detach from any tab that is on the blocklist.
24220
+ if (!_classPrivateFieldGet(_initialAttachDone, this) && !_classPrivateFieldGet(_isUrlAllowed, this).call(this, targetInfo.url)) {
24221
+ await _classPrivateFieldGet(_silentDetach, this).call(this, session, parentSession);
24222
+ return;
24223
+ }
23253
24224
  // Special case for service workers: being attached to service workers will
23254
24225
  // prevent them from ever being destroyed. Therefore, we silently detach
23255
24226
  // from service workers unless the connection was manually created via
@@ -23309,7 +24280,7 @@ var Puppeteer = function (exports, _PuppeteerURL, _LazyArg, _ARIAQueryHandler, _
23309
24280
  flatten: true,
23310
24281
  autoAttach: true,
23311
24282
  filter: _classPrivateFieldGet(_discoveryFilter, this)
23312
- }), session.send('Runtime.runIfWaitingForDebugger')]).catch(debugError);
24283
+ }), _classPrivateFieldGet(_maybeSetupNetworkConditions, this).call(this, session), session.send('Runtime.runIfWaitingForDebugger')]).catch(debugError);
23313
24284
  });
23314
24285
  _classPrivateFieldInitSpec(this, _onDetachedFromTarget2, (parentSession, event) => {
23315
24286
  const target = _classPrivateFieldGet(_attachedTargetsBySessionId, this).get(event.sessionId);
@@ -23323,10 +24294,51 @@ var Puppeteer = function (exports, _PuppeteerURL, _LazyArg, _ARIAQueryHandler, _
23323
24294
  _classPrivateFieldGet(_attachedTargetsByTargetId, this).delete(target._targetId);
23324
24295
  this.emit("targetGone" /* TargetManagerEvent.TargetGone */, target);
23325
24296
  });
24297
+ /**
24298
+ * Helper to validate URL against blocklist patterns
24299
+ */
24300
+ _classPrivateFieldInitSpec(this, _isUrlAllowed, url => {
24301
+ if (!_classPrivateFieldGet(_blockList, this)) {
24302
+ return true;
24303
+ }
24304
+ // Always allow internal or setup pages
24305
+ if (!url || url === 'about:blank') {
24306
+ return true;
24307
+ }
24308
+ for (const rule of _classPrivateFieldGet(_blockList, this)) {
24309
+ try {
24310
+ const pattern = new Y(rule);
24311
+ if (pattern.test(url)) {
24312
+ return false; // return false as url matches pattern from blockList
24313
+ }
24314
+ } catch {
24315
+ debugError(`Invalid URL pattern: ${rule}`);
24316
+ }
24317
+ }
24318
+ return true;
24319
+ });
24320
+ _classPrivateFieldInitSpec(this, _maybeSetupNetworkConditions, async session => {
24321
+ if (!_classPrivateFieldGet(_blockList, this)?.length) {
24322
+ return;
24323
+ }
24324
+ const matchedNetworkConditions = _classPrivateFieldGet(_blockList, this).map(pattern => {
24325
+ return {
24326
+ urlPattern: pattern,
24327
+ latency: 0,
24328
+ downloadThroughput: -1,
24329
+ uploadThroughput: -1
24330
+ };
24331
+ });
24332
+ await session.send('Network.emulateNetworkConditionsByRule', {
24333
+ matchedNetworkConditions,
24334
+ offline: true
24335
+ });
24336
+ });
23326
24337
  _classPrivateFieldSet(_connection4, this, connection);
23327
24338
  _classPrivateFieldSet(_targetFilterCallback, this, targetFilterCallback);
23328
24339
  _classPrivateFieldSet(_targetFactory, this, targetFactory);
23329
24340
  _classPrivateFieldSet(_waitForInitiallyDiscoveredTargets, this, waitForInitiallyDiscoveredTargets);
24341
+ _classPrivateFieldSet(_blockList, this, networkConditions);
23330
24342
  _classPrivateFieldGet(_connection4, this).on('Target.targetCreated', _classPrivateFieldGet(_onTargetCreated, this));
23331
24343
  _classPrivateFieldGet(_connection4, this).on('Target.targetDestroyed', _classPrivateFieldGet(_onTargetDestroyed, this));
23332
24344
  _classPrivateFieldGet(_connection4, this).on('Target.targetInfoChanged', _classPrivateFieldGet(_onTargetInfoChanged, this));
@@ -23446,8 +24458,8 @@ var Puppeteer = function (exports, _PuppeteerURL, _LazyArg, _ARIAQueryHandler, _
23446
24458
  var _onTargetChanged = /*#__PURE__*/new WeakMap();
23447
24459
  var _onTargetDiscovered = /*#__PURE__*/new WeakMap();
23448
24460
  class CdpBrowser extends Browser {
23449
- static async _create(connection, contextIds, acceptInsecureCerts, defaultViewport, downloadBehavior, process, closeCallback, targetFilterCallback, isPageTargetCallback, waitForInitiallyDiscoveredTargets = true, networkEnabled = true, issuesEnabled = true, handleDevToolsAsPage = false) {
23450
- const browser = new CdpBrowser(connection, contextIds, defaultViewport, process, closeCallback, targetFilterCallback, isPageTargetCallback, waitForInitiallyDiscoveredTargets, networkEnabled, issuesEnabled, handleDevToolsAsPage);
24461
+ static async _create(connection, contextIds, acceptInsecureCerts, defaultViewport, downloadBehavior, process, closeCallback, targetFilterCallback, isPageTargetCallback, waitForInitiallyDiscoveredTargets = true, networkEnabled = true, issuesEnabled = true, handleDevToolsAsPage = false, blockList) {
24462
+ const browser = new CdpBrowser(connection, contextIds, defaultViewport, process, closeCallback, targetFilterCallback, isPageTargetCallback, waitForInitiallyDiscoveredTargets, networkEnabled, issuesEnabled, handleDevToolsAsPage, blockList);
23451
24463
  if (acceptInsecureCerts) {
23452
24464
  await connection.send('Security.setIgnoreCertificateErrors', {
23453
24465
  ignore: true
@@ -23456,7 +24468,7 @@ var Puppeteer = function (exports, _PuppeteerURL, _LazyArg, _ARIAQueryHandler, _
23456
24468
  await browser._attach(downloadBehavior);
23457
24469
  return browser;
23458
24470
  }
23459
- constructor(connection, contextIds, defaultViewport, process, closeCallback, targetFilterCallback, _isPageTargetCallback2, waitForInitiallyDiscoveredTargets = true, networkEnabled = true, issuesEnabled = true, handleDevToolsAsPage = false) {
24471
+ constructor(connection, contextIds, defaultViewport, process, closeCallback, targetFilterCallback, _isPageTargetCallback2, waitForInitiallyDiscoveredTargets = true, networkEnabled = true, issuesEnabled = true, handleDevToolsAsPage = false, networkConditions) {
23460
24472
  super();
23461
24473
  _classPrivateMethodInitSpec(this, _CdpBrowser_brand);
23462
24474
  _defineProperty(this, "protocol", 'cdp');
@@ -23533,7 +24545,7 @@ var Puppeteer = function (exports, _PuppeteerURL, _LazyArg, _ARIAQueryHandler, _
23533
24545
  }));
23534
24546
  _classPrivateFieldSet(_handleDevToolsAsPage, this, handleDevToolsAsPage);
23535
24547
  _assertClassBrand(_CdpBrowser_brand, this, _setIsPageTargetCallback).call(this, _isPageTargetCallback2);
23536
- _classPrivateFieldSet(_targetManager3, this, new TargetManager(connection, _classPrivateFieldGet(_createTarget, this), _classPrivateFieldGet(_targetFilterCallback2, this), waitForInitiallyDiscoveredTargets));
24548
+ _classPrivateFieldSet(_targetManager3, this, new TargetManager(connection, _classPrivateFieldGet(_createTarget, this), _classPrivateFieldGet(_targetFilterCallback2, this), waitForInitiallyDiscoveredTargets, networkConditions));
23537
24549
  _classPrivateFieldSet(_defaultContext, this, new CdpBrowserContext(_classPrivateFieldGet(_connection5, this), this));
23538
24550
  for (const contextId of contextIds) {
23539
24551
  _classPrivateFieldGet(_contexts, this).set(contextId, new CdpBrowserContext(_classPrivateFieldGet(_connection5, this), this, contextId));
@@ -23788,7 +24800,7 @@ var Puppeteer = function (exports, _PuppeteerURL, _LazyArg, _ARIAQueryHandler, _
23788
24800
  if (_classPrivateFieldGet(_extensions, this).has(currExtension.id)) {
23789
24801
  extensionsMap.set(currExtension.id, _classPrivateFieldGet(_extensions, this).get(currExtension.id));
23790
24802
  } else {
23791
- const newExtension = new CdpExtension(currExtension.id, currExtension.version, currExtension.name, this);
24803
+ const newExtension = new CdpExtension(currExtension.id, currExtension.version, currExtension.name, currExtension.path, currExtension.enabled, this);
23792
24804
  extensionsMap.set(currExtension.id, newExtension);
23793
24805
  }
23794
24806
  }
@@ -23831,7 +24843,8 @@ var Puppeteer = function (exports, _PuppeteerURL, _LazyArg, _ARIAQueryHandler, _
23831
24843
  slowMo = 0,
23832
24844
  protocolTimeout,
23833
24845
  handleDevToolsAsPage,
23834
- idGenerator = createIncrementalIdGenerator()
24846
+ idGenerator = createIncrementalIdGenerator(),
24847
+ blockList
23835
24848
  } = options;
23836
24849
  const connection = new Connection(url, connectionTransport, slowMo, protocolTimeout, /* rawErrors */false, idGenerator);
23837
24850
  const {
@@ -23839,7 +24852,7 @@ var Puppeteer = function (exports, _PuppeteerURL, _LazyArg, _ARIAQueryHandler, _
23839
24852
  } = await connection.send('Target.getBrowserContexts');
23840
24853
  const browser = await CdpBrowser._create(connection, browserContextIds, acceptInsecureCerts, defaultViewport, downloadBehavior, undefined, () => {
23841
24854
  return connection.send('Browser.close').catch(debugError);
23842
- }, targetFilter, isPageTarget, undefined, networkEnabled, issuesEnabled, handleDevToolsAsPage);
24855
+ }, targetFilter, isPageTarget, undefined, networkEnabled, issuesEnabled, handleDevToolsAsPage, blockList);
23843
24856
  return browser;
23844
24857
  }
23845
24858
  const tabTargetInfo = {
@@ -25963,8 +26976,8 @@ var Puppeteer = function (exports, _PuppeteerURL, _LazyArg, _ARIAQueryHandler, _
25963
26976
  * @internal
25964
26977
  */
25965
26978
  const PUPPETEER_REVISIONS = Object.freeze({
25966
- chrome: '147.0.7727.56',
25967
- 'chrome-headless-shell': '147.0.7727.56',
26979
+ chrome: '147.0.7727.57',
26980
+ 'chrome-headless-shell': '147.0.7727.57',
25968
26981
  firefox: 'stable_149.0.2'
25969
26982
  });
25970
26983