├── src ├── web │ ├── vite-env.d.ts │ ├── pages │ │ ├── version.ts │ │ ├── LogViewer │ │ │ ├── index.scss │ │ │ └── index.tsx │ │ ├── Home │ │ │ ├── settings.ts │ │ │ ├── index.scss │ │ │ ├── TextSearch.scss │ │ │ └── SideBar.scss │ │ └── SyncClipboard │ │ │ └── index.scss │ ├── assets │ │ ├── icon.icns │ │ └── icon.ico │ ├── modules │ │ ├── bp.ts │ │ ├── api.ts │ │ ├── lodash.ts │ │ ├── interactive.ts │ │ └── copy.ts │ ├── components │ │ ├── ruleTest │ │ │ └── index.scss │ │ ├── Icon │ │ │ ├── index.scss │ │ │ └── assets │ │ │ │ ├── windows.svg │ │ │ │ ├── check.svg │ │ │ │ ├── close.svg │ │ │ │ ├── remove.svg │ │ │ │ ├── scrollTop.svg │ │ │ │ └── scrollBottom.svg │ │ ├── ConfigEditor │ │ │ └── EditorToolbar.tsx │ │ ├── UI │ │ │ └── index.tsx │ │ ├── Settings │ │ │ ├── ConfigModal.tsx │ │ │ └── index.scss │ │ ├── ViewAll │ │ │ └── index.tsx │ │ ├── ShowError │ │ │ └── index.scss │ │ └── Shortcuts │ │ │ └── index.scss │ ├── hooks │ │ ├── useSubject.ts │ │ ├── useBool.ts │ │ └── useUmami.ts │ ├── main.tsx │ ├── pageConfig.ts │ └── mixin.scss ├── help.txt ├── utils │ ├── inject.ts │ ├── http.ts │ └── constant.ts ├── proxy │ ├── handleResponse │ │ ├── text.ts │ │ ├── proxy.ts │ │ └── host.ts │ ├── system │ │ ├── macos │ │ │ └── installCertificate.ts │ │ └── os.ts │ ├── utils │ │ ├── urls.ts │ │ └── file.ts │ └── bash.ts ├── install.sh └── types │ ├── bproxy.d.ts │ └── http.d.ts ├── icon.icns ├── icon.ico ├── static └── chrome-dev-tools │ ├── devices │ ├── devices.js │ ├── module.json │ └── DevicesView.js │ ├── shell.js │ ├── cm_web_modes │ ├── cm_web_modes.js │ ├── cm_web_modes_cm.js │ ├── cm_web_modes_headless.js │ └── module.json │ ├── common │ ├── App.js │ ├── QueryParamHandler.js │ ├── Runnable.js │ ├── AppProvider.js │ ├── StringOutputStream.js │ ├── JavaScriptMetaData.js │ ├── Linkifier.js │ ├── CharacterIdMap.js │ ├── Revealer.js │ ├── TextDictionary.js │ ├── Worker.js │ ├── EventTarget.js │ └── module.json │ ├── cm_headless │ ├── cm_headless.js │ └── module.json │ ├── dom_extension │ ├── dom_extension.js │ └── module.json │ ├── root │ ├── root.js │ ├── module.json │ └── root-legacy.js │ ├── chii_main │ ├── chii_main.js │ ├── chii_main-legacy.js │ ├── module.json │ └── ChiiMain.js │ ├── ui │ ├── ContextFlavorListener.js │ ├── ActionDelegate.js │ ├── utils │ │ ├── register-custom-element.js │ │ ├── inject-core-styles.js │ │ ├── append-style.js │ │ ├── create-shadow-root-with-core-styles.js │ │ ├── utils.js │ │ ├── measured-scrollbar-width.js │ │ └── focus-changed.js │ ├── targetCrashedScreen.css │ ├── rootView.css │ ├── dialog.css │ ├── popover.css │ ├── inlineButton.css │ ├── remoteDebuggingTerminatedScreen.css │ ├── TargetCrashedScreen.js │ ├── confirmDialog.css │ ├── ThrottledWidget.js │ ├── EmptyWidget.js │ ├── SegmentedButton.js │ ├── inspectorViewTabbedPane.css │ ├── dropTarget.css │ ├── RootView.js │ ├── ForwardedInputEventHandler.js │ ├── emptyWidget.css │ ├── TextEditor.js │ ├── SyntaxHighlighter.js │ ├── FilterSuggestionBuilder.js │ ├── progressIndicator.css │ └── smallBubble.css │ ├── source_frame │ ├── jsonView.css │ ├── xmlView.css │ ├── resourceSourceFrame.css │ ├── fontView.css │ ├── imageView.css │ ├── source_frame.js │ └── messagesPopover.css │ ├── cookie_table │ ├── cookie_table.js │ ├── module.json │ ├── cookie_table-legacy.js │ └── cookiesTable.css │ ├── workspace_diff │ ├── workspace_diff.js │ ├── module.json │ └── workspace_diff-legacy.js │ ├── Images │ ├── checker.png │ ├── speech.png │ ├── chromeLeft.png │ ├── nodeIcon.png │ ├── radioDot.png │ ├── searchNext.png │ ├── searchPrev.png │ ├── whatsnew.png │ ├── chromeMiddle.png │ ├── chromeRight.png │ ├── chromeSelect.png │ ├── profileIcon.png │ ├── touchCursor.png │ ├── chromeSelect_2x.png │ ├── popoverArrows.png │ ├── resizeDiagonal.png │ ├── resizeVertical.png │ ├── resourceCSSIcon.png │ ├── resourceJSIcon.png │ ├── touchCursor_2x.png │ ├── accelerometer-top.png │ ├── profileGroupIcon.png │ ├── profileSmallIcon.png │ ├── resizeDiagonal_2x.png │ ├── resizeHorizontal.png │ ├── resizeVertical_2x.png │ ├── resourcePlainIcon.png │ ├── accelerometer-bottom.png │ ├── accelerometer-left.png │ ├── accelerometer-right.png │ ├── chromeDisabledSelect.png │ ├── cssoverview_icons_2x.png │ ├── navigationControls.png │ ├── radioDot-dark-theme.png │ ├── resizeHorizontal_2x.png │ ├── resourceDocumentIcon.png │ ├── navigationControls_2x.png │ ├── resourcePlainIconSmall.png │ ├── resourcesTimeGraphIcon.png │ ├── toolbarResizerVertical.png │ ├── chromeDisabledSelect_2x.png │ ├── resourceDocumentIconSmall.png │ ├── breakpoint.svg │ ├── treeoutlineTriangles.svg │ ├── breakpoint-disabled.svg │ ├── checkboxCheckmark.svg │ ├── src │ │ ├── breakpoint.svg │ │ ├── breakpoint-disabled.svg │ │ ├── breakpoint-conditional-disabled.svg │ │ ├── breakpoint-conditional.svg │ │ ├── logpoint-disabled.svg │ │ └── logpoint.svg │ ├── errorWave.svg │ ├── ic_warning_black_18dp.svg │ ├── chevrons.svg │ ├── ic_info_black_18dp.svg │ ├── breakpoint-conditional.svg │ ├── breakpoint-conditional-disabled.svg │ ├── logpoint.svg │ ├── logpoint-disabled.svg │ └── accelerometer-back.svg │ ├── dagre_layout │ └── module.json │ ├── diff │ ├── diff.js │ ├── diff-legacy.js │ └── module.json │ ├── browser_sdk │ ├── browser_sdk-legacy.js │ ├── browser_sdk.js │ └── module.json │ ├── console_counters │ ├── console_counters.js │ ├── console_counters-legacy.js │ ├── module.json │ └── errorWarningCounter.css │ ├── heap_snapshot_model │ ├── heap_snapshot_model.js │ └── module.json │ ├── performance_monitor │ ├── performance_monitor.js │ ├── module.json │ └── performance_monitor-legacy.js │ ├── platform │ ├── number-utilities.js │ ├── module.json │ ├── array-utilities.js │ └── platform.js │ ├── devtools_app.js │ ├── har_importer │ ├── har_importer.js │ ├── module.json │ └── har_importer-legacy.js │ ├── issues │ ├── issues.js │ ├── issues-legacy.js │ ├── IssueRevealer.js │ ├── issuesPane.css │ └── module.json │ ├── protocol_monitor │ ├── protocol_monitor.js │ ├── protocol_monitor-legacy.js │ ├── module.json │ └── protocolMonitor.css │ ├── security │ ├── security.js │ └── module.json │ ├── services │ ├── services.js │ ├── module.json │ └── services-legacy.js │ ├── input │ ├── input.js │ ├── input-legacy.js │ └── inputTimeline.css │ ├── help │ ├── help.js │ └── help-legacy.js │ ├── media │ ├── media-legacy.js │ ├── playerListView.css │ ├── eventDisplayTable.css │ ├── mediaView.css │ └── media.js │ ├── snippets │ ├── snippets.js │ ├── module.json │ ├── snippets-legacy.js │ └── SnippetsQuickOpen.js │ ├── event_listeners │ ├── event_listeners.js │ ├── module.json │ └── event_listeners-legacy.js │ ├── workspace │ ├── workspace.js │ └── module.json │ ├── search │ ├── search.js │ ├── module.json │ └── search-legacy.js │ ├── main │ ├── main.js │ ├── SimpleApp.js │ └── main-legacy.js │ ├── profiler │ ├── ChildrenProvider.js │ └── liveHeapProfile.css │ ├── resources │ ├── appManifestView.css │ ├── cookieItemsView.css │ └── clearStorageView.css │ ├── inspector_main │ ├── inspector_main.js │ ├── renderingOptions.css │ ├── nodeIcon.css │ └── inspector_main-legacy.js │ ├── cm_modes │ ├── DefaultCodeMirrorMimeMode.js │ └── cm_modes.js │ ├── formatter_worker │ ├── IdentityFormatter.js │ └── module.json │ ├── javascript_metadata │ ├── javascript_metadata.js │ ├── module.json │ └── javascript_metadata-legacy.js │ ├── perf_ui │ ├── GCActionDelegate.js │ ├── timelineOverviewInfo.css │ └── perf_ui.js │ ├── formatter │ ├── module.json │ ├── formatter.js │ └── formatter-legacy.js │ ├── color_picker │ ├── color_picker.js │ └── module.json │ ├── quick_open │ ├── quick_open.js │ └── HelpQuickOpen.js │ ├── cm │ ├── cm.js │ └── module.json │ ├── css_overview │ ├── cssOverview.css │ ├── cssOverviewStartView.css │ ├── CSSOverviewStartView.js │ ├── CSSOverviewProcessingView.js │ ├── cssOverviewProcessingView.css │ └── cssOverviewSidebarPanel.css │ ├── emulation │ ├── inspectedPagePlaceholder.css │ └── deviceModeToolbar.css │ ├── protocol_client │ ├── module.json │ ├── protocol_client.js │ └── NodeURL.js │ ├── layers │ ├── layers.js │ ├── layers-legacy.js │ └── module.json │ ├── sources │ ├── navigatorView.css │ ├── Plugin.js │ ├── dialog.css │ ├── OpenFileQuickOpen.js │ ├── SnippetsPlugin.js │ ├── scopeChainSidebarPane.css │ └── SearchSourcesView.js │ ├── elements │ ├── MarkerDecorator.js │ ├── nodeStackTraceWidget.css │ ├── PropertiesWidget.js │ ├── domLinkifier.css │ ├── elementStatePaneWidget.css │ └── StylePropertyHighlighter.js │ ├── host │ ├── module.json │ └── host.js │ ├── data_grid │ ├── module.json │ └── data_grid.js │ ├── network │ ├── eventSourceMessagesView.css │ ├── requestHTMLView.css │ ├── signedExchangeInfoView.css │ ├── binaryResourceView.css │ ├── networkWaterfallColumn.css │ ├── RequestHTMLView.js │ ├── requestHeadersView.css │ └── networkManageCustomHeadersView.css │ ├── formatter_worker_entrypoint.js │ ├── text_utils │ ├── module.json │ ├── text_utils.js │ ├── ContentProvider.js │ ├── TextCursor.js │ └── StaticContentProvider.js │ ├── settings │ ├── settings.js │ └── settings-legacy.js │ ├── text_editor │ ├── text_editor.js │ ├── autocompleteTooltip.css │ └── module.json │ ├── extensions │ ├── module.json │ ├── extensions.js │ ├── ExtensionTraceProvider.js │ └── extensions-legacy.js │ ├── lighthouse │ ├── lighthouse-legacy.js │ └── lighthouse.js │ ├── components │ ├── Reload.js │ ├── components.js │ ├── module.json │ └── imagePreview.css │ ├── changes │ ├── changes.js │ └── changes-legacy.js │ ├── inline_editor │ ├── inline_editor.js │ ├── swatchPopover.css │ ├── module.json │ ├── cssShadowSwatch.css │ └── bezierSwatch.css │ ├── timeline_model │ ├── module.json │ └── timeline_model.js │ ├── animation │ ├── animation.js │ ├── animationScreenshotPopover.css │ ├── module.json │ └── animation-legacy.js │ ├── formatter_worker_entrypoint.json │ ├── coverage │ └── coverage.js │ ├── browser_debugger │ └── browser_debugger.js │ ├── timeline │ ├── UIDevtoolsController.js │ ├── CLSLinkifier.js │ ├── invalidationsTree.css │ ├── timelinePaintProfiler.css │ ├── timelineFlamechartPopover.css │ └── ExtensionTracingSession.js │ ├── layer_viewer │ ├── module.json │ ├── layers3DView.css │ ├── layer_viewer.js │ ├── layerDetailsView.css │ └── paintProfiler.css │ ├── web_audio │ ├── audioContextSelector.css │ └── graph_visualizer │ │ ├── NodeRendererUtility.js │ │ └── GraphManager.js │ ├── accessibility │ ├── accessibilityProperties.css │ ├── accessibility.js │ ├── ARIAMetadata.js │ └── AccessibilitySubPane.js │ ├── object_ui │ ├── customPreviewComponent.css │ ├── object_ui.js │ └── module.json │ ├── index.html │ ├── root.js │ ├── mobile_throttling │ └── mobile_throttling.js │ ├── sdk │ ├── CompilerSourceMappingContentProvider.js │ └── LogModel.js │ ├── bproxy.js │ └── bindings │ └── module.json ├── bin └── bproxy ├── curl ├── get-bproxy-inspect.sh ├── post-form.sh ├── get-proxy-google.sh ├── post-file.sh ├── get-encode-gzip.sh ├── get-proxy-google-br.sh └── post-json.sh ├── prettier.config.js ├── .npmignore ├── .gitignore ├── .swcrc ├── .editorconfig ├── ecosystem.config.js ├── .eslintignore └── .eslintrc.js /src/web/vite-env.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | -------------------------------------------------------------------------------- /icon.icns: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zobor/bproxy/HEAD/icon.icns -------------------------------------------------------------------------------- /icon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zobor/bproxy/HEAD/icon.ico -------------------------------------------------------------------------------- /static/chrome-dev-tools/devices/devices.js: -------------------------------------------------------------------------------- 1 | import"./DevicesView.js"; -------------------------------------------------------------------------------- /static/chrome-dev-tools/shell.js: -------------------------------------------------------------------------------- 1 | import"./RuntimeInstantiator.js"; -------------------------------------------------------------------------------- /src/web/pages/version.ts: -------------------------------------------------------------------------------- 1 | export const version_build = BUILD_VERSION; 2 | -------------------------------------------------------------------------------- /static/chrome-dev-tools/cm_web_modes/cm_web_modes.js: -------------------------------------------------------------------------------- 1 | export default{}; -------------------------------------------------------------------------------- /static/chrome-dev-tools/common/App.js: -------------------------------------------------------------------------------- 1 | export class App{presentUI(p){}} -------------------------------------------------------------------------------- /bin/bproxy: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | 3 | require('../server-build/proxy/bash'); 4 | -------------------------------------------------------------------------------- /static/chrome-dev-tools/cm_headless/cm_headless.js: -------------------------------------------------------------------------------- 1 | import"./headlesscodemirror.js"; -------------------------------------------------------------------------------- /static/chrome-dev-tools/dom_extension/dom_extension.js: -------------------------------------------------------------------------------- 1 | import"./DOMExtension.js"; -------------------------------------------------------------------------------- /static/chrome-dev-tools/root/root.js: -------------------------------------------------------------------------------- 1 | import*as Runtime from"./Runtime.js";export{Runtime}; -------------------------------------------------------------------------------- /src/web/assets/icon.icns: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zobor/bproxy/HEAD/src/web/assets/icon.icns -------------------------------------------------------------------------------- /src/web/assets/icon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zobor/bproxy/HEAD/src/web/assets/icon.ico -------------------------------------------------------------------------------- /static/chrome-dev-tools/chii_main/chii_main.js: -------------------------------------------------------------------------------- 1 | import*as ChiiMain from"./ChiiMain.js";export{ChiiMain}; -------------------------------------------------------------------------------- /static/chrome-dev-tools/common/QueryParamHandler.js: -------------------------------------------------------------------------------- 1 | export class QueryParamHandler{handleQueryParam(a){}} -------------------------------------------------------------------------------- /static/chrome-dev-tools/common/Runnable.js: -------------------------------------------------------------------------------- 1 | export class Runnable{run(){throw new Error("not implemented")}} -------------------------------------------------------------------------------- /static/chrome-dev-tools/ui/ContextFlavorListener.js: -------------------------------------------------------------------------------- 1 | export class ContextFlavorListener{flavorChanged(e){}} -------------------------------------------------------------------------------- /static/chrome-dev-tools/root/module.json: -------------------------------------------------------------------------------- 1 | { 2 | "modules": ["root-legacy.js", "root.js", "Runtime.js"] 3 | } 4 | -------------------------------------------------------------------------------- /static/chrome-dev-tools/source_frame/jsonView.css: -------------------------------------------------------------------------------- 1 | .json-view { 2 | padding: 2px 6px; 3 | overflow: auto; 4 | } 5 | -------------------------------------------------------------------------------- /static/chrome-dev-tools/cookie_table/cookie_table.js: -------------------------------------------------------------------------------- 1 | import*as CookiesTable from"./CookiesTable.js";export{CookiesTable}; -------------------------------------------------------------------------------- /curl/get-bproxy-inspect.sh: -------------------------------------------------------------------------------- 1 | curl -x 'http://127.0.0.1:8888' \ 2 | -v \ 3 | https://www.bproxy.dev/static/dist/inspect.iife.js 4 | -------------------------------------------------------------------------------- /static/chrome-dev-tools/ui/ActionDelegate.js: -------------------------------------------------------------------------------- 1 | import{Context}from"./Context.js";export class ActionDelegate{handleAction(t,e){}} -------------------------------------------------------------------------------- /static/chrome-dev-tools/workspace_diff/workspace_diff.js: -------------------------------------------------------------------------------- 1 | import*as WorkspaceDiff from"./WorkspaceDiff.js";export{WorkspaceDiff}; -------------------------------------------------------------------------------- /src/web/modules/bp.ts: -------------------------------------------------------------------------------- 1 | const win = window as any; 2 | 3 | const bp = {}; 4 | 5 | win.BP = bp; 6 | 7 | export default win.BP; 8 | -------------------------------------------------------------------------------- /static/chrome-dev-tools/Images/checker.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zobor/bproxy/HEAD/static/chrome-dev-tools/Images/checker.png -------------------------------------------------------------------------------- /static/chrome-dev-tools/Images/speech.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zobor/bproxy/HEAD/static/chrome-dev-tools/Images/speech.png -------------------------------------------------------------------------------- /static/chrome-dev-tools/dagre_layout/module.json: -------------------------------------------------------------------------------- 1 | { 2 | "scripts": ["dagre.js"], 3 | "skip_compilation": ["dagre.js"] 4 | } 5 | -------------------------------------------------------------------------------- /curl/post-form.sh: -------------------------------------------------------------------------------- 1 | curl -x "http://127.0.0.1:8888" \ 2 | -d "name=zoborzhang&age=20&arr=[1,2,3]" \ 3 | "https://www.bproxy.dev/ip" 4 | -------------------------------------------------------------------------------- /static/chrome-dev-tools/Images/chromeLeft.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zobor/bproxy/HEAD/static/chrome-dev-tools/Images/chromeLeft.png -------------------------------------------------------------------------------- /static/chrome-dev-tools/Images/nodeIcon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zobor/bproxy/HEAD/static/chrome-dev-tools/Images/nodeIcon.png -------------------------------------------------------------------------------- /static/chrome-dev-tools/Images/radioDot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zobor/bproxy/HEAD/static/chrome-dev-tools/Images/radioDot.png -------------------------------------------------------------------------------- /static/chrome-dev-tools/Images/searchNext.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zobor/bproxy/HEAD/static/chrome-dev-tools/Images/searchNext.png -------------------------------------------------------------------------------- /static/chrome-dev-tools/Images/searchPrev.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zobor/bproxy/HEAD/static/chrome-dev-tools/Images/searchPrev.png -------------------------------------------------------------------------------- /static/chrome-dev-tools/Images/whatsnew.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zobor/bproxy/HEAD/static/chrome-dev-tools/Images/whatsnew.png -------------------------------------------------------------------------------- /curl/get-proxy-google.sh: -------------------------------------------------------------------------------- 1 | curl -x "http://127.0.0.1:8888" \ 2 | https://www.gstatic.com/external_hosted/scrollmagic/animation.gsap.min.js 3 | -------------------------------------------------------------------------------- /static/chrome-dev-tools/Images/chromeMiddle.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zobor/bproxy/HEAD/static/chrome-dev-tools/Images/chromeMiddle.png -------------------------------------------------------------------------------- /static/chrome-dev-tools/Images/chromeRight.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zobor/bproxy/HEAD/static/chrome-dev-tools/Images/chromeRight.png -------------------------------------------------------------------------------- /static/chrome-dev-tools/Images/chromeSelect.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zobor/bproxy/HEAD/static/chrome-dev-tools/Images/chromeSelect.png -------------------------------------------------------------------------------- /static/chrome-dev-tools/Images/profileIcon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zobor/bproxy/HEAD/static/chrome-dev-tools/Images/profileIcon.png -------------------------------------------------------------------------------- /static/chrome-dev-tools/Images/touchCursor.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zobor/bproxy/HEAD/static/chrome-dev-tools/Images/touchCursor.png -------------------------------------------------------------------------------- /static/chrome-dev-tools/diff/diff.js: -------------------------------------------------------------------------------- 1 | import"./DiffWrapper.js";import"./diff_match_patch.js";import*as Diff from"./DiffWrapper.js";export{Diff}; -------------------------------------------------------------------------------- /static/chrome-dev-tools/Images/chromeSelect_2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zobor/bproxy/HEAD/static/chrome-dev-tools/Images/chromeSelect_2x.png -------------------------------------------------------------------------------- /static/chrome-dev-tools/Images/popoverArrows.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zobor/bproxy/HEAD/static/chrome-dev-tools/Images/popoverArrows.png -------------------------------------------------------------------------------- /static/chrome-dev-tools/Images/resizeDiagonal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zobor/bproxy/HEAD/static/chrome-dev-tools/Images/resizeDiagonal.png -------------------------------------------------------------------------------- /static/chrome-dev-tools/Images/resizeVertical.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zobor/bproxy/HEAD/static/chrome-dev-tools/Images/resizeVertical.png -------------------------------------------------------------------------------- /static/chrome-dev-tools/Images/resourceCSSIcon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zobor/bproxy/HEAD/static/chrome-dev-tools/Images/resourceCSSIcon.png -------------------------------------------------------------------------------- /static/chrome-dev-tools/Images/resourceJSIcon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zobor/bproxy/HEAD/static/chrome-dev-tools/Images/resourceJSIcon.png -------------------------------------------------------------------------------- /static/chrome-dev-tools/Images/touchCursor_2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zobor/bproxy/HEAD/static/chrome-dev-tools/Images/touchCursor_2x.png -------------------------------------------------------------------------------- /static/chrome-dev-tools/browser_sdk/browser_sdk-legacy.js: -------------------------------------------------------------------------------- 1 | import"./browser_sdk.js";self.BrowserSDK=self.BrowserSDK||{},BrowserSDK=BrowserSDK||{}; -------------------------------------------------------------------------------- /static/chrome-dev-tools/common/AppProvider.js: -------------------------------------------------------------------------------- 1 | import{App}from"./App.js";export class AppProvider{createApp(){throw new Error("not implemented")}} -------------------------------------------------------------------------------- /static/chrome-dev-tools/Images/accelerometer-top.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zobor/bproxy/HEAD/static/chrome-dev-tools/Images/accelerometer-top.png -------------------------------------------------------------------------------- /static/chrome-dev-tools/Images/profileGroupIcon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zobor/bproxy/HEAD/static/chrome-dev-tools/Images/profileGroupIcon.png -------------------------------------------------------------------------------- /static/chrome-dev-tools/Images/profileSmallIcon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zobor/bproxy/HEAD/static/chrome-dev-tools/Images/profileSmallIcon.png -------------------------------------------------------------------------------- /static/chrome-dev-tools/Images/resizeDiagonal_2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zobor/bproxy/HEAD/static/chrome-dev-tools/Images/resizeDiagonal_2x.png -------------------------------------------------------------------------------- /static/chrome-dev-tools/Images/resizeHorizontal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zobor/bproxy/HEAD/static/chrome-dev-tools/Images/resizeHorizontal.png -------------------------------------------------------------------------------- /static/chrome-dev-tools/Images/resizeVertical_2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zobor/bproxy/HEAD/static/chrome-dev-tools/Images/resizeVertical_2x.png -------------------------------------------------------------------------------- /static/chrome-dev-tools/Images/resourcePlainIcon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zobor/bproxy/HEAD/static/chrome-dev-tools/Images/resourcePlainIcon.png -------------------------------------------------------------------------------- /static/chrome-dev-tools/console_counters/console_counters.js: -------------------------------------------------------------------------------- 1 | import*as WarningErrorCounter from"./WarningErrorCounter.js";export{WarningErrorCounter}; -------------------------------------------------------------------------------- /static/chrome-dev-tools/heap_snapshot_model/heap_snapshot_model.js: -------------------------------------------------------------------------------- 1 | import*as HeapSnapshotModel from"./HeapSnapshotModel.js";export{HeapSnapshotModel}; -------------------------------------------------------------------------------- /static/chrome-dev-tools/performance_monitor/performance_monitor.js: -------------------------------------------------------------------------------- 1 | import*as PerformanceMonitor from"./PerformanceMonitor.js";export{PerformanceMonitor}; -------------------------------------------------------------------------------- /static/chrome-dev-tools/platform/number-utilities.js: -------------------------------------------------------------------------------- 1 | export const clamp=(t,o,e)=>{let r=t;return te&&(r=e),r};export const mod=(t,o)=>(t%o+o)%o; -------------------------------------------------------------------------------- /src/help.txt: -------------------------------------------------------------------------------- 1 | MacOS 安装指引: 2 | 1. 拖动 bproxy 到 <应用目录> (/Applications) 3 | 2. 打开命令行,执行以下命令: 4 | sudo xattr -d com.apple.quarantine /Applications/bproxy.app 5 | -------------------------------------------------------------------------------- /static/chrome-dev-tools/Images/accelerometer-bottom.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zobor/bproxy/HEAD/static/chrome-dev-tools/Images/accelerometer-bottom.png -------------------------------------------------------------------------------- /static/chrome-dev-tools/Images/accelerometer-left.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zobor/bproxy/HEAD/static/chrome-dev-tools/Images/accelerometer-left.png -------------------------------------------------------------------------------- /static/chrome-dev-tools/Images/accelerometer-right.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zobor/bproxy/HEAD/static/chrome-dev-tools/Images/accelerometer-right.png -------------------------------------------------------------------------------- /static/chrome-dev-tools/Images/chromeDisabledSelect.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zobor/bproxy/HEAD/static/chrome-dev-tools/Images/chromeDisabledSelect.png -------------------------------------------------------------------------------- /static/chrome-dev-tools/Images/cssoverview_icons_2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zobor/bproxy/HEAD/static/chrome-dev-tools/Images/cssoverview_icons_2x.png -------------------------------------------------------------------------------- /static/chrome-dev-tools/Images/navigationControls.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zobor/bproxy/HEAD/static/chrome-dev-tools/Images/navigationControls.png -------------------------------------------------------------------------------- /static/chrome-dev-tools/Images/radioDot-dark-theme.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zobor/bproxy/HEAD/static/chrome-dev-tools/Images/radioDot-dark-theme.png -------------------------------------------------------------------------------- /static/chrome-dev-tools/Images/resizeHorizontal_2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zobor/bproxy/HEAD/static/chrome-dev-tools/Images/resizeHorizontal_2x.png -------------------------------------------------------------------------------- /static/chrome-dev-tools/Images/resourceDocumentIcon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zobor/bproxy/HEAD/static/chrome-dev-tools/Images/resourceDocumentIcon.png -------------------------------------------------------------------------------- /static/chrome-dev-tools/devtools_app.js: -------------------------------------------------------------------------------- 1 | import"./shell.js";import{startApplication}from"./RuntimeInstantiator.js"; 2 | startApplication("devtools_app"); 3 | -------------------------------------------------------------------------------- /static/chrome-dev-tools/Images/navigationControls_2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zobor/bproxy/HEAD/static/chrome-dev-tools/Images/navigationControls_2x.png -------------------------------------------------------------------------------- /static/chrome-dev-tools/Images/resourcePlainIconSmall.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zobor/bproxy/HEAD/static/chrome-dev-tools/Images/resourcePlainIconSmall.png -------------------------------------------------------------------------------- /static/chrome-dev-tools/Images/resourcesTimeGraphIcon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zobor/bproxy/HEAD/static/chrome-dev-tools/Images/resourcesTimeGraphIcon.png -------------------------------------------------------------------------------- /static/chrome-dev-tools/Images/toolbarResizerVertical.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zobor/bproxy/HEAD/static/chrome-dev-tools/Images/toolbarResizerVertical.png -------------------------------------------------------------------------------- /static/chrome-dev-tools/browser_sdk/browser_sdk.js: -------------------------------------------------------------------------------- 1 | import*as LogManager from"./LogManager.js";export const logManager=new LogManager.LogManager;export{LogManager}; -------------------------------------------------------------------------------- /static/chrome-dev-tools/Images/chromeDisabledSelect_2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zobor/bproxy/HEAD/static/chrome-dev-tools/Images/chromeDisabledSelect_2x.png -------------------------------------------------------------------------------- /static/chrome-dev-tools/Images/resourceDocumentIconSmall.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zobor/bproxy/HEAD/static/chrome-dev-tools/Images/resourceDocumentIconSmall.png -------------------------------------------------------------------------------- /static/chrome-dev-tools/har_importer/har_importer.js: -------------------------------------------------------------------------------- 1 | import*as HARFormat from"./HARFormat.js";import*as HARImporter from"./HARImporter.js";export{HARFormat,HARImporter}; -------------------------------------------------------------------------------- /static/chrome-dev-tools/issues/issues.js: -------------------------------------------------------------------------------- 1 | import*as IssueRevealer from"./IssueRevealer.js";import*as IssuesPane from"./IssuesPane.js";export{IssueRevealer,IssuesPane}; -------------------------------------------------------------------------------- /static/chrome-dev-tools/protocol_monitor/protocol_monitor.js: -------------------------------------------------------------------------------- 1 | import"./ProtocolMonitor.js";import*as ProtocolMonitor from"./ProtocolMonitor.js";export{ProtocolMonitor}; -------------------------------------------------------------------------------- /static/chrome-dev-tools/Images/breakpoint.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /static/chrome-dev-tools/Images/treeoutlineTriangles.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /static/chrome-dev-tools/dom_extension/module.json: -------------------------------------------------------------------------------- 1 | { 2 | "dependencies": ["platform"], 3 | "scripts": [], 4 | "modules": ["dom_extension.js", "DOMExtension.js"] 5 | } 6 | -------------------------------------------------------------------------------- /static/chrome-dev-tools/security/security.js: -------------------------------------------------------------------------------- 1 | import*as SecurityModel from"./SecurityModel.js";import*as SecurityPanel from"./SecurityPanel.js";export{SecurityModel,SecurityPanel}; -------------------------------------------------------------------------------- /static/chrome-dev-tools/Images/breakpoint-disabled.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /static/chrome-dev-tools/services/services.js: -------------------------------------------------------------------------------- 1 | import*as ServiceManager from"./ServiceManager.js";export{ServiceManager};export const serviceManager=new ServiceManager.ServiceManager; -------------------------------------------------------------------------------- /curl/post-file.sh: -------------------------------------------------------------------------------- 1 | curl -x "http://127.0.0.1:8888" \ 2 | https://www.bproxy.dev/ip \ 3 | -F "filename=post-json.sh" \ 4 | -F "name=testFile" \ 5 | -F "image=@./post-json.sh" 6 | -------------------------------------------------------------------------------- /static/chrome-dev-tools/Images/checkboxCheckmark.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /static/chrome-dev-tools/cm_headless/module.json: -------------------------------------------------------------------------------- 1 | { 2 | "scripts": [], 3 | "modules": ["cm_headless.js", "headlesscodemirror.js"], 4 | "skip_compilation": ["headlesscodemirror.js"] 5 | } 6 | -------------------------------------------------------------------------------- /static/chrome-dev-tools/services/module.json: -------------------------------------------------------------------------------- 1 | { 2 | "dependencies": ["common", "host"], 3 | "scripts": [], 4 | "modules": ["services.js", "services-legacy.js", "ServiceManager.js"] 5 | } 6 | -------------------------------------------------------------------------------- /curl/get-encode-gzip.sh: -------------------------------------------------------------------------------- 1 | curl -x "http://127.0.0.1:8888" \ 2 | --header "accept-encoding: gzip, deflate, br" \ 3 | https://shark2.douyucdn.cn/front-publish/dy-concept-master/js/runtime_2904eb6.js 4 | -------------------------------------------------------------------------------- /static/chrome-dev-tools/cm_web_modes/cm_web_modes_cm.js: -------------------------------------------------------------------------------- 1 | import"../cm/cm.js";import"./css.js";import"./javascript.js";import"./xml.js";import"./htmlmixed.js";import"./htmlembedded.js";import"./wast.js"; -------------------------------------------------------------------------------- /static/chrome-dev-tools/diff/diff-legacy.js: -------------------------------------------------------------------------------- 1 | import*as DiffModule from"./diff.js";self.Diff=self.Diff||{},Diff=Diff||{},Diff.Diff=DiffModule.Diff.DiffWrapper,Diff.Diff.Operation=DiffModule.Diff.Operation; -------------------------------------------------------------------------------- /curl/get-proxy-google-br.sh: -------------------------------------------------------------------------------- 1 | # --header "accept-encoding: gzip, deflate, br" \ 2 | 3 | curl -x "http://127.0.0.1:8888" \ 4 | --output - \ 5 | https://www.googletagmanager.com/gtm.js?id=GTM-PZ6TRJB 6 | -------------------------------------------------------------------------------- /static/chrome-dev-tools/chii_main/chii_main-legacy.js: -------------------------------------------------------------------------------- 1 | import*as ChiiMainModule from"./chii_main.js";self.ChiiMain=self.ChiiMain||{},ChiiMain=ChiiMain||{},ChiiMain.ChiiMain=ChiiMainModule.ChiiMain.ChiiMainImpl; -------------------------------------------------------------------------------- /static/chrome-dev-tools/cm_web_modes/cm_web_modes_headless.js: -------------------------------------------------------------------------------- 1 | import"../cm_headless/cm_headless.js";import"./css.js";import"./javascript.js";import"./xml.js";import"./htmlmixed.js";import"./htmlembedded.js"; -------------------------------------------------------------------------------- /static/chrome-dev-tools/har_importer/module.json: -------------------------------------------------------------------------------- 1 | { 2 | "dependencies": ["common", "browser_sdk"], 3 | "modules": ["har_importer.js", "har_importer-legacy.js", "HARFormat.js", "HARImporter.js"] 4 | } 5 | -------------------------------------------------------------------------------- /curl/post-json.sh: -------------------------------------------------------------------------------- 1 | curl -x "http://127.0.0.1:8888" \ 2 | --header "Content-Type: application/json" \ 3 | --request POST \ 4 | --data '{"username":"xyz","password":"xyz"}' \ 5 | https://www.bproxy.dev/ip 6 | -------------------------------------------------------------------------------- /static/chrome-dev-tools/Images/src/breakpoint.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /prettier.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | printWidth: 120, 3 | tabWidth: 2, 4 | useTabs: false, 5 | semi: true, 6 | singleQuote: true, 7 | trailingComma: 'all', 8 | endOfLine: 'auto', 9 | }; 10 | -------------------------------------------------------------------------------- /static/chrome-dev-tools/heap_snapshot_model/module.json: -------------------------------------------------------------------------------- 1 | { 2 | "dependencies": [], 3 | "scripts": [], 4 | "modules": ["heap_snapshot_model.js", "heap_snapshot_model-legacy.js", "HeapSnapshotModel.js"] 5 | } 6 | -------------------------------------------------------------------------------- /static/chrome-dev-tools/input/input.js: -------------------------------------------------------------------------------- 1 | import"./InputModel.js";import"./InputTimeline.js";import*as InputModel from"./InputModel.js";import*as InputTimeline from"./InputTimeline.js";export{InputModel,InputTimeline}; -------------------------------------------------------------------------------- /static/chrome-dev-tools/Images/src/breakpoint-disabled.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /static/chrome-dev-tools/help/help.js: -------------------------------------------------------------------------------- 1 | import*as Help from"./HelpImpl.js";import*as ReleaseNoteText from"./ReleaseNoteText.js";import*as ReleaseNoteView from"./ReleaseNoteView.js";export{Help,ReleaseNoteText,ReleaseNoteView}; -------------------------------------------------------------------------------- /static/chrome-dev-tools/media/media-legacy.js: -------------------------------------------------------------------------------- 1 | import*as MediaModule from"./media.js";self.Media=self.Media||{},Media=Media||{},Media.MainView=MediaModule.MainView.MainView,Media.MediaModel=MediaModule.MediaModel.MediaModel; -------------------------------------------------------------------------------- /static/chrome-dev-tools/platform/module.json: -------------------------------------------------------------------------------- 1 | { 2 | "dependencies": [], 3 | "scripts": [], 4 | "modules": ["platform.js", "utilities.js", "string-utilities.js", "number-utilities.js", "array-utilities.js"] 5 | } 6 | -------------------------------------------------------------------------------- /static/chrome-dev-tools/snippets/snippets.js: -------------------------------------------------------------------------------- 1 | import*as ScriptSnippetFileSystem from"./ScriptSnippetFileSystem.js";import*as SnippetsQuickOpen from"./SnippetsQuickOpen.js";export{ScriptSnippetFileSystem,SnippetsQuickOpen}; -------------------------------------------------------------------------------- /static/chrome-dev-tools/Images/errorWave.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /static/chrome-dev-tools/event_listeners/event_listeners.js: -------------------------------------------------------------------------------- 1 | import*as EventListenersUtils from"./EventListenersUtils.js";import*as EventListenersView from"./EventListenersView.js";export{EventListenersUtils,EventListenersView}; -------------------------------------------------------------------------------- /static/chrome-dev-tools/workspace/workspace.js: -------------------------------------------------------------------------------- 1 | import*as FileManager from"./FileManager.js";import*as UISourceCode from"./UISourceCode.js";import*as Workspace from"./WorkspaceImpl.js";export{FileManager,UISourceCode,Workspace}; -------------------------------------------------------------------------------- /static/chrome-dev-tools/workspace_diff/module.json: -------------------------------------------------------------------------------- 1 | { 2 | "dependencies": ["workspace", "diff", "persistence"], 3 | "scripts": [], 4 | "modules": ["workspace_diff.js", "workspace_diff-legacy.js", "WorkspaceDiff.js"] 5 | } 6 | -------------------------------------------------------------------------------- /static/chrome-dev-tools/platform/array-utilities.js: -------------------------------------------------------------------------------- 1 | export const removeElement=(e,t,r)=>{let n=e.indexOf(t);if(-1===n)return!1;if(r)return e.splice(n,1),!0;for(let r=n+1,l=e.length;r -------------------------------------------------------------------------------- /static/chrome-dev-tools/common/StringOutputStream.js: -------------------------------------------------------------------------------- 1 | export class OutputStream{async write(t){}async close(){}}export class StringOutputStream{constructor(){this._data=""}async write(t){this._data+=t}async close(){}data(){return this._data}} -------------------------------------------------------------------------------- /static/chrome-dev-tools/main/main.js: -------------------------------------------------------------------------------- 1 | import*as ExecutionContextSelector from"./ExecutionContextSelector.js";import*as MainImpl from"./MainImpl.js";import*as SimpleApp from"./SimpleApp.js";export{ExecutionContextSelector,MainImpl,SimpleApp}; -------------------------------------------------------------------------------- /static/chrome-dev-tools/ui/utils/register-custom-element.js: -------------------------------------------------------------------------------- 1 | export function registerCustomElement(e,t,s){return self.customElements.define(t,class extends s{constructor(){super(),this.setAttribute("is",t)}},{extends:e}),()=>createElement(e,t)} -------------------------------------------------------------------------------- /static/chrome-dev-tools/Images/chevrons.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /static/chrome-dev-tools/diff/module.json: -------------------------------------------------------------------------------- 1 | { 2 | "dependencies": ["common"], 3 | "scripts": [], 4 | "modules": ["diff.js", "diff-legacy.js", "DiffWrapper.js", "diff_match_patch.js"], 5 | "skip_compilation": ["diff_match_patch.js"] 6 | } 7 | -------------------------------------------------------------------------------- /static/chrome-dev-tools/profiler/ChildrenProvider.js: -------------------------------------------------------------------------------- 1 | import*as HeapSnapshotModel from"../heap_snapshot_model/heap_snapshot_model.js";export class ChildrenProvider{dispose(){}nodePosition(e){}isEmpty(){}serializeItemsRange(e,s){}sortAndRewind(e){}} -------------------------------------------------------------------------------- /static/chrome-dev-tools/resources/appManifestView.css: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2016 The Chromium Authors. All rights reserved. 3 | * Use of this source code is governed by a BSD-style license that can be 4 | * found in the LICENSE file. 5 | */ 6 | -------------------------------------------------------------------------------- /static/chrome-dev-tools/workspace/module.json: -------------------------------------------------------------------------------- 1 | { 2 | "dependencies": ["common", "host", "platform"], 3 | "scripts": [], 4 | "modules": ["workspace.js", "workspace-legacy.js", "FileManager.js", "UISourceCode.js", "WorkspaceImpl.js"] 5 | } 6 | -------------------------------------------------------------------------------- /src/web/components/Icon/index.scss: -------------------------------------------------------------------------------- 1 | .bp-icon { 2 | fill: #333333; 3 | color: #333333; 4 | width: 24px; 5 | height: 24px; 6 | display: inline-block; 7 | 8 | > svg { 9 | width: 24px; 10 | height: 24px; 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /static/chrome-dev-tools/issues/issues-legacy.js: -------------------------------------------------------------------------------- 1 | import*as IssuesModule from"./issues.js";self.Issues=self.Issues||{},Issues=Issues||{},Issues.IssuesPane=IssuesModule.IssuesPane.IssuesPaneImpl,Issues.IssueRevealer=IssuesModule.IssueRevealer.IssueRevealer; -------------------------------------------------------------------------------- /static/chrome-dev-tools/cookie_table/module.json: -------------------------------------------------------------------------------- 1 | { 2 | "dependencies": ["ui", "sdk", "data_grid"], 3 | "scripts": [], 4 | "modules": ["cookie_table.js", "cookie_table-legacy.js", "CookiesTable.js"], 5 | "resources": ["cookiesTable.css"] 6 | } 7 | -------------------------------------------------------------------------------- /static/chrome-dev-tools/inspector_main/inspector_main.js: -------------------------------------------------------------------------------- 1 | import"./RenderingOptions.js";import"./InspectorMain.js";import*as InspectorMain from"./InspectorMain.js";import*as RenderingOptions from"./RenderingOptions.js";export{InspectorMain,RenderingOptions}; -------------------------------------------------------------------------------- /static/chrome-dev-tools/cm_modes/DefaultCodeMirrorMimeMode.js: -------------------------------------------------------------------------------- 1 | import*as TextEditor from"../text_editor/text_editor.js";export class DefaultCodeMirrorMimeMode{async install(e){return Promise.resolve()}}CmModes.DefaultCodeMirrorMimeMode=DefaultCodeMirrorMimeMode; -------------------------------------------------------------------------------- /static/chrome-dev-tools/formatter_worker/IdentityFormatter.js: -------------------------------------------------------------------------------- 1 | import{FormattedContentBuilder}from"./FormattedContentBuilder.js";export class IdentityFormatter{constructor(t){this._builder=t}format(t,r,o,e){const d=t.substring(o,e);this._builder.addToken(d,o)}} -------------------------------------------------------------------------------- /static/chrome-dev-tools/javascript_metadata/javascript_metadata.js: -------------------------------------------------------------------------------- 1 | import"./NativeFunctions.js";import"./JavaScriptMetadata.js";import*as JavaScriptMetadata from"./JavaScriptMetadata.js";import*as NativeFunctions from"./NativeFunctions.js";export{JavaScriptMetadata,NativeFunctions}; -------------------------------------------------------------------------------- /src/web/hooks/useSubject.ts: -------------------------------------------------------------------------------- 1 | import { useState } from 'react'; 2 | import { BehaviorSubject } from 'rxjs'; 3 | 4 | const sub$ = new BehaviorSubject(0); 5 | 6 | export function UseSubject() { 7 | const [subject] = useState(sub$); 8 | 9 | return subject; 10 | } 11 | -------------------------------------------------------------------------------- /static/chrome-dev-tools/common/JavaScriptMetaData.js: -------------------------------------------------------------------------------- 1 | export class JavaScriptMetaData{signaturesForNativeFunction(t){throw new Error("not implemented")}signaturesForInstanceMethod(t,e){throw new Error("not implemented")}signaturesForStaticMethod(t,e){throw new Error("not implemented")}} -------------------------------------------------------------------------------- /static/chrome-dev-tools/common/Linkifier.js: -------------------------------------------------------------------------------- 1 | export class Linkifier{linkify(i,e){throw new Error("linkify not implemented")}static linkify(i,e){return i?self.runtime.extension(Linkifier,i).instance().then(n=>n.linkify(i,e)):Promise.reject(new Error("Can't linkify "+i))}}export let Options; -------------------------------------------------------------------------------- /static/chrome-dev-tools/search/module.json: -------------------------------------------------------------------------------- 1 | { 2 | "dependencies": ["components"], 3 | "scripts": [], 4 | "modules": ["search.js", "search-legacy.js", "SearchView.js", "SearchConfig.js", "SearchResultsPane.js"], 5 | "resources": ["searchResultsPane.css", "searchView.css"] 6 | } 7 | -------------------------------------------------------------------------------- /.npmignore: -------------------------------------------------------------------------------- 1 | bproxy.config.js 2 | ecosystem.config.js 3 | jest.config.js 4 | prettier.config.js 5 | tsconfig.json 6 | vite.config.ts 7 | ./bin/electron.js 8 | 9 | src/ 10 | app-build/ 11 | release/ 12 | .husky/ 13 | coverage/ 14 | curl/ 15 | 16 | !web-build/ 17 | !server-build/ 18 | -------------------------------------------------------------------------------- /src/utils/inject.ts: -------------------------------------------------------------------------------- 1 | type F = new () => T; 2 | 3 | function inject(Service: F): T { 4 | const { name } = Service; 5 | 6 | if (!inject[name]) { 7 | inject[name] = new Service(); 8 | } 9 | 10 | return inject[name]; 11 | } 12 | 13 | export default inject; 14 | -------------------------------------------------------------------------------- /static/chrome-dev-tools/Images/ic_info_black_18dp.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /static/chrome-dev-tools/har_importer/har_importer-legacy.js: -------------------------------------------------------------------------------- 1 | import*as HARImporterModule from"./har_importer.js";self.HARImporter=self.HARImporter||{},HARImporter=HARImporter||{},HARImporter.HARRoot=HARImporterModule.HARFormat.HARRoot,HARImporter.Importer=HARImporterModule.HARImporter.Importer; -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # base 2 | node_modules/ 3 | .DS_Store 4 | package-lock.json 5 | yarn.lock 6 | .idea 7 | *.swp 8 | 9 | # 构建产物 10 | app-build/ 11 | web-build/ 12 | server-build/ 13 | coverage/* 14 | release/ 15 | 16 | # bproxy 17 | *.tar.gz 18 | *.log 19 | mock/ 20 | bproxy.config*.js 21 | -------------------------------------------------------------------------------- /src/proxy/handleResponse/text.ts: -------------------------------------------------------------------------------- 1 | import { Readable } from 'stream'; 2 | 3 | export const responseText = (text: any, res?: any) => { 4 | const s = new Readable(); 5 | s.push(text); 6 | s.push(null); 7 | if (res) { 8 | s.pipe(res); 9 | } 10 | 11 | return s; 12 | }; 13 | -------------------------------------------------------------------------------- /static/chrome-dev-tools/Images/breakpoint-conditional.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /static/chrome-dev-tools/perf_ui/GCActionDelegate.js: -------------------------------------------------------------------------------- 1 | import*as SDK from"../sdk/sdk.js";import*as UI from"../ui/ui.js";export class GCActionDelegate{handleAction(e,o){for(const e of SDK.SDKModel.TargetManager.instance().models(SDK.HeapProfilerModel.HeapProfilerModel))e.collectGarbage();return!0}} -------------------------------------------------------------------------------- /static/chrome-dev-tools/formatter/module.json: -------------------------------------------------------------------------------- 1 | { 2 | "dependencies": ["common"], 3 | "scripts": [], 4 | "modules": [ 5 | "formatter.js", 6 | "formatter-legacy.js", 7 | "FormatterWorkerPool.js", 8 | "ScriptFormatter.js", 9 | "SourceFormatter.js" 10 | ] 11 | } 12 | -------------------------------------------------------------------------------- /static/chrome-dev-tools/Images/breakpoint-conditional-disabled.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /static/chrome-dev-tools/color_picker/color_picker.js: -------------------------------------------------------------------------------- 1 | import*as ContrastDetails from"./ContrastDetails.js";import*as ContrastInfo from"./ContrastInfo.js";import*as ContrastOverlay from"./ContrastOverlay.js";import*as Spectrum from"./Spectrum.js";export{ContrastDetails,ContrastInfo,ContrastOverlay,Spectrum}; -------------------------------------------------------------------------------- /static/chrome-dev-tools/console_counters/console_counters-legacy.js: -------------------------------------------------------------------------------- 1 | import*as ConsoleCountersModule from"./console_counters.js";self.ConsoleCounters=self.ConsoleCounters||{},ConsoleCounters=ConsoleCounters||{},ConsoleCounters.WarningErrorCounter=ConsoleCountersModule.WarningErrorCounter.WarningErrorCounter; -------------------------------------------------------------------------------- /static/chrome-dev-tools/quick_open/quick_open.js: -------------------------------------------------------------------------------- 1 | import*as CommandMenu from"./CommandMenu.js";import*as FilteredListWidget from"./FilteredListWidget.js";import*as HelpQuickOpen from"./HelpQuickOpen.js";import*as QuickOpen from"./QuickOpen.js";export{CommandMenu,FilteredListWidget,HelpQuickOpen,QuickOpen}; -------------------------------------------------------------------------------- /static/chrome-dev-tools/ui/utils/inject-core-styles.js: -------------------------------------------------------------------------------- 1 | import{appendStyle}from"./append-style.js";export function injectCoreStyles(e){appendStyle(e,"ui/inspectorCommon.css"),appendStyle(e,"ui/textButton.css"),self.UI.themeSupport.injectHighlightStyleSheets(e),self.UI.themeSupport.injectCustomStyleSheets(e)} -------------------------------------------------------------------------------- /static/chrome-dev-tools/Images/logpoint.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /static/chrome-dev-tools/cm/cm.js: -------------------------------------------------------------------------------- 1 | import"./codemirror.js";import"./multiplex.js";import"./matchbrackets.js";import"./closebrackets.js";import"./mark-selection.js";import"./comment.js";import"./overlay.js";import"./active-line.js";import"./foldcode.js";import"./foldgutter.js";import"./brace-fold.js";import"./simple.js"; -------------------------------------------------------------------------------- /static/chrome-dev-tools/cookie_table/cookie_table-legacy.js: -------------------------------------------------------------------------------- 1 | import*as CookieTableModule from"./cookie_table.js";self.CookieTable=self.CookieTable||{},CookieTable=CookieTable||{},CookieTable.CookiesTable=CookieTableModule.CookiesTable.CookiesTable,CookieTable.DataGridNode=CookieTableModule.CookiesTable.DataGridNode; -------------------------------------------------------------------------------- /static/chrome-dev-tools/css_overview/cssOverview.css: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2019 The Chromium Authors. All rights reserved. 3 | * Use of this source code is governed by a BSD-style license that can be 4 | * found in the LICENSE file. 5 | */ 6 | 7 | .css-overview-panel { 8 | overflow: hidden; 9 | } 10 | -------------------------------------------------------------------------------- /static/chrome-dev-tools/emulation/inspectedPagePlaceholder.css: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2016 The Chromium Authors. All rights reserved. 3 | * Use of this source code is governed by a BSD-style license that can be 4 | * found in the LICENSE file. 5 | */ 6 | 7 | :host { 8 | background-color: white; 9 | } 10 | -------------------------------------------------------------------------------- /static/chrome-dev-tools/main/SimpleApp.js: -------------------------------------------------------------------------------- 1 | import*as Common from"../common/common.js";import*as UI from"../ui/ui.js";export class SimpleApp{presentUI(o){const e=new UI.RootView.RootView;self.UI.inspectorView.show(e.element),e.attachToDocument(o),e.focus()}}export class SimpleAppProvider{createApp(){return new SimpleApp}} -------------------------------------------------------------------------------- /static/chrome-dev-tools/platform/platform.js: -------------------------------------------------------------------------------- 1 | import"./utilities.js";import*as ArrayUtilities from"./array-utilities.js";import*as NumberUtilities from"./number-utilities.js";import*as StringUtilities from"./string-utilities.js";export{Multimap}from"./utilities.js";export{ArrayUtilities,NumberUtilities,StringUtilities}; -------------------------------------------------------------------------------- /src/web/components/ConfigEditor/EditorToolbar.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { useConfigPath } from '../../hooks/useBridge'; 3 | 4 | export default function EditorToolbar() { 5 | const { configFilePath } = useConfigPath(); 6 | return
配置文件目录:{configFilePath || ''}
; 7 | } 8 | -------------------------------------------------------------------------------- /static/chrome-dev-tools/Images/logpoint-disabled.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /static/chrome-dev-tools/event_listeners/module.json: -------------------------------------------------------------------------------- 1 | { 2 | "dependencies": ["ui", "common", "components", "sdk", "object_ui"], 3 | "scripts": [], 4 | "modules": ["event_listeners.js", "event_listeners-legacy.js", "EventListenersView.js", "EventListenersUtils.js"], 5 | "resources": ["eventListenersView.css"] 6 | } 7 | -------------------------------------------------------------------------------- /src/proxy/system/macos/installCertificate.ts: -------------------------------------------------------------------------------- 1 | import { certificate } from '../../config'; 2 | 3 | export const installMacCertificate = async () => { 4 | const filepath = certificate?.getDefaultCACertPath(); 5 | 6 | return `sudo security add-trusted-cert -d -r trustRoot -k /Library/Keychains/System.keychain ${filepath}`; 7 | }; 8 | -------------------------------------------------------------------------------- /src/web/main.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import ReactDOM from 'react-dom/client'; 3 | import App from './App'; 4 | 5 | document.querySelector('.appFirstStartLogin')!.innerHTML = '我准备好了 ~'; 6 | 7 | setTimeout(() => { 8 | (ReactDOM as any).createRoot(document.getElementById('root')!).render(); 9 | }, 250); 10 | -------------------------------------------------------------------------------- /static/chrome-dev-tools/cm_modes/cm_modes.js: -------------------------------------------------------------------------------- 1 | import"./clike.js";import"./coffeescript.js";import"./php.js";import"./python.js";import"./shell.js";import"./livescript.js";import"./markdown.js";import"./clojure.js";import"./jsx.js";import*as DefaultCodeMirrorMimeMode from"./DefaultCodeMirrorMimeMode.js";export{DefaultCodeMirrorMimeMode}; -------------------------------------------------------------------------------- /static/chrome-dev-tools/formatter/formatter.js: -------------------------------------------------------------------------------- 1 | import*as FormatterWorkerPool from"./FormatterWorkerPool.js";import*as ScriptFormatter from"./ScriptFormatter.js";import*as SourceFormatter from"./SourceFormatter.js";export const sourceFormatter=new SourceFormatter.SourceFormatter;export{FormatterWorkerPool,ScriptFormatter,SourceFormatter}; -------------------------------------------------------------------------------- /static/chrome-dev-tools/protocol_client/module.json: -------------------------------------------------------------------------------- 1 | { 2 | "dependencies": ["common", "host"], 3 | "scripts": [], 4 | "modules": [ 5 | "../generated/InspectorBackendCommands.js", 6 | "protocol_client.js", 7 | "protocol_client-legacy.js", 8 | "NodeURL.js", 9 | "InspectorBackend.js" 10 | ] 11 | } 12 | -------------------------------------------------------------------------------- /static/chrome-dev-tools/services/services-legacy.js: -------------------------------------------------------------------------------- 1 | import*as ServicesModule from"./services.js";self.Services=self.Services||{},Services=Services||{},Services.ServiceManager=ServicesModule.ServiceManager.ServiceManager,Services.ServiceManager.Service=ServicesModule.ServiceManager.Service,Services.serviceManager=ServicesModule.serviceManager; -------------------------------------------------------------------------------- /static/chrome-dev-tools/layers/layers.js: -------------------------------------------------------------------------------- 1 | import"./LayerPaintProfilerView.js";import"./LayersPanel.js";import"./LayerTreeModel.js";import*as LayerPaintProfilerView from"./LayerPaintProfilerView.js";import*as LayersPanel from"./LayersPanel.js";import*as LayerTreeModel from"./LayerTreeModel.js";export{LayerPaintProfilerView,LayersPanel,LayerTreeModel}; -------------------------------------------------------------------------------- /static/chrome-dev-tools/sources/navigatorView.css: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2016 The Chromium Authors. All rights reserved. 3 | * Use of this source code is governed by a BSD-style license that can be 4 | * found in the LICENSE file. 5 | */ 6 | 7 | .navigator-toolbar { 8 | border-bottom: 1px solid #ccc; 9 | padding-left: 8px; 10 | } 11 | -------------------------------------------------------------------------------- /static/chrome-dev-tools/elements/MarkerDecorator.js: -------------------------------------------------------------------------------- 1 | import*as Common from"../common/common.js";import*as SDK from"../sdk/sdk.js";export class MarkerDecorator{decorate(o){}}export class GenericDecorator{constructor(o){this._title=Common.UIString.UIString(o.title()),this._color=o.descriptor().color}decorate(o){return{title:this._title,color:this._color}}} -------------------------------------------------------------------------------- /static/chrome-dev-tools/host/module.json: -------------------------------------------------------------------------------- 1 | { 2 | "dependencies": ["common", "platform"], 3 | "scripts": [], 4 | "modules": [ 5 | "host.js", 6 | "host-legacy.js", 7 | "InspectorFrontendHostAPI.js", 8 | "InspectorFrontendHost.js", 9 | "Platform.js", 10 | "ResourceLoader.js", 11 | "UserMetrics.js" 12 | ] 13 | } 14 | -------------------------------------------------------------------------------- /static/chrome-dev-tools/data_grid/module.json: -------------------------------------------------------------------------------- 1 | { 2 | "dependencies": ["ui"], 3 | "scripts": [], 4 | "resources": ["dataGrid.css"], 5 | "modules": [ 6 | "data_grid.js", 7 | "data_grid-legacy.js", 8 | "DataGrid.js", 9 | "ViewportDataGrid.js", 10 | "SortableDataGrid.js", 11 | "ShowMoreDataGridNode.js" 12 | ] 13 | } 14 | -------------------------------------------------------------------------------- /static/chrome-dev-tools/elements/nodeStackTraceWidget.css: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019 The Chromium Authors. All rights reserved. 3 | * Use of this source code is governed by a BSD-style license that can be 4 | * found in the LICENSE file. 5 | */ 6 | 7 | .stack-trace { 8 | font-size: 11px !important; 9 | font-family: Menlo, monospace; 10 | } 11 | -------------------------------------------------------------------------------- /static/chrome-dev-tools/network/eventSourceMessagesView.css: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2014 The Chromium Authors. All rights reserved. 3 | * Use of this source code is governed by a BSD-style license that can be 4 | * found in the LICENSE file. 5 | */ 6 | 7 | .event-source-messages-view .data-grid { 8 | flex: auto; 9 | border: none; 10 | } 11 | -------------------------------------------------------------------------------- /static/chrome-dev-tools/source_frame/xmlView.css: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2014 The Chromium Authors. All rights reserved. 3 | * Use of this source code is governed by a BSD-style license that can be 4 | * found in the LICENSE file. 5 | */ 6 | 7 | .shadow-xml-view { 8 | user-select: text; 9 | overflow: auto; 10 | padding: 2px 4px; 11 | } 12 | -------------------------------------------------------------------------------- /static/chrome-dev-tools/color_picker/module.json: -------------------------------------------------------------------------------- 1 | { 2 | "dependencies": ["ui", "sdk"], 3 | "scripts": [], 4 | "modules": [ 5 | "color_picker.js", 6 | "color_picker-legacy.js", 7 | "ContrastInfo.js", 8 | "ContrastOverlay.js", 9 | "ContrastDetails.js", 10 | "Spectrum.js" 11 | ], 12 | "resources": ["spectrum.css"] 13 | } 14 | -------------------------------------------------------------------------------- /static/chrome-dev-tools/formatter_worker_entrypoint.js: -------------------------------------------------------------------------------- 1 | import"./RuntimeInstantiator.js";import"./common/common.js";import"./platform/platform.js";import"./text_utils/text_utils-legacy.js";import"./cm_headless/cm_headless.js";import"./formatter_worker/formatter_worker.js";import{startWorker}from"./RuntimeInstantiator.js";startWorker("formatter_worker_entrypoint"); -------------------------------------------------------------------------------- /static/chrome-dev-tools/text_utils/module.json: -------------------------------------------------------------------------------- 1 | { 2 | "dependencies": ["platform"], 3 | "scripts": [], 4 | "modules": [ 5 | "ContentProvider.js", 6 | "StaticContentProvider.js", 7 | "text_utils.js", 8 | "text_utils-legacy.js", 9 | "Text.js", 10 | "TextCursor.js", 11 | "TextUtils.js", 12 | "TextRange.js" 13 | ] 14 | } 15 | -------------------------------------------------------------------------------- /static/chrome-dev-tools/layers/layers-legacy.js: -------------------------------------------------------------------------------- 1 | import*as LayersModule from"./layers.js";self.Layers=self.Layers||{},Layers=Layers||{},Layers.LayerTreeModel=LayersModule.LayerTreeModel.LayerTreeModel,Layers.LayerTreeModel.Events=LayersModule.LayerTreeModel.Events,Layers.AgentLayer=LayersModule.LayerTreeModel.AgentLayer,Layers.LayersPanel=LayersModule.LayersPanel.LayersPanel; -------------------------------------------------------------------------------- /static/chrome-dev-tools/settings/settings.js: -------------------------------------------------------------------------------- 1 | import"./SettingsScreen.js";import"./FrameworkBlackboxSettingsTab.js";import*as FrameworkBlackboxSettingsTab from"./FrameworkBlackboxSettingsTab.js";import*as KeybindsSettingsTab from"./KeybindsSettingsTab.js";import*as SettingsScreen from"./SettingsScreen.js";export{FrameworkBlackboxSettingsTab,KeybindsSettingsTab,SettingsScreen}; -------------------------------------------------------------------------------- /static/chrome-dev-tools/text_editor/text_editor.js: -------------------------------------------------------------------------------- 1 | import"../cm_web_modes/cm_web_modes_cm.js";import*as CodeMirrorTextEditor from"./CodeMirrorTextEditor.js";import*as CodeMirrorUtils from"./CodeMirrorUtils.js";import*as TextEditorAutocompleteController from"./TextEditorAutocompleteController.js";export{CodeMirrorTextEditor,CodeMirrorUtils,TextEditorAutocompleteController}; -------------------------------------------------------------------------------- /src/web/modules/api.ts: -------------------------------------------------------------------------------- 1 | import { getRuntimePlatform, showBproxyLog } from '../modules/bridge'; 2 | 3 | // 查看日志文件 4 | export function showLogFile() { 5 | getRuntimePlatform().then((rs: any) => { 6 | const isApp = rs === 'app'; 7 | 8 | if (isApp) { 9 | showBproxyLog(); 10 | } else { 11 | window.open('/web/LogViewer'); 12 | } 13 | }); 14 | } 15 | -------------------------------------------------------------------------------- /static/chrome-dev-tools/resources/cookieItemsView.css: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019 The Chromium Authors. All rights reserved. 3 | * Use of this source code is governed by a BSD-style license that can be 4 | * found in the LICENSE file. 5 | */ 6 | 7 | .cookie-value { 8 | padding: 2px 6px; 9 | overflow: auto; 10 | user-select: text; 11 | min-height: 100%; 12 | } 13 | -------------------------------------------------------------------------------- /static/chrome-dev-tools/extensions/module.json: -------------------------------------------------------------------------------- 1 | { 2 | "dependencies": ["components", "browser_sdk", "common"], 3 | "scripts": [], 4 | "modules": [ 5 | "extensions.js", 6 | "extensions-legacy.js", 7 | "ExtensionAPI.js", 8 | "ExtensionTraceProvider.js", 9 | "ExtensionServer.js", 10 | "ExtensionPanel.js", 11 | "ExtensionView.js" 12 | ] 13 | } 14 | -------------------------------------------------------------------------------- /static/chrome-dev-tools/sources/Plugin.js: -------------------------------------------------------------------------------- 1 | import*as UI from"../ui/ui.js";import*as Workspace from"../workspace/workspace.js";export class Plugin{static accepts(e){return!1}wasShown(){}willHide(){}async rightToolbarItems(){return[]}leftToolbarItems(){return[]}populateLineGutterContextMenu(e,r){return Promise.resolve()}populateTextAreaContextMenu(e,r,t){return Promise.resolve()}dispose(){}} -------------------------------------------------------------------------------- /src/proxy/utils/urls.ts: -------------------------------------------------------------------------------- 1 | const url = require('url'); 2 | 3 | export function getUrlParams(urlString: string) { 4 | const params = {}; 5 | const parsedUrl = url.parse(urlString, true); 6 | const query = parsedUrl.query; 7 | for (const key in query) { 8 | if (Object.hasOwn(query, key)) { 9 | params[key] = query[key]; 10 | } 11 | } 12 | return params; 13 | } 14 | -------------------------------------------------------------------------------- /src/web/pageConfig.ts: -------------------------------------------------------------------------------- 1 | const pageConfig = { 2 | name: null, 3 | collapsed: 3, 4 | shouldCollapse: (field) => ['array'].includes(field), 5 | quotesOnKeys: false, 6 | theme: ['google', 'monokai'][0], 7 | displayDataTypes: false, 8 | displayObjectSize: false, 9 | collapseStringsAfterLength: 50, 10 | displayArrayKey: false, 11 | }; 12 | 13 | export default pageConfig; 14 | -------------------------------------------------------------------------------- /static/chrome-dev-tools/source_frame/resourceSourceFrame.css: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2017 The Chromium Authors. All rights reserved. 3 | * Use of this source code is governed by a BSD-style license that can be 4 | * found in the LICENSE file. 5 | */ 6 | .searchable-view { 7 | flex: 1; 8 | } 9 | 10 | .toolbar { 11 | background-color: #eee; 12 | border-top: 1px solid #ccc; 13 | } 14 | -------------------------------------------------------------------------------- /static/chrome-dev-tools/ui/targetCrashedScreen.css: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015 The Chromium Authors. All rights reserved. 3 | * Use of this source code is governed by a BSD-style license that can be 4 | * found in the LICENSE file. 5 | */ 6 | 7 | .widget { 8 | padding: 25px; 9 | } 10 | 11 | .message { 12 | font-size: larger; 13 | white-space: pre; 14 | margin: 5px; 15 | } 16 | -------------------------------------------------------------------------------- /static/chrome-dev-tools/ui/utils/append-style.js: -------------------------------------------------------------------------------- 1 | export function appendStyle(e,t){const n=self.Runtime.cachedResources[t]||"";n||console.error(t+" not preloaded. Check module.json");let o=createElement("style");o.textContent=n,e.appendChild(o);const l=self.UI.themeSupport.themeStyleSheet(t,n);l&&(o=createElement("style"),o.textContent=l+"\n"+Root.Runtime.resolveSourceURL(t+".theme"),e.appendChild(o))} -------------------------------------------------------------------------------- /.swcrc: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json.schemastore.org/swcrc", 3 | "module": { 4 | "type": "commonjs" 5 | }, 6 | "jsc": { 7 | "parser": { 8 | "syntax": "typescript", 9 | "dynamicImport": false, 10 | "decorators": false 11 | }, 12 | "target": "es2017", 13 | "loose": false, 14 | "externalHelpers": false 15 | }, 16 | "minify": false 17 | } 18 | -------------------------------------------------------------------------------- /static/chrome-dev-tools/extensions/extensions.js: -------------------------------------------------------------------------------- 1 | import*as ExtensionAPI from"./ExtensionAPI.js";import*as ExtensionPanel from"./ExtensionPanel.js";import*as ExtensionServer from"./ExtensionServer.js";import*as ExtensionTraceProvider from"./ExtensionTraceProvider.js";import*as ExtensionView from"./ExtensionView.js";export{ExtensionAPI,ExtensionPanel,ExtensionServer,ExtensionTraceProvider,ExtensionView}; -------------------------------------------------------------------------------- /static/chrome-dev-tools/text_utils/text_utils.js: -------------------------------------------------------------------------------- 1 | import*as ContentProvider from"./ContentProvider.js";import*as StaticContentProvider from"./StaticContentProvider.js";import*as Text from"./Text.js";import*as TextCursor from"./TextCursor.js";import*as TextRange from"./TextRange.js";import*as TextUtils from"./TextUtils.js";export{ContentProvider,StaticContentProvider,Text,TextCursor,TextRange,TextUtils}; -------------------------------------------------------------------------------- /static/chrome-dev-tools/protocol_client/protocol_client.js: -------------------------------------------------------------------------------- 1 | import*as InspectorBackendCommands from"../generated/InspectorBackendCommands.js";import*as InspectorBackend from"./InspectorBackend.js";import*as NodeURL from"./NodeURL.js";export{InspectorBackend,NodeURL};self.Protocol=self.Protocol||{},InspectorBackendCommands.registerCommands(InspectorBackend.inspectorBackend);export const Protocol=self.Protocol; -------------------------------------------------------------------------------- /src/proxy/bash.ts: -------------------------------------------------------------------------------- 1 | import bproxy from '.'; 2 | import * as packageJson from '../../package.json'; 3 | import { updateDataSet } from './dataset'; 4 | 5 | updateDataSet('platform', 'bash'); 6 | 7 | const [, , $arg1] = process.argv; 8 | 9 | if ($arg1 === '-v') { 10 | console.log(packageJson.version); 11 | } else { 12 | console.clear(); 13 | bproxy.start(); 14 | } 15 | 16 | // require('./demo'); 17 | -------------------------------------------------------------------------------- /static/chrome-dev-tools/Images/src/breakpoint-conditional-disabled.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /static/chrome-dev-tools/Images/src/breakpoint-conditional.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /static/chrome-dev-tools/network/requestHTMLView.css: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2018 The Chromium Authors. All rights reserved. 3 | * Use of this source code is governed by a BSD-style license that can be 4 | * found in the LICENSE file. 5 | */ 6 | -theme-preserve, 7 | .html-preview-frame { 8 | box-shadow: var(--drop-shadow); 9 | background: white; 10 | flex-grow: 1; 11 | margin: 20px; 12 | } 13 | -------------------------------------------------------------------------------- /static/chrome-dev-tools/source_frame/fontView.css: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2014 The Chromium Authors. All rights reserved. 3 | * Use of this source code is governed by a BSD-style license that can be 4 | * found in the LICENSE file. 5 | */ 6 | 7 | .font-view { 8 | font-size: 60px; 9 | white-space: pre-wrap; 10 | word-wrap: break-word; 11 | text-align: center; 12 | padding: 15px; 13 | } 14 | -------------------------------------------------------------------------------- /static/chrome-dev-tools/javascript_metadata/module.json: -------------------------------------------------------------------------------- 1 | { 2 | "extensions": [ 3 | { 4 | "type": "@Common.JavaScriptMetadata", 5 | "className": "JavaScriptMetadata.JavaScriptMetadata" 6 | } 7 | ], 8 | "dependencies": ["common"], 9 | "scripts": [], 10 | "modules": ["javascript_metadata.js", "javascript_metadata-legacy.js", "NativeFunctions.js", "JavaScriptMetadata.js"] 11 | } 12 | -------------------------------------------------------------------------------- /static/chrome-dev-tools/lighthouse/lighthouse-legacy.js: -------------------------------------------------------------------------------- 1 | import*as LighthouseModule from"./lighthouse.js";self.Lighthouse=self.Lighthouse||{},Lighthouse=Lighthouse||{},Lighthouse.ReportGenerator,Lighthouse.LighthousePanel=LighthouseModule.LighthousePanel.LighthousePanel,Lighthouse.ReportSelector=LighthouseModule.LighthouseReportSelector.ReportSelector,Lighthouse.StatusView=LighthouseModule.LighthouseStatusView.StatusView; -------------------------------------------------------------------------------- /static/chrome-dev-tools/ui/utils/create-shadow-root-with-core-styles.js: -------------------------------------------------------------------------------- 1 | import{appendStyle}from"./append-style.js";import{focusChanged}from"./focus-changed.js";import{injectCoreStyles}from"./inject-core-styles.js";export function createShadowRootWithCoreStyles(e,t,o){const n=e.attachShadow({mode:"open",delegatesFocus:o});return injectCoreStyles(n),t&&appendStyle(n,t),n.addEventListener("focus",focusChanged.bind(UI),!0),n} -------------------------------------------------------------------------------- /static/chrome-dev-tools/components/Reload.js: -------------------------------------------------------------------------------- 1 | import*as Host from"../host/host.js";import{State}from"./DockController.js";export function reload(){self.Components.dockController.canDock()&&self.Components.dockController.dockSide()===State.Undocked&&Host.InspectorFrontendHost.InspectorFrontendHostInstance.setIsDocked(!0,(function(){})),Host.InspectorFrontendHost.InspectorFrontendHostInstance.reattach(()=>window.location.reload())} -------------------------------------------------------------------------------- /static/chrome-dev-tools/ui/rootView.css: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2016 The Chromium Authors. All rights reserved. 3 | * Use of this source code is governed by a BSD-style license that can be 4 | * found in the LICENSE file. 5 | */ 6 | 7 | .root-view { 8 | background-color: white; 9 | overflow: hidden; 10 | position: absolute !important; 11 | left: 0; 12 | top: 0; 13 | right: 0; 14 | bottom: 0; 15 | } 16 | -------------------------------------------------------------------------------- /static/chrome-dev-tools/search/search-legacy.js: -------------------------------------------------------------------------------- 1 | import*as SearchModule from"./search.js";self.Search=self.Search||{},Search=Search||{},Search.SearchConfig=SearchModule.SearchConfig.SearchConfig,Search.SearchResult=SearchModule.SearchConfig.SearchResult,Search.SearchScope=SearchModule.SearchConfig.SearchScope,Search.SearchResultsPane=SearchModule.SearchResultsPane.SearchResultsPane,Search.SearchView=SearchModule.SearchView.SearchView; -------------------------------------------------------------------------------- /static/chrome-dev-tools/changes/changes.js: -------------------------------------------------------------------------------- 1 | import"./ChangesHighlighter.js";import"./ChangesView.js";import"./ChangesSidebar.js";import"./ChangesTextEditor.js";import*as ChangesHighlighter from"./ChangesHighlighter.js";import*as ChangesSidebar from"./ChangesSidebar.js";import*as ChangesTextEditor from"./ChangesTextEditor.js";import*as ChangesView from"./ChangesView.js";export{ChangesHighlighter,ChangesSidebar,ChangesTextEditor,ChangesView}; -------------------------------------------------------------------------------- /static/chrome-dev-tools/components/components.js: -------------------------------------------------------------------------------- 1 | import*as DockController from"./DockController.js";import*as ImagePreview from"./ImagePreview.js";import*as JSPresentationUtils from"./JSPresentationUtils.js";import*as Linkifier from"./Linkifier.js";import*as Reload from"./Reload.js";import*as TargetDetachedDialog from"./TargetDetachedDialog.js";export{DockController,ImagePreview,JSPresentationUtils,Linkifier,Reload,TargetDetachedDialog}; -------------------------------------------------------------------------------- /static/chrome-dev-tools/inline_editor/inline_editor.js: -------------------------------------------------------------------------------- 1 | import*as BezierEditor from"./BezierEditor.js";import*as BezierUI from"./BezierUI.js";import*as ColorSwatch from"./ColorSwatch.js";import*as CSSShadowEditor from"./CSSShadowEditor.js";import*as CSSShadowModel from"./CSSShadowModel.js";import*as SwatchPopoverHelper from"./SwatchPopoverHelper.js";export{BezierEditor,BezierUI,ColorSwatch,CSSShadowEditor,CSSShadowModel,SwatchPopoverHelper}; -------------------------------------------------------------------------------- /static/chrome-dev-tools/timeline_model/module.json: -------------------------------------------------------------------------------- 1 | { 2 | "dependencies": ["sdk"], 3 | "scripts": [], 4 | "modules": [ 5 | "timeline_model.js", 6 | "timeline_model-legacy.js", 7 | "TimelineModelFilter.js", 8 | "TracingLayerTree.js", 9 | "TimelineModel.js", 10 | "TimelineIRModel.js", 11 | "TimelineJSProfile.js", 12 | "TimelineFrameModel.js", 13 | "TimelineProfileTree.js" 14 | ] 15 | } 16 | -------------------------------------------------------------------------------- /src/web/pages/LogViewer/index.scss: -------------------------------------------------------------------------------- 1 | .log-viewer { 2 | position: absolute; 3 | top: 0; 4 | left: 0; 5 | width: 100%; 6 | height: 100%; 7 | background-color: #000; 8 | color: #fff; 9 | padding: 20px; 10 | box-sizing: border-box; 11 | overflow-y: auto; 12 | .logs { 13 | 14 | pre { 15 | word-wrap: break-word; 16 | word-break: break-all; 17 | white-space: pre-wrap; 18 | } 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /static/chrome-dev-tools/animation/animation.js: -------------------------------------------------------------------------------- 1 | import*as AnimationGroupPreviewUI from"./AnimationGroupPreviewUI.js";import*as AnimationModel from"./AnimationModel.js";import*as AnimationScreenshotPopover from"./AnimationScreenshotPopover.js";import*as AnimationTimeline from"./AnimationTimeline.js";import*as AnimationUI from"./AnimationUI.js";export{AnimationGroupPreviewUI,AnimationModel,AnimationScreenshotPopover,AnimationTimeline,AnimationUI}; -------------------------------------------------------------------------------- /static/chrome-dev-tools/data_grid/data_grid.js: -------------------------------------------------------------------------------- 1 | import"./DataGrid.js";import"./ViewportDataGrid.js";import"./SortableDataGrid.js";import"./ShowMoreDataGridNode.js";import*as DataGrid from"./DataGrid.js";import*as ShowMoreDataGridNode from"./ShowMoreDataGridNode.js";import*as SortableDataGrid from"./SortableDataGrid.js";import*as ViewportDataGrid from"./ViewportDataGrid.js";export{DataGrid,ShowMoreDataGridNode,SortableDataGrid,ViewportDataGrid}; -------------------------------------------------------------------------------- /static/chrome-dev-tools/input/input-legacy.js: -------------------------------------------------------------------------------- 1 | import*as InputModule from"./input.js";self.Input=self.Input||{},Input=Input||{},Input.InputModel=InputModule.InputModel.InputModel,Input.InputTimeline=InputModule.InputTimeline.InputTimeline,Input.InputTimeline.State=InputModule.InputTimeline.State,Input.InputTimeline.TracingClient=InputModule.InputTimeline.TracingClient,Input.InputTimeline.ActionDelegate=InputModule.InputTimeline.ActionDelegate; -------------------------------------------------------------------------------- /static/chrome-dev-tools/host/host.js: -------------------------------------------------------------------------------- 1 | import*as InspectorFrontendHost from"./InspectorFrontendHost.js";import*as InspectorFrontendHostAPI from"./InspectorFrontendHostAPI.js";import*as Platform from"./Platform.js";import*as ResourceLoader from"./ResourceLoader.js";import*as UserMetrics from"./UserMetrics.js";export{InspectorFrontendHost,InspectorFrontendHostAPI,Platform,ResourceLoader,UserMetrics};export const userMetrics=new UserMetrics.UserMetrics; -------------------------------------------------------------------------------- /src/web/hooks/useBool.ts: -------------------------------------------------------------------------------- 1 | import { useState } from 'react'; 2 | 3 | export default function useBool(defaultState: boolean) { 4 | const [state, setState] = useState(defaultState || false); 5 | const toggle = () => { 6 | setState((pre) => !pre); 7 | }; 8 | const ok = () => { 9 | setState(true); 10 | }; 11 | const no = () => { 12 | setState(false); 13 | }; 14 | 15 | return { toggle, state, ok, no }; 16 | } 17 | -------------------------------------------------------------------------------- /static/chrome-dev-tools/components/module.json: -------------------------------------------------------------------------------- 1 | { 2 | "dependencies": ["bindings", "platform", "ui"], 3 | "scripts": [], 4 | "modules": [ 5 | "components.js", 6 | "components-legacy.js", 7 | "JSPresentationUtils.js", 8 | "DockController.js", 9 | "ImagePreview.js", 10 | "Linkifier.js", 11 | "Reload.js", 12 | "TargetDetachedDialog.js" 13 | ], 14 | "resources": ["imagePreview.css", "jsUtils.css"] 15 | } 16 | -------------------------------------------------------------------------------- /static/chrome-dev-tools/formatter_worker_entrypoint.json: -------------------------------------------------------------------------------- 1 | { 2 | "worker": true, 3 | "modules": [ 4 | { "name": "common", "type": "autostart" }, 5 | { "name": "platform", "type": "autostart" }, 6 | { "name": "text_utils", "type": "autostart" }, 7 | { "name": "cm_headless", "type": "autostart" }, 8 | { "name": "cm_web_modes", "type": "autostart" }, 9 | { "name": "formatter_worker", "type": "autostart" } 10 | ] 11 | } 12 | -------------------------------------------------------------------------------- /static/chrome-dev-tools/root/root-legacy.js: -------------------------------------------------------------------------------- 1 | import*as RootModule from"./root.js";self.Root=self.Root||{},Root=Root||{},Root.Runtime=RootModule.Runtime.Runtime,Root.Runtime.experiments=RootModule.Runtime.experiments,Root.Runtime.queryParam=RootModule.Runtime.Runtime.queryParam,Root.runtime,Root.Runtime.loadResourcePromise=RootModule.Runtime.loadResourcePromise,Root.Runtime.Extension=RootModule.Runtime.Extension,Root.Runtime.Module=RootModule.Runtime.Module; -------------------------------------------------------------------------------- /static/chrome-dev-tools/coverage/coverage.js: -------------------------------------------------------------------------------- 1 | import"./CoverageModel.js";import"./CoverageListView.js";import"./CoverageView.js";import"./CoverageDecorationManager.js";import*as CoverageDecorationManager from"./CoverageDecorationManager.js";import*as CoverageListView from"./CoverageListView.js";import*as CoverageModel from"./CoverageModel.js";import*as CoverageView from"./CoverageView.js";export{CoverageDecorationManager,CoverageListView,CoverageModel,CoverageView}; -------------------------------------------------------------------------------- /static/chrome-dev-tools/javascript_metadata/javascript_metadata-legacy.js: -------------------------------------------------------------------------------- 1 | import*as JavaScriptMetadataModule from"./javascript_metadata.js";self.JavaScriptMetadata=self.JavaScriptMetadata||{},JavaScriptMetadata=JavaScriptMetadata||{},JavaScriptMetadata.JavaScriptMetadata=JavaScriptMetadataModule.JavaScriptMetadata.JavaScriptMetadataImpl,JavaScriptMetadata.NativeFunctions=JavaScriptMetadataModule.NativeFunctions.NativeFunctions,JavaScriptMetadata.NativeFunctions; -------------------------------------------------------------------------------- /static/chrome-dev-tools/network/signedExchangeInfoView.css: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2018 The Chromium Authors. All rights reserved. 3 | * Use of this source code is governed by a BSD-style license that can be 4 | * found in the LICENSE file. 5 | */ 6 | 7 | .signed-exchange-info-view { 8 | user-select: text; 9 | overflow: auto; 10 | } 11 | 12 | .signed-exchange-info-tree { 13 | flex-grow: 1; 14 | overflow-y: auto; 15 | margin: 0; 16 | } 17 | -------------------------------------------------------------------------------- /static/chrome-dev-tools/inline_editor/swatchPopover.css: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2017 The Chromium Authors. All rights reserved. 3 | * Use of this source code is governed by a BSD-style license that can be 4 | * found in the LICENSE file. 5 | */ 6 | 7 | .widget { 8 | display: flex; 9 | background: white; 10 | box-shadow: var(--drop-shadow); 11 | border-radius: 2px; 12 | overflow: auto; 13 | user-select: text; 14 | line-height: 11px; 15 | } 16 | -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | indent_style = space 5 | indent_size = 2 6 | end_of_line = lf 7 | charset = utf-8 8 | trim_trailing_whitespace = true 9 | insert_final_newline = true 10 | 11 | [*.{json,js,jsx,html,css,ts}] 12 | indent_style = space 13 | indent_size = 2 14 | 15 | [*.{js,ts,tsx,jsx}] 16 | quote_type = single 17 | 18 | [.eslintrc] 19 | indent_style = space 20 | indent_size = 2 21 | 22 | [*.md] 23 | trim_trailing_whitespace = false 24 | -------------------------------------------------------------------------------- /static/chrome-dev-tools/cm_web_modes/module.json: -------------------------------------------------------------------------------- 1 | { 2 | "dependencies": [], 3 | "scripts": [], 4 | "modules": [ 5 | "cm_web_modes.js", 6 | "cm_web_modes_cm.js", 7 | "cm_web_modes_headless.js", 8 | "css.js", 9 | "javascript.js", 10 | "xml.js", 11 | "htmlmixed.js", 12 | "htmlembedded.js", 13 | "wast.js" 14 | ], 15 | "skip_compilation": ["css.js", "javascript.js", "xml.js", "htmlmixed.js", "htmlembedded.js", "wast.js"] 16 | } 17 | -------------------------------------------------------------------------------- /static/chrome-dev-tools/protocol_monitor/protocol_monitor-legacy.js: -------------------------------------------------------------------------------- 1 | import*as ProtocolMonitorModule from"./protocol_monitor.js";self.ProtocolMonitor=self.ProtocolMonitor||{},ProtocolMonitor=ProtocolMonitor||{},ProtocolMonitor.ProtocolMonitor=ProtocolMonitorModule.ProtocolMonitor.ProtocolMonitorImpl,ProtocolMonitor.ProtocolMonitor.InfoWidget=ProtocolMonitorModule.ProtocolMonitor.InfoWidget,ProtocolMonitor.ProtocolMonitor.ProtocolNode=ProtocolMonitorModule.ProtocolMonitor.ProtocolNode; -------------------------------------------------------------------------------- /static/chrome-dev-tools/snippets/module.json: -------------------------------------------------------------------------------- 1 | { 2 | "extensions": [ 3 | { 4 | "type": "@QuickOpen.FilteredListWidget.Provider", 5 | "title": "Run snippet", 6 | "prefix": "!", 7 | "className": "Snippets.SnippetsQuickOpen" 8 | } 9 | ], 10 | "dependencies": ["bindings", "quick_open", "persistence"], 11 | "scripts": [], 12 | "modules": ["snippets.js", "snippets-legacy.js", "ScriptSnippetFileSystem.js", "SnippetsQuickOpen.js"] 13 | } 14 | -------------------------------------------------------------------------------- /ecosystem.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | apps : [{ 3 | name: "bproxy", 4 | watch: ["server-build"], 5 | ignore_watch: ["node_modules", "src/"], 6 | watch_options: { 7 | followSymlinks: false, 8 | }, 9 | watch_delay: 500, 10 | interpreter: "node", 11 | interpreter_args: [], 12 | script: "./server-build/proxy/bash.js", 13 | args: "", 14 | exec_mode: "fork_mode", 15 | instances: 1, 16 | cwd: "./", 17 | }] 18 | } 19 | -------------------------------------------------------------------------------- /src/web/components/UI/index.tsx: -------------------------------------------------------------------------------- 1 | import { 2 | Button, 3 | Card, 4 | Col, 5 | Form, 6 | Input, 7 | message, 8 | Modal, 9 | Radio, 10 | Row, 11 | Select, 12 | Spin, 13 | Switch, 14 | Tag, 15 | Tooltip, 16 | Checkbox, 17 | } from 'antd'; 18 | 19 | message.config({ 20 | top: 100, 21 | duration: 1.5, 22 | maxCount: 2, 23 | }); 24 | 25 | export { Checkbox, Tag, Spin, Card, Col, Row, Tooltip, Button, message, Switch, Form, Input, Select, Radio, Modal }; 26 | -------------------------------------------------------------------------------- /static/chrome-dev-tools/changes/changes-legacy.js: -------------------------------------------------------------------------------- 1 | import*as ChangesModule from"./changes.js";self.Changes=self.Changes||{},Changes=Changes||{},Changes.ChangesHighlighter=ChangesModule.ChangesHighlighter.ChangesHighlighter,Changes.ChangesSidebar=ChangesModule.ChangesSidebar.ChangesSidebar,Changes.ChangesView=ChangesModule.ChangesView.ChangesView,Changes.ChangesView.RowType=ChangesModule.ChangesView.RowType,Changes.ChangesView.DiffUILocationRevealer=ChangesModule.ChangesView.DiffUILocationRevealer; -------------------------------------------------------------------------------- /src/web/components/Settings/ConfigModal.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { ControllerDialog } from '../../pages/Home/Controller'; 3 | import ConfigEditor from '../ConfigEditor'; 4 | 5 | const ConfigModal = (props) => { 6 | return ( 7 | 8 | 9 | 10 | ); 11 | }; 12 | 13 | export default ConfigModal; 14 | -------------------------------------------------------------------------------- /src/web/modules/lodash.ts: -------------------------------------------------------------------------------- 1 | import omit from 'lodash/omit'; 2 | import isString from 'lodash/isString'; 3 | import get from 'lodash/get'; 4 | import isEmpty from 'lodash/isEmpty'; 5 | import take from 'lodash/take'; 6 | import takeRight from 'lodash/takeRight'; 7 | import isArray from 'lodash/isArray'; 8 | import debounce from 'lodash/debounce'; 9 | import cloneDeep from 'lodash/cloneDeep'; 10 | 11 | export { omit, isString, get, isEmpty, take, takeRight, isArray, debounce, cloneDeep }; 12 | -------------------------------------------------------------------------------- /static/chrome-dev-tools/common/CharacterIdMap.js: -------------------------------------------------------------------------------- 1 | export class CharacterIdMap{constructor(){this._elementToCharacter=new Map,this._characterToElement=new Map,this._charCode=33}toChar(t){let e=this._elementToCharacter.get(t);if(!e){if(this._charCode>=65535)throw new Error("CharacterIdMap ran out of capacity!");e=String.fromCharCode(this._charCode++),this._elementToCharacter.set(t,e),this._characterToElement.set(e,t)}return e}fromChar(t){const e=this._characterToElement.get(t);return void 0===e?null:e}} -------------------------------------------------------------------------------- /static/chrome-dev-tools/issues/IssueRevealer.js: -------------------------------------------------------------------------------- 1 | import*as Common from"../common/common.js";import*as SDK from"../sdk/sdk.js";import*as UI from"../ui/ui.js";import{IssuesPaneImpl}from"./IssuesPane.js";export class IssueRevealer{async reveal(e){if(!(e instanceof SDK.Issue.Issue))throw new Error("Internal error: not a issue");await UI.ViewManager.ViewManager.instance().showView("issues-pane");const s=UI.ViewManager.ViewManager.instance().view("issues-pane");if(s){(await s.widget()).revealByCode(e.code())}}} -------------------------------------------------------------------------------- /static/chrome-dev-tools/animation/animationScreenshotPopover.css: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015 The Chromium Authors. All rights reserved. 3 | * Use of this source code is governed by a BSD-style license that can be 4 | * found in the LICENSE file. 5 | */ 6 | 7 | img { 8 | max-height: 300px; 9 | border-radius: 2px; 10 | } 11 | 12 | .animation-progress { 13 | position: absolute; 14 | height: 2px; 15 | bottom: 0; 16 | left: 0; 17 | background: var(--selection-bg-color); 18 | } 19 | -------------------------------------------------------------------------------- /static/chrome-dev-tools/browser_debugger/browser_debugger.js: -------------------------------------------------------------------------------- 1 | import*as DOMBreakpointsSidebarPane from"./DOMBreakpointsSidebarPane.js";import*as EventListenerBreakpointsSidebarPane from"./EventListenerBreakpointsSidebarPane.js";import*as ObjectEventListenersSidebarPane from"./ObjectEventListenersSidebarPane.js";import*as XHRBreakpointsSidebarPane from"./XHRBreakpointsSidebarPane.js";export{DOMBreakpointsSidebarPane,EventListenerBreakpointsSidebarPane,ObjectEventListenersSidebarPane,XHRBreakpointsSidebarPane}; -------------------------------------------------------------------------------- /static/chrome-dev-tools/chii_main/module.json: -------------------------------------------------------------------------------- 1 | { 2 | "extensions": [ 3 | { "type": "early-initialization", "className": "ChiiMain.ChiiMain" }, 4 | { 5 | "type": "setting", 6 | "category": "Appearance", 7 | "title": "Disable paused state overlay", 8 | "settingName": "disablePausedStateOverlay", 9 | "settingType": "boolean", 10 | "defaultValue": false 11 | } 12 | ], 13 | "modules": ["chii_main.js", "chii_main-legacy.js", "ChiiMain.js"] 14 | } 15 | -------------------------------------------------------------------------------- /static/chrome-dev-tools/input/inputTimeline.css: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2019 The Chromium Authors. All rights reserved. 3 | * Use of this source code is governed by a BSD-style license that can be 4 | * found in the LICENSE file. 5 | */ 6 | .input-timeline-toolbar-container { 7 | display: flex; 8 | background-color: var(--toolbar-bg-color); 9 | border-bottom: var(--divider-border); 10 | flex: 0 0 auto; 11 | } 12 | 13 | .input-timeline-toolbar { 14 | display: inline-block; 15 | } 16 | -------------------------------------------------------------------------------- /static/chrome-dev-tools/common/Revealer.js: -------------------------------------------------------------------------------- 1 | export class Revealer{reveal(e,r){throw new Error("not implemented")}}export let reveal=function(e,r){return e?self.runtime.allInstances(Revealer,e).then((function(t){const n=[];for(let o=0;o{SDK.SDKModel.TargetManager.instance().createTarget("main",Common.UIString.UIString("Main"),SDK.SDKModel.Type.Frame,null,void 0,!1)},Components.TargetDetachedDialog.TargetDetachedDialog.webSocketConnectionLost)}} -------------------------------------------------------------------------------- /static/chrome-dev-tools/layers/module.json: -------------------------------------------------------------------------------- 1 | { 2 | "extensions": [ 3 | { 4 | "type": "view", 5 | "location": "panel", 6 | "id": "layers", 7 | "title": "Layers", 8 | "order": 100, 9 | "persistence": "closeable", 10 | "className": "Layers.LayersPanel" 11 | } 12 | ], 13 | "dependencies": ["layer_viewer"], 14 | "scripts": [], 15 | "modules": ["layers.js", "layers-legacy.js", "LayerPaintProfilerView.js", "LayerTreeModel.js", "LayersPanel.js"] 16 | } 17 | -------------------------------------------------------------------------------- /static/chrome-dev-tools/timeline/UIDevtoolsController.js: -------------------------------------------------------------------------------- 1 | import{TimelineController}from"./TimelineController.js";import{TimelineUIUtils}from"./TimelineUIUtils.js";import{UIDevtoolsUtils}from"./UIDevtoolsUtils.js";export class UIDevtoolsController extends TimelineController{constructor(e,t){super(e,t),TimelineUIUtils.setEventStylesMap(UIDevtoolsUtils.categorizeEvents()),TimelineUIUtils.setCategories(UIDevtoolsUtils.categories()),TimelineUIUtils.setTimelineMainEventCategories(UIDevtoolsUtils.getMainCategoriesList())}} -------------------------------------------------------------------------------- /src/web/hooks/useUmami.ts: -------------------------------------------------------------------------------- 1 | import { useEffect, useRef } from 'react'; 2 | import { getVersion } from '../modules/bridge'; 3 | 4 | // 上报版本号 5 | export function useUmamiInitReport(isReady: boolean) { 6 | const $hasReport = useRef(false); 7 | useEffect(() => { 8 | if (isReady && !$hasReport.current && (window as any).umami) { 9 | getVersion().then((v: any) => { 10 | $hasReport.current = true; 11 | (window as any).umami(`v${v}`); 12 | }); 13 | } 14 | }, [isReady]); 15 | } 16 | -------------------------------------------------------------------------------- /static/chrome-dev-tools/ui/utils/utils.js: -------------------------------------------------------------------------------- 1 | import{appendStyle}from"./append-style.js";import{createShadowRootWithCoreStyles}from"./create-shadow-root-with-core-styles.js";import{focusChanged}from"./focus-changed.js";import{injectCoreStyles}from"./inject-core-styles.js";import{measuredScrollbarWidth}from"./measured-scrollbar-width.js";import{registerCustomElement}from"./register-custom-element.js";export{appendStyle,createShadowRootWithCoreStyles,focusChanged,injectCoreStyles,measuredScrollbarWidth,registerCustomElement}; -------------------------------------------------------------------------------- /static/chrome-dev-tools/layer_viewer/module.json: -------------------------------------------------------------------------------- 1 | { 2 | "dependencies": ["components", "sdk", "timeline_model", "ui", "perf_ui"], 3 | "scripts": [], 4 | "modules": [ 5 | "layer_viewer.js", 6 | "layer_viewer-legacy.js", 7 | "LayerDetailsView.js", 8 | "LayerTreeOutline.js", 9 | "LayerViewHost.js", 10 | "Layers3DView.js", 11 | "PaintProfilerView.js", 12 | "TransformController.js" 13 | ], 14 | "resources": ["layers3DView.css", "paintProfiler.css", "layerDetailsView.css"] 15 | } 16 | -------------------------------------------------------------------------------- /static/chrome-dev-tools/devices/module.json: -------------------------------------------------------------------------------- 1 | { 2 | "extensions": [ 3 | { 4 | "type": "view", 5 | "location": "drawer-view", 6 | "id": "remote-devices", 7 | "title": "Remote devices", 8 | "persistence": "closeable", 9 | "order": 50, 10 | "className": "Devices.DevicesView", 11 | "tags": "usb, android, mobile" 12 | } 13 | ], 14 | "dependencies": ["platform", "ui", "host", "components"], 15 | "scripts": [], 16 | "modules": ["devices.js", "DevicesView.js"] 17 | } 18 | -------------------------------------------------------------------------------- /static/chrome-dev-tools/ui/dialog.css: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015 The Chromium Authors. All rights reserved. 3 | * Use of this source code is governed by a BSD-style license that can be 4 | * found in the LICENSE file. 5 | */ 6 | 7 | .widget { 8 | box-shadow: var(--drop-shadow); 9 | background: white; 10 | justify-content: flex-start; 11 | align-items: stretch; 12 | display: flex; 13 | } 14 | 15 | .dialog-close-button { 16 | position: absolute; 17 | right: 9px; 18 | top: 9px; 19 | z-index: 1; 20 | } 21 | -------------------------------------------------------------------------------- /src/web/components/Icon/assets/windows.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /static/chrome-dev-tools/profiler/liveHeapProfile.css: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019 The Chromium Authors. All rights reserved. 3 | * Use of this source code is governed by a BSD-style license that can be 4 | * found in the LICENSE file. 5 | */ 6 | 7 | .data-grid { 8 | border: none; 9 | } 10 | 11 | .data-grid td .size-units { 12 | margin-left: 4px; 13 | font-size: 75%; 14 | } 15 | 16 | .data-grid tr:not(.selected) td .size-units { 17 | color: #999; 18 | } 19 | 20 | .toolbar { 21 | border-bottom: 1px solid #ccc; 22 | } 23 | -------------------------------------------------------------------------------- /static/chrome-dev-tools/protocol_client/NodeURL.js: -------------------------------------------------------------------------------- 1 | import*as Common from"../common/common.js";import*as Host from"../host/host.js";export class NodeURL{static patch(t){!function t(o,r){o.url&&NodeURL._isPlatformPath(o.url,Host.Platform.isWin())&&(o.url=Common.ParsedURL.ParsedURL.platformPathToURL(o.url));for(const s of Object.entries(o)){const o=s[0],a=s[1],e=r+"."+o;".result.result.value"!==e&&null!==a&&"object"==typeof a&&t(a,e)}}(t,"")}static _isPlatformPath(t,o){if(o){return/^([a-z]:[\/\\]|\\\\)/i.test(t)}return!!t.length&&"/"===t[0]}} -------------------------------------------------------------------------------- /static/chrome-dev-tools/console_counters/errorWarningCounter.css: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015 The Chromium Authors. All rights reserved. 3 | * Use of this source code is governed by a BSD-style license that can be 4 | * found in the LICENSE file. 5 | */ 6 | 7 | :host { 8 | cursor: pointer; 9 | padding: 0 2px; 10 | min-width: 26px; 11 | } 12 | 13 | :host:hover { 14 | color: #333; 15 | } 16 | 17 | .counter-item { 18 | margin-left: 6px; 19 | } 20 | 21 | .counter-item.counter-item-first { 22 | margin-left: 0; 23 | } 24 | -------------------------------------------------------------------------------- /static/chrome-dev-tools/ui/popover.css: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2017 The Chromium Authors. All rights reserved. 3 | * Use of this source code is governed by a BSD-style license that can be 4 | * found in the LICENSE file. 5 | */ 6 | 7 | .widget { 8 | display: flex; 9 | background: white; 10 | border: 1px solid transparent; 11 | box-shadow: var(--drop-shadow); 12 | border-radius: 2px; 13 | overflow: auto; 14 | user-select: text; 15 | line-height: 11px; 16 | } 17 | 18 | .widget.has-padding { 19 | padding: 6px; 20 | } 21 | -------------------------------------------------------------------------------- /static/chrome-dev-tools/ui/utils/measured-scrollbar-width.js: -------------------------------------------------------------------------------- 1 | let _measuredScrollbarWidth;export function measuredScrollbarWidth(e){if("number"==typeof _measuredScrollbarWidth)return _measuredScrollbarWidth;if(!e)return 16;const t=e.createElement("div"),r=e.createElement("div");return t.setAttribute("style","display: block; width: 100px; height: 100px; overflow: scroll;"),r.setAttribute("style","height: 200px"),t.appendChild(r),e.body.appendChild(t),_measuredScrollbarWidth=t.offsetWidth-t.clientWidth,e.body.removeChild(t),_measuredScrollbarWidth} -------------------------------------------------------------------------------- /static/chrome-dev-tools/common/TextDictionary.js: -------------------------------------------------------------------------------- 1 | import{Trie}from"./Trie.js";export class TextDictionary{constructor(){this._words=new Map,this._index=new Trie}addWord(r){let e=this._words.get(r)||0;++e,this._words.set(r,e),this._index.add(r)}removeWord(r){let e=this._words.get(r)||0;if(e){if(1===e)return this._words.delete(r),void this._index.remove(r);--e,this._words.set(r,e)}}wordsWithPrefix(r){return this._index.words(r)}hasWord(r){return this._words.has(r)}wordCount(r){return this._words.get(r)||0}reset(){this._words.clear(),this._index.clear()}} -------------------------------------------------------------------------------- /static/chrome-dev-tools/web_audio/audioContextSelector.css: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019 The Chromium Authors. All rights reserved. 3 | * Use of this source code is governed by a BSD-style license that can be 4 | * found in the LICENSE file. 5 | */ 6 | 7 | :host { 8 | padding: 2px 1px 2px 2px; 9 | white-space: nowrap; 10 | display: flex; 11 | flex-direction: column; 12 | height: 36px; 13 | justify-content: center; 14 | } 15 | 16 | .title { 17 | overflow: hidden; 18 | text-overflow: ellipsis; 19 | flex-grow: 0; 20 | } 21 | -------------------------------------------------------------------------------- /static/chrome-dev-tools/web_audio/graph_visualizer/NodeRendererUtility.js: -------------------------------------------------------------------------------- 1 | import{AudioParamRadius,InputPortRadius,LeftSideTopPadding,Point,Size,TotalInputPortHeight,TotalOutputPortHeight,TotalParamPortHeight}from"./GraphStyle.js";export const calculateInputPortXY=t=>({x:0,y:InputPortRadius+LeftSideTopPadding+t*TotalInputPortHeight});export const calculateOutputPortXY=(t,o,a)=>{const{width:r,height:i}=o;return{x:r,y:i/2+(2*t-a+1)*TotalOutputPortHeight/2}};export const calculateParamPortXY=(t,o)=>({x:0,y:o+TotalParamPortHeight*(t+1)-AudioParamRadius}); -------------------------------------------------------------------------------- /static/chrome-dev-tools/common/Worker.js: -------------------------------------------------------------------------------- 1 | export class WorkerWrapper{constructor(e){const s=e+".js"+location.search;this._workerPromise=new Promise(e=>{const o=new Worker(s,{type:"module"});o.onmessage=s=>{console.assert("workerReady"===s.data),o.onmessage=null,e(o)}})}postMessage(e){this._workerPromise.then(s=>{this._disposed||s.postMessage(e)})}dispose(){this._disposed=!0,this._workerPromise.then(e=>e.terminate())}terminate(){this.dispose()}set onmessage(e){this._workerPromise.then(s=>s.onmessage=e)}set onerror(e){this._workerPromise.then(s=>s.onerror=e)}} -------------------------------------------------------------------------------- /static/chrome-dev-tools/sources/dialog.css: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015 The Chromium Authors. All rights reserved. 3 | * Use of this source code is governed by a BSD-style license that can be 4 | * found in the LICENSE file. 5 | */ 6 | 7 | :host { 8 | padding: 10px; 9 | } 10 | 11 | .widget { 12 | align-items: center; 13 | } 14 | 15 | label { 16 | white-space: nowrap; 17 | } 18 | 19 | input[type='text'].add-source-map { 20 | box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.2); 21 | font-size: inherit; 22 | margin: 0 8px 0 5px; 23 | } 24 | -------------------------------------------------------------------------------- /static/chrome-dev-tools/ui/inlineButton.css: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2017 The Chromium Authors. All rights reserved. 3 | * Use of this source code is governed by a BSD-style license that can be 4 | * found in the LICENSE file. 5 | */ 6 | 7 | :host { 8 | display: inline-block; 9 | border: 1px solid #ddd; 10 | position: relative; 11 | top: 7px; 12 | margin: 2px; 13 | background-color: var(--toolbar-bg-color); 14 | } 15 | 16 | :host > * { 17 | position: relative; 18 | left: -2px; 19 | width: 28px; 20 | height: 26px; 21 | } 22 | -------------------------------------------------------------------------------- /static/chrome-dev-tools/ui/remoteDebuggingTerminatedScreen.css: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015 The Chromium Authors. All rights reserved. 3 | * Use of this source code is governed by a BSD-style license that can be 4 | * found in the LICENSE file. 5 | */ 6 | 7 | .widget { 8 | padding: 20px; 9 | } 10 | 11 | .message, 12 | .button { 13 | font-size: larger; 14 | white-space: pre; 15 | margin: 5px; 16 | } 17 | 18 | .button { 19 | text-align: center; 20 | margin-top: 10px; 21 | } 22 | 23 | .reason { 24 | color: #8b0000; 25 | } 26 | -------------------------------------------------------------------------------- /src/install.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # 获取当前脚本的完整路径(包含脚本名称) 4 | script_path="$BASH_SOURCE" 5 | 6 | # 获取脚本所在的目录路径 7 | # 使用dirname命令截取最后一个/之前的部分,即脚本所在的目录路径 8 | current_dir=$(dirname "$script_path") 9 | 10 | echo "✔ 当前脚本所在的目录路径为: $current_dir" 11 | 12 | echo "✔ 清理历史版本..." 13 | rm -rf /Applications/bproxy.app 14 | 15 | echo "✔ 移动最新版本到应用程序目录..." 16 | mv "$current_dir/bproxy.app" /Applications 17 | 18 | echo "✔ 信任bproxy.app..." 19 | sudo spctl --master-disable 20 | sudo xattr -d com.apple.quarantine /Applications/bproxy.app 21 | 22 | echo "✔ 安装完成" 23 | -------------------------------------------------------------------------------- /static/chrome-dev-tools/network/binaryResourceView.css: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019 The Chromium Authors. All rights reserved. 3 | * Use of this source code is governed by a BSD-style license that can be 4 | * found in the LICENSE file. 5 | */ 6 | 7 | .panel.network .toolbar.binary-view-toolbar { 8 | border-top: 1px solid #ccc; 9 | border-bottom: 0px; 10 | padding-left: 5px; 11 | } 12 | 13 | .binary-view-copied-text { 14 | opacity: 1; 15 | } 16 | 17 | .binary-view-copied-text.fadeout { 18 | opacity: 0; 19 | transition: opacity 1s; 20 | } 21 | -------------------------------------------------------------------------------- /static/chrome-dev-tools/security/module.json: -------------------------------------------------------------------------------- 1 | { 2 | "extensions": [ 3 | { 4 | "type": "view", 5 | "location": "panel", 6 | "id": "security", 7 | "title": "Security", 8 | "order": 80, 9 | "className": "Security.SecurityPanel" 10 | } 11 | ], 12 | "dependencies": ["network", "platform", "ui", "sdk"], 13 | "scripts": [], 14 | "modules": ["security.js", "security-legacy.js", "SecurityModel.js", "SecurityPanel.js"], 15 | "resources": ["lockIcon.css", "mainView.css", "originView.css", "sidebar.css"] 16 | } 17 | -------------------------------------------------------------------------------- /src/proxy/utils/file.ts: -------------------------------------------------------------------------------- 1 | import * as fs from 'fs'; 2 | import * as path from 'path'; 3 | 4 | // 判断是文件还是目录 5 | export function checkStringIsFileOrPath(str: string, cwd?: string) { 6 | const fp = cwd ? path.resolve(cwd, str) : str; 7 | 8 | try { 9 | fs.accessSync(fp, fs.constants.R_OK); 10 | } catch (err) { 11 | return ''; 12 | } 13 | 14 | const stat = fs.lstatSync(fp); 15 | 16 | if (stat.isFile()) { 17 | return 'file'; 18 | } 19 | 20 | if (stat.isDirectory()) { 21 | return 'path'; 22 | } 23 | 24 | return ''; 25 | } 26 | -------------------------------------------------------------------------------- /static/chrome-dev-tools/perf_ui/timelineOverviewInfo.css: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2017 The Chromium Authors. All rights reserved. 3 | * Use of this source code is governed by a BSD-style license that can be 4 | * found in the LICENSE file. 5 | */ 6 | 7 | .overview-info:not(:empty) { 8 | display: flex; 9 | background: white; 10 | box-shadow: var(--drop-shadow); 11 | padding: 3px; 12 | } 13 | 14 | .overview-info .frame .time { 15 | display: none; 16 | } 17 | 18 | .overview-info .frame .thumbnail img { 19 | max-width: 50vw; 20 | max-height: 50vh; 21 | } 22 | -------------------------------------------------------------------------------- /static/chrome-dev-tools/ui/TargetCrashedScreen.js: -------------------------------------------------------------------------------- 1 | import*as Common from"../common/common.js";import{VBox}from"./Widget.js";export class TargetCrashedScreen extends VBox{constructor(e){super(!0),this.registerRequiredCSS("ui/targetCrashedScreen.css"),this.contentElement.createChild("div","message").textContent=Common.UIString.UIString("DevTools was disconnected from the page."),this.contentElement.createChild("div","message").textContent=Common.UIString.UIString("Once page is reloaded, DevTools will automatically reconnect."),this._hideCallback=e}willHide(){this._hideCallback.call(null)}} -------------------------------------------------------------------------------- /static/chrome-dev-tools/inline_editor/module.json: -------------------------------------------------------------------------------- 1 | { 2 | "dependencies": ["ui"], 3 | "scripts": [], 4 | "modules": [ 5 | "inline_editor.js", 6 | "inline_editor-legacy.js", 7 | "BezierEditor.js", 8 | "BezierUI.js", 9 | "ColorSwatch.js", 10 | "CSSShadowEditor.js", 11 | "SwatchPopoverHelper.js", 12 | "CSSShadowModel.js" 13 | ], 14 | "resources": [ 15 | "bezierEditor.css", 16 | "colorSwatch.css", 17 | "bezierSwatch.css", 18 | "cssShadowSwatch.css", 19 | "cssShadowEditor.css", 20 | "swatchPopover.css" 21 | ] 22 | } 23 | -------------------------------------------------------------------------------- /static/chrome-dev-tools/inspector_main/renderingOptions.css: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015 The Chromium Authors. All rights reserved. 3 | * Use of this source code is governed by a BSD-style license that can be 4 | * found in the LICENSE file. 5 | */ 6 | 7 | :host { 8 | padding: 12px; 9 | } 10 | 11 | [is='dt-checkbox'] { 12 | margin: 0 0 10px 0; 13 | flex: none; 14 | } 15 | 16 | .panel-section-separator { 17 | height: 1px; 18 | margin-bottom: 10px; 19 | background: #f0f0f0; 20 | flex: none; 21 | } 22 | 23 | .chrome-select-label { 24 | margin-bottom: 16px; 25 | } 26 | -------------------------------------------------------------------------------- /static/chrome-dev-tools/ui/confirmDialog.css: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2017 The Chromium Authors. All rights reserved. 3 | * Use of this source code is governed by a BSD-style license that can be 4 | * found in the LICENSE file. 5 | */ 6 | 7 | .widget { 8 | padding: 20px; 9 | } 10 | 11 | .message, 12 | .button { 13 | font-size: larger; 14 | white-space: pre; 15 | margin: 5px; 16 | } 17 | 18 | .button { 19 | text-align: center; 20 | margin-top: 10px; 21 | } 22 | 23 | .button button { 24 | min-width: 80px; 25 | } 26 | 27 | .reason { 28 | color: #8b0000; 29 | } 30 | -------------------------------------------------------------------------------- /src/types/bproxy.d.ts: -------------------------------------------------------------------------------- 1 | declare namespace Bproxy { 2 | interface HandleResponseParams { 3 | req: any; 4 | res: any; 5 | responseHeaders: NormalObject; 6 | requestHeaders: NormalObject; 7 | delayTime?: number; 8 | matcherResult: any; 9 | postBodyData: Buffer | undefined; 10 | postBodyString: string; 11 | config: BproxyConfig.Config; 12 | } 13 | 14 | interface DataSet { 15 | prevConfigPath: string; 16 | currentConfigPath: string; 17 | config: BproxyConfig.Config; 18 | platform: 'bash' | 'app'; 19 | ready: boolean; 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /static/chrome-dev-tools/event_listeners/event_listeners-legacy.js: -------------------------------------------------------------------------------- 1 | import*as EventListenersModule from"./event_listeners.js";self.EventListeners=self.EventListeners||{},EventListeners=EventListeners||{},EventListeners.frameworkEventListeners=EventListenersModule.EventListenersUtils.frameworkEventListeners,EventListeners.EventListenersView=EventListenersModule.EventListenersView.EventListenersView,EventListeners.EventListenersTreeElement=EventListenersModule.EventListenersView.EventListenersTreeElement,EventListeners.ObjectEventListenerBar=EventListenersModule.EventListenersView.ObjectEventListenerBar; -------------------------------------------------------------------------------- /static/chrome-dev-tools/media/playerListView.css: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019 The Chromium Authors. All rights reserved. 3 | * Use of this source code is governed by a BSD-style license that can be 4 | * found in the LICENSE file. 5 | */ 6 | 7 | .tree-outline { 8 | padding-left: 0; 9 | color: rgb(90, 90, 90); 10 | } 11 | 12 | li.storage-group-list-item { 13 | padding: 10px 8px 6px 8px; 14 | } 15 | 16 | li.storage-group-list-item:not(:first-child) { 17 | border-top: 1px solid rgb(230, 230, 230); 18 | } 19 | 20 | li.storage-group-list-item::before { 21 | display: none; 22 | } 23 | -------------------------------------------------------------------------------- /static/chrome-dev-tools/accessibility/accessibilityProperties.css: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2015 The Chromium Authors. All rights reserved. 3 | * Use of this source code is governed by a BSD-style license that can be 4 | * found in the LICENSE file. 5 | */ 6 | 7 | .ax-name { 8 | color: rgb(153, 69, 0); 9 | flex-shrink: 0; 10 | } 11 | 12 | .ax-readable-name { 13 | flex-shrink: 0; 14 | } 15 | 16 | .ax-readable-string { 17 | font-style: italic; 18 | } 19 | 20 | .ax-value-string { 21 | color: rgb(200, 0, 0); 22 | } 23 | 24 | span.ax-internal-role { 25 | font-style: italic; 26 | } 27 | -------------------------------------------------------------------------------- /static/chrome-dev-tools/extensions/ExtensionTraceProvider.js: -------------------------------------------------------------------------------- 1 | export class ExtensionTraceProvider{constructor(e,t,s,i){this._extensionOrigin=e,this._id=t,this._categoryName=s,this._categoryTooltip=i}start(e){const t=String(++_lastSessionId);self.Extensions.extensionServer.startTraceRecording(this._id,t,e)}stop(){self.Extensions.extensionServer.stopTraceRecording(this._id)}shortDisplayName(){return this._categoryName}longDisplayName(){return this._categoryTooltip}persistentIdentifier(){return`${this._extensionOrigin}/${this._categoryName}`}}let _lastSessionId=0;export class TracingSession{complete(e,t){}} -------------------------------------------------------------------------------- /static/chrome-dev-tools/inline_editor/cssShadowSwatch.css: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2016 The Chromium Authors. All rights reserved. 3 | * Use of this source code is governed by a BSD-style license that can be 4 | * found in the LICENSE file. 5 | */ 6 | 7 | :host { 8 | white-space: nowrap; 9 | } 10 | 11 | .shadow-swatch-icon { 12 | position: relative; 13 | margin-left: 1px; 14 | margin-right: 2px; 15 | top: 1px; 16 | user-select: none; 17 | line-height: 10px; 18 | background-color: #9c27b0; 19 | } 20 | 21 | .shadow-swatch-icon:hover { 22 | background-color: #800080; 23 | } 24 | -------------------------------------------------------------------------------- /static/chrome-dev-tools/media/eventDisplayTable.css: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019 The Chromium Authors. All rights reserved. 3 | * Use of this source code is governed by a BSD-style license that can be 4 | * found in the LICENSE file. 5 | */ 6 | 7 | .no-border-top-datagrid > .data-grid { 8 | /* make sure there is no top border, it ruins the menu view */ 9 | border-top: 0px; 10 | } 11 | 12 | .event-display-table-contents-table-container > .widget > .data-grid { 13 | height: 100%; 14 | } 15 | 16 | .data-grid .event-display-table-basic-text-table-entry { 17 | line-height: 26px; 18 | } 19 | -------------------------------------------------------------------------------- /src/web/pages/Home/index.scss: -------------------------------------------------------------------------------- 1 | @import '../../theme.scss'; 2 | 3 | .app { 4 | position: fixed; 5 | top: $appPadding; 6 | left: $appPadding; 7 | right: $appPadding; 8 | bottom: $appPadding; 9 | overflow: hidden; 10 | display: flex; 11 | flex-direction: column; 12 | 13 | .controller { 14 | height: 52px; 15 | } 16 | 17 | .table-box { 18 | flex: 1; 19 | } 20 | } 21 | 22 | .textLimit { 23 | overflow: hidden; 24 | display: -webkit-box; 25 | text-overflow: ellipsis; 26 | -webkit-line-clamp: 1; 27 | -webkit-box-orient: vertical; 28 | padding: 2px 0; 29 | } 30 | -------------------------------------------------------------------------------- /static/chrome-dev-tools/text_editor/autocompleteTooltip.css: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2018 The Chromium Authors. All rights reserved. 3 | * Use of this source code is governed by a BSD-style license that can be 4 | * found in the LICENSE file. 5 | */ 6 | .autocomplete-tooltip { 7 | pointer-events: none; 8 | margin-left: -3px; 9 | } 10 | 11 | .autocomplete-tooltip > div > * { 12 | padding: 0px 4px; 13 | white-space: nowrap; 14 | vertical-align: middle; 15 | line-height: 20px; 16 | box-shadow: var(--drop-shadow); 17 | background-color: #ffffff; 18 | width: fit-content; 19 | } 20 | -------------------------------------------------------------------------------- /static/chrome-dev-tools/ui/ThrottledWidget.js: -------------------------------------------------------------------------------- 1 | import*as Common from"../common/common.js";import{VBox}from"./Widget.js";export class ThrottledWidget extends VBox{constructor(e,t){super(e),this._updateThrottler=new Common.Throttler.Throttler(void 0===t?100:t),this._updateWhenVisible=!1}doUpdate(){return Promise.resolve()}update(){this._updateWhenVisible=!this.isShowing(),this._updateWhenVisible||this._updateThrottler.schedule(function(){if(this.isShowing())return this.doUpdate();return this._updateWhenVisible=!0,Promise.resolve()}.bind(this))}wasShown(){super.wasShown(),this._updateWhenVisible&&this.update()}} -------------------------------------------------------------------------------- /static/chrome-dev-tools/Images/src/logpoint-disabled.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /static/chrome-dev-tools/Images/src/logpoint.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /static/chrome-dev-tools/network/networkWaterfallColumn.css: -------------------------------------------------------------------------------- 1 | /* Copyright 2016 The Chromium Authors. All rights reserved. 2 | * Use of this source code is governed by a BSD-style license that can be 3 | * found in the LICENSE file. 4 | */ 5 | .network-waterfall-v-scroll { 6 | position: absolute; 7 | top: 0; 8 | right: 0; 9 | bottom: 0; 10 | overflow-x: hidden; 11 | margin-top: 31px; 12 | z-index: 200; 13 | } 14 | 15 | .network-waterfall-v-scroll.small { 16 | margin-top: 27px; 17 | } 18 | 19 | .network-waterfall-v-scroll-content { 20 | width: 15px; 21 | pointer-events: none; 22 | } 23 | -------------------------------------------------------------------------------- /static/chrome-dev-tools/ui/EmptyWidget.js: -------------------------------------------------------------------------------- 1 | import{VBox}from"./Widget.js";import{XLink}from"./XLink.js";export class EmptyWidget extends VBox{constructor(t){super(),this.registerRequiredCSS("ui/emptyWidget.css"),this.element.classList.add("empty-view-scroller"),this._contentElement=this.element.createChild("div","empty-view"),this._textElement=this._contentElement.createChild("div","empty-bold-text"),this._textElement.textContent=t}appendParagraph(){return this._contentElement.createChild("p")}appendLink(t){return this._contentElement.appendChild(XLink.create(t,"Learn more"))}set text(t){this._textElement.textContent=t}} -------------------------------------------------------------------------------- /src/utils/http.ts: -------------------------------------------------------------------------------- 1 | export const createHttpHeader = (line, headers) => { 2 | return ( 3 | Object.keys(headers) 4 | .reduce( 5 | function (head, key) { 6 | const value = headers[key]; 7 | 8 | if (!Array.isArray(value)) { 9 | head.push(key + ': ' + value); 10 | return head; 11 | } 12 | 13 | for (let i = 0; i < value.length; i++) { 14 | head.push(key + ': ' + value[i]); 15 | } 16 | return head; 17 | }, 18 | [line], 19 | ) 20 | .join('\r\n') + '\r\n\r\n' 21 | ); 22 | }; 23 | -------------------------------------------------------------------------------- /static/chrome-dev-tools/elements/PropertiesWidget.js: -------------------------------------------------------------------------------- 1 | import*as UI from"../ui/ui.js";export class PropertiesWidget extends UI.ThrottledWidget.ThrottledWidget{constructor(){super(!0),this.update()}async doUpdate(){const e=this.contentElement.createChild("span");e.style.padding="5px",e.append(UI.UIUtils.formatLocalized("This panel has been deprecated in favor of executing the following in the console:",[]));const t=document.createElement("pre");t.style.userSelect="all",t.innerText="console.dir($0)",e.append(t),e.append(UI.UIUtils.formatLocalized("($0 is a reference to the currently selected DOM node in the elements tree.)",[]))}} -------------------------------------------------------------------------------- /static/chrome-dev-tools/inline_editor/bezierSwatch.css: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2016 The Chromium Authors. All rights reserved. 3 | * Use of this source code is governed by a BSD-style license that can be 4 | * found in the LICENSE file. 5 | */ 6 | 7 | :host { 8 | white-space: nowrap; 9 | } 10 | 11 | .bezier-swatch-icon { 12 | position: relative; 13 | margin-left: 1px; 14 | margin-right: 2px; 15 | top: 1px; 16 | user-select: none; 17 | line-height: 10px; 18 | background-color: #9c27b0; 19 | cursor: default; 20 | } 21 | 22 | .bezier-swatch-icon:hover { 23 | background-color: #800080; 24 | } 25 | -------------------------------------------------------------------------------- /static/chrome-dev-tools/object_ui/customPreviewComponent.css: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015 The Chromium Authors. All rights reserved. 3 | * Use of this source code is governed by a BSD-style license that can be 4 | * found in the LICENSE file. 5 | */ 6 | 7 | .custom-expandable-section { 8 | display: inline-flex; 9 | flex-direction: column; 10 | } 11 | 12 | .custom-expand-icon { 13 | user-select: none; 14 | opacity: 0.5; 15 | margin-right: 4px; 16 | margin-bottom: -2px; 17 | background: black; 18 | } 19 | 20 | .custom-expandable-section-standard-section { 21 | display: inline-flex; 22 | } 23 | -------------------------------------------------------------------------------- /static/chrome-dev-tools/text_utils/ContentProvider.js: -------------------------------------------------------------------------------- 1 | import*as Common from"../common/common.js";export class ContentProvider{contentURL(){throw new Error("not implemented")}contentType(){throw new Error("not implemented")}contentEncoded(){throw new Error("not implemented")}requestContent(){throw new Error("not implemented")}searchInContent(t,e,n){throw new Error("not implemented")}}export class SearchMatch{constructor(t,e){this.lineNumber=t,this.lineContent=e}}export const contentAsDataURL=function(t,e,n,o){return null==t||t.length>1048576?null:"data:"+e+(o?";charset="+o:"")+(n?";base64":"")+","+t};export let DeferredContent; -------------------------------------------------------------------------------- /static/chrome-dev-tools/layer_viewer/layers3DView.css: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2016 The Chromium Authors. All rights reserved. 3 | * Use of this source code is governed by a BSD-style license that can be 4 | * found in the LICENSE file. 5 | */ 6 | 7 | .layers-3d-view { 8 | overflow: hidden; 9 | user-select: none; 10 | } 11 | 12 | .toolbar { 13 | background-color: var(--toolbar-bg-color); 14 | border-bottom: var(--divider-border); 15 | } 16 | 17 | canvas { 18 | flex: 1 1; 19 | } 20 | 21 | .layers-3d-view > canvas[data-keyboard-focus='true']:focus { 22 | outline: auto 5px -webkit-focus-ring-color; 23 | } 24 | -------------------------------------------------------------------------------- /static/chrome-dev-tools/timeline/CLSLinkifier.js: -------------------------------------------------------------------------------- 1 | import*as Common from"../common/common.js";import*as SDK from"../sdk/sdk.js";export class CLSRect{constructor([e,t,o,i]){this.x=e,this.y=t,this.width=o,this.height=i,this.color={r:238,g:111,b:99,a:.4},this.outlineColor={r:238,g:111,b:99,a:.7}}}export class Linkifier{linkify(e,t){const o=document.createElement("span"),i=e,{x:r,y:s,width:l,height:n}=i;return o.textContent=`Location: [${r},${s}], Size: [${l}x${n}]`,o.addEventListener("mouseover",()=>SDK.OverlayModel.OverlayModel.highlightRect(i)),o.addEventListener("mouseleave",()=>SDK.OverlayModel.OverlayModel.clearHighlight()),o}} -------------------------------------------------------------------------------- /src/types/http.d.ts: -------------------------------------------------------------------------------- 1 | namespace BproxyHTTP { 2 | interface InvokeRequestParams { 3 | matched?: boolean; 4 | url?: string; 5 | method?: string; 6 | requestHeaders?: object; 7 | requestId: string; 8 | requestBody?: string; 9 | responseHeaders?: object; 10 | responseBody?: Buffer | Int8Array | Uint8Array | string; 11 | statusCode?: number; 12 | ip?: string; 13 | } 14 | 15 | interface WebInvokeParams { 16 | type: string; 17 | params: { [key: string]: any }; 18 | id: string; 19 | } 20 | 21 | interface RequestHeaders { 22 | [key: string]: string; 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /src/web/components/ViewAll/index.tsx: -------------------------------------------------------------------------------- 1 | import React, { useState } from 'react'; 2 | import { shorthand } from '../../modules/util'; 3 | import { Tooltip } from '../UI'; 4 | 5 | export default function ViewAll(props: { limit?: number; children: string; tooltip?: boolean }) { 6 | const { children, limit, tooltip } = props; 7 | const [showAll, setShowAll] = useState(false); 8 | const max = limit || 30; 9 | const onClick = () => { 10 | setShowAll((pre) => !pre); 11 | }; 12 | 13 | return {showAll ? children : shorthand(children, parseInt(`${max / 2}`, 10), max)}; 14 | } 15 | -------------------------------------------------------------------------------- /src/web/components/Settings/index.scss: -------------------------------------------------------------------------------- 1 | @import '../../theme.scss'; 2 | 3 | .dialog-settings { 4 | max-height: 60vh; 5 | 6 | .tools-tags { 7 | .ant-tag { 8 | cursor: pointer; 9 | margin: 5px 5px 0 0; 10 | padding: 5px 10px; 11 | border-radius: 100px; 12 | } 13 | } 14 | 15 | .helpTips { 16 | a, 17 | .bp-icon { 18 | color: $iconColor; 19 | fill: $iconColor; 20 | } 21 | } 22 | 23 | .configFilePath { 24 | color: #1abc9c; 25 | &Value { 26 | font-style: italic; 27 | } 28 | } 29 | 30 | .version { 31 | font-size: 18px; 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /src/web/pages/SyncClipboard/index.scss: -------------------------------------------------------------------------------- 1 | .SyncClipboard { 2 | background-color: #000; 3 | color: #fff; 4 | display: flex; 5 | align-items: center; 6 | flex-direction: column; 7 | position: absolute; 8 | top: 0; 9 | left: 0; 10 | right: 0; 11 | bottom: 0; 12 | justify-content: center; 13 | 14 | .showText { 15 | font-size: 20px; 16 | color: #ccc; 17 | outline: none; 18 | &:active, 19 | &:focus { 20 | color: green; 21 | } 22 | } 23 | 24 | div { 25 | color: #666; 26 | margin-top: 50px; 27 | &:last-child { 28 | margin-top: 10px; 29 | } 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /static/chrome-dev-tools/inspector_main/nodeIcon.css: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2017 The Chromium Authors. All rights reserved. 3 | * Use of this source code is governed by a BSD-style license that can be 4 | * found in the LICENSE file. 5 | */ 6 | 7 | .node-icon { 8 | width: 28px; 9 | height: 26px; 10 | background-image: url(Images/nodeIcon.png); 11 | background-size: 17px 17px; 12 | background-repeat: no-repeat; 13 | background-position: center; 14 | opacity: 0.8; 15 | cursor: auto; 16 | } 17 | 18 | .node-icon:hover { 19 | opacity: 1; 20 | } 21 | 22 | .node-icon.inactive { 23 | filter: grayscale(100%); 24 | } 25 | -------------------------------------------------------------------------------- /static/chrome-dev-tools/media/mediaView.css: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2019 The Chromium Authors. All rights reserved. 3 | * Use of this source code is governed by a BSD-style license that can be 4 | * found in the LICENSE file. 5 | */ 6 | 7 | .playerlist-sidebar { 8 | display: flex; 9 | flex-direction: column; 10 | align-items: stretch; 11 | } 12 | 13 | .playerlist-sidebar-header { 14 | font-size: 22px; 15 | padding: 8px 20px; 16 | border-bottom: 1px solid var(--divider-color); 17 | } 18 | 19 | .playerlist-entry-title > pre { 20 | margin: 0px; 21 | } 22 | 23 | .playerlist-entry-title { 24 | float: left; 25 | } 26 | -------------------------------------------------------------------------------- /static/chrome-dev-tools/resources/clearStorageView.css: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2016 The Chromium Authors. All rights reserved. 3 | * Use of this source code is governed by a BSD-style license that can be 4 | * found in the LICENSE file. 5 | */ 6 | 7 | .report-row { 8 | display: flex; 9 | align-items: center; 10 | } 11 | 12 | .clear-storage-button .report-row { 13 | margin: 0 0 0 17px; 14 | display: flex; 15 | } 16 | 17 | .link { 18 | margin-left: 10px; 19 | display: none; 20 | } 21 | 22 | .report-row:hover .link { 23 | display: inline; 24 | } 25 | 26 | .usage-breakdown-row { 27 | min-width: fit-content; 28 | } 29 | -------------------------------------------------------------------------------- /static/chrome-dev-tools/elements/domLinkifier.css: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2018 The Chromium Authors. All rights reserved. 3 | * Use of this source code is governed by a BSD-style license that can be 4 | * found in the LICENSE file. 5 | */ 6 | 7 | :host { 8 | display: inline; 9 | } 10 | 11 | .node-link { 12 | cursor: pointer; 13 | display: inline; 14 | pointer-events: auto; 15 | } 16 | 17 | .node-link[data-keyboard-focus='true']:focus { 18 | outline-width: unset; 19 | } 20 | 21 | .node-label-name { 22 | color: rgb(136, 18, 128); 23 | } 24 | 25 | .node-label-class, 26 | .node-label-pseudo { 27 | color: rgb(153, 69, 0); 28 | } 29 | -------------------------------------------------------------------------------- /static/chrome-dev-tools/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /static/chrome-dev-tools/layer_viewer/layer_viewer.js: -------------------------------------------------------------------------------- 1 | import"./LayerDetailsView.js";import"./LayerTreeOutline.js";import"./LayerViewHost.js";import"./Layers3DView.js";import"./PaintProfilerView.js";import"./TransformController.js";import*as LayerDetailsView from"./LayerDetailsView.js";import*as Layers3DView from"./Layers3DView.js";import*as LayerTreeOutline from"./LayerTreeOutline.js";import*as LayerViewHost from"./LayerViewHost.js";import*as PaintProfilerView from"./PaintProfilerView.js";import*as TransformController from"./TransformController.js";export{LayerDetailsView,Layers3DView,LayerTreeOutline,LayerViewHost,PaintProfilerView,TransformController}; -------------------------------------------------------------------------------- /src/web/components/Icon/assets/check.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /static/chrome-dev-tools/components/imagePreview.css: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2017 The Chromium Authors. All rights reserved. 3 | * Use of this source code is governed by a BSD-style license that can be 4 | * found in the LICENSE file. 5 | */ 6 | 7 | .image-preview-container { 8 | background: transparent; 9 | text-align: center; 10 | border-spacing: 0; 11 | } 12 | 13 | .image-preview-container img { 14 | margin: 2px auto; 15 | max-width: 100px; 16 | max-height: 100px; 17 | background-image: url(Images/checker.png); 18 | user-select: text; 19 | -webkit-user-drag: auto; 20 | } 21 | 22 | .image-container { 23 | padding: 0; 24 | } 25 | -------------------------------------------------------------------------------- /static/chrome-dev-tools/object_ui/object_ui.js: -------------------------------------------------------------------------------- 1 | import*as CustomPreviewComponent from"./CustomPreviewComponent.js";import*as JavaScriptAutocomplete from"./JavaScriptAutocomplete.js";import*as JavaScriptREPL from"./JavaScriptREPL.js";import*as ObjectPopoverHelper from"./ObjectPopoverHelper.js";import*as ObjectPropertiesSection from"./ObjectPropertiesSection.js";import*as RemoteObjectPreviewFormatter from"./RemoteObjectPreviewFormatter.js";export{CustomPreviewComponent,JavaScriptAutocomplete,JavaScriptREPL,ObjectPopoverHelper,ObjectPropertiesSection,RemoteObjectPreviewFormatter};export const javaScriptAutocomplete=new JavaScriptAutocomplete.JavaScriptAutocomplete; -------------------------------------------------------------------------------- /static/chrome-dev-tools/issues/issuesPane.css: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2020 The Chromium Authors. All rights reserved. 3 | * Use of this source code is governed by a BSD-style license that can be 4 | * found in the LICENSE file. 5 | */ 6 | 7 | .issues-pane { 8 | overflow: hidden; 9 | } 10 | 11 | .issues-toolbar-container { 12 | display: flex; 13 | flex: none; 14 | } 15 | 16 | .issues-toolbar-container > .toolbar { 17 | background-color: var(--toolbar-bg-color); 18 | border-bottom: var(--divider-border); 19 | } 20 | 21 | .issues-toolbar-left { 22 | flex: 1 1 auto; 23 | } 24 | 25 | .issues-toolbar-right { 26 | padding-right: 6px; 27 | } 28 | -------------------------------------------------------------------------------- /static/chrome-dev-tools/source_frame/imageView.css: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2014 The Chromium Authors. All rights reserved. 3 | * Use of this source code is governed by a BSD-style license that can be 4 | * found in the LICENSE file. 5 | */ 6 | 7 | .image-view { 8 | overflow: auto; 9 | } 10 | 11 | .image-view > .image { 12 | padding: 20px 20px 10px 20px; 13 | text-align: center; 14 | } 15 | 16 | .image-view img.resource-image-view { 17 | max-width: 100%; 18 | max-height: 1000px; 19 | background-image: url(Images/checker.png); 20 | box-shadow: 0 5px 10px rgba(0, 0, 0, 0.5); 21 | user-select: text; 22 | -webkit-user-drag: auto; 23 | } 24 | -------------------------------------------------------------------------------- /static/chrome-dev-tools/workspace_diff/workspace_diff-legacy.js: -------------------------------------------------------------------------------- 1 | import*as WorkspaceDiffModule from"./workspace_diff.js";self.WorkspaceDiff=self.WorkspaceDiff||{},WorkspaceDiff=WorkspaceDiff||{},WorkspaceDiff.WorkspaceDiff=WorkspaceDiffModule.WorkspaceDiff.WorkspaceDiffImpl,WorkspaceDiff.WorkspaceDiff.UISourceCodeDiff=WorkspaceDiffModule.WorkspaceDiff.UISourceCodeDiff,WorkspaceDiff.WorkspaceDiff.UpdateTimeout=WorkspaceDiffModule.WorkspaceDiff.UpdateTimeout,WorkspaceDiff.Events=WorkspaceDiffModule.WorkspaceDiff.Events,WorkspaceDiff.workspaceDiff=WorkspaceDiffModule.WorkspaceDiff.workspaceDiff,WorkspaceDiff.DiffUILocation=WorkspaceDiffModule.WorkspaceDiff.DiffUILocation; -------------------------------------------------------------------------------- /static/chrome-dev-tools/network/RequestHTMLView.js: -------------------------------------------------------------------------------- 1 | import*as UI from"../ui/ui.js";export class RequestHTMLView extends UI.Widget.VBox{constructor(e){super(!0),this.registerRequiredCSS("network/requestHTMLView.css"),this._dataURL=encodeURI(e).replace(/#/g,"%23"),this.contentElement.classList.add("html","request-view")}wasShown(){this._createIFrame()}willHide(){this.contentElement.removeChildren()}_createIFrame(){this.contentElement.removeChildren();const e=createElement("iframe");e.className="html-preview-frame",e.setAttribute("sandbox",""),e.setAttribute("src",this._dataURL),e.setAttribute("tabIndex",-1),UI.ARIAUtils.markAsPresentation(e),this.contentElement.appendChild(e)}} -------------------------------------------------------------------------------- /static/chrome-dev-tools/protocol_monitor/module.json: -------------------------------------------------------------------------------- 1 | { 2 | "extensions": [ 3 | { 4 | "type": "view", 5 | "location": "drawer-view", 6 | "id": "protocol-monitor", 7 | "title": "Protocol monitor", 8 | "order": 100, 9 | "persistence": "closeable", 10 | "className": "ProtocolMonitor.ProtocolMonitor", 11 | "experiment": "protocolMonitor" 12 | } 13 | ], 14 | "dependencies": ["platform", "ui", "host", "components", "data_grid", "source_frame"], 15 | "scripts": [], 16 | "modules": ["protocol_monitor.js", "protocol_monitor-legacy.js", "ProtocolMonitor.js"], 17 | "resources": ["protocolMonitor.css"] 18 | } 19 | -------------------------------------------------------------------------------- /static/chrome-dev-tools/performance_monitor/module.json: -------------------------------------------------------------------------------- 1 | { 2 | "extensions": [ 3 | { 4 | "type": "view", 5 | "location": "drawer-view", 6 | "id": "performance.monitor", 7 | "title": "Performance monitor", 8 | "persistence": "closeable", 9 | "order": 100, 10 | "className": "PerformanceMonitor.PerformanceMonitor", 11 | "tags": "performance, system monitor, monitor, activity, metrics" 12 | } 13 | ], 14 | "dependencies": ["sdk", "ui"], 15 | "scripts": [], 16 | "modules": ["performance_monitor.js", "performance_monitor-legacy.js", "PerformanceMonitor.js"], 17 | "resources": ["performanceMonitor.css"] 18 | } 19 | -------------------------------------------------------------------------------- /static/chrome-dev-tools/root.js: -------------------------------------------------------------------------------- 1 | import"./RuntimeInstantiator.js";import"./platform/platform.js";import"./dom_extension/dom_extension.js";import"./common/common-legacy.js";import"./host/host-legacy.js";import"./protocol_client/protocol_client-legacy.js";import"./sdk/sdk-legacy.js";import"./ui/ui-legacy.js";import"./services/services-legacy.js";import"./workspace/workspace-legacy.js";import"./bindings/bindings-legacy.js";import"./components/components-legacy.js";import"./persistence/persistence-legacy.js";import"./browser_sdk/browser_sdk-legacy.js";import"./extensions/extensions-legacy.js";import"./console_counters/console_counters-legacy.js";import"./text_utils/text_utils-legacy.js"; -------------------------------------------------------------------------------- /static/chrome-dev-tools/text_utils/TextCursor.js: -------------------------------------------------------------------------------- 1 | export class TextCursor{constructor(e){this._lineEndings=e,this._offset=0,this._lineNumber=0,this._columnNumber=0}advance(e){for(this._offset=e;this._lineNumberthis.select(e))}select(t){if(this._selected!==t){this._selected=t;for(const t of this._buttons.keys())this._buttons.get(t).classList.toggle("segmented-button-segment-selected",t===this._selected)}}selected(){return this._selected}} -------------------------------------------------------------------------------- /src/web/modules/interactive.ts: -------------------------------------------------------------------------------- 1 | const win: any = window; 2 | 3 | export const getClipboardData = () => { 4 | return new Promise((resolve, reject) => { 5 | navigator.clipboard 6 | ?.readText() 7 | .then((text) => { 8 | resolve(text); 9 | }) 10 | .catch((err) => { 11 | reject(err); 12 | }); 13 | }); 14 | }; 15 | 16 | export const setInputValue = (el, value) => { 17 | (Object as any).getOwnPropertyDescriptor(HTMLInputElement.prototype, 'value').set.call(el, value); 18 | el.dispatchEvent(new Event('input', { bubbles: true })); 19 | }; 20 | 21 | export const openUrl = (url: string): void => { 22 | window.open(url); 23 | }; 24 | -------------------------------------------------------------------------------- /static/chrome-dev-tools/layer_viewer/layerDetailsView.css: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2016 The Chromium Authors. All rights reserved. 3 | * Use of this source code is governed by a BSD-style license that can be 4 | * found in the LICENSE file. 5 | */ 6 | 7 | table td { 8 | padding-left: 8px; 9 | } 10 | 11 | table td:first-child { 12 | font-weight: bold; 13 | } 14 | 15 | .scroll-rect.active { 16 | background-color: rgba(100, 100, 100, 0.2); 17 | } 18 | 19 | ul { 20 | list-style: none; 21 | padding-inline-start: 0; 22 | margin-block-start: 0; 23 | margin-block-end: 0; 24 | } 25 | 26 | .devtools-link.link-margin { 27 | margin: 8px; 28 | display: inline-block; 29 | } 30 | -------------------------------------------------------------------------------- /static/chrome-dev-tools/accessibility/accessibility.js: -------------------------------------------------------------------------------- 1 | import*as AccessibilityModel from"./AccessibilityModel.js";import*as AccessibilityNodeView from"./AccessibilityNodeView.js";import*as AccessibilitySidebarView from"./AccessibilitySidebarView.js";import*as AccessibilityStrings from"./AccessibilityStrings.js";import*as AccessibilitySubPane from"./AccessibilitySubPane.js";import*as ARIAAttributesView from"./ARIAAttributesView.js";import*as ARIAMetadata from"./ARIAMetadata.js";import*as AXBreadcrumbsPane from"./AXBreadcrumbsPane.js";export{AccessibilityModel,AccessibilityNodeView,AccessibilitySidebarView,AccessibilityStrings,AccessibilitySubPane,ARIAAttributesView,ARIAMetadata,AXBreadcrumbsPane}; -------------------------------------------------------------------------------- /.eslintignore: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | parser: '@typescript-eslint/parser', 3 | extends: ['plugin:@typescript-eslint/recommended'], 4 | plugins: ['@typescript-eslint'], 5 | env:{ 6 | browser: true, 7 | node: true, 8 | }, 9 | parserOptions: { 10 | ecmaFeatures: { 11 | "experimentalDecorators": true, 12 | } 13 | }, 14 | rules: { 15 | '@typescript-eslint/no-empty-function': 0, 16 | '@typescript-eslint/explicit-function-return-type': 0, 17 | '@typescript-eslint/no-explicit-any': 0, 18 | '@typescript-eslint/no-var-requires': 0, 19 | 't@typescript-eslint/no-unused-vars': 0, 20 | '@typescript-eslint/no-unused-vars': 0, 21 | }, 22 | } 23 | -------------------------------------------------------------------------------- /.eslintrc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | parser: '@typescript-eslint/parser', 3 | extends: ['plugin:@typescript-eslint/recommended'], 4 | plugins: ['@typescript-eslint'], 5 | env:{ 6 | browser: true, 7 | node: true, 8 | }, 9 | parserOptions: { 10 | ecmaFeatures: { 11 | "experimentalDecorators": true, 12 | } 13 | }, 14 | rules: { 15 | '@typescript-eslint/no-empty-function': 0, 16 | '@typescript-eslint/explicit-function-return-type': 0, 17 | '@typescript-eslint/no-explicit-any': 0, 18 | '@typescript-eslint/no-var-requires': 0, 19 | 't@typescript-eslint/no-unused-vars': 0, 20 | '@typescript-eslint/no-unused-vars': 0, 21 | }, 22 | } 23 | -------------------------------------------------------------------------------- /static/chrome-dev-tools/network/requestHeadersView.css: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2014 The Chromium Authors. All rights reserved. 3 | * Use of this source code is governed by a BSD-style license that can be 4 | * found in the LICENSE file. 5 | */ 6 | 7 | .request-headers-view { 8 | user-select: text; 9 | overflow: auto; 10 | } 11 | 12 | .resource-status-image { 13 | margin-top: -2px; 14 | margin-right: 3px; 15 | } 16 | 17 | .request-headers-tree { 18 | flex-grow: 1; 19 | overflow-y: auto; 20 | margin: 0; 21 | } 22 | 23 | .header-decode-error { 24 | color: red; 25 | } 26 | 27 | .-theme-with-dark-background .header-decode-error { 28 | color: hsl(0, 100%, 65%); 29 | } 30 | -------------------------------------------------------------------------------- /src/web/modules/copy.ts: -------------------------------------------------------------------------------- 1 | import { message } from '../components/UI'; 2 | 3 | export const copy = (text: string) => { 4 | const invokeCopy = (textToCopy: string) => { 5 | const tempTextArea = document.createElement("textarea"); 6 | tempTextArea.value = textToCopy; 7 | tempTextArea.style.cssText = `position: absolute; top: -9999px; left: -9999px;`; 8 | document.body.appendChild(tempTextArea); 9 | 10 | tempTextArea.select(); 11 | document.execCommand("copy"); 12 | document.body.removeChild(tempTextArea); 13 | } 14 | invokeCopy(text); 15 | }; 16 | 17 | // 点击复制文本 18 | export const copyText = (e, text) => { 19 | copy(text); 20 | message.success('已复制'); 21 | }; 22 | -------------------------------------------------------------------------------- /static/chrome-dev-tools/media/media.js: -------------------------------------------------------------------------------- 1 | import"./ChevronTabbedPanel.js";import"./EventDisplayTable.js";import"./MainView.js";import"./MediaModel.js";import"./PlayerDetailView.js";import"./PlayerListView.js";import"./PlayerPropertiesView.js";import*as ChevronTabbedPanel from"./ChevronTabbedPanel.js";import*as PlayerEventsView from"./EventDisplayTable.js";import*as MainView from"./MainView.js";import*as MediaModel from"./MediaModel.js";import*as PlayerDetailView from"./PlayerDetailView.js";import*as PlayerListView from"./PlayerListView.js";import*as PlayerPropertiesView from"./PlayerPropertiesView.js";export{ChevronTabbedPanel,PlayerEventsView,MainView,MediaModel,PlayerDetailView,PlayerListView,PlayerPropertiesView}; -------------------------------------------------------------------------------- /static/chrome-dev-tools/source_frame/source_frame.js: -------------------------------------------------------------------------------- 1 | import*as BinaryResourceViewFactory from"./BinaryResourceViewFactory.js";import*as FontView from"./FontView.js";import*as ImageView from"./ImageView.js";import*as JSONView from"./JSONView.js";import*as PreviewFactory from"./PreviewFactory.js";import*as ResourceSourceFrame from"./ResourceSourceFrame.js";import*as SourceCodeDiff from"./SourceCodeDiff.js";import*as SourceFrame from"./SourceFrame.js";import*as SourcesTextEditor from"./SourcesTextEditor.js";import*as XMLView from"./XMLView.js";export let Transformer;export{BinaryResourceViewFactory,FontView,ImageView,JSONView,PreviewFactory,ResourceSourceFrame,SourceCodeDiff,SourceFrame,SourcesTextEditor,XMLView}; -------------------------------------------------------------------------------- /static/chrome-dev-tools/ui/inspectorViewTabbedPane.css: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2015 The Chromium Authors. All rights reserved. 3 | * Use of this source code is governed by a BSD-style license that can be 4 | * found in the LICENSE file. 5 | */ 6 | 7 | .tabbed-pane-header-tab, 8 | .tabbed-pane-header-tab.selected { 9 | height: 26px; 10 | margin: 0; 11 | border: none; 12 | border-left: 2px solid transparent; 13 | border-right: 2px solid transparent; 14 | } 15 | 16 | .tabbed-pane-header-tab.selected { 17 | border-width: 0 2px 0 2px; 18 | } 19 | 20 | .tabbed-pane-header-contents { 21 | margin-left: 0; 22 | } 23 | 24 | .tabbed-pane-left-toolbar { 25 | margin-right: 0 !important; 26 | } 27 | -------------------------------------------------------------------------------- /static/chrome-dev-tools/source_frame/messagesPopover.css: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2017 The Chromium Authors. All rights reserved. 3 | * Use of this source code is governed by a BSD-style license that can be 4 | * found in the LICENSE file. 5 | */ 6 | 7 | .text-editor-messages-description-container { 8 | display: inline-block; 9 | } 10 | 11 | .text-editor-row-message:first-child { 12 | border-top-width: 0; 13 | } 14 | 15 | .text-editor-row-message { 16 | line-height: 1.2; 17 | white-space: nowrap; 18 | display: flex; 19 | align-items: center; 20 | justify-content: flex-start; 21 | margin-top: 2px; 22 | } 23 | 24 | .text-editor-row-message-repeat-count { 25 | margin-right: 0.5em; 26 | } 27 | -------------------------------------------------------------------------------- /static/chrome-dev-tools/ui/dropTarget.css: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015 The Chromium Authors. All rights reserved. 3 | * Use of this source code is governed by a BSD-style license that can be 4 | * found in the LICENSE file. 5 | */ 6 | 7 | :host { 8 | position: absolute; 9 | top: 0; 10 | bottom: 0; 11 | left: 0; 12 | right: 0; 13 | display: flex; 14 | background-color: rgba(255, 255, 255, 0.8); 15 | z-index: 1000; 16 | } 17 | 18 | .drop-target-message { 19 | flex: auto; 20 | font-size: 30px; 21 | color: #999; 22 | display: flex; 23 | justify-content: center; 24 | align-items: center; 25 | margin: 20px; 26 | border: 4px dashed #ddd; 27 | pointer-events: none; 28 | } 29 | -------------------------------------------------------------------------------- /static/chrome-dev-tools/devices/DevicesView.js: -------------------------------------------------------------------------------- 1 | import*as SDK from"../sdk/sdk.js";import*as UI from"../ui/ui.js";Devices.DevicesView=class extends UI.Widget.VBox{constructor(){super(!0);const e=this.contentElement.createChild("span"),t=UI.Fragment.html`chrome://inspect/#devices`;self.onInvokeElement(t,e=>{SDK.SDKModel.TargetManager.instance().mainTarget().pageAgent().navigate("chrome://inspect/#devices"),e.consume(!0)}),e.style.padding="5px",e.appendChild(UI.UIUtils.formatLocalized("This panel has been deprecated in favor of the %s interface, which has equivalent functionality.",[t])),this.setDefaultFocusedElement(t)}}; -------------------------------------------------------------------------------- /static/chrome-dev-tools/settings/settings-legacy.js: -------------------------------------------------------------------------------- 1 | import*as SettingsModule from"./settings.js";self.Settings=self.Settings||{},Settings=Settings||{},Settings.FrameworkBlackboxSettingsTab=SettingsModule.FrameworkBlackboxSettingsTab.FrameworkBlackboxSettingsTab,Settings.SettingsScreen=SettingsModule.SettingsScreen.SettingsScreen,Settings.SettingsScreen.ActionDelegate=SettingsModule.SettingsScreen.ActionDelegate,Settings.SettingsScreen.Revealer=SettingsModule.SettingsScreen.Revealer,Settings.GenericSettingsTab=SettingsModule.SettingsScreen.GenericSettingsTab,Settings.ExperimentsSettingsTab=SettingsModule.SettingsScreen.ExperimentsSettingsTab,Settings.KeybindsSettingsTab=SettingsModule.KeybindsSettingsTab.KeybindsSettingsTab; -------------------------------------------------------------------------------- /static/chrome-dev-tools/text_editor/module.json: -------------------------------------------------------------------------------- 1 | { 2 | "extensions": [ 3 | { 4 | "type": "@TextUtils.TokenizerFactory", 5 | "className": "TextEditor.CodeMirrorUtils.TokenizerFactory" 6 | }, 7 | { 8 | "type": "@UI.TextEditorFactory", 9 | "className": "TextEditor.CodeMirrorTextEditorFactory" 10 | } 11 | ], 12 | "dependencies": ["ui", "platform", "common", "cm", "cm_web_modes"], 13 | "scripts": [], 14 | "modules": [ 15 | "text_editor.js", 16 | "text_editor-legacy.js", 17 | "CodeMirrorUtils.js", 18 | "TextEditorAutocompleteController.js", 19 | "CodeMirrorTextEditor.js" 20 | ], 21 | "resources": ["autocompleteTooltip.css", "cmdevtools.css"] 22 | } 23 | -------------------------------------------------------------------------------- /static/chrome-dev-tools/text_utils/StaticContentProvider.js: -------------------------------------------------------------------------------- 1 | import*as Common from"../common/common.js";import{ContentProvider,DeferredContent,SearchMatch}from"./ContentProvider.js";import{performSearchInContent}from"./TextUtils.js";export class StaticContentProvider{constructor(t,n,e){this._contentURL=t,this._contentType=n,this._lazyContent=e}static fromString(t,n,e){return new StaticContentProvider(t,n,()=>Promise.resolve({content:e,isEncoded:!1}))}contentURL(){return this._contentURL}contentType(){return this._contentType}contentEncoded(){return Promise.resolve(!1)}requestContent(){return this._lazyContent()}async searchInContent(t,n,e){const{content:o}=await this._lazyContent();return o?performSearchInContent(o,t,n,e):[]}} -------------------------------------------------------------------------------- /static/chrome-dev-tools/sources/OpenFileQuickOpen.js: -------------------------------------------------------------------------------- 1 | import*as Common from"../common/common.js";import*as Host from"../host/host.js";import*as Workspace from"../workspace/workspace.js";import{FilteredUISourceCodeListProvider}from"./FilteredUISourceCodeListProvider.js";import{SourcesView}from"./SourcesView.js";export class OpenFileQuickOpen extends FilteredUISourceCodeListProvider{attach(){this.setDefaultScores(SourcesView.defaultUISourceCodeScores()),super.attach()}uiSourceCodeSelected(e,o,r){Host.userMetrics.actionTaken(Host.UserMetrics.Action.SelectFileFromFilePicker),e&&("number"==typeof o?Common.Revealer.reveal(e.uiLocation(o,r)):Common.Revealer.reveal(e))}filterProject(e){return!e.isServiceProject()}renderAsTwoRows(){return!0}} -------------------------------------------------------------------------------- /static/chrome-dev-tools/formatter_worker/module.json: -------------------------------------------------------------------------------- 1 | { 2 | "dependencies": ["platform", "text_utils", "cm_headless", "cm_web_modes"], 3 | "scripts": [], 4 | "modules": [ 5 | "formatter_worker.js", 6 | "formatter_worker-legacy.js", 7 | "ESTreeWalker.js", 8 | "FormatterWorker.js", 9 | "acorn/acorn.js", 10 | "acorn/acorn_loose.js", 11 | "CSSFormatter.js", 12 | "AcornTokenizer.js", 13 | "JavaScriptFormatter.js", 14 | "FormattedContentBuilder.js", 15 | "CSSRuleParser.js", 16 | "HTMLFormatter.js", 17 | "IdentityFormatter.js", 18 | "JavaScriptOutline.js", 19 | "RelaxedJSONParser.js" 20 | ], 21 | "skip_compilation": ["acorn/acorn.js", "acorn/acorn_loose.js"] 22 | } 23 | -------------------------------------------------------------------------------- /static/chrome-dev-tools/snippets/snippets-legacy.js: -------------------------------------------------------------------------------- 1 | import*as Workspace from"../workspace/workspace.js";import*as SnippetsModule from"./snippets.js";self.Snippets=self.Snippets||{},Snippets=Snippets||{},Snippets.evaluateScriptSnippet=SnippetsModule.ScriptSnippetFileSystem.evaluateScriptSnippet,Snippets.isSnippetsUISourceCode=SnippetsModule.ScriptSnippetFileSystem.isSnippetsUISourceCode,Snippets.isSnippetsProject=SnippetsModule.ScriptSnippetFileSystem.isSnippetsProject,Snippets.project=Workspace.Workspace.WorkspaceImpl.instance().projectsForType(Workspace.Workspace.projectTypes.FileSystem).find(p=>"snippets"===Persistence.FileSystemWorkspaceBinding.fileSystemType(p)),Snippets.SnippetsQuickOpen=SnippetsModule.SnippetsQuickOpen.SnippetsQuickOpen; -------------------------------------------------------------------------------- /src/web/components/Icon/assets/close.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /static/chrome-dev-tools/Images/accelerometer-back.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /static/chrome-dev-tools/animation/module.json: -------------------------------------------------------------------------------- 1 | { 2 | "extensions": [ 3 | { 4 | "type": "view", 5 | "location": "drawer-view", 6 | "id": "animations", 7 | "title": "Animations", 8 | "persistence": "closeable", 9 | "order": 0, 10 | "className": "Animation.AnimationTimeline" 11 | } 12 | ], 13 | "dependencies": ["elements"], 14 | "scripts": [], 15 | "modules": [ 16 | "animation.js", 17 | "animation-legacy.js", 18 | "AnimationModel.js", 19 | "AnimationGroupPreviewUI.js", 20 | "AnimationScreenshotPopover.js", 21 | "AnimationTimeline.js", 22 | "AnimationUI.js" 23 | ], 24 | "resources": ["animationScreenshotPopover.css", "animationTimeline.css"] 25 | } 26 | -------------------------------------------------------------------------------- /static/chrome-dev-tools/animation/animation-legacy.js: -------------------------------------------------------------------------------- 1 | import*as AnimationModule from"./animation.js";self.Animation=self.Animation||{},Animation=Animation||{},Animation.AnimationModel=AnimationModule.AnimationModel.AnimationModel,Animation.AnimationModel.Events=AnimationModule.AnimationModel.Events,Animation.AnimationModel.Animation=AnimationModule.AnimationModel.AnimationImpl,Animation.AnimationModel.AnimationGroup=AnimationModule.AnimationModel.AnimationGroup,Animation.AnimationModel.ScreenshotCapture=AnimationModule.AnimationModel.ScreenshotCapture,Animation.AnimationTimeline=AnimationModule.AnimationTimeline.AnimationTimeline,Animation.AnimationUI=AnimationModule.AnimationUI.AnimationUI,Animation.AnimationUI.Events=AnimationModule.AnimationUI.Events; -------------------------------------------------------------------------------- /static/chrome-dev-tools/css_overview/cssOverviewStartView.css: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2019 The Chromium Authors. All rights reserved. 3 | * Use of this source code is governed by a BSD-style license that can be 4 | * found in the LICENSE file. 5 | */ 6 | 7 | .overview-start-view { 8 | overflow: hidden; 9 | padding: 16px; 10 | justify-content: center; 11 | align-items: center; 12 | height: 100%; 13 | } 14 | 15 | .overview-start-view h1 { 16 | font-size: 16px; 17 | text-align: center; 18 | font-weight: normal; 19 | margin: 0; 20 | padding: 8px; 21 | } 22 | 23 | .overview-start-view div { 24 | font-size: 12px; 25 | text-align: center; 26 | font-weight: normal; 27 | margin: 0; 28 | padding-bottom: 44px; 29 | } 30 | -------------------------------------------------------------------------------- /static/chrome-dev-tools/elements/elementStatePaneWidget.css: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2017 The Chromium Authors. All rights reserved. 3 | * Use of this source code is governed by a BSD-style license that can be 4 | * found in the LICENSE file. 5 | */ 6 | 7 | .styles-element-state-pane { 8 | overflow: hidden; 9 | padding-left: 2px; 10 | background-color: var(--toolbar-bg-color); 11 | border-bottom: 1px solid rgb(189, 189, 189); 12 | margin-top: 0; 13 | padding-bottom: 2px; 14 | } 15 | 16 | .styles-element-state-pane > div { 17 | margin: 8px 4px 6px; 18 | } 19 | 20 | .styles-element-state-pane > table { 21 | width: 100%; 22 | border-spacing: 0; 23 | } 24 | 25 | .styles-element-state-pane td { 26 | padding: 0; 27 | } 28 | -------------------------------------------------------------------------------- /static/chrome-dev-tools/protocol_monitor/protocolMonitor.css: -------------------------------------------------------------------------------- 1 | .data-grid { 2 | border: none; 3 | } 4 | .data-grid { 5 | flex: auto; 6 | border: none; 7 | } 8 | 9 | .data-grid .data { 10 | background-image: none; 11 | } 12 | 13 | .data-grid td { 14 | /* border-bottom: 1px solid #ccc; */ 15 | border-left-color: #ccc; 16 | } 17 | 18 | .data-grid tr.selected { 19 | background-color: #def; 20 | } 21 | 22 | .data-grid th { 23 | border-left-color: #ccc; 24 | } 25 | 26 | .protocol-message-sent { 27 | background-color: hsl(281, 64%, 95%); 28 | } 29 | 30 | .protocol-monitor-toolbar { 31 | border-bottom: var(--divider-border); 32 | } 33 | 34 | .error { 35 | background-color: hsl(0, 100%, 97%); 36 | color: red; 37 | } 38 | -------------------------------------------------------------------------------- /static/chrome-dev-tools/ui/RootView.js: -------------------------------------------------------------------------------- 1 | import{VBox}from"./Widget.js";import{ZoomManager}from"./ZoomManager.js";export class RootView extends VBox{constructor(){super(),this.markAsRoot(),this.element.classList.add("root-view"),this.registerRequiredCSS("ui/rootView.css"),this.element.setAttribute("spellcheck",!1)}attachToDocument(t){t.defaultView.addEventListener("resize",this.doResize.bind(this),!1),this._window=t.defaultView,this.doResize(),this.show(t.body)}doResize(){if(this._window){const t=this.constraints().minimum,e=ZoomManager.instance().zoomFactor(),i=Math.min(0,this._window.innerWidth-t.width/e);this.element.style.marginRight=i+"px";const s=Math.min(0,this._window.innerHeight-t.height/e);this.element.style.marginBottom=s+"px"}super.doResize()}} -------------------------------------------------------------------------------- /static/chrome-dev-tools/sources/SnippetsPlugin.js: -------------------------------------------------------------------------------- 1 | import*as Common from"../common/common.js";import*as Host from"../host/host.js";import*as Snippets from"../snippets/snippets.js";import*as SourceFrame from"../source_frame/source_frame.js";import*as UI from"../ui/ui.js";import*as Workspace from"../workspace/workspace.js";import{Plugin}from"./Plugin.js";export class SnippetsPlugin extends Plugin{constructor(o,t){super(),this._textEditor=o,this._uiSourceCode=t}static accepts(o){return Snippets.ScriptSnippetFileSystem.isSnippetsUISourceCode(o)}async rightToolbarItems(){const o=UI.Toolbar.Toolbar.createActionButtonForId("debugger.run-snippet");return o.setText(Host.Platform.isMac()?Common.UIString.UIString("⌘+Enter"):Common.UIString.UIString("Ctrl+Enter")),[o]}} -------------------------------------------------------------------------------- /static/chrome-dev-tools/sources/scopeChainSidebarPane.css: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2017 The Chromium Authors. All rights reserved. 3 | * Use of this source code is governed by a BSD-style license that can be 4 | * found in the LICENSE file. 5 | */ 6 | 7 | .scope-chain-sidebar-pane-section-header { 8 | flex: auto; 9 | } 10 | 11 | .scope-chain-sidebar-pane-section-subtitle { 12 | float: right; 13 | margin-left: 5px; 14 | max-width: 55%; 15 | text-overflow: ellipsis; 16 | overflow: hidden; 17 | } 18 | 19 | .scope-chain-sidebar-pane-section-title { 20 | font-weight: normal; 21 | word-wrap: break-word; 22 | white-space: normal; 23 | } 24 | 25 | .scope-chain-sidebar-pane-section { 26 | padding: 2px 4px; 27 | flex: none; 28 | } 29 | -------------------------------------------------------------------------------- /static/chrome-dev-tools/timeline/invalidationsTree.css: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2015 The Chromium Authors. All rights reserved. 3 | * Use of this source code is governed by a BSD-style license that can be 4 | * found in the LICENSE file. 5 | */ 6 | 7 | .header, 8 | .children, 9 | .content { 10 | min-height: initial; 11 | line-height: initial; 12 | } 13 | 14 | /* This TreeElement is always expanded and has no arrow. */ 15 | /* FIXME(crbug.com/475618): Implement this in TreeElement. */ 16 | .children li::before { 17 | display: none; 18 | } 19 | 20 | .content { 21 | margin-bottom: 4px; 22 | } 23 | 24 | .content .stack-preview-container { 25 | margin-left: 8px; 26 | } 27 | 28 | .content .node-list { 29 | margin-left: 10px; 30 | } 31 | -------------------------------------------------------------------------------- /static/chrome-dev-tools/timeline/timelinePaintProfiler.css: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2016 The Chromium Authors. All rights reserved. 3 | * Use of this source code is governed by a BSD-style license that can be 4 | * found in the LICENSE file. 5 | */ 6 | 7 | .paint-profiler-image-view { 8 | overflow: hidden; 9 | } 10 | 11 | .paint-profiler-image-view .paint-profiler-image-container { 12 | -webkit-transform-origin: 0 0; 13 | } 14 | 15 | .paint-profiler-image-view .paint-profiler-image-container div { 16 | border-color: rgba(100, 100, 100, 0.4); 17 | border-style: solid; 18 | z-index: 100; 19 | position: absolute; 20 | top: 0; 21 | left: 0; 22 | } 23 | 24 | .paint-profiler-image-view img { 25 | border: solid 1px black; 26 | } 27 | -------------------------------------------------------------------------------- /src/proxy/system/os.ts: -------------------------------------------------------------------------------- 1 | import os from 'os'; 2 | import { exec } from 'child_process'; 3 | import logger from '../logger'; 4 | 5 | // 获取系统名称 6 | export const getOsName = () => { 7 | return os.platform(); 8 | }; 9 | 10 | // 获取计算机用户名 11 | export const getComputerName = () => { 12 | return process.env.USER || process.env.LOGNAME || os.hostname().replace(/\.\w+/g, ''); 13 | }; 14 | 15 | // 是否是mac系统 16 | export function isMac() { 17 | const osName = getOsName(); 18 | 19 | return osName === 'darwin'; 20 | } 21 | 22 | // 复制到剪切板 23 | export function updateClipboard(str: string) { 24 | logger.info('复制到剪切板', str); 25 | if (isMac()) { 26 | exec('pbcopy').stdin?.end(str); 27 | } else { 28 | exec('clip').stdin?.end(str); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /static/chrome-dev-tools/css_overview/CSSOverviewStartView.js: -------------------------------------------------------------------------------- 1 | import*as UI from"../ui/ui.js";import{Events}from"./CSSOverviewController.js";export class CSSOverviewStartView extends UI.Widget.Widget{constructor(e){super(),this.registerRequiredCSS("css_overview/cssOverviewStartView.css"),this._controller=e,this._render()}_render(){const e=UI.UIUtils.createTextButton(ls`Capture overview`,()=>this._controller.dispatchEventToListeners(Events.RequestOverviewStart),"",!0);this.setDefaultFocusedElement(e);const t=UI.Fragment.Fragment.build` 2 |
3 |

${ls`CSS Overview`}

4 |
${e}
5 |
6 | `;this.contentElement.appendChild(t.element()),this.contentElement.style.overflow="auto"}} -------------------------------------------------------------------------------- /static/chrome-dev-tools/perf_ui/perf_ui.js: -------------------------------------------------------------------------------- 1 | import*as ChartViewport from"./ChartViewport.js";import*as FilmStripView from"./FilmStripView.js";import*as FlameChart from"./FlameChart.js";import*as GCActionDelegate from"./GCActionDelegate.js";import*as LineLevelProfile from"./LineLevelProfile.js";import*as LiveHeapProfile from"./LiveHeapProfile.js";import*as NetworkPriorities from"./NetworkPriorities.js";import*as OverviewGrid from"./OverviewGrid.js";import*as PieChart from"./PieChart.js";import*as TimelineGrid from"./TimelineGrid.js";import*as TimelineOverviewPane from"./TimelineOverviewPane.js";export{ChartViewport,FilmStripView,FlameChart,GCActionDelegate,LineLevelProfile,LiveHeapProfile,NetworkPriorities,OverviewGrid,PieChart,TimelineGrid,TimelineOverviewPane}; -------------------------------------------------------------------------------- /static/chrome-dev-tools/accessibility/ARIAMetadata.js: -------------------------------------------------------------------------------- 1 | import*as ARIAProperties from"../generated/ARIAProperties.js";export class ARIAMetadata{constructor(t){this._attributes=new Map,t&&this._initialize(t)}_initialize(t){const e=t.attributes,a=["true","false"];for(const t of e)"boolean"===t.type&&(t.enum=a),this._attributes.set(t.name,new Attribute(t));this._roleNames=t.roles.map(t=>t.name)}valuesForProperty(t){return this._attributes.has(t)?this._attributes.get(t).getEnum():"role"===t?this._roleNames:[]}}export function ariaMetadata(){return ARIAMetadata._instance||(ARIAMetadata._instance=new ARIAMetadata(ARIAProperties.config||null)),ARIAMetadata._instance}export class Attribute{constructor(t){this._enum=[],"enum"in t&&(this._enum=t.enum)}getEnum(){return this._enum}} -------------------------------------------------------------------------------- /static/chrome-dev-tools/quick_open/HelpQuickOpen.js: -------------------------------------------------------------------------------- 1 | import{Provider}from"./FilteredListWidget.js";import{QuickOpenImpl}from"./QuickOpen.js";export class HelpQuickOpen extends Provider{constructor(){super(),this._providers=[],self.runtime.extensions(Provider).forEach(this._addProvider.bind(this))}_addProvider(e){e.title()&&this._providers.push({prefix:e.descriptor().prefix,title:e.title()})}itemCount(){return this._providers.length}itemKeyAt(e){return this._providers[e].prefix}itemScoreAt(e,r){return-this._providers[e].prefix.length}renderItem(e,r,t,i){const s=this._providers[e];t.createChild("span","monospace").textContent=(s.prefix||"…")+" ",t.createTextChild(s.title)}selectItem(e,r){null!==e&&QuickOpenImpl.show(this._providers[e].prefix)}renderAsTwoRows(){return!1}} -------------------------------------------------------------------------------- /src/web/components/ShowError/index.scss: -------------------------------------------------------------------------------- 1 | .showPageError { 2 | padding: 20px; 3 | font-size: 18px; 4 | overflow: hidden; 5 | 6 | h4 { 7 | font-size: 34px; 8 | text-align: center; 9 | padding: 50px; 10 | color: red; 11 | } 12 | 13 | pre { 14 | word-wrap: break-word; 15 | word-break: break-all; 16 | white-space: pre-wrap; 17 | color: #666; 18 | overflow: auto; 19 | } 20 | 21 | .error-resolve { 22 | text-align: center; 23 | padding-top: 30px; 24 | } 25 | 26 | button { 27 | background-color: bisque; 28 | padding: 15px 20px; 29 | border: none; 30 | border-radius: 10px; 31 | color: #333; 32 | cursor: pointer; 33 | font-size: 28px; 34 | outline: none; 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /static/chrome-dev-tools/emulation/deviceModeToolbar.css: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2015 The Chromium Authors. All rights reserved. 3 | * Use of this source code is governed by a BSD-style license that can be 4 | * found in the LICENSE file. 5 | */ 6 | 7 | .device-mode-size-input { 8 | width: 41px; 9 | max-height: 18px; 10 | margin: 0 2px; 11 | text-align: center; 12 | } 13 | 14 | .device-mode-size-input:focus::-webkit-input-placeholder { 15 | color: transparent; 16 | } 17 | 18 | .device-mode-size-input:disabled { 19 | background: transparent; 20 | user-select: none; 21 | opacity: 0.6; 22 | } 23 | 24 | .device-mode-x { 25 | margin: 0 1px; 26 | font-size: 16px; 27 | } 28 | 29 | .device-mode-empty-toolbar-element { 30 | width: 0; 31 | } 32 | -------------------------------------------------------------------------------- /static/chrome-dev-tools/object_ui/module.json: -------------------------------------------------------------------------------- 1 | { 2 | "extensions": [ 3 | { 4 | "type": "@UI.Renderer", 5 | "contextTypes": ["SDK.RemoteObject"], 6 | "className": "ObjectUI.ObjectPropertiesSection.Renderer" 7 | } 8 | ], 9 | "dependencies": ["ui", "sdk", "components", "formatter"], 10 | "scripts": [], 11 | "modules": [ 12 | "object_ui.js", 13 | "object_ui-legacy.js", 14 | "CustomPreviewComponent.js", 15 | "ObjectPopoverHelper.js", 16 | "ObjectPropertiesSection.js", 17 | "JavaScriptAutocomplete.js", 18 | "JavaScriptREPL.js", 19 | "RemoteObjectPreviewFormatter.js" 20 | ], 21 | "resources": ["customPreviewComponent.css", "objectPopover.css", "objectPropertiesSection.css", "objectValue.css"] 22 | } 23 | -------------------------------------------------------------------------------- /static/chrome-dev-tools/ui/ForwardedInputEventHandler.js: -------------------------------------------------------------------------------- 1 | import*as Common from"../common/common.js";import*as Host from"../host/host.js";import{KeyboardShortcut}from"./KeyboardShortcut.js";import{ForwardedShortcut}from"./ShortcutRegistry.js";export class ForwardedInputEventHandler{constructor(){Host.InspectorFrontendHost.InspectorFrontendHostInstance.events.addEventListener(Host.InspectorFrontendHostAPI.Events.KeyEventUnhandled,this._onKeyEventUnhandled,this)}_onKeyEventUnhandled(t){const o=t.data,e=o.type,r=o.key,n=o.keyCode,s=o.modifiers;"keydown"===e&&(self.UI.context.setFlavor(ForwardedShortcut,ForwardedShortcut.instance),self.UI.shortcutRegistry.handleKey(KeyboardShortcut.makeKey(n,s),r),self.UI.context.setFlavor(ForwardedShortcut,null))}}new ForwardedInputEventHandler; -------------------------------------------------------------------------------- /static/chrome-dev-tools/extensions/extensions-legacy.js: -------------------------------------------------------------------------------- 1 | import*as ExtensionsModule from"./extensions.js";self.Extensions=self.Extensions||{},Extensions=Extensions||{},Extensions.extensionAPI={},ExtensionsModule.ExtensionAPI.defineCommonExtensionSymbols(Extensions.extensionAPI),Extensions.ExtensionSidebarPane=ExtensionsModule.ExtensionPanel.ExtensionSidebarPane,Extensions.ExtensionServer=ExtensionsModule.ExtensionServer.ExtensionServer,Extensions.ExtensionServer.Events=ExtensionsModule.ExtensionServer.Events,Extensions.ExtensionStatus=ExtensionsModule.ExtensionServer.ExtensionStatus,Extensions.ExtensionTraceProvider=ExtensionsModule.ExtensionTraceProvider.ExtensionTraceProvider,Extensions.TracingSession=ExtensionsModule.ExtensionTraceProvider.TracingSession,self.Extensions.extensionServer; -------------------------------------------------------------------------------- /static/chrome-dev-tools/mobile_throttling/mobile_throttling.js: -------------------------------------------------------------------------------- 1 | import"./ThrottlingPresets.js";import"./MobileThrottlingSelector.js";import"./NetworkPanelIndicator.js";import"./NetworkThrottlingSelector.js";import"./ThrottlingSettingsTab.js";import"./ThrottlingManager.js";import*as MobileThrottlingSelector from"./MobileThrottlingSelector.js";import*as NetworkPanelIndicator from"./NetworkPanelIndicator.js";import*as NetworkThrottlingSelector from"./NetworkThrottlingSelector.js";import*as ThrottlingManager from"./ThrottlingManager.js";import*as ThrottlingPresets from"./ThrottlingPresets.js";import*as ThrottlingSettingsTab from"./ThrottlingSettingsTab.js";export{MobileThrottlingSelector,NetworkPanelIndicator,NetworkThrottlingSelector,ThrottlingManager,ThrottlingPresets,ThrottlingSettingsTab}; -------------------------------------------------------------------------------- /static/chrome-dev-tools/timeline_model/timeline_model.js: -------------------------------------------------------------------------------- 1 | import"./TimelineModelFilter.js";import"./TracingLayerTree.js";import"./TimelineModel.js";import"./TimelineIRModel.js";import"./TimelineJSProfile.js";import"./TimelineFrameModel.js";import"./TimelineProfileTree.js";import*as TimelineFrameModel from"./TimelineFrameModel.js";import*as TimelineIRModel from"./TimelineIRModel.js";import*as TimelineJSProfile from"./TimelineJSProfile.js";import*as TimelineModel from"./TimelineModel.js";import*as TimelineModelFilter from"./TimelineModelFilter.js";import*as TimelineProfileTree from"./TimelineProfileTree.js";import*as TracingLayerTree from"./TracingLayerTree.js";export{TimelineFrameModel,TimelineIRModel,TimelineJSProfile,TimelineModel,TimelineModelFilter,TimelineProfileTree,TracingLayerTree}; -------------------------------------------------------------------------------- /src/utils/constant.ts: -------------------------------------------------------------------------------- 1 | export const IS_REG_URL = /(https?|wss?):\/\//; 2 | 3 | export const LOCAL_STORAGE_SHOE_INSTALL_CERT = 'bproxy-tips-install-cert'; 4 | 5 | export const GUIDE_HOME = 'https://www.duelpeak.com/pages/bproxy'; 6 | 7 | export const GUIDE_HOME_TIPS = '说明书'; 8 | 9 | export const GUIDE_INSTALL_CERTIFICATE = 'https://www.yuque.com/zobor/bo4kgc/txy5nz'; 10 | 11 | export const GUIDE_INSTALL_CERTIFICATE_TIPS = '新手指引:<安装证书>'; 12 | 13 | export const GUIDE_QA_SAFARI_NO_DEBUG = 'https://www.yuque.com/zobor/bo4kgc/yxogg7#NCM8e'; 14 | 15 | export const GUIDE_QA_SAFARI_NO_DEBUG_TIPS = '新手指引:'; 16 | 17 | export const GUIDE_CHANGELOG = 'https://www.duelpeak.com/pages/bproxy'; 18 | 19 | export const USER_TOOLS = 'https://www.hahahehe.cn/tools/'; 20 | -------------------------------------------------------------------------------- /src/web/pages/Home/TextSearch.scss: -------------------------------------------------------------------------------- 1 | .text-search { 2 | position: fixed; 3 | top: 0; 4 | left: 0; 5 | width: 100vw; 6 | height: 100vh; 7 | z-index: 100; 8 | 9 | &-mask { 10 | background-color: rgba(0, 0, 255, 0.2); 11 | background-color: rgba(26, 188, 156, 0.9); 12 | position: absolute; 13 | top: 0; 14 | left: 0; 15 | width: 100%; 16 | height: 100%; 17 | } 18 | 19 | > input { 20 | border: none; 21 | position: absolute; 22 | width: 400px; 23 | padding: 10px 20px; 24 | border-radius: 30px; 25 | top: 200px; 26 | left: 50%; 27 | transform: translateX(-50%); 28 | font-weight: bold; 29 | outline: none; 30 | font-size: 18px; 31 | color: pink; 32 | color: rgb(231, 76, 60); 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /src/web/pages/LogViewer/index.tsx: -------------------------------------------------------------------------------- 1 | import React, { useEffect, useState } from 'react'; 2 | import { getLogContent } from '../../modules/bridge'; 3 | import './index.scss'; 4 | 5 | export default () => { 6 | const [logString, setLog] = useState(''); 7 | useEffect(() => { 8 | setTimeout(() => { 9 | getLogContent().then((rs: any) => { 10 | setLog(rs.split(/\n/).reverse().slice(0, 200).join('\n')); 11 | }); 12 | }, 500); 13 | }, []); 14 | return ( 15 |
16 |

log viewer

17 |
18 | 19 |
{logString.slice(0, 2048 * 10).replace(//g, '>')}
20 |
21 |
22 |
23 | ); 24 | }; 25 | -------------------------------------------------------------------------------- /static/chrome-dev-tools/timeline/timelineFlamechartPopover.css: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015 The Chromium Authors. All rights reserved. 3 | * Use of this source code is governed by a BSD-style license that can be 4 | * found in the LICENSE file. 5 | */ 6 | 7 | .timeline-flamechart-popover { 8 | overflow: hidden; 9 | } 10 | 11 | .timeline-flamechart-popover span { 12 | margin-right: 5px; 13 | } 14 | 15 | .timeline-flamechart-popover span.timeline-info-network-time { 16 | color: #009; 17 | } 18 | 19 | .timeline-flamechart-popover span.timeline-info-time { 20 | color: #282; 21 | } 22 | 23 | .timeline-flamechart-popover span.timeline-info-warning { 24 | color: #e44; 25 | } 26 | 27 | .timeline-flamechart-popover span.timeline-info-warning * { 28 | color: inherit; 29 | } 30 | -------------------------------------------------------------------------------- /static/chrome-dev-tools/common/module.json: -------------------------------------------------------------------------------- 1 | { 2 | "dependencies": ["platform"], 3 | "modules": [ 4 | "common.js", 5 | "common-legacy.js", 6 | "EventTarget.js", 7 | "Object.js", 8 | "Worker.js", 9 | "TextDictionary.js", 10 | "Color.js", 11 | "Console.js", 12 | "ParsedURL.js", 13 | "Progress.js", 14 | "UIString.js", 15 | "ResourceType.js", 16 | "Settings.js", 17 | "SegmentedRange.js", 18 | "Throttler.js", 19 | "Trie.js", 20 | "Revealer.js", 21 | "App.js", 22 | "AppProvider.js", 23 | "JavaScriptMetaData.js", 24 | "Linkifier.js", 25 | "QueryParamHandler.js", 26 | "Revealer.js", 27 | "Runnable.js", 28 | "StringOutputStream.js", 29 | "CharacterIdMap.js" 30 | ], 31 | "scripts": [] 32 | } 33 | -------------------------------------------------------------------------------- /static/chrome-dev-tools/inspector_main/inspector_main-legacy.js: -------------------------------------------------------------------------------- 1 | import*as InspectorMainModule from"./inspector_main.js";self.InspectorMain=self.InspectorMain||{},InspectorMain=InspectorMain||{},InspectorMain.InspectorMain=InspectorMainModule.InspectorMain.InspectorMainImpl,InspectorMain.ReloadActionDelegate=InspectorMainModule.InspectorMain.ReloadActionDelegate,InspectorMain.FocusDebuggeeActionDelegate=InspectorMainModule.InspectorMain.FocusDebuggeeActionDelegate,InspectorMain.NodeIndicator=InspectorMainModule.InspectorMain.NodeIndicator,InspectorMain.SourcesPanelIndicator=InspectorMainModule.InspectorMain.SourcesPanelIndicator,InspectorMain.BackendSettingsSync=InspectorMainModule.InspectorMain.BackendSettingsSync,InspectorMain.RenderingOptionsView=InspectorMainModule.RenderingOptions.RenderingOptionsView; -------------------------------------------------------------------------------- /static/chrome-dev-tools/sdk/CompilerSourceMappingContentProvider.js: -------------------------------------------------------------------------------- 1 | import*as Common from"../common/common.js";import*as TextUtils from"../text_utils/text_utils.js";export class CompilerSourceMappingContentProvider{constructor(t,e){this._sourceURL=t,this._contentType=e}contentURL(){return this._sourceURL}contentType(){return this._contentType}contentEncoded(){return Promise.resolve(!1)}requestContent(){return new Promise(t=>{self.SDK.multitargetNetworkManager.loadResource(this._sourceURL,(e,o,n,r)=>{if(e)t({content:n,isEncoded:!1});else{const e=ls`Could not load content for ${this._sourceURL} (${r.message})`;console.error(e),t({error:e,isEncoded:!1})}})})}async searchInContent(t,e,o){const{content:n}=await this.requestContent();return"string"!=typeof n?[]:TextUtils.TextUtils.performSearchInContent(n,t,e,o)}} -------------------------------------------------------------------------------- /static/chrome-dev-tools/ui/emptyWidget.css: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015 The Chromium Authors. All rights reserved. 3 | * Use of this source code is governed by a BSD-style license that can be 4 | * found in the LICENSE file. 5 | */ 6 | 7 | .empty-bold-text { 8 | display: block; 9 | font-size: 1.5em; 10 | margin: 0.83em 0 0.83em; 11 | font-weight: bold; 12 | } 13 | 14 | .empty-view { 15 | color: hsla(0, 0%, 43%, 1); 16 | padding: 30px; 17 | display: flex; 18 | align-items: center; 19 | flex-direction: column; 20 | min-width: 70px; 21 | } 22 | 23 | .empty-view-scroller { 24 | justify-content: center; 25 | overflow: auto; 26 | } 27 | 28 | .empty-view p { 29 | white-space: initial; 30 | line-height: 18px; 31 | max-width: 300px; 32 | flex-shrink: 0; 33 | } 34 | -------------------------------------------------------------------------------- /static/chrome-dev-tools/ui/utils/focus-changed.js: -------------------------------------------------------------------------------- 1 | function WidgetfocusWidgetForNode(e){for(;e&&!e.__widget;)e=e.parentNodeOrShadowHost();if(!e)return;let t=e.__widget;for(;t._parentWidget;)t._parentWidget._defaultFocusedChild=t,t=t._parentWidget}function XWidgetfocusWidgetForNode(e){e=e&&e.parentNodeOrShadowHost();let t=null;for(;e;)e instanceof self.XWidget&&(t&&(e._defaultFocusedElement=t),t=e),e=e.parentNodeOrShadowHost()}export function focusChanged(e){const t=e.target&&e.target.ownerDocument,o=t?t.deepActiveElement():null;WidgetfocusWidgetForNode(o),XWidgetfocusWidgetForNode(o),UI._keyboardFocus&&markAsFocusedByKeyboard(o)}export function markAsFocusedByKeyboard(e){e.setAttribute("data-keyboard-focus","true"),e.addEventListener("blur",()=>e.removeAttribute("data-keyboard-focus"),{once:!0,capture:!0})} -------------------------------------------------------------------------------- /static/chrome-dev-tools/browser_sdk/module.json: -------------------------------------------------------------------------------- 1 | { 2 | "extensions": [ 3 | { 4 | "type": "setting", 5 | "category": "Network", 6 | "title": "Preserve log", 7 | "settingName": "network_log.preserve-log", 8 | "settingType": "boolean", 9 | "defaultValue": false, 10 | "tags": "preserve, clear, reset", 11 | "options": [ 12 | { 13 | "value": true, 14 | "title": "Do not preserve log on page reload / navigation" 15 | }, 16 | { 17 | "value": false, 18 | "title": "Preserve log on page reload / navigation" 19 | } 20 | ] 21 | } 22 | ], 23 | "scripts": [], 24 | "modules": ["browser_sdk.js", "browser_sdk-legacy.js", "LogManager.js"], 25 | "dependencies": ["sdk"] 26 | } 27 | -------------------------------------------------------------------------------- /static/chrome-dev-tools/cm/module.json: -------------------------------------------------------------------------------- 1 | { 2 | "scripts": [], 3 | "modules": [ 4 | "cm.js", 5 | "codemirror.js", 6 | "multiplex.js", 7 | "matchbrackets.js", 8 | "closebrackets.js", 9 | "mark-selection.js", 10 | "comment.js", 11 | "overlay.js", 12 | "active-line.js", 13 | "foldcode.js", 14 | "foldgutter.js", 15 | "brace-fold.js", 16 | "simple.js" 17 | ], 18 | "skip_compilation": [ 19 | "codemirror.js", 20 | "multiplex.js", 21 | "matchbrackets.js", 22 | "closebrackets.js", 23 | "mark-selection.js", 24 | "comment.js", 25 | "overlay.js", 26 | "active-line.js", 27 | "foldcode.js", 28 | "foldgutter.js", 29 | "brace-fold.js", 30 | "simple.js" 31 | ], 32 | "resources": ["codemirror.css"] 33 | } 34 | -------------------------------------------------------------------------------- /static/chrome-dev-tools/help/help-legacy.js: -------------------------------------------------------------------------------- 1 | import*as Common from"../common/common.js";import*as HelpModule from"./help.js";self.Help=self.Help||{},Help=Help||{},Help.latestReleaseNote=HelpModule.Help.latestReleaseNote,Help._innerShowReleaseNoteIfNeeded=HelpModule.Help.innerShowReleaseNoteIfNeeded,Help._showReleaseNoteIfNeeded=HelpModule.Help.showReleaseNoteIfNeeded,Help._releaseNoteVersionSetting=Common.Settings.Settings.instance().createSetting("releaseNoteVersionSeen",0),Help.HelpLateInitialization=HelpModule.Help.HelpLateInitialization,Help.ReleaseNotesActionDelegate=HelpModule.Help.ReleaseNotesActionDelegate,Help.ReportIssueActionDelegate=HelpModule.Help.ReportIssueActionDelegate,Help.releaseNoteText=HelpModule.ReleaseNoteText.releaseNoteText,Help.ReleaseNoteView=HelpModule.ReleaseNoteView.ReleaseNoteView; -------------------------------------------------------------------------------- /static/chrome-dev-tools/ui/TextEditor.js: -------------------------------------------------------------------------------- 1 | import*as Common from"../common/common.js";import*as TextUtils from"../text_utils/text_utils.js";import{AnchorBehavior}from"./GlassPane.js";import{Suggestions}from"./SuggestBox.js";import{Widget}from"./Widget.js";export class TextEditorFactory{createEditor(e){}}export class TextEditor extends Common.EventTarget.EventTarget{widget(){}fullRange(){}selection(){}setSelection(e){}text(e){}textWithCurrentSuggestion(){}setText(e){}line(e){}newlineAndIndent(){}addKeyDownHandler(e){}configureAutocomplete(e){}clearAutocomplete(){}visualCoordinates(e,t){}tokenAtTextPosition(e,t){}setPlaceholder(e){}}export const Events={CursorChanged:Symbol("CursorChanged"),TextChanged:Symbol("TextChanged"),SuggestionChanged:Symbol("SuggestionChanged")};export let Options;export let AutocompleteConfig; -------------------------------------------------------------------------------- /static/chrome-dev-tools/issues/module.json: -------------------------------------------------------------------------------- 1 | { 2 | "extensions": [ 3 | { 4 | "type": "view", 5 | "location": "drawer-view", 6 | "id": "issues-pane", 7 | "title": "Issues", 8 | "order": 100, 9 | "persistence": "closeable", 10 | "className": "Issues.IssuesPane", 11 | "experiment": "issuesPane" 12 | }, 13 | { 14 | "type": "@Common.Revealer", 15 | "contextTypes": ["SDK.Issue"], 16 | "destination": "Issues view", 17 | "className": "Issues.IssueRevealer" 18 | } 19 | ], 20 | "dependencies": ["platform", "ui", "host", "components", "sdk", "network"], 21 | "scripts": [], 22 | "modules": ["issues.js", "issues-legacy.js", "IssuesPane.js", "IssueRevealer.js"], 23 | "resources": ["issuesPane.css", "issuesTree.css"] 24 | } 25 | -------------------------------------------------------------------------------- /static/chrome-dev-tools/sdk/LogModel.js: -------------------------------------------------------------------------------- 1 | import*as Host from"../host/host.js";import{Capability,SDKModel,Target}from"./SDKModel.js";export class LogModel extends SDKModel{constructor(e){super(e),e.registerLogDispatcher(this),this._logAgent=e.logAgent(),this._logAgent.enable(),Host.InspectorFrontendHost.isUnderTest()||this._logAgent.startViolationsReport([{name:"longTask",threshold:200},{name:"longLayout",threshold:30},{name:"blockedEvent",threshold:100},{name:"blockedParser",threshold:-1},{name:"handler",threshold:150},{name:"recurringHandler",threshold:50},{name:"discouragedAPIUse",threshold:-1}])}entryAdded(e){this.dispatchEventToListeners(Events.EntryAdded,{logModel:this,entry:e})}requestClear(){this._logAgent.clear()}}export const Events={EntryAdded:Symbol("EntryAdded")};SDKModel.register(LogModel,Capability.Log,!0); -------------------------------------------------------------------------------- /static/chrome-dev-tools/network/networkManageCustomHeadersView.css: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2016 The Chromium Authors. All rights reserved. 3 | * Use of this source code is governed by a BSD-style license that can be 4 | * found in the LICENSE file. 5 | */ 6 | .custom-headers-list { 7 | height: 272px; 8 | width: 250px; 9 | } 10 | 11 | .custom-headers-wrapper { 12 | margin: 10px; 13 | } 14 | 15 | .header { 16 | padding: 0 0 6px; 17 | font-size: 18px; 18 | font-weight: normal; 19 | flex: none; 20 | } 21 | 22 | .custom-headers-header { 23 | padding: 2px; 24 | } 25 | 26 | .custom-headers-list-item { 27 | padding-left: 5px; 28 | } 29 | 30 | .editor-container { 31 | padding: 5px 0px 0px 5px; 32 | } 33 | 34 | .add-button { 35 | width: 150px; 36 | margin: auto; 37 | margin-top: 5px; 38 | } 39 | -------------------------------------------------------------------------------- /static/chrome-dev-tools/css_overview/CSSOverviewProcessingView.js: -------------------------------------------------------------------------------- 1 | import*as UI from"../ui/ui.js";import{Events}from"./CSSOverviewController.js";export class CSSOverviewProcessingView extends UI.Widget.Widget{constructor(e){super(),this.registerRequiredCSS("css_overview/cssOverviewProcessingView.css"),this._formatter=new Intl.NumberFormat("en-US"),this._controller=e,this._render()}_render(){const e=UI.UIUtils.createTextButton(ls`Cancel`,()=>this._controller.dispatchEventToListeners(Events.RequestOverviewCancel),"",!0);this.setDefaultFocusedElement(e),this.fragment=UI.Fragment.Fragment.build` 2 |
3 |

Processing page

4 |
${e}
5 |
6 | `,this.contentElement.appendChild(this.fragment.element()),this.contentElement.style.overflow="auto"}} -------------------------------------------------------------------------------- /src/web/components/Icon/assets/remove.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/proxy/handleResponse/proxy.ts: -------------------------------------------------------------------------------- 1 | import { delay } from '../../utils/utils'; 2 | import { bproxyPrefixHeader } from '../config'; 3 | import { responseByRequest } from './request'; 4 | 5 | export async function responseByProxy(params: Bproxy.HandleResponseParams) { 6 | const { req, res, postBodyData, postBodyString, delayTime, matcherResult, responseHeaders, config } = params; 7 | if (delayTime) { 8 | await delay(delayTime); 9 | } 10 | const requestOptions = { 11 | proxy: matcherResult.rule.proxy, 12 | }; 13 | 14 | responseHeaders[`${bproxyPrefixHeader}-host`] = matcherResult.rule.proxy; 15 | 16 | return responseByRequest( 17 | req, 18 | res, 19 | requestOptions, 20 | responseHeaders, 21 | matcherResult, 22 | config, 23 | postBodyData, 24 | postBodyString, 25 | ); 26 | } 27 | -------------------------------------------------------------------------------- /static/chrome-dev-tools/css_overview/cssOverviewProcessingView.css: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2019 The Chromium Authors. All rights reserved. 3 | * Use of this source code is governed by a BSD-style license that can be 4 | * found in the LICENSE file. 5 | */ 6 | 7 | .overview-processing-view { 8 | overflow: hidden; 9 | } 10 | 11 | .overview-processing-view { 12 | overflow: hidden; 13 | padding: 16px; 14 | justify-content: center; 15 | align-items: center; 16 | height: 100%; 17 | } 18 | 19 | .overview-processing-view h1 { 20 | font-size: 16px; 21 | text-align: center; 22 | font-weight: normal; 23 | margin: 0; 24 | padding: 8px; 25 | } 26 | 27 | .overview-processing-view h2 { 28 | font-size: 12px; 29 | text-align: center; 30 | font-weight: normal; 31 | margin: 0; 32 | padding-top: 32px; 33 | } 34 | -------------------------------------------------------------------------------- /static/chrome-dev-tools/lighthouse/lighthouse.js: -------------------------------------------------------------------------------- 1 | import"../third_party/lighthouse/report-assets/report.js";import"../third_party/lighthouse/report-assets/report-generator.js";import*as LighthouseController from"./LighthouseController.js";import*as LighthousePanel from"./LighthousePanel.js";import*as LighthouseProtocolService from"./LighthouseProtocolService.js";import*as LighthouseReportRenderer from"./LighthouseReportRenderer.js";import*as LighthouseReportSelector from"./LighthouseReportSelector.js";import*as LighthouseStartView from"./LighthouseStartView.js";import*as LighthouseStatusView from"./LighthouseStatusView.js";import*as RadioSetting from"./RadioSetting.js";export{LighthouseController,LighthousePanel,LighthouseProtocolService,LighthouseReportRenderer,LighthouseReportSelector,LighthouseStartView,LighthouseStatusView,RadioSetting}; -------------------------------------------------------------------------------- /src/web/pages/Home/SideBar.scss: -------------------------------------------------------------------------------- 1 | $bgColor: rgb(245, 73, 144); 2 | $svgColor: #fff; 3 | $activeColor: rgb(52, 152, 219); 4 | 5 | .HomeSideBar { 6 | position: fixed; 7 | bottom: 50px; 8 | right: 16px; 9 | background-color: $bgColor; 10 | border-radius: 10px 0 0 10px; 11 | overflow: hidden; 12 | opacity: 0.2; 13 | 14 | &:hover { 15 | opacity: 1; 16 | } 17 | 18 | .sidebar-item { 19 | width: 40px; 20 | height: 40px; 21 | padding: 8px; 22 | border-bottom: solid 1px #fff; 23 | cursor: pointer; 24 | 25 | &:last-child { 26 | border-bottom: none; 27 | } 28 | 29 | &.actived { 30 | background-color: $activeColor; 31 | } 32 | 33 | .bp-icon, 34 | .bp-icon svg { 35 | width: 100%; 36 | height: 100%; 37 | fill: $svgColor; 38 | } 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /src/proxy/handleResponse/host.ts: -------------------------------------------------------------------------------- 1 | import { delay } from '../../utils/utils'; 2 | import { bproxyPrefixHeader } from './../config'; 3 | import { responseByRequest } from './request'; 4 | 5 | export async function responseByHost(params: Bproxy.HandleResponseParams) { 6 | const { req, res, postBodyData, postBodyString, delayTime, matcherResult, responseHeaders, config } = params; 7 | 8 | if (delayTime) { 9 | await delay(delayTime); 10 | } 11 | const requestOptions = { 12 | hostname: matcherResult.rule.host, 13 | }; 14 | 15 | responseHeaders[`${bproxyPrefixHeader}-host`] = matcherResult.rule.host; 16 | 17 | return responseByRequest( 18 | req, 19 | res, 20 | requestOptions, 21 | responseHeaders, 22 | matcherResult, 23 | config, 24 | postBodyData, 25 | postBodyString, 26 | ); 27 | } 28 | -------------------------------------------------------------------------------- /src/web/components/Icon/assets/scrollTop.svg: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /static/chrome-dev-tools/snippets/SnippetsQuickOpen.js: -------------------------------------------------------------------------------- 1 | import*as Common from"../common/common.js";import*as QuickOpen from"../quick_open/quick_open.js";import*as Workspace from"../workspace/workspace.js";import{evaluateScriptSnippet}from"./ScriptSnippetFileSystem.js";export class SnippetsQuickOpen extends QuickOpen.FilteredListWidget.Provider{constructor(){super(),this._snippets=[]}selectItem(e,t){null!==e&&evaluateScriptSnippet(this._snippets[e])}notFoundText(e){return Common.UIString.UIString("No snippets found.")}attach(){this._snippets=Snippets.project.uiSourceCodes()}detach(){this._snippets=[]}itemCount(){return this._snippets.length}itemKeyAt(e){return this._snippets[e].name()}renderItem(e,t,i,s){i.textContent=unescape(this._snippets[e].name()),i.classList.add("monospace"),QuickOpen.FilteredListWidget.FilteredListWidget.highlightRanges(i,t,!0)}} -------------------------------------------------------------------------------- /static/chrome-dev-tools/ui/SyntaxHighlighter.js: -------------------------------------------------------------------------------- 1 | export class SyntaxHighlighter{constructor(e,t){this._mimeType=e,this._stripExtraWhitespace=t}createSpan(e,t){const n=createElement("span");return n.className=t.replace(/\S+/g,"cm-$&"),this._stripExtraWhitespace&&"whitespace"!==t&&(e=e.replace(/^[\n\r]*/,"").replace(/\s*$/,"")),n.createTextChild(e),n}syntaxHighlightNode(e){const t=e.textContent.split("\n");let n,i;return self.runtime.extension(TextUtils.TokenizerFactory).instance().then(function(r){e.removeChildren();const c=r.createTokenizer(this._mimeType);for(let r=0;rn){const t=i.substring(n,r);e.createTextChild(t)}e.appendChild(this.createSpan(t,s)),n=c}}}} -------------------------------------------------------------------------------- /static/chrome-dev-tools/accessibility/AccessibilitySubPane.js: -------------------------------------------------------------------------------- 1 | import*as SDK from"../sdk/sdk.js";import*as UI from"../ui/ui.js";import{AccessibilityNode}from"./AccessibilityModel.js";export class AccessibilitySubPane extends UI.View.SimpleView{constructor(e){super(e),this._axNode=null,this.registerRequiredCSS("accessibility/accessibilityProperties.css")}setAXNode(e){}node(){return this._node}setNode(e){this._node=e}createInfo(e,i){const s=i||"gray-info-message",t=this.element.createChild("div",s);return t.textContent=e,t}createTreeOutline(){const e=new UI.TreeOutline.TreeOutlineInShadow;return e.registerRequiredCSS("accessibility/accessibilityNode.css"),e.registerRequiredCSS("accessibility/accessibilityProperties.css"),e.registerRequiredCSS("object_ui/objectValue.css"),e.element.classList.add("hidden"),e.hideOverflow(),this.element.appendChild(e.element),e}} -------------------------------------------------------------------------------- /static/chrome-dev-tools/timeline/ExtensionTracingSession.js: -------------------------------------------------------------------------------- 1 | import*as Extensions from"../extensions/extensions.js";import*as SDK from"../sdk/sdk.js";import{PerformanceModel}from"./PerformanceModel.js";import{Client,TimelineLoader}from"./TimelineLoader.js";export class ExtensionTracingSession{constructor(e,o){this._provider=e,this._performanceModel=o,this._completionCallback,this._completionPromise=new Promise(e=>{this._completionCallback=e}),this._timeOffset=0}loadingStarted(){}processingStarted(){}loadingProgress(e){}loadingComplete(e){e&&(this._performanceModel.addExtensionEvents(this._provider.longDisplayName(),e,this._timeOffset),this._completionCallback())}complete(e,o){e?(this._timeOffset=o,TimelineLoader.loadFromURL(e,this)):this._completionCallback()}start(){this._provider.start(this)}stop(){return this._provider.stop(),this._completionPromise}} -------------------------------------------------------------------------------- /static/chrome-dev-tools/bproxy.js: -------------------------------------------------------------------------------- 1 | import * as Root from './root/root.js'; 2 | 3 | const connectUrl = Root.Runtime.Runtime.queryParam('ws'); 4 | let timer; 5 | 6 | function listenChanges() { 7 | if (!connectUrl) { 8 | return; 9 | } 10 | const ws = new WebSocket(`ws://${connectUrl}`); 11 | 12 | ws.addEventListener('open', () => { 13 | if (timer) { 14 | clearInterval(timer); 15 | window.location.reload(); 16 | } 17 | }); 18 | setTimeout(() => { 19 | ws.close(); 20 | }, 200); 21 | } 22 | 23 | if (connectUrl) { 24 | const ws = new WebSocket(`ws://${connectUrl}`); 25 | 26 | ws.addEventListener('close', () => { 27 | timer = setInterval(listenChanges, 50); 28 | }); 29 | 30 | ws.addEventListener('open', () => { 31 | if (timer) { 32 | clearInterval(timer); 33 | } 34 | }); 35 | } 36 | -------------------------------------------------------------------------------- /src/web/components/Shortcuts/index.scss: -------------------------------------------------------------------------------- 1 | .shortcut-list { 2 | display: flex; 3 | flex-wrap: wrap; 4 | 5 | li { 6 | width: 200px; 7 | height: 100px; 8 | background-color: #453c67; 9 | display: flex; 10 | align-items: center; 11 | justify-content: center; 12 | flex-direction: column; 13 | border-radius: 10px; 14 | overflow: hidden; 15 | margin-left: 20px; 16 | margin-top: 20px; 17 | > div { 18 | height: 50%; 19 | display: flex; 20 | align-items: center; 21 | width: 100%; 22 | justify-content: center; 23 | color: #f2f7a1; 24 | &:first-child { 25 | font-size: 20px; 26 | background-color: #6d67e4; 27 | } 28 | &:last-child { 29 | font-size: 20px; 30 | background-color: #46c2cb; 31 | } 32 | } 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /static/chrome-dev-tools/performance_monitor/performance_monitor-legacy.js: -------------------------------------------------------------------------------- 1 | import*as PerformanceMonitorModule from"./performance_monitor.js";self.PerformanceMonitor=self.PerformanceMonitor||{},PerformanceMonitor=PerformanceMonitor||{},PerformanceMonitor.PerformanceMonitor=PerformanceMonitorModule.PerformanceMonitor.PerformanceMonitorImpl,PerformanceMonitor.PerformanceMonitor.Format=PerformanceMonitorModule.PerformanceMonitor.Format,PerformanceMonitor.PerformanceMonitor.ControlPane=PerformanceMonitorModule.PerformanceMonitor.ControlPane,PerformanceMonitor.PerformanceMonitor.ControlPane.Events=PerformanceMonitorModule.PerformanceMonitor.Events,PerformanceMonitor.PerformanceMonitor.MetricIndicator=PerformanceMonitorModule.PerformanceMonitor.MetricIndicator,PerformanceMonitor.PerformanceMonitor.MetricIndicator._format=PerformanceMonitorModule.PerformanceMonitor.format; -------------------------------------------------------------------------------- /static/chrome-dev-tools/ui/FilterSuggestionBuilder.js: -------------------------------------------------------------------------------- 1 | import{Suggestions}from"./SuggestBox.js";export class FilterSuggestionBuilder{constructor(e,s){this._keys=e,this._valueSorter=s||((e,s)=>s.sort()),this._valuesMap=new Map}completions(e,s,t){if(!s&&!t)return Promise.resolve([]);const r=s.startsWith("-");r&&(s=s.substring(1));const o=r?"-":"",i=s.indexOf(":"),a=[];if(-1===i){const e=new RegExp("^"+s.escapeForRegExp(),"i");for(const s of this._keys)e.test(s)&&a.push({text:o+s+":"})}else{const e=s.substring(0,i).toLowerCase(),t=s.substring(i+1),r=new RegExp("^"+t.escapeForRegExp(),"i"),n=Array.from(this._valuesMap.get(e)||new Set);this._valueSorter(e,n);for(const s of n)r.test(s)&&s!==t&&a.push({text:o+e+":"+s})}return Promise.resolve(a)}addItem(e,s){s&&(this._valuesMap.get(e)||this._valuesMap.set(e,new Set),this._valuesMap.get(e).add(s))}clear(){this._valuesMap.clear()}} -------------------------------------------------------------------------------- /src/web/components/Icon/assets/scrollBottom.svg: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /static/chrome-dev-tools/css_overview/cssOverviewSidebarPanel.css: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2019 The Chromium Authors. All rights reserved. 3 | * Use of this source code is governed by a BSD-style license that can be 4 | * found in the LICENSE file. 5 | */ 6 | 7 | .overview-sidebar-panel { 8 | overflow: auto; 9 | display: flex; 10 | background: #f3f3f3; 11 | } 12 | 13 | .overview-sidebar-panel-item { 14 | height: 30px; 15 | padding-left: 30px; 16 | display: flex; 17 | align-items: center; 18 | cursor: pointer; 19 | } 20 | 21 | .overview-sidebar-panel-item:hover, 22 | .overview-sidebar-panel-item:focus { 23 | background: rgb(234, 234, 234); 24 | } 25 | 26 | .overview-sidebar-panel-item.selected { 27 | background: #1a73e8; 28 | color: #ffffff; 29 | } 30 | 31 | .overview-toolbar { 32 | border-bottom: 1px solid rgb(204, 204, 204); 33 | } 34 | -------------------------------------------------------------------------------- /static/chrome-dev-tools/layer_viewer/paintProfiler.css: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2016 The Chromium Authors. All rights reserved. 3 | * Use of this source code is governed by a BSD-style license that can be 4 | * found in the LICENSE file. 5 | */ 6 | 7 | .paint-profiler-overview { 8 | background-color: #eee; 9 | } 10 | 11 | .paint-profiler-canvas-container { 12 | flex: auto; 13 | position: relative; 14 | } 15 | 16 | .paint-profiler-pie-chart { 17 | width: 60px !important; 18 | height: 60px !important; 19 | padding: 2px; 20 | overflow: hidden; 21 | font-size: 10px; 22 | } 23 | 24 | .paint-profiler-canvas-container canvas { 25 | z-index: 200; 26 | background-color: white; 27 | opacity: 0.95; 28 | height: 100%; 29 | width: 100%; 30 | } 31 | 32 | .paint-profiler-canvas-container .overview-grid-window-resizer { 33 | z-index: 2000; 34 | } 35 | -------------------------------------------------------------------------------- /static/chrome-dev-tools/sources/SearchSourcesView.js: -------------------------------------------------------------------------------- 1 | import*as Search from"../search/search.js";import*as UI from"../ui/ui.js";import{SourcesSearchScope}from"./SourcesSearchScope.js";export class SearchSourcesView extends Search.SearchView.SearchView{constructor(){super("sources")}static async openSearch(e,r){const a=UI.ViewManager.ViewManager.instance().view("sources.search-sources-tab");(await UI.ViewManager.ViewManager.instance().resolveLocation("drawer-view")).appendView(a),await UI.ViewManager.ViewManager.instance().revealView(a);const c=await a.widget();return c.toggle(e,!!r),c}createScope(){return new SourcesSearchScope}}export class ActionDelegate{handleAction(e,r){return this._showSearch(),!0}_showSearch(){const e=self.UI.inspectorView.element.window().getSelection();let r="";return e.rangeCount&&(r=e.toString().replace(/\r?\n.*/,"")),SearchSourcesView.openSearch(r)}} -------------------------------------------------------------------------------- /static/chrome-dev-tools/cookie_table/cookiesTable.css: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2019 The Chromium Authors. All rights reserved. 3 | * Use of this source code is governed by a BSD-style license that can be 4 | * found in the LICENSE file. 5 | */ 6 | 7 | .cookies-table .flagged-cookie-row { 8 | background-color: yellow; 9 | } 10 | 11 | .cookies-table .cookie-warning-icon { 12 | margin-right: 4px; 13 | } 14 | 15 | .cookies-table td.flagged-cookie-attribute-cell .cookie-warning-icon { 16 | filter: grayscale(); 17 | } 18 | 19 | .cookies-table tr.revealed.data-grid-data-grid-node.flagged-cookie-attribute-row:not(.selected):nth-child(odd) { 20 | background-color: hsl(51, 85%, 80%); 21 | } 22 | 23 | .cookies-table tr.revealed.data-grid-data-grid-node.flagged-cookie-attribute-row:not(.selected):nth-child(even) { 24 | background-color: rgb(255, 240, 155); 25 | } 26 | -------------------------------------------------------------------------------- /static/chrome-dev-tools/ui/progressIndicator.css: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2014 The Chromium Authors. All rights reserved. 3 | * Use of this source code is governed by a BSD-style license that can be 4 | * found in the LICENSE file. 5 | */ 6 | 7 | .progress-indicator-shadow-stop-button { 8 | background-color: rgb(216, 0, 0) !important; 9 | border: 0; 10 | width: 10px; 11 | height: 12px; 12 | border-radius: 2px; 13 | } 14 | 15 | .progress-indicator-shadow-container { 16 | display: flex; 17 | flex: 1 0 auto; 18 | align-items: center; 19 | } 20 | 21 | .progress-indicator-shadow-container .title { 22 | text-overflow: ellipsis; 23 | overflow: hidden; 24 | max-width: 150px; 25 | margin-right: 2px; 26 | color: #777; 27 | } 28 | 29 | .progress-indicator-shadow-container progress { 30 | flex: auto; 31 | margin: 0 2px; 32 | width: 100px; 33 | } 34 | -------------------------------------------------------------------------------- /static/chrome-dev-tools/ui/smallBubble.css: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2016 The Chromium Authors. All rights reserved. 3 | * Use of this source code is governed by a BSD-style license that can be 4 | * found in the LICENSE file. 5 | */ 6 | 7 | div { 8 | display: inline-block; 9 | height: 14px; 10 | vertical-align: middle; 11 | white-space: nowrap; 12 | padding: 1px 4px; 13 | text-align: left; 14 | font-size: 11px; 15 | line-height: normal; 16 | font-weight: bold; 17 | text-shadow: none; 18 | color: white; 19 | margin-top: -1px; 20 | border-radius: 7px; 21 | } 22 | 23 | div.verbose { 24 | background-color: rgb(0, 0, 255); 25 | } 26 | 27 | div.info { 28 | background-color: rgb(128, 151, 189); 29 | } 30 | 31 | div.warning { 32 | background-color: rgb(232, 164, 0); 33 | } 34 | 35 | div.error { 36 | background-color: rgb(216, 35, 35); 37 | } 38 | -------------------------------------------------------------------------------- /static/chrome-dev-tools/bindings/module.json: -------------------------------------------------------------------------------- 1 | { 2 | "dependencies": ["sdk", "platform", "services", "workspace"], 3 | "scripts": [], 4 | "modules": [ 5 | "bindings.js", 6 | "bindings-legacy.js", 7 | "LiveLocation.js", 8 | "ResourceMapping.js", 9 | "CompilerScriptMapping.js", 10 | "ResourceScriptMapping.js", 11 | "SASSSourceMapping.js", 12 | "StylesSourceMapping.js", 13 | "CSSWorkspaceBinding.js", 14 | "DebuggerWorkspaceBinding.js", 15 | "DebuggerLanguagePlugins.js", 16 | "language_plugins/CXXDWARFLanguagePlugin.js", 17 | "BreakpointManager.js", 18 | "ContentProviderBasedProject.js", 19 | "DefaultScriptMapping.js", 20 | "FileUtils.js", 21 | "BlackboxManager.js", 22 | "NetworkProject.js", 23 | "PresentationConsoleMessageHelper.js", 24 | "ResourceUtils.js", 25 | "TempFile.js" 26 | ] 27 | } 28 | -------------------------------------------------------------------------------- /static/chrome-dev-tools/elements/StylePropertyHighlighter.js: -------------------------------------------------------------------------------- 1 | import*as SDK from"../sdk/sdk.js";import{StylesSidebarPane}from"./StylesSidebarPane.js";export class StylePropertyHighlighter{constructor(e,r){this._styleSidebarPane=e,this._cssProperty=r}perform(){for(const e of this._styleSidebarPane.allSections())for(let r=e.propertiesTreeOutline.firstChild();r;r=r.nextSibling)r.onpopulate();let e=null;for(const r of this._styleSidebarPane.allSections()){let t=r.propertiesTreeOutline.firstChild();for(;t&&!e;){if(t.property===this._cssProperty){e=t;break}t=t.traverseNextTreeElement(!1,null,!0)}if(e)break}e&&(e.parent.expand(),e.listItemElement.scrollIntoViewIfNeeded(),e.listItemElement.animate([{offset:0,backgroundColor:"rgba(255, 255, 0, 0.2)"},{offset:.1,backgroundColor:"rgba(255, 255, 0, 0.7)"},{offset:1,backgroundColor:"transparent"}],{duration:2e3,easing:"cubic-bezier(0, 0, 0.2, 1)"}))}} -------------------------------------------------------------------------------- /static/chrome-dev-tools/web_audio/graph_visualizer/GraphManager.js: -------------------------------------------------------------------------------- 1 | import*as Common from"../../common/common.js";import{Events as ViewEvents,GraphView}from"./GraphView.js";export class GraphManager extends Common.ObjectWrapper.ObjectWrapper{constructor(){super(),this._graphMapByContextId=new Map}createContext(t){const e=new GraphView(t);e.addEventListener(ViewEvents.ShouldRedraw,this._notifyShouldRedraw,this),this._graphMapByContextId.set(t,e)}destroyContext(t){if(!this._graphMapByContextId.has(t))return;this._graphMapByContextId.get(t).removeEventListener(ViewEvents.ShouldRedraw,this._notifyShouldRedraw,this),this._graphMapByContextId.delete(t)}hasContext(t){return this._graphMapByContextId.has(t)}clearGraphs(){this._graphMapByContextId.clear()}getGraph(t){return this._graphMapByContextId.get(t)}_notifyShouldRedraw(t){const e=t.data;this.dispatchEventToListeners(ViewEvents.ShouldRedraw,e)}} --------------------------------------------------------------------------------