const _loadedScripts={};(function(){const baseUrl=self.location?self.location.origin+self.location.pathname:'';self._importScriptPathPrefix=baseUrl.substring(0,baseUrl.lastIndexOf('/')+1);})();const REMOTE_MODULE_FALLBACK_REVISION='@010ddcfda246975d194964ccf20038ebbdec6084';class Runtime{constructor(descriptors){this._modules=[];this._modulesMap={};this._extensions=[];this._cachedTypeClasses={};this._descriptorsMap={};for(let i=0;i{const urlWithFallbackVersion=url.replace(/@[0-9a-f]{40}/,REMOTE_MODULE_FALLBACK_REVISION);if(urlWithFallbackVersion===url||!url.includes('audits_worker_module')){throw err;} return Runtime.loadResourcePromise(urlWithFallbackVersion);});} static normalizePath(path){if(path.indexOf('..')===-1&&path.indexOf('.')===-1){return path;} const normalizedSegments=[];const segments=path.split('/');for(let i=0;iextension.instance()));} _resolve(typeName){if(!this._cachedTypeClasses[typeName]){const path=typeName.split('.');let object=self;for(let i=0;object&&(ithis._loadedForTest=true);return this._pendingLoadPromise;} _loadResources(){const resources=this._descriptor['resources'];if(!resources||!resources.length){return Promise.resolve();} const promises=[];for(let i=0;ia.substring(0,1).toUpperCase()+a.substring(1)).join('');} _modularizeURL(resourceName){return Runtime.normalizePath(this._name+'/'+resourceName);} _remoteBase(){return!Runtime.queryParam('debugFrontend')&&this._descriptor.remote&&Runtime._remoteBase||undefined;} fetchResource(resourceName){const base=this._remoteBase();const sourceURL=Runtime.getResourceURL(this._modularizeURL(resourceName),base);return base?Runtime.loadResourcePromiseWithFallback(sourceURL):Runtime.loadResourcePromise(sourceURL);} substituteURL(value){const base=this._remoteBase()||'';return value.replace(/@url\(([^\)]*?)\)/g,convertURL.bind(this));function convertURL(match,url){return base+this._modularizeURL(url);}}} class Extension{constructor(module,descriptor){this._module=module;this._descriptor=descriptor;this._type=descriptor.type;this._hasTypeClass=this._type.charAt(0)==='@';this._className=descriptor.className||null;this._factoryName=descriptor.factoryName||null;} descriptor(){return this._descriptor;} module(){return this._module;} enabled(){return this._module.enabled()&&Runtime._isDescriptorEnabled(this.descriptor());} _typeClass(){if(!this._hasTypeClass){return null;} return this._module._manager._resolve(this._type.substring(1));} isApplicable(context){return this._module._manager.isExtensionApplicableToContext(this,context);} instance(){return this._module._loadPromise().then(this._createInstance.bind(this));} canInstantiate(){return!!(this._className||this._factoryName);} _createInstance(){const className=this._className||this._factoryName;if(!className){throw new Error('Could not instantiate extension with no class');} const constructorFunction=self.eval((className));if(!(constructorFunction instanceof Function)){throw new Error('Could not instantiate: '+className);} if(this._className){return this._module._manager.sharedInstance(constructorFunction);} return new constructorFunction(this);} title(){const title=this._descriptor['title-'+Runtime._platform]||this._descriptor['title'];if(title&&Runtime._l10nCallback){return Runtime._l10nCallback(title);} return title;} hasContextType(contextType){const contextTypes=this.descriptor().contextTypes;if(!contextTypes){return false;} for(let i=0;iRuntime._appStartedPromiseCallback=fulfil);Runtime._l10nCallback;Runtime._remoteBase;(function validateRemoteBase(){if(location.href.startsWith('devtools://devtools/bundled/')&&Runtime.queryParam('remoteBase')){const versionMatch=/\/serve_file\/(@[0-9a-zA-Z]+)\/?$/.exec(Runtime.queryParam('remoteBase'));if(versionMatch){Runtime._remoteBase=`${location.origin}/remote/serve_file/${versionMatch[1]}/`;}}})();self.Root=self.Root||{};Root=Root||{};Root.allDescriptors=[];Root.applicationDescriptor=undefined;Root.Runtime=Runtime;Root.runtime;Root.Runtime.ModuleDescriptor=ModuleDescriptor;Root.Runtime.ExtensionDescriptor=RuntimeExtensionDescriptor;Root.Runtime.Extension=Extension;Root.Runtime.Module=Module;Root.Runtime.ExperimentsSupport=ExperimentsSupport;Root.Runtime.Experiment=Experiment;Root.allDescriptors.push(...[{"dependencies":[],"modules":["platform.js","utilities.js"],"name":"platform","scripts":[]},{"dependencies":["platform","dom_extension"],"name":"toolbox_bootstrap"},{"dependencies":["platform"],"modules":["dom_extension.js","DOMExtension.js"],"name":"dom_extension","scripts":[]}]);Root.applicationDescriptor={"has_html":true,"modules":[{"type":"autostart","name":"platform"},{"type":"autostart","name":"toolbox_bootstrap"},{"type":"autostart","name":"dom_extension"}]};self['Platform']=self['Platform']||{};self['DomExtension']=self['DomExtension']||{};self['ToolboxBootstrap']=self['ToolboxBootstrap']||{};(function(){function toolboxLoaded(){if(!window.opener){return;} const app=window.opener['Emulation']['AdvancedApp']['_instance']();app['toolboxLoaded'](document);} runOnWindowLoad(toolboxLoaded);})();;;