@react-native/debugger-frontend
Advanced tools
Comparing version 0.73.0-nightly-20231001-d95433f82 to 0.73.0-nightly-20231002-0371014a3
@@ -1,1 +0,1 @@ | ||
import"../shell/shell.js";import*as t from"../../core/common/common.js";import*as e from"../../core/i18n/i18n.js";import*as i from"../../ui/legacy/legacy.js";import*as n from"../../core/root/root.js";import*as o from"../../core/host/host.js";import*as r from"../../core/sdk/sdk.js";import*as a from"../../ui/legacy/components/utils/utils.js";import*as l from"../main/main.js";const s={throttling:"Throttling",showThrottling:"Show Throttling",goOffline:"Go offline",device:"device",throttlingTag:"throttling",enableSlowGThrottling:"Enable slow `3G` throttling",enableFastGThrottling:"Enable fast `3G` throttling",goOnline:"Go online"},c=e.i18n.registerUIStrings("panels/mobile_throttling/mobile_throttling-meta.ts",s),g=e.i18n.getLazilyComputedLocalizedString.bind(void 0,c);let m;async function d(){return m||(m=await import("../../panels/mobile_throttling/mobile_throttling.js")),m}i.ViewManager.registerViewExtension({location:"settings-view",id:"throttling-conditions",title:g(s.throttling),commandPrompt:g(s.showThrottling),order:35,loadView:async()=>(await d()).ThrottlingSettingsTab.ThrottlingSettingsTab.instance(),settings:["customNetworkConditions"]}),i.ActionRegistration.registerActionExtension({actionId:"network-conditions.network-offline",category:i.ActionRegistration.ActionCategory.NETWORK,title:g(s.goOffline),loadActionDelegate:async()=>(await d()).ThrottlingManager.ActionDelegate.instance(),tags:[g(s.device),g(s.throttlingTag)]}),i.ActionRegistration.registerActionExtension({actionId:"network-conditions.network-low-end-mobile",category:i.ActionRegistration.ActionCategory.NETWORK,title:g(s.enableSlowGThrottling),loadActionDelegate:async()=>(await d()).ThrottlingManager.ActionDelegate.instance(),tags:[g(s.device),g(s.throttlingTag)]}),i.ActionRegistration.registerActionExtension({actionId:"network-conditions.network-mid-tier-mobile",category:i.ActionRegistration.ActionCategory.NETWORK,title:g(s.enableFastGThrottling),loadActionDelegate:async()=>(await d()).ThrottlingManager.ActionDelegate.instance(),tags:[g(s.device),g(s.throttlingTag)]}),i.ActionRegistration.registerActionExtension({actionId:"network-conditions.network-online",category:i.ActionRegistration.ActionCategory.NETWORK,title:g(s.goOnline),loadActionDelegate:async()=>(await d()).ThrottlingManager.ActionDelegate.instance(),tags:[g(s.device),g(s.throttlingTag)]}),t.Settings.registerSettingExtension({storageType:t.Settings.SettingStorageType.Synced,settingName:"customNetworkConditions",settingType:t.Settings.SettingType.ARRAY,defaultValue:[]});const p={profiler:"Profiler",showProfiler:"Show Profiler",performance:"Performance",showPerformance:"Show Performance",startStopRecording:"Start/stop recording",showRecentTimelineSessions:"Show recent timeline sessions",record:"Record",stop:"Stop",startProfilingAndReloadPage:"Start profiling and reload page"},w=e.i18n.registerUIStrings("panels/js_profiler/js_profiler-meta.ts",p),f=e.i18n.getLazilyComputedLocalizedString.bind(void 0,w);let h,A;async function T(){return A||(A=await import("../../panels/profiler/profiler.js")),A}async function y(){return h||(h=await import("../../panels/timeline/timeline.js")),h}function P(t){return void 0===h?[]:t(h)}i.ViewManager.registerViewExtension({location:"panel",id:"js_profiler",title:f(p.profiler),commandPrompt:f(p.showProfiler),order:65,persistence:"closeable",experiment:n.Runtime.ExperimentName.JS_PROFILER_TEMP_ENABLE,loadView:async()=>(await T()).ProfilesPanel.JSProfilerPanel.instance()}),i.ViewManager.registerViewExtension({location:"panel",id:"timeline",title:f(p.performance),commandPrompt:f(p.showPerformance),order:66,hasToolbar:!1,isPreviewFeature:!0,loadView:async()=>(await y()).TimelinePanel.TimelinePanel.instance({forceNew:null,isNode:!0})}),i.ActionRegistration.registerActionExtension({actionId:"profiler.js-toggle-recording",category:i.ActionRegistration.ActionCategory.JAVASCRIPT_PROFILER,title:f(p.startStopRecording),iconClass:"record-start",toggleable:!0,toggledIconClass:"record-stop",toggleWithRedColor:!0,contextTypes:()=>void 0===A?[]:(t=>[t.ProfilesPanel.JSProfilerPanel])(A),loadActionDelegate:async()=>(await T()).ProfilesPanel.JSProfilerPanel.instance(),bindings:[{platform:"windows,linux",shortcut:"Ctrl+E"},{platform:"mac",shortcut:"Meta+E"}]}),i.ActionRegistration.registerActionExtension({actionId:"timeline.show-history",loadActionDelegate:async()=>(await y()).TimelinePanel.ActionDelegate.instance(),category:i.ActionRegistration.ActionCategory.PERFORMANCE,title:f(p.showRecentTimelineSessions),contextTypes:()=>P((t=>[t.TimelinePanel.TimelinePanel])),bindings:[{platform:"windows,linux",shortcut:"Ctrl+H"},{platform:"mac",shortcut:"Meta+Y"}]}),i.ActionRegistration.registerActionExtension({actionId:"timeline.toggle-recording",category:i.ActionRegistration.ActionCategory.PERFORMANCE,iconClass:"record-start",toggleable:!0,toggledIconClass:"record-stop",toggleWithRedColor:!0,contextTypes:()=>P((t=>[t.TimelinePanel.TimelinePanel])),loadActionDelegate:async()=>(await y()).TimelinePanel.ActionDelegate.instance(),options:[{value:!0,title:f(p.record)},{value:!1,title:f(p.stop)}],bindings:[{platform:"windows,linux",shortcut:"Ctrl+E"},{platform:"mac",shortcut:"Meta+E"}]}),i.ActionRegistration.registerActionExtension({actionId:"timeline.record-reload",iconClass:"refresh",contextTypes:()=>P((t=>[t.TimelinePanel.TimelinePanel])),category:i.ActionRegistration.ActionCategory.PERFORMANCE,title:f(p.startProfilingAndReloadPage),loadActionDelegate:async()=>(await y()).TimelinePanel.ActionDelegate.instance(),bindings:[{platform:"windows,linux",shortcut:"Ctrl+Shift+E"},{platform:"mac",shortcut:"Meta+Shift+E"}]});const u={main:"Main"},R=e.i18n.registerUIStrings("entrypoints/js_app/js_app.ts",u),S=e.i18n.getLocalizedString.bind(void 0,R);let E;class C{static instance(t={forceNew:null}){const{forceNew:e}=t;return E&&!e||(E=new C),E}async run(){o.userMetrics.actionTaken(o.UserMetrics.Action.ConnectToNodeJSDirectly),r.Connections.initMainConnection((async()=>{r.TargetManager.TargetManager.instance().createTarget("main",S(u.main),r.Target.Type.Node,null).runtimeAgent().invoke_runIfWaitingForDebugger()}),a.TargetDetachedDialog.TargetDetachedDialog.webSocketConnectionLost)}}t.Runnable.registerEarlyInitializationRunnable(C.instance),new l.MainImpl.MainImpl;export{C as JsMainImpl}; | ||
import"../shell/shell.js";import*as t from"../../core/common/common.js";import*as e from"../../core/i18n/i18n.js";import*as i from"../../ui/legacy/legacy.js";import*as n from"../../core/root/root.js";import*as o from"../../core/host/host.js";import*as r from"../../core/sdk/sdk.js";import*as a from"../../ui/legacy/components/utils/utils.js";import*as s from"../main/main.js";const l={throttling:"Throttling",showThrottling:"Show Throttling",goOffline:"Go offline",device:"device",throttlingTag:"throttling",enableSlowGThrottling:"Enable slow `3G` throttling",enableFastGThrottling:"Enable fast `3G` throttling",goOnline:"Go online"},c=e.i18n.registerUIStrings("panels/mobile_throttling/mobile_throttling-meta.ts",l),g=e.i18n.getLazilyComputedLocalizedString.bind(void 0,c);let d;async function m(){return d||(d=await import("../../panels/mobile_throttling/mobile_throttling.js")),d}i.ViewManager.registerViewExtension({location:"settings-view",id:"throttling-conditions",title:g(l.throttling),commandPrompt:g(l.showThrottling),order:35,loadView:async()=>(await m()).ThrottlingSettingsTab.ThrottlingSettingsTab.instance(),settings:["customNetworkConditions"]}),i.ActionRegistration.registerActionExtension({actionId:"network-conditions.network-offline",category:i.ActionRegistration.ActionCategory.NETWORK,title:g(l.goOffline),loadActionDelegate:async()=>(await m()).ThrottlingManager.ActionDelegate.instance(),tags:[g(l.device),g(l.throttlingTag)]}),i.ActionRegistration.registerActionExtension({actionId:"network-conditions.network-low-end-mobile",category:i.ActionRegistration.ActionCategory.NETWORK,title:g(l.enableSlowGThrottling),loadActionDelegate:async()=>(await m()).ThrottlingManager.ActionDelegate.instance(),tags:[g(l.device),g(l.throttlingTag)]}),i.ActionRegistration.registerActionExtension({actionId:"network-conditions.network-mid-tier-mobile",category:i.ActionRegistration.ActionCategory.NETWORK,title:g(l.enableFastGThrottling),loadActionDelegate:async()=>(await m()).ThrottlingManager.ActionDelegate.instance(),tags:[g(l.device),g(l.throttlingTag)]}),i.ActionRegistration.registerActionExtension({actionId:"network-conditions.network-online",category:i.ActionRegistration.ActionCategory.NETWORK,title:g(l.goOnline),loadActionDelegate:async()=>(await m()).ThrottlingManager.ActionDelegate.instance(),tags:[g(l.device),g(l.throttlingTag)]}),t.Settings.registerSettingExtension({storageType:t.Settings.SettingStorageType.Synced,settingName:"customNetworkConditions",settingType:t.Settings.SettingType.ARRAY,defaultValue:[]});const p={profiler:"Profiler",showProfiler:"Show Profiler",performance:"Performance",showPerformance:"Show Performance",startStopRecording:"Start/stop recording",showRecentTimelineSessions:"Show recent timeline sessions",record:"Record",stop:"Stop",startProfilingAndReloadPage:"Start profiling and reload page"},f=e.i18n.registerUIStrings("panels/js_profiler/js_profiler-meta.ts",p),h=e.i18n.getLazilyComputedLocalizedString.bind(void 0,f);let w,A;async function T(){return A||(A=await import("../../panels/profiler/profiler.js")),A}async function y(){return w||(w=await import("../../panels/timeline/timeline.js")),w}function R(t){return void 0===w?[]:t(w)}i.ViewManager.registerViewExtension({location:"panel",id:"js_profiler",title:h(p.profiler),commandPrompt:h(p.showProfiler),order:65,persistence:"permanent",experiment:n.Runtime.ExperimentName.JS_PROFILER_TEMP_ENABLE,loadView:async()=>(await T()).ProfilesPanel.JSProfilerPanel.instance()}),i.ActionRegistration.registerActionExtension({actionId:"profiler.js-toggle-recording",category:i.ActionRegistration.ActionCategory.JAVASCRIPT_PROFILER,title:h(p.startStopRecording),iconClass:"record-start",toggleable:!0,toggledIconClass:"record-stop",toggleWithRedColor:!0,contextTypes:()=>void 0===A?[]:(t=>[t.ProfilesPanel.JSProfilerPanel])(A),loadActionDelegate:async()=>(await T()).ProfilesPanel.JSProfilerPanel.instance(),bindings:[{platform:"windows,linux",shortcut:"Ctrl+E"},{platform:"mac",shortcut:"Meta+E"}]}),i.ActionRegistration.registerActionExtension({actionId:"timeline.show-history",loadActionDelegate:async()=>(await y()).TimelinePanel.ActionDelegate.instance(),category:i.ActionRegistration.ActionCategory.PERFORMANCE,title:h(p.showRecentTimelineSessions),contextTypes:()=>R((t=>[t.TimelinePanel.TimelinePanel])),bindings:[{platform:"windows,linux",shortcut:"Ctrl+H"},{platform:"mac",shortcut:"Meta+Y"}]}),i.ActionRegistration.registerActionExtension({actionId:"timeline.toggle-recording",category:i.ActionRegistration.ActionCategory.PERFORMANCE,iconClass:"record-start",toggleable:!0,toggledIconClass:"record-stop",toggleWithRedColor:!0,contextTypes:()=>R((t=>[t.TimelinePanel.TimelinePanel])),loadActionDelegate:async()=>(await y()).TimelinePanel.ActionDelegate.instance(),options:[{value:!0,title:h(p.record)},{value:!1,title:h(p.stop)}],bindings:[{platform:"windows,linux",shortcut:"Ctrl+E"},{platform:"mac",shortcut:"Meta+E"}]}),i.ActionRegistration.registerActionExtension({actionId:"timeline.record-reload",iconClass:"refresh",contextTypes:()=>R((t=>[t.TimelinePanel.TimelinePanel])),category:i.ActionRegistration.ActionCategory.PERFORMANCE,title:h(p.startProfilingAndReloadPage),loadActionDelegate:async()=>(await y()).TimelinePanel.ActionDelegate.instance(),bindings:[{platform:"windows,linux",shortcut:"Ctrl+Shift+E"},{platform:"mac",shortcut:"Meta+Shift+E"}]});const u={main:"Main"},P=e.i18n.registerUIStrings("entrypoints/js_app/js_app.ts",u),S=e.i18n.getLocalizedString.bind(void 0,P);let E;class C{static instance(t={forceNew:null}){const{forceNew:e}=t;return E&&!e||(E=new C),E}async run(){o.userMetrics.actionTaken(o.UserMetrics.Action.ConnectToNodeJSDirectly),r.Connections.initMainConnection((async()=>{r.TargetManager.TargetManager.instance().createTarget("main",S(u.main),r.Target.Type.Node,null).runtimeAgent().invoke_runIfWaitingForDebugger()}),a.TargetDetachedDialog.TargetDetachedDialog.webSocketConnectionLost)}}t.Runnable.registerEarlyInitializationRunnable(C.instance),new s.MainImpl.MainImpl;export{C as JsMainImpl}; |
@@ -1,1 +0,1 @@ | ||
import*as e from"../../core/sdk/sdk.js";import*as t from"../../core/common/common.js";import*as n from"../../core/host/host.js";import*as o from"../../core/i18n/i18n.js";import*as r from"../../core/platform/platform.js";import*as s from"../../core/protocol_client/protocol_client.js";import*as i from"../../core/root/root.js";import*as a from"../../models/bindings/bindings.js";import*as l from"../../models/breakpoints/breakpoints.js";import*as c from"../../models/extensions/extensions.js";import*as d from"../../models/issues_manager/issues_manager.js";import*as m from"../../models/logs/logs.js";import*as g from"../../models/persistence/persistence.js";import*as p from"../../models/workspace/workspace.js";import*as u from"../../panels/snippets/snippets.js";import*as h from"../../panels/timeline/timeline.js";import*as f from"../../ui/components/icon_button/icon_button.js";import*as w from"../../ui/legacy/components/perf_ui/perf_ui.js";import*as S from"../../ui/legacy/components/utils/utils.js";import*as x from"../../ui/legacy/legacy.js";import*as v from"../../ui/legacy/theme_support/theme_support.js";class E{#e;#t;#n;#o;constructor(t,n){n.addFlavorChangeListener(e.RuntimeModel.ExecutionContext,this.#r,this),n.addFlavorChangeListener(e.Target.Target,this.#s,this),t.addModelListener(e.RuntimeModel.RuntimeModel,e.RuntimeModel.Events.ExecutionContextCreated,this.#i,this),t.addModelListener(e.RuntimeModel.RuntimeModel,e.RuntimeModel.Events.ExecutionContextDestroyed,this.#a,this),t.addModelListener(e.RuntimeModel.RuntimeModel,e.RuntimeModel.Events.ExecutionContextOrderChanged,this.#l,this),this.#e=t,this.#t=n,t.observeModels(e.RuntimeModel.RuntimeModel,this)}modelAdded(t){queueMicrotask(function(){this.#t.flavor(e.Target.Target)||this.#t.setFlavor(e.Target.Target,t.target())}.bind(this))}modelRemoved(t){const n=this.#t.flavor(e.RuntimeModel.ExecutionContext);n&&n.runtimeModel===t&&this.#c();const o=this.#e.models(e.RuntimeModel.RuntimeModel);this.#t.flavor(e.Target.Target)===t.target()&&o.length&&this.#t.setFlavor(e.Target.Target,o[0].target())}#r({data:t}){t&&(this.#t.setFlavor(e.Target.Target,t.target()),this.#o||(this.#n=this.#d(t)))}#d(e){return e.isDefault?e.target().name()+":"+e.frameId:""}#s({data:t}){const n=this.#t.flavor(e.RuntimeModel.ExecutionContext);if(!t||n&&n.target()===t)return;const o=t.model(e.RuntimeModel.RuntimeModel),r=o?o.executionContexts():[];if(!r.length)return;let s=null;for(let e=0;e<r.length&&!s;++e)this.#m(r[e])&&(s=r[e]);for(let e=0;e<r.length&&!s;++e)this.#g(r[e])&&(s=r[e]);this.#o=!0,this.#t.setFlavor(e.RuntimeModel.ExecutionContext,s||r[0]),this.#o=!1}#m(e){return!e.target().targetInfo()?.subtype&&(!(!this.#n||this.#n!==this.#d(e))||!this.#n&&this.#g(e))}#g(t){if(!t.isDefault||!t.frameId)return!1;if(t.target().parentTarget()?.type()===e.Target.Type.Frame)return!1;const n=t.target().model(e.ResourceTreeModel.ResourceTreeModel),o=n&&n.frameForId(t.frameId);return Boolean(o?.isOutermostFrame())}#i(e){this.#p(e.data)}#a(t){const n=t.data;this.#t.flavor(e.RuntimeModel.ExecutionContext)===n&&this.#c()}#l(e){const t=e.data.executionContexts();for(let e=0;e<t.length&&!this.#p(t[e]);e++);}#p(t){return!(this.#t.flavor(e.RuntimeModel.ExecutionContext)&&!this.#m(t))&&(this.#o=!0,this.#t.setFlavor(e.RuntimeModel.ExecutionContext,t),this.#o=!1,!0)}#c(){const t=this.#e.models(e.RuntimeModel.RuntimeModel);let n=null;for(let e=0;e<t.length&&!n;++e){const o=t[e].executionContexts();for(const e of o)if(this.#g(e)){n=e;break}}if(!n)for(let e=0;e<t.length&&!n;++e){const o=t[e].executionContexts();if(o.length){n=o[0];break}}this.#o=!0,this.#t.setFlavor(e.RuntimeModel.ExecutionContext,n),this.#o=!1}}var I=Object.freeze({__proto__:null,ExecutionContextSelector:E});const b={customizeAndControlDevtools:"Customize and control DevTools",dockSide:"Dock side",placementOfDevtoolsRelativeToThe:"Placement of DevTools relative to the page. ({PH1} to restore last position)",undockIntoSeparateWindow:"Undock into separate window",dockToBottom:"Dock to bottom",dockToRight:"Dock to right",dockToLeft:"Dock to left",focusDebuggee:"Focus debuggee",hideConsoleDrawer:"Hide console drawer",showConsoleDrawer:"Show console drawer",moreTools:"More tools",help:"Help",dockSideNaviation:"Use left and right arrow keys to navigate the options"},M=o.i18n.registerUIStrings("entrypoints/main/MainImpl.ts",b),T=o.i18n.getLocalizedString.bind(void 0,M);class R{#u;#h;#f;constructor(){R.instanceForTest=this,this.#h=new Promise((e=>{this.#f=e})),this.#w()}static time(e){n.InspectorFrontendHost.isUnderTest()||console.time(e)}static timeEnd(e){n.InspectorFrontendHost.isUnderTest()||console.timeEnd(e)}async#w(){console.timeStamp("Main._loaded"),i.Runtime.Runtime.setPlatform(n.Platform.platform());const e=await new Promise((e=>{n.InspectorFrontendHost.InspectorFrontendHostInstance.getPreferences(e)}));console.timeStamp("Main._gotPreferences"),this.#S(),this.createSettings(e),await this.requestAndRegisterLocaleData(),n.userMetrics.syncSetting(t.Settings.Settings.instance().moduleSetting("sync_preferences").get()),this.#x()}#S(){self.Common=self.Common||{},self.UI=self.UI||{},self.UI.panels=self.UI.panels||{},self.SDK=self.SDK||{},self.Bindings=self.Bindings||{},self.Persistence=self.Persistence||{},self.Workspace=self.Workspace||{},self.Extensions=self.Extensions||{},self.Host=self.Host||{},self.Host.userMetrics=self.Host.userMetrics||n.userMetrics,self.Host.UserMetrics=self.Host.UserMetrics||n.UserMetrics,self.ProtocolClient=self.ProtocolClient||{},self.ProtocolClient.test=self.ProtocolClient.test||s.InspectorBackend.test}async requestAndRegisterLocaleData(){const e=t.Settings.Settings.instance().moduleSetting("language").get(),r=o.DevToolsLocale.DevToolsLocale.instance({create:!0,data:{navigatorLanguage:navigator.language,settingLanguage:e,lookupClosestDevToolsLocale:o.i18n.lookupClosestSupportedDevToolsLocale}});n.userMetrics.language(r.locale),"en-US"!==r.locale&&await o.i18n.fetchAndRegisterLocaleData("en-US");try{await o.i18n.fetchAndRegisterLocaleData(r.locale)}catch(e){console.warn(`Unable to fetch & register locale data for '${r.locale}', falling back to 'en-US'. Cause: `,e),r.forceFallbackLocale()}}createSettings(e){this.#v();let o,r="";if(n.Platform.isCustomDevtoolsFrontend()?r="__custom__":i.Runtime.Runtime.queryParam("can_dock")||!Boolean(i.Runtime.Runtime.queryParam("debugFrontend"))||n.InspectorFrontendHost.isUnderTest()||(r="__bundled__"),!n.InspectorFrontendHost.isUnderTest()&&window.localStorage){const e={...t.Settings.NOOP_STORAGE,clear:()=>window.localStorage.clear()};o=new t.Settings.SettingsStorage(window.localStorage,e,r)}else o=new t.Settings.SettingsStorage({},t.Settings.NOOP_STORAGE,r);const s={register:e=>n.InspectorFrontendHost.InspectorFrontendHostInstance.registerPreference(e,{synced:!1}),set:n.InspectorFrontendHost.InspectorFrontendHostInstance.setPreference,get:e=>new Promise((t=>{n.InspectorFrontendHost.InspectorFrontendHostInstance.getPreference(e,t)})),remove:n.InspectorFrontendHost.InspectorFrontendHostInstance.removePreference,clear:n.InspectorFrontendHost.InspectorFrontendHostInstance.clearPreferences},a={...s,register:e=>n.InspectorFrontendHost.InspectorFrontendHostInstance.registerPreference(e,{synced:!0})},l=new t.Settings.SettingsStorage(e,a,r),c=new t.Settings.SettingsStorage(e,s,r);t.Settings.Settings.instance({forceNew:!0,syncedStorage:l,globalStorage:c,localStorage:o}),self.Common.settings=t.Settings.Settings.instance(),n.InspectorFrontendHost.isUnderTest()||(new t.Settings.VersionController).updateVersion()}#v(){i.Runtime.experiments.register("applyCustomStylesheet","Allow extensions to load custom stylesheets"),i.Runtime.experiments.register("captureNodeCreationStacks","Capture node creation stacks"),i.Runtime.experiments.register("sourcesPrettyPrint","Automatically pretty print minified sources"),i.Runtime.experiments.register("ignoreListJSFramesOnTimeline","Ignore List for JavaScript frames on Timeline",!0),i.Runtime.experiments.register("liveHeapProfile","Live heap profile",!0),i.Runtime.experiments.register("protocolMonitor","Protocol Monitor",void 0,"https://developer.chrome.com/blog/new-in-devtools-92/#protocol-monitor"),i.Runtime.experiments.register("developerResourcesView","Show developer resources view"),i.Runtime.experiments.register("cspViolationsView","Show CSP Violations view",void 0,"https://developer.chrome.com/blog/new-in-devtools-89/#csp"),i.Runtime.experiments.register("samplingHeapProfilerTimeline","Sampling heap profiler timeline",!0),i.Runtime.experiments.register("showOptionToExposeInternalsInHeapSnapshot","Show option to expose internals in heap snapshots"),i.Runtime.experiments.register("sourceOrderViewer","Source order viewer",void 0,"https://developer.chrome.com/blog/new-in-devtools-92/#source-order"),i.Runtime.experiments.register("webauthnPane","WebAuthn Pane"),i.Runtime.experiments.register("keyboardShortcutEditor","Enable keyboard shortcut editor",!1,"https://developer.chrome.com/blog/new-in-devtools-88/#keyboard-shortcuts"),i.Runtime.experiments.register("bfcacheDisplayTree","Show back/forward cache blocking reasons in the frame tree structure view"),i.Runtime.experiments.register("timelineEventInitiators","Timeline: event initiators"),i.Runtime.experiments.register("timelineInvalidationTracking","Timeline: invalidation tracking",!0),i.Runtime.experiments.register("timelineShowAllEvents","Timeline: show all events",!0),i.Runtime.experiments.register("timelineV8RuntimeCallStats","Timeline: V8 Runtime Call Stats on Timeline",!0),i.Runtime.experiments.register("timelineAsConsoleProfileResultPanel","View console.profile() results in the Performance panel for Node.js",!0),i.Runtime.experiments.register("jsProfilerTemporarilyEnable","Enable JavaScript Profiler temporarily",!1,"https://developer.chrome.com/blog/js-profiler-deprecation/","https://bugs.chromium.org/p/chromium/issues/detail?id=1354548"),i.Runtime.experiments.register("wasmDWARFDebugging","WebAssembly Debugging: Enable DWARF support",void 0,"https://developer.chrome.com/blog/wasm-debugging-2020/"),i.Runtime.experiments.register("evaluateExpressionsWithSourceMaps","Resolve variable names in expressions using source maps",void 0),i.Runtime.experiments.register("instrumentationBreakpoints","Enable instrumentation breakpoints",!0),i.Runtime.experiments.register("setAllBreakpointsEagerly","Set all breakpoints eagerly at startup",!0),i.Runtime.experiments.register("dualScreenSupport","Emulation: Support dual screen mode",void 0,"https://developer.chrome.com/blog/new-in-devtools-89#dual-screen"),i.Runtime.experiments.setEnabled("dualScreenSupport",!0),i.Runtime.experiments.register("APCA","Enable new Advanced Perceptual Contrast Algorithm (APCA) replacing previous contrast ratio and AA/AAA guidelines",void 0,"https://developer.chrome.com/blog/new-in-devtools-89/#apca"),i.Runtime.experiments.register("fullAccessibilityTree","Enable full accessibility tree view in the Elements panel",void 0,"https://developer.chrome.com/blog/new-in-devtools-90/#accesibility-tree","https://g.co/devtools/a11y-tree-feedback"),i.Runtime.experiments.register("fontEditor","Enable new Font Editor tool within the Styles Pane.",void 0,"https://developer.chrome.com/blog/new-in-devtools-89/#font"),i.Runtime.experiments.register("contrastIssues","Enable automatic contrast issue reporting via the Issues panel",void 0,"https://developer.chrome.com/blog/new-in-devtools-90/#low-contrast"),i.Runtime.experiments.register("experimentalCookieFeatures","Enable experimental cookie features"),i.Runtime.experiments.register("cssTypeComponentLength","Enable CSS <length> authoring tool in the Styles pane",void 0,"https://developer.chrome.com/blog/new-in-devtools-96/#length","https://g.co/devtools/length-feedback"),i.Runtime.experiments.register(i.Runtime.ExperimentName.PRECISE_CHANGES,"Display more precise changes in the Changes tab"),i.Runtime.experiments.register(i.Runtime.ExperimentName.STYLES_PANE_CSS_CHANGES,"Sync CSS changes in the Styles pane"),i.Runtime.experiments.register(i.Runtime.ExperimentName.HIGHLIGHT_ERRORS_ELEMENTS_PANEL,"Highlights a violating node or attribute in the Elements panel DOM tree"),i.Runtime.experiments.register(i.Runtime.ExperimentName.HEADER_OVERRIDES,"Local overrides for response headers"),i.Runtime.experiments.register(i.Runtime.ExperimentName.EYEDROPPER_COLOR_PICKER,"Enable color picking outside the browser window"),i.Runtime.experiments.register(i.Runtime.ExperimentName.AUTHORED_DEPLOYED_GROUPING,"Group sources into Authored and Deployed trees",void 0,"https://goo.gle/authored-deployed","https://goo.gle/authored-deployed-feedback"),i.Runtime.experiments.register(i.Runtime.ExperimentName.JUST_MY_CODE,"Hide ignore-listed code in sources tree view"),i.Runtime.experiments.register(i.Runtime.ExperimentName.IMPORTANT_DOM_PROPERTIES,"Highlight important DOM properties in the Object Properties viewer"),i.Runtime.experiments.register(i.Runtime.ExperimentName.PRELOADING_STATUS_PANEL,"Enable Preloading Status Panel in Application panel",!0),i.Runtime.experiments.register(i.Runtime.ExperimentName.DISABLE_COLOR_FORMAT_SETTING,"Disable the deprecated `Color format` setting (requires reloading DevTools)",!1),i.Runtime.experiments.register(i.Runtime.ExperimentName.OUTERMOST_TARGET_SELECTOR,"Enable background page selector (e.g. for prerendering debugging)",!1),i.Runtime.experiments.enableExperimentsByDefault(["sourceOrderViewer","cssTypeComponentLength",i.Runtime.ExperimentName.PRECISE_CHANGES,..."EyeDropper"in window?[i.Runtime.ExperimentName.EYEDROPPER_COLOR_PICKER]:[],"keyboardShortcutEditor","sourcesPrettyPrint",i.Runtime.ExperimentName.DISABLE_COLOR_FORMAT_SETTING,i.Runtime.ExperimentName.TIMELINE_AS_CONSOLE_PROFILE_RESULT_PANEL,i.Runtime.ExperimentName.WASM_DWARF_DEBUGGING,i.Runtime.ExperimentName.HEADER_OVERRIDES]),i.Runtime.experiments.setNonConfigurableExperiments([..."EyeDropper"in window?[]:[i.Runtime.ExperimentName.EYEDROPPER_COLOR_PICKER]]),i.Runtime.experiments.cleanUpStaleExperiments();const e=i.Runtime.Runtime.queryParam("enabledExperiments");if(e&&i.Runtime.experiments.setServerEnabledExperiments(e.split(";")),i.Runtime.experiments.enableExperimentsTransiently(["bfcacheDisplayTree","webauthnPane","developerResourcesView"]),n.InspectorFrontendHost.isUnderTest()){const e=i.Runtime.Runtime.queryParam("test");e&&e.includes("live-line-level-heap-profile.js")&&i.Runtime.experiments.enableForTest("liveHeapProfile")}for(const e of i.Runtime.experiments.enabledExperiments())n.userMetrics.experimentEnabledAtLaunch(e.name)}async#x(){R.time("Main._createAppUI"),self.UI.viewManager=x.ViewManager.ViewManager.instance(),self.Persistence.isolatedFileSystemManager=g.IsolatedFileSystemManager.IsolatedFileSystemManager.instance();const o=t.Settings.Settings.instance().createSetting("uiTheme","systemPreferred");x.UIUtils.initializeUIUtils(document),v.ThemeSupport.hasInstance()||v.ThemeSupport.instance({forceNew:!0,setting:o}),v.ThemeSupport.instance().applyTheme(document);const r=()=>{v.ThemeSupport.instance().applyTheme(document)},s=window.matchMedia("(prefers-color-scheme: dark)"),h=window.matchMedia("(forced-colors: active)");s.addEventListener("change",r),h.addEventListener("change",r),o.addChangeListener(r),x.UIUtils.installComponentRootStyles(document.body),this.#E(document);const f=Boolean(i.Runtime.Runtime.queryParam("can_dock"));self.UI.zoomManager=x.ZoomManager.ZoomManager.instance({forceNew:!0,win:window,frontendHost:n.InspectorFrontendHost.InspectorFrontendHostInstance}),self.UI.inspectorView=x.InspectorView.InspectorView.instance(),x.ContextMenu.ContextMenu.initialize(),x.ContextMenu.ContextMenu.installHandler(document),m.NetworkLog.NetworkLog.instance(),e.FrameManager.FrameManager.instance(),m.LogManager.LogManager.instance(),d.IssuesManager.IssuesManager.instance({forceNew:!0,ensureFirst:!0,showThirdPartyIssuesSetting:d.Issue.getShowThirdPartyIssuesSetting(),hideIssueSetting:d.IssuesManager.getHideIssueByCodeSetting()}),d.ContrastCheckTrigger.ContrastCheckTrigger.instance(),self.UI.dockController=x.DockController.DockController.instance({forceNew:!0,canDock:f}),self.SDK.multitargetNetworkManager=e.NetworkManager.MultitargetNetworkManager.instance({forceNew:!0}),self.SDK.domDebuggerManager=e.DOMDebuggerModel.DOMDebuggerManager.instance({forceNew:!0}),e.TargetManager.TargetManager.instance().addEventListener(e.TargetManager.Events.SuspendStateChanged,this.#I.bind(this)),self.Workspace.fileManager=p.FileManager.FileManager.instance({forceNew:!0}),self.Workspace.workspace=p.Workspace.WorkspaceImpl.instance(),self.Bindings.networkProjectManager=a.NetworkProject.NetworkProjectManager.instance();const w=new a.ResourceMapping.ResourceMapping(e.TargetManager.TargetManager.instance(),p.Workspace.WorkspaceImpl.instance());self.Bindings.resourceMapping=w,new a.PresentationConsoleMessageHelper.PresentationConsoleMessageManager,self.Bindings.cssWorkspaceBinding=a.CSSWorkspaceBinding.CSSWorkspaceBinding.instance({forceNew:!0,resourceMapping:w,targetManager:e.TargetManager.TargetManager.instance()}),self.Bindings.debuggerWorkspaceBinding=a.DebuggerWorkspaceBinding.DebuggerWorkspaceBinding.instance({forceNew:!0,resourceMapping:w,targetManager:e.TargetManager.TargetManager.instance()}),e.TargetManager.TargetManager.instance().setScopeTarget(e.TargetManager.TargetManager.instance().primaryPageTarget()),x.Context.Context.instance().addFlavorChangeListener(e.Target.Target,(({data:t})=>{const n=t?.outermostTarget();e.TargetManager.TargetManager.instance().setScopeTarget(n)})),self.Bindings.breakpointManager=l.BreakpointManager.BreakpointManager.instance({forceNew:!0,workspace:p.Workspace.WorkspaceImpl.instance(),targetManager:e.TargetManager.TargetManager.instance(),debuggerWorkspaceBinding:a.DebuggerWorkspaceBinding.DebuggerWorkspaceBinding.instance()}),self.Extensions.extensionServer=c.ExtensionServer.ExtensionServer.instance({forceNew:!0}),new g.FileSystemWorkspaceBinding.FileSystemWorkspaceBinding(g.IsolatedFileSystemManager.IsolatedFileSystemManager.instance(),p.Workspace.WorkspaceImpl.instance()),g.IsolatedFileSystemManager.IsolatedFileSystemManager.instance().addPlatformFileSystem("snippet://",new u.ScriptSnippetFileSystem.SnippetFileSystem),self.Persistence.persistence=g.Persistence.PersistenceImpl.instance({forceNew:!0,workspace:p.Workspace.WorkspaceImpl.instance(),breakpointManager:l.BreakpointManager.BreakpointManager.instance()}),self.Persistence.networkPersistenceManager=g.NetworkPersistenceManager.NetworkPersistenceManager.instance({forceNew:!0,workspace:p.Workspace.WorkspaceImpl.instance()}),self.Host.Platform=n.Platform,new E(e.TargetManager.TargetManager.instance(),x.Context.Context.instance()),self.Bindings.ignoreListManager=a.IgnoreListManager.IgnoreListManager.instance({forceNew:!0,debuggerWorkspaceBinding:a.DebuggerWorkspaceBinding.DebuggerWorkspaceBinding.instance()}),new _;const S=x.ActionRegistry.ActionRegistry.instance({forceNew:!0});self.UI.actionRegistry=S,self.UI.shortcutRegistry=x.ShortcutRegistry.ShortcutRegistry.instance({forceNew:!0,actionRegistry:S}),this.#b(),R.timeEnd("Main._createAppUI");const I=t.AppProvider.getRegisteredAppProviders()[0];if(!I)throw new Error("Unable to boot DevTools, as the appprovider is missing");await this.#M(await I.loadAppProvider())}async#M(e){R.time("Main._showAppUI");const t=e.createApp();x.DockController.DockController.instance().initialize(),t.presentUI(document);const o=x.ActionRegistry.ActionRegistry.instance().action("elements.toggle-element-search");o&&n.InspectorFrontendHost.InspectorFrontendHostInstance.events.addEventListener(n.InspectorFrontendHostAPI.Events.EnterInspectElementMode,(()=>{o.execute()}),this),n.InspectorFrontendHost.InspectorFrontendHostInstance.events.addEventListener(n.InspectorFrontendHostAPI.Events.RevealSourceLine,this.#T,this),await x.InspectorView.InspectorView.instance().createToolbars(),n.InspectorFrontendHost.InspectorFrontendHostInstance.loadCompleted();const r=i.Runtime.Runtime.queryParam("loadTimelineFromURL");null!==r&&h.TimelinePanel.LoadTimelineHandler.instance().handleQueryParam(r),x.ARIAUtils.alertElementInstance(),x.DockController.DockController.instance().announceDockLocation(),window.setTimeout(this.#R.bind(this),0),R.timeEnd("Main._showAppUI")}async#R(){R.time("Main._initializeTarget");for(const e of t.Runnable.earlyInitializationRunnables())await e().run();n.InspectorFrontendHost.InspectorFrontendHostInstance.readyForTest(),this.#f(),window.setTimeout(this.#C.bind(this),100),R.timeEnd("Main._initializeTarget")}#C(){R.time("Main._lateInitialization"),c.ExtensionServer.ExtensionServer.instance().initializeExtensions();const e=t.Runnable.lateInitializationRunnables().map((async e=>(await e()).run()));if(i.Runtime.experiments.isEnabled("liveHeapProfile")){const n="memoryLiveHeapProfile";if(t.Settings.Settings.instance().moduleSetting(n).get())e.push(w.LiveHeapProfile.LiveHeapProfile.instance().run());else{const e=async o=>{o.data&&(t.Settings.Settings.instance().moduleSetting(n).removeChangeListener(e),w.LiveHeapProfile.LiveHeapProfile.instance().run())};t.Settings.Settings.instance().moduleSetting(n).addChangeListener(e)}}this.#u=Promise.all(e).then((()=>{})),R.timeEnd("Main._lateInitialization")}lateInitDonePromiseForTest(){return this.#u}readyForTest(){return this.#h}#b(){t.Console.Console.instance().addEventListener(t.Console.Events.MessageAdded,(function({data:e}){e.show&&t.Console.Console.instance().show()}))}#T(e){const{url:n,lineNumber:o,columnNumber:r}=e.data,s=p.Workspace.WorkspaceImpl.instance().uiSourceCodeForURL(n);s?t.Revealer.reveal(s.uiLocation(o,r)):p.Workspace.WorkspaceImpl.instance().addEventListener(p.Workspace.Events.UISourceCodeAdded,(function e(s){const i=s.data;i.url()===n&&(t.Revealer.reveal(i.uiLocation(o,r)),p.Workspace.WorkspaceImpl.instance().removeEventListener(p.Workspace.Events.UISourceCodeAdded,e))}))}#k(e){e.handled||x.ShortcutRegistry.ShortcutRegistry.instance().handleShortcut(e)}#D(e){const t=new CustomEvent("clipboard-"+e.type,{bubbles:!0});t.original=e;const n=e.target&&e.target.ownerDocument,o=n?r.DOMUtilities.deepActiveElement(n):null;o&&o.dispatchEvent(t),t.handled&&e.preventDefault()}#P(e){(e.handled||e.target.classList.contains("popup-glasspane"))&&e.preventDefault()}#E(e){e.addEventListener("keydown",this.#k.bind(this),!1),e.addEventListener("beforecopy",this.#D.bind(this),!0),e.addEventListener("copy",this.#D.bind(this),!1),e.addEventListener("cut",this.#D.bind(this),!1),e.addEventListener("paste",this.#D.bind(this),!1),e.addEventListener("contextmenu",this.#P.bind(this),!0)}#I(){const t=e.TargetManager.TargetManager.instance().allTargetsSuspended();x.InspectorView.InspectorView.instance().onSuspendStateChanged(t)}static instanceForTest=null}let C,k,D,P,y;globalThis.Main=globalThis.Main||{},globalThis.Main.Main=R;class L{static instance(e={forceNew:null}){const{forceNew:t}=e;return C&&!t||(C=new L),C}handleAction(e,t){if(n.InspectorFrontendHost.InspectorFrontendHostInstance.isHostedMode())return!1;switch(t){case"main.zoom-in":return n.InspectorFrontendHost.InspectorFrontendHostInstance.zoomIn(),!0;case"main.zoom-out":return n.InspectorFrontendHost.InspectorFrontendHostInstance.zoomOut(),!0;case"main.zoom-reset":return n.InspectorFrontendHost.InspectorFrontendHostInstance.resetZoom(),!0}return!1}}class F{static instance(e={forceNew:null}){const{forceNew:t}=e;return k&&!t||(k=new F),k}handleAction(e,t){let n=x.SearchableView.SearchableView.fromElement(r.DOMUtilities.deepActiveElement(document));if(!n){const e=x.InspectorView.InspectorView.instance().currentPanelDeprecated();if(e&&e.searchableView&&(n=e.searchableView()),!n)return!1}switch(t){case"main.search-in-panel.find":return n.handleFindShortcut();case"main.search-in-panel.cancel":return n.handleCancelSearchShortcut();case"main.search-in-panel.find-next":return n.handleFindNextShortcut();case"main.search-in-panel.find-previous":return n.handleFindPreviousShortcut()}return!1}}class A{#y;constructor(){this.#y=new x.Toolbar.ToolbarMenuButton(this.#L.bind(this),!0),this.#y.element.classList.add("main-menu"),this.#y.setTitle(T(b.customizeAndControlDevtools))}static instance(e={forceNew:null}){const{forceNew:t}=e;return D&&!t||(D=new A),D}item(){return this.#y}#L(t){if(x.DockController.DockController.instance().canDock()){const e=document.createElement("div");e.classList.add("flex-centered"),e.classList.add("flex-auto"),e.classList.add("location-menu"),e.tabIndex=-1,x.ARIAUtils.setLabel(e,b.dockSide+b.dockSideNaviation);const n=e.createChild("span","dockside-title");n.textContent=T(b.dockSide);const o=x.ShortcutRegistry.ShortcutRegistry.instance().shortcutsForAction("main.toggle-dock");x.Tooltip.Tooltip.install(n,T(b.placementOfDevtoolsRelativeToThe,{PH1:o[0].title()})),e.appendChild(n);const i=new x.Toolbar.Toolbar("",e);i.makeBlueOnHover();const a=new x.Toolbar.ToolbarToggle(T(b.undockIntoSeparateWindow),"dock-window"),l=new x.Toolbar.ToolbarToggle(T(b.dockToBottom),"dock-bottom"),c=new x.Toolbar.ToolbarToggle(T(b.dockToRight),"dock-right"),d=new x.Toolbar.ToolbarToggle(T(b.dockToLeft),"dock-left");a.addEventListener(x.Toolbar.ToolbarButton.Events.MouseDown,(e=>e.data.consume())),l.addEventListener(x.Toolbar.ToolbarButton.Events.MouseDown,(e=>e.data.consume())),c.addEventListener(x.Toolbar.ToolbarButton.Events.MouseDown,(e=>e.data.consume())),d.addEventListener(x.Toolbar.ToolbarButton.Events.MouseDown,(e=>e.data.consume())),a.addEventListener(x.Toolbar.ToolbarButton.Events.Click,s.bind(null,"undocked")),l.addEventListener(x.Toolbar.ToolbarButton.Events.Click,s.bind(null,"bottom")),c.addEventListener(x.Toolbar.ToolbarButton.Events.Click,s.bind(null,"right")),d.addEventListener(x.Toolbar.ToolbarButton.Events.Click,s.bind(null,"left")),a.setToggled("undocked"===x.DockController.DockController.instance().dockSide()),l.setToggled("bottom"===x.DockController.DockController.instance().dockSide()),c.setToggled("right"===x.DockController.DockController.instance().dockSide()),d.setToggled("left"===x.DockController.DockController.instance().dockSide()),i.appendToolbarItem(a),i.appendToolbarItem(d),i.appendToolbarItem(l),i.appendToolbarItem(c),e.addEventListener("keydown",(t=>{let n=0;if("ArrowLeft"===t.key)n=-1;else{if("ArrowRight"!==t.key){if("ArrowDown"===t.key){return void e.closest(".soft-context-menu")?.dispatchEvent(new KeyboardEvent("keydown",{key:"ArrowDown"}))}return}n=1}const o=[a,d,l,c];let s=o.findIndex((e=>e.element.hasFocus()));s=r.NumberUtilities.clamp(s+n,0,o.length-1),o[s].element.focus(),t.consume(!0)})),t.headerSection().appendCustomItem(e)}const o=this.#y.element;function s(e){x.DockController.DockController.instance().once("AfterDockSideChanged").then((()=>{o.focus()})),x.DockController.DockController.instance().setDockSide(e),t.discard()}if("undocked"===x.DockController.DockController.instance().dockSide()){const n=e.TargetManager.TargetManager.instance().primaryPageTarget();n&&n.type()===e.Target.Type.Frame&&t.defaultSection().appendAction("inspector_main.focus-debuggee",T(b.focusDebuggee))}t.defaultSection().appendAction("main.toggle-drawer",x.InspectorView.InspectorView.instance().drawerVisible()?T(b.hideConsoleDrawer):T(b.showConsoleDrawer)),t.appendItemsAtLocation("mainMenu");const i=t.defaultSection().appendSubMenuItem(T(b.moreTools)),a=x.ViewManager.getRegisteredViewExtensions();a.sort(((e,t)=>{const n=e.title(),o=t.title();return n.localeCompare(o)}));for(const e of a){const t=e.location(),o=e.persistence(),r=e.title(),s=e.viewId();if("issues-pane"!==s){if("closeable"===o&&("drawer-view"===t||"panel"===t))if(e.isPreviewFeature()){const e=new f.Icon.Icon;e.data={iconName:"experiment",color:"var(--icon-default)",width:"16px",height:"16px"},i.defaultSection().appendItem(r,(()=>{x.ViewManager.ViewManager.instance().showView(s,!0,!1)}),!1,e)}else i.defaultSection().appendItem(r,(()=>{x.ViewManager.ViewManager.instance().showView(s,!0,!1)}))}else i.defaultSection().appendItem(r,(()=>{n.userMetrics.issuesPanelOpenedFrom(n.UserMetrics.IssueOpener.HamburgerMenu),x.ViewManager.ViewManager.instance().showView("issues-pane",!0)}))}t.footerSection().appendSubMenuItem(T(b.help)).appendItemsAtLocation("mainMenuHelp")}}class N{#F;constructor(){this.#F=x.Toolbar.Toolbar.createActionButtonForId("settings.show",{showLabel:!1,userActionCode:void 0})}static instance(e={forceNew:null}){const{forceNew:t}=e;return P&&!t||(P=new N),P}item(){return this.#F}}class _{constructor(){e.TargetManager.TargetManager.instance().addModelListener(e.DebuggerModel.DebuggerModel,e.DebuggerModel.Events.DebuggerPaused,this.#A,this)}#A(n){e.TargetManager.TargetManager.instance().removeModelListener(e.DebuggerModel.DebuggerModel,e.DebuggerModel.Events.DebuggerPaused,this.#A,this);const o=n.data,r=o.debuggerPausedDetails();x.Context.Context.instance().setFlavor(e.Target.Target,o.target()),t.Revealer.reveal(r)}}class H{static instance(e={forceNew:null}){const{forceNew:t}=e;return y&&!t||(y=new H),y}handleAction(e,t){return"main.debug-reload"===t&&(S.Reload.reload(),!0)}}var O=Object.freeze({__proto__:null,MainImpl:R,ZoomActionDelegate:L,SearchActionDelegate:F,MainMenuItem:A,SettingsButtonProvider:N,PauseListener:_,sendOverProtocol:function(e,t){return new Promise(((n,o)=>{const r=s.InspectorBackend.test.sendRawMessage;if(!r)return o("Unable to send message to test client");r(e,t,((e,...t)=>e?o(e):n(t)))}))},ReloadActionDelegate:H});class U{presentUI(e){const t=new x.RootView.RootView;x.InspectorView.InspectorView.instance().show(t.element),t.attachToDocument(e),t.focus()}}let B;class V{static instance(e={forceNew:null}){const{forceNew:t}=e;return B&&!t||(B=new V),B}createApp(){return new U}}var W=Object.freeze({__proto__:null,SimpleApp:U,SimpleAppProvider:V});export{I as ExecutionContextSelector,O as MainImpl,W as SimpleApp}; | ||
import*as e from"../../core/sdk/sdk.js";import*as t from"../../core/common/common.js";import*as n from"../../core/host/host.js";import*as o from"../../core/i18n/i18n.js";import*as r from"../../core/platform/platform.js";import*as s from"../../core/protocol_client/protocol_client.js";import*as i from"../../core/root/root.js";import*as a from"../../models/bindings/bindings.js";import*as l from"../../models/breakpoints/breakpoints.js";import*as c from"../../models/extensions/extensions.js";import*as d from"../../models/issues_manager/issues_manager.js";import*as g from"../../models/logs/logs.js";import*as m from"../../models/persistence/persistence.js";import*as p from"../../models/workspace/workspace.js";import*as u from"../../panels/snippets/snippets.js";import*as h from"../../panels/timeline/timeline.js";import*as f from"../../ui/components/icon_button/icon_button.js";import*as w from"../../ui/legacy/components/perf_ui/perf_ui.js";import*as S from"../../ui/legacy/components/utils/utils.js";import*as x from"../../ui/legacy/legacy.js";import*as v from"../../ui/legacy/theme_support/theme_support.js";class E{#e;#t;#n;#o;constructor(t,n){n.addFlavorChangeListener(e.RuntimeModel.ExecutionContext,this.#r,this),n.addFlavorChangeListener(e.Target.Target,this.#s,this),t.addModelListener(e.RuntimeModel.RuntimeModel,e.RuntimeModel.Events.ExecutionContextCreated,this.#i,this),t.addModelListener(e.RuntimeModel.RuntimeModel,e.RuntimeModel.Events.ExecutionContextDestroyed,this.#a,this),t.addModelListener(e.RuntimeModel.RuntimeModel,e.RuntimeModel.Events.ExecutionContextOrderChanged,this.#l,this),this.#e=t,this.#t=n,t.observeModels(e.RuntimeModel.RuntimeModel,this)}modelAdded(t){queueMicrotask(function(){this.#t.flavor(e.Target.Target)||this.#t.setFlavor(e.Target.Target,t.target())}.bind(this))}modelRemoved(t){const n=this.#t.flavor(e.RuntimeModel.ExecutionContext);n&&n.runtimeModel===t&&this.#c();const o=this.#e.models(e.RuntimeModel.RuntimeModel);this.#t.flavor(e.Target.Target)===t.target()&&o.length&&this.#t.setFlavor(e.Target.Target,o[0].target())}#r({data:t}){t&&(this.#t.setFlavor(e.Target.Target,t.target()),this.#o||(this.#n=this.#d(t)))}#d(e){return e.isDefault?e.target().name()+":"+e.frameId:""}#s({data:t}){const n=this.#t.flavor(e.RuntimeModel.ExecutionContext);if(!t||n&&n.target()===t)return;const o=t.model(e.RuntimeModel.RuntimeModel),r=o?o.executionContexts():[];if(!r.length)return;let s=null;for(let e=0;e<r.length&&!s;++e)this.#g(r[e])&&(s=r[e]);for(let e=0;e<r.length&&!s;++e)this.#m(r[e])&&(s=r[e]);this.#o=!0,this.#t.setFlavor(e.RuntimeModel.ExecutionContext,s||r[0]),this.#o=!1}#g(e){return!e.target().targetInfo()?.subtype&&(!(!this.#n||this.#n!==this.#d(e))||!this.#n&&this.#m(e))}#m(t){if(!t.isDefault||!t.frameId)return!1;if(t.target().parentTarget()?.type()===e.Target.Type.Frame)return!1;const n=t.target().model(e.ResourceTreeModel.ResourceTreeModel),o=n&&n.frameForId(t.frameId);return Boolean(o?.isOutermostFrame())}#i(e){this.#p(e.data)}#a(t){const n=t.data;this.#t.flavor(e.RuntimeModel.ExecutionContext)===n&&this.#c()}#l(e){const t=e.data.executionContexts();for(let e=0;e<t.length&&!this.#p(t[e]);e++);}#p(t){return!(this.#t.flavor(e.RuntimeModel.ExecutionContext)&&!this.#g(t))&&(this.#o=!0,this.#t.setFlavor(e.RuntimeModel.ExecutionContext,t),this.#o=!1,!0)}#c(){const t=this.#e.models(e.RuntimeModel.RuntimeModel);let n=null;for(let e=0;e<t.length&&!n;++e){const o=t[e].executionContexts();for(const e of o)if(this.#m(e)){n=e;break}}if(!n)for(let e=0;e<t.length&&!n;++e){const o=t[e].executionContexts();if(o.length){n=o[0];break}}this.#o=!0,this.#t.setFlavor(e.RuntimeModel.ExecutionContext,n),this.#o=!1}}var I=Object.freeze({__proto__:null,ExecutionContextSelector:E});const M={customizeAndControlDevtools:"Customize and control DevTools",dockSide:"Dock side",placementOfDevtoolsRelativeToThe:"Placement of DevTools relative to the page. ({PH1} to restore last position)",undockIntoSeparateWindow:"Undock into separate window",dockToBottom:"Dock to bottom",dockToRight:"Dock to right",dockToLeft:"Dock to left",focusDebuggee:"Focus debuggee",hideConsoleDrawer:"Hide console drawer",showConsoleDrawer:"Show console drawer",moreTools:"More tools",help:"Help",dockSideNaviation:"Use left and right arrow keys to navigate the options"},T=o.i18n.registerUIStrings("entrypoints/main/MainImpl.ts",M),b=o.i18n.getLocalizedString.bind(void 0,T);class R{#u;#h;#f;constructor(){R.instanceForTest=this,this.#h=new Promise((e=>{this.#f=e})),this.#w()}static time(e){n.InspectorFrontendHost.isUnderTest()||console.time(e)}static timeEnd(e){n.InspectorFrontendHost.isUnderTest()||console.timeEnd(e)}async#w(){console.timeStamp("Main._loaded"),i.Runtime.Runtime.setPlatform(n.Platform.platform());const e=await new Promise((e=>{n.InspectorFrontendHost.InspectorFrontendHostInstance.getPreferences(e)}));console.timeStamp("Main._gotPreferences"),this.#S(),this.createSettings(e),await this.requestAndRegisterLocaleData(),n.userMetrics.syncSetting(t.Settings.Settings.instance().moduleSetting("sync_preferences").get()),this.#x()}#S(){self.Common=self.Common||{},self.UI=self.UI||{},self.UI.panels=self.UI.panels||{},self.SDK=self.SDK||{},self.Bindings=self.Bindings||{},self.Persistence=self.Persistence||{},self.Workspace=self.Workspace||{},self.Extensions=self.Extensions||{},self.Host=self.Host||{},self.Host.userMetrics=self.Host.userMetrics||n.userMetrics,self.Host.UserMetrics=self.Host.UserMetrics||n.UserMetrics,self.ProtocolClient=self.ProtocolClient||{},self.ProtocolClient.test=self.ProtocolClient.test||s.InspectorBackend.test}async requestAndRegisterLocaleData(){const e=t.Settings.Settings.instance().moduleSetting("language").get(),r=o.DevToolsLocale.DevToolsLocale.instance({create:!0,data:{navigatorLanguage:navigator.language,settingLanguage:e,lookupClosestDevToolsLocale:o.i18n.lookupClosestSupportedDevToolsLocale}});n.userMetrics.language(r.locale),"en-US"!==r.locale&&await o.i18n.fetchAndRegisterLocaleData("en-US");try{await o.i18n.fetchAndRegisterLocaleData(r.locale)}catch(e){console.warn(`Unable to fetch & register locale data for '${r.locale}', falling back to 'en-US'. Cause: `,e),r.forceFallbackLocale()}}createSettings(e){this.#v();let o,r="";if(n.Platform.isCustomDevtoolsFrontend()?r="__custom__":i.Runtime.Runtime.queryParam("can_dock")||!Boolean(i.Runtime.Runtime.queryParam("debugFrontend"))||n.InspectorFrontendHost.isUnderTest()||(r="__bundled__"),!n.InspectorFrontendHost.isUnderTest()&&window.localStorage){const e={...t.Settings.NOOP_STORAGE,clear:()=>window.localStorage.clear()};o=new t.Settings.SettingsStorage(window.localStorage,e,r)}else o=new t.Settings.SettingsStorage({},t.Settings.NOOP_STORAGE,r);const s={register:e=>n.InspectorFrontendHost.InspectorFrontendHostInstance.registerPreference(e,{synced:!1}),set:n.InspectorFrontendHost.InspectorFrontendHostInstance.setPreference,get:e=>new Promise((t=>{n.InspectorFrontendHost.InspectorFrontendHostInstance.getPreference(e,t)})),remove:n.InspectorFrontendHost.InspectorFrontendHostInstance.removePreference,clear:n.InspectorFrontendHost.InspectorFrontendHostInstance.clearPreferences},a={...s,register:e=>n.InspectorFrontendHost.InspectorFrontendHostInstance.registerPreference(e,{synced:!0})},l=new t.Settings.SettingsStorage(e,a,r),c=new t.Settings.SettingsStorage(e,s,r);t.Settings.Settings.instance({forceNew:!0,syncedStorage:l,globalStorage:c,localStorage:o}),self.Common.settings=t.Settings.Settings.instance(),n.InspectorFrontendHost.isUnderTest()||(new t.Settings.VersionController).updateVersion()}#v(){i.Runtime.experiments.register("applyCustomStylesheet","Allow extensions to load custom stylesheets"),i.Runtime.experiments.register("captureNodeCreationStacks","Capture node creation stacks"),i.Runtime.experiments.register("sourcesPrettyPrint","Automatically pretty print minified sources"),i.Runtime.experiments.register("ignoreListJSFramesOnTimeline","Ignore List for JavaScript frames on Timeline",!0),i.Runtime.experiments.register("liveHeapProfile","Live heap profile",!0),i.Runtime.experiments.register("protocolMonitor","Protocol Monitor",void 0,"https://developer.chrome.com/blog/new-in-devtools-92/#protocol-monitor"),i.Runtime.experiments.register("developerResourcesView","Show developer resources view"),i.Runtime.experiments.register("cspViolationsView","Show CSP Violations view",void 0,"https://developer.chrome.com/blog/new-in-devtools-89/#csp"),i.Runtime.experiments.register("samplingHeapProfilerTimeline","Sampling heap profiler timeline",!0),i.Runtime.experiments.register("showOptionToExposeInternalsInHeapSnapshot","Show option to expose internals in heap snapshots"),i.Runtime.experiments.register("sourceOrderViewer","Source order viewer",void 0,"https://developer.chrome.com/blog/new-in-devtools-92/#source-order"),i.Runtime.experiments.register("webauthnPane","WebAuthn Pane"),i.Runtime.experiments.register("keyboardShortcutEditor","Enable keyboard shortcut editor",!1,"https://developer.chrome.com/blog/new-in-devtools-88/#keyboard-shortcuts"),i.Runtime.experiments.register("bfcacheDisplayTree","Show back/forward cache blocking reasons in the frame tree structure view"),i.Runtime.experiments.register("timelineEventInitiators","Timeline: event initiators"),i.Runtime.experiments.register("timelineInvalidationTracking","Timeline: invalidation tracking",!0),i.Runtime.experiments.register("timelineShowAllEvents","Timeline: show all events",!0),i.Runtime.experiments.register("timelineV8RuntimeCallStats","Timeline: V8 Runtime Call Stats on Timeline",!0),i.Runtime.experiments.register("timelineAsConsoleProfileResultPanel","View console.profile() results in the Performance panel for Node.js",!0),i.Runtime.experiments.register("wasmDWARFDebugging","WebAssembly Debugging: Enable DWARF support",void 0,"https://developer.chrome.com/blog/wasm-debugging-2020/"),i.Runtime.experiments.register("evaluateExpressionsWithSourceMaps","Resolve variable names in expressions using source maps",void 0),i.Runtime.experiments.register("instrumentationBreakpoints","Enable instrumentation breakpoints",!0),i.Runtime.experiments.register("setAllBreakpointsEagerly","Set all breakpoints eagerly at startup",!0),i.Runtime.experiments.register("dualScreenSupport","Emulation: Support dual screen mode",void 0,"https://developer.chrome.com/blog/new-in-devtools-89#dual-screen"),i.Runtime.experiments.setEnabled("dualScreenSupport",!0),i.Runtime.experiments.register("APCA","Enable new Advanced Perceptual Contrast Algorithm (APCA) replacing previous contrast ratio and AA/AAA guidelines",void 0,"https://developer.chrome.com/blog/new-in-devtools-89/#apca"),i.Runtime.experiments.register("fullAccessibilityTree","Enable full accessibility tree view in the Elements panel",void 0,"https://developer.chrome.com/blog/new-in-devtools-90/#accesibility-tree","https://g.co/devtools/a11y-tree-feedback"),i.Runtime.experiments.register("fontEditor","Enable new Font Editor tool within the Styles Pane.",void 0,"https://developer.chrome.com/blog/new-in-devtools-89/#font"),i.Runtime.experiments.register("contrastIssues","Enable automatic contrast issue reporting via the Issues panel",void 0,"https://developer.chrome.com/blog/new-in-devtools-90/#low-contrast"),i.Runtime.experiments.register("experimentalCookieFeatures","Enable experimental cookie features"),i.Runtime.experiments.register("cssTypeComponentLength","Enable CSS <length> authoring tool in the Styles pane",void 0,"https://developer.chrome.com/blog/new-in-devtools-96/#length","https://g.co/devtools/length-feedback"),i.Runtime.experiments.register(i.Runtime.ExperimentName.PRECISE_CHANGES,"Display more precise changes in the Changes tab"),i.Runtime.experiments.register(i.Runtime.ExperimentName.STYLES_PANE_CSS_CHANGES,"Sync CSS changes in the Styles pane"),i.Runtime.experiments.register(i.Runtime.ExperimentName.HIGHLIGHT_ERRORS_ELEMENTS_PANEL,"Highlights a violating node or attribute in the Elements panel DOM tree"),i.Runtime.experiments.register(i.Runtime.ExperimentName.HEADER_OVERRIDES,"Local overrides for response headers"),i.Runtime.experiments.register(i.Runtime.ExperimentName.EYEDROPPER_COLOR_PICKER,"Enable color picking outside the browser window"),i.Runtime.experiments.register(i.Runtime.ExperimentName.AUTHORED_DEPLOYED_GROUPING,"Group sources into Authored and Deployed trees",void 0,"https://goo.gle/authored-deployed","https://goo.gle/authored-deployed-feedback"),i.Runtime.experiments.register(i.Runtime.ExperimentName.JUST_MY_CODE,"Hide ignore-listed code in sources tree view"),i.Runtime.experiments.register(i.Runtime.ExperimentName.IMPORTANT_DOM_PROPERTIES,"Highlight important DOM properties in the Object Properties viewer"),i.Runtime.experiments.register(i.Runtime.ExperimentName.PRELOADING_STATUS_PANEL,"Enable Preloading Status Panel in Application panel",!0),i.Runtime.experiments.register(i.Runtime.ExperimentName.DISABLE_COLOR_FORMAT_SETTING,"Disable the deprecated `Color format` setting (requires reloading DevTools)",!1),i.Runtime.experiments.register(i.Runtime.ExperimentName.OUTERMOST_TARGET_SELECTOR,"Enable background page selector (e.g. for prerendering debugging)",!1),i.Runtime.experiments.enableExperimentsByDefault(["sourceOrderViewer","cssTypeComponentLength",i.Runtime.ExperimentName.PRECISE_CHANGES,..."EyeDropper"in window?[i.Runtime.ExperimentName.EYEDROPPER_COLOR_PICKER]:[],"keyboardShortcutEditor","sourcesPrettyPrint",i.Runtime.ExperimentName.DISABLE_COLOR_FORMAT_SETTING,i.Runtime.ExperimentName.TIMELINE_AS_CONSOLE_PROFILE_RESULT_PANEL,i.Runtime.ExperimentName.WASM_DWARF_DEBUGGING,i.Runtime.ExperimentName.HEADER_OVERRIDES]),i.Runtime.experiments.setNonConfigurableExperiments([..."EyeDropper"in window?[]:[i.Runtime.ExperimentName.EYEDROPPER_COLOR_PICKER]]),i.Runtime.experiments.cleanUpStaleExperiments();const e=i.Runtime.Runtime.queryParam("enabledExperiments");if(e&&i.Runtime.experiments.setServerEnabledExperiments(e.split(";")),i.Runtime.experiments.enableExperimentsTransiently(["bfcacheDisplayTree","webauthnPane","developerResourcesView"]),n.InspectorFrontendHost.isUnderTest()){const e=i.Runtime.Runtime.queryParam("test");e&&e.includes("live-line-level-heap-profile.js")&&i.Runtime.experiments.enableForTest("liveHeapProfile")}for(const e of i.Runtime.experiments.enabledExperiments())n.userMetrics.experimentEnabledAtLaunch(e.name)}async#x(){R.time("Main._createAppUI"),self.UI.viewManager=x.ViewManager.ViewManager.instance(),self.Persistence.isolatedFileSystemManager=m.IsolatedFileSystemManager.IsolatedFileSystemManager.instance();const o=t.Settings.Settings.instance().createSetting("uiTheme","systemPreferred");x.UIUtils.initializeUIUtils(document),v.ThemeSupport.hasInstance()||v.ThemeSupport.instance({forceNew:!0,setting:o}),v.ThemeSupport.instance().applyTheme(document);const r=()=>{v.ThemeSupport.instance().applyTheme(document)},s=window.matchMedia("(prefers-color-scheme: dark)"),h=window.matchMedia("(forced-colors: active)");s.addEventListener("change",r),h.addEventListener("change",r),o.addChangeListener(r),x.UIUtils.installComponentRootStyles(document.body),this.#E(document);const f=Boolean(i.Runtime.Runtime.queryParam("can_dock"));self.UI.zoomManager=x.ZoomManager.ZoomManager.instance({forceNew:!0,win:window,frontendHost:n.InspectorFrontendHost.InspectorFrontendHostInstance}),self.UI.inspectorView=x.InspectorView.InspectorView.instance(),x.ContextMenu.ContextMenu.initialize(),x.ContextMenu.ContextMenu.installHandler(document),g.NetworkLog.NetworkLog.instance(),e.FrameManager.FrameManager.instance(),g.LogManager.LogManager.instance(),d.IssuesManager.IssuesManager.instance({forceNew:!0,ensureFirst:!0,showThirdPartyIssuesSetting:d.Issue.getShowThirdPartyIssuesSetting(),hideIssueSetting:d.IssuesManager.getHideIssueByCodeSetting()}),d.ContrastCheckTrigger.ContrastCheckTrigger.instance(),self.UI.dockController=x.DockController.DockController.instance({forceNew:!0,canDock:f}),self.SDK.multitargetNetworkManager=e.NetworkManager.MultitargetNetworkManager.instance({forceNew:!0}),self.SDK.domDebuggerManager=e.DOMDebuggerModel.DOMDebuggerManager.instance({forceNew:!0}),e.TargetManager.TargetManager.instance().addEventListener(e.TargetManager.Events.SuspendStateChanged,this.#I.bind(this)),self.Workspace.fileManager=p.FileManager.FileManager.instance({forceNew:!0}),self.Workspace.workspace=p.Workspace.WorkspaceImpl.instance(),self.Bindings.networkProjectManager=a.NetworkProject.NetworkProjectManager.instance();const w=new a.ResourceMapping.ResourceMapping(e.TargetManager.TargetManager.instance(),p.Workspace.WorkspaceImpl.instance());self.Bindings.resourceMapping=w,new a.PresentationConsoleMessageHelper.PresentationConsoleMessageManager,self.Bindings.cssWorkspaceBinding=a.CSSWorkspaceBinding.CSSWorkspaceBinding.instance({forceNew:!0,resourceMapping:w,targetManager:e.TargetManager.TargetManager.instance()}),self.Bindings.debuggerWorkspaceBinding=a.DebuggerWorkspaceBinding.DebuggerWorkspaceBinding.instance({forceNew:!0,resourceMapping:w,targetManager:e.TargetManager.TargetManager.instance()}),e.TargetManager.TargetManager.instance().setScopeTarget(e.TargetManager.TargetManager.instance().primaryPageTarget()),x.Context.Context.instance().addFlavorChangeListener(e.Target.Target,(({data:t})=>{const n=t?.outermostTarget();e.TargetManager.TargetManager.instance().setScopeTarget(n)})),self.Bindings.breakpointManager=l.BreakpointManager.BreakpointManager.instance({forceNew:!0,workspace:p.Workspace.WorkspaceImpl.instance(),targetManager:e.TargetManager.TargetManager.instance(),debuggerWorkspaceBinding:a.DebuggerWorkspaceBinding.DebuggerWorkspaceBinding.instance()}),self.Extensions.extensionServer=c.ExtensionServer.ExtensionServer.instance({forceNew:!0}),new m.FileSystemWorkspaceBinding.FileSystemWorkspaceBinding(m.IsolatedFileSystemManager.IsolatedFileSystemManager.instance(),p.Workspace.WorkspaceImpl.instance()),m.IsolatedFileSystemManager.IsolatedFileSystemManager.instance().addPlatformFileSystem("snippet://",new u.ScriptSnippetFileSystem.SnippetFileSystem),self.Persistence.persistence=m.Persistence.PersistenceImpl.instance({forceNew:!0,workspace:p.Workspace.WorkspaceImpl.instance(),breakpointManager:l.BreakpointManager.BreakpointManager.instance()}),self.Persistence.networkPersistenceManager=m.NetworkPersistenceManager.NetworkPersistenceManager.instance({forceNew:!0,workspace:p.Workspace.WorkspaceImpl.instance()}),self.Host.Platform=n.Platform,new E(e.TargetManager.TargetManager.instance(),x.Context.Context.instance()),self.Bindings.ignoreListManager=a.IgnoreListManager.IgnoreListManager.instance({forceNew:!0,debuggerWorkspaceBinding:a.DebuggerWorkspaceBinding.DebuggerWorkspaceBinding.instance()}),new _;const S=x.ActionRegistry.ActionRegistry.instance({forceNew:!0});self.UI.actionRegistry=S,self.UI.shortcutRegistry=x.ShortcutRegistry.ShortcutRegistry.instance({forceNew:!0,actionRegistry:S}),this.#M(),R.timeEnd("Main._createAppUI");const I=t.AppProvider.getRegisteredAppProviders()[0];if(!I)throw new Error("Unable to boot DevTools, as the appprovider is missing");await this.#T(await I.loadAppProvider())}async#T(e){R.time("Main._showAppUI");const t=e.createApp();x.DockController.DockController.instance().initialize(),t.presentUI(document);const o=x.ActionRegistry.ActionRegistry.instance().action("elements.toggle-element-search");o&&n.InspectorFrontendHost.InspectorFrontendHostInstance.events.addEventListener(n.InspectorFrontendHostAPI.Events.EnterInspectElementMode,(()=>{o.execute()}),this),n.InspectorFrontendHost.InspectorFrontendHostInstance.events.addEventListener(n.InspectorFrontendHostAPI.Events.RevealSourceLine,this.#b,this),await x.InspectorView.InspectorView.instance().createToolbars(),n.InspectorFrontendHost.InspectorFrontendHostInstance.loadCompleted();const r=i.Runtime.Runtime.queryParam("loadTimelineFromURL");null!==r&&h.TimelinePanel.LoadTimelineHandler.instance().handleQueryParam(r),x.ARIAUtils.alertElementInstance(),x.DockController.DockController.instance().announceDockLocation(),window.setTimeout(this.#R.bind(this),0),R.timeEnd("Main._showAppUI")}async#R(){R.time("Main._initializeTarget");for(const e of t.Runnable.earlyInitializationRunnables())await e().run();n.InspectorFrontendHost.InspectorFrontendHostInstance.readyForTest(),this.#f(),window.setTimeout(this.#C.bind(this),100),R.timeEnd("Main._initializeTarget")}#C(){R.time("Main._lateInitialization"),c.ExtensionServer.ExtensionServer.instance().initializeExtensions();const e=t.Runnable.lateInitializationRunnables().map((async e=>(await e()).run()));if(i.Runtime.experiments.isEnabled("liveHeapProfile")){const n="memoryLiveHeapProfile";if(t.Settings.Settings.instance().moduleSetting(n).get())e.push(w.LiveHeapProfile.LiveHeapProfile.instance().run());else{const e=async o=>{o.data&&(t.Settings.Settings.instance().moduleSetting(n).removeChangeListener(e),w.LiveHeapProfile.LiveHeapProfile.instance().run())};t.Settings.Settings.instance().moduleSetting(n).addChangeListener(e)}}this.#u=Promise.all(e).then((()=>{})),R.timeEnd("Main._lateInitialization")}lateInitDonePromiseForTest(){return this.#u}readyForTest(){return this.#h}#M(){t.Console.Console.instance().addEventListener(t.Console.Events.MessageAdded,(function({data:e}){e.show&&t.Console.Console.instance().show()}))}#b(e){const{url:n,lineNumber:o,columnNumber:r}=e.data,s=p.Workspace.WorkspaceImpl.instance().uiSourceCodeForURL(n);s?t.Revealer.reveal(s.uiLocation(o,r)):p.Workspace.WorkspaceImpl.instance().addEventListener(p.Workspace.Events.UISourceCodeAdded,(function e(s){const i=s.data;i.url()===n&&(t.Revealer.reveal(i.uiLocation(o,r)),p.Workspace.WorkspaceImpl.instance().removeEventListener(p.Workspace.Events.UISourceCodeAdded,e))}))}#k(e){e.handled||x.ShortcutRegistry.ShortcutRegistry.instance().handleShortcut(e)}#D(e){const t=new CustomEvent("clipboard-"+e.type,{bubbles:!0});t.original=e;const n=e.target&&e.target.ownerDocument,o=n?r.DOMUtilities.deepActiveElement(n):null;o&&o.dispatchEvent(t),t.handled&&e.preventDefault()}#P(e){(e.handled||e.target.classList.contains("popup-glasspane"))&&e.preventDefault()}#E(e){e.addEventListener("keydown",this.#k.bind(this),!1),e.addEventListener("beforecopy",this.#D.bind(this),!0),e.addEventListener("copy",this.#D.bind(this),!1),e.addEventListener("cut",this.#D.bind(this),!1),e.addEventListener("paste",this.#D.bind(this),!1),e.addEventListener("contextmenu",this.#P.bind(this),!0)}#I(){const t=e.TargetManager.TargetManager.instance().allTargetsSuspended();x.InspectorView.InspectorView.instance().onSuspendStateChanged(t)}static instanceForTest=null}let C,k,D,P,y;globalThis.Main=globalThis.Main||{},globalThis.Main.Main=R;class L{static instance(e={forceNew:null}){const{forceNew:t}=e;return C&&!t||(C=new L),C}handleAction(e,t){if(n.InspectorFrontendHost.InspectorFrontendHostInstance.isHostedMode())return!1;switch(t){case"main.zoom-in":return n.InspectorFrontendHost.InspectorFrontendHostInstance.zoomIn(),!0;case"main.zoom-out":return n.InspectorFrontendHost.InspectorFrontendHostInstance.zoomOut(),!0;case"main.zoom-reset":return n.InspectorFrontendHost.InspectorFrontendHostInstance.resetZoom(),!0}return!1}}class F{static instance(e={forceNew:null}){const{forceNew:t}=e;return k&&!t||(k=new F),k}handleAction(e,t){let n=x.SearchableView.SearchableView.fromElement(r.DOMUtilities.deepActiveElement(document));if(!n){const e=x.InspectorView.InspectorView.instance().currentPanelDeprecated();if(e&&e.searchableView&&(n=e.searchableView()),!n)return!1}switch(t){case"main.search-in-panel.find":return n.handleFindShortcut();case"main.search-in-panel.cancel":return n.handleCancelSearchShortcut();case"main.search-in-panel.find-next":return n.handleFindNextShortcut();case"main.search-in-panel.find-previous":return n.handleFindPreviousShortcut()}return!1}}class A{#y;constructor(){this.#y=new x.Toolbar.ToolbarMenuButton(this.#L.bind(this),!0),this.#y.element.classList.add("main-menu"),this.#y.setTitle(b(M.customizeAndControlDevtools))}static instance(e={forceNew:null}){const{forceNew:t}=e;return D&&!t||(D=new A),D}item(){return this.#y}#L(t){if(x.DockController.DockController.instance().canDock()){const e=document.createElement("div");e.classList.add("flex-centered"),e.classList.add("flex-auto"),e.classList.add("location-menu"),e.tabIndex=-1,x.ARIAUtils.setLabel(e,M.dockSide+M.dockSideNaviation);const n=e.createChild("span","dockside-title");n.textContent=b(M.dockSide);const o=x.ShortcutRegistry.ShortcutRegistry.instance().shortcutsForAction("main.toggle-dock");x.Tooltip.Tooltip.install(n,b(M.placementOfDevtoolsRelativeToThe,{PH1:o[0].title()})),e.appendChild(n);const i=new x.Toolbar.Toolbar("",e);i.makeBlueOnHover();const a=new x.Toolbar.ToolbarToggle(b(M.undockIntoSeparateWindow),"dock-window"),l=new x.Toolbar.ToolbarToggle(b(M.dockToBottom),"dock-bottom"),c=new x.Toolbar.ToolbarToggle(b(M.dockToRight),"dock-right"),d=new x.Toolbar.ToolbarToggle(b(M.dockToLeft),"dock-left");a.addEventListener(x.Toolbar.ToolbarButton.Events.MouseDown,(e=>e.data.consume())),l.addEventListener(x.Toolbar.ToolbarButton.Events.MouseDown,(e=>e.data.consume())),c.addEventListener(x.Toolbar.ToolbarButton.Events.MouseDown,(e=>e.data.consume())),d.addEventListener(x.Toolbar.ToolbarButton.Events.MouseDown,(e=>e.data.consume())),a.addEventListener(x.Toolbar.ToolbarButton.Events.Click,s.bind(null,"undocked")),l.addEventListener(x.Toolbar.ToolbarButton.Events.Click,s.bind(null,"bottom")),c.addEventListener(x.Toolbar.ToolbarButton.Events.Click,s.bind(null,"right")),d.addEventListener(x.Toolbar.ToolbarButton.Events.Click,s.bind(null,"left")),a.setToggled("undocked"===x.DockController.DockController.instance().dockSide()),l.setToggled("bottom"===x.DockController.DockController.instance().dockSide()),c.setToggled("right"===x.DockController.DockController.instance().dockSide()),d.setToggled("left"===x.DockController.DockController.instance().dockSide()),i.appendToolbarItem(a),i.appendToolbarItem(d),i.appendToolbarItem(l),i.appendToolbarItem(c),e.addEventListener("keydown",(t=>{let n=0;if("ArrowLeft"===t.key)n=-1;else{if("ArrowRight"!==t.key){if("ArrowDown"===t.key){return void e.closest(".soft-context-menu")?.dispatchEvent(new KeyboardEvent("keydown",{key:"ArrowDown"}))}return}n=1}const o=[a,d,l,c];let s=o.findIndex((e=>e.element.hasFocus()));s=r.NumberUtilities.clamp(s+n,0,o.length-1),o[s].element.focus(),t.consume(!0)})),t.headerSection().appendCustomItem(e)}const o=this.#y.element;function s(e){x.DockController.DockController.instance().once("AfterDockSideChanged").then((()=>{o.focus()})),x.DockController.DockController.instance().setDockSide(e),t.discard()}if("undocked"===x.DockController.DockController.instance().dockSide()){const n=e.TargetManager.TargetManager.instance().primaryPageTarget();n&&n.type()===e.Target.Type.Frame&&t.defaultSection().appendAction("inspector_main.focus-debuggee",b(M.focusDebuggee))}t.defaultSection().appendAction("main.toggle-drawer",x.InspectorView.InspectorView.instance().drawerVisible()?b(M.hideConsoleDrawer):b(M.showConsoleDrawer)),t.appendItemsAtLocation("mainMenu");const i=t.defaultSection().appendSubMenuItem(b(M.moreTools)),a=x.ViewManager.getRegisteredViewExtensions();a.sort(((e,t)=>{const n=e.title(),o=t.title();return n.localeCompare(o)}));for(const e of a){const t=e.location(),o=e.persistence(),r=e.title(),s=e.viewId();if("issues-pane"!==s){if("closeable"===o&&("drawer-view"===t||"panel"===t))if(e.isPreviewFeature()){const e=new f.Icon.Icon;e.data={iconName:"experiment",color:"var(--icon-default)",width:"16px",height:"16px"},i.defaultSection().appendItem(r,(()=>{x.ViewManager.ViewManager.instance().showView(s,!0,!1)}),!1,e)}else i.defaultSection().appendItem(r,(()=>{x.ViewManager.ViewManager.instance().showView(s,!0,!1)}))}else i.defaultSection().appendItem(r,(()=>{n.userMetrics.issuesPanelOpenedFrom(n.UserMetrics.IssueOpener.HamburgerMenu),x.ViewManager.ViewManager.instance().showView("issues-pane",!0)}))}t.footerSection().appendSubMenuItem(b(M.help)).appendItemsAtLocation("mainMenuHelp")}}class N{#F;constructor(){this.#F=x.Toolbar.Toolbar.createActionButtonForId("settings.show",{showLabel:!1,userActionCode:void 0})}static instance(e={forceNew:null}){const{forceNew:t}=e;return P&&!t||(P=new N),P}item(){return this.#F}}class _{constructor(){e.TargetManager.TargetManager.instance().addModelListener(e.DebuggerModel.DebuggerModel,e.DebuggerModel.Events.DebuggerPaused,this.#A,this)}#A(n){e.TargetManager.TargetManager.instance().removeModelListener(e.DebuggerModel.DebuggerModel,e.DebuggerModel.Events.DebuggerPaused,this.#A,this);const o=n.data,r=o.debuggerPausedDetails();x.Context.Context.instance().setFlavor(e.Target.Target,o.target()),t.Revealer.reveal(r)}}class H{static instance(e={forceNew:null}){const{forceNew:t}=e;return y&&!t||(y=new H),y}handleAction(e,t){return"main.debug-reload"===t&&(S.Reload.reload(),!0)}}var O=Object.freeze({__proto__:null,MainImpl:R,ZoomActionDelegate:L,SearchActionDelegate:F,MainMenuItem:A,SettingsButtonProvider:N,PauseListener:_,sendOverProtocol:function(e,t){return new Promise(((n,o)=>{const r=s.InspectorBackend.test.sendRawMessage;if(!r)return o("Unable to send message to test client");r(e,t,((e,...t)=>e?o(e):n(t)))}))},ReloadActionDelegate:H});class U{presentUI(e){const t=new x.RootView.RootView;x.InspectorView.InspectorView.instance().show(t.element),t.attachToDocument(e),t.focus()}}let B;class V{static instance(e={forceNew:null}){const{forceNew:t}=e;return B&&!t||(B=new V),B}createApp(){return new U}}var W=Object.freeze({__proto__:null,SimpleApp:U,SimpleAppProvider:V});export{I as ExecutionContextSelector,O as MainImpl,W as SimpleApp}; |
@@ -1,1 +0,1 @@ | ||
import"../shell/shell.js";import*as e from"../../core/common/common.js";import*as t from"../../core/i18n/i18n.js";import*as n from"../../ui/legacy/legacy.js";import*as o from"../../core/root/root.js";import*as i from"../main/main.js";import*as s from"../../core/host/host.js";import*as r from"../../ui/legacy/components/utils/utils.js";import*as a from"../../core/sdk/sdk.js";const c={throttling:"Throttling",showThrottling:"Show Throttling",goOffline:"Go offline",device:"device",throttlingTag:"throttling",enableSlowGThrottling:"Enable slow `3G` throttling",enableFastGThrottling:"Enable fast `3G` throttling",goOnline:"Go online"},l=t.i18n.registerUIStrings("panels/mobile_throttling/mobile_throttling-meta.ts",c),d=t.i18n.getLazilyComputedLocalizedString.bind(void 0,l);let g;async function h(){return g||(g=await import("../../panels/mobile_throttling/mobile_throttling.js")),g}n.ViewManager.registerViewExtension({location:"settings-view",id:"throttling-conditions",title:d(c.throttling),commandPrompt:d(c.showThrottling),order:35,loadView:async()=>(await h()).ThrottlingSettingsTab.ThrottlingSettingsTab.instance(),settings:["customNetworkConditions"]}),n.ActionRegistration.registerActionExtension({actionId:"network-conditions.network-offline",category:n.ActionRegistration.ActionCategory.NETWORK,title:d(c.goOffline),loadActionDelegate:async()=>(await h()).ThrottlingManager.ActionDelegate.instance(),tags:[d(c.device),d(c.throttlingTag)]}),n.ActionRegistration.registerActionExtension({actionId:"network-conditions.network-low-end-mobile",category:n.ActionRegistration.ActionCategory.NETWORK,title:d(c.enableSlowGThrottling),loadActionDelegate:async()=>(await h()).ThrottlingManager.ActionDelegate.instance(),tags:[d(c.device),d(c.throttlingTag)]}),n.ActionRegistration.registerActionExtension({actionId:"network-conditions.network-mid-tier-mobile",category:n.ActionRegistration.ActionCategory.NETWORK,title:d(c.enableFastGThrottling),loadActionDelegate:async()=>(await h()).ThrottlingManager.ActionDelegate.instance(),tags:[d(c.device),d(c.throttlingTag)]}),n.ActionRegistration.registerActionExtension({actionId:"network-conditions.network-online",category:n.ActionRegistration.ActionCategory.NETWORK,title:d(c.goOnline),loadActionDelegate:async()=>(await h()).ThrottlingManager.ActionDelegate.instance(),tags:[d(c.device),d(c.throttlingTag)]}),e.Settings.registerSettingExtension({storageType:e.Settings.SettingStorageType.Synced,settingName:"customNetworkConditions",settingType:e.Settings.SettingType.ARRAY,defaultValue:[]});const p={profiler:"Profiler",showProfiler:"Show Profiler",performance:"Performance",showPerformance:"Show Performance",startStopRecording:"Start/stop recording",showRecentTimelineSessions:"Show recent timeline sessions",record:"Record",stop:"Stop",startProfilingAndReloadPage:"Start profiling and reload page"},w=t.i18n.registerUIStrings("panels/js_profiler/js_profiler-meta.ts",p),m=t.i18n.getLazilyComputedLocalizedString.bind(void 0,w);let f,v;async function y(){return v||(v=await import("../../panels/profiler/profiler.js")),v}async function u(){return f||(f=await import("../../panels/timeline/timeline.js")),f}function C(e){return void 0===f?[]:e(f)}n.ViewManager.registerViewExtension({location:"panel",id:"js_profiler",title:m(p.profiler),commandPrompt:m(p.showProfiler),order:65,persistence:"closeable",experiment:o.Runtime.ExperimentName.JS_PROFILER_TEMP_ENABLE,loadView:async()=>(await y()).ProfilesPanel.JSProfilerPanel.instance()}),n.ViewManager.registerViewExtension({location:"panel",id:"timeline",title:m(p.performance),commandPrompt:m(p.showPerformance),order:66,hasToolbar:!1,isPreviewFeature:!0,loadView:async()=>(await u()).TimelinePanel.TimelinePanel.instance({forceNew:null,isNode:!0})}),n.ActionRegistration.registerActionExtension({actionId:"profiler.js-toggle-recording",category:n.ActionRegistration.ActionCategory.JAVASCRIPT_PROFILER,title:m(p.startStopRecording),iconClass:"record-start",toggleable:!0,toggledIconClass:"record-stop",toggleWithRedColor:!0,contextTypes:()=>void 0===v?[]:(e=>[e.ProfilesPanel.JSProfilerPanel])(v),loadActionDelegate:async()=>(await y()).ProfilesPanel.JSProfilerPanel.instance(),bindings:[{platform:"windows,linux",shortcut:"Ctrl+E"},{platform:"mac",shortcut:"Meta+E"}]}),n.ActionRegistration.registerActionExtension({actionId:"timeline.show-history",loadActionDelegate:async()=>(await u()).TimelinePanel.ActionDelegate.instance(),category:n.ActionRegistration.ActionCategory.PERFORMANCE,title:m(p.showRecentTimelineSessions),contextTypes:()=>C((e=>[e.TimelinePanel.TimelinePanel])),bindings:[{platform:"windows,linux",shortcut:"Ctrl+H"},{platform:"mac",shortcut:"Meta+Y"}]}),n.ActionRegistration.registerActionExtension({actionId:"timeline.toggle-recording",category:n.ActionRegistration.ActionCategory.PERFORMANCE,iconClass:"record-start",toggleable:!0,toggledIconClass:"record-stop",toggleWithRedColor:!0,contextTypes:()=>C((e=>[e.TimelinePanel.TimelinePanel])),loadActionDelegate:async()=>(await u()).TimelinePanel.ActionDelegate.instance(),options:[{value:!0,title:m(p.record)},{value:!1,title:m(p.stop)}],bindings:[{platform:"windows,linux",shortcut:"Ctrl+E"},{platform:"mac",shortcut:"Meta+E"}]}),n.ActionRegistration.registerActionExtension({actionId:"timeline.record-reload",iconClass:"refresh",contextTypes:()=>C((e=>[e.TimelinePanel.TimelinePanel])),category:n.ActionRegistration.ActionCategory.PERFORMANCE,title:m(p.startProfilingAndReloadPage),loadActionDelegate:async()=>(await u()).TimelinePanel.ActionDelegate.instance(),bindings:[{platform:"windows,linux",shortcut:"Ctrl+Shift+E"},{platform:"mac",shortcut:"Meta+Shift+E"}]});const T={main:"Main",nodejsS:"Node.js: {PH1}"},x=t.i18n.registerUIStrings("entrypoints/node_app/NodeMain.ts",T),k=t.i18n.getLocalizedString.bind(void 0,x);let A;class I{static instance(e={forceNew:null}){const{forceNew:t}=e;return A&&!t||(A=new I),A}async run(){s.userMetrics.actionTaken(s.UserMetrics.Action.ConnectToNodeJSFromFrontend),a.Connections.initMainConnection((async()=>{a.TargetManager.TargetManager.instance().createTarget("main",k(T.main),a.Target.Type.Browser,null).setInspectedURL("Node.js")}),r.TargetDetachedDialog.TargetDetachedDialog.webSocketConnectionLost)}}class D extends a.SDKModel.SDKModel{#e;#t;#n;#o;#i;constructor(e){super(e),this.#e=e.targetManager(),this.#t=e,this.#n=e.targetAgent(),this.#o=new Map,this.#i=new Map,e.registerTargetDispatcher(this),this.#n.invoke_setDiscoverTargets({discover:!0}),s.InspectorFrontendHost.InspectorFrontendHostInstance.events.addEventListener(s.InspectorFrontendHostAPI.Events.DevicesDiscoveryConfigChanged,this.#s,this),s.InspectorFrontendHost.InspectorFrontendHostInstance.setDevicesUpdatesEnabled(!1),s.InspectorFrontendHost.InspectorFrontendHostInstance.setDevicesUpdatesEnabled(!0)}#s({data:e}){const t=[];for(const n of e.networkDiscoveryConfig){const e=n.split(":"),o=parseInt(e[1],10);e[0]&&o&&t.push({host:e[0],port:o})}this.#n.invoke_setRemoteLocations({locations:t})}dispose(){s.InspectorFrontendHost.InspectorFrontendHostInstance.events.removeEventListener(s.InspectorFrontendHostAPI.Events.DevicesDiscoveryConfigChanged,this.#s,this);for(const e of this.#o.keys())this.detachedFromTarget({sessionId:e})}targetCreated({targetInfo:e}){"node"!==e.type||e.attached||this.#n.invoke_attachToTarget({targetId:e.targetId,flatten:!1})}targetInfoChanged(e){}targetDestroyed(e){}attachedToTarget({sessionId:e,targetInfo:t}){const n=k(T.nodejsS,{PH1:t.url}),o=new S(this.#n,e);this.#i.set(e,o);const i=this.#e.createTarget(t.targetId,n,a.Target.Type.Node,this.#t,void 0,void 0,o);this.#o.set(e,i),i.runtimeAgent().invoke_runIfWaitingForDebugger()}detachedFromTarget({sessionId:e}){const t=this.#o.get(e);t&&t.dispose("target terminated"),this.#o.delete(e),this.#i.delete(e)}receivedMessageFromTarget({sessionId:e,message:t}){const n=this.#i.get(e),o=n?n.onMessage:null;o&&o.call(null,t)}targetCrashed(e){}}class S{#n;#r;onMessage;#a;constructor(e,t){this.#n=e,this.#r=t,this.onMessage=null,this.#a=null}setOnMessage(e){this.onMessage=e}setOnDisconnect(e){this.#a=e}sendRawMessage(e){this.#n.invoke_sendMessageToTarget({message:e,sessionId:this.#r})}async disconnect(){this.#a&&this.#a.call(null,"force disconnect"),this.#a=null,this.onMessage=null,await this.#n.invoke_detachFromTarget({sessionId:this.#r})}}a.SDKModel.SDKModel.register(D,{capabilities:a.Target.Capability.Target,autostart:!0});const E=new CSSStyleSheet;E.replaceSync(".add-network-target-button{margin:10px 25px;align-self:center}.network-discovery-list{flex:none;max-width:600px;max-height:202px;margin:20px 0 5px}.network-discovery-list-empty{flex:auto;height:30px;display:flex;align-items:center;justify-content:center}.network-discovery-list-item{padding:3px 5px;height:30px;display:flex;align-items:center;position:relative;flex:auto 1 1}.network-discovery-value{flex:3 1 0}.list-item .network-discovery-value{white-space:nowrap;text-overflow:ellipsis;user-select:none;color:var(--color-text-primary);overflow:hidden}.network-discovery-edit-row{flex:none;display:flex;flex-direction:row;margin:6px 5px;align-items:center}.network-discovery-edit-row input{width:100%;text-align:inherit}.network-discovery-footer{margin:0;overflow:hidden;max-width:500px;padding:3px}.network-discovery-footer > *{white-space:pre-wrap}.node-panel{align-items:center;justify-content:flex-start;overflow-y:auto}.network-discovery-view{min-width:400px;text-align:left}:host-context(.node-frontend) .network-discovery-list-empty{height:40px}:host-context(.node-frontend) .network-discovery-list-item{padding:3px 15px;height:40px}.node-panel-center{max-width:600px;padding-top:50px;text-align:center}.node-panel-logo{width:400px;margin-bottom:50px}:host-context(.node-frontend) .network-discovery-edit-row input{height:30px;padding-left:5px}:host-context(.node-frontend) .network-discovery-edit-row{margin:6px 9px}\n/*# sourceURL=nodeConnectionsPanel.css */\n");const P={nodejsDebuggingGuide:"Node.js debugging guide",specifyNetworkEndpointAnd:"Specify network endpoint and DevTools will connect to it automatically. Read {PH1} to learn more.",noConnectionsSpecified:"No connections specified",addConnection:"Add connection",networkAddressEgLocalhost:"Network address (e.g. localhost:9229)"},R=t.i18n.registerUIStrings("entrypoints/node_app/NodeConnectionsPanel.ts",P),b=t.i18n.getLocalizedString.bind(void 0,R);let M;class N extends n.Panel.Panel{#c;#l;constructor(){super("node-connection"),this.contentElement.classList.add("node-panel");const e=this.contentElement.createChild("div","node-panel-center");e.createChild("img","node-panel-logo").src="https://nodejs.org/static/images/logos/nodejs-new-pantone-black.svg",s.InspectorFrontendHost.InspectorFrontendHostInstance.events.addEventListener(s.InspectorFrontendHostAPI.Events.DevicesDiscoveryConfigChanged,this.#s,this),this.contentElement.tabIndex=0,this.setDefaultFocusedElement(this.contentElement),s.InspectorFrontendHost.InspectorFrontendHostInstance.setDevicesUpdatesEnabled(!1),s.InspectorFrontendHost.InspectorFrontendHostInstance.setDevicesUpdatesEnabled(!0),this.#l=new F((e=>{this.#c.networkDiscoveryConfig=e,s.InspectorFrontendHost.InspectorFrontendHostInstance.setDevicesDiscoveryConfig(this.#c)})),this.#l.show(e)}static instance(e={forceNew:null}){const{forceNew:t}=e;return M&&!t||(M=new N),M}#s({data:e}){this.#c=e,this.#l.discoveryConfigChanged(this.#c.networkDiscoveryConfig)}wasShown(){super.wasShown(),this.registerCSSFiles([E])}}class F extends n.Widget.VBox{#d;#g;#h;#p;constructor(e){super(),this.#d=e,this.element.classList.add("network-discovery-view");const o=this.element.createChild("div","network-discovery-footer"),i=n.XLink.XLink.create("https://nodejs.org/en/docs/inspector/",b(P.nodejsDebuggingGuide));o.appendChild(t.i18n.getFormatLocalizedString(R,P.specifyNetworkEndpointAnd,{PH1:i})),this.#g=new n.ListWidget.ListWidget(this),this.#g.element.classList.add("network-discovery-list");const s=document.createElement("div");s.classList.add("network-discovery-list-empty"),s.textContent=b(P.noConnectionsSpecified),this.#g.setEmptyPlaceholder(s),this.#g.show(this.element),this.#h=null;const r=n.UIUtils.createTextButton(b(P.addConnection),this.#w.bind(this),"add-network-target-button",!0);this.element.appendChild(r),this.#p=[],this.element.classList.add("node-frontend")}#m(){const e=this.#p.map((e=>e.address));this.#d.call(null,e)}#w(){this.#g.addNewItem(this.#p.length,{address:"",port:""})}discoveryConfigChanged(e){this.#p=[],this.#g.clear();for(const t of e){const e={address:t,port:""};this.#p.push(e),this.#g.appendItem(e,!0)}}renderItem(e,t){const n=document.createElement("div");return n.classList.add("network-discovery-list-item"),n.createChild("div","network-discovery-value network-discovery-address").textContent=e.address,n}removeItemRequested(e,t){this.#p.splice(t,1),this.#g.removeItem(t),this.#m()}commitEdit(e,t,n){e.address=t.control("address").value.trim(),n&&this.#p.push(e),this.#m()}beginEdit(e){const t=this.#f();return t.control("address").value=e.address,t}#f(){if(this.#h)return this.#h;const e=new n.ListWidget.Editor;this.#h=e;const t=e.contentElement().createChild("div","network-discovery-edit-row"),o=e.createInput("address","text",b(P.networkAddressEgLocalhost),(function(e,t,n){const o=n.value.trim().match(/^([a-zA-Z0-9\.\-_]+):(\d+)$/);if(!o)return{valid:!1,errorMessage:void 0};return{valid:parseInt(o[2],10)<=65535,errorMessage:void 0}}));return t.createChild("div","network-discovery-value network-discovery-address").appendChild(o),e}wasShown(){super.wasShown(),this.#g.registerCSSFiles([E])}}const L={connection:"Connection",node:"node",showConnection:"Show Connection",networkTitle:"Node",showNode:"Show Node"},j=t.i18n.registerUIStrings("entrypoints/node_app/node_app.ts",L),H=t.i18n.getLazilyComputedLocalizedString.bind(void 0,j);let V;n.ViewManager.registerViewExtension({location:"panel",id:"node-connection",title:H(L.connection),commandPrompt:H(L.showConnection),order:0,loadView:async()=>N.instance(),tags:[H(L.node)]}),n.ViewManager.registerViewExtension({location:"navigator-view",id:"navigator-network",title:H(L.networkTitle),commandPrompt:H(L.showNode),order:2,persistence:"permanent",loadView:async()=>(await async function(){return V||(V=await import("../../panels/sources/sources.js")),V}()).SourcesNavigator.NetworkNavigatorView.instance()}),self.runtime=o.Runtime.Runtime.instance({forceNew:!0}),e.Runnable.registerEarlyInitializationRunnable(I.instance),new i.MainImpl.MainImpl; | ||
import"../shell/shell.js";import*as e from"../../core/common/common.js";import*as t from"../../core/i18n/i18n.js";import*as n from"../../ui/legacy/legacy.js";import*as o from"../../core/root/root.js";import*as i from"../main/main.js";import*as s from"../../core/host/host.js";import*as r from"../../ui/legacy/components/utils/utils.js";import*as a from"../../core/sdk/sdk.js";const c={throttling:"Throttling",showThrottling:"Show Throttling",goOffline:"Go offline",device:"device",throttlingTag:"throttling",enableSlowGThrottling:"Enable slow `3G` throttling",enableFastGThrottling:"Enable fast `3G` throttling",goOnline:"Go online"},d=t.i18n.registerUIStrings("panels/mobile_throttling/mobile_throttling-meta.ts",c),l=t.i18n.getLazilyComputedLocalizedString.bind(void 0,d);let g;async function h(){return g||(g=await import("../../panels/mobile_throttling/mobile_throttling.js")),g}n.ViewManager.registerViewExtension({location:"settings-view",id:"throttling-conditions",title:l(c.throttling),commandPrompt:l(c.showThrottling),order:35,loadView:async()=>(await h()).ThrottlingSettingsTab.ThrottlingSettingsTab.instance(),settings:["customNetworkConditions"]}),n.ActionRegistration.registerActionExtension({actionId:"network-conditions.network-offline",category:n.ActionRegistration.ActionCategory.NETWORK,title:l(c.goOffline),loadActionDelegate:async()=>(await h()).ThrottlingManager.ActionDelegate.instance(),tags:[l(c.device),l(c.throttlingTag)]}),n.ActionRegistration.registerActionExtension({actionId:"network-conditions.network-low-end-mobile",category:n.ActionRegistration.ActionCategory.NETWORK,title:l(c.enableSlowGThrottling),loadActionDelegate:async()=>(await h()).ThrottlingManager.ActionDelegate.instance(),tags:[l(c.device),l(c.throttlingTag)]}),n.ActionRegistration.registerActionExtension({actionId:"network-conditions.network-mid-tier-mobile",category:n.ActionRegistration.ActionCategory.NETWORK,title:l(c.enableFastGThrottling),loadActionDelegate:async()=>(await h()).ThrottlingManager.ActionDelegate.instance(),tags:[l(c.device),l(c.throttlingTag)]}),n.ActionRegistration.registerActionExtension({actionId:"network-conditions.network-online",category:n.ActionRegistration.ActionCategory.NETWORK,title:l(c.goOnline),loadActionDelegate:async()=>(await h()).ThrottlingManager.ActionDelegate.instance(),tags:[l(c.device),l(c.throttlingTag)]}),e.Settings.registerSettingExtension({storageType:e.Settings.SettingStorageType.Synced,settingName:"customNetworkConditions",settingType:e.Settings.SettingType.ARRAY,defaultValue:[]});const p={profiler:"Profiler",showProfiler:"Show Profiler",performance:"Performance",showPerformance:"Show Performance",startStopRecording:"Start/stop recording",showRecentTimelineSessions:"Show recent timeline sessions",record:"Record",stop:"Stop",startProfilingAndReloadPage:"Start profiling and reload page"},w=t.i18n.registerUIStrings("panels/js_profiler/js_profiler-meta.ts",p),m=t.i18n.getLazilyComputedLocalizedString.bind(void 0,w);let f,v;async function y(){return v||(v=await import("../../panels/profiler/profiler.js")),v}async function u(){return f||(f=await import("../../panels/timeline/timeline.js")),f}function C(e){return void 0===f?[]:e(f)}n.ViewManager.registerViewExtension({location:"panel",id:"js_profiler",title:m(p.profiler),commandPrompt:m(p.showProfiler),order:65,persistence:"permanent",experiment:o.Runtime.ExperimentName.JS_PROFILER_TEMP_ENABLE,loadView:async()=>(await y()).ProfilesPanel.JSProfilerPanel.instance()}),n.ActionRegistration.registerActionExtension({actionId:"profiler.js-toggle-recording",category:n.ActionRegistration.ActionCategory.JAVASCRIPT_PROFILER,title:m(p.startStopRecording),iconClass:"record-start",toggleable:!0,toggledIconClass:"record-stop",toggleWithRedColor:!0,contextTypes:()=>void 0===v?[]:(e=>[e.ProfilesPanel.JSProfilerPanel])(v),loadActionDelegate:async()=>(await y()).ProfilesPanel.JSProfilerPanel.instance(),bindings:[{platform:"windows,linux",shortcut:"Ctrl+E"},{platform:"mac",shortcut:"Meta+E"}]}),n.ActionRegistration.registerActionExtension({actionId:"timeline.show-history",loadActionDelegate:async()=>(await u()).TimelinePanel.ActionDelegate.instance(),category:n.ActionRegistration.ActionCategory.PERFORMANCE,title:m(p.showRecentTimelineSessions),contextTypes:()=>C((e=>[e.TimelinePanel.TimelinePanel])),bindings:[{platform:"windows,linux",shortcut:"Ctrl+H"},{platform:"mac",shortcut:"Meta+Y"}]}),n.ActionRegistration.registerActionExtension({actionId:"timeline.toggle-recording",category:n.ActionRegistration.ActionCategory.PERFORMANCE,iconClass:"record-start",toggleable:!0,toggledIconClass:"record-stop",toggleWithRedColor:!0,contextTypes:()=>C((e=>[e.TimelinePanel.TimelinePanel])),loadActionDelegate:async()=>(await u()).TimelinePanel.ActionDelegate.instance(),options:[{value:!0,title:m(p.record)},{value:!1,title:m(p.stop)}],bindings:[{platform:"windows,linux",shortcut:"Ctrl+E"},{platform:"mac",shortcut:"Meta+E"}]}),n.ActionRegistration.registerActionExtension({actionId:"timeline.record-reload",iconClass:"refresh",contextTypes:()=>C((e=>[e.TimelinePanel.TimelinePanel])),category:n.ActionRegistration.ActionCategory.PERFORMANCE,title:m(p.startProfilingAndReloadPage),loadActionDelegate:async()=>(await u()).TimelinePanel.ActionDelegate.instance(),bindings:[{platform:"windows,linux",shortcut:"Ctrl+Shift+E"},{platform:"mac",shortcut:"Meta+Shift+E"}]});const T={main:"Main",nodejsS:"Node.js: {PH1}"},k=t.i18n.registerUIStrings("entrypoints/node_app/NodeMain.ts",T),x=t.i18n.getLocalizedString.bind(void 0,k);let A;class I{static instance(e={forceNew:null}){const{forceNew:t}=e;return A&&!t||(A=new I),A}async run(){s.userMetrics.actionTaken(s.UserMetrics.Action.ConnectToNodeJSFromFrontend),a.Connections.initMainConnection((async()=>{a.TargetManager.TargetManager.instance().createTarget("main",x(T.main),a.Target.Type.Browser,null).setInspectedURL("Node.js")}),r.TargetDetachedDialog.TargetDetachedDialog.webSocketConnectionLost)}}class D extends a.SDKModel.SDKModel{#e;#t;#n;#o;#i;constructor(e){super(e),this.#e=e.targetManager(),this.#t=e,this.#n=e.targetAgent(),this.#o=new Map,this.#i=new Map,e.registerTargetDispatcher(this),this.#n.invoke_setDiscoverTargets({discover:!0}),s.InspectorFrontendHost.InspectorFrontendHostInstance.events.addEventListener(s.InspectorFrontendHostAPI.Events.DevicesDiscoveryConfigChanged,this.#s,this),s.InspectorFrontendHost.InspectorFrontendHostInstance.setDevicesUpdatesEnabled(!1),s.InspectorFrontendHost.InspectorFrontendHostInstance.setDevicesUpdatesEnabled(!0)}#s({data:e}){const t=[];for(const n of e.networkDiscoveryConfig){const e=n.split(":"),o=parseInt(e[1],10);e[0]&&o&&t.push({host:e[0],port:o})}this.#n.invoke_setRemoteLocations({locations:t})}dispose(){s.InspectorFrontendHost.InspectorFrontendHostInstance.events.removeEventListener(s.InspectorFrontendHostAPI.Events.DevicesDiscoveryConfigChanged,this.#s,this);for(const e of this.#o.keys())this.detachedFromTarget({sessionId:e})}targetCreated({targetInfo:e}){"node"!==e.type||e.attached||this.#n.invoke_attachToTarget({targetId:e.targetId,flatten:!1})}targetInfoChanged(e){}targetDestroyed(e){}attachedToTarget({sessionId:e,targetInfo:t}){const n=x(T.nodejsS,{PH1:t.url}),o=new S(this.#n,e);this.#i.set(e,o);const i=this.#e.createTarget(t.targetId,n,a.Target.Type.Node,this.#t,void 0,void 0,o);this.#o.set(e,i),i.runtimeAgent().invoke_runIfWaitingForDebugger()}detachedFromTarget({sessionId:e}){const t=this.#o.get(e);t&&t.dispose("target terminated"),this.#o.delete(e),this.#i.delete(e)}receivedMessageFromTarget({sessionId:e,message:t}){const n=this.#i.get(e),o=n?n.onMessage:null;o&&o.call(null,t)}targetCrashed(e){}}class S{#n;#r;onMessage;#a;constructor(e,t){this.#n=e,this.#r=t,this.onMessage=null,this.#a=null}setOnMessage(e){this.onMessage=e}setOnDisconnect(e){this.#a=e}sendRawMessage(e){this.#n.invoke_sendMessageToTarget({message:e,sessionId:this.#r})}async disconnect(){this.#a&&this.#a.call(null,"force disconnect"),this.#a=null,this.onMessage=null,await this.#n.invoke_detachFromTarget({sessionId:this.#r})}}a.SDKModel.SDKModel.register(D,{capabilities:a.Target.Capability.Target,autostart:!0});const E=new CSSStyleSheet;E.replaceSync(".add-network-target-button{margin:10px 25px;align-self:center}.network-discovery-list{flex:none;max-width:600px;max-height:202px;margin:20px 0 5px}.network-discovery-list-empty{flex:auto;height:30px;display:flex;align-items:center;justify-content:center}.network-discovery-list-item{padding:3px 5px;height:30px;display:flex;align-items:center;position:relative;flex:auto 1 1}.network-discovery-value{flex:3 1 0}.list-item .network-discovery-value{white-space:nowrap;text-overflow:ellipsis;user-select:none;color:var(--color-text-primary);overflow:hidden}.network-discovery-edit-row{flex:none;display:flex;flex-direction:row;margin:6px 5px;align-items:center}.network-discovery-edit-row input{width:100%;text-align:inherit}.network-discovery-footer{margin:0;overflow:hidden;max-width:500px;padding:3px}.network-discovery-footer > *{white-space:pre-wrap}.node-panel{align-items:center;justify-content:flex-start;overflow-y:auto}.network-discovery-view{min-width:400px;text-align:left}:host-context(.node-frontend) .network-discovery-list-empty{height:40px}:host-context(.node-frontend) .network-discovery-list-item{padding:3px 15px;height:40px}.node-panel-center{max-width:600px;padding-top:50px;text-align:center}.node-panel-logo{width:400px;margin-bottom:50px}:host-context(.node-frontend) .network-discovery-edit-row input{height:30px;padding-left:5px}:host-context(.node-frontend) .network-discovery-edit-row{margin:6px 9px}\n/*# sourceURL=nodeConnectionsPanel.css */\n");const P={nodejsDebuggingGuide:"Node.js debugging guide",specifyNetworkEndpointAnd:"Specify network endpoint and DevTools will connect to it automatically. Read {PH1} to learn more.",noConnectionsSpecified:"No connections specified",addConnection:"Add connection",networkAddressEgLocalhost:"Network address (e.g. localhost:9229)"},R=t.i18n.registerUIStrings("entrypoints/node_app/NodeConnectionsPanel.ts",P),b=t.i18n.getLocalizedString.bind(void 0,R);let M;class N extends n.Panel.Panel{#c;#d;constructor(){super("node-connection"),this.contentElement.classList.add("node-panel");const e=this.contentElement.createChild("div","node-panel-center");e.createChild("img","node-panel-logo").src="https://nodejs.org/static/images/logos/nodejs-new-pantone-black.svg",s.InspectorFrontendHost.InspectorFrontendHostInstance.events.addEventListener(s.InspectorFrontendHostAPI.Events.DevicesDiscoveryConfigChanged,this.#s,this),this.contentElement.tabIndex=0,this.setDefaultFocusedElement(this.contentElement),s.InspectorFrontendHost.InspectorFrontendHostInstance.setDevicesUpdatesEnabled(!1),s.InspectorFrontendHost.InspectorFrontendHostInstance.setDevicesUpdatesEnabled(!0),this.#d=new F((e=>{this.#c.networkDiscoveryConfig=e,s.InspectorFrontendHost.InspectorFrontendHostInstance.setDevicesDiscoveryConfig(this.#c)})),this.#d.show(e)}static instance(e={forceNew:null}){const{forceNew:t}=e;return M&&!t||(M=new N),M}#s({data:e}){this.#c=e,this.#d.discoveryConfigChanged(this.#c.networkDiscoveryConfig)}wasShown(){super.wasShown(),this.registerCSSFiles([E])}}class F extends n.Widget.VBox{#l;#g;#h;#p;constructor(e){super(),this.#l=e,this.element.classList.add("network-discovery-view");const o=this.element.createChild("div","network-discovery-footer"),i=n.XLink.XLink.create("https://nodejs.org/en/docs/inspector/",b(P.nodejsDebuggingGuide));o.appendChild(t.i18n.getFormatLocalizedString(R,P.specifyNetworkEndpointAnd,{PH1:i})),this.#g=new n.ListWidget.ListWidget(this),this.#g.element.classList.add("network-discovery-list");const s=document.createElement("div");s.classList.add("network-discovery-list-empty"),s.textContent=b(P.noConnectionsSpecified),this.#g.setEmptyPlaceholder(s),this.#g.show(this.element),this.#h=null;const r=n.UIUtils.createTextButton(b(P.addConnection),this.#w.bind(this),"add-network-target-button",!0);this.element.appendChild(r),this.#p=[],this.element.classList.add("node-frontend")}#m(){const e=this.#p.map((e=>e.address));this.#l.call(null,e)}#w(){this.#g.addNewItem(this.#p.length,{address:"",port:""})}discoveryConfigChanged(e){this.#p=[],this.#g.clear();for(const t of e){const e={address:t,port:""};this.#p.push(e),this.#g.appendItem(e,!0)}}renderItem(e,t){const n=document.createElement("div");return n.classList.add("network-discovery-list-item"),n.createChild("div","network-discovery-value network-discovery-address").textContent=e.address,n}removeItemRequested(e,t){this.#p.splice(t,1),this.#g.removeItem(t),this.#m()}commitEdit(e,t,n){e.address=t.control("address").value.trim(),n&&this.#p.push(e),this.#m()}beginEdit(e){const t=this.#f();return t.control("address").value=e.address,t}#f(){if(this.#h)return this.#h;const e=new n.ListWidget.Editor;this.#h=e;const t=e.contentElement().createChild("div","network-discovery-edit-row"),o=e.createInput("address","text",b(P.networkAddressEgLocalhost),(function(e,t,n){const o=n.value.trim().match(/^([a-zA-Z0-9\.\-_]+):(\d+)$/);if(!o)return{valid:!1,errorMessage:void 0};return{valid:parseInt(o[2],10)<=65535,errorMessage:void 0}}));return t.createChild("div","network-discovery-value network-discovery-address").appendChild(o),e}wasShown(){super.wasShown(),this.#g.registerCSSFiles([E])}}const L={connection:"Connection",node:"node",showConnection:"Show Connection",networkTitle:"Node",showNode:"Show Node"},j=t.i18n.registerUIStrings("entrypoints/node_app/node_app.ts",L),H=t.i18n.getLazilyComputedLocalizedString.bind(void 0,j);let _;n.ViewManager.registerViewExtension({location:"panel",id:"node-connection",title:H(L.connection),commandPrompt:H(L.showConnection),order:0,loadView:async()=>N.instance(),tags:[H(L.node)]}),n.ViewManager.registerViewExtension({location:"navigator-view",id:"navigator-network",title:H(L.networkTitle),commandPrompt:H(L.showNode),order:2,persistence:"permanent",loadView:async()=>(await async function(){return _||(_=await import("../../panels/sources/sources.js")),_}()).SourcesNavigator.NetworkNavigatorView.instance()}),self.runtime=o.Runtime.Runtime.instance({forceNew:!0}),e.Runnable.registerEarlyInitializationRunnable(I.instance),new i.MainImpl.MainImpl; |
@@ -1,1 +0,1 @@ | ||
import"../shell/shell.js";import*as e from"../../core/common/common.js";import*as t from"../../core/root/root.js";import*as i from"../../ui/legacy/legacy.js";import*as o from"../../core/i18n/i18n.js";import*as n from"../../models/issues_manager/issues_manager.js";import*as a from"../main/main.js";const r={toggleDeviceToolbar:"Toggle device toolbar",captureScreenshot:"Capture screenshot",captureFullSizeScreenshot:"Capture full size screenshot",captureNodeScreenshot:"Capture node screenshot",showMediaQueries:"Show media queries",device:"device",hideMediaQueries:"Hide media queries",showRulers:"Show rulers in the Device Mode toolbar",hideRulers:"Hide rulers in the Device Mode toolbar",showDeviceFrame:"Show device frame",hideDeviceFrame:"Hide device frame"},s=o.i18n.registerUIStrings("panels/emulation/emulation-meta.ts",r),l=o.i18n.getLazilyComputedLocalizedString.bind(void 0,s);let c;async function g(){return c||(c=await import("../../panels/emulation/emulation.js")),c}i.ActionRegistration.registerActionExtension({category:i.ActionRegistration.ActionCategory.MOBILE,actionId:"emulation.toggle-device-mode",toggleable:!0,loadActionDelegate:async()=>(await g()).DeviceModeWrapper.ActionDelegate.instance(),condition:t.Runtime.ConditionName.CAN_DOCK,title:l(r.toggleDeviceToolbar),iconClass:"devices",bindings:[{platform:"windows,linux",shortcut:"Shift+Ctrl+M"},{platform:"mac",shortcut:"Shift+Meta+M"}]}),i.ActionRegistration.registerActionExtension({actionId:"emulation.capture-screenshot",category:i.ActionRegistration.ActionCategory.SCREENSHOT,loadActionDelegate:async()=>(await g()).DeviceModeWrapper.ActionDelegate.instance(),condition:t.Runtime.ConditionName.CAN_DOCK,title:l(r.captureScreenshot)}),i.ActionRegistration.registerActionExtension({actionId:"emulation.capture-full-height-screenshot",category:i.ActionRegistration.ActionCategory.SCREENSHOT,loadActionDelegate:async()=>(await g()).DeviceModeWrapper.ActionDelegate.instance(),condition:t.Runtime.ConditionName.CAN_DOCK,title:l(r.captureFullSizeScreenshot)}),i.ActionRegistration.registerActionExtension({actionId:"emulation.capture-node-screenshot",category:i.ActionRegistration.ActionCategory.SCREENSHOT,loadActionDelegate:async()=>(await g()).DeviceModeWrapper.ActionDelegate.instance(),condition:t.Runtime.ConditionName.CAN_DOCK,title:l(r.captureNodeScreenshot)}),e.Settings.registerSettingExtension({category:e.Settings.SettingCategory.MOBILE,settingName:"showMediaQueryInspector",settingType:e.Settings.SettingType.BOOLEAN,defaultValue:!1,options:[{value:!0,title:l(r.showMediaQueries)},{value:!1,title:l(r.hideMediaQueries)}],tags:[l(r.device)]}),e.Settings.registerSettingExtension({category:e.Settings.SettingCategory.MOBILE,settingName:"emulation.showRulers",settingType:e.Settings.SettingType.BOOLEAN,defaultValue:!1,options:[{value:!0,title:l(r.showRulers)},{value:!1,title:l(r.hideRulers)}],tags:[l(r.device)]}),e.Settings.registerSettingExtension({category:e.Settings.SettingCategory.MOBILE,settingName:"emulation.showDeviceOutline",settingType:e.Settings.SettingType.BOOLEAN,defaultValue:!1,options:[{value:!0,title:l(r.showDeviceFrame)},{value:!1,title:l(r.hideDeviceFrame)}],tags:[l(r.device)]}),i.Toolbar.registerToolbarItem({actionId:"emulation.toggle-device-mode",condition:t.Runtime.ConditionName.CAN_DOCK,location:i.Toolbar.ToolbarItemLocation.MAIN_TOOLBAR_LEFT,order:1,showLabel:void 0,loadItem:void 0,separator:void 0}),e.AppProvider.registerAppProvider({loadAppProvider:async()=>(await g()).AdvancedApp.AdvancedAppProvider.instance(),condition:t.Runtime.ConditionName.CAN_DOCK,order:0}),i.ContextMenu.registerItem({location:i.ContextMenu.ItemLocation.DEVICE_MODE_MENU_SAVE,order:12,actionId:"emulation.capture-screenshot"}),i.ContextMenu.registerItem({location:i.ContextMenu.ItemLocation.DEVICE_MODE_MENU_SAVE,order:13,actionId:"emulation.capture-full-height-screenshot"});const d={sensors:"Sensors",geolocation:"geolocation",timezones:"timezones",locale:"locale",locales:"locales",accelerometer:"accelerometer",deviceOrientation:"device orientation",locations:"Locations",touch:"Touch",devicebased:"Device-based",forceEnabled:"Force enabled",emulateIdleDetectorState:"Emulate Idle Detector state",noIdleEmulation:"No idle emulation",userActiveScreenUnlocked:"User active, screen unlocked",userActiveScreenLocked:"User active, screen locked",userIdleScreenUnlocked:"User idle, screen unlocked",userIdleScreenLocked:"User idle, screen locked",showSensors:"Show Sensors",showLocations:"Show Locations"},m=o.i18n.registerUIStrings("panels/sensors/sensors-meta.ts",d),u=o.i18n.getLazilyComputedLocalizedString.bind(void 0,m);let p;async function S(){return p||(p=await import("../../panels/sensors/sensors.js")),p}i.ViewManager.registerViewExtension({location:"drawer-view",commandPrompt:u(d.showSensors),title:u(d.sensors),id:"sensors",persistence:"closeable",order:100,loadView:async()=>(await S()).SensorsView.SensorsView.instance(),tags:[u(d.geolocation),u(d.timezones),u(d.locale),u(d.locales),u(d.accelerometer),u(d.deviceOrientation)]}),i.ViewManager.registerViewExtension({location:"settings-view",id:"emulation-locations",commandPrompt:u(d.showLocations),title:u(d.locations),order:40,loadView:async()=>(await S()).LocationsSettingsTab.LocationsSettingsTab.instance(),settings:["emulation.locations"]}),e.Settings.registerSettingExtension({storageType:e.Settings.SettingStorageType.Synced,settingName:"emulation.locations",settingType:e.Settings.SettingType.ARRAY,defaultValue:[{title:"Berlin",lat:52.520007,long:13.404954,timezoneId:"Europe/Berlin",locale:"de-DE"},{title:"London",lat:51.507351,long:-.127758,timezoneId:"Europe/London",locale:"en-GB"},{title:"Moscow",lat:55.755826,long:37.6173,timezoneId:"Europe/Moscow",locale:"ru-RU"},{title:"Mountain View",lat:37.386052,long:-122.083851,timezoneId:"America/Los_Angeles",locale:"en-US"},{title:"Mumbai",lat:19.075984,long:72.877656,timezoneId:"Asia/Kolkata",locale:"mr-IN"},{title:"San Francisco",lat:37.774929,long:-122.419416,timezoneId:"America/Los_Angeles",locale:"en-US"},{title:"Shanghai",lat:31.230416,long:121.473701,timezoneId:"Asia/Shanghai",locale:"zh-Hans-CN"},{title:"São Paulo",lat:-23.55052,long:-46.633309,timezoneId:"America/Sao_Paulo",locale:"pt-BR"},{title:"Tokyo",lat:35.689487,long:139.691706,timezoneId:"Asia/Tokyo",locale:"ja-JP"}]}),e.Settings.registerSettingExtension({title:u(d.touch),reloadRequired:!0,settingName:"emulation.touch",settingType:e.Settings.SettingType.ENUM,defaultValue:"none",options:[{value:"none",title:u(d.devicebased),text:u(d.devicebased)},{value:"force",title:u(d.forceEnabled),text:u(d.forceEnabled)}]}),e.Settings.registerSettingExtension({title:u(d.emulateIdleDetectorState),settingName:"emulation.idleDetection",settingType:e.Settings.SettingType.ENUM,defaultValue:"none",options:[{value:"none",title:u(d.noIdleEmulation),text:u(d.noIdleEmulation)},{value:'{"isUserActive":true,"isScreenUnlocked":true}',title:u(d.userActiveScreenUnlocked),text:u(d.userActiveScreenUnlocked)},{value:'{"isUserActive":true,"isScreenUnlocked":false}',title:u(d.userActiveScreenLocked),text:u(d.userActiveScreenLocked)},{value:'{"isUserActive":false,"isScreenUnlocked":true}',title:u(d.userIdleScreenUnlocked),text:u(d.userIdleScreenUnlocked)},{value:'{"isUserActive":false,"isScreenUnlocked":false}',title:u(d.userIdleScreenLocked),text:u(d.userIdleScreenLocked)}]});const A={developerResources:"Developer Resources",showDeveloperResources:"Show Developer Resources"},w=o.i18n.registerUIStrings("panels/developer_resources/developer_resources-meta.ts",A),y=o.i18n.getLazilyComputedLocalizedString.bind(void 0,w);let h;i.ViewManager.registerViewExtension({location:"drawer-view",id:"resource-loading-pane",title:y(A.developerResources),commandPrompt:y(A.showDeveloperResources),order:100,persistence:"closeable",experiment:t.Runtime.ExperimentName.DEVELOPER_RESOURCES_VIEW,loadView:async()=>new((await async function(){return h||(h=await import("../../panels/developer_resources/developer_resources.js")),h}()).DeveloperResourcesView.DeveloperResourcesView)});const R={rendering:"Rendering",showRendering:"Show Rendering",paint:"paint",layout:"layout",fps:"fps",cssMediaType:"CSS media type",cssMediaFeature:"CSS media feature",visionDeficiency:"vision deficiency",colorVisionDeficiency:"color vision deficiency",reloadPage:"Reload page",hardReloadPage:"Hard reload page",forceAdBlocking:"Force ad blocking on this site",blockAds:"Block ads on this site",showAds:"Show ads on this site, if allowed",autoOpenDevTools:"Auto-open DevTools for popups",doNotAutoOpen:"Do not auto-open DevTools for popups",disablePaused:"Disable paused state overlay",toggleCssPrefersColorSchemeMedia:"Toggle CSS media feature prefers-color-scheme"},E=o.i18n.registerUIStrings("entrypoints/inspector_main/inspector_main-meta.ts",R),T=o.i18n.getLazilyComputedLocalizedString.bind(void 0,E);let f;async function v(){return f||(f=await import("../inspector_main/inspector_main.js")),f}i.ViewManager.registerViewExtension({location:"drawer-view",id:"rendering",title:T(R.rendering),commandPrompt:T(R.showRendering),persistence:"closeable",order:50,loadView:async()=>(await v()).RenderingOptions.RenderingOptionsView.instance(),tags:[T(R.paint),T(R.layout),T(R.fps),T(R.cssMediaType),T(R.cssMediaFeature),T(R.visionDeficiency),T(R.colorVisionDeficiency)]}),i.ActionRegistration.registerActionExtension({category:i.ActionRegistration.ActionCategory.NAVIGATION,actionId:"inspector_main.reload",loadActionDelegate:async()=>(await v()).InspectorMain.ReloadActionDelegate.instance(),iconClass:"refresh",title:T(R.reloadPage),bindings:[{platform:"windows,linux",shortcut:"Ctrl+R"},{platform:"windows,linux",shortcut:"F5"},{platform:"mac",shortcut:"Meta+R"}]}),i.ActionRegistration.registerActionExtension({category:i.ActionRegistration.ActionCategory.NAVIGATION,actionId:"inspector_main.hard-reload",loadActionDelegate:async()=>(await v()).InspectorMain.ReloadActionDelegate.instance(),title:T(R.hardReloadPage),bindings:[{platform:"windows,linux",shortcut:"Shift+Ctrl+R"},{platform:"windows,linux",shortcut:"Shift+F5"},{platform:"windows,linux",shortcut:"Ctrl+F5"},{platform:"windows,linux",shortcut:"Ctrl+Shift+F5"},{platform:"mac",shortcut:"Shift+Meta+R"}]}),i.ActionRegistration.registerActionExtension({actionId:"rendering.toggle-prefers-color-scheme",category:i.ActionRegistration.ActionCategory.RENDERING,title:T(R.toggleCssPrefersColorSchemeMedia),loadActionDelegate:async()=>(await v()).RenderingOptions.ReloadActionDelegate.instance()}),e.Settings.registerSettingExtension({category:e.Settings.SettingCategory.NETWORK,title:T(R.forceAdBlocking),settingName:"network.adBlockingEnabled",settingType:e.Settings.SettingType.BOOLEAN,storageType:e.Settings.SettingStorageType.Session,defaultValue:!1,options:[{value:!0,title:T(R.blockAds)},{value:!1,title:T(R.showAds)}]}),e.Settings.registerSettingExtension({category:e.Settings.SettingCategory.GLOBAL,storageType:e.Settings.SettingStorageType.Synced,title:T(R.autoOpenDevTools),settingName:"autoAttachToCreatedPages",settingType:e.Settings.SettingType.BOOLEAN,order:2,defaultValue:!1,options:[{value:!0,title:T(R.autoOpenDevTools)},{value:!1,title:T(R.doNotAutoOpen)}]}),e.Settings.registerSettingExtension({category:e.Settings.SettingCategory.APPEARANCE,storageType:e.Settings.SettingStorageType.Synced,title:T(R.disablePaused),settingName:"disablePausedStateOverlay",settingType:e.Settings.SettingType.BOOLEAN,defaultValue:!1}),i.Toolbar.registerToolbarItem({loadItem:async()=>(await v()).InspectorMain.NodeIndicator.instance(),order:2,location:i.Toolbar.ToolbarItemLocation.MAIN_TOOLBAR_LEFT,showLabel:void 0,condition:void 0,separator:void 0,actionId:void 0}),i.Toolbar.registerToolbarItem({loadItem:async()=>(await v()).OutermostTargetSelector.OutermostTargetSelector.instance(),order:98,location:i.Toolbar.ToolbarItemLocation.MAIN_TOOLBAR_RIGHT,showLabel:void 0,condition:void 0,separator:void 0,actionId:void 0,experiment:t.Runtime.ExperimentName.OUTERMOST_TARGET_SELECTOR});const I={issues:"Issues",showIssues:"Show Issues",cspViolations:"CSP Violations",showCspViolations:"Show CSP Violations"},C=o.i18n.registerUIStrings("panels/issues/issues-meta.ts",I),P=o.i18n.getLazilyComputedLocalizedString.bind(void 0,C);let x;async function N(){return x||(x=await import("../../panels/issues/issues.js")),x}i.ViewManager.registerViewExtension({location:"drawer-view",id:"issues-pane",title:P(I.issues),commandPrompt:P(I.showIssues),order:100,persistence:"closeable",loadView:async()=>(await N()).IssuesPane.IssuesPane.instance()}),i.ViewManager.registerViewExtension({location:"drawer-view",id:"csp-violations-pane",title:P(I.cspViolations),commandPrompt:P(I.showCspViolations),order:100,persistence:"closeable",loadView:async()=>(await N()).CSPViolationsView.CSPViolationsView.instance(),experiment:t.Runtime.ExperimentName.CSP_VIOLATIONS_VIEW}),e.Revealer.registerRevealer({contextTypes:()=>[n.Issue.Issue],destination:e.Revealer.RevealerDestination.ISSUES_VIEW,loadRevealer:async()=>(await N()).IssueRevealer.IssueRevealer.instance()});const D={throttling:"Throttling",showThrottling:"Show Throttling",goOffline:"Go offline",device:"device",throttlingTag:"throttling",enableSlowGThrottling:"Enable slow `3G` throttling",enableFastGThrottling:"Enable fast `3G` throttling",goOnline:"Go online"},M=o.i18n.registerUIStrings("panels/mobile_throttling/mobile_throttling-meta.ts",D),b=o.i18n.getLazilyComputedLocalizedString.bind(void 0,M);let O;async function L(){return O||(O=await import("../../panels/mobile_throttling/mobile_throttling.js")),O}i.ViewManager.registerViewExtension({location:"settings-view",id:"throttling-conditions",title:b(D.throttling),commandPrompt:b(D.showThrottling),order:35,loadView:async()=>(await L()).ThrottlingSettingsTab.ThrottlingSettingsTab.instance(),settings:["customNetworkConditions"]}),i.ActionRegistration.registerActionExtension({actionId:"network-conditions.network-offline",category:i.ActionRegistration.ActionCategory.NETWORK,title:b(D.goOffline),loadActionDelegate:async()=>(await L()).ThrottlingManager.ActionDelegate.instance(),tags:[b(D.device),b(D.throttlingTag)]}),i.ActionRegistration.registerActionExtension({actionId:"network-conditions.network-low-end-mobile",category:i.ActionRegistration.ActionCategory.NETWORK,title:b(D.enableSlowGThrottling),loadActionDelegate:async()=>(await L()).ThrottlingManager.ActionDelegate.instance(),tags:[b(D.device),b(D.throttlingTag)]}),i.ActionRegistration.registerActionExtension({actionId:"network-conditions.network-mid-tier-mobile",category:i.ActionRegistration.ActionCategory.NETWORK,title:b(D.enableFastGThrottling),loadActionDelegate:async()=>(await L()).ThrottlingManager.ActionDelegate.instance(),tags:[b(D.device),b(D.throttlingTag)]}),i.ActionRegistration.registerActionExtension({actionId:"network-conditions.network-online",category:i.ActionRegistration.ActionCategory.NETWORK,title:b(D.goOnline),loadActionDelegate:async()=>(await L()).ThrottlingManager.ActionDelegate.instance(),tags:[b(D.device),b(D.throttlingTag)]}),e.Settings.registerSettingExtension({storageType:e.Settings.SettingStorageType.Synced,settingName:"customNetworkConditions",settingType:e.Settings.SettingType.ARRAY,defaultValue:[]});const V={performance:"Performance",showPerformance:"Show Performance",javascriptProfiler:"JavaScript Profiler",showJavascriptProfiler:"Show JavaScript Profiler",record:"Record",stop:"Stop",startProfilingAndReloadPage:"Start profiling and reload page",saveProfile:"Save profile…",loadProfile:"Load profile…",previousFrame:"Previous frame",nextFrame:"Next frame",showRecentTimelineSessions:"Show recent timeline sessions",previousRecording:"Previous recording",nextRecording:"Next recording",hideChromeFrameInLayersView:"Hide `chrome` frame in Layers view",startStopRecording:"Start/stop recording"},_=o.i18n.registerUIStrings("panels/timeline/timeline-meta.ts",V),k=o.i18n.getLazilyComputedLocalizedString.bind(void 0,_);let U,F;async function z(){return U||(U=await import("../../panels/timeline/timeline.js")),U}async function B(){return F||(F=await import("../../panels/profiler/profiler.js")),F}function j(e){return void 0===U?[]:e(U)}i.ViewManager.registerViewExtension({location:"panel",id:"timeline",title:k(V.performance),commandPrompt:k(V.showPerformance),order:50,loadView:async()=>(await z()).TimelinePanel.TimelinePanel.instance()}),i.ViewManager.registerViewExtension({location:"panel",id:"js_profiler",title:k(V.javascriptProfiler),commandPrompt:k(V.showJavascriptProfiler),persistence:"closeable",order:65,experiment:t.Runtime.ExperimentName.JS_PROFILER_TEMP_ENABLE,loadView:async()=>(await B()).ProfilesPanel.JSProfilerPanel.instance()}),i.ActionRegistration.registerActionExtension({actionId:"timeline.toggle-recording",category:i.ActionRegistration.ActionCategory.PERFORMANCE,iconClass:"record-start",toggleable:!0,toggledIconClass:"record-stop",toggleWithRedColor:!0,contextTypes:()=>j((e=>[e.TimelinePanel.TimelinePanel])),loadActionDelegate:async()=>(await z()).TimelinePanel.ActionDelegate.instance(),options:[{value:!0,title:k(V.record)},{value:!1,title:k(V.stop)}],bindings:[{platform:"windows,linux",shortcut:"Ctrl+E"},{platform:"mac",shortcut:"Meta+E"}]}),i.ActionRegistration.registerActionExtension({actionId:"timeline.record-reload",iconClass:"refresh",contextTypes:()=>j((e=>[e.TimelinePanel.TimelinePanel])),category:i.ActionRegistration.ActionCategory.PERFORMANCE,title:k(V.startProfilingAndReloadPage),loadActionDelegate:async()=>(await z()).TimelinePanel.ActionDelegate.instance(),bindings:[{platform:"windows,linux",shortcut:"Ctrl+Shift+E"},{platform:"mac",shortcut:"Meta+Shift+E"}]}),i.ActionRegistration.registerActionExtension({category:i.ActionRegistration.ActionCategory.PERFORMANCE,actionId:"timeline.save-to-file",contextTypes:()=>j((e=>[e.TimelinePanel.TimelinePanel])),loadActionDelegate:async()=>(await z()).TimelinePanel.ActionDelegate.instance(),title:k(V.saveProfile),bindings:[{platform:"windows,linux",shortcut:"Ctrl+S"},{platform:"mac",shortcut:"Meta+S"}]}),i.ActionRegistration.registerActionExtension({category:i.ActionRegistration.ActionCategory.PERFORMANCE,actionId:"timeline.load-from-file",contextTypes:()=>j((e=>[e.TimelinePanel.TimelinePanel])),loadActionDelegate:async()=>(await z()).TimelinePanel.ActionDelegate.instance(),title:k(V.loadProfile),bindings:[{platform:"windows,linux",shortcut:"Ctrl+O"},{platform:"mac",shortcut:"Meta+O"}]}),i.ActionRegistration.registerActionExtension({actionId:"timeline.jump-to-previous-frame",category:i.ActionRegistration.ActionCategory.PERFORMANCE,title:k(V.previousFrame),contextTypes:()=>j((e=>[e.TimelinePanel.TimelinePanel])),loadActionDelegate:async()=>(await z()).TimelinePanel.ActionDelegate.instance(),bindings:[{shortcut:"["}]}),i.ActionRegistration.registerActionExtension({actionId:"timeline.jump-to-next-frame",category:i.ActionRegistration.ActionCategory.PERFORMANCE,title:k(V.nextFrame),contextTypes:()=>j((e=>[e.TimelinePanel.TimelinePanel])),loadActionDelegate:async()=>(await z()).TimelinePanel.ActionDelegate.instance(),bindings:[{shortcut:"]"}]}),i.ActionRegistration.registerActionExtension({actionId:"timeline.show-history",loadActionDelegate:async()=>(await z()).TimelinePanel.ActionDelegate.instance(),category:i.ActionRegistration.ActionCategory.PERFORMANCE,title:k(V.showRecentTimelineSessions),contextTypes:()=>j((e=>[e.TimelinePanel.TimelinePanel])),bindings:[{platform:"windows,linux",shortcut:"Ctrl+H"},{platform:"mac",shortcut:"Meta+Y"}]}),i.ActionRegistration.registerActionExtension({actionId:"timeline.previous-recording",category:i.ActionRegistration.ActionCategory.PERFORMANCE,loadActionDelegate:async()=>(await z()).TimelinePanel.ActionDelegate.instance(),title:k(V.previousRecording),contextTypes:()=>j((e=>[e.TimelinePanel.TimelinePanel])),bindings:[{platform:"windows,linux",shortcut:"Alt+Left"},{platform:"mac",shortcut:"Meta+Left"}]}),i.ActionRegistration.registerActionExtension({actionId:"timeline.next-recording",category:i.ActionRegistration.ActionCategory.PERFORMANCE,loadActionDelegate:async()=>(await z()).TimelinePanel.ActionDelegate.instance(),title:k(V.nextRecording),contextTypes:()=>j((e=>[e.TimelinePanel.TimelinePanel])),bindings:[{platform:"windows,linux",shortcut:"Alt+Right"},{platform:"mac",shortcut:"Meta+Right"}]}),i.ActionRegistration.registerActionExtension({actionId:"profiler.js-toggle-recording",category:i.ActionRegistration.ActionCategory.JAVASCRIPT_PROFILER,title:k(V.startStopRecording),iconClass:"record-start",toggleable:!0,toggledIconClass:"record-stop",toggleWithRedColor:!0,contextTypes:()=>void 0===F?[]:(e=>[e.ProfilesPanel.JSProfilerPanel])(F),loadActionDelegate:async()=>(await B()).ProfilesPanel.JSProfilerPanel.instance(),bindings:[{platform:"windows,linux",shortcut:"Ctrl+E"},{platform:"mac",shortcut:"Meta+E"}]}),e.Settings.registerSettingExtension({category:e.Settings.SettingCategory.PERFORMANCE,storageType:e.Settings.SettingStorageType.Synced,title:k(V.hideChromeFrameInLayersView),settingName:"frameViewerHideChromeWindow",settingType:e.Settings.SettingType.BOOLEAN,defaultValue:!1}),e.Linkifier.registerLinkifier({contextTypes:()=>j((e=>[e.CLSLinkifier.CLSRect])),loadLinkifier:async()=>(await z()).CLSLinkifier.Linkifier.instance()}),i.ContextMenu.registerItem({location:i.ContextMenu.ItemLocation.TIMELINE_MENU_OPEN,actionId:"timeline.load-from-file",order:10}),i.ContextMenu.registerItem({location:i.ContextMenu.ItemLocation.TIMELINE_MENU_OPEN,actionId:"timeline.save-to-file",order:15});const W={rnWelcome:"⚛️ Welcome",showRnWelcome:"Show React Native Welcome panel"},G=o.i18n.registerUIStrings("panels/rn_welcome/rn_welcome-meta.ts",W),H=o.i18n.getLazilyComputedLocalizedString.bind(void 0,G);let K;i.ViewManager.registerViewExtension({location:"panel",id:"rn-welcome",title:H(W.rnWelcome),commandPrompt:H(W.showRnWelcome),order:-10,persistence:"permanent",loadView:async()=>(await async function(){return K||(K=await import("../../panels/rn_welcome/rn_welcome.js")),K}()).RNWelcome.RNWelcomeImpl.instance(),experiment:t.Runtime.ExperimentName.REACT_NATIVE_SPECIFIC_UI}),t.Runtime.experiments.register(t.Runtime.ExperimentName.REACT_NATIVE_SPECIFIC_UI,"Show React Native-specific UI",!1),t.Runtime.experiments.enableExperimentsByDefault([t.Runtime.ExperimentName.REACT_NATIVE_SPECIFIC_UI]),self.runtime=t.Runtime.Runtime.instance({forceNew:!0}),new a.MainImpl.MainImpl; | ||
import"../shell/shell.js";import*as e from"../../core/common/common.js";import*as t from"../../core/root/root.js";import*as i from"../../ui/legacy/legacy.js";import*as o from"../../core/i18n/i18n.js";import*as n from"../../models/issues_manager/issues_manager.js";import*as a from"../main/main.js";const r={toggleDeviceToolbar:"Toggle device toolbar",captureScreenshot:"Capture screenshot",captureFullSizeScreenshot:"Capture full size screenshot",captureNodeScreenshot:"Capture node screenshot",showMediaQueries:"Show media queries",device:"device",hideMediaQueries:"Hide media queries",showRulers:"Show rulers in the Device Mode toolbar",hideRulers:"Hide rulers in the Device Mode toolbar",showDeviceFrame:"Show device frame",hideDeviceFrame:"Hide device frame"},s=o.i18n.registerUIStrings("panels/emulation/emulation-meta.ts",r),l=o.i18n.getLazilyComputedLocalizedString.bind(void 0,s);let c;async function g(){return c||(c=await import("../../panels/emulation/emulation.js")),c}i.ActionRegistration.registerActionExtension({category:i.ActionRegistration.ActionCategory.MOBILE,actionId:"emulation.toggle-device-mode",toggleable:!0,loadActionDelegate:async()=>(await g()).DeviceModeWrapper.ActionDelegate.instance(),condition:t.Runtime.ConditionName.CAN_DOCK,title:l(r.toggleDeviceToolbar),iconClass:"devices",bindings:[{platform:"windows,linux",shortcut:"Shift+Ctrl+M"},{platform:"mac",shortcut:"Shift+Meta+M"}]}),i.ActionRegistration.registerActionExtension({actionId:"emulation.capture-screenshot",category:i.ActionRegistration.ActionCategory.SCREENSHOT,loadActionDelegate:async()=>(await g()).DeviceModeWrapper.ActionDelegate.instance(),condition:t.Runtime.ConditionName.CAN_DOCK,title:l(r.captureScreenshot)}),i.ActionRegistration.registerActionExtension({actionId:"emulation.capture-full-height-screenshot",category:i.ActionRegistration.ActionCategory.SCREENSHOT,loadActionDelegate:async()=>(await g()).DeviceModeWrapper.ActionDelegate.instance(),condition:t.Runtime.ConditionName.CAN_DOCK,title:l(r.captureFullSizeScreenshot)}),i.ActionRegistration.registerActionExtension({actionId:"emulation.capture-node-screenshot",category:i.ActionRegistration.ActionCategory.SCREENSHOT,loadActionDelegate:async()=>(await g()).DeviceModeWrapper.ActionDelegate.instance(),condition:t.Runtime.ConditionName.CAN_DOCK,title:l(r.captureNodeScreenshot)}),e.Settings.registerSettingExtension({category:e.Settings.SettingCategory.MOBILE,settingName:"showMediaQueryInspector",settingType:e.Settings.SettingType.BOOLEAN,defaultValue:!1,options:[{value:!0,title:l(r.showMediaQueries)},{value:!1,title:l(r.hideMediaQueries)}],tags:[l(r.device)]}),e.Settings.registerSettingExtension({category:e.Settings.SettingCategory.MOBILE,settingName:"emulation.showRulers",settingType:e.Settings.SettingType.BOOLEAN,defaultValue:!1,options:[{value:!0,title:l(r.showRulers)},{value:!1,title:l(r.hideRulers)}],tags:[l(r.device)]}),e.Settings.registerSettingExtension({category:e.Settings.SettingCategory.MOBILE,settingName:"emulation.showDeviceOutline",settingType:e.Settings.SettingType.BOOLEAN,defaultValue:!1,options:[{value:!0,title:l(r.showDeviceFrame)},{value:!1,title:l(r.hideDeviceFrame)}],tags:[l(r.device)]}),i.Toolbar.registerToolbarItem({actionId:"emulation.toggle-device-mode",condition:t.Runtime.ConditionName.CAN_DOCK,location:i.Toolbar.ToolbarItemLocation.MAIN_TOOLBAR_LEFT,order:1,showLabel:void 0,loadItem:void 0,separator:void 0}),e.AppProvider.registerAppProvider({loadAppProvider:async()=>(await g()).AdvancedApp.AdvancedAppProvider.instance(),condition:t.Runtime.ConditionName.CAN_DOCK,order:0}),i.ContextMenu.registerItem({location:i.ContextMenu.ItemLocation.DEVICE_MODE_MENU_SAVE,order:12,actionId:"emulation.capture-screenshot"}),i.ContextMenu.registerItem({location:i.ContextMenu.ItemLocation.DEVICE_MODE_MENU_SAVE,order:13,actionId:"emulation.capture-full-height-screenshot"});const d={sensors:"Sensors",geolocation:"geolocation",timezones:"timezones",locale:"locale",locales:"locales",accelerometer:"accelerometer",deviceOrientation:"device orientation",locations:"Locations",touch:"Touch",devicebased:"Device-based",forceEnabled:"Force enabled",emulateIdleDetectorState:"Emulate Idle Detector state",noIdleEmulation:"No idle emulation",userActiveScreenUnlocked:"User active, screen unlocked",userActiveScreenLocked:"User active, screen locked",userIdleScreenUnlocked:"User idle, screen unlocked",userIdleScreenLocked:"User idle, screen locked",showSensors:"Show Sensors",showLocations:"Show Locations"},m=o.i18n.registerUIStrings("panels/sensors/sensors-meta.ts",d),u=o.i18n.getLazilyComputedLocalizedString.bind(void 0,m);let p;async function S(){return p||(p=await import("../../panels/sensors/sensors.js")),p}i.ViewManager.registerViewExtension({location:"drawer-view",commandPrompt:u(d.showSensors),title:u(d.sensors),id:"sensors",persistence:"closeable",order:100,loadView:async()=>(await S()).SensorsView.SensorsView.instance(),tags:[u(d.geolocation),u(d.timezones),u(d.locale),u(d.locales),u(d.accelerometer),u(d.deviceOrientation)]}),i.ViewManager.registerViewExtension({location:"settings-view",id:"emulation-locations",commandPrompt:u(d.showLocations),title:u(d.locations),order:40,loadView:async()=>(await S()).LocationsSettingsTab.LocationsSettingsTab.instance(),settings:["emulation.locations"]}),e.Settings.registerSettingExtension({storageType:e.Settings.SettingStorageType.Synced,settingName:"emulation.locations",settingType:e.Settings.SettingType.ARRAY,defaultValue:[{title:"Berlin",lat:52.520007,long:13.404954,timezoneId:"Europe/Berlin",locale:"de-DE"},{title:"London",lat:51.507351,long:-.127758,timezoneId:"Europe/London",locale:"en-GB"},{title:"Moscow",lat:55.755826,long:37.6173,timezoneId:"Europe/Moscow",locale:"ru-RU"},{title:"Mountain View",lat:37.386052,long:-122.083851,timezoneId:"America/Los_Angeles",locale:"en-US"},{title:"Mumbai",lat:19.075984,long:72.877656,timezoneId:"Asia/Kolkata",locale:"mr-IN"},{title:"San Francisco",lat:37.774929,long:-122.419416,timezoneId:"America/Los_Angeles",locale:"en-US"},{title:"Shanghai",lat:31.230416,long:121.473701,timezoneId:"Asia/Shanghai",locale:"zh-Hans-CN"},{title:"São Paulo",lat:-23.55052,long:-46.633309,timezoneId:"America/Sao_Paulo",locale:"pt-BR"},{title:"Tokyo",lat:35.689487,long:139.691706,timezoneId:"Asia/Tokyo",locale:"ja-JP"}]}),e.Settings.registerSettingExtension({title:u(d.touch),reloadRequired:!0,settingName:"emulation.touch",settingType:e.Settings.SettingType.ENUM,defaultValue:"none",options:[{value:"none",title:u(d.devicebased),text:u(d.devicebased)},{value:"force",title:u(d.forceEnabled),text:u(d.forceEnabled)}]}),e.Settings.registerSettingExtension({title:u(d.emulateIdleDetectorState),settingName:"emulation.idleDetection",settingType:e.Settings.SettingType.ENUM,defaultValue:"none",options:[{value:"none",title:u(d.noIdleEmulation),text:u(d.noIdleEmulation)},{value:'{"isUserActive":true,"isScreenUnlocked":true}',title:u(d.userActiveScreenUnlocked),text:u(d.userActiveScreenUnlocked)},{value:'{"isUserActive":true,"isScreenUnlocked":false}',title:u(d.userActiveScreenLocked),text:u(d.userActiveScreenLocked)},{value:'{"isUserActive":false,"isScreenUnlocked":true}',title:u(d.userIdleScreenUnlocked),text:u(d.userIdleScreenUnlocked)},{value:'{"isUserActive":false,"isScreenUnlocked":false}',title:u(d.userIdleScreenLocked),text:u(d.userIdleScreenLocked)}]});const w={developerResources:"Developer Resources",showDeveloperResources:"Show Developer Resources"},A=o.i18n.registerUIStrings("panels/developer_resources/developer_resources-meta.ts",w),h=o.i18n.getLazilyComputedLocalizedString.bind(void 0,A);let y;i.ViewManager.registerViewExtension({location:"drawer-view",id:"resource-loading-pane",title:h(w.developerResources),commandPrompt:h(w.showDeveloperResources),order:100,persistence:"closeable",experiment:t.Runtime.ExperimentName.DEVELOPER_RESOURCES_VIEW,loadView:async()=>new((await async function(){return y||(y=await import("../../panels/developer_resources/developer_resources.js")),y}()).DeveloperResourcesView.DeveloperResourcesView)});const R={rendering:"Rendering",showRendering:"Show Rendering",paint:"paint",layout:"layout",fps:"fps",cssMediaType:"CSS media type",cssMediaFeature:"CSS media feature",visionDeficiency:"vision deficiency",colorVisionDeficiency:"color vision deficiency",reloadPage:"Reload page",hardReloadPage:"Hard reload page",forceAdBlocking:"Force ad blocking on this site",blockAds:"Block ads on this site",showAds:"Show ads on this site, if allowed",autoOpenDevTools:"Auto-open DevTools for popups",doNotAutoOpen:"Do not auto-open DevTools for popups",disablePaused:"Disable paused state overlay",toggleCssPrefersColorSchemeMedia:"Toggle CSS media feature prefers-color-scheme"},E=o.i18n.registerUIStrings("entrypoints/inspector_main/inspector_main-meta.ts",R),v=o.i18n.getLazilyComputedLocalizedString.bind(void 0,E);let T;async function f(){return T||(T=await import("../inspector_main/inspector_main.js")),T}i.ViewManager.registerViewExtension({location:"drawer-view",id:"rendering",title:v(R.rendering),commandPrompt:v(R.showRendering),persistence:"closeable",order:50,loadView:async()=>(await f()).RenderingOptions.RenderingOptionsView.instance(),tags:[v(R.paint),v(R.layout),v(R.fps),v(R.cssMediaType),v(R.cssMediaFeature),v(R.visionDeficiency),v(R.colorVisionDeficiency)]}),i.ActionRegistration.registerActionExtension({category:i.ActionRegistration.ActionCategory.NAVIGATION,actionId:"inspector_main.reload",loadActionDelegate:async()=>(await f()).InspectorMain.ReloadActionDelegate.instance(),iconClass:"refresh",title:v(R.reloadPage),bindings:[{platform:"windows,linux",shortcut:"Ctrl+R"},{platform:"windows,linux",shortcut:"F5"},{platform:"mac",shortcut:"Meta+R"}]}),i.ActionRegistration.registerActionExtension({category:i.ActionRegistration.ActionCategory.NAVIGATION,actionId:"inspector_main.hard-reload",loadActionDelegate:async()=>(await f()).InspectorMain.ReloadActionDelegate.instance(),title:v(R.hardReloadPage),bindings:[{platform:"windows,linux",shortcut:"Shift+Ctrl+R"},{platform:"windows,linux",shortcut:"Shift+F5"},{platform:"windows,linux",shortcut:"Ctrl+F5"},{platform:"windows,linux",shortcut:"Ctrl+Shift+F5"},{platform:"mac",shortcut:"Shift+Meta+R"}]}),i.ActionRegistration.registerActionExtension({actionId:"rendering.toggle-prefers-color-scheme",category:i.ActionRegistration.ActionCategory.RENDERING,title:v(R.toggleCssPrefersColorSchemeMedia),loadActionDelegate:async()=>(await f()).RenderingOptions.ReloadActionDelegate.instance()}),e.Settings.registerSettingExtension({category:e.Settings.SettingCategory.NETWORK,title:v(R.forceAdBlocking),settingName:"network.adBlockingEnabled",settingType:e.Settings.SettingType.BOOLEAN,storageType:e.Settings.SettingStorageType.Session,defaultValue:!1,options:[{value:!0,title:v(R.blockAds)},{value:!1,title:v(R.showAds)}]}),e.Settings.registerSettingExtension({category:e.Settings.SettingCategory.GLOBAL,storageType:e.Settings.SettingStorageType.Synced,title:v(R.autoOpenDevTools),settingName:"autoAttachToCreatedPages",settingType:e.Settings.SettingType.BOOLEAN,order:2,defaultValue:!1,options:[{value:!0,title:v(R.autoOpenDevTools)},{value:!1,title:v(R.doNotAutoOpen)}]}),e.Settings.registerSettingExtension({category:e.Settings.SettingCategory.APPEARANCE,storageType:e.Settings.SettingStorageType.Synced,title:v(R.disablePaused),settingName:"disablePausedStateOverlay",settingType:e.Settings.SettingType.BOOLEAN,defaultValue:!1}),i.Toolbar.registerToolbarItem({loadItem:async()=>(await f()).InspectorMain.NodeIndicator.instance(),order:2,location:i.Toolbar.ToolbarItemLocation.MAIN_TOOLBAR_LEFT,showLabel:void 0,condition:void 0,separator:void 0,actionId:void 0}),i.Toolbar.registerToolbarItem({loadItem:async()=>(await f()).OutermostTargetSelector.OutermostTargetSelector.instance(),order:98,location:i.Toolbar.ToolbarItemLocation.MAIN_TOOLBAR_RIGHT,showLabel:void 0,condition:void 0,separator:void 0,actionId:void 0,experiment:t.Runtime.ExperimentName.OUTERMOST_TARGET_SELECTOR});const I={issues:"Issues",showIssues:"Show Issues",cspViolations:"CSP Violations",showCspViolations:"Show CSP Violations"},C=o.i18n.registerUIStrings("panels/issues/issues-meta.ts",I),N=o.i18n.getLazilyComputedLocalizedString.bind(void 0,C);let P;async function x(){return P||(P=await import("../../panels/issues/issues.js")),P}i.ViewManager.registerViewExtension({location:"drawer-view",id:"issues-pane",title:N(I.issues),commandPrompt:N(I.showIssues),order:100,persistence:"closeable",loadView:async()=>(await x()).IssuesPane.IssuesPane.instance()}),i.ViewManager.registerViewExtension({location:"drawer-view",id:"csp-violations-pane",title:N(I.cspViolations),commandPrompt:N(I.showCspViolations),order:100,persistence:"closeable",loadView:async()=>(await x()).CSPViolationsView.CSPViolationsView.instance(),experiment:t.Runtime.ExperimentName.CSP_VIOLATIONS_VIEW}),e.Revealer.registerRevealer({contextTypes:()=>[n.Issue.Issue],destination:e.Revealer.RevealerDestination.ISSUES_VIEW,loadRevealer:async()=>(await x()).IssueRevealer.IssueRevealer.instance()});const D={throttling:"Throttling",showThrottling:"Show Throttling",goOffline:"Go offline",device:"device",throttlingTag:"throttling",enableSlowGThrottling:"Enable slow `3G` throttling",enableFastGThrottling:"Enable fast `3G` throttling",goOnline:"Go online"},b=o.i18n.registerUIStrings("panels/mobile_throttling/mobile_throttling-meta.ts",D),O=o.i18n.getLazilyComputedLocalizedString.bind(void 0,b);let M;async function V(){return M||(M=await import("../../panels/mobile_throttling/mobile_throttling.js")),M}i.ViewManager.registerViewExtension({location:"settings-view",id:"throttling-conditions",title:O(D.throttling),commandPrompt:O(D.showThrottling),order:35,loadView:async()=>(await V()).ThrottlingSettingsTab.ThrottlingSettingsTab.instance(),settings:["customNetworkConditions"]}),i.ActionRegistration.registerActionExtension({actionId:"network-conditions.network-offline",category:i.ActionRegistration.ActionCategory.NETWORK,title:O(D.goOffline),loadActionDelegate:async()=>(await V()).ThrottlingManager.ActionDelegate.instance(),tags:[O(D.device),O(D.throttlingTag)]}),i.ActionRegistration.registerActionExtension({actionId:"network-conditions.network-low-end-mobile",category:i.ActionRegistration.ActionCategory.NETWORK,title:O(D.enableSlowGThrottling),loadActionDelegate:async()=>(await V()).ThrottlingManager.ActionDelegate.instance(),tags:[O(D.device),O(D.throttlingTag)]}),i.ActionRegistration.registerActionExtension({actionId:"network-conditions.network-mid-tier-mobile",category:i.ActionRegistration.ActionCategory.NETWORK,title:O(D.enableFastGThrottling),loadActionDelegate:async()=>(await V()).ThrottlingManager.ActionDelegate.instance(),tags:[O(D.device),O(D.throttlingTag)]}),i.ActionRegistration.registerActionExtension({actionId:"network-conditions.network-online",category:i.ActionRegistration.ActionCategory.NETWORK,title:O(D.goOnline),loadActionDelegate:async()=>(await V()).ThrottlingManager.ActionDelegate.instance(),tags:[O(D.device),O(D.throttlingTag)]}),e.Settings.registerSettingExtension({storageType:e.Settings.SettingStorageType.Synced,settingName:"customNetworkConditions",settingType:e.Settings.SettingType.ARRAY,defaultValue:[]});const _={profiler:"Profiler",showProfiler:"Show Profiler",performance:"Performance",showPerformance:"Show Performance",startStopRecording:"Start/stop recording",showRecentTimelineSessions:"Show recent timeline sessions",record:"Record",stop:"Stop",startProfilingAndReloadPage:"Start profiling and reload page"},L=o.i18n.registerUIStrings("panels/js_profiler/js_profiler-meta.ts",_),k=o.i18n.getLazilyComputedLocalizedString.bind(void 0,L);let U,z;async function F(){return z||(z=await import("../../panels/profiler/profiler.js")),z}async function B(){return U||(U=await import("../../panels/timeline/timeline.js")),U}function W(e){return void 0===U?[]:e(U)}i.ViewManager.registerViewExtension({location:"panel",id:"js_profiler",title:k(_.profiler),commandPrompt:k(_.showProfiler),order:65,persistence:"permanent",experiment:t.Runtime.ExperimentName.JS_PROFILER_TEMP_ENABLE,loadView:async()=>(await F()).ProfilesPanel.JSProfilerPanel.instance()}),i.ActionRegistration.registerActionExtension({actionId:"profiler.js-toggle-recording",category:i.ActionRegistration.ActionCategory.JAVASCRIPT_PROFILER,title:k(_.startStopRecording),iconClass:"record-start",toggleable:!0,toggledIconClass:"record-stop",toggleWithRedColor:!0,contextTypes:()=>void 0===z?[]:(e=>[e.ProfilesPanel.JSProfilerPanel])(z),loadActionDelegate:async()=>(await F()).ProfilesPanel.JSProfilerPanel.instance(),bindings:[{platform:"windows,linux",shortcut:"Ctrl+E"},{platform:"mac",shortcut:"Meta+E"}]}),i.ActionRegistration.registerActionExtension({actionId:"timeline.show-history",loadActionDelegate:async()=>(await B()).TimelinePanel.ActionDelegate.instance(),category:i.ActionRegistration.ActionCategory.PERFORMANCE,title:k(_.showRecentTimelineSessions),contextTypes:()=>W((e=>[e.TimelinePanel.TimelinePanel])),bindings:[{platform:"windows,linux",shortcut:"Ctrl+H"},{platform:"mac",shortcut:"Meta+Y"}]}),i.ActionRegistration.registerActionExtension({actionId:"timeline.toggle-recording",category:i.ActionRegistration.ActionCategory.PERFORMANCE,iconClass:"record-start",toggleable:!0,toggledIconClass:"record-stop",toggleWithRedColor:!0,contextTypes:()=>W((e=>[e.TimelinePanel.TimelinePanel])),loadActionDelegate:async()=>(await B()).TimelinePanel.ActionDelegate.instance(),options:[{value:!0,title:k(_.record)},{value:!1,title:k(_.stop)}],bindings:[{platform:"windows,linux",shortcut:"Ctrl+E"},{platform:"mac",shortcut:"Meta+E"}]}),i.ActionRegistration.registerActionExtension({actionId:"timeline.record-reload",iconClass:"refresh",contextTypes:()=>W((e=>[e.TimelinePanel.TimelinePanel])),category:i.ActionRegistration.ActionCategory.PERFORMANCE,title:k(_.startProfilingAndReloadPage),loadActionDelegate:async()=>(await B()).TimelinePanel.ActionDelegate.instance(),bindings:[{platform:"windows,linux",shortcut:"Ctrl+Shift+E"},{platform:"mac",shortcut:"Meta+Shift+E"}]});const j={rnWelcome:"⚛️ Welcome",showRnWelcome:"Show React Native Welcome panel"},G=o.i18n.registerUIStrings("panels/rn_welcome/rn_welcome-meta.ts",j),K=o.i18n.getLazilyComputedLocalizedString.bind(void 0,G);let H;i.ViewManager.registerViewExtension({location:"panel",id:"rn-welcome",title:K(j.rnWelcome),commandPrompt:K(j.showRnWelcome),order:-10,persistence:"permanent",loadView:async()=>(await async function(){return H||(H=await import("../../panels/rn_welcome/rn_welcome.js")),H}()).RNWelcome.RNWelcomeImpl.instance(),experiment:t.Runtime.ExperimentName.REACT_NATIVE_SPECIFIC_UI}),t.Runtime.experiments.register(t.Runtime.ExperimentName.JS_PROFILER_TEMP_ENABLE,"Enable JavaScript Profiler (legacy)",!1),t.Runtime.experiments.register(t.Runtime.ExperimentName.REACT_NATIVE_SPECIFIC_UI,"Show React Native-specific UI",!1),t.Runtime.experiments.enableExperimentsByDefault([t.Runtime.ExperimentName.JS_PROFILER_TEMP_ENABLE,t.Runtime.ExperimentName.REACT_NATIVE_SPECIFIC_UI]),self.runtime=t.Runtime.Runtime.instance({forceNew:!0}),new a.MainImpl.MainImpl; |
@@ -16,2 +16,3 @@ // Copyright 2023 The Chromium Authors. All rights reserved. | ||
style.setProperty('--image-file-cssoverview_icons_2x', 'url(\"' + new URL('./cssoverview_icons_2x.avif', import.meta.url).toString() + '\")'); | ||
style.setProperty('--image-file-favicon', 'url(\"' + new URL('./favicon.ico', import.meta.url).toString() + '\")'); | ||
style.setProperty('--image-file-navigationControls_2x', 'url(\"' + new URL('./navigationControls_2x.png', import.meta.url).toString() + '\")'); | ||
@@ -18,0 +19,0 @@ style.setProperty('--image-file-navigationControls', 'url(\"' + new URL('./navigationControls.png', import.meta.url).toString() + '\")'); |
@@ -1,1 +0,1 @@ | ||
import*as e from"../../core/i18n/i18n.js";import*as t from"../../core/root/root.js";import*as i from"../../ui/legacy/legacy.js";const o={profiler:"Profiler",showProfiler:"Show Profiler",performance:"Performance",showPerformance:"Show Performance",startStopRecording:"Start/stop recording",showRecentTimelineSessions:"Show recent timeline sessions",record:"Record",stop:"Stop",startProfilingAndReloadPage:"Start profiling and reload page"},n=e.i18n.registerUIStrings("panels/js_profiler/js_profiler-meta.ts",o),r=e.i18n.getLazilyComputedLocalizedString.bind(void 0,n);let a,l;async function s(){return l||(l=await import("../profiler/profiler.js")),l}async function c(){return a||(a=await import("../timeline/timeline.js")),a}function g(e){return void 0===a?[]:e(a)}i.ViewManager.registerViewExtension({location:"panel",id:"js_profiler",title:r(o.profiler),commandPrompt:r(o.showProfiler),order:65,persistence:"closeable",experiment:t.Runtime.ExperimentName.JS_PROFILER_TEMP_ENABLE,loadView:async()=>(await s()).ProfilesPanel.JSProfilerPanel.instance()}),i.ViewManager.registerViewExtension({location:"panel",id:"timeline",title:r(o.performance),commandPrompt:r(o.showPerformance),order:66,hasToolbar:!1,isPreviewFeature:!0,loadView:async()=>(await c()).TimelinePanel.TimelinePanel.instance({forceNew:null,isNode:!0})}),i.ActionRegistration.registerActionExtension({actionId:"profiler.js-toggle-recording",category:i.ActionRegistration.ActionCategory.JAVASCRIPT_PROFILER,title:r(o.startStopRecording),iconClass:"record-start",toggleable:!0,toggledIconClass:"record-stop",toggleWithRedColor:!0,contextTypes(){return e=e=>[e.ProfilesPanel.JSProfilerPanel],void 0===l?[]:e(l);var e},loadActionDelegate:async()=>(await s()).ProfilesPanel.JSProfilerPanel.instance(),bindings:[{platform:"windows,linux",shortcut:"Ctrl+E"},{platform:"mac",shortcut:"Meta+E"}]}),i.ActionRegistration.registerActionExtension({actionId:"timeline.show-history",loadActionDelegate:async()=>(await c()).TimelinePanel.ActionDelegate.instance(),category:i.ActionRegistration.ActionCategory.PERFORMANCE,title:r(o.showRecentTimelineSessions),contextTypes:()=>g((e=>[e.TimelinePanel.TimelinePanel])),bindings:[{platform:"windows,linux",shortcut:"Ctrl+H"},{platform:"mac",shortcut:"Meta+Y"}]}),i.ActionRegistration.registerActionExtension({actionId:"timeline.toggle-recording",category:i.ActionRegistration.ActionCategory.PERFORMANCE,iconClass:"record-start",toggleable:!0,toggledIconClass:"record-stop",toggleWithRedColor:!0,contextTypes:()=>g((e=>[e.TimelinePanel.TimelinePanel])),loadActionDelegate:async()=>(await c()).TimelinePanel.ActionDelegate.instance(),options:[{value:!0,title:r(o.record)},{value:!1,title:r(o.stop)}],bindings:[{platform:"windows,linux",shortcut:"Ctrl+E"},{platform:"mac",shortcut:"Meta+E"}]}),i.ActionRegistration.registerActionExtension({actionId:"timeline.record-reload",iconClass:"refresh",contextTypes:()=>g((e=>[e.TimelinePanel.TimelinePanel])),category:i.ActionRegistration.ActionCategory.PERFORMANCE,title:r(o.startProfilingAndReloadPage),loadActionDelegate:async()=>(await c()).TimelinePanel.ActionDelegate.instance(),bindings:[{platform:"windows,linux",shortcut:"Ctrl+Shift+E"},{platform:"mac",shortcut:"Meta+Shift+E"}]}); | ||
import*as e from"../../core/i18n/i18n.js";import*as t from"../../core/root/root.js";import*as i from"../../ui/legacy/legacy.js";const o={profiler:"Profiler",showProfiler:"Show Profiler",performance:"Performance",showPerformance:"Show Performance",startStopRecording:"Start/stop recording",showRecentTimelineSessions:"Show recent timeline sessions",record:"Record",stop:"Stop",startProfilingAndReloadPage:"Start profiling and reload page"},n=e.i18n.registerUIStrings("panels/js_profiler/js_profiler-meta.ts",o),r=e.i18n.getLazilyComputedLocalizedString.bind(void 0,n);let a,l;async function s(){return l||(l=await import("../profiler/profiler.js")),l}async function c(){return a||(a=await import("../timeline/timeline.js")),a}function g(e){return void 0===a?[]:e(a)}i.ViewManager.registerViewExtension({location:"panel",id:"js_profiler",title:r(o.profiler),commandPrompt:r(o.showProfiler),order:65,persistence:"permanent",experiment:t.Runtime.ExperimentName.JS_PROFILER_TEMP_ENABLE,loadView:async()=>(await s()).ProfilesPanel.JSProfilerPanel.instance()}),i.ActionRegistration.registerActionExtension({actionId:"profiler.js-toggle-recording",category:i.ActionRegistration.ActionCategory.JAVASCRIPT_PROFILER,title:r(o.startStopRecording),iconClass:"record-start",toggleable:!0,toggledIconClass:"record-stop",toggleWithRedColor:!0,contextTypes(){return e=e=>[e.ProfilesPanel.JSProfilerPanel],void 0===l?[]:e(l);var e},loadActionDelegate:async()=>(await s()).ProfilesPanel.JSProfilerPanel.instance(),bindings:[{platform:"windows,linux",shortcut:"Ctrl+E"},{platform:"mac",shortcut:"Meta+E"}]}),i.ActionRegistration.registerActionExtension({actionId:"timeline.show-history",loadActionDelegate:async()=>(await c()).TimelinePanel.ActionDelegate.instance(),category:i.ActionRegistration.ActionCategory.PERFORMANCE,title:r(o.showRecentTimelineSessions),contextTypes:()=>g((e=>[e.TimelinePanel.TimelinePanel])),bindings:[{platform:"windows,linux",shortcut:"Ctrl+H"},{platform:"mac",shortcut:"Meta+Y"}]}),i.ActionRegistration.registerActionExtension({actionId:"timeline.toggle-recording",category:i.ActionRegistration.ActionCategory.PERFORMANCE,iconClass:"record-start",toggleable:!0,toggledIconClass:"record-stop",toggleWithRedColor:!0,contextTypes:()=>g((e=>[e.TimelinePanel.TimelinePanel])),loadActionDelegate:async()=>(await c()).TimelinePanel.ActionDelegate.instance(),options:[{value:!0,title:r(o.record)},{value:!1,title:r(o.stop)}],bindings:[{platform:"windows,linux",shortcut:"Ctrl+E"},{platform:"mac",shortcut:"Meta+E"}]}),i.ActionRegistration.registerActionExtension({actionId:"timeline.record-reload",iconClass:"refresh",contextTypes:()=>g((e=>[e.TimelinePanel.TimelinePanel])),category:i.ActionRegistration.ActionCategory.PERFORMANCE,title:r(o.startProfilingAndReloadPage),loadActionDelegate:async()=>(await c()).TimelinePanel.ActionDelegate.instance(),bindings:[{platform:"windows,linux",shortcut:"Ctrl+Shift+E"},{platform:"mac",shortcut:"Meta+Shift+E"}]}); |
@@ -1,1 +0,1 @@ | ||
import*as e from"../../ui/legacy/legacy.js";import*as t from"../../core/i18n/i18n.js";import*as n from"../../ui/lit-html/lit-html.js";const i=new CSSStyleSheet;i.replaceSync('.rn-welcome-panel{display:flex;flex-direction:column;align-items:center;justify-content:center;height:100%;padding:16px;text-align:center;background-color:var(--color-background-elevation-0)}.rn-welcome-header{display:flex;align-items:center;margin-bottom:16px}.rn-welcome-icon{width:30px;height:30px;border-radius:4px;margin-right:12px}.rn-welcome-title{font-size:20px;color:var(--color-text-primary)}.rn-welcome-tagline{margin-bottom:24px;font-size:1rem;line-height:1.3;color:var(--color-text-secondary)}.rn-welcome-links{display:flex;align-items:center}.rn-welcome-links > .devtools-link{position:relative;margin:0 16px;font-size:14px}.rn-welcome-links > .devtools-link:not(:last-child)::after{content:"";position:absolute;right:-16px;height:16px;border-right:1px solid var(--color-details-hairline)}\n/*# sourceURL=rnWelcome.css */\n');const o={debuggerBrandName:"React Native JS Inspector",welcomeMessage:"Welcome to debugging in React Native",docsLabel:"Debugging docs",whatsNewLabel:"What's new"},{render:r,html:l}=n,s=t.i18n.registerUIStrings("panels/rn_welcome/RNWelcome.ts",o),c=t.i18n.getLocalizedString.bind(void 0,s);let a;class d extends e.Widget.VBox{static instance(e={forceNew:null}){const{forceNew:t}=e;return a&&!t||(a=new d),a}constructor(){super(!0,!0)}wasShown(){super.wasShown(),this.registerCSSFiles([i]),this.render(),e.InspectorView.InspectorView.instance().showDrawer(!0)}render(){const e=new URL("../../Images/react_native/welcomeIcon.png",import.meta.url).toString();r(l` <div class="rn-welcome-panel"> <div class="rn-welcome-header"> <img class="rn-welcome-icon" src="${e}" role="presentation"> <div class="rn-welcome-title"> ${c(o.debuggerBrandName)} </div> </div> <div class="rn-welcome-tagline"> ${c(o.welcomeMessage)} </div> <div class="rn-welcome-links"> <x-link class="devtools-link" href="https://reactnative.dev/docs/next/debugging"> ${c(o.docsLabel)} </x-link> <x-link class="devtools-link" href="https://reactnative.dev/blog/tags/debugging"> ${c(o.whatsNewLabel)} </x-link> </div> </div> `,this.contentElement,{host:this})}}var g=Object.freeze({__proto__:null,RNWelcomeImpl:d});export{g as RNWelcome}; | ||
import*as e from"../../ui/legacy/legacy.js";import*as r from"../../core/i18n/i18n.js";import*as t from"../../ui/lit-html/lit-html.js";const o=new CSSStyleSheet;o.replaceSync('.rn-welcome-panel{display:flex;flex-direction:column;align-items:center;justify-content:center;height:100%;padding:16px;text-align:center;background-color:var(--color-background-elevation-0)}.rn-welcome-header{display:flex;align-items:center;margin-bottom:16px}.rn-welcome-icon{width:30px;height:30px;border-radius:4px;margin-right:12px}.rn-welcome-title{font-size:20px;color:var(--color-text-primary)}.rn-welcome-title-accessory{margin-left:12px;padding:4px 8px;border-radius:4px;background-color:var(--color-purple-bright);font-size:12px;color:var(--color-on-primary)}.rn-welcome-tagline{margin-bottom:24px;font-size:1rem;line-height:1.3;color:var(--color-text-secondary)}.rn-welcome-links{display:flex;align-items:center}.rn-welcome-links > .devtools-link{position:relative;margin:0 16px;font-size:14px}.rn-welcome-links > .devtools-link:not(:last-child)::after{content:"";position:absolute;right:-16px;height:16px;border-right:1px solid var(--color-details-hairline)}\n/*# sourceURL=rnWelcome.css */\n');const n={debuggerBrandName:"React Native JS Inspector",techPreviewLabel:"Technology Preview",welcomeMessage:"Welcome to debugging in React Native",docsLabel:"Debugging docs",whatsNewLabel:"What's new"},{render:i,html:l}=t,s=r.i18n.registerUIStrings("panels/rn_welcome/RNWelcome.ts",n),c=r.i18n.getLocalizedString.bind(void 0,s);let a;class d extends e.Widget.VBox{static instance(e={forceNew:null}){const{forceNew:r}=e;return a&&!r||(a=new d),a}constructor(){super(!0,!0)}wasShown(){super.wasShown(),this.registerCSSFiles([o]),this.render(),e.InspectorView.InspectorView.instance().showDrawer(!0)}render(){const e=new URL("../../Images/react_native/welcomeIcon.png",import.meta.url).toString();i(l` <div class="rn-welcome-panel"> <div class="rn-welcome-header"> <img class="rn-welcome-icon" src="${e}" role="presentation"> <div class="rn-welcome-title"> ${c(n.debuggerBrandName)} </div> <div class="rn-welcome-title-accessory"> ${c(n.techPreviewLabel)} </div> </div> <div class="rn-welcome-tagline"> ${c(n.welcomeMessage)} </div> <div class="rn-welcome-links"> <x-link class="devtools-link" href="https://reactnative.dev/docs/debugging"> ${c(n.docsLabel)} </x-link> <x-link class="devtools-link" href="https://reactnative.dev/blog"> ${c(n.whatsNewLabel)} </x-link> </div> </div> `,this.contentElement,{host:this})}}var m=Object.freeze({__proto__:null,RNWelcomeImpl:d});export{m as RNWelcome}; |
{ | ||
"name": "@react-native/debugger-frontend", | ||
"version": "0.73.0-nightly-20231001-d95433f82", | ||
"version": "0.73.0-nightly-20231002-0371014a3", | ||
"description": "Debugger frontend for React Native based on Chrome DevTools", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Native code
Supply chain riskContains native code (e.g., compiled binaries or shared libraries). Including native code can obscure malicious behavior.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
12079552
657
44468
56