@qilin-agent/experimental-inspector 0.0.0-stage → 3.1.3
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.
- package/README.i18n.yaml +49 -0
- package/README.md +179 -2
- package/README.zh.md +180 -0
- package/cordis.patch.yml +5 -0
- package/icon.svg +12 -0
- package/lib/client.js +3572 -0
- package/lib/client.page.js +314 -0
- package/lib/devtools/Images/3d-center.svg +3 -0
- package/lib/devtools/Images/3d-pan.svg +3 -0
- package/lib/devtools/Images/3d-rotate.svg +3 -0
- package/lib/devtools/Images/accelerometer-back.svg +69 -0
- package/lib/devtools/Images/accelerometer-bottom.png +0 -0
- package/lib/devtools/Images/accelerometer-front.svg +28 -0
- package/lib/devtools/Images/accelerometer-left.png +0 -0
- package/lib/devtools/Images/accelerometer-right.png +0 -0
- package/lib/devtools/Images/accelerometer-top.png +0 -0
- package/lib/devtools/Images/account-tree.svg +10 -0
- package/lib/devtools/Images/add-photo.svg +3 -0
- package/lib/devtools/Images/ai-explorer-badge.svg +114 -0
- package/lib/devtools/Images/align-content-center.svg +5 -0
- package/lib/devtools/Images/align-content-end.svg +5 -0
- package/lib/devtools/Images/align-content-space-around.svg +6 -0
- package/lib/devtools/Images/align-content-space-between.svg +4 -0
- package/lib/devtools/Images/align-content-space-evenly.svg +6 -0
- package/lib/devtools/Images/align-content-start.svg +5 -0
- package/lib/devtools/Images/align-content-stretch.svg +4 -0
- package/lib/devtools/Images/align-items-baseline.svg +4 -0
- package/lib/devtools/Images/align-items-center.svg +5 -0
- package/lib/devtools/Images/align-items-end.svg +5 -0
- package/lib/devtools/Images/align-items-start.svg +5 -0
- package/lib/devtools/Images/align-items-stretch.svg +6 -0
- package/lib/devtools/Images/align-self-center.svg +3 -0
- package/lib/devtools/Images/align-self-end.svg +4 -0
- package/lib/devtools/Images/align-self-start.svg +4 -0
- package/lib/devtools/Images/align-self-stretch.svg +5 -0
- package/lib/devtools/Images/animation.svg +3 -0
- package/lib/devtools/Images/arrow-back.svg +4 -0
- package/lib/devtools/Images/arrow-collapse.svg +3 -0
- package/lib/devtools/Images/arrow-down.svg +10 -0
- package/lib/devtools/Images/arrow-drop-down-dark.svg +3 -0
- package/lib/devtools/Images/arrow-drop-down-light.svg +3 -0
- package/lib/devtools/Images/arrow-drop-down.svg +3 -0
- package/lib/devtools/Images/arrow-forward.svg +4 -0
- package/lib/devtools/Images/arrow-right-circle.svg +3 -0
- package/lib/devtools/Images/arrow-up-down-circle.svg +3 -0
- package/lib/devtools/Images/arrow-up-down.svg +3 -0
- package/lib/devtools/Images/arrow-up.svg +10 -0
- package/lib/devtools/Images/attach-file.svg +3 -0
- package/lib/devtools/Images/baseline-high-availability.svg +17 -0
- package/lib/devtools/Images/baseline-limited-availability.svg +19 -0
- package/lib/devtools/Images/baseline-low-availability.svg +31 -0
- package/lib/devtools/Images/bell.svg +3 -0
- package/lib/devtools/Images/bezier-curve-filled.svg +3 -0
- package/lib/devtools/Images/bin.svg +1 -0
- package/lib/devtools/Images/bottom-panel-close.svg +1 -0
- package/lib/devtools/Images/bottom-panel-open.svg +1 -0
- package/lib/devtools/Images/brackets.svg +1 -0
- package/lib/devtools/Images/breakpoint-circle.svg +4 -0
- package/lib/devtools/Images/breakpoint-crossed-filled.svg +1 -0
- package/lib/devtools/Images/breakpoint-crossed.svg +1 -0
- package/lib/devtools/Images/brush-2.svg +3 -0
- package/lib/devtools/Images/brush-filled.svg +1 -0
- package/lib/devtools/Images/brush.svg +1 -0
- package/lib/devtools/Images/bucket.svg +4 -0
- package/lib/devtools/Images/bug.svg +3 -0
- package/lib/devtools/Images/button-magic.svg +3 -0
- package/lib/devtools/Images/calendar-today.svg +3 -0
- package/lib/devtools/Images/center-focus-weak.svg +3 -0
- package/lib/devtools/Images/check-circle.svg +3 -0
- package/lib/devtools/Images/check-double.svg +3 -0
- package/lib/devtools/Images/checker.svg +12 -0
- package/lib/devtools/Images/checkmark.svg +1 -0
- package/lib/devtools/Images/chevron-double-right.svg +3 -0
- package/lib/devtools/Images/chevron-down.svg +3 -0
- package/lib/devtools/Images/chevron-left-dot.svg +4 -0
- package/lib/devtools/Images/chevron-left.svg +3 -0
- package/lib/devtools/Images/chevron-right.svg +3 -0
- package/lib/devtools/Images/chevron-up.svg +3 -0
- package/lib/devtools/Images/chromeLeft.avif +0 -0
- package/lib/devtools/Images/chromeMiddle.avif +0 -0
- package/lib/devtools/Images/chromeRight.avif +0 -0
- package/lib/devtools/Images/class.svg +6 -0
- package/lib/devtools/Images/clear-list.svg +3 -0
- package/lib/devtools/Images/clear.svg +3 -0
- package/lib/devtools/Images/cloud.svg +3 -0
- package/lib/devtools/Images/code-circle.svg +5 -0
- package/lib/devtools/Images/code-whisperer-badge.svg +166 -0
- package/lib/devtools/Images/code.svg +3 -0
- package/lib/devtools/Images/colon.svg +4 -0
- package/lib/devtools/Images/color-picker-filled.svg +3 -0
- package/lib/devtools/Images/color-picker.svg +3 -0
- package/lib/devtools/Images/compress.svg +8 -0
- package/lib/devtools/Images/console-conditional-breakpoint.svg +1 -0
- package/lib/devtools/Images/console-logpoint.svg +1 -0
- package/lib/devtools/Images/container.svg +4 -0
- package/lib/devtools/Images/cookie.svg +3 -0
- package/lib/devtools/Images/cookie_off.svg +3 -0
- package/lib/devtools/Images/copy.svg +3 -0
- package/lib/devtools/Images/corporate-fare.svg +3 -0
- package/lib/devtools/Images/credit-card.svg +3 -0
- package/lib/devtools/Images/cross-circle-filled.svg +3 -0
- package/lib/devtools/Images/cross-circle.svg +3 -0
- package/lib/devtools/Images/cross.svg +3 -0
- package/lib/devtools/Images/cssoverview_icons_2x.avif +0 -0
- package/lib/devtools/Images/database-off.svg +1 -0
- package/lib/devtools/Images/database.svg +3 -0
- package/lib/devtools/Images/deployed.svg +3 -0
- package/lib/devtools/Images/device-fold.svg +1 -0
- package/lib/devtools/Images/devices.svg +3 -0
- package/lib/devtools/Images/devtools-thumbnail.svg +57 -0
- package/lib/devtools/Images/devtools-tips.svg +61 -0
- package/lib/devtools/Images/devtools-user-badge.svg +129 -0
- package/lib/devtools/Images/devtools.svg +13 -0
- package/lib/devtools/Images/difference.svg +3 -0
- package/lib/devtools/Images/dock-bottom.svg +3 -0
- package/lib/devtools/Images/dock-left.svg +3 -0
- package/lib/devtools/Images/dock-right.svg +3 -0
- package/lib/devtools/Images/dock-window.svg +3 -0
- package/lib/devtools/Images/document.svg +3 -0
- package/lib/devtools/Images/dog-paw.svg +10 -0
- package/lib/devtools/Images/dom-detective-badge.svg +136 -0
- package/lib/devtools/Images/domain.svg +3 -0
- package/lib/devtools/Images/dots-horizontal.svg +1 -0
- package/lib/devtools/Images/dots-vertical.svg +3 -0
- package/lib/devtools/Images/download.svg +3 -0
- package/lib/devtools/Images/edit.svg +1 -0
- package/lib/devtools/Images/empty.svg +2 -0
- package/lib/devtools/Images/errorWave.svg +74 -0
- package/lib/devtools/Images/exclamation.svg +3 -0
- package/lib/devtools/Images/expand.svg +1 -0
- package/lib/devtools/Images/experiment-check.svg +1 -0
- package/lib/devtools/Images/experiment.svg +3 -0
- package/lib/devtools/Images/extension.svg +1 -0
- package/lib/devtools/Images/eye-crossed.svg +3 -0
- package/lib/devtools/Images/eye.svg +3 -0
- package/lib/devtools/Images/file-document.svg +3 -0
- package/lib/devtools/Images/file-fetch-xhr.svg +3 -0
- package/lib/devtools/Images/file-font.svg +4 -0
- package/lib/devtools/Images/file-generic.svg +3 -0
- package/lib/devtools/Images/file-image.svg +3 -0
- package/lib/devtools/Images/file-json.svg +4 -0
- package/lib/devtools/Images/file-manifest.svg +3 -0
- package/lib/devtools/Images/file-media.svg +3 -0
- package/lib/devtools/Images/file-script.svg +3 -0
- package/lib/devtools/Images/file-snippet.svg +4 -0
- package/lib/devtools/Images/file-stylesheet.svg +4 -0
- package/lib/devtools/Images/file-wasm.svg +5 -0
- package/lib/devtools/Images/file-websocket.svg +3 -0
- package/lib/devtools/Images/filter-clear.svg +3 -0
- package/lib/devtools/Images/filter-filled.svg +3 -0
- package/lib/devtools/Images/filter.svg +3 -0
- package/lib/devtools/Images/flex-direction.svg +5 -0
- package/lib/devtools/Images/flex-no-wrap.svg +5 -0
- package/lib/devtools/Images/flex-wrap.svg +8 -0
- package/lib/devtools/Images/flow.svg +3 -0
- package/lib/devtools/Images/flowsheet.svg +1 -0
- package/lib/devtools/Images/fold-more.svg +3 -0
- package/lib/devtools/Images/folder-asterisk.svg +10 -0
- package/lib/devtools/Images/folder-off.svg +3 -0
- package/lib/devtools/Images/folder.svg +3 -0
- package/lib/devtools/Images/frame-crossed.svg +3 -0
- package/lib/devtools/Images/frame-icon.svg +54 -0
- package/lib/devtools/Images/frame.svg +3 -0
- package/lib/devtools/Images/gdp-logo-dark.png +0 -0
- package/lib/devtools/Images/gdp-logo-light.png +0 -0
- package/lib/devtools/Images/gear-filled.svg +3 -0
- package/lib/devtools/Images/gear.svg +4 -0
- package/lib/devtools/Images/gears.svg +3 -0
- package/lib/devtools/Images/geminiInDevTools.png +0 -0
- package/lib/devtools/Images/geminiInDevTools_2x.png +0 -0
- package/lib/devtools/Images/global.svg +5 -0
- package/lib/devtools/Images/google.svg +3 -0
- package/lib/devtools/Images/goto-filled.svg +1 -0
- package/lib/devtools/Images/grid-direction.svg +6 -0
- package/lib/devtools/Images/grid-on.svg +10 -0
- package/lib/devtools/Images/group.svg +3 -0
- package/lib/devtools/Images/heap-snapshot.svg +6 -0
- package/lib/devtools/Images/heap-snapshots.svg +7 -0
- package/lib/devtools/Images/help.svg +3 -0
- package/lib/devtools/Images/history.svg +3 -0
- package/lib/devtools/Images/home.svg +3 -0
- package/lib/devtools/Images/hover.svg +6 -0
- package/lib/devtools/Images/iframe-crossed.svg +3 -0
- package/lib/devtools/Images/iframe.svg +3 -0
- package/lib/devtools/Images/import.svg +3 -0
- package/lib/devtools/Images/indeterminate-question-box.svg +3 -0
- package/lib/devtools/Images/info-filled.svg +3 -0
- package/lib/devtools/Images/info.svg +3 -0
- package/lib/devtools/Images/issue-cross-filled.svg +3 -0
- package/lib/devtools/Images/issue-exclamation-filled.svg +3 -0
- package/lib/devtools/Images/issue-questionmark-filled.svg +3 -0
- package/lib/devtools/Images/issue-text-filled.svg +3 -0
- package/lib/devtools/Images/justify-content-center.svg +5 -0
- package/lib/devtools/Images/justify-content-end.svg +5 -0
- package/lib/devtools/Images/justify-content-space-around.svg +6 -0
- package/lib/devtools/Images/justify-content-space-between.svg +4 -0
- package/lib/devtools/Images/justify-content-space-evenly.svg +6 -0
- package/lib/devtools/Images/justify-content-start.svg +5 -0
- package/lib/devtools/Images/justify-content-stretch.svg +4 -0
- package/lib/devtools/Images/justify-items-center.svg +4 -0
- package/lib/devtools/Images/justify-items-end.svg +4 -0
- package/lib/devtools/Images/justify-items-start.svg +4 -0
- package/lib/devtools/Images/justify-items-stretch.svg +4 -0
- package/lib/devtools/Images/keyboard-arrow-right.svg +1 -0
- package/lib/devtools/Images/keyboard-full.svg +10 -0
- package/lib/devtools/Images/keyboard-pen.svg +1 -0
- package/lib/devtools/Images/keyboard.svg +3 -0
- package/lib/devtools/Images/label-auto.svg +3 -0
- package/lib/devtools/Images/label.svg +10 -0
- package/lib/devtools/Images/large-arrow-right-filled.svg +1 -0
- package/lib/devtools/Images/layers-filled.svg +1 -0
- package/lib/devtools/Images/layers.svg +1 -0
- package/lib/devtools/Images/left-panel-close.svg +1 -0
- package/lib/devtools/Images/left-panel-open.svg +1 -0
- package/lib/devtools/Images/lightbulb-spark.svg +13 -0
- package/lib/devtools/Images/lightbulb.svg +3 -0
- package/lib/devtools/Images/lighthouse_logo.svg +158 -0
- package/lib/devtools/Images/list.svg +3 -0
- package/lib/devtools/Images/location-on.svg +3 -0
- package/lib/devtools/Images/lock-person.svg +1 -0
- package/lib/devtools/Images/lock.svg +3 -0
- package/lib/devtools/Images/mark-email-unread.svg +3 -0
- package/lib/devtools/Images/match-case.svg +3 -0
- package/lib/devtools/Images/match-whole-word.svg +1 -0
- package/lib/devtools/Images/memory.svg +6 -0
- package/lib/devtools/Images/minus.svg +3 -0
- package/lib/devtools/Images/mop.svg +1 -0
- package/lib/devtools/Images/mouse.svg +4 -0
- package/lib/devtools/Images/navigationControls.png +0 -0
- package/lib/devtools/Images/navigationControls_2x.png +0 -0
- package/lib/devtools/Images/network-settings.svg +3 -0
- package/lib/devtools/Images/node-stack-icon.svg +1 -0
- package/lib/devtools/Images/nodeIcon.avif +0 -0
- package/lib/devtools/Images/open-externally.svg +3 -0
- package/lib/devtools/Images/override.svg +11 -0
- package/lib/devtools/Images/palette.svg +10 -0
- package/lib/devtools/Images/pause-circle.svg +1 -0
- package/lib/devtools/Images/pause.svg +1 -0
- package/lib/devtools/Images/pen-spark.svg +3 -0
- package/lib/devtools/Images/performance-panel-delete-annotation.svg +32 -0
- package/lib/devtools/Images/performance-panel-diagram.svg +34 -0
- package/lib/devtools/Images/performance-panel-entry-label.svg +75 -0
- package/lib/devtools/Images/performance-panel-time-range.svg +15 -0
- package/lib/devtools/Images/performance.svg +3 -0
- package/lib/devtools/Images/person.svg +3 -0
- package/lib/devtools/Images/photo-camera.svg +10 -0
- package/lib/devtools/Images/play.svg +3 -0
- package/lib/devtools/Images/plus.svg +3 -0
- package/lib/devtools/Images/policy.svg +3 -0
- package/lib/devtools/Images/popoverArrows.png +0 -0
- package/lib/devtools/Images/popup.svg +3 -0
- package/lib/devtools/Images/preview_feature_video_thumbnail.svg +92 -0
- package/lib/devtools/Images/profile.svg +3 -0
- package/lib/devtools/Images/psychiatry.svg +3 -0
- package/lib/devtools/Images/puzzle.svg +3 -0
- package/lib/devtools/Images/record-start.svg +4 -0
- package/lib/devtools/Images/record-stop.svg +4 -0
- package/lib/devtools/Images/redo.svg +3 -0
- package/lib/devtools/Images/refresh.svg +10 -0
- package/lib/devtools/Images/regular-expression.svg +3 -0
- package/lib/devtools/Images/replace.svg +1 -0
- package/lib/devtools/Images/replay.svg +3 -0
- package/lib/devtools/Images/report.svg +1 -0
- package/lib/devtools/Images/resizeDiagonal.svg +1 -0
- package/lib/devtools/Images/resizeHorizontal.svg +1 -0
- package/lib/devtools/Images/resizeVertical.svg +1 -0
- package/lib/devtools/Images/resume.svg +1 -0
- package/lib/devtools/Images/revert.svg +3 -0
- package/lib/devtools/Images/review.svg +5 -0
- package/lib/devtools/Images/right-panel-close.svg +1 -0
- package/lib/devtools/Images/right-panel-open.svg +1 -0
- package/lib/devtools/Images/scissors.svg +3 -0
- package/lib/devtools/Images/screen-rotation.svg +1 -0
- package/lib/devtools/Images/search.svg +3 -0
- package/lib/devtools/Images/select-element.svg +3 -0
- package/lib/devtools/Images/send.svg +3 -0
- package/lib/devtools/Images/shadow.svg +3 -0
- package/lib/devtools/Images/shield.svg +3 -0
- package/lib/devtools/Images/small-status-dot.svg +3 -0
- package/lib/devtools/Images/smart-assistant.svg +3 -0
- package/lib/devtools/Images/snippet.svg +4 -0
- package/lib/devtools/Images/spark-info.svg +3 -0
- package/lib/devtools/Images/spark.svg +3 -0
- package/lib/devtools/Images/speculative-loads.svg +1 -0
- package/lib/devtools/Images/speedster-badge.svg +166 -0
- package/lib/devtools/Images/star.svg +3 -0
- package/lib/devtools/Images/step-into.svg +1 -0
- package/lib/devtools/Images/step-out.svg +1 -0
- package/lib/devtools/Images/step-over.svg +1 -0
- package/lib/devtools/Images/step.svg +1 -0
- package/lib/devtools/Images/stop.svg +3 -0
- package/lib/devtools/Images/symbol.svg +3 -0
- package/lib/devtools/Images/sync.svg +3 -0
- package/lib/devtools/Images/tab-move.svg +1 -0
- package/lib/devtools/Images/table.svg +3 -0
- package/lib/devtools/Images/terminal.svg +10 -0
- package/lib/devtools/Images/text-analysis.svg +3 -0
- package/lib/devtools/Images/thumb-down-filled.svg +3 -0
- package/lib/devtools/Images/thumb-down.svg +3 -0
- package/lib/devtools/Images/thumb-up-filled.svg +3 -0
- package/lib/devtools/Images/thumb-up.svg +3 -0
- package/lib/devtools/Images/tonality.svg +10 -0
- package/lib/devtools/Images/toolbarResizerVertical.png +0 -0
- package/lib/devtools/Images/top-panel-close.svg +1 -0
- package/lib/devtools/Images/top-panel-open.svg +1 -0
- package/lib/devtools/Images/touch-app.svg +4 -0
- package/lib/devtools/Images/touchCursor.png +0 -0
- package/lib/devtools/Images/touchCursor_2x.png +0 -0
- package/lib/devtools/Images/triangle-bottom-right.svg +3 -0
- package/lib/devtools/Images/triangle-down.svg +1 -0
- package/lib/devtools/Images/triangle-left.svg +1 -0
- package/lib/devtools/Images/triangle-right.svg +1 -0
- package/lib/devtools/Images/triangle-up.svg +3 -0
- package/lib/devtools/Images/trophy.svg +3 -0
- package/lib/devtools/Images/tune.svg +3 -0
- package/lib/devtools/Images/undo.svg +1 -0
- package/lib/devtools/Images/warning-filled.svg +3 -0
- package/lib/devtools/Images/warning.svg +3 -0
- package/lib/devtools/Images/watch.svg +3 -0
- package/lib/devtools/Images/whatsnew.svg +61 -0
- package/lib/devtools/Images/width.svg +3 -0
- package/lib/devtools/Images/zoom-in.svg +3 -0
- package/lib/devtools/LICENSE +27 -0
- package/lib/devtools/application_tokens.css +413 -0
- package/lib/devtools/chunks/FormatterActions-FcPgI0uV.js +19 -0
- package/lib/devtools/chunks/UIFilter-CIzBruM3.js +18 -0
- package/lib/devtools/chunks/UIRequestLocation-CtGcVN3I.js +48 -0
- package/lib/devtools/chunks/_qilin-devtools_empty-BvRk9kiK.js +0 -0
- package/lib/devtools/chunks/accessibility-CwvHp3sj.js +2718 -0
- package/lib/devtools/chunks/acorn-_jSanihy.js +3232 -0
- package/lib/devtools/chunks/adorners-D4aU6nuY.js +45 -0
- package/lib/devtools/chunks/ai_assistance-BU6E0Wio.js +4255 -0
- package/lib/devtools/chunks/angular-Dutmu-L9.js +117 -0
- package/lib/devtools/chunks/animation-TEwO5UI_.js +922 -0
- package/lib/devtools/chunks/application-SCf6MiCN.js +12740 -0
- package/lib/devtools/chunks/autofill-Dp3nMnuK.js +198 -0
- package/lib/devtools/chunks/autofill_manager-BXntqfdp.js +58 -0
- package/lib/devtools/chunks/bindings-DgoVEdsr.js +4105 -0
- package/lib/devtools/chunks/browser-DL1S1Kiu.js +62 -0
- package/lib/devtools/chunks/browser_debugger-p7Rr4IBR.js +629 -0
- package/lib/devtools/chunks/changes-DeW5MC9u.js +2 -0
- package/lib/devtools/chunks/changes-k42bihtm.js +393 -0
- package/lib/devtools/chunks/checkbox.css-CZJJ6atQ.js +4 -0
- package/lib/devtools/chunks/chunk-DF993M8W.js +11 -0
- package/lib/devtools/chunks/code_highlighter-BnTPt9_G.js +210 -0
- package/lib/devtools/chunks/codemirror-CBR9VJma.js +15842 -0
- package/lib/devtools/chunks/color_picker-Cuh_X19Y.js +1566 -0
- package/lib/devtools/chunks/common-DjRFwulW.js +15145 -0
- package/lib/devtools/chunks/common-Uu9A2glf.js +2 -0
- package/lib/devtools/chunks/common-qd_KLeYO.js +6639 -0
- package/lib/devtools/chunks/components-CnPGgDUW.js +704 -0
- package/lib/devtools/chunks/components-Cw5tHQqN.js +1338 -0
- package/lib/devtools/chunks/components-EJwviLtZ.js +1090 -0
- package/lib/devtools/chunks/console-D1WlMaFQ.js +3855 -0
- package/lib/devtools/chunks/console-yMm3XVTY.js +2 -0
- package/lib/devtools/chunks/console_counters-9SfIdrUo.js +103 -0
- package/lib/devtools/chunks/coverage-BbFH390Q.js +1176 -0
- package/lib/devtools/chunks/coverage-CLBpovLw.js +2 -0
- package/lib/devtools/chunks/cpp-CdElSCaB.js +435 -0
- package/lib/devtools/chunks/css_overview-cITV9auE.js +1288 -0
- package/lib/devtools/chunks/data_grid-pC5qqfsJ.js +1671 -0
- package/lib/devtools/chunks/developer_resources-4DqQIvy6.js +240 -0
- package/lib/devtools/chunks/diff-qn55JSCS.js +444 -0
- package/lib/devtools/chunks/dom_extension-BfrKZ4JG.js +172 -0
- package/lib/devtools/chunks/elements-CgEYz3mX.js +2 -0
- package/lib/devtools/chunks/elements-Dbx4q9-v.js +11407 -0
- package/lib/devtools/chunks/emulation-C6XKPPGu.js +1306 -0
- package/lib/devtools/chunks/emulation-D8xbdsAj.js +2 -0
- package/lib/devtools/chunks/emulation-EtJlEukP.js +2732 -0
- package/lib/devtools/chunks/emulation-cjFPXHT9.js +157 -0
- package/lib/devtools/chunks/event_listeners-BeTH3gi2.js +414 -0
- package/lib/devtools/chunks/explain-P_aDGFSD.js +747 -0
- package/lib/devtools/chunks/greendev-BU0QcVPX.js +152 -0
- package/lib/devtools/chunks/heap_snapshot-CZt2KUPL.js +427 -0
- package/lib/devtools/chunks/helper-CI72KvIC.js +33 -0
- package/lib/devtools/chunks/helpers--xrfGSwQ.js +29 -0
- package/lib/devtools/chunks/i18n-DvFMqQdJ.js +17 -0
- package/lib/devtools/chunks/icon_button-BebVdJD8.js +83 -0
- package/lib/devtools/chunks/inline_editor-D54X5UUr.js +1309 -0
- package/lib/devtools/chunks/inspector_main-DRbdXLmF.js +279 -0
- package/lib/devtools/chunks/issue_counter-CeOjTNGW.js +193 -0
- package/lib/devtools/chunks/issues-CegBKEda.js +1649 -0
- package/lib/devtools/chunks/issues_manager-D7nfNPN1.js +3009 -0
- package/lib/devtools/chunks/java-7g_qfFa2.js +263 -0
- package/lib/devtools/chunks/layer_viewer-CaFC5oyv.js +1423 -0
- package/lib/devtools/chunks/layers-CXqlD9zH.js +370 -0
- package/lib/devtools/chunks/legacy-Bqn4Q0Tf.js +41804 -0
- package/lib/devtools/chunks/legacy-DOCLCisy.js +1434 -0
- package/lib/devtools/chunks/less-DXiRNbd4.js +195 -0
- package/lib/devtools/chunks/lighthouse-DtpzvfT6.js +3920 -0
- package/lib/devtools/chunks/lighthouse-T9ZpmENr.js +2 -0
- package/lib/devtools/chunks/linear_memory_inspector-C50PtM45.js +305 -0
- package/lib/devtools/chunks/live-metrics-Bs7wxibB.js +284 -0
- package/lib/devtools/chunks/main-C5y6NscM.js +2 -0
- package/lib/devtools/chunks/main-DcgYyEI0.js +755 -0
- package/lib/devtools/chunks/markdown-tZoR6Bsu.js +1512 -0
- package/lib/devtools/chunks/markdown_view-C67b2DdG.js +461 -0
- package/lib/devtools/chunks/marked-zGgfoDxO.js +1362 -0
- package/lib/devtools/chunks/media-BhuqASbO.js +1337 -0
- package/lib/devtools/chunks/media-Wfo1AbXC.js +2 -0
- package/lib/devtools/chunks/menus-BAUukA5-.js +969 -0
- package/lib/devtools/chunks/mobile_throttling-C26zde8o.js +2 -0
- package/lib/devtools/chunks/mobile_throttling-Cw4AkJH4.js +1052 -0
- package/lib/devtools/chunks/network-C3gIloDN.js +2 -0
- package/lib/devtools/chunks/network-CaxdpGU2.js +9181 -0
- package/lib/devtools/chunks/objectValue.css-C9o9fdM2.js +4 -0
- package/lib/devtools/chunks/object_ui-BYgPTK_b.js +1461 -0
- package/lib/devtools/chunks/object_ui-E7eR7aD-.js +2 -0
- package/lib/devtools/chunks/perf_ui-BqzJrt4p.js +2 -0
- package/lib/devtools/chunks/perf_ui-CQMkYfn3.js +3143 -0
- package/lib/devtools/chunks/performance_monitor-B2kUoCv0.js +385 -0
- package/lib/devtools/chunks/php-tl5gKrxu.js +423 -0
- package/lib/devtools/chunks/platform-BzB373NB.js +600 -0
- package/lib/devtools/chunks/profiler-BGu3akEf.js +4608 -0
- package/lib/devtools/chunks/protocol_client-Cwf_jb8R.js +24329 -0
- package/lib/devtools/chunks/protocol_monitor-B9nMqAAE.js +2 -0
- package/lib/devtools/chunks/protocol_monitor-CvLQ8ms1.js +1224 -0
- package/lib/devtools/chunks/puppeteer-CaOjgj3v.js +13299 -0
- package/lib/devtools/chunks/python-D9AdRkMm.js +580 -0
- package/lib/devtools/chunks/quick_open-C3IZ69m9.js +2 -0
- package/lib/devtools/chunks/quick_open-DRITaPnZ.js +722 -0
- package/lib/devtools/chunks/recorder-C0f1n95b.js +5465 -0
- package/lib/devtools/chunks/recorder-actions-S2RfLX4H.js +6 -0
- package/lib/devtools/chunks/request_link_icon-fGy57GcW.js +87 -0
- package/lib/devtools/chunks/root-DbVQo07X.js +255 -0
- package/lib/devtools/chunks/sass-BPQlMmw2.js +370 -0
- package/lib/devtools/chunks/security-NbgKa3ux.js +898 -0
- package/lib/devtools/chunks/sensors-nM7qcBE4.js +752 -0
- package/lib/devtools/chunks/settings-aKtQC12v.js +1433 -0
- package/lib/devtools/chunks/settings_ui-CzxAFzIb.js +175 -0
- package/lib/devtools/chunks/snackbars-lPThuWYs.js +12010 -0
- package/lib/devtools/chunks/snippets-dIuBmVBv.js +173 -0
- package/lib/devtools/chunks/source_frame-CSjno3kf.js +1352 -0
- package/lib/devtools/chunks/sources-BIZssBei.js +8216 -0
- package/lib/devtools/chunks/sources-Bf8QJxju.js +2 -0
- package/lib/devtools/chunks/suggestion_input-Duuu5pyd.js +196 -0
- package/lib/devtools/chunks/svelte-DJS1itbE.js +744 -0
- package/lib/devtools/chunks/textInput.css-DPvwvIic.js +4 -0
- package/lib/devtools/chunks/text_editor-Dq1P6D2J.js +15706 -0
- package/lib/devtools/chunks/text_utils-ohNt_gua.js +608 -0
- package/lib/devtools/chunks/theme_support-CbSSLkbO.js +92 -0
- package/lib/devtools/chunks/third-party-web-DGiPoc0U.js +12626 -0
- package/lib/devtools/chunks/timeline-BE_ysZxO.js +2 -0
- package/lib/devtools/chunks/timeline-C4vCX79k.js +16347 -0
- package/lib/devtools/chunks/utils-CELci976.js +298 -0
- package/lib/devtools/chunks/vue-CjH9yovn.js +73 -0
- package/lib/devtools/chunks/wast-CbGHiqaW.js +109 -0
- package/lib/devtools/chunks/web_audio-IdfBLjwV.js +277 -0
- package/lib/devtools/chunks/webauthn-iRZlbjGV.js +522 -0
- package/lib/devtools/chunks/whats_new-DOTPf2xJ.js +177 -0
- package/lib/devtools/chunks/xml-DI9dcP5w.js +327 -0
- package/lib/devtools/connect.js +9 -0
- package/lib/devtools/design_system_tokens.css +1061 -0
- package/lib/devtools/device_mode_emulation_frame.html +25 -0
- package/lib/devtools/devtools_app.html +25 -0
- package/lib/devtools/emulated_devices/optimized/MotoG4-landscape.avif +0 -0
- package/lib/devtools/emulated_devices/optimized/MotoG4-portrait.avif +0 -0
- package/lib/devtools/emulated_devices/optimized/Nexus5X-landscape.avif +0 -0
- package/lib/devtools/emulated_devices/optimized/Nexus5X-portrait.avif +0 -0
- package/lib/devtools/emulated_devices/optimized/Nexus6P-landscape.avif +0 -0
- package/lib/devtools/emulated_devices/optimized/Nexus6P-portrait.avif +0 -0
- package/lib/devtools/emulated_devices/optimized/google-nest-hub-horizontal.avif +0 -0
- package/lib/devtools/emulated_devices/optimized/google-nest-hub-max-horizontal.avif +0 -0
- package/lib/devtools/emulated_devices/optimized/google-nexus-5-horizontal-default-1x.avif +0 -0
- package/lib/devtools/emulated_devices/optimized/google-nexus-5-horizontal-default-2x.avif +0 -0
- package/lib/devtools/emulated_devices/optimized/google-nexus-5-horizontal-keyboard-1x.avif +0 -0
- package/lib/devtools/emulated_devices/optimized/google-nexus-5-horizontal-keyboard-2x.avif +0 -0
- package/lib/devtools/emulated_devices/optimized/google-nexus-5-horizontal-navigation-1x.avif +0 -0
- package/lib/devtools/emulated_devices/optimized/google-nexus-5-horizontal-navigation-2x.avif +0 -0
- package/lib/devtools/emulated_devices/optimized/google-nexus-5-vertical-default-1x.avif +0 -0
- package/lib/devtools/emulated_devices/optimized/google-nexus-5-vertical-default-2x.avif +0 -0
- package/lib/devtools/emulated_devices/optimized/google-nexus-5-vertical-keyboard-1x.avif +0 -0
- package/lib/devtools/emulated_devices/optimized/google-nexus-5-vertical-keyboard-2x.avif +0 -0
- package/lib/devtools/emulated_devices/optimized/google-nexus-5-vertical-navigation-1x.avif +0 -0
- package/lib/devtools/emulated_devices/optimized/google-nexus-5-vertical-navigation-2x.avif +0 -0
- package/lib/devtools/emulated_devices/optimized/google-nexus-5x-horizontal-default-1x.avif +0 -0
- package/lib/devtools/emulated_devices/optimized/google-nexus-5x-horizontal-default-2x.avif +0 -0
- package/lib/devtools/emulated_devices/optimized/google-nexus-5x-horizontal-keyboard-1x.avif +0 -0
- package/lib/devtools/emulated_devices/optimized/google-nexus-5x-horizontal-keyboard-2x.avif +0 -0
- package/lib/devtools/emulated_devices/optimized/google-nexus-5x-horizontal-navigation-1x.avif +0 -0
- package/lib/devtools/emulated_devices/optimized/google-nexus-5x-horizontal-navigation-2x.avif +0 -0
- package/lib/devtools/emulated_devices/optimized/google-nexus-5x-vertical-default-1x.avif +0 -0
- package/lib/devtools/emulated_devices/optimized/google-nexus-5x-vertical-default-2x.avif +0 -0
- package/lib/devtools/emulated_devices/optimized/google-nexus-5x-vertical-keyboard-1x.avif +0 -0
- package/lib/devtools/emulated_devices/optimized/google-nexus-5x-vertical-keyboard-2x.avif +0 -0
- package/lib/devtools/emulated_devices/optimized/google-nexus-5x-vertical-navigation-1x.avif +0 -0
- package/lib/devtools/emulated_devices/optimized/google-nexus-5x-vertical-navigation-2x.avif +0 -0
- package/lib/devtools/emulated_devices/optimized/iPad-landscape.avif +0 -0
- package/lib/devtools/emulated_devices/optimized/iPad-portrait.avif +0 -0
- package/lib/devtools/emulated_devices/optimized/iPhone5-landscape.avif +0 -0
- package/lib/devtools/emulated_devices/optimized/iPhone5-portrait.avif +0 -0
- package/lib/devtools/emulated_devices/optimized/iPhone6-landscape.avif +0 -0
- package/lib/devtools/emulated_devices/optimized/iPhone6-portrait.avif +0 -0
- package/lib/devtools/emulated_devices/optimized/iPhone6Plus-landscape.avif +0 -0
- package/lib/devtools/emulated_devices/optimized/iPhone6Plus-portrait.avif +0 -0
- package/lib/devtools/emulated_devices/optimized/optimized_images.gni +53 -0
- package/lib/devtools/entrypoints/device_mode_emulation_frame/device_mode_emulation_frame.js +4 -0
- package/lib/devtools/entrypoints/devtools_app/devtools_app.js +6240 -0
- package/lib/devtools/entrypoints/formatter_worker/formatter_worker-entrypoint.js +2810 -0
- package/lib/devtools/entrypoints/heap_snapshot_worker/heap_snapshot_worker-entrypoint.js +2142 -0
- package/lib/devtools/entrypoints/lighthouse_worker/lighthouse_worker.js +290095 -0
- package/lib/devtools/entrypoints/wasmparser_worker/wasmparser_worker-entrypoint.js +3403 -0
- package/lib/devtools/models/issues_manager/descriptions/CoepCoopSandboxedIframeCannotNavigateToCoopPage.md +4 -0
- package/lib/devtools/models/issues_manager/descriptions/CoepCorpNotSameOrigin.md +8 -0
- package/lib/devtools/models/issues_manager/descriptions/CoepCorpNotSameOriginAfterDefaultedToSameOriginByCoep.md +18 -0
- package/lib/devtools/models/issues_manager/descriptions/CoepCorpNotSameSite.md +7 -0
- package/lib/devtools/models/issues_manager/descriptions/CoepFrameResourceNeedsCoepHeader.md +10 -0
- package/lib/devtools/models/issues_manager/descriptions/CompatibilityModeQuirks.md +5 -0
- package/lib/devtools/models/issues_manager/descriptions/CookieAttributeValueExceedsMaxSize.md +5 -0
- package/lib/devtools/models/issues_manager/descriptions/LowTextContrast.md +5 -0
- package/lib/devtools/models/issues_manager/descriptions/SameSiteExcludeContextDowngradeRead.md +8 -0
- package/lib/devtools/models/issues_manager/descriptions/SameSiteExcludeContextDowngradeSet.md +8 -0
- package/lib/devtools/models/issues_manager/descriptions/SameSiteExcludeNavigationContextDowngrade.md +8 -0
- package/lib/devtools/models/issues_manager/descriptions/SameSiteNoneInsecureErrorRead.md +8 -0
- package/lib/devtools/models/issues_manager/descriptions/SameSiteNoneInsecureErrorSet.md +8 -0
- package/lib/devtools/models/issues_manager/descriptions/SameSiteNoneInsecureWarnRead.md +8 -0
- package/lib/devtools/models/issues_manager/descriptions/SameSiteNoneInsecureWarnSet.md +8 -0
- package/lib/devtools/models/issues_manager/descriptions/SameSiteUnspecifiedLaxAllowUnsafeRead.md +9 -0
- package/lib/devtools/models/issues_manager/descriptions/SameSiteUnspecifiedLaxAllowUnsafeSet.md +9 -0
- package/lib/devtools/models/issues_manager/descriptions/SameSiteWarnCrossDowngradeRead.md +8 -0
- package/lib/devtools/models/issues_manager/descriptions/SameSiteWarnCrossDowngradeSet.md +8 -0
- package/lib/devtools/models/issues_manager/descriptions/SameSiteWarnStrictLaxDowngradeStrict.md +8 -0
- package/lib/devtools/models/issues_manager/descriptions/arInsecureContext.md +7 -0
- package/lib/devtools/models/issues_manager/descriptions/arInvalidInfoHeader.md +5 -0
- package/lib/devtools/models/issues_manager/descriptions/arInvalidRegisterOsSourceHeader.md +5 -0
- package/lib/devtools/models/issues_manager/descriptions/arInvalidRegisterOsTriggerHeader.md +5 -0
- package/lib/devtools/models/issues_manager/descriptions/arInvalidRegisterSourceHeader.md +5 -0
- package/lib/devtools/models/issues_manager/descriptions/arInvalidRegisterTriggerHeader.md +5 -0
- package/lib/devtools/models/issues_manager/descriptions/arNavigationRegistrationUniqueScopeAlreadySet.md +5 -0
- package/lib/devtools/models/issues_manager/descriptions/arNavigationRegistrationWithoutTransientUserActivation.md +6 -0
- package/lib/devtools/models/issues_manager/descriptions/arNoRegisterOsSourceHeader.md +5 -0
- package/lib/devtools/models/issues_manager/descriptions/arNoRegisterOsTriggerHeader.md +5 -0
- package/lib/devtools/models/issues_manager/descriptions/arNoRegisterSourceHeader.md +5 -0
- package/lib/devtools/models/issues_manager/descriptions/arNoRegisterTriggerHeader.md +5 -0
- package/lib/devtools/models/issues_manager/descriptions/arNoWebOrOsSupport.md +4 -0
- package/lib/devtools/models/issues_manager/descriptions/arOsSourceIgnored.md +18 -0
- package/lib/devtools/models/issues_manager/descriptions/arOsTriggerIgnored.md +19 -0
- package/lib/devtools/models/issues_manager/descriptions/arPermissionPolicyDisabled.md +8 -0
- package/lib/devtools/models/issues_manager/descriptions/arSourceAndTriggerHeaders.md +9 -0
- package/lib/devtools/models/issues_manager/descriptions/arSourceIgnored.md +13 -0
- package/lib/devtools/models/issues_manager/descriptions/arTriggerIgnored.md +12 -0
- package/lib/devtools/models/issues_manager/descriptions/arUntrustworthyReportingOrigin.md +10 -0
- package/lib/devtools/models/issues_manager/descriptions/arWebAndOsHeaders.md +11 -0
- package/lib/devtools/models/issues_manager/descriptions/bounceTrackingMitigations.md +3 -0
- package/lib/devtools/models/issues_manager/descriptions/clientHintMetaTagAllowListInvalidOrigin.md +4 -0
- package/lib/devtools/models/issues_manager/descriptions/clientHintMetaTagModifiedHTML.md +4 -0
- package/lib/devtools/models/issues_manager/descriptions/connectionAllowlistInvalidAllowlistItemType.md +12 -0
- package/lib/devtools/models/issues_manager/descriptions/connectionAllowlistInvalidHeader.md +12 -0
- package/lib/devtools/models/issues_manager/descriptions/connectionAllowlistInvalidUrlPattern.md +8 -0
- package/lib/devtools/models/issues_manager/descriptions/connectionAllowlistItemNotInnerList.md +12 -0
- package/lib/devtools/models/issues_manager/descriptions/connectionAllowlistMoreThanOneList.md +7 -0
- package/lib/devtools/models/issues_manager/descriptions/connectionAllowlistReportingEndpointNotToken.md +10 -0
- package/lib/devtools/models/issues_manager/descriptions/cookieCrossSiteRedirectDowngrade.md +12 -0
- package/lib/devtools/models/issues_manager/descriptions/cookieExcludeBlockedWithinRelatedWebsiteSet.md +4 -0
- package/lib/devtools/models/issues_manager/descriptions/cookieExcludeDomainNonAscii.md +11 -0
- package/lib/devtools/models/issues_manager/descriptions/cookieExcludePortMismatch.md +8 -0
- package/lib/devtools/models/issues_manager/descriptions/cookieExcludeSchemeMismatch.md +7 -0
- package/lib/devtools/models/issues_manager/descriptions/cookieExcludeThirdPartyPhaseoutRead.md +6 -0
- package/lib/devtools/models/issues_manager/descriptions/cookieExcludeThirdPartyPhaseoutSet.md +6 -0
- package/lib/devtools/models/issues_manager/descriptions/cookieWarnDomainNonAscii.md +11 -0
- package/lib/devtools/models/issues_manager/descriptions/cookieWarnMetadataGrantRead.md +4 -0
- package/lib/devtools/models/issues_manager/descriptions/cookieWarnMetadataGrantSet.md +4 -0
- package/lib/devtools/models/issues_manager/descriptions/cookieWarnThirdPartyPhaseoutRead.md +6 -0
- package/lib/devtools/models/issues_manager/descriptions/cookieWarnThirdPartyPhaseoutSet.md +6 -0
- package/lib/devtools/models/issues_manager/descriptions/corsAllowCredentialsRequired.md +6 -0
- package/lib/devtools/models/issues_manager/descriptions/corsDisabledScheme.md +7 -0
- package/lib/devtools/models/issues_manager/descriptions/corsDisallowedByMode.md +7 -0
- package/lib/devtools/models/issues_manager/descriptions/corsHeaderDisallowedByPreflightResponse.md +5 -0
- package/lib/devtools/models/issues_manager/descriptions/corsInvalidHeaderValues.md +7 -0
- package/lib/devtools/models/issues_manager/descriptions/corsLocalNetworkAccessPermissionDenied.md +19 -0
- package/lib/devtools/models/issues_manager/descriptions/corsMethodDisallowedByPreflightResponse.md +5 -0
- package/lib/devtools/models/issues_manager/descriptions/corsNoCorsRedirectModeNotFollow.md +5 -0
- package/lib/devtools/models/issues_manager/descriptions/corsOriginMismatch.md +6 -0
- package/lib/devtools/models/issues_manager/descriptions/corsPreflightResponseInvalid.md +5 -0
- package/lib/devtools/models/issues_manager/descriptions/corsRedirectContainsCredentials.md +5 -0
- package/lib/devtools/models/issues_manager/descriptions/corsWildcardOriginNotAllowed.md +8 -0
- package/lib/devtools/models/issues_manager/descriptions/cspEvalViolation.md +9 -0
- package/lib/devtools/models/issues_manager/descriptions/cspInlineViolation.md +10 -0
- package/lib/devtools/models/issues_manager/descriptions/cspTrustedTypesPolicyViolation.md +5 -0
- package/lib/devtools/models/issues_manager/descriptions/cspTrustedTypesSinkViolation.md +8 -0
- package/lib/devtools/models/issues_manager/descriptions/cspURLViolation.md +10 -0
- package/lib/devtools/models/issues_manager/descriptions/deprecation.md +3 -0
- package/lib/devtools/models/issues_manager/descriptions/emailVerificationRequestDnsFetchFailed.md +1 -0
- package/lib/devtools/models/issues_manager/descriptions/emailVerificationRequestDnsInvalidRecord.md +1 -0
- package/lib/devtools/models/issues_manager/descriptions/emailVerificationRequestInvalidEmail.md +1 -0
- package/lib/devtools/models/issues_manager/descriptions/emailVerificationRequestKeyBindingSigningFailed.md +1 -0
- package/lib/devtools/models/issues_manager/descriptions/emailVerificationRequestRpOriginIsOpaque.md +1 -0
- package/lib/devtools/models/issues_manager/descriptions/emailVerificationRequestTokenHttpNotFound.md +1 -0
- package/lib/devtools/models/issues_manager/descriptions/emailVerificationRequestTokenInvalidContentType.md +1 -0
- package/lib/devtools/models/issues_manager/descriptions/emailVerificationRequestTokenInvalidResponse.md +1 -0
- package/lib/devtools/models/issues_manager/descriptions/emailVerificationRequestTokenInvalidSdJwt.md +1 -0
- package/lib/devtools/models/issues_manager/descriptions/emailVerificationRequestTokenMalformedSdJwt.md +1 -0
- package/lib/devtools/models/issues_manager/descriptions/emailVerificationRequestTokenNoResponse.md +1 -0
- package/lib/devtools/models/issues_manager/descriptions/emailVerificationRequestUserLoggedOut.md +1 -0
- package/lib/devtools/models/issues_manager/descriptions/emailVerificationRequestWellKnownAccountsEndpointCrossOrigin.md +1 -0
- package/lib/devtools/models/issues_manager/descriptions/emailVerificationRequestWellKnownHttpNotFound.md +1 -0
- package/lib/devtools/models/issues_manager/descriptions/emailVerificationRequestWellKnownInvalidContentType.md +1 -0
- package/lib/devtools/models/issues_manager/descriptions/emailVerificationRequestWellKnownInvalidResponse.md +1 -0
- package/lib/devtools/models/issues_manager/descriptions/emailVerificationRequestWellKnownIssuanceEndpointCrossOrigin.md +1 -0
- package/lib/devtools/models/issues_manager/descriptions/emailVerificationRequestWellKnownListEmpty.md +1 -0
- package/lib/devtools/models/issues_manager/descriptions/emailVerificationRequestWellKnownMissingAccountsEndpoint.md +1 -0
- package/lib/devtools/models/issues_manager/descriptions/emailVerificationRequestWellKnownMissingIssuanceEndpoint.md +1 -0
- package/lib/devtools/models/issues_manager/descriptions/emailVerificationRequestWellKnownNoResponse.md +1 -0
- package/lib/devtools/models/issues_manager/descriptions/emailVerificationRequestWellKnownUnsupportedSigningAlgorithm.md +1 -0
- package/lib/devtools/models/issues_manager/descriptions/federatedAuthRequestAccountsHttpNotFound.md +1 -0
- package/lib/devtools/models/issues_manager/descriptions/federatedAuthRequestAccountsInvalidResponse.md +1 -0
- package/lib/devtools/models/issues_manager/descriptions/federatedAuthRequestAccountsNoResponse.md +1 -0
- package/lib/devtools/models/issues_manager/descriptions/federatedAuthRequestApprovalDeclined.md +1 -0
- package/lib/devtools/models/issues_manager/descriptions/federatedAuthRequestCanceled.md +1 -0
- package/lib/devtools/models/issues_manager/descriptions/federatedAuthRequestErrorFetchingSignin.md +1 -0
- package/lib/devtools/models/issues_manager/descriptions/federatedAuthRequestErrorIdToken.md +1 -0
- package/lib/devtools/models/issues_manager/descriptions/federatedAuthRequestIdTokenHttpNotFound.md +1 -0
- package/lib/devtools/models/issues_manager/descriptions/federatedAuthRequestIdTokenInvalidRequest.md +1 -0
- package/lib/devtools/models/issues_manager/descriptions/federatedAuthRequestIdTokenInvalidResponse.md +1 -0
- package/lib/devtools/models/issues_manager/descriptions/federatedAuthRequestIdTokenNoResponse.md +1 -0
- package/lib/devtools/models/issues_manager/descriptions/federatedAuthRequestInvalidSigninResponse.md +1 -0
- package/lib/devtools/models/issues_manager/descriptions/federatedAuthRequestManifestHttpNotFound.md +1 -0
- package/lib/devtools/models/issues_manager/descriptions/federatedAuthRequestManifestInvalidResponse.md +1 -0
- package/lib/devtools/models/issues_manager/descriptions/federatedAuthRequestManifestNoResponse.md +1 -0
- package/lib/devtools/models/issues_manager/descriptions/federatedAuthRequestTooManyRequests.md +1 -0
- package/lib/devtools/models/issues_manager/descriptions/federatedAuthUserInfoRequestInvalidAccountsResponse.md +1 -0
- package/lib/devtools/models/issues_manager/descriptions/federatedAuthUserInfoRequestInvalidConfigOrWellKnown.md +1 -0
- package/lib/devtools/models/issues_manager/descriptions/federatedAuthUserInfoRequestNoAccountSharingPermission.md +1 -0
- package/lib/devtools/models/issues_manager/descriptions/federatedAuthUserInfoRequestNoApiPermission.md +1 -0
- package/lib/devtools/models/issues_manager/descriptions/federatedAuthUserInfoRequestNoReturningUserFromFetchedAccounts.md +1 -0
- package/lib/devtools/models/issues_manager/descriptions/federatedAuthUserInfoRequestNotIframe.md +1 -0
- package/lib/devtools/models/issues_manager/descriptions/federatedAuthUserInfoRequestNotPotentiallyTrustworthy.md +1 -0
- package/lib/devtools/models/issues_manager/descriptions/federatedAuthUserInfoRequestNotSameOrigin.md +1 -0
- package/lib/devtools/models/issues_manager/descriptions/federatedAuthUserInfoRequestNotSignedInWithIdp.md +1 -0
- package/lib/devtools/models/issues_manager/descriptions/fetchingPartitionedBlobURL.md +7 -0
- package/lib/devtools/models/issues_manager/descriptions/genericBackUINavigationWouldSkipAd.md +4 -0
- package/lib/devtools/models/issues_manager/descriptions/genericFormAriaLabelledByToNonExistingIdError.md +8 -0
- package/lib/devtools/models/issues_manager/descriptions/genericFormAutocompleteAttributeEmptyError.md +5 -0
- package/lib/devtools/models/issues_manager/descriptions/genericFormDuplicateIdForInputError.md +5 -0
- package/lib/devtools/models/issues_manager/descriptions/genericFormEmptyIdAndNameAttributesForInputError.md +5 -0
- package/lib/devtools/models/issues_manager/descriptions/genericFormInputAssignedAutocompleteValueToIdOrNameAttributeError.md +5 -0
- package/lib/devtools/models/issues_manager/descriptions/genericFormInputHasWrongButWellIntendedAutocompleteValueError.md +5 -0
- package/lib/devtools/models/issues_manager/descriptions/genericFormInputWithNoLabelError.md +5 -0
- package/lib/devtools/models/issues_manager/descriptions/genericFormLabelForMatchesNonExistingIdError.md +5 -0
- package/lib/devtools/models/issues_manager/descriptions/genericFormLabelForNameError.md +5 -0
- package/lib/devtools/models/issues_manager/descriptions/genericFormLabelHasNeitherForNorNestedInputError.md +5 -0
- package/lib/devtools/models/issues_manager/descriptions/genericFormModelContextMissingToolDescription.md +5 -0
- package/lib/devtools/models/issues_manager/descriptions/genericFormModelContextMissingToolName.md +5 -0
- package/lib/devtools/models/issues_manager/descriptions/genericFormModelContextParameterMissingName.md +5 -0
- package/lib/devtools/models/issues_manager/descriptions/genericFormModelContextParameterMissingTitleAndDescription.md +5 -0
- package/lib/devtools/models/issues_manager/descriptions/genericFormModelContextRequiredParameterMissingName.md +5 -0
- package/lib/devtools/models/issues_manager/descriptions/genericNavigationEntryMarkedSkippable.md +7 -0
- package/lib/devtools/models/issues_manager/descriptions/genericResponseWasBlockedByORB.md +4 -0
- package/lib/devtools/models/issues_manager/descriptions/heavyAd.md +10 -0
- package/lib/devtools/models/issues_manager/descriptions/mixedContent.md +5 -0
- package/lib/devtools/models/issues_manager/descriptions/navigatingPartitionedBlobURL.md +5 -0
- package/lib/devtools/models/issues_manager/descriptions/permissionElementActivationDisabled.md +7 -0
- package/lib/devtools/models/issues_manager/descriptions/permissionElementActivationDisabledWithOccluder.md +9 -0
- package/lib/devtools/models/issues_manager/descriptions/permissionElementActivationDisabledWithOccluderParent.md +9 -0
- package/lib/devtools/models/issues_manager/descriptions/permissionElementCspFrameAncestorsMissing.md +5 -0
- package/lib/devtools/models/issues_manager/descriptions/permissionElementFencedFrameDisallowed.md +5 -0
- package/lib/devtools/models/issues_manager/descriptions/permissionElementFontSizeTooLarge.md +5 -0
- package/lib/devtools/models/issues_manager/descriptions/permissionElementFontSizeTooSmall.md +5 -0
- package/lib/devtools/models/issues_manager/descriptions/permissionElementGeolocationDeprecated.md +5 -0
- package/lib/devtools/models/issues_manager/descriptions/permissionElementInsetBoxShadowUnsupported.md +5 -0
- package/lib/devtools/models/issues_manager/descriptions/permissionElementInvalidDisplayStyle.md +5 -0
- package/lib/devtools/models/issues_manager/descriptions/permissionElementInvalidSizeValue.md +5 -0
- package/lib/devtools/models/issues_manager/descriptions/permissionElementInvalidType.md +5 -0
- package/lib/devtools/models/issues_manager/descriptions/permissionElementInvalidTypeActivation.md +5 -0
- package/lib/devtools/models/issues_manager/descriptions/permissionElementLowContrast.md +5 -0
- package/lib/devtools/models/issues_manager/descriptions/permissionElementNonOpaqueColor.md +5 -0
- package/lib/devtools/models/issues_manager/descriptions/permissionElementPaddingBottomUnsupported.md +6 -0
- package/lib/devtools/models/issues_manager/descriptions/permissionElementPaddingRightUnsupported.md +6 -0
- package/lib/devtools/models/issues_manager/descriptions/permissionElementPermissionsPolicyBlocked.md +5 -0
- package/lib/devtools/models/issues_manager/descriptions/permissionElementRegistrationFailed.md +5 -0
- package/lib/devtools/models/issues_manager/descriptions/permissionElementRequestInProgress.md +5 -0
- package/lib/devtools/models/issues_manager/descriptions/permissionElementSecurityChecksFailed.md +5 -0
- package/lib/devtools/models/issues_manager/descriptions/permissionElementTypeNotSupported.md +5 -0
- package/lib/devtools/models/issues_manager/descriptions/permissionElementUntrustedEvent.md +7 -0
- package/lib/devtools/models/issues_manager/descriptions/placeholderDescriptionForInvisibleIssues.md +3 -0
- package/lib/devtools/models/issues_manager/descriptions/propertyRuleInvalidNameIssue.md +3 -0
- package/lib/devtools/models/issues_manager/descriptions/propertyRuleIssue.md +7 -0
- package/lib/devtools/models/issues_manager/descriptions/selectElementAccessibilityDisallowedOptGroupChild.md +7 -0
- package/lib/devtools/models/issues_manager/descriptions/selectElementAccessibilityDisallowedSelectChild.md +7 -0
- package/lib/devtools/models/issues_manager/descriptions/selectElementAccessibilityInteractiveContentAttributesSelectDescendant.md +3 -0
- package/lib/devtools/models/issues_manager/descriptions/selectElementAccessibilityInteractiveContentLegendChild.md +3 -0
- package/lib/devtools/models/issues_manager/descriptions/selectElementAccessibilityInteractiveContentOptionChild.md +3 -0
- package/lib/devtools/models/issues_manager/descriptions/selectElementAccessibilityNonPhrasingContentOptionChild.md +3 -0
- package/lib/devtools/models/issues_manager/descriptions/selectivePermissionsIntervention.md +7 -0
- package/lib/devtools/models/issues_manager/descriptions/sharedArrayBuffer.md +7 -0
- package/lib/devtools/models/issues_manager/descriptions/sharedDictionaryUseErrorCrossOriginNoCorsRequest.md +1 -0
- package/lib/devtools/models/issues_manager/descriptions/sharedDictionaryUseErrorDictionaryLoadFailure.md +3 -0
- package/lib/devtools/models/issues_manager/descriptions/sharedDictionaryUseErrorMatchingDictionaryNotUsed.md +3 -0
- package/lib/devtools/models/issues_manager/descriptions/sharedDictionaryUseErrorUnexpectedContentDictionaryHeader.md +1 -0
- package/lib/devtools/models/issues_manager/descriptions/sharedDictionaryWriteErrorCossOriginNoCorsRequest.md +1 -0
- package/lib/devtools/models/issues_manager/descriptions/sharedDictionaryWriteErrorDisallowedBySettings.md +1 -0
- package/lib/devtools/models/issues_manager/descriptions/sharedDictionaryWriteErrorExpiredResponse.md +3 -0
- package/lib/devtools/models/issues_manager/descriptions/sharedDictionaryWriteErrorFeatureDisabled.md +3 -0
- package/lib/devtools/models/issues_manager/descriptions/sharedDictionaryWriteErrorInsufficientResources.md +1 -0
- package/lib/devtools/models/issues_manager/descriptions/sharedDictionaryWriteErrorInvalidMatchField.md +1 -0
- package/lib/devtools/models/issues_manager/descriptions/sharedDictionaryWriteErrorInvalidStructuredHeader.md +1 -0
- package/lib/devtools/models/issues_manager/descriptions/sharedDictionaryWriteErrorInvalidTTLField.md +1 -0
- package/lib/devtools/models/issues_manager/descriptions/sharedDictionaryWriteErrorNavigationRequest.md +3 -0
- package/lib/devtools/models/issues_manager/descriptions/sharedDictionaryWriteErrorNoMatchField.md +1 -0
- package/lib/devtools/models/issues_manager/descriptions/sharedDictionaryWriteErrorNonIntegerTTLField.md +1 -0
- package/lib/devtools/models/issues_manager/descriptions/sharedDictionaryWriteErrorNonListMatchDestField.md +1 -0
- package/lib/devtools/models/issues_manager/descriptions/sharedDictionaryWriteErrorNonSecureContext.md +3 -0
- package/lib/devtools/models/issues_manager/descriptions/sharedDictionaryWriteErrorNonStringIdField.md +1 -0
- package/lib/devtools/models/issues_manager/descriptions/sharedDictionaryWriteErrorNonStringInMatchDestList.md +1 -0
- package/lib/devtools/models/issues_manager/descriptions/sharedDictionaryWriteErrorNonStringMatchField.md +1 -0
- package/lib/devtools/models/issues_manager/descriptions/sharedDictionaryWriteErrorNonTokenTypeField.md +1 -0
- package/lib/devtools/models/issues_manager/descriptions/sharedDictionaryWriteErrorRequestAborted.md +1 -0
- package/lib/devtools/models/issues_manager/descriptions/sharedDictionaryWriteErrorShuttingDown.md +1 -0
- package/lib/devtools/models/issues_manager/descriptions/sharedDictionaryWriteErrorTooLongIdField.md +3 -0
- package/lib/devtools/models/issues_manager/descriptions/sharedDictionaryWriteErrorUnsupportedType.md +3 -0
- package/lib/devtools/models/issues_manager/descriptions/sriInvalidSignatureHeader.md +14 -0
- package/lib/devtools/models/issues_manager/descriptions/sriInvalidSignatureInputHeader.md +15 -0
- package/lib/devtools/models/issues_manager/descriptions/sriMissingSignatureHeader.md +8 -0
- package/lib/devtools/models/issues_manager/descriptions/sriMissingSignatureInputHeader.md +7 -0
- package/lib/devtools/models/issues_manager/descriptions/sriSignatureHeaderValueIsIncorrectLength.md +11 -0
- package/lib/devtools/models/issues_manager/descriptions/sriSignatureHeaderValueIsNotByteSequence.md +14 -0
- package/lib/devtools/models/issues_manager/descriptions/sriSignatureHeaderValueIsParameterized.md +15 -0
- package/lib/devtools/models/issues_manager/descriptions/sriSignatureInputHeaderInvalidComponentName.md +8 -0
- package/lib/devtools/models/issues_manager/descriptions/sriSignatureInputHeaderInvalidComponentType.md +13 -0
- package/lib/devtools/models/issues_manager/descriptions/sriSignatureInputHeaderInvalidDerivedComponentParameter.md +4 -0
- package/lib/devtools/models/issues_manager/descriptions/sriSignatureInputHeaderInvalidHeaderComponentParameter.md +5 -0
- package/lib/devtools/models/issues_manager/descriptions/sriSignatureInputHeaderInvalidParameter.md +11 -0
- package/lib/devtools/models/issues_manager/descriptions/sriSignatureInputHeaderKeyIdLength.md +12 -0
- package/lib/devtools/models/issues_manager/descriptions/sriSignatureInputHeaderMissingLabel.md +6 -0
- package/lib/devtools/models/issues_manager/descriptions/sriSignatureInputHeaderMissingRequiredParameters.md +8 -0
- package/lib/devtools/models/issues_manager/descriptions/sriSignatureInputHeaderValueMissingComponents.md +11 -0
- package/lib/devtools/models/issues_manager/descriptions/sriSignatureInputHeaderValueNotInnerList.md +11 -0
- package/lib/devtools/models/issues_manager/descriptions/sriValidationFailedIntegrityMismatch.md +10 -0
- package/lib/devtools/models/issues_manager/descriptions/sriValidationFailedInvalidLength.md +5 -0
- package/lib/devtools/models/issues_manager/descriptions/sriValidationFailedSignatureExpired.md +6 -0
- package/lib/devtools/models/issues_manager/descriptions/sriValidationFailedSignatureMismatch.md +11 -0
- package/lib/devtools/models/issues_manager/descriptions/stylesheetLateImport.md +4 -0
- package/lib/devtools/models/issues_manager/descriptions/stylesheetRequestFailed.md +3 -0
- package/lib/devtools/models/issues_manager/descriptions/summaryElementAccessibilityInteractiveContentSummaryDescendant.md +3 -0
- package/lib/devtools/models/issues_manager/descriptions/unencodedDigestIncorrectDigestLength.md +12 -0
- package/lib/devtools/models/issues_manager/descriptions/unencodedDigestIncorrectDigestType.md +17 -0
- package/lib/devtools/models/issues_manager/descriptions/unencodedDigestMalformedDictionary.md +14 -0
- package/lib/devtools/models/issues_manager/descriptions/unencodedDigestUnknownAlgorithm.md +15 -0
- package/lib/devtools/models/live-metrics/web-vitals-injected/web-vitals-injected.generated.js +1 -0
- package/lib/devtools/panels/recorder/injected/injected.generated.js +1 -0
- package/lib/devtools/panels/whats_new/resources/WNDT.md +14 -0
- package/lib/devtools/resource-manifest.json +3818 -0
- package/lib/devtools/third_party/acorn/package/LICENSE +21 -0
- package/lib/devtools/third_party/axe-core/LICENSE +362 -0
- package/lib/devtools/third_party/chromium/LICENSE +27 -0
- package/lib/devtools/third_party/codemirror/package/LICENSE +21 -0
- package/lib/devtools/third_party/codemirror.next/LICENSE +21 -0
- package/lib/devtools/third_party/csp_evaluator/package/LICENSE +202 -0
- package/lib/devtools/third_party/diff/LICENSE +202 -0
- package/lib/devtools/third_party/i18n/LICENSE +202 -0
- package/lib/devtools/third_party/intl-messageformat/LICENSE +33 -0
- package/lib/devtools/third_party/intl-messageformat/package/LICENSE.md +33 -0
- package/lib/devtools/third_party/json5/LICENSE +23 -0
- package/lib/devtools/third_party/legacy-javascript/LICENSE +202 -0
- package/lib/devtools/third_party/lighthouse/LICENSE +202 -0
- package/lib/devtools/third_party/lit/LICENSE +28 -0
- package/lib/devtools/third_party/marked/LICENSE +39 -0
- package/lib/devtools/third_party/marked/package/LICENSE.md +44 -0
- package/lib/devtools/third_party/puppeteer/LICENSE +202 -0
- package/lib/devtools/third_party/puppeteer/third_party/mitt/LICENSE +21 -0
- package/lib/devtools/third_party/puppeteer/third_party/parsel/LICENSE +21 -0
- package/lib/devtools/third_party/puppeteer/third_party/rxjs/LICENSE +201 -0
- package/lib/devtools/third_party/puppeteer-replay/package/LICENSE +202 -0
- package/lib/devtools/third_party/source-map-scopes-codec/LICENSE +26 -0
- package/lib/devtools/third_party/source-map-scopes-codec/package/LICENSE +26 -0
- package/lib/devtools/third_party/third-party-web/LICENSE +20 -0
- package/lib/devtools/third_party/third-party-web/package/LICENSE +20 -0
- package/lib/devtools/third_party/vscode.web-custom-data/package/LICENSE.md +21 -0
- package/lib/devtools/third_party/wasmparser/package/LICENSE +177 -0
- package/lib/devtools/third_party/web-vitals/package/LICENSE +202 -0
- package/lib/index.js +2554 -0
- package/lib/types/client/bottom/keyboard.d.ts +10 -0
- package/lib/types/client/bottom/locales.d.ts +17 -0
- package/lib/types/client/bottom/page.d.ts +10 -0
- package/lib/types/client/bottom/resize.d.ts +12 -0
- package/lib/types/client/bridge/controller.d.ts +10 -0
- package/lib/types/client/bridge/dispatcher.d.ts +26 -0
- package/lib/types/client/bridge/lifecycle.d.ts +22 -0
- package/lib/types/client/bridge/locales.d.ts +3 -0
- package/lib/types/client/bridge/publisher.d.ts +42 -0
- package/lib/types/client/bridge/rpc.d.ts +13 -0
- package/lib/types/client/bridge/transport.d.ts +41 -0
- package/lib/types/client/cdp/console.d.ts +45 -0
- package/lib/types/client/cdp/debugger.d.ts +8 -0
- package/lib/types/client/cdp/errors.d.ts +8 -0
- package/lib/types/client/cdp/heap-profiler.d.ts +8 -0
- package/lib/types/client/cdp/index.d.ts +10 -0
- package/lib/types/client/cdp/objects.d.ts +69 -0
- package/lib/types/client/cdp/profiler.d.ts +8 -0
- package/lib/types/client/cdp/properties.d.ts +16 -0
- package/lib/types/client/cdp/runtime.d.ts +79 -0
- package/lib/types/client/cdp/sources.d.ts +53 -0
- package/lib/types/client/cdp/stack.d.ts +27 -0
- package/lib/types/client/index.d.ts +3 -0
- package/lib/types/client/inspection/cordis.d.ts +3 -0
- package/lib/types/client/inspection/network.d.ts +4 -0
- package/lib/types/client/inspection/realm.d.ts +27 -0
- package/lib/types/client/plugin.d.ts +29 -0
- package/lib/types/host/bridge/controller.d.ts +108 -0
- package/lib/types/host/bridge/dispatcher.d.ts +16 -0
- package/lib/types/host/bridge/lifecycle.d.ts +42 -0
- package/lib/types/host/bridge/publisher.d.ts +31 -0
- package/lib/types/host/bridge/rpc.d.ts +15 -0
- package/lib/types/host/bridge/transport.d.ts +28 -0
- package/lib/types/host/cdp/console.d.ts +14 -0
- package/lib/types/host/cdp/debugger.d.ts +8 -0
- package/lib/types/host/cdp/errors.d.ts +6 -0
- package/lib/types/host/cdp/heap-profiler.d.ts +8 -0
- package/lib/types/host/cdp/index.d.ts +10 -0
- package/lib/types/host/cdp/objects.d.ts +8 -0
- package/lib/types/host/cdp/profiler.d.ts +8 -0
- package/lib/types/host/cdp/properties.d.ts +7 -0
- package/lib/types/host/cdp/runtime.d.ts +16 -0
- package/lib/types/host/cdp/sources.d.ts +14 -0
- package/lib/types/host/cdp/stack.d.ts +4 -0
- package/lib/types/host/index.d.ts +3 -0
- package/lib/types/host/inspection/cordis.d.ts +3 -0
- package/lib/types/host/inspection/network.d.ts +23 -0
- package/lib/types/host/inspection/realm.d.ts +9 -0
- package/lib/types/host/plugin.d.ts +19 -0
- package/lib/types/index.d.ts +50 -0
- package/lib/types/shared/bridge/buffer.d.ts +62 -0
- package/lib/types/shared/bridge/codec.d.ts +4 -0
- package/lib/types/shared/bridge/control-codec.d.ts +27 -0
- package/lib/types/shared/bridge/ids.d.ts +19 -0
- package/lib/types/shared/bridge/messages/control.d.ts +64 -0
- package/lib/types/shared/bridge/messages/cordis.d.ts +4 -0
- package/lib/types/shared/bridge/messages/network.d.ts +4 -0
- package/lib/types/shared/bridge/messages/observation.d.ts +110 -0
- package/lib/types/shared/bridge/messages/query/codec.d.ts +40 -0
- package/lib/types/shared/bridge/messages/query/commands.d.ts +35 -0
- package/lib/types/shared/bridge/messages/query/frames.d.ts +31 -0
- package/lib/types/shared/bridge/messages/query/index.d.ts +5 -0
- package/lib/types/shared/bridge/messages/runtime/command-codec.d.ts +9 -0
- package/lib/types/shared/bridge/messages/runtime/commands.d.ts +76 -0
- package/lib/types/shared/bridge/messages/runtime/console-frames.d.ts +52 -0
- package/lib/types/shared/bridge/messages/runtime/frames.d.ts +98 -0
- package/lib/types/shared/bridge/messages/runtime/index.d.ts +5 -0
- package/lib/types/shared/bridge/messages/runtime/value-codec.d.ts +28 -0
- package/lib/types/shared/bridge/messages/sources/codec.d.ts +15 -0
- package/lib/types/shared/bridge/messages/sources/commands.d.ts +42 -0
- package/lib/types/shared/bridge/messages/sources/frames.d.ts +67 -0
- package/lib/types/shared/bridge/messages/sources/index.d.ts +5 -0
- package/lib/types/shared/bridge/publisher.d.ts +33 -0
- package/lib/types/shared/bridge/query-reader.d.ts +10 -0
- package/lib/types/shared/bridge/rpc.d.ts +62 -0
- package/lib/types/shared/bridge/validation.d.ts +3 -0
- package/lib/types/shared/bridge/version.d.ts +3 -0
- package/lib/types/shared/cdp/capabilities.d.ts +17 -0
- package/lib/types/shared/cdp/console.d.ts +28 -0
- package/lib/types/shared/cdp/debugger.d.ts +69 -0
- package/lib/types/shared/cdp/errors.d.ts +27 -0
- package/lib/types/shared/cdp/ids.d.ts +9 -0
- package/lib/types/shared/cdp/index.d.ts +11 -0
- package/lib/types/shared/cdp/operations.d.ts +86 -0
- package/lib/types/shared/cdp/property.d.ts +28 -0
- package/lib/types/shared/cdp/realm.d.ts +137 -0
- package/lib/types/shared/cdp/remote-object.d.ts +44 -0
- package/lib/types/shared/cdp/sources.d.ts +18 -0
- package/lib/types/shared/cordis/collector.d.ts +26 -0
- package/lib/types/shared/cordis/ids.d.ts +7 -0
- package/lib/types/shared/cordis/model.d.ts +61 -0
- package/lib/types/shared/cordis/object-reference.d.ts +14 -0
- package/lib/types/shared/cordis/object-registry.d.ts +80 -0
- package/lib/types/shared/cordis/observer.d.ts +15 -0
- package/lib/types/shared/cordis/projector.d.ts +34 -0
- package/lib/types/shared/cordis/publisher.d.ts +13 -0
- package/lib/types/shared/cordis/reader.d.ts +18 -0
- package/lib/types/shared/cordis/snapshot.d.ts +39 -0
- package/lib/types/shared/dispose.d.ts +11 -0
- package/lib/types/shared/identity.d.ts +12 -0
- package/lib/types/shared/index.d.ts +18 -0
- package/lib/types/shared/json.d.ts +35 -0
- package/lib/types/shared/network/event-source.d.ts +20 -0
- package/lib/types/shared/network/observation.d.ts +52 -0
- package/lib/types/shared/service.d.ts +23 -0
- package/lib/types/shared/validation.d.ts +52 -0
- package/lib/types/shared/web.d.ts +16 -0
- package/lib/types/worker/bridge/endpoint.d.ts +49 -0
- package/lib/types/worker/bridge/hub.d.ts +108 -0
- package/lib/types/worker/bridge/runtime-rpc.d.ts +90 -0
- package/lib/types/worker/bridge/session.d.ts +15 -0
- package/lib/types/worker/bridge/source-rpc.d.ts +42 -0
- package/lib/types/worker/cdp/domains/debugger/cdp-params.d.ts +15 -0
- package/lib/types/worker/cdp/domains/debugger/index.d.ts +6 -0
- package/lib/types/worker/cdp/domains/debugger/projector.d.ts +22 -0
- package/lib/types/worker/cdp/domains/debugger/script-registry.d.ts +70 -0
- package/lib/types/worker/cdp/domains/debugger/session.d.ts +47 -0
- package/lib/types/worker/cdp/domains/dom/index.d.ts +4 -0
- package/lib/types/worker/cdp/domains/dom/model.d.ts +121 -0
- package/lib/types/worker/cdp/domains/dom/session.d.ts +78 -0
- package/lib/types/worker/cdp/domains/native.d.ts +25 -0
- package/lib/types/worker/cdp/domains/network/session.d.ts +46 -0
- package/lib/types/worker/cdp/domains/runtime/cdp-params.d.ts +82 -0
- package/lib/types/worker/cdp/domains/runtime/index.d.ts +3 -0
- package/lib/types/worker/cdp/domains/runtime/object-table.d.ts +117 -0
- package/lib/types/worker/cdp/domains/runtime/session.d.ts +97 -0
- package/lib/types/worker/cdp/ids.d.ts +37 -0
- package/lib/types/worker/cdp/protocol.d.ts +46 -0
- package/lib/types/worker/cdp/realm-sessions.d.ts +67 -0
- package/lib/types/worker/cdp/session.d.ts +39 -0
- package/lib/types/worker/cdp/target.d.ts +17 -0
- package/lib/types/worker/entry.d.ts +3 -0
- package/lib/types/worker/inspection/cordis-query.d.ts +11 -0
- package/lib/types/worker/inspection/cordis-store.d.ts +94 -0
- package/lib/types/worker/inspection/network-store.d.ts +110 -0
- package/lib/types/worker/inspection/query-router.d.ts +78 -0
- package/lib/types/worker/inspection/realm-store.d.ts +58 -0
- package/lib/types/worker/inspection/realm.d.ts +43 -0
- package/lib/types/worker/realms/client/bridge.d.ts +18 -0
- package/lib/types/worker/realms/client/console.d.ts +21 -0
- package/lib/types/worker/realms/client/debugger.d.ts +8 -0
- package/lib/types/worker/realms/client/index.d.ts +18 -0
- package/lib/types/worker/realms/client/runtime.d.ts +28 -0
- package/lib/types/worker/realms/client/scripts.d.ts +15 -0
- package/lib/types/worker/realms/client/sources.d.ts +30 -0
- package/lib/types/worker/realms/client/values.d.ts +55 -0
- package/lib/types/worker/realms/host/bridge.d.ts +49 -0
- package/lib/types/worker/realms/host/console.d.ts +25 -0
- package/lib/types/worker/realms/host/debugger.d.ts +25 -0
- package/lib/types/worker/realms/host/index.d.ts +13 -0
- package/lib/types/worker/realms/host/runtime.d.ts +54 -0
- package/lib/types/worker/realms/host/scripts.d.ts +9 -0
- package/lib/types/worker/realms/host/sources.d.ts +26 -0
- package/lib/types/worker/realms/host/values.d.ts +22 -0
- package/lib/types/worker/server.d.ts +16 -0
- package/lib/worker.js +7289 -0
- package/locale/en.json +6 -0
- package/locale/zh.json +6 -0
- package/package.json +90 -3
|
@@ -0,0 +1,3855 @@
|
|
|
1
|
+
import { n as e } from "./chunk-DF993M8W.js";
|
|
2
|
+
import { E as t, F as n, G as r, N as i, Ot as a, W as o, Z as s, _t as c, lt as l, xt as u } from "./platform-BzB373NB.js";
|
|
3
|
+
import { $ as d, At as f, F as p, L as ee, Ot as te, St as ne, Z as re, at as ie, bt as ae, d as m, et as oe, jt as se, n as ce, nt as le, p as ue, t as de, tt as h, u as fe, wt as g } from "./common-qd_KLeYO.js";
|
|
4
|
+
import { o as _, p as pe, r as me } from "./root-DbVQo07X.js";
|
|
5
|
+
import { $i as he, $n as ge, $s as v, Bl as _e, Cl as y, Cn as ve, Dt as b, En as ye, Fd as be, Fn as xe, Fo as Se, Gf as Ce, Hf as we, Hi as Te, Ja as Ee, Jr as De, Ki as Oe, La as ke, Md as x, Mo as Ae, No as je, Ol as Me, Or as Ne, Pn as Pe, Po as Fe, Qs as S, S as Ie, Sl as Le, Sn as Re, Ta as ze, Tt as Be, U as Ve, Ur as C, Va as He, Vc as Ue, Vl as We, Wc as Ge, Wf as Ke, Wi as qe, Wo as Je, Xf as Ye, Xl as Xe, Xn as Ze, Xr as Qe, Xt as $e, Yl as et, Yn as tt, Yr as nt, Z as rt, Zi as it, Zl as at, Zo as ot, Zs as st, _ as ct, _f as lt, _l as ut, ac as w, af as T, ar as dt, br as ft, d as pt, ec as mt, ef as E, ei as ht, ep as gt, er as _t, f as vt, fa as D, fo as yt, g as bt, gd as xt, ha as St, hl as Ct, i as wt, ii as Tt, jo as O, jr as Et, k as Dt, kr as Ot, lr as kt, lt as At, mf as k, mo as jt, na as Mt, ni as A, p as Nt, pf as j, pl as Pt, po as Ft, qa as It, r as Lt, sp as Rt, tl as zt, tr as Bt, u as Vt, ui as Ht, ul as M, uo as Ut, ur as Wt, vr as Gt, wl as N, wt as Kt, xn as P, yr as qt } from "./legacy-Bqn4Q0Tf.js";
|
|
6
|
+
import { Ot as Jt, Pn as Yt, T as Xt, Y as Zt, a as Qt, bt as $t, d as en, i as tn, jt as nn, sn as rn, st as F, wn as an } from "./codemirror-CBR9VJma.js";
|
|
7
|
+
import { c as on, g as sn, l as cn, y as ln } from "./text_utils-ohNt_gua.js";
|
|
8
|
+
import { B as un, F as dn, R as fn, c as pn, o as mn, s as hn, w as gn, z as _n } from "./bindings-DgoVEdsr.js";
|
|
9
|
+
import { $t as vn, C as I, Dn as yn, En as bn, Gt as xn, Ht as Sn, In as Cn, K as wn, Nt as Tn, Sn as En, Tn as Dn, b as On, it as kn, ot as An, q as jn, st as Mn, t as Nn, v as Pn, z as Fn } from "./common-DjRFwulW.js";
|
|
10
|
+
import { a as In, b as Ln, h as Rn, r as zn, s as Bn, v as Vn } from "./object_ui-BYgPTK_b.js";
|
|
11
|
+
import { C as Hn, E as Un, O as Wn, S as Gn, T as Kn, _ as qn, a as Jn, c as Yn, g as Xn, h as Zn, l as Qn, m as $n, n as er, o as tr, p as nr, r as rr, t as ir, v as ar, x as or } from "./text_editor-Dq1P6D2J.js";
|
|
12
|
+
import { a as sr, n as cr } from "./code_highlighter-BnTPt9_G.js";
|
|
13
|
+
import { t as lr } from "./objectValue.css-C9o9fdM2.js";
|
|
14
|
+
import { d as ur, i as dr, o as fr } from "./issues_manager-D7nfNPN1.js";
|
|
15
|
+
import { i as pr, n as mr, r as hr, t as gr } from "./issue_counter-CeOjTNGW.js";
|
|
16
|
+
import { t as _r } from "./request_link_icon-fGy57GcW.js";
|
|
17
|
+
import { r as vr } from "./data_grid-pC5qqfsJ.js";
|
|
18
|
+
import { n as L } from "./settings_ui-CzxAFzIb.js";
|
|
19
|
+
//#region \0qilin-devtools:css:/home/runner/work/QiLin/QiLin/node_modules/.pnpm/chrome-devtools-frontend@1.0.1638082/node_modules/chrome-devtools-frontend/front_end/panels/console/consoleContextSelector.css.mjs
|
|
20
|
+
var yr = "/*\n * Copyright 2017 The Chromium Authors\n * Use of this source code is governed by a BSD-style license that can be\n * found in the LICENSE file.\n */\n\n.widget {\n .console-context-selector-element{\n padding: 2px 1px 2px 2px;\n white-space: nowrap;\n display: flex;\n flex-direction: column;\n height: 36px;\n justify-content: center;\n overflow-y: auto;\n\n .title {\n overflow: hidden;\n text-overflow: ellipsis;\n flex-grow: 0;\n }\n\n .subtitle {\n color: var(--sys-color-token-subtle);\n margin-right: 3px;\n overflow: hidden;\n text-overflow: ellipsis;\n flex-grow: 0;\n }\n\n .badge {\n pointer-events: none;\n margin-right: 4px;\n display: inline-block;\n height: 15px;\n }\n }\n\n &.highlighted .console-context-selector-element .subtitle {\n color: inherit;\n }\n}\n", br = /* @__PURE__ */ e({
|
|
21
|
+
ConsoleContextSelector: () => Dr,
|
|
22
|
+
ConsoleContextSelectorElement: () => kr
|
|
23
|
+
}), { render: xr, nothing: Sr, html: Cr } = je, wr = {
|
|
24
|
+
javascriptContextNotSelected: "JavaScript context: Not selected",
|
|
25
|
+
extension: "Extension",
|
|
26
|
+
javascriptContextS: "JavaScript context: {PH1}"
|
|
27
|
+
}, Tr = g("panels/console/ConsoleContextSelector.ts", wr), Er = ae.bind(void 0, Tr), Dr = class {
|
|
28
|
+
items;
|
|
29
|
+
dropDown;
|
|
30
|
+
#e;
|
|
31
|
+
constructor() {
|
|
32
|
+
this.items = new qt(), this.dropDown = new bt(this.items, this, "javascript-context"), this.dropDown.setRowHeight(36), this.#e = new Bt(this.dropDown.element), this.#e.setEnabled(!1), this.#e.setTitle(Er(wr.javascriptContextNotSelected)), this.items.addEventListener(Gt.ITEMS_REPLACED, () => this.#e.setEnabled(!!this.items.length)), this.#e.element.classList.add("toolbar-has-dropdown"), x.instance().addModelListener(N, Le.ExecutionContextCreated, this.onExecutionContextCreated, this, { scoped: !0 }), x.instance().addModelListener(N, Le.ExecutionContextChanged, this.onExecutionContextChanged, this, { scoped: !0 }), x.instance().addModelListener(N, Le.ExecutionContextDestroyed, this.onExecutionContextDestroyed, this, { scoped: !0 }), x.instance().addModelListener(Ge, Ue.FrameNavigated, this.frameNavigated, this, { scoped: !0 }), D.instance().addFlavorChangeListener(y, this.executionContextChangedExternally, this), D.instance().addFlavorChangeListener(dn, this.callFrameSelectedInUI, this), x.instance().observeModels(N, this, { scoped: !0 }), x.instance().addModelListener(Pt, Ct.CallFrameSelected, this.callFrameSelectedInModel, this);
|
|
33
|
+
}
|
|
34
|
+
toolbarItem() {
|
|
35
|
+
return this.#e;
|
|
36
|
+
}
|
|
37
|
+
highlightedItemChanged(e, t, n, r) {
|
|
38
|
+
if (M.hideDOMNodeHighlight(), t?.frameId) {
|
|
39
|
+
let e = Me.instance().getFrame(t.frameId);
|
|
40
|
+
e && !e.isOutermostFrame() && e.highlight();
|
|
41
|
+
}
|
|
42
|
+
n && n.classList.remove("highlighted"), r && r.classList.add("highlighted");
|
|
43
|
+
}
|
|
44
|
+
titleFor(e) {
|
|
45
|
+
let t = e.target(), n = e.label(), r = n ? t.decorateLabel(n) : "";
|
|
46
|
+
if (e.frameId) {
|
|
47
|
+
let n = t.model(Ge)?.frameForId(e.frameId);
|
|
48
|
+
n && (r ||= n.displayName());
|
|
49
|
+
}
|
|
50
|
+
return r ||= e.origin, r;
|
|
51
|
+
}
|
|
52
|
+
depthFor(e) {
|
|
53
|
+
let t = e.target(), n = 0;
|
|
54
|
+
if (e.isDefault || n++, e.frameId) {
|
|
55
|
+
let r = Me.instance().getFrame(e.frameId);
|
|
56
|
+
for (; r;) r = r.parentFrame(), r && (n++, t = r.resourceTreeModel().target());
|
|
57
|
+
}
|
|
58
|
+
let r = 0, i = t.parentTarget();
|
|
59
|
+
for (; i && t.type() !== be.ServiceWorker;) r++, t = i, i = t.parentTarget();
|
|
60
|
+
return n += r, n;
|
|
61
|
+
}
|
|
62
|
+
executionContextCreated(e) {
|
|
63
|
+
this.items.insertWithComparator(e, e.runtimeModel.executionContextComparator()), e === D.instance().flavor(y) && this.dropDown.selectItem(e);
|
|
64
|
+
}
|
|
65
|
+
onExecutionContextCreated(e) {
|
|
66
|
+
let t = e.data;
|
|
67
|
+
this.executionContextCreated(t);
|
|
68
|
+
}
|
|
69
|
+
onExecutionContextChanged(e) {
|
|
70
|
+
let t = e.data;
|
|
71
|
+
this.items.indexOf(t) !== -1 && (this.executionContextDestroyed(t), this.executionContextCreated(t));
|
|
72
|
+
}
|
|
73
|
+
executionContextDestroyed(e) {
|
|
74
|
+
let t = this.items.indexOf(e);
|
|
75
|
+
t !== -1 && this.items.remove(t);
|
|
76
|
+
}
|
|
77
|
+
onExecutionContextDestroyed(e) {
|
|
78
|
+
let t = e.data;
|
|
79
|
+
this.executionContextDestroyed(t);
|
|
80
|
+
}
|
|
81
|
+
executionContextChangedExternally({ data: e }) {
|
|
82
|
+
e && !x.instance().isInScope(e.target()) || this.dropDown.selectItem(e);
|
|
83
|
+
}
|
|
84
|
+
isTopContext(e) {
|
|
85
|
+
if (!e?.isDefault) return !1;
|
|
86
|
+
let t = e.target().model(Ge), n = e.frameId && t?.frameForId(e.frameId);
|
|
87
|
+
return n ? n.isOutermostFrame() : !1;
|
|
88
|
+
}
|
|
89
|
+
hasTopContext() {
|
|
90
|
+
return this.items.some((e) => this.isTopContext(e));
|
|
91
|
+
}
|
|
92
|
+
modelAdded(e) {
|
|
93
|
+
e.executionContexts().forEach(this.executionContextCreated, this);
|
|
94
|
+
}
|
|
95
|
+
modelRemoved(e) {
|
|
96
|
+
for (let t = this.items.length - 1; t >= 0; t--) this.items.at(t).runtimeModel === e && this.executionContextDestroyed(this.items.at(t));
|
|
97
|
+
}
|
|
98
|
+
createElementForItem(e) {
|
|
99
|
+
let t = new kr();
|
|
100
|
+
return t.title = this.titleFor(e), t.subtitle = this.subtitleFor(e), t.itemDepth = this.depthFor(e), t.markAsRoot(), t.contentElement;
|
|
101
|
+
}
|
|
102
|
+
subtitleFor(e) {
|
|
103
|
+
let t = e.target(), n = null;
|
|
104
|
+
if (e.frameId && (n = t.model(Ge)?.frameForId(e.frameId) ?? null), ee(e.origin, "chrome-extension:")) return Er(wr.extension);
|
|
105
|
+
let r = n?.sameTargetParentFrame();
|
|
106
|
+
if (!n || !r || r.securityOrigin !== e.origin) {
|
|
107
|
+
let t = p.fromString(e.origin);
|
|
108
|
+
if (t) return t.domain();
|
|
109
|
+
}
|
|
110
|
+
if (n?.securityOrigin) {
|
|
111
|
+
let e = new p(n.securityOrigin).domain();
|
|
112
|
+
if (e) return e;
|
|
113
|
+
}
|
|
114
|
+
return "IFrame";
|
|
115
|
+
}
|
|
116
|
+
isItemSelectable(e) {
|
|
117
|
+
let t = e.debuggerModel.selectedCallFrame()?.script.executionContext();
|
|
118
|
+
return !t || e === t;
|
|
119
|
+
}
|
|
120
|
+
itemSelected(e) {
|
|
121
|
+
this.#e.element.classList.toggle("highlight", !this.isTopContext(e) && this.hasTopContext());
|
|
122
|
+
let t = e ? Er(wr.javascriptContextS, { PH1: this.titleFor(e) }) : Er(wr.javascriptContextNotSelected);
|
|
123
|
+
this.#e.setTitle(t), D.instance().setFlavor(y, e);
|
|
124
|
+
}
|
|
125
|
+
callFrameSelectedInUI() {
|
|
126
|
+
let e = D.instance().flavor(dn)?.sdkFrame.script.executionContext();
|
|
127
|
+
e && D.instance().setFlavor(y, e);
|
|
128
|
+
}
|
|
129
|
+
callFrameSelectedInModel(e) {
|
|
130
|
+
let t = e.data;
|
|
131
|
+
for (let e of this.items) e.debuggerModel === t && this.dropDown.refreshItem(e);
|
|
132
|
+
}
|
|
133
|
+
frameNavigated(e) {
|
|
134
|
+
let t = e.data, n = t.resourceTreeModel().target().model(N);
|
|
135
|
+
if (n) for (let e of n.executionContexts()) t.id === e.frameId && this.dropDown.refreshItem(e);
|
|
136
|
+
}
|
|
137
|
+
}, Or = (e, t, n) => {
|
|
138
|
+
if (!e.title) {
|
|
139
|
+
xr(Sr, n);
|
|
140
|
+
return;
|
|
141
|
+
}
|
|
142
|
+
xr(Cr`
|
|
143
|
+
<style>${yr}</style>
|
|
144
|
+
<div class="console-context-selector-element" style="padding-left: ${e.itemDepth ? 8 + e.itemDepth * 15 + "px" : void 0};">
|
|
145
|
+
<div class="title">${o(e.title, 100)}</div>
|
|
146
|
+
<div class="subtitle">${e.subtitle}</div>
|
|
147
|
+
</div>
|
|
148
|
+
`, n);
|
|
149
|
+
}, kr = class extends A {
|
|
150
|
+
#e;
|
|
151
|
+
#t;
|
|
152
|
+
#n;
|
|
153
|
+
#r;
|
|
154
|
+
constructor(e, t) {
|
|
155
|
+
super(e, { useShadowDom: !0 }), this.#e = t ?? Or, this.requestUpdate();
|
|
156
|
+
}
|
|
157
|
+
set title(e) {
|
|
158
|
+
this.#t = e, this.requestUpdate();
|
|
159
|
+
}
|
|
160
|
+
set subtitle(e) {
|
|
161
|
+
this.#n = e, this.requestUpdate();
|
|
162
|
+
}
|
|
163
|
+
set itemDepth(e) {
|
|
164
|
+
this.#r = e, this.requestUpdate();
|
|
165
|
+
}
|
|
166
|
+
async performUpdate() {
|
|
167
|
+
let e = {
|
|
168
|
+
title: this.#t,
|
|
169
|
+
subtitle: this.#n,
|
|
170
|
+
itemDepth: this.#r
|
|
171
|
+
};
|
|
172
|
+
this.#e(e, void 0, this.contentElement);
|
|
173
|
+
}
|
|
174
|
+
}, Ar = /* @__PURE__ */ e({
|
|
175
|
+
ConsoleFilter: () => R,
|
|
176
|
+
FilterType: () => z
|
|
177
|
+
}), R = class e {
|
|
178
|
+
name;
|
|
179
|
+
parsedFilters;
|
|
180
|
+
executionContext;
|
|
181
|
+
levelsMask;
|
|
182
|
+
constructor(t, n, r, i) {
|
|
183
|
+
this.name = t, this.parsedFilters = n, this.executionContext = r, this.levelsMask = i || e.defaultLevelsFilterValue();
|
|
184
|
+
}
|
|
185
|
+
static allLevelsFilterValue() {
|
|
186
|
+
let e = {}, t = {
|
|
187
|
+
Verbose: E.LogEntryLevel.Verbose,
|
|
188
|
+
Info: E.LogEntryLevel.Info,
|
|
189
|
+
Warning: E.LogEntryLevel.Warning,
|
|
190
|
+
Error: E.LogEntryLevel.Error
|
|
191
|
+
};
|
|
192
|
+
for (let n of Object.values(t)) e[n] = !0;
|
|
193
|
+
return e;
|
|
194
|
+
}
|
|
195
|
+
static defaultLevelsFilterValue() {
|
|
196
|
+
let t = e.allLevelsFilterValue();
|
|
197
|
+
return t[E.LogEntryLevel.Verbose] = !1, t;
|
|
198
|
+
}
|
|
199
|
+
static singleLevelMask(e) {
|
|
200
|
+
let t = {};
|
|
201
|
+
return t[e] = !0, t;
|
|
202
|
+
}
|
|
203
|
+
clone() {
|
|
204
|
+
let t = this.parsedFilters.map(on.cloneFilter), n = Object.assign({}, this.levelsMask);
|
|
205
|
+
return new e(this.name, t, this.executionContext, n);
|
|
206
|
+
}
|
|
207
|
+
shouldBeVisible(e) {
|
|
208
|
+
let t = e.consoleMessage();
|
|
209
|
+
return this.executionContext && (this.executionContext.runtimeModel !== t.runtimeModel() || this.executionContext.id !== t.getExecutionContextId()) ? !1 : t.type === w.Command || t.type === w.Result || t.type === T.ConsoleAPICalledEventType.EndGroup ? !0 : t.level && !this.levelsMask[t.level] ? !1 : this.applyFilter(e) || this.parentGroupHasMatch(e.consoleGroup());
|
|
210
|
+
}
|
|
211
|
+
parentGroupHasMatch(e) {
|
|
212
|
+
return e === null ? !1 : this.applyFilter(e) || this.parentGroupHasMatch(e.consoleGroup());
|
|
213
|
+
}
|
|
214
|
+
applyFilter(e) {
|
|
215
|
+
let t = e.consoleMessage();
|
|
216
|
+
for (let r of this.parsedFilters) if (r.key) switch (r.key) {
|
|
217
|
+
case "context":
|
|
218
|
+
if (!n(r, t.context, !1)) return !1;
|
|
219
|
+
break;
|
|
220
|
+
case "source":
|
|
221
|
+
if (!n(r, t.source ? mt.get(t.source) : t.source, !0)) return !1;
|
|
222
|
+
break;
|
|
223
|
+
case "url":
|
|
224
|
+
if (!n(r, t.url, !1)) return !1;
|
|
225
|
+
break;
|
|
226
|
+
}
|
|
227
|
+
else if (r.regex && e.matchesFilterRegex(r.regex) === r.negative || r.text && e.matchesFilterText(r.text) === r.negative) return !1;
|
|
228
|
+
return !0;
|
|
229
|
+
function n(e, t, n) {
|
|
230
|
+
if (!e.text) return !!t === e.negative;
|
|
231
|
+
if (!t) return !e.text == !e.negative;
|
|
232
|
+
let r = e.text.toLowerCase(), i = t.toLowerCase();
|
|
233
|
+
return !(n && i === r === e.negative || !n && i.includes(r) === e.negative);
|
|
234
|
+
}
|
|
235
|
+
}
|
|
236
|
+
}, z = /* @__PURE__ */ function(e) {
|
|
237
|
+
return e.Context = "context", e.Source = "source", e.Url = "url", e;
|
|
238
|
+
}({}), jr = /* @__PURE__ */ e({
|
|
239
|
+
format: () => Pr,
|
|
240
|
+
updateStyle: () => Ir
|
|
241
|
+
}), Mr = [
|
|
242
|
+
"black",
|
|
243
|
+
"red",
|
|
244
|
+
"green",
|
|
245
|
+
"yellow",
|
|
246
|
+
"blue",
|
|
247
|
+
"magenta",
|
|
248
|
+
"cyan",
|
|
249
|
+
"gray"
|
|
250
|
+
], Nr = [
|
|
251
|
+
"darkgray",
|
|
252
|
+
"lightred",
|
|
253
|
+
"lightgreen",
|
|
254
|
+
"lightyellow",
|
|
255
|
+
"lightblue",
|
|
256
|
+
"lightmagenta",
|
|
257
|
+
"lightcyan",
|
|
258
|
+
"white"
|
|
259
|
+
], Pr = (e, t) => {
|
|
260
|
+
let n = [], r = /* @__PURE__ */ new Map();
|
|
261
|
+
function i(e) {
|
|
262
|
+
let t = r.get("text-decoration") ?? "";
|
|
263
|
+
t.includes(e) || r.set("text-decoration", `${t} ${e}`);
|
|
264
|
+
}
|
|
265
|
+
function a(e) {
|
|
266
|
+
let t = r.get("text-decoration")?.replace(` ${e}`, "");
|
|
267
|
+
t ? r.set("text-decoration", t) : r.delete("text-decoration");
|
|
268
|
+
}
|
|
269
|
+
function o(e) {
|
|
270
|
+
if (e) {
|
|
271
|
+
if (n.length && n[n.length - 1].type === "string") {
|
|
272
|
+
n[n.length - 1].value += e;
|
|
273
|
+
return;
|
|
274
|
+
}
|
|
275
|
+
n.push({
|
|
276
|
+
type: "string",
|
|
277
|
+
value: e
|
|
278
|
+
});
|
|
279
|
+
}
|
|
280
|
+
}
|
|
281
|
+
let s = 0, c = /%([%_Oocsdfi])|\x1B\[([\d;]*)m/;
|
|
282
|
+
for (let l = c.exec(e); l !== null; l = c.exec(e)) {
|
|
283
|
+
o(l.input.substring(0, l.index));
|
|
284
|
+
let c, u = l[1];
|
|
285
|
+
switch (u) {
|
|
286
|
+
case "%":
|
|
287
|
+
o("%"), c = "";
|
|
288
|
+
break;
|
|
289
|
+
case "s":
|
|
290
|
+
if (s < t.length) {
|
|
291
|
+
let { description: e } = t[s++];
|
|
292
|
+
c = e ?? "";
|
|
293
|
+
}
|
|
294
|
+
break;
|
|
295
|
+
case "c":
|
|
296
|
+
if (s < t.length) {
|
|
297
|
+
let e = t[s++].description ?? "";
|
|
298
|
+
n.push({
|
|
299
|
+
type: "style",
|
|
300
|
+
value: e
|
|
301
|
+
}), c = "";
|
|
302
|
+
}
|
|
303
|
+
break;
|
|
304
|
+
case "o":
|
|
305
|
+
case "O":
|
|
306
|
+
if (s < t.length) {
|
|
307
|
+
let e = u === "O" ? "generic" : "optimal", r = t[s++];
|
|
308
|
+
n.push({
|
|
309
|
+
type: e,
|
|
310
|
+
value: r
|
|
311
|
+
}), c = "";
|
|
312
|
+
}
|
|
313
|
+
break;
|
|
314
|
+
case "_":
|
|
315
|
+
s < t.length && (s++, c = "");
|
|
316
|
+
break;
|
|
317
|
+
case "d":
|
|
318
|
+
case "f":
|
|
319
|
+
case "i":
|
|
320
|
+
if (s < t.length) {
|
|
321
|
+
let { value: e } = t[s++];
|
|
322
|
+
c = typeof e == "number" ? e : NaN, u !== "f" && (c = Math.floor(c));
|
|
323
|
+
}
|
|
324
|
+
break;
|
|
325
|
+
case void 0: {
|
|
326
|
+
let e = (l[2] || "0").split(";").map((e) => e ? parseInt(e, 10) : 0);
|
|
327
|
+
for (; e.length;) {
|
|
328
|
+
let t = e.shift();
|
|
329
|
+
switch (t) {
|
|
330
|
+
case 0:
|
|
331
|
+
r.clear();
|
|
332
|
+
break;
|
|
333
|
+
case 1:
|
|
334
|
+
r.set("font-weight", "bold");
|
|
335
|
+
break;
|
|
336
|
+
case 2:
|
|
337
|
+
r.set("font-weight", "lighter");
|
|
338
|
+
break;
|
|
339
|
+
case 3:
|
|
340
|
+
r.set("font-style", "italic");
|
|
341
|
+
break;
|
|
342
|
+
case 4:
|
|
343
|
+
i("underline");
|
|
344
|
+
break;
|
|
345
|
+
case 9:
|
|
346
|
+
i("line-through");
|
|
347
|
+
break;
|
|
348
|
+
case 22:
|
|
349
|
+
r.delete("font-weight");
|
|
350
|
+
break;
|
|
351
|
+
case 23:
|
|
352
|
+
r.delete("font-style");
|
|
353
|
+
break;
|
|
354
|
+
case 24:
|
|
355
|
+
a("underline");
|
|
356
|
+
break;
|
|
357
|
+
case 29:
|
|
358
|
+
a("line-through");
|
|
359
|
+
break;
|
|
360
|
+
case 38:
|
|
361
|
+
case 48:
|
|
362
|
+
if (e.shift() === 2) {
|
|
363
|
+
let n = e.shift() ?? 0, i = e.shift() ?? 0, a = e.shift() ?? 0;
|
|
364
|
+
r.set(t === 38 ? "color" : "background-color", `rgb(${n},${i},${a})`);
|
|
365
|
+
}
|
|
366
|
+
break;
|
|
367
|
+
case 39:
|
|
368
|
+
case 49:
|
|
369
|
+
r.delete(t === 39 ? "color" : "background-color");
|
|
370
|
+
break;
|
|
371
|
+
case 53:
|
|
372
|
+
i("overline");
|
|
373
|
+
break;
|
|
374
|
+
case 55:
|
|
375
|
+
a("overline");
|
|
376
|
+
break;
|
|
377
|
+
default: {
|
|
378
|
+
let e = Mr[t - 30] ?? Nr[t - 90];
|
|
379
|
+
if (e !== void 0) r.set("color", `var(--console-color-${e})`);
|
|
380
|
+
else {
|
|
381
|
+
let e = Mr[t - 40] ?? Nr[t - 100];
|
|
382
|
+
e !== void 0 && r.set("background-color", `var(--console-color-${e})`);
|
|
383
|
+
}
|
|
384
|
+
break;
|
|
385
|
+
}
|
|
386
|
+
}
|
|
387
|
+
}
|
|
388
|
+
let t = [...r.entries()].map(([e, t]) => `${e}:${t.trimStart()}`).join(";");
|
|
389
|
+
n.push({
|
|
390
|
+
type: "style",
|
|
391
|
+
value: t
|
|
392
|
+
}), c = "";
|
|
393
|
+
break;
|
|
394
|
+
}
|
|
395
|
+
}
|
|
396
|
+
c === void 0 && (o(l[0]), c = ""), e = c + l.input.substring(l.index + l[0].length);
|
|
397
|
+
}
|
|
398
|
+
return o(e), {
|
|
399
|
+
tokens: n,
|
|
400
|
+
args: t.slice(s)
|
|
401
|
+
};
|
|
402
|
+
}, Fr = (e) => [...e].map((e) => `\\\\?(?:${[...new Set([e.toLowerCase(), e.toUpperCase()].map((e) => e.charCodeAt(0).toString(16)))].map((e) => `\\\\0{0,${6 - e.length}}${e}[ \\n\\t]?`).join("|")}|${e})`).join(""), Ir = (e, t) => {
|
|
403
|
+
let n = [
|
|
404
|
+
"background",
|
|
405
|
+
"border",
|
|
406
|
+
"color",
|
|
407
|
+
"font",
|
|
408
|
+
"line",
|
|
409
|
+
"margin",
|
|
410
|
+
"padding",
|
|
411
|
+
"text"
|
|
412
|
+
], r = RegExp(`(?=${Fr("url")}\\(['"]?([^\\)]*))`, "gi"), i = RegExp(`(?=(${Fr("image-set")}\\(.*))`, "gi"), a = /^image-set\((?:(?:(?:url|type)\("[^\\"]*"\)|[\d.]+(?:x|dpi|dpcm|dppx)),?\s*)+\)/i;
|
|
413
|
+
e.clear();
|
|
414
|
+
let o = document.createElement("span");
|
|
415
|
+
o.setAttribute("style", t);
|
|
416
|
+
for (let t of o.style) {
|
|
417
|
+
if (!n.some((e) => t.startsWith(e) || t.startsWith(`-webkit-${e}`))) continue;
|
|
418
|
+
let s = o.style.getPropertyValue(t);
|
|
419
|
+
[...s.matchAll(i)].some((e) => !a.test(e[1])) || [...s.matchAll(r)].map((e) => e[1]).some((e) => !ee(e, "data:")) || e.set(t, {
|
|
420
|
+
value: s,
|
|
421
|
+
priority: o.style.getPropertyPriority(t)
|
|
422
|
+
});
|
|
423
|
+
}
|
|
424
|
+
}, Lr = "/*\n * Copyright 2025 The Chromium Authors\n * Use of this source code is governed by a BSD-style license that can be\n * found in the LICENSE file.\n */\n\n@scope to (devtools-widget > *) {\n .teaser-tooltip-container {\n width: var(--sys-size-31);\n padding: var(--sys-size-1) var(--sys-size-3) var(--sys-size-3);\n margin-top: var(--sys-size-2);\n }\n\n .response-container {\n height: 85px;\n display: flex;\n flex-direction: column;\n }\n\n @keyframes gradient {\n 0% { background-position: 100% 0; }\n 100% { background-position: -100% 0; }\n }\n\n .loader {\n background-size: 400% 100%;\n animation: gradient 4s infinite linear;\n margin-top: var(--sys-size-5);\n }\n\n @media (prefers-color-scheme: light) {\n .loader {\n background-image: linear-gradient(\n 70deg,\n color-mix(in srgb, var(--sys-color-on-surface) 5%, transparent) 0%,\n color-mix(in srgb, var(--sys-color-on-surface) 5%, transparent) 30%,\n color-mix(in srgb, var(--sys-color-on-surface) 15%, transparent) 50%,\n color-mix(in srgb, var(--sys-color-on-surface) 5%, transparent) 70%,\n color-mix(in srgb, var(--sys-color-on-surface) 5%, transparent) 100%\n );\n }\n }\n\n @media (prefers-color-scheme: dark) {\n .loader {\n background-image: linear-gradient(\n 70deg,\n color-mix(in srgb, var(--sys-color-on-surface) 10%, transparent) 0%,\n color-mix(in srgb, var(--sys-color-on-surface) 10%, transparent) 30%,\n color-mix(in srgb, var(--sys-color-on-surface) 30%, transparent) 50%,\n color-mix(in srgb, var(--sys-color-on-surface) 10%, transparent) 70%,\n color-mix(in srgb, var(--sys-color-on-surface) 10%, transparent) 100%\n );\n }\n }\n\n h2 {\n font: var(--sys-typescale-body4-bold);\n margin: 0 0 var(--sys-size-3);\n line-clamp: 1;\n -webkit-line-clamp: 1;\n display: -webkit-box;\n -webkit-box-orient: vertical;\n overflow: hidden;\n }\n\n .main-text {\n line-clamp: 4;\n -webkit-line-clamp: 4;\n display: -webkit-box;\n -webkit-box-orient: vertical;\n overflow: hidden;\n }\n\n .lightbulb-icon {\n color: var(--sys-color-on-primary);\n height: var(--sys-size-7);\n margin-left: calc(-1 * var(--sys-size-4));\n }\n\n .learn-more {\n padding-top: 7px;\n }\n\n .info-tooltip-text {\n max-width: var(--sys-size-26);\n }\n\n .tooltip-footer {\n padding: var(--sys-size-5) 0 0;\n display: flex;\n align-items: center;\n height: 34px;\n\n devtools-checkbox {\n margin-left: auto;\n }\n }\n\n .progress-line {\n display: flex;\n align-items: center;\n flex-grow: 1;\n\n .label {\n margin-right: var(--sys-size-6);\n }\n\n .indicator-container {\n height: var(--sys-size-5);\n background-color: var(--sys-color-surface5);\n flex-grow: 1\n }\n\n .indicator {\n background-color: var(--sys-color-primary);\n height: 100%;\n }\n }\n}\n", Rr = "/* Copyright 2021 The Chromium Authors\n * Use of this source code is governed by a BSD-style license that can be\n * found in the LICENSE file.\n *\n * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved.\n * Copyright (C) 2009 Anthony Ricaud <rik@webkit.org>\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions\n * are met:\n *\n * 1. Redistributions of source code must retain the above copyright\n * notice, this list of conditions and the following disclaimer.\n * 2. Redistributions in binary form must reproduce the above copyright\n * notice, this list of conditions and the following disclaimer in the\n * documentation and/or other materials provided with the distribution.\n * 3. Neither the name of Apple Computer, Inc. (\"Apple\") nor the names of\n * its contributors may be used to endorse or promote products derived\n * from this software without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS \"AS IS\" AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY\n * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\n * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND\n * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF\n * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n.console-view {\n background-color: var(--sys-color-cdt-base-container);\n overflow: hidden;\n\n --override-error-text-color: var(--sys-color-on-error-container);\n --message-corner-rounder-background: var(--sys-color-cdt-base-container);\n}\n\n.console-toolbar-container {\n display: flex;\n flex: none;\n}\n\n.console-main-toolbar {\n flex: 1 1 auto;\n}\n\n.console-sidebar-levels-info {\n margin-left: var(--sys-size-3);\n width: var(--sys-size-8);\n height: var(--sys-size-8);\n}\n\n#console-issues-counter {\n margin-top: 0;\n}\n\n.console-toolbar-container > devtools-toolbar {\n background-color: var(--sys-color-cdt-base-container);\n border-bottom: 1px solid var(--sys-color-divider);\n}\n\n.console-view-fix-select-all {\n height: 0;\n overflow: hidden;\n}\n\n.console-settings-pane {\n display: grid;\n grid-template-columns: 50% 50%;\n flex: none;\n background-color: var(--sys-color-cdt-base-container);\n border-bottom: 1px solid var(--sys-color-divider);\n}\n\n#console-messages {\n flex: 1 1;\n overflow-y: auto;\n overflow-wrap: break-word;\n user-select: text;\n transform: translateZ(0);\n overflow-anchor: none; /* Chrome-specific scroll-anchoring opt-out */\n background-color: var(--sys-color-cdt-base-container);\n}\n\n#console-prompt {\n clear: right;\n position: relative;\n margin: 0 22px 0 20px;\n}\n\n.console-prompt-editor-container {\n min-height: 21px;\n padding-left: 2px;\n padding-top: 1px;\n}\n\n.console-message,\n.console-user-command {\n clear: right;\n position: relative;\n padding: 1px 22px 1px 0;\n margin-left: 24px;\n min-height: 18px;\n flex: auto;\n display: flex;\n align-items: flex-end;\n}\n\n.console-message > * {\n flex: auto;\n}\n\n.console-timestamp {\n color: var(--sys-color-token-subtle);\n user-select: none;\n flex: none;\n margin-right: 5px;\n}\n\n.message-level-icon,\n.command-result-icon {\n position: absolute;\n left: -17px;\n top: 2px;\n user-select: none;\n}\n\n.console-message-repeat-count {\n margin: 1.4px 0 0 10px;\n flex: none;\n}\n\n.repeated-message {\n margin-left: 4px;\n}\n\n.repeated-message .message-level-icon {\n display: none;\n}\n\n.console-message-stack-trace-toggle {\n display: flex;\n flex-direction: row;\n align-items: flex-start;\n margin-top: -1px;\n}\n\n.console-error-level .repeated-message,\n.console-warning-level .repeated-message,\n.console-verbose-level .repeated-message,\n.console-info-level .repeated-message {\n display: flex;\n}\n\n.console-info {\n color: var(--sys-color-token-subtle);\n font-style: italic;\n padding-bottom: 2px;\n}\n\n.console-group .console-group > .console-group-messages {\n margin-left: 16px;\n}\n\n.console-group-title.console-from-api {\n font-weight: bold;\n}\n\n.console-group-title .console-message {\n margin-left: 12px;\n}\n\n.expand-group-icon {\n user-select: none;\n flex: none;\n position: relative;\n left: 8px;\n top: 3px;\n margin-right: 2px;\n}\n\n.console-group-title .message-level-icon {\n display: none;\n}\n\n.console-message-repeat-count .expand-group-icon {\n position: static;\n color: var(--sys-color-cdt-base-container);\n margin-left: -1px;\n}\n\n.console-group {\n position: relative;\n}\n\n.console-message-wrapper {\n display: flex;\n flex-direction: column;\n margin: 4px;\n border-radius: 5px;\n\n /* Console ANSI color */\n --console-color-black: #000;\n --console-color-red: #a00;\n --console-color-green: #0a0;\n --console-color-yellow: #a50;\n --console-color-blue: #00a;\n --console-color-magenta: #a0a;\n --console-color-cyan: #0aa;\n --console-color-gray: #aaa;\n --console-color-darkgray: #555;\n --console-color-lightred: #f55;\n --console-color-lightgreen: #5f5;\n --console-color-lightyellow: #ff5;\n --console-color-lightblue: #55f;\n --console-color-ightmagenta: #f5f;\n --console-color-lightcyan: #5ff;\n --console-color-white: #fff;\n\n &:focus {\n background-image: linear-gradient(to bottom, var(--sys-color-state-focus-highlight), var(--sys-color-state-focus-highlight));\n }\n}\n\n.console-row-wrapper {\n display: flex;\n flex-direction: row;\n}\n\n.theme-with-dark-background .console-message-wrapper {\n /* Dark theme console ANSI color */\n --console-color-red: rgb(237 78 76);\n --console-color-green: rgb(1 200 1);\n --console-color-yellow: rgb(210 192 87);\n --console-color-blue: rgb(39 116 240);\n --console-color-magenta: rgb(161 66 244);\n --console-color-cyan: rgb(18 181 203);\n --console-color-gray: rgb(207 208 208);\n --console-color-darkgray: rgb(137 137 137);\n --console-color-lightred: rgb(242 139 130);\n --console-color-lightgreen: rgb(161 247 181);\n --console-color-lightyellow: rgb(221 251 85);\n --console-color-lightblue: rgb(102 157 246);\n --console-color-lightmagenta: rgb(214 112 214);\n --console-color-lightcyan: rgb(132 240 255);\n}\n\n.console-message-wrapper.console-warning-level + .console-message-wrapper,\n.console-message-wrapper.console-error-level + .console-message-wrapper {\n & .console-message::before,\n & .console-user-command::before {\n display: none !important; /* stylelint-disable-line declaration-no-important */\n }\n}\n\n.console-message-wrapper:not(.console-error-level, .console-warning-level) {\n & .console-message::before,\n & .console-user-command::before {\n width: calc(100% - 25px);\n content: \"\";\n display: block;\n position: absolute;\n top: -2px;\n border-top: 1px solid var(--sys-color-divider);\n }\n\n &:first-of-type .console-message::before,\n &:first-of-type .console-user-command::before {\n display: none;\n }\n}\n\n.console-message-wrapper.console-adjacent-user-command-result:not(.console-error-level, .console-warning-level) {\n border-top-width: 0;\n}\n\n.console-message-wrapper:focus + .console-message-wrapper {\n border-top-color: transparent;\n}\n\n.console-message-wrapper.console-adjacent-user-command-result:not(.console-error-level, .console-warning-level):focus {\n border-top-width: 1px;\n}\n\n.console-message-wrapper.console-adjacent-user-command-result:not(.console-error-level, .console-warning-level):focus .console-message {\n padding-top: 2px;\n min-height: 16px;\n}\n\n.console-message-wrapper.console-adjacent-user-command-result:not(.console-error-level, .console-warning-level):focus .command-result-icon {\n top: 3px;\n}\n\n.console-message-wrapper .nesting-level-marker {\n width: 14px;\n flex: 0 0 auto;\n position: relative;\n margin-bottom: -1px;\n margin-top: -1px;\n background-color: var(--sys-color-cdt-base-container);\n}\n\n.console-message-wrapper .nesting-level-marker + .console-message::after {\n position: absolute;\n left: -30px;\n top: 0;\n width: 6px;\n height: 100%;\n box-sizing: border-box;\n background-color: var(--sys-color-surface-yellow);\n border-top-left-radius: 5px;\n border-bottom-left-radius: 5px;\n content: \"\";\n}\n\n.console-error-level {\n background-color: var(--sys-color-surface-error);\n\n --message-corner-rounder-background: var(--sys-color-surface-error);\n}\n\n.console-warning-level {\n background-color: var(--sys-color-surface-yellow);\n\n --message-corner-rounder-background: var(--sys-color-surface-yellow);\n}\n\n.console-view-object-properties-section {\n padding: 0;\n position: relative;\n color: inherit;\n display: inline-block;\n overflow-wrap: break-word;\n max-width: 100%;\n margin-top: -1.5px;\n}\n\n/* Console content is rendered in \"Noto Sans Mono\" on Linux, which has a\n * different actual line-height than the fonts used on Windows or MacOS.\n * \"vertical-align: middle\" breaks the layout when expanding an object such\n * that it spans multiple lines. We therefore align to the top, and use a\n * different \"margin-top\" on Linux to compensate for the line-height difference.\n */\n.platform-linux .console-view-object-properties-section {\n margin-top: 0;\n}\n\n.info-note {\n background-color: var(--sys-color-tonal-container);\n}\n\n.info-note::before {\n content: \"i\";\n}\n\n.console-view-object-properties-section:not(.expanded) .info-note {\n display: none;\n}\n\n.console-system-type.console-info-level {\n color: var(--sys-color-primary);\n}\n\n#console-messages .link {\n cursor: pointer;\n text-decoration: underline;\n}\n\n#console-messages .link,\n#console-messages .devtools-link:not(.invalid-link) {\n color: var(--sys-color-primary);\n word-break: break-all;\n}\n\n#console-messages .devtools-link:focus-visible {\n background-color: transparent;\n}\n\n#console-messages .resource-links {\n margin-top: -1px;\n margin-bottom: -2px;\n}\n\n.console-object-preview {\n white-space: normal;\n overflow-wrap: break-word;\n font-style: italic;\n}\n\n.console-object-preview .name {\n flex-shrink: 0;\n}\n\n.console-message-text {\n .object-value-node {\n display: inline-block;\n }\n\n .object-value-string,\n .object-value-regexp,\n .object-value-symbol {\n white-space: pre-wrap;\n word-break: break-all;\n }\n\n .formatted-stack-frame {\n display: var(--display-formatted-stack-frame-default);\n\n &:has(.ignore-list-link) {\n display: var(--display-ignored-formatted-stack-frame);\n opacity: 60%;\n\n /* Subsequent builtin stack frames are also treated as ignored */\n & + .formatted-builtin-stack-frame {\n display: var(--display-ignored-formatted-stack-frame);\n opacity: 60%;\n }\n }\n }\n}\n\n.console-message-stack-trace-wrapper {\n --override-display-stack-preview-toggle-link: none;\n --display-formatted-stack-frame-default: block;\n\n flex: 1 1 auto;\n display: flex;\n flex-direction: column;\n align-items: stretch;\n\n &:has(div > .stack-preview-container.show-hidden-rows) {\n --display-ignored-formatted-stack-frame: var(--display-formatted-stack-frame-default);\n }\n\n &:has(.formatted-stack-frame .ignore-list-link):has(.formatted-stack-frame .devtools-link:not(.ignore-list-link)),\n &:has(.formatted-stack-frame .ignore-list-link):has(.stack-preview-container.has-non-ignored-links) {\n /* If there are ignored frames and unignored frames, then we want\n to enable the show more/less links. To do that we override some\n variables to always display the structured stack trace, but possibly\n only the links at the bottom of it, as we share its show more/less links.\n We also check the structured stack trace (StackTracePreviewContent) for\n non-ignored links, so that when all inline Error frames are ignored but\n the console.error() call stack has non-ignored frames (e.g. in async\n traces), the toggle is still shown. See crbug.com/379788109. */\n --override-display-stack-preview-toggle-link: table-row;\n --override-display-stack-preview-hidden-div: block;\n\n &:not(:has(div > .stack-preview-container.show-hidden-rows)) {\n --display-ignored-formatted-stack-frame: none;\n }\n }\n\n & > .hidden-stack-trace {\n /* Always hide the body of the structured stack trace if this class\n is set, but we may still show it for the Show more/less links at the bottom. */\n display: var(--override-display-stack-preview-hidden-div, none);\n\n --override-display-stack-preview-tbody: none;\n }\n}\n\n.repeated-message .console-message-stack-trace-toggle,\n.repeated-message > .console-message-text {\n flex: 1;\n}\n\n.console-warning-level .console-message-text {\n color: var(--sys-color-on-surface-yellow);\n}\n\n.console-error-level .console-message-text,\n.console-error-level .console-view-object-properties-section {\n color: var(--override-error-text-color) !important; /* stylelint-disable-line declaration-no-important */\n}\n\n.console-message-formatted-table {\n clear: both;\n}\n\n.console-message .source-code {\n line-height: 1.2;\n}\n\n.console-message-anchor {\n float: right;\n text-align: right;\n max-width: 100%;\n margin-left: 4px;\n}\n\n.console-message-nowrap-below,\n.console-message-nowrap-below div,\n.console-message-nowrap-below span {\n white-space: nowrap !important; /* stylelint-disable-line declaration-no-important */\n}\n\n.object-state-note {\n display: inline-block;\n width: 11px;\n height: 11px;\n color: var(--sys-color-on-tonal-container);\n text-align: center;\n border-radius: 3px;\n line-height: 13px;\n margin: 0 6px;\n font-size: 9px;\n}\n\n.console-object {\n white-space: pre-wrap;\n word-break: break-all;\n}\n\n.console-message-stack-trace-wrapper > * {\n flex: none;\n}\n\n.console-message-expand-icon {\n margin-bottom: -4px;\n}\n\n.console-searchable-view {\n max-height: 100%;\n}\n\n.console-view-pinpane {\n max-height: 50%;\n}\n\n/* We are setting width and height to 0px to essentially hide the html element on the UI but visible to the screen reader.\n This html element is used by screen readers when console messages are filtered, instead of screen readers reading\n contents of the filtered messages we only want the screen readers to read the count of filtered messages. */\n.message-count {\n width: 0;\n height: 0;\n}\n\n.devtools-console-insight {\n margin: 9px 22px 11px 24px;\n}\n\n.hover-button {\n --width: 24px;\n\n align-items: center;\n border-radius: 50%;\n border: none;\n /* todo: extract to global styles and make it work with dark mode. */\n box-shadow: 0 1px 3px 1px rgb(0 0 0 / 15%), 0 1px 2px 0 rgb(0 0 0 / 30%); /* stylelint-disable-line plugin/use_theme_colors */\n box-sizing: border-box;\n background-color: var(--sys-color-tonal-container);\n color: var(--sys-color-on-tonal-container);\n font: var(--sys-typescale-body4-medium);\n height: var(--width);\n justify-content: center;\n margin: 0;\n max-height: var(--width);\n max-width: var(--width);\n min-height: var(--width);\n min-width: var(--width);\n overflow: hidden;\n padding: var(--sys-size-3) var(--sys-size-4);\n position: absolute;\n right: 6px;\n display: none;\n width: var(--width);\n z-index: 1;\n\n .theme-with-dark-background & {\n border: 1px solid var(--sys-color-neutral-outline);\n background-color: var(--sys-color-primary);\n color: var(--sys-color-on-primary);\n }\n\n & devtools-icon {\n box-sizing: border-box;\n flex-shrink: 0;\n height: var(--sys-size-8);\n min-height: var(--sys-size-8);\n min-width: var(--sys-size-8);\n width: var(--sys-size-8);\n\n --devtools-icon-color: var(--sys-color-on-tonal-container);\n }\n\n .theme-with-dark-background & devtools-icon {\n --devtools-icon-color: var(--sys-color-on-primary);\n }\n}\n\n.hover-button:focus,\n.hover-button:hover {\n border-radius: 4px;\n max-width: 200px;\n transition:\n max-width var(--sys-motion-duration-short4) var(--sys-motion-easing-emphasized),\n border-radius 50ms linear;\n width: fit-content;\n gap: var(--sys-size-3);\n}\n\n.hover-button:focus-visible {\n outline: 2px solid var(--sys-color-primary);\n outline-offset: 2px;\n}\n\n.button-label {\n display: block;\n overflow: hidden;\n white-space: nowrap;\n\n & div {\n display: inline-block;\n vertical-align: -1px;\n\n &::after {\n content: attr(data-text);\n }\n }\n}\n\n.console-message-wrapper:not(.has-insight) {\n &:hover,\n &:focus,\n &.console-selected {\n .hover-button {\n display: flex;\n\n &:focus,\n &:hover {\n display: inline-flex;\n }\n }\n }\n}\n\n.ai-code-completion-summary-toolbar-container {\n container-type: inline-size;\n}\n\n@media (forced-colors: active) {\n .console-message-expand-icon,\n .console-warning-level .expand-group-icon {\n forced-color-adjust: none;\n color: ButtonText;\n }\n\n .console-message-wrapper:focus,\n .console-message-wrapper:focus:last-of-type {\n forced-color-adjust: none;\n background-color: Highlight;\n border-top-color: Highlight;\n border-bottom-color: Highlight;\n }\n\n .console-message-wrapper:focus *,\n .console-message-wrapper:focus:last-of-type *,\n .console-message-wrapper:focus .devtools-link,\n .console-message-wrapper:focus:last-of-type .devtools-link {\n color: HighlightText !important; /* stylelint-disable-line declaration-no-important */\n }\n\n #console-messages .devtools-link,\n #console-messages .devtools-link:hover {\n color: linktext;\n }\n\n #console-messages .link:focus-visible,\n #console-messages .devtools-link:focus-visible {\n background: Highlight;\n color: HighlightText;\n }\n\n .console-message-wrapper:focus devtools-icon {\n color: HighlightText;\n }\n\n .console-message-wrapper.console-error-level:focus,\n .console-message-wrapper.console-error-level:focus:last-of-type {\n --override-error-text-color: HighlightText;\n }\n}\n", zr = /* @__PURE__ */ e({
|
|
425
|
+
ConsoleCommand: () => ei,
|
|
426
|
+
ConsoleCommandResult: () => ti,
|
|
427
|
+
ConsoleGroupViewMessage: () => $r,
|
|
428
|
+
ConsoleTableMessageView: () => ni,
|
|
429
|
+
ConsoleViewMessage: () => U,
|
|
430
|
+
getLongStringVisibleLength: () => ci,
|
|
431
|
+
getMaxTokenizableStringLength: () => oi,
|
|
432
|
+
getMessageForElement: () => Hr,
|
|
433
|
+
setLongStringVisibleLength: () => li,
|
|
434
|
+
setMaxTokenizableStringLength: () => si
|
|
435
|
+
}), B = {
|
|
436
|
+
consoleclearWasPreventedDueTo: "`console.clear()` was prevented due to 'Preserve log'",
|
|
437
|
+
consoleWasCleared: "Console was cleared",
|
|
438
|
+
clearAllMessagesWithS: "Clear all messages with {PH1}",
|
|
439
|
+
assertionFailed: "Assertion failed: ",
|
|
440
|
+
violationS: "`[Violation]` {PH1}",
|
|
441
|
+
interventionS: "`[Intervention]` {PH1}",
|
|
442
|
+
deprecationS: "`[Deprecation]` {PH1}",
|
|
443
|
+
thisValueWillNotBeCollectedUntil: "This value will not be collected until console is cleared.",
|
|
444
|
+
thisValueWasEvaluatedUponFirst: "This value was evaluated upon first expanding. It may have changed since then.",
|
|
445
|
+
functionWasResolvedFromBound: "Function was resolved from bound function.",
|
|
446
|
+
exception: "<exception>",
|
|
447
|
+
warning: "Warning",
|
|
448
|
+
error: "Error",
|
|
449
|
+
logpoint: "Logpoint",
|
|
450
|
+
cndBreakpoint: "Conditional Breakpoint",
|
|
451
|
+
repeatS: "{n, plural, =1 {Repeated # time} other {Repeated # times}}",
|
|
452
|
+
warningS: "{n, plural, =1 {Warning, Repeated # time} other {Warning, Repeated # times}}",
|
|
453
|
+
errorS: "{n, plural, =1 {Error, Repeated # time} other {Error, Repeated # times}}",
|
|
454
|
+
url: "<URL>",
|
|
455
|
+
tookNms: "took <N>ms",
|
|
456
|
+
someEvent: "<some> event",
|
|
457
|
+
Mxx: " M<XX>",
|
|
458
|
+
attribute: "<attribute>",
|
|
459
|
+
index: "(index)",
|
|
460
|
+
value: "Value",
|
|
461
|
+
console: "Console",
|
|
462
|
+
stackMessageExpanded: "Stack table expanded",
|
|
463
|
+
stackMessageCollapsed: "Stack table collapsed",
|
|
464
|
+
explainThisError: "Understand this error",
|
|
465
|
+
explainThisWarning: "Understand this warning",
|
|
466
|
+
explainThisMessage: "Understand this message",
|
|
467
|
+
explainThisErrorWithAI: "Understand this error. Powered by AI.",
|
|
468
|
+
explainThisWarningWithAI: "Understand this warning. Powered by AI.",
|
|
469
|
+
explainThisMessageWithAI: "Understand this message. Powered by AI",
|
|
470
|
+
dots: "(...)",
|
|
471
|
+
invokePropertyGetter: "Invoke property getter"
|
|
472
|
+
}, Br = g("panels/console/ConsoleViewMessage.ts", B), V = ae.bind(void 0, Br), Vr = /* @__PURE__ */ new WeakMap(), Hr = (e) => Vr.get(e), Ur = 18, Wr = (e) => (t) => t instanceof at ? t : e ? typeof t == "object" ? e.createRemoteObject(t) : e.createRemoteObjectFromPrimitiveValue(t) : at.fromLocalObject(t), Gr = "explain.console-message.hover", Kr = "explain.console-message.context.error", qr = "explain.console-message.context.warning", Jr = "explain.console-message.context.other", Yr = new IntersectionObserver((e) => {
|
|
473
|
+
for (let t of e) t.intersectionRatio > 0 && j.actionTaken(k.InsightHoverButtonShown);
|
|
474
|
+
});
|
|
475
|
+
function H(e, t) {
|
|
476
|
+
t instanceof A ? t.show(e, null, !0) : e.appendChild(t);
|
|
477
|
+
}
|
|
478
|
+
var U = class e {
|
|
479
|
+
message;
|
|
480
|
+
linkifier;
|
|
481
|
+
repeatCountInternal;
|
|
482
|
+
closeGroupDecorationCount;
|
|
483
|
+
consoleGroupInternal;
|
|
484
|
+
selectableChildren;
|
|
485
|
+
messageResized;
|
|
486
|
+
elementInternal;
|
|
487
|
+
consoleRowWrapper = null;
|
|
488
|
+
previewFormatter;
|
|
489
|
+
searchRegexInternal;
|
|
490
|
+
messageIcon;
|
|
491
|
+
traceExpanded;
|
|
492
|
+
expandTrace;
|
|
493
|
+
hasStackTrace;
|
|
494
|
+
anchorElement;
|
|
495
|
+
contentElementInternal;
|
|
496
|
+
nestingLevelMarkers;
|
|
497
|
+
searchHighlightNodes;
|
|
498
|
+
searchHighlightNodeChanges;
|
|
499
|
+
isVisibleInternal;
|
|
500
|
+
cachedHeight;
|
|
501
|
+
messagePrefix;
|
|
502
|
+
timestampElement;
|
|
503
|
+
inSimilarGroup;
|
|
504
|
+
similarGroupMarker;
|
|
505
|
+
lastInSimilarGroup;
|
|
506
|
+
groupKeyInternal;
|
|
507
|
+
repeatCountElement;
|
|
508
|
+
requestResolver;
|
|
509
|
+
issueResolver;
|
|
510
|
+
#e = !1;
|
|
511
|
+
#t = void 0;
|
|
512
|
+
#n = Promise.resolve();
|
|
513
|
+
constructor(e, t, n, r, i) {
|
|
514
|
+
this.message = e, this.linkifier = t, this.requestResolver = n, this.issueResolver = r, this.repeatCountInternal = 1, this.closeGroupDecorationCount = 0, this.selectableChildren = [], this.messageResized = i, this.elementInternal = null, this.previewFormatter = new Ln(), this.searchRegexInternal = null, this.messageIcon = null, this.traceExpanded = !1, this.expandTrace = null, this.hasStackTrace = !1, this.anchorElement = null, this.contentElementInternal = null, this.nestingLevelMarkers = null, this.searchHighlightNodes = [], this.searchHighlightNodeChanges = [], this.isVisibleInternal = !1, this.cachedHeight = 0, this.messagePrefix = "", this.timestampElement = null, this.inSimilarGroup = !1, this.similarGroupMarker = null, this.lastInSimilarGroup = !1, this.groupKeyInternal = "", this.repeatCountElement = null, this.consoleGroupInternal = null;
|
|
515
|
+
}
|
|
516
|
+
setInsight(e) {
|
|
517
|
+
this.elementInternal && (Se(e, this.elementInternal), this.elementInternal.classList.toggle("has-insight", !0), this.elementInternal.addEventListener("closeinsight", () => {
|
|
518
|
+
j.actionTaken(k.InsightClosed), this.elementInternal && (this.elementInternal.classList.toggle("has-insight", !1), Se(ot, this.elementInternal)), this.#t?.setInactive(!1);
|
|
519
|
+
}, { once: !0 }), this.#t?.setInactive(!0));
|
|
520
|
+
}
|
|
521
|
+
element() {
|
|
522
|
+
return this.toMessageElement();
|
|
523
|
+
}
|
|
524
|
+
wasShown() {
|
|
525
|
+
this.isVisibleInternal = !0;
|
|
526
|
+
}
|
|
527
|
+
onResize() {}
|
|
528
|
+
willHide() {
|
|
529
|
+
this.isVisibleInternal = !1, this.cachedHeight = this.element().offsetHeight;
|
|
530
|
+
}
|
|
531
|
+
isVisible() {
|
|
532
|
+
return this.isVisibleInternal;
|
|
533
|
+
}
|
|
534
|
+
fastHeight() {
|
|
535
|
+
return this.cachedHeight ? this.cachedHeight : this.approximateFastHeight();
|
|
536
|
+
}
|
|
537
|
+
approximateFastHeight() {
|
|
538
|
+
return Ur;
|
|
539
|
+
}
|
|
540
|
+
consoleMessage() {
|
|
541
|
+
return this.message;
|
|
542
|
+
}
|
|
543
|
+
formatErrorStackPromiseForTest() {
|
|
544
|
+
return this.#n;
|
|
545
|
+
}
|
|
546
|
+
buildMessage() {
|
|
547
|
+
let e, t = this.message.messageText;
|
|
548
|
+
if (this.message.source === h.ConsoleAPI) switch (this.message.type) {
|
|
549
|
+
case T.ConsoleAPICalledEventType.Trace:
|
|
550
|
+
e = this.format(this.message.parameters || ["console.trace"]);
|
|
551
|
+
break;
|
|
552
|
+
case T.ConsoleAPICalledEventType.Clear:
|
|
553
|
+
e = document.createElement("span"), e.classList.add("console-info"), m.instance().moduleSetting("preserve-console-log").get() ? e.textContent = V(B.consoleclearWasPreventedDueTo) : e.textContent = V(B.consoleWasCleared), C.install(e, V(B.clearAllMessagesWithS, { PH1: String(Te.instance().shortcutTitleForAction("console.clear")) }));
|
|
554
|
+
break;
|
|
555
|
+
case T.ConsoleAPICalledEventType.Dir: {
|
|
556
|
+
let t = ["%O", this.message.parameters ? this.message.parameters[0] : void 0];
|
|
557
|
+
e = this.format(t);
|
|
558
|
+
break;
|
|
559
|
+
}
|
|
560
|
+
case T.ConsoleAPICalledEventType.Profile:
|
|
561
|
+
case T.ConsoleAPICalledEventType.ProfileEnd:
|
|
562
|
+
e = this.format([t]);
|
|
563
|
+
break;
|
|
564
|
+
default: {
|
|
565
|
+
if (this.message.type === T.ConsoleAPICalledEventType.Assert && (this.messagePrefix = V(B.assertionFailed)), this.message.parameters?.length === 1) {
|
|
566
|
+
let t = this.message.parameters[0];
|
|
567
|
+
typeof t != "string" && t.type === "string" && (e = this.tryFormatAsError(t.value));
|
|
568
|
+
}
|
|
569
|
+
let n = this.message.parameters || [t];
|
|
570
|
+
e ||= this.format(n);
|
|
571
|
+
}
|
|
572
|
+
}
|
|
573
|
+
else if (this.message.source === E.LogEntrySource.Network) e = this.formatAsNetworkRequest() || this.format([t]);
|
|
574
|
+
else {
|
|
575
|
+
let n = this.message.parameters && t === this.message.parameters[0];
|
|
576
|
+
this.message.source === E.LogEntrySource.Violation ? t = V(B.violationS, { PH1: t }) : this.message.source === E.LogEntrySource.Intervention ? t = V(B.interventionS, { PH1: t }) : this.message.source === E.LogEntrySource.Deprecation && (t = V(B.deprecationS, { PH1: t }));
|
|
577
|
+
let r = this.message.parameters || [t];
|
|
578
|
+
n && (r[0] = t), e = this.format(r);
|
|
579
|
+
}
|
|
580
|
+
e.classList.add("console-message-text");
|
|
581
|
+
let n = document.createElement("span");
|
|
582
|
+
return n.classList.add("source-code"), this.anchorElement = this.buildMessageAnchor(), this.anchorElement && n.appendChild(this.anchorElement), n.appendChild(e), n;
|
|
583
|
+
}
|
|
584
|
+
formatAsNetworkRequest() {
|
|
585
|
+
let e = xn.requestForConsoleMessage(this.message);
|
|
586
|
+
if (!e) return null;
|
|
587
|
+
let t = document.createElement("span");
|
|
588
|
+
if (this.message.level === E.LogEntryLevel.Error) {
|
|
589
|
+
P(t, e.requestMethod + " ");
|
|
590
|
+
let n = I.linkifyRevealable(e, e.url(), e.url(), void 0, void 0, "network-request");
|
|
591
|
+
n.tabIndex = -1, this.selectableChildren.push({
|
|
592
|
+
element: n,
|
|
593
|
+
forceSelect: () => n.focus()
|
|
594
|
+
}), t.appendChild(n), e.failed && Re(t, " ", e.localizedFailDescription || ""), e.statusCode !== 0 && Re(t, " ", String(e.statusCode));
|
|
595
|
+
let r = e.getInferredStatusText();
|
|
596
|
+
r && Re(t, " (", r, ")");
|
|
597
|
+
} else {
|
|
598
|
+
let n = this.message.messageText;
|
|
599
|
+
H(t, this.linkifyWithCustomLinkifier(n, (t, n, r, i) => {
|
|
600
|
+
let a = n === e.url() ? I.linkifyRevealable(e, n, e.url(), void 0, void 0, "network-request") : I.linkifyURL(n, {
|
|
601
|
+
text: t,
|
|
602
|
+
lineNumber: r,
|
|
603
|
+
columnNumber: i
|
|
604
|
+
});
|
|
605
|
+
return a.tabIndex = -1, this.selectableChildren.push({
|
|
606
|
+
element: a,
|
|
607
|
+
forceSelect: () => a.focus()
|
|
608
|
+
}), a;
|
|
609
|
+
}));
|
|
610
|
+
}
|
|
611
|
+
return t;
|
|
612
|
+
}
|
|
613
|
+
createAffectedResourceLinks() {
|
|
614
|
+
let e = [], t = this.message.getAffectedResources()?.requestId;
|
|
615
|
+
if (t) {
|
|
616
|
+
let n = new _r();
|
|
617
|
+
n.classList.add("resource-links"), n.data = {
|
|
618
|
+
affectedRequest: { requestId: t },
|
|
619
|
+
requestResolver: this.requestResolver,
|
|
620
|
+
displayURL: !1
|
|
621
|
+
}, e.push(n);
|
|
622
|
+
}
|
|
623
|
+
let n = this.message.getAffectedResources()?.issueId;
|
|
624
|
+
if (n) {
|
|
625
|
+
let t = new gr();
|
|
626
|
+
t.classList.add("resource-links"), t.data = {
|
|
627
|
+
issueId: n,
|
|
628
|
+
issueResolver: this.issueResolver
|
|
629
|
+
}, e.push(t);
|
|
630
|
+
}
|
|
631
|
+
return e;
|
|
632
|
+
}
|
|
633
|
+
#r() {
|
|
634
|
+
if (xn.requestForConsoleMessage(this.message)?.resourceType().isStyleSheet()) return k.StyleSheetInitiatorLinkClicked;
|
|
635
|
+
}
|
|
636
|
+
buildMessageAnchor() {
|
|
637
|
+
let e = this.message.runtimeModel();
|
|
638
|
+
if (!e) return null;
|
|
639
|
+
let t = (({ stackFrameWithBreakpoint: t, scriptId: n, stackTrace: r, url: i, line: a, column: o }) => {
|
|
640
|
+
let s = this.#r();
|
|
641
|
+
return t ? this.linkifier.maybeLinkifyConsoleCallFrame(e.target(), t, {
|
|
642
|
+
inlineFrameIndex: 0,
|
|
643
|
+
revealBreakpoint: !0,
|
|
644
|
+
userMetric: s
|
|
645
|
+
}) : n ? this.linkifier.linkifyScriptLocation(e.target(), n, i || "", a, {
|
|
646
|
+
columnNumber: o,
|
|
647
|
+
inlineFrameIndex: 0,
|
|
648
|
+
userMetric: s
|
|
649
|
+
}) : r?.callFrames.length ? this.linkifier.linkifyStackTraceTopFrame(e.target(), r) : i && i !== "undefined" ? this.linkifier.linkifyScriptLocation(e.target(), null, i, a, {
|
|
650
|
+
columnNumber: o,
|
|
651
|
+
inlineFrameIndex: 0,
|
|
652
|
+
userMetric: s
|
|
653
|
+
}) : null;
|
|
654
|
+
})(this.message);
|
|
655
|
+
if (t) {
|
|
656
|
+
t.tabIndex = -1, this.selectableChildren.push({
|
|
657
|
+
element: t,
|
|
658
|
+
forceSelect: () => t.focus()
|
|
659
|
+
});
|
|
660
|
+
let e = document.createElement("span");
|
|
661
|
+
e.classList.add("console-message-anchor"), e.appendChild(t);
|
|
662
|
+
for (let t of this.createAffectedResourceLinks()) P(e, " "), e.append(t);
|
|
663
|
+
return P(e, " "), e;
|
|
664
|
+
}
|
|
665
|
+
return null;
|
|
666
|
+
}
|
|
667
|
+
buildMessageWithStackTrace(e) {
|
|
668
|
+
let t = Ae("triangle-right", "console-message-expand-icon"), { stackTraceElement: n, contentElement: r, messageElement: i, clickableElement: a, toggleElement: o } = this.buildMessageHelper(e.target(), this.message.stackTrace, t), s;
|
|
669
|
+
return this.expandTrace = (e) => {
|
|
670
|
+
e ? s = window.setTimeout(() => {
|
|
671
|
+
j.actionTaken(k.TraceExpanded);
|
|
672
|
+
}, 300) : clearTimeout(s), t.name = e ? "triangle-down" : "triangle-right", n.classList.toggle("hidden-stack-trace", !e);
|
|
673
|
+
let o = V(e ? B.stackMessageExpanded : B.stackMessageCollapsed);
|
|
674
|
+
b(r, `${i.textContent} ${o}`), Ve.alert(o), Kt(a, e), this.traceExpanded = e;
|
|
675
|
+
}, a.addEventListener("click", (e) => {
|
|
676
|
+
Pe() || r.hasSelection() || (this.expandTrace?.(n.classList.contains("hidden-stack-trace")), e.consume());
|
|
677
|
+
}, !1), this.message.type === T.ConsoleAPICalledEventType.Trace && m.instance().moduleSetting("console-trace-expand").get() && this.expandTrace(!0), this.hasStackTrace = !0, o._expandStackTraceForTest = this.expandTrace.bind(this, !0), o;
|
|
678
|
+
}
|
|
679
|
+
buildMessageWithIgnoreLinks() {
|
|
680
|
+
let { toggleElement: e } = this.buildMessageHelper(null, void 0, null);
|
|
681
|
+
return e;
|
|
682
|
+
}
|
|
683
|
+
buildMessageHelper(e, t, n) {
|
|
684
|
+
let r = document.createElement("div");
|
|
685
|
+
r.classList.add("console-message-stack-trace-toggle");
|
|
686
|
+
let i = r.createChild("div", "console-message-stack-trace-wrapper"), a = this.buildMessage(), o = i.createChild("div");
|
|
687
|
+
Kt(o, !1), n && o.appendChild(n), t && (o.tabIndex = -1), o.appendChild(a);
|
|
688
|
+
let s = i.createChild("div", "hidden-stack-trace"), c = x.instance(), l = e ?? c.primaryPageTarget() ?? c.rootTarget(), u = new Pn();
|
|
689
|
+
if (u.options = { widthConstrained: !0 }, l && t) {
|
|
690
|
+
let e = this.selectableChildren.length;
|
|
691
|
+
hn.instance().createStackTraceFromProtocolRuntime(t, l).then((e) => (u.stackTrace = e, u.updateComplete)).then(() => {
|
|
692
|
+
let t = u.linkElements.map((e) => ({
|
|
693
|
+
element: e,
|
|
694
|
+
forceSelect: () => e.focus()
|
|
695
|
+
}));
|
|
696
|
+
this.selectableChildren.splice(e, 0, ...t);
|
|
697
|
+
});
|
|
698
|
+
}
|
|
699
|
+
return u.markAsRoot(), u.show(s), b(i, `${a.textContent} ${V(B.stackMessageCollapsed)}`), rt(s), {
|
|
700
|
+
stackTraceElement: s,
|
|
701
|
+
contentElement: i,
|
|
702
|
+
messageElement: a,
|
|
703
|
+
clickableElement: o,
|
|
704
|
+
toggleElement: r
|
|
705
|
+
};
|
|
706
|
+
}
|
|
707
|
+
format(e) {
|
|
708
|
+
let t = document.createElement("span");
|
|
709
|
+
if (this.messagePrefix && (t.createChild("span").textContent = this.messagePrefix), !e.length) return t;
|
|
710
|
+
let n = e.map(Wr(this.message.runtimeModel())), r = at.type(n[0]) === "string" && (this.message.type !== w.Result || this.message.level === E.LogEntryLevel.Error);
|
|
711
|
+
r && (n = this.formatWithSubstitutionString(n[0].description, n.slice(1), t), n.length && P(t, " "));
|
|
712
|
+
for (let e = 0; e < n.length; ++e) r && n[e].type === "string" ? H(t, this.linkifyStringAsFragment(n[e].description || "")) : t.appendChild(this.formatParameter(n[e], !1, !0)), e < n.length - 1 && P(t, " ");
|
|
713
|
+
return t;
|
|
714
|
+
}
|
|
715
|
+
formatParameter(e, t, n) {
|
|
716
|
+
if (e.customPreview()) return new zn(e).element;
|
|
717
|
+
let r = t ? "object" : e.subtype || e.type, i;
|
|
718
|
+
switch (r) {
|
|
719
|
+
case "error":
|
|
720
|
+
i = this.formatParameterAsError(e);
|
|
721
|
+
break;
|
|
722
|
+
case "function":
|
|
723
|
+
i = this.formatParameterAsFunction(e, n);
|
|
724
|
+
break;
|
|
725
|
+
case "array":
|
|
726
|
+
case "arraybuffer":
|
|
727
|
+
case "blob":
|
|
728
|
+
case "dataview":
|
|
729
|
+
case "generator":
|
|
730
|
+
case "iterator":
|
|
731
|
+
case "map":
|
|
732
|
+
case "object":
|
|
733
|
+
case "promise":
|
|
734
|
+
case "proxy":
|
|
735
|
+
case "set":
|
|
736
|
+
case "typedarray":
|
|
737
|
+
case "wasmvalue":
|
|
738
|
+
case "weakmap":
|
|
739
|
+
case "weakset":
|
|
740
|
+
case "webassemblymemory":
|
|
741
|
+
i = this.formatParameterAsObject(e, n);
|
|
742
|
+
break;
|
|
743
|
+
case "node":
|
|
744
|
+
i = e.isNode() ? this.formatParameterAsNode(e) : this.formatParameterAsObject(e, !1);
|
|
745
|
+
break;
|
|
746
|
+
case "trustedtype":
|
|
747
|
+
i = this.formatParameterAsObject(e, !1);
|
|
748
|
+
break;
|
|
749
|
+
case "string":
|
|
750
|
+
i = this.formatParameterAsString(e);
|
|
751
|
+
break;
|
|
752
|
+
case "boolean":
|
|
753
|
+
case "date":
|
|
754
|
+
case "null":
|
|
755
|
+
case "number":
|
|
756
|
+
case "regexp":
|
|
757
|
+
case "symbol":
|
|
758
|
+
case "undefined":
|
|
759
|
+
case "bigint":
|
|
760
|
+
i = this.formatParameterAsValue(e);
|
|
761
|
+
break;
|
|
762
|
+
default: i = this.formatParameterAsValue(e), console.error(`Tried to format remote object of unknown type ${r}.`);
|
|
763
|
+
}
|
|
764
|
+
return i.classList.add(`object-value-${r}`), i.classList.add("source-code"), i;
|
|
765
|
+
}
|
|
766
|
+
formatParameterAsValue(e) {
|
|
767
|
+
let t = document.createElement("span"), n = e.description || "";
|
|
768
|
+
if (n.length > oi()) {
|
|
769
|
+
let e = new In();
|
|
770
|
+
e.text = n, e.maxLength = ci(), e.show(t, null, !0);
|
|
771
|
+
} else P(t, n);
|
|
772
|
+
return t.addEventListener("contextmenu", this.contextMenuEventFired.bind(this, e), !1), t;
|
|
773
|
+
}
|
|
774
|
+
formatParameterAsTrustedType(e) {
|
|
775
|
+
let t = document.createElement("span"), n = document.createElement("span");
|
|
776
|
+
return n.appendChild(this.formatParameterAsString(e)), n.classList.add("object-value-string"), P(t, `${e.className} `), t.appendChild(n), t;
|
|
777
|
+
}
|
|
778
|
+
formatParameterAsObject(e, t) {
|
|
779
|
+
let n = document.createElement("span");
|
|
780
|
+
n.classList.add("console-object");
|
|
781
|
+
let r = (t) => {
|
|
782
|
+
e.preview && (n.classList.add("console-object-preview"), Se(this.previewFormatter.renderObjectPreview(e.preview, t), n), Bn.appendMemoryIcon(n, e));
|
|
783
|
+
};
|
|
784
|
+
if (t && e.preview) r(!0);
|
|
785
|
+
else if (e.type === "function") {
|
|
786
|
+
let t = n.createChild("span");
|
|
787
|
+
Bn.formatObjectAsFunction(e, t, !1), n.classList.add("object-value-function");
|
|
788
|
+
} else e.subtype === "trustedtype" ? n.appendChild(this.formatParameterAsTrustedType(e)) : P(n, e.description || "");
|
|
789
|
+
if (!e.hasChildren || e.customPreview()) return n;
|
|
790
|
+
let i = n.createChild("span", "object-state-note info-note");
|
|
791
|
+
this.message.type === w.QueryObjectResult ? C.install(i, V(B.thisValueWillNotBeCollectedUntil)) : C.install(i, V(B.thisValueWasEvaluatedUponFirst));
|
|
792
|
+
let a = new Bn(e, n, this.linkifier);
|
|
793
|
+
return a.element.classList.add("console-view-object-properties-section"), a.enableContextMenu(), a.setShowSelectionOnKeyboardFocus(!0, !0), this.selectableChildren.push(a), a.addEventListener(Lt.ElementAttached, this.messageResized), a.addEventListener(Lt.ElementExpanded, this.messageResized), a.addEventListener(Lt.ElementCollapsed, this.messageResized), a.root.addEventListener(Rn.Events.FILTER_CHANGED, () => r(a.root.includeNullOrUndefinedValues)), a.element;
|
|
794
|
+
}
|
|
795
|
+
formatParameterAsFunction(e, t) {
|
|
796
|
+
let n = document.createElement("span");
|
|
797
|
+
return Xe.objectAsFunction(e).targetFunction().then(r.bind(this)), n;
|
|
798
|
+
function r(r) {
|
|
799
|
+
let i = document.createElement("span"), a = Bn.formatObjectAsFunction(r, i, !0, t);
|
|
800
|
+
if (n.appendChild(i), r !== e) {
|
|
801
|
+
let e = n.createChild("span", "object-state-note info-note");
|
|
802
|
+
C.install(e, V(B.functionWasResolvedFromBound));
|
|
803
|
+
}
|
|
804
|
+
n.addEventListener("contextmenu", this.contextMenuEventFired.bind(this, e), !1), a.then(() => this.formattedParameterAsFunctionForTest());
|
|
805
|
+
}
|
|
806
|
+
}
|
|
807
|
+
formattedParameterAsFunctionForTest() {}
|
|
808
|
+
contextMenuEventFired(e, t) {
|
|
809
|
+
let n = new ft(t);
|
|
810
|
+
n.appendApplicableItems(e), n.show();
|
|
811
|
+
}
|
|
812
|
+
renderPropertyPreviewOrAccessor(e, t, n) {
|
|
813
|
+
return t.type === "accessor" ? this.formatAsAccessorProperty(e, n.map((e) => e.name.toString()), !1) : this.renderPropertyPreview(t.type, "subtype" in t ? t.subtype : void 0, null, t.value);
|
|
814
|
+
}
|
|
815
|
+
formatParameterAsNode(e) {
|
|
816
|
+
let t = document.createElement("span"), n = e.runtimeModel().target().model(zt);
|
|
817
|
+
return n && n.pushObjectAsNodeToFrontend(e).then(async (n) => {
|
|
818
|
+
if (!n) {
|
|
819
|
+
t.appendChild(this.formatParameterAsObject(e, !1));
|
|
820
|
+
return;
|
|
821
|
+
}
|
|
822
|
+
let r = await $e.render(n);
|
|
823
|
+
r ? (this.selectableChildren.push(r), r.element.addEventListener("dimensionschanged", () => {
|
|
824
|
+
this.messageResized({ data: r.element });
|
|
825
|
+
}), t.appendChild(r.element)) : t.appendChild(this.formatParameterAsObject(e, !1)), this.formattedParameterAsNodeForTest();
|
|
826
|
+
}), t;
|
|
827
|
+
}
|
|
828
|
+
formattedParameterAsNodeForTest() {}
|
|
829
|
+
formatParameterAsString(e) {
|
|
830
|
+
let n = t(e.description ?? ""), r = document.createElement("span");
|
|
831
|
+
return r.addEventListener("contextmenu", this.contextMenuEventFired.bind(this, e), !1), H(r, this.linkifyStringAsFragment(n)), r;
|
|
832
|
+
}
|
|
833
|
+
formatParameterAsError(e) {
|
|
834
|
+
let t = document.createElement("span"), n = async (e, r) => {
|
|
835
|
+
let i = et.objectAsError(e), [a, o] = await Promise.all([i.exceptionDetails(), i.cause()]), s = this.tryFormatAsError(i.errorStack, a);
|
|
836
|
+
if (s || (s = document.createElement("span"), H(s, this.linkifyStringAsFragment(i.errorStack))), r) {
|
|
837
|
+
let e = document.createElement("div");
|
|
838
|
+
e.append("Caused by: ", s), t.appendChild(e);
|
|
839
|
+
} else t.appendChild(s);
|
|
840
|
+
if (o?.subtype === "error") await n(o, !0);
|
|
841
|
+
else if (o?.type === "string") {
|
|
842
|
+
let e = document.createElement("div");
|
|
843
|
+
e.append(`Caused by: ${o.value}`), t.append(e);
|
|
844
|
+
}
|
|
845
|
+
};
|
|
846
|
+
return this.#n = n(e, !1), t;
|
|
847
|
+
}
|
|
848
|
+
formatAsArrayEntry(e) {
|
|
849
|
+
return this.renderPropertyPreview(e.type, e.subtype, e.className, e.description);
|
|
850
|
+
}
|
|
851
|
+
renderPropertyPreview(e, t, n, r) {
|
|
852
|
+
let i = document.createDocumentFragment();
|
|
853
|
+
return Se(this.previewFormatter.renderPropertyPreview(e, t, n, r), i), i;
|
|
854
|
+
}
|
|
855
|
+
createRemoteObjectAccessorPropertySpan(e, t, n) {
|
|
856
|
+
let r = document.createElement("span"), i = r.createChild("span");
|
|
857
|
+
if (i.textContent = V(B.dots), !e) return r;
|
|
858
|
+
i.classList.add("object-value-calculate-value-button"), C.install(i, V(B.invokePropertyGetter)), i.addEventListener("click", a, !1);
|
|
859
|
+
function a(r) {
|
|
860
|
+
r.consume(), e && e.callFunction(o, [{ value: JSON.stringify(t) }]).then(n);
|
|
861
|
+
}
|
|
862
|
+
function o(e) {
|
|
863
|
+
let t = this, n = JSON.parse(e);
|
|
864
|
+
for (let e = 0, r = n.length; e < r; ++e) t = t[n[e]];
|
|
865
|
+
return t;
|
|
866
|
+
}
|
|
867
|
+
return r;
|
|
868
|
+
}
|
|
869
|
+
formatAsAccessorProperty(e, t, n) {
|
|
870
|
+
let i = this.createRemoteObjectAccessorPropertySpan(e, t, a.bind(this));
|
|
871
|
+
function a(e) {
|
|
872
|
+
let t = e.wasThrown, a = e.object;
|
|
873
|
+
if (a) if (i.removeChildren(), t) {
|
|
874
|
+
let e = i.createChild("span");
|
|
875
|
+
e.textContent = V(B.exception), C.install(e, a.description);
|
|
876
|
+
} else if (n) i.appendChild(this.formatAsArrayEntry(a));
|
|
877
|
+
else {
|
|
878
|
+
let e = a.type, t = a.subtype, n = "";
|
|
879
|
+
e !== "function" && a.description && (n = e === "string" || t === "regexp" || t === "trustedtype" ? r(a.description, 100) : o(a.description, 100)), i.appendChild(this.renderPropertyPreview(e, t, a.className, n));
|
|
880
|
+
}
|
|
881
|
+
}
|
|
882
|
+
return i;
|
|
883
|
+
}
|
|
884
|
+
formatWithSubstitutionString(e, t, n) {
|
|
885
|
+
let r = /* @__PURE__ */ new Map(), { tokens: i, args: a } = Pr(e, t);
|
|
886
|
+
for (let e of i) switch (e.type) {
|
|
887
|
+
case "generic":
|
|
888
|
+
n.append(this.formatParameter(e.value, !0, !1));
|
|
889
|
+
break;
|
|
890
|
+
case "optimal":
|
|
891
|
+
n.append(this.formatParameter(e.value, !1, !0));
|
|
892
|
+
break;
|
|
893
|
+
case "string":
|
|
894
|
+
if (r.size === 0) H(n, this.linkifyStringAsFragment(e.value));
|
|
895
|
+
else {
|
|
896
|
+
let t = e.value.split("\n");
|
|
897
|
+
for (let e = 0; e < t.length; e++) {
|
|
898
|
+
e > 0 && n.append(document.createElement("br"));
|
|
899
|
+
let i = document.createElement("span");
|
|
900
|
+
i.style.setProperty("contain", "paint"), i.style.setProperty("display", "inline-block"), i.style.setProperty("max-width", "100%"), H(i, this.linkifyStringAsFragment(t[e]));
|
|
901
|
+
for (let [e, { value: t, priority: n }] of r) i.style.setProperty(e, t, n);
|
|
902
|
+
n.append(i);
|
|
903
|
+
}
|
|
904
|
+
}
|
|
905
|
+
break;
|
|
906
|
+
case "style":
|
|
907
|
+
Ir(r, e.value);
|
|
908
|
+
break;
|
|
909
|
+
}
|
|
910
|
+
return a;
|
|
911
|
+
}
|
|
912
|
+
matchesFilterRegex(e) {
|
|
913
|
+
e.lastIndex = 0;
|
|
914
|
+
let t = this.contentElement(), n = this.anchorElement ? this.anchorElement.deepTextContent() : "";
|
|
915
|
+
return !!n && e.test(n.trim()) || e.test(t.deepTextContent().slice(n.length));
|
|
916
|
+
}
|
|
917
|
+
matchesFilterText(e) {
|
|
918
|
+
return (this.contentElement().deepTextContent() + this.message.messageText).toLowerCase().includes(e.toLowerCase());
|
|
919
|
+
}
|
|
920
|
+
updateTimestamp() {
|
|
921
|
+
this.contentElementInternal && (m.instance().moduleSetting("console-timestamps-enabled").get() ? (this.timestampElement || (this.timestampElement = document.createElement("span"), this.timestampElement.classList.add("console-timestamp")), this.timestampElement.textContent = ye(this.message.timestamp, !1) + " ", C.install(this.timestampElement, ye(this.message.timestamp, !0)), this.contentElementInternal.insertBefore(this.timestampElement, this.contentElementInternal.firstChild)) : this.timestampElement &&= (this.timestampElement.remove(), null));
|
|
922
|
+
}
|
|
923
|
+
nestingLevel() {
|
|
924
|
+
let e = 0;
|
|
925
|
+
for (let t = this.consoleGroup(); t !== null; t = t.consoleGroup()) e++;
|
|
926
|
+
return e;
|
|
927
|
+
}
|
|
928
|
+
setConsoleGroup(e) {
|
|
929
|
+
this.consoleGroupInternal = e;
|
|
930
|
+
}
|
|
931
|
+
clearConsoleGroup() {
|
|
932
|
+
this.consoleGroupInternal = null;
|
|
933
|
+
}
|
|
934
|
+
consoleGroup() {
|
|
935
|
+
return this.consoleGroupInternal;
|
|
936
|
+
}
|
|
937
|
+
isTraceExpanded() {
|
|
938
|
+
return this.traceExpanded;
|
|
939
|
+
}
|
|
940
|
+
isExpandableTrace() {
|
|
941
|
+
return this.hasStackTrace;
|
|
942
|
+
}
|
|
943
|
+
setTraceExpanded(e) {
|
|
944
|
+
this.expandTrace && this.traceExpanded !== e && this.expandTrace(e);
|
|
945
|
+
}
|
|
946
|
+
setInSimilarGroup(e, t) {
|
|
947
|
+
this.inSimilarGroup = e, this.lastInSimilarGroup = e && !!t, this.similarGroupMarker && !e ? (this.similarGroupMarker.remove(), this.similarGroupMarker = null) : this.elementInternal && !this.similarGroupMarker && e && (this.similarGroupMarker = document.createElement("div"), this.similarGroupMarker.classList.add("nesting-level-marker"), this.consoleRowWrapper?.insertBefore(this.similarGroupMarker, this.consoleRowWrapper.firstChild), this.similarGroupMarker.classList.toggle("group-closed", this.lastInSimilarGroup));
|
|
948
|
+
}
|
|
949
|
+
isLastInSimilarGroup() {
|
|
950
|
+
return !!this.inSimilarGroup && !!this.lastInSimilarGroup;
|
|
951
|
+
}
|
|
952
|
+
resetCloseGroupDecorationCount() {
|
|
953
|
+
this.closeGroupDecorationCount && (this.closeGroupDecorationCount = 0, this.updateCloseGroupDecorations());
|
|
954
|
+
}
|
|
955
|
+
incrementCloseGroupDecorationCount() {
|
|
956
|
+
++this.closeGroupDecorationCount, this.updateCloseGroupDecorations();
|
|
957
|
+
}
|
|
958
|
+
updateCloseGroupDecorations() {
|
|
959
|
+
if (this.nestingLevelMarkers) for (let e = 0, t = this.nestingLevelMarkers.length; e < t; ++e) this.nestingLevelMarkers[e].classList.toggle("group-closed", t - e <= this.closeGroupDecorationCount);
|
|
960
|
+
}
|
|
961
|
+
focusedChildIndex() {
|
|
962
|
+
return this.selectableChildren.length ? this.selectableChildren.findIndex((e) => e.element.hasFocus()) : -1;
|
|
963
|
+
}
|
|
964
|
+
onKeyDown(e) {
|
|
965
|
+
Pe() || !this.elementInternal || !this.elementInternal.hasFocus() || this.elementInternal.hasSelection() || this.maybeHandleOnKeyDown(e) && e.consume(!0);
|
|
966
|
+
}
|
|
967
|
+
maybeHandleOnKeyDown(e) {
|
|
968
|
+
let t = this.focusedChildIndex(), n = t === -1;
|
|
969
|
+
if (this.expandTrace && n && (e.key === "ArrowLeft" && this.traceExpanded || e.key === "ArrowRight" && !this.traceExpanded)) return this.expandTrace(!this.traceExpanded), !0;
|
|
970
|
+
if (!this.selectableChildren.length) return !1;
|
|
971
|
+
if (e.key === "ArrowLeft") return this.elementInternal?.focus(), !0;
|
|
972
|
+
if (e.key === "ArrowRight" && n && this.selectNearestVisibleChild(0)) return !0;
|
|
973
|
+
if (e.key === "ArrowUp") {
|
|
974
|
+
let e = this.nearestVisibleChild(0);
|
|
975
|
+
if (this.selectableChildren[t] === e && e) return this.elementInternal?.focus(), !0;
|
|
976
|
+
if (this.selectNearestVisibleChild(t - 1, !0)) return !0;
|
|
977
|
+
}
|
|
978
|
+
return !!(e.key === "ArrowDown" && (n && this.selectNearestVisibleChild(0) || !n && this.selectNearestVisibleChild(t + 1)));
|
|
979
|
+
}
|
|
980
|
+
selectNearestVisibleChild(e, t) {
|
|
981
|
+
let n = this.nearestVisibleChild(e, t);
|
|
982
|
+
return n ? (n.forceSelect(), !0) : !1;
|
|
983
|
+
}
|
|
984
|
+
nearestVisibleChild(e, t) {
|
|
985
|
+
let n = this.selectableChildren.length;
|
|
986
|
+
if (e < 0 || e >= n) return null;
|
|
987
|
+
let r = t ? -1 : 1, i = e;
|
|
988
|
+
for (; !this.selectableChildren[i].element.offsetParent;) if (i += r, i < 0 || i >= n) return null;
|
|
989
|
+
return this.selectableChildren[i];
|
|
990
|
+
}
|
|
991
|
+
focusLastChildOrSelf() {
|
|
992
|
+
this.elementInternal && !this.selectNearestVisibleChild(this.selectableChildren.length - 1, !0) && this.elementInternal.focus();
|
|
993
|
+
}
|
|
994
|
+
setContentElement(e) {
|
|
995
|
+
console.assert(!this.contentElementInternal, "Cannot set content element twice"), this.contentElementInternal = e;
|
|
996
|
+
}
|
|
997
|
+
getContentElement() {
|
|
998
|
+
return this.contentElementInternal;
|
|
999
|
+
}
|
|
1000
|
+
contentElement() {
|
|
1001
|
+
if (this.contentElementInternal) return this.contentElementInternal;
|
|
1002
|
+
let e = document.createElement("div");
|
|
1003
|
+
e.classList.add("console-message"), this.messageIcon && e.appendChild(this.messageIcon), this.contentElementInternal = e;
|
|
1004
|
+
let t = this.message.runtimeModel(), n, r = !!this.message.stackTrace && (this.message.source === E.LogEntrySource.Network || this.message.source === E.LogEntrySource.Violation || this.message.level === E.LogEntryLevel.Error || this.message.level === E.LogEntryLevel.Warning || this.message.type === T.ConsoleAPICalledEventType.Trace);
|
|
1005
|
+
return n = t && r ? this.buildMessageWithStackTrace(t) : this.buildMessageWithIgnoreLinks(), e.appendChild(n), this.updateTimestamp(), this.contentElementInternal;
|
|
1006
|
+
}
|
|
1007
|
+
#i() {
|
|
1008
|
+
if (this.elementInternal) if (this.shouldShowTeaser()) {
|
|
1009
|
+
if (!this.#t) {
|
|
1010
|
+
let e = crypto.randomUUID();
|
|
1011
|
+
this.elementInternal.setAttribute("aria-details", `teaser-${e}`), this.#t = new zi(e, this), this.#t.show(this.elementInternal, this.consoleRowWrapper);
|
|
1012
|
+
}
|
|
1013
|
+
this.#t.maybeGenerateTeaser();
|
|
1014
|
+
} else this.#t?.detach(), this.#t = void 0;
|
|
1015
|
+
}
|
|
1016
|
+
#a() {
|
|
1017
|
+
if (this.#t) {
|
|
1018
|
+
let { okToRemove: e } = this.#t.abortTeaserGeneration();
|
|
1019
|
+
e && (this.#t.detach(), this.#t = void 0);
|
|
1020
|
+
}
|
|
1021
|
+
}
|
|
1022
|
+
toMessageElement() {
|
|
1023
|
+
return this.elementInternal ? this.elementInternal : (this.elementInternal = document.createElement("div"), this.elementInternal.tabIndex = -1, this.elementInternal.addEventListener("keydown", this.onKeyDown.bind(this)), this.elementInternal.addEventListener("mouseenter", this.#i.bind(this)), this.elementInternal.addEventListener("focusin", this.#i.bind(this)), this.elementInternal.addEventListener("mouseleave", this.#a.bind(this)), this.elementInternal.addEventListener("focusout", this.#a.bind(this)), this.updateMessageElement(), this.elementInternal.classList.toggle("console-adjacent-user-command-result", this.#e), this.elementInternal);
|
|
1024
|
+
}
|
|
1025
|
+
updateMessageElement() {
|
|
1026
|
+
if (this.elementInternal) {
|
|
1027
|
+
this.elementInternal.className = "console-message-wrapper", this.elementInternal.setAttribute("jslog", `${ke("console-message").track({
|
|
1028
|
+
click: !0,
|
|
1029
|
+
resize: !0,
|
|
1030
|
+
keydown: "ArrowUp|ArrowDown|ArrowLeft|ArrowRight|Enter|Space|Home|End"
|
|
1031
|
+
})}`), this.elementInternal.removeChildren(), this.consoleRowWrapper = this.elementInternal.createChild("div"), this.consoleRowWrapper.classList.add("console-row-wrapper"), this.message.isGroupStartMessage() && this.elementInternal.classList.add("console-group-title"), this.message.source === h.ConsoleAPI && this.elementInternal.classList.add("console-from-api"), this.inSimilarGroup && (this.similarGroupMarker = this.consoleRowWrapper.createChild("div", "nesting-level-marker"), this.similarGroupMarker.classList.toggle("group-closed", this.lastInSimilarGroup)), this.nestingLevelMarkers = [];
|
|
1032
|
+
for (let e = 0; e < this.nestingLevel(); ++e) this.nestingLevelMarkers.push(this.consoleRowWrapper.createChild("div", "nesting-level-marker"));
|
|
1033
|
+
switch (this.updateCloseGroupDecorations(), Vr.set(this.elementInternal, this), this.message.level) {
|
|
1034
|
+
case E.LogEntryLevel.Verbose:
|
|
1035
|
+
this.elementInternal.classList.add("console-verbose-level"), b(this.elementInternal, this.text);
|
|
1036
|
+
break;
|
|
1037
|
+
case E.LogEntryLevel.Info:
|
|
1038
|
+
this.elementInternal.classList.add("console-info-level"), this.message.type === w.System && this.elementInternal.classList.add("console-system-type"), b(this.elementInternal, this.text);
|
|
1039
|
+
break;
|
|
1040
|
+
case E.LogEntryLevel.Warning:
|
|
1041
|
+
this.elementInternal.classList.add("console-warning-level"), this.elementInternal.role = "log", b(this.elementInternal, this.text);
|
|
1042
|
+
break;
|
|
1043
|
+
case E.LogEntryLevel.Error:
|
|
1044
|
+
this.elementInternal.classList.add("console-error-level"), this.elementInternal.role = "log", b(this.elementInternal, this.text);
|
|
1045
|
+
break;
|
|
1046
|
+
}
|
|
1047
|
+
this.updateMessageIcon(), this.shouldRenderAsWarning() && this.elementInternal.classList.add("console-warning-level"), this.consoleRowWrapper.appendChild(this.contentElement()), Mt.instance().hasAction(Gr) && this.shouldShowInsights() && (j.actionTaken(k.InsightConsoleMessageShown), this.consoleRowWrapper.append(this.#s())), this.repeatCountInternal > 1 && this.showRepeatCountElement();
|
|
1048
|
+
}
|
|
1049
|
+
}
|
|
1050
|
+
shouldShowInsights() {
|
|
1051
|
+
return this.message.source === h.ConsoleAPI && this.message.stackTrace?.callFrames[0]?.url === "" || this.message.messageText === "" || this.message.source === h.SELF_XSS ? !1 : this.message.level === E.LogEntryLevel.Error || this.message.level === E.LogEntryLevel.Warning;
|
|
1052
|
+
}
|
|
1053
|
+
shouldShowTeaser() {
|
|
1054
|
+
return !(!this.shouldShowInsights() || !m.instance().moduleSetting("console-insight-teasers-enabled").getIfNotDisabled() || !An.instance().isEventuallyAvailable() || !te.instance().locale.startsWith("en-"));
|
|
1055
|
+
}
|
|
1056
|
+
getExplainLabel() {
|
|
1057
|
+
return this.message.level === E.LogEntryLevel.Error ? V(B.explainThisError) : this.message.level === E.LogEntryLevel.Warning ? V(B.explainThisWarning) : V(B.explainThisMessage);
|
|
1058
|
+
}
|
|
1059
|
+
#o() {
|
|
1060
|
+
return this.message.level === E.LogEntryLevel.Error ? V(B.explainThisErrorWithAI) : this.message.level === E.LogEntryLevel.Warning ? V(B.explainThisWarningWithAI) : V(B.explainThisMessageWithAI);
|
|
1061
|
+
}
|
|
1062
|
+
getExplainActionId() {
|
|
1063
|
+
return this.message.level === E.LogEntryLevel.Error ? Kr : this.message.level === E.LogEntryLevel.Warning ? qr : Jr;
|
|
1064
|
+
}
|
|
1065
|
+
#s() {
|
|
1066
|
+
let t = new O();
|
|
1067
|
+
t.name = "lightbulb-spark", t.style.color = "var(--devtools-icon-color)", t.classList.add("medium");
|
|
1068
|
+
let n = document.createElement("button");
|
|
1069
|
+
n.append(t), n.onclick = (t) => {
|
|
1070
|
+
t.stopPropagation(), D.instance().setFlavor(e, this), Mt.instance().getAction(Gr).execute();
|
|
1071
|
+
};
|
|
1072
|
+
let r = document.createElement("div");
|
|
1073
|
+
r.classList.add("button-label");
|
|
1074
|
+
let i = document.createElement("div");
|
|
1075
|
+
return i.setAttribute("data-text", this.getExplainLabel()), r.append(i), n.append(r), n.classList.add("hover-button"), n.ariaLabel = this.#o(), n.tabIndex = 0, n.setAttribute("jslog", `${St(Gr).track({ click: !0 })}`), Yr.observe(n), n;
|
|
1076
|
+
}
|
|
1077
|
+
shouldRenderAsWarning() {
|
|
1078
|
+
return (this.message.level === E.LogEntryLevel.Verbose || this.message.level === E.LogEntryLevel.Info) && (this.message.source === E.LogEntrySource.Violation || this.message.source === E.LogEntrySource.Deprecation || this.message.source === E.LogEntrySource.Intervention || this.message.source === E.LogEntrySource.Recommendation);
|
|
1079
|
+
}
|
|
1080
|
+
updateMessageIcon() {
|
|
1081
|
+
this.messageIcon &&= (this.messageIcon.remove(), null);
|
|
1082
|
+
let e = "", t = "";
|
|
1083
|
+
this.message.level === E.LogEntryLevel.Warning ? (e = "warning-filled", t = V(B.warning)) : this.message.level === E.LogEntryLevel.Error ? (e = "cross-circle-filled", t = V(B.error)) : this.message.originatesFromLogpoint ? (e = "console-logpoint", t = V(B.logpoint)) : this.message.originatesFromConditionalBreakpoint && (e = "console-conditional-breakpoint", t = V(B.cndBreakpoint)), e && (this.messageIcon = new O(), this.messageIcon.name = e, this.messageIcon.style.color = "", this.messageIcon.classList.add("message-level-icon", "small"), this.contentElementInternal && this.contentElementInternal.insertBefore(this.messageIcon, this.contentElementInternal.firstChild), b(this.messageIcon, t));
|
|
1084
|
+
}
|
|
1085
|
+
setAdjacentUserCommandResult(e) {
|
|
1086
|
+
this.#e = e, this.elementInternal?.classList.toggle("console-adjacent-user-command-result", this.#e);
|
|
1087
|
+
}
|
|
1088
|
+
repeatCount() {
|
|
1089
|
+
return this.repeatCountInternal || 1;
|
|
1090
|
+
}
|
|
1091
|
+
resetIncrementRepeatCount() {
|
|
1092
|
+
this.repeatCountInternal = 1, this.repeatCountElement &&= (this.repeatCountElement.remove(), this.contentElementInternal && this.contentElementInternal.classList.remove("repeated-message"), null);
|
|
1093
|
+
}
|
|
1094
|
+
incrementRepeatCount() {
|
|
1095
|
+
this.repeatCountInternal++, this.showRepeatCountElement();
|
|
1096
|
+
}
|
|
1097
|
+
setRepeatCount(e) {
|
|
1098
|
+
this.repeatCountInternal = e, this.showRepeatCountElement();
|
|
1099
|
+
}
|
|
1100
|
+
showRepeatCountElement() {
|
|
1101
|
+
if (!this.elementInternal) return;
|
|
1102
|
+
if (!this.repeatCountElement) {
|
|
1103
|
+
switch (this.repeatCountElement = document.createElement("dt-small-bubble"), this.repeatCountElement.classList.add("console-message-repeat-count"), this.message.level) {
|
|
1104
|
+
case E.LogEntryLevel.Warning:
|
|
1105
|
+
this.repeatCountElement.type = "warning";
|
|
1106
|
+
break;
|
|
1107
|
+
case E.LogEntryLevel.Error:
|
|
1108
|
+
this.repeatCountElement.type = "error";
|
|
1109
|
+
break;
|
|
1110
|
+
case E.LogEntryLevel.Verbose:
|
|
1111
|
+
this.repeatCountElement.type = "verbose";
|
|
1112
|
+
break;
|
|
1113
|
+
default: this.repeatCountElement.type = "info";
|
|
1114
|
+
}
|
|
1115
|
+
this.shouldRenderAsWarning() && (this.repeatCountElement.type = "warning"), this.consoleRowWrapper?.insertBefore(this.repeatCountElement, this.contentElementInternal), this.contentElement().classList.add("repeated-message");
|
|
1116
|
+
}
|
|
1117
|
+
this.repeatCountElement.textContent = `${this.repeatCountInternal}`;
|
|
1118
|
+
let e;
|
|
1119
|
+
e = this.message.level === E.LogEntryLevel.Warning ? V(B.warningS, { n: this.repeatCountInternal }) : this.message.level === E.LogEntryLevel.Error ? V(B.errorS, { n: this.repeatCountInternal }) : V(B.repeatS, { n: this.repeatCountInternal }), b(this.repeatCountElement, e);
|
|
1120
|
+
}
|
|
1121
|
+
get text() {
|
|
1122
|
+
return this.message.messageText;
|
|
1123
|
+
}
|
|
1124
|
+
toExportString() {
|
|
1125
|
+
let e = [], t = this.contentElement().childTextNodes().map(I.untruncatedNodeText).join("");
|
|
1126
|
+
for (let n = 0; n < this.repeatCount(); ++n) e.push(t);
|
|
1127
|
+
return e.join("\n");
|
|
1128
|
+
}
|
|
1129
|
+
toMessageTextString() {
|
|
1130
|
+
let e = this.contentElement().querySelector(".console-message-text");
|
|
1131
|
+
return e ? e.deepTextContent().trim() : this.consoleMessage().messageText;
|
|
1132
|
+
}
|
|
1133
|
+
setSearchRegex(e) {
|
|
1134
|
+
if (this.searchHighlightNodeChanges?.length && Nt(this.searchHighlightNodeChanges), this.searchRegexInternal = e, this.searchHighlightNodes = [], this.searchHighlightNodeChanges = [], !this.searchRegexInternal) return;
|
|
1135
|
+
let t = this.contentElement().deepTextContent(), n;
|
|
1136
|
+
this.searchRegexInternal.lastIndex = 0;
|
|
1137
|
+
let r = [];
|
|
1138
|
+
for (; (n = this.searchRegexInternal.exec(t)) && n[0];) r.push(new ln(n.index, n[0].length));
|
|
1139
|
+
r.length && (this.searchHighlightNodes = Vt(this.contentElement(), r, vt, this.searchHighlightNodeChanges));
|
|
1140
|
+
}
|
|
1141
|
+
searchRegex() {
|
|
1142
|
+
return this.searchRegexInternal;
|
|
1143
|
+
}
|
|
1144
|
+
searchCount() {
|
|
1145
|
+
return this.searchHighlightNodes.length;
|
|
1146
|
+
}
|
|
1147
|
+
searchHighlightNode(e) {
|
|
1148
|
+
return this.searchHighlightNodes[e];
|
|
1149
|
+
}
|
|
1150
|
+
async getInlineFrames(e, t, n, r) {
|
|
1151
|
+
let i = hn.instance(), a = gn.instance().projects().map((e) => e.uiSourceCodeForURL(t)).flat().filter((e) => !!e).map((e) => i.scriptsForUISourceCode(e)).flat();
|
|
1152
|
+
if (a.length) {
|
|
1153
|
+
let t = new ut(e, a[0].scriptId, n || 0, r), o = await i.pluginManager.getFunctionInfo(a[0], t);
|
|
1154
|
+
return o && "frames" in o ? o : { frames: [] };
|
|
1155
|
+
}
|
|
1156
|
+
return { frames: [] };
|
|
1157
|
+
}
|
|
1158
|
+
async expandInlineStackFrames(e, t, n, r, i, a, o, s) {
|
|
1159
|
+
let { frames: c } = await this.getInlineFrames(e, r, i, a);
|
|
1160
|
+
if (!c.length) return !1;
|
|
1161
|
+
for (let l = 0; l < c.length; ++l) {
|
|
1162
|
+
let { name: u } = c[l], d = document.createElement("span");
|
|
1163
|
+
H(d, this.linkifyStringAsFragment(`${t} ${u} (`));
|
|
1164
|
+
let f = this.linkifier.linkifyScriptLocation(e.target(), null, r, i, {
|
|
1165
|
+
columnNumber: a,
|
|
1166
|
+
inlineFrameIndex: l
|
|
1167
|
+
});
|
|
1168
|
+
f.tabIndex = -1, this.selectableChildren.push({
|
|
1169
|
+
element: f,
|
|
1170
|
+
forceSelect: () => f.focus()
|
|
1171
|
+
}), d.appendChild(f), H(d, this.linkifyStringAsFragment(n)), d.classList.add("formatted-stack-frame"), o.insertBefore(d, s);
|
|
1172
|
+
}
|
|
1173
|
+
return !0;
|
|
1174
|
+
}
|
|
1175
|
+
createScriptLocationLinkForSyntaxError(e, t) {
|
|
1176
|
+
let { scriptId: n, lineNumber: r, columnNumber: i } = t;
|
|
1177
|
+
if (!n) return;
|
|
1178
|
+
let a = t.url || e.scriptForId(n)?.sourceURL;
|
|
1179
|
+
if (!a) return;
|
|
1180
|
+
let o = this.linkifier.linkifyScriptLocation(e.target(), t.scriptId || null, a, r, {
|
|
1181
|
+
columnNumber: i,
|
|
1182
|
+
inlineFrameIndex: 0,
|
|
1183
|
+
showColumnNumber: !0
|
|
1184
|
+
});
|
|
1185
|
+
return o.tabIndex = -1, o;
|
|
1186
|
+
}
|
|
1187
|
+
tryFormatAsError(e, t) {
|
|
1188
|
+
let n = this.message.runtimeModel();
|
|
1189
|
+
if (!n) return null;
|
|
1190
|
+
let r = t?.exceptionMetaData?.issueSummary;
|
|
1191
|
+
typeof r == "string" && (e = _n(e, r));
|
|
1192
|
+
let i = un(n, e);
|
|
1193
|
+
if (!i?.length) return null;
|
|
1194
|
+
t?.stackTrace && fn(i, t.stackTrace);
|
|
1195
|
+
let a = n.debuggerModel(), o = document.createElement("span");
|
|
1196
|
+
for (let e = 0; e < i.length; ++e) {
|
|
1197
|
+
let n = e < i.length - 1 ? "\n" : "", { line: r, link: s, isCallFrame: c } = i[e];
|
|
1198
|
+
if (!s && t && r.startsWith("SyntaxError")) {
|
|
1199
|
+
H(o, this.linkifyStringAsFragment(r));
|
|
1200
|
+
let e = this.createScriptLocationLinkForSyntaxError(a, t);
|
|
1201
|
+
e && (o.append(" (at "), o.appendChild(e), o.append(")")), o.append(n);
|
|
1202
|
+
continue;
|
|
1203
|
+
}
|
|
1204
|
+
if (!c) {
|
|
1205
|
+
H(o, this.linkifyStringAsFragment(`${r}${n}`));
|
|
1206
|
+
continue;
|
|
1207
|
+
}
|
|
1208
|
+
let l = document.createElement("span");
|
|
1209
|
+
if (!s) {
|
|
1210
|
+
H(l, this.linkifyStringAsFragment(`${r}${n}`)), l.classList.add("formatted-builtin-stack-frame"), o.appendChild(l);
|
|
1211
|
+
continue;
|
|
1212
|
+
}
|
|
1213
|
+
let u = `${s.suffix}${n}`;
|
|
1214
|
+
H(l, this.linkifyStringAsFragment(s.prefix));
|
|
1215
|
+
let d = this.linkifier.linkifyScriptLocation(a.target(), s.scriptId || null, s.url, s.lineNumber, {
|
|
1216
|
+
columnNumber: s.columnNumber,
|
|
1217
|
+
inlineFrameIndex: 0,
|
|
1218
|
+
showColumnNumber: !0
|
|
1219
|
+
});
|
|
1220
|
+
if (d.tabIndex = -1, this.selectableChildren.push({
|
|
1221
|
+
element: d,
|
|
1222
|
+
forceSelect: () => d.focus()
|
|
1223
|
+
}), l.appendChild(d), H(l, this.linkifyStringAsFragment(u)), l.classList.add("formatted-stack-frame"), o.appendChild(l), !s.enclosedInBraces) continue;
|
|
1224
|
+
let f = s.prefix.substring(0, s.prefix.lastIndexOf(" ", s.prefix.length - 3)), p = this.selectableChildren.length - 1;
|
|
1225
|
+
this.expandInlineStackFrames(a, f, u, s.url, s.lineNumber, s.columnNumber, o, l).then((e) => {
|
|
1226
|
+
e && (o.removeChild(l), this.selectableChildren.splice(p, 1));
|
|
1227
|
+
});
|
|
1228
|
+
}
|
|
1229
|
+
return o;
|
|
1230
|
+
}
|
|
1231
|
+
linkifyWithCustomLinkifier(t, n) {
|
|
1232
|
+
if (t.length > oi()) {
|
|
1233
|
+
let e = new In();
|
|
1234
|
+
return e.text = t, e.maxLength = ci(), e;
|
|
1235
|
+
}
|
|
1236
|
+
let r = document.createDocumentFragment(), i = e.tokenizeMessageText(t), a = !1;
|
|
1237
|
+
for (let e of i) if (e.text) switch (a &&= (e.text = `blob:${e.text}`, !a), e.text === "'blob:" && e === i[0] && (a = !0, e.text = "'"), e.type) {
|
|
1238
|
+
case "url": {
|
|
1239
|
+
let t = e.text.startsWith("www.") ? "http://" + e.text : e.text, i = p.splitLineAndColumn(t), a = p.removeWasmFunctionInfoFromURL(i.url), o;
|
|
1240
|
+
o = i ? n(e.text, a, i.lineNumber, i.columnNumber) : n(e.text, ""), r.appendChild(o);
|
|
1241
|
+
break;
|
|
1242
|
+
}
|
|
1243
|
+
default:
|
|
1244
|
+
r.appendChild(document.createTextNode(e.text));
|
|
1245
|
+
break;
|
|
1246
|
+
}
|
|
1247
|
+
return r;
|
|
1248
|
+
}
|
|
1249
|
+
linkifyStringAsFragment(e) {
|
|
1250
|
+
return this.linkifyWithCustomLinkifier(e, (e, t, n, r) => {
|
|
1251
|
+
let i = {
|
|
1252
|
+
text: e,
|
|
1253
|
+
lineNumber: n,
|
|
1254
|
+
columnNumber: r
|
|
1255
|
+
}, a = I.linkifyURL(t, i);
|
|
1256
|
+
return a.tabIndex = -1, this.selectableChildren.push({
|
|
1257
|
+
element: a,
|
|
1258
|
+
forceSelect: () => a.focus()
|
|
1259
|
+
}), a;
|
|
1260
|
+
});
|
|
1261
|
+
}
|
|
1262
|
+
static tokenizeMessageText(e) {
|
|
1263
|
+
let { tokenizerRegexes: t, tokenizerTypes: n } = Qr();
|
|
1264
|
+
return e.length > oi() ? [{
|
|
1265
|
+
text: e,
|
|
1266
|
+
type: void 0
|
|
1267
|
+
}] : cn.splitStringByRegexes(e, t).map((e) => ({
|
|
1268
|
+
text: e.value,
|
|
1269
|
+
type: n[e.regexIndex]
|
|
1270
|
+
}));
|
|
1271
|
+
}
|
|
1272
|
+
groupKey() {
|
|
1273
|
+
return this.groupKeyInternal ||= this.message.groupCategoryKey() + ":" + this.groupTitle(), this.groupKeyInternal;
|
|
1274
|
+
}
|
|
1275
|
+
groupTitle() {
|
|
1276
|
+
return e.tokenizeMessageText(this.message.messageText).reduce((e, t) => {
|
|
1277
|
+
let n = t.text;
|
|
1278
|
+
return t.type === "url" ? n = V(B.url) : t.type === "time" ? n = V(B.tookNms) : t.type === "event" ? n = V(B.someEvent) : t.type === "milestone" ? n = V(B.Mxx) : t.type === "autofill" && (n = V(B.attribute)), e + n;
|
|
1279
|
+
}, "").replace(/[%]o/g, "");
|
|
1280
|
+
}
|
|
1281
|
+
}, Xr = null, Zr = null;
|
|
1282
|
+
function Qr() {
|
|
1283
|
+
if (!Xr || !Zr) {
|
|
1284
|
+
let e = /* @__PURE__ */ RegExp("(?:[a-zA-Z][a-zA-Z0-9+.-]{2,}:\\/\\/|data:|www\\.)[^\\s\\u0000-\\u0020\\u007f-\\u009f\"]{2,}[^\\s\\u0000-\\u0020\\u007f-\\u009f\"')}\\],:;.!?]", "u"), t = /(?:\/[\w\.-]*)+\:[\d]+/, n = /took [\d]+ms/, r = /'\w+' event/, i = /\sM[6-7]\d/, a = /\(suggested: \"[\w-]+\"\)/, o = /* @__PURE__ */ new Map();
|
|
1285
|
+
return o.set(e, "url"), o.set(t, "url"), o.set(n, "time"), o.set(r, "event"), o.set(i, "milestone"), o.set(a, "autofill"), Xr = Array.from(o.keys()), Zr = Array.from(o.values()), {
|
|
1286
|
+
tokenizerRegexes: Xr,
|
|
1287
|
+
tokenizerTypes: Zr
|
|
1288
|
+
};
|
|
1289
|
+
}
|
|
1290
|
+
return {
|
|
1291
|
+
tokenizerRegexes: Xr,
|
|
1292
|
+
tokenizerTypes: Zr
|
|
1293
|
+
};
|
|
1294
|
+
}
|
|
1295
|
+
var $r = class extends U {
|
|
1296
|
+
collapsedInternal;
|
|
1297
|
+
expandGroupIcon;
|
|
1298
|
+
onToggle;
|
|
1299
|
+
groupEndMessageInternal;
|
|
1300
|
+
constructor(e, t, n, r, i, a) {
|
|
1301
|
+
console.assert(e.isGroupStartMessage()), super(e, t, n, r, a), this.collapsedInternal = e.type === T.ConsoleAPICalledEventType.StartGroupCollapsed, this.expandGroupIcon = null, this.onToggle = i, this.groupEndMessageInternal = null;
|
|
1302
|
+
}
|
|
1303
|
+
setCollapsed(e) {
|
|
1304
|
+
this.setCollapsedSilent(e), this.onToggle.call(null);
|
|
1305
|
+
}
|
|
1306
|
+
setCollapsedSilent(e) {
|
|
1307
|
+
this.collapsedInternal = e, this.expandGroupIcon && (this.expandGroupIcon.name = this.collapsedInternal ? "triangle-right" : "triangle-down");
|
|
1308
|
+
}
|
|
1309
|
+
collapsed() {
|
|
1310
|
+
return this.collapsedInternal;
|
|
1311
|
+
}
|
|
1312
|
+
maybeHandleOnKeyDown(e) {
|
|
1313
|
+
return this.focusedChildIndex() === -1 && (e.key === "ArrowLeft" && !this.collapsedInternal || e.key === "ArrowRight" && this.collapsedInternal) ? (this.setCollapsed(!this.collapsedInternal), !0) : super.maybeHandleOnKeyDown(e);
|
|
1314
|
+
}
|
|
1315
|
+
toMessageElement() {
|
|
1316
|
+
let e = this.elementInternal || null;
|
|
1317
|
+
if (!e) {
|
|
1318
|
+
e = super.toMessageElement();
|
|
1319
|
+
let t = this.collapsedInternal ? "triangle-right" : "triangle-down";
|
|
1320
|
+
this.expandGroupIcon = Ae(t, "expand-group-icon"), this.contentElement().tabIndex = -1, this.repeatCountElement ? this.repeatCountElement.insertBefore(this.expandGroupIcon, this.repeatCountElement.firstChild) : this.consoleRowWrapper?.insertBefore(this.expandGroupIcon, this.contentElementInternal), e.addEventListener("click", () => this.setCollapsed(!this.collapsedInternal));
|
|
1321
|
+
}
|
|
1322
|
+
return e;
|
|
1323
|
+
}
|
|
1324
|
+
showRepeatCountElement() {
|
|
1325
|
+
super.showRepeatCountElement(), this.repeatCountElement && this.expandGroupIcon && this.repeatCountElement.insertBefore(this.expandGroupIcon, this.repeatCountElement.firstChild);
|
|
1326
|
+
}
|
|
1327
|
+
messagesHidden() {
|
|
1328
|
+
return this.collapsed() ? !0 : !!this.consoleGroup()?.messagesHidden();
|
|
1329
|
+
}
|
|
1330
|
+
setGroupEnd(e) {
|
|
1331
|
+
if (e.consoleMessage().type !== T.ConsoleAPICalledEventType.EndGroup) throw Error("Invalid console message as group end");
|
|
1332
|
+
if (this.groupEndMessageInternal !== null) throw Error("Console group already has an end");
|
|
1333
|
+
this.groupEndMessageInternal = e;
|
|
1334
|
+
}
|
|
1335
|
+
groupEnd() {
|
|
1336
|
+
return this.groupEndMessageInternal;
|
|
1337
|
+
}
|
|
1338
|
+
}, ei = class extends U {
|
|
1339
|
+
formattedCommand;
|
|
1340
|
+
constructor(e, t, n, r, i) {
|
|
1341
|
+
super(e, t, n, r, i), this.formattedCommand = null;
|
|
1342
|
+
}
|
|
1343
|
+
contentElement() {
|
|
1344
|
+
let e = this.getContentElement();
|
|
1345
|
+
if (e) return e;
|
|
1346
|
+
let t = document.createElement("div");
|
|
1347
|
+
this.setContentElement(t), t.classList.add("console-user-command");
|
|
1348
|
+
let n = new O();
|
|
1349
|
+
return n.name = "chevron-right", n.classList.add("command-result-icon", "medium"), t.appendChild(n), Vr.set(t, this), this.formattedCommand = document.createElement("span"), this.formattedCommand.classList.add("source-code"), this.formattedCommand.textContent = i(this.text), t.appendChild(this.formattedCommand), this.formattedCommand.textContent.length < ri ? cr(this.formattedCommand, "text/javascript").then(this.updateSearch.bind(this)) : this.updateSearch(), this.updateTimestamp(), t;
|
|
1350
|
+
}
|
|
1351
|
+
updateSearch() {
|
|
1352
|
+
this.setSearchRegex(this.searchRegex());
|
|
1353
|
+
}
|
|
1354
|
+
}, ti = class extends U {
|
|
1355
|
+
contentElement() {
|
|
1356
|
+
let e = super.contentElement();
|
|
1357
|
+
if (!e.classList.contains("console-user-command-result") && (e.classList.add("console-user-command-result"), this.consoleMessage().level === E.LogEntryLevel.Info)) {
|
|
1358
|
+
let t = new O();
|
|
1359
|
+
t.name = "chevron-left-dot", t.classList.add("command-result-icon", "medium"), e.insertBefore(t, e.firstChild);
|
|
1360
|
+
}
|
|
1361
|
+
return e;
|
|
1362
|
+
}
|
|
1363
|
+
}, ni = class extends U {
|
|
1364
|
+
dataGrid;
|
|
1365
|
+
constructor(e, t, n, r, i) {
|
|
1366
|
+
super(e, t, n, r, i), console.assert(e.type === T.ConsoleAPICalledEventType.Table), this.dataGrid = null;
|
|
1367
|
+
}
|
|
1368
|
+
wasShown() {
|
|
1369
|
+
this.dataGrid && this.dataGrid.updateWidths(), super.wasShown();
|
|
1370
|
+
}
|
|
1371
|
+
onResize() {
|
|
1372
|
+
this.isVisible() && this.dataGrid && this.dataGrid.onResize();
|
|
1373
|
+
}
|
|
1374
|
+
contentElement() {
|
|
1375
|
+
let e = this.getContentElement();
|
|
1376
|
+
if (e) return e;
|
|
1377
|
+
let t = document.createElement("div");
|
|
1378
|
+
return t.classList.add("console-message"), this.messageIcon && t.appendChild(this.messageIcon), this.setContentElement(t), t.appendChild(this.buildTableMessage()), this.updateTimestamp(), t;
|
|
1379
|
+
}
|
|
1380
|
+
buildTableMessage() {
|
|
1381
|
+
let e = document.createElement("span");
|
|
1382
|
+
e.classList.add("source-code"), this.anchorElement = this.buildMessageAnchor(), this.anchorElement && e.appendChild(this.anchorElement);
|
|
1383
|
+
let t = this.message.parameters?.length ? this.message.parameters[0] : null;
|
|
1384
|
+
if (!t) return this.buildMessage();
|
|
1385
|
+
let n = Wr(this.message.runtimeModel())(t);
|
|
1386
|
+
if (!n?.preview) return this.buildMessage();
|
|
1387
|
+
let r = Symbol("rawValueColumn"), i = [], a = n.preview, o = [];
|
|
1388
|
+
for (let e = 0; e < a.properties.length; ++e) {
|
|
1389
|
+
let t = a.properties[e], s;
|
|
1390
|
+
if (t.valuePreview?.properties.length) s = t.valuePreview.properties;
|
|
1391
|
+
else if (t.value || t.value === "") s = [{
|
|
1392
|
+
name: r,
|
|
1393
|
+
type: t.type,
|
|
1394
|
+
value: t.value
|
|
1395
|
+
}];
|
|
1396
|
+
else continue;
|
|
1397
|
+
let c = /* @__PURE__ */ new Map();
|
|
1398
|
+
for (let e = 0; e < s.length; ++e) {
|
|
1399
|
+
let r = s[e], a = i.indexOf(r.name) !== -1;
|
|
1400
|
+
if (!a) {
|
|
1401
|
+
if (i.length === 20) continue;
|
|
1402
|
+
a = !0, i.push(r.name);
|
|
1403
|
+
}
|
|
1404
|
+
if (a) {
|
|
1405
|
+
let e = this.renderPropertyPreviewOrAccessor(n, r, [t, r]).firstElementChild;
|
|
1406
|
+
e.classList.add("console-message-nowrap-below"), c.set(r.name, e);
|
|
1407
|
+
}
|
|
1408
|
+
}
|
|
1409
|
+
o.push({
|
|
1410
|
+
rowName: t.name,
|
|
1411
|
+
rowValue: c
|
|
1412
|
+
});
|
|
1413
|
+
}
|
|
1414
|
+
let s = [];
|
|
1415
|
+
for (let { rowName: e, rowValue: t } of o) {
|
|
1416
|
+
s.push(e);
|
|
1417
|
+
for (let e = 0; e < i.length; ++e) s.push(t.get(i[e]));
|
|
1418
|
+
}
|
|
1419
|
+
i.unshift(V(B.index));
|
|
1420
|
+
let c = i.map((e) => e === r ? V(B.value) : e.toString());
|
|
1421
|
+
if (s.length && (this.dataGrid = vr.create(c, s, V(B.console)), this.dataGrid)) {
|
|
1422
|
+
this.dataGrid.setStriped(!0), this.dataGrid.setFocusable(!1);
|
|
1423
|
+
let t = document.createElement("span");
|
|
1424
|
+
t.classList.add("console-message-text");
|
|
1425
|
+
let r = t.createChild("div", "console-message-formatted-table"), i = r.createChild("span");
|
|
1426
|
+
r.appendChild(this.formatParameter(n, !0, !1));
|
|
1427
|
+
let a = i.attachShadow({ mode: "open" }), o = this.dataGrid.asWidget();
|
|
1428
|
+
o.markAsRoot(), o.show(a), o.registerRequiredCSS(Rr, lr), e.appendChild(t), this.dataGrid.renderInline();
|
|
1429
|
+
}
|
|
1430
|
+
return e;
|
|
1431
|
+
}
|
|
1432
|
+
approximateFastHeight() {
|
|
1433
|
+
let e = this.message.parameters?.[0];
|
|
1434
|
+
return e && typeof e != "string" && e.preview ? Ur * e.preview.properties.length : Ur;
|
|
1435
|
+
}
|
|
1436
|
+
}, ri = 1e4, ii = 1e4, ai = 5e3, oi = () => ii, si = (e) => {
|
|
1437
|
+
ii = e;
|
|
1438
|
+
}, ci = () => ai, li = (e) => {
|
|
1439
|
+
ai = e;
|
|
1440
|
+
}, ui = /* @__PURE__ */ e({
|
|
1441
|
+
PromptBuilder: () => hi,
|
|
1442
|
+
SourceType: () => mi,
|
|
1443
|
+
allowHeader: () => gi,
|
|
1444
|
+
formatConsoleMessage: () => xi,
|
|
1445
|
+
formatNetworkRequest: () => bi,
|
|
1446
|
+
formatRelatedCode: () => vi,
|
|
1447
|
+
lineWhitespace: () => _i
|
|
1448
|
+
}), di = 1e3, fi = 1e3, pi = 1e3, mi = /* @__PURE__ */ function(e) {
|
|
1449
|
+
return e.MESSAGE = "message", e.STACKTRACE = "stacktrace", e.NETWORK_REQUEST = "networkRequest", e.RELATED_CODE = "relatedCode", e;
|
|
1450
|
+
}({}), hi = class {
|
|
1451
|
+
#e;
|
|
1452
|
+
constructor(e) {
|
|
1453
|
+
this.#e = e;
|
|
1454
|
+
}
|
|
1455
|
+
async getNetworkRequest() {
|
|
1456
|
+
let e = this.#e.consoleMessage().getAffectedResources()?.requestId;
|
|
1457
|
+
if (e) return xn.instance().requestsForId(e)[0];
|
|
1458
|
+
}
|
|
1459
|
+
async getMessageSourceCode() {
|
|
1460
|
+
let e = this.#e.consoleMessage().stackTrace?.callFrames[0], t = this.#e.consoleMessage().runtimeModel(), n = t?.debuggerModel();
|
|
1461
|
+
if (!n || !t || !e) return {
|
|
1462
|
+
text: "",
|
|
1463
|
+
columnNumber: 0,
|
|
1464
|
+
lineNumber: 0
|
|
1465
|
+
};
|
|
1466
|
+
let r = new ut(n, e.scriptId, e.lineNumber, e.columnNumber), i = await hn.instance().rawLocationToUILocation(r), a = await i?.uiSourceCode.requestContentData().then((e) => sn.asDeferredContent(e)), o = !a?.isEncoded && a?.content ? a.content : "", s = o.indexOf("\n");
|
|
1467
|
+
if (o.length > pi && (s < 0 || s > pi)) {
|
|
1468
|
+
let { formattedContent: e, formattedMapping: t } = await _e(i?.uiSourceCode.mimeType() ?? "text/javascript", o), [n, r] = t.originalToFormatted(i?.lineNumber ?? 0, i?.columnNumber ?? 0);
|
|
1469
|
+
return {
|
|
1470
|
+
text: e,
|
|
1471
|
+
columnNumber: r,
|
|
1472
|
+
lineNumber: n
|
|
1473
|
+
};
|
|
1474
|
+
}
|
|
1475
|
+
return {
|
|
1476
|
+
text: o,
|
|
1477
|
+
columnNumber: i?.columnNumber ?? 0,
|
|
1478
|
+
lineNumber: i?.lineNumber ?? 0
|
|
1479
|
+
};
|
|
1480
|
+
}
|
|
1481
|
+
async buildPrompt(e = Object.values(mi)) {
|
|
1482
|
+
let [t, n] = await Promise.all([e.includes("relatedCode") ? this.getMessageSourceCode() : void 0, e.includes("networkRequest") ? this.getNetworkRequest() : void 0]), r = t?.text ? vi(t) : "", i = n ? bi(n) : "", a = e.includes("stacktrace") ? await Si(this.#e) : "", o = xi(this.#e), s = this.formatPrompt({
|
|
1483
|
+
message: [o, a].join("\n").trim(),
|
|
1484
|
+
relatedCode: r,
|
|
1485
|
+
relatedRequest: i
|
|
1486
|
+
}), c = [{
|
|
1487
|
+
type: "message",
|
|
1488
|
+
value: o
|
|
1489
|
+
}];
|
|
1490
|
+
return a && c.push({
|
|
1491
|
+
type: "stacktrace",
|
|
1492
|
+
value: a
|
|
1493
|
+
}), r && c.push({
|
|
1494
|
+
type: "relatedCode",
|
|
1495
|
+
value: r
|
|
1496
|
+
}), i && c.push({
|
|
1497
|
+
type: "networkRequest",
|
|
1498
|
+
value: i
|
|
1499
|
+
}), {
|
|
1500
|
+
prompt: s,
|
|
1501
|
+
sources: c,
|
|
1502
|
+
isPageReloadRecommended: e.includes("networkRequest") && !!this.#e.consoleMessage().getAffectedResources()?.requestId && !i
|
|
1503
|
+
};
|
|
1504
|
+
}
|
|
1505
|
+
formatPrompt({ message: e, relatedCode: t, relatedRequest: n }) {
|
|
1506
|
+
let r = `Please explain the following console error or warning:
|
|
1507
|
+
|
|
1508
|
+
\`\`\`
|
|
1509
|
+
${e}
|
|
1510
|
+
\`\`\``;
|
|
1511
|
+
return t && (r += `
|
|
1512
|
+
For the following code:
|
|
1513
|
+
|
|
1514
|
+
\`\`\`
|
|
1515
|
+
${t}
|
|
1516
|
+
\`\`\``), n && (r += `
|
|
1517
|
+
For the following network request:
|
|
1518
|
+
|
|
1519
|
+
\`\`\`
|
|
1520
|
+
${n}
|
|
1521
|
+
\`\`\``), r;
|
|
1522
|
+
}
|
|
1523
|
+
getSearchQuery() {
|
|
1524
|
+
let e = this.#e.toMessageTextString();
|
|
1525
|
+
return e &&= e.split("\n")[0], e;
|
|
1526
|
+
}
|
|
1527
|
+
};
|
|
1528
|
+
function gi(e) {
|
|
1529
|
+
let t = e.name.toLowerCase().trim();
|
|
1530
|
+
return !(t.startsWith("x-") || t === "cookie" || t === "set-cookie" || t === "authorization");
|
|
1531
|
+
}
|
|
1532
|
+
function _i(e) {
|
|
1533
|
+
let t = /^\s*/.exec(e);
|
|
1534
|
+
if (!t?.length) return null;
|
|
1535
|
+
let n = t[0];
|
|
1536
|
+
return n === e ? null : n;
|
|
1537
|
+
}
|
|
1538
|
+
function vi({ text: e, columnNumber: t, lineNumber: n }, r = pi) {
|
|
1539
|
+
let i = e.split("\n");
|
|
1540
|
+
if (i[n].length >= r / 2) {
|
|
1541
|
+
let e = Math.max(t - r / 2, 0), a = Math.min(t + r / 2, i[n].length);
|
|
1542
|
+
return i[n].substring(e, a);
|
|
1543
|
+
}
|
|
1544
|
+
let a = 0, o = n, s = _i(i[n]), c = /* @__PURE__ */ new Map();
|
|
1545
|
+
for (; i[o] !== void 0 && a + i[o].length <= r / 2;) {
|
|
1546
|
+
let e = _i(i[o]);
|
|
1547
|
+
e !== null && s !== null && (e === s || !e.startsWith(s)) && (/^\s*[\}\)\]]/.exec(i[o]) || c.set(e, o), s = e), a += i[o].length + 1, o--;
|
|
1548
|
+
}
|
|
1549
|
+
o = n + 1;
|
|
1550
|
+
let l = n, u = n;
|
|
1551
|
+
for (s = _i(i[n]); i[o] !== void 0 && a + i[o].length <= r;) {
|
|
1552
|
+
a += i[o].length;
|
|
1553
|
+
let e = _i(i[o]);
|
|
1554
|
+
if (e !== null && s !== null && (e === s || !e.startsWith(s))) {
|
|
1555
|
+
let t = i[o + 1], n = t ? _i(t) : null;
|
|
1556
|
+
(!n || n === e || !n.startsWith(e)) && c.has(e) && (l = c.get(e) ?? 0, u = o), s = e;
|
|
1557
|
+
}
|
|
1558
|
+
o++;
|
|
1559
|
+
}
|
|
1560
|
+
return i.slice(l, u + 1).join("\n");
|
|
1561
|
+
}
|
|
1562
|
+
function yi(e, t, n) {
|
|
1563
|
+
let r = "";
|
|
1564
|
+
for (let e of t) {
|
|
1565
|
+
if (r.length + e.length > n) break;
|
|
1566
|
+
r += e;
|
|
1567
|
+
}
|
|
1568
|
+
return r = r.trim(), r && e ? e + "\n" + r : r;
|
|
1569
|
+
}
|
|
1570
|
+
function bi(e) {
|
|
1571
|
+
return `Request: ${e.url()}
|
|
1572
|
+
|
|
1573
|
+
${Tn.formatHeaders("Request headers:", e.requestHeaders())}
|
|
1574
|
+
|
|
1575
|
+
${Tn.formatHeaders("Response headers:", e.responseHeaders)}
|
|
1576
|
+
|
|
1577
|
+
Response status: ${e.statusCode} ${e.statusText}`;
|
|
1578
|
+
}
|
|
1579
|
+
function xi(e) {
|
|
1580
|
+
return e.toMessageTextString().substr(0, di);
|
|
1581
|
+
}
|
|
1582
|
+
async function Si(e) {
|
|
1583
|
+
let t = e.contentElement().querySelector(".stack-preview-container");
|
|
1584
|
+
if (!t) return "";
|
|
1585
|
+
let n = A.get(t);
|
|
1586
|
+
return n ? (await n.updateComplete, yi("", n.contentElement.querySelector(".stack-preview-container").childTextNodes().filter((e) => !e.parentElement?.closest(".show-all-link,.show-less-link,.hidden-row")).map(I.untruncatedNodeText), fi)) : "";
|
|
1587
|
+
}
|
|
1588
|
+
//#endregion
|
|
1589
|
+
//#region node_modules/.pnpm/chrome-devtools-frontend@1.0.1638082/node_modules/chrome-devtools-frontend/front_end/panels/console/ConsoleInsightTeaser.ts
|
|
1590
|
+
var Ci = /* @__PURE__ */ e({
|
|
1591
|
+
ConsoleInsightTeaser: () => zi,
|
|
1592
|
+
DEFAULT_VIEW: () => Ri
|
|
1593
|
+
}), { render: wi, html: W, Directives: { ref: Ti } } = je, Ei = "https://developer.chrome.com/docs/ai/built-in", G = {
|
|
1594
|
+
learnMore: "Learn more",
|
|
1595
|
+
learnMoreAboutAiSummaries: "Learn more about AI summaries",
|
|
1596
|
+
freDisclaimerHeader: "Get explanations for console warnings and errors",
|
|
1597
|
+
freDisclaimerTextAiWontAlwaysGetItRight: "This feature uses AI and won’t always get it right",
|
|
1598
|
+
consoleInsightsSendsData: "To generate explanations, the console message, associated stack trace, related source code, and the associated network headers are sent to Google. This data may be seen by human reviewers to improve this feature.",
|
|
1599
|
+
consoleInsightsSendsDataNoLogging: "To generate explanations, the console message, associated stack trace, related source code, and the associated network headers are sent to Google. This data will not be used to improve Google’s AI models. Your organization may change these settings at any time.",
|
|
1600
|
+
freDisclaimerTextUseWithCaution: "Use generated code snippets with caution",
|
|
1601
|
+
infoTooltipText: "The text above has been generated with AI on your local device. Clicking the button will send the console message, stack trace, related source code, and the associated network headers to Google to generate a more detailed explanation.",
|
|
1602
|
+
summarizing: "Summarizing…",
|
|
1603
|
+
summarizingTakesABitLonger: "Summarizing takes a bit longer…",
|
|
1604
|
+
loading: "Loading",
|
|
1605
|
+
tellMeMore: "Tell me more",
|
|
1606
|
+
dontShow: "Don’t show",
|
|
1607
|
+
learnDataUsage: "Learn more about how your data is used",
|
|
1608
|
+
summaryNotAvailable: "Summary not available",
|
|
1609
|
+
getHelpForWarning: "Get help understanding this warning",
|
|
1610
|
+
getHelpForError: "Get help understanding this error",
|
|
1611
|
+
toUseDownload: "To use Chrome’s Built-in AI here and elsewhere, download the AI model (~4 GB).",
|
|
1612
|
+
downloadModel: "Download model",
|
|
1613
|
+
downloadingAiModel: "Downloading AI model",
|
|
1614
|
+
progress: "Progress",
|
|
1615
|
+
progressUnknown: "Progress: unknown"
|
|
1616
|
+
}, K = ne, Di = "https://support.google.com/legal/answer/13505487", Oi = "https://developer.chrome.com/docs/devtools/ai-assistance/get-started#data-use", ki = "explain.console-message.teaser", Ai = 3500;
|
|
1617
|
+
function ji(e) {
|
|
1618
|
+
return W`
|
|
1619
|
+
<div class="teaser-tooltip-container">
|
|
1620
|
+
<div class="response-container">
|
|
1621
|
+
<h2>${e.isForWarning ? K(G.getHelpForWarning) : K(G.getHelpForError)}
|
|
1622
|
+
</h2>
|
|
1623
|
+
<div>You can get quick answers from <devtools-link
|
|
1624
|
+
jslogcontext="insights-teaser-built-in-ai-documentation"
|
|
1625
|
+
class="link"
|
|
1626
|
+
href=${Ei}
|
|
1627
|
+
>
|
|
1628
|
+
Chrome’s Built-in AI
|
|
1629
|
+
</devtools-link>
|
|
1630
|
+
, without any data leaving your device.
|
|
1631
|
+
</div>
|
|
1632
|
+
<div>${K(G.toUseDownload)}</div>
|
|
1633
|
+
</div>
|
|
1634
|
+
<div class="tooltip-footer">
|
|
1635
|
+
<devtools-button
|
|
1636
|
+
title=${K(G.downloadModel)}
|
|
1637
|
+
.jslogContext=${"insights-teaser-download-model"}
|
|
1638
|
+
.variant=${he.PRIMARY}
|
|
1639
|
+
@click=${e.onDownloadModelClick}
|
|
1640
|
+
@focusout=${(e) => {
|
|
1641
|
+
e.stopPropagation();
|
|
1642
|
+
}}
|
|
1643
|
+
>
|
|
1644
|
+
${K(G.downloadModel)}
|
|
1645
|
+
</devtools-button>
|
|
1646
|
+
${Fi(e)}
|
|
1647
|
+
</div>
|
|
1648
|
+
</div>
|
|
1649
|
+
`;
|
|
1650
|
+
}
|
|
1651
|
+
function Mi(e) {
|
|
1652
|
+
let t = ((e.downloadProgress || 0) * 100).toFixed(0);
|
|
1653
|
+
return W`
|
|
1654
|
+
<div class="teaser-tooltip-container">
|
|
1655
|
+
<div class="response-container">
|
|
1656
|
+
<h2>${K(G.downloadingAiModel)}</h2>
|
|
1657
|
+
<div class="progress-line">
|
|
1658
|
+
${e.downloadProgress === null ? W`
|
|
1659
|
+
<div class="label">${K(G.progressUnknown)}</div>
|
|
1660
|
+
` : W`
|
|
1661
|
+
<div class="label">${K(G.progress)}</div>
|
|
1662
|
+
<div class="indicator-container">
|
|
1663
|
+
<div
|
|
1664
|
+
class="indicator"
|
|
1665
|
+
role="progressbar"
|
|
1666
|
+
aria-valuemin="0"
|
|
1667
|
+
aria-valuemax="100"
|
|
1668
|
+
aria-valuenow=${t}
|
|
1669
|
+
style="width: ${t}%"
|
|
1670
|
+
></div>
|
|
1671
|
+
</div>
|
|
1672
|
+
`}
|
|
1673
|
+
</div>
|
|
1674
|
+
</div>
|
|
1675
|
+
<div class="tooltip-footer">
|
|
1676
|
+
<devtools-button
|
|
1677
|
+
title=${K(G.downloadModel)}
|
|
1678
|
+
.jslogContext=${"insights-teaser-download-model"}
|
|
1679
|
+
.variant=${he.PRIMARY}
|
|
1680
|
+
.disabled=${!0}
|
|
1681
|
+
>
|
|
1682
|
+
${K(G.downloadModel)}
|
|
1683
|
+
</devtools-button>
|
|
1684
|
+
</div>
|
|
1685
|
+
</div>
|
|
1686
|
+
`;
|
|
1687
|
+
}
|
|
1688
|
+
function Ni(e) {
|
|
1689
|
+
return W`
|
|
1690
|
+
<div class="teaser-tooltip-container">
|
|
1691
|
+
<div class="response-container">
|
|
1692
|
+
<h2>${e.isSlowGeneration ? K(G.summarizingTakesABitLonger) : K(G.summarizing)}</h2>
|
|
1693
|
+
<div
|
|
1694
|
+
role="presentation"
|
|
1695
|
+
aria-label=${K(G.loading)}
|
|
1696
|
+
class="loader"
|
|
1697
|
+
style="clip-path: url(${"#clipPath-" + e.uuid});"
|
|
1698
|
+
>
|
|
1699
|
+
<svg width="100%" height="58">
|
|
1700
|
+
<defs>
|
|
1701
|
+
<clipPath id=${"clipPath-" + e.uuid}>
|
|
1702
|
+
<rect x="0" y="0" width="100%" height="12" rx="8"></rect>
|
|
1703
|
+
<rect x="0" y="20" width="100%" height="12" rx="8"></rect>
|
|
1704
|
+
<rect x="0" y="40" width="100%" height="12" rx="8"></rect>
|
|
1705
|
+
</clipPath>
|
|
1706
|
+
</defs>
|
|
1707
|
+
</svg>
|
|
1708
|
+
</div>
|
|
1709
|
+
</div>
|
|
1710
|
+
${Ii(e)}
|
|
1711
|
+
</div>
|
|
1712
|
+
`;
|
|
1713
|
+
}
|
|
1714
|
+
function Pi(e) {
|
|
1715
|
+
return W`
|
|
1716
|
+
<div class="teaser-tooltip-container">
|
|
1717
|
+
<h2>${K(G.summaryNotAvailable)}</h2>
|
|
1718
|
+
${Ii(e)}
|
|
1719
|
+
</div>
|
|
1720
|
+
`;
|
|
1721
|
+
}
|
|
1722
|
+
function Fi(e) {
|
|
1723
|
+
return W`
|
|
1724
|
+
<devtools-checkbox
|
|
1725
|
+
aria-label=${K(G.dontShow)}
|
|
1726
|
+
@change=${e.dontShowChanged}
|
|
1727
|
+
jslog=${yt("explain.teaser.dont-show").track({ change: !0 })}>
|
|
1728
|
+
${K(G.dontShow)}
|
|
1729
|
+
</devtools-checkbox>
|
|
1730
|
+
`;
|
|
1731
|
+
}
|
|
1732
|
+
function Ii(e) {
|
|
1733
|
+
return W`
|
|
1734
|
+
<div class="tooltip-footer">
|
|
1735
|
+
${e.hasTellMeMoreButton ? W`
|
|
1736
|
+
<devtools-button
|
|
1737
|
+
title=${K(G.tellMeMore)}
|
|
1738
|
+
.jslogContext=${"insights-teaser-tell-me-more"}
|
|
1739
|
+
.variant=${he.PRIMARY}
|
|
1740
|
+
@click=${e.onTellMeMoreClick}
|
|
1741
|
+
>
|
|
1742
|
+
<devtools-icon class="lightbulb-icon" name="lightbulb-spark"></devtools-icon>
|
|
1743
|
+
${K(G.tellMeMore)}
|
|
1744
|
+
</devtools-button>
|
|
1745
|
+
` : ot}
|
|
1746
|
+
<devtools-button
|
|
1747
|
+
.iconName=${"info"}
|
|
1748
|
+
.variant=${he.ICON}
|
|
1749
|
+
aria-details=${"teaser-info-tooltip-" + e.uuid}
|
|
1750
|
+
.accessibleLabel=${K(G.learnDataUsage)}
|
|
1751
|
+
></devtools-button>
|
|
1752
|
+
<devtools-tooltip
|
|
1753
|
+
id=${"teaser-info-tooltip-" + e.uuid}
|
|
1754
|
+
variant="rich"
|
|
1755
|
+
jslogContext="teaser-info-tooltip"
|
|
1756
|
+
trigger="both"
|
|
1757
|
+
hover-delay=500
|
|
1758
|
+
>
|
|
1759
|
+
<div class="info-tooltip-text">${K(G.infoTooltipText)}</div>
|
|
1760
|
+
<div class="learn-more">
|
|
1761
|
+
<devtools-link
|
|
1762
|
+
class="devtools-link"
|
|
1763
|
+
title=${K(G.learnMoreAboutAiSummaries)}
|
|
1764
|
+
href=${Oi}
|
|
1765
|
+
jslogcontext="explain.teaser.learn-more"
|
|
1766
|
+
>${K(G.learnMoreAboutAiSummaries)}</devtools-link>
|
|
1767
|
+
</div>
|
|
1768
|
+
</devtools-tooltip>
|
|
1769
|
+
${Fi(e)}
|
|
1770
|
+
</div>
|
|
1771
|
+
`;
|
|
1772
|
+
}
|
|
1773
|
+
function Li(e) {
|
|
1774
|
+
return W`
|
|
1775
|
+
<div class="teaser-tooltip-container">
|
|
1776
|
+
<div class="response-container">
|
|
1777
|
+
<h2>${e.headerText}</h2>
|
|
1778
|
+
<div class="main-text">${e.mainText}</div>
|
|
1779
|
+
</div>
|
|
1780
|
+
${Ii(e)}
|
|
1781
|
+
</div>
|
|
1782
|
+
`;
|
|
1783
|
+
}
|
|
1784
|
+
var Ri = (e, t, n) => {
|
|
1785
|
+
if (e.isInactive) {
|
|
1786
|
+
wi(ot, n);
|
|
1787
|
+
return;
|
|
1788
|
+
}
|
|
1789
|
+
wi(W`
|
|
1790
|
+
<style>${Lr}</style>
|
|
1791
|
+
<devtools-tooltip
|
|
1792
|
+
${Ti((e) => {
|
|
1793
|
+
t.tooltip = e;
|
|
1794
|
+
})}
|
|
1795
|
+
id=${"teaser-" + e.uuid}
|
|
1796
|
+
hover-delay=1000
|
|
1797
|
+
variant="rich"
|
|
1798
|
+
vertical-distance-increase=-6
|
|
1799
|
+
prefer-span-left
|
|
1800
|
+
jslogContext="console-insight-teaser"
|
|
1801
|
+
>
|
|
1802
|
+
${(() => {
|
|
1803
|
+
switch (e.state) {
|
|
1804
|
+
case "no-model": return ji(e);
|
|
1805
|
+
case "downloading": return Mi(e);
|
|
1806
|
+
case "ready":
|
|
1807
|
+
case "generating": return Ni(e);
|
|
1808
|
+
case "error": return Pi(e);
|
|
1809
|
+
case "partial-teaser":
|
|
1810
|
+
case "teaser": return Li(e);
|
|
1811
|
+
}
|
|
1812
|
+
})()}
|
|
1813
|
+
</devtools-tooltip>
|
|
1814
|
+
`, n);
|
|
1815
|
+
}, zi = class extends A {
|
|
1816
|
+
#e;
|
|
1817
|
+
#t;
|
|
1818
|
+
#n;
|
|
1819
|
+
#r;
|
|
1820
|
+
#i = "";
|
|
1821
|
+
#a = "";
|
|
1822
|
+
#o;
|
|
1823
|
+
#s = !1;
|
|
1824
|
+
#c = null;
|
|
1825
|
+
#l = !1;
|
|
1826
|
+
#u = null;
|
|
1827
|
+
#d;
|
|
1828
|
+
#f;
|
|
1829
|
+
#p;
|
|
1830
|
+
#m;
|
|
1831
|
+
#h = null;
|
|
1832
|
+
#g;
|
|
1833
|
+
#_ = [];
|
|
1834
|
+
#v;
|
|
1835
|
+
#y = !1;
|
|
1836
|
+
#b = 0;
|
|
1837
|
+
constructor(e, t, n, r) {
|
|
1838
|
+
super(n), this.#e = r ?? Ri, this.#t = e, this.#r = new hi(t), this.#o = t, this.#v = this.#o.consoleMessage().level === E.LogEntryLevel.Warning, this.#f = this.#C.bind(this), this.#p = this.#D.bind(this), this.#m = this.#O.bind(this), this.#n = An.instance(), this.#g = this.#n.hasSession() ? "ready" : "no-model", this.#y = !0, this.requestUpdate();
|
|
1839
|
+
}
|
|
1840
|
+
#x() {
|
|
1841
|
+
try {
|
|
1842
|
+
return ue("console-insights-enabled");
|
|
1843
|
+
} catch {
|
|
1844
|
+
return;
|
|
1845
|
+
}
|
|
1846
|
+
}
|
|
1847
|
+
#S() {
|
|
1848
|
+
return m.instance().createLocalSetting("console-insights-onboarding-finished", !0);
|
|
1849
|
+
}
|
|
1850
|
+
async #C() {
|
|
1851
|
+
let e = await we.checkAccessPreconditions();
|
|
1852
|
+
e !== this.#d && (this.#d = e, this.requestUpdate());
|
|
1853
|
+
}
|
|
1854
|
+
#w() {
|
|
1855
|
+
D.instance().setFlavor(U, this.#o), Mt.instance().getAction(ki).execute();
|
|
1856
|
+
}
|
|
1857
|
+
#T(e) {
|
|
1858
|
+
if (e.stopPropagation(), this.#x()?.getIfNotDisabled() && this.#S()?.getIfNotDisabled()) {
|
|
1859
|
+
this.#w();
|
|
1860
|
+
return;
|
|
1861
|
+
}
|
|
1862
|
+
this.#k();
|
|
1863
|
+
}
|
|
1864
|
+
#E(e) {
|
|
1865
|
+
e.stopPropagation(), this.#g = "downloading", this.#n.startDownloadingModel(), j.actionTaken(k.InsightTeaserModelDownloadStarted), this.requestUpdate();
|
|
1866
|
+
}
|
|
1867
|
+
#D(e) {
|
|
1868
|
+
this.#h = e.data, this.requestUpdate();
|
|
1869
|
+
}
|
|
1870
|
+
#O() {
|
|
1871
|
+
this.#n.hasSession() && (this.#g === "no-model" || this.#g === "downloading") && (this.#g = "ready", j.actionTaken(k.InsightTeaserModelDownloadCompleted), this.maybeGenerateTeaser());
|
|
1872
|
+
}
|
|
1873
|
+
async #k() {
|
|
1874
|
+
let e = pe.aidaAvailability?.enterprisePolicyValue === me.ALLOW_WITHOUT_LOGGING, t = vn();
|
|
1875
|
+
await kn.show({
|
|
1876
|
+
header: {
|
|
1877
|
+
iconName: t,
|
|
1878
|
+
text: K(G.freDisclaimerHeader)
|
|
1879
|
+
},
|
|
1880
|
+
reminderItems: [
|
|
1881
|
+
{
|
|
1882
|
+
iconName: "psychiatry",
|
|
1883
|
+
content: K(G.freDisclaimerTextAiWontAlwaysGetItRight)
|
|
1884
|
+
},
|
|
1885
|
+
{
|
|
1886
|
+
iconName: "google",
|
|
1887
|
+
content: K(e ? G.consoleInsightsSendsDataNoLogging : G.consoleInsightsSendsData)
|
|
1888
|
+
},
|
|
1889
|
+
{
|
|
1890
|
+
iconName: "warning",
|
|
1891
|
+
content: W`<devtools-link
|
|
1892
|
+
href=${Di}
|
|
1893
|
+
class="link devtools-link"
|
|
1894
|
+
jslogcontext="explain.teaser.code-snippets-explainer"
|
|
1895
|
+
>${K(G.freDisclaimerTextUseWithCaution)}</devtools-link>`
|
|
1896
|
+
}
|
|
1897
|
+
],
|
|
1898
|
+
onLearnMoreClick: () => {
|
|
1899
|
+
Et.instance().showView("chrome-ai");
|
|
1900
|
+
},
|
|
1901
|
+
ariaLabel: K(G.freDisclaimerHeader),
|
|
1902
|
+
learnMoreButtonText: K(G.learnMore)
|
|
1903
|
+
}) && (this.#x()?.set(!0), this.#S()?.set(!0), this.#w());
|
|
1904
|
+
}
|
|
1905
|
+
maybeGenerateTeaser() {
|
|
1906
|
+
let e = () => {
|
|
1907
|
+
!this.#s && m.instance().moduleSetting("console-insight-teasers-enabled").get() && this.#j();
|
|
1908
|
+
}, t = this.#n.hasSession();
|
|
1909
|
+
switch (this.#g) {
|
|
1910
|
+
case "no-model":
|
|
1911
|
+
case "downloading":
|
|
1912
|
+
t ? (this.#g = "ready", e()) : (this.#_.length === 0 && (this.#_ = [this.#n.addEventListener(Mn.DOWNLOAD_PROGRESS_CHANGED, this.#p), this.#n.addEventListener(Mn.DOWNLOADED_AND_SESSION_CREATED, this.#m)]), this.#n.isDownloading() && (this.#g = "downloading", this.#h = this.#n.getDownloadProgress())), this.requestUpdate();
|
|
1913
|
+
return;
|
|
1914
|
+
case "ready":
|
|
1915
|
+
e(), this.requestUpdate();
|
|
1916
|
+
return;
|
|
1917
|
+
case "generating":
|
|
1918
|
+
console.error("Trying trigger teaser generation when state is \"GENERATING\"");
|
|
1919
|
+
return;
|
|
1920
|
+
case "partial-teaser":
|
|
1921
|
+
console.error("Trying trigger teaser generation when state is \"PARTIAL_TEASER\"");
|
|
1922
|
+
return;
|
|
1923
|
+
case "teaser":
|
|
1924
|
+
case "error": return;
|
|
1925
|
+
}
|
|
1926
|
+
}
|
|
1927
|
+
abortTeaserGeneration() {
|
|
1928
|
+
return this.#c && this.#c.abort(), (this.#g === "generating" || this.#g === "partial-teaser") && (this.#b && (this.#a ? j.consoleInsightTeaserAbortedAfterFirstCharacter(performance.now() - this.#b) : j.consoleInsightTeaserAbortedBeforeFirstCharacter(performance.now() - this.#b)), this.#a = "", this.#g = "ready", j.actionTaken(k.InsightTeaserGenerationAborted)), this.#u && clearTimeout(this.#u), re(this.#_), { okToRemove: this.#g !== "teaser" };
|
|
1929
|
+
}
|
|
1930
|
+
setInactive(e) {
|
|
1931
|
+
this.#s !== e && (this.#s = e, this.requestUpdate());
|
|
1932
|
+
}
|
|
1933
|
+
#A() {
|
|
1934
|
+
this.#l = !0, this.requestUpdate();
|
|
1935
|
+
}
|
|
1936
|
+
async #j() {
|
|
1937
|
+
this.#i = this.#o.toMessageTextString().substring(0, 70), this.#g = "generating", j.actionTaken(k.InsightTeaserGenerationStarted), this.#u = setTimeout(this.#A.bind(this), Ai), this.#b = performance.now();
|
|
1938
|
+
let e = "", t = !1, n = 0;
|
|
1939
|
+
try {
|
|
1940
|
+
for await (let r of this.#M()) e += r, this.#a = e, this.#g = "partial-teaser", this.requestUpdate(), t || (t = !0, n = performance.now(), j.consoleInsightTeaserFirstChunkGenerated(n - this.#b), j.consoleInsightTeaserFirstChunkGeneratedMedium(n - this.#b));
|
|
1941
|
+
} catch (e) {
|
|
1942
|
+
e.name === "AbortError" ? this.#g = "ready" : (console.error(e.name, e.message), this.#g = "error", j.actionTaken(k.InsightTeaserGenerationErrored)), clearTimeout(this.#u), this.requestUpdate();
|
|
1943
|
+
return;
|
|
1944
|
+
}
|
|
1945
|
+
clearTimeout(this.#u);
|
|
1946
|
+
let r = performance.now() - this.#b;
|
|
1947
|
+
j.consoleInsightTeaserGenerated(r), j.consoleInsightTeaserGeneratedMedium(r), j.consoleInsightTeaserChunkToEndMedium(performance.now() - n), e.length > 300 ? j.consoleInsightLongTeaserGenerated(r) : j.consoleInsightShortTeaserGenerated(r), this.#g = "teaser", this.#a = e, j.actionTaken(k.InsightTeaserGenerationCompleted), this.requestUpdate();
|
|
1948
|
+
}
|
|
1949
|
+
async *#M() {
|
|
1950
|
+
let { prompt: e } = await this.#r.buildPrompt();
|
|
1951
|
+
this.#c = new AbortController();
|
|
1952
|
+
let t = this.#n.getConsoleInsight(e, this.#c);
|
|
1953
|
+
for await (let e of t) yield e;
|
|
1954
|
+
this.#c = null;
|
|
1955
|
+
}
|
|
1956
|
+
#N(e) {
|
|
1957
|
+
let t = !e.target.checked;
|
|
1958
|
+
m.instance().moduleSetting("console-insight-teasers-enabled").set(t);
|
|
1959
|
+
}
|
|
1960
|
+
#P() {
|
|
1961
|
+
return !(!Mt.instance().hasAction(ki) || pe.aidaAvailability?.blockedByAge || pe.isOffTheRecord || this.#d !== gt.AVAILABLE);
|
|
1962
|
+
}
|
|
1963
|
+
performUpdate() {
|
|
1964
|
+
let e = {};
|
|
1965
|
+
this.#e({
|
|
1966
|
+
onTellMeMoreClick: this.#T.bind(this),
|
|
1967
|
+
uuid: this.#t,
|
|
1968
|
+
headerText: this.#i,
|
|
1969
|
+
mainText: this.#a,
|
|
1970
|
+
isInactive: this.#s || !m.instance().moduleSetting("console-insight-teasers-enabled").get(),
|
|
1971
|
+
dontShowChanged: this.#N.bind(this),
|
|
1972
|
+
hasTellMeMoreButton: this.#P(),
|
|
1973
|
+
isSlowGeneration: this.#l,
|
|
1974
|
+
onDownloadModelClick: this.#E.bind(this),
|
|
1975
|
+
downloadProgress: this.#h,
|
|
1976
|
+
state: this.#g,
|
|
1977
|
+
isForWarning: this.#v
|
|
1978
|
+
}, e, this.contentElement), this.#y && e.tooltip?.hasAttribute("popover") && e.tooltip.showTooltip(), this.#y = !1;
|
|
1979
|
+
}
|
|
1980
|
+
wasShown() {
|
|
1981
|
+
super.wasShown(), Ce.instance().addEventListener(Ke.AIDA_AVAILABILITY_CHANGED, this.#f), this.#C();
|
|
1982
|
+
}
|
|
1983
|
+
willHide() {
|
|
1984
|
+
super.willHide(), Ce.instance().removeEventListener(Ke.AIDA_AVAILABILITY_CHANGED, this.#f);
|
|
1985
|
+
}
|
|
1986
|
+
}, Bi = "/*\n * Copyright 2018 The Chromium Authors\n * Use of this source code is governed by a BSD-style license that can be\n * found in the LICENSE file.\n */\n\n.close-button {\n position: absolute;\n top: var(--sys-size-4);\n left: var(--sys-size-2);\n}\n\n.console-pins {\n max-height: 200px;\n overflow-y: auto;\n background: var(--sys-color-cdt-base-container);\n\n --override-error-text-color: var(--sys-color-on-error-container);\n}\n\n.console-pins:not(:empty) {\n border-bottom: 1px solid var(--sys-color-divider);\n}\n\n.console-pin {\n position: relative;\n user-select: text;\n flex: none;\n padding: 2px 0 6px 24px;\n}\n\n.console-pin:not(:last-child) {\n border-bottom: 1px solid var(--sys-color-divider);\n}\n\n.console-pin.error-level:not(:focus-within) {\n background-color: var(--sys-color-surface-error);\n color: var(--override-error-text-color);\n}\n\n.console-pin:not(:last-child).error-level:not(:focus-within) {\n border-top: 1px solid var(--sys-color-error-outline);\n border-bottom: 1px solid var(--sys-color-error-outline);\n margin-top: -1px;\n}\n\n.console-pin-name {\n margin-left: -5px;\n margin-bottom: 1px;\n height: auto;\n}\n\n.console-pin-name,\n.console-pin-preview {\n width: 100%;\n text-overflow: ellipsis;\n white-space: nowrap;\n min-height: 13px;\n}\n\n.console-pin-preview {\n overflow: hidden;\n}\n\n.console-pin-name:focus-within {\n background: var(--sys-color-cdt-base-container);\n border-radius: 4px;\n border: 1px solid var(--sys-color-state-focus-ring);\n}\n\n.console-pin:focus-within .console-pin-preview,\n.console-pin-name:not(:focus-within, :hover) {\n opacity: 60%;\n}\n", Vi = /* @__PURE__ */ e({
|
|
1987
|
+
ConsolePin: () => ea,
|
|
1988
|
+
ConsolePinEvent: () => ta,
|
|
1989
|
+
ConsolePinModel: () => $i,
|
|
1990
|
+
ConsolePinPane: () => Ji,
|
|
1991
|
+
ConsolePinPresenter: () => Qi,
|
|
1992
|
+
DEFAULT_PANE_VIEW: () => qi,
|
|
1993
|
+
DEFAULT_VIEW: () => Yi
|
|
1994
|
+
}), { createRef: Hi, ref: Ui, repeat: Wi } = Je, { widget: Gi } = Tt, q = {
|
|
1995
|
+
removeExpression: "Remove expression",
|
|
1996
|
+
removeAllExpressions: "Remove all expressions",
|
|
1997
|
+
removeExpressionS: "Remove expression: {PH1}",
|
|
1998
|
+
removeBlankExpression: "Remove blank expression",
|
|
1999
|
+
liveExpressionEditor: "Live expression editor",
|
|
2000
|
+
expression: "Expression",
|
|
2001
|
+
evaluateAllowingSideEffects: "Evaluate, allowing side effects",
|
|
2002
|
+
notAvailable: "not available",
|
|
2003
|
+
doYouTrustThisCode: "Do you trust this code?",
|
|
2004
|
+
doNotPaste: "Don't paste code you do not understand or have not reviewed yourself into DevTools. This could allow attackers to steal your identity or take control of your computer. Please type “{PH1}” below to allow pasting.",
|
|
2005
|
+
allowPasting: "allow pasting",
|
|
2006
|
+
typeAllowPasting: "Type “{PH1}”"
|
|
2007
|
+
}, Ki = g("panels/console/ConsolePinPane.ts", q), J = ae.bind(void 0, Ki), qi = (e, t, n) => {
|
|
2008
|
+
Se(Fe`
|
|
2009
|
+
<style>${Bi}</style>
|
|
2010
|
+
<div class='console-pins monospace' jslog=${It("console-pins")} @contextmenu=${e.onContextMenu}>
|
|
2011
|
+
${Wi(e.pins, (e) => e, (t) => Gi(Qi, {
|
|
2012
|
+
pin: t,
|
|
2013
|
+
focusOut: e.focusOut,
|
|
2014
|
+
onRemove: () => e.onRemove(t)
|
|
2015
|
+
}))}
|
|
2016
|
+
</div>`, n);
|
|
2017
|
+
}, Ji = class extends ht {
|
|
2018
|
+
#e;
|
|
2019
|
+
#t;
|
|
2020
|
+
#n;
|
|
2021
|
+
#r;
|
|
2022
|
+
constructor(e, t = qi) {
|
|
2023
|
+
super({ useShadowDom: !0 }), this.#r = e, this.#e = t, this.#n = new $i(m.instance());
|
|
2024
|
+
}
|
|
2025
|
+
willHide() {
|
|
2026
|
+
super.willHide(), this.#n.stopPeriodicEvaluate();
|
|
2027
|
+
}
|
|
2028
|
+
contextMenuEventFired(e) {
|
|
2029
|
+
let t = new ft(e), n = ve(e);
|
|
2030
|
+
if (n) {
|
|
2031
|
+
let e = n.enclosingNodeOrSelfWithClass("widget");
|
|
2032
|
+
if (e) {
|
|
2033
|
+
let n = A.get(e);
|
|
2034
|
+
n instanceof Qi && (t.editSection().appendItem(J(q.removeExpression), () => n.pin ? this.removePin(n.pin) : void 0, { jslogContext: "remove-expression" }), n.appendToContextMenu(t));
|
|
2035
|
+
}
|
|
2036
|
+
}
|
|
2037
|
+
t.editSection().appendItem(J(q.removeAllExpressions), this.removeAllPins.bind(this), { jslogContext: "remove-all-expressions" }), t.show();
|
|
2038
|
+
}
|
|
2039
|
+
removeAllPins() {
|
|
2040
|
+
this.#n.removeAll(), this.requestUpdate();
|
|
2041
|
+
}
|
|
2042
|
+
removePin(e) {
|
|
2043
|
+
this.#n.remove(e), this.requestUpdate();
|
|
2044
|
+
}
|
|
2045
|
+
addPin(e, t) {
|
|
2046
|
+
let n = this.#n.add(e);
|
|
2047
|
+
t && (this.#t = n), this.requestUpdate();
|
|
2048
|
+
}
|
|
2049
|
+
wasShown() {
|
|
2050
|
+
super.wasShown(), this.#n.startPeriodicEvaluate(), this.requestUpdate();
|
|
2051
|
+
}
|
|
2052
|
+
performUpdate() {
|
|
2053
|
+
this.#e({
|
|
2054
|
+
pins: [...this.#n.pins],
|
|
2055
|
+
focusOut: this.#r,
|
|
2056
|
+
onRemove: (e) => this.removePin(e),
|
|
2057
|
+
onContextMenu: this.contextMenuEventFired.bind(this)
|
|
2058
|
+
}, {}, this.contentElement);
|
|
2059
|
+
for (let e of this.children()) e instanceof Qi && e.pin === this.#t && e.updateComplete.then(() => e.focus());
|
|
2060
|
+
this.#t = void 0;
|
|
2061
|
+
}
|
|
2062
|
+
}, Yi = (e, t, n) => {
|
|
2063
|
+
let r = e.expression ? J(q.removeExpressionS, { PH1: e.expression }) : J(q.removeBlankExpression), i = Hi(), a = Hi();
|
|
2064
|
+
Se(Fe`
|
|
2065
|
+
<style>${Bi}</style>
|
|
2066
|
+
<style>${lr}</style>
|
|
2067
|
+
<div class='console-pin ${e.result && !("error" in e.result) && e.result?.exceptionDetails && !N.isSideEffectFailure(e.result) ? "error-level" : ""}'>
|
|
2068
|
+
<devtools-button class='close-button'
|
|
2069
|
+
.iconName=${"cross"}
|
|
2070
|
+
.variant=${he.ICON}
|
|
2071
|
+
.size=${it.MICRO}
|
|
2072
|
+
tabindex=0
|
|
2073
|
+
aria-label=${r}
|
|
2074
|
+
@click=${(t) => {
|
|
2075
|
+
e.onDelete(), t.consume(!0);
|
|
2076
|
+
}}
|
|
2077
|
+
@keydown=${(t) => {
|
|
2078
|
+
l(t) && (e.onDelete(), t.consume(!0));
|
|
2079
|
+
}}
|
|
2080
|
+
${Ui(i)}
|
|
2081
|
+
></devtools-button>
|
|
2082
|
+
<div class='console-pin-name'
|
|
2083
|
+
title=${e.expression}
|
|
2084
|
+
jslog=${Ut().track({ change: !0 })}
|
|
2085
|
+
@keydown=${(e) => {
|
|
2086
|
+
e.key === "Escape" && e.consume();
|
|
2087
|
+
}}
|
|
2088
|
+
>
|
|
2089
|
+
<devtools-text-editor .state=${e.editorState} ${Ui(a)} tabindex=0
|
|
2090
|
+
></devtools-text-editor>
|
|
2091
|
+
</div>
|
|
2092
|
+
<div class='console-pin-preview'
|
|
2093
|
+
@mouseenter=${() => e.onPreviewHoverChange(!0)}
|
|
2094
|
+
@mouseleave=${() => e.onPreviewHoverChange(!1)}
|
|
2095
|
+
@click=${(t) => e.onPreviewClick(t)}
|
|
2096
|
+
>
|
|
2097
|
+
${Zi(e.result, e.isEditing)}
|
|
2098
|
+
</div>
|
|
2099
|
+
</div>
|
|
2100
|
+
`, n), Object.assign(t, {
|
|
2101
|
+
deletePinIcon: i.value,
|
|
2102
|
+
editor: a.value
|
|
2103
|
+
});
|
|
2104
|
+
}, Xi = new Ln();
|
|
2105
|
+
function Zi(e, t) {
|
|
2106
|
+
if (!e) return ot;
|
|
2107
|
+
if (e && N.isSideEffectFailure(e)) return Fe`<span class='object-value-calculate-value-button' title=${J(q.evaluateAllowingSideEffects)}>(…)</span>`;
|
|
2108
|
+
let n = Xi.renderEvaluationResultPreview(e, !t);
|
|
2109
|
+
return n === ot && !t ? Fe`${J(q.notAvailable)}` : n;
|
|
2110
|
+
}
|
|
2111
|
+
var Qi = class extends A {
|
|
2112
|
+
#e;
|
|
2113
|
+
#t;
|
|
2114
|
+
#n;
|
|
2115
|
+
#r;
|
|
2116
|
+
#i;
|
|
2117
|
+
#a;
|
|
2118
|
+
#o = !1;
|
|
2119
|
+
#s = null;
|
|
2120
|
+
#c;
|
|
2121
|
+
#l;
|
|
2122
|
+
constructor(e, t = Yi) {
|
|
2123
|
+
super(e), this.#r = t, this.#l = m.instance().createSetting("disable-self-xss-warning", !1, fe.SYNCED), this.#i = {
|
|
2124
|
+
workingCopy: () => this.#a?.state.doc.toString() ?? "",
|
|
2125
|
+
workingCopyWithHint: () => this.#a ? Un(this.#a.editor) : "",
|
|
2126
|
+
isEditing: () => !!this.#a?.editor.hasFocus
|
|
2127
|
+
};
|
|
2128
|
+
}
|
|
2129
|
+
wasShown() {
|
|
2130
|
+
super.wasShown(), this.#e?.addEventListener("EVALUATE_RESULT_READY", this.requestUpdate, this), this.requestUpdate();
|
|
2131
|
+
}
|
|
2132
|
+
willHide() {
|
|
2133
|
+
super.willHide(), this.#e?.removeEventListener("EVALUATE_RESULT_READY", this.requestUpdate, this), this.setHovered(!1);
|
|
2134
|
+
}
|
|
2135
|
+
set pin(e) {
|
|
2136
|
+
this.#e?.removeEventListener("EVALUATE_RESULT_READY", this.requestUpdate, this), this.#e = e, this.#a = void 0, this.#e.setEditor(this.#i), this.#e.addEventListener("EVALUATE_RESULT_READY", this.requestUpdate, this), this.requestUpdate();
|
|
2137
|
+
}
|
|
2138
|
+
get pin() {
|
|
2139
|
+
return this.#e;
|
|
2140
|
+
}
|
|
2141
|
+
set focusOut(e) {
|
|
2142
|
+
this.#t = e;
|
|
2143
|
+
}
|
|
2144
|
+
set onRemove(e) {
|
|
2145
|
+
this.#n = e;
|
|
2146
|
+
}
|
|
2147
|
+
#u(e) {
|
|
2148
|
+
let t = [
|
|
2149
|
+
F.contentAttributes.of({ "aria-label": J(q.liveExpressionEditor) }),
|
|
2150
|
+
F.lineWrapping,
|
|
2151
|
+
an.javascriptLanguage,
|
|
2152
|
+
Wn,
|
|
2153
|
+
tn(J(q.expression)),
|
|
2154
|
+
en.of([
|
|
2155
|
+
{
|
|
2156
|
+
key: "Escape",
|
|
2157
|
+
run: (e) => (e.dispatch({ changes: {
|
|
2158
|
+
from: 0,
|
|
2159
|
+
to: e.state.doc.length,
|
|
2160
|
+
insert: this.#e?.expression ?? ""
|
|
2161
|
+
} }), this.#t?.(), !0)
|
|
2162
|
+
},
|
|
2163
|
+
{
|
|
2164
|
+
key: "Enter",
|
|
2165
|
+
run: () => (this.#t?.(), !0)
|
|
2166
|
+
},
|
|
2167
|
+
{
|
|
2168
|
+
key: "Mod-Enter",
|
|
2169
|
+
run: () => (this.#t?.(), !0)
|
|
2170
|
+
},
|
|
2171
|
+
{
|
|
2172
|
+
key: "Tab",
|
|
2173
|
+
run: (e) => Yt(e.state) === null ? (e.dispatch({ changes: {
|
|
2174
|
+
from: 0,
|
|
2175
|
+
to: e.state.doc.length,
|
|
2176
|
+
insert: this.#e?.expression ?? ""
|
|
2177
|
+
} }), this.#t?.(), !0) : !1
|
|
2178
|
+
},
|
|
2179
|
+
{
|
|
2180
|
+
key: "Shift-Tab",
|
|
2181
|
+
run: (e) => Yt(e.state) === null ? (e.dispatch({ changes: {
|
|
2182
|
+
from: 0,
|
|
2183
|
+
to: e.state.doc.length,
|
|
2184
|
+
insert: this.#e?.expression ?? ""
|
|
2185
|
+
} }), this.#a?.blur(), this.#c.focus(), !0) : !1
|
|
2186
|
+
}
|
|
2187
|
+
]),
|
|
2188
|
+
F.domEventHandlers({
|
|
2189
|
+
blur: (e, t) => this.#d(t),
|
|
2190
|
+
paste: () => this.#f()
|
|
2191
|
+
}),
|
|
2192
|
+
Gn(e),
|
|
2193
|
+
Hn.instance(),
|
|
2194
|
+
or.instance()
|
|
2195
|
+
];
|
|
2196
|
+
return _.queryParam("noJavaScriptCompletion") !== "true" && t.push(Yn()), Jt.create({
|
|
2197
|
+
doc: e,
|
|
2198
|
+
extensions: t
|
|
2199
|
+
});
|
|
2200
|
+
}
|
|
2201
|
+
#d(e) {
|
|
2202
|
+
if (!this.#e) return;
|
|
2203
|
+
let t = this.#e.commit();
|
|
2204
|
+
e.dispatch({
|
|
2205
|
+
selection: { anchor: this.#e.expression.length },
|
|
2206
|
+
changes: t ? void 0 : {
|
|
2207
|
+
from: 0,
|
|
2208
|
+
to: e.state.doc.length,
|
|
2209
|
+
insert: this.#e.expression
|
|
2210
|
+
}
|
|
2211
|
+
}), this.requestUpdate();
|
|
2212
|
+
}
|
|
2213
|
+
#f() {
|
|
2214
|
+
return _.queryParam("isChromeForTesting") || _.queryParam("disableSelfXssWarnings") || this.#l.get() ? !1 : (this.#p(), !0);
|
|
2215
|
+
}
|
|
2216
|
+
async #p() {
|
|
2217
|
+
await Nn.show({
|
|
2218
|
+
jslogContext: {
|
|
2219
|
+
dialog: "self-xss-warning",
|
|
2220
|
+
input: "allow-pasting"
|
|
2221
|
+
},
|
|
2222
|
+
header: J(q.doYouTrustThisCode),
|
|
2223
|
+
message: J(q.doNotPaste, { PH1: J(q.allowPasting) }),
|
|
2224
|
+
typePhrase: J(q.allowPasting),
|
|
2225
|
+
inputPlaceholder: J(q.typeAllowPasting, { PH1: J(q.allowPasting) })
|
|
2226
|
+
}) && (this.#l.set(!0), j.actionTaken(k.SelfXssAllowPastingInDialog));
|
|
2227
|
+
}
|
|
2228
|
+
setHovered(e) {
|
|
2229
|
+
this.#o !== e && (this.#o = e, !e && this.#s && M.hideDOMNodeHighlight());
|
|
2230
|
+
}
|
|
2231
|
+
async focus() {
|
|
2232
|
+
let e = this.#a;
|
|
2233
|
+
e && (e.editor.focus(), e.dispatch({ selection: { anchor: e.state.doc.length } }));
|
|
2234
|
+
}
|
|
2235
|
+
appendToContextMenu(e) {
|
|
2236
|
+
if (!this.#e) return;
|
|
2237
|
+
let { lastResult: t } = this.#e;
|
|
2238
|
+
t && !("error" in t) && t.object && (e.appendApplicableItems(t.object), this.#e.skipReleaseLastResult());
|
|
2239
|
+
}
|
|
2240
|
+
performUpdate() {
|
|
2241
|
+
if (!this.#e) return;
|
|
2242
|
+
let e = {};
|
|
2243
|
+
this.#r({
|
|
2244
|
+
expression: this.#e.expression,
|
|
2245
|
+
editorState: this.#a?.state ?? this.#u(this.#e.expression),
|
|
2246
|
+
result: this.#e.lastResult,
|
|
2247
|
+
isEditing: this.#i.isEditing(),
|
|
2248
|
+
onDelete: () => this.#n?.(),
|
|
2249
|
+
onPreviewHoverChange: (e) => this.setHovered(e),
|
|
2250
|
+
onPreviewClick: (e) => {
|
|
2251
|
+
this.#s && (ie(this.#s), e.consume());
|
|
2252
|
+
}
|
|
2253
|
+
}, e, this.contentElement);
|
|
2254
|
+
let { deletePinIcon: t, editor: n } = e;
|
|
2255
|
+
if (!t || !n) throw Error("Broken view function, expected output");
|
|
2256
|
+
this.#c = t, this.#a = n;
|
|
2257
|
+
let r = this.#e.lastNode;
|
|
2258
|
+
this.#o && (r ? M.highlightObjectAsDOMNode(r) : this.#s && M.hideDOMNodeHighlight()), this.#s = r || null;
|
|
2259
|
+
}
|
|
2260
|
+
}, $i = class {
|
|
2261
|
+
#e;
|
|
2262
|
+
#t = /* @__PURE__ */ new Set();
|
|
2263
|
+
#n = new ce(250);
|
|
2264
|
+
#r = !1;
|
|
2265
|
+
constructor(e) {
|
|
2266
|
+
this.#e = e.createLocalSetting("console-pins", []);
|
|
2267
|
+
for (let e of this.#e.get()) this.add(e);
|
|
2268
|
+
}
|
|
2269
|
+
get pins() {
|
|
2270
|
+
return this.#t;
|
|
2271
|
+
}
|
|
2272
|
+
add(e) {
|
|
2273
|
+
let t = new ea(e, () => this.#a());
|
|
2274
|
+
return this.#t.add(t), this.#a(), t;
|
|
2275
|
+
}
|
|
2276
|
+
remove(e) {
|
|
2277
|
+
this.#t.delete(e), this.#a();
|
|
2278
|
+
}
|
|
2279
|
+
removeAll() {
|
|
2280
|
+
this.#t.clear(), this.#a();
|
|
2281
|
+
}
|
|
2282
|
+
startPeriodicEvaluate() {
|
|
2283
|
+
this.#r = !0, this.#i();
|
|
2284
|
+
}
|
|
2285
|
+
stopPeriodicEvaluate() {
|
|
2286
|
+
this.#r = !1;
|
|
2287
|
+
}
|
|
2288
|
+
async #i() {
|
|
2289
|
+
if (!this.#r) return;
|
|
2290
|
+
let e = D.instance().flavor(y);
|
|
2291
|
+
e && await Promise.all(this.#t.values().map((t) => t.evaluate(e))), this.#n.schedule(this.#i.bind(this));
|
|
2292
|
+
}
|
|
2293
|
+
#a() {
|
|
2294
|
+
let e = this.#t.values().map((e) => e.expression).toArray();
|
|
2295
|
+
this.#e.set(e);
|
|
2296
|
+
}
|
|
2297
|
+
}, ea = class extends f {
|
|
2298
|
+
#e;
|
|
2299
|
+
#t;
|
|
2300
|
+
#n;
|
|
2301
|
+
#r = null;
|
|
2302
|
+
#i = null;
|
|
2303
|
+
#a = null;
|
|
2304
|
+
#o = !0;
|
|
2305
|
+
constructor(e, t) {
|
|
2306
|
+
super(), this.#e = e, this.#t = t;
|
|
2307
|
+
}
|
|
2308
|
+
get expression() {
|
|
2309
|
+
return this.#e;
|
|
2310
|
+
}
|
|
2311
|
+
get lastResult() {
|
|
2312
|
+
return this.#r;
|
|
2313
|
+
}
|
|
2314
|
+
get lastNode() {
|
|
2315
|
+
return this.#i;
|
|
2316
|
+
}
|
|
2317
|
+
skipReleaseLastResult() {
|
|
2318
|
+
this.#o = !1;
|
|
2319
|
+
}
|
|
2320
|
+
setEditor(e) {
|
|
2321
|
+
this.#n = e;
|
|
2322
|
+
}
|
|
2323
|
+
commit() {
|
|
2324
|
+
if (!this.#n) return !1;
|
|
2325
|
+
let e = this.#n.workingCopy(), t = e.trim();
|
|
2326
|
+
return this.#e = t, this.#t(), this.#e === e;
|
|
2327
|
+
}
|
|
2328
|
+
async evaluate(e) {
|
|
2329
|
+
let t = this.#n?.workingCopyWithHint() ?? "", n = !!this.#n?.isEditing() && t !== this.#e, r = n ? 250 : void 0, i = await Vn.evaluate(t, e, n, !0, r, "live-expression", !0, !0);
|
|
2330
|
+
this.#r && this.#o && this.#a?.runtimeModel.releaseEvaluationResult(this.#r), this.#r = i, this.#a = e, this.#o = !0, i && !("error" in i) && i.object.type === "object" && i.object.subtype === "node" ? this.#i = i.object : this.#i = null, this.dispatchEventToListeners("EVALUATE_RESULT_READY", this);
|
|
2331
|
+
}
|
|
2332
|
+
}, ta = /* @__PURE__ */ function(e) {
|
|
2333
|
+
return e.EVALUATE_RESULT_READY = "EVALUATE_RESULT_READY", e;
|
|
2334
|
+
}({}), na = "/*\n * Copyright 2017 The Chromium Authors\n * Use of this source code is governed by a BSD-style license that can be\n * found in the LICENSE file.\n */\n\n:host {\n overflow: auto;\n}\n\n.count {\n flex: none;\n margin: 0 var(--sys-size-3);\n}\n\ndevtools-icon {\n margin-right: var(--sys-size-3);\n\n &[name=\"cross-circle\"] {\n color: var(--sys-color-error-bright);\n }\n\n &[name=\"warning\"] {\n color: var(--icon-warning);\n }\n\n &[name=\"info\"] {\n color: var(--icon-info);\n }\n}\n\n.tree-element-title {\n flex-grow: 1;\n}\n", ra = /* @__PURE__ */ e({
|
|
2335
|
+
ConsoleFilterGroup: () => X,
|
|
2336
|
+
ConsoleSidebar: () => pa,
|
|
2337
|
+
DEFAULT_VIEW: () => da,
|
|
2338
|
+
Events: () => ma,
|
|
2339
|
+
GroupName: () => la
|
|
2340
|
+
}), Y = {
|
|
2341
|
+
other: "<other>",
|
|
2342
|
+
dUserMessages: "{n, plural, =0 {No user messages} =1 {# user message} other {# user messages}}",
|
|
2343
|
+
dMessages: "{n, plural, =0 {No messages} =1 {# message} other {# messages}}",
|
|
2344
|
+
dErrors: "{n, plural, =0 {No errors} =1 {# error} other {# errors}}",
|
|
2345
|
+
dWarnings: "{n, plural, =0 {No warnings} =1 {# warning} other {# warnings}}",
|
|
2346
|
+
dInfo: "{n, plural, =0 {No info} =1 {# info} other {# info}}",
|
|
2347
|
+
dVerbose: "{n, plural, =0 {No verbose} =1 {# verbose} other {# verbose}}"
|
|
2348
|
+
}, ia = g("panels/console/ConsoleSidebar.ts", Y), aa = ae.bind(void 0, ia), { render: oa, html: sa, nothing: ca } = je, la = /* @__PURE__ */ function(e) {
|
|
2349
|
+
return e.CONSOLE_API = "user message", e.ALL = "message", e.ERROR = "error", e.WARNING = "warning", e.INFO = "info", e.VERBOSE = "verbose", e;
|
|
2350
|
+
}({}), ua = {
|
|
2351
|
+
message: {
|
|
2352
|
+
icon: "list",
|
|
2353
|
+
label: Y.dMessages
|
|
2354
|
+
},
|
|
2355
|
+
"user message": {
|
|
2356
|
+
icon: "profile",
|
|
2357
|
+
label: Y.dUserMessages
|
|
2358
|
+
},
|
|
2359
|
+
error: {
|
|
2360
|
+
icon: "cross-circle",
|
|
2361
|
+
label: Y.dErrors
|
|
2362
|
+
},
|
|
2363
|
+
warning: {
|
|
2364
|
+
icon: "warning",
|
|
2365
|
+
label: Y.dWarnings
|
|
2366
|
+
},
|
|
2367
|
+
info: {
|
|
2368
|
+
icon: "info",
|
|
2369
|
+
label: Y.dInfo
|
|
2370
|
+
},
|
|
2371
|
+
verbose: {
|
|
2372
|
+
icon: "bug",
|
|
2373
|
+
label: Y.dVerbose
|
|
2374
|
+
}
|
|
2375
|
+
}, da = (e, t, n) => {
|
|
2376
|
+
oa(sa`<devtools-tree
|
|
2377
|
+
navigation-variant
|
|
2378
|
+
hide-overflow
|
|
2379
|
+
.template=${sa`
|
|
2380
|
+
<ul role="tree">
|
|
2381
|
+
${e.groups.map((t) => sa`
|
|
2382
|
+
<li
|
|
2383
|
+
role="treeitem"
|
|
2384
|
+
@select=${() => e.onSelectionChanged(t.filter)}
|
|
2385
|
+
?selected=${t.filter === e.selectedFilter}>
|
|
2386
|
+
<style>${na}</style>
|
|
2387
|
+
<devtools-icon name=${ua[t.name].icon}></devtools-icon>
|
|
2388
|
+
${aa(ua[t.name].label, { n: t.messageCount })}
|
|
2389
|
+
${t.messageCount === 0 ? ca : sa`
|
|
2390
|
+
<ul role="group">
|
|
2391
|
+
${t.urlGroups.values().map((t) => sa`
|
|
2392
|
+
<li
|
|
2393
|
+
@select=${() => e.onSelectionChanged(t.filter)}
|
|
2394
|
+
role="treeitem"
|
|
2395
|
+
?selected=${t.filter === e.selectedFilter}
|
|
2396
|
+
title=${t.url ?? ""}>
|
|
2397
|
+
<devtools-icon name=document></devtools-icon>
|
|
2398
|
+
${t.filter.name} <span class=count>${t.count}</span>
|
|
2399
|
+
</li>`)}
|
|
2400
|
+
</ul>`}
|
|
2401
|
+
</li>`)}
|
|
2402
|
+
</ul>`}
|
|
2403
|
+
></devtools-tree>`, n, { container: { attributes: { jslog: `${It("sidebar").track({ resize: !0 })}` } } });
|
|
2404
|
+
}, X = class {
|
|
2405
|
+
urlGroups = /* @__PURE__ */ new Map();
|
|
2406
|
+
messageCount = 0;
|
|
2407
|
+
name;
|
|
2408
|
+
filter;
|
|
2409
|
+
constructor(e, t, n) {
|
|
2410
|
+
this.name = e, this.filter = new R(e, t, null, n);
|
|
2411
|
+
}
|
|
2412
|
+
onMessage(e) {
|
|
2413
|
+
let t = e.consoleMessage(), n = t.type !== w.Command && t.type !== w.Result && !t.isGroupMessage();
|
|
2414
|
+
if (!this.filter.shouldBeVisible(e) || !n) return;
|
|
2415
|
+
let r = this.#e(t.url || null);
|
|
2416
|
+
r.count++, this.messageCount++;
|
|
2417
|
+
}
|
|
2418
|
+
clear() {
|
|
2419
|
+
this.messageCount = 0, this.urlGroups.clear();
|
|
2420
|
+
}
|
|
2421
|
+
#e(e) {
|
|
2422
|
+
let t = this.urlGroups.get(e);
|
|
2423
|
+
if (t) return t;
|
|
2424
|
+
let n = this.filter.clone();
|
|
2425
|
+
t = {
|
|
2426
|
+
filter: n,
|
|
2427
|
+
url: e,
|
|
2428
|
+
count: 0
|
|
2429
|
+
};
|
|
2430
|
+
let r = e ? p.fromString(e) : null;
|
|
2431
|
+
return e ? n.name = r ? r.displayName : e : n.name = aa(Y.other), n.parsedFilters.push({
|
|
2432
|
+
key: z.Url,
|
|
2433
|
+
text: e,
|
|
2434
|
+
negative: !1,
|
|
2435
|
+
regex: void 0
|
|
2436
|
+
}), this.urlGroups.set(e, t), t;
|
|
2437
|
+
}
|
|
2438
|
+
}, fa = [{
|
|
2439
|
+
key: z.Source,
|
|
2440
|
+
text: h.ConsoleAPI,
|
|
2441
|
+
negative: !1,
|
|
2442
|
+
regex: void 0
|
|
2443
|
+
}], pa = class extends se(ht) {
|
|
2444
|
+
#e;
|
|
2445
|
+
#t = [
|
|
2446
|
+
new X("message", [], R.allLevelsFilterValue()),
|
|
2447
|
+
new X("user message", fa, R.allLevelsFilterValue()),
|
|
2448
|
+
new X("error", [], R.singleLevelMask(E.LogEntryLevel.Error)),
|
|
2449
|
+
new X("warning", [], R.singleLevelMask(E.LogEntryLevel.Warning)),
|
|
2450
|
+
new X("info", [], R.singleLevelMask(E.LogEntryLevel.Info)),
|
|
2451
|
+
new X("verbose", [], R.singleLevelMask(E.LogEntryLevel.Verbose))
|
|
2452
|
+
];
|
|
2453
|
+
#n = m.instance().createSetting("console.sidebar-selected-filter", null);
|
|
2454
|
+
#r = this.#t.find((e) => e.name === this.#n.get())?.filter;
|
|
2455
|
+
constructor(e, t = da) {
|
|
2456
|
+
super(e, { useShadowDom: "pure" }), this.#e = t, this.setMinimumSize(125, 0), this.performUpdate();
|
|
2457
|
+
}
|
|
2458
|
+
performUpdate() {
|
|
2459
|
+
let e = {
|
|
2460
|
+
groups: this.#t,
|
|
2461
|
+
selectedFilter: this.#r ?? this.#t[0].filter,
|
|
2462
|
+
onSelectionChanged: (e) => {
|
|
2463
|
+
this.#r = e, this.#n.set(e.name), this.dispatchEventToListeners("FilterSelected");
|
|
2464
|
+
}
|
|
2465
|
+
};
|
|
2466
|
+
this.#e(e, {}, this.contentElement);
|
|
2467
|
+
}
|
|
2468
|
+
clear() {
|
|
2469
|
+
for (let e of this.#t) e.clear();
|
|
2470
|
+
this.requestUpdate();
|
|
2471
|
+
}
|
|
2472
|
+
onMessageAdded(e) {
|
|
2473
|
+
for (let t of this.#t) t.onMessage(e);
|
|
2474
|
+
this.requestUpdate();
|
|
2475
|
+
}
|
|
2476
|
+
shouldBeVisible(e) {
|
|
2477
|
+
return this.#r?.shouldBeVisible(e) ?? !0;
|
|
2478
|
+
}
|
|
2479
|
+
}, ma = /* @__PURE__ */ function(e) {
|
|
2480
|
+
return e.FILTER_SELECTED = "FilterSelected", e;
|
|
2481
|
+
}({}), ha = /* @__PURE__ */ e({ ConsoleViewport: () => ga }), ga = class {
|
|
2482
|
+
element;
|
|
2483
|
+
topGapElement;
|
|
2484
|
+
topGapElementActive;
|
|
2485
|
+
#e;
|
|
2486
|
+
bottomGapElement;
|
|
2487
|
+
bottomGapElementActive;
|
|
2488
|
+
provider;
|
|
2489
|
+
virtualSelectedIndex;
|
|
2490
|
+
firstActiveIndex;
|
|
2491
|
+
lastActiveIndex;
|
|
2492
|
+
renderedItems;
|
|
2493
|
+
anchorSelection;
|
|
2494
|
+
headSelection;
|
|
2495
|
+
itemCount;
|
|
2496
|
+
cumulativeHeights;
|
|
2497
|
+
muteCopyHandler;
|
|
2498
|
+
observer;
|
|
2499
|
+
observerConfig;
|
|
2500
|
+
#t;
|
|
2501
|
+
selectionIsBackward;
|
|
2502
|
+
lastSelectedElement;
|
|
2503
|
+
cachedProviderElements;
|
|
2504
|
+
constructor(e) {
|
|
2505
|
+
this.element = document.createElement("div"), this.element.style.overflow = "auto", this.topGapElement = this.element.createChild("div"), this.topGapElement.style.height = "0px", this.topGapElement.style.color = "transparent", this.topGapElementActive = !1, this.#e = this.element.createChild("div"), this.bottomGapElement = this.element.createChild("div"), this.bottomGapElement.style.height = "0px", this.bottomGapElement.style.color = "transparent", this.bottomGapElementActive = !1, this.topGapElement.textContent = "", this.bottomGapElement.textContent = "", Be(this.topGapElement, !0), Be(this.bottomGapElement, !0), this.provider = e, this.element.addEventListener("scroll", this.onScroll.bind(this), !1), this.element.addEventListener("copy", this.onCopy.bind(this), !1), this.element.addEventListener("dragstart", this.onDragStart.bind(this), !1), this.#e.addEventListener("focusin", this.onFocusIn.bind(this), !1), this.#e.addEventListener("focusout", this.onFocusOut.bind(this), !1), this.#e.addEventListener("keydown", this.onKeyDown.bind(this), !1), this.virtualSelectedIndex = -1, this.#e.tabIndex = -1, this.firstActiveIndex = -1, this.lastActiveIndex = -1, this.renderedItems = [], this.anchorSelection = null, this.headSelection = null, this.itemCount = 0, this.cumulativeHeights = new Int32Array(), this.muteCopyHandler = !1, this.observer = new MutationObserver(this.refresh.bind(this)), this.observerConfig = {
|
|
2506
|
+
childList: !0,
|
|
2507
|
+
subtree: !0
|
|
2508
|
+
}, this.#t = !1, this.selectionIsBackward = !1;
|
|
2509
|
+
}
|
|
2510
|
+
stickToBottom() {
|
|
2511
|
+
return this.#t;
|
|
2512
|
+
}
|
|
2513
|
+
setStickToBottom(e) {
|
|
2514
|
+
this.#t = e, this.#t ? this.observer.observe(this.#e, this.observerConfig) : this.observer.disconnect();
|
|
2515
|
+
}
|
|
2516
|
+
hasVirtualSelection() {
|
|
2517
|
+
return this.virtualSelectedIndex !== -1;
|
|
2518
|
+
}
|
|
2519
|
+
copyWithStyles() {
|
|
2520
|
+
this.muteCopyHandler = !0, this.element.ownerDocument.execCommand("copy"), this.muteCopyHandler = !1;
|
|
2521
|
+
}
|
|
2522
|
+
onCopy(e) {
|
|
2523
|
+
if (this.muteCopyHandler) return;
|
|
2524
|
+
let t = this.selectedText();
|
|
2525
|
+
t && (e.preventDefault(), this.selectionContainsTable() ? this.copyWithStyles() : e.clipboardData && e.clipboardData.setData("text/plain", t));
|
|
2526
|
+
}
|
|
2527
|
+
onFocusIn(e) {
|
|
2528
|
+
let t = this.renderedItems.findIndex((t) => t.element().isSelfOrAncestor(e.target));
|
|
2529
|
+
t !== -1 && (this.virtualSelectedIndex = this.firstActiveIndex + t);
|
|
2530
|
+
let n = !1;
|
|
2531
|
+
this.virtualSelectedIndex === -1 && this.isOutsideViewport(e.relatedTarget) && e.target === this.#e && this.itemCount && (n = !0, this.virtualSelectedIndex = this.itemCount - 1, this.refresh(), this.scrollItemIntoView(this.virtualSelectedIndex)), this.updateFocusedItem(n);
|
|
2532
|
+
}
|
|
2533
|
+
onFocusOut(e) {
|
|
2534
|
+
this.isOutsideViewport(e.relatedTarget) && (this.virtualSelectedIndex = -1), this.updateFocusedItem();
|
|
2535
|
+
}
|
|
2536
|
+
isOutsideViewport(e) {
|
|
2537
|
+
return e !== null && !e.isSelfOrDescendant(this.#e);
|
|
2538
|
+
}
|
|
2539
|
+
onDragStart(e) {
|
|
2540
|
+
let t = this.selectedText();
|
|
2541
|
+
return t ? (e.dataTransfer && (e.dataTransfer.clearData(), e.dataTransfer.setData("text/plain", t), e.dataTransfer.effectAllowed = "copy"), !0) : !1;
|
|
2542
|
+
}
|
|
2543
|
+
onKeyDown(e) {
|
|
2544
|
+
if (Pe() || !this.itemCount || e.shiftKey) return;
|
|
2545
|
+
let t = !1;
|
|
2546
|
+
switch (e.key) {
|
|
2547
|
+
case "ArrowUp":
|
|
2548
|
+
if (this.virtualSelectedIndex > 0) t = !0, this.virtualSelectedIndex--;
|
|
2549
|
+
else return;
|
|
2550
|
+
break;
|
|
2551
|
+
case "ArrowDown":
|
|
2552
|
+
if (this.virtualSelectedIndex < this.itemCount - 1) this.virtualSelectedIndex++;
|
|
2553
|
+
else return;
|
|
2554
|
+
break;
|
|
2555
|
+
case "Home":
|
|
2556
|
+
this.virtualSelectedIndex = 0;
|
|
2557
|
+
break;
|
|
2558
|
+
case "End":
|
|
2559
|
+
this.virtualSelectedIndex = this.itemCount - 1;
|
|
2560
|
+
break;
|
|
2561
|
+
default: return;
|
|
2562
|
+
}
|
|
2563
|
+
e.consume(!0), this.scrollItemIntoView(this.virtualSelectedIndex), this.updateFocusedItem(t);
|
|
2564
|
+
}
|
|
2565
|
+
updateFocusedItem(e) {
|
|
2566
|
+
let t = this.renderedElementAt(this.virtualSelectedIndex), n = this.lastSelectedElement !== t, r = this.#e === Ht(this.element.ownerDocument);
|
|
2567
|
+
if (this.lastSelectedElement && n && this.lastSelectedElement.classList.remove("console-selected"), t && (e || n || r) && this.element.hasFocus()) {
|
|
2568
|
+
t.classList.add("console-selected");
|
|
2569
|
+
let n = Hr(t);
|
|
2570
|
+
n && D.instance().setFlavor(U, n), e ? (this.setStickToBottom(!1), this.renderedItems[this.virtualSelectedIndex - this.firstActiveIndex].focusLastChildOrSelf()) : t.hasFocus() || t.focus({ preventScroll: !0 });
|
|
2571
|
+
}
|
|
2572
|
+
this.itemCount && !this.#e.hasFocus() ? this.#e.tabIndex = 0 : this.#e.tabIndex = -1, this.lastSelectedElement = t;
|
|
2573
|
+
}
|
|
2574
|
+
contentElement() {
|
|
2575
|
+
return this.#e;
|
|
2576
|
+
}
|
|
2577
|
+
invalidate() {
|
|
2578
|
+
delete this.cachedProviderElements, this.itemCount = this.provider.itemCount(), this.virtualSelectedIndex > this.itemCount - 1 && (this.virtualSelectedIndex = this.itemCount - 1), this.rebuildCumulativeHeights(), this.refresh();
|
|
2579
|
+
}
|
|
2580
|
+
providerElement(e) {
|
|
2581
|
+
this.cachedProviderElements ||= Array(this.itemCount);
|
|
2582
|
+
let t = this.cachedProviderElements[e];
|
|
2583
|
+
return t || (t = this.provider.itemElement(e), this.cachedProviderElements[e] = t), t;
|
|
2584
|
+
}
|
|
2585
|
+
rebuildCumulativeHeights() {
|
|
2586
|
+
let e = this.firstActiveIndex, t = this.lastActiveIndex, n = 0;
|
|
2587
|
+
this.cumulativeHeights = new Int32Array(this.itemCount);
|
|
2588
|
+
for (let r = 0; r < this.itemCount; ++r) e <= r && r - e < this.renderedItems.length && r <= t ? n += this.renderedItems[r - e].element().offsetHeight : n += this.provider.fastHeight(r), this.cumulativeHeights[r] = n;
|
|
2589
|
+
}
|
|
2590
|
+
rebuildCumulativeHeightsIfNeeded() {
|
|
2591
|
+
let e = 0, t = 0;
|
|
2592
|
+
for (let n = 0; n < this.renderedItems.length; ++n) {
|
|
2593
|
+
let r = this.cachedItemHeight(this.firstActiveIndex + n), i = this.renderedItems[n].element().offsetHeight;
|
|
2594
|
+
if (Math.abs(r - i) > 1) {
|
|
2595
|
+
this.rebuildCumulativeHeights();
|
|
2596
|
+
return;
|
|
2597
|
+
}
|
|
2598
|
+
if (t += i, e += r, Math.abs(e - t) > 1) {
|
|
2599
|
+
this.rebuildCumulativeHeights();
|
|
2600
|
+
return;
|
|
2601
|
+
}
|
|
2602
|
+
}
|
|
2603
|
+
}
|
|
2604
|
+
cachedItemHeight(e) {
|
|
2605
|
+
return e === 0 ? this.cumulativeHeights[0] : this.cumulativeHeights[e] - this.cumulativeHeights[e - 1];
|
|
2606
|
+
}
|
|
2607
|
+
isSelectionBackwards(e) {
|
|
2608
|
+
if (!e?.rangeCount || !e.anchorNode || !e.focusNode) return !1;
|
|
2609
|
+
let t = document.createRange();
|
|
2610
|
+
return t.setStart(e.anchorNode, e.anchorOffset), t.setEnd(e.focusNode, e.focusOffset), t.collapsed;
|
|
2611
|
+
}
|
|
2612
|
+
createSelectionModel(e, t, n) {
|
|
2613
|
+
return {
|
|
2614
|
+
item: e,
|
|
2615
|
+
node: t,
|
|
2616
|
+
offset: n
|
|
2617
|
+
};
|
|
2618
|
+
}
|
|
2619
|
+
updateSelectionModel(e) {
|
|
2620
|
+
let t = e?.rangeCount ? e.getRangeAt(0) : null;
|
|
2621
|
+
if (!t || !e || e.isCollapsed || !this.element.hasSelection()) return this.headSelection = null, this.anchorSelection = null, !1;
|
|
2622
|
+
let n = Number.MAX_VALUE, r = -1, i = !1;
|
|
2623
|
+
for (let e = 0; e < this.renderedItems.length; ++e) if (t.intersectsNode(this.renderedItems[e].element())) {
|
|
2624
|
+
let t = e + this.firstActiveIndex;
|
|
2625
|
+
n = Math.min(n, t), r = Math.max(r, t), i = !0;
|
|
2626
|
+
}
|
|
2627
|
+
let a = t.intersectsNode(this.topGapElement) && this.topGapElementActive, o = t.intersectsNode(this.bottomGapElement) && this.bottomGapElementActive;
|
|
2628
|
+
if (!a && !o && !i) return this.headSelection = null, this.anchorSelection = null, !1;
|
|
2629
|
+
(!this.anchorSelection || !this.headSelection) && (this.anchorSelection = this.createSelectionModel(0, this.element, 0), this.headSelection = this.createSelectionModel(this.itemCount - 1, this.element, this.element.children.length), this.selectionIsBackward = !1);
|
|
2630
|
+
let s = this.isSelectionBackwards(e), c = this.selectionIsBackward ? this.headSelection : this.anchorSelection, l = this.selectionIsBackward ? this.anchorSelection : this.headSelection, u = null, d = null;
|
|
2631
|
+
return i && (u = this.createSelectionModel(n, t.startContainer, t.startOffset), d = this.createSelectionModel(r, t.endContainer, t.endOffset)), a && o && i ? (u = u && u.item < c.item ? u : c, d = d && d.item > l.item ? d : l) : i ? a ? u = s ? this.headSelection : this.anchorSelection : o && (d = s ? this.anchorSelection : this.headSelection) : (u = c, d = l), s ? (this.anchorSelection = d, this.headSelection = u) : (this.anchorSelection = u, this.headSelection = d), this.selectionIsBackward = s, !0;
|
|
2632
|
+
}
|
|
2633
|
+
restoreSelection(e) {
|
|
2634
|
+
if (!e || !this.anchorSelection || !this.headSelection) return;
|
|
2635
|
+
let t = (e, t) => this.firstActiveIndex <= e.item && e.item <= this.lastActiveIndex ? {
|
|
2636
|
+
element: e.node,
|
|
2637
|
+
offset: e.offset
|
|
2638
|
+
} : {
|
|
2639
|
+
element: e.item < this.firstActiveIndex ? this.topGapElement : this.bottomGapElement,
|
|
2640
|
+
offset: +!!t
|
|
2641
|
+
}, { element: n, offset: r } = t(this.anchorSelection, !!this.selectionIsBackward), { element: i, offset: a } = t(this.headSelection, !this.selectionIsBackward);
|
|
2642
|
+
e.setBaseAndExtent(n, r, i, a);
|
|
2643
|
+
}
|
|
2644
|
+
selectionContainsTable() {
|
|
2645
|
+
if (!this.anchorSelection || !this.headSelection) return !1;
|
|
2646
|
+
let e = this.selectionIsBackward ? this.headSelection.item : this.anchorSelection.item, t = this.selectionIsBackward ? this.anchorSelection.item : this.headSelection.item;
|
|
2647
|
+
for (let n = e; n <= t; n++) if (this.providerElement(n)?.consoleMessage().type === "table") return !0;
|
|
2648
|
+
return !1;
|
|
2649
|
+
}
|
|
2650
|
+
refresh() {
|
|
2651
|
+
this.observer.disconnect(), this.#n(), this.#t && this.observer.observe(this.#e, this.observerConfig);
|
|
2652
|
+
}
|
|
2653
|
+
#n() {
|
|
2654
|
+
if (!this.visibleHeight()) return;
|
|
2655
|
+
if (!this.itemCount) {
|
|
2656
|
+
for (let e = 0; e < this.renderedItems.length; ++e) this.renderedItems[e].willHide();
|
|
2657
|
+
this.renderedItems = [], this.#e.removeChildren(), this.topGapElement.style.height = "0px", this.bottomGapElement.style.height = "0px", this.firstActiveIndex = -1, this.lastActiveIndex = -1, this.updateFocusedItem();
|
|
2658
|
+
return;
|
|
2659
|
+
}
|
|
2660
|
+
let e = this.element.getComponentSelection(), t = this.updateSelectionModel(e), n = this.element.scrollTop, r = this.visibleHeight(), i = r * 2;
|
|
2661
|
+
this.rebuildCumulativeHeightsIfNeeded(), this.#t ? (this.firstActiveIndex = Math.max(this.itemCount - Math.ceil(i / this.provider.minimumRowHeight()), 0), this.lastActiveIndex = this.itemCount - 1) : (this.firstActiveIndex = Math.max(u(this.cumulativeHeights, n + 1 - (i - r) / 2, c), 0), this.lastActiveIndex = this.firstActiveIndex + Math.ceil(i / this.provider.minimumRowHeight()) - 1, this.lastActiveIndex = Math.min(this.lastActiveIndex, this.itemCount - 1));
|
|
2662
|
+
let a = this.cumulativeHeights[this.firstActiveIndex - 1] || 0, o = this.cumulativeHeights[this.cumulativeHeights.length - 1] - this.cumulativeHeights[this.lastActiveIndex];
|
|
2663
|
+
function s() {
|
|
2664
|
+
this.topGapElement.style.height = a + "px", this.bottomGapElement.style.height = o + "px", this.topGapElementActive = !!a, this.bottomGapElementActive = !!o, this.#e.style.setProperty("height", "10000000px");
|
|
2665
|
+
}
|
|
2666
|
+
this.partialViewportUpdate(s.bind(this)), this.#e.style.removeProperty("height"), t && this.restoreSelection(e), this.#t && (this.element.scrollTop = 1e7);
|
|
2667
|
+
}
|
|
2668
|
+
partialViewportUpdate(e) {
|
|
2669
|
+
let t = /* @__PURE__ */ new Set();
|
|
2670
|
+
for (let e = this.firstActiveIndex; e <= this.lastActiveIndex; ++e) {
|
|
2671
|
+
let n = this.providerElement(e);
|
|
2672
|
+
console.assert(!!n, "Expected provider element to be defined"), n && t.add(n);
|
|
2673
|
+
}
|
|
2674
|
+
let n = this.renderedItems.filter((e) => !t.has(e));
|
|
2675
|
+
for (let e = 0; e < n.length; ++e) n[e].willHide();
|
|
2676
|
+
e();
|
|
2677
|
+
let r = !1;
|
|
2678
|
+
for (let e = 0; e < n.length; ++e) r ||= n[e].element().hasFocus(), n[e].element().remove();
|
|
2679
|
+
let i = [], a = this.#e.firstChild;
|
|
2680
|
+
for (let e of t) {
|
|
2681
|
+
let t = e.element();
|
|
2682
|
+
t === a ? a = a.nextSibling : (t.parentElement || i.push(e), this.#e.insertBefore(t, a));
|
|
2683
|
+
}
|
|
2684
|
+
for (let e = 0; e < i.length; ++e) i[e].wasShown();
|
|
2685
|
+
this.renderedItems = Array.from(t), r && this.#e.focus(), this.updateFocusedItem();
|
|
2686
|
+
}
|
|
2687
|
+
selectedText() {
|
|
2688
|
+
if (this.updateSelectionModel(this.element.getComponentSelection()), !this.headSelection || !this.anchorSelection) return null;
|
|
2689
|
+
let e = null, t = null;
|
|
2690
|
+
this.selectionIsBackward ? (e = this.headSelection, t = this.anchorSelection) : (e = this.anchorSelection, t = this.headSelection);
|
|
2691
|
+
let n = [];
|
|
2692
|
+
for (let r = e.item; r <= t.item; ++r) {
|
|
2693
|
+
let e = this.providerElement(r);
|
|
2694
|
+
if (console.assert(!!e), !e) continue;
|
|
2695
|
+
let t = e.element().childTextNodes().map(I.untruncatedNodeText).join("");
|
|
2696
|
+
n.push(t);
|
|
2697
|
+
}
|
|
2698
|
+
let r = this.providerElement(t.item)?.element();
|
|
2699
|
+
if (r && t.node?.isSelfOrDescendant(r)) {
|
|
2700
|
+
let e = this.textOffsetInNode(r, t.node, t.offset);
|
|
2701
|
+
n.length > 0 && (n[n.length - 1] = n[n.length - 1].substring(0, e));
|
|
2702
|
+
}
|
|
2703
|
+
let i = this.providerElement(e.item)?.element();
|
|
2704
|
+
if (i && e.node?.isSelfOrDescendant(i)) {
|
|
2705
|
+
let t = this.textOffsetInNode(i, e.node, e.offset);
|
|
2706
|
+
n[0] = n[0].substring(t);
|
|
2707
|
+
}
|
|
2708
|
+
return n.join("\n");
|
|
2709
|
+
}
|
|
2710
|
+
textOffsetInNode(e, t, n) {
|
|
2711
|
+
let r = t.textContent ? t.textContent.length : 0;
|
|
2712
|
+
t.nodeType !== Node.TEXT_NODE && (n < t.childNodes.length ? (t = t.childNodes.item(n), n = 0) : n = r);
|
|
2713
|
+
let i = 0, a = e;
|
|
2714
|
+
for (; (a = a.traverseNextNode(e)) && a !== t;) a.nodeType !== Node.TEXT_NODE || a.parentNode && (a.parentNode.nodeName === "STYLE" || a.parentNode.nodeName === "SCRIPT" || a.parentNode.nodeName === "#document-fragment") || (i += I.untruncatedNodeText(a).length);
|
|
2715
|
+
let o = I.untruncatedNodeText(t).length;
|
|
2716
|
+
return n > 0 && o !== r && (n = o), i + n;
|
|
2717
|
+
}
|
|
2718
|
+
onScroll(e) {
|
|
2719
|
+
this.refresh();
|
|
2720
|
+
}
|
|
2721
|
+
firstVisibleIndex() {
|
|
2722
|
+
return this.cumulativeHeights.length ? (this.rebuildCumulativeHeightsIfNeeded(), u(this.cumulativeHeights, this.element.scrollTop + 1, c)) : -1;
|
|
2723
|
+
}
|
|
2724
|
+
lastVisibleIndex() {
|
|
2725
|
+
if (!this.cumulativeHeights.length) return -1;
|
|
2726
|
+
this.rebuildCumulativeHeightsIfNeeded();
|
|
2727
|
+
let e = this.element.scrollTop + this.element.clientHeight, t = this.itemCount - 1;
|
|
2728
|
+
return u(this.cumulativeHeights, e, c, void 0, t);
|
|
2729
|
+
}
|
|
2730
|
+
renderedElementAt(e) {
|
|
2731
|
+
return e === -1 || e < this.firstActiveIndex || e > this.lastActiveIndex ? null : this.renderedItems[e - this.firstActiveIndex].element();
|
|
2732
|
+
}
|
|
2733
|
+
scrollItemIntoView(e, t) {
|
|
2734
|
+
let n = this.firstVisibleIndex(), r = this.lastVisibleIndex();
|
|
2735
|
+
e > n && e < r || e === r && this.cumulativeHeights[e] <= this.element.scrollTop + this.visibleHeight() || (t ? this.forceScrollItemToBeLast(e) : e <= n ? this.forceScrollItemToBeFirst(e) : e >= r && this.forceScrollItemToBeLast(e));
|
|
2736
|
+
}
|
|
2737
|
+
forceScrollItemToBeFirst(e) {
|
|
2738
|
+
console.assert(e >= 0 && e < this.itemCount, "Cannot scroll item at invalid index"), this.setStickToBottom(!1), this.rebuildCumulativeHeightsIfNeeded(), this.element.scrollTop = e > 0 ? this.cumulativeHeights[e - 1] : 0, xe(this.element) && this.setStickToBottom(!0), this.refresh();
|
|
2739
|
+
let t = this.renderedElementAt(e);
|
|
2740
|
+
t && t.scrollIntoView(!0);
|
|
2741
|
+
}
|
|
2742
|
+
forceScrollItemToBeLast(e) {
|
|
2743
|
+
console.assert(e >= 0 && e < this.itemCount, "Cannot scroll item at invalid index"), this.setStickToBottom(!1), this.rebuildCumulativeHeightsIfNeeded(), this.element.scrollTop = this.cumulativeHeights[e] - this.visibleHeight(), xe(this.element) && this.setStickToBottom(!0), this.refresh();
|
|
2744
|
+
let t = this.renderedElementAt(e);
|
|
2745
|
+
t && t.scrollIntoView(!1);
|
|
2746
|
+
}
|
|
2747
|
+
visibleHeight() {
|
|
2748
|
+
return this.element.offsetHeight;
|
|
2749
|
+
}
|
|
2750
|
+
}, _a = /* @__PURE__ */ e({
|
|
2751
|
+
ActionDelegate: () => Ta,
|
|
2752
|
+
ConsoleView: () => $,
|
|
2753
|
+
ConsoleViewFilter: () => wa
|
|
2754
|
+
}), Z = {
|
|
2755
|
+
issuesWithColon: "{n, plural, =0 {No Issues} =1 {# Issue:} other {# Issues:}}",
|
|
2756
|
+
issueToolbarTooltipGeneral: "Some problems no longer generate console messages, but are surfaced in the issues tab.",
|
|
2757
|
+
issueToolbarClickToView: "Click to view {issueEnumeration}",
|
|
2758
|
+
issueToolbarClickToGoToTheIssuesTab: "Click to go to the issues tab",
|
|
2759
|
+
findStringInLogs: "Find string in logs",
|
|
2760
|
+
consoleSettings: "Console settings",
|
|
2761
|
+
groupSimilarMessagesInConsole: "Group similar messages",
|
|
2762
|
+
showCorsErrorsInConsole: "CORS errors in console",
|
|
2763
|
+
showConsoleSidebar: "Show console sidebar",
|
|
2764
|
+
hideConsoleSidebar: "Hide console sidebar",
|
|
2765
|
+
consoleSidebarShown: "Console sidebar shown",
|
|
2766
|
+
consoleSidebarHidden: "Console sidebar hidden",
|
|
2767
|
+
doNotClearLogOnPageReload: "Do not clear log on page reload / navigation",
|
|
2768
|
+
preserveLog: "Preserve log",
|
|
2769
|
+
networkMessages: "Network messages",
|
|
2770
|
+
onlyShowMessagesFromTheCurrentContext: "Only show messages from the current context (`top`, `iframe`, `worker`, extension)",
|
|
2771
|
+
selectedContextOnly: "Selected context only",
|
|
2772
|
+
logXMLHttpRequests: "Log XMLHttpRequests",
|
|
2773
|
+
eagerlyEvaluateTextInThePrompt: "Eagerly evaluate text in the prompt",
|
|
2774
|
+
autocompleteFromHistory: "Autocomplete from history",
|
|
2775
|
+
treatEvaluationAsUserActivation: "Treat evaluation as user activation",
|
|
2776
|
+
sHidden: "{n, plural, =1 {# hidden} other {# hidden}}",
|
|
2777
|
+
consoleCleared: "Console cleared",
|
|
2778
|
+
hideMessagesFromS: "Hide messages from {PH1}",
|
|
2779
|
+
saveAs: "Save as…",
|
|
2780
|
+
copyConsole: "Copy console",
|
|
2781
|
+
copyVisibleStyledSelection: "Copy visible styled selection",
|
|
2782
|
+
replayXhr: "Replay XHR",
|
|
2783
|
+
writingFile: "Writing file…",
|
|
2784
|
+
searching: "Searching…",
|
|
2785
|
+
egEventdCdnUrlacom: "e.g. `/eventd/ -cdn url:a.com`",
|
|
2786
|
+
verbose: "Verbose",
|
|
2787
|
+
info: "Info",
|
|
2788
|
+
warnings: "Warnings",
|
|
2789
|
+
errors: "Errors",
|
|
2790
|
+
overriddenByFilterSidebar: "Log levels are controlled by the console sidebar.",
|
|
2791
|
+
customLevels: "Custom levels",
|
|
2792
|
+
sOnly: "{PH1} only",
|
|
2793
|
+
allLevels: "All levels",
|
|
2794
|
+
defaultLevels: "Default levels",
|
|
2795
|
+
hideAll: "Hide all",
|
|
2796
|
+
logLevelS: "Log level: {PH1}",
|
|
2797
|
+
default: "Default",
|
|
2798
|
+
filteredMessagesInConsole: "{PH1} messages in console",
|
|
2799
|
+
collapseAll: "Collapse all",
|
|
2800
|
+
expandAll: "Expand all"
|
|
2801
|
+
}, va = g("panels/console/ConsoleView.ts", Z), Q = ae.bind(void 0, va), ya, ba = 5, xa = "console-ai-code-completion-disclaimer-tooltip", Sa = "console-ai-code-completion-spinner-tooltip", Ca = "console-ai-code-completion-citations-tooltip", $ = class e extends ht {
|
|
2802
|
+
#e;
|
|
2803
|
+
sidebar;
|
|
2804
|
+
isSidebarOpen;
|
|
2805
|
+
filter;
|
|
2806
|
+
consoleToolbarContainer;
|
|
2807
|
+
splitWidget;
|
|
2808
|
+
contentsElement;
|
|
2809
|
+
visibleViewMessages;
|
|
2810
|
+
hiddenByFilterCount;
|
|
2811
|
+
shouldBeHiddenCache;
|
|
2812
|
+
lastShownHiddenByFilterCount;
|
|
2813
|
+
currentMatchRangeIndex;
|
|
2814
|
+
searchRegex;
|
|
2815
|
+
groupableMessages;
|
|
2816
|
+
groupableMessageTitle;
|
|
2817
|
+
shortcuts;
|
|
2818
|
+
regexMatchRanges;
|
|
2819
|
+
consoleContextSelector;
|
|
2820
|
+
filterStatusText;
|
|
2821
|
+
showSettingsPaneSetting;
|
|
2822
|
+
showSettingsPaneButton;
|
|
2823
|
+
progressToolbarItem;
|
|
2824
|
+
groupSimilarSetting;
|
|
2825
|
+
showCorsErrorsSetting;
|
|
2826
|
+
timestampsSetting;
|
|
2827
|
+
consoleHistoryAutocompleteSetting;
|
|
2828
|
+
selfXssWarningDisabledSetting;
|
|
2829
|
+
pinPane;
|
|
2830
|
+
viewport;
|
|
2831
|
+
messagesElement;
|
|
2832
|
+
messagesCountElement;
|
|
2833
|
+
viewportThrottler;
|
|
2834
|
+
pendingBatchResize;
|
|
2835
|
+
onMessageResizedBound;
|
|
2836
|
+
promptElement;
|
|
2837
|
+
linkifier;
|
|
2838
|
+
consoleMessages;
|
|
2839
|
+
consoleGroupStarts;
|
|
2840
|
+
prompt;
|
|
2841
|
+
immediatelyFilterMessagesForTest;
|
|
2842
|
+
maybeDirtyWhileMuted;
|
|
2843
|
+
scheduledRefreshPromiseForTest;
|
|
2844
|
+
needsFullUpdate;
|
|
2845
|
+
buildHiddenCacheTimeout;
|
|
2846
|
+
searchShouldJumpBackwards;
|
|
2847
|
+
searchProgressIndicator;
|
|
2848
|
+
#t;
|
|
2849
|
+
muteViewportUpdates;
|
|
2850
|
+
waitForScrollTimeout;
|
|
2851
|
+
issueCounter;
|
|
2852
|
+
pendingSidebarMessages = [];
|
|
2853
|
+
userHasOpenedSidebarAtLeastOnce = !1;
|
|
2854
|
+
issueToolbarThrottle;
|
|
2855
|
+
requestResolver = new Sn();
|
|
2856
|
+
issueResolver = new dr();
|
|
2857
|
+
#n = !1;
|
|
2858
|
+
#r = this.#d.bind(this);
|
|
2859
|
+
#i;
|
|
2860
|
+
#a = !1;
|
|
2861
|
+
aiCodeCompletionConfig;
|
|
2862
|
+
aiCodeCompletionSummaryToolbarContainer;
|
|
2863
|
+
aiCodeCompletionSummaryToolbar;
|
|
2864
|
+
constructor(e) {
|
|
2865
|
+
super(), this.setMinimumSize(0, 35), this.registerRequiredCSS(Rr, lr, sr), this.#e = new ct(this, null), this.#e.element.classList.add("console-searchable-view"), this.#e.setPlaceholder(Q(Z.findStringInLogs)), this.#e.setMinimalSearchQuerySize(0), this.sidebar = new pa(), this.sidebar.addEventListener(ma.FILTER_SELECTED, this.onFilterChanged.bind(this)), this.isSidebarOpen = !1, this.filter = new wa(this.onFilterChanged.bind(this)), this.consoleToolbarContainer = this.element.createChild("div", "console-toolbar-container"), this.consoleToolbarContainer.role = "toolbar", this.splitWidget = new Qe(!0, !1, "console.sidebar.width", 100), this.splitWidget.setMainWidget(this.#e), this.splitWidget.setSidebarWidget(this.sidebar), this.splitWidget.show(this.element), this.splitWidget.hideSidebar(), this.splitWidget.enableShowModeSaving(), this.isSidebarOpen = this.splitWidget.showMode() === nt.BOTH, this.filter.setLevelMenuOverridden(this.isSidebarOpen), this.splitWidget.addEventListener(De.SHOW_MODE_CHANGED, (e) => {
|
|
2866
|
+
this.isSidebarOpen = e.data === nt.BOTH, this.isSidebarOpen && (this.userHasOpenedSidebarAtLeastOnce ||= (j.actionTaken(k.ConsoleSidebarOpened), !0), this.pendingSidebarMessages.forEach((e) => {
|
|
2867
|
+
this.sidebar.onMessageAdded(e);
|
|
2868
|
+
}), this.pendingSidebarMessages = []), this.filter.setLevelMenuOverridden(this.isSidebarOpen), this.onFilterChanged();
|
|
2869
|
+
}), this.contentsElement = this.#e.element, this.element.classList.add("console-view"), this.visibleViewMessages = [], this.hiddenByFilterCount = 0, this.shouldBeHiddenCache = /* @__PURE__ */ new Set(), this.groupableMessages = /* @__PURE__ */ new Map(), this.groupableMessageTitle = /* @__PURE__ */ new Map(), this.shortcuts = /* @__PURE__ */ new Map(), this.regexMatchRanges = [], this.consoleContextSelector = new Dr(), this.filterStatusText = new Wt(), this.filterStatusText.element.classList.add("dimmed"), this.showSettingsPaneSetting = m.instance().createSetting("console-show-settings-toolbar", !1), this.showSettingsPaneButton = new kt(this.showSettingsPaneSetting, "gear", Q(Z.consoleSettings), "gear-filled"), this.showSettingsPaneButton.element.setAttribute("jslog", `${Ft("console-settings").track({ click: !0 })}`), this.progressToolbarItem = new Bt(document.createElement("div")), this.groupSimilarSetting = m.instance().moduleSetting("console-group-similar"), this.groupSimilarSetting.addChangeListener(() => this.updateMessageList()), this.showCorsErrorsSetting = m.instance().moduleSetting("console-shows-cors-errors"), this.showCorsErrorsSetting.addChangeListener(() => this.updateMessageList());
|
|
2870
|
+
let t = this.consoleToolbarContainer.createChild("devtools-toolbar", "console-main-toolbar");
|
|
2871
|
+
t.setAttribute("jslog", `${jt()}`), t.role = "presentation", t.wrappable = !0, t.appendToolbarItem(this.splitWidget.createShowHideSidebarButton(Q(Z.showConsoleSidebar), Q(Z.hideConsoleSidebar), Q(Z.consoleSidebarShown), Q(Z.consoleSidebarHidden), "console-sidebar")), t.appendToolbarItem(tt.createActionButton("console.clear")), this.#i = new Ze(Q(Z.collapseAll), "compress", void 0, "console.collapse-all"), this.#i.addEventListener(Ze.Events.CLICK, this.#l, this), t.appendToolbarItem(this.#i), t.appendSeparator(), t.appendToolbarItem(this.consoleContextSelector.toolbarItem()), t.appendSeparator();
|
|
2872
|
+
let n = tt.createActionButton("console.create-pin");
|
|
2873
|
+
t.appendToolbarItem(n), t.appendSeparator(), t.appendToolbarItem(this.filter.textFilterUI), t.appendToolbarItem(this.filter.levelMenuButton), t.appendToolbarItem(this.filter.levelMenuButtonInfo), t.appendToolbarItem(this.progressToolbarItem), t.appendSeparator(), this.issueCounter = new hr(), this.issueCounter.id = "console-issues-counter", this.issueCounter.setAttribute("jslog", `${ze("issues").track({ click: !0 })}`);
|
|
2874
|
+
let r = new Bt(this.issueCounter);
|
|
2875
|
+
this.issueCounter.data = {
|
|
2876
|
+
clickHandler: () => {
|
|
2877
|
+
j.issuesPanelOpenedFrom(lt.STATUS_BAR_ISSUES_COUNTER), Et.instance().showView("issues-pane");
|
|
2878
|
+
},
|
|
2879
|
+
issuesManager: fr.instance(),
|
|
2880
|
+
accessibleName: Q(Z.issueToolbarTooltipGeneral),
|
|
2881
|
+
displayMode: mr.OMIT_EMPTY
|
|
2882
|
+
}, t.appendToolbarItem(r), t.appendSeparator(), t.appendToolbarItem(this.filterStatusText), t.appendToolbarItem(this.showSettingsPaneButton);
|
|
2883
|
+
let i = m.instance().moduleSetting("monitoring-xhr-enabled");
|
|
2884
|
+
this.timestampsSetting = m.instance().moduleSetting("console-timestamps-enabled"), this.consoleHistoryAutocompleteSetting = m.instance().moduleSetting("console-history-autocomplete"), this.selfXssWarningDisabledSetting = m.instance().createSetting("disable-self-xss-warning", !1, fe.SYNCED);
|
|
2885
|
+
let a = this.contentsElement.createChild("div", "console-settings-pane");
|
|
2886
|
+
b(a, Q(Z.consoleSettings)), rt(a);
|
|
2887
|
+
let o = m.instance().moduleSetting("console-eager-eval"), s = m.instance().moduleSetting("preserve-console-log"), c = m.instance().moduleSetting("console-user-activation-eval");
|
|
2888
|
+
a.append(L(Q(Z.networkMessages), this.filter.networkMessagesSetting, this.filter.networkMessagesSetting.title()), L(Q(Z.logXMLHttpRequests), i), L(Q(Z.preserveLog), s, Q(Z.doNotClearLogOnPageReload)), L(o.title(), o, Q(Z.eagerlyEvaluateTextInThePrompt)), L(Q(Z.selectedContextOnly), this.filter.filterByExecutionContextSetting, Q(Z.onlyShowMessagesFromTheCurrentContext)), L(this.consoleHistoryAutocompleteSetting.title(), this.consoleHistoryAutocompleteSetting, Q(Z.autocompleteFromHistory)), L(this.groupSimilarSetting.title(), this.groupSimilarSetting, Q(Z.groupSimilarMessagesInConsole)), L(c.title(), c, Q(Z.treatEvaluationAsUserActivation)), L(this.showCorsErrorsSetting.title(), this.showCorsErrorsSetting, Q(Z.showCorsErrorsInConsole))), this.showSettingsPaneSetting.get() || a.classList.add("hidden"), this.showSettingsPaneSetting.addChangeListener(() => a.classList.toggle("hidden", !this.showSettingsPaneSetting.get())), this.pinPane = new Ji(() => this.prompt.focus()), this.pinPane.element.classList.add("console-view-pinpane"), this.pinPane.element.classList.remove("flex-auto"), this.pinPane.show(this.contentsElement), this.viewport = new ga(this), this.viewport.setStickToBottom(!0), this.viewport.contentElement().classList.add("console-group", "console-group-messages"), this.contentsElement.appendChild(this.viewport.element), this.messagesElement = this.viewport.element, this.messagesElement.id = "console-messages", this.messagesElement.classList.add("monospace"), this.messagesElement.addEventListener("click", this.messagesClicked.bind(this), !1), [
|
|
2889
|
+
"paste",
|
|
2890
|
+
"clipboard-paste",
|
|
2891
|
+
"drop"
|
|
2892
|
+
].forEach((e) => {
|
|
2893
|
+
this.messagesElement.addEventListener(e, this.messagesPasted.bind(this), !0);
|
|
2894
|
+
}), this.messagesCountElement = this.consoleToolbarContainer.createChild("div", "message-count"), At(this.messagesCountElement, !1), this.viewportThrottler = new ce(e), this.pendingBatchResize = !1, this.onMessageResizedBound = (e) => {
|
|
2895
|
+
this.onMessageResized(e);
|
|
2896
|
+
}, this.promptElement = this.messagesElement.createChild("div", "source-code"), this.promptElement.id = "console-prompt";
|
|
2897
|
+
let l = this.messagesElement.createChild("div", "console-view-fix-select-all");
|
|
2898
|
+
l.textContent = ".", Be(l, !0), this.registerShortcuts(), this.messagesElement.addEventListener("contextmenu", this.handleContextMenuEvent.bind(this), !1);
|
|
2899
|
+
let u = new ce(100), d = () => u.schedule(async () => this.onFilterChanged());
|
|
2900
|
+
this.linkifier = new I(40), this.linkifier.addEventListener(On.LIVE_LOCATION_UPDATED, d), this.consoleMessages = [], this.consoleGroupStarts = [], this.aiCodeCompletionConfig = Dn.isAiCodeCompletionAvailable() ? {
|
|
2901
|
+
completionContext: {
|
|
2902
|
+
getPrefix: this.getConsoleMessageHistory.bind(this),
|
|
2903
|
+
additionalFiles: [{
|
|
2904
|
+
path: "devtools-console-context.js",
|
|
2905
|
+
content: yn,
|
|
2906
|
+
included_reason: Rt.RELATED_FILE
|
|
2907
|
+
}],
|
|
2908
|
+
stopSequences: ["\n\n"]
|
|
2909
|
+
},
|
|
2910
|
+
generationContext: { additionalPreambleContext: En },
|
|
2911
|
+
onFeatureEnabled: () => {
|
|
2912
|
+
this.setupAiCodeCompletion();
|
|
2913
|
+
},
|
|
2914
|
+
onFeatureDisabled: () => {
|
|
2915
|
+
this.cleanupAiCodeCompletion();
|
|
2916
|
+
},
|
|
2917
|
+
onSuggestionAccepted: this.#o.bind(this),
|
|
2918
|
+
onRequestTriggered: this.#s.bind(this),
|
|
2919
|
+
onResponseReceived: this.#c.bind(this),
|
|
2920
|
+
panel: bn.CONSOLE
|
|
2921
|
+
} : void 0, this.prompt = new Ba(this.aiCodeCompletionConfig), this.prompt.show(this.promptElement), this.prompt.element.addEventListener("keydown", this.promptKeyDown.bind(this), !0), this.prompt.addEventListener(Va.TEXT_CHANGED, this.promptTextChanged, this), this.messagesElement.addEventListener("keydown", this.messagesKeyDown.bind(this), !1), this.prompt.element.addEventListener("focusin", () => {
|
|
2922
|
+
this.isScrolledToBottom() && this.viewport.setStickToBottom(!0);
|
|
2923
|
+
}), this.consoleHistoryAutocompleteSetting.addChangeListener(this.consoleHistoryAutocompleteChanged, this), this.consoleHistoryAutocompleteChanged(), this.updateFilterStatus(), this.timestampsSetting.addChangeListener(this.consoleTimestampsSettingChanged, this), this.registerWithMessageSink(), D.instance().addFlavorChangeListener(y, this.executionContextChanged, this), this.messagesElement.addEventListener("mousedown", (e) => this.updateStickToBottomOnPointerDown(e.button === 2), !1), this.messagesElement.addEventListener("mouseup", this.updateStickToBottomOnPointerUp.bind(this), !1), this.messagesElement.addEventListener("mouseleave", this.updateStickToBottomOnPointerUp.bind(this), !1), this.messagesElement.addEventListener("wheel", this.updateStickToBottomOnWheel.bind(this), !1), this.messagesElement.addEventListener("touchstart", this.updateStickToBottomOnPointerDown.bind(this, !1), !1), this.messagesElement.addEventListener("touchend", this.updateStickToBottomOnPointerUp.bind(this), !1), this.messagesElement.addEventListener("touchcancel", this.updateStickToBottomOnPointerUp.bind(this), !1), x.instance().addModelListener(S, v.ConsoleCleared, this.consoleCleared, this, { scoped: !0 }), x.instance().addModelListener(S, v.MessageAdded, this.onConsoleMessageAdded, this, { scoped: !0 }), x.instance().addModelListener(S, v.MessageUpdated, this.onConsoleMessageUpdated, this, { scoped: !0 }), x.instance().addModelListener(S, v.CommandEvaluated, this.commandEvaluated, this, { scoped: !0 }), x.instance().observeModels(S, this, { scoped: !0 });
|
|
2924
|
+
let f = fr.instance();
|
|
2925
|
+
this.issueToolbarThrottle = new ce(100), f.addEventListener(ur.ISSUES_COUNT_UPDATED, this.#r);
|
|
2926
|
+
}
|
|
2927
|
+
static clearConsoleViewInstanceForTest() {
|
|
2928
|
+
ya = null;
|
|
2929
|
+
}
|
|
2930
|
+
static instance(t) {
|
|
2931
|
+
return (!ya || t?.forceNew) && (ya = new e(t?.viewportThrottlerTimeout ?? 50)), ya;
|
|
2932
|
+
}
|
|
2933
|
+
createAiCodeCompletionSummaryToolbar() {
|
|
2934
|
+
this.aiCodeCompletionSummaryToolbar || (this.aiCodeCompletionSummaryToolbar = new Fn({
|
|
2935
|
+
citationsTooltipId: Ca,
|
|
2936
|
+
disclaimerTooltipId: xa,
|
|
2937
|
+
spinnerTooltipId: Sa,
|
|
2938
|
+
panel: bn.CONSOLE
|
|
2939
|
+
}), this.aiCodeCompletionSummaryToolbarContainer = this.element.createChild("div", "ai-code-completion-summary-toolbar-container"), this.aiCodeCompletionSummaryToolbar.show(this.aiCodeCompletionSummaryToolbarContainer, void 0, !0));
|
|
2940
|
+
}
|
|
2941
|
+
#o(e) {
|
|
2942
|
+
if (!this.aiCodeCompletionSummaryToolbar || e.length === 0) return;
|
|
2943
|
+
let t = e.map((e) => e.uri).filter((e) => !!e);
|
|
2944
|
+
this.aiCodeCompletionSummaryToolbar.updateCitations(t);
|
|
2945
|
+
}
|
|
2946
|
+
#s() {
|
|
2947
|
+
this.aiCodeCompletionSummaryToolbar?.setLoading(!0);
|
|
2948
|
+
}
|
|
2949
|
+
#c() {
|
|
2950
|
+
this.aiCodeCompletionSummaryToolbar?.setLoading(!1);
|
|
2951
|
+
}
|
|
2952
|
+
clearConsole() {
|
|
2953
|
+
S.requestClearMessages(), this.prompt.clearAiCodeCompletionCache();
|
|
2954
|
+
}
|
|
2955
|
+
collapseAll() {
|
|
2956
|
+
for (let e of this.consoleMessages) e instanceof $r && e.setCollapsedSilent(!0), e.setTraceExpanded(!1);
|
|
2957
|
+
this.updateMessageList();
|
|
2958
|
+
}
|
|
2959
|
+
expandAll() {
|
|
2960
|
+
for (let e of this.consoleMessages) e instanceof $r && e.setCollapsedSilent(!1), e.setTraceExpanded(!0);
|
|
2961
|
+
this.updateMessageList();
|
|
2962
|
+
}
|
|
2963
|
+
#l() {
|
|
2964
|
+
this.#a ? this.expandAll() : this.collapseAll(), this.#a = !this.#a, this.#u();
|
|
2965
|
+
}
|
|
2966
|
+
#u() {
|
|
2967
|
+
let e = !1, t = !1;
|
|
2968
|
+
for (let n of this.visibleViewMessages) if (n instanceof $r && (e ||= !n.collapsed(), t ||= n.collapsed()), n.isExpandableTrace() && (e ||= n.isTraceExpanded(), t ||= !n.isTraceExpanded()), e && t) break;
|
|
2969
|
+
this.#a = !e && t, this.#a ? (this.#i.setGlyph("expand"), this.#i.setTitle(Q(Z.expandAll))) : (this.#i.setGlyph("compress"), this.#i.setTitle(Q(Z.collapseAll)));
|
|
2970
|
+
}
|
|
2971
|
+
#d() {
|
|
2972
|
+
this.issueToolbarThrottle.schedule(async () => this.updateIssuesToolbarItem()), this.issuesCountUpdatedForTest();
|
|
2973
|
+
}
|
|
2974
|
+
issuesCountUpdatedForTest() {}
|
|
2975
|
+
modelAdded(e) {
|
|
2976
|
+
e.messages().forEach(this.addConsoleMessage, this);
|
|
2977
|
+
}
|
|
2978
|
+
modelRemoved(e) {
|
|
2979
|
+
!m.instance().moduleSetting("preserve-console-log").get() && e.target().outermostTarget() === e.target() && this.consoleCleared();
|
|
2980
|
+
}
|
|
2981
|
+
onFilterChanged() {
|
|
2982
|
+
if (this.filter.currentFilter.levelsMask = this.isSidebarOpen ? R.allLevelsFilterValue() : this.filter.messageLevelFiltersSetting.get(), this.cancelBuildHiddenCache(), this.immediatelyFilterMessagesForTest) {
|
|
2983
|
+
for (let e of this.consoleMessages) this.computeShouldMessageBeVisible(e);
|
|
2984
|
+
this.updateMessageList();
|
|
2985
|
+
return;
|
|
2986
|
+
}
|
|
2987
|
+
this.buildHiddenCache(0, this.consoleMessages.slice());
|
|
2988
|
+
}
|
|
2989
|
+
setImmediatelyFilterMessagesForTest() {
|
|
2990
|
+
this.immediatelyFilterMessagesForTest = !0;
|
|
2991
|
+
}
|
|
2992
|
+
searchableView() {
|
|
2993
|
+
return this.#e;
|
|
2994
|
+
}
|
|
2995
|
+
clearHistory() {
|
|
2996
|
+
this.prompt.history().clear(), this.prompt.clearAiCodeCompletionCache();
|
|
2997
|
+
}
|
|
2998
|
+
consoleHistoryAutocompleteChanged() {
|
|
2999
|
+
this.prompt.setAddCompletionsFromHistory(this.consoleHistoryAutocompleteSetting.get());
|
|
3000
|
+
}
|
|
3001
|
+
itemCount() {
|
|
3002
|
+
return this.visibleViewMessages.length;
|
|
3003
|
+
}
|
|
3004
|
+
itemElement(e) {
|
|
3005
|
+
return this.visibleViewMessages[e];
|
|
3006
|
+
}
|
|
3007
|
+
fastHeight(e) {
|
|
3008
|
+
return this.visibleViewMessages[e].fastHeight();
|
|
3009
|
+
}
|
|
3010
|
+
minimumRowHeight() {
|
|
3011
|
+
return 16;
|
|
3012
|
+
}
|
|
3013
|
+
registerWithMessageSink() {
|
|
3014
|
+
d.instance().messages().forEach(this.addSinkMessage, this), d.instance().addEventListener(oe.MESSAGE_ADDED, ({ data: e }) => {
|
|
3015
|
+
this.addSinkMessage(e);
|
|
3016
|
+
}, this);
|
|
3017
|
+
}
|
|
3018
|
+
addSinkMessage(e) {
|
|
3019
|
+
let t = E.LogEntryLevel.Verbose;
|
|
3020
|
+
switch (e.level) {
|
|
3021
|
+
case le.INFO:
|
|
3022
|
+
t = E.LogEntryLevel.Info;
|
|
3023
|
+
break;
|
|
3024
|
+
case le.ERROR:
|
|
3025
|
+
t = E.LogEntryLevel.Error;
|
|
3026
|
+
break;
|
|
3027
|
+
case le.WARNING:
|
|
3028
|
+
t = E.LogEntryLevel.Warning;
|
|
3029
|
+
break;
|
|
3030
|
+
}
|
|
3031
|
+
let n = new st(null, e.source || E.LogEntrySource.Other, t, e.text, {
|
|
3032
|
+
type: w.System,
|
|
3033
|
+
timestamp: e.timestamp
|
|
3034
|
+
});
|
|
3035
|
+
this.addConsoleMessage(n);
|
|
3036
|
+
}
|
|
3037
|
+
consoleTimestampsSettingChanged() {
|
|
3038
|
+
this.updateMessageList(), this.consoleMessages.forEach((e) => e.updateTimestamp()), this.groupableMessageTitle.forEach((e) => e.updateTimestamp());
|
|
3039
|
+
}
|
|
3040
|
+
executionContextChanged() {
|
|
3041
|
+
this.prompt.clearAutocomplete();
|
|
3042
|
+
}
|
|
3043
|
+
willHide() {
|
|
3044
|
+
super.willHide(), this.hidePromptSuggestBox();
|
|
3045
|
+
}
|
|
3046
|
+
dispose() {
|
|
3047
|
+
x.instance().removeModelListener(S, v.ConsoleCleared, this.consoleCleared, this), x.instance().removeModelListener(S, v.MessageAdded, this.onConsoleMessageAdded, this), x.instance().removeModelListener(S, v.MessageUpdated, this.onConsoleMessageUpdated, this), x.instance().removeModelListener(S, v.CommandEvaluated, this.commandEvaluated, this), x.instance().unobserveModels(S, this), fr.instance().removeEventListener(ur.ISSUES_COUNT_UPDATED, this.#r);
|
|
3048
|
+
}
|
|
3049
|
+
wasShown() {
|
|
3050
|
+
super.wasShown(), this.#n && fr.instance().addEventListener(ur.ISSUES_COUNT_UPDATED, this.#r), this.#n = !1, this.updateIssuesToolbarItem(), this.viewport.refresh();
|
|
3051
|
+
}
|
|
3052
|
+
focus() {
|
|
3053
|
+
this.viewport.hasVirtualSelection() ? this.viewport.contentElement().focus() : this.focusPrompt();
|
|
3054
|
+
}
|
|
3055
|
+
focusPrompt() {
|
|
3056
|
+
if (!this.prompt.hasFocus()) {
|
|
3057
|
+
let e = this.viewport.stickToBottom(), t = this.viewport.element.scrollTop;
|
|
3058
|
+
this.prompt.focus(), this.viewport.setStickToBottom(e), this.viewport.element.scrollTop = t;
|
|
3059
|
+
}
|
|
3060
|
+
}
|
|
3061
|
+
restoreScrollPositions() {
|
|
3062
|
+
this.viewport.stickToBottom() ? this.immediatelyScrollToBottom() : super.restoreScrollPositions();
|
|
3063
|
+
}
|
|
3064
|
+
onResize() {
|
|
3065
|
+
this.scheduleViewportRefresh(), this.hidePromptSuggestBox(), this.viewport.stickToBottom() && this.immediatelyScrollToBottom();
|
|
3066
|
+
for (let e = 0; e < this.visibleViewMessages.length; ++e) this.visibleViewMessages[e].onResize();
|
|
3067
|
+
}
|
|
3068
|
+
hidePromptSuggestBox() {
|
|
3069
|
+
this.prompt.clearAutocomplete();
|
|
3070
|
+
}
|
|
3071
|
+
async invalidateViewport() {
|
|
3072
|
+
if (this.updateIssuesToolbarItem(), this.muteViewportUpdates) {
|
|
3073
|
+
this.maybeDirtyWhileMuted = !0;
|
|
3074
|
+
return;
|
|
3075
|
+
}
|
|
3076
|
+
this.needsFullUpdate ? (this.updateMessageList(), delete this.needsFullUpdate) : this.viewport.invalidate();
|
|
3077
|
+
}
|
|
3078
|
+
onDetach() {
|
|
3079
|
+
this.#n = !0, fr.instance().removeEventListener(ur.ISSUES_COUNT_UPDATED, this.#r);
|
|
3080
|
+
}
|
|
3081
|
+
updateIssuesToolbarItem() {
|
|
3082
|
+
if (this.#n) return;
|
|
3083
|
+
let e = fr.instance(), t = pr(e), n = e.numberOfIssues() === 0 ? Q(Z.issueToolbarClickToGoToTheIssuesTab) : Q(Z.issueToolbarClickToView, { issueEnumeration: t }), r = `${Q(Z.issueToolbarTooltipGeneral)} ${n}`;
|
|
3084
|
+
C.install(this.issueCounter, r), this.issueCounter.data = {
|
|
3085
|
+
...this.issueCounter.data,
|
|
3086
|
+
leadingText: Q(Z.issuesWithColon, { n: e.numberOfIssues() }),
|
|
3087
|
+
accessibleName: r
|
|
3088
|
+
};
|
|
3089
|
+
}
|
|
3090
|
+
scheduleViewportRefresh() {
|
|
3091
|
+
if (this.muteViewportUpdates) {
|
|
3092
|
+
this.maybeDirtyWhileMuted = !0;
|
|
3093
|
+
return;
|
|
3094
|
+
}
|
|
3095
|
+
this.scheduledRefreshPromiseForTest = this.viewportThrottler.schedule(this.invalidateViewport.bind(this));
|
|
3096
|
+
}
|
|
3097
|
+
getScheduledRefreshPromiseForTest() {
|
|
3098
|
+
return this.scheduledRefreshPromiseForTest;
|
|
3099
|
+
}
|
|
3100
|
+
immediatelyScrollToBottom() {
|
|
3101
|
+
this.viewport.setStickToBottom(!0), this.promptElement.scrollIntoView(!0);
|
|
3102
|
+
}
|
|
3103
|
+
updateFilterStatus() {
|
|
3104
|
+
this.hiddenByFilterCount !== this.lastShownHiddenByFilterCount && (this.filterStatusText.setText(Q(Z.sHidden, { n: this.hiddenByFilterCount })), this.filterStatusText.setVisible(!!this.hiddenByFilterCount), this.lastShownHiddenByFilterCount = this.hiddenByFilterCount);
|
|
3105
|
+
}
|
|
3106
|
+
onConsoleMessageAdded(e) {
|
|
3107
|
+
let t = e.data;
|
|
3108
|
+
this.addConsoleMessage(t);
|
|
3109
|
+
}
|
|
3110
|
+
addConsoleMessage(e) {
|
|
3111
|
+
let t = this.createViewMessage(e);
|
|
3112
|
+
if (Da.set(e, t), e.type === w.Command || e.type === w.Result) {
|
|
3113
|
+
let e = this.consoleMessages[this.consoleMessages.length - 1], n = e && Ea.get(e) || 0;
|
|
3114
|
+
Ea.set(t, n);
|
|
3115
|
+
} else Ea.set(t, t.consoleMessage().timestamp);
|
|
3116
|
+
let n;
|
|
3117
|
+
n = !this.consoleMessages.length || c(t, this.consoleMessages[this.consoleMessages.length - 1]) > 0 ? this.consoleMessages.length : a(this.consoleMessages, t, c);
|
|
3118
|
+
let r = n < this.consoleMessages.length;
|
|
3119
|
+
if (this.consoleMessages.splice(n, 0, t), e.type === w.Command) this.prompt.history().pushHistoryItem(e.messageText), this.prompt.history().length() >= ba && !this.selfXssWarningDisabledSetting.get() && this.selfXssWarningDisabledSetting.set(!0);
|
|
3120
|
+
else if (e.type !== w.Result) {
|
|
3121
|
+
let r = a(this.consoleGroupStarts, t, c) - 1;
|
|
3122
|
+
if (r >= 0) {
|
|
3123
|
+
let e = this.consoleGroupStarts[r];
|
|
3124
|
+
s(t, e);
|
|
3125
|
+
}
|
|
3126
|
+
e.isGroupStartMessage() && (n = a(this.consoleGroupStarts, t, c), this.consoleGroupStarts.splice(n, 0, t));
|
|
3127
|
+
}
|
|
3128
|
+
this.filter.onMessageAdded(e), this.isSidebarOpen ? this.sidebar.onMessageAdded(t) : this.pendingSidebarMessages.push(t);
|
|
3129
|
+
let i = !1, o = this.groupSimilarSetting.get();
|
|
3130
|
+
if (e.isGroupable()) {
|
|
3131
|
+
let e = t.groupKey();
|
|
3132
|
+
i = o && this.groupableMessages.has(e);
|
|
3133
|
+
let n = this.groupableMessages.get(e);
|
|
3134
|
+
n || (n = [], this.groupableMessages.set(e, n)), n.push(t);
|
|
3135
|
+
}
|
|
3136
|
+
this.computeShouldMessageBeVisible(t), !i && !r ? (this.appendMessageToEnd(t, !o), this.updateFilterStatus(), this.#e.updateSearchMatchesCount(this.regexMatchRanges.length)) : this.needsFullUpdate = !0, this.scheduleViewportRefresh(), this.consoleMessageAddedForTest(t);
|
|
3137
|
+
function s(e, t) {
|
|
3138
|
+
let n = t.groupEnd();
|
|
3139
|
+
if (n !== null && c(e, n) > 0) {
|
|
3140
|
+
let n = t.consoleGroup();
|
|
3141
|
+
if (n === null) return;
|
|
3142
|
+
s(e, n);
|
|
3143
|
+
return;
|
|
3144
|
+
}
|
|
3145
|
+
e.consoleMessage().type === T.ConsoleAPICalledEventType.EndGroup ? t.setGroupEnd(e) : e.setConsoleGroup(t);
|
|
3146
|
+
}
|
|
3147
|
+
function c(e, t) {
|
|
3148
|
+
return (Ea.get(e) || 0) - (Ea.get(t) || 0);
|
|
3149
|
+
}
|
|
3150
|
+
}
|
|
3151
|
+
onConsoleMessageUpdated(e) {
|
|
3152
|
+
let t = e.data, n = Da.get(t);
|
|
3153
|
+
n && (n.updateMessageElement(), this.computeShouldMessageBeVisible(n), this.updateMessageList());
|
|
3154
|
+
}
|
|
3155
|
+
consoleMessageAddedForTest(e) {}
|
|
3156
|
+
shouldMessageBeVisible(e) {
|
|
3157
|
+
return !this.shouldBeHiddenCache.has(e);
|
|
3158
|
+
}
|
|
3159
|
+
computeShouldMessageBeVisible(e) {
|
|
3160
|
+
this.filter.shouldBeVisible(e) && (!this.isSidebarOpen || this.sidebar.shouldBeVisible(e)) ? this.shouldBeHiddenCache.delete(e) : this.shouldBeHiddenCache.add(e);
|
|
3161
|
+
}
|
|
3162
|
+
appendMessageToEnd(e, t) {
|
|
3163
|
+
if (e.consoleMessage().category === E.LogEntryCategory.Cors && !this.showCorsErrorsSetting.get()) return;
|
|
3164
|
+
let n = this.visibleViewMessages[this.visibleViewMessages.length - 1];
|
|
3165
|
+
if (e.consoleMessage().type === T.ConsoleAPICalledEventType.EndGroup) {
|
|
3166
|
+
if (n) {
|
|
3167
|
+
let e = n.consoleGroup();
|
|
3168
|
+
e && !e.messagesHidden() && n.incrementCloseGroupDecorationCount();
|
|
3169
|
+
}
|
|
3170
|
+
return;
|
|
3171
|
+
}
|
|
3172
|
+
if (!this.shouldMessageBeVisible(e)) {
|
|
3173
|
+
this.hiddenByFilterCount++;
|
|
3174
|
+
return;
|
|
3175
|
+
}
|
|
3176
|
+
if (!t && this.tryToCollapseMessages(e, this.visibleViewMessages[this.visibleViewMessages.length - 1])) return;
|
|
3177
|
+
let r = e.consoleGroup();
|
|
3178
|
+
if (i(r, this.visibleViewMessages), !r?.messagesHidden()) {
|
|
3179
|
+
let t = e.consoleMessage().originatingMessage(), r = !!(t && n?.consoleMessage() === t);
|
|
3180
|
+
e.setAdjacentUserCommandResult(r), this.visibleViewMessages.push(e), this.searchMessage(this.visibleViewMessages.length - 1);
|
|
3181
|
+
}
|
|
3182
|
+
this.messageAppendedForTests();
|
|
3183
|
+
function i(e, t) {
|
|
3184
|
+
if (e === null || t.includes(e)) return;
|
|
3185
|
+
let n = e.consoleGroup();
|
|
3186
|
+
if (n) {
|
|
3187
|
+
if (n.messagesHidden()) return;
|
|
3188
|
+
i(n, t);
|
|
3189
|
+
}
|
|
3190
|
+
t.push(e);
|
|
3191
|
+
}
|
|
3192
|
+
}
|
|
3193
|
+
messageAppendedForTests() {}
|
|
3194
|
+
createViewMessage(e) {
|
|
3195
|
+
switch (e.type) {
|
|
3196
|
+
case w.Command: return new ei(e, this.linkifier, this.requestResolver, this.issueResolver, this.onMessageResizedBound);
|
|
3197
|
+
case w.Result: return new ti(e, this.linkifier, this.requestResolver, this.issueResolver, this.onMessageResizedBound);
|
|
3198
|
+
case T.ConsoleAPICalledEventType.StartGroupCollapsed:
|
|
3199
|
+
case T.ConsoleAPICalledEventType.StartGroup: return new $r(e, this.linkifier, this.requestResolver, this.issueResolver, this.updateMessageList.bind(this), this.onMessageResizedBound);
|
|
3200
|
+
case T.ConsoleAPICalledEventType.Table: return new ni(e, this.linkifier, this.requestResolver, this.issueResolver, this.onMessageResizedBound);
|
|
3201
|
+
default: return new U(e, this.linkifier, this.requestResolver, this.issueResolver, this.onMessageResizedBound);
|
|
3202
|
+
}
|
|
3203
|
+
}
|
|
3204
|
+
async onMessageResized(e) {
|
|
3205
|
+
let t = e.data instanceof wt ? e.data.treeOutline?.element : e.data;
|
|
3206
|
+
this.pendingBatchResize || !t || (this.pendingBatchResize = !0, await Promise.resolve(), this.viewport.setStickToBottom(this.isScrolledToBottom()), t.offsetHeight <= this.messagesElement.offsetHeight && t.scrollIntoViewIfNeeded(), this.pendingBatchResize = !1);
|
|
3207
|
+
}
|
|
3208
|
+
getConsoleMessageHistory() {
|
|
3209
|
+
let e = D.instance().flavor(y), t = "";
|
|
3210
|
+
if (e) {
|
|
3211
|
+
let n = e.target().model(S);
|
|
3212
|
+
if (n) {
|
|
3213
|
+
let e = "";
|
|
3214
|
+
for (let r of n.messages()) r.type !== w.Command || r.messageText === e || (e = r.messageText, t = t + r.messageText + "\n\n");
|
|
3215
|
+
}
|
|
3216
|
+
}
|
|
3217
|
+
return t;
|
|
3218
|
+
}
|
|
3219
|
+
consoleCleared() {
|
|
3220
|
+
let e = this.viewport.element.hasFocus();
|
|
3221
|
+
this.cancelBuildHiddenCache(), this.currentMatchRangeIndex = -1, this.consoleMessages = [], this.groupableMessages.clear(), this.groupableMessageTitle.clear(), this.sidebar.clear(), this.pendingSidebarMessages = [], this.updateMessageList(), this.hidePromptSuggestBox(), this.viewport.setStickToBottom(!0), this.linkifier.reset(), this.filter.clear(), this.requestResolver.clear(), this.consoleGroupStarts = [], this.aiCodeCompletionSummaryToolbar?.clearCitations(), e && this.prompt.focus(), Ve.alert(Q(Z.consoleCleared));
|
|
3222
|
+
}
|
|
3223
|
+
handleContextMenuEvent(e) {
|
|
3224
|
+
let t = new ft(e), n = e.target;
|
|
3225
|
+
if (n.isSelfOrDescendant(this.promptElement)) {
|
|
3226
|
+
t.show();
|
|
3227
|
+
return;
|
|
3228
|
+
}
|
|
3229
|
+
let r = n.enclosingNodeOrSelfWithClass("console-message-wrapper"), i = r && Hr(r), a = i ? i.consoleMessage() : null;
|
|
3230
|
+
if (i && D.instance().setFlavor(U, i), a && !i?.element()?.matches(".has-insight") && i?.shouldShowInsights() && t.headerSection().appendAction(i?.getExplainActionId(), void 0, !0), a?.url) {
|
|
3231
|
+
let e = Q(Z.hideMessagesFromS, { PH1: new p(a.url).displayName });
|
|
3232
|
+
t.headerSection().appendItem(e, this.filter.addMessageURLFilter.bind(this.filter, a.url), { jslogContext: "hide-messages-from" });
|
|
3233
|
+
}
|
|
3234
|
+
if (t.defaultSection().appendAction("console.clear"), t.defaultSection().appendAction("console.clear.history"), t.saveSection().appendItem(Q(Z.copyConsole), this.copyConsole.bind(this), { jslogContext: "copy-console" }), t.saveSection().appendItem(Q(Z.saveAs), this.saveConsole.bind(this), { jslogContext: "save-as" }), this.element.hasSelection() && t.clipboardSection().appendItem(Q(Z.copyVisibleStyledSelection), this.viewport.copyWithStyles.bind(this.viewport), { jslogContext: "copy-visible-styled-selection" }), a) {
|
|
3235
|
+
let e = xn.requestForConsoleMessage(a);
|
|
3236
|
+
e && xt.canReplayRequest(e) && t.debugSection().appendItem(Q(Z.replayXhr), xt.replayRequest.bind(null, e), { jslogContext: "replay-xhr" });
|
|
3237
|
+
}
|
|
3238
|
+
t.show();
|
|
3239
|
+
}
|
|
3240
|
+
async saveConsole() {
|
|
3241
|
+
let e = x.instance().scopeTarget().inspectedURL(), t = p.fromString(e), r = n("%s-%d.log", t ? t.host : "console", Date.now()), i = new mn(), a = document.createElement("devtools-progress");
|
|
3242
|
+
if (a.title = Q(Z.writingFile), a.totalWork = this.itemCount(), !await i.open(r)) return;
|
|
3243
|
+
this.progressToolbarItem.element.appendChild(a);
|
|
3244
|
+
let o = 0;
|
|
3245
|
+
for (; o < this.itemCount() && !a.canceled;) {
|
|
3246
|
+
let e = [], t;
|
|
3247
|
+
for (t = 0; t < 350 && t + o < this.itemCount(); ++t) {
|
|
3248
|
+
let n = this.itemElement(o + t);
|
|
3249
|
+
e.push(n.toExportString());
|
|
3250
|
+
}
|
|
3251
|
+
o += t, await i.write(e.join("\n") + "\n"), a.worked = o;
|
|
3252
|
+
}
|
|
3253
|
+
i.close(), a.done = !0;
|
|
3254
|
+
}
|
|
3255
|
+
async copyConsole() {
|
|
3256
|
+
let e = [];
|
|
3257
|
+
for (let t = 0; t < this.itemCount(); t++) {
|
|
3258
|
+
let n = this.itemElement(t);
|
|
3259
|
+
e.push(n.toExportString());
|
|
3260
|
+
}
|
|
3261
|
+
Ye.copyText(e.join("\n") + "\n");
|
|
3262
|
+
}
|
|
3263
|
+
tryToCollapseMessages(e, t) {
|
|
3264
|
+
return !this.timestampsSetting.get() && t && !e.consoleMessage().isGroupMessage() && e.consoleMessage().type !== w.Command && e.consoleMessage().type !== w.Result && e.consoleMessage().isEqual(t.consoleMessage()) ? (t.incrementRepeatCount(), e.isLastInSimilarGroup() && t.setInSimilarGroup(!0, !0), !0) : !1;
|
|
3265
|
+
}
|
|
3266
|
+
buildHiddenCache(e, t) {
|
|
3267
|
+
let n = Date.now(), r;
|
|
3268
|
+
for (r = e; r < t.length && (this.computeShouldMessageBeVisible(t[r]), !(r % 10 == 0 && Date.now() - n > 12)); ++r);
|
|
3269
|
+
if (r === t.length) {
|
|
3270
|
+
this.updateMessageList();
|
|
3271
|
+
return;
|
|
3272
|
+
}
|
|
3273
|
+
this.buildHiddenCacheTimeout = this.element.window().requestAnimationFrame(this.buildHiddenCache.bind(this, r + 1, t));
|
|
3274
|
+
}
|
|
3275
|
+
cancelBuildHiddenCache() {
|
|
3276
|
+
this.shouldBeHiddenCache.clear(), this.buildHiddenCacheTimeout && (this.element.window().cancelAnimationFrame(this.buildHiddenCacheTimeout), delete this.buildHiddenCacheTimeout);
|
|
3277
|
+
}
|
|
3278
|
+
updateMessageList() {
|
|
3279
|
+
this.regexMatchRanges = [], this.hiddenByFilterCount = 0;
|
|
3280
|
+
for (let e of this.visibleViewMessages) e.resetCloseGroupDecorationCount(), e.resetIncrementRepeatCount();
|
|
3281
|
+
if (this.visibleViewMessages = [], this.groupSimilarSetting.get()) this.addGroupableMessagesToEnd();
|
|
3282
|
+
else for (let e of this.consoleMessages) {
|
|
3283
|
+
if (e.setInSimilarGroup(!1), e.consoleMessage().isGroupable()) {
|
|
3284
|
+
let t = e.consoleGroup();
|
|
3285
|
+
t && !this.consoleGroupStarts.includes(t) && e.clearConsoleGroup();
|
|
3286
|
+
}
|
|
3287
|
+
this.appendMessageToEnd(e, !0);
|
|
3288
|
+
}
|
|
3289
|
+
this.updateFilterStatus(), this.#e.updateSearchMatchesCount(this.regexMatchRanges.length), this.highlightMatch(this.currentMatchRangeIndex, !1), this.#u(), this.viewport.invalidate(), this.messagesCountElement.setAttribute("aria-label", Q(Z.filteredMessagesInConsole, { PH1: this.visibleViewMessages.length }));
|
|
3290
|
+
}
|
|
3291
|
+
addGroupableMessagesToEnd() {
|
|
3292
|
+
let e = /* @__PURE__ */ new Set(), t = /* @__PURE__ */ new Set();
|
|
3293
|
+
for (let n of this.consoleMessages) {
|
|
3294
|
+
let r = n.consoleMessage();
|
|
3295
|
+
if (e.has(r)) continue;
|
|
3296
|
+
if (!r.isGroupable()) {
|
|
3297
|
+
this.appendMessageToEnd(n), e.add(r);
|
|
3298
|
+
continue;
|
|
3299
|
+
}
|
|
3300
|
+
let i = n.groupKey(), a = this.groupableMessages.get(i);
|
|
3301
|
+
if (!a || a.length < 5) {
|
|
3302
|
+
n.setInSimilarGroup(!1), this.appendMessageToEnd(n), e.add(r);
|
|
3303
|
+
continue;
|
|
3304
|
+
}
|
|
3305
|
+
if (t.has(i)) continue;
|
|
3306
|
+
if (!a.find((e) => this.shouldMessageBeVisible(e))) {
|
|
3307
|
+
for (let t of a) e.add(t.consoleMessage());
|
|
3308
|
+
t.add(i);
|
|
3309
|
+
continue;
|
|
3310
|
+
}
|
|
3311
|
+
let o = this.groupableMessageTitle.get(i);
|
|
3312
|
+
if (!o) {
|
|
3313
|
+
let e = new st(null, r.source, r.level, n.groupTitle(), { type: T.ConsoleAPICalledEventType.StartGroupCollapsed });
|
|
3314
|
+
o = this.createViewMessage(e), this.groupableMessageTitle.set(i, o);
|
|
3315
|
+
}
|
|
3316
|
+
o.setRepeatCount(a.length), this.appendMessageToEnd(o);
|
|
3317
|
+
for (let t of a) t.setInSimilarGroup(!0, a[a.length - 1] === t), t.setConsoleGroup(o), this.appendMessageToEnd(t, !0), e.add(t.consoleMessage());
|
|
3318
|
+
let s = new st(null, r.source, r.level, r.messageText, { type: T.ConsoleAPICalledEventType.EndGroup });
|
|
3319
|
+
this.appendMessageToEnd(this.createViewMessage(s));
|
|
3320
|
+
}
|
|
3321
|
+
}
|
|
3322
|
+
messagesClicked(e) {
|
|
3323
|
+
let t = e.target;
|
|
3324
|
+
this.messagesElement.hasSelection() || (t === this.messagesElement || this.prompt.belowEditorElement().isSelfOrAncestor(t)) && (this.prompt.moveCaretToEndOfPrompt(), this.focusPrompt());
|
|
3325
|
+
}
|
|
3326
|
+
messagesKeyDown(e) {
|
|
3327
|
+
let t = e;
|
|
3328
|
+
t.ctrlKey || t.altKey || t.metaKey || t.key.length !== 1 || Pe() || this.messagesElement.hasSelection() || (this.prompt.moveCaretToEndOfPrompt(), this.focusPrompt());
|
|
3329
|
+
}
|
|
3330
|
+
messagesPasted(e) {
|
|
3331
|
+
!_.queryParam("isChromeForTesting") && !_.queryParam("disableSelfXssWarnings") && !this.selfXssWarningDisabledSetting.get() && (e.preventDefault(), this.prompt.showSelfXssWarning()), !Pe() && this.prompt.focus();
|
|
3332
|
+
}
|
|
3333
|
+
registerShortcuts() {
|
|
3334
|
+
this.shortcuts.set(qe.makeKey("u", Oe.Ctrl.value), this.clearPromptBackwards.bind(this));
|
|
3335
|
+
}
|
|
3336
|
+
clearPromptBackwards(e) {
|
|
3337
|
+
this.prompt.clear(), He(e.currentTarget, e, "clear-prompt");
|
|
3338
|
+
}
|
|
3339
|
+
promptKeyDown(e) {
|
|
3340
|
+
let t = e;
|
|
3341
|
+
if (t.key === "PageUp") {
|
|
3342
|
+
this.updateStickToBottomOnWheel();
|
|
3343
|
+
return;
|
|
3344
|
+
}
|
|
3345
|
+
let n = qe.makeKeyFromEvent(t), r = this.shortcuts.get(n);
|
|
3346
|
+
r && (r(t), t.preventDefault());
|
|
3347
|
+
}
|
|
3348
|
+
printResult(e, t, n) {
|
|
3349
|
+
if (!e) return;
|
|
3350
|
+
let r = n ? E.LogEntryLevel.Error : E.LogEntryLevel.Info, i;
|
|
3351
|
+
i = n ? st.fromException(e.runtimeModel(), n, w.Result, void 0, void 0) : new st(e.runtimeModel(), E.LogEntrySource.Javascript, r, "", {
|
|
3352
|
+
type: w.Result,
|
|
3353
|
+
parameters: [e]
|
|
3354
|
+
}), i.setOriginatingMessage(t), e.runtimeModel().target().model(S)?.addMessage(i);
|
|
3355
|
+
}
|
|
3356
|
+
commandEvaluated(e) {
|
|
3357
|
+
let { data: t } = e;
|
|
3358
|
+
this.printResult(t.result, t.commandMessage, t.exceptionDetails);
|
|
3359
|
+
}
|
|
3360
|
+
elementsToRestoreScrollPositionsFor() {
|
|
3361
|
+
return [this.messagesElement];
|
|
3362
|
+
}
|
|
3363
|
+
onSearchCanceled() {
|
|
3364
|
+
this.cleanupAfterSearch();
|
|
3365
|
+
for (let e of this.visibleViewMessages) e.setSearchRegex(null);
|
|
3366
|
+
this.currentMatchRangeIndex = -1, this.regexMatchRanges = [], this.searchRegex = null, this.viewport.refresh();
|
|
3367
|
+
}
|
|
3368
|
+
performSearch(e, t, n) {
|
|
3369
|
+
this.onSearchCanceled(), this.#e.updateSearchMatchesCount(0), this.searchRegex = e.toSearchRegex(!0).regex, this.regexMatchRanges = [], this.currentMatchRangeIndex = -1, t && (this.searchShouldJumpBackwards = !!n), this.searchProgressIndicator = document.createElement("devtools-progress"), this.searchProgressIndicator.title = Q(Z.searching), this.searchProgressIndicator.totalWork = this.visibleViewMessages.length, this.progressToolbarItem.element.appendChild(this.searchProgressIndicator), this.#f(0);
|
|
3370
|
+
}
|
|
3371
|
+
cleanupAfterSearch() {
|
|
3372
|
+
delete this.searchShouldJumpBackwards, this.#t &&= (clearTimeout(this.#t), void 0), this.searchProgressIndicator && (this.searchProgressIndicator.done = !0, delete this.searchProgressIndicator);
|
|
3373
|
+
}
|
|
3374
|
+
searchFinishedForTests() {}
|
|
3375
|
+
#f(e) {
|
|
3376
|
+
if (this.#t = void 0, this.searchProgressIndicator?.canceled) {
|
|
3377
|
+
this.cleanupAfterSearch();
|
|
3378
|
+
return;
|
|
3379
|
+
}
|
|
3380
|
+
let t = Date.now();
|
|
3381
|
+
for (; e < this.visibleViewMessages.length && Date.now() - t < 100; ++e) this.searchMessage(e);
|
|
3382
|
+
if (this.#e.updateSearchMatchesCount(this.regexMatchRanges.length), this.searchShouldJumpBackwards !== void 0 && this.regexMatchRanges.length && (this.highlightMatch(this.searchShouldJumpBackwards ? -1 : 0), delete this.searchShouldJumpBackwards), e === this.visibleViewMessages.length) {
|
|
3383
|
+
this.cleanupAfterSearch(), window.setTimeout(this.searchFinishedForTests.bind(this), 0);
|
|
3384
|
+
return;
|
|
3385
|
+
}
|
|
3386
|
+
this.#t = window.setTimeout(this.#f.bind(this, e), 100), this.searchProgressIndicator && (this.searchProgressIndicator.worked = e);
|
|
3387
|
+
}
|
|
3388
|
+
searchMessage(e) {
|
|
3389
|
+
let t = this.visibleViewMessages[e];
|
|
3390
|
+
t.setSearchRegex(this.searchRegex);
|
|
3391
|
+
for (let n = 0; n < t.searchCount(); ++n) this.regexMatchRanges.push({
|
|
3392
|
+
messageIndex: e,
|
|
3393
|
+
matchIndex: n
|
|
3394
|
+
});
|
|
3395
|
+
}
|
|
3396
|
+
jumpToNextSearchResult() {
|
|
3397
|
+
this.highlightMatch(this.currentMatchRangeIndex + 1);
|
|
3398
|
+
}
|
|
3399
|
+
jumpToPreviousSearchResult() {
|
|
3400
|
+
this.highlightMatch(this.currentMatchRangeIndex - 1);
|
|
3401
|
+
}
|
|
3402
|
+
supportsCaseSensitiveSearch() {
|
|
3403
|
+
return !0;
|
|
3404
|
+
}
|
|
3405
|
+
supportsWholeWordSearch() {
|
|
3406
|
+
return !0;
|
|
3407
|
+
}
|
|
3408
|
+
supportsRegexSearch() {
|
|
3409
|
+
return !0;
|
|
3410
|
+
}
|
|
3411
|
+
highlightMatch(e, t = !0) {
|
|
3412
|
+
if (!this.regexMatchRanges.length) return;
|
|
3413
|
+
let n;
|
|
3414
|
+
this.currentMatchRangeIndex >= 0 && (n = this.regexMatchRanges[this.currentMatchRangeIndex], this.visibleViewMessages[n.messageIndex].searchHighlightNode(n.matchIndex).classList.remove(pt)), e = s(e, this.regexMatchRanges.length), this.currentMatchRangeIndex = e, this.#e.updateCurrentMatchIndex(e), n = this.regexMatchRanges[e];
|
|
3415
|
+
let r = this.visibleViewMessages[n.messageIndex].searchHighlightNode(n.matchIndex);
|
|
3416
|
+
r.classList.add(pt), t && (this.viewport.scrollItemIntoView(n.messageIndex), r.scrollIntoViewIfNeeded());
|
|
3417
|
+
}
|
|
3418
|
+
updateStickToBottomOnPointerDown(e) {
|
|
3419
|
+
this.muteViewportUpdates = !e, this.viewport.setStickToBottom(!1), this.waitForScrollTimeout && (clearTimeout(this.waitForScrollTimeout), delete this.waitForScrollTimeout);
|
|
3420
|
+
}
|
|
3421
|
+
updateStickToBottomOnPointerUp() {
|
|
3422
|
+
if (!this.muteViewportUpdates) return;
|
|
3423
|
+
this.waitForScrollTimeout = window.setTimeout(e.bind(this), 200);
|
|
3424
|
+
function e() {
|
|
3425
|
+
this.muteViewportUpdates = !1, this.isShowing() && this.viewport.setStickToBottom(this.isScrolledToBottom()), this.maybeDirtyWhileMuted && (this.scheduleViewportRefresh(), delete this.maybeDirtyWhileMuted), delete this.waitForScrollTimeout, this.updateViewportStickinessForTest();
|
|
3426
|
+
}
|
|
3427
|
+
}
|
|
3428
|
+
updateViewportStickinessForTest() {}
|
|
3429
|
+
updateStickToBottomOnWheel() {
|
|
3430
|
+
this.updateStickToBottomOnPointerDown(), this.updateStickToBottomOnPointerUp();
|
|
3431
|
+
}
|
|
3432
|
+
promptTextChanged() {
|
|
3433
|
+
let e = this.viewport.stickToBottom(), t = this.isScrolledToBottom();
|
|
3434
|
+
this.viewport.setStickToBottom(t), t && !e && this.scheduleViewportRefresh(), this.promptTextChangedForTest();
|
|
3435
|
+
}
|
|
3436
|
+
promptTextChangedForTest() {}
|
|
3437
|
+
isScrolledToBottom() {
|
|
3438
|
+
return this.messagesElement.scrollHeight - this.messagesElement.scrollTop - this.messagesElement.clientHeight - this.prompt.belowEditorElement().offsetHeight <= 2;
|
|
3439
|
+
}
|
|
3440
|
+
setupAiCodeCompletion() {
|
|
3441
|
+
this.createAiCodeCompletionSummaryToolbar();
|
|
3442
|
+
}
|
|
3443
|
+
cleanupAiCodeCompletion() {
|
|
3444
|
+
this.aiCodeCompletionSummaryToolbarContainer?.remove(), this.aiCodeCompletionSummaryToolbarContainer = void 0, this.aiCodeCompletionSummaryToolbar = void 0;
|
|
3445
|
+
}
|
|
3446
|
+
};
|
|
3447
|
+
globalThis.Console = globalThis.Console || {}, globalThis.Console.ConsoleView = $;
|
|
3448
|
+
var wa = class e {
|
|
3449
|
+
filterChanged;
|
|
3450
|
+
messageLevelFiltersSetting;
|
|
3451
|
+
networkMessagesSetting;
|
|
3452
|
+
filterByExecutionContextSetting;
|
|
3453
|
+
suggestionBuilder;
|
|
3454
|
+
textFilterUI;
|
|
3455
|
+
textFilterSetting;
|
|
3456
|
+
filterParser;
|
|
3457
|
+
currentFilter;
|
|
3458
|
+
levelLabels;
|
|
3459
|
+
levelMenuButton;
|
|
3460
|
+
levelMenuButtonInfo;
|
|
3461
|
+
constructor(t) {
|
|
3462
|
+
this.filterChanged = t, this.messageLevelFiltersSetting = e.levelFilterSetting(), this.networkMessagesSetting = m.instance().moduleSetting("network-messages"), this.filterByExecutionContextSetting = m.instance().moduleSetting("selected-context-filter-enabled"), this.messageLevelFiltersSetting.addChangeListener(this.onFilterChanged.bind(this)), this.networkMessagesSetting.addChangeListener(this.onFilterChanged.bind(this)), this.filterByExecutionContextSetting.addChangeListener(this.onFilterChanged.bind(this)), D.instance().addFlavorChangeListener(y, this.onFilterChanged, this);
|
|
3463
|
+
let n = Object.values(z);
|
|
3464
|
+
this.suggestionBuilder = new Dt(n), this.textFilterUI = new ge(void 0, 1, 1, Q(Z.egEventdCdnUrlacom), this.suggestionBuilder.completions.bind(this.suggestionBuilder), !0), this.textFilterSetting = m.instance().createSetting("console.text-filter", ""), this.textFilterSetting.get() && this.textFilterUI.setValue(this.textFilterSetting.get()), this.textFilterUI.addEventListener(_t.Event.TEXT_CHANGED, () => {
|
|
3465
|
+
this.textFilterSetting.set(this.textFilterUI.value()), this.onFilterChanged();
|
|
3466
|
+
}), this.filterParser = new on(n), this.currentFilter = new R("", [], null, this.messageLevelFiltersSetting.get()), this.updateCurrentFilter(), this.levelLabels = new Map([
|
|
3467
|
+
[E.LogEntryLevel.Verbose, Q(Z.verbose)],
|
|
3468
|
+
[E.LogEntryLevel.Info, Q(Z.info)],
|
|
3469
|
+
[E.LogEntryLevel.Warning, Q(Z.warnings)],
|
|
3470
|
+
[E.LogEntryLevel.Error, Q(Z.errors)]
|
|
3471
|
+
]), this.levelMenuButton = new dt(this.appendLevelMenuItems.bind(this), void 0, void 0, "log-level");
|
|
3472
|
+
let r = Ae("info", "console-sidebar-levels-info");
|
|
3473
|
+
r.title = Q(Z.overriddenByFilterSidebar), this.levelMenuButtonInfo = new Bt(r), this.levelMenuButtonInfo.setVisible(!1), this.updateLevelMenuButtonText(), this.messageLevelFiltersSetting.addChangeListener(this.updateLevelMenuButtonText.bind(this));
|
|
3474
|
+
}
|
|
3475
|
+
onMessageAdded(e) {
|
|
3476
|
+
e.type === w.Command || e.type === w.Result || e.isGroupMessage() || (e.context && this.suggestionBuilder.addItem(z.Context, e.context), e.source && this.suggestionBuilder.addItem(z.Source, e.source), e.url && this.suggestionBuilder.addItem(z.Url, e.url));
|
|
3477
|
+
}
|
|
3478
|
+
setLevelMenuOverridden(e) {
|
|
3479
|
+
this.levelMenuButton.setEnabled(!e), this.levelMenuButtonInfo.setVisible(e), e ? this.levelMenuButton.setText(Q(Z.customLevels)) : this.updateLevelMenuButtonText();
|
|
3480
|
+
}
|
|
3481
|
+
static levelFilterSetting() {
|
|
3482
|
+
return m.instance().createSetting("message-level-filters", R.defaultLevelsFilterValue());
|
|
3483
|
+
}
|
|
3484
|
+
updateCurrentFilter() {
|
|
3485
|
+
let e = this.filterParser.parse(this.textFilterUI.value());
|
|
3486
|
+
for (let { key: t } of e) switch (t) {
|
|
3487
|
+
case z.Context:
|
|
3488
|
+
j.actionTaken(k.ConsoleFilterByContext);
|
|
3489
|
+
break;
|
|
3490
|
+
case z.Source:
|
|
3491
|
+
j.actionTaken(k.ConsoleFilterBySource);
|
|
3492
|
+
break;
|
|
3493
|
+
case z.Url:
|
|
3494
|
+
j.actionTaken(k.ConsoleFilterByUrl);
|
|
3495
|
+
break;
|
|
3496
|
+
}
|
|
3497
|
+
this.networkMessagesSetting.get() || e.push({
|
|
3498
|
+
key: z.Source,
|
|
3499
|
+
text: E.LogEntrySource.Network,
|
|
3500
|
+
negative: !0,
|
|
3501
|
+
regex: void 0
|
|
3502
|
+
}), this.currentFilter.executionContext = this.filterByExecutionContextSetting.get() ? D.instance().flavor(y) : null, this.currentFilter.parsedFilters = e, this.currentFilter.levelsMask = this.messageLevelFiltersSetting.get();
|
|
3503
|
+
}
|
|
3504
|
+
onFilterChanged() {
|
|
3505
|
+
this.updateCurrentFilter(), this.filterChanged();
|
|
3506
|
+
}
|
|
3507
|
+
updateLevelMenuButtonText() {
|
|
3508
|
+
let e = !0, t = !0, n = R.allLevelsFilterValue(), r = R.defaultLevelsFilterValue(), i = null, a = this.messageLevelFiltersSetting.get(), o = {
|
|
3509
|
+
Verbose: E.LogEntryLevel.Verbose,
|
|
3510
|
+
Info: E.LogEntryLevel.Info,
|
|
3511
|
+
Warning: E.LogEntryLevel.Warning,
|
|
3512
|
+
Error: E.LogEntryLevel.Error
|
|
3513
|
+
};
|
|
3514
|
+
for (let s of Object.values(o)) e &&= a[s] === n[s], t &&= a[s] === r[s], a[s] && (i = i ? Q(Z.customLevels) : Q(Z.sOnly, { PH1: String(this.levelLabels.get(s)) }));
|
|
3515
|
+
e ? i = Q(Z.allLevels) : t ? i = Q(Z.defaultLevels) : i ||= Q(Z.hideAll), this.levelMenuButton.element.classList.toggle("warning", !e && !t), this.levelMenuButton.setText(i), this.levelMenuButton.setTitle(Q(Z.logLevelS, { PH1: i }));
|
|
3516
|
+
}
|
|
3517
|
+
appendLevelMenuItems(e) {
|
|
3518
|
+
let t = this.messageLevelFiltersSetting, n = t.get();
|
|
3519
|
+
e.headerSection().appendItem(Q(Z.default), () => t.set(R.defaultLevelsFilterValue()), { jslogContext: "default" });
|
|
3520
|
+
for (let [t, i] of this.levelLabels.entries()) e.defaultSection().appendCheckboxItem(i, r.bind(null, t), {
|
|
3521
|
+
checked: n[t],
|
|
3522
|
+
jslogContext: t
|
|
3523
|
+
});
|
|
3524
|
+
function r(e) {
|
|
3525
|
+
n[e] = !n[e], t.set(n);
|
|
3526
|
+
}
|
|
3527
|
+
}
|
|
3528
|
+
addMessageURLFilter(e) {
|
|
3529
|
+
if (!e) return;
|
|
3530
|
+
let t = this.textFilterUI.value() ? ` ${this.textFilterUI.value()}` : "";
|
|
3531
|
+
this.textFilterUI.setValue(`-url:${e}${t}`), this.textFilterSetting.set(this.textFilterUI.value()), this.onFilterChanged();
|
|
3532
|
+
}
|
|
3533
|
+
shouldBeVisible(e) {
|
|
3534
|
+
return this.currentFilter.shouldBeVisible(e);
|
|
3535
|
+
}
|
|
3536
|
+
clear() {
|
|
3537
|
+
this.suggestionBuilder.clear();
|
|
3538
|
+
}
|
|
3539
|
+
reset() {
|
|
3540
|
+
this.messageLevelFiltersSetting.set(R.defaultLevelsFilterValue()), this.filterByExecutionContextSetting.set(!1), this.networkMessagesSetting.set(!0), this.textFilterUI.setValue(""), this.onFilterChanged();
|
|
3541
|
+
}
|
|
3542
|
+
}, Ta = class {
|
|
3543
|
+
handleAction(e, t) {
|
|
3544
|
+
switch (t) {
|
|
3545
|
+
case "console.toggle": {
|
|
3546
|
+
let e = Ne.instance(), t = $.instance();
|
|
3547
|
+
return e.drawerVisible() && !e.isDrawerMinimized() && t.isShowing() && t.hasFocus() ? (e.minimizeDrawer(), !0) : (e.drawerVisible() && e.isDrawerMinimized() && e.setDrawerMinimized(!1), Ye.bringToFront(), d.instance().show(), t.focusPrompt(), !0);
|
|
3548
|
+
}
|
|
3549
|
+
case "console.clear": return $.instance().clearConsole(), !0;
|
|
3550
|
+
case "console.clear.history": return $.instance().clearHistory(), !0;
|
|
3551
|
+
case "console.create-pin": return $.instance().pinPane.addPin("", !0), !0;
|
|
3552
|
+
}
|
|
3553
|
+
return !1;
|
|
3554
|
+
}
|
|
3555
|
+
}, Ea = /* @__PURE__ */ new WeakMap(), Da = /* @__PURE__ */ new WeakMap(), Oa = /* @__PURE__ */ e({
|
|
3556
|
+
ConsolePanel: () => Aa,
|
|
3557
|
+
ConsoleRevealer: () => Na,
|
|
3558
|
+
WrapperView: () => Ma
|
|
3559
|
+
}), ka, Aa = class e extends Ie {
|
|
3560
|
+
view;
|
|
3561
|
+
#e = !1;
|
|
3562
|
+
constructor() {
|
|
3563
|
+
super("console"), this.view = $.instance();
|
|
3564
|
+
}
|
|
3565
|
+
static instance(t = { forceNew: null }) {
|
|
3566
|
+
let { forceNew: n } = t;
|
|
3567
|
+
return (!ka || n) && (ka = new e()), ka;
|
|
3568
|
+
}
|
|
3569
|
+
static updateContextFlavor() {
|
|
3570
|
+
let t = e.instance().view;
|
|
3571
|
+
D.instance().setFlavor($, t.isShowing() ? t : null);
|
|
3572
|
+
}
|
|
3573
|
+
wasShown() {
|
|
3574
|
+
super.wasShown();
|
|
3575
|
+
let t = Ne.instance();
|
|
3576
|
+
this.#e = t.isDrawerMinimized(), ja?.isShowing() && t.setDrawerMinimized(!0), this.view.show(this.element), e.updateContextFlavor();
|
|
3577
|
+
}
|
|
3578
|
+
willHide() {
|
|
3579
|
+
super.willHide();
|
|
3580
|
+
let t = Ne.instance();
|
|
3581
|
+
t.setDrawerMinimized(!1), ja && ja.showViewInWrapper(), this.#e && t.setDrawerMinimized(!0), e.updateContextFlavor();
|
|
3582
|
+
}
|
|
3583
|
+
searchableView() {
|
|
3584
|
+
return $.instance().searchableView();
|
|
3585
|
+
}
|
|
3586
|
+
}, ja = null, Ma = class e extends ht {
|
|
3587
|
+
view;
|
|
3588
|
+
constructor() {
|
|
3589
|
+
super({ jslog: `${Ee("console").track({ resize: !0 })}` }), this.view = $.instance();
|
|
3590
|
+
}
|
|
3591
|
+
static instance() {
|
|
3592
|
+
return ja ||= new e(), ja;
|
|
3593
|
+
}
|
|
3594
|
+
wasShown() {
|
|
3595
|
+
super.wasShown(), Aa.instance().isShowing() ? Ne.instance().setDrawerMinimized(!0) : this.showViewInWrapper(), Aa.updateContextFlavor();
|
|
3596
|
+
}
|
|
3597
|
+
willHide() {
|
|
3598
|
+
super.willHide(), Aa.updateContextFlavor();
|
|
3599
|
+
}
|
|
3600
|
+
showViewInWrapper() {
|
|
3601
|
+
this.view.show(this.element);
|
|
3602
|
+
}
|
|
3603
|
+
}, Na = class {
|
|
3604
|
+
async reveal(e) {
|
|
3605
|
+
let t = $.instance();
|
|
3606
|
+
if (t.isShowing()) {
|
|
3607
|
+
t.focus();
|
|
3608
|
+
return;
|
|
3609
|
+
}
|
|
3610
|
+
await Et.instance().showView("console-view");
|
|
3611
|
+
}
|
|
3612
|
+
}, Pa = "/*\n * Copyright 2018 The Chromium Authors\n * Use of this source code is governed by a BSD-style license that can be\n * found in the LICENSE file.\n */\n\n#console-prompt .CodeMirror {\n padding: 3px 0 1px;\n}\n\n#console-prompt .CodeMirror-line {\n padding-top: 0;\n}\n\n#console-prompt .CodeMirror-lines {\n padding-top: 0;\n}\n\n#console-prompt .console-prompt-icon {\n position: absolute;\n left: -9px;\n top: 4px;\n user-select: none;\n}\n\n.console-eager-preview {\n padding-bottom: 2px;\n margin-left: 4px;\n opacity: 60%;\n position: relative;\n}\n\n.console-eager-inner-preview {\n text-overflow: ellipsis;\n overflow: hidden;\n margin-left: 4px;\n height: 100%;\n white-space: nowrap;\n}\n\n.preview-result-icon {\n position: absolute;\n left: -13px;\n top: -1px;\n}\n\n.console-eager-inner-preview:empty,\n.console-eager-inner-preview:empty + .preview-result-icon {\n opacity: 0%;\n}\n\n.console-prompt-icon.console-prompt-incomplete {\n opacity: 65%;\n}\n", Fa = /* @__PURE__ */ e({
|
|
3613
|
+
ConsolePrompt: () => Ba,
|
|
3614
|
+
Events: () => Va
|
|
3615
|
+
}), { Direction: Ia } = er, La = {
|
|
3616
|
+
consolePrompt: "Console prompt",
|
|
3617
|
+
selfXssWarning: "Warning: Don’t paste code into the DevTools Console that you don’t understand or haven’t reviewed yourself. This could allow attackers to steal your identity or take control of your computer. Please type “{PH1}” below and press Enter to allow pasting.",
|
|
3618
|
+
allowPasting: "allow pasting"
|
|
3619
|
+
}, Ra = g("panels/console/ConsolePrompt.ts", La), za = ae.bind(void 0, Ra), Ba = class extends se(A) {
|
|
3620
|
+
addCompletionsFromHistory;
|
|
3621
|
+
#e;
|
|
3622
|
+
initialText;
|
|
3623
|
+
editor;
|
|
3624
|
+
eagerPreviewElement;
|
|
3625
|
+
textChangeThrottler;
|
|
3626
|
+
requestPreviewBound;
|
|
3627
|
+
requestPreviewCurrent = 0;
|
|
3628
|
+
innerPreviewElement;
|
|
3629
|
+
promptIcon;
|
|
3630
|
+
iconThrottler;
|
|
3631
|
+
eagerEvalSetting;
|
|
3632
|
+
previewRequestForTest;
|
|
3633
|
+
highlightingNode;
|
|
3634
|
+
#t;
|
|
3635
|
+
#n;
|
|
3636
|
+
#r = !1;
|
|
3637
|
+
#i = new Xt();
|
|
3638
|
+
aiCodeCompletionConfig;
|
|
3639
|
+
aiCodeCompletionProvider;
|
|
3640
|
+
#a() {
|
|
3641
|
+
return this.#r ? [] : _.queryParam("noJavaScriptCompletion") === "true" ? [an.javascriptLanguage] : [an.javascript(), Yn()];
|
|
3642
|
+
}
|
|
3643
|
+
#o() {
|
|
3644
|
+
let e = this.#a(), t = this.#i.reconfigure(e);
|
|
3645
|
+
this.editor.dispatch({ effects: t });
|
|
3646
|
+
}
|
|
3647
|
+
constructor(e) {
|
|
3648
|
+
super({ jslog: `${Ut("console-prompt").track({
|
|
3649
|
+
change: !0,
|
|
3650
|
+
keydown: "Enter|ArrowUp|ArrowDown|PageUp"
|
|
3651
|
+
})}` }), this.registerRequiredCSS(Pa), this.addCompletionsFromHistory = !0, this.#e = new nr(m.instance().createLocalSetting("console-history", [])), this.initialText = "", this.eagerPreviewElement = document.createElement("div"), this.eagerPreviewElement.classList.add("console-eager-preview"), this.textChangeThrottler = new ce(150), this.requestPreviewBound = this.requestPreview.bind(this), this.innerPreviewElement = this.eagerPreviewElement.createChild("div", "console-eager-inner-preview");
|
|
3652
|
+
let t = new O();
|
|
3653
|
+
t.name = "chevron-left-dot", t.classList.add("preview-result-icon", "medium"), this.eagerPreviewElement.appendChild(t);
|
|
3654
|
+
let n = this.element.createChild("div", "console-prompt-editor-container");
|
|
3655
|
+
this.element.appendChild(this.eagerPreviewElement), this.promptIcon = new O(), this.promptIcon.name = "chevron-right", this.promptIcon.style.color = "var(--icon-action)", this.promptIcon.classList.add("console-prompt-icon", "medium"), this.element.appendChild(this.promptIcon), this.iconThrottler = new ce(0), this.eagerEvalSetting = m.instance().moduleSetting("console-eager-eval"), this.eagerEvalSetting.addChangeListener(this.eagerSettingChanged.bind(this)), this.eagerPreviewElement.classList.toggle("hidden", !this.eagerEvalSetting.get()), this.element.tabIndex = 0, this.previewRequestForTest = null, this.highlightingNode = !1;
|
|
3656
|
+
let r = Jn();
|
|
3657
|
+
this.#t = r[0];
|
|
3658
|
+
let i = ar.bool("console-autocomplete-on-enter", [], Kn), a = [
|
|
3659
|
+
en.of(this.editorKeymap()),
|
|
3660
|
+
F.updateListener.of((e) => this.editorUpdate(e)),
|
|
3661
|
+
r,
|
|
3662
|
+
i.instance(),
|
|
3663
|
+
Wn,
|
|
3664
|
+
Gn(this.initialText),
|
|
3665
|
+
or.instance(),
|
|
3666
|
+
an.javascriptLanguage.data.of({ autocomplete: (e) => this.addCompletionsFromHistory ? this.#n.historyCompletions(e) : null }),
|
|
3667
|
+
F.contentAttributes.of({ "aria-label": za(La.consolePrompt) }),
|
|
3668
|
+
F.lineWrapping,
|
|
3669
|
+
nn({ aboveCursor: !0 }),
|
|
3670
|
+
this.#i.of(this.#a())
|
|
3671
|
+
];
|
|
3672
|
+
this.aiCodeCompletionConfig = e, this.aiCodeCompletionConfig && (this.aiCodeCompletionProvider = $n.createInstance(this.aiCodeCompletionConfig), a.push(...this.aiCodeCompletionProvider.extension()));
|
|
3673
|
+
let o = this.initialText, s = Jt.create({
|
|
3674
|
+
doc: o,
|
|
3675
|
+
extensions: a
|
|
3676
|
+
});
|
|
3677
|
+
this.editor = new rr(s), this.aiCodeCompletionProvider && (this.aiCodeCompletionProvider.editorInitialized(this.editor), this.editor.editor.dispatch({ effects: qn.of(Zn.ONLY_SHOW_ON_EMPTY) })), this.editor.addEventListener("keydown", (e) => {
|
|
3678
|
+
e.defaultPrevented && e.stopPropagation();
|
|
3679
|
+
}), n.appendChild(this.editor), this.#n = new ir(this.editor, this.#e), this.hasFocus() && this.focus(), this.element.removeAttribute("tabindex"), this.editorSetForTest(), Ot.instance().panelLoaded("console", "DevTools.Launch.Console");
|
|
3680
|
+
}
|
|
3681
|
+
eagerSettingChanged() {
|
|
3682
|
+
let e = this.eagerEvalSetting.get();
|
|
3683
|
+
this.eagerPreviewElement.classList.toggle("hidden", !e), e && this.requestPreview();
|
|
3684
|
+
}
|
|
3685
|
+
belowEditorElement() {
|
|
3686
|
+
return this.eagerPreviewElement;
|
|
3687
|
+
}
|
|
3688
|
+
onTextChanged() {
|
|
3689
|
+
if (this.eagerEvalSetting.get()) {
|
|
3690
|
+
let e = !Un(this.editor.editor);
|
|
3691
|
+
this.previewRequestForTest = this.textChangeThrottler.schedule(this.requestPreviewBound, e ? de.AS_SOON_AS_POSSIBLE : de.DEFAULT);
|
|
3692
|
+
}
|
|
3693
|
+
this.updatePromptIcon(), this.dispatchEventToListeners("TextChanged");
|
|
3694
|
+
}
|
|
3695
|
+
async requestPreview() {
|
|
3696
|
+
let e = ++this.requestPreviewCurrent, t = Un(this.editor.editor).trim(), n = D.instance().flavor(y), { preview: r, result: i } = await Vn.evaluateAndBuildPreview(t, !0, !0, 500);
|
|
3697
|
+
this.requestPreviewCurrent === e && (this.innerPreviewElement.removeChildren(), r.deepTextContent() !== Un(this.editor.editor).trim() && this.innerPreviewElement.appendChild(r), i && "object" in i && i.object?.subtype === "node" ? (this.highlightingNode = !0, M.highlightObjectAsDOMNode(i.object)) : this.highlightingNode && (this.highlightingNode = !1, M.hideDOMNodeHighlight()), i && n && n.runtimeModel.releaseEvaluationResult(i));
|
|
3698
|
+
}
|
|
3699
|
+
willHide() {
|
|
3700
|
+
super.willHide(), this.highlightingNode && (this.highlightingNode = !1, M.hideDOMNodeHighlight());
|
|
3701
|
+
}
|
|
3702
|
+
history() {
|
|
3703
|
+
return this.#e;
|
|
3704
|
+
}
|
|
3705
|
+
clearAutocomplete() {
|
|
3706
|
+
Zt(this.editor.editor);
|
|
3707
|
+
}
|
|
3708
|
+
clearAiCodeCompletionCache() {
|
|
3709
|
+
this.aiCodeCompletionProvider?.clearCache();
|
|
3710
|
+
}
|
|
3711
|
+
moveCaretToEndOfPrompt() {
|
|
3712
|
+
this.editor.dispatch({ selection: $t.cursor(this.editor.state.doc.length) });
|
|
3713
|
+
}
|
|
3714
|
+
clear() {
|
|
3715
|
+
this.editor.dispatch({ changes: {
|
|
3716
|
+
from: 0,
|
|
3717
|
+
to: this.editor.state.doc.length
|
|
3718
|
+
} });
|
|
3719
|
+
}
|
|
3720
|
+
text() {
|
|
3721
|
+
return this.editor.state.doc.toString();
|
|
3722
|
+
}
|
|
3723
|
+
setAddCompletionsFromHistory(e) {
|
|
3724
|
+
this.addCompletionsFromHistory = e;
|
|
3725
|
+
}
|
|
3726
|
+
editorKeymap() {
|
|
3727
|
+
return [
|
|
3728
|
+
{ any: (e, t) => t.repeat ? !1 : t.key === "ArrowUp" ? this.#n.moveHistory(Ia.BACKWARD) : t.key === "ArrowDown" ? this.#n.moveHistory(Ia.FORWARD) : !1 },
|
|
3729
|
+
{
|
|
3730
|
+
mac: "Ctrl-p",
|
|
3731
|
+
run: () => this.#n.moveHistory(Ia.BACKWARD, !0)
|
|
3732
|
+
},
|
|
3733
|
+
{
|
|
3734
|
+
mac: "Ctrl-n",
|
|
3735
|
+
run: () => this.#n.moveHistory(Ia.FORWARD, !0)
|
|
3736
|
+
},
|
|
3737
|
+
{
|
|
3738
|
+
key: "Escape",
|
|
3739
|
+
run: () => tr(this.editor.editor, this.#t)
|
|
3740
|
+
},
|
|
3741
|
+
{
|
|
3742
|
+
key: "Ctrl-Enter",
|
|
3743
|
+
run: () => (this.handleEnter(!0), !0)
|
|
3744
|
+
},
|
|
3745
|
+
{
|
|
3746
|
+
key: "Enter",
|
|
3747
|
+
run: () => (this.handleEnter(), !0),
|
|
3748
|
+
shift: rn
|
|
3749
|
+
}
|
|
3750
|
+
];
|
|
3751
|
+
}
|
|
3752
|
+
async enterWillEvaluate(e) {
|
|
3753
|
+
let { doc: t, selection: n } = this.editor.state;
|
|
3754
|
+
if (!t.length) return !1;
|
|
3755
|
+
if (e || n.main.head < t.length) return !0;
|
|
3756
|
+
let r = D.instance().flavor(y), i = await Qn(t.toString());
|
|
3757
|
+
return r === D.instance().flavor(y) ? i : !1;
|
|
3758
|
+
}
|
|
3759
|
+
showSelfXssWarning() {
|
|
3760
|
+
d.instance().warn(za(La.selfXssWarning, { PH1: za(La.allowPasting) }), h.SELF_XSS), this.#r = !0, j.actionTaken(k.SelfXssWarningConsoleMessageShown), this.#o();
|
|
3761
|
+
}
|
|
3762
|
+
async handleEnter(e) {
|
|
3763
|
+
if (this.#r && (this.text() === za(La.allowPasting) || this.text() === `'${za(La.allowPasting)}'`)) {
|
|
3764
|
+
d.instance().log(this.text()), this.editor.dispatch({
|
|
3765
|
+
changes: {
|
|
3766
|
+
from: 0,
|
|
3767
|
+
to: this.editor.state.doc.length
|
|
3768
|
+
},
|
|
3769
|
+
scrollIntoView: !0
|
|
3770
|
+
}), m.instance().createSetting("disable-self-xss-warning", !1, fe.SYNCED).set(!0), this.#r = !1, j.actionTaken(k.SelfXssAllowPastingInConsole), this.#o();
|
|
3771
|
+
return;
|
|
3772
|
+
}
|
|
3773
|
+
await this.enterWillEvaluate(e) ? (this.appendCommand(this.text(), !0), tr(this.editor.editor, this.#t), this.editor.dispatch({
|
|
3774
|
+
changes: {
|
|
3775
|
+
from: 0,
|
|
3776
|
+
to: this.editor.state.doc.length
|
|
3777
|
+
},
|
|
3778
|
+
scrollIntoView: !0
|
|
3779
|
+
}), this.aiCodeCompletionProvider && this.editor.editor.state.field(Xn) !== Zn.OFF && this.editor.editor.dispatch({ effects: qn.of(Zn.OFF) })) : this.editor.state.doc.length ? rn(this.editor.editor) : this.editor.dispatch({ scrollIntoView: !0 });
|
|
3780
|
+
}
|
|
3781
|
+
updatePromptIcon() {
|
|
3782
|
+
this.iconThrottler.schedule(async () => {
|
|
3783
|
+
this.promptIcon.classList.toggle("console-prompt-incomplete", !await this.enterWillEvaluate());
|
|
3784
|
+
});
|
|
3785
|
+
}
|
|
3786
|
+
appendCommand(e, t) {
|
|
3787
|
+
let n = D.instance().flavor(y);
|
|
3788
|
+
if (n) {
|
|
3789
|
+
let r = n, i = r.target().model(S);
|
|
3790
|
+
if (i) {
|
|
3791
|
+
let n = i.addCommandMessage(r, e), a = Vn.wrapObjectLiteral(e);
|
|
3792
|
+
this.evaluateCommandInConsole(r, n, a, t), Aa.instance().isShowing() && (j.actionTaken(k.CommandEvaluatedInConsolePanel), wn.instance().recordAction(jn.CONSOLE_PROMPT_EXECUTED));
|
|
3793
|
+
}
|
|
3794
|
+
}
|
|
3795
|
+
}
|
|
3796
|
+
async evaluateCommandInConsole(e, t, n, r) {
|
|
3797
|
+
let i = e.debuggerModel.selectedCallFrame();
|
|
3798
|
+
if (i?.script.isJavaScript()) {
|
|
3799
|
+
let e = await Cn(i);
|
|
3800
|
+
n = await this.substituteNames(n, e);
|
|
3801
|
+
}
|
|
3802
|
+
await e.target().model(S)?.evaluateCommandInConsole(e, t, n, r);
|
|
3803
|
+
}
|
|
3804
|
+
async substituteNames(e, t) {
|
|
3805
|
+
try {
|
|
3806
|
+
return await We().javaScriptSubstitute(e, t);
|
|
3807
|
+
} catch {
|
|
3808
|
+
return e;
|
|
3809
|
+
}
|
|
3810
|
+
}
|
|
3811
|
+
editorUpdate(e) {
|
|
3812
|
+
e.docChanged || Qt(e.state) !== Qt(e.startState) ? this.onTextChanged() : e.selectionSet && this.updatePromptIcon();
|
|
3813
|
+
}
|
|
3814
|
+
focus() {
|
|
3815
|
+
this.editor.focus();
|
|
3816
|
+
}
|
|
3817
|
+
editorSetForTest() {}
|
|
3818
|
+
}, Va = /* @__PURE__ */ function(e) {
|
|
3819
|
+
return e.TEXT_CHANGED = "TextChanged", e;
|
|
3820
|
+
}({}), Ha = /* @__PURE__ */ e({ SymbolizedErrorWidget: () => Wa }), Ua = (e, t, n) => {}, Wa = class extends A {
|
|
3821
|
+
#e;
|
|
3822
|
+
#t;
|
|
3823
|
+
#n;
|
|
3824
|
+
constructor(e, t = Ua) {
|
|
3825
|
+
super(e), this.#t = t;
|
|
3826
|
+
}
|
|
3827
|
+
set ignoreListManager(e) {
|
|
3828
|
+
this.#n = e, this.requestUpdate();
|
|
3829
|
+
}
|
|
3830
|
+
get ignoreListManager() {
|
|
3831
|
+
return this.#n;
|
|
3832
|
+
}
|
|
3833
|
+
set error(e) {
|
|
3834
|
+
this.#e?.removeEventListener(pn.UPDATED, this.requestUpdate, this), this.#e = e, this.isShowing() && this.#e?.addEventListener(pn.UPDATED, this.requestUpdate, this), this.requestUpdate();
|
|
3835
|
+
}
|
|
3836
|
+
get error() {
|
|
3837
|
+
return this.#e;
|
|
3838
|
+
}
|
|
3839
|
+
wasShown() {
|
|
3840
|
+
super.wasShown(), this.#e?.addEventListener(pn.UPDATED, this.requestUpdate, this), this.requestUpdate();
|
|
3841
|
+
}
|
|
3842
|
+
willHide() {
|
|
3843
|
+
super.willHide(), this.#e?.removeEventListener(pn.UPDATED, this.requestUpdate, this);
|
|
3844
|
+
}
|
|
3845
|
+
performUpdate() {
|
|
3846
|
+
if (!this.#e) return;
|
|
3847
|
+
let e = {
|
|
3848
|
+
error: this.#e,
|
|
3849
|
+
ignoreListManager: this.#n
|
|
3850
|
+
};
|
|
3851
|
+
this.#t(e, {}, this.contentElement);
|
|
3852
|
+
}
|
|
3853
|
+
};
|
|
3854
|
+
//#endregion
|
|
3855
|
+
export { ha as a, Ci as c, mi as d, U as f, br as g, Ar as h, _a as i, hi as l, jr as m, Fa as n, ra as o, zr as p, Oa as r, Vi as s, Ha as t, ui as u };
|