@react-native/debugger-frontend
Version:
Debugger frontend for React Native based on Chrome DevTools
1 lines • 444 kB
JavaScript
import*as e from"../../core/common/common.js";import*as t from"../../core/i18n/i18n.js";import*as n from"../../core/platform/platform.js";import*as i from"../../core/root/root.js";import*as s from"../visual_logging/visual_logging.js";import*as r from"../../core/host/host.js";import*as o from"../../models/text_utils/text_utils.js";import*as a from"../components/buttons/buttons.js";import*as l from"../components/icon_button/icon_button.js";import*as c from"./theme_support/theme_support.js";import*as d from"../components/adorners/adorners.js";import"../../core/dom_extension/dom_extension.js";import*as h from"../components/helpers/helpers.js";import*as u from"../components/settings/settings.js";import*as p from"../lit-html/lit-html.js";let g;class m{flavorsInternal;eventDispatchers;constructor(){this.flavorsInternal=new Map,this.eventDispatchers=new Map}static instance(e={forceNew:null}){const{forceNew:t}=e;return g&&!t||(g=new m),g}static removeInstance(){g=void 0}setFlavor(e,t){(this.flavorsInternal.get(e)||null)!==t&&(t?this.flavorsInternal.set(e,t):this.flavorsInternal.delete(e),this.dispatchFlavorChange(e,t))}dispatchFlavorChange(e,t){for(const n of b)n.contextTypes().includes(e)&&n.loadListener().then((e=>e.flavorChanged(t)));const n=this.eventDispatchers.get(e);n&&n.dispatchEventToListeners("FlavorChanged",t)}addFlavorChangeListener(t,n,i){let s=this.eventDispatchers.get(t);s||(s=new e.ObjectWrapper.ObjectWrapper,this.eventDispatchers.set(t,s)),s.addEventListener("FlavorChanged",n,i)}removeFlavorChangeListener(e,t,n){const i=this.eventDispatchers.get(e);i&&(i.removeEventListener("FlavorChanged",t,n),i.hasEventListeners("FlavorChanged")||this.eventDispatchers.delete(e))}flavor(e){return this.flavorsInternal.get(e)||null}flavors(){return new Set(this.flavorsInternal.keys())}}const b=[];var f=Object.freeze({__proto__:null,Context:m,registerListener:function(e){b.push(e)}});const v={elements:"Elements",screenshot:"Screenshot",network:"Network",memory:"Memory",javascript_profiler:"JavaScript Profiler",console:"Console",performance:"Performance",mobile:"Mobile",help:"Help",layers:"Layers",navigation:"Navigation",drawer:"Drawer",global:"Global",resources:"Resources",background_services:"Background Services",settings:"Settings",debugger:"Debugger",sources:"Sources",rendering:"Rendering",recorder:"Recorder",changes:"Changes"},y=t.i18n.registerUIStrings("ui/legacy/ActionRegistration.ts",v),w=t.i18n.getLocalizedString.bind(void 0,y);class x extends e.ObjectWrapper.ObjectWrapper{enabledInternal=!0;toggledInternal=!1;actionRegistration;constructor(e){super(),this.actionRegistration=e}id(){return this.actionRegistration.actionId}async execute(){if(!this.actionRegistration.loadActionDelegate)return!1;const e=await this.actionRegistration.loadActionDelegate(),t=this.id();return e.handleAction(m.instance(),t)}icon(){return this.actionRegistration.iconClass}toggledIcon(){return this.actionRegistration.toggledIconClass}toggleWithRedColor(){return Boolean(this.actionRegistration.toggleWithRedColor)}setEnabled(e){this.enabledInternal!==e&&(this.enabledInternal=e,this.dispatchEventToListeners("Enabled",e))}enabled(){return this.enabledInternal}category(){return this.actionRegistration.category}tags(){if(this.actionRegistration.tags)return this.actionRegistration.tags.map((e=>e())).join("\0")}toggleable(){return Boolean(this.actionRegistration.toggleable)}title(){let e=this.actionRegistration.title?this.actionRegistration.title():t.i18n.lockedString("");const n=this.actionRegistration.options;if(n)for(const t of n)t.value!==this.toggledInternal&&(e=t.title());return e}toggled(){return this.toggledInternal}setToggled(e){console.assert(this.toggleable(),"Shouldn't be toggling an untoggleable action",this.id()),this.toggledInternal!==e&&(this.toggledInternal=e,this.dispatchEventToListeners("Toggled",e))}options(){return this.actionRegistration.options}contextTypes(){if(this.actionRegistration.contextTypes)return this.actionRegistration.contextTypes()}canInstantiate(){return Boolean(this.actionRegistration.loadActionDelegate)}bindings(){return this.actionRegistration.bindings}experiment(){return this.actionRegistration.experiment}setting(){return this.actionRegistration.setting}condition(){return this.actionRegistration.condition}order(){return this.actionRegistration.order}}const E=new Map;function I(){E.clear()}function S(){return Array.from(E.values()).filter((t=>{const n=t.setting();try{if(n&&!e.Settings.moduleSetting(n).get())return!1}catch(e){if(e.message.startsWith("No setting registered"))return!1}return i.Runtime.Runtime.isDescriptorEnabled({experiment:t.experiment(),condition:t.condition()},e.Settings.Settings.instance().getHostConfig())})).sort(((e,t)=>(e.order()||0)-(t.order()||0)))}var k=Object.freeze({__proto__:null,Action:x,registerActionExtension:function(e){const t=e.actionId;if(E.has(t))throw new Error(`Duplicate action ID '${t}'`);if(!n.StringUtilities.isExtendedKebabCase(t))throw new Error(`Invalid action ID '${t}'`);E.set(t,new x(e))},reset:I,getRegisteredActionExtensions:S,maybeRemoveActionExtension:function(e){return E.delete(e)},getLocalizedActionCategory:function(e){switch(e){case"ELEMENTS":return w(v.elements);case"SCREENSHOT":return w(v.screenshot);case"NETWORK":return w(v.network);case"MEMORY":return w(v.memory);case"JAVASCRIPT_PROFILER":return w(v.javascript_profiler);case"CONSOLE":return w(v.console);case"PERFORMANCE":return w(v.performance);case"MOBILE":return w(v.mobile);case"HELP":return w(v.help);case"LAYERS":return w(v.layers);case"NAVIGATION":return w(v.navigation);case"DRAWER":return w(v.drawer);case"GLOBAL":return w(v.global);case"RESOURCES":return w(v.resources);case"BACKGROUND_SERVICES":return w(v.background_services);case"SETTINGS":return w(v.settings);case"DEBUGGER":return w(v.debugger);case"SOURCES":return w(v.sources);case"RENDERING":return w(v.rendering);case"RECORDER":return w(v.recorder);case"CHANGES":return w(v.changes);case"":return t.i18n.lockedString("")}return t.i18n.lockedString(e)}});let C;class T{actionsById;constructor(){this.actionsById=new Map,this.registerActions()}static instance(e={forceNew:null}){const{forceNew:t}=e;return C&&!t||(C=new T),C}static removeInstance(){C=void 0}static reset(){T.removeInstance(),I()}registerActions(){for(const e of S())this.actionsById.set(e.id(),e),e.canInstantiate()||e.setEnabled(!1)}availableActions(){return this.applicableActions([...this.actionsById.keys()],m.instance())}actions(){return[...this.actionsById.values()]}applicableActions(e,t){const n=[];for(const s of e){const e=this.actionsById.get(s);e&&e.enabled()&&i(e,t.flavors())&&n.push(e)}return n;function i(e,t){const n=e.contextTypes();if(!n)return!0;for(let e=0;e<n.length;++e){const i=n[e];if(Boolean(i)&&t.has(i))return!0}return!1}}hasAction(e){return this.actionsById.has(e)}getAction(e){const t=this.actionsById.get(e);if(t)return t;throw new Error(`Cannot find registered action with ID '${e}'`)}}var L=Object.freeze({__proto__:null,ActionRegistry:T}),M={cssContent:".widget{box-shadow:var(--drop-shadow);background:var(--sys-color-cdt-base-container);justify-content:flex-start;align-items:stretch;display:flex}.dialog-close-button{position:absolute;right:9px;top:9px;z-index:1}\n/*# sourceURL=dialog.css */\n"},P={cssContent:":host{position:absolute!important;top:0;bottom:0;left:0;right:0;overflow:hidden;contain:strict;background-color:transparent}:host-context(.dimmed-pane){background-color:var(--color-background-opacity-50)}:host-context(.no-pointer-events){pointer-events:none}.widget{display:flex;background-color:transparent;pointer-events:auto;flex:none}.no-pointer-events{pointer-events:none}.arrow{background-image:var(--image-file-popoverArrows);width:19px;height:19px}.arrow-top{background-position:0 76px;margin-top:-19px;margin-left:-9px}.arrow-bottom{background-position:0 57px;margin-left:-9px}.arrow-left{background-position:0 38px;margin-left:-19px;margin-top:-9px}.arrow-right{background-position:0 19px;margin-top:-9px}.arrow-none{display:none}:host-context(.theme-with-dark-background) .arrow{filter:invert(80%)}\n/*# sourceURL=glassPane.css */\n"},D={cssContent:":root{--icon-action:var(--sys-color-primary-bright);--icon-arrow-main-thread:var(--sys-color-primary-bright);--icon-checkmark-green:var(--sys-color-green-bright);--icon-checkmark-purple:var(--sys-color-purple-bright);--icon-checkmark-red:var(--sys-color-error-bright);--icon-contrast-issue:var(--sys-color-error-bright);--icon-default:var(--sys-color-on-surface-subtle);--icon-default-hover:var(--sys-color-on-surface);--icon-disabled:var(--sys-color-state-disabled);--icon-error:var(--sys-color-error-bright);--icon-file-authored:var(--sys-color-orange-bright);--icon-file-default:var(--sys-color-on-surface-subtle);--icon-file-document:var(--sys-color-blue-bright);--icon-file-font:var(--sys-color-cyan-bright);--icon-file-media:var(--sys-color-green-bright);--icon-file-image:var(--sys-color-green-bright);--icon-file-script:var(--sys-color-orange-bright);--icon-file-styles:var(--sys-color-purple-bright);--icon-fold-marker:var(--sys-color-on-surface-subtle);--icon-folder-authored:var(--sys-color-orange);--icon-folder-primary:var(--sys-color-on-surface-subtle);--icon-folder-deployed:var(--sys-color-primary-bright);--icon-folder-workspace:var(--sys-color-orange);--icon-force-white:var(--sys-color-on-tonal-container);--icon-gap-focus-selected:var(--sys-color-tonal-container);--icon-gap-default:var(--sys-color-cdt-base-container);--icon-gap-inactive:var(--sys-color-neutral-container);--icon-gap-hover:var(--sys-color-state-hover-on-subtle);--icon-gap-toolbar:var(--sys-color-surface1);--icon-gap-toolbar-hover:var(--sys-color-state-header-hover);--icon-info:var(--sys-color-primary-bright);--icon-link:var(--sys-color-primary-bright);--icon-no-request:var(--sys-color-orange-bright);--icon-primary:var(--sys-color-primary-bright);--icon-record:var(--sys-color-error-bright);--icon-request-response:var(--sys-color-primary-bright);--icon-request:var(--sys-color-on-surface-subtle);--icon-security-lock:var(--sys-color-green-bright);--icon-css:var(--sys-color-purple-bright);--icon-css-hover:var(--sys-color-purple);--icon-status-code-ok:var(--sys-color-tertiary-bright);--icon-stop:var(--sys-color-error-bright);--icon-toggled:var(--sys-color-primary-bright);--icon-warning:var(--sys-color-orange-bright);--ui-text:var(--sys-color-on-surface-subtle);--text-disabled:var(--ref-palette-neutral60);--text-primary:var(--sys-color-on-surface);--text-secondary:var(--sys-color-token-subtle);--text-link:var(--sys-color-primary);--color-grid-stripe:var(--sys-color-surface1);--color-grid-default:var(--sys-color-surface);--color-grid-focus-selected:var(--sys-color-tonal-container);--color-grid-selected:var(--sys-color-surface-variant);--color-grid-hovered:var(--sys-color-state-hover-on-subtle)}\n/*# sourceURL=applicationColorTokens.css */\n"},A={cssContent:":host{padding:0;margin:0;display:inline-flex;flex-shrink:0;align-items:center!important;overflow:hidden;white-space:nowrap}input{height:12px;width:12px;flex-shrink:0;accent-color:var(--sys-color-primary-bright);color:var(--sys-color-on-primary);&:not(.small){margin:6px}}input.inside-datagrid{height:10px;width:10px}.dt-checkbox-text{overflow:hidden;text-overflow:ellipsis}.dt-checkbox-subtitle{color:var(--sys-color-token-subtle);white-space:break-spaces}@media (forced-colors: active){input.dt-checkbox-theme-preserve{forced-color-adjust:none}input.dt-checkbox-theme-preserve:active{background:HighlightText}input.dt-checkbox-theme-preserve:checked,\n input.dt-checkbox-theme-preserve:active:checked{background:Highlight;border-color:Highlight}input.dt-checkbox-theme-preserve:hover:enabled{border-color:Highlight}input.dt-checkbox-theme-preserve:active::before,\n input.dt-checkbox-theme-preserve:active::after{background-color:Highlight}input.dt-checkbox-theme-preserve:checked::before,\n input.dt-checkbox-theme-preserve:checked::after,\n input.dt-checkbox-theme-preserve:active:checked::before,\n input.dt-checkbox-theme-preserve:active:checked::after{background-color:HighlightText}input.dt-checkbox-theme-preserve:hover:checked::before,\n input.dt-checkbox-theme-preserve:hover:checked::after{background-color:Highlight!important}input.dt-checkbox-theme-preserve:hover:checked{background:HighlightText}}\n/*# sourceURL=checkboxTextLabel.css */\n"},R={cssContent:".widget{padding:20px;box-sizing:border-box;max-width:400px;overflow:hidden}.message{text-align:center}.message,\n.button{font-size:larger;white-space:pre;margin:10px 0}.button{text-align:center;margin-top:20px;display:flex;flex-direction:row-reverse;gap:var(--sys-size-6)}.button button{min-width:100px}.reason{color:var(--sys-color-error);margin-top:10px}.message span{white-space:normal;word-wrap:break-word;max-width:100%;display:inline-block;overflow:hidden;text-overflow:ellipsis;padding:5px;margin:0}\n/*# sourceURL=confirmDialog.css */\n"},B={cssContent:":root{--ref-typeface-weight-regular:400;--ref-typeface-weight-medium:500;--ref-typeface-weight-bold:700;--sys-elevation-level1:0 1px 2px 0 rgb(0 0 0/30%),0 1px 3px 1px rgb(0 0 0/15%);--sys-elevation-level2:0 1px 2px 0 rgb(0 0 0/30%),0 2px 6px 2px rgb(0 0 0/15%);--sys-elevation-level3:0 4px 8px 3px rgb(0 0 0/15%),0 1px 3px 0 rgb(0 0 0/30%);--sys-elevation-level4:0 6px 10px 4px rgb(0 0 0/15%),0 2px 3px 0 rgb(0 0 0/30%);--sys-elevation-level5:0 8px 12px 6px rgb(0 0 0/15%),0 4px 4px 0 rgb(0 0 0/30%);--sys-size-1:1px;--sys-size-2:0.125rem;--sys-size-3:0.25rem;--sys-size-4:0.375rem;--sys-size-5:0.5rem;--sys-size-6:0.75rem;--sys-size-7:0.875rem;--sys-size-8:1rem;--sys-size-9:1.25rem;--sys-size-10:1.375rem;--sys-size-11:1.5rem;--sys-size-12:1.75rem;--sys-size-13:2rem;--sys-size-14:2.5rem;--sys-size-15:2.75rem;--sys-size-16:3rem;--sys-size-17:3.5rem;--sys-size-18:4rem;--sys-size-19:6rem;--sys-size-20:7rem;--sys-size-21:8rem;--sys-size-22:9rem;--sys-size-23:10rem;--sys-size-24:11rem;--sys-size-25:12rem;--sys-size-26:13rem;--sys-size-27:14rem;--sys-size-28:15rem;--sys-size-29:16rem;--sys-size-30:18rem;--sys-size-31:20rem;--sys-size-32:24rem;--sys-size-33:28rem;--sys-size-34:32rem;--sys-size-35:36rem;--sys-size-36:42rem;--sys-size-37:48rem;--sys-size-38:56rem;--sys-size-39:64rem;--sys-size-40:72rem;--sys-size-41:80rem;--sys-shape-corner-extra-small:4px;--sys-shape-corner-small:8px;--sys-shape-corner-medium-small:12px;--sys-shape-corner-medium:16px;--sys-shape-corner-large:24px;--sys-shape-corner-full:9999px;--sys-typescale-headline1:var(--ref-typeface-weight-medium) var(--sys-typescale-headline1-size) /var(--sys-typescale-headline1-line-height) var(--default-font-family);--sys-typescale-headline2:var(--ref-typeface-weight-medium) var(--sys-typescale-headline2-size) /var(--sys-typescale-headline2-line-height) var(--default-font-family);--sys-typescale-headline3:var(--ref-typeface-weight-medium) var(--sys-typescale-headline3-size) /var(--sys-typescale-headline3-line-height) var(--default-font-family);--sys-typescale-headline4:var(--ref-typeface-weight-medium) var(--sys-typescale-headline4-size) /var(--sys-typescale-headline4-line-height) var(--default-font-family);--sys-typescale-headline5:var(--ref-typeface-weight-medium) var(--sys-typescale-headline5-size) /var(--sys-typescale-headline5-line-height) var(--default-font-family);--sys-typescale-body1-regular:var(--ref-typeface-weight-regular) var(--sys-typescale-body1-size) /var(--sys-typescale-body1-line-height) var(--default-font-family);--sys-typescale-body2-regular:var(--ref-typeface-weight-regular) var(--sys-typescale-body2-size) /var(--sys-typescale-body2-line-height) var(--default-font-family);--sys-typescale-body3-regular:var(--ref-typeface-weight-regular) var(--sys-typescale-body3-size) /var(--sys-typescale-body3-line-height) var(--default-font-family);--sys-typescale-body4-regular:var(--ref-typeface-weight-regular) var(--sys-typescale-body4-size) /var(--sys-typescale-body4-line-height) var(--default-font-family);--sys-typescale-body5-regular:var(--ref-typeface-weight-regular) var(--sys-typescale-body5-size) /var(--sys-typescale-body5-line-height) var(--default-font-family);--sys-typescale-body1-medium:var(--ref-typeface-weight-medium) var(--sys-typescale-body1-size) /var(--sys-typescale-body1-line-height) var(--default-font-family);--sys-typescale-body2-medium:var(--ref-typeface-weight-medium) var(--sys-typescale-body2-size) /var(--sys-typescale-body2-line-height) var(--default-font-family);--sys-typescale-body3-medium:var(--ref-typeface-weight-medium) var(--sys-typescale-body3-size) /var(--sys-typescale-body3-line-height) var(--default-font-family);--sys-typescale-body4-medium:var(--ref-typeface-weight-medium) var(--sys-typescale-body4-size) /var(--sys-typescale-body4-line-height) var(--default-font-family);--sys-typescale-body5-medium:var(--ref-typeface-weight-medium) var(--sys-typescale-body5-size) /var(--sys-typescale-body5-line-height) var(--default-font-family);--sys-typescale-body1-bold:var(--ref-typeface-weight-bold) var(--sys-typescale-body1-size) /var(--sys-typescale-body1-line-height) var(--default-font-family);--sys-typescale-body2-bold:var(--ref-typeface-weight-bold) var(--sys-typescale-body2-size) /var(--sys-typescale-body2-line-height) var(--default-font-family);--sys-typescale-body3-bold:var(--ref-typeface-weight-bold) var(--sys-typescale-body3-size) /var(--sys-typescale-body3-line-height) var(--default-font-family);--sys-typescale-body4-bold:var(--ref-typeface-weight-bold) var(--sys-typescale-body4-size) /var(--sys-typescale-body4-line-height) var(--default-font-family);--sys-typescale-body5-bold:var(--ref-typeface-weight-bold) var(--sys-typescale-body5-size) /var(--sys-typescale-body5-line-height) var(--default-font-family);--sys-typescale-monospace-regular:var(--ref-typeface-weight-regular) var(--sys-typescale-monospace-size) /var(--sys-typescale-monospace-line-height) var(--monospace-font-family);--sys-typescale-monospace-bold:var(--ref-typeface-weight-bold) var(--sys-typescale-monospace-size) /var(--sys-typescale-monospace-line-height) var(--monospace-font-family);--sys-typescale-headline1-size:24px;--sys-typescale-headline2-size:20px;--sys-typescale-headline3-size:18px;--sys-typescale-headline4-size:16px;--sys-typescale-headline5-size:14px;--sys-typescale-body1-size:16px;--sys-typescale-body2-size:14px;--sys-typescale-body3-size:13px;--sys-typescale-body4-size:12px;--sys-typescale-body5-size:11px;--sys-typescale-headline1-line-height:32px;--sys-typescale-headline2-line-height:24px;--sys-typescale-headline3-line-height:24px;--sys-typescale-headline4-line-height:24px;--sys-typescale-headline5-line-height:20px;--sys-typescale-body1-line-height:24px;--sys-typescale-body2-line-height:20px;--sys-typescale-body3-line-height:20px;--sys-typescale-body4-line-height:16px;--sys-typescale-body5-line-height:16px}\n/*# sourceURL=designTokens.css */\n"};const z=1e-5;class O{x;y;z;constructor(e,t,n){this.x=e,this.y=t,this.z=n}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)}normalize(){const e=this.length();e<=z||(this.x/=e,this.y/=e,this.z/=e)}}class F{x;y;constructor(e,t){this.x=e,this.y=t}distanceTo(e){return Math.sqrt(Math.pow(e.x-this.x,2)+Math.pow(e.y-this.y,2))}projectOn(e){return 0===e.x&&0===e.y?new F(0,0):e.scale((this.x*e.x+this.y*e.y)/(Math.pow(e.x,2)+Math.pow(e.y,2)))}scale(e){return new F(this.x*e,this.y*e)}toString(){return Math.round(100*this.x)/100+", "+Math.round(100*this.y)/100}}class H{controlPoints;constructor(e,t){this.controlPoints=[e,t]}static parse(e){const t=H.KeywordValues,n=e.toLowerCase().replace(/\s+/g,"");if(t.has(n))return H.parse(t.get(n));const i=n.match(/^cubic-bezier\(([^,]+),([^,]+),([^,]+),([^,]+)\)$/);if(i){const e=new F(parseFloat(i[1]),parseFloat(i[2])),t=new F(parseFloat(i[3]),parseFloat(i[4]));return new H(e,t)}return null}evaluateAt(e){function t(e,t,n){return 3*(1-n)*(1-n)*n*e+3*(1-n)*n*n*t+Math.pow(n,3)}const n=t(this.controlPoints[0].x,this.controlPoints[1].x,e),i=t(this.controlPoints[0].y,this.controlPoints[1].y,e);return new F(n,i)}asCSSText(){const e="cubic-bezier("+this.controlPoints.join(", ")+")",t=H.KeywordValues;for(const[n,i]of t)if(e===i&&"linear"!==n)return n;return e}static Regex=/((cubic-bezier\([^)]+\))|\b(linear(?![-\(])|ease-in-out|ease-in|ease-out|ease)\b)|(linear\([^)]+\))/g;static KeywordValues=new Map([["linear","cubic-bezier(0, 0, 1, 1)"],["ease","cubic-bezier(0.25, 0.1, 0.25, 1)"],["ease-in","cubic-bezier(0.42, 0, 1, 1)"],["ease-in-out","cubic-bezier(0.42, 0, 0.58, 1)"],["ease-out","cubic-bezier(0, 0, 0.58, 1)"]])}const W=new H(new F(0,0),new F(1,1));class N{alpha;beta;gamma;constructor(e,t,n){this.alpha=e,this.beta=t,this.gamma=n}static fromDeviceOrientationRotationMatrix(e){let t,n,i;return Math.abs(e.m33)<z?Math.abs(e.m13)<z?(t=Math.atan2(e.m12,e.m11),n=e.m23>0?Math.PI/2:-Math.PI/2,i=0):e.m13>0?(t=Math.atan2(-e.m21,e.m22),n=Math.asin(e.m23),i=-Math.PI/2):(t=Math.atan2(e.m21,-e.m22),n=-Math.asin(e.m23),n+=n>0||Math.abs(n)<z?-Math.PI:Math.PI,i=-Math.PI/2):e.m33>0?(t=Math.atan2(-e.m21,e.m22),n=Math.asin(e.m23),i=Math.atan2(-e.m13,e.m33)):(t=Math.atan2(e.m21,-e.m22),n=-Math.asin(e.m23),n+=n>0||Math.abs(n)<z?-Math.PI:Math.PI,i=Math.atan2(e.m13,-e.m33)),t<-z&&(t+=2*Math.PI),t=Number(U(t).toFixed(6)),n=Number(U(n).toFixed(6)),i=Number(U(i).toFixed(6)),new N(t,n,i)}}const j=function(e,t){return e.x*t.x+e.y*t.y+e.z*t.z},V=function(e,t){const n=e.x*t.m14+e.y*t.m24+e.z*t.m34+t.m44,i=(e.x*t.m11+e.y*t.m21+e.z*t.m31+t.m41)/n,s=(e.x*t.m12+e.y*t.m22+e.z*t.m32+t.m42)/n,r=(e.x*t.m13+e.y*t.m23+e.z*t.m33+t.m43)/n;return new O(i,s,r)},U=function(e){return 180*e/Math.PI};class _{width;height;constructor(e,t){this.width=e,this.height=t}clipTo(e){return e?new _(Math.min(this.width,e.width),Math.min(this.height,e.height)):this}scale(e){return new _(this.width*e,this.height*e)}isEqual(e){return null!==e&&this.width===e.width&&this.height===e.height}widthToMax(e){return new _(Math.max(this.width,"number"==typeof e?e:e.width),this.height)}addWidth(e){return new _(this.width+("number"==typeof e?e:e.width),this.height)}heightToMax(e){return new _(this.width,Math.max(this.height,"number"==typeof e?e:e.height))}addHeight(e){return new _(this.width,this.height+("number"==typeof e?e:e.height))}}class K{minimum;preferred;constructor(e,t){if(this.minimum=e||new _(0,0),this.preferred=t||this.minimum,this.minimum.width>this.preferred.width||this.minimum.height>this.preferred.height)throw new Error("Minimum size is greater than preferred.")}isEqual(e){return null!==e&&this.minimum.isEqual(e.minimum)&&this.preferred.isEqual(e.preferred)}widthToMax(e){return"number"==typeof e?new K(this.minimum.widthToMax(e),this.preferred.widthToMax(e)):new K(this.minimum.widthToMax(e.minimum),this.preferred.widthToMax(e.preferred))}addWidth(e){return"number"==typeof e?new K(this.minimum.addWidth(e),this.preferred.addWidth(e)):new K(this.minimum.addWidth(e.minimum),this.preferred.addWidth(e.preferred))}heightToMax(e){return"number"==typeof e?new K(this.minimum.heightToMax(e),this.preferred.heightToMax(e)):new K(this.minimum.heightToMax(e.minimum),this.preferred.heightToMax(e.preferred))}addHeight(e){return"number"==typeof e?new K(this.minimum.addHeight(e),this.preferred.addHeight(e)):new K(this.minimum.addHeight(e.minimum),this.preferred.addHeight(e.preferred))}}var q=Object.freeze({__proto__:null,Vector:O,Point:F,CubicBezier:H,LINEAR_BEZIER:W,EulerAngles:N,scalarProduct:j,crossProduct:function(e,t){const n=e.y*t.z-e.z*t.y,i=e.z*t.x-e.x*t.z,s=e.x*t.y-e.y*t.x;return new O(n,i,s)},subtract:function(e,t){const n=e.x-t.x,i=e.y-t.y,s=e.z-t.z;return new O(n,i,s)},multiplyVectorByMatrixAndNormalize:V,calculateAngle:function(e,t){const n=e.length(),i=t.length();if(n<=z||i<=z)return 0;const s=j(e,t)/n/i;return Math.abs(s)>1?0:U(Math.acos(s))},degreesToRadians:function(e){return e*Math.PI/180},degreesToGradians:function(e){return e/9*10},degreesToTurns:function(e){return e/360},radiansToDegrees:U,radiansToGradians:function(e){return 200*e/Math.PI},radiansToTurns:function(e){return e/(2*Math.PI)},gradiansToRadians:function(e){return e*Math.PI/200},turnsToRadians:function(e){return 2*e*Math.PI},boundsForTransformedPoints:function(e,t,n){n||(n={minX:1/0,maxX:-1/0,minY:1/0,maxY:-1/0}),t.length%3&&console.warn("Invalid size of points array");for(let i=0;i<t.length;i+=3){let s=new O(t[i],t[i+1],t[i+2]);s=V(s,e),n.minX=Math.min(n.minX,s.x),n.maxX=Math.max(n.maxX,s.x),n.minY=Math.min(n.minY,s.y),n.maxY=Math.max(n.maxY,s.y)}return n},Size:_,Constraints:K}),G={cssContent:":host{display:inline-flex;border:1px solid var(--sys-color-neutral-outline);border-radius:4px;position:relative;vertical-align:sub;margin:2px;background-color:var(--sys-color-cdt-base-container);justify-content:center;width:28px}:host:hover{border:none;background-color:var(--sys-color-state-hover-on-subtle)}\n/*# sourceURL=inlineButton.css */\n"},$={cssContent:'*{box-sizing:border-box;min-width:0;min-height:0}:root{height:100%;overflow:hidden;--legacy-accent-color:#1a73e8;--legacy-accent-fg-color:#1a73e8;--legacy-accent-color-hover:#3b86e8;--legacy-accent-fg-color-hover:#1567d3;--legacy-active-control-bg-color:#5a5a5a;--legacy-focus-bg-color:hsl(214deg 40% 92%);--legacy-focus-ring-inactive-shadow-color:#e0e0e0;--legacy-input-validation-error:#db1600;--legacy-toolbar-hover-bg-color:#eaeaea;--legacy-selection-fg-color:#fff;--legacy-selection-bg-color:var(--legacy-accent-color);--legacy-selection-inactive-fg-color:#5a5a5a;--legacy-selection-inactive-bg-color:#dadada;--legacy-divider-border:1px solid var(--sys-color-divider);--legacy-focus-ring-inactive-shadow:0 0 0 1px var(--legacy-focus-ring-inactive-shadow-color);--legacy-focus-ring-active-shadow:0 0 0 1px var(--legacy-accent-color);--legacy-item-selection-bg-color:#cfe8fc;--legacy-item-selection-inactive-bg-color:#e0e0e0;--monospace-font-size:10px;--monospace-font-family:monospace;--source-code-font-size:11px;--source-code-font-family:monospace;--sys-motion-duration-short4:200ms;--sys-motion-duration-medium2:300ms;--sys-motion-duration-long2:500ms;--sys-motion-easing-emphasized:cubic-bezier(0.2,0,0,1);--sys-motion-easing-emphasized-decelerate:cubic-bezier(0.05,0.7,0.1,1);--sys-motion-easing-emphasized-accelerate:cubic-bezier(0.2,0,0,1)}.theme-with-dark-background{color-scheme:dark;--legacy-accent-color:#0e639c;--legacy-accent-fg-color:#ccc;--legacy-accent-fg-color-hover:#fff;--legacy-accent-color-hover:rgb(17 119 187);--legacy-active-control-bg-color:#cdcdcd;--legacy-focus-bg-color:hsl(214deg 19% 27%);--legacy-focus-ring-inactive-shadow-color:#5a5a5a;--legacy-toolbar-hover-bg-color:#202020;--legacy-selection-fg-color:#cdcdcd;--legacy-selection-inactive-fg-color:#cdcdcd;--legacy-selection-inactive-bg-color:hsl(0deg 0% 28%);--legacy-focus-ring-inactive-shadow:0 0 0 1px var(--legacy-focus-ring-inactive-shadow-color);--legacy-item-selection-bg-color:hsl(207deg 88% 22%);--legacy-item-selection-inactive-bg-color:#454545}body{--default-font-family:".SFNSDisplay-Regular","Helvetica Neue","Lucida Grande",sans-serif;height:100%;width:100%;position:relative;overflow:hidden;margin:0;cursor:default;font-family:var(--default-font-family);font-size:12px;tab-size:4;user-select:none;color:var(--sys-color-on-surface);background:var(--sys-color-cdt-base-container)}.platform-linux{--default-font-family:"Google Sans Text","Google Sans",system-ui,sans-serif}.platform-mac{--default-font-family:system-ui,sans-serif}.platform-windows{--default-font-family:system-ui,sans-serif}:focus{outline-width:0}.platform-mac,\n:host-context(.platform-mac){--monospace-font-size:11px;--monospace-font-family:monospace;--source-code-font-size:11px;--source-code-font-family:monospace}.platform-windows,\n:host-context(.platform-windows){--monospace-font-size:12px;--monospace-font-family:monospace;--source-code-font-size:12px;--source-code-font-family:monospace}.platform-linux,\n:host-context(.platform-linux){--monospace-font-size:11px;--monospace-font-family:"Noto Sans Mono","DejaVu Sans Mono",monospace;--source-code-font-size:11px;--source-code-font-family:"Noto Sans Mono","DejaVu Sans Mono",monospace}.monospace{font-family:var(--monospace-font-family);font-size:var(--monospace-font-size)!important}.source-code{font-family:var(--source-code-font-family);font-size:var(--source-code-font-size)!important;white-space:pre-wrap}.source-code .devtools-link.text-button{max-width:100%;overflow:hidden;text-overflow:ellipsis}img{-webkit-user-drag:none}iframe,\na img{border:none}.fill{position:absolute;top:0;left:0;right:0;bottom:0}iframe.fill{width:100%;height:100%}.widget{position:relative;flex:auto;contain:style}.hbox{display:flex;flex-direction:row!important;position:relative}.vbox{display:flex;flex-direction:column!important;position:relative}.view-container > .toolbar{border-bottom:1px solid var(--sys-color-divider)}.flex-auto{flex:auto}.flex-none{flex:none}.flex-centered{display:flex;align-items:center;justify-content:center}.overflow-auto{overflow:auto;background-color:var(--sys-color-cdt-base-container)}iframe.widget{position:absolute;width:100%;height:100%;left:0;right:0;top:0;bottom:0}.hidden{display:none!important}.highlighted-search-result{border-radius:1px;background-color:var(--sys-color-yellow-container);outline:1px solid var(--sys-color-yellow-container)}.link{cursor:pointer;text-decoration:underline;color:var(--sys-color-primary);outline-offset:2px}button,\ninput,\nselect{font-family:inherit;font-size:inherit}select option,\nselect optgroup,\ninput{background-color:var(--sys-color-cdt-base-container)}input{color:inherit;&[type="checkbox"]{position:relative;&:hover::after,\n &:active::before{content:"";height:24px;width:24px;border-radius:var(--sys-shape-corner-full);position:absolute;top:-6px;left:-6px}&:not(.-theme-preserve){accent-color:var(--sys-color-primary-bright);color:var(--sys-color-on-primary)}&:not(:disabled):hover::after{background-color:var(--sys-color-state-hover-on-subtle)}&:not(:disabled):active::before{background-color:var(--sys-color-state-ripple-neutral-on-subtle)}&:not(:disabled):focus-visible{outline:none;&::before{content:"";height:15px;width:15px;border-radius:5px;position:absolute;top:-3.5px;left:-3.5px;border:2px solid var(--sys-color-state-focus-ring)}}&.small:hover::after,\n &.small:active::before{height:12px;width:12px;top:0;left:0;border-radius:2px}}}input::placeholder{--override-input-placeholder-color:rgb(0 0 0/54%);color:var(--override-input-placeholder-color)}.theme-with-dark-background input::placeholder,\n:host-context(.theme-with-dark-background) input::placeholder{--override-input-placeholder-color:rgb(230 230 230/54%)}.harmony-input:not([type]),\n.harmony-input[type="number"],\n.harmony-input[type="text"]{padding:3px 6px;height:24px;border:1px solid var(--sys-color-neutral-outline);border-radius:4px;&.error-input,\n &:invalid{border-color:var(--sys-color-error)}&:not(.error-input):not(:invalid):focus{border-color:var(--sys-color-state-focus-ring)}&:not(.error-input):not(:invalid):hover:not(:focus){background:var(--sys-color-state-hover-on-subtle)}}.highlighted-search-result.current-search-result{--override-current-search-result-background-color:rgb(255 127 0/80%);border-radius:1px;padding:1px;margin:-1px;background-color:var(--override-current-search-result-background-color)}.dimmed{opacity:60%}.editing{box-shadow:var(--drop-shadow);background-color:var(--sys-color-cdt-base-container);text-overflow:clip!important;padding-left:2px;margin-left:-2px;padding-right:2px;margin-right:-2px;margin-bottom:-1px;padding-bottom:1px;opacity:100%!important}.editing,\n.editing *{color:var(--sys-color-on-surface)!important;text-decoration:none!important}.chrome-select{appearance:none;user-select:none;border:1px solid var(--sys-color-neutral-outline);border-radius:4px;color:var(--sys-color-on-surface);font:inherit;margin:0;outline:none;padding-right:20px;padding-left:6px;background-image:var(--image-file-arrow-drop-down-light);background-color:var(--sys-color-surface);background-position:right center;background-repeat:no-repeat;min-height:24px;min-width:80px}.chrome-select:disabled{opacity:38%}.theme-with-dark-background .chrome-select,\n:host-context(.theme-with-dark-background) .chrome-select{background-image:var(--image-file-arrow-drop-down-dark)}.chrome-select:enabled{&:hover{background-color:var(--sys-color-state-hover-on-subtle)}&:active{background-color:var(--sys-color-state-ripple-neutral-on-subtle)}&:focus{outline:2px solid var(--sys-color-state-focus-ring);outline-offset:2px}}@media (forced-colors: active) and (prefers-color-scheme: light){.chrome-select{background-image:var(--image-file-arrow-drop-down-light)}.theme-with-dark-background .chrome-select,\n :host-context(.theme-with-dark-background) .chrome-select{background-image:var(--image-file-arrow-drop-down-light)}}@media (forced-colors: active) and (prefers-color-scheme: dark){.chrome-select{background-image:var(--image-file-arrow-drop-down-dark)}.theme-with-dark-background .chrome-select,\n :host-context(.theme-with-dark-background) .chrome-select{background-image:var(--image-file-arrow-drop-down-dark)}}.chrome-select-label{margin:0 22px;flex:none}.chrome-select-label p p{margin-top:0;color:var(--sys-color-token-subtle)}.settings-select{margin:0}.chrome-select optgroup,\n.chrome-select option{background-color:var(--sys-color-cdt-base-container);color:var(--sys-color-on-surface)}.gray-info-message{text-align:center;font-style:italic;padding:6px;color:var(--sys-color-token-subtle);white-space:nowrap}span[is="dt-icon-label"]{flex:none}.full-widget-dimmed-banner a{color:inherit}.full-widget-dimmed-banner{color:var(--sys-color-token-subtle);background-color:var(--sys-color-cdt-base-container);display:flex;justify-content:center;align-items:center;text-align:center;padding:20px;position:absolute;top:0;right:0;bottom:0;left:0;font-size:13px;overflow:auto;z-index:500}.dot::before{content:var(--image-file-empty);width:6px;height:6px;border-radius:50%;outline:1px solid var(--icon-gap-default);left:9px;position:absolute;top:9px;z-index:1}.green::before{background-color:var(--sys-color-green-bright)}.purple::before{background-color:var(--sys-color-purple-bright)}.expandable-inline-button{background-color:var(--sys-color-cdt-base-container);color:var(--sys-color-on-surface);cursor:pointer;border-radius:3px}.undisplayable-text,\n.expandable-inline-button{border:none;padding:1px 3px;margin:0 2px;font-size:11px;font-family:sans-serif;white-space:nowrap;display:inline-block}.undisplayable-text::after,\n.expandable-inline-button::after{content:attr(data-text)}.undisplayable-text{color:var(--sys-color-state-disabled);font-style:italic}.expandable-inline-button:hover,\n.expandable-inline-button:focus-visible{background-color:var(--sys-color-state-hover-on-subtle)}.expandable-inline-button:focus-visible{background-color:var(--sys-color-state-focus-highlight)}::selection{background-color:var(--sys-color-tonal-container)}.reload-warning{align-self:center;margin-left:10px}button.link{border:none;background:none;padding:3px}button.link:focus-visible{outline:2px solid var(--sys-color-state-focus-ring);outline-offset:2px;border-radius:var(--sys-shape-corner-full)}.theme-with-dark-background button.link:focus-visible,\n:host-context(.theme-with-dark-background) button.link:focus-visible{--override-link-focus-background-color:rgb(230 230 230/8%)}@media (forced-colors: active){.dimmed,\n .chrome-select:disabled{opacity:100%}.harmony-input:not([type]),\n .harmony-input[type="number"],\n .harmony-input[type="text"]{border:1px solid ButtonText}.harmony-input:not([type]):focus,\n .harmony-input[type="number"]:focus,\n .harmony-input[type="text"]:focus{border:1px solid Highlight}}input.custom-search-input::-webkit-search-cancel-button{appearance:none;width:16px;height:15px;margin-right:0;opacity:70%;mask-image:var(--image-file-cross-circle-filled);mask-position:center;mask-repeat:no-repeat;mask-size:99%;background-color:var(--icon-default)}input.custom-search-input::-webkit-search-cancel-button:hover{opacity:99%}.spinner::before{display:block;width:var(--dimension,24px);height:var(--dimension,24px);border:var(--override-spinner-size,3px) solid var(--override-spinner-color,var(--sys-color-token-subtle));border-radius:12px;clip:rect(0,var(--clip-size,15px),var(--clip-size,15px),0);content:"";position:absolute;animation:spinner-animation 1s linear infinite;box-sizing:border-box}@keyframes spinner-animation{from{transform:rotate(0)}to{transform:rotate(360deg)}}.adorner-container{display:inline-flex;vertical-align:middle}.adorner-container.hidden{display:none}.adorner-container devtools-adorner{margin-left:3px}:host-context(.theme-with-dark-background) devtools-adorner{--override-adorner-border-color:var(--sys-color-tonal-outline);--override-adorner-focus-border-color:var(--sys-color-state-focus-ring);--override-adorner-active-background-color:var(--sys-color-state-riple-neutral-on-subtle)}.panel{display:flex;overflow:hidden;position:absolute;top:0;left:0;right:0;bottom:0;z-index:0;background-color:var(--sys-color-cdt-base-container)}.panel-sidebar{overflow-x:hidden;background-color:var(--sys-color-cdt-base-container)}iframe.extension{flex:auto;width:100%;height:100%}iframe.panel.extension{display:block;height:100%}@media (forced-colors: active){:root{--legacy-accent-color:Highlight;--legacy-focus-ring-inactive-shadow-color:ButtonText}}\n/*# sourceURL=inspectorCommon.css */\n'};let X;class Y{actionRegistry;actionToShortcut;keyMap;activePrefixKey;activePrefixTimeout;consumePrefix;devToolsDefaultShortcutActions;disabledDefaultShortcutsForAction;keybindSetSetting;userShortcutsSetting;constructor(t){this.actionRegistry=t,this.actionToShortcut=new n.MapUtilities.Multimap,this.keyMap=new Q(0,0),this.activePrefixKey=null,this.activePrefixTimeout=null,this.consumePrefix=null,this.devToolsDefaultShortcutActions=new Set,this.disabledDefaultShortcutsForAction=new n.MapUtilities.Multimap,this.keybindSetSetting=e.Settings.Settings.instance().moduleSetting("active-keybind-set"),this.keybindSetSetting.addChangeListener((e=>{r.userMetrics.keybindSetSettingChanged(e.data),this.registerBindings()})),this.userShortcutsSetting=e.Settings.Settings.instance().moduleSetting("user-shortcuts"),this.userShortcutsSetting.addChangeListener(this.registerBindings,this),this.registerBindings()}static instance(e={forceNew:null,actionRegistry:null}){const{forceNew:t,actionRegistry:n}=e;if(!X||t){if(!n)throw new Error("Missing actionRegistry for shortcutRegistry");X=new Y(n)}return X}static removeInstance(){X=void 0}applicableActions(e,t={}){let n=[];const i=(this.activePrefixKey||this.keyMap).getNode(e);i&&(n=i.actions());const s=this.actionRegistry.applicableActions(n,m.instance());if(i)for(const e of Object.keys(t))if(i.actions().indexOf(e)>=0&&this.actionRegistry.hasAction(e)){const t=this.actionRegistry.getAction(e);s.push(t)}return s}shortcutsForAction(e){return[...this.actionToShortcut.get(e)]}actionsForDescriptors(e){let t=this.keyMap;for(const{key:n}of e){if(!t)return[];t=t.getNode(n)}return t?t.actions():[]}globalShortcutKeys(){const e=[];for(const t of this.keyMap.chords().values()){const n=t.actions();(this.actionRegistry.applicableActions(n,m.instance()).length||t.hasChords())&&e.push(t.key())}return e}keysForActions(e){const t=e.flatMap((e=>[...this.actionToShortcut.get(e)].flatMap((e=>e.descriptors.map((e=>e.key))))));return[...new Set(t)]}shortcutTitleForAction(e){for(const t of this.actionToShortcut.get(e))return t.title()}handleShortcut(e,t){this.handleKey(ie.makeKeyFromEvent(e),e.key,e,t)}actionHasDefaultShortcut(e){return this.devToolsDefaultShortcutActions.has(e)}getShortcutListener(e){const t=Object.keys(e).flatMap((e=>[...this.actionToShortcut.get(e)])),n=new Q(0,0);return t.forEach((e=>{n.addKeyMapping(e.descriptors.map((e=>e.key)),e.action)})),t=>{const i=ie.makeKeyFromEvent(t),s=this.activePrefixKey?n.getNode(this.activePrefixKey.key()):n;s&&s.getNode(i)&&this.handleShortcut(t,e)}}addShortcutListener(e,t){const n=this.getShortcutListener(t);return e.addEventListener("keydown",n),n}async handleKey(e,t,n,i){const o=e>>8,a=Boolean(i)||Boolean(this.activePrefixKey),l=this.keyMap.getNode(e),c=this.applicableActions(e,i).length>0||l&&l.hasChords();if((a||!function(){if(!n||!vi()||/^F\d+|Control|Shift|Alt|Meta|Escape|Win|U\+001B$/.test(t))return!1;if(!o)return!0;const i=se;if(r.Platform.isMac()){if(ie.makeKey("z",i.Meta)===e)return!0;if(ie.makeKey("z",i.Meta|i.Shift)===e)return!0}else{if(ie.makeKey("z",i.Ctrl)===e)return!0;if(ie.makeKey("y",i.Ctrl)===e)return!0;if(!r.Platform.isWin()&&ie.makeKey("z",i.Ctrl|i.Shift)===e)return!0}if((o&(i.Ctrl|i.Alt))==(i.Ctrl|i.Alt))return r.Platform.isWin();return!d(i.Ctrl)&&!d(i.Alt)&&!d(i.Meta)}())&&c&&!ie.isModifier(ie.keyCodeAndModifiersFromKey(e).keyCode)&&(n&&n.consume(!0),a||!ws.hasInstance())){if(this.activePrefixTimeout){clearTimeout(this.activePrefixTimeout);const e=await h.call(this,n);if(this.activePrefixKey=null,this.activePrefixTimeout=null,e)return;this.consumePrefix&&await this.consumePrefix()}l&&l.hasChords()?(this.activePrefixKey=l,this.consumePrefix=async()=>{this.activePrefixKey=null,this.activePrefixTimeout=null,await h.call(this,n)},this.activePrefixTimeout=window.setTimeout(this.consumePrefix,ee)):await h.call(this,n)}function d(e){return Boolean(o&e)}async function h(t){const n=this.applicableActions(e,i);if(!n.length)return!1;for(const e of n){let n;if(i&&i[e.id()]&&(n=await i[e.id()]()),i||(n=await e.execute()),n)return r.userMetrics.keyboardShortcutFired(e.id()),t&&s.logKeyDown(null,t,e.id()),!0}return!1}}registerUserShortcut(e){for(const t of this.disabledDefaultShortcutsForAction.get(e.action))if(t.descriptorsMatch(e.descriptors)&&t.hasKeybindSet(this.keybindSetSetting.get()))return void this.removeShortcut(t);for(const t of this.actionToShortcut.get(e.action))if(t.descriptorsMatch(e.descriptors))return;this.addShortcutToSetting(e)}removeShortcut(e){"DefaultShortcut"===e.type||"KeybindSetShortcut"===e.type?this.addShortcutToSetting(e.changeType("DisabledDefault")):this.removeShortcutFromSetting(e)}disabledDefaultsForAction(e){return this.disabledDefaultShortcutsForAction.get(e)}addShortcutToSetting(e){const t=this.userShortcutsSetting.get();t.push(e),this.userShortcutsSetting.set(t)}removeShortcutFromSetting(e){const t=this.userShortcutsSetting.get(),n=t.findIndex(e.equals,e);-1!==n&&(t.splice(n,1),this.userShortcutsSetting.set(t))}registerShortcut(e){this.actionToShortcut.set(e.action,e),this.keyMap.addKeyMapping(e.descriptors.map((e=>e.key)),e.action)}registerBindings(){this.actionToShortcut.clear(),this.keyMap.clear();const e=this.keybindSetSetting.get();this.disabledDefaultShortcutsForAction.clear(),this.devToolsDefaultShortcutActions.clear();const t=[],n=this.userShortcutsSetting.get();for(const e of n){const n=ie.createShortcutFromSettingObject(e);"DisabledDefault"===n.type?this.disabledDefaultShortcutsForAction.set(n.action,n):(J.has(n.action)&&t.push(...n.descriptors.map((e=>ie.keyCodeAndModifiersFromKey(e.key)))),this.registerShortcut(n))}for(const e of S()){const n=e.id(),r=e.bindings();for(let e=0;r&&e<r.length;++e){const o=r[e].keybindSets;if(!i(r[e].platform)||!s(o))continue;const a=r[e].shortcut.split(/\s+/).map(ie.makeDescriptorFromBindingShortcut);if(a.length>0){if(this.isDisabledDefault(a,n)){this.devToolsDefaultShortcutActions.add(n);continue}J.has(n)&&t.push(...a.map((e=>ie.keyCodeAndModifiersFromKey(e.key)))),o?(o.includes("devToolsDefault")&&this.devToolsDefaultShortcutActions.add(n),this.registerShortcut(new ie(a,n,"KeybindSetShortcut",new Set(o)))):(this.devToolsDefaultShortcutActions.add(n),this.registerShortcut(new ie(a,n,"DefaultShortcut")))}}}function i(e){if(!e)return!0;const t=e.split(",");let n=!1;const i=r.Platform.platform();for(let e=0;!n&&e<t.length;++e)n=t[e]===i;return n}function s(t){return!t||t.includes(e)}r.InspectorFrontendHost.InspectorFrontendHostInstance.setWhitelistedShortcuts(JSON.stringify(t))}isDisabledDefault(e,t){const n=this.disabledDefaultShortcutsForAction.get(t);for(const t of n)if(t.descriptorsMatch(e))return!0;return!1}}class Q{keyInternal;actionsInternal;chordsInternal;depth;constructor(e,t=0){this.keyInternal=e,this.actionsInternal=[],this.chordsInternal=new Map,this.depth=t}addAction(e){this.actionsInternal.push(e)}key(){return this.keyInternal}chords(){return this.chordsInternal}hasChords(){return this.chordsInternal.size>0}addKeyMapping(e,t){if(!(e.length<this.depth))if(e.length===this.depth)this.addAction(t);else{const n=e[this.depth];this.chordsInternal.has(n)||this.chordsInternal.set(n,new Q(n,this.depth+1)),this.chordsInternal.get(n).addKeyMapping(e,t)}}getNode(e){return this.chordsInternal.get(e)||null}actions(){return this.actionsInternal}clear(){this.actionsInternal=[],this.chordsInternal=new Map}}class Z{static instance=new Z}const J=new Set(["main.toggle-dock","debugger.toggle-breakpoints-active","debugger.toggle-pause","quick-open.show-command-menu","console.toggle"]),ee=1e3,te="devToolsDefault";var ne=Object.freeze({__proto__:null,ShortcutRegistry:Y,ShortcutTreeNode:Q,ForwardedShortcut:Z,ForwardedActions:J,KeyTimeout:ee,DefaultShortcutSetting:te});class ie{descriptors;action;type;keybindSets;constructor(e,t,n,i){this.descriptors=e,this.action=t,this.type=n,this.keybindSets=i||new Set}title(){return this.descriptors.map((e=>e.name)).join(" ")}isDefault(){return"DefaultShortcut"===this.type||"DisabledDefault"===this.type||"KeybindSetShortcut"===this.type&&this.keybindSets.has(te)}changeType(e){return new ie(this.descriptors,this.action,e)}changeKeys(e){return this.descriptors=e,this}descriptorsMatch(e){return e.length===this.descriptors.length&&e.every(((e,t)=>e.key===this.descriptors[t].key))}hasKeybindSet(e){return!this.keybindSets||this.keybindSets.has(e)}equals(e){return this.descriptorsMatch(e.descriptors)&&this.type===e.type&&this.action===e.action}static createShortcutFromSettingObject(e){return new ie(e.descriptors,e.action,e.type)}static makeKey(e,t){return"string"==typeof e&&(e=e.charCodeAt(0)-(/^[a-z]/.test(e)?32:0)),t=t||se.None,ie.makeKeyFromCodeAndModifiers(e,t)}static makeKeyFromEvent(e){let t=se.None;e.shiftKey&&(t|=se.Shift),e.ctrlKey&&(t|=se.Ctrl),e.altKey&&(t|=se.Alt),e.metaKey&&(t|=se.Meta);const n=e.keyCode||e.__keyCode;return ie.makeKeyFromCodeAndModifiers(n,t)}static makeKeyFromEventIgnoringModifiers(e){const t=e.keyCode||e.__keyCode;return ie.makeKeyFromCodeAndModifiers(t,se.None)}static eventHasCtrlEquivalentKey(e){return r.Platform.isMac()?e.metaKey&&!e.ctrlKey:e.ctrlKey&&!e.metaKey}static eventHasEitherCtrlOrMeta(e){return e.metaKey||e.ctrlKey}static hasNoModifiers(e){const t=e;return!(t.ctrlKey||t.shiftKey||t.altKey||t.metaKey)}static makeDescriptor(e,t){return{key:ie.makeKey("string"==typeof e?e:e.code,t),name:ie.shortcutToString(e,t)}}static makeDescriptorFromBindingShortcut(e){const[t,...n]=e.split(/\+(?!$)/).reverse();let i=0;for(const t of n){const n=se[t];console.assert(void 0!==n,`Only one key other than modifier is allowed in shortcut <${e}>`),i|=n}console.assert(t.length>0,`Modifiers-only shortcuts are not allowed (encountered <${e}>)`);const s=be[t]||fe[t];return s&&"shiftKey"in s&&s.shiftKey&&(i|=se.Shift),ie.makeDescriptor(s||t,i)}static shortcutToString(e,t){return"string"!=typeof e&&ie.isModifier(e.code)?ie.modifiersToString(t):ie.modifiersToString(t)+ie.keyName(e)}static keyName(e){return"string"==typeof e?e.toUpperCase():"string"==typeof e.name?e.name:e.name[r.Platform.platform()]||e.name.other||""}static makeKeyFromCodeAndModifiers(e,t){return 255&e|(t||0)<<8}static keyCodeAndModifiersFromKey(e){return{keyCode:255&e,modifiers:e>>8}}static isModifier(e){const{keyCode:t}=ie.keyCodeAndModifiersFromKey(e);return t===be.Shift.code||t===be.Ctrl.code||t===be.Alt.code||t===be.Meta.code}static modifiersToString(e){const t=r.Platform.isMac(),n=se,i=new Map([[n.Ctrl,t?"Ctrl ":"Ctrl + "],[n.Alt,t?"⌥ ":"Alt + "],[n.Shift,t?"⇧ ":"Shift + "],[n.Meta,t?"⌘ ":"Win + "]]);return[n.Meta,n.Ctrl,n.Alt,n.Shift].map((function(t){return(e||0)&t?i.get(t):""})).join("")}}const se={None:0,Shift:1,Ctrl:2,Alt:4,Meta:8,CtrlOrMeta:r.Platform.isMac()?8:2,ShiftOrOption:r.Platform.isMac()?4:1},re={code:37,name:"←"},oe={code:38,name:"↑"},ae={code:39,name:"→"},le={code:40,name:"↓"},ce={code:17,name:"Ctrl"},de={code:27,name:"Esc"},he={code:32,name:"Space"},ue={code:187,name:"+"},pe={code:192,name:"`"},ge={code:222,name:"'"},me={code:91,name:"Meta"},be={Backspace:{code:8,name:"↤"},Tab:{code:9,name:{mac:"⇥",other:"Tab"}},Enter:{code:13,name:{mac:"↩",other:"Enter"}},Shift:{code:16,name:{mac:"⇧",other:"Shift"}},Ctrl:ce,Control:ce,Alt:{code:18,name:"Alt"},Esc:de,Escape:de,Space:he," ":he,PageUp:{code:33,name:{mac:"⇞",other:"PageUp"}},PageDown:{code:34,name:{mac:"⇟",other:"PageDown"}},End:{code:35,name:{mac:"↗",other:"End"}},Home:{code:36,name:{mac:"↖",other:"Home"}},Left:re,Up:oe,Right:ae,Down:le,ArrowLeft:re,ArrowUp:oe,ArrowRight:ae,ArrowDown:le,Delete:{code:46,name:"Del"},Zero:{code:48,name:"0"},H:{code:72,name:"H"},N:{code:78,name:"N"},P:{code:80,name:"P"},Meta:me,F1:{code:112,name:"F1"},F2:{code:113,name:"F2"},F3:{code:114,name:"F3"},F4:{code:115,name:"F4"},F5:{code:116,name:"F5"},F6:{code:117,name:"F6"},F7:{code:118,name:"F7"},F8:{code:119,name:"F8"},F9:{code:120,name:"F9"},F10:{code:121,name:"F10"},F11:{code:122,name:"F11"},F12:{code:123,name:"F12"},Semicolon:{code:186,name:";"},NumpadPlus:{code:107,name:"Numpad +"},NumpadMinus:{code:109,name:"Numpad -"},Numpad0:{code:96,name:"Numpad 0"},Plus:ue,Equal:ue,Comma:{code:188,name:","},Minus:{code:189,name:"-"},Period:{code:190,name:"."},Slash:{code:191,name:"/"},QuestionMark:{code:191,name:"?"},Apostrophe:pe,Tilde:{code:192,name:"Tilde"},Backquote:pe,IntlBackslash:pe,LeftSquareBracket:{code:219,name:"["},RightSquareBracket:{code:221,name:"]"},Backslash:{code:220,name:"\\"},SingleQuote:ge,Quote:ge,CtrlOrMeta:r.Platform.isMac()?me:ce},fe={};!function(){for(const e in be){const t=be[e];if("object"==typeof t&&t.code){const n="string"==typeof t.name?t.name:e;